text:
package io.airlift.units;

import com.google.common.collect.ImmutableList;
import io.airlift.json.JsonCodec;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.io.IOException;

import static io.airlift.testing.EquivalenceTester.comparisonTester;
import static io.airlift.units.DataSize.Unit.BYTE;
import static io.airlift.units.DataSize.Unit.GIGABYTE;
import static io.airlift.units.DataSize.Unit.KILOBYTE;
import static io.airlift.units.DataSize.Unit.MEGABYTE;
import static io.airlift.units.DataSize.Unit.PETABYTE;
import static io.airlift.units.DataSize.Unit.TERABYTE;
import static org.testng.Assert.assertEquals;

public class TestDataSize
{
    @Test(dataProvider = "conversions")
    public void testConversions(DataSize.Unit unit, DataSize.Unit toUnit, double factor)
    {
        DataSize size = new DataSize(1, unit).convertTo(toUnit);
        assertEquals(size.getUnit(), toUnit);
        assertEquals(size.getValue(), factor);

        assertEquals(size.getValue(toUnit), factor);
    }

    @Test(dataProvider = "conversions")
    public void testConvertToMostSuccinctDataSize(DataSize.Unit unit, DataSize.Unit toUnit, double factor)
    {
        DataSize size = new DataSize(factor, toUnit);
        DataSize actual = size.convertToMostSuccinctDataSize();
        assertEquals(actual, new DataSize(1, unit));
        assertEquals(actual.getValue(unit), 1.0, 0.001);
        assertEquals(actual.getUnit(), unit);
    }

    @Test
    public void testEquivalence()
    {
        comparisonTester()
                .addLesserGroup(group(0))
                .addGreaterGroup(group(1))
                .addGreaterGroup(group(123352))
                .addGreaterGroup(group(Long.MAX_VALUE))
                .check();
    }

    private Iterable<DataSize> group(double bytes)
    {
        return ImmutableList.of(
                new DataSize(bytes, BYTE),
                new DataSize(bytes / 1024, KILOBYTE),
                new DataSize(bytes / 1024 / 1024, MEGABYTE),
                new DataSize(bytes / 1024 / 1024 / 1024, GIGABYTE),
                new DataSize(bytes / 1024 / 1024 / 1024 / 1024, TERABYTE),
                new DataSize(bytes / 1024 / 1024 / 1024 / 1024 / 1024, PETABYTE)
        );
    }

    @Test(dataProvider = "printedValues")
    public void testToString(String expectedString, double value, DataSize.Unit unit)
    {
        assertEquals(new DataSize(value, unit).toString(), expectedString);
    }

    @Test(dataProvider = "parseableValues")
    public void testValueOf(String string, double expectedValue, DataSize.Unit expectedUnit)
    {
        DataSize size = DataSize.valueOf(string);

        assertEquals(size.getUnit(), expectedUnit);
        assertEquals(size.getValue(), expectedValue);
    }

