text:
create table domains (
 id              SERIAL PRIMARY KEY,
 name            VARCHAR(255) NOT NULL,
 master          VARCHAR(128) DEFAULT NULL,
 last_check      INT DEFAULT NULL,
 type            VARCHAR(6) NOT NULL,
 notified_serial INT DEFAULT NULL,
 account         VARCHAR(40) DEFAULT NULL,
 CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
);
CREATE UNIQUE INDEX name_index ON domains(name);

CREATE TABLE records (
        id              SERIAL PRIMARY KEY,
        domain_id       INT DEFAULT NULL,
        name            VARCHAR(255) DEFAULT NULL,
        type            VARCHAR(10) DEFAULT NULL,
        content         VARCHAR(65535) DEFAULT NULL,
        ttl             INT DEFAULT NULL,
        prio            INT DEFAULT NULL,
        change_date     INT DEFAULT NULL,
        disabled        BOOL DEFAULT 'f',
        CONSTRAINT domain_exists
        FOREIGN KEY(domain_id) REFERENCES domains(id)
        ON DELETE CASCADE,
        CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
);

CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);

create table supermasters (
          ip INET NOT NULL,
          nameserver VARCHAR(255) NOT NULL,
          account VARCHAR(40) DEFAULT NULL,
          PRIMARY KEY (ip, nameserver)
);

CREATE TABLE comments (
  id              SERIAL PRIMARY KEY,
  domain_id       INT NOT NULL,
  name            VARCHAR(255) NOT NULL,
  type            VARCHAR(10) NOT NULL,
  modified_at     INT NOT NULL,
  account         VARCHAR(40) DEFAULT NULL,
  comment         VARCHAR(65535) NOT NULL,
  CONSTRAINT domain_exists
  FOREIGN KEY(domain_id) REFERENCES domains(id)
  ON DELETE CASCADE,
  CONSTRAINT c_lowercase_name CHECK (((name)::text = lower((name)::text)))
);
CREATE INDEX comments_domain_id_idx ON comments (domain_id);
CREATE INDEX comments_name_type_idx ON comments (name, type);
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);

redpajama_set_name: RedPajamaGithub


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Mutation extends CI_Controller {
	function __construct() {
		parent::__construct();
		if(!$this->session->userdata('logged_in_hrd')) redirect(base_url());
		$this->load->library('template');
		$this->load->model('home_model');
		$this->load->model('emp/mutation_model');
	}

	public function index()
	{
		if($this->session->userdata('logged_in_hrd'))
		{
			$data['daftarlist'] = $this->mutation_model->select_all()->result();
			$this->template->display('emp/mutation_view', $data);
		} else {
			$this->session->sess_destroy();
			redirect(base_url());
		}
	}

	public function adddata() {
		$data['departmentlist']	= $this->mutation_model->select_department()->result();
		$data['positionlist'] 	= $this->mutation_model->select_position()->result();
		$data['decreelist'] 	= $this->mutation_model->select_decree_mail()->result();
		$data['employeelist'] 	= $this->mutation_model->select_employee()->result();

		$this->template->display('emp/mutation_add_view', $data);
	}

	public function savedata() {
		$this->form_validation->set_rules('lstEmployee','Employee','trim|required');
		$this->form_validation->set_rules('lstMail','Decree Mail No.','trim|required');
		$this->form_validation->set_rules('date_mutation','Date','trim|required');
		$this->form_validation->set_rules('lstDepartment','Department','trim|required');
		$this->form_validation->set_rules('lstPosition','Position','trim|required');

		if ($this->form_validation->run() == FALSE) {
			$data['departmentlist']	= $this->mutation_model->select_department()->result();
			$data['positionlist'] 	= $this->mutation_model->select_position()->result();
			$data['decreelist'] 	= $this->mutation_model->select_decree_mail()->result();
			$data['employeelist'] 	= $this->mutation_model->select_employee()->result();

			$this->template->display('emp/mutation_add_view', $data);
		} else {
			$this->mutation_model->insert_data(); // Insert ke Table Mutation
			$this->mutation_model->update_data_employee(); // Update ke Table Employee
 			redirect(site_url('emp/mutation'));
		}
	}

	public function editdata($mutation_id) {
		$data['departmentlist']	= $this->mutation_model->select_department()->result();
		$data['positionlist'] 	= $this->mutation_model->select_position()->result();
		$data['decreelist'] 	= $this->mutation_model->select_decree_mail()->result();
		$data['employeelist'] 	= $this->mutation_model->select_employee()->result();
		$data['detail'] 		= $this->mutation_model->select_by_id($mutation_id)->row();

		$this->template->display('emp/mutation_edit_view', $data);
	}

	public function updatedata() {
		$this->mutation_model->update_data(); // Update ke Table Mutation
		$this->mutation_model->update_data_employee(); // Update ke Table Employee
 		redirect(site_url('emp/mutation'));
	}

	public function deletedata($kode) {
		$kode = $this->security->xss_clean($this->uri->segment(4));

		if ($kode == null) {
			redirect(site_url('emp/mutation'));
		} else {
			$this->mutation_model->delete_data($kode);
			echo "<meta http-equiv=refresh content=0;url=\"".site_url()."emp/mutation\">";
		}
	}
}
/* Location: ./application/controller/emp/Mutation.php */


text:
#include <assert.h>    // assert

