Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    ArrowInvalid
Message:      JSON parse error: Missing a closing quotation mark in string. in row 696
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 145, in _generate_tables
                  dataset = json.load(f)
                File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load
                  return loads(fp.read(),
                File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
                  return _default_decoder.decode(s)
                File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
                  raise JSONDecodeError("Extra data", s, end)
              json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 655)
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1995, in _prepare_split_single
                  for _, table in generator:
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables
                  raise e
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables
                  pa_table = paj.read_json(
                File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
                File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
                File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
              pyarrow.lib.ArrowInvalid: JSON parse error: Missing a closing quotation mark in string. in row 696
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

text
string
meta
dict
package org.gridkit.nanoparser.heappathgrammar; public interface HeapPathStep { }
{ "content_hash": "9a19e0645f3d1994d6c4288878bf2669", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 47, "avg_line_length": 16.8, "alnum_prop": 0.8214285714285714, "repo_name": "aragozin/nanoparser", "id": "7d2f7f6799140ec6e7170bde3cd4f02b099f53fd", "size": "84", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "nanoparser-examples/src/test/java/org/gridkit/nanoparser/heappathgrammar/HeapPathStep.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "293664" } ] }
template<class K, class Tree, class Polyhedron, Primitive_type Type> void test_impl(Tree& tree, Polyhedron& p, const double duration) { tree.accelerate_distance_queries(p.points_begin(),p.points_end()); test_distance_speed<Tree,K>(tree,duration); test_all_distance_query_types<Tree,K>(tree); } int main(void) { std::cout << "AABB distance to triangle tests" << std::endl; const double duration = 0.1; test_kernels<TRIANGLE>("./data/cube.off",duration); test_kernels<TRIANGLE>("./data/pinion.off",duration); test_kernels<TRIANGLE>("./data/finger.off",duration); test_kernels<TRIANGLE>("./data/coverrear.off",duration); return 0; }
{ "content_hash": "10794c495ac219b191505ca22619b069", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 68, "avg_line_length": 34.31578947368421, "alnum_prop": 0.7131901840490797, "repo_name": "hlzz/dotfiles", "id": "2fe1a71d082f7d998c2464b62b427b4f025649b5", "size": "1808", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "graphics/cgal/AABB_tree/test/AABB_tree/aabb_distance_triangle_test.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AppleScript", "bytes": "1240" }, { "name": "Arc", "bytes": "38" }, { "name": "Assembly", "bytes": "449468" }, { "name": "Batchfile", "bytes": "16152" }, { "name": "C", "bytes": "102303195" }, { "name": "C++", "bytes": "155056606" }, { "name": "CMake", "bytes": "7200627" }, { "name": "CSS", "bytes": "179330" }, { "name": "Cuda", "bytes": "30026" }, { "name": "D", "bytes": "2152" }, { "name": "Emacs Lisp", "bytes": "14892" }, { "name": "FORTRAN", "bytes": "5276" }, { "name": "Forth", "bytes": "3637" }, { "name": "GAP", "bytes": "14495" }, { "name": "GLSL", "bytes": "438205" }, { "name": "Gnuplot", "bytes": "327" }, { "name": "Groff", "bytes": "518260" }, { "name": "HLSL", "bytes": "965" }, { "name": "HTML", "bytes": "2003175" }, { "name": "Haskell", "bytes": "10370" }, { "name": "IDL", "bytes": "2466" }, { "name": "Java", "bytes": "219109" }, { "name": "JavaScript", "bytes": "1618007" }, { "name": "Lex", "bytes": "119058" }, { "name": "Lua", "bytes": "23167" }, { "name": "M", "bytes": "1080" }, { "name": "M4", "bytes": "292475" }, { "name": "Makefile", "bytes": "7112810" }, { "name": "Matlab", "bytes": "1582" }, { "name": "NSIS", "bytes": "34176" }, { "name": "Objective-C", "bytes": "65312" }, { "name": "Objective-C++", "bytes": "269995" }, { "name": "PAWN", "bytes": "4107117" }, { "name": "PHP", "bytes": "2690" }, { "name": "Pascal", "bytes": "5054" }, { "name": "Perl", "bytes": "485508" }, { "name": "Pike", "bytes": "1338" }, { "name": "Prolog", "bytes": "5284" }, { "name": "Python", "bytes": "16799659" }, { "name": "QMake", "bytes": "89858" }, { "name": "Rebol", "bytes": "291" }, { "name": "Ruby", "bytes": "21590" }, { "name": "Scilab", "bytes": "120244" }, { "name": "Shell", "bytes": "2266191" }, { "name": "Slash", "bytes": "1536" }, { "name": "Smarty", "bytes": "1368" }, { "name": "Swift", "bytes": "331" }, { "name": "Tcl", "bytes": "1911873" }, { "name": "TeX", "bytes": "11981" }, { "name": "Verilog", "bytes": "3893" }, { "name": "VimL", "bytes": "595114" }, { "name": "XSLT", "bytes": "62675" }, { "name": "Yacc", "bytes": "307000" }, { "name": "eC", "bytes": "366863" } ] }
// This file was generated by jmlunit on Tue May 20 17:42:46 EDT 2008. package org.jmlspecs.samples.list.list2; import org.jmlspecs.samples.list.node.OneWayNode; /** Automatically-generated test driver for JML and JUnit based * testing of E_OneWayList. The superclass of this class should be edited * to supply test data. However it's best not to edit this class * directly; instead use the command * <pre> * jmlunit E_OneWayList.java * </pre> * to regenerate this class whenever E_OneWayList.java changes. */ public class E_OneWayList_JML_Test extends E_OneWayList_JML_TestData { /** Initialize this class. */ public E_OneWayList_JML_Test(java.lang.String name) { super(name); } /** Run the tests. */ public static void main(java.lang.String[] args) { org.jmlspecs.jmlunit.JMLTestRunner.run(suite()); // You can also use a JUnit test runner such as: // junit.textui.TestRunner.run(suite()); } /** Test to see if the code for class E_OneWayList * has been compiled with runtime assertion checking (i.e., by jmlc). * Code that is not compiled with jmlc would not make an effective test, * since no assertion checking would be done. */ public void test$IsRACCompiled() { junit.framework.Assert.assertTrue("code for class E_OneWayList" + " was not compiled with jmlc" + " so no assertions will be checked!", org.jmlspecs.jmlrac.runtime.JMLChecker.isRACCompiled(E_OneWayList.class) ); } /** Return the test suite for this test class. This will have * added to it at least test$IsRACCompiled(), and any test methods * written explicitly by the user in the superclass. It will also * have added test suites for each testing each method and * constructor. */ //@ ensures \result != null; public static junit.framework.Test suite() { E_OneWayList_JML_Test testobj = new E_OneWayList_JML_Test("E_OneWayList_JML_Test"); junit.framework.TestSuite testsuite = testobj.overallTestSuite(); // Add instances of Test found by the reflection mechanism. testsuite.addTestSuite(E_OneWayList_JML_Test.class); testobj.addTestSuiteForEachMethod(testsuite); return testsuite; } /** A JUnit test object that can run a single test method. This * is defined as a nested class solely for convenience; it can't * be defined once and for all because it must subclass its * enclosing class. */ protected static abstract class OneTest extends E_OneWayList_JML_Test { /** Initialize this test object. */ public OneTest(String name) { super(name); } /** The result object that holds information about testing. */ protected junit.framework.TestResult result; //@ also //@ requires result != null; public void run(junit.framework.TestResult result) { this.result = result; super.run(result); } /* Run a single test and decide whether the test was * successful, meaningless, or a failure. This is the * Template Method pattern abstraction of the inner loop in a * JML/JUnit test. */ public void runTest() throws java.lang.Throwable { try { // The call being tested! doCall(); } catch (org.jmlspecs.jmlrac.runtime.JMLEntryPreconditionError e) { // meaningless test input addMeaningless(); } catch (org.jmlspecs.jmlrac.runtime.JMLAssertionError e) { // test failure int l = org.jmlspecs.jmlrac.runtime.JMLChecker.getLevel(); org.jmlspecs.jmlrac.runtime.JMLChecker.setLevel (org.jmlspecs.jmlrac.runtime.JMLOption.NONE); try { java.lang.String failmsg = this.failMessage(e); junit.framework.AssertionFailedError err = new junit.framework.AssertionFailedError(failmsg); err.setStackTrace(new java.lang.StackTraceElement[]{}); err.initCause(e); result.addFailure(this, err); } finally { org.jmlspecs.jmlrac.runtime.JMLChecker.setLevel(l); } } catch (java.lang.Throwable e) { // test success } } /** Call the method to be tested with the appropriate arguments. */ protected abstract void doCall() throws java.lang.Throwable; /** Format the error message for a test failure, based on the * method's arguments. */ protected abstract java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e); /** Inform listeners that a meaningless test was run. */ private void addMeaningless() { if (result instanceof org.jmlspecs.jmlunit.JMLTestResult) { ((org.jmlspecs.jmlunit.JMLTestResult)result) .addMeaningless(this); } } } /** Create the tests that are to be run for testing the class * E_OneWayList. The framework will then run them. * @param overallTestSuite$ The suite accumulating all of the tests * for this driver class. */ //@ requires overallTestSuite$ != null; public void addTestSuiteForEachMethod (junit.framework.TestSuite overallTestSuite$) { try { this.addTestSuiteFor$TestE_OneWayList(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestLength(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestIsEmpty(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestEquals(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestHashCode(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestRemoveEntry(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestInsertAfterCursor(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestInsertBeforeCursor(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestAppend(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestRemoveAllEntries(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestClone(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestFirstEntry(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestIncrementCursor(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestIsOffEnd(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestIsOffFront(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestGetEntry(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestReplaceEntry(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } try { this.addTestSuiteFor$TestToString(overallTestSuite$); } catch (java.lang.Throwable ex) { overallTestSuite$.addTest (new org.jmlspecs.jmlunit.strategies.ConstructorFailed(ex)); } } /** Add tests for the E_OneWayList contructor * to the overall test suite. */ private void addTestSuiteFor$TestE_OneWayList (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("E_OneWayList"); try { methodTests$.addTest (new TestE_OneWayList()); } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the E_OneWayList contructor. */ protected static class TestE_OneWayList extends OneTest { /** Initialize this instance. */ public TestE_OneWayList() { super("E_OneWayList"); } protected void doCall() throws java.lang.Throwable { new E_OneWayList(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tContructor 'E_OneWayList'"; return msg; } } /** Add tests for the length method * to the overall test suite. */ private void addTestSuiteFor$TestLength (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("length"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("length", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"length\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestLength(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the length method. */ protected static class TestLength extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestLength(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("length"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.length(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'length' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the isEmpty method * to the overall test suite. */ private void addTestSuiteFor$TestIsEmpty (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("isEmpty"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("isEmpty", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"isEmpty\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestIsEmpty(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the isEmpty method. */ protected static class TestIsEmpty extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestIsEmpty(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("isEmpty"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.isEmpty(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'isEmpty' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the equals method * to the overall test suite. */ private void addTestSuiteFor$TestEquals (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("equals"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("equals", 1)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"equals\", 1))"); while (!receivers$iter.atEnd()) { org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter = this.vjava_lang_ObjectIter("equals", 0); this.check_has_data (vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"equals\", 0)"); while (!vjava_lang_Object$1$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); final java.lang.Object obj = (java.lang.Object) vjava_lang_Object$1$iter.get(); methodTests$.addTest (new TestEquals(receiver$, obj)); vjava_lang_Object$1$iter.advance(); } receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the equals method. */ protected static class TestEquals extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Argument obj */ private java.lang.Object obj; /** Initialize this instance. */ public TestEquals(org.jmlspecs.samples.list.list2.E_OneWayList receiver$, java.lang.Object obj) { super("equals"+ ":" + (obj==null? "null" :"{java.lang.Object}")); this.receiver$ = receiver$; this.obj = obj; } protected void doCall() throws java.lang.Throwable { receiver$.equals(obj); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'equals' applied to"; msg += "\n\tReceiver: " + this.receiver$; msg += "\n\tArgument obj: " + this.obj; return msg; } } /** Add tests for the hashCode method * to the overall test suite. */ private void addTestSuiteFor$TestHashCode (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("hashCode"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("hashCode", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"hashCode\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestHashCode(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the hashCode method. */ protected static class TestHashCode extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestHashCode(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("hashCode"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.hashCode(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'hashCode' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the removeEntry method * to the overall test suite. */ private void addTestSuiteFor$TestRemoveEntry (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("removeEntry"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("removeEntry", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"removeEntry\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestRemoveEntry(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the removeEntry method. */ protected static class TestRemoveEntry extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestRemoveEntry(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("removeEntry"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.removeEntry(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'removeEntry' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the insertAfterCursor method * to the overall test suite. */ private void addTestSuiteFor$TestInsertAfterCursor (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("insertAfterCursor"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("insertAfterCursor", 1)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"insertAfterCursor\", 1))"); while (!receivers$iter.atEnd()) { org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter = this.vjava_lang_ObjectIter("insertAfterCursor", 0); this.check_has_data (vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"insertAfterCursor\", 0)"); while (!vjava_lang_Object$1$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); final java.lang.Object newEntry = (java.lang.Object) vjava_lang_Object$1$iter.get(); methodTests$.addTest (new TestInsertAfterCursor(receiver$, newEntry)); vjava_lang_Object$1$iter.advance(); } receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the insertAfterCursor method. */ protected static class TestInsertAfterCursor extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Argument newEntry */ private java.lang.Object newEntry; /** Initialize this instance. */ public TestInsertAfterCursor(org.jmlspecs.samples.list.list2.E_OneWayList receiver$, java.lang.Object newEntry) { super("insertAfterCursor"+ ":" + (newEntry==null? "null" :"{java.lang.Object}")); this.receiver$ = receiver$; this.newEntry = newEntry; } protected void doCall() throws java.lang.Throwable { receiver$.insertAfterCursor(newEntry); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'insertAfterCursor' applied to"; msg += "\n\tReceiver: " + this.receiver$; msg += "\n\tArgument newEntry: " + this.newEntry; return msg; } } /** Add tests for the insertBeforeCursor method * to the overall test suite. */ private void addTestSuiteFor$TestInsertBeforeCursor (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("insertBeforeCursor"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("insertBeforeCursor", 1)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"insertBeforeCursor\", 1))"); while (!receivers$iter.atEnd()) { org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter = this.vjava_lang_ObjectIter("insertBeforeCursor", 0); this.check_has_data (vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"insertBeforeCursor\", 0)"); while (!vjava_lang_Object$1$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); final java.lang.Object newEntry = (java.lang.Object) vjava_lang_Object$1$iter.get(); methodTests$.addTest (new TestInsertBeforeCursor(receiver$, newEntry)); vjava_lang_Object$1$iter.advance(); } receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the insertBeforeCursor method. */ protected static class TestInsertBeforeCursor extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Argument newEntry */ private java.lang.Object newEntry; /** Initialize this instance. */ public TestInsertBeforeCursor(org.jmlspecs.samples.list.list2.E_OneWayList receiver$, java.lang.Object newEntry) { super("insertBeforeCursor"+ ":" + (newEntry==null? "null" :"{java.lang.Object}")); this.receiver$ = receiver$; this.newEntry = newEntry; } protected void doCall() throws java.lang.Throwable { receiver$.insertBeforeCursor(newEntry); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'insertBeforeCursor' applied to"; msg += "\n\tReceiver: " + this.receiver$; msg += "\n\tArgument newEntry: " + this.newEntry; return msg; } } /** Add tests for the append method * to the overall test suite. */ private void addTestSuiteFor$TestAppend (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("append"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("append", 1)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"append\", 1))"); while (!receivers$iter.atEnd()) { org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter = this.vjava_lang_ObjectIter("append", 0); this.check_has_data (vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"append\", 0)"); while (!vjava_lang_Object$1$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); final java.lang.Object newEntry = (java.lang.Object) vjava_lang_Object$1$iter.get(); methodTests$.addTest (new TestAppend(receiver$, newEntry)); vjava_lang_Object$1$iter.advance(); } receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the append method. */ protected static class TestAppend extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Argument newEntry */ private java.lang.Object newEntry; /** Initialize this instance. */ public TestAppend(org.jmlspecs.samples.list.list2.E_OneWayList receiver$, java.lang.Object newEntry) { super("append"+ ":" + (newEntry==null? "null" :"{java.lang.Object}")); this.receiver$ = receiver$; this.newEntry = newEntry; } protected void doCall() throws java.lang.Throwable { receiver$.append(newEntry); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'append' applied to"; msg += "\n\tReceiver: " + this.receiver$; msg += "\n\tArgument newEntry: " + this.newEntry; return msg; } } /** Add tests for the removeAllEntries method * to the overall test suite. */ private void addTestSuiteFor$TestRemoveAllEntries (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("removeAllEntries"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("removeAllEntries", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"removeAllEntries\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestRemoveAllEntries(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the removeAllEntries method. */ protected static class TestRemoveAllEntries extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestRemoveAllEntries(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("removeAllEntries"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.removeAllEntries(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'removeAllEntries' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the clone method * to the overall test suite. */ private void addTestSuiteFor$TestClone (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("clone"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("clone", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"clone\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestClone(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the clone method. */ protected static class TestClone extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestClone(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("clone"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.clone(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'clone' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the firstEntry method * to the overall test suite. */ private void addTestSuiteFor$TestFirstEntry (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("firstEntry"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("firstEntry", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"firstEntry\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestFirstEntry(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the firstEntry method. */ protected static class TestFirstEntry extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestFirstEntry(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("firstEntry"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.firstEntry(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'firstEntry' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the incrementCursor method * to the overall test suite. */ private void addTestSuiteFor$TestIncrementCursor (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("incrementCursor"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("incrementCursor", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"incrementCursor\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestIncrementCursor(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the incrementCursor method. */ protected static class TestIncrementCursor extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestIncrementCursor(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("incrementCursor"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.incrementCursor(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'incrementCursor' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the isOffEnd method * to the overall test suite. */ private void addTestSuiteFor$TestIsOffEnd (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("isOffEnd"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("isOffEnd", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"isOffEnd\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestIsOffEnd(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the isOffEnd method. */ protected static class TestIsOffEnd extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestIsOffEnd(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("isOffEnd"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.isOffEnd(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'isOffEnd' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the isOffFront method * to the overall test suite. */ private void addTestSuiteFor$TestIsOffFront (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("isOffFront"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("isOffFront", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"isOffFront\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestIsOffFront(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the isOffFront method. */ protected static class TestIsOffFront extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestIsOffFront(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("isOffFront"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.isOffFront(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'isOffFront' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the getEntry method * to the overall test suite. */ private void addTestSuiteFor$TestGetEntry (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("getEntry"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("getEntry", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"getEntry\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestGetEntry(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the getEntry method. */ protected static class TestGetEntry extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestGetEntry(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("getEntry"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.getEntry(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'getEntry' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Add tests for the replaceEntry method * to the overall test suite. */ private void addTestSuiteFor$TestReplaceEntry (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("replaceEntry"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("replaceEntry", 1)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"replaceEntry\", 1))"); while (!receivers$iter.atEnd()) { org.jmlspecs.jmlunit.strategies.IndefiniteIterator vjava_lang_Object$1$iter = this.vjava_lang_ObjectIter("replaceEntry", 0); this.check_has_data (vjava_lang_Object$1$iter, "this.vjava_lang_ObjectIter(\"replaceEntry\", 0)"); while (!vjava_lang_Object$1$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); final java.lang.Object arg1 = (java.lang.Object) vjava_lang_Object$1$iter.get(); methodTests$.addTest (new TestReplaceEntry(receiver$, arg1)); vjava_lang_Object$1$iter.advance(); } receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the replaceEntry method. */ protected static class TestReplaceEntry extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Argument arg1 */ private java.lang.Object arg1; /** Initialize this instance. */ public TestReplaceEntry(org.jmlspecs.samples.list.list2.E_OneWayList receiver$, java.lang.Object arg1) { super("replaceEntry"+ ":" + (arg1==null? "null" :"{java.lang.Object}")); this.receiver$ = receiver$; this.arg1 = arg1; } protected void doCall() throws java.lang.Throwable { receiver$.replaceEntry(arg1); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'replaceEntry' applied to"; msg += "\n\tReceiver: " + this.receiver$; msg += "\n\tArgument arg1: " + this.arg1; return msg; } } /** Add tests for the toString method * to the overall test suite. */ private void addTestSuiteFor$TestToString (junit.framework.TestSuite overallTestSuite$) { junit.framework.TestSuite methodTests$ = this.emptyTestSuiteFor("toString"); try { org.jmlspecs.jmlunit.strategies.IndefiniteIterator receivers$iter = new org.jmlspecs.jmlunit.strategies.NonNullIteratorDecorator (this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter("toString", 0)); this.check_has_data (receivers$iter, "new NonNullIteratorDecorator(this.vorg_jmlspecs_samples_list_list2_E_OneWayListIter(\"toString\", 0))"); while (!receivers$iter.atEnd()) { final org.jmlspecs.samples.list.list2.E_OneWayList receiver$ = (org.jmlspecs.samples.list.list2.E_OneWayList) receivers$iter.get(); methodTests$.addTest (new TestToString(receiver$)); receivers$iter.advance(); } } catch (org.jmlspecs.jmlunit.strategies.TestSuiteFullException e$) { // methodTests$ doesn't want more tests } overallTestSuite$.addTest(methodTests$); } /** Test for the toString method. */ protected static class TestToString extends OneTest { /** The receiver */ private org.jmlspecs.samples.list.list2.E_OneWayList receiver$; /** Initialize this instance. */ public TestToString(org.jmlspecs.samples.list.list2.E_OneWayList receiver$) { super("toString"); this.receiver$ = receiver$; } protected void doCall() throws java.lang.Throwable { receiver$.toString(); } protected java.lang.String failMessage (org.jmlspecs.jmlrac.runtime.JMLAssertionError e$) { java.lang.String msg = "\n\tMethod 'toString' applied to"; msg += "\n\tReceiver: " + this.receiver$; return msg; } } /** Check that the iterator is non-null and not empty. */ private void check_has_data(org.jmlspecs.jmlunit.strategies.IndefiniteIterator iter, String call) { if (iter == null) { junit.framework.Assert.fail(call + " returned null"); } if (iter.atEnd()) { junit.framework.Assert.fail(call + " returned an empty iterator"); } } /** Converts a char to a printable String for display */ public static String charToString(char c) { if (c == '\n') { return "NL"; } else if (c == '\r') { return "CR"; } else if (c == '\t') { return "TAB"; } else if (Character.isISOControl(c)) { int i = (int)c; return "\\u" + Character.forDigit((i/2048)%16,16) + Character.forDigit((i/256)%16,16) + Character.forDigit((i/16)%16,16) + Character.forDigit((i)%16,16); } return Character.toString(c); } }
{ "content_hash": "31bb7038976b48a8549dec7092198cf3", "timestamp": "", "source": "github", "line_count": 1276, "max_line_length": 132, "avg_line_length": 41.440438871473354, "alnum_prop": 0.5890540489428496, "repo_name": "GaloisInc/Votail", "id": "ab41e6b41eb0f4f43934cd9e74be2908d967ccb9", "size": "52878", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "external_tools/JML/org/jmlspecs/samples/list/list2/E_OneWayList_JML_Test.java", "mode": "33188", "license": "mit", "language": [ { "name": "Alloy", "bytes": "32228" }, { "name": "CSS", "bytes": "10932" }, { "name": "Emacs Lisp", "bytes": "9610" }, { "name": "Java", "bytes": "6598330" }, { "name": "Makefile", "bytes": "86211" }, { "name": "Ruby", "bytes": "2120" }, { "name": "Shell", "bytes": "165685" }, { "name": "TeX", "bytes": "3971" } ] }
namespace Employees.App.Interfaces { public interface ICommand { void Execute(); } }
{ "content_hash": "390f2cdc2b50f4a636a9dd776cbd019d", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 35, "avg_line_length": 15.142857142857142, "alnum_prop": 0.6132075471698113, "repo_name": "RAstardzhiev/Software-University-SoftUni", "id": "21fa48ec728d4b25164bf84dfc32b6ffa6f56c92", "size": "108", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Databases Advanced - Entity Framework Core/Auto Mapping Objects/AutoMappingObjects/Employees.App/Interfaces/ICommand.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "203" }, { "name": "C#", "bytes": "3137103" }, { "name": "CSS", "bytes": "159749" }, { "name": "HTML", "bytes": "55667" }, { "name": "Hack", "bytes": "2199" }, { "name": "Java", "bytes": "60095" }, { "name": "JavaScript", "bytes": "405592" }, { "name": "PHP", "bytes": "18260" }, { "name": "PLpgSQL", "bytes": "61231" }, { "name": "SQLPL", "bytes": "183" }, { "name": "TypeScript", "bytes": "16282" } ] }
<?php declare(strict_types=1); namespace phpDocumentor\Guides\RestructuredText\Span; class SpanToken { public const TYPE_LITERAL = 'literal'; public const TYPE_REFERENCE = 'reference'; public const TYPE_LINK = 'link'; /** @var string */ private $type; /** @var string */ private $id; /** @var string[] */ private $token; /** * @param string[] $token */ public function __construct(string $type, string $id, array $token) { $this->type = $type; $this->id = $id; $this->token = $token; $this->token['type'] = $type; } public function getType() : string { return $this->type; } public function getId() : string { return $this->id; } public function get(string $key) : string { return $this->token[$key] ?? ''; } /** * @return string[] */ public function getTokenData() : array { return $this->token; } }
{ "content_hash": "d972fb80f11138191d9ff5aa42e48617", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 71, "avg_line_length": 18.181818181818183, "alnum_prop": 0.532, "repo_name": "phpDocumentor/phpDocumentor2", "id": "5630dc874cab6e052e7a39d1a01a82354185e8bf", "size": "1000", "binary": false, "copies": "1", "ref": "refs/heads/dependabot/composer/symfony/flex-1.12.1", "path": "src/Guides/RestructuredText/Span/SpanToken.php", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "284" }, { "name": "CSS", "bytes": "14643" }, { "name": "Dockerfile", "bytes": "1112" }, { "name": "Gherkin", "bytes": "34587" }, { "name": "HTML", "bytes": "120143" }, { "name": "JavaScript", "bytes": "58657" }, { "name": "Makefile", "bytes": "286" }, { "name": "PHP", "bytes": "1274162" }, { "name": "Shell", "bytes": "629" } ] }
package operations.gdrive; import com.google.api.client.auth.oauth2.Credential; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.client.util.store.FileDataStoreFactory; import com.google.api.services.drive.Drive; import com.google.api.services.drive.DriveScopes; import java.io.IOException; import java.util.Arrays; import java.util.List; /** * Created by @AdrianBZG (www.adrianbazaga.com) on 05/02/2017. */ public class CoreManager { /** Application name. */ public static final String APPLICATION_NAME = "SyncMe v2 GDrive Core"; /** Directory to store user credentials for SyncMe. */ public static final java.io.File DATA_STORE_DIR = new java.io.File(System.getProperty("user.dir"), ".syncme-gdrive-credentials/v2"); public static FileDataStoreFactory DATA_STORE_FACTORY; /** Global instance of the JSON factory. */ public static final JsonFactory JSON_FACTORY = JacksonFactory.getDefaultInstance(); /** Global instance of the HTTP transport. */ public static HttpTransport HTTP_TRANSPORT; /** Global instance of the scopes required. */ public static final List<String> SCOPES = Arrays.asList(DriveScopes.DRIVE_FILE, DriveScopes.DRIVE_METADATA, DriveScopes.DRIVE_APPDATA); static { try { HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport(); DATA_STORE_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR); } catch (Throwable t) { t.printStackTrace(); System.exit(1); } } /** * Build and return an authorized Drive client service. * @return an authorized Drive client service * @throws IOException */ public static Drive getDriveService() throws IOException { Credential credential = Token.authorize(); return new Drive.Builder( HTTP_TRANSPORT, JSON_FACTORY, credential) .setApplicationName(APPLICATION_NAME) .build(); } }
{ "content_hash": "343be2ae6fdfe6eb6d8f987fa0a6dc0c", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 139, "avg_line_length": 35.57377049180328, "alnum_prop": 0.7027649769585254, "repo_name": "AdrianBZG/SyncMe", "id": "23c877a6b5cf7ec623724ecfa8955f8ef6aab2e5", "size": "2170", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/operations/gdrive/CoreManager.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "53773" } ] }
CLASS({ name: 'RotateFwdBwdAnimation', package: 'foam.ui.md', constants: { ROTATE_CSS_REG_EX: /rotate\([0-9.-]+[a-zA-Z]*\)[;]?/g }, properties: [ { name: 'element', required: true, postSet: function(old, nu) { if ( old === nu ) return; if ( nu ) this.setRotationStyle(); } }, { type: 'Float', name: 'rotation', units: 'turns', defaultValue: 0, preSet: function(_, nu) { return Math.round(nu * 1000) / 1000; }, postSet: function(old, nu) { if ( old === nu ) return; this.setRotationStyle(); } }, { name: 'easing', lazyFactory: function() { return Movement.easeOut(0.9); } }, { type: 'Float', name: 'fwdDuration', defaultValue: 100 }, { type: 'Float', name: 'bwdDuration', defaultValue: 100 }, { name: 'fwdDirection', defaultValue: 'clockwise' }, { name: 'bwdDirection', defaultValue: 'counter-clockwise' }, { name: 'fwdAnimation', lazyFactory: function() { return this.getAnimation('fwd'); } }, { name: 'bwdAnimation', lazyFactory: function() { return this.getAnimation('bwd'); } } ], methods: [ { name: 'init', code: function() { this.SUPER.apply(this, arguments); this.X.dynamicFn(function() { this.easing; this.fwdDuration; this.fwdDirection; this.fwdAnimation = this.getAnimation('fwd'); }.bind(this)); this.X.dynamicFn(function() { this.easing; this.bwdDuration; this.bwdDirection; this.bwdAnimation = this.getAnimation('bwd'); }.bind(this)); } }, { name: 'getAnimation', code: function(wd) { return this.X.animate( this[wd + 'Duration'], function() { this.rotation += this[wd + 'Direction'] === 'clockwise' ? 0.5 : -0.5; }.bind(this), this.easing, function() { this.rotation = Math.round(this.rotation * 2) / 2; }.bind(this)); } }, { name: 'setRotationStyle', code: function() { if ( ! this.element ) return; var style = this.element.style, initialTransform = style.transform, strippedTransform = initialTransform.replace( this.ROTATE_CSS_REG_EX, ''); if ( strippedTransform && strippedTransform[strippedTransform.length - 1] !== ';' ) strippedTransform += ';'; style.transform = strippedTransform + 'rotate(' + this.rotation + 'turn)'; } } ] });
{ "content_hash": "943b1d8186554d96801fea1be60a8534", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 71, "avg_line_length": 24.00854700854701, "alnum_prop": 0.49056603773584906, "repo_name": "jlhughes/foam", "id": "30ef198babab332c1d36b338e76c3acb2f72341f", "size": "3113", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "js/foam/ui/md/RotateFwdBwdAnimation.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1826" }, { "name": "CSS", "bytes": "64734" }, { "name": "HTML", "bytes": "324383" }, { "name": "Java", "bytes": "167220" }, { "name": "JavaScript", "bytes": "5905830" }, { "name": "Objective-J", "bytes": "834" }, { "name": "Shell", "bytes": "24747" } ] }
if [ $# -lt 1 ]; then echo "Usage: $0 path_to_binaries" echo "e.g. $0 ../../src" echo "Env vars SOLARID and SOLARICLI may be used to specify the exact binaries used" exit 1 fi set -f SOLARID=${SOLARID:-${1}/solarid} CLI=${SOLARICLI:-${1}/solari-cli} DIR="${BASH_SOURCE%/*}" SENDANDWAIT="${DIR}/send.sh" if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi . "$DIR/util.sh" D=$(mktemp -d test.XXXXX) # Two nodes; one will play the part of merchant, the # other an evil transaction-mutating miner. D1=${D}/node1 CreateDataDir $D1 port=11000 rpcport=11001 B1ARGS="-datadir=$D1 -debug=mempool" $SOLARID $B1ARGS & B1PID=$! D2=${D}/node2 CreateDataDir $D2 port=11010 rpcport=11011 B2ARGS="-datadir=$D2 -debug=mempool" $SOLARID $B2ARGS & B2PID=$! # Wait until all four nodes are at the same block number function WaitBlocks { while : do sleep 1 declare -i BLOCKS1=$( GetBlocks $B1ARGS ) declare -i BLOCKS2=$( GetBlocks $B2ARGS ) if (( BLOCKS1 == BLOCKS2 )) then break fi done } # Wait until node has $N peers function WaitPeers { while : do declare -i PEERS=$( $CLI $1 getconnectioncount ) if (( PEERS == "$2" )) then break fi sleep 1 done } echo "Generating test blockchain..." # Start with B2 connected to B1: $CLI $B2ARGS addnode 127.0.0.1:11000 onetry WaitPeers "$B1ARGS" 1 # 2 block, 50 XBT each == 100 XBT # These will be transactions "A" and "B" $CLI $B1ARGS setgenerate true 2 WaitBlocks # 100 blocks, 0 mature == 0 XBT $CLI $B2ARGS setgenerate true 100 WaitBlocks CheckBalance "$B1ARGS" 100 CheckBalance "$B2ARGS" 0 # restart B2 with no connection $CLI $B2ARGS stop > /dev/null 2>&1 wait $B2PID $SOLARID $B2ARGS & B2PID=$! B1ADDRESS=$( $CLI $B1ARGS getnewaddress ) B2ADDRESS=$( $CLI $B2ARGS getnewaddress ) # Transaction C: send-to-self, spend A TXID_C=$( $CLI $B1ARGS sendtoaddress $B1ADDRESS 50.0) # Transaction D: spends B and C TXID_D=$( $CLI $B1ARGS sendtoaddress $B2ADDRESS 100.0) CheckBalance "$B1ARGS" 0 # Mutate TXID_C and add it to B2's memory pool: RAWTX_C=$( $CLI $B1ARGS getrawtransaction $TXID_C ) # ... mutate C to create C' L=${RAWTX_C:82:2} NEWLEN=$( printf "%x" $(( 16#$L + 1 )) ) MUTATEDTX_C=${RAWTX_C:0:82}${NEWLEN}4c${RAWTX_C:84} # ... give mutated tx1 to B2: MUTATEDTXID=$( $CLI $B2ARGS sendrawtransaction $MUTATEDTX_C ) echo "TXID_C: " $TXID_C echo "Mutated: " $MUTATEDTXID # Re-connect nodes, and have both nodes mine some blocks: $CLI $B2ARGS addnode 127.0.0.1:11000 onetry WaitPeers "$B1ARGS" 1 # Having B2 mine the next block puts the mutated # transaction C in the chain: $CLI $B2ARGS setgenerate true 1 WaitBlocks # B1 should still be able to spend 100, because D is conflicted # so does not count as a spend of B CheckBalance "$B1ARGS" 100 $CLI $B2ARGS stop > /dev/null 2>&1 wait $B2PID $CLI $B1ARGS stop > /dev/null 2>&1 wait $B1PID echo "Tests successful, cleaning up" rm -rf $D exit 0
{ "content_hash": "c034e69daa72f49f47298bc690bbf1b0", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 92, "avg_line_length": 23.107692307692307, "alnum_prop": 0.6567909454061251, "repo_name": "CoinAge-DAO/solari", "id": "6d787bc38a597f7d51d0070f3a83edc1271fbe51", "size": "3513", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "qa/rpc-tests/conflictedbalance.sh", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "448543" }, { "name": "C++", "bytes": "3558773" }, { "name": "CSS", "bytes": "1127" }, { "name": "Groff", "bytes": "19722" }, { "name": "HTML", "bytes": "50621" }, { "name": "Java", "bytes": "2099" }, { "name": "Makefile", "bytes": "58619" }, { "name": "Objective-C", "bytes": "2020" }, { "name": "Objective-C++", "bytes": "7300" }, { "name": "Protocol Buffer", "bytes": "2304" }, { "name": "Python", "bytes": "220621" }, { "name": "QMake", "bytes": "2018" }, { "name": "Shell", "bytes": "37774" } ] }
// // NSString+QGOCCMD5.m // QGOCCategory // // Created by 张如泉 on 15/10/4. // Copyright © 2015年 QuanGe. All rights reserved. // #import "NSString+QGOCCMD5.h" #import <CommonCrypto/CommonDigest.h> @implementation NSString (QGOCCMD5) /** * 对字符串进行MD5加密 * return 加密后的字符串 */ - (NSString *)qgocc_stringFromMD5 { if(self == nil || [self length] == 0) return nil; const char *value = [self UTF8String]; unsigned char outputBuffer[CC_MD5_DIGEST_LENGTH]; CC_MD5(value, strlen(value), outputBuffer); NSMutableString *outputString = [[NSMutableString alloc] initWithCapacity:CC_MD5_DIGEST_LENGTH * 2]; for(NSInteger count = 0; count < CC_MD5_DIGEST_LENGTH; count++){ [outputString appendFormat:@"%02x",outputBuffer[count]]; } return outputString; } @end
{ "content_hash": "4db6aa8993a8bd2158bfc22f8a28cadc", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 104, "avg_line_length": 22.77777777777778, "alnum_prop": 0.6597560975609756, "repo_name": "QuanGe/QGOCCategory", "id": "eee811c12a476b1ad4ea7095b9997dc9dee1ad38", "size": "859", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "QGOCCategory/NSString+QGOCCMD5.m", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "84347" }, { "name": "Ruby", "bytes": "563" } ] }
goog.module('eeg_modelling.eeg_viewer.Menus.tests'); goog.setTestOnly(); const Menus = goog.require('eeg_modelling.eeg_viewer.Menus'); const MockControl = goog.require('goog.testing.MockControl'); const dom = goog.require('goog.dom'); const testSuite = goog.require('goog.testing.testSuite'); let mockControl; let storeData; testSuite({ setUp() { mockControl = new MockControl(); storeData = { 'tfExSSTablePath': 'tf example sstable', 'predictionSSTablePath': null, 'sstableKey': 'sstable key', 'tfExFilePath': null, 'predictionFilePath': null, 'edfPath': null, }; const fileMenu = document.createElement('div'); fileMenu.id = 'file-menu'; const addInput = (elementId) => { const inputElement = document.createElement('input'); inputElement.id = `${elementId}`; fileMenu.appendChild(inputElement); }; addInput('input-tfex-sstable'); addInput('input-prediction-sstable'); addInput('input-key'); addInput('input-edf'); addInput('input-tfex-path'); addInput('input-prediction-path'); document.body.appendChild(fileMenu); const fileTypeDropdown = document.createElement('div'); fileTypeDropdown.id = 'file-menu-dropdown'; const fileTypeDropdownDiv = document.createElement('div'); fileTypeDropdown.appendChild(fileTypeDropdownDiv); document.body.appendChild(fileTypeDropdown); const displayFilePath = document.createElement('div'); displayFilePath.id = 'display-file-path'; document.body.appendChild(displayFilePath); }, testHandleFileParams() { Menus.getInstance().handleFileParams(storeData); const tfExSSTable = document.querySelector('#input-tfex-sstable'); assertEquals('tf example sstable', tfExSSTable.value); const predSSTable = document.querySelector('#input-prediction-sstable'); assertEquals('', predSSTable.value); const key = document.querySelector('#input-key'); assertEquals('sstable key', key.value); const tfExFilePath = document.querySelector('#input-tfex-path'); assertEquals('', tfExFilePath.value); const predictionFilePath = document.querySelector('#input-prediction-path'); assertEquals('', predictionFilePath.value); const edfPath = document.querySelector('#input-edf'); assertEquals('', edfPath.value); }, tearDown() { dom.removeChildren(dom.getDocument().body); mockControl.$tearDown(); }, });
{ "content_hash": "412ac07f4115eea91a1506cdbc6ef1c4", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 80, "avg_line_length": 29.53012048192771, "alnum_prop": 0.6952264381884945, "repo_name": "google-research/google-research", "id": "d869bd2c20bf5be549c729edc4b79f59ab8d752e", "size": "3057", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "eeg_modelling/eeg_viewer/static/js/menus_test.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "9817" }, { "name": "C++", "bytes": "4166670" }, { "name": "CMake", "bytes": "6412" }, { "name": "CSS", "bytes": "27092" }, { "name": "Cuda", "bytes": "1431" }, { "name": "Dockerfile", "bytes": "7145" }, { "name": "Gnuplot", "bytes": "11125" }, { "name": "HTML", "bytes": "77599" }, { "name": "ImageJ Macro", "bytes": "50488" }, { "name": "Java", "bytes": "487585" }, { "name": "JavaScript", "bytes": "896512" }, { "name": "Julia", "bytes": "67986" }, { "name": "Jupyter Notebook", "bytes": "71290299" }, { "name": "Lua", "bytes": "29905" }, { "name": "MATLAB", "bytes": "103813" }, { "name": "Makefile", "bytes": "5636" }, { "name": "NASL", "bytes": "63883" }, { "name": "Perl", "bytes": "8590" }, { "name": "Python", "bytes": "53790200" }, { "name": "R", "bytes": "101058" }, { "name": "Roff", "bytes": "1208" }, { "name": "Rust", "bytes": "2389" }, { "name": "Shell", "bytes": "730444" }, { "name": "Smarty", "bytes": "5966" }, { "name": "Starlark", "bytes": "245038" } ] }
.class final enum Lo/aam; .super Lo/aad; .source "" # annotations .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x4008 name = null .end annotation # direct methods .method constructor <init>(Ljava/lang/String;I)V .locals 1 .line 212 const/4 v0, 0x0 invoke-direct {p0, p1, p2, v0}, Lo/aad;-><init>(Ljava/lang/String;ILo/aae;)V return-void .end method # virtual methods .method public ˊ()Z .locals 1 .line 215 const/4 v0, 0x1 return v0 .end method
{ "content_hash": "4edd060ddde7beb948f5416bafed7199", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 80, "avg_line_length": 15.264705882352942, "alnum_prop": 0.6608863198458574, "repo_name": "gelldur/jak_oni_to_robia_prezentacja", "id": "22cf66e33cfad904fb4725082ba405eac311577f", "size": "520", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Starbucks/output/smali/o/aam.smali", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "8427" }, { "name": "Shell", "bytes": "2303" }, { "name": "Smali", "bytes": "57557982" } ] }
if [ -d ~/node_modules/.bin ] ; then export PATH=~/node_modules/.bin:$PATH fi bash_completion=$(brew --prefix)/etc/bash_completion if [ -f $bash_completion ]; then . $bash_completion fi vagrant_completion=' /opt/vagrant/embedded/gems/gems/*/contrib/bash/completion.sh' if [ -f $vagrant_completion ]; then . $vagrant_completion fi # https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh git_prompt="/usr/local/etc/bash_completion.d/git-prompt.sh" if [ -f $git_prompt ] ; then . $git_prompt if [[ $(type -t __git_ps1) = 'function' ]] ; then PS1='$PWD$(__git_ps1 " (%s)")\n[\u@\h] ' fi fi export EDITOR="subl --wait" export SVN_EDITOR="subl --wait" export VAGRANT_USE_NFS=true alias s='subl' alias sp='subl *.sublime-project' alias to='touchopen' alias bu='brew update' alias bo='brew outdated' alias bubo='brew update && brew outdated' alias eject='diskutil eject' alias cprojects='cd ~/Dropbox/projects' alias cdotfiles='cd ~/Dropbox/projects/dotfiles' alias cnotes='cd ~/Dropbox/NCAR/notes' alias cmodels='cd ~/Dropbox/NCAR/catalog_models' alias ccatalog='cd ~/Dropbox/NCAR/catalog_ui' alias cmaps='cd ~/Dropbox/NCAR/catalog-maps' alias cnagios='cd ~/Dropbox/NCAR/catalog-nagios' alias cdvagrant='cd ~/Dropbox/NCAR/catalog-vagrant' alias czith='cd ~/Dropbox/NCAR/zith' alias cweb='cd ~/Dropbox/NCAR/web' alias cplanner='cd ~/Dropbox/NCAR/mission-planner' alias cosm='cd ~/Dropbox/NCAR/osm-mapnik' alias cingest='cd ~/Dropbox/NCAR/catalog-ingest' alias craf='cd ~/Dropbox/NCAR/raf' # alias cdatavis='cd ~/Dropbox/NCAR/isf/ncharts' alias cncharts='cd ~/Dropbox/NCAR/isf/ncharts' alias cdocker='cd ~/Dropbox/NCAR/docker-library' alias cdatebrowse='cd ~/Dropbox/NCAR/catalogdatebrowse' alias cxras='cd ~/Dropbox/NCAR/presto/xras_submit' # dev workflow alias h='heroku' alias deploy='git push heroku master' alias restart='touch tmp/restart.txt' alias v='vagrant' alias vu='vagrant up' alias vs='vagrant ssh' alias vh='vagrant halt' # # bash completion for aliases # if [[ $(type -t _vagrant) = 'function' ]]; then complete -F _vagrant v fi if [[ $(type -t __git_complete) = 'function' ]]; then __git_complete g __git_main fi if [[ $(type -t _docker) = 'function' ]]; then complete -F _docker d fi if [[ $(type -t _docker_compose) = 'function' ]]; then complete -F _docker_compose f complete -F _docker_compose dc fi if [[ $(type -t _docker_machine) = 'function' ]]; then complete -F _docker_machine dm fi # # chruby # chruby_sh=/usr/local/share/chruby/chruby.sh # source /usr/local/share/chruby/chruby.sh # source /usr/local/share/chruby/auto.sh if [ -f $chruby_sh ]; then source $chruby_sh chruby_auto_sh=/usr/local/share/chruby/auto.sh if [ -f $chruby_auto_sh ]; then source $chruby_auto_sh fi fi
{ "content_hash": "7d78607e50bacce129b572e6a7eb1bf7", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 82, "avg_line_length": 24.58407079646018, "alnum_prop": 0.7005039596832253, "repo_name": "erikj/dotfiles", "id": "0fcc8f25fd50427724945f6d02dff0902e294272", "size": "2818", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "bashrc.osx.sh", "mode": "33188", "license": "mit", "language": [ { "name": "Emacs Lisp", "bytes": "1093" }, { "name": "Puppet", "bytes": "1514" }, { "name": "Ruby", "bytes": "3758" }, { "name": "Shell", "bytes": "15354" } ] }
class Ripper class RubyBuilder < Ripper::SexpBuilder class Queue < ::Array def <<(token) result = [shift] if token.nil? elsif token.opener? push(token) else result << token end result.compact end end end end
{ "content_hash": "7adf2538ae8802edbb5254b90cf57dc5", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 41, "avg_line_length": 18.6875, "alnum_prop": 0.5217391304347826, "repo_name": "svenfuchs/ripper2ruby", "id": "dcd7509bd20fe1ee8bdf98150e439580ef801646", "size": "1304", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lib/ripper/ruby_builder/queue.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "166931" } ] }
import _extends from "@babel/runtime/helpers/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties"; var _excluded = ["children"]; import { createScopedElement } from "../../lib/jsxRuntime"; import { getClassName } from "../../helpers/getClassName"; import { usePlatform } from "../../hooks/usePlatform"; import { Tappable } from "../Tappable/Tappable"; /** * @see https://vkcom.github.io/VKUI/#/Link */ export var Link = function Link(_ref) { var children = _ref.children, restProps = _objectWithoutProperties(_ref, _excluded); var platform = usePlatform(); return createScopedElement(Tappable, _extends({ Component: restProps.href ? "a" : "button" }, restProps, { vkuiClass: getClassName("Link", platform), hasActive: false, hoverMode: "opacity", focusVisibleMode: "outside" }), children); }; //# sourceMappingURL=Link.js.map
{ "content_hash": "6d9fe0e929de0e4fc7997f57b79e9118", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 86, "avg_line_length": 34.92307692307692, "alnum_prop": 0.6960352422907489, "repo_name": "cdnjs/cdnjs", "id": "8f790ce71dca0eb9844f07733424e2e341681420", "size": "908", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "ajax/libs/vkui/4.33.1/components/Link/Link.js", "mode": "33188", "license": "mit", "language": [] }
package com.google.cloud.spark.bigquery.pushdowns import org.apache.spark.sql.catalyst.plans.logical.{Aggregate, Filter, GlobalLimit, LocalLimit, LogicalPlan, Project, ReturnAnswer, Sort, UnaryNode, Window} /** Extractor for supported unary operations. Returns the node itself if the * operation is supported **/ object UnaryOperationExtractor { def unapply(node: LogicalPlan): Option[LogicalPlan] = node match { case _: Filter | _: Project | _: GlobalLimit | _: LocalLimit | _: Aggregate | _: Sort | _: ReturnAnswer | _: Window => Some(node) case _ => None } }
{ "content_hash": "9117539f006e41732a51b7cff065d7c8", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 156, "avg_line_length": 35.76470588235294, "alnum_prop": 0.6858552631578947, "repo_name": "GoogleCloudDataproc/spark-bigquery-connector", "id": "3897b06ea2c405741f059cfd08e938bbffdecdcc", "size": "608", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spark-bigquery-pushdown/pushdown_common_src/main/scala/com/google/cloud/spark/bigquery/pushdowns/UnaryOperationExtractor.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "80" }, { "name": "Java", "bytes": "1052532" }, { "name": "Python", "bytes": "4333" }, { "name": "Scala", "bytes": "340812" }, { "name": "Shell", "bytes": "3822" } ] }
module Arel module Visitors class SQLServerNG < SQLServer # Arel::Visitors::ToSql OFFSET = " OFFSET " ROWS = " ROWS" FETCH = " FETCH NEXT " FETCH0 = " FETCH FIRST (SELECT 0) " ROWS_ONLY = " ROWS ONLY" private # SQLServer ToSql/Visitor (Overides) #def visit_Arel_Nodes_BindParam o, collector # collector.add_bind(o) { |i| "@#{i-1}" } #end def visit_Arel_Nodes_Bin o, collector visit o.expr, collector if o.expr.val.is_a? Numeric collector else collector << " #{::ArJdbc::MSSQL.cs_equality_operator} " end end def visit_Arel_Nodes_UpdateStatement(o, a) if o.orders.any? && o.limit.nil? o.limit = Nodes::Limit.new(9_223_372_036_854_775_807) end super end def visit_Arel_Nodes_Lock o, collector o.expr = Arel.sql('WITH(UPDLOCK)') if o.expr.to_s =~ /FOR UPDATE/ collector << SPACE visit o.expr, collector end def visit_Arel_Nodes_Offset o, collector collector << OFFSET visit o.expr, collector collector << ROWS end def visit_Arel_Nodes_Limit o, collector if node_value(o) == 0 collector << FETCH0 collector << ROWS_ONLY else collector << FETCH visit o.expr, collector collector << ROWS_ONLY end end def visit_Arel_Nodes_SelectStatement o, collector distinct_One_As_One_Is_So_Not_Fetch o set_select_statement_lock o.lock if o.with collector = visit o.with, collector collector << SPACE end return _visit_Arel_Nodes_SelectStatement(o, collector) if ! o.limit && ! o.offset # collector = o.cores.inject(collector) { |c,x| # visit_Arel_Nodes_SelectCore(x, c) # } unless o.orders.empty? select_order_by = do_visit_columns o.orders, collector, 'ORDER BY ' end select_count = false collector = o.cores.inject(collector) do |c, x| unless core_order_by = select_order_by core_order_by = generate_order_by determine_order_by(o, x) end if select_count? x x.projections = [ Arel::Nodes::SqlLiteral.new(over_row_num(core_order_by)) ] select_count = true else # NOTE: this should really be added here and we should built the # wrapping SQL but than #replace_limit_offset! assumes it does that # ... MS-SQL adapter code seems to be 'hacked' by a lot of people #x.projections << Arel::Nodes::SqlLiteral.new(over_row_num(select_order_by)) end if core_order_by visit_Arel_Nodes_SelectCore(x, c) end # END collector = o.cores.inject(collector) { |c,x| # collector = visit_Orders_And_Let_Fetch_Happen o, collector # collector = visit_Make_Fetch_Happen o, collector # collector # __method__ END self.class.collector_proxy(collector) do |sql| select_order_by ||= "ORDER BY #{@connection.determine_order_clause(sql)}" replace_limit_offset!(sql, limit_for(o.limit), o.offset && o.offset.value.to_i, select_order_by) sql = "SELECT COUNT(*) AS count_id FROM (#{sql}) AS subquery" if select_count sql end ensure set_select_statement_lock nil end def visit_Arel_Nodes_JoinSource o, collector if o.left collector = visit o.left, collector collector = visit_Arel_Nodes_SelectStatement_SQLServer_Lock collector end if o.right.any? collector << " " if o.left collector = inject_join o.right, collector, ' ' end collector end def visit_Arel_Nodes_OuterJoin o, collector collector << "LEFT OUTER JOIN " collector = visit o.left, collector collector = visit_Arel_Nodes_SelectStatement_SQLServer_Lock collector, space: true collector << " " visit o.right, collector end # SQLServer ToSql/Visitor (Additions) def visit_Arel_Nodes_SelectStatement_SQLServer_Lock collector, options = {} if lock = select_statement_lock collector = visit lock, collector collector << SPACE if options[:space] end collector end def visit_Orders_And_Let_Fetch_Happen o, collector make_Fetch_Possible_And_Deterministic o unless o.orders.empty? collector << SPACE collector << ORDER_BY len = o.orders.length - 1 o.orders.each_with_index { |x, i| collector = visit(x, collector) collector << COMMA unless len == i } end collector end def visit_Make_Fetch_Happen o, collector o.offset = Nodes::Offset.new(0) if o.limit && !o.offset collector = visit o.offset, collector if o.offset collector = visit o.limit, collector if o.limit collector end # SQLServer Helpers # attr_reader :select_statement_lock def select_statement_lock Thread.current[:'Arel::Visitors::SQLServerNG.select_statement_lock'] end def set_select_statement_lock(lock) # @select_statement_lock = lock Thread.current[:'Arel::Visitors::SQLServerNG.select_statement_lock'] = lock end def make_Fetch_Possible_And_Deterministic o return if o.limit.nil? && o.offset.nil? if o.orders.empty? # ORDER BY mandatory with OFFSET FETCH clause t = table_From_Statement o pk = primary_Key_From_Table t return unless pk # Prefer deterministic vs a simple `(SELECT NULL)` expr. o.orders = [ pk.asc ] end end def distinct_One_As_One_Is_So_Not_Fetch o core = o.cores.first distinct = Nodes::Distinct === core.set_quantifier oneasone = core.projections.all? { |x| x == ActiveRecord::FinderMethods::ONE_AS_ONE } limitone = node_value(o.limit) == 1 if distinct && oneasone && limitone && !o.offset core.projections = [Arel.sql("TOP(1) 1 AS [one]")] o.limit = nil end end def table_From_Statement o core = o.cores.first if Arel::Table === core.from core.from elsif Arel::Nodes::SqlLiteral === core.from Arel::Table.new(core.from) elsif Arel::Nodes::JoinSource === core.source Arel::Nodes::SqlLiteral === core.source.left ? Arel::Table.new(core.source.left, @engine) : core.source.left end end def primary_Key_From_Table t return unless t return t.primary_key if t.primary_key if engine_pk = t.engine.primary_key pk = t.engine.arel_table[engine_pk] return pk if pk end pk = t.engine.connection.schema_cache.primary_keys(t.engine.table_name) return pk if pk column_name = t.engine.columns.first.try(:name) column_name ? t[column_name] : nil end def determine_order_by o, x if o.orders.any? o.orders elsif x.groups.any? x.groups else pk = find_left_table_pk(x) pk ? [ pk ] : nil # [] end end def generate_order_by orders do_visit_columns orders, nil, 'ORDER BY ' end SQLString = ActiveRecord::ConnectionAdapters::AbstractAdapter::SQLString # BindCollector = ActiveRecord::ConnectionAdapters::AbstractAdapter::BindCollector def self.collector_proxy(collector, &block) if collector.is_a?(SQLString) return SQLStringProxy.new(collector, block) end BindCollectorProxy.new(collector, block) end class BindCollectorProxy < ActiveRecord::ConnectionAdapters::AbstractAdapter::BindCollector def initialize(collector, block); @delegate = collector; @block = block end def << str; @delegate << str; self end def add_bind bind; @delegate.add_bind bind; self end def value; @delegate.value; end #def substitute_binds bvs; @delegate.substitute_binds(bvs); self end def compile(bvs, conn) _yield_str @delegate.compile(bvs, conn) end private def method_missing(name, *args, &block); @delegate.send(name, args, &block) end def _yield_str(str); @block ? @block.call(str) : str end end class SQLStringProxy < ActiveRecord::ConnectionAdapters::AbstractAdapter::SQLString def initialize(collector, block); @delegate = collector; @block = block end def << str; @delegate << str; self end def add_bind bind; @delegate.add_bind bind; self end def compile(bvs, conn) _yield_str @delegate.compile(bvs, conn) end private def method_missing(name, *args, &block); @delegate.send(name, args, &block) end def _yield_str(str); @block ? @block.call(str) : str end end end end end Arel::Visitors::VISITORS['mssql'] = Arel::Visitors::VISITORS['sqlserver'] = Arel::Visitors::SQLServerNG
{ "content_hash": "a38467cd1961a947f321e11a749e1505", "timestamp": "", "source": "github", "line_count": 293, "max_line_length": 118, "avg_line_length": 31.511945392491466, "alnum_prop": 0.5923318531354923, "repo_name": "jruby/activerecord-jdbc-adapter", "id": "9379bb720919e10b385ed3af5414b42b31704a40", "size": "9233", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "lib/arel/visitors/sql_server/ng42.rb", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Java", "bytes": "463529" }, { "name": "Ruby", "bytes": "878337" }, { "name": "Shell", "bytes": "259" } ] }
<?php namespace Youtube; class Youtube { const ENDPOINT_CHANNEL = '/channels'; const ENDPOINT_PLAYLIST = '/playlistItems'; const ENDPOINT_VIDEOS = '/videos'; const TIMEOUT_DEFAULT_SEC = 30; protected $_api_root = 'https://www.googleapis.com/youtube/v3'; protected $_apy_key; public function __construct($apy_key) { $this->_apy_key = $apy_key; } public function getUserProfile($username) { $endpoint = $this->_api_root . self::ENDPOINT_CHANNEL . '?key=' . $this->_apy_key . '&id=' . $this->getChannelId($username) . '&part=snippet,contentDetails,statistics,brandingSettings'; $request = $this->_executeRequest($endpoint); $json = json_decode($request); $params = array( 'title' => $json->items[0]->snippet->title, 'img_profile' => $json->items[0]->snippet->thumbnails->high->url, 'playlist' => $json->items[0]->contentDetails->relatedPlaylists->uploads, 'subscribers' => number_format($json->items[0]->statistics->subscriberCount, 0, ',', '.'), 'videos' => number_format($json->items[0]->statistics->videoCount, 0, ',', '.'), 'banner' => $json->items[0]->brandingSettings->image->bannerTabletExtraHdImageUrl ); return $params; } public function getVideoInfo($video) { $endpoint = $this->_api_root . self::ENDPOINT_VIDEOS . '?key=' . $this->_apy_key . '&id=' . $video . '&part=snippet,statistics,contentDetails,player'; return $this->_executeRequest($endpoint); } public function getUserVideos($playlist, $results, $nextPageToken = null) { $nextPage = (!isset($nextPageToken)) ? '' : $nextPageToken; $endpoint = $this->_api_root . self::ENDPOINT_PLAYLIST . '?key=' . $this->_apy_key . '&playlistId=' . $playlist . '&part=snippet&maxResults=' . $results . '&pageToken=' . $nextPage; $request = $this->_executeRequest($endpoint); $response = json_decode($request); $token = array( "nextPageToken" => $response->nextPageToken ); $ids = array( "ids" => array() ); foreach ($response->items as $video) { array_push($ids['ids'], $video->snippet->resourceId->videoId); } $results = array_merge($token, $ids); return $results; } private function getChannelId($username) { $endpoint = $this->_api_root . self::ENDPOINT_CHANNEL . '?key=' . $this->_apy_key . '&forUsername=' . $username . '&part=contentDetails'; $request = $this->_executeRequest($endpoint); $id = json_decode($request); return $id->items[0]->id; } protected function _executeRequest($url) { $user_agent = "Youtube API/PHP (App {$this->_apy_key})"; $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json', 'Content-Type: multipart/form-data', 'Expect:' )); curl_setopt($ch, CURLOPT_TIMEOUT, self::TIMEOUT_DEFAULT_SEC); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); curl_setopt($ch, CURLOPT_HTTPGET, 1); $response = curl_exec($ch); return $response; curl_close($ch); } }
{ "content_hash": "3bff95a7284e54a3504954afcea07781", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 193, "avg_line_length": 35.61764705882353, "alnum_prop": 0.5774841728598954, "repo_name": "pinceladasdaweb/YoutubeTV", "id": "cb11167107b93012f6e5ae1344113801314143d3", "size": "3633", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/Youtube/Youtube.class.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4311" }, { "name": "JavaScript", "bytes": "19822" }, { "name": "PHP", "bytes": "5089" }, { "name": "Smarty", "bytes": "694" } ] }
import _extends from "@babel/runtime/helpers/extends"; import { createScopedElement } from "../lib/jsxRuntime"; import * as React from 'react'; import { AdaptivityContext, SizeType, ViewHeight, ViewWidth } from "../components/AdaptivityProvider/AdaptivityContext"; export { SizeType, ViewWidth, ViewHeight }; export function withAdaptivity(TargetComponent, config) { function AdaptivityConsumer(props) { var context = React.useContext(AdaptivityContext); var update = false; if (props.sizeX || props.sizeY) { update = true; } var sizeX = props.sizeX || context.sizeX; var sizeY = props.sizeY || context.sizeY; var viewWidth = context.viewWidth; var viewHeight = context.viewHeight; var hasMouse = context.hasMouse; var deviceHasHover = context.deviceHasHover; var adaptivityProps = {}; config.sizeX ? adaptivityProps.sizeX = sizeX : undefined; config.sizeY ? adaptivityProps.sizeY = sizeY : undefined; config.viewWidth ? adaptivityProps.viewWidth = viewWidth : undefined; config.viewHeight ? adaptivityProps.viewHeight = viewHeight : undefined; config.hasMouse ? adaptivityProps.hasMouse = hasMouse : undefined; config.deviceHasHover ? adaptivityProps.deviceHasHover = deviceHasHover : undefined; // @ts-ignore var target = createScopedElement(TargetComponent, _extends({}, props, adaptivityProps)); if (update) { return createScopedElement(AdaptivityContext.Provider, { value: { sizeX: sizeX, sizeY: sizeY, viewWidth: viewWidth, viewHeight: viewHeight, hasMouse: hasMouse, deviceHasHover: deviceHasHover } }, target); } return target; } return AdaptivityConsumer; } //# sourceMappingURL=withAdaptivity.js.map
{ "content_hash": "da9a3a257711942c0ed53290a09a9c02", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 120, "avg_line_length": 36.714285714285715, "alnum_prop": 0.7003891050583657, "repo_name": "cdnjs/cdnjs", "id": "dcff23a798c3fdb094feaf4a613e0351ff300f13", "size": "1799", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "ajax/libs/vkui/4.23.0/cssm/hoc/withAdaptivity.js", "mode": "33188", "license": "mit", "language": [] }
{% extends "plugIt/base.html" %} {% load plugit_tags %} {% block title %}Stations :: RadioDNS{% endblock %} {% block menubar %} {% plugitInclude "menubar" %} <link rel="stylesheet" type="text/css" href="{{ebuio_baseUrl}}media/css/clients.css"> {% endblock %} {% block content %} {% block pageheader %} <div class="menubar"> <div class="sidebar-toggler visible-xs"> <i class="ion-navicon"></i> </div> <div class="page-title"> {{ ebuio_orga.name }} :: My Clients <small class="hidden-xs">{% block pagesubtitle %} {% endblock %}</small> </div> <div id="page-functions" class="pull-right"> {% block pagefunctions %} {% if ebuio_u.ebuio_orga_admin and serviceprovider %} <a id="client_creation_toggle_button" class="btn btn-primary" onclick="ClientModule.prototype.toggleClientCreation()"> Add a new client </a> {% endif %} {% endblock %} </div> </div> {% endblock %} <div class="alert alert-error"> <ul id="ajax_error_display"> </ul> </div> <div id="client_operation_success" class="alert alert-success" role="alert" style="display: none;"> </div> {% if not ebu_codops %} <div class="alert alert-danger" role="alert"> <strong>No CODOPS has been defined for your organisation yet.</strong> <br/> As this is a required global setting, please contact Mathias Coinchon (<a href="mailto:coinchon@ebu.ch">coinchon@ebu.ch</a>) to get started. </div> {% elif not serviceprovider %} <div class="alert alert-warning" role="alert"> <p><strong>No configuration for your organisation exists yet.</strong> <br/> Start by creating the initial service provider configuration. </p> <p><a href="{{ ebuio_baseUrl }}serviceprovider/edit/{{ serviceprovider.id }}{% if not s %}-{% endif %}" class="btn btn-primary">Edit</a></p> </div> {% else %} <div class="table-responsive"> <div class="dataTables_wrapper no-footer"> <table id="radiodns-clients-table" class="display dataTable no-footer" cellspacing="0" width="100%"> <thead> <tr role="row"> <th>Name</th> <th>Email</th> <th>Identifier</th> <th style=" width: 150px;"></th> </tr> </thead> <tbody id="clients_display"> <tr id="loading_tr"> <td>Loading...</td> <td>Loading...</td> <td>Loading...</td> <td>Loading...</td> </tr> </tbody> </table> </div> </div> <div id="new_client" style="display: none"> <hr> <h4>Add a new client</h4> <table id="clients-table_new_client" class="display dataTable no-footer" $cellspacing="0" width="100%" > <thead> <tr role="row"> <th>Name</th> <th>Email</th> <th>Identifier</th> <th style="width: 150px;"></th> </tr> </thead> <form> {% csrf_token %} <tr role="row" class="odd"> <td class="sorting_1" valign="top"> <div class="validated_input_container"> <input id="client_name_new" name="name" type="text" class="form-control"> <div id="client_edit_error_display_name_new" class="error_message_container"></div> </div> </td> <td class="sorting_1" valign="top"> <div class="validated_input_container"> <input id="client_email_new" name="email" type="email" class="form-control"> <div id="client_edit_error_display_email_new" class="error_message_container"></div> </div> </td> <td class="sorting_1" valign="top"> <div style="display: flex;"> <div class="validated_input_container"> <input id="client_identifier_new" name="identifier" type="text" class="form-control" style="margin-right: 5px"> <div id="client_edit_error_display_identifier_new" class="error_message_container"></div> </div> <div class="btn_suggestion_container"> <button id="new_client_identifier_suggestion" type="button" class="btn btn-sm btn-primary" onclick="ClientModule.prototype.makeIdentifierSuggestion();" > Suggest Identifier </button> </div> </div> </td> <div></div> <td class="sorting_1" valign="top"> <button type="button" id="update_save_btn_new" class="btn btn-sm btn-primary" onclick="ClientModule.prototype.postClient()" disabled >Submit </button> </td> </tr> </form> </table> </div> <div> <hr> <p> When creating or updating a client keep the following in mind: </p> <ul> <li>The name of a client cannot be longer than 255 characters and cannot be empty.</li> <li>The email of a client cannot be longer than 255 characters, cannot be empty and has to be a valid email. </li> <li>The client identifier can only be composed of alphanumerics and has to have a length in the range 16 to 128. </li> </ul> </div> <script src='{{ ebuio_baseUrl }}media/js/jquery.dataTables.min.js'></script> <script src='{{ ebuio_baseUrl }}media/js/visibility.js'></script> <script src='{{ ebuio_baseUrl }}media/js/inputs-validation.js'></script> <script src='{{ ebuio_baseUrl }}media/js/clients.js'></script> <script src='{{ ebuio_baseUrl }}media/js/utilities.js'></script> {% endif %} {% endblock %}
{ "content_hash": "e4357a46e64b2c77db0640fbf06dcc73", "timestamp": "", "source": "github", "line_count": 176, "max_line_length": 136, "avg_line_length": 43.55681818181818, "alnum_prop": 0.4175580485259588, "repo_name": "ebu/radiodns-plugit", "id": "5f463bf8ec99ae9b09553607e0fafba4e27834e1", "size": "7666", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "RadioDns-PlugIt/templates/clients/home.html", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "11815" }, { "name": "Python", "bytes": "190516" } ] }
<p align="center"> <a href="https://github.com/yiisoft" target="_blank"> <img src="https://avatars0.githubusercontent.com/u/993323" height="100px"> </a> <h1 align="center">Yii 2 Basic Project Template</h1> <br> </p> Yii 2 Basic Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for rapidly creating small projects. The template contains the basic features including user login/logout and a contact page. It includes all commonly used configurations that would allow you to focus on adding new features to your application. [![Latest Stable Version](https://img.shields.io/packagist/v/yiisoft/yii2-app-basic.svg)](https://packagist.org/packages/yiisoft/yii2-app-basic) [![Total Downloads](https://img.shields.io/packagist/dt/yiisoft/yii2-app-basic.svg)](https://packagist.org/packages/yiisoft/yii2-app-basic) [![Build Status](https://travis-ci.org/yiisoft/yii2-app-basic.svg?branch=master)](https://travis-ci.org/yiisoft/yii2-app-basic) DIRECTORY STRUCTURE ------------------- assets/ contains assets definition commands/ contains console commands (controllers) config/ contains application configurations controllers/ contains Web controller classes mail/ contains view files for e-mails models/ contains model classes runtime/ contains files generated during runtime tests/ contains various tests for the basic application vendor/ contains dependent 3rd-party packages views/ contains view files for the Web application web/ contains the entry script and Web resources REQUIREMENTS ------------ The minimum requirement by this project template that your Web server supports PHP 5.4.0. INSTALLATION ------------ ### Install via Composer If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix). You can then install this project template using the following command: ~~~ composer create-project --prefer-dist yiisoft/yii2-app-basic basic ~~~ Now you should be able to access the application through the following URL, assuming `basic` is the directory directly under the Web root. ~~~ http://localhost/basic/web/ ~~~ ### Install from an Archive File Extract the archive file downloaded from [yiiframework.com](http://www.yiiframework.com/download/) to a directory named `basic` that is directly under the Web root. Set cookie validation key in `config/web.php` file to some random secret string: ```php 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => '<secret random string goes here>', ], ``` You can then access the application through the following URL: ~~~ http://localhost/basic/web/ ~~~ ### Install with Docker Update your vendor packages docker-compose run --rm php composer update --prefer-dist Run the installation triggers (creating cookie validation code) docker-compose run --rm php composer install Start the container docker-compose up -d You can then access the application through the following URL: http://127.0.0.1:8000 **NOTES:** - Minimum required Docker engine version `17.04` for development (see [Performance tuning for volume mounts](https://docs.docker.com/docker-for-mac/osxfs-caching/)) - The default configuration uses a host-volume in your home directory `.docker-composer` for composer caches CONFIGURATION ------------- ### Database Edit the file `config/db.php` with real data, for example: ```php return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=yii2basic', 'username' => 'root', 'password' => '1234', 'charset' => 'utf8', ]; ``` **NOTES:** - Yii won't create the database for you, this has to be done manually before you can access it. - Check and edit the other files in the `config/` directory to customize your application as required. - Refer to the README in the `tests` directory for information specific to basic application tests. TESTING ------- Tests are located in `tests` directory. They are developed with [Codeception PHP Testing Framework](http://codeception.com/). By default there are 3 test suites: - `unit` - `functional` - `acceptance` Tests can be executed by running ``` vendor/bin/codecept run ``` The command above will execute unit and functional tests. Unit tests are testing the system components, while functional tests are for testing user interaction. Acceptance tests are disabled by default as they require additional setup since they perform testing in real browser. ### Running acceptance tests To execute acceptance tests do the following: 1. Rename `tests/acceptance.suite.yml.example` to `tests/acceptance.suite.yml` to enable suite configuration 2. Replace `codeception/base` package in `composer.json` with `codeception/codeception` to install full featured version of Codeception 3. Update dependencies with Composer ``` composer update ``` 4. Download [Selenium Server](http://www.seleniumhq.org/download/) and launch it: ``` java -jar ~/selenium-server-standalone-x.xx.x.jar ``` In case of using Selenium Server 3.0 with Firefox browser since v48 or Google Chrome since v53 you must download [GeckoDriver](https://github.com/mozilla/geckodriver/releases) or [ChromeDriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) and launch Selenium with it: ``` # for Firefox java -jar -Dwebdriver.gecko.driver=~/geckodriver ~/selenium-server-standalone-3.xx.x.jar # for Google Chrome java -jar -Dwebdriver.chrome.driver=~/chromedriver ~/selenium-server-standalone-3.xx.x.jar ``` As an alternative way you can use already configured Docker container with older versions of Selenium and Firefox: ``` docker run --net=host selenium/standalone-firefox:2.53.0 ``` 5. (Optional) Create `yii2_basic_tests` database and update it by applying migrations if you have them. ``` tests/bin/yii migrate ``` The database configuration can be found at `config/test_db.php`. 6. Start web server: ``` tests/bin/yii serve ``` 7. Now you can run all available tests ``` # run all available tests vendor/bin/codecept run # run acceptance tests vendor/bin/codecept run acceptance # run only unit and functional tests vendor/bin/codecept run unit,functional ``` ### Code coverage support By default, code coverage is disabled in `codeception.yml` configuration file, you should uncomment needed rows to be able to collect code coverage. You can run your tests and collect coverage with the following command: ``` #collect coverage for all tests vendor/bin/codecept run -- --coverage-html --coverage-xml #collect coverage only for unit tests vendor/bin/codecept run unit -- --coverage-html --coverage-xml #collect coverage for unit and functional tests vendor/bin/codecept run functional,unit -- --coverage-html --coverage-xml ``` You can see code coverage output under the `tests/_output` directory.
{ "content_hash": "ea1c62a19efea2e8ec40bb83f219cbfb", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 290, "avg_line_length": 31.523605150214593, "alnum_prop": 0.7143635125936011, "repo_name": "syjie/syjie", "id": "287a6ff87a96db1022316842c9e935a16002a0b5", "size": "7345", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "1030" }, { "name": "CSS", "bytes": "1842" }, { "name": "PHP", "bytes": "47109" }, { "name": "Shell", "bytes": "3119" } ] }
package com.frantisekpost.lib.valid8.core; import com.frantisekpost.lib.valid8.internal.Result; /** * Base validator interface * * @author Frantisek Post * */ public interface Validator<T> { /** * @return text representation of invalid state */ String getMessage(); /** * @return {@code true} if validation happened, or {@code false} if validation didn't happen. */ boolean validate(); void setLogic(Logic<T> logic); Result getResult(); }
{ "content_hash": "c37dd6f62b7951dbbc6d70733784be09", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 94, "avg_line_length": 17.846153846153847, "alnum_prop": 0.6939655172413793, "repo_name": "frantisekpost/valid8", "id": "bfcfe9a32d55b4dc7060028050ba6ee5f6dbbaf5", "size": "464", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/frantisekpost/lib/valid8/core/Validator.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "21983" } ] }
class shim; class events { class shim* _shim; common::dims_2u _source_resolution; common::dims_2u _target_resolution; public: events( class shim* shim ); virtual ~events() = default; int poll ( SDL_Event* event ); int peep ( SDL_Event* events, int numevents, SDL_eventaction action, Uint32 mask ); void source_resolution ( const common::dims_2u& dims ); void target_resolution ( const common::dims_2u& dims ); private: bool _is_valid_resize ( int w, int h ); common::dims_2u _resize_dims ( SDL_Event* event ); void _process ( SDL_Event* event ); void _process_mouse ( SDL_Event* event ); void _process_resize ( SDL_Event* event ); }; #endif // ifndef SHIMS_SDL_EVENTS_H
{ "content_hash": "67ea3905e32ae32ae9d5aeac422c86f0", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 59, "avg_line_length": 22.92105263157895, "alnum_prop": 0.5453501722158438, "repo_name": "jasbok/libshimmer", "id": "2200deb39e5de2d0867c78ef968d406076b092e7", "size": "977", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "shims/sdl/events.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "606" }, { "name": "C++", "bytes": "856094" }, { "name": "CMake", "bytes": "36815" }, { "name": "GLSL", "bytes": "131923" }, { "name": "Shell", "bytes": "10375" } ] }
#include "dump.h" std::string DumpContext::dump(const std::string structName, const mfxPlugin &plugin) { std::string str; str += structName + ".pthis=" + ToString(plugin.pthis) + "\n"; str += structName + ".PluginInit=" + ToString(plugin.PluginInit) + "\n"; str += structName + ".PluginClose=" + ToString(plugin.PluginClose) + "\n"; str += structName + ".GetPluginParam=" + ToString(plugin.GetPluginParam) + "\n"; str += structName + ".Submit=" + ToString(plugin.Submit) + "\n"; str += structName + ".Execute=" + ToString(plugin.Execute) + "\n"; str += structName + ".FreeResources=" + ToString(plugin.FreeResources) + "\n"; str += structName + ".reserved[]=" + DUMP_RESERVED_ARRAY(plugin.reserved) + "\n"; return str; } std::string DumpContext::dump(const std::string structName, const mfxCoreParam &CoreParam) { std::string str; str += structName + ".reserved[]=" + DUMP_RESERVED_ARRAY(CoreParam.reserved) + "\n"; str += structName + ".Impl=" + GetmfxIMPL(CoreParam.Impl) + "\n"; str += dump(structName + ".Version=", CoreParam.Version) + "\n"; str += structName + ".NumWorkingThread=" + ToString(CoreParam.NumWorkingThread) + "\n"; return str; } std::string DumpContext::dump(const std::string structName, const mfxPluginParam &PluginParam) { std::string str; str += structName + ".reserved[]=" + DUMP_RESERVED_ARRAY(PluginParam.reserved) + "\n"; str += structName + ".reserved1=" + ToString(PluginParam.reserved1) + "\n"; str += structName + ".PluginVersion=" + ToString(PluginParam.PluginVersion) + "\n"; str += dump(structName + ".APIVersion=", PluginParam.APIVersion) + "\n"; str += structName + ".PluginUID=" + dump_hex_array(PluginParam.PluginUID.Data) + "\n"; str += structName + ".Type=" + ToString(PluginParam.Type) + "\n"; str += structName + ".CodecId=" + GetCodecIdString(PluginParam.CodecId) + "\n"; str += structName + ".ThreadPolicy=" + ToString(PluginParam.ThreadPolicy) + "\n"; str += structName + ".MaxThreadNum=" + ToString(PluginParam.MaxThreadNum) + "\n"; return str; } std::string DumpContext::dump(const std::string structName, const mfxCoreInterface &_struct) { std::string str; DUMP_FIELD(pthis); DUMP_FIELD_RESERVED(reserved1); str += dump(structName + ".FrameAllocator", _struct.FrameAllocator) + "\n"; DUMP_FIELD(GetCoreParam); DUMP_FIELD(GetHandle); DUMP_FIELD(IncreaseReference); DUMP_FIELD(DecreaseReference); DUMP_FIELD(CopyFrame); DUMP_FIELD(CopyBuffer); DUMP_FIELD(MapOpaqueSurface); DUMP_FIELD(UnmapOpaqueSurface); DUMP_FIELD(GetRealSurface); DUMP_FIELD(GetOpaqueSurface); DUMP_FIELD(CreateAccelerationDevice); DUMP_FIELD(GetFrameHandle); DUMP_FIELD(GetFrameHandle); DUMP_FIELD(QueryPlatform); DUMP_FIELD_RESERVED(reserved4); return str; }
{ "content_hash": "75af6df2c9eef884f89fb7161c613202", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 94, "avg_line_length": 42.25, "alnum_prop": 0.663418029933867, "repo_name": "Intel-Media-SDK/MediaSDK", "id": "30786356d06459864a390ef582ae614a2af9b484", "size": "4515", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tools/tracer/dumps/dump_mfxplugin.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "575675" }, { "name": "Batchfile", "bytes": "890" }, { "name": "C", "bytes": "1400627" }, { "name": "C#", "bytes": "41124" }, { "name": "C++", "bytes": "69118186" }, { "name": "CMake", "bytes": "196487" }, { "name": "M4", "bytes": "25814" }, { "name": "Makefile", "bytes": "51696" }, { "name": "Python", "bytes": "524446" }, { "name": "Shell", "bytes": "42934" }, { "name": "Starlark", "bytes": "22028" } ] }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>CLI: ui_choice.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20981143-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <!-- Generated by Doxygen 1.7.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="main.html"><span>Main&nbsp;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&nbsp;List</span></a></li> <li><a href="globals.html"><span>File&nbsp;Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> </div> <div class="headertitle"> <h1>ui_choice.h File Reference</h1> </div> </div> <div class="contents"> <p><a class="el" href="classChoice.html" title="Choice user interface class.">Choice</a> class definition. <a href="#_details">More...</a></p> <code>#include &quot;<a class="el" href="ui__line_8h_source.html">cli/ui_line.h</a>&quot;</code><br/> <p><a href="ui__choice_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="nested-classes"></a> Classes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoice.html">Choice</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classChoice.html" title="Choice user interface class.">Choice</a> user interface class. <a href="classChoice.html#_details">More...</a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p><a class="el" href="classChoice.html" title="Choice user interface class.">Choice</a> class definition. </p> <dl class="author"><dt><b>Author:</b></dt><dd>Alexis Royer </dd></dl> <p>Definition in file <a class="el" href="ui__choice_8h_source.html">ui_choice.h</a>.</p> </div> <hr class="footer"/><address class="footer"><small>Generated on Wed Jul 24 2013 08:23:26 for CLI by&nbsp; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address> </body> </html>
{ "content_hash": "65ff07e423991feb02d1b345b31f041c", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 231, "avg_line_length": 47.61194029850746, "alnum_prop": 0.6369905956112852, "repo_name": "kn65op/cli-toolkit", "id": "0a021ab91d2c34feb9d56054bfb19ddfbfae0f6d", "size": "3190", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "web/doxygen/html/ui__choice_8h.html", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "22508" }, { "name": "C++", "bytes": "1314583" }, { "name": "CSS", "bytes": "29737" }, { "name": "HTML", "bytes": "5076138" }, { "name": "Java", "bytes": "301225" }, { "name": "JavaScript", "bytes": "84535" }, { "name": "Makefile", "bytes": "144316" }, { "name": "Objective-C", "bytes": "10523" }, { "name": "Shell", "bytes": "6486" }, { "name": "XSLT", "bytes": "188484" } ] }
<?php declare(strict_types=1); namespace Aedart\Model\Traits\Strings; /** * <h1>Card Type Trait</h1> * * @see \Aedart\Model\Contracts\Strings\CardTypeAware * * @author Alin Eugen Deac <aedart@gmail.com> * @package Aedart\Model\Traits\Strings */ trait CardTypeTrait { /** * The type of card, e.g. VISA, MasterCard, Playing Card, Magic Card... etc * * @var string|null */ protected $cardType = null; /** * Set card type * * @param string|null $type The type of card, e.g. VISA, MasterCard, Playing Card, Magic Card... etc * * @return self */ public function setCardType(?string $type) { $this->cardType = $type; return $this; } /** * Get card type * * If no "card type" value has been set, this method will * set and return a default "card type" value, * if any such value is available * * @see getDefaultCardType() * * @return string|null card type or null if no card type has been set */ public function getCardType() : ?string { if ( ! $this->hasCardType()) { $this->setCardType($this->getDefaultCardType()); } return $this->cardType; } /** * Check if "card type" has been set * * @return bool True if "card type" has been set, false if not */ public function hasCardType() : bool { return isset($this->cardType); } /** * Get a default "card type" value, if any is available * * @return string|null Default "card type" value or null if no default value is available */ public function getDefaultCardType() : ?string { return null; } }
{ "content_hash": "8de2b1e6ebe2cd202fe384617f2e62d9", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 104, "avg_line_length": 23.066666666666666, "alnum_prop": 0.5780346820809249, "repo_name": "aedart/model", "id": "fc6a70415e7d8fcc06a00c9903ce72ed73bd8b80", "size": "1730", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Traits/Strings/CardTypeTrait.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "HTML", "bytes": "3931" }, { "name": "PHP", "bytes": "821648" } ] }
require 'action_pack' module Rails module Controller module Testing module Integration http_verbs = %w(get post patch put head delete) if ActionPack.version < Gem::Version.new('5.1') http_verbs.push('xhr', 'xml_http_request', 'get_via_redirect', 'post_via_redirect') end def locale_params { locale: I18n.locale } end http_verbs.each do |method| new_method = "local_#{method}" define_method(new_method) do |*args, **kwargs| reset_template_assertion kwargs[:params] = locale_params.merge(kwargs.fetch(:params, {})) send(method.to_sym, *args, **kwargs) end end end end end end
{ "content_hash": "2440af76f0ee321d17e8b07854fbaea9", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 93, "avg_line_length": 26.571428571428573, "alnum_prop": 0.5698924731182796, "repo_name": "ministryofjustice/tax-tribunals-datacapture", "id": "bce1f678e1f11e1579a228d904e67a26560c6f37", "size": "744", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/support/integration.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "5959" }, { "name": "Gherkin", "bytes": "25767" }, { "name": "HTML", "bytes": "135700" }, { "name": "JavaScript", "bytes": "46382" }, { "name": "Makefile", "bytes": "1446" }, { "name": "Procfile", "bytes": "78" }, { "name": "Ruby", "bytes": "794660" }, { "name": "SCSS", "bytes": "23446" }, { "name": "Scala", "bytes": "8556" }, { "name": "Shell", "bytes": "5753" } ] }
package tastytest object TestNats extends Suite("TestNats") { object Longs extends Nats { type Nat = Long val zero = 0L val one = 1L def add(n: Nat, m: Nat) = n + m def mul(n: Nat, m: Nat) = n * m } import Longs.Laws._ test(assert(additiveIdentity(getRandomNat))) test(assert(additiveCommutativity(getRandomNat, getRandomNat))) test(assert(additiveAssociativity(getRandomNat, getRandomNat, getRandomNat))) test(assert(multiplicativeIdentity(getRandomNat))) test(assert(multiplicativeCommutativity(getRandomNat, getRandomNat))) test(assert(multiplicativeAssociativity(getRandomNat, getRandomNat, getRandomNat))) test(assert(multiplicativeDistributivity(getRandomNat, getRandomNat, getRandomNat))) override val reps = 1_000_000 }
{ "content_hash": "a74dbd933927689e4ae920e970a3f3aa", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 86, "avg_line_length": 34.208333333333336, "alnum_prop": 0.707673568818514, "repo_name": "lrytz/scala", "id": "eadf02c06013f90f7ad39aa9b7c71474683f93df", "size": "821", "binary": false, "copies": "2", "ref": "refs/heads/2.13.x", "path": "test/tasty/run/src-2/tastytest/TestNats.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Awk", "bytes": "1380" }, { "name": "Batchfile", "bytes": "3041" }, { "name": "C", "bytes": "141" }, { "name": "CSS", "bytes": "61396" }, { "name": "HTML", "bytes": "11445" }, { "name": "Java", "bytes": "321503" }, { "name": "JavaScript", "bytes": "48777" }, { "name": "Ruby", "bytes": "142" }, { "name": "Scala", "bytes": "19517328" }, { "name": "Shell", "bytes": "27210" }, { "name": "XSLT", "bytes": "2266" } ] }
var hsbc = angular.module('Hsbc'); hsbc.controller('ContactController', ['$scope', function($scope) { console.log('Kontakt controller is loaded.'); }]);
{ "content_hash": "3f5a782696ec4bdd413638c93fcc3c00", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 66, "avg_line_length": 32.2, "alnum_prop": 0.6708074534161491, "repo_name": "kowaalczyk/js-businesschallenge-website", "id": "1719953960fee5abc3739705b4837ce22fc1eda1", "size": "161", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client/controllers/contact.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "5323" }, { "name": "HTML", "bytes": "61093" }, { "name": "JavaScript", "bytes": "59468" } ] }
require 'spec_helper' describe "guide_questions", type: :feature, dbscope: :example, js: true do let(:site) { cms_site } let(:node) { create :guide_node_guide, filename: "guide" } let(:item) { create(:guide_question, cur_site: site, cur_node: node) } let!(:procedure1) { create :guide_procedure, cur_site: site, cur_node: node, name: "procedure1", id_name: "0.procedure1", order: 10 } let!(:procedure2) { create :guide_procedure, cur_site: site, cur_node: node, name: "procedure2", id_name: "1.procedure1", order: 20 } let!(:question1) { create :guide_question, cur_site: site, cur_node: node, name: "question1", id_name: "0.question1", order: 10, in_edges: [] } let!(:question2) { create :guide_question, cur_site: site, cur_node: node, name: "question2", id_name: "1.question2", order: 20, in_edges: [] } let(:index_path) { guide_questions_path site.id, node } let(:new_path) { new_guide_question_path site.id, node } context "basic crud" do before { login_cms_user } it "#new" do visit new_path within "form#item-form" do fill_in "item[name]", with: "sample" fill_in "item[id_name]", with: "0.sample" choose "item_question_type_yes_no" all(".question-edges .edge a", text: I18n.t("ss.links.select"))[0].click end wait_for_cbox do within ".cms-modal-tabs" do expect(page).to have_css("a.current .tab-name", text: I18n.t("guide.procedure")) end expect(page).to have_link procedure1.name expect(page).to have_link procedure2.name click_on procedure1.name end within "form#item-form" do all(".question-edges .edge a", text: I18n.t("ss.links.select"))[0].click end wait_for_cbox do within ".cms-modal-tabs" do click_on I18n.t("guide.question") end expect(page).to have_css("a.current .tab-name", text: I18n.t("guide.procedure")) expect(page).to have_link question1.name expect(page).to have_link question2.name click_on question1.name end within "form#item-form" do all(".question-edges .edge a", text: I18n.t("ss.links.select"))[1].click end wait_for_cbox do within ".cms-modal-tabs" do expect(page).to have_css("a.current .tab-name", text: I18n.t("guide.procedure")) end find('.list-head .checkbox input').set(true) within ".search-ui-select" do click_on I18n.t("ss.links.select") end end within "form#item-form" do all(".question-edges .edge a", text: I18n.t("ss.links.select"))[1].click end wait_for_cbox do within ".cms-modal-tabs" do click_on I18n.t("guide.question") end find('.list-head .checkbox input').set(true) within ".search-ui-select" do click_on I18n.t("ss.links.select") end end within "form#item-form" do click_on I18n.t("ss.buttons.save") end expect(page).to have_css('#notice', text: I18n.t('ss.notice.saved')) item = ::Guide::Question.first expect(item.edges.size).to eq 2 expect(item.edges[0].value).to eq I18n.t("guide.links.applicable") expect(item.edges[0].question_type).to eq "yes_no" expect(item.edges[0].point_ids).to match_array [procedure1.id, question1.id] expect(item.edges[1].value).to eq I18n.t("guide.links.not_applicable") expect(item.edges[1].question_type).to eq "yes_no" expect(item.edges[1].point_ids).to match_array [procedure1.id, procedure2.id, question1.id, question2.id] end end end
{ "content_hash": "dbfda1787fcbe5f13837d21a56bc31ab", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 145, "avg_line_length": 39.51086956521739, "alnum_prop": 0.6154057771664374, "repo_name": "tany/ss", "id": "ad22926884feb0b5d779c31d6ae4d8cceb3f44ef", "size": "3635", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/features/guide/questions/set_yes_no_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "86617" }, { "name": "HTML", "bytes": "2954705" }, { "name": "JavaScript", "bytes": "5619171" }, { "name": "Ruby", "bytes": "10054601" }, { "name": "SCSS", "bytes": "481390" }, { "name": "Shell", "bytes": "21408" } ] }
<?php /** * FFmpegAutoloader manages lazy autoloading of all FFmpegPHP components * * @author char0n (Vladimír Gorej, gorej@codescale.net) * @package FFmpegPHP * @license New BSD * @version 2.6 */ class FFmpegAutoloader { /** * Map of all required FFmpegPHP package files * * @var array */ protected static $classes; protected static function initClasses() { if (self::$classes === null) { self::$classes = array( 'FFmpegAnimatedGif' => 'FFmpegAnimatedGif.php', 'FFmpegFrame' => 'FFmpegFrame.php', 'FFmpegMovie' => 'FFmpegMovie.php', 'ffmpeg_animated_gif' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_animated_gif.php', 'ffmpeg_frame' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_frame.php', 'ffmpeg_movie' => 'adapter'.DIRECTORY_SEPARATOR.'ffmpeg_movie.php', 'OutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'OutputProvider.php', 'AbstractOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'AbstractOutputProvider.php', 'FFmpegOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'FFmpegOutputProvider.php', 'FFprobeOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'FFprobeOutputProvider.php', 'StringOutputProvider' => 'provider'.DIRECTORY_SEPARATOR.'StringOutputProvider.php' ); } } /** * Autoloading mechanizm * * @param string $className name of the class to be loaded * @return boolean */ public static function autoload($className) { if (array_key_exists($className, self::$classes)) { require_once dirname(__FILE__).DIRECTORY_SEPARATOR.self::$classes[$className]; return true; } return false; } /** * Registering autoloading mechanizm */ public static function register() { if (function_exists('__autoload')) { trigger_error('FFmpegPHP uses spl_autoload_register() which will bypass your __autoload() and may break your autoloading', E_USER_WARNING); } else { self::initClasses(); spl_autoload_register(array('FFmpegAutoloader', 'autoload')); } } } FFmpegAutoloader::register();
{ "content_hash": "5261f35e77f21bd3e1a220ceec6b934d", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 155, "avg_line_length": 38.25396825396825, "alnum_prop": 0.5817427385892117, "repo_name": "ruansheng/ffmpeg-php", "id": "f823af58a5011e7451fa11582e7df2b69de41d85", "size": "2411", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "FFmpegAutoloader.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "PHP", "bytes": "107499" } ] }
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public boolean isSameTree(TreeNode p, TreeNode q) { if (p == null && q == null) { return true; } else if (p == null || q == null) { return false; } else { if (p.val != q.val) { return false; } else { return isSameTree(p.left, q.left) && isSameTree(p.right, q.right); } } } }
{ "content_hash": "0fbcfc918682cb604b7a0ce6ec845b2f", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 82, "avg_line_length": 25.25, "alnum_prop": 0.46204620462046203, "repo_name": "LeetcodeFun/Java-Solutions", "id": "e3bcb867d8452938da955dfd3cf94e9ea66bf583", "size": "606", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Java/src/leetcode/100_SameTree.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "260575" } ] }
@interface WaiterViewController : UIViewController - (void)goToChatController; @end
{ "content_hash": "1c3342314f8ea6731993f99fec244dbe", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 50, "avg_line_length": 21.25, "alnum_prop": 0.8235294117647058, "repo_name": "xumingming4567/blackcardios", "id": "a872e80445304888fbce26d8b90e84c70e276a9a", "size": "261", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "BlackCard/Scenes/Waiter/Control/WaiterViewController.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Objective-C", "bytes": "640361" }, { "name": "Ruby", "bytes": "250" } ] }
get_ipython().magic('matplotlib inline') import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import pandas as pd import csv from pandas.tools.plotting import scatter_matrix from sklearn import preprocessing import nibabel as nib # ### Step 2: Load the three types of images available. # # - T1w pre-contrast # - FLAIR # - T1w post-contrast # # The goal is to create a 4D image that contains all four 3D volumes we will use in our example # In[26]: CurrentDir= os.getcwd() # Print current directory print (CurrentDir) # Get parent direcotry print(os.path.abspath(os.path.join(CurrentDir, os.pardir))) # Create the file paths. The images are contained in a subfolder called Data. PostName = os.path.abspath(os.path.join(os.path.abspath(os.path.join(CurrentDir, os.pardir)), "Data", 'POST.nii.gz') ) PreName = os.path.abspath(os.path.join(os.path.abspath(os.path.join(CurrentDir, os.pardir)), "Data", 'PRE.nii.gz') ) FLAIRName = os.path.abspath(os.path.join(os.path.abspath(os.path.join(CurrentDir, os.pardir)), "Data", 'FLAIR.nii.gz') ) GroundTruth= os.path.abspath(os.path.join(os.path.abspath(os.path.join(CurrentDir, os.pardir)), "Data", 'GroundTruth.nii.gz') ) # read Pre in--we assume that all images are same x,y dims Pre = nib.load(PreName) # Pre is a class containing the image data among other information Pre=Pre.get_data() xdim = np.shape(Pre)[0] ydim = np.shape(Pre)[1] zdim = np.shape(Pre)[2] # Printing the dimensions of an image print ('Dimensions') print (xdim,ydim,zdim) # Normalize to mean Pre=Pre/np.mean(Pre[np.nonzero(Pre)]) # Post Post = nib.load(PostName) Post=Post.get_data() # Normalize to mean Post=Post/np.mean(Post[np.nonzero(Post)]) Flair = nib.load(FLAIRName) Flair=Flair.get_data() # Normalize FLAIR Flair=Flair/np.mean(Flair[np.nonzero(Flair)]) print ("Data Loaded") # ### Create traing set # # We assume the following labels. # # > Enhancing Tumor = 4 # # > Edema = 2 # # > WM and CSF and GM=1 # # > Background (air) = 0 # # In[27]: # Load Ground Truth GroundTrutha = nib.load(GroundTruth) GroundTruth=GroundTrutha.get_data() print ("Data Loaded") # #### Plot the images # In[28]: def display_overlay(Image1, Image2): """ Function: Overlays Image2 over Image1 Image 1: 2D image Image 2: 2D Image Requires numpy, matplotlib """ Image1=np.rot90(Image1,3) Image2=np.rot90(Image2,3) Image2 = np.ma.masked_where(Image2 == 0, Image2) plt.imshow(Image1, cmap=plt.cm.gray) plt.imshow(Image2, cmap=plt.cm.brg, alpha=.7, vmin=.7, vmax=5, interpolation='nearest') plt.axis('off') plt.show() f, (ax1,ax2,ax3,ax4)=plt.subplots(1,4) ax1.imshow(np.rot90(Post[:, :, 55,],3), cmap=plt.cm.gray) ax1.axis('off') ax2.imshow(np.rot90(Flair[:, :, 55,],3), cmap=plt.cm.gray) ax2.axis('off') ax3.imshow(np.rot90(Pre[:, :, 55,],3), cmap=plt.cm.gray) ax3.axis('off') ax4.imshow(np.rot90(GroundTruth[:, :, 55,],3), cmap=plt.cm.gray) ax4.axis('off') plt.show() display_overlay(Post[:, :, 55,], GroundTruth[:,:,55]==4) display_overlay(Flair[:, :, 55,], GroundTruth[:,:,55]==2) display_overlay(Pre[:, :, 55,], GroundTruth[:,:,55]==1) # ### Create dataset # In[29]: # Create classes # Tissue =GM+CSG+WM ClassTissuePost=(Post[np.nonzero(GroundTruth==1)]) ClassTissuePre=(Pre[np.nonzero(GroundTruth==1)]) ClassTissueFlair=(Flair[np.nonzero(GroundTruth==1)]) # Enhancing Tumor ClassTumorPost=(Post[np.nonzero(GroundTruth==4)]) ClassTumorPre=(Pre[np.nonzero(GroundTruth==4)]) ClassTumorFlair=(Flair[np.nonzero(GroundTruth==4)]) # Edema ClassEdemaPost=(Post[np.nonzero(GroundTruth==2)]) ClassEdemaPre=(Pre[np.nonzero(GroundTruth==2)]) ClassEdemaFlair=(Flair[np.nonzero(GroundTruth==2)]) # We only select 1000 points for demosntration purposes IND=np.random.randint(np.shape(ClassTumorPre)[0], size=5000) ClassTissuePost=ClassTissuePost[IND] ClassTissuePre=ClassTissuePre[IND] ClassTissueFlair=ClassTissueFlair[IND] ClassTumorPost=ClassTumorPost[IND] ClassTumorPre=ClassTumorPre[IND] ClassTumorFlair=ClassTumorFlair[IND] ClassEdemaPost=ClassEdemaPost[IND] ClassEdemaPre=ClassEdemaPre[IND] ClassEdemaFlair=ClassEdemaFlair[IND] print ("Saving the data to a pandas dataframe and subsequently to a csv") # Create a dictionary containing the classes datasetcomplete={"ClassTissuePost": ClassTissuePost, "ClassTissuePre": ClassTissuePre, "ClassTissueFlair": ClassTissueFlair, "ClassTumorPost": ClassTumorPost, "ClassTumorPre": ClassTumorPre, "ClassTumorFlair": ClassTumorFlair, "ClassEdemaPost": ClassEdemaPost, "ClassEdemaPre": ClassEdemaPre, "ClassEdemaFlair": ClassEdemaFlair} datapd=pd.DataFrame.from_dict(datasetcomplete,orient="index") # print (datapd) datapd=datapd.transpose() # datapd=pd.DataFrame(dict([ (k,Series(v)) for k,v in datasetcomplete.iteritems() ])) datapd.to_csv("DataExample.csv",index=False) # ### Create some scatter plots # In[30]: # Display Tumor vs NAWM IND=np.random.randint(1000, size=100) fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.scatter(ClassTissuePost[IND,], ClassTissuePre[IND,], ClassTissueFlair[IND,]) ax.scatter(ClassTumorPost[IND,], ClassTumorPre[IND,], ClassTumorFlair[IND,], c='r', marker='^') ax.set_xlabel('post') ax.set_ylabel('pret') ax.set_zlabel('FLAIR') plt.show() fig = plt.figure() ax = fig.add_subplot(111) ax.scatter(ClassTissuePost[IND,], ClassTissuePre[IND,]) ax.scatter(ClassTumorPost[IND,], ClassTumorPre[IND,], c='r', marker='^') ax.set_xlabel('post') ax.set_ylabel('pret') plt.show() # ## Describe the data # In[31]: # descriptions print(datapd.describe()) # In[ ]:
{ "content_hash": "bf3e4b6fe763a77e5bdddcf2e20b9ac1", "timestamp": "", "source": "github", "line_count": 190, "max_line_length": 328, "avg_line_length": 29.54736842105263, "alnum_prop": 0.7199857499109369, "repo_name": "slowvak/MachineLearningForMedicalImages", "id": "38fcc768f4a970bab82e846866ff86156b933c16", "size": "5993", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "code/Module1.py", "mode": "33188", "license": "mit", "language": [ { "name": "Jupyter Notebook", "bytes": "2149478" }, { "name": "Python", "bytes": "39822" } ] }
<?php namespace Oro\Bundle\UserBundle\Tests\Functional; use Symfony\Component\DomCrawler\Form; use Symfony\Component\DomCrawler\Crawler; use Oro\Bundle\TestFrameworkBundle\Test\WebTestCase; /** * @outputBuffering enabled * @dbIsolation * @dbReindex */ class ControllersRoleTest extends WebTestCase { protected function setUp() { $this->initClient(array(), $this->generateBasicAuthHeader()); } public function testIndex() { $this->client->request('GET', $this->getUrl('oro_user_role_index')); $result = $this->client->getResponse(); $this->assertHtmlResponseStatusCodeEquals($result, 200); } public function testCreate() { /** @var Crawler $crawler */ $crawler = $this->client->request('GET', $this->getUrl('oro_user_role_create')); /** @var Form $form */ $form = $crawler->selectButton('Save and Close')->form(); $form['oro_user_role_form[label]'] = 'testRole'; $form['oro_user_role_form[owner]']= 1; $this->client->followRedirects(true); $crawler = $this->client->submit($form); $result = $this->client->getResponse(); $this->assertHtmlResponseStatusCodeEquals($result, 200); $this->assertContains("Role saved", $crawler->html()); } public function testUpdate() { $response = $this->client->requestGrid( 'roles-grid', array('roles-grid[_filter][label][value]' => 'testRole') ); $result = $this->getJsonResponseContent($response, 200); $result = reset($result['data']); /** @var Crawler $crawler */ $crawler = $this->client->request( 'GET', $this->getUrl('oro_user_role_update', array('id' => $result['id'])) ); /** @var Form $form */ $form = $crawler->selectButton('Save and Close')->form(); $form['oro_user_role_form[label]'] = 'testRoleUpdated'; $form['oro_user_role_form[appendUsers]'] = 1; $this->client->followRedirects(true); $crawler = $this->client->submit($form); $result = $this->client->getResponse(); $this->assertHtmlResponseStatusCodeEquals($result, 200); $this->assertContains("Role saved", $crawler->html()); } public function testGridData() { $response = $this->client->requestGrid( 'roles-grid', array('roles-grid[_filter][label][value]' => 'testRoleUpdated') ); $result = $this->getJsonResponseContent($response, 200); $result = reset($result['data']); $response = $this->client->requestGrid( 'role-users-grid', array( 'role-users-grid[_filter][has_role][value]' => 1, 'role-users-grid[role_id]' => $result['id'] ) ); $result = $this->getJsonResponseContent($response, 200); $result = reset($result['data']); $this->assertEquals(1, $result['id']); } }
{ "content_hash": "449e7b7015f57d2ac1f987874781b9dd", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 88, "avg_line_length": 30.464646464646464, "alnum_prop": 0.5742705570291777, "repo_name": "mszajner/platform", "id": "aba08fb5c6145de885c146dea4263b38ccfc0d8f", "size": "3016", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/Oro/Bundle/UserBundle/Tests/Functional/ControllersRoleTest.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "422319" }, { "name": "Cucumber", "bytes": "660" }, { "name": "HTML", "bytes": "1074880" }, { "name": "JavaScript", "bytes": "3395224" }, { "name": "PHP", "bytes": "10197559" } ] }
TODO: Write a gem description ## Installation Add this line to your application's Gemfile: gem 'bio-snpeff' And then execute: $ bundle Or install it yourself as: $ gem install bio-snpeff ## Usage TODO: Write usage instructions here ## Contributing 1. Fork it ( https://github.com/[my-github-username]/bio-snpeff/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
{ "content_hash": "94b121800bdd860dab2d37d9af5b1e73", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 70, "avg_line_length": 20.51851851851852, "alnum_prop": 0.7129963898916968, "repo_name": "gusevfe/bio-snpeff", "id": "58d6a8f1af02b7f424792447f8400c8cb8a2adbb", "size": "569", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "8026" } ] }
use std::fmt; use protocol::command::CMD_CONNECT; use protocol::message::{IrcMessage, RawMessage, ParseMessageError, ParseMessageErrorKind}; #[derive(Debug, Clone, Eq, PartialEq)] pub struct ConnectCommand<'a> { target_server: &'a str, port: u16, remote_server: Option<&'a str>, } impl<'a> ConnectCommand<'a> { pub fn new(target: &'a str, port: u16, remote: Option<&'a str>) -> ConnectCommand<'a> { ConnectCommand { target_server: target, port: port, remote_server: remote, } } pub fn target_server(&self) -> &'a str { self.target_server } pub fn port(&self) -> u16 { self.port } pub fn remote_server(&self) -> Option<&'a str> { self.remote_server } } impl<'a> fmt::Display for ConnectCommand<'a> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { try!(write!(f, "{} {} {}", CMD_CONNECT, self.target_server, self.port)); match self.remote_server { None => Ok(()), Some(t) => write!(f, " {}", t), } } } impl<'a> IrcMessage<'a> for ConnectCommand<'a> { fn from_raw(raw: &RawMessage<'a>) -> Result<ConnectCommand<'a>, ParseMessageError> { let mut params = raw.parameters(); let (t, p) = match (params.next(), params.next()) { (Some(t), Some(p)) => { let p = match p.parse::<u16>() { Err(..) => { return Err(ParseMessageError::new(ParseMessageErrorKind::InvalidParam, "Port should be a valid u16 number")); }, Ok(p) => p, }; (t, p) }, _ => { return Err(ParseMessageError::new(ParseMessageErrorKind::NeedMoreParams, "CONNECT requires at least 2 parameters")); }, }; Ok(ConnectCommand::new(t, p, params.next())) } }
{ "content_hash": "df906cac79a38580c4b2db402168fb08", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 96, "avg_line_length": 30.08823529411765, "alnum_prop": 0.49266862170087977, "repo_name": "zonyitoo/irc-rs", "id": "5aec1b4b04c49066db35f46b7fe8de69e0592efc", "size": "2046", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/protocol/command/connect.rs", "mode": "33188", "license": "mit", "language": [ { "name": "Rust", "bytes": "119010" } ] }
@interface NSURLDownload (Synchronous) + (BOOL)sendSynchoronousRequest:(NSURLRequest *)request saveTo:(NSString *)path error:(NSError **)error; @end
{ "content_hash": "f4dff49ede3c601b87efc7ca68144057", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 73, "avg_line_length": 29.5, "alnum_prop": 0.6610169491525424, "repo_name": "upsuper/renrenfs", "id": "0e2eb4c016f5bd7ce38d549ac9bcc54d99af921d", "size": "372", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Categories/NSURLDownload+Synchronous.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Objective-C", "bytes": "72461" } ] }
""" Some tests in this file use [syrupy](https://github.com/tophat/syrupy) for snapshot testing aka golden testing. The GCM API calls are captured with a gRPC fake and compared to the existing snapshot file in the __snapshots__ directory. If an expected behavior change is made to the exporter causing these tests to fail, regenerate the snapshots by running tox to pass the --snapshot-update flag to pytest: ```sh tox -e py310-ci-test-cloudmonitoring -- --snapshot-update ``` Be sure to review the changes. """ from typing import List, Union import pytest from fixtures.gcmfake import GcmFake, GcmFakeMeterProvider from google.auth.credentials import AnonymousCredentials from google.cloud.monitoring_v3 import MetricServiceClient from opentelemetry.exporter.cloud_monitoring import ( CloudMonitoringMetricsExporter, ) from opentelemetry.metrics import CallbackOptions, Observation from opentelemetry.sdk.metrics.view import ( ExplicitBucketHistogramAggregation, View, ) from opentelemetry.sdk.resources import Resource from opentelemetry.util.types import Attributes PROJECT_ID = "fakeproject" LABELS: Attributes = { "string": "string", "int": 123, "float": 123.4, } def test_create_monitoring_exporter() -> None: client = MetricServiceClient(credentials=AnonymousCredentials()) CloudMonitoringMetricsExporter(project_id=PROJECT_ID, client=client) @pytest.mark.parametrize( "value", [pytest.param(123, id="int"), pytest.param(45.6, id="float")] ) def test_counter( value: Union[float, int], gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider() counter = meter_provider.get_meter(__name__).create_counter( "mycounter", description="foo", unit="{myunit}" ) counter.add(value, LABELS) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls @pytest.mark.parametrize( "value", [pytest.param(123, id="int"), pytest.param(45.6, id="float")] ) def test_up_down_counter( value: Union[float, int], gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider() updowncounter = meter_provider.get_meter(__name__).create_up_down_counter( "myupdowncounter", description="foo", unit="{myunit}" ) updowncounter.add(value, LABELS) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls def test_histogram_default_buckets( gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider() histogram = meter_provider.get_meter(__name__).create_histogram( "myhistogram", description="foo", unit="{myunit}" ) for value in range(10_000): histogram.record(value, LABELS) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls def test_histogram_single_bucket( gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider( views=[ View( instrument_name="myhistogram", aggregation=ExplicitBucketHistogramAggregation( boundaries=[5.5] ), ) ] ) histogram = meter_provider.get_meter(__name__).create_histogram( "myhistogram", description="foo", unit="{myunit}" ) for value in range(10_000): histogram.record(value, LABELS) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls @pytest.mark.parametrize( "value", [pytest.param(123, id="int"), pytest.param(45.6, id="float")] ) def test_observable_counter( value: Union[float, int], gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: def callback(_: CallbackOptions) -> List[Observation]: return [Observation(value, LABELS)] meter_provider = gcmfake_meter_provider() meter_provider.get_meter(__name__).create_observable_counter( "myobservablecounter", callbacks=[callback], description="foo", unit="{myunit}", ) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls @pytest.mark.parametrize( "value", [pytest.param(123, id="int"), pytest.param(45.6, id="float")] ) def test_observable_updowncounter( value: Union[float, int], gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: def callback(_: CallbackOptions) -> List[Observation]: return [Observation(value, LABELS)] meter_provider = gcmfake_meter_provider() meter_provider.get_meter(__name__).create_observable_up_down_counter( "myobservableupdowncounter", callbacks=[callback], description="foo", unit="{myunit}", ) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls @pytest.mark.parametrize( "value", [pytest.param(123, id="int"), pytest.param(45.6, id="float")] ) def test_observable_gauge( value: Union[float, int], gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: def callback(_: CallbackOptions) -> List[Observation]: return [Observation(value, LABELS)] meter_provider = gcmfake_meter_provider() meter_provider.get_meter(__name__).create_observable_gauge( "myobservablegauge", callbacks=[callback], description="foo", unit="{myunit}", ) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls def test_invalid_label_keys( gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider() counter = meter_provider.get_meter(__name__).create_counter( "mycounter", description="foo", unit="{myunit}" ) counter.add(12, {"1some.invalid$\\key": "value"}) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls # See additional tests in test_resource.py def test_with_resource( gcmfake_meter_provider: GcmFakeMeterProvider, gcmfake: GcmFake, snapshot_gcmcalls, ) -> None: meter_provider = gcmfake_meter_provider( resource=Resource.create( { "cloud.platform": "gcp_kubernetes_engine", "cloud.availability_zone": "myavailzone", "k8s.cluster.name": "mycluster", "k8s.namespace.name": "myns", "k8s.pod.name": "mypod", "k8s.container.name": "mycontainer", }, ) ) counter = meter_provider.get_meter(__name__).create_counter( "mycounter", description="foo", unit="{myunit}" ) counter.add(12, LABELS) meter_provider.force_flush() assert gcmfake.get_calls() == snapshot_gcmcalls
{ "content_hash": "4e0eeb6c6fe13206bd99ac482c1d27c2", "timestamp": "", "source": "github", "line_count": 229, "max_line_length": 95, "avg_line_length": 30.951965065502183, "alnum_prop": 0.6695823927765236, "repo_name": "GoogleCloudPlatform/opentelemetry-operations-python", "id": "0156f7301db569955ac73d4a6832c7f034af9568", "size": "7716", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "opentelemetry-exporter-gcp-monitoring/tests/test_cloud_monitoring.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "1478" }, { "name": "Python", "bytes": "162713" }, { "name": "Shell", "bytes": "1841" } ] }
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. namespace core\event; defined('MOODLE_INTERNAL') || die(); /** * Cohort deleted event class. * * @package core * @since Moodle 2.6 * @copyright 2013 Dan Poltawski <dan@moodle.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class cohort_deleted extends base { /** * Init method. * * @return void */ protected function init() { $this->data['crud'] = 'd'; $this->data['level'] = self::LEVEL_OTHER; $this->data['objecttable'] = 'cohort'; } /** * Returns localised general event name. * * @return string */ public static function get_name() { return get_string('event_core_deleted', 'core_cohort'); } /** * Returns description of what happened. * * @return string */ public function get_description() { return 'Cohort '.$this->objectid.' was deleted by '.$this->userid.' from context '.$this->contextid; } /** * Returns relevant URL. * * @return \moodle_url */ public function get_url() { return new \moodle_url('/cohort/index.php', array('contextid' => $this->contextid)); } /** * Return legacy event name. * * @return null|string legacy event name */ public static function get_legacy_eventname() { return 'cohort_deleted'; } /** * Return legacy event data. * * @return stdClass */ protected function get_legacy_eventdata() { return $this->get_record_snapshot('cohort', $this->objectid); } }
{ "content_hash": "b4c6f1706372f884cf94ecab3fb3cc9a", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 108, "avg_line_length": 26.333333333333332, "alnum_prop": 0.6154517677869926, "repo_name": "faisalsyfl/DINAMIK12", "id": "ebd3d9b2463adf60a7830076c2dfc4a52c7c7210", "size": "2469", "binary": false, "copies": "11", "ref": "refs/heads/master", "path": "kompetisijaringan/lib/classes/event/cohort_deleted.php", "mode": "33188", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "1205" }, { "name": "ApacheConf", "bytes": "435" }, { "name": "CSS", "bytes": "2210571" }, { "name": "Gherkin", "bytes": "597017" }, { "name": "HTML", "bytes": "2324742" }, { "name": "Java", "bytes": "14870" }, { "name": "JavaScript", "bytes": "14853851" }, { "name": "PHP", "bytes": "58354432" }, { "name": "PLSQL", "bytes": "4867" }, { "name": "PLpgSQL", "bytes": "483151" }, { "name": "Perl", "bytes": "20769" }, { "name": "XSLT", "bytes": "33921" } ] }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace _04.Roli_The_Coder { public class Event { public int Id { get; set; } public string Name { get; set; } public List<string> Participants { get; set; } } public class Program { static void Main(string[] args) { var result = new List<Event>(); var eventsById = new Dictionary<int, Event>(); while (true) { //Console.WriteLine("test2"); var currentLine = Console.ReadLine(); if (currentLine == "Time for Code") { break; } var lineParts = currentLine.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var eventId = 0; if (!int.TryParse(lineParts[0], out eventId)) { //Console.WriteLine(currentLine + "c1"); continue; } string eventName = null; if (lineParts.Length > 0 && lineParts[1].StartsWith("#")) { eventName = lineParts[1].Trim('#'); } else { //Console.WriteLine(currentLine + "c2"); continue; } var participants = new List<string>(); if (lineParts.Length > 2) { participants = lineParts.Skip(2).ToList(); //Console.WriteLine("participants: " + String.Join(", ", participants)); if (!participants.All(p => p.StartsWith("@"))) { //Console.WriteLine(currentLine + "c3"); continue; } } if (eventsById.ContainsKey(eventId)) { if (eventsById[eventId].Name == eventName) { var existingEvent = eventsById[eventId]; foreach (var participant in participants) { if (!existingEvent.Participants.Contains(participant)) { existingEvent.Participants.Add(participant); } } } else { //Console.WriteLine(currentLine + "c4"); continue; } } else { var newEvent = new Event { Id = eventId, Name = eventName, Participants = participants }; result.Add(newEvent); eventsById.Add(eventId, newEvent); } //Console.WriteLine("test"); } var sortedEvents = result .OrderByDescending(e => e.Participants.Count) .ThenBy(e => e.Name); // Console.WriteLine("sortedEventsSize " + sortedEvents.Count()); foreach (var ev in sortedEvents) { var distinctParticipants = ev.Participants.Distinct().ToList(); Console.WriteLine($"{ev.Name} - {distinctParticipants.Count}"); foreach (var participant in distinctParticipants.OrderBy(p => p)) { Console.WriteLine(participant); } } } } }
{ "content_hash": "ef7d6453feb74efbd3b7431f688346b7", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 104, "avg_line_length": 33.469026548672566, "alnum_prop": 0.4140666314119513, "repo_name": "NikolaySpasov/Softuni", "id": "5314b02bd4eadc8be193acbc01f2cbf313e9e49b", "size": "3784", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Programming Fundamentals/17. EXAM PREPARATION II/04. Roli - The Coder/Program.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "1159007" } ] }
<!doctype html> <html> <title>npm-search</title> <meta http-equiv="content-type" value="text/html;utf-8"> <link rel="stylesheet" type="text/css" href="../../static/style.css"> <link rel="canonical" href="https://www.npmjs.org/doc/api/npm-search.html"> <script async=true src="../../static/toc.js"></script> <body> <div id="wrapper"> <h1><a href="../api/npm-search.html">npm-search</a></h1> <p>Search for packages</p> <h2 id="synopsis">SYNOPSIS</h2> <pre><code>npm.commands.search(searchTerms, [silent,] [staleness,] callback) </code></pre><h2 id="description">DESCRIPTION</h2> <p>Search the registry for packages matching the search terms. The available parameters are:</p> <ul> <li>searchTerms: Array of search terms. These terms are case-insensitive.</li> <li>silent: If true, npm will not log anything to the console.</li> <li>staleness: This is the threshold for stale packages. &quot;Fresh&quot; packages are not refreshed from the registry. This value is measured in seconds.</li> <li><p>callback: Returns an object where each key is the name of a package, and the value is information about that package along with a &#39;words&#39; property, which is a space-delimited string of all of the interesting words in that package. The only properties included are those that are searched, which generally include:</p> <ul> <li>name</li> <li>description</li> <li>maintainers</li> <li>url</li> <li>keywords</li> </ul> </li> </ul> <p>A search on the registry excludes any result that does not match all of the search terms. It also removes any items from the results that contain an excluded term (the &quot;searchexclude&quot; config). The search is case insensitive and doesn&#39;t try to read your mind (it doesn&#39;t do any verb tense matching or the like).</p> </div> <table border=0 cellspacing=0 cellpadding=0 id=npmlogo> <tr><td style="width:180px;height:10px;background:rgb(237,127,127)" colspan=18>&nbsp;</td></tr> <tr><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td><td style="width:40px;height:10px;background:#fff" colspan=4>&nbsp;</td><td rowspan=4 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td><td colspan=6 style="width:60px;height:10px;background:#fff">&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=4>&nbsp;</td></tr> <tr><td colspan=2 style="width:20px;height:30px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=4 colspan=2>&nbsp;</td><td style="width:10px;height:20px;background:rgb(237,127,127)" rowspan=2>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:20px;height:10px;background:#fff" rowspan=3 colspan=2>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:#fff" rowspan=3>&nbsp;</td><td style="width:10px;height:10px;background:rgb(237,127,127)" rowspan=3>&nbsp;</td></tr> <tr><td style="width:10px;height:10px;background:#fff" rowspan=2>&nbsp;</td></tr> <tr><td style="width:10px;height:10px;background:#fff">&nbsp;</td></tr> <tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr> <tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr> </table> <p id="footer">npm-search &mdash; npm@2.14.4</p>
{ "content_hash": "e255eaeb13f4aaee05e04acc1552d43e", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 807, "avg_line_length": 69.21052631578948, "alnum_prop": 0.7249683143219265, "repo_name": "keithrob/openshift-node4", "id": "e4051c1b0e9caf3feeedb6d62e7751f8417bbd52", "size": "3945", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "bin/node/lib/node_modules/npm/html/doc/api/npm-search.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "2036209" }, { "name": "C++", "bytes": "491621" }, { "name": "Groff", "bytes": "36675" }, { "name": "HTML", "bytes": "155" }, { "name": "JavaScript", "bytes": "510" }, { "name": "Objective-C", "bytes": "27694" }, { "name": "Shell", "bytes": "4265" } ] }
m2php - a library to develop Mongrel2 handlers in PHP ===================================================== * Mongrel2: <http://mongrel2.org> * Mongrel2 Python Library: <http://sheddingbikes.com/posts/1279007133.html> Requirements ------------ * ZeroMQ 2.0.7 or later: <http://www.zeromq.org/> * PHP 5.3: <http://php.net> * ZeroMQ PHP bindings: <http://www.zeromq.org/bindings:php> Fetch ----- The recommended way to install m2php is [through composer](http://packagist.org). Just create a composer.json file for your project: { "require": { "winks/m2php": "dev-master" } } And run these two commands to install it: $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install Now you can add the autoloader, and you will have access to the library: ```php <?php require 'vendor/autoload.php'; ``` Usage ----- ```php <?php use Mongrel2\Connection; $sender_id = "82209006-86FF-4982-B5EA-D1E29E55D481"; $conn = new Connection($sender_id, "tcp://127.0.0.1:9997", "tcp://127.0.0.1:9996"); while (true) { $req = $conn->recv(); if ($req->is_disconnect()) { continue; } $conn->reply_http($req, 'Hello World'); } ``` Example ------- Before running the example, you need to have composer set up an autoloader: $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install Now you can run the example. $ cd example $ m2sh load $ m2sh start # in a separate shell $ php hello.php # in a separate shell or browser $ curl http://localhost:6767/hello Tests ----- Before running the tests you need to have composer set up an autoloader: $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install Now you can run the unit tests. $ phpunit LICENSE ------- New BSD, see LICENSE.
{ "content_hash": "c56c4ad039ecb01e23fa5bcd4262768c", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 83, "avg_line_length": 20, "alnum_prop": 0.6279569892473118, "repo_name": "winks/m2php", "id": "43a79194f45a9d66619fb7812577696c0204c72e", "size": "1860", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "PHP", "bytes": "4851" } ] }
<?xml version="1.0" encoding="UTF-8"?> <billStatus> <bill> <relatedBills /> <committees> <billCommittees> <item> <name>Foreign Affairs Committee</name> <type>Standing</type> <chamber>House</chamber> <subcommittees /> <activities> <item> <name>Referred to</name> <date>2017-01-10T15:05:30Z</date> </item> </activities> <systemCode>hsfa00</systemCode> </item> </billCommittees> </committees> <summaries> <billSummaries> <item> <actionDate>2017-01-10</actionDate> <text><![CDATA[<p><strong>State Sponsors of Terrorism Review Enhancement Act</strong></p> <p>This bill amends the Foreign Assistance Act of 1961, the Arms Export Control Act, and the Export Administration Act of 1979, with respect to the rescission of a determination of a country as a state sponsor of terrorism, to require that the President has submitted to Congress a report justifying such rescission 90 days (currently 45 days) prior to the rescission taking effect, which certifies that the government concerned has not provided support for international terrorism during the preceding 24 months (currently 6 months).</p> <p>No such rescission under the Foreign Assistance Act of 1961 or the Export Administration Act of 1979 may be made if Congress, within 90 days after receipt of such a presidential report, enacts a joint resolution pursuant to the Arms Export Control Act prohibiting such rescission.</p>]]></text> <lastSummaryUpdateDate>2017-02-01T22:59:03Z</lastSummaryUpdateDate> <actionDesc>Introduced in House</actionDesc> <name>Introduced in House</name> <updateDate>2017-01-10T05:00:00Z</updateDate> <versionCode>00</versionCode> </item> </billSummaries> </summaries> <originChamber>House</originChamber> <createDate>2017-01-11T05:09:43Z</createDate> <version>1.0.0</version> <latestAction> <actionDate>2017-01-10</actionDate> <text>Referred to the House Committee on Foreign Affairs.</text> <links /> </latestAction> <notes /> <congress>115</congress> <billNumber>430</billNumber> <policyArea> <name>International Affairs</name> </policyArea> <updateDate>2017-06-19T20:30:13Z</updateDate> <cosponsors> <item> <district>5</district> <isOriginalCosponsor>True</isOriginalCosponsor> <party>R</party> <fullName>Rep. Abraham, Ralph Lee [R-LA-5]</fullName> <middleName>Lee</middleName> <sponsorshipDate>2017-01-10</sponsorshipDate> <firstName>Ralph</firstName> <bioguideId>A000374</bioguideId> <lastName>Abraham</lastName> <state>LA</state> <sponsorshipWithdrawnDate /> <identifiers> <bioguideId>A000374</bioguideId> <lisID>2244</lisID> <gpoId /> </identifiers> </item> <item> <district>2</district> <isOriginalCosponsor>True</isOriginalCosponsor> <party>R</party> <fullName>Rep. Hill, J. French [R-AR-2]</fullName> <middleName>French</middleName> <sponsorshipDate>2017-01-10</sponsorshipDate> <firstName>J.</firstName> <bioguideId>H001072</bioguideId> <lastName>Hill</lastName> <state>AR</state> <sponsorshipWithdrawnDate /> <identifiers> <gpoId /> <bioguideId>H001072</bioguideId> <lisID>2223</lisID> </identifiers> </item> <item> <district>1</district> <isOriginalCosponsor>True</isOriginalCosponsor> <party>R</party> <fullName>Rep. Gohmert, Louie [R-TX-1]</fullName> <middleName /> <sponsorshipDate>2017-01-10</sponsorshipDate> <firstName>Louie</firstName> <bioguideId>G000552</bioguideId> <lastName>Gohmert</lastName> <state>TX</state> <sponsorshipWithdrawnDate /> <identifiers> <bioguideId>G000552</bioguideId> <lisID>1801</lisID> <gpoId>8157</gpoId> </identifiers> </item> <item> <district>2</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Pearce, Stevan [R-NM-2]</fullName> <middleName /> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>Stevan</firstName> <bioguideId>P000588</bioguideId> <lastName>Pearce</lastName> <state>NM</state> <sponsorshipWithdrawnDate /> <identifiers> <lisID>1738</lisID> <gpoId>8057</gpoId> <bioguideId>P000588</bioguideId> </identifiers> </item> <item> <district>11</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Meadows, Mark [R-NC-11]</fullName> <middleName /> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>Mark</firstName> <bioguideId>M001187</bioguideId> <lastName>Meadows</lastName> <state>NC</state> <sponsorshipWithdrawnDate /> <identifiers> <lisID>2142</lisID> <gpoId /> <bioguideId>M001187</bioguideId> </identifiers> </item> <item> <district>8</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Davidson, Warren [R-OH-8]</fullName> <middleName /> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>Warren</firstName> <bioguideId>D000626</bioguideId> <lastName>Davidson</lastName> <state>OH</state> <sponsorshipWithdrawnDate /> <identifiers> <gpoId /> <lisID>2296</lisID> <bioguideId>D000626</bioguideId> </identifiers> </item> <item> <district>5</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Garrett, Thomas A., Jr. [R-VA-5]</fullName> <middleName>A.</middleName> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>Thomas</firstName> <bioguideId>G000580</bioguideId> <lastName>Garrett</lastName> <state>VA</state> <sponsorshipWithdrawnDate /> <identifiers> <bioguideId>G000580</bioguideId> <lisID>2353</lisID> <gpoId /> </identifiers> </item> <item> <district>25</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Williams, Roger [R-TX-25]</fullName> <middleName /> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>Roger</firstName> <bioguideId>W000816</bioguideId> <lastName>Williams</lastName> <state>TX</state> <sponsorshipWithdrawnDate /> <identifiers> <bioguideId>W000816</bioguideId> <lisID>2165</lisID> <gpoId /> </identifiers> </item> <item> <district>39</district> <isOriginalCosponsor>False</isOriginalCosponsor> <party>R</party> <fullName>Rep. Royce, Edward R. [R-CA-39]</fullName> <middleName /> <sponsorshipDate>2017-01-30</sponsorshipDate> <firstName>ED</firstName> <bioguideId>R000487</bioguideId> <lastName>ROYCE</lastName> <state>CA</state> <sponsorshipWithdrawnDate /> <identifiers> <bioguideId>R000487</bioguideId> <lisID>998</lisID> <gpoId>7845</gpoId> </identifiers> </item> </cosponsors> <laws /> <introducedDate>2017-01-10</introducedDate> <actions> <item> <actionCode>H11100</actionCode> <sourceSystem> <name>House floor actions</name> <code>2</code> </sourceSystem> <text>Referred to the House Committee on Foreign Affairs.</text> <committee> <systemCode>hsfa00</systemCode> <name>Foreign Affairs Committee</name> </committee> <type>IntroReferral</type> <actionDate>2017-01-10</actionDate> <links /> </item> <item> <actionCode>Intro-H</actionCode> <sourceSystem> <name>Library of Congress</name> <code>9</code> </sourceSystem> <text>Introduced in House</text> <committee /> <type>IntroReferral</type> <actionDate>2017-01-10</actionDate> <links /> </item> <item> <actionCode>1000</actionCode> <sourceSystem> <name>Library of Congress</name> <code>9</code> </sourceSystem> <text>Introduced in House</text> <committee /> <type>IntroReferral</type> <actionDate>2017-01-10</actionDate> <links /> </item> <actionTypeCounts> <introducedInTheHouse>1</introducedInTheHouse> <billReferrals>1</billReferrals> <introducedInHouse>1</introducedInHouse> </actionTypeCounts> <actionByCounts> <houseOfRepresentatives>3</houseOfRepresentatives> </actionByCounts> </actions> <titles> <item> <parentTitleType /> <titleType>(Extracted from GPO) Short Titles as Introduced</titleType> <title>State Sponsors of Terrorism Review Enhancement Act</title> <chamberCode /> <chamberName /> </item> <item> <parentTitleType /> <titleType>Short Titles as Introduced</titleType> <title>State Sponsors of Terrorism Review Enhancement Act</title> <chamberCode /> <chamberName /> </item> <item> <parentTitleType /> <titleType>Official Title as Introduced</titleType> <title>To modify authorities that provide for rescission of determinations of countries as state sponsors of terrorism, and for other purposes.</title> <chamberCode /> <chamberName /> </item> <item> <parentTitleType /> <titleType>Display Title</titleType> <title>State Sponsors of Terrorism Review Enhancement Act</title> <chamberCode /> <chamberName /> </item> </titles> <title>State Sponsors of Terrorism Review Enhancement Act</title> <calendarNumbers /> <constitutionalAuthorityStatementText><![CDATA[<pre>From the Congressional Record Online through the Government Publishing Office [<a href='http://www.gpo.gov'>www.gpo.gov</a>]By Mr. YOHO:H.R. 430.Congress has the power to enact this legislation pursuantto the following:Article 1, Section 8 of the Constitution[Page H300]</pre>]]></constitutionalAuthorityStatementText> <subjects> <billSubjects> <policyArea> <name>International Affairs</name> </policyArea> <legislativeSubjects> <item> <name>Congressional oversight</name> </item> <item> <name>Foreign aid and international relief</name> </item> <item> <name>Licensing and registrations</name> </item> <item> <name>Military assistance, sales, and agreements</name> </item> <item> <name>Terrorism</name> </item> <item> <name>Trade restrictions</name> </item> </legislativeSubjects> </billSubjects> </subjects> <billType>HR</billType> <recordedVotes /> <committeeReports /> <cboCostEstimates /> <amendments /> <sponsors> <item> <bioguideId>Y000065</bioguideId> <firstName>Ted</firstName> <state>FL</state> <fullName>Rep. Yoho, Ted S. [R-FL-3]</fullName> <district>3</district> <party>R</party> <byRequestType /> <lastName>Yoho</lastName> <identifiers> <bioguideId>Y000065</bioguideId> <lisID>2115</lisID> <gpoId /> </identifiers> <middleName>S.</middleName> </item> </sponsors> </bill> <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>text/xml</dc:format> <dc:language>EN</dc:language> <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights> <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor> <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description> </dublinCore> </billStatus>
{ "content_hash": "19208a30d3eb01146134def7df43fc5f", "timestamp": "", "source": "github", "line_count": 357, "max_line_length": 936, "avg_line_length": 37.56022408963585, "alnum_prop": 0.6120516071295399, "repo_name": "peter765/power-polls", "id": "45796b05a67b9becdba842b7c78e156ec500dbda", "size": "13409", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/bills/hr/hr430/fdsys_billstatus.xml", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "58567" }, { "name": "JavaScript", "bytes": "7370" }, { "name": "Python", "bytes": "22988" } ] }
End of preview.

No dataset card yet

Downloads last month
2