text:
package gw.test.util;

import gw.util.StreamUtil;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

public class TestTimingData {

  public static void main(String[] args) {
    TestTimingData timingData = readDataFromFile(new File(args[0]));
    timingData.printStatistics();
  }

  public static TestTimingData readDataFromFile(File f) {
    TestTimingData timingData = new TestTimingData();
    timingData.populateFromFile(f);
    return timingData;
  }

  private Map<String, ClassTimingData> _classTimingData = new HashMap<String, ClassTimingData>();
  private List<ClassTimingData> _orderedClasses = new ArrayList<ClassTimingData>();
  private List<MethodTimingData> _allMethods = new ArrayList<MethodTimingData>();
  private long _totalSuiteTime;

  private TestTimingData() {}

  public void printStatistics() {
    long totalClassRunningTime = 0;
    for (ClassTimingData ctd : _orderedClasses) {
      totalClassRunningTime += ctd._time;
    }

    System.out.println("Total suite time:                " + formatNanoTime(_totalSuiteTime));
    System.out.println("Total suite startup/teardown:    " + formatNanoTime(_totalSuiteTime - totalClassRunningTime));
    System.out.println("Num test classes:                " + _orderedClasses.size());
    System.out.println("Total test class time:           " + formatNanoTime(totalClassRunningTime));
    System.out.println("Average test class time:         " + formatNanoTime(totalClassRunningTime / _orderedClasses.size()));

    List<ClassTimingData> classesOrderedByTime = sortClassesByTime();
    int medianClassIndex = classesOrderedByTime.size() / 2;
    int percentileClassIndex =(int) (0.05 * classesOrderedByTime.size());
    long percentileClassRunningTime = 0;
    for (int i = 0; i <= percentileClassIndex; i++) {
      percentileClassRunningTime += classesOrderedByTime.get(i).getTime();
    }
    System.out.println("Median test class time:          " + formatNanoTime(classesOrderedByTime.get(medianClassIndex).getTime()));
    System.out.println("95th percentile test class time: " + formatNanoTime(classesOrderedByTime.get(percentileClassIndex).getTime()));
    System.out.println("Time taken by slowest 5%:        " + formatNanoTime(percentileClassRunningTime));
    System.out.println("Percentage taken by slowest 5%:  " + formatPercentage((double) percentileClassRunningTime / (double) totalClassRunningTime));

    List<MethodTimingData> methodsOrderedByTime = sortMethodsByTime();
    int medianMethodIndex = methodsOrderedByTime.size() / 2;
    int percentileMethodIndex =(int) (0.05 * methodsOrderedByTime.size());
    System.out.println("Median method time:              " + formatNanoTime(methodsOrderedByTime.get(medianMethodIndex).getTime()));
    System.out.println("95th percentile method time:     " + formatNanoTime(methodsOrderedByTime.get(percentileMethodIndex).getTime()));

    System.out.println("");
    System.out.println("Slowest 5% of test classes:");
    for (int i = 0; i <= percentileClassIndex; i++) {
      ClassTimingData ctd = classesOrderedByTime.get(i);
      System.out.println(formatNanoTime(ctd._time) + "   " + ctd._className);
    }

    System.out.println("");
    System.out.println("Slowest 5% of test methods:");
    for (int i = 0; i <= percentileMethodIndex; i++) {
      MethodTimingData mtd = methodsOrderedByTime.get(i);
      System.out.println(formatNanoTime(mtd.getTime()) + "   " + mtd.getClassName() + " " + mtd.getMethodName());
    }

    System.out.println("");
    System.out.println("All test classes:");
    for (ClassTimingData ctd : classesOrderedByTime) {
      System.out.println(formatNanoTime(ctd._time) + "   " + ctd._className);
    }
  }

  private List<ClassTimingData> sortClassesByTime() {
    List<ClassTimingData> classesOrderedByTime = new ArrayList<ClassTimingData>(_orderedClasses);
    Collections.sort(classesOrderedByTime, new Comparator<ClassTimingData>() {
      @Override
      public int compare(ClassTimingData o1, ClassTimingData o2) {
        if (o1._time > o2._time) {
          return -1;
        } else if (o1._time == o2._time) {
          return 0;
        } else {
          return 1;
        }
      }
    });

    return classesOrderedByTime;
  }

  private List<MethodTimingData> sortMethodsByTime() {
    List<MethodTimingData> methodsOrderedByTime = new ArrayList<MethodTimingData>(_allMethods);
    Collections.sort(methodsOrderedByTime, new Comparator<MethodTimingData>() {
      @Override
      public int compare(MethodTimingData o1, MethodTimingData o2) {
        if (o1._time > o2._time) {
          return -1;
        } else if (o1._time == o2._time) {
          return 0;
        } else {
          return 1;
        }
      }
    });

    return methodsOrderedByTime;
  }

  private String formatNanoTime(long ns) {
    return (ns / 1000000) + " ms";
  }

  private String formatPercentage(double d) {
    NumberFormat format = NumberFormat.getPercentInstance();
    format.setMinimumFractionDigits(2);
    return format.format(d);
  }

  private void populateFromFile(File f) {
    try {
      List<String> fileLines = readLines(f);

      for (String line : fileLines) {
        if (line.startsWith("***** TestRunTime")) {
          String message = line.substring(line.indexOf('[') + 1, line.indexOf(']'));
          String time = line.substring(line.indexOf(']') + 2, line.lastIndexOf("*****") - 1);
          processTestLine(message, time);
        }
      }
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }

  private void processTestLine(String message, String timeStr) {
    long time = Long.parseLong(timeStr);
    if (message.startsWith("Method ")) {
      String className = message.substring(message.indexOf(' ') + 1, message.lastIndexOf(' '));
      String methodName = message.substring(message.lastIndexOf(' ') + 1, message.length());
      MethodTimingData mtd = new MethodTimingData(methodName, className, time);
      _allMethods.add(mtd);
      getOrCreateClassTimingData(className).addMethod(mtd);
    } else if (message.startsWith("Class ")) {
      String className = message.substring(message.lastIndexOf(' ') + 1, message.length());
      getOrCreateClassTimingData(className).setTime(time);
    } else if (message.startsWith("Suite")) {
      _totalSuiteTime = time;
    } else {
      throw new IllegalArgumentException("Unrecognized timing message " + message);
    }
  }

  private ClassTimingData getOrCreateClassTimingData(String className) {
    ClassTimingData classTimingData = _classTimingData.get(className);
    if (classTimingData == null) {
      classTimingData = new ClassTimingData(className);
      _orderedClasses.add(classTimingData);
      _classTimingData.put(className, classTimingData);
    }

    return classTimingData;
  }

  private List<String> readLines(File f) throws IOException {
    List<String> fileLines = new ArrayList<String>();
    BufferedReader bufferedReader = new BufferedReader(new FileReader(f));
    String line = bufferedReader.readLine();
    while (line != null) {
      fileLines.add(line);
      line = bufferedReader.readLine();
    }
    return fileLines;
  }

  private static class ClassTimingData {
    private String _className;
    private long _time;
    private List<MethodTimingData> _methods = new ArrayList<MethodTimingData>();

    private ClassTimingData(String className) {
      _className = className;
    }

    public void setTime(long time) {
      _time = time;
    }

    public void addMethod(MethodTimingData method) {
      _methods.add(method);
    }

    public String getClassName() {
      return _className;
    }

    public long getTime() {
      return _time;
    }

    public List<MethodTimingData> getMethods() {
      return _methods;
    }
  }

  private static class MethodTimingData {
    private String _methodName;
    private String _className;
    private long _time;

    private MethodTimingData(String methodName, String className, long time) {
      _methodName = methodName;
      _className = className;
      _time = time;
    }

    public String getMethodName() {
      return _methodName;
    }

    public String getClassName() {
      return _className;
    }

    public long getTime() {
      return _time;
    }
  }
}


text:
require 'spec_helper'

describe SampleComparison do
  before (:each) do
    @it = FactoryGirl.build(:sample_comparison)
  end

  describe 'assocations', :type => :associations do
    it 'should have a sample_1 attribute' do
      @it.should respond_to(:sample_1)
    end
    it 'should have a sample_2 attribute' do
      @it.should respond_to(:sample_2)
    end
    it 'should have a differential_expression_tests attribute' do
      @it.should respond_to(:differential_expression_tests)
    end
  end

  describe 'when deleted', :type => :when_deleted do
    before (:each) do
      @it.save!
    end

    it 'should delete all associated differential expression tests' do
      FactoryGirl.create(:differential_expression_test,
                         :sample_comparison_id => @it.id)
      FactoryGirl.create(:differential_expression_test,
                         :sample_comparison_id => @it.id)
      DifferentialExpressionTest.find_all_by_sample_comparison_id(@it.id).count.should eq(2)
      @it.delete()
      DifferentialExpressionTest.find_all_by_sample_comparison_id(@it.id).should be_empty
    end

    it 'should not delete the associated sample 1' do
      @it.delete()
      Sample.find_by_id(@it.sample_1.id).should_not be_nil
    end

    it 'should not delete the associated sample 2' do
      @it.delete()
      Sample.find_by_id(@it.sample_2.id).should_not be_nil
    end
  end

  describe 'validations' do
    it 'should save successfully when all fields are valid' do
      @it.save!
    end

    describe 'sample_1' do
      before(:each) do @attribute = 'sample_1' end

      it_should_behave_like 'a required attribute'
    end

    describe 'sample_2' do
      before(:each) do @attribute = 'sample_2' end

      it_should_behave_like 'a required attribute'
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
# ember-typed - Ember with Typescript

**THIS IS AN EXPERIMENT**
**SHOULD NOT BE USED FOR PRODUCTION !**
**THATS SAID, I THINK IT'S PRETTY USEABLE..**

This AddOn makes it possible to write Ember-Applications with Typescript `1.5+`.
It adds wrappers for `Ember.Object`, `Ember.Route`, `Ember.Controller`, `Ember.View` and `Ember.Component` and annotations.

Basic structure of a typed Ember class
---
First the includes (*Note: blueprints will generated these parts for you*)
```typescript
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember';
import EmTs from './../typings/emts';
```
followed with your class
```typescript
class MyObject extends EmTs.EmObject {
	constructor(obj) {
		super(obj);
	}
}
```
then the exports, first the export of your typed class, so it can be used outside
```typescript
export {MyObject};
```
and the default export for ember
```typescript
export default EmTs.EmObject.getProxyClassFor("MyObject", MyObject);
```

# Blueprints
Everytime you update this AddOn you probably will need to run `ember g ember-typed`!
This will copy the typescript files into your project.
Why aren't these files merged while building ? Because this way you will have autocompletion..