int main()
{
  int sz1, sz2;
  int i;

  sz1 = sizeof('a');         // 'a' is actually an int constant, so this is 4
  assert(sz1 == sizeof(int));

  sz2 = sizeof((char)'a');   // now it's 1!
  assert(sz2 == sizeof(char));

  //character constants are ints, so this should be sign-extended to 0xFFFFFFFF
  i = '\xff';
  assert((int)i == (int)-1);

  {
    //Test CIL's understanding of '\xff' by forcing it to do constant folding:
    char array[(unsigned int)'\xff' - (unsigned int)0xfffff000];
    assert (sizeof(array) == 0xfff);
  }

  return 0;
}


text:
static UIColor *OverViewASPagerNodeRandomColor() {
    CGFloat hue = ( arc4random() % 256 / 256.0 );  //  0.0 to 1.0
    CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5;  //  0.5 to 1.0, away from white
    CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5;  //  0.5 to 1.0, away from black
    return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1];
}

#pragma mark - OverviewASPageNode

@interface OverviewASPageNode : ASCellNode @end

@implementation OverviewASPageNode

- (ASLayout *)calculateLayoutThatFits:(ASSizeRange)constrainedSize
{
    return [ASLayout layoutWithLayoutableObject:self
                           constrainedSizeRange:constrainedSize
                                           size:constrainedSize.max];
}

@end

#pragma mark - OverviewASPagerNode

@interface OverviewASPagerNode () <ASPagerDataSource, ASPagerDelegate>
@property (nonatomic, strong) ASPagerNode *node;
@property (nonatomic, copy) NSArray *data;
@end

@implementation OverviewASPagerNode

- (instancetype)init
{
    self = [super init];
    if (self == nil) { return self; }

    _node = [ASPagerNode new];
    _node.dataSource = self;
    _node.delegate = self;
    [self addSubnode:_node];

    return self;
}

- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize
{
    _node.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(constrainedSize.max);
    return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[_node]];
}

- (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode
{
    return 4;
}

- (ASCellNodeBlock)pagerNode:(ASPagerNode *)pagerNode nodeBlockAtIndex:(NSInteger)index
{
    return ^{
        ASCellNode *cellNode = [OverviewASPageNode new];
        cellNode.backgroundColor = OverViewASPagerNodeRandomColor();
        return cellNode;
    };
}

@end


text:
using System;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ReactiveRTM.Extensions;
using ReactiveRTM.RTC;
using ReactiveRTM.Component;

namespace ReactiveRTM.Test
{
    [TestClass]
    public class ActivateTest
    {

        [TestMethod]
        public void コンポーネントの活性化()
        {
            var comp = new SimpleComponent("test");

            bool calledActivated = false;
            comp.OnActivated = _ =>
            {
                calledActivated = true;
                return ReturnCode_t.RTC_OK;
            };

            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);

            calledActivated.Is(true);
        }

        [TestMethod]
        public void 存在しない実行コンテキストを指定したら例外()
        {
            var comp = new SimpleComponent("test");
            AssertEx.Throws<ArgumentOutOfRangeException>(() => comp.ActivateAsync(1).Wait());
        }

        [TestMethod]
        public void 状態が変化しなかったらタイムアウト()
        {
            var comp = new SimpleComponent("test");
            comp.OnActivated = _ =>
            {
                Thread.Sleep(TimeSpan.FromSeconds(3));
                return ReturnCode_t.RTC_OK;
            };

            AssertEx.Throws<TimeoutException>(() =>
                    comp.ActivateAsync()
                    .ToObservable()
                    .Timeout(TimeSpan.FromSeconds(1))
                    .First()
                );
        }

        [TestMethod]
        public void 活性化しているのにActivateしたら失敗()
        {
            var comp = new SimpleComponent("test");
            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);
            comp.ActivateAsync().Result.Is(ReturnCode_t.PRECONDITION_NOT_MET);
        }
    }
    [TestClass]
    public class DeactivateTest
    {

        [TestMethod]
        public void コンポーネントの非活性化()
        {
            var comp = new SimpleComponent("test");

            bool calledDeactivated = false;
            comp.OnDeactivated = _ =>
            {
                calledDeactivated = true;
                return ReturnCode_t.RTC_OK;
            };

            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);
            comp.DeactivateAsync().Result.Is(ReturnCode_t.RTC_OK);

            calledDeactivated.Is(true);
        }

        [TestMethod]
        public void 存在しない実行コンテキストを指定したら例外()
        {
            var comp = new SimpleComponent("test");
            AssertEx.Throws<ArgumentOutOfRangeException>(() => comp.DeactivateAsync(1).Wait());
        }

        [TestMethod]
        public void 状態が変化しなかったらタイムアウト()
        {
            var comp = new SimpleComponent("test");
            comp.OnDeactivated = _ =>
            {
                Thread.Sleep(TimeSpan.FromSeconds(3));
                return ReturnCode_t.RTC_OK;
            };

            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);
            AssertEx.Throws<TimeoutException>(() =>
                    comp.DeactivateAsync(timeout: TimeSpan.FromSeconds(1)).Wait()
                );
        }

        [TestMethod]
        public void 活性化してないのにDeactivateしたら失敗()
        {
            var comp = new SimpleComponent("test");
            comp.DeactivateAsync().Result.Is(ReturnCode_t.PRECONDITION_NOT_MET);
        }
    }

    [TestClass]
    public class ResetTest
    {

        [TestMethod]
        public void コンポーネントのリセット()
        {
            var comp = new SimpleComponent("test");

            comp.OnActivated = _ => ReturnCode_t.RTC_ERROR;

            bool calledReset = false;
            comp.OnReset = _ =>
            {
                calledReset = true;
                return ReturnCode_t.RTC_OK;
            };

            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);
            comp.ResetAsync().Result.Is(ReturnCode_t.RTC_OK);

            calledReset.Is(true);
        }

        [TestMethod]
        public void 存在しない実行コンテキストを指定したら例外()
        {
            var comp = new SimpleComponent("test");
            AssertEx.Throws<ArgumentOutOfRangeException>(() => comp.ResetAsync(1).Wait());
        }

        [TestMethod]
        public void 状態が変化しなかったらタイムアウト()
        {
            var comp = new SimpleComponent("test");

            comp.OnActivated = _ => ReturnCode_t.RTC_ERROR;
            comp.OnReset = _ =>
            {
                Thread.Sleep(TimeSpan.FromSeconds(3));
                return ReturnCode_t.RTC_OK;
            };

            comp.ActivateAsync().Result.Is(ReturnCode_t.RTC_OK);
            AssertEx.Throws<TimeoutException>(() =>
                    comp.ResetAsync(timeout: TimeSpan.FromSeconds(1)).Wait()
                );
        }

        [TestMethod]
        public void エラーが起きていないのにResetしたら失敗()
        {
            var comp = new SimpleComponent("test");
            comp.ResetAsync().Result.Is(ReturnCode_t.PRECONDITION_NOT_MET);
        }
    }
}