    @Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "size is null")
    public void testValueOfRejectsNull()
    {
        DataSize.valueOf(null);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is empty")
    public void testValueOfRejectsEmptyString()
    {
        DataSize.valueOf("");
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Unknown unit: kg")
    public void testValueOfRejectsInvalidUnit()
    {
        DataSize.valueOf("1.234 kg");
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is not a valid.*")
    public void testValueOfRejectsInvalidNumber()
    {
        DataSize.valueOf("1.2x4 B");
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is negative")
    public void testConstructorRejectsNegativeSize()
    {
        new DataSize(-1, BYTE);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is infinite")
    public void testConstructorRejectsInfiniteSize()
    {
        new DataSize(Double.POSITIVE_INFINITY, BYTE);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is infinite")
    public void testConstructorRejectsInfiniteSize2()
    {
        new DataSize(Double.NEGATIVE_INFINITY, BYTE);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is not a number")
    public void testConstructorRejectsNaN()
    {
        new DataSize(Double.NaN, BYTE);
    }

    @Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "unit is null")
    public void testConstructorRejectsNullUnit()
    {
        new DataSize(1, null);
    }

    @Test
    public void testToBytes()
    {
        assertEquals(new DataSize(0, BYTE).toBytes(), 0);
        assertEquals(new DataSize(0, MEGABYTE).toBytes(), 0);
        assertEquals(new DataSize(1, BYTE).toBytes(), 1);
        assertEquals(new DataSize(1, KILOBYTE).toBytes(), 1024);
        assertEquals(new DataSize(42, MEGABYTE).toBytes(), 42L * 1024 * 1024);
        assertEquals(new DataSize(0.037, KILOBYTE).toBytes(), 37);
        assertEquals(new DataSize(1, TERABYTE).toBytes(), 1024L * 1024 * 1024 * 1024);
        assertEquals(new DataSize(1, PETABYTE).toBytes(), 1024L * 1024 * 1024 * 1024 * 1024);
        assertEquals(new DataSize(1024, PETABYTE).toBytes(), 1024L * 1024 * 1024 * 1024 * 1024 * 1024);
        assertEquals(new DataSize(8191, PETABYTE).toBytes(), 8191L * 1024 * 1024 * 1024 * 1024 * 1024);
        assertEquals(new DataSize(Long.MAX_VALUE, BYTE).toBytes(), Long.MAX_VALUE);
        assertEquals(new DataSize(Long.MAX_VALUE / 1024.0, KILOBYTE).toBytes(), Long.MAX_VALUE);
    }

    @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = "size is too large .*")
    public void testToBytesTooLarge()
    {
        new DataSize(Long.MAX_VALUE + 1024.0001, BYTE).toBytes(); // smallest value that overflows
    }

    @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = "size is too large .*")
    public void testToBytesTooLarge2()
    {
        new DataSize(9000, PETABYTE).toBytes();
    }

    @Test
    public void testRoundTo()
    {
        assertEquals(new DataSize(0, BYTE).roundTo(BYTE), 0);
        assertEquals(new DataSize(0.5, BYTE).roundTo(BYTE), 1);
        assertEquals(new DataSize((42 * 1024) + 511, BYTE).roundTo(KILOBYTE), 42);
        assertEquals(new DataSize((42 * 1024) + 512, BYTE).roundTo(KILOBYTE), 43);
        assertEquals(new DataSize(513, TERABYTE).roundTo(PETABYTE), 1);
        assertEquals(new DataSize(9000L * 1024 * 1024 * 1024 * 1024, KILOBYTE).roundTo(PETABYTE), 9000);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is too large .*")
    public void testRoundToTooLarge()
    {
        new DataSize(Long.MAX_VALUE + 1024.0001, BYTE).roundTo(BYTE);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is too large .*")
    public void testRoundToTooLarge2()
    {
        new DataSize(9000, PETABYTE).roundTo(BYTE);
    }

    @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "size is too large .*")
    public void testRoundToTooLarge3()
    {
        new DataSize(9000 * 1024, PETABYTE).roundTo(KILOBYTE);
    }

    @Test
    public void testJsonRoundTrip()
            throws Exception
    {
        assertJsonRoundTrip(new DataSize(1.234, BYTE));
        assertJsonRoundTrip(new DataSize(1.234, KILOBYTE));
        assertJsonRoundTrip(new DataSize(1.234, MEGABYTE));
        assertJsonRoundTrip(new DataSize(1.234, GIGABYTE));
        assertJsonRoundTrip(new DataSize(1.234, TERABYTE));
        assertJsonRoundTrip(new DataSize(1.234, PETABYTE));

    }

    private void assertJsonRoundTrip(DataSize dataSize)
            throws IOException
    {
        JsonCodec<DataSize> dataSizeCodec = JsonCodec.jsonCodec(DataSize.class);
        String json = dataSizeCodec.toJson(dataSize);
        DataSize dataSizeCopy = dataSizeCodec.fromJson(json);
        double delta = dataSize.toBytes() * 0.01;
        Assert.assertEquals(dataSize.toBytes(), dataSizeCopy.toBytes(), delta);
    }

    @DataProvider(name = "parseableValues", parallel = true)
    private Object[][] parseableValues()
    {
        return new Object[][] {
                // spaces
                new Object[] { "1234 B", 1234, BYTE },
                new Object[] { "1234 kB", 1234, KILOBYTE },
                new Object[] { "1234 MB", 1234, MEGABYTE },
                new Object[] { "1234 GB", 1234, GIGABYTE },
                new Object[] { "1234 TB", 1234, TERABYTE },
                new Object[] { "1234 PB", 1234, PETABYTE },
                new Object[] { "1234.567 B", 1234.567, BYTE },
                new Object[] { "1234.567 kB", 1234.567, KILOBYTE },
                new Object[] { "1234.567 MB", 1234.567, MEGABYTE },
                new Object[] { "1234.567 GB", 1234.567, GIGABYTE },
                new Object[] { "1234.567 TB", 1234.567, TERABYTE },
                new Object[] { "1234.567 PB", 1234.567, PETABYTE },
                // no spaces
                new Object[] { "1234B", 1234, BYTE },
                new Object[] { "1234kB", 1234, KILOBYTE },
                new Object[] { "1234MB", 1234, MEGABYTE },
                new Object[] { "1234GB", 1234, GIGABYTE },
                new Object[] { "1234TB", 1234, TERABYTE },
                new Object[] { "1234PB", 1234, PETABYTE },
                new Object[] { "1234.567B", 1234.567, BYTE },
                new Object[] { "1234.567kB", 1234.567, KILOBYTE },
                new Object[] { "1234.567MB", 1234.567, MEGABYTE },
                new Object[] { "1234.567GB", 1234.567, GIGABYTE },
                new Object[] { "1234.567TB", 1234.567, TERABYTE },
                new Object[] { "1234.567PB", 1234.567, PETABYTE }
        };
    }

    @DataProvider(name = "printedValues", parallel = true)
    private Object[][] printedValues()
    {
        return new Object[][] {
                new Object[] { "1234B", 1234, BYTE },
                new Object[] { "1234kB", 1234, KILOBYTE },
                new Object[] { "1234MB", 1234, MEGABYTE },
                new Object[] { "1234GB", 1234, GIGABYTE },
                new Object[] { "1234TB", 1234, TERABYTE },
                new Object[] { "1234PB", 1234, PETABYTE },
                new Object[] { "1234.567B", 1234.567, BYTE },
                new Object[] { "1234.567kB", 1234.567, KILOBYTE },
                new Object[] { "1234.567MB", 1234.567, MEGABYTE },
                new Object[] { "1234.567GB", 1234.567, GIGABYTE },
                new Object[] { "1234.567TB", 1234.567, TERABYTE },
                new Object[] { "1234.567PB", 1234.567, PETABYTE }
        };
    }

    @DataProvider(name = "conversions", parallel = true)
    private Object[][] conversions()
    {
        return new Object[][] {
                new Object[] { BYTE, BYTE, 1 },
                new Object[] { BYTE, KILOBYTE, 1.0 / 1024 },
                new Object[] { BYTE, MEGABYTE, 1.0 / 1024 / 1024 },
                new Object[] { BYTE, GIGABYTE, 1.0 / 1024 / 1024 / 1024 },
                new Object[] { BYTE, TERABYTE, 1.0 / 1024 / 1024 / 1024 / 1024 },
                new Object[] { BYTE, PETABYTE, 1.0 / 1024 / 1024 / 1024 / 1024 / 1024 },

                new Object[] { KILOBYTE, BYTE, 1024 },
                new Object[] { KILOBYTE, KILOBYTE, 1 },
                new Object[] { KILOBYTE, MEGABYTE, 1.0 / 1024 },
                new Object[] { KILOBYTE, GIGABYTE, 1.0 / 1024 / 1024 },
                new Object[] { KILOBYTE, TERABYTE, 1.0 / 1024 / 1024 / 1024 },
                new Object[] { KILOBYTE, PETABYTE, 1.0 / 1024 / 1024 / 1024 / 1024 },

                new Object[] { MEGABYTE, BYTE, 1024 * 1024 },
                new Object[] { MEGABYTE, KILOBYTE, 1024 },
                new Object[] { MEGABYTE, MEGABYTE, 1 },
                new Object[] { MEGABYTE, GIGABYTE, 1.0 / 1024 },
                new Object[] { MEGABYTE, TERABYTE, 1.0 / 1024 / 1024 },
                new Object[] { MEGABYTE, PETABYTE, 1.0 / 1024 / 1024 / 1024 },

                new Object[] { GIGABYTE, BYTE, 1024 * 1024 * 1024 },
                new Object[] { GIGABYTE, KILOBYTE, 1024 * 1024 },
                new Object[] { GIGABYTE, MEGABYTE, 1024 },
                new Object[] { GIGABYTE, GIGABYTE, 1 },
                new Object[] { GIGABYTE, TERABYTE, 1.0 / 1024 },
                new Object[] { GIGABYTE, PETABYTE, 1.0 / 1024 / 1024 },

                new Object[] { TERABYTE, BYTE, 1024L * 1024 * 1024 * 1024 },
                new Object[] { TERABYTE, KILOBYTE, 1024 * 1024 * 1024 },
                new Object[] { TERABYTE, MEGABYTE, 1024 * 1024 },
                new Object[] { TERABYTE, GIGABYTE, 1024 },
                new Object[] { TERABYTE, TERABYTE, 1 },
                new Object[] { TERABYTE, PETABYTE, 1.0 / 1024 },

                new Object[] { PETABYTE, BYTE, 1024L * 1024 * 1024 * 1024 * 1024 },
                new Object[] { PETABYTE, KILOBYTE, 1024L * 1024 * 1024 * 1024 },
                new Object[] { PETABYTE, MEGABYTE, 1024 * 1024 * 1024 },
                new Object[] { PETABYTE, GIGABYTE, 1024 * 1024 },
                new Object[] { PETABYTE, TERABYTE, 1024 },
                new Object[] { PETABYTE, PETABYTE, 1 },
        };
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Example2DTileGame.TileScene
{
    class SSScene2DTiled
    {
    }
}

redpajama_set_name: RedPajamaGithub


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace LinkFuture.ClientTiming.Web.Master {

    public partial class SiteBase {

        /// <summary>
        /// phHead control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder phHead;

        /// <summary>
        /// phBoday control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder phBoday;

        /// <summary>
        /// jsContainer control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder jsContainer;

        /// <summary>
        /// phfooter control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::System.Web.UI.WebControls.ContentPlaceHolder phfooter;
    }
}


text:
<html>
  <head>
    <title>IOL</title>
    <!-- script type="text/javascript" src="jquery-1.3.2.js"></script -->
    <!-- script type="text/javascript" src="index.js"></script -->
    <script type="text/javascript">
window.onload = function(){
        var appstate = {};
        var olmap = Titanium.UI.createWebView({url:'map.html', name:'olmap', appstate:appstate});
        var tools = Titanium.UI.createWebView({url:'tools.html', name:'tools', appstate:appstate});
        var compose = Titanium.UI.createButton({systemButton:Titanium.UI.iPhone.SystemButton.COMPOSE});
        var done = Titanium.UI.createButton({systemButton:Titanium.UI.iPhone.SystemButton.DONE});
	compose.addEventListener('click',
            function(){
                //
	        Titanium.UI.currentWindow.setRightNavButton(done);
                Titanium.UI.currentWindow.showView(tools, {animated:false});
            }
        );
        done.addEventListener('click',
                              function(){
                                  Titanium.UI.currentWindow.showView(olmap, {animated:true});
                                  Titanium.UI.currentWindow.setRightNavButton(compose);
                              });
	Titanium.UI.currentWindow.setRightNavButton(compose);
        Titanium.UI.currentWindow.addView(olmap);
        Titanium.UI.currentWindow.addView(tools);
        Titanium.UI.currentWindow.showView(olmap, {animated:false});
        Titanium.API.info(Titanium.UI.currentWindow + " is ready");
};
    </script>
    <link href="index.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <!-- This space could be used for adding a variety of widgets as
         dom elements -->
  </body>
</html>


text:
using ppapi::ArrayBufferVar;
using ppapi::ArrayVar;
using ppapi::DictionaryVar;
using ppapi::ScopedPPVar;
using ppapi::StringVar;
using std::make_pair;

namespace {

struct HashedHandle {
  HashedHandle(v8::Handle<v8::Object> h) : handle(h) {}
  size_t hash() const { return handle->GetIdentityHash(); }
  bool operator==(const HashedHandle& h) const { return handle == h.handle; }
  bool operator<(const HashedHandle& h) const { return hash() < h.hash(); }
  v8::Handle<v8::Object> handle;
};

}  // namespace

namespace BASE_HASH_NAMESPACE {
#if defined(COMPILER_GCC)
template <>
struct hash<HashedHandle> {
  size_t operator()(const HashedHandle& handle) const {
    return handle.hash();
  }
};
#elif defined(COMPILER_MSVC)
inline size_t hash_value(const HashedHandle& handle) {
  return handle.hash();
}
#endif
}  // namespace BASE_HASH_NAMESPACE

namespace webkit {
namespace ppapi {

namespace {

// Maps PP_Var IDs to the V8 value handle they correspond to.
typedef base::hash_map<int64_t, v8::Handle<v8::Value> > VarHandleMap;

// Maps V8 value handles to the PP_Var they correspond to.
typedef base::hash_map<HashedHandle, ScopedPPVar> HandleVarMap;

// Returns a V8 value which corresponds to a given PP_Var. If |var| is a
// reference counted PP_Var type, and it exists in |visited_ids|, the V8 value
// associated with it in the map will be returned, otherwise a new V8 value will
// be created and added to the map. |did_create| indicates whether a new v8
// value was created as a result of calling the function.
bool GetOrCreateV8Value(const PP_Var& var,
                        v8::Handle<v8::Value>* result,
                        bool* did_create,
                        VarHandleMap* visited_ids) {
  *did_create = false;

  if (::ppapi::VarTracker::IsVarTypeRefcounted(var.type)) {
    VarHandleMap::iterator it = visited_ids->find(var.value.as_id);
    if (it != visited_ids->end()) {
      *result = it->second;
      return true;
    }
  }

  switch (var.type) {
    case PP_VARTYPE_UNDEFINED:
      *result = v8::Undefined();
      break;
    case PP_VARTYPE_NULL:
      *result = v8::Null();
      break;
    case PP_VARTYPE_BOOL:
      *result = (var.value.as_bool == PP_TRUE) ? v8::True() : v8::False();
      break;
    case PP_VARTYPE_INT32:
      *result = v8::Integer::New(var.value.as_int);
      break;
    case PP_VARTYPE_DOUBLE:
      *result = v8::Number::New(var.value.as_double);
      break;
    case PP_VARTYPE_STRING: {
      StringVar* string = StringVar::FromPPVar(var);
      if (!string) {
        NOTREACHED();
        result->Clear();
        return false;
      }
      const std::string& value = string->value();
      // Create a string object rather than a string primitive. This allows us
      // to have multiple references to the same string in javascript, which
      // matches the reference behavior of PP_Vars.
      *result = v8::String::New(value.c_str(), value.size())->ToObject();
      break;
    }
    case PP_VARTYPE_ARRAY_BUFFER: {
      ArrayBufferVar* buffer = ArrayBufferVar::FromPPVar(var);
      if (!buffer) {
        NOTREACHED();
        result->Clear();
        return false;
      }
      HostArrayBufferVar* host_buffer =
          static_cast<HostArrayBufferVar*>(buffer);
      *result =
          v8::Local<v8::Value>::New(host_buffer->webkit_buffer().toV8Value());
      break;
    }
    case PP_VARTYPE_ARRAY:
      *result = v8::Array::New();
      break;
    case PP_VARTYPE_DICTIONARY:
      *result = v8::Object::New();
      break;
    case PP_VARTYPE_OBJECT:
      NOTREACHED();
      result->Clear();
      return false;
  }

  *did_create = true;
  if (::ppapi::VarTracker::IsVarTypeRefcounted(var.type))
    (*visited_ids)[var.value.as_id] = *result;
  return true;
}

// For a given V8 value handle, this returns a PP_Var which corresponds to it.
// If the handle already exists in |visited_handles|, the PP_Var associated with
// it will be returned, otherwise a new V8 value will be created and added to
// the map. |did_create| indicates if a new PP_Var was created as a result of
// calling the function.
bool GetOrCreateVar(v8::Handle<v8::Value> val,
                    PP_Var* result,
                    bool* did_create,
                    HandleVarMap* visited_handles) {
  CHECK(!val.IsEmpty());
  *did_create = false;

  // Even though every v8 string primitive encountered will be a unique object,
  // we still add them to |visited_handles| so that the corresponding string
  // PP_Var created will be properly refcounted.
  if (val->IsObject() || val->IsString()) {
    HandleVarMap::const_iterator it = visited_handles->find(
        HashedHandle(val->ToObject()));
    if (it != visited_handles->end()) {
      *result = it->second.get();
      return true;
    }
  }

  if (val->IsUndefined()) {
    *result = PP_MakeUndefined();
  } else if (val->IsNull()) {
    *result = PP_MakeNull();
  } else if (val->IsBoolean() || val->IsBooleanObject()) {
    *result = PP_MakeBool(PP_FromBool(val->ToBoolean()->Value()));
  } else if (val->IsInt32()) {
    *result = PP_MakeInt32(val->ToInt32()->Value());
  } else if (val->IsNumber() || val->IsNumberObject()) {
    *result = PP_MakeDouble(val->ToNumber()->Value());
  } else if (val->IsString() || val->IsStringObject()) {
    v8::String::Utf8Value utf8(val->ToString());
    *result = StringVar::StringToPPVar(std::string(*utf8, utf8.length()));
  } else if (val->IsArray()) {
    *result = (new ArrayVar())->GetPPVar();
  } else if (val->IsObject()) {
    scoped_ptr<WebKit::WebArrayBuffer> web_array_buffer(
        WebKit::WebArrayBuffer::createFromV8Value(val));
    if (web_array_buffer.get()) {
      scoped_refptr<HostArrayBufferVar> buffer_var(new HostArrayBufferVar(
          *web_array_buffer));
      *result = buffer_var->GetPPVar();
    } else {
      *result = (new DictionaryVar())->GetPPVar();
    }
  } else {
    NOTREACHED();
    return false;
  }

  *did_create = true;
  if (val->IsObject() || val->IsString()) {
    visited_handles->insert(make_pair(
        HashedHandle(val->ToObject()),
        ScopedPPVar(ScopedPPVar::PassRef(), *result)));
  }
  return true;
}

}  // namespace

V8VarConverter::V8VarConverter() {
}

bool V8VarConverter::ToV8Value(const PP_Var& var,
                               v8::Handle<v8::Context> context,
                               v8::Handle<v8::Value>* result) const {
  v8::Context::Scope context_scope(context);
  v8::HandleScope handle_scope;

  VarHandleMap visited_ids;

  std::stack<PP_Var> stack;
  stack.push(var);
  v8::Handle<v8::Value> root;
  bool is_root = true;

  while (!stack.empty()) {
    const PP_Var& current_var = stack.top();
    v8::Handle<v8::Value> current_v8;
    stack.pop();
    bool did_create = false;
    if (!GetOrCreateV8Value(current_var, &current_v8, &did_create,
                            &visited_ids)) {
      return false;
    }

    if (is_root) {
      is_root = false;
      root = current_v8;
    }

    // Add child nodes to the stack.
    if (current_var.type == PP_VARTYPE_ARRAY) {
      ArrayVar* array_var = ArrayVar::FromPPVar(current_var);
      if (!array_var) {
        NOTREACHED();
        return false;
      }
      DCHECK(current_v8->IsArray());
      v8::Handle<v8::Array> v8_array = current_v8.As<v8::Array>();

      for (size_t i = 0; i < array_var->elements().size(); ++i) {
        const PP_Var& child_var = array_var->elements()[i].get();
        v8::Handle<v8::Value> child_v8;
        if (!GetOrCreateV8Value(child_var, &child_v8, &did_create,
                                &visited_ids)) {
          return false;
        }
        if (did_create &&
            (child_var.type == PP_VARTYPE_DICTIONARY ||
             child_var.type == PP_VARTYPE_ARRAY)) {
          stack.push(child_var);
        }
        v8::TryCatch try_catch;
        v8_array->Set(static_cast<uint32>(i), child_v8);
        if (try_catch.HasCaught()) {
          LOG(ERROR) << "Setter for index " << i << " threw an exception.";
          return false;
        }
      }
    } else if (current_var.type == PP_VARTYPE_DICTIONARY) {
      DictionaryVar* dict_var = DictionaryVar::FromPPVar(current_var);
      if (!dict_var) {
        NOTREACHED();
        return false;
      }
      DCHECK(current_v8->IsObject());
      v8::Handle<v8::Object> v8_object = current_v8->ToObject();

      for (DictionaryVar::KeyValueMap::const_iterator iter =
               dict_var->key_value_map().begin();
           iter != dict_var->key_value_map().end();
           ++iter) {
        const std::string& key = iter->first;
        const PP_Var& child_var = iter->second.get();
        v8::Handle<v8::Value> child_v8;
        if (!GetOrCreateV8Value(child_var, &child_v8, &did_create,
                                &visited_ids)) {
          return false;
        }
        if (did_create &&
            (child_var.type == PP_VARTYPE_DICTIONARY ||
             child_var.type == PP_VARTYPE_ARRAY)) {
          stack.push(child_var);
        }
        v8::TryCatch try_catch;
        v8_object->Set(v8::String::New(key.c_str(), key.length()), child_v8);
        if (try_catch.HasCaught()) {
          LOG(ERROR) << "Setter for property " << key.c_str() << " threw an "
              << "exception.";
          return false;
        }
      }
    }
  }

  *result = handle_scope.Close(root);
  return true;
}

bool V8VarConverter::FromV8Value(v8::Handle<v8::Value> val,
                                 v8::Handle<v8::Context> context,
                                 PP_Var* result) const {
  v8::Context::Scope context_scope(context);
  v8::HandleScope handle_scope;

  HandleVarMap visited_handles;

  std::stack<v8::Handle<v8::Value> > stack;
  stack.push(val);
  ScopedPPVar root;
  bool is_root = true;

  while (!stack.empty()) {
    v8::Handle<v8::Value> current_v8 = stack.top();
    PP_Var current_var;
    stack.pop();
    bool did_create = false;
    if (!GetOrCreateVar(current_v8, &current_var, &did_create,
                        &visited_handles)) {
      return false;
    }

    if (is_root) {
      is_root = false;
      root = current_var;
    }

    // Add child nodes to the stack.
    if (current_var.type == PP_VARTYPE_ARRAY) {
      DCHECK(current_v8->IsArray());
      v8::Handle<v8::Array> v8_array = current_v8.As<v8::Array>();

      ArrayVar* array_var = ArrayVar::FromPPVar(current_var);
      if (!array_var) {
        NOTREACHED();
        return false;
      }

      for (uint32 i = 0; i < v8_array->Length(); ++i) {
        v8::TryCatch try_catch;
        v8::Handle<v8::Value> child_v8 = v8_array->Get(i);
        if (try_catch.HasCaught())
          return false;

        if (!v8_array->HasRealIndexedProperty(i))
          continue;

        PP_Var child_var;
        if (!GetOrCreateVar(child_v8, &child_var, &did_create,
                            &visited_handles)) {
          // Silently ignore the case where we can't convert to a Var as we may
          // be trying to convert a type that doesn't have a corresponding
          // PP_Var type.
          continue;
        }
        if (did_create && child_v8->IsObject())
          stack.push(child_v8);

        array_var->Set(i, child_var);
      }
    } else if (current_var.type == PP_VARTYPE_DICTIONARY) {
      DCHECK(current_v8->IsObject());
      v8::Handle<v8::Object> v8_object = current_v8->ToObject();

      DictionaryVar* dict_var = DictionaryVar::FromPPVar(current_var);
      if (!dict_var) {
        NOTREACHED();
        return false;
      }

      v8::Handle<v8::Array> property_names(v8_object->GetOwnPropertyNames());
      for (uint32 i = 0; i < property_names->Length(); ++i) {
        v8::Handle<v8::Value> key(property_names->Get(i));

        // Extend this test to cover more types as necessary and if sensible.
        if (!key->IsString() && !key->IsNumber()) {
          NOTREACHED() << "Key \"" << *v8::String::AsciiValue(key) << "\" "
                          "is neither a string nor a number";
          return false;
        }

        // Skip all callbacks: crbug.com/139933
        if (v8_object->HasRealNamedCallbackProperty(key->ToString()))
          continue;

        v8::String::Utf8Value name_utf8(key->ToString());

        v8::TryCatch try_catch;
        v8::Handle<v8::Value> child_v8 = v8_object->Get(key);
        if (try_catch.HasCaught())
          return false;

        PP_Var child_var;
        if (!GetOrCreateVar(child_v8, &child_var, &did_create,
                            &visited_handles)) {
          continue;
        }
        if (did_create && child_v8->IsObject())
          stack.push(child_v8);

        bool success = dict_var->SetWithStringKey(
            std::string(*name_utf8, name_utf8.length()), child_var);
        DCHECK(success);
      }
    }
  }
  *result = root.Release();
  return true;
}

}  // namespace ppapi
}  // namespace webkit


text:
/* IBM_PROLOG_BEGIN_TAG */
/*
 * Copyright 2003,2016 IBM International Business Machines Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 		 http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/* IBM_PROLOG_END_TAG */
/* @(#)74	1.3  src/htx/usr/lpp/htx/lib/gr64/htx_exer.h, htx_libgr, htxubuntu 6/7/04 14:35:54 */

/*****************************************************************************

Header HTX Monterey Token Ring Exerciser
Header file for the program invoked by HTX to test the
Monterey Token Ring Adapter.

*****************************************************************************/

#define OK              0	/* 'good' and 'bad' return codes */

#define RULE_FILE_LEN 128	/* strlen of rules file name */

#define HTX_HE_LEN     14	/* strlen of HE_name in struct htx_data  */
#define HTX_SDEV_LEN   14	/* strlen of sdev_id in struct htx_data  */
#define HTX_RUN_LEN     3	/* strlen of run_type in struct htx_data */
#define HTX_MSG_LEN   219	/* strlen of msg_text in struct htx_data */
#ifdef LIBC_23
	extern void htx_err (int, ...);
#else
	extern void htx_err (va_alist);
#endif

extern void strlencpy(char *,char *,int);


text:
package org.gavrog.joss.pgraphs.basic;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.TreeSet;

import org.gavrog.box.collections.Pair;
import org.gavrog.box.collections.Partition;
import org.gavrog.jane.compounds.Matrix;
import org.gavrog.joss.geometry.CoordinateChange;
import org.gavrog.joss.geometry.Operator;
import org.gavrog.joss.geometry.Point;
import org.gavrog.joss.geometry.Vector;

/**
 * Represents a cover of a periodic graph.
 */
public class Cover extends PeriodicGraph {
    final private Morphism coverMorphism;
    final private PeriodicGraph image;

    /**
     * Constructs an instance.
     *
     * @param image the image graph.
     * @param cell the unit cell for the cover, in terms of the original unit cell.
     */
    public Cover(final PeriodicGraph image, final Vector cell[]) {
        super(image.getDimension());

        // --- check the arguments
        if (cell == null) {
            throw new IllegalArgumentException("No cell given.");
        }
        final int dim = image.getDimension();
        if (cell.length != dim) {
            throw new IllegalArgumentException("Expected exactly " + dim
                    + " cell vectors.");
        }
        for (int i = 0; i < cell.length; ++i) {
            if (!cell[i].isIntegral()) {
                throw new IllegalArgumentException("Cell vectors must be integral.");
            }
            if (cell[i].getDimension() != dim) {
                throw new IllegalArgumentException(
                        "Cell vectors must have same dimension as base graph.");
            }
        }

        // --- compute transformation to new coordinates
        final Matrix M = Vector.toMatrix(cell);
        if (M.rank() < dim) {
            throw new IllegalArgumentException("Cell vectors must form a basis.");
        }
        final CoordinateChange C = new CoordinateChange(M);

        // --- find translation representatives modulo the new unit lattice
        final Set<Vector> translations = new HashSet<Vector>();
        final int d = getDimension();
        for (int i = 0; i < d; ++i) {
            final Vector e = Vector.unit(d, i);
            final Vector b = ((Vector) e.times(C)).modZ();
            if (!translations.contains(b)) {
                translations.add(b);
            }
        }
        final LinkedList<Vector> Q = new LinkedList<Vector>();
        Q.addAll(translations);
        final Set<Vector> gens = new HashSet<Vector>();
        gens.addAll(translations);
        while (Q.size() > 0) {
            final Vector s = (Vector) Q.removeFirst();
            for (final Vector t: gens) {
                final Vector sum = ((Vector) s.plus(t)).modZ();
                if (!translations.contains(sum)) {
                    translations.add(sum);
                    Q.addFirst(sum);
                }
            }
        }

        // --- find node and edge representatives in the new coordinate system
        final Map<INode, Point> pos = image.barycentricPlacement();
        final List<Pair<INode, Point>> transformedNodes =
                new ArrayList<Pair<INode, Point>>();
        for (final INode v: image.nodes()) {
            transformedNodes.add(
                    new Pair<INode, Point>(v, (Point) pos.get(v).times(C)));
        }
        final Map<IEdge, Pair<Point, Point>> transformedEdges =
                new HashMap<IEdge, Pair<Point, Point>>();
        for (final IEdge e: image.edges()) {
            final Point p = pos.get(e.source());
            final Point q = pos.get(e.target());
            final Point src = (Point) p.times(C);
            final Point dst = (Point) q.plus(image.getShift(e)).times(C);
            transformedEdges.put(e, new Pair<Point, Point>(src, dst));
        }

        // --- extend the system of representatives to the new unit cell
        final List<Pair<INode, Point>> coverNodes =
                new ArrayList<Pair<INode, Point>>();

        for (final Pair<INode, Point> vp: transformedNodes) {
            final INode v = vp.getFirst();
            final Point p = vp.getSecond();
            for (final Vector s: translations) {
                final Point pv = (Point) p.plus(s);
                coverNodes.add(new Pair<INode, Point>(v, pv.modZ()));
            }
        }

        final List<Pair<IEdge, Pair<Point, Point>>> coverEdges =
                new ArrayList<Pair<IEdge, Pair<Point, Point>>>();
        for (final IEdge e: transformedEdges.keySet()) {
            final Pair<Point, Point> pq = transformedEdges.get(e);
            final Point p = pq.getFirst();
            final Point q = pq.getSecond();
            for (final Vector v: translations) {
                final Point pv = (Point) p.plus(v);
                final Point qv = (Point) q.plus(v);
                final Point rv = pv.modZ();
                final Point sv = (Point) qv.minus(pv).plus(rv);
                coverEdges.add(new Pair<IEdge, Pair<Point, Point>>(
                        e, new Pair<Point, Point>(rv, sv)));
            }
        }

        // --- extract a representation of the new graph
        final Map<Pair<INode, Point>, INode> pos2node =
                new HashMap<Pair<INode, Point>, INode>();
        final Map<INode, Point> node2pos = new HashMap<INode, Point>();
        for (final Pair<INode, Point> vp: coverNodes) {
            final INode w = newNode();
            pos2node.put(vp, w);
            node2pos.put(w, vp.getSecond());
        }
        for (final Pair<IEdge, Pair<Point, Point>> epq: coverEdges) {
            final IEdge e = epq.getFirst();
            final Pair<Point, Point> pq = epq.getSecond();
            final Point p = pq.getFirst();
            final Point q = pq.getSecond();
            final Point r = q.modZ();
            final Vector s = (Vector) q.minus(r);
            final INode v = pos2node.get(new Pair<INode, Point>(e.source(), p));
            final INode w = pos2node.get(new Pair<INode, Point>(e.target(), r));
            newEdge(v, w, s);
        }

        // --- we do not need to recompute the cover's barycentric placement
        cache.put(BARYCENTRIC_PLACEMENT, node2pos);

        // --- compute the cover morphism
        this.coverMorphism = new Morphism(
                this.nodes().next(),
                image.nodes().next(),
                ((CoordinateChange) C.inverse()).getOperator());

        // --- store some additional data
        this.image = image;
    }

    /**
     * @return the cover morphism.
     */
    public Morphism getCoverMorphism() {
        return this.coverMorphism;
    }

    /**
     * @return the image.
     */
    public PeriodicGraph getImage() {
        return this.image;
    }

    /**
     * Get the image of a node under the cover morphism.
     *
     * @param v the original node.
     * @return the image.
     */
    public INode image(final INode v) {
        return getCoverMorphism().getImage(v);
    }

    /**
     * Get the image of an edge under the cover morphism.
     *
     * CAVEAT: this maps only oriented edges.
     *
     * @param e the original edge.
     * @return the image.
     */
    public IEdge image(final IEdge e) {
        return getCoverMorphism().getImage(e);
    }

    /**
     * Computes the position of a node with respect to the cover's coordinate
     * system given the position of it's image under the cover morphism in the
     * image's coordinate system.
     *
     * @param v the node.
     * @param p the position of its image.
     * @return the corresponding position of v.
     */
    public Point liftedPosition(final INode v, final Point p) {
        final PeriodicGraph image = this.getImage();
        final Operator A = getCoverMorphism().getAffineOperator();
        final Point b = this.barycentricPlacement().get(v);
        final Point bA = (Point) b.times(A);
        final Vector d =
                (Vector) bA.minus(image.barycentricPlacement().get(image(v)));
        return (Point) p.plus(d).times(A.inverse());
    }

    /**
     * Computes the position of a node with respect to the cover's coordinate
     * system given the position of it's image under the cover morphism in the
     * image's coordinate system.
     *
     * @param v the node.
     * @param pos a map assigning positions to image nodes.
     * @return the corresponding position of v.
     */
    public Point liftedPosition(final INode v, final Map<INode, Point> pos) {
        return liftedPosition(v, pos.get(image(v)));
    }

    /**
     * Returns the orbits of the set of nodes under the full combinatorial
     * symmetry group.
     *
     * @return an iterator over the set of orbits.
     */
    public Iterator<Set<INode>> nodeOrbits() {
    	// --- determine node orbit representatives of the image graph
        final Map<INode, Integer> orbitIndex = new HashMap<INode, Integer>();
        int nextIndex = 0;
        for (
            Iterator<Set<INode>> iter = getImage().nodeOrbits();
            iter.hasNext();
        ) {
            final Set<INode> orbit = iter.next();
            for (final INode v: orbit) {
                orbitIndex.put(v, nextIndex);
            }
            ++nextIndex;
        }

        // --- determine preimage sets for each node orbit of the image graph
        final SortedMap<Integer, Set<INode>> preImages =
                new TreeMap<Integer, Set<INode>>();
    	for (final INode v: nodes()) {
            final int k = orbitIndex.get(image(v));
            if (!preImages.containsKey(k)) {
                preImages.put(k, new TreeSet<INode>());
    		}
            preImages.get(k).add(v);
    	}

        return preImages.values().iterator();
    }

    /**
     * Returns the orbits of the set of edges under the full combinatorial
     * symmetry group.
     *
     * @return an iterator over the set of orbits.
     */
    public Iterator<Set<IEdge>> edgeOrbits() {
    	// --- determine edge orbit representatives of the image graph
    	final PeriodicGraph img = getImage();
        final Partition<IEdge> P = new Partition<IEdge>();
        for (final Morphism a: img.symmetries()) {
            for (final IEdge e: img.edges()) {
                final IEdge ae = a.getImage(e.oriented()).unoriented();
                P.unite(e, ae);
            }
        }
        final Map<IEdge, IEdge> imageToRep = P.representativeMap();

        // --- determine preimage sets for each edge orbit of the image graph
    	final Map<IEdge, Set<IEdge>> preImages =
    	        new HashMap<IEdge, Set<IEdge>>();
    	for (final IEdge e: edges()) {
    		final IEdge e1 = image(e.oriented()).unoriented();
    		final IEdge f = imageToRep.get(e1);
    		if (!preImages.containsKey(f)) {
    			preImages.put(f, new HashSet<IEdge>());
    		}
    		preImages.get(f).add(e);
    	}

        return preImages.values().iterator();
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
ZEPRSAdminReport
</TITLE>

<META NAME="keywords" CONTENT="org.cidrz.project.zeprs.report.ZEPRSAdminReport class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

org.cidrz.project.zeprs.report

Class ZEPRSAdminReport

java.lang.Object
  org.cidrz.project.zeprs.report.ZEPRSAdminReport

public class ZEPRSAdminReport
extends java.lang.Object

Author:

ericl

 TODO To change the template for this generated type comment go to
 Window - Preferences - Java - Code Style - Code Templates

Field Summary

protected  javax.sql.DataSource
dataSource

Method Summary

 void
init(javax.servlet.ServletConfig config)

 void
sayHello(javax.servlet.http.HttpServletRequest request,
         javax.servlet.http.HttpServletResponse response)

 void
showResults(javax.servlet.http.HttpServletRequest request,
            javax.servlet.http.HttpServletResponse response)

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

dataSource

protected javax.sql.DataSource dataSource

Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException

Throws:

javax.servlet.ServletException

showResults

public void showResults(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                 throws javax.servlet.ServletException,
                        java.io.IOException

Throws:

javax.servlet.ServletException

java.io.IOException

sayHello

public void sayHello(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws java.io.IOException

Throws:

java.io.IOException

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
namespace armnn
{

class IStrategy
{
protected:
IStrategy() {}
virtual ~IStrategy() {}

public:
virtual void ExecuteStrategy(const IConnectableLayer* layer,
                             const armnn::BaseDescriptor& descriptor,
                             const std::vector<armnn::ConstTensor>& constants,
                             const char* name,
                             const armnn::LayerBindingId id = 0) = 0;

virtual void FinishStrategy() {};

};

} // namespace armnn


text:
  Saint-Porquier est
      une commune située dans le département de Tarn-et-Garonne en Midi-Pyrénées. On dénombrait 1 271 habitants en 2008.

La ville compte quelques  aménagements, elle dispose, entre autres, de un terrain de tennis, un centre d'équitation et un terrain de sport.

À Saint-Porquier, la valorisation moyenne à la vente d'un appartement s'évalue à zero € du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 1 196 € du m². À la location la valorisation moyenne se situe à 5,93 € du m² mensuel.

Le parc d'habitations, à Saint-Porquier, se décomposait en 2011 en 60 appartements et 516 maisons soit
 un marché plutôt équilibré.

À coté de Saint-Porquier sont situées les communes de
Lacourt-Saint-Pierre à 7 km, 1 005 habitants,
Montaïn située à 8 km, 83 habitants,
Labourgade située à 8 km, 163 habitants,
Bourret localisée à 6 km, 673 habitants,
Cordes-Tolosannes à 3 km, 257 habitants,
La Ville-Dieu-du-Temple localisée à 4 km, 2 329 habitants,
 entre autres. De plus, Saint-Porquier est située à seulement quatorze km de Montauban.


text:
struct Stopwatch {

public:
	Stopwatch() {
		startTime = std::chrono::system_clock::now();
	}

	void start() {
		startTime = std::chrono::system_clock::now();
	}

	// Elapsed seconds since start()
	float stop() {
		auto diff = std::chrono::system_clock::now() - startTime;
		std::chrono::milliseconds elapsedMS
			= std::chrono::duration_cast<std::chrono::milliseconds>(diff);

		return 0.001f * (float)elapsedMS.count();
	}

private:
	std::chrono::system_clock::time_point startTime;

};


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN">

        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" href="../includes/main.css" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico" type="image/x-icon">
        <title>Apache CloudStack | The Power Behind Your Cloud</title>

						Apache CloudStack 4.16.0.0 Root Admin API Reference

listElastistorPool

Lists the pools of elastistor

Request parameters

                                            Parameter Name	Description	Required

                                            id	the ID of the Pool	false

Response Tags

                                            Response Name	Description

                                            id	the ID of the storage pool

                                            controllerid	controller of the pool

                                            gateway	default gateway of the pool

                                            maxiops	available iops of the pool

                                            name	the name of the storage pool

                                            size	the current available space of the pool

                                            state	the state of the storage pool

                            Copyright © 2015 The Apache Software Foundation, Licensed under the
                   Apache License, Version 2.0.

                                            Apache, CloudStack, Apache CloudStack, the Apache CloudStack logo, the CloudMonkey logo  and the Apache feather logo are trademarks of The Apache Software Foundation.


text:
<?php

require_once '../Parser.php';
require_once '../visitors/SmileyVisitor.php';

error_reporting(E_ALL);

$parser = new JBBCode\Parser();
$parser->addCodeDefinitionSet(new JBBCode\DefaultCodeDefinitionSet());

if (count($argv) < 2) {
    die('Usage: '.$argv[0]." \"bbcode string\"\n");
}

$inputText = $argv[1];

$parser->parse($inputText);

$smileyVisitor = new \JBBCode\visitors\SmileyVisitor();
$parser->accept($smileyVisitor);

echo $parser->getAsHTML()."\n";


text:
package com.intellij.lang.properties.parsing;

import com.intellij.lang.properties.PropertiesLanguage;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.NonNls;

public class PropertiesElementType extends IElementType {
  public PropertiesElementType(@NonNls String debugName) {
    super(debugName, PropertiesLanguage.INSTANCE);
  }

  @SuppressWarnings({"HardCodedStringLiteral"})
  public String toString() {
    return "Properties:" + super.toString();
  }
}


text:
typedef long wxPMDash;

// ----------------------------------------------------------------------------
// Pen
// ----------------------------------------------------------------------------

class WXDLLIMPEXP_CORE wxPen : public wxPenBase
{
public:
  wxPen() { }
    wxPen( const wxColour& rColour
          ,int             nWidth = 1
          ,wxPenStyle      nStyle = wxPENSTYLE_SOLID
         );

    wxPen( const wxBitmap& rStipple
          ,int             nWidth
         );
    virtual ~wxPen() { }

    bool   operator == (const wxPen& rPen) const;
    inline bool   operator != (const wxPen& rPen) const
        { return !(*this == rPen); }

    //
    // Override in order to recreate the pen
    //
    void SetColour(const wxColour& rColour);
    void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBlue);

    void SetWidth(int nWidth);
    void SetStyle(wxPenStyle nStyle);
    void SetStipple(const wxBitmap& rStipple);
    void SetDashes( int           nNbDashes
                   ,const wxDash* pDash
                  );
    void SetJoin(wxPenJoin nJoin);
    void SetCap(wxPenCap nCap);
    void SetPS(HPS hPS);

    wxColour GetColour(void) const;
    int       GetWidth(void) const;
    wxPenStyle GetStyle(void) const;
    wxPenJoin  GetJoin(void) const;
    wxPenCap   GetCap(void) const;
    int       GetPS(void) const;
    int       GetDashes(wxDash **ptr) const;
    wxDash*   GetDash() const;
    int       GetDashCount() const;
    wxBitmap* GetStipple(void) const;

    wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
    wxPen(const wxColour& col, int width, int style);

    wxDEPRECATED_MSG("use wxPENSTYLE_XXX constants")
    void SetStyle(int style) { SetStyle((wxPenStyle)style); }

    //
    // Implementation
    //

    //
    // Useful helper: create the brush resource
    //
    bool     RealizeResource(void);
    bool     FreeResource(bool bForce = false);
    virtual WXHANDLE GetResourceHandle(void) const;
    bool     IsFree(void) const;

private:
    LINEBUNDLE                     m_vLineBundle;
    AREABUNDLE                     m_vAreaBundle;

protected:
    virtual wxGDIRefData* CreateGDIRefData() const;
    virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;

    // same as FreeResource() + RealizeResource()
    bool Recreate();

    DECLARE_DYNAMIC_CLASS(wxPen)
}; // end of CLASS wxPen

extern int wx2os2PenStyle(wxPenStyle nWxStyle);

#endif
    // _WX_PEN_H_


text:
using FluentMigrator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace SimpleBlog.Migrations
{
    [Migration(3)]
    public class _003_AddContentToPosts : Migration
    {
        public override void Down()
        {
            Delete.Column("content").FromTable("posts");
        }

        public override void Up()
        {
            Create.Column("content").OnTable("posts").AsCustom("TEXT");
        }
    }
}


text:
package com.epam.ta.reportportal.entity.widget.content;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.io.Serializable;
import java.util.Map;

/**
 * @author Ivan Budayeu
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OverallStatisticsContent implements Serializable {

	@JsonProperty(value = "values")
	private Map<String, Long> values;

	public OverallStatisticsContent() {
	}

	public OverallStatisticsContent(Map<String, Long> values) {
		this.values = values;
	}

	public Map<String, Long> getValues() {
		return values;
	}

	public void setValues(Map<String, Long> values) {
		this.values = values;
	}
}


text:
Simple example application for the ngx-dropzone-wrapper

    This example does not actually upload any of the selected files, only simulates the upload process.

Controls

{{(type === "component") ? "Switch to directive" : "Switch to component"}}

Toggle disabled state

{{(config.maxFiles !== 1) ? "Upload single file" : "Upload multiple files"}}

{{config.autoReset ? "Turn off auto reset" : "Turn on auto reset"}}

{{config.clickable ? "Turn off click action" : "Turn on click action"}}

Reset upload area

Dropzone

        <dropzone *ngIf="type === 'component'" class="dropzone-container" [config]="config" [disabled]="disabled" fxLayout="row" fxLayoutAlign="start strech" fxFlex="auto" [message]="'Click or drag images here to upload'" (init)="onUploadInit($event)" (error)="onUploadError($event)" (success)="onUploadSuccess($event)"></dropzone>


text:
/**
 * Created by atrifan on 4/24/14.
 */
var phoneControllers = angular.module('phoneApp');

phoneControllers.controller('Caller', function ($scope, $http) {
    $http.get('resources/contacts.json').success(function(data) {
        $scope.contacts = data;
    });

    $scope.orderProp = 'firstName';
});

function Caller($scope, $http) {
    this._http = $http;
    this._scope = $scope;

    $http.get('/public/resources/contacts.json').success(
        function(data) {
            $scope.contacts = data;
        }
    ).fail(function (err) {
            console.log(err);
    })

    $scope.orderProp = 'id';

}


text:
var forEachPair = function(array1, array2, func, context) {
    for (var i = 0, len1 = array1.length; i < len1; i++) {
        var item1 = array1[i];

        for (var j = 0, len2 = array2.length; j < len2; j++) {
            func.call(context, item1, array2[j]);
        }
    }
};

var GroupContainer = new Class({
    initialize: function() {
        this._orders = null;
        this._groups = new Container();
        this.count = 0;

        this.events = new Container();
    },

    forEachCellForId: function(id, func, context) {
        var groups = this._groups;

        this.events.get(id, []).forEach(function(parsed) {
            var cell = groups.get(parsed.group).get(parsed.name);
            func.call(context, cell);
        });
    },

    orders: function() {
        if (!this._orders) {
            var orders = new Container();
            var index = 0;
            var groupIndex = 0;
            var groups = this._groups;

            groups.keys().sort().forEach(function(group) {
                orders.set(group, {
                    index: groupIndex,
                    firstCellIndex: index,
                    cells: new Container()
                });
                groupIndex += 1;

                groups.get(group).keys().sort().forEach(function(key) {
                    orders.get(group).cells.set(key, index);
                    index += 1;
                });
            });
            this._orders = orders;
        }
        return this._orders;
    },

    groupIndex: function(group) {
        var order = this.orders().get(group);
        return order === null ? null : order.index;
    },

    firstKeyIndex: function(group) {
        var order = this.orders().get(group);
        return order === null ? null : order.firstCellIndex;
    },

    keyIndex: function(group, key) {
        var order = this.orders().get(group);
        return order === null ? null : order.cells.get(key);
    },

    groupCount: function() {
        return this._groups.count();
    },

    keyCount: function() {
        return this.count;
    },

    handle: function(events, parserFunc, context) {
        events.forEach(function(info, id) {
            var oldList = this.events.pop(id);
            if (!oldList && !info) return;

            var parsedList = null;
            if (info) {
                parsedList = parserFunc.call(context, info);
                if (parsedList.length) {
                    this.events.set(id, parsedList);
                }
            }

            (parsedList || []).forEach(function(parsed) {
                if (!this._groups.contains(parsed.group)) {
                    this._orders = null;
                    this._groups.set(parsed.group, new Container());
                }
                var group = this._groups.get(parsed.group);

                if (!group.contains(parsed.name)) {
                    this._orders = null;
                    this.count += 1;
                    group.set(parsed.name, {
                        info: parsed,
                        value: null,
                        events: new Container(),
                        refcounts: new Container(),
                        element: null
                    });
                }
                var cell = group.get(parsed.name);
                cell.events.set(id, parsed.event);
                cell.refcounts.set(id, cell.refcounts.get(id, 0) + 1);
                cell.value = null;
            }, this);

            (oldList || []).forEach(function(old) {
                var group = this._groups.get(old.group);
                var cell = group.get(old.name);

                var refcount = cell.refcounts.get(id, 0);
                refcount -= 1;
                if (refcount <= 0) {
                    cell.events.pop(id);
                    cell.refcounts.pop(id);
                } else {
                    cell.refcounts.set(id, refcount);
                }

                if (cell.events.count() === 0) {
                    this._orders = null;
                    this.count -= 1;
                    group.pop(old.name);
                    if (cell.element) cell.element.destroy();
                } else {
                    cell.value = null;
                }

                if (group.count() === 0) {
                    this._orders = null;
                    this._groups.pop(old.group);
                }
            }, this);
        }, this);
    },

    groups: function() {
        return this._groups.keys();
    },

    forEach: function(func, context) {
        this._groups.forEach(function(obj, group) {
            obj.forEach(function(cell, key) {
                func.call(context, cell, key, group, this);
            }, this);
        });
    }
});

var ClassificationPointerInfo = new Class({
    Extends: PointerInfo,

    initialize: function(keyValues, value, combiner) {
        this.keyValues = keyValues;
        this.value = value;
        this.combiner = combiner;
    },

    createFilter: function() {
        var keyValues = this.keyValues;
        var keys = keyValues.keys();
        var length = keys.length;

        return function(id, event) {
            for (var i = 0; i < length; i++) {
                var key = keys[i];
                var value = keyValues.get(key);

                var values = event.values(key);
                if (values.length <= 0) values = [""];

                if (values.indexOf(value) < 0) {
                    return false;
                }
            }
            return true;
        };
    },

    formatTip: function() {
        var lines = [];

        var keyValues = this.keyValues;
        keyValues.keys().sort().forEach(function(key) {
            lines.push(key + ": " + keyValues.get(key));
        });

        if (this.combiner) {
            var value = (this.value.count > 0) ? this.value.value : "-";
            lines.push(this.combiner.title + ": " + value);
        }
        var count = this.value.totalCount;
        var eventText = (count === 1 ?
                         $tr("ui.eventSingular", "event") :
                         $tr("ui.eventPlural", "events"));
        lines.push(count + " " + eventText);

        return lines.join("\n");
    }
});

var ClassificationView = new Class({
    Extends: View,
    Implements: [Observable, PointerView],

    initialize: function(container) {
        this.parent(container);

        this.set({
            "data": null,
            "selected": null,
            "xKey": null,
            "xGroupKey": null,
            "yKey": null,
            "yGroupKey": null,
            "valueCombiner": null
        });

        this.cells = new GroupContainer();
        this.xGroups = new GroupContainer();
        this.yGroups = new GroupContainer();
        this.xElements = new Container();
        this.yElements = new Container();

        this.combiner = null;
        this.buffer = new Container();
        this.invalidated = false;
        this.build();

        this.observe({
            "xKey": this.invalidate,

            "xGroupKey": this.invalidate,

            "yKey": this.invalidate,

            "yGroupKey": this.invalidate,

            "valueCombiner": function(key, item) {
                this.combiner = EVENT_COMBINERS.create(item);
                this.invalidate();
            },

            "selected": function(key, value, old) {
                if (old && old.value === value) return old;
                this.update();
                if (!value) return null;

                return {
                    value: value,
                    observer: value.observe(this.update, this)
                };
            },

            "data": function(key, value, old) {
                if (!value && !old) return null;
                if (old && old.value === value) return old;
                if (old && old.observer) old.observer.unobserve();

                var observer = null;
                if (value) {
                    observer = value.observe(function(id, event) {
                        this.buffer.set(id, event);
                        this.update();
                    }, this);
                }
                return {
                    value: value,
                    observer: observer
                };
            }
        }, this);
    },

    invalidate: function() {
        this.invalidated = true;
        this.update();
    },

    build: function() {
        this.horizontal = new Element("div", {
            "class": "classification-horizontal",
            styles: {
                position: "absolute",
                top: 0,
                left: 0,
                right: 0
            }
        }).inject(this.container);

        this.vertical = new Element("div", {
            "class": "classification-vertical",
            styles: {
                position: "absolute",
                right: 0,
                bottom: 0
            }
        }).inject(this.container);

        this.matrix = new Element("div", {
            "class": "classification-matrix",
            styles: {
                position: "absolute",
                bottom: 0,
                left: 0
            }
        }).inject(this.container);

        this._resize();
    },

    _resize: function() {
        var height = this.horizontal.getSize().y;
        var width = this.vertical.getSize().x;

        this.horizontal.style.right = width + "px";
        this.vertical.style.top = height + "px";
        this.matrix.style.top = height + "px";
        this.matrix.style.right = width + "px";

        this.horizontal._size = this.horizontal.getSize();
        this.vertical._size = this.vertical.getSize();
        this.matrix._size = this.matrix.getSize();
    },

    relayout: function() {
        this.parent();
        this._resize();
    },

    _parse: function(event) {
        var xKey = this.get("xKey");
        var yKey = this.get("yKey");
        var xNames = xKey !== null ? event.values(xKey) : [""];
        var yNames = yKey !== null ? event.values(yKey) : [""];
        if (xNames.length === 0 || yNames.length === 0) return null;

        var xGroupKey = this.get("xGroupKey");
        var xGroups = xGroupKey !== null ? event.values(xGroupKey) : [""];
        xGroups = xGroups.length ? xGroups : [""];

        var yGroupKey = this.get("yGroupKey");
        var yGroups = yGroupKey !== null ? event.values(yGroupKey) : [""];
        yGroups = yGroups.length ? yGroups : [""];

        return {
            "xNames": xNames,
            "xGroups": xGroups,
            "yNames": yNames,
            "yGroups": yGroups,
            "event": event
        };
    },

    _xGroupHeaderSize: function() {
        return this.get("xGroupKey") === null ? 0 : 17
    },

    _yGroupHeaderSize: function() {
        return this.get("yGroupKey") === null ? 0 : 17
    },

    _combine: function(string1, string2) {
        var re = /\//g;
        return string1.replace(re, "//") + "/" + string2.replace(re, "//");
    },

    doUpdate: function() {
        if (this.invalidated) {
            this.invalidated = false;

            var data = this.get("data");
            if (data) {
                data.forEach(function(event, id) {
                    this.buffer.set(id, event);
                }, this);
            }
        }

        this.buffer.forEach(function(event, id) {
            this.buffer.set(id, event ? this._parse(event) : null);
        }, this);

        this.cells.handle(this.buffer, function(info) {
            var result = [];
            var re = /\//g;

            forEachPair(info.xGroups, info.yGroups, function(xGroup, yGroup) {
                forEachPair(info.xNames, info.yNames, function(x, y) {
                    result.push({
                        "group": xGroup.replace(re, "//") + "/" + yGroup.replace(re, "//"),
                        "name": x.replace(re, "//") + "/" + y.replace(re, "//"),
                        "xGroup": xGroup,
                        "yGroup": yGroup,
                        "xName": x,
                        "yName": y,
                        "event": info.event
                    });
                });
            });
            return result;
        });
        this.xGroups.handle(this.buffer, function(info) {
            var result = [];
            forEachPair(info.xGroups, info.xNames, function(group, name) {
                result.push({
                    "group": group,
                    "name": name,
                    "event": info.event
                });
            });
            return result;
        });
        this.yGroups.handle(this.buffer, function(info) {
            var result = [];
            forEachPair(info.yGroups, info.yNames, function(group, name) {
                result.push({
                    "group": group,
                    "name": name,
                    "event": info.event
                });
            });
            return result;
        });
        this.buffer.clear();

        this._positionHistogram("xGroupKey", this.xGroups, this.horizontal, true);
        this._positionHistogram("yGroupKey", this.yGroups, this.vertical, false);
        this._positionMatrix(this.cells, this.xGroups, this.yGroups, this.matrix);
    },

    _calcValue: function(cell) {
        if (cell.value.count === 0) {
            return 0;
        }

        var minValue = 0.05;
        if (cell.value.value === 0) {
            return minValue;
        }

        var DIVISION = 10;
        var STEP_LOG = 2;

        var value = Math.abs(cell.value.value);
        var step = Math.log(value+1) / Math.log(STEP_LOG);
        var r = (DIVISION-1) / DIVISION;
        var sum = (1/DIVISION) * (1-Math.pow(r, step)) / (1-r);

        if (cell.value.value < 0) {
            return minValue - minValue * sum;
        }
        return minValue + (1-minValue) * sum;
    },

    _positionHistogram: function(groupProperty, groups, container, isHorizontal) {
        if (isHorizontal) {
            var groupHeaderSize = this._xGroupHeaderSize();
        } else {
            groupHeaderSize = this._yGroupHeaderSize();
        }

        var size = container._size;
        size = isHorizontal ? size.x : size.y;
        size = (size - groups.groupCount() * groupHeaderSize) / (groups.keyCount() || 1);

        if (isHorizontal) {
            var elements = this.xElements;
        } else {
            elements = this.yElements;
        }
        var groupKey = this.get(groupProperty);
        var sorted = groupKey != null ? groups.groups().sort() : [];
        sorted.forEach(function(group, index) {
            var groupIndex = groups.groupIndex(group);
            var firstKeyIndex = groups.firstKeyIndex(group);

            var next = sorted[index+1];
            if (next == null) {
                var nextKeyIndex = groups.keyCount();
            } else {
                nextKeyIndex = groups.firstKeyIndex(next);
            }

            var left = size * firstKeyIndex + groupIndex * groupHeaderSize;
            var right = left + (nextKeyIndex - firstKeyIndex) * size + groupHeaderSize;

            var element = elements.get(group);
            if (!element) {
                element = new Element("div", {
                    "class": "classification-group",
                    "styles": {
                        "position": "absolute"
                    }
                });
                element._container = new Element("div", {
                    "class": "classification-group-container"
                });
                element._text = new Element("div", {
                    "class": "classification-group-text",
                    "text": group
                });
                element._container.grab(element._text);
                element.grab(element._container);
                container.grab(element);
                elements.set(group, element);
            }

            var style = element.style;
            style.top = (isHorizontal ? 0 : left) + "px";
            style.height = isHorizontal ? "100%" : ((right-left) + "px");
            style.left = (isHorizontal ? left : 0) + "px";
            style.width = isHorizontal ? ((right-left) + "px") : "100%"
        });
        elements.forEach(function(element, group) {
            if (groups.groupIndex(group) !== null) return;
            element.destroy();
            elements.pop(group);
        }, this);

        groups.forEach(function(cell, key, group) {
            var index = groups.keyIndex(group, key);
            var groupIndex = groups.groupIndex(group);
            var decorate;

            var pos = size * index + (groupIndex + 1) * groupHeaderSize;
            if (!cell.value) {
                decorate = true;
                cell.value = Combiner.combineEach(this.combiner, cell.events);
            }

            if (!cell.element) {
                decorate = true;

                cell.element = new Element("div", {
                    "class": "classification-label",
                    "styles": {
                        "position": "absolute"
                    }
                });

                this.listenPointerEvents(cell.element, {
                    "enter": function() {
                        var keys = new Container();
                        if (isHorizontal) {
                            if (this.get("xGroupKey")) {
                                keys.set(this.get("xGroupKey"), group);
                            }
                            if (this.get("xKey")) {
                                keys.set(this.get("xKey"), key);
                            }
                        } else {
                            if (this.get("yGroupKey")) {
                                keys.set(this.get("yGroupKey"), group);
                            }
                            if (this.get("yKey")) {
                                keys.set(this.get("yKey"), key);
                            }
                        }

                        return new ClassificationPointerInfo(keys,
                                                             cell.value,
                                                             this.combiner);
                    }
                }, this);

                cell.element.addEvent("mouseleave", function() {
                    this.setToolTip(null);
                }.bind(this));

                cell.element._container = new Element("div", {
                    "class": "classification-label-container"
                });
                cell.element._histogram = new Element("div", {
                    "class": "classification-label-histogram"
                });
                cell.element._text = new Element("div", {
                    "class": "classification-label-text",
                    "text": key
                });
                cell.element._container.grab(cell.element._histogram);
                cell.element._container.grab(cell.element._text);
                cell.element.grab(cell.element._container);
                container.grab(cell.element);
            }

            var style = cell.element.style;
            style.top = (isHorizontal ? 0 : pos) + "px";
            style.height = isHorizontal ? "100%" : (size + "px");
            style.left = (isHorizontal ? pos : 0) + "px";
            style.width = isHorizontal ? (size + "px") : "100%";

            if (decorate) {
                var value = this._calcValue(cell);
                var percentage = (100 * (1-value)) + "%";
                if (isHorizontal) {
                    cell.element._histogram.style.top = percentage;
                } else {
                    cell.element._histogram.style.right = percentage;
                }
            }
        }, this);
    },

    _positionMatrix: function(groups, x, y, container) {
        var xGroupHeaderSize = this._xGroupHeaderSize();
        var yGroupHeaderSize = this._yGroupHeaderSize();

        var size = container._size;
        var xSize = (size.x - x.groupCount() * xGroupHeaderSize) / (x.keyCount() || 1);
        var ySize = (size.y - y.groupCount() * yGroupHeaderSize) / (y.keyCount() || 1);

        groups.forEach(function(cell) {
            var xIndex = x.keyIndex(cell.info.xGroup, cell.info.xName);
            var yIndex = y.keyIndex(cell.info.yGroup, cell.info.yName);
            var xGroupIndex = x.groupIndex(cell.info.xGroup);
            var yGroupIndex = y.groupIndex(cell.info.yGroup);

            var cx = xSize * xIndex + (xGroupIndex + 1) * xGroupHeaderSize;
            var cy = ySize * yIndex + (yGroupIndex + 1) * yGroupHeaderSize;
            var decorate;

            if (!cell.value) {
                decorate = true;
                cell.value = Combiner.combineEach(this.combiner, cell.events);
            }

            if (!cell.element) {
                decorate = true;

                cell.element = new Element("div", {
                    "class": "classification-cell",
                    "styles": {
                        "position": "absolute"
                    }
                });
                container.grab(cell.element);

                this.listenPointerEvents(cell.element, {
                    "enter": function() {
                        var keys = new Container();
                        if (this.get("xGroupKey")) {
                            keys.set(this.get("xGroupKey"), cell.info.xGroup);
                        }
                        if (this.get("xKey")) {
                            keys.set(this.get("xKey"), cell.info.xName);
                        }
                        if (this.get("yGroupKey")) {
                            keys.set(this.get("yGroupKey"), cell.info.yGroup);
                        }
                        if (this.get("yKey")) {
                            keys.set(this.get("yKey"), cell.info.yName);
                        }

                        return new ClassificationPointerInfo(keys,
                                                             cell.value,
                                                             this.combiner);
                    }
                }, this);

                cell.element._background = new Element("div", {
                    "class": "classification-cell-background"
                });
                cell.element.grab(cell.element._background);

                cell.element._foreground = new Element("div", {
	            "class": "classification-cell-foreground"
	        });
                cell.element._background.grab(cell.element._foreground);
            }

            cell.element.removeClass("selected");

            var style = cell.element.style;
            style.left = cx + "px";
            style.top = cy + "px";
            style.width = xSize + "px";
            style.height = ySize + "px";

            if (decorate) {
                var value = this._calcValue(cell);
                cell.element._foreground.style.opacity = value;
            }
        }, this);

        var selected = this.get("selected");
        if (selected) {
            selected.forEach(function(_, id) {
                this.cells.forEachCellForId(id, function(cell) {
                    if (!cell.element) return;
                    cell.element.addClass("selected");
                });
            }, this);
        }
    },

    DUMP_KEYS: ["xKey", "xGroupKey", "yKey", "yGroupKey", "valueCombiner"],

    dumpState: function() {
        var state = {};

        this.DUMP_KEYS.forEach(function(key) {
            state[key] = this.get(key)
        }, this);

        return state;
    },

    loadState: function(state) {
        state = new Container(state);

        this.DUMP_KEYS.forEach(function(key) {
            this.set(key, state.get(key));
        }, this);
    },

    settingsView: function() {
        return new FieldSet([
            new FieldSet([
                new InputField(this, "xGroupKey", {
                    "label": $tr("ui.settings.group", "group")
                }),
                new InputField(this, "xKey", {
                    "label": $tr("ui.settings.key", "key")
                })
            ], {
                "class": "axis",
                "legend": $tr("ui.settings.horizontal", "horizontal")
            }),

            new FieldSet([
                new InputField(this, "yGroupKey", {
                    "label": $tr("ui.settings.group", "group")
                }),
                new InputField(this, "yKey", {
                    "label": $tr("ui.settings.key", "key")
                })
            ], {
                "class": "axis",
                "legend": $tr("ui.settings.vertical", "vertical")
            }),

            new EVENT_COMBINERS.Input(this, "valueCombiner", {
                "class": "combiner",
                "legend": $tr("ui.settings.valueFunction", "value function")
            })
        ], {
            "class": "classification"
        });
    }
});


text:
import * as React from 'react';
import {MenuItem} from '../menuitem/MenuItem';

interface PanelMenuProps {
    id?: string;
    model?: MenuItem[];
    style?: object;
    className?: string;
}

export class PanelMenu extends React.Component<PanelMenuProps,any> {}


text:
#ifndef itkFileListVideoIOFactory_h
#define itkFileListVideoIOFactory_h

#include "itkObjectFactoryBase.h"
#include "itkVideoIOBase.h"

namespace itk
{
/** \class FileListVideoIOFactory
 * \brief Create instances of FileListVideoIO objects using an object factory.
 *
 * \ingroup ITKVideoIO
 */
class FileListVideoIOFactory : public ObjectFactoryBase
{
public:
  /** Standard class typedefs. */
  typedef FileListVideoIOFactory     Self;
  typedef ObjectFactoryBase          Superclass;
  typedef SmartPointer< Self >       Pointer;
  typedef SmartPointer< const Self > ConstPointer;

  /** Class methods used to interface with the registered factories. */
  virtual const char * GetITKSourceVersion(void) const ITK_OVERRIDE;

  virtual const char * GetDescription(void) const ITK_OVERRIDE;

  /** Method for class instantiation. */
  itkFactorylessNewMacro(Self);

  /** Run-time type information (and related methods). */
  itkTypeMacro(FileListVideoIOFactory, ObjectFactoryBase);

  /** Register one factory of this type  */
  static void RegisterOneFactory(void)
  {
    FileListVideoIOFactory::Pointer FileListFactory = FileListVideoIOFactory::New();

    ObjectFactoryBase::RegisterFactoryInternal(FileListFactory);
  }

protected:
  FileListVideoIOFactory();
  ~FileListVideoIOFactory();

private:
  FileListVideoIOFactory(const Self &); //purposely not implemented
  void operator=(const Self &);         //purposely not implemented

};
} // end namespace itk

#endif


text:
import 'storybook-addon-material-ui';
import '@storybook/addon-notes/register';
import '@storybook/addon-knobs/register'
import '@storybook/addons';
import '@storybook/addon-options/register';


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <base href="/">
  <title></title>
  <link rel="icon" href="/img/favicon.ico">
  <link rel="stylesheet" type="text/css" href="/css/normalize.css">
  <link rel="stylesheet" type="text/css" href="/css/acsset.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/t4t5/sweetalert/32bd141c/dist/sweetalert.css">
  <link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/Pathgather/popeye/8e1df815/release/popeye.min.css">
  <link rel="stylesheet" type="text/css" href="/css/style.css">
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans">


text:
I like four spaces. You might like two. GitHub uses eight. GHTabSize is a Chrome extension that changes the `tab-size` property based on your preferences. It has a setting for each syntax mode; you can use two spaces for CoffeeScript and four for C, and they won't conflict.

## Installation

1. `git clone https://github.com/btmills/GHTabSize.git`
2. Open chrome://extensions.
3. Click "Load unpacked extension...".
4. Select the directory containing the cloned copy of the repository.
5. Open [some code](src/ghtabsize.coffee) on GitHub (you may have to refresh the page), and change the indent size!

## Known issues

- It only runs on page load. Clicking on a file from a directory listing doesn't reload the page, so right know you have to hit refresh. This will be fixed soon.
- There really needs to be a settings page. Working on it.

## License

The MIT License. See LICENSE for full text.


text:
FriendsCoin(FRIC) - is a gift for all friends.
===========

[![Build Status](https://travis-ci.org/RazorLove/FreindsCoin.png?branch=master)](https://travis-ci.org/RazorLove/FreindsCoin)

Scrypt Hashcash PoW Template for all friends.


text:
class String
  ##
  # @param o<String> The path component to join with the string.
  #
  # @return <String> The original path concatenated with o.
  #
  # @example
  #   "merb"/"core_ext" #=> "merb/core_ext"
  def /(o)
    File.join(self, o.to_s)
  end

  # Camelcase a string
  def camelcase
    gsub(/(^|_|-)(.)/) { $2.upcase }
  end

  # Constantize tries to find a declared constant with the name specified
  # in the string. It raises a NameError when the name is not in CamelCase
  # or is not initialized.
  #
  # Examples
  #   "Module".constantize #=> Module
  #   "Class".constantize #=> Class
  def constantize(mod=Object)
    camelcased_word = camelcase
    mod.module_eval(camelcased_word, __FILE__, __LINE__)
  end

  # "FooBar".snake_case #=> "foo_bar"
   def snake_case
     gsub(/\B[A-Z]+/, '_\&').downcase
   end

end


text:
def count_units(number):
    sum(int(x) for x bin(number)[2:]

if __name__ == '__main__':
    # These "asserts" using only for self-checking and not necessary for auto-testing
    assert count_units(4) == 1
    assert count_units(15) == 4
    assert count_units(1) == 1
    assert count_units(1022) == 9