 * `ember g route`
 * `ember g controller`
 * `ember g view`
 * `ember g object`
 * `ember g component`

# Classes you can extend from
 * `EmTs.EmObject`
  *Not EmTs.Object because of name resolve problems.. might be solveable*
 * `EmTs.Controller`
 * `EmTs.View`
 * `EmTs.Component`
 * `EmTs.Route`

# Annotations
 * `@Property(name)`
 		Can Be used at properties, if name is not definied the name of the property will be used.
 * `@Computer(dep1, dep2, dep3, ...)`
 		Can be used at functions or set/get-functions
 * `@Action`
 		Can be used at functions, the action will have the name of the function.
 * `@Needs(name, bind-name)`

# How to access ember-obj from ts-obj

* `EmTs.Controller`
	with `this.controller`
* `EmTs.Route`
	with `this.route`
* `EmTs.View`
	with `this.view`
* `EmTs.Component`
	with `this.component`
* or with `this.native_ember_object`

# Some examples
Object
----
```ts
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember';
import EmTs from './../typings/emts';

class ItemObject extends EmTs.EmObject {
	@EmTs.Property() userId: number;
	@EmTs.Property() id: number;
	@EmTs.Property() title: string;
	@EmTs.Property() body: string;

	@EmTs.Computed("title")
	bigTitle(key, value) {
		if (value !== undefined) {
			this.title = value;
		}
		return this.title.toUpperCase();
	}

	//Computed-Property via get
	@EmTs.Computed("body")
	get bigBody() {
		return this.body.toUpperCase();
	}
	//and set
	set bigBody(value: string) {
		this.body = value;
	}

	constructor(object: Ember.Object) {
		super(object);
	}
}

export {ItemObject};
export default EmTs.EmObject.getProxyClassFor("ItemObject", ItemObject);
```

Route
----
```ts
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember';
import EmTs from './../typings/emts';
import Item from './../models/item';
import {ItemObject} from './../models/item';

class DemoRoute extends EmTs.Route {
	model(): ItemObject[] {
		return Ember.$.getJSON("http://jsonplaceholder.typicode.com/posts")
		.then((data) => {
			return data.map((x) => {
				//INFO: no idea why I need the (<any>Item) cast, shouldn't be required..
				return new ItemObject((<any>Item).create(x));
			});
		});
	}

	/*
	Or return ember objects

    model(): Item[] {
	    return Ember.$.getJSON("http://jsonplaceholder.typicode.com/posts")
	    .then((data) => {
		    return data.map((x) => {
			    return (<any>Item).create(x);
		    });
	    });
	}
    */

	constructor(route: Ember.Route) {
		super(route);
	}
}

export {DemoRoute};
export default EmTs.Route.getProxyClassFor("DemoRoute", DemoRoute);
```

Controller
----
```ts
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember'
import EmTs from './../typings/emts';

class DemoController extends EmTs.Controller {
	@EmTs.Property() model: ItemObject[];

	@EmTs.Computed("model", "model.@each")
	count(): number {
		return this.model.length;
	}

	constructor(controller: Ember.Controller) {
		super(controller);
	}
}

export {DemoController};
export default EmTs.Controller.getProxyClassFor("DemoController", DemoController);
```

View
----
```ts
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember'
import EmTs from './../typings/emts';

class DemoView extends EmTs.View {
	constructor(view: Ember.View) {
		super(view);
	}
}

export {DemoView};
export default EmTs.View.getProxyClassFor("DemoView", DemoView);
```

Component
----
```ts
/// <reference path="./../typings/DefinitelyTyped/ember/ember.d.ts"/>
import Ember from 'ember'
import EmTs from './../typings/emts';
import Item from './../models/item';
import {ItemObject} from './../models/item';

class XDemoComponent extends EmTs.Component {
	@EmTs.Property() item: ItemObject;
	@EmTs.Property() display: boolean = false;

	constructor(controller: Ember.Component) {
		super(controller);
	}

	@EmTs.Action
	toggle() {
		this.display = !this.display;
	}
}

export {XDemoComponent};
export default EmTs.Component.getProxyClassFor("XDemoComponent", XDemoComponent);
```


text:
#ifndef _rng_h_
#define _rng_h_

#include <random>

/// -----------------------------------------------------------------
/// \class RandomNumberGenerator
/// \details Random number generation for various distributions
/// -----------------------------------------------------------------
class RandomNumberGenerator {
protected:
    RandomNumberGenerator();

// Singleton Design Pattern
#define RNG RandomNumberGenerator::getInstance()
protected:
    static RandomNumberGenerator* instance;

public:
    static RandomNumberGenerator& getInstance();

    // Operators
public:
    std::default_random_engine& operator()();

    // Attributes
public:
    std::default_random_engine randomEngine;
};

#endif


text:
import helper

print(helper.greeting('hello'))
ptiny("say world")


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/genomics/v1/annotations.proto

package com.google.genomics.v1;

public interface SearchAnnotationsRequestOrBuilder extends
    // @@protoc_insertion_point(interface_extends:google.genomics.v1.SearchAnnotationsRequest)
    com.google.protobuf.MessageOrBuilder {

  /**
   *

   * Required. The annotation sets to search within. The caller must have
   * `READ` access to these annotation sets.
   * All queried annotation sets must have the same type.
   *

   *
   * repeated string annotation_set_ids = 1;
   */
  java.util.List<java.lang.String>
      getAnnotationSetIdsList();
  /**
   *

   * Required. The annotation sets to search within. The caller must have
   * `READ` access to these annotation sets.
   * All queried annotation sets must have the same type.
   *

   *
   * repeated string annotation_set_ids = 1;
   */
  int getAnnotationSetIdsCount();
  /**
   *

   * Required. The annotation sets to search within. The caller must have
   * `READ` access to these annotation sets.
   * All queried annotation sets must have the same type.
   *

   *
   * repeated string annotation_set_ids = 1;
   */
  java.lang.String getAnnotationSetIds(int index);
  /**
   *

   * Required. The annotation sets to search within. The caller must have
   * `READ` access to these annotation sets.
   * All queried annotation sets must have the same type.
   *

   *
   * repeated string annotation_set_ids = 1;
   */
  com.google.protobuf.ByteString
      getAnnotationSetIdsBytes(int index);

  /**
   *

   * The ID of the reference to query.
   *

   *
   * optional string reference_id = 2;
   */
  java.lang.String getReferenceId();
  /**
   *

   * The ID of the reference to query.
   *

   *
   * optional string reference_id = 2;
   */
  com.google.protobuf.ByteString
      getReferenceIdBytes();

  /**
   *

   * The name of the reference to query, within the reference set associated
   * with this query.
   *

   *
   * optional string reference_name = 3;
   */
  java.lang.String getReferenceName();
  /**
   *

   * The name of the reference to query, within the reference set associated
   * with this query.
   *

   *
   * optional string reference_name = 3;
   */
  com.google.protobuf.ByteString
      getReferenceNameBytes();

  /**
   *

   * The start position of the range on the reference, 0-based inclusive. If
   * specified,
   * [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
   * [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
   * must be specified. Defaults to 0.
   *

   *
   * optional int64 start = 4;
   */
  long getStart();

  /**
   *

   * The end position of the range on the reference, 0-based exclusive. If
   * [referenceId][google.genomics.v1.SearchAnnotationsRequest.reference_id] or
   * [referenceName][google.genomics.v1.SearchAnnotationsRequest.reference_name]
   * must be specified, Defaults to the length of the reference.
   *

   *
   * optional int64 end = 5;
   */
  long getEnd();

  /**
   *

   * The continuation token, which is used to page through large result sets.
   * To get the next page of results, set this parameter to the value of
   * `nextPageToken` from the previous response.
   *

   *
   * optional string page_token = 6;
   */
  java.lang.String getPageToken();
  /**
   *

   * The continuation token, which is used to page through large result sets.
   * To get the next page of results, set this parameter to the value of
   * `nextPageToken` from the previous response.
   *

   *
   * optional string page_token = 6;
   */
  com.google.protobuf.ByteString
      getPageTokenBytes();

  /**
   *

   * The maximum number of results to return in a single page. If unspecified,
   * defaults to 256. The maximum value is 2048.
   *

   *
   * optional int32 page_size = 7;
   */
  int getPageSize();

  public com.google.genomics.v1.SearchAnnotationsRequest.ReferenceCase getReferenceCase();
}


text:
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/kernel.h>
#include <linux/ptrace.h>
#include <linux/interrupt.h>
#include <linux/module.h>

#include <asm/setup.h>
#include <asm/traps.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/pgalloc.h>

extern void die_if_kernel(char *, struct pt_regs *, long);

int send_fault_sig(struct pt_regs *regs)
{
	siginfo_t siginfo = { 0, 0, 0, };

	siginfo.si_signo = current->thread.signo;
	siginfo.si_code = current->thread.code;
	siginfo.si_addr = (void *)current->thread.faddr;
#ifdef DEBUG
	printk("send_fault_sig: %p,%d,%d\n", siginfo.si_addr, siginfo.si_signo, siginfo.si_code);
#endif

	if (user_mode(regs)) {
		force_sig_info(siginfo.si_signo,
			       &siginfo, current);
	} else {
		if (handle_kernel_fault(regs))
			return -1;

		//if (siginfo.si_signo == SIGBUS)
		//	force_sig_info(siginfo.si_signo,
		//		       &siginfo, current);

		/*
		 * Oops. The kernel tried to access some bad page. We'll have to
		 * terminate things with extreme prejudice.
		 */
		if ((unsigned long)siginfo.si_addr < PAGE_SIZE)
			printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference");
		else
			printk(KERN_ALERT "Unable to handle kernel access");
		printk(" at virtual address %p\n", siginfo.si_addr);
		die_if_kernel("Oops", regs, 0 /*error_code*/);
		do_exit(SIGKILL);
	}

	return 1;
}

/*
 * This routine handles page faults.  It determines the problem, and
 * then passes it off to one of the appropriate routines.
 *
 * error_code:
 *	bit 0 == 0 means no page found, 1 means protection fault
 *	bit 1 == 0 means read, 1 means write
 *
 * If this routine detects a bad access, it returns 1, otherwise it
 * returns 0.
 */
int do_page_fault(struct pt_regs *regs, unsigned long address,
			      unsigned long error_code)
{
	struct mm_struct *mm = current->mm;
	struct vm_area_struct * vma;
	int write, fault;

#ifdef DEBUG
	printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n",
		regs->sr, regs->pc, address, error_code,
		current->mm->pgd);
#endif

	/*
	 * If we're in an interrupt or have no user
	 * context, we must not take the fault..
	 */
	if (in_atomic() || !mm)
		goto no_context;

	down_read(&mm->mmap_sem);