text:
require_dependency "renalware/accesses"

module Renalware
  module Accesses
    class Version < PaperTrail::Version
      self.table_name = :access_versions
    end
  end
end


text:
from optparse import OptionParser
import logging
import os
import subprocess
import sys
import time
import yaml

from fsevents import Observer, Stream

"""
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/FSEvents_Ref/Reference/reference.html#//apple_ref/doc/c_ref/kFSEventStreamEventFlagNone
"""
# FSEventStreamEventFlags
NONE                = kFSEventStreamEventFlagNone               = 0x00000
MUST_SCAN_SUB_DIRS  = kFSEventStreamEventFlagMustScanSubDirs    = 0x00001
USER_DROPPED        = kFSEventStreamEventFlagUserDropped        = 0x00002
KERNEl_DROPPED      = kFSEventStreamEventFlagKernelDropped      = 0x00004
EVENT_IDS_WRAPPED   = kFSEventStreamEventFlagEventIdsWrapped    = 0x00008
HISTORY_DONE        = kFSEventStreamEventFlagHistoryDone        = 0x00010
ROOT_CHANGED        = kFSEventStreamEventFlagRootChanged        = 0x00020
MOUNT               = kFSEventStreamEventFlagMount              = 0x00040
UNMOUNT             = kFSEventStreamEventFlagUnmount            = 0x00080 # These flags are only set if you specified the FileEvents
# flags when creating the stream.
CREATED             = kFSEventStreamEventFlagItemcreated        = 0x00100
REMOVED             = kFSEventStreamEventFlagItemremoved        = 0x00200
INODEMETAMOD        = kFSEventStreamEventFlagIteminodemetamod   = 0x00400
RENAMED             = kFSEventStreamEventFlagItemrenamed        = 0x00800
MODIFIED            = kFSEventStreamEventFlagItemmodified       = 0x01000
FINDERINFOMOD       = kFSEventStreamEventFlagItemfinderinfomod  = 0x02000
CHANGEOWNER         = kFSEventStreamEventFlagItemchangeowner    = 0x04000
XATTRMOD            = kFSEventStreamEventFlagItemxattrmod       = 0x08000
ISFILE              = kFSEventStreamEventFlagItemisfile         = 0x10000
ISDIR               = kFSEventStreamEventFlagItemisdir          = 0x20000
ISSYMLINK           = kFSEventStreamEventFlagItemissymlink      = 0x40000

FSEventStreamEventMap = {
  NONE               : "NONE",
  MUST_SCAN_SUB_DIRS : "MUST_SCAN_SUB_DIRS",
  USER_DROPPED       : "USER_DROPPED",
  KERNEl_DROPPED     : "KERNEl_DROPPED",
  EVENT_IDS_WRAPPED  : "EVENT_IDS_WRAPPED",
  HISTORY_DONE       : "HISTORY_DONE",
  ROOT_CHANGED       : "ROOT_CHANGED",
  MOUNT              : "MOUNT",
  UNMOUNT            : "UNMOUNT",
  CREATED            : "CREATED",
  REMOVED            : "REMOVED",
  INODEMETAMOD       : "INODEMETAMOD",
  RENAMED            : "RENAMED",
  MODIFIED           : "MODIFIED",
  FINDERINFOMOD      : "FINDERINFOMOD",
  CHANGEOWNER        : "CHANGEOWNER",
  XATTRMOD           : "XATTRMOD",
  ISFILE             : "ISFILE",
  ISDIR              : "ISDIR",
  ISSYMLINK          : "ISSYMLINK",
}

BUILD_CMD = dict()
CONFIG_PATH = None
WATCH_EVENTS = (USER_DROPPED, UNMOUNT, CREATED, REMOVED, RENAMED, MODIFIED)
WATCH_EXTENSIONS = tuple()

def is_watch_event(file_event):
  return file_event.mask in WATCH_EVENTS

def set_watch_extension(arg):
  global WATCH_EXTENSIONS
  WATCH_EXTENSIONS = arg

def is_watch_extension(file_event):
  return os.path.splitext(file_event.name)[1] in WATCH_EXTENSIONS

def set_build_cmd(arg):
  global BUILD_CMD
  BUILD_CMD = arg

def callback(file_event):
  logging.debug("%s, %s, %s" % (FSEventStreamEventMap[file_event.mask], file_event.cookie, file_event.name))
  if file_event.name == CONFIG_PATH:
    load_config()
    return
  cmd = BUILD_CMD.get(os.path.splitext(file_event.name)[1].lstrip("."), "make")
  if is_watch_event(file_event) and is_watch_extension(file_event):
    logging.info(cmd)
    try:
      subprocess.check_call(cmd, shell=True)
    except (subprocess.CalledProcessError, OSError) as e:
      logging.warning(e)

def parse_options():
  parser = OptionParser()
  parser.add_option("-c", "--config", dest="config", default=".watchlion.yaml", help="path to config FILE", metavar="FILE")
  (options, _args) = parser.parse_args()
  global CONFIG_PATH
  CONFIG_PATH = os.path.abspath(options.config)
  logging.debug("parse_options: %s" % options)
  return options

def load_config(options=[0]):
  if CONFIG_PATH is None:
    options[0] = parse_options()
  logging.info("load_config: loading %s" % options[0].config)
  try:
    config = yaml.load(open(options[0].config).read())
  except Exception as e:
    logging.error("%s: %s" % (e.__class__.__name__, e))
    if not WATCH_EXTENSIONS:
      sys.exit(1)
  else:
    logging.debug("load_config: loaded %s" % config)
    set_watch_extension([".%s" % i for i in config["build"].keys()])
    set_build_cmd(config["build"])
    if "loglevel" in config:
      logging.getLogger().setLevel(config["loglevel"].upper())

def main():
  logging.basicConfig(level=logging.INFO)
  load_config()
  observer = Observer()
  observer.setDaemon(True)
  observer.start()
  observer.schedule(Stream(callback, ".", file_events=True))
  try:
    while True:
      time.sleep(10)
  except KeyboardInterrupt:
    pass
  finally:
    observer.stop()
    print("")

if __name__ == "__main__":
  main()


text:
app.run(['$rootScope', '$window', 'srvAuth',
  function($rootScope, $window, sAuth) {

  $rootScope.user = {};

  $window.fbAsyncInit = function() {
    // Executed when the SDK is loaded

    FB.init({

      /*
       The app id of the web app;
       To register a new app visit Facebook App Dashboard
       ( https://developers.facebook.com/apps/ )
      */

      appId: '1686170128368489',

      /*
       Adding a Channel File improves the performance
       of the javascript SDK, by addressing issues
       with cross-domain communication in certain browsers.
      */

      channelUrl: 'app/channel.html',

      /*
       Set if you want to check the authentication status
       at the start up of the app
      */

      status: true,

      /*
       Enable cookies to allow the server to access
       the session
      */

      cookie: true,

      /* Parse XFBML */

      xfbml: true
    });

    sAuth.watchAuthenticationStatusChange();

  };

  (function(d){
    // load the Facebook javascript SDK

    var js,
    id = 'facebook-jssdk',
    ref = d.getElementsByTagName('script')[0];

    if (d.getElementById(id)) {
      return;
    }

    js = d.createElement('script');
    js.id = id;
    js.async = true;
    js.src = "//connect.facebook.net/en_US/all.js";

    ref.parentNode.insertBefore(js, ref);

  }(document));

}]);


text:
Clone the repo, then move into the directory, from the terminal:

```
npm install -g bower
npm install
bower install
```