	vma = find_vma(mm, address);
	if (!vma)
		goto map_err;
	if (vma->vm_flags & VM_IO)
		goto acc_err;
	if (vma->vm_start <= address)
		goto good_area;
	if (!(vma->vm_flags & VM_GROWSDOWN))
		goto map_err;
	if (user_mode(regs)) {
		/* Accessing the stack below usp is always a bug.  The
		   "+ 256" is there due to some instructions doing
		   pre-decrement on the stack and that doesn't show up
		   until later.  */
		if (address + 256 < rdusp())
			goto map_err;
	}
	if (expand_stack(vma, address))
		goto map_err;

/*
 * Ok, we have a good vm_area for this memory access, so
 * we can handle it..
 */
good_area:
#ifdef DEBUG
	printk("do_page_fault: good_area\n");
#endif
	write = 0;
	switch (error_code & 3) {
		default:	/* 3: write, present */
			/* fall through */
		case 2:		/* write, not present */
			if (!(vma->vm_flags & VM_WRITE))
				goto acc_err;
			write++;
			break;
		case 1:		/* read, present */
			goto acc_err;
		case 0:		/* read, not present */
			if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
				goto acc_err;
	}

	/*
	 * If for any reason at all we couldn't handle the fault,
	 * make sure we exit gracefully rather than endlessly redo
	 * the fault.
	 */

	fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
#ifdef DEBUG
	printk("handle_mm_fault returns %d\n",fault);
#endif
	if (unlikely(fault & VM_FAULT_ERROR)) {
		if (fault & VM_FAULT_OOM)
			goto out_of_memory;
		else if (fault & VM_FAULT_SIGBUS)
			goto bus_err;
		BUG();
	}
	if (fault & VM_FAULT_MAJOR)
		current->maj_flt++;
	else
		current->min_flt++;

	up_read(&mm->mmap_sem);
	return 0;

/*
 * We ran out of memory, or some other thing happened to us that made
 * us unable to handle the page fault gracefully.
 */
out_of_memory:
	up_read(&mm->mmap_sem);
	if (!user_mode(regs))
		goto no_context;
	pagefault_out_of_memory();
	return 0;

no_context:
	current->thread.signo = SIGBUS;
	current->thread.faddr = address;
	return send_fault_sig(regs);

bus_err:
	current->thread.signo = SIGBUS;
	current->thread.code = BUS_ADRERR;
	current->thread.faddr = address;
	goto send_sig;

map_err:
	current->thread.signo = SIGSEGV;
	current->thread.code = SEGV_MAPERR;
	current->thread.faddr = address;
	goto send_sig;

acc_err:
	current->thread.signo = SIGSEGV;
	current->thread.code = SEGV_ACCERR;
	current->thread.faddr = address;

send_sig:
	up_read(&mm->mmap_sem);
	return send_fault_sig(regs);
}


text:
package org.wso2.carbon.device.mgt.extensions.internal;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.device.mgt.common.spi.DeviceTypeGeneratorService;
import org.wso2.carbon.device.mgt.extensions.device.type.template.DeviceTypeGeneratorServiceImpl;
import org.wso2.carbon.ndatasource.core.DataSourceService;
import org.wso2.carbon.registry.core.service.RegistryService;

/**
 * @scr.component name="org.wso2.carbon.device.mgt.extensions.DeviceTypeExtensionServiceComponent"
 * immediate="true"
 * @scr.reference name="registry.service"
 * interface="org.wso2.carbon.registry.core.service.RegistryService" cardinality="0..1"
 * policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService"
 * @scr.reference name="org.wso2.carbon.ndatasource"
 * interface="org.wso2.carbon.ndatasource.core.DataSourceService"
 * cardinality="1..1"
 * policy="dynamic"
 * bind="setDataSourceService"
 * unbind="unsetDataSourceService"
 */
public class DeviceTypeExtensionServiceComponent {

    private static final Log log = LogFactory.getLog(DeviceTypeExtensionServiceComponent.class);

    protected void activate(ComponentContext ctx) {
        try {
            if (log.isDebugEnabled()) {
                log.debug("Activating Device Type Extension Service Component");
            }
            ctx.getBundleContext()
                    .registerService(DeviceTypeGeneratorService.class, new DeviceTypeGeneratorServiceImpl(), null);
            if (log.isDebugEnabled()) {
                log.debug("Device Type Extension Service Component successfully activated");
            }
        } catch (Throwable e) {
            log.error("Error occurred while initializing device type extension component ", e);
        }
    }

    protected void deactivate(ComponentContext ctx) {
        if (log.isDebugEnabled()) {
            log.debug("De-activating DeviceType Deployer Service Component");
        }
    }

    protected void setRegistryService(RegistryService registryService) {
        if (log.isDebugEnabled()) {
            log.debug("RegistryService acquired");
        }
        DeviceTypeExtensionDataHolder.getInstance().setRegistryService(registryService);
    }

    protected void unsetRegistryService(RegistryService registryService) {
        DeviceTypeExtensionDataHolder.getInstance().setRegistryService(null);
    }

    protected void setDataSourceService(DataSourceService dataSourceService) {
        /* This is to avoid  device management component getting initialized before the underlying datasources
        are registered */
        if (log.isDebugEnabled()) {
            log.debug("Data source service set to android mobile service component");
        }
    }

    protected void unsetDataSourceService(DataSourceService dataSourceService) {
        //do nothing
    }
}


text:
#include "launch.h"
#include "event.h"
#include "internal.h"
#include "launch/protocol.h"
#include "util.h"

#include <sys/uio.h>
#include <fcntl.h>
#include <unistd.h>
#include <wayland-server.h>

static struct {
	int socket;
	struct wl_event_source *source;
	uint32_t next_serial;
} launch;

static bool
handle_event(struct swc_launch_event *event)
{
	switch (event->type) {
	case SWC_LAUNCH_EVENT_ACTIVATE:
		swc_activate();
		break;
	case SWC_LAUNCH_EVENT_DEACTIVATE:
		swc_deactivate();
		break;
	default:
		return false;
	}

	return true;
}

static int
handle_data(int fd, uint32_t mask, void *data)
{
	struct swc_launch_event event;
	struct iovec iov[1] = {
		{.iov_base = &event, .iov_len = sizeof(event)},
	};

	if (receive_fd(fd, NULL, iov, 1) != -1)
		handle_event(&event);
	return 1;
}

bool
launch_initialize(void)
{
	char *socket_string, *end;

	if (!(socket_string = getenv(SWC_LAUNCH_SOCKET_ENV)))
		return false;

	launch.socket = strtol(socket_string, &end, 10);
	if (*end != '\0')
		return false;

	unsetenv(SWC_LAUNCH_SOCKET_ENV);
	if (fcntl(launch.socket, F_SETFD, FD_CLOEXEC) < 0)
		return false;

	launch.source = wl_event_loop_add_fd(swc.event_loop, launch.socket, WL_EVENT_READABLE, &handle_data, NULL);
	if (!launch.source)
		return false;

	return true;
}

void
launch_finalize(void)
{
	wl_event_source_remove(launch.source);
	close(launch.socket);
}

static bool
send_request(struct swc_launch_request *request, const void *data, size_t size, struct swc_launch_event *event, int out_fd, int *in_fd)
{
	struct iovec request_iov[2] = {
		{.iov_base = request, .iov_len = sizeof(*request)},
		{.iov_base = (void *)data, .iov_len = size},
	};
	struct iovec response_iov[1] = {
		{.iov_base = event, .iov_len = sizeof(*event)},
	};

	request->serial = ++launch.next_serial;

	if (send_fd(launch.socket, out_fd, request_iov, 1 + (size > 0)) == -1)
		return false;

	while (receive_fd(launch.socket, in_fd, response_iov, 1) != -1) {
		if (event->type == SWC_LAUNCH_EVENT_RESPONSE && event->serial == request->serial)
			return true;
		handle_event(event);
	}

	return false;
}

int
launch_open_device(const char *path, int flags)
{
	struct swc_launch_request request;
	struct swc_launch_event response;
	int fd;

	request.type = SWC_LAUNCH_REQUEST_OPEN_DEVICE;
	request.flags = flags;

	if (!send_request(&request, path, strlen(path) + 1, &response, -1, &fd))
		return -1;

	return fd;
}

bool
launch_activate_vt(unsigned vt)
{
	struct swc_launch_request request;
	struct swc_launch_event response;

	request.type = SWC_LAUNCH_REQUEST_ACTIVATE_VT;
	request.vt = vt;

	if (!send_request(&request, NULL, 0, &response, -1, NULL))
		return false;

	return response.success;
}