text:
/*tooltip*/
div.tooltip { position: absolute; }
div.tooltip table td.corner {
	width: 12px;
	height: 12px;
	font-size: 1px;
	line-height: 1px;
}
div.tooltip table.tooltiptable { margin: 3px; }
div.tooltip table td.topleft,
div.tooltip table td.topcenter,
div.tooltip table td.topright,
div.tooltip table td.bodyleft,
div.tooltip table td.tooltipcontent,
div.tooltip table td.bodyright,
div.tooltip table td.footerleft,
div.tooltip table td.footercenter,
div.tooltip table td.footerright {
	background-image: url(../img/tooltipbox.png);
	_background-image: url(../img/tooltipbox.gif);
	background-repeat: no-repeat;
	background-position: left top;
}
div.tooltip table td.topcenter { background-position: top; }
div.tooltip table td.topright { background-position: right top; }
div.tooltip table td.bodyleft { background-position: left; }
div.tooltip table td.tooltipcontent { background-position: center; }
div.tooltip table td.bodyright { background-position: right; }
div.tooltip table td.footerleft { background-position: left bottom; }
div.tooltip table td.footercenter { background-position: bottom; }
div.tooltip table td.footerright { background-position: right bottom; }
div.tooltip table td.tooltipcontent {
	padding: 3px 0 1px 1px;
	font-size: 12px;
	color: #757168; /*	color:#653;*/
	font-family: Tahoma, SimSun, Verdana, sans-serif;
	line-height: 15px;
	word-break: break-all;
	text-align: justify;
	text-justify: inter-ideograph;
}
div.tooltip div.tooltipfang {
	font-size: 1px;
	line-height: 1px;
	position: absolute;
	width: 11px;
	height: 11px;
	background-image: url(../img/Callouts.gif);
	background-repeat: no-repeat;
	background-position: 0 0;
}
div.tooltip .closebtn {
	position: absolute;
	z-index: 10;
	right: 15px;
	top: 8px;
}
div.tooltip .closebtn a {
	display: block;
	height: 10px;
	width: 14px;
	padding: 0 0 0 2px;
	color: #FF7744;
	line-height: 6px;
 +line-height: 7px;
	font-size: 12px;
	border: #DDDDDD 1px solid;
	border-top: none;
}
div.tooltip .closebtn a:hover {
	color: #FFFFFF;
	text-decoration: none;
	border-color: #FFCC00;
	background-color: #FFBB66;
}
div.tooltip.callout1 div.tooltipfang {
	right: 13px;
	top: 0px;
	background-position: 0px -11px;
}
div.tooltip.callout1 .closebtn { right: 20px; }
div.tooltip.callout2 div.tooltipfang {
	top: 13px;
	right: 0px;
	background-position: 0px -33px;
}
div.tooltip.callout3 div.tooltipfang {
	top: 42%;
	right: 0px;
	background-position: 0px -33px;
}
div.tooltip.callout4 div.tooltipfang {
	bottom: 13px;
	right: 0px;
	background-position: 0px -33px;
}
div.tooltip.callout5 div.tooltipfang {
	right: 13px;
	bottom: 0px;
	background-position: 0px -66px;
}
div.tooltip.callout6 div.tooltipfang {
	left: 49%;
	bottom: 0px;
	background-position: 0px -55px;
}
div.tooltip.callout7 div.tooltipfang {
	left: 13px;
	bottom: 0px;
	background-position: 0px -77px;
}
div.tooltip.callout8 div.tooltipfang {
	left: 0px;
	bottom: 13px;
	background-position: 0px -44px;
}
div.tooltip.callout9 div.tooltipfang {
	left: 0px;
	top: 42%;
	background-position: 0px -44px;
}
div.tooltip.callout10 div.tooltipfang {
	left: 0px;
	top: 13px;
	background-position: 0px -44px;
}
div.tooltip.callout11 div.tooltipfang {
	left: 13px;
	top: 0px;
	background-position: 0px -22px;
}
div.tooltip.callout12 div.tooltipfang {
	left: 49%;
	top: 0px;
	background-position: 0px 0px;
}


text:
from enum import Enum
from math import *

__version__ = "0.3.0"
LIBCELLML_VERSION = "0.3.104"

STATE_COUNT = 1
VARIABLE_COUNT = 0

class VariableType(Enum):
    VARIABLE_OF_INTEGRATION = 1
    STATE = 2
    CONSTANT = 3
    COMPUTED_CONSTANT = 4
    ALGEBRAIC = 5

VOI_INFO = {"name": "t", "units": "second", "component": "environment", "type": VariableType.VARIABLE_OF_INTEGRATION}

STATE_INFO = [
    {"name": "x", "units": "dimensionless", "component": "my_ode", "type": VariableType.STATE}
]

VARIABLE_INFO = [
]

def create_states_array():
    return [nan]*STATE_COUNT

def create_variables_array():
    return [nan]*VARIABLE_COUNT

def initialise_variables(states, variables):
    states[0] = 1.0

def compute_computed_constants(variables):
    pass

def compute_rates(voi, states, rates, variables):
    rates[0] = 1.0

def compute_variables(voi, states, rates, variables):
    pass


text:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using NDream.AirConsole;
using Newtonsoft.Json.Linq;

public class dispenserScript : MonoBehaviour
{
	public GameObject goBall;
	public GameObject prefabBall;
	public float dropTimeMaxMs = 0.3f;
	public float dropTimeMinMs = 0.2f;
	private int maxBall = 400;

	float nextDrop = 0;

	// Use this for initialization
	void Start()
	{
		logicScript.OnStateChange += LogicScript_OnStateChange;
	}

	private void LogicScript_OnStateChange()
	{
		//for (int i = 0; i < goBall.transform.childCount; i++)
		//{
		//	Destroy(goBall.transform.GetChild(i).gameObject);
		//}
	}

	// Update is called once per frame
	void Update()
	{
		if(Gvar.gameState == enGameState.Play || Gvar.gameState == enGameState.Intro)
		{
			if(Time.time > nextDrop && goBall.transform.childCount < maxBall)
			{
				GameObject newPlayer = Instantiate(prefabBall);
				newPlayer.transform.SetParent(goBall.transform);

				Collider col = this.GetComponent<Collider>();
				newPlayer.transform.localPosition = new Vector3(Random.Range(col.bounds.min.x, col.bounds.max.x), this.transform.localPosition.y, Random.Range(col.bounds.min.z, col.bounds.max.z));

				//newPlayer.transform.localPosition = this.transform.position;
				if(Gvar.gameState == enGameState.Play)
					nextDrop = Time.time + Mathf.Lerp(dropTimeMinMs, dropTimeMaxMs, goBall.transform.childCount / Gvar.scoreMax);
				else
					nextDrop = Time.time + 0.2f;
			}
		}
	}
}


text:
* * *

license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.

# deviceready

El evento se desencadena cuando Cordova está completamente cargado.

    document.addEventListener("deviceready", yourCallbackFunction, false);

## Detalles

Este evento es esencial para cualquier aplicación. Señales de que dispositivo de Cordova APIs han cargado y están listas para acceder.

Córdoba se compone de dos bases de código: nativo y JavaScript. Mientras se carga el código nativo, muestra una imagen de carga personalizada. Sin embargo, JavaScript sólo carga una vez que el DOM cargas. Esto significa que la aplicación web potencialmente puede llamar a una función Cordova JavaScript antes el código nativo correspondiente esté disponible.

El evento `deviceready` se desencadena una vez Cordova ha cargado completamente. Una vez los fuegos del evento, con seguridad puede hacer llamadas a APIs de Cordova. Aplicaciones típicamente Instale un detector de eventos con `document.addEventListener` una vez que ha cargado el DOM del documento HTML.

El evento `deviceready` se comporta algo diferentemente de otros. Cualquier controlador de eventos registrado después de los fuegos de `deviceready` evento tiene su función de callback llamada inmediatamente.

## Plataformas soportadas

*   Amazon fire OS
*   Android
*   BlackBerry 10
*   iOS
*   Tizen
*   Windows Phone 8
*   Windows 8

## Ejemplo rápido

    document.addEventListener("deviceready", onDeviceReady, false);

    function onDeviceReady() {
        // Now safe to use device APIs
    }

## Ejemplo completo

    <!DOCTYPE html>
    <html>
      <head>
        <title>Device Ready Example</title>

        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
        <script type="text/javascript" charset="utf-8">

        // Wait for device API libraries to load
        //
        function onLoad() {
            document.addEventListener("deviceready", onDeviceReady, false);
        }

        // device APIs are available
        //
        function onDeviceReady() {
            // Now safe to use device APIs
        }

        </script>
      </head>
      <body onload="onLoad()">
      </body>
    </html>


text:
/*  THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 *  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 *  DEALINGS IN THE SOFTWARE.
 */

using System;
using System.Collections;
using System.Collections.Generic;

namespace Migo.Syndication.Data
{
    /*static class ItemsTableManager
    {
        public static readonly string initQuery = @"
            CREATE TABLE IF NOT EXISTS items (
            	'local_id' INTEGER  PRIMARY KEY,
            	'parent_id' INTEGER NOT NULL DEFAULT '-1',
            	'active' INTEGER NOT NULL DEFAULT '0',
            	'author' TEXT NOT NULL DEFAULT '',
            	'comments' TEXT NOT NULL DEFAULT '',
            	'description' TEXT NOT NULL DEFAULT '',
            	'guid' TEXT NOT NULL DEFAULT '',
            	'is_read' INTEGER NOT NULL DEFAULT '0',
            	'last_download_time' DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
            	'link' TEXT NOT NULL DEFAULT '',
            	'modified' DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
            	'pubdate' DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00',
            	'title' TEXT NOT NULL DEFAULT ''
            );

            CREATE TRIGGER IF NOT EXISTS item_deleted_trigger
               AFTER DELETE ON items
            BEGIN
                DELETE FROM enclosures WHERE parent_id=old.local_id;
            END;

            CREATE INDEX IF NOT EXISTS items_local_id_index ON items(local_id);
            CREATE INDEX IF NOT EXISTS items_parent_id_index ON items(parent_id);
        ";

        private const string deactivateItemsBaseQuery = "UPDATE items SET active='0' WHERE";
        private static readonly string deleteFromItemsBaseQuery = "DELETE FROM items WHERE";
        private static readonly string insertIntoItemsQuery =
            String.Format (
                @"INSERT INTO items VALUES (
                    NULL, {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}
                ); {12}",
                DbDefines.ItemsTableColumns.ParentIDParameter,
                DbDefines.ItemsTableColumns.ActiveParameter, DbDefines.ItemsTableColumns.AuthorParameter,
                DbDefines.ItemsTableColumns.CommentsParameter, DbDefines.ItemsTableColumns.DescriptionParameter,
                DbDefines.ItemsTableColumns.GuidParameter, DbDefines.ItemsTableColumns.IsReadParameter,
                DbDefines.ItemsTableColumns.LastDownloadTimeParameter, DbDefines.ItemsTableColumns.LinkParameter,
                DbDefines.ItemsTableColumns.ModifiedParameter, DbDefines.ItemsTableColumns.PubDateParameter,
                DbDefines.ItemsTableColumns.TitleParameter, DbDefines.LastInsertIDQuery
            );

        private static readonly string updateItemsQuery =
            String.Format (
                @"UPDATE items SET
                    {2}={3}, {4}={5}, {6}={7}, {8}={9}, {10}={11}, {12}={13},
                    {14}={15}, {16}={17}, {18}={19}, {20}={21}, {22}={23}, {24}={25}
                WHERE {0}={1};",
                DbDefines.ItemsTableColumns.LocalID, DbDefines.ItemsTableColumns.LocalIDParameter,
                DbDefines.ItemsTableColumns.ParentID, DbDefines.ItemsTableColumns.ParentIDParameter,
                DbDefines.ItemsTableColumns.Active, DbDefines.ItemsTableColumns.ActiveParameter,
                DbDefines.ItemsTableColumns.Author, DbDefines.ItemsTableColumns.AuthorParameter,
                DbDefines.ItemsTableColumns.Comments, DbDefines.ItemsTableColumns.CommentsParameter,
                DbDefines.ItemsTableColumns.Description, DbDefines.ItemsTableColumns.DescriptionParameter,
                DbDefines.ItemsTableColumns.Guid, DbDefines.ItemsTableColumns.GuidParameter,
                DbDefines.ItemsTableColumns.IsRead, DbDefines.ItemsTableColumns.IsReadParameter,
                DbDefines.ItemsTableColumns.LastDownloadTime, DbDefines.ItemsTableColumns.LastDownloadTimeParameter,
                DbDefines.ItemsTableColumns.Link, DbDefines.ItemsTableColumns.LinkParameter,
                DbDefines.ItemsTableColumns.Modified, DbDefines.ItemsTableColumns.ModifiedParameter,
                DbDefines.ItemsTableColumns.PubDate, DbDefines.ItemsTableColumns.PubDateParameter,
                DbDefines.ItemsTableColumns.Title, DbDefines.ItemsTableColumns.TitleParameter
            );

        public static void Commit (IEnumerable<FeedItem> items)
        {
            if (items == null) {
                throw new ArgumentNullException ("items");
            }

            FeedEnclosure tmpEnc;
            ICollection<FeedItem> itemCol = items as ICollection<FeedItem>;

            Dictionary<QueuedDbCommand,FeedItem> itemCommandPairs = (itemCol == null) ?
                new Dictionary<QueuedDbCommand,FeedItem> () :
                new Dictionary<QueuedDbCommand,FeedItem> (itemCol.Count);

            List<FeedEnclosure> enclosures =
                new List<FeedEnclosure> (itemCommandPairs.Count);

            foreach (FeedItem i in items) {
                itemCommandPairs.Add (QueuedDbCommand.CreateScalar (
                    CreateInsertCommandImpl (i)), i
                );
            }

            foreach (FeedItem i in items) {
                if (i.Enclosure != null) {
                    tmpEnc = i.Enclosure as FeedEnclosure;
                    if (tmpEnc != null) {
                        enclosures.Add (tmpEnc);
                    }
                }
            }

            DatabaseManager.Enqueue (itemCommandPairs.Keys);

            foreach (KeyValuePair<QueuedDbCommand,FeedItem> kvp in itemCommandPairs) {
                kvp.Value.LocalID = Convert.ToInt64 (kvp.Key.ScalarResult);
            }

            if (enclosures.Count > 0) {
                EnclosuresTableManager.Commit (enclosures);
            }
        }

        public static IDbCommand CreateInsertCommand (FeedItem item)
        {
            if (item == null) {
                throw new ArgumentNullException ("item");
            }

            return CreateInsertCommandImpl (item);
        }

        private static IDbCommand CreateInsertCommandImpl (FeedItem item)
        {
            return DatabaseManager.CreateCommand (
                insertIntoItemsQuery,
                DbDefines.ItemsTableColumns.ParentID, item.Parent.LocalID.ToString (),
                DbDefines.ItemsTableColumns.Active, (item.Active) ? "1" : "0",
                DbDefines.ItemsTableColumns.Author, item.Author,
                DbDefines.ItemsTableColumns.Comments, item.Comments,
                DbDefines.ItemsTableColumns.Description, item.Description,
                DbDefines.ItemsTableColumns.Guid, item.Guid.ToString (),
                DbDefines.ItemsTableColumns.IsRead, item.IsRead.ToString (),
                DbDefines.ItemsTableColumns.LastDownloadTime, item.LastDownloadTime.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.Link, item.Link,
                DbDefines.ItemsTableColumns.Modified, item.Modified.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.PubDate, item.PubDate.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.Title, item.Title
            );
        }

        public static void Deactivate (FeedItem item)
        {
            if (item == null) {
                throw new ArgumentNullException ("item");
            }

             DatabaseManager.ExecuteNonQuery (
                String.Format (
                    "{0} {1}={2};",
                    deactivateItemsBaseQuery,
                    DbDefines.ItemsTableColumns.LocalID,
                    DbDefines.ItemsTableColumns.LocalIDParameter
                )
            );
        }

        public static void Deactivate (IEnumerable<FeedItem> items)
        {
            if (items == null) {
                throw new ArgumentNullException ("items");
            }

            List<long> ids = new List<long> ();

            foreach (FeedItem i in items) {
                if (i != null) {
                    ids.Add (i.LocalID);
                }
            }

            if (ids.Count > 0) {
                string query = DataUtility.MultipleOnIDQuery (
                    deactivateItemsBaseQuery,
                    DbDefines.ItemsTableColumns.LocalID,
                    ids.ToArray ()
                );

                DatabaseManager.ExecuteNonQuery (query);
            }
        }

        public static void Delete (FeedItem item)
        {
            if (item == null) {
                throw new ArgumentNullException ("item");
            }

            DatabaseManager.ExecuteNonQuery (
                String.Format (
                    "{0} {1}={2};",
                    deleteFromItemsBaseQuery,
                    DbDefines.ItemsTableColumns.LocalID,
                    DbDefines.ItemsTableColumns.LocalIDParameter
                )
            );
        }

        public static void Delete (IEnumerable<FeedItem> items)
        {
            if (items == null) {
            	throw new ArgumentNullException ("items");
            }

            List<long> ids = new List<long> ();

            foreach (FeedItem i in items) {
                if (i != null) {
                    ids.Add (i.LocalID);
                }
            }

            if (ids.Count > 0) {
                string query = DataUtility.MultipleOnIDQuery (
                    deleteFromItemsBaseQuery, DbDefines.ItemsTableColumns.LocalID, ids.ToArray ()
                );

                DatabaseManager.ExecuteNonQuery (query);
            }
        }

        public static void Init ()
        {
            DatabaseManager.ExecuteNonQuery (initQuery);
        }

        public static long Insert (FeedItem item)
        {
            if (item == null) {
                throw new ArgumentNullException ("item");
            } else if (item.LocalID > 0) {
                return item.LocalID;
            }

            long ret = -1;

            if (item.Parent == null) {
                return ret;
            }

            ret = Convert.ToInt64 (CreateInsertCommandImpl (item));

            return ret;
        }

        public static bool Insert (IEnumerable<FeedItem> items)
        {
            if (items == null) {
                throw new ArgumentNullException ("items");
            }

            bool ret = false;

            try {
                foreach (FeedItem i in items) {
                    Insert (i);
                }

                ret = true;
            } catch {}

            return ret;
        }

        public static void Update (FeedItem item)
        {
            if (item == null) {
                throw new ArgumentNullException ("item");
            }

            DatabaseManager.ExecuteNonQuery (
                updateItemsQuery,
                DbDefines.ItemsTableColumns.LocalID, item.LocalID.ToString (),
                DbDefines.ItemsTableColumns.ParentID, item.Parent.LocalID.ToString (),
                DbDefines.ItemsTableColumns.Active, (item.Active) ? "1" : "0",
                DbDefines.ItemsTableColumns.Author, item.Author,
                DbDefines.ItemsTableColumns.Comments, item.Comments,
                DbDefines.ItemsTableColumns.Description, item.Description,
                DbDefines.ItemsTableColumns.Guid, item.Guid.ToString (),
                DbDefines.ItemsTableColumns.IsRead, item.IsRead.ToString (),
                DbDefines.ItemsTableColumns.LastDownloadTime, item.LastDownloadTime.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.Link, item.Link,
                DbDefines.ItemsTableColumns.Modified, item.Modified.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.PubDate, item.PubDate.ToUniversalTime ().ToString ("u"),
                DbDefines.ItemsTableColumns.Title, item.Title
            );
        }

        public static bool Update (IEnumerable<FeedItem> items)
        {
            if (items == null) {
                throw new ArgumentNullException ("items");
            }

            bool ret = false;

            try {
                foreach (FeedItem i in items) {
                    Update (i);
                }

                ret = true;
            } catch {}

            return ret;
        }
    }*/
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="Cache-Control" content="no-cache">
<meta name="pragma" content="no-cache">

Mesure d'audience ROI statistique webanalytics par <img width="39" height="25" src="http://logv33.xiti.com/hit.xiti?s=281802&p=" alt="WebAnalytics">


text:
import {Component} from 'angular2/core';
// import { Component, View } from 'angular2/core';
// import { CORE_DIRECTIVES } from 'angular2/common';

@Component({
  selector:'new-component',
  templateUrl:'./new-component/new-component.html'
})

export class NewComponentCmp {
  name : string;
  employees : string[];
  judge : Boolean;
  constructor() {
    this.name = 'Weiliang';
    this.employees = ['william', 'will'];
    this.judge = true;
  }
  logOut(value) {
    console.log(value);
  }
  onKeyup() {
    console.log('key up');
  }
  toggle() {
    this.judge = !this.judge;
  }
}


text:
package no.stelar7.api.r4j.pojo.lol.challenges;

import no.stelar7.api.r4j.basic.constants.types.lol.TierType;

import java.util.*;

public class ChallengePercentileMap extends HashMap<TierType, Double>
{
}


text:
//
//  WRPageHeaderView.m
//  tabbar
//
//  Created by wenrui on 16/5/10.
//  Copyright © 2016年 wenrui. All rights reserved.
//

#import "WRPageHeaderView.h"

@implementation WRPageHeaderView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end


text:
function scrollToElement (selector) {
  $('html, body').animate({
    scrollTop: $(selector).offset().top
  }, 1000);
};

$(document).on('click', 'a.internal_nav', function () {
  scrollToElement($(this).attr('href'));
});


text:
namespace FibonacciNumbers
{
    using System;