text:
/*global define*/
define(function(require) {
    'use strict';

    var EmailNotificationCollectionView;
    var $ = require('jquery');
    var _ = require('underscore');
    var __ = require('orotranslation/js/translator');
    var mediator = require('oroui/js/mediator');
    var routing = require('routing');
    var emailsGridRouteBuilder = require('oroemail/js/util/emails-grid-route-builder');
    var EmailNotificationView = require('./email-notification-item-view');
    var BaseCollectionView = require('oroui/js/app/views/base/collection-view');
    var messenger = require('oroui/js/messenger');
    var LoadingMask = require('oroui/js/app/views/loading-mask-view');

    EmailNotificationCollectionView = BaseCollectionView.extend({
        template: require('tpl!oroemail/templates/email-notification/email-notification-collection-view.html'),
        itemView: EmailNotificationView,
        animationDuration: 0,
        listSelector: '.items',
        countNewEmail: 0,
        folderId: 0,
        hasMarkAllButton: true,
        hasMarkVisibleButton: false,
        loadingMask: null,
        /**
         * Id of default action
         *  1 - reply all
         *  2 - reply
         *  3 - forward
         */
        defaultActionId: 1,

        listen: {
            'change:seen collection': 'onSeenStatusChange',
            'reset collection': 'onResetCollection',
            'request collection': 'onCollectionRequest',
            'sync collection': 'onCollectionSync',
            'layout:reposition mediator': 'adjustMaxHeight'
        },

        events: {
            'click': 'onClickIconEnvelope',
            'click button.mark-as-read': 'onClickMarkAsRead',
            'click button.mark-visible-as-read': 'onClickMarkVisibleAsRead'
        },

        initialize: function(options) {
            EmailNotificationCollectionView.__super__.initialize.call(this, options);
            _.extend(this, _.pick(options, ['folderId', 'hasMarkAllButton', 'hasMarkVisibleButton']));
            this.countNewEmail = parseInt(options.countNewEmail);
            if (options.defaultActionId) {
                this.defaultActionId = parseInt(options.defaultActionId);
            }
        },

        render: function() {
            EmailNotificationCollectionView.__super__.render.call(this);
            this.updateViewMode();
            _.defer(_.bind(this.adjustMaxHeight, this));
        },

        getTemplateData: function() {
            var data = EmailNotificationCollectionView.__super__.getTemplateData.call(this);
            var visibleUnreadEmails = this.collection.filter(function(item) {
                return item.get('seen') === false;
            }).length;
            _.extend(data, _.pick(this, [
                'defaultActionId',
                'countNewEmail',
                'folderId',
                'hasMarkAllButton',
                'hasMarkVisibleButton']));
            data.userEmailsUrl = emailsGridRouteBuilder.generate(this.folderId);
            data.moreUnreadEmails = Math.max(this.countNewEmail - visibleUnreadEmails, 0);
            return data;
        },

        updateViewMode: function() {
            if (!this.isActiveTypeDropDown('notification')) {
                var $iconEnvelope = this.$el.find('.oro-dropdown-toggle .icon-envelope');
                if (this.collection.models.length === 0) {
                    this.setModeDropDownMenu('empty');
                    $iconEnvelope.removeClass('highlight');
                } else {
                    this.setModeDropDownMenu('content');
                    if (this.countNewEmail > 0) {
                        $iconEnvelope.addClass('highlight');
                    } else {
                        $iconEnvelope.removeClass('highlight');
                    }
                }
            }
        },

        adjustMaxHeight: function() {
            var rect;
            var contentRect;
            var maxHeight;
            var $list;
            if (this.el) {
                maxHeight = parseInt(this.$el.css('max-height'));
                $list = this.$list;
                if ($list.length === 1 && !isNaN(maxHeight)) {
                    rect = this.$el[0].getBoundingClientRect();
                    contentRect = $list.parent()[0].getBoundingClientRect();
                    $list.css('max-height', rect.top + maxHeight + $list.height() - contentRect.bottom + 'px');
                }
            }
        },

        _markAsRead: function(ids) {
            $.ajax({
                url: routing.generate('oro_email_mark_all_as_seen', ids),
                success: _.bind(function(response) {
                    this.collection.markAllAsRead();
                    this.collection.unreadEmailsCount = 0;
                    this.countNewEmail = 0;
                    this.render();
                    if (response.successful) {
                        mediator.trigger('datagrid:doRefresh:user-email-grid');
                    }
                }, this),
                error: function(model, response) {
                    messenger.showErrorMessage(__('oro.email.error.mark_as_read'), response.responseJSON || {});
                }
            });
        },

        onClickMarkVisibleAsRead: function() {
            var ids = [];
            this.collection.each(function(email) {
                if (email.get('seen') === false) {
                    ids.push(email.get('id'));
                }
            });
            this._markAsRead({'ids': ids});
        },

        onClickMarkAsRead: function() {
            this._markAsRead({});
        },

        onSeenStatusChange: function(model, isSeen) {
            if (isSeen && this.countNewEmail > 0) {
                this.countNewEmail--;
            } else {
                this.countNewEmail++;
            }
        },

        resetModeDropDownMenu: function() {
            this.$el.find('.dropdown-menu').removeClass('content empty notification');

            return this;
        },

        setModeDropDownMenu: function(type) {
            this.resetModeDropDownMenu();
            this.$el.find('.dropdown-menu').addClass(type);
        },

        isActiveTypeDropDown: function(type) {
            return this.$el.find('.dropdown-menu').hasClass(type);
        },

        onResetCollection: function() {
            this.collection.unreadEmailsCount = 0;
        },

        onClickIconEnvelope: function() {
            if (this.isActiveTypeDropDown('notification')) {
                this.open();
                this.setModeDropDownMenu('content');
            }
            this.updateViewMode();
        },

        isOpen: function() {
            this.$el.hasClass('open');
        },

        close: function() {
            this.$el.removeClass('open');
        },

        open: function() {
            this.$el.addClass('open');
        },

        onCollectionRequest: function() {
            if (this.loadingMask) {
                this.loadingMask.hide();
                this.loadingMask.dispose();
            }
            this.loadingMask = new LoadingMask({
                container: this.$('.content')
            });
            this.loadingMask.show();
        },

        onCollectionSync: function() {
            if (this.loadingMask) {
                this.loadingMask.hide();
                this.loadingMask.dispose();
                this.loadingMask = null;
            }
            this.render();
        },

        dispose: function() {
            if (this.loadingMask) {
                this.loadingMask.hide();
                this.loadingMask.dispose();
                this.loadingMask = null;
            }
            EmailNotificationCollectionView.__super__.dispose.call(this);
        }
    });

    return EmailNotificationCollectionView;
});


text:
package com.alexstyl.specialdates.person;

import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.alexstyl.specialdates.R;
import com.novoda.notils.caster.Views;

import java.util.ArrayList;
import java.util.List;

public class ContactActionsAdapter extends RecyclerView.Adapter<CallViewHolder> {

    private final List<ContactActionViewModel> viewModels = new ArrayList<>();
    private final EventPressedListener listener;

    ContactActionsAdapter(EventPressedListener listener) {
        this.listener = listener;
    }

    @Override
    public CallViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_person_action, parent, false);
        TextView callTypeView = Views.findById(view, R.id.row_person_action_type);
        TextView numberView = Views.findById(view, R.id.row_person_call_number);
        ImageView iconView = Views.findById(view, R.id.row_person_call_icon);
        return new CallViewHolder(view, callTypeView, numberView, iconView);
    }

    @Override
    public void onBindViewHolder(CallViewHolder holder, int position) {
        holder.bind(viewModels.get(position), listener);
    }

    @Override
    public int getItemCount() {
        return viewModels.size();
    }

    public void displayCallMethods(List<ContactActionViewModel> viewModels) {
        this.viewModels.clear();
        this.viewModels.addAll(viewModels);
        notifyItemRangeChanged(0, viewModels.size());
    }
}


text:
<?php

namespace Drupal\Tests\forum\Functional;

use Drupal\comment\CommentInterface;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\node\Entity\NodeType;
use Drupal\comment\Entity\Comment;
use Drupal\taxonomy\Entity\Term;
use Drupal\Tests\BrowserTestBase;

/**
 * Tests forum module uninstallation.
 *
 * @group forum
 */
class ForumUninstallTest extends BrowserTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = ['forum'];

  /**
   * Tests if forum module uninstallation properly deletes the field.
   */
  public function testForumUninstallWithField() {
    $this->drupalLogin($this->drupalCreateUser(['administer taxonomy', 'administer nodes', 'administer modules', 'delete any forum content', 'administer content types']));
    // Ensure that the field exists before uninstallation.
    $field_storage = FieldStorageConfig::loadByName('node', 'taxonomy_forums');
    $this->assertNotNull($field_storage, 'The taxonomy_forums field storage exists.');

    // Create a taxonomy term.
    $term = Term::create([
      'name' => t('A term'),
      'langcode' => \Drupal::languageManager()->getDefaultLanguage()->getId(),
      'description' => '',
      'parent' => [0],
      'vid' => 'forums',
      'forum_container' => 0,
    ]);
    $term->save();

    // Create a forum node.
    $node = $this->drupalCreateNode([
      'title' => 'A forum post',
      'type' => 'forum',
      'taxonomy_forums' => [['target_id' => $term->id()]],
    ]);

    // Create at least one comment against the forum node.
    $comment = Comment::create([
      'entity_id' => $node->nid->value,
      'entity_type' => 'node',
      'field_name' => 'comment_forum',
      'pid' => 0,
      'uid' => 0,
      'status' => CommentInterface::PUBLISHED,
      'subject' => $this->randomMachineName(),
      'hostname' => '127.0.0.1',
    ]);
    $comment->save();

    // Attempt to uninstall forum.
    $this->drupalGet('admin/modules/uninstall');
    // Assert forum is required.
    $this->assertSession()->fieldDisabled('uninstall[forum]');
    $this->assertText('To uninstall Forum, first delete all Forum content');

    // Delete the node.
    $this->drupalPostForm('node/' . $node->id() . '/delete', [], t('Delete'));

    // Attempt to uninstall forum.
    $this->drupalGet('admin/modules/uninstall');
    // Assert forum is still required.
    $this->assertSession()->fieldDisabled('uninstall[forum]');
    $this->assertText('To uninstall Forum, first delete all Forums terms');

    // Delete any forum terms.
    $vid = $this->config('forum.settings')->get('vocabulary');
    $terms = entity_load_multiple_by_properties('taxonomy_term', ['vid' => $vid]);
    foreach ($terms as $term) {
      $term->delete();
    }

    // Ensure that the forum node type can not be deleted.
    $this->drupalGet('admin/structure/types/manage/forum');
    $this->assertNoLink(t('Delete'));

    // Now attempt to uninstall forum.
    $this->drupalGet('admin/modules/uninstall');
    // Assert forum is no longer required.
    $this->assertFieldByName('uninstall[forum]');
    $this->drupalPostForm('admin/modules/uninstall', [
      'uninstall[forum]' => 1,
    ], t('Uninstall'));
    $this->drupalPostForm(NULL, [], t('Uninstall'));

    // Check that the field is now deleted.
    $field_storage = FieldStorageConfig::loadByName('node', 'taxonomy_forums');
    $this->assertNull($field_storage, 'The taxonomy_forums field storage has been deleted.');

    // Check that a node type with a machine name of forum can be created after
    // uninstalling the forum module and the node type is not locked.
    $edit = [
      'name' => 'Forum',
      'title_label' => 'title for forum',
      'type' => 'forum',
    ];
    $this->drupalPostForm('admin/structure/types/add', $edit, t('Save content type'));
    $this->assertTrue((bool) NodeType::load('forum'), 'Node type with machine forum created.');
    $this->drupalGet('admin/structure/types/manage/forum');
    $this->clickLink(t('Delete'));
    $this->drupalPostForm(NULL, [], t('Delete'));
    $this->assertResponse(200);
    $this->assertFalse((bool) NodeType::load('forum'), 'Node type with machine forum deleted.');

    // Double check everything by reinstalling the forum module again.
    $this->drupalPostForm('admin/modules', ['modules[forum][enable]' => 1], 'Install');
    $this->assertText('Module Forum has been enabled.');
  }

  /**
   * Tests uninstallation if the field storage has been deleted beforehand.
   */
  public function testForumUninstallWithoutFieldStorage() {
    // Manually delete the taxonomy_forums field before module uninstallation.
    $field_storage = FieldStorageConfig::loadByName('node', 'taxonomy_forums');
    $this->assertNotNull($field_storage, 'The taxonomy_forums field storage exists.');
    $field_storage->delete();

    // Check that the field is now deleted.
    $field_storage = FieldStorageConfig::loadByName('node', 'taxonomy_forums');
    $this->assertNull($field_storage, 'The taxonomy_forums field storage has been deleted.');

    // Delete all terms in the Forums vocabulary. Uninstalling the forum module
    // will fail unless this is done.
    $terms = entity_load_multiple_by_properties('taxonomy_term', ['vid' => 'forums']);
    foreach ($terms as $term) {
      $term->delete();
    }

    // Ensure that uninstallation succeeds even if the field has already been
    // deleted manually beforehand.
    $this->container->get('module_installer')->uninstall(['forum']);
  }

}