    /// <summary>
    /// Problem 10.	Fibonacci Numbers
    /// Write a program that reads a number `n` and prints on the console the first `n` members of the Fibonacci sequence (at a single line, separated by comma and space - `, `) : `0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, …`.
    /// Note: You may need to learn how to use loops.
    /// Examples:
    /// |   n  |        comments        |
    /// |:----:|------------------------|
    /// | 1    | 0                      |
    /// | 3    | 0 1 1                  |
    /// | 10   | 0 1 1 2 3 5 8 13 21 34 |
    /// </summary>
    public class FibonacciNumbers
    {
        public static void Main()
        {
            Console.WriteLine("Problem 10. Fibonacci Numbers \nWrite a program that reads a number `n` and prints on the console the first `n` members of the Fibonacci sequence (at a single line, separated by comma and space - `, `) : `0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, …`.");
            Console.WriteLine();

            Console.Write("Enter an integer number for the numbers count (n): ");

            int n;

            if (!int.TryParse(Console.ReadLine(), out n))
            {
                throw new FormatException("Invalid format. You must enter an integer number.");
            }

            long[] fibonacci = GetFirstNFibonacciNumbers(n);

            for (int i = 0; i < n; i++)
            {
                Console.Write("{0} ", fibonacci[i]);
            }

            Console.WriteLine();

            //Console.WriteLine(string.Join(" ", fibonacci));
        }

        /// <summary>
        /// Gets the first n members of the Fibonacci sequence
        /// </summary>
        /// <param name="n">Number of Fibonacci sequence members</param>
        /// <returns>An array with a n number of the Fibonacci sequence members</returns>
        public static long[] GetFirstNFibonacciNumbers(int n)
        {
            long[] fibonacci = new long[Math.Max(n, 2)];
            fibonacci[0] = 0;
            fibonacci[1] = 1;

            for (int i = 2; i < n; i++)
            {
                fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2];
            }

            return fibonacci;
        }
    }
}