text:
.include "../../../share/mk/top.mk"

# predicates
SRC += src/libfsm/pred/isany.c
SRC += src/libfsm/pred/isdfa.c
SRC += src/libfsm/pred/isend.c
SRC += src/libfsm/pred/iscomplete.c
SRC += src/libfsm/pred/epsilonsonly.c
SRC += src/libfsm/pred/hasincoming.c
SRC += src/libfsm/pred/hasoutgoing.c
SRC += src/libfsm/pred/hasepsilons.c
SRC += src/libfsm/pred/hasnondeterminism.c

.for src in ${SRC:Msrc/libfsm/pred/*.c}
${BUILD}/lib/libfsm.o:    ${BUILD}/${src:R}.o
${BUILD}/lib/libfsm.opic: ${BUILD}/${src:R}.opic
.endfor


text:
package com.douglaswhitehead.datalayer;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.mobile.device.Device;
import org.springframework.ui.Model;

import com.douglaswhitehead.model.Product;
import com.douglaswhitehead.model.ShoppingCart;
import com.douglaswhitehead.model.User;
import com.douglaswhitehead.model.digitaldata.DigitalData;

public interface ProductsDataLayer {

	public DigitalData list(List<Product> products, HttpServletRequest request, HttpServletResponse response,
			Device device, Model model, ShoppingCart cart, User user);

	public DigitalData listByCategory(String category, List<Product> products, HttpServletRequest request,
			HttpServletResponse response, Device device, Model model, ShoppingCart cart, User user);

	public DigitalData get(Product product, HttpServletRequest request, HttpServletResponse response,
			Device device, Model model, ShoppingCart cart, User user);

}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2016 Adam Speakman
  ~
  ~ 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.
  -->

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:bind="http://schemas.android.com/apk/res-auto"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <data>
        <variable name="earthquakeModel" type="speakman.whatsshakingnz.ui.viewmodel.EarthquakeOverviewViewModel"/>
        <variable name="earthquakeDetail" type="speakman.whatsshakingnz.ui.viewmodel.EarthquakeExpandedDetailViewModel"/>
    </data>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <RelativeLayout
            android:id="@+id/expandable_detail_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:animateLayoutChanges="true"
            android:foreground="?attr/selectableItemBackground"
            android:clickable="true">
            <include
                layout="@layout/view_earthquake_detail_small"
                android:id="@+id/expandable_detail_summary"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:layout_height="@dimen/detail_card_height"
                android:layout_width="0dp"
                android:layout_alignRight="@+id/expandable_detail_indicator"
                android:layout_alignWithParentIfMissing="true"
                bind:earthquakeModel="@{earthquakeModel}" />
            <ImageView
                android:padding="8dp"
                android:id="@id/expandable_detail_indicator"
                android:layout_alignParentRight="true"
                android:layout_alignBottom="@id/expandable_detail_summary"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:contentDescription="@string/acc_detail_card_detail_indicator"
                app:srcCompat="@drawable/dots_horizontal"/>
            <TextView
                android:id="@+id/expandable_detail_text"
                android:padding="8dp"
                android:visibility="gone"
                android:text="@{earthquakeDetail.detail}"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_below="@id/expandable_detail_summary"
                android:layout_alignParentBottom="true"/>
        </RelativeLayout>
    </ScrollView>
</layout>


text:
<!DOCTYPE html>

		<title>GiftCards.com - Schedule - Coding Assessment - Front End Developers</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
		<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
		<link href="css/layout.css" rel="stylesheet">

Home

Contact Us

Sponsors

Statistics

Team

Contact Us

						<form class="well form-horizontal">

								First Name

									<input type="text" name="first-name" id="firstName" class="span3" />

								Last Name

									<input type="text" name="last-name" id="lastName" class="span3" />

								Address

									<input type="text" name="address" id="address" class="span3" />

								Address Line 2

									<input type="text" name="addressL2" id="addressL2" class="span3" />

								City

									<input type="text" name="city" id="city" class="span3">

								State

									<input type="text" name="state" id="state" class="span3">

								Zip Code

									<input type="text" name="zip" id="zip" class="span3">

								E-Mail Address

									<input type="text" name="email" id="email" class="span3">

								Comments

									<textarea rows="5" class="input-xlarge" id="comments" name="comments"></textarea>

								<button type="submit" class="btn btn-primary">Send Information</button>
								<button class="btn">Cancel</button>

						</form>

Home

Contact Us

Sponsors

Statistics

Team

								Pittsburgh Grizzlies

								Console Energy Center

								1001 Fifth Avenue,

								Pittsburgh, PA 15219

								412.642.1800

								info@pghgrizzlies.com


text:
package at.lukle.timetracker.repository;

import at.lukle.timetracker.domain.Project;

import org.springframework.data.jpa.repository.*;

import java.util.List;

/**
 * Spring Data JPA repository for the Project entity.
 */
@SuppressWarnings("unused")
public interface ProjectRepository extends JpaRepository<Project,Long> {

}


text:
using NUnit.Framework;
using winsw;
using winswTests.Util;

namespace winswTests
{
    [TestFixture]
    class MainTest
    {

        [Test]
        public void PrintVersion()
        {
            string expectedVersion = WrapperService.Version.ToString();
            string cliOut = CLITestHelper.CLITest(new[] { "version" });
            StringAssert.Contains(expectedVersion, cliOut, "Expected that version contains " + expectedVersion);
        }

        [Test]
        public void PrintHelp()
        {
            string expectedVersion = WrapperService.Version.ToString();
            string cliOut = CLITestHelper.CLITest(new[] { "help" });

            StringAssert.Contains(expectedVersion, cliOut, "Expected that help contains " + expectedVersion);
            StringAssert.Contains("start", cliOut, "Expected that help refers start command");
            StringAssert.Contains("help", cliOut, "Expected that help refers help command");
            StringAssert.Contains("version", cliOut, "Expected that help refers version command");
            //TODO: check all commands after the migration of ccommands to enum

            // Extra options
            StringAssert.Contains("/redirect", cliOut, "Expected that help message refers the redirect message");
        }

        [Test]
        public void FailOnUnsupportedCommand()
        {
            const string commandName = "nonExistentCommand";
            string expectedMessage = "Unknown command: " + commandName.ToLower();
            CLITestResult res = CLITestHelper.CLIErrorTest(new[] {commandName});

            Assert.True(res.HasException, "Expected an exception due to the wrong command");
            StringAssert.Contains(expectedMessage, res.Out, "Expected the message about unknown command");
            // ReSharper disable once PossibleNullReferenceException
            StringAssert.Contains(expectedMessage, res.Exception.Message, "Expected the message about unknown command");
        }

        /// <summary>
        /// https://github.com/kohsuke/winsw/issues/206
        /// </summary>
        [Test]
        public void ShouldNotPrintLogsForStatusCommand()
        {
            string cliOut = CLITestHelper.CLITest(new[] { "status" });
            StringAssert.AreEqualIgnoringCase("NonExistent\r\n", cliOut);
        }
    }
}


text: Small code snippets in Rust


text:
package command

import (
	"github.com/marcelfw/mgit/repository"
)

type cmdVersion struct {
}

func NewVersionCommand() cmdVersion {
	var cmd cmdVersion

	return cmd
}

func (cmd cmdVersion) Usage() string {
	return "Show current version."
}

func (cmd cmdVersion) Help() string {
	return "Show current version."
}

func (cmd cmdVersion) Init(args []string, interactive bool) (outCmd repository.Command) {
	return nil
}

func (cmd cmdVersion) Output(commands map[string]repository.Command, version string) string {
	return "mgit version " + version
}


text:
layout: post
title: Hello, World
---

Nothing yet


text:
@interface MCSectionViewController : MCViewController{
  // The following two variables didViewLoad and showThisView should only be used by MCMainViewController
  // to load the VIEW_*** for SECTION_***. Two cases:
  //
  // 1.  The first time the view is loaded, the IBOutlets from the nib
  //     file aren't loaded yet. viewDidLoad is a deferred load after the IBOutlets are assigned.
  //     Then, we are able to show the VIEW_***.
  //
  // 2.  onResume will check to see if the view has been loaded before, in which case the view can be
  //     loaded immediately and we know that viewDidLoad won't be called again. showThisView will
  //     be unassigned immediately after onResume.
  //

}

@property(nonatomic, retain) IBOutlet UIView* innerView;
@property(nonatomic, retain) MCViewController* currentViewVC;

@end


text:
angular
    .module('mediasModule')
    .controller('MediasController', function($scope, $http, $rootScope, $window, mediasService, DTOptionsBuilder) {

        $rootScope.pageActive = "medias";

        $scope.list = [];

        $scope.listeMedia = ["CD", "Livre", "DVD"];

        var myUrl = 'http://192.168.10.12:8090/resource/media.recherche';
        $http.get(myUrl).then(function(response) {
            $scope.list = response.data;
            //	console.log(response.data);
            //	console.list( "scopelist", $scope.list)
        }, function(response) {
            console.error('Erreur de chargement des medias');
        });

        //On obtient les medias via l'url
        mediasService.getMedias().then(function(param) {
            $scope.list = param;
        });

        /**/ //ajoute une option 'rowCallback'
        $scope.dtOptions = DTOptionsBuilder.newOptions().withOption('rowCallback', rowCallback);

        /**/ //permet d'acceder à la fiche de la ligne correspondante
        function rowCallback(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
            // Unbind first in order to avoid any duplicate handler (see https://github.com/l-lin/angular-datatables/issues/87)
            $('td', nRow).unbind('click');
            $('td', nRow).bind('click', function() {
                $scope.$apply(function() {
                    console.log("Redirection");
                    console.log(aData);
                    $window.location.href = '#/ficheMedias/' + aData[0];
                });
            });
            return nRow;
        }

        $scope.mediasModule = [];
        $scope.listeMedia = ["CD", "Livre", "DVD"];

        $scope.ajout = function() {

            console.log("test fiche medias", $scope.type);

            var UrlCreation = 'http://192.168.10.12:8090/resource/media.creation';
            $http.post(UrlCreation, {
                titre: $scope.titre,
                type: $scope.type,
                auteur: $scope.auteur
            }).then(function(response) {

                console.log("OK fiche media creation!!!!!");
            }, function(response) {
                //						console.log($scope.type);
                //						console.log($scope.auteur);
                //						console.log($scope.titre);
                console.error('Erreur de connexion lors de la création d\'un media', response);
                $http.defaults.headers.common.authorization = 'Basic ';
            });
        }

    });


text:
 ComposeSMS

            <?=set_breadcrumb();?>

			<?php if ($this->session->flashdata('v')!=null){ ?>

				<button type="button" class="close" data-dismiss="alert">×Close</button>
				<?=$this->session->flashdata('v');?>

			<?php } else if ($this->session->flashdata('x')!=null){ ?>

				<button type="button" class="close" data-dismiss="alert">×Close</button>
				<?=$this->session->flashdata('x');?>

			<?php }
			echo form_open(base_url('Organizer/SmsBroadcast/sendsms'),array('name'=>'fmail', 'method'=>'POST','class'=>'form-inline'));
			($sender=='') ? print('
You need to configure the SMS Account (WebSms) through bottom box.
'):null;
			?>
		    <div class="box-body <?php ($sender!='') ? print('visible'):print('hidden'); ?>">

						  Total Credit
						   <?=$smscredit;?>

1 Credit = 1 SMS

 Press the "Refresh Credit"
 to update the credit.

							<button class="btn btn-block btn-info btn-lg" id="refreshcredit" type="button"> Refresh Credit</button>

						  Expiration Date
						  <?=$expdate;?>

Expired, Credit = 0

							<?=$metadata;?>

Special Code

{honor}

: Mr./Ms.

{name}

: Full Name

{NIM}

: NIM

{faculty}

: Faculty

{period}

: Period

{email}

: Email

{phone}

: Phone Number

{level}

: Level (if any)

{payment}

: Payment Status

{birthdate}

: Birthdate

							Note: Put the code in SMS Content and it will change into each spesific detail of SMS Recipient.
e.g: {name} will send as "Bill Gates"

SMS Content:

							<?=$editor;?>

									Use Template

 <?=$opttmp;?>

								Total Credit will be used <?=$countercredit;?> Total Characters left <?=$counterchar;?> Total SMS <?=$countersms;?>

Footer Usage

									  <?=$usefoo;?>

									Use Footer

									Toogle Footer

										Footer SMS :
										<?=$footer;?>
										<?=$codefooter;?>

						<button type="reset" id="res" class="btn btn-danger btn-lg">Reset</button>

					  <?=$fusersto.$listto.$nameto.$redi.$inred;?>

					  <?=$inbtn;?>

			<?php
			echo form_close();
			?>

			<?php echo form_open($furlsave,array('name'=>'fsetting', 'method'=>'POST','class'=>'form-horizontal'));?>
			<fieldset class="scheduler-border">
			<legend class="scheduler-border">Setting SMS Account (Zenziva)</legend>

 Account Details (Zenziva)

User Key:  <?=$accuser;?>

Pass Key:

<?=$accpass;?>

Check on SMS API setting on zenziva account, or click here

 Programming Details

SMS URL:  <?=$urlbc;?>

SMS API:  <?=$funcnotif;?>

Credit API:  <?=$funcsaldo;?>

 Link References

Zenziva API reference

Login Zenziva

 Please be advice to change to programming setting, or system will not able to send SMS.

					<?=$btnupdateset;?>

			</fieldset>
			<?=form_close();?>


text:
Thêm Sản Phẩm Mới

		<?php $this->load->view('errors/msg') ?>
		<?php echo form_open_multipart(base_url('sanpham/addsp')); ?>

				<?php echo form_error('sp_name'); ?>

					Tên Sản Phẩm :
					<input type="text" name="sp_name" class="form-control" required placeholder="Nhập Tên Của Sản Phẩm" value="<?php echo set_value('sp_name'); ?>">

				<?php echo form_error('sp_price'); ?>

					Giá Sản Phẩm :
					<input type="number" name="sp_price" class="form-control" required placeholder="Đơn Giá Sản Phẩm" min="0" value="<?php echo set_value('sp_price'); ?>"> VND

				<?php echo form_error('cat_id') ?>

					Danh Mục :
					<select name="cat_id" class="form-control">
					<?php
					foreach ($catlist as $cat) {
						echo '<option value="'.$cat['cat_id'].'"';
						if($cat['cat_id'] == set_value('cat_id')){
							echo "selected";
						}
						echo '>'.$cat['cat_name'].'</option>';
					}
					?>
					</select>

				<?php echo form_error('sp_features') ?>

					Đặc Biệt :
					<select name="sp_features" class="form-control">
						<option value="1" <?php
						 if(set_value('sp_features') == 1) echo "selected";
						  ?>>Mới</option>
						<option value="2" <?php
						if(set_value('sp_features') == 2) echo "selected";
						?>>Khuyến Mại</option>
						<option value="3" <?php
						if(set_value('sp_features') == 3) echo "selected";
						 ?>>Mua Nhiều</option>
						<option value="4" <?php
						if((set_value('sp_features') == null) OR (set_value('sp_features') == 4)  ) echo "selected";
						 ?>>Phổ Biến</option>
					</select>

				<?php echo form_error('sp_quality') ?>

					Số Lượng :
					<input type="number" name="sp_quality" class="form-control" placeholder="Số Lượng Sản Phẩm" min="0" value="<?php echo set_value('sp_quality'); ?>">
					 Sản Phẩm

				<?php echo form_error('sp_title') ?>

					Slug :
					<input type="text" name="sp_title" class="form-control" placeholder="Bỏ Trống nếu để slug mặc định" value="<?php echo set_value('sp_title'); ?>">

				<?php echo form_error('sp_img') ?>

					Ảnh :
					<input type="file" name="sp_img" class="form-control btn btn-info" id="anh"> gif|jpg|png|jpeg

					<img src="<?php echo ResURL('upload/').'defaul.jpg'; ?>" alt="Ảnh Mô Tả" class="img img-rounded img-responsive" height="260" id="img" >

			<?php echo form_error('sp_content') ?>

					<textarea id="editor" name="sp_content"><?php echo set_value('sp_content'); ?></textarea>

			<input type="submit" name="submit" class="form-control btn btn-primary" value="Thêm Sản Phẩm Mới">
		<?php echo form_close(); ?>


text:
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>

Photo Details

            Uploading time now...

                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>


text:
import * as React from 'react';
import Tabs from '@material-ui/core/Tabs';
import Tab from '@material-ui/core/Tab';
import Box from '@material-ui/core/Box';

export default function AccessibleTabs1() {
  const [value, setValue] = React.useState(0);
  const handleChange = (event: React.SyntheticEvent, newValue: number) => {
    setValue(newValue);
  };

  return (
    <Box sx={{ width: '100%' }}>
      <Tabs
        onChange={handleChange}
        value={value}
        aria-label="Tabs where selection follows focus"
        selectionFollowsFocus
      >
        <Tab label="Item One" />
        <Tab label="Item Two" />
        <Tab label="Item Three" />
      </Tabs>
    </Box>
  );
}


text:
//
//  UISegmentedControl+DDKit.h
//  DDCategory
//
//  Created by DeJohn Dong on 15-3-20.
//  Copyright (c) 2015年 DDKit. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UISegmentedControl (DDKit)

@end

@interface UISegmentedControl (DDFlatten)

#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED <= 60000)

/**
 *  iOS6中使用UISegmentedControl 扁平化
 */
- (void)dd_flattenIniOS6;

/**
 *  iOS6中使用UISegmentedControl 扁平化 设置选中颜色
 *
 *  @param selectedColor 选中颜色
 */
- (void)dd_flattenIniOS6:(UIColor *)selectedColor;

#endif

@end


text:
package com.github.werpu.scalaelresolver.probes

class Bean2 {
    var hello2 = "hello from bean2"
    val hello3 = "hello from bean2-3"
}


text:
from setuptools import setup, Distribution, find_packages

class BinaryDistribution(Distribution):
	def is_pure(self):
		return False

setup(	name='mozart', version='0.0',
		description='PDE Solver Package',
		url='https://github.com/yoon-gu/mozart-pub/',
		author='Yoon-gu Hwang',
		author_email='yz0624@gmail.com',
		license='MIT',
		packages=find_packages(),
		install_requires=[
			'scipy',
			'numpy',
		],
		package_data={
			'' : ['*.so', 'samples/*/*.bin']
		},
		include_package_data=True,
		distclass=BinaryDistribution,
		zip_safe=False)


text:
import makedirs
import preferences
import translators
import submodules
import months
import kuroshiro
import item
import jieba
import babel
import scannablecite


text:
project( "gucefLOADER_TestApp" )

configuration( {} )
  location( os.getenv( "PM4OUTPUTDIR" ) )

configuration( {} )
  targetdir( os.getenv( "PM4TARGETDIR" ) )

configuration( {} )
language( "C++" )

configuration( { "WIN32" } )

configuration( { WIN32 } )
kind( "WindowedApp" )
configuration( { "NOT WIN32" } )

configuration( {} )
kind( "ConsoleApp" )

configuration( {} )
links( { "gucefLOADER" } )
links( { "gucefLOADER" } )

configuration( {} )
vpaths { ["Source"] = { "**.c", "**.cpp", "**.cs", "**.asm" } }
files( {
  "src/gucefLOADER_TestApp.cpp"
 } )

configuration( {} )
includedirs( { "../../common/include", "../../gucefCORE/include", "../../gucefCORE/include/", "../../gucefLOADER/include", "../../gucefMT/include" } )

configuration( { "ANDROID" } )
includedirs( { "../../gucefCORE/include/", "../../gucefCORE/include/android" } )

configuration( { "GLX" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "GTK" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "IPHONEOS" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "LINUX" } )
includedirs( { "../../gucefCORE/include/", "../../gucefCORE/include/linux" } )

configuration( { "OSX" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "SDL" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "SYMBIAN" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "UNIX" } )
includedirs( { "../../gucefCORE/include/" } )

configuration( { "WIN32" } )
includedirs( { "../../gucefCORE/include/", "../../gucefCORE/include/mswin" } )

configuration( { "WIN64" } )
includedirs( { "../../gucefCORE/include/", "../../gucefCORE/include/mswin" } )


text:
using System;

namespace KeySndr.Base.Domain
{
    public class AssemblyInfo
    {
        public static Version GetAssemblyVersion(Type a)
        {
            var reference = a.Assembly;
            return reference.GetName().Version;
        }
    }
}


text:
from fabric.api import env, execute, get, put, task, run, local, roles
import platform

env.roledefs = {
    'local': ['127.0.0.1'],
}

@task
def run_datasync():
    datasync_image = "guilhermebr/datasync"
    datasync_params = "--name datasync"

    try:
        docker_restart('datasync', True)
    except:
        docker_run("-dti " + datasync_params + " " + datasync_image, True)

@task
def run_cassandra():
    cassandra_image = "spotify/cassandra"
    cassandra_params = "--name cassandra -p 7199:7199 -p 9160:9160 -p 9042:9042"

    try:
        docker_restart('cassandra', True)
    except:
        docker_run("-dti " + cassandra_params + " " + cassandra_image, True)

@task
def run_elastic():
    es_image = "elasticsearch"
    es_params = "--name elasticsearch -p 9200:9200 -p 9300:9300"

    try:
        docker_restart('elasticsearch', True)
    except:
        docker_run("-dti " + es_params + " " + es_image, True)

@task
def init_cassandra():
    with docker_exec('cassandra', True):
        run('cqlsh')
        local("create keyspace example with replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };")
        local('create table example.tweet(timeline text, id UUID, text text, PRIMARY KEY(id));')
        local('create index on example.tweet(timeline);')
        local('exit')

#
# def prepare_docker():
#     if platform.system() == "Darwin"
#

# Docker Commands
def docker(cmd, is_local=False):
    if is_local:
        return local("docker %s" % cmd)
    return run("docker %s" % cmd)

def docker_start(container, local=None):
    return docker("start %s" % container, local)

def docker_stop(container, local=None):
    return docker("kill %s" % container, local)

def docker_clean(container, local=None):
    docker_stop(container)
    return docker("rm %s" % container, local)

def docker_restart(container, local=None):
    docker_stop(container, local)
    docker_start(container, local)

def docker_pull(image, local=None):
    return docker("pull %s" % image, local)

def docker_run(command, local=None):
    return docker("run %s" % command, local)

def docker_build(container, name, local=None):
    return docker("build -t %s %s " % (name, container), local)

def docker_exec(container, local=None):
    docker('exec -ti %s bash' % container, local)


text:
/*
 * UnixWiFi.cpp
 *
 *  Created on: Jul 7, 2017
 *      Author: chris.l
 */

#include "UnixWiFi.h"
#include <netinet/in.h>
#include <netdb.h>

UnixWiFi::UnixWiFi()
{
    // TODO Auto-generated constructor stub

}

int UnixWiFi::hostByName(const char* aHostname, IPAddress& aResult)
{
    struct hostent *server;      // Server data structure.
    server = gethostbyname( aHostname ); // Convert URL to IP.
    if (server == NULL)
    {
        return 0;
    }
    aResult = server->h_addr_list[0];
    return 1;
}
UnixWiFi WiFi;


text:
This document contains models and steps to reproduce the results of [TableFormer: Robust Transformer Modeling for Table-Text Encoding](https://arxiv.org/abs/2203.00274) published at ACL 2022.

## TableFormer Model

TableFormer encodes the general table structure along with the associated text
by introducing task-independent relative attention biases for table-text
encoding to facilitate the following:

 * structural inductive bias for better table understanding and table-text
alignment,
 * robustness to table row/column perturbation.

TableFormer is:
 * strictly invariant to row and column orders, and,
 * could understand tables better due to its tabular inductive biases.

Our evaluations show that TableFormer outperforms strong baselines in all
settings on SQA, WTQ and TABFACT table reasoning datasets, and achieves
state-of-the-art performance on SQA, especially when facing answer-invariant
row and column order perturbations (6% improvement over the best baseline),
because previous SOTA models' performance drops by 4% - 6% when facing such
perturbations while TableFormer is not affected.

## Using TableFormer

Using TableFormer for pre-training and fine-tuning can be acomplished through
the following configuration flags in `tapas_pretraining_experiment.py` and
`tapas_classifier_experiment.py`, respectively:

 * `--restrict_attention_mode=table_attention` Uses the 13 relative relational
 ids introduced in TableFormer.
 * `--attention_bias_use_relative_scalar_only` Whether to just use a scalar bias
 or an embedding per relative id per head per layer.
 * `--attention_bias_disabled` Which relational id to be disabled. This should
 only be used for ablation studies, otherwise defaults to 0.

## Licence

This code and data are licensed under the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License).\
See also the Wikipedia [Copyrights](https://en.wikipedia.org/wiki/Wikipedia:Copyrights) page.

## How to cite this data and code?

You can cite the [paper](https://arxiv.org/abs/2203.00274) to appear in
ACL 2022.

```
@inproceedings{yang-etal-2022-tableformer,
    title="{TableFormer: Robust Transformer Modeling for Table-Text Encoding}",
    author="Jingfeng Yang and Aditya Gupta and Shyam Upadhyay and Luheng He and Rahul Goel and Shachi Paul",
    booktitle = "Proc. of ACL",
    year = "2022"
}
```


text:
using System;

namespace BizHawk.Emulation.Common
{
	public class MissingFirmwareException : Exception
	{
		public MissingFirmwareException(string message) : base(message)
		{
		}
	}

	/// <summary>
	/// indicates that this core does not support the game, but it may be valid
	/// </summary>
	public class UnsupportedGameException : InvalidOperationException
	{
		public UnsupportedGameException(string message)
			: base(message)
		{
		}
	}

    public class NoAvailableCoreException : Exception
    {
        public NoAvailableCoreException()
            : base("System is currently NOT emulated")
        {
        }

        public NoAvailableCoreException(string message)
            : base ($"System is currently NOT emulated: {message}")
        {

        }
    }

	public class CGBNotSupportedException : Exception
	{
		public CGBNotSupportedException()
			: base("Core does not support CGB only games!")
		{
		}

		public CGBNotSupportedException(string message)
			: base(message)
		{
		}
	}

	public class SavestateSizeMismatchException : InvalidOperationException
	{
		public SavestateSizeMismatchException(string message)
			: base(message)
		{
		}
	}
}


text:
<!--
	NB: Tor users cannot view* this website due to CloudFlare settings.

	See:

		- https://blog.torproject.org/blog/call-arms-helping-internet-services-accept-anonymous-users
		- https://support.cloudflare.com/hc/en-us/articles/203306930-Does-CloudFlare-block-Tor-
		- https://support.cloudflare.com/hc/en-us/articles/200170206-How-do-I-turn-I-m-Under-Attack-mode-on-

	* without enabling javascript, for security and privacy implications see e.g.:

		- https://www.mozilla.org/security/known-vulnerabilities/firefox.html
		- https://trac.torproject.org/projects/tor/query?status=!closed&keywords=~tbb-fingerprinting
		- https://panopticlick.eff.org

	Insecure cookies are set for these domains:

		- .angular-gantt.com

-->
<ruleset name="Angular-Gantt.com">

	<!--	Direct rewrites:
				-->
	<target host="angular-gantt.com" />
	<target host="www.angular-gantt.com" />

	<!--	CloudFlare cookies:
					-->
	<!--securecookie host="^\.angular-gantt\.com$" name="^(__cfduid|cf_clearance)$" /-->

	<securecookie host="." name="." />

	<rule from="^http:"
		to="https:" />

</ruleset>


text:
/**
 * @file ump_kernel_memory_mapping.h
 */

#ifndef __UMP_KERNEL_MEMORY_BACKEND_H__
#define __UMP_KERNEL_MEMORY_BACKEND_H__

#include "ump_kernel_interface.h"
#include "ump_kernel_types.h"

typedef struct ump_memory_allocation {
	void                     *phys_addr;
	void                     *mapping;
	unsigned long             size;
	ump_dd_handle             handle;
	void                     *process_mapping_info;
	u32                       cookie;               /**< necessary on some U/K interface implementations */
	struct ump_session_data *ump_session;           /**< Session that this allocation belongs to */
	_mali_osk_list_t          list;                 /**< List for linking together memory allocations into the session's memory head */
	u32 is_cached;
} ump_memory_allocation;

typedef struct ump_memory_backend {
	int (*allocate)(void *ctx, ump_dd_mem *descriptor);
	void (*release)(void *ctx, ump_dd_mem *descriptor);
	void (*shutdown)(struct ump_memory_backend *backend);
	u32(*stat)(struct ump_memory_backend *backend);
	int (*pre_allocate_physical_check)(void *ctx, u32 size);
	u32(*adjust_to_mali_phys)(void *ctx, u32 cpu_phys);
	void *ctx;
} ump_memory_backend;

ump_memory_backend *ump_memory_backend_create(void);
void ump_memory_backend_destroy(void);

#endif /*__UMP_KERNEL_MEMORY_BACKEND_H__ */


text:
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model frontend\models\PermohonanBimbinganKaunselingPegawaiAnggotaSearch */
/* @var $form yii\widgets\ActiveForm */
?>

    <?php $form = ActiveForm::begin([
        'action' => ['index'],
        'method' => 'get',
    ]); ?>

    <?= $form->field($model, 'permohonan_bimbingan_kaunseling_pegawai_anggota_id') ?>

    <?= $form->field($model, 'nama') ?>

    <?= $form->field($model, 'jawatan') ?>

    <?= $form->field($model, 'no_kad_pengenalan') ?>

    <?= $form->field($model, 'umur') ?>

    <?php // echo $form->field($model, 'no_telefon') ?>

    <?php // echo $form->field($model, 'emel') ?>

    <?php // echo $form->field($model, 'bahagian') ?>

    <?php // echo $form->field($model, 'taraf_perkahwinan') ?>

    <?php // echo $form->field($model, 'status_jawatan') ?>

    <?php // echo $form->field($model, 'jantina') ?>

    <?php // echo $form->field($model, 'tarikh_temujanji') ?>

    <?php // echo $form->field($model, 'kategori_masalah') ?>

    <?php // echo $form->field($model, 'catatan_kaunselor') ?>

    <?php // echo $form->field($model, 'tindakan_kaunselor') ?>

    <?php // echo $form->field($model, 'cadangan_kaunselor') ?>

    <?php // echo $form->field($model, 'tarikh_permohonan') ?>

    <?php // echo $form->field($model, 'status_permohonan') ?>

    <?php // echo $form->field($model, 'catatan_permohonan') ?>

    <?php // echo $form->field($model, 'nama_pegawai_anggota') ?>

    <?php // echo $form->field($model, 'no_kad_pengenalan_pegawai') ?>

    <?php // echo $form->field($model, 'umur_pegawai') ?>

    <?php // echo $form->field($model, 'jawatan_pegawai') ?>

    <?php // echo $form->field($model, 'bahagian_pegawai') ?>

    <?php // echo $form->field($model, 'no_tel_pegawai') ?>

    <?php // echo $form->field($model, 'emel_pegawai') ?>

    <?php // echo $form->field($model, 'taraf_perkahwinan_pegawai') ?>

    <?php // echo $form->field($model, 'status_jawatan_pegawai') ?>

    <?php // echo $form->field($model, 'jantina_pegawai') ?>

    <?php // echo $form->field($model, 'created_by') ?>

    <?php // echo $form->field($model, 'updated_by') ?>

    <?php // echo $form->field($model, 'created') ?>

    <?php // echo $form->field($model, 'updated') ?>

        <?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
        <?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>

    <?php ActiveForm::end(); ?>


text:
var ws = require('ws');
var https = require('https');
var http = require('http');
var express = require('express');
var fs = require('fs');
var path = require('path');
var _ = require('lodash');
var Q = require('q');

var haringGocdMapper = require('./server/haring/gocdMapper');
var miroGocdMapper = require('./server/miro/gocdMapper');
var miroGocdMapperConstellation = require('./server/miro/gocdMapperConstellation');
var configReader = require('./server/ymlHerokuConfig');
var gocdCreator = require('./server/gocdReader');
var environmentReader = require('./server/environmentReader');

function monartServer() {

  var WebSocketServer = ws.Server
    , app = express();

  var UPDATE_INTERVAL = 10000;
  var USES_SSL = false;
  var port = process.env.PORT || 5000;

  var config = configReader.create('gocd').get();

  function createServer() {
    var rootDir = path.resolve(path.dirname(module.uri || "."));
    app.use(express.static(rootDir + '/app/'));

    try {
      var credentials = {
        key: fs.readFileSync('monart-key.pem'),
        cert: fs.readFileSync('monart-cert.pem')
      };
      USES_SSL = true;
      return https.createServer(credentials, app);
    } catch(couldNotReadKeyAndCert) {
      console.log("WARNING - could not use SSL, provide monart-key.pem and monart-cert.pem");
      return http.createServer(app);
    }

  }

  var server = createServer();

  var CACHE_INITIALISED = false;
  var gocd;
  gocdCreator(config).then(function(instance) {
    console.log("GO CD DATA CACHE INITIALISED");
    console.log((USES_SSL ? 'https' : 'http') + ' server listening on %d', port);

    CACHE_INITIALISED = true;
    gocd = instance;

    function createListener(identifier, dataTransformer) {
      return function() {

        var wss = new WebSocketServer({server: server, path: '/' + identifier });
        console.log(identifier +' websocket server created');

        wss.on('connection', function(ws) {
          console.log('connecting to /' + ws.upgradeReq.url);

          function newClient() {

            function getPipelineParameter() {
              var requestedUrl = ws.upgradeReq.url;
              var match = requestedUrl.match(/pipeline=([^&]+)/);
              return match ? match[1] : undefined;
            }

            function getColumnsParameter() {
              var requestedUrl = ws.upgradeReq.url;
              var match = requestedUrl.match(/columns=([^&]+)/);
              return match ? match[1] : undefined;
            }

            var pipelineParameter = getPipelineParameter();
            var pipelines = pipelineParameter ? [pipelineParameter] : gocd.pipelineNames;

            function getActivityAndUpdateClients() {
              var result = {};
              if (CACHE_INITIALISED !== true) {
                result[identifier] = {warmingUp: true};
                ws.send(JSON.stringify(result));
              } else {

                var all = _.map(pipelines, function(pipeline) {
                  return gocd.readData(pipeline);
                });

                Q.all(all).then(function (gocdData) {

                  if(pipelineParameter) {
                    var visualisationData = dataTransformer(gocdData[0], getColumnsParameter());
                    result[identifier] = visualisationData;
                    ws.send(JSON.stringify(result), function () {});
                  } else {
                    result[identifier] = _.map(gocdData, function(data) {
                      var transformedPipelineData = dataTransformer(data, getColumnsParameter());
                      transformedPipelineData.pipeline = data.pipeline;
                      return transformedPipelineData;
                    });
                    ws.send(JSON.stringify(result), function () {});
                  }

                }).fail(function(error) {
                  console.log("COULD NOT READ DATA!", error);
                  ws.send(JSON.stringify({error: error}));
                });
              }
            }

            getActivityAndUpdateClients();
            var clientId = setInterval(getActivityAndUpdateClients, UPDATE_INTERVAL);
            return clientId;
          }

          var clientId = newClient();

          console.log('websocket connection open on /' + identifier);

          ws.on('message', function(msg) {
            if(msg === 'ping') {
              console.log('PING');
              ws.send(JSON.stringify({ping: 'success'}));
            }
          });

          ws.on('close', function() {
            console.log('websocket connection close on /' + identifier);
            clearInterval(clientId);
          });
        });
      }
    }

    /** HARING ************************/

    var listenToHaring = createListener('haring', haringGocdMapper.readHistoryAndActivity);
    listenToHaring();

    /** MIRO BLUE ************************/

    var listenToMiro = createListener('miro', miroGocdMapperConstellation.readHistoryAndActivity);
    listenToMiro();

    var listenToMiroBlue = createListener('miroBlue', miroGocdMapper.readHistoryAndActivity);
    listenToMiroBlue();

  }).done();

  /** ENDPOINTS ************************/

  function readAndRespondWithPromisedData(promise, res) {
    if(CACHE_INITIALISED) {
      promise.then(function (data) {
        respondWithJson(res, data);
      }).done();
    } else {
      res.send('warming up');
    }
  }

  function respondWithJson(response, data) {
    response.set({
      'Content-Type': 'application/json'
    });
    response.send(JSON.stringify(data));
  }

  function readDataBasedOnPipeline(req, res, processor) {
    if(!req.query.pipeline) {
      res.send('ERROR - Please provide pipeline');
    } else {
      return readAndRespondWithPromisedData(gocd.readData(req.query.pipeline).then(function(data) {
        return processor ? processor(data) : data;
      }), res);
    }
  }

  app.get('/alive',
    function(req, res) {
      console.log('life sign');
      res.send('OK');
    });

  app.get('/data/gocd', function(req, res) {
    readDataBasedOnPipeline(req, res);
  });

  app.get('/data/gocd/haring', function(req, res) {
    readDataBasedOnPipeline(req, res, function(data) {
      return haringGocdMapper.readHistoryAndActivity(data);
    });
  });

  app.get('/data/gocd/miro', function(req, res) {
    readDataBasedOnPipeline(req, res, function(data) {
      return miroGocdMapperConstellation.readHistoryAndActivity(data);
    });
  });

  app.get('/data/gocd/miroBlue', function(req, res) {
    readDataBasedOnPipeline(req, res, function(data) {
      return miroGocdMapper.readHistoryAndActivity(data);
    });
  });

  environmentReader.extendServer(app);

  server.listen(port);

}

monartServer();


text:
<TITLE>Review for Bamboozled (2000)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Bamboozled (2000)

reviewed by
Jerry Saravia

Spike Lee's spectacular new film, "Bamboozled," is likely to cause heaps of
protest from audience members, particularly blacks. The idea that minstrel
shows can cause more laughter now than they used to, as long as blacks are
shown to be buffoons and outright caricatures, shows that America may not
have changed much since the days of "Amos n' Andy." And Spike Lee knows it
all too well.

Pierre Delacroix (Damon Wayans) is the only black executive at a New York
cable network that needs to save itself from drastically low ratings. One
day, Delacroix comes up with an outrageous concept - a minstrel show called
"Mantan the New Millenium Minstrel Show." Basically, the show will focus on
two dimwitted, nineteenth century cotton plantation workers ("Alabama porch
monkeys") who joke and dance each week in front of a live studio audience.
Pierre finds his two lucky actors in the form of a homeless dancer (Savion
Glover) as the main character Mantan, and the dancer's friend (Tommy
Davidson) as Sleep N' Eat - these two have been auditioning for Pierre in the
past in front of his office building and now they have the shot at stardom.
When Pierre presents his concept to his white boss, Dunwitty (Michael
Rappaport), the boss becomes overwhelmed with glee. The only one miffed at
the concept is Pierre's workaholic assistant, Sloan Hopkins (Jada Pinkett
Smith).

Naturally, Pierre expects this show to fail miserably (in the real world, it
would not have gone further than the pitch) and, ironically, it becomes a
huge controversial success. Think of Mel Brooks' "The Producers" meets
"Network," with some jarring, uneven jabs at advertising, especially Tommy
Hilfiger, its most pointed jab. The show becomes such a success that Pierre
becomes immersed in it himself, keeping grinning, red-lipped, buffoonish
statues of blacks from the heyday of a forgotten era in his office. But is
such an era really far behind, or do we still, in effect, have minstrel shows
today? Are white and black audiences more receptive to African-American
stereotypes that we can laugh at as in "The Nutty Professor II" (the original
one, ironically, starred Jada Pinkett) or Martin Lawrence in "Big Momma's
House" than to films like "Beloved" or "Amistad," which focus on slavery?

When Spike Lee focuses on such issues, it becomes a lacerating, powerful film
- how do these black actors feel about putting on blackface? Unfortunately,
as in "Jungle Fever," Lee tends to focus on characters that are less
remarkable and thus, distract from its intended message. The scenes of the
rappers, who contemplate on how other rappers are not getting the recognition
they deserve, recalls similar scenes of the Panthers in "Network" and they do
not work very well in Lee's context of racial profiling. I was more
interested in Pierre and Sloan, and how they felt about their guilt in the
face of success. All this ends rather crudely and abruptly with violence and
hysteria that, once again, recalls "Network." The difference is that
"Network" was leading to an inevitable conclusion where violence on
television would result in higher ratings. Here, it is too tidy a solution, I
think, whereas a grander subplot about how audiences relate to such material
would have been preferred, and how these actors feel abou
t their televised act to an audience that even wears blackface to honor the
show's characters!

The performances are quixotic, as always in a Lee film. Damon Wayans is
perfectly restrained as Pierre, using his hands as if they were magic wands -
his reaction to the madness he has created is clearly felt in the final
scenes. Jada Pinkett Smith is also alluring, smart, and energetic as Sloan,
who sees far beyond the show's concept than anyone else in the film. I also
enjoyed the touching performances by Glover and Davidson, two actors caught
in the haelstorm of success, the latter more cognizant of the effect it has
on his own well-being.

I kept thinking of one film that dealt with similar issues, and that was
Robert Townshend's smartly satirical "Hollywood Shuffle." Townshend's film
does it with more grace and style, whereas Lee's film is angry and bites us
like a junkyard dog. The end of "Bamboozled" features a moving collage of
cinematic racial stereotypes, from "High Society" to Al Jolson in "The Jazz
Singer." If Lee inserted clips from the gangsta rappers of today or Eddie
Murphy, his point would have been made about minstrel shows still existing
today. "Bamboozled" is too fractured and blunt to really score (and has a
rather muddy look due to being filmed on digital video), but it does make you
reflect on how race is portrayed in the media in today's world.

For more reviews, check out JERRY AT THE MOVIES at
http://buffs.moviething.com/buffs/faust/

E-mail me with any questions, comments or general complaints at
jerry@movieluver.com or at Faust667@aol.com

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
var util = require("util");

var AbstractError = require("./abstract_error");

var NAME = "Authorization Error";

util.inherits(AuthorizationError, AbstractError);

function AuthorizationError(message, referenceUrl) {
  AbstractError.call(this, message, this.constructor);
  this.name = NAME;
  this.referenceUrl = referenceUrl;
}

AuthorizationError.getName = function () { return NAME; };

module.exports = AuthorizationError;