text
stringlengths
2
1.04M
meta
dict
import { forwardRef } from "react"; import { FontIcon, FontIconProps } from "@react-md/icon"; export const CallFontIcon = forwardRef<HTMLElement, FontIconProps>( function CallFontIcon(props, ref) { return ( <FontIcon {...props} ref={ref}> call </FontIcon> ); } );
{ "content_hash": "e7ef5c5ee2bd3bbb6d90f029ba04ebbd", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 67, "avg_line_length": 22.923076923076923, "alnum_prop": 0.6342281879194631, "repo_name": "mlaursen/react-md", "id": "69a35779d3c56d51779d3bc848b3c24fcf522a55", "size": "407", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "packages/material-icons/src/CallFontIcon.tsx", "mode": "33188", "license": "mit", "language": [ { "name": "Handlebars", "bytes": "2069" }, { "name": "JavaScript", "bytes": "26986" }, { "name": "SCSS", "bytes": "551391" }, { "name": "Shell", "bytes": "59" }, { "name": "TypeScript", "bytes": "3409778" } ], "symlink_target": "" }
/** * @param {Number} num * @param {Array<Number>} parameters * @returns {Number} * @typecheck */ function test(num, ...parameters) { __executeTypecheck__("test", "num", num, "\"Number\""); __executeTypecheck__("test", "parameters", parameters, "{\"root\":\"Array\",\"children\":[\"Number\"]}"); return __executeTypecheck__("test", "return", num + parameters[0], "\"Number\""); }
{ "content_hash": "90dd3d874d0a2e63577623c7406a478c", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 107, "avg_line_length": 28.142857142857142, "alnum_prop": 0.5939086294416244, "repo_name": "johnthecat/babel-plugin-jsdoc-runtime-typecheck", "id": "b74db4fde5f198754e7775df3016c7898d068577", "size": "394", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/smoke/fixtures/assertion-inject/expected/arguments-rest.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "75126" } ], "symlink_target": "" }
 html, body { margin: 0 auto; font-family: Segoe UI,SegoeUI,Segoe WP,Helvetica Neue,Helvetica,Tahoma,Arial,sans-serif; height: 100%; } .content { display: flex; flex-direction: column; position: relative; align-items: center; min-height: 100%; overflow: hidden; } .content__background-image { z-index: -1; opacity: 0.1; width: 50%; height: 100%; position: absolute; } .content__background-image--left { left: -25%; } .content__background-image--right { right: -25%; } .content__image { width: 16rem; padding-top: 15vh; } .content__text { margin-top: 2rem; align-items: center; display: flex; flex-direction: column; } .content__text h3 { margin-bottom: 0; } .content__links-list { padding: 0; } .content__links-list li { list-style-type: none; display: inline-block; margin: 0 1rem; } .content__links-list li a { color: #337ab7; }
{ "content_hash": "b5b0d5118ea1fe8a8d76c35cf01915e6", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 92, "avg_line_length": 15.790322580645162, "alnum_prop": 0.5944841675178754, "repo_name": "riganti/test-utils", "id": "67bb89736312bbe8a66cd0509dc3b11acd52248a", "size": "981", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/Riganti.Selenium.DotVVM3Samples/wwwroot/Resources/style.css", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "11324" }, { "name": "C#", "bytes": "180455" }, { "name": "JavaScript", "bytes": "325" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_79) on Mon Aug 17 17:11:15 IST 2015 --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>org.apache.solr.rest Class Hierarchy (Solr 5.3.0 API)</title> <meta name="date" content="2015-08-17"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.solr.rest Class Hierarchy (Solr 5.3.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/solr/response/transform/package-tree.html">Prev</a></li> <li><a href="../../../../org/apache/solr/rest/schema/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/solr/rest/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">Hierarchy For Package org.apache.solr.rest</h1> <span class="strong">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="http://download.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="strong">Object</span></a> <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResource.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResource</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResourceStorage</span></a> <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.JsonStorage.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResourceStorage.JsonStorage</span></a></li> </ul> </li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.FileStorageIO.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResourceStorage.FileStorageIO</span></a> (implements org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.StorageIO.html" title="interface in org.apache.solr.rest">ManagedResourceStorage.StorageIO</a>)</li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.InMemoryStorageIO.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResourceStorage.InMemoryStorageIO</span></a> (implements org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.StorageIO.html" title="interface in org.apache.solr.rest">ManagedResourceStorage.StorageIO</a>)</li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.ZooKeeperStorageIO.html" title="class in org.apache.solr.rest"><span class="strong">ManagedResourceStorage.ZooKeeperStorageIO</span></a> (implements org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.StorageIO.html" title="interface in org.apache.solr.rest">ManagedResourceStorage.StorageIO</a>)</li> <li type="circle">org.restlet.resource.Resource <ul> <li type="circle">org.restlet.resource.ServerResource <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/BaseSolrResource.html" title="class in org.apache.solr.rest"><span class="strong">BaseSolrResource</span></a> <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/RestManager.ManagedEndpoint.html" title="class in org.apache.solr.rest"><span class="strong">RestManager.ManagedEndpoint</span></a> (implements org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/DELETEable.html" title="interface in org.apache.solr.rest">DELETEable</a>, org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/GETable.html" title="interface in org.apache.solr.rest">GETable</a>, org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/POSTable.html" title="interface in org.apache.solr.rest">POSTable</a>, org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/PUTable.html" title="interface in org.apache.solr.rest">PUTable</a>)</li> </ul> </li> </ul> </li> </ul> </li> <li type="circle">org.restlet.Restlet (implements org.restlet.Uniform) <ul> <li type="circle">org.restlet.Application <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/SolrSchemaRestApi.html" title="class in org.apache.solr.rest"><span class="strong">SolrSchemaRestApi</span></a></li> </ul> </li> </ul> </li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/RestManager.html" title="class in org.apache.solr.rest"><span class="strong">RestManager</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/RestManager.Registry.html" title="class in org.apache.solr.rest"><span class="strong">RestManager.Registry</span></a></li> <li type="circle">org.restlet.representation.Variant <ul> <li type="circle">org.restlet.representation.RepresentationInfo <ul> <li type="circle">org.restlet.representation.Representation <ul> <li type="circle">org.restlet.representation.StreamRepresentation <ul> <li type="circle">org.restlet.representation.OutputRepresentation <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/BaseSolrResource.SolrOutputRepresentation.html" title="class in org.apache.solr.rest"><span class="strong">BaseSolrResource.SolrOutputRepresentation</span></a></li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> <h2 title="Interface Hierarchy">Interface Hierarchy</h2> <ul> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/DELETEable.html" title="interface in org.apache.solr.rest"><span class="strong">DELETEable</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/GETable.html" title="interface in org.apache.solr.rest"><span class="strong">GETable</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResource.ChildResourceSupport.html" title="interface in org.apache.solr.rest"><span class="strong">ManagedResource.ChildResourceSupport</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceObserver.html" title="interface in org.apache.solr.rest"><span class="strong">ManagedResourceObserver</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/ManagedResourceStorage.StorageIO.html" title="interface in org.apache.solr.rest"><span class="strong">ManagedResourceStorage.StorageIO</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/POSTable.html" title="interface in org.apache.solr.rest"><span class="strong">POSTable</span></a></li> <li type="circle">org.apache.solr.rest.<a href="../../../../org/apache/solr/rest/PUTable.html" title="interface in org.apache.solr.rest"><span class="strong">PUTable</span></a></li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/apache/solr/response/transform/package-tree.html">Prev</a></li> <li><a href="../../../../org/apache/solr/rest/schema/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/apache/solr/rest/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2015 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
{ "content_hash": "71cfb5a8ba14beb31cafd423ae340ac0", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 765, "avg_line_length": 52.6231884057971, "alnum_prop": 0.6646470210226751, "repo_name": "changwu/mqa", "id": "3becd020125137af829e302ff6561f0101270d80", "size": "10893", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "solr-5.3.0/docs/solr-core/org/apache/solr/rest/package-tree.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AMPL", "bytes": "291" }, { "name": "Batchfile", "bytes": "46111" }, { "name": "CSS", "bytes": "418498" }, { "name": "HTML", "bytes": "60871995" }, { "name": "Java", "bytes": "1263530" }, { "name": "JavaScript", "bytes": "1227196" }, { "name": "Python", "bytes": "3829" }, { "name": "Shell", "bytes": "321650" }, { "name": "XSLT", "bytes": "271109" } ], "symlink_target": "" }
'use strict'; require('../common'); const assert = require('assert'); const util = require('util'); const processUtil = process.binding('util'); const opts = {showProxy: true}; const target = {}; const handler = { get: function() { throw new Error('Getter should not be called'); } }; const proxyObj = new Proxy(target, handler); // Inspecting the proxy should not actually walk it's properties assert.doesNotThrow(() => util.inspect(proxyObj, opts)); // getProxyDetails is an internal method, not intended for public use. // This is here to test that the internals are working correctly. const details = processUtil.getProxyDetails(proxyObj); assert.strictEqual(target, details[0]); assert.strictEqual(handler, details[1]); assert.strictEqual(util.inspect(proxyObj, opts), 'Proxy [ {}, { get: [Function: get] } ]'); // Using getProxyDetails with non-proxy returns undefined assert.strictEqual(processUtil.getProxyDetails({}), undefined); // This will throw because the showProxy option is not used // and the get function on the handler object defined above // is actually invoked. assert.throws( () => util.inspect(proxyObj), /^Error: Getter should not be called$/ ); // Yo dawg, I heard you liked Proxy so I put a Proxy // inside your Proxy that proxies your Proxy's Proxy. const proxy1 = new Proxy({}, {}); const proxy2 = new Proxy(proxy1, {}); const proxy3 = new Proxy(proxy2, proxy1); const proxy4 = new Proxy(proxy1, proxy2); const proxy5 = new Proxy(proxy3, proxy4); const proxy6 = new Proxy(proxy5, proxy5); const expected0 = '{}'; const expected1 = 'Proxy [ {}, {} ]'; const expected2 = 'Proxy [ Proxy [ {}, {} ], {} ]'; const expected3 = 'Proxy [ Proxy [ Proxy [ {}, {} ], {} ], Proxy [ {}, {} ] ]'; const expected4 = 'Proxy [ Proxy [ {}, {} ], Proxy [ Proxy [ {}, {} ], {} ] ]'; const expected5 = 'Proxy [ Proxy [ Proxy [ Proxy [Array], {} ],' + ' Proxy [ {}, {} ] ],\n Proxy [ Proxy [ {}, {} ]' + ', Proxy [ Proxy [Array], {} ] ] ]'; const expected6 = 'Proxy [ Proxy [ Proxy [ Proxy [Array], Proxy [Array]' + ' ],\n Proxy [ Proxy [Array], Proxy [Array] ] ],\n' + ' Proxy [ Proxy [ Proxy [Array], Proxy [Array] ],\n' + ' Proxy [ Proxy [Array], Proxy [Array] ] ] ]'; assert.strictEqual(util.inspect(proxy1, opts), expected1); assert.strictEqual(util.inspect(proxy2, opts), expected2); assert.strictEqual(util.inspect(proxy3, opts), expected3); assert.strictEqual(util.inspect(proxy4, opts), expected4); assert.strictEqual(util.inspect(proxy5, opts), expected5); assert.strictEqual(util.inspect(proxy6, opts), expected6); assert.strictEqual(util.inspect(proxy1), expected0); assert.strictEqual(util.inspect(proxy2), expected0); assert.strictEqual(util.inspect(proxy3), expected0); assert.strictEqual(util.inspect(proxy4), expected0); assert.strictEqual(util.inspect(proxy5), expected0); assert.strictEqual(util.inspect(proxy6), expected0); // Just for fun, let's create a Proxy using Arrays. const proxy7 = new Proxy([], []); const expected7 = 'Proxy [ [], [] ]'; assert.strictEqual(util.inspect(proxy7, opts), expected7); assert.strictEqual(util.inspect(proxy7), '[]'); // Now we're just getting silly, right? const proxy8 = new Proxy(Date, []); const proxy9 = new Proxy(Date, String); const expected8 = 'Proxy [ [Function: Date], [] ]'; const expected9 = 'Proxy [ [Function: Date], [Function: String] ]'; assert.strictEqual(util.inspect(proxy8, opts), expected8); assert.strictEqual(util.inspect(proxy9, opts), expected9); assert.strictEqual(util.inspect(proxy8), '[Function: Date]'); assert.strictEqual(util.inspect(proxy9), '[Function: Date]');
{ "content_hash": "9f0704c3d57cda0b0ac19aff2f19b367", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 79, "avg_line_length": 43.43529411764706, "alnum_prop": 0.6703683640303358, "repo_name": "RPGOne/Skynet", "id": "ae6da3a34f8727fe43cbaf0ab3ce01da694152c1", "size": "3692", "binary": false, "copies": "3", "ref": "refs/heads/Miho", "path": "node-master/test/parallel/test-util-inspect-proxy.js", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "1C Enterprise", "bytes": "36" }, { "name": "Ada", "bytes": "89079" }, { "name": "Assembly", "bytes": "11425802" }, { "name": "Batchfile", "bytes": "123467" }, { "name": "C", "bytes": "34703955" }, { "name": "C#", "bytes": "55955" }, { "name": "C++", "bytes": "84647314" }, { "name": "CMake", "bytes": "220849" }, { "name": "CSS", "bytes": "39257" }, { "name": "Cuda", "bytes": "1344541" }, { "name": "DIGITAL Command Language", "bytes": "349320" }, { "name": "DTrace", "bytes": "37428" }, { "name": "Emacs Lisp", "bytes": "19654" }, { "name": "Erlang", "bytes": "39438" }, { "name": "Fortran", "bytes": "16914" }, { "name": "HTML", "bytes": "929759" }, { "name": "Java", "bytes": "112658" }, { "name": "JavaScript", "bytes": "32806873" }, { "name": "Jupyter Notebook", "bytes": "1616334" }, { "name": "Lua", "bytes": "22549" }, { "name": "M4", "bytes": "64967" }, { "name": "Makefile", "bytes": "1046428" }, { "name": "Matlab", "bytes": "888" }, { "name": "Module Management System", "bytes": "1545" }, { "name": "NSIS", "bytes": "2860" }, { "name": "Objective-C", "bytes": "131433" }, { "name": "PHP", "bytes": "750783" }, { "name": "Pascal", "bytes": "75208" }, { "name": "Perl", "bytes": "626627" }, { "name": "Perl 6", "bytes": "2495926" }, { "name": "PowerShell", "bytes": "38374" }, { "name": "Prolog", "bytes": "300018" }, { "name": "Python", "bytes": "26363074" }, { "name": "R", "bytes": "236175" }, { "name": "Rebol", "bytes": "217" }, { "name": "Roff", "bytes": "328366" }, { "name": "SAS", "bytes": "1847" }, { "name": "Scala", "bytes": "248902" }, { "name": "Scheme", "bytes": "14853" }, { "name": "Shell", "bytes": "360815" }, { "name": "TeX", "bytes": "105346" }, { "name": "Vim script", "bytes": "6101" }, { "name": "XS", "bytes": "4319" }, { "name": "eC", "bytes": "5158" } ], "symlink_target": "" }
package mars.auvtree.nodes; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; import java.beans.PropertyChangeEvent; import java.io.IOException; import java.util.HashMap; import java.util.List; import javax.swing.Action; import mars.auv.AUV; import mars.auv.AUV_Manager; import mars.auv.NodeRefreshEvent; import mars.simobjects.SimObjectManager; import mars.simobtree.SimObNodeFactory; import org.openide.actions.PasteAction; import org.openide.nodes.AbstractNode; import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.NodeEvent; import org.openide.nodes.NodeListener; import org.openide.nodes.NodeMemberEvent; import org.openide.nodes.NodeReorderEvent; import org.openide.nodes.NodeTransfer; import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.LookupEvent; import org.openide.util.LookupListener; import org.openide.util.datatransfer.PasteType; /** * This node is just the root node of the tree. It is hided in the tree. * * @author Christian * @author Thomsa Tosik */ public class RootNode extends AbstractNode implements NodeListener, LookupListener { private final Lookup.Result<NodeRefreshEvent> lookupResult; /** * * @param s * @param auv_manager */ public RootNode(HashMap s, AUV_Manager auv_manager) { super(Children.create(new AUVNodeFactory(s, auv_manager), true)); lookupResult = auv_manager.getLookup().lookupResult(NodeRefreshEvent.class); lookupResult.addLookupListener(this); } public RootNode(HashMap s, SimObjectManager simob_manager) { super(Children.create(new SimObNodeFactory(s, simob_manager), true)); lookupResult = simob_manager.getLookup().lookupResult(NodeRefreshEvent.class); lookupResult.addLookupListener(this); } /** * * @param lookupEvent */ @Override public void resultChanged(LookupEvent lookupEvent) { } /** * * @param ne */ @Override public void nodeDestroyed(NodeEvent ne) { } /** * * @param nme */ @Override public void childrenAdded(NodeMemberEvent nme) { } /** * * @param nme */ @Override public void childrenRemoved(NodeMemberEvent nme) { } /** * * @param nre */ @Override public void childrenReordered(NodeReorderEvent nre) { } @Override public void propertyChange(PropertyChangeEvent evt) { } /** * * @param context * @return */ @Override public Action[] getActions(boolean context) { return new Action[]{ PasteAction.get(PasteAction.class) }; } /** * * @param t * @param s */ @Override protected void createPasteTypes(Transferable t, List<PasteType> s) { //super.createPasteTypes(t, s); PasteType p = getDropType(t, 0, 0); if (p != null) { s.add(p); } } /** * * @param t * @param arg1 * @param arg2 * @return */ @Override public PasteType getDropType(final Transferable t, int arg1, int arg2) { if (t.isDataFlavorSupported(AUVFlavor.CUSTOMER_FLAVOR)) { return new PasteType() { @Override public Transferable paste() throws IOException { try { //model.add((AUV) t.getTransferData(AUVFlavor.CUSTOMER_FLAVOR)); AUV auv = (AUV) t.getTransferData(AUVFlavor.CUSTOMER_FLAVOR); final Node node = NodeTransfer.node(t, NodeTransfer.DND_MOVE + NodeTransfer.CLIPBOARD_CUT); if (node != null) { node.destroy(); } } catch (UnsupportedFlavorException ex) { Exceptions.printStackTrace(ex); } return null; } }; } else { return null; } } }
{ "content_hash": "9a12a1ab7d76a8e485b5971febcdbf3f", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 115, "avg_line_length": 25.312883435582823, "alnum_prop": 0.6119728550654386, "repo_name": "iti-luebeck/MARS", "id": "7552872c97c69b533e4834a5640517a3c5358d3a", "size": "5719", "binary": false, "copies": "1", "ref": "refs/heads/NBP8", "path": "MARS_NB/MARS/AUVTree/src/mars/auvtree/nodes/RootNode.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "GLSL", "bytes": "363041" }, { "name": "HTML", "bytes": "2482" }, { "name": "Java", "bytes": "2797210" } ], "symlink_target": "" }
namespace autofill_assistant { // Builds a ClientStatus appropriate for an unexpected error. // // This should only be used in situations where getting an error cannot be // anything but a bug in the client and no devtools ReplyStatus is available. ClientStatus UnexpectedErrorStatus(const std::string& file, int line); // Builds a ClientStatus appropriate for an unexpected error in a devtools // response. // // This should only be used in situations where getting an error cannot be // anything but a bug in the client. ClientStatus UnexpectedDevtoolsErrorStatus( const DevtoolsClient::ReplyStatus& reply_status, const std::string& file, int line); // Builds a ClientStatus appropriate for a JavaScript error. ClientStatus JavaScriptErrorStatus( const DevtoolsClient::ReplyStatus& reply_status, const std::string& file, int line, const runtime::ExceptionDetails* exception); // Makes sure that the given EvaluateResult exists, is successful and contains a // result. template <typename T> ClientStatus CheckJavaScriptResult( const DevtoolsClient::ReplyStatus& reply_status, T* result, const char* file, int line) { if (!result) return JavaScriptErrorStatus(reply_status, file, line, nullptr); if (result->HasExceptionDetails()) return JavaScriptErrorStatus(reply_status, file, line, result->GetExceptionDetails()); if (!result->GetResult()) return JavaScriptErrorStatus(reply_status, file, line, nullptr); return OkClientStatus(); } // Fills a ClientStatus with appropriate details for a Chrome Autofill error. ClientStatus FillAutofillErrorStatus(ClientStatus status); // Safely gets an object id from a RemoteObject bool SafeGetObjectId(const runtime::RemoteObject* result, std::string* out); // Safely gets a string value from a RemoteObject bool SafeGetStringValue(const runtime::RemoteObject* result, std::string* out); // Safely gets a int value from a RemoteObject. bool SafeGetIntValue(const runtime::RemoteObject* result, int* out); // Safely gets a boolean value from a RemoteObject bool SafeGetBool(const runtime::RemoteObject* result, bool* out); // Add a new runtime::CallArgument to the list. template <typename T> void AddRuntimeCallArgument( const T& value, std::vector<std::unique_ptr<runtime::CallArgument>>* arguments) { arguments->emplace_back( runtime::CallArgument::Builder() .SetValue(base::Value::ToUniquePtrValue(base::Value(value))) .Build()); } // Add a new runtime::CallArgument from the object_id. void AddRuntimeCallArgumentObjectId( const std::string& object_id, std::vector<std::unique_ptr<runtime::CallArgument>>* arguments); } // namespace autofill_assistant #endif // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_WEB_WEB_CONTROLLER_UTIL_H_
{ "content_hash": "bfd0e680d523fddc7d8c47903f734a41", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 80, "avg_line_length": 36.72727272727273, "alnum_prop": 0.7446958981612447, "repo_name": "endlessm/chromium-browser", "id": "dda9a43b6d9804b79e035065837b27b6d434803a", "size": "3417", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/autofill_assistant/browser/web/web_controller_util.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
package org.artifactory.addon; import java.io.Serializable; /** * An action which is performed in case no Artifactory Pro license is installed * and the user has not visited the license page * * @author Shay Yaakov */ public interface NoInstalledLicenseAction extends Serializable { void act(); }
{ "content_hash": "099b18bfe020670ec2a67618705382ad", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 79, "avg_line_length": 19.4375, "alnum_prop": 0.7459807073954984, "repo_name": "alancnet/artifactory", "id": "2ab124b35ac4a708fb0f8a01304df9b86f2be99a", "size": "1066", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "base/common/src/main/java/org/artifactory/addon/NoInstalledLicenseAction.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "5927" }, { "name": "CSS", "bytes": "1527354" }, { "name": "Groovy", "bytes": "14386" }, { "name": "HTML", "bytes": "844850" }, { "name": "Java", "bytes": "13075494" }, { "name": "JavaScript", "bytes": "3810535" }, { "name": "Shell", "bytes": "42908" } ], "symlink_target": "" }
#include "optionsmodel.h" #include "bitcoinunits.h" #include <QSettings> #include "init.h" #include "walletdb.h" #include "guiutil.h" OptionsModel::OptionsModel(QObject *parent) : QAbstractListModel(parent) { Init(); } bool static ApplyProxySettings() { QSettings settings; CService addrProxy(settings.value("addrProxy", "127.0.0.1:9050").toString().toStdString()); int nSocksVersion(settings.value("nSocksVersion", 5).toInt()); if (!settings.value("fUseProxy", false).toBool()) { addrProxy = CService(); nSocksVersion = 0; return false; } if (nSocksVersion && !addrProxy.IsValid()) return false; if (!IsLimited(NET_IPV4)) SetProxy(NET_IPV4, addrProxy, nSocksVersion); if (nSocksVersion > 4) { #ifdef USE_IPV6 if (!IsLimited(NET_IPV6)) SetProxy(NET_IPV6, addrProxy, nSocksVersion); #endif SetNameProxy(addrProxy, nSocksVersion); } return true; } void OptionsModel::Init() { QSettings settings; // These are Qt-only settings: nDisplayUnit = settings.value("nDisplayUnit", BitcoinUnits::MSGC).toInt(); bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool(); fMinimizeToTray = settings.value("fMinimizeToTray", false).toBool(); fMinimizeOnClose = settings.value("fMinimizeOnClose", false).toBool(); nTransactionFee = settings.value("nTransactionFee").toLongLong(); language = settings.value("language", "").toString(); // These are shared with core Bitcoin; we want // command-line options to override the GUI settings: if (settings.contains("addrProxy") && settings.value("fUseProxy").toBool()) SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()); if (settings.contains("nSocksVersion") && settings.value("fUseProxy").toBool()) SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString()); if (settings.contains("detachDB")) SoftSetBoolArg("-detachdb", settings.value("detachDB").toBool()); if (!language.isEmpty()) SoftSetArg("-lang", language.toStdString()); } bool OptionsModel::Upgrade() { QSettings settings; if (settings.contains("bImportFinished")) return false; // Already upgraded settings.setValue("bImportFinished", true); // Move settings from old wallet.dat (if any): CWalletDB walletdb("wallet.dat"); QList<QString> intOptions; intOptions << "nDisplayUnit" << "nTransactionFee"; foreach(QString key, intOptions) { int value = 0; if (walletdb.ReadSetting(key.toStdString(), value)) { settings.setValue(key, value); walletdb.EraseSetting(key.toStdString()); } } QList<QString> boolOptions; boolOptions << "bDisplayAddresses" << "fMinimizeToTray" << "fMinimizeOnClose" << "fUseProxy" ; foreach(QString key, boolOptions) { bool value = false; if (walletdb.ReadSetting(key.toStdString(), value)) { settings.setValue(key, value); walletdb.EraseSetting(key.toStdString()); } } try { CAddress addrProxyAddress; if (walletdb.ReadSetting("addrProxy", addrProxyAddress)) { settings.setValue("addrProxy", addrProxyAddress.ToStringIPPort().c_str()); walletdb.EraseSetting("addrProxy"); } } catch (std::ios_base::failure &e) { // 0.6.0rc1 saved this as a CService, which causes failure when parsing as a CAddress CService addrProxy; if (walletdb.ReadSetting("addrProxy", addrProxy)) { settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); walletdb.EraseSetting("addrProxy"); } } ApplyProxySettings(); Init(); return true; } int OptionsModel::rowCount(const QModelIndex & parent) const { return OptionIDRowCount; } QVariant OptionsModel::data(const QModelIndex & index, int role) const { if(role == Qt::EditRole) { QSettings settings; switch(index.row()) { case StartAtStartup: return QVariant(GUIUtil::GetStartOnSystemStartup()); case MinimizeToTray: return QVariant(fMinimizeToTray); case MinimizeOnClose: return QVariant(fMinimizeOnClose); case ProxyUse: return settings.value("fUseProxy", false); case ProxyIP: { CService addrProxy; if (GetProxy(NET_IPV4, addrProxy)) return QVariant(QString::fromStdString(addrProxy.ToStringIP())); else return QVariant(QString::fromStdString("127.0.0.1")); } case ProxyPort: { CService addrProxy; if (GetProxy(NET_IPV4, addrProxy)) return QVariant(addrProxy.GetPort()); else return 9050; } case ProxySocksVersion: return settings.value("nSocksVersion", 5); case Fee: return QVariant(nTransactionFee); case DisplayUnit: return QVariant(nDisplayUnit); case DisplayAddresses: return QVariant(bDisplayAddresses); case DetachDatabases: return QVariant(bitdb.GetDetach()); case Language: return settings.value("language", ""); default: return QVariant(); } } return QVariant(); } bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, int role) { bool successful = true; /* set to false on parse error */ if(role == Qt::EditRole) { QSettings settings; switch(index.row()) { case StartAtStartup: successful = GUIUtil::SetStartOnSystemStartup(value.toBool()); break; case MinimizeToTray: fMinimizeToTray = value.toBool(); settings.setValue("fMinimizeToTray", fMinimizeToTray); break; case MinimizeOnClose: fMinimizeOnClose = value.toBool(); settings.setValue("fMinimizeOnClose", fMinimizeOnClose); break; case ProxyUse: settings.setValue("fUseProxy", value.toBool()); ApplyProxySettings(); break; case ProxyIP: { CService addrProxy("127.0.0.1", 9050); GetProxy(NET_IPV4, addrProxy); CNetAddr addr(value.toString().toStdString()); addrProxy.SetIP(addr); settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); successful = ApplyProxySettings(); } break; case ProxyPort: { CService addrProxy("127.0.0.1", 9050); GetProxy(NET_IPV4, addrProxy); addrProxy.SetPort(value.toInt()); settings.setValue("addrProxy", addrProxy.ToStringIPPort().c_str()); successful = ApplyProxySettings(); } break; case ProxySocksVersion: settings.setValue("nSocksVersion", value.toInt()); ApplyProxySettings(); break; case Fee: nTransactionFee = value.toLongLong(); settings.setValue("nTransactionFee", nTransactionFee); break; case DisplayUnit: nDisplayUnit = value.toInt(); settings.setValue("nDisplayUnit", nDisplayUnit); emit displayUnitChanged(nDisplayUnit); break; case DisplayAddresses: bDisplayAddresses = value.toBool(); settings.setValue("bDisplayAddresses", bDisplayAddresses); break; case DetachDatabases: { bool fDetachDB = value.toBool(); bitdb.SetDetach(fDetachDB); settings.setValue("detachDB", fDetachDB); } break; case Language: settings.setValue("language", value); break; default: break; } } emit dataChanged(index, index); return successful; } qint64 OptionsModel::getTransactionFee() { return nTransactionFee; } bool OptionsModel::getMinimizeToTray() { return fMinimizeToTray; } bool OptionsModel::getMinimizeOnClose() { return fMinimizeOnClose; } int OptionsModel::getDisplayUnit() { return nDisplayUnit; } bool OptionsModel::getDisplayAddresses() { return bDisplayAddresses; }
{ "content_hash": "cf8e60d0da2625d8e2971065235c7dca", "timestamp": "", "source": "github", "line_count": 275, "max_line_length": 98, "avg_line_length": 30.98909090909091, "alnum_prop": 0.6033794883830087, "repo_name": "massagecoin/massagecoin", "id": "f32d49bc8edf996e9244566f9aa14b0b69a9b993", "size": "8522", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/optionsmodel.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "78169" }, { "name": "C++", "bytes": "1263012" }, { "name": "IDL", "bytes": "11297" }, { "name": "Objective-C++", "bytes": "2463" }, { "name": "Python", "bytes": "36367" }, { "name": "Shell", "bytes": "2660" }, { "name": "TypeScript", "bytes": "3810736" } ], "symlink_target": "" }
// 08. Write a program that extracts from a given text all sentences containing given word. // Example: The word is "in". The text is: // We are living in a yellow submarine. We don't have anything else. Inside the submarine is very tight. // So we are drinking all the day. We will move out of it in 5 days. namespace _08.SentencesContainingGivenWord { using System; using System.Text; using System.Text.RegularExpressions; class SentencesContainingGivenWord { static void Main() { string text = "We are living in a yellow submarine. We don't have anything else. Inside the submarine is very tight. So we are drinking all the day. We will move out of it in 5 days. dvsdgdgdgdf"; string word = "in"; string pattern = @"\s*([^\.]*\b" + word + @"\b.*?\.)"; MatchCollection matches = Regex.Matches(text, pattern); // Loop to print all matches in "MatchCollection matches" foreach (Match match in matches) { Console.WriteLine(match.Groups[1]); } } } }
{ "content_hash": "4c1659d31b79734c3c546d5253e1b03a", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 208, "avg_line_length": 38.793103448275865, "alnum_prop": 0.6195555555555555, "repo_name": "2She2/CSharpPartTwo", "id": "63a2c980078d3d88d56f4abb5ec2f175c9689221", "size": "1127", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "08.StringsAndTextProcessing/08.SentencesContainingGivenWord/SentencesContainingGivenWord.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "479270" } ], "symlink_target": "" }
<?php /** * @file * Contains \Drupal\Core\Render\Element\Select. */ namespace Drupal\Core\Render\Element; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Element; /** * Provides a form element for a drop-down menu or scrolling selection box. * * See #empty_option and #empty_value for an explanation of various settings for * a select element, including behavior if #required is TRUE or FALSE. * * @FormElement("select") */ class Select extends FormElement { /** * {@inheritdoc} */ public function getInfo() { $class = get_class($this); return array( '#input' => TRUE, '#multiple' => FALSE, '#process' => array( array($class, 'processSelect'), array($class, 'processAjaxForm'), ), '#pre_render' => array( array($class, 'preRenderSelect'), ), '#theme' => 'select', '#theme_wrappers' => array('form_element'), '#options' => array(), ); } /** * Processes a select list form element. * * This process callback is mandatory for select fields, since all user agents * automatically preselect the first available option of single (non-multiple) * select lists. * * @param array $element * The form element to process. Properties used: * - #multiple: (optional) Indicates whether one or more options can be * selected. Defaults to FALSE. * - #default_value: Must be NULL or not set in case there is no value for the * element yet, in which case a first default option is inserted by default. * Whether this first option is a valid option depends on whether the field * is #required or not. * - #required: (optional) Whether the user needs to select an option (TRUE) * or not (FALSE). Defaults to FALSE. * - #empty_option: (optional) The label to show for the first default option. * By default, the label is automatically set to "- Please select -" for a * required field and "- None -" for an optional field. * - #empty_value: (optional) The value for the first default option, which is * used to determine whether the user submitted a value or not. * - If #required is TRUE, this defaults to '' (an empty string). * - If #required is not TRUE and this value isn't set, then no extra option * is added to the select control, leaving the control in a slightly * illogical state, because there's no way for the user to select nothing, * since all user agents automatically preselect the first available * option. But people are used to this being the behavior of select * controls. * @todo Address the above issue in Drupal 8. * - If #required is not TRUE and this value is set (most commonly to an * empty string), then an extra option (see #empty_option above) * representing a "non-selection" is added with this as its value. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. * @param array $complete_form * The complete form structure. * * @return array * The processed element. * * @see _form_validate() */ public static function processSelect(&$element, FormStateInterface $form_state, &$complete_form) { // #multiple select fields need a special #name. if ($element['#multiple']) { $element['#attributes']['multiple'] = 'multiple'; $element['#attributes']['name'] = $element['#name'] . '[]'; } // A non-#multiple select needs special handling to prevent user agents from // preselecting the first option without intention. #multiple select lists do // not get an empty option, as it would not make sense, user interface-wise. else { // If the element is set to #required through #states, override the // element's #required setting. $required = isset($element['#states']['required']) ? TRUE : $element['#required']; // If the element is required and there is no #default_value, then add an // empty option that will fail validation, so that the user is required to // make a choice. Also, if there's a value for #empty_value or // #empty_option, then add an option that represents emptiness. if (($required && !isset($element['#default_value'])) || isset($element['#empty_value']) || isset($element['#empty_option'])) { $element += array( '#empty_value' => '', '#empty_option' => $required ? t('- Select -') : t('- None -'), ); // The empty option is prepended to #options and purposively not merged // to prevent another option in #options mistakenly using the same value // as #empty_value. $empty_option = array($element['#empty_value'] => $element['#empty_option']); $element['#options'] = $empty_option + $element['#options']; } } return $element; } /** * {@inheritdoc} */ public static function valueCallback(&$element, $input, FormStateInterface $form_state) { if ($input !== FALSE) { if (isset($element['#multiple']) && $element['#multiple']) { // If an enabled multi-select submits NULL, it means all items are // unselected. A disabled multi-select always submits NULL, and the // default value should be used. if (empty($element['#disabled'])) { return (is_array($input)) ? array_combine($input, $input) : array(); } else { return (isset($element['#default_value']) && is_array($element['#default_value'])) ? $element['#default_value'] : array(); } } // Non-multiple select elements may have an empty option prepended to them // (see \Drupal\Core\Render\Element\Select::processSelect()). When this // occurs, usually #empty_value is an empty string, but some forms set // #empty_value to integer 0 or some other non-string constant. PHP // receives all submitted form input as strings, but if the empty option // is selected, set the value to match the empty value exactly. elseif (isset($element['#empty_value']) && $input === (string) $element['#empty_value']) { return $element['#empty_value']; } else { return $input; } } } /** * Prepares a select render element. */ public static function preRenderSelect($element) { Element::setAttributes($element, array('id', 'name', 'size')); static::setAttributes($element, array('form-select')); return $element; } }
{ "content_hash": "6c6c8ca5ecb707aad76159fabc0113d9", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 133, "avg_line_length": 41.35849056603774, "alnum_prop": 0.631234793187348, "repo_name": "ital-lion/Drupal4Lions", "id": "70f14d66cbabcda6833bf2cba3da152198b9829d", "size": "6576", "binary": false, "copies": "53", "ref": "refs/heads/master", "path": "core/lib/Drupal/Core/Render/Element/Select.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "280823" }, { "name": "JavaScript", "bytes": "742500" }, { "name": "PHP", "bytes": "20371861" }, { "name": "Shell", "bytes": "70992" } ], "symlink_target": "" }
TABLE.FCK__ShowTableBorders, TABLE.FCK__ShowTableBorders TD, TABLE.FCK__ShowTableBorders TH { border: #d3d3d3 1px solid; } FORM { border: 1px dotted #FF0000; padding: 2px; } .FCK__Flash { border: darkgray 1px solid; background-position: center center; background-image: url(images/fck_flashlogo.gif); background-repeat: no-repeat; width: 80px; height: 80px; } .FCK__Anchor { background-position: center center; background-image: url(images/fck_anchor.gif); background-repeat: no-repeat; width: 16px; height: 15px; } .FCK__PageBreak { background-position: center center; background-image: url(images/fck_pagebreak.gif); background-repeat: no-repeat; clear: both; display: block; float: none; width: 100%; border-top: #999999 1px dotted; border-bottom: #999999 1px dotted; border-right: 0px; border-left: 0px; height: 5px; } input[type="hidden"] { display: inline; width:20px; height:20px; border:1px dotted #FF0000 ; background-image: url(behaviors/hiddenfield.gif); background-repeat: no-repeat; } input[type="hidden"]:after { padding-left: 20px; content: "" ; }
{ "content_hash": "9e6cab1ba2cb17a06f32a10eb2d5f32c", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 91, "avg_line_length": 18.53968253968254, "alnum_prop": 0.6815068493150684, "repo_name": "studiodev/archives", "id": "ddf7c57a5a153a2b48a49fd3ea4e3f459b2da7a7", "size": "1748", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "2008 - Site rencontre Mon-Look/include/fck/editor/css/fck_internal.css", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "278127" }, { "name": "ApacheConf", "bytes": "17574" }, { "name": "CSS", "bytes": "947736" }, { "name": "ColdFusion", "bytes": "42028" }, { "name": "HTML", "bytes": "9820794" }, { "name": "Java", "bytes": "30831" }, { "name": "JavaScript", "bytes": "7757772" }, { "name": "Lasso", "bytes": "24527" }, { "name": "PHP", "bytes": "21467673" }, { "name": "Perl", "bytes": "39266" }, { "name": "Python", "bytes": "26247" }, { "name": "Smarty", "bytes": "196757" } ], "symlink_target": "" }
""" Support for MQTT message handling. For more details about this component, please refer to the documentation at https://home-assistant.io/components/mqtt/ """ import asyncio import logging import os import socket import time import ssl import re import requests.certs import voluptuous as vol from homeassistant.core import callback from homeassistant.setup import async_prepare_setup_platform from homeassistant.config import load_yaml_config_file from homeassistant.exceptions import HomeAssistantError from homeassistant.loader import bind_hass from homeassistant.helpers import template, config_validation as cv from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, dispatcher_send) from homeassistant.util.async import ( run_coroutine_threadsafe, run_callback_threadsafe) from homeassistant.const import ( EVENT_HOMEASSISTANT_STOP, CONF_VALUE_TEMPLATE, CONF_USERNAME, CONF_PASSWORD, CONF_PORT, CONF_PROTOCOL, CONF_PAYLOAD) from homeassistant.components.mqtt.server import HBMQTT_CONFIG_SCHEMA REQUIREMENTS = ['paho-mqtt==1.3.1'] _LOGGER = logging.getLogger(__name__) DOMAIN = 'mqtt' DATA_MQTT = 'mqtt' SERVICE_PUBLISH = 'publish' SIGNAL_MQTT_MESSAGE_RECEIVED = 'mqtt_message_received' CONF_EMBEDDED = 'embedded' CONF_BROKER = 'broker' CONF_CLIENT_ID = 'client_id' CONF_DISCOVERY = 'discovery' CONF_DISCOVERY_PREFIX = 'discovery_prefix' CONF_KEEPALIVE = 'keepalive' CONF_CERTIFICATE = 'certificate' CONF_CLIENT_KEY = 'client_key' CONF_CLIENT_CERT = 'client_cert' CONF_TLS_INSECURE = 'tls_insecure' CONF_TLS_VERSION = 'tls_version' CONF_BIRTH_MESSAGE = 'birth_message' CONF_WILL_MESSAGE = 'will_message' CONF_STATE_TOPIC = 'state_topic' CONF_COMMAND_TOPIC = 'command_topic' CONF_AVAILABILITY_TOPIC = 'availability_topic' CONF_QOS = 'qos' CONF_RETAIN = 'retain' PROTOCOL_31 = '3.1' PROTOCOL_311 = '3.1.1' DEFAULT_PORT = 1883 DEFAULT_KEEPALIVE = 60 DEFAULT_QOS = 0 DEFAULT_RETAIN = False DEFAULT_PROTOCOL = PROTOCOL_311 DEFAULT_DISCOVERY = False DEFAULT_DISCOVERY_PREFIX = 'homeassistant' DEFAULT_TLS_PROTOCOL = 'auto' ATTR_TOPIC = 'topic' ATTR_PAYLOAD = 'payload' ATTR_PAYLOAD_TEMPLATE = 'payload_template' ATTR_QOS = CONF_QOS ATTR_RETAIN = CONF_RETAIN MAX_RECONNECT_WAIT = 300 # seconds def valid_subscribe_topic(value, invalid_chars='\0'): """Validate that we can subscribe using this MQTT topic.""" value = cv.string(value) if all(c not in value for c in invalid_chars): return vol.Length(min=1, max=65535)(value) raise vol.Invalid('Invalid MQTT topic name') def valid_publish_topic(value): """Validate that we can publish using this MQTT topic.""" return valid_subscribe_topic(value, invalid_chars='#+\0') def valid_discovery_topic(value): """Validate a discovery topic.""" return valid_subscribe_topic(value, invalid_chars='#+\0/') _VALID_QOS_SCHEMA = vol.All(vol.Coerce(int), vol.In([0, 1, 2])) CLIENT_KEY_AUTH_MSG = 'client_key and client_cert must both be present in ' \ 'the MQTT broker configuration' MQTT_WILL_BIRTH_SCHEMA = vol.Schema({ vol.Required(ATTR_TOPIC): valid_publish_topic, vol.Required(ATTR_PAYLOAD, CONF_PAYLOAD): cv.string, vol.Optional(ATTR_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, vol.Optional(ATTR_RETAIN, default=DEFAULT_RETAIN): cv.boolean, }, required=True) CONFIG_SCHEMA = vol.Schema({ DOMAIN: vol.Schema({ vol.Optional(CONF_CLIENT_ID): cv.string, vol.Optional(CONF_KEEPALIVE, default=DEFAULT_KEEPALIVE): vol.All(vol.Coerce(int), vol.Range(min=15)), vol.Optional(CONF_BROKER): cv.string, vol.Optional(CONF_PORT, default=DEFAULT_PORT): cv.port, vol.Optional(CONF_USERNAME): cv.string, vol.Optional(CONF_PASSWORD): cv.string, vol.Optional(CONF_CERTIFICATE): vol.Any('auto', cv.isfile), vol.Inclusive(CONF_CLIENT_KEY, 'client_key_auth', msg=CLIENT_KEY_AUTH_MSG): cv.isfile, vol.Inclusive(CONF_CLIENT_CERT, 'client_key_auth', msg=CLIENT_KEY_AUTH_MSG): cv.isfile, vol.Optional(CONF_TLS_INSECURE): cv.boolean, vol.Optional(CONF_TLS_VERSION, default=DEFAULT_TLS_PROTOCOL): vol.Any('auto', '1.0', '1.1', '1.2'), vol.Optional(CONF_PROTOCOL, default=DEFAULT_PROTOCOL): vol.All(cv.string, vol.In([PROTOCOL_31, PROTOCOL_311])), vol.Optional(CONF_EMBEDDED): HBMQTT_CONFIG_SCHEMA, vol.Optional(CONF_WILL_MESSAGE): MQTT_WILL_BIRTH_SCHEMA, vol.Optional(CONF_BIRTH_MESSAGE): MQTT_WILL_BIRTH_SCHEMA, vol.Optional(CONF_DISCOVERY, default=DEFAULT_DISCOVERY): cv.boolean, vol.Optional(CONF_DISCOVERY_PREFIX, default=DEFAULT_DISCOVERY_PREFIX): valid_discovery_topic, }), }, extra=vol.ALLOW_EXTRA) SCHEMA_BASE = { vol.Optional(CONF_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, } MQTT_BASE_PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA.extend(SCHEMA_BASE) # Sensor type platforms subscribe to MQTT events MQTT_RO_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({ vol.Required(CONF_STATE_TOPIC): valid_subscribe_topic, vol.Optional(CONF_VALUE_TEMPLATE): cv.template, }) # Switch type platforms publish to MQTT and may subscribe MQTT_RW_PLATFORM_SCHEMA = MQTT_BASE_PLATFORM_SCHEMA.extend({ vol.Required(CONF_COMMAND_TOPIC): valid_publish_topic, vol.Optional(CONF_RETAIN, default=DEFAULT_RETAIN): cv.boolean, vol.Optional(CONF_STATE_TOPIC): valid_subscribe_topic, vol.Optional(CONF_VALUE_TEMPLATE): cv.template, }) # Service call validation schema MQTT_PUBLISH_SCHEMA = vol.Schema({ vol.Required(ATTR_TOPIC): valid_publish_topic, vol.Exclusive(ATTR_PAYLOAD, CONF_PAYLOAD): object, vol.Exclusive(ATTR_PAYLOAD_TEMPLATE, CONF_PAYLOAD): cv.string, vol.Optional(ATTR_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, vol.Optional(ATTR_RETAIN, default=DEFAULT_RETAIN): cv.boolean, }, required=True) def _build_publish_data(topic, qos, retain): """Build the arguments for the publish service without the payload.""" data = {ATTR_TOPIC: topic} if qos is not None: data[ATTR_QOS] = qos if retain is not None: data[ATTR_RETAIN] = retain return data @bind_hass def publish(hass, topic, payload, qos=None, retain=None): """Publish message to an MQTT topic.""" hass.add_job(async_publish, hass, topic, payload, qos, retain) @callback @bind_hass def async_publish(hass, topic, payload, qos=None, retain=None): """Publish message to an MQTT topic.""" data = _build_publish_data(topic, qos, retain) data[ATTR_PAYLOAD] = payload hass.async_add_job(hass.services.async_call(DOMAIN, SERVICE_PUBLISH, data)) @bind_hass def publish_template(hass, topic, payload_template, qos=None, retain=None): """Publish message to an MQTT topic using a template payload.""" data = _build_publish_data(topic, qos, retain) data[ATTR_PAYLOAD_TEMPLATE] = payload_template hass.services.call(DOMAIN, SERVICE_PUBLISH, data) @asyncio.coroutine @bind_hass def async_subscribe(hass, topic, msg_callback, qos=DEFAULT_QOS, encoding='utf-8'): """Subscribe to an MQTT topic.""" @callback def async_mqtt_topic_subscriber(dp_topic, dp_payload, dp_qos): """Match subscribed MQTT topic.""" if not _match_topic(topic, dp_topic): return if encoding is not None: try: payload = dp_payload.decode(encoding) _LOGGER.debug("Received message on %s: %s", dp_topic, payload) except (AttributeError, UnicodeDecodeError): _LOGGER.error("Illegal payload encoding %s from " "MQTT topic: %s, Payload: %s", encoding, dp_topic, dp_payload) return else: _LOGGER.debug("Received binary message on %s", dp_topic) payload = dp_payload hass.async_run_job(msg_callback, dp_topic, payload, dp_qos) async_remove = async_dispatcher_connect( hass, SIGNAL_MQTT_MESSAGE_RECEIVED, async_mqtt_topic_subscriber) yield from hass.data[DATA_MQTT].async_subscribe(topic, qos) return async_remove @bind_hass def subscribe(hass, topic, msg_callback, qos=DEFAULT_QOS, encoding='utf-8'): """Subscribe to an MQTT topic.""" async_remove = run_coroutine_threadsafe( async_subscribe(hass, topic, msg_callback, qos, encoding), hass.loop ).result() def remove(): """Remove listener convert.""" run_callback_threadsafe(hass.loop, async_remove).result() return remove @asyncio.coroutine def _async_setup_server(hass, config): """Try to start embedded MQTT broker. This method is a coroutine. """ conf = config.get(DOMAIN, {}) server = yield from async_prepare_setup_platform( hass, config, DOMAIN, 'server') if server is None: _LOGGER.error("Unable to load embedded server") return None success, broker_config = \ yield from server.async_start(hass, conf.get(CONF_EMBEDDED)) return success and broker_config @asyncio.coroutine def _async_setup_discovery(hass, config): """Try to start the discovery of MQTT devices. This method is a coroutine. """ conf = config.get(DOMAIN, {}) discovery = yield from async_prepare_setup_platform( hass, config, DOMAIN, 'discovery') if discovery is None: _LOGGER.error("Unable to load MQTT discovery") return None success = yield from discovery.async_start( hass, conf[CONF_DISCOVERY_PREFIX], config) return success @asyncio.coroutine def async_setup(hass, config): """Start the MQTT protocol service.""" conf = config.get(DOMAIN) if conf is None: conf = CONFIG_SCHEMA({DOMAIN: {}})[DOMAIN] client_id = conf.get(CONF_CLIENT_ID) keepalive = conf.get(CONF_KEEPALIVE) # Only setup if embedded config passed in or no broker specified if CONF_EMBEDDED not in conf and CONF_BROKER in conf: broker_config = None else: broker_config = yield from _async_setup_server(hass, config) if CONF_BROKER in conf: broker = conf[CONF_BROKER] port = conf[CONF_PORT] username = conf.get(CONF_USERNAME) password = conf.get(CONF_PASSWORD) certificate = conf.get(CONF_CERTIFICATE) client_key = conf.get(CONF_CLIENT_KEY) client_cert = conf.get(CONF_CLIENT_CERT) tls_insecure = conf.get(CONF_TLS_INSECURE) protocol = conf[CONF_PROTOCOL] elif broker_config: # If no broker passed in, auto config to internal server broker, port, username, password, certificate, protocol = broker_config # Embedded broker doesn't have some ssl variables client_key, client_cert, tls_insecure = None, None, None # hbmqtt requires a client id to be set. if client_id is None: client_id = 'home-assistant' else: err = "Unable to start MQTT broker." if conf.get(CONF_EMBEDDED) is not None: # Explicit embedded config, requires explicit broker config err += " (Broker configuration required.)" _LOGGER.error(err) return False # For cloudmqtt.com, secured connection, auto fill in certificate if certificate is None and 19999 < port < 30000 and \ broker.endswith('.cloudmqtt.com'): certificate = os.path.join(os.path.dirname(__file__), 'addtrustexternalcaroot.crt') # When the certificate is set to auto, use bundled certs from requests if certificate == 'auto': certificate = requests.certs.where() will_message = conf.get(CONF_WILL_MESSAGE) birth_message = conf.get(CONF_BIRTH_MESSAGE) # Be able to override versions other than TLSv1.0 under Python3.6 conf_tls_version = conf.get(CONF_TLS_VERSION) if conf_tls_version == '1.2': tls_version = ssl.PROTOCOL_TLSv1_2 elif conf_tls_version == '1.1': tls_version = ssl.PROTOCOL_TLSv1_1 elif conf_tls_version == '1.0': tls_version = ssl.PROTOCOL_TLSv1 else: import sys # Python3.6 supports automatic negotiation of highest TLS version if sys.hexversion >= 0x03060000: tls_version = ssl.PROTOCOL_TLS # pylint: disable=no-member else: tls_version = ssl.PROTOCOL_TLSv1 try: hass.data[DATA_MQTT] = MQTT( hass, broker, port, client_id, keepalive, username, password, certificate, client_key, client_cert, tls_insecure, protocol, will_message, birth_message, tls_version) except socket.error: _LOGGER.exception("Can't connect to the broker. " "Please check your settings and the broker itself") return False @asyncio.coroutine def async_stop_mqtt(event): """Stop MQTT component.""" yield from hass.data[DATA_MQTT].async_disconnect() hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, async_stop_mqtt) success = yield from hass.data[DATA_MQTT].async_connect() if not success: return False @asyncio.coroutine def async_publish_service(call): """Handle MQTT publish service calls.""" msg_topic = call.data[ATTR_TOPIC] payload = call.data.get(ATTR_PAYLOAD) payload_template = call.data.get(ATTR_PAYLOAD_TEMPLATE) qos = call.data[ATTR_QOS] retain = call.data[ATTR_RETAIN] if payload_template is not None: try: payload = \ template.Template(payload_template, hass).async_render() except template.jinja2.TemplateError as exc: _LOGGER.error( "Unable to publish to '%s': rendering payload template of " "'%s' failed because %s", msg_topic, payload_template, exc) return yield from hass.data[DATA_MQTT].async_publish( msg_topic, payload, qos, retain) descriptions = yield from hass.async_add_job( load_yaml_config_file, os.path.join( os.path.dirname(__file__), 'services.yaml')) hass.services.async_register( DOMAIN, SERVICE_PUBLISH, async_publish_service, descriptions.get(SERVICE_PUBLISH), schema=MQTT_PUBLISH_SCHEMA) if conf.get(CONF_DISCOVERY): yield from _async_setup_discovery(hass, config) return True class MQTT(object): """Home Assistant MQTT client.""" def __init__(self, hass, broker, port, client_id, keepalive, username, password, certificate, client_key, client_cert, tls_insecure, protocol, will_message, birth_message, tls_version): """Initialize Home Assistant MQTT client.""" import paho.mqtt.client as mqtt self.hass = hass self.broker = broker self.port = port self.keepalive = keepalive self.topics = {} self.progress = {} self.birth_message = birth_message self._mqttc = None self._paho_lock = asyncio.Lock(loop=hass.loop) if protocol == PROTOCOL_31: proto = mqtt.MQTTv31 else: proto = mqtt.MQTTv311 if client_id is None: self._mqttc = mqtt.Client(protocol=proto) else: self._mqttc = mqtt.Client(client_id, protocol=proto) if username is not None: self._mqttc.username_pw_set(username, password) if certificate is not None: self._mqttc.tls_set( certificate, certfile=client_cert, keyfile=client_key, tls_version=tls_version) if tls_insecure is not None: self._mqttc.tls_insecure_set(tls_insecure) self._mqttc.on_subscribe = self._mqtt_on_subscribe self._mqttc.on_unsubscribe = self._mqtt_on_unsubscribe self._mqttc.on_connect = self._mqtt_on_connect self._mqttc.on_disconnect = self._mqtt_on_disconnect self._mqttc.on_message = self._mqtt_on_message if will_message: self._mqttc.will_set(will_message.get(ATTR_TOPIC), will_message.get(ATTR_PAYLOAD), will_message.get(ATTR_QOS), will_message.get(ATTR_RETAIN)) @asyncio.coroutine def async_publish(self, topic, payload, qos, retain): """Publish a MQTT message. This method must be run in the event loop and returns a coroutine. """ with (yield from self._paho_lock): yield from self.hass.async_add_job( self._mqttc.publish, topic, payload, qos, retain) @asyncio.coroutine def async_connect(self): """Connect to the host. Does process messages yet. This method is a coroutine. """ result = yield from self.hass.async_add_job( self._mqttc.connect, self.broker, self.port, self.keepalive) if result != 0: import paho.mqtt.client as mqtt _LOGGER.error('Failed to connect: %s', mqtt.error_string(result)) else: self._mqttc.loop_start() return not result def async_disconnect(self): """Stop the MQTT client. This method must be run in the event loop and returns a coroutine. """ def stop(): """Stop the MQTT client.""" self._mqttc.disconnect() self._mqttc.loop_stop() return self.hass.async_add_job(stop) @asyncio.coroutine def async_subscribe(self, topic, qos): """Subscribe to a topic. This method is a coroutine. """ if not isinstance(topic, str): raise HomeAssistantError("topic need to be a string!") with (yield from self._paho_lock): if topic in self.topics: return result, mid = yield from self.hass.async_add_job( self._mqttc.subscribe, topic, qos) _raise_on_error(result) self.progress[mid] = topic self.topics[topic] = None @asyncio.coroutine def async_unsubscribe(self, topic): """Unsubscribe from topic. This method is a coroutine. """ result, mid = yield from self.hass.async_add_job( self._mqttc.unsubscribe, topic) _raise_on_error(result) self.progress[mid] = topic def _mqtt_on_connect(self, _mqttc, _userdata, _flags, result_code): """On connect callback. Resubscribe to all topics we were subscribed to and publish birth message. """ import paho.mqtt.client as mqtt if result_code != mqtt.CONNACK_ACCEPTED: _LOGGER.error('Unable to connect to the MQTT broker: %s', mqtt.connack_string(result_code)) self._mqttc.disconnect() return old_topics = self.topics self.topics = {key: value for key, value in self.topics.items() if value is None} for topic, qos in old_topics.items(): # qos is None if we were in process of subscribing if qos is not None: self.hass.add_job(self.async_subscribe, topic, qos) if self.birth_message: self.hass.add_job(self.async_publish( self.birth_message.get(ATTR_TOPIC), self.birth_message.get(ATTR_PAYLOAD), self.birth_message.get(ATTR_QOS), self.birth_message.get(ATTR_RETAIN))) def _mqtt_on_subscribe(self, _mqttc, _userdata, mid, granted_qos): """Subscribe successful callback.""" topic = self.progress.pop(mid, None) if topic is None: return self.topics[topic] = granted_qos[0] def _mqtt_on_message(self, _mqttc, _userdata, msg): """Message received callback.""" dispatcher_send( self.hass, SIGNAL_MQTT_MESSAGE_RECEIVED, msg.topic, msg.payload, msg.qos ) def _mqtt_on_unsubscribe(self, _mqttc, _userdata, mid, granted_qos): """Unsubscribe successful callback.""" topic = self.progress.pop(mid, None) if topic is None: return self.topics.pop(topic, None) def _mqtt_on_disconnect(self, _mqttc, _userdata, result_code): """Disconnected callback.""" self.progress = {} self.topics = {key: value for key, value in self.topics.items() if value is not None} # Remove None values from topic list for key in list(self.topics): if self.topics[key] is None: self.topics.pop(key) # When disconnected because of calling disconnect() if result_code == 0: return tries = 0 wait_time = 0 while True: try: if self._mqttc.reconnect() == 0: _LOGGER.info("Successfully reconnected to the MQTT server") break except socket.error: pass wait_time = min(2**tries, MAX_RECONNECT_WAIT) _LOGGER.warning( "Disconnected from MQTT (%s). Trying to reconnect in %s s", result_code, wait_time) # It is ok to sleep here as we are in the MQTT thread. time.sleep(wait_time) tries += 1 def _raise_on_error(result): """Raise error if error result.""" if result != 0: import paho.mqtt.client as mqtt raise HomeAssistantError( 'Error talking to MQTT: {}'.format(mqtt.error_string(result))) def _match_topic(subscription, topic): """Test if topic matches subscription.""" reg_ex_parts = [] suffix = "" if subscription.endswith('#'): subscription = subscription[:-2] suffix = "(.*)" sub_parts = subscription.split('/') for sub_part in sub_parts: if sub_part == "+": reg_ex_parts.append(r"([^\/]+)") else: reg_ex_parts.append(re.escape(sub_part)) reg_ex = "^" + (r'\/'.join(reg_ex_parts)) + suffix + "$" reg = re.compile(reg_ex) return reg.match(topic) is not None
{ "content_hash": "3cb793cdcb6ec46bb913f474bd6f7502", "timestamp": "", "source": "github", "line_count": 665, "max_line_length": 79, "avg_line_length": 33.64962406015037, "alnum_prop": 0.6263574205657595, "repo_name": "stefan-jonasson/home-assistant", "id": "9decc9a14aa95a23516b7b71a1afc2c381a60b47", "size": "22377", "binary": false, "copies": "2", "ref": "refs/heads/dev", "path": "homeassistant/components/mqtt/__init__.py", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "4056" }, { "name": "Python", "bytes": "8360711" }, { "name": "Ruby", "bytes": "517" }, { "name": "Shell", "bytes": "12658" } ], "symlink_target": "" }
<!DOCTYPE html> <html> {% include head.html %} <body class="theme-{% if site.resume_theme %}{{ site.resume_theme }}{% endif %}"> <div class="wrapper" itemscope itemtype="http://schema.org/Person"> <header class="page-header"> <!-- You can turn off the avatar in _config.yml by setting to false --> {% if site.resume_avatar == 'true' %} <img src="/images/avatar.jpg" alt="my photo" class="avatar" itemprop="image"> {% endif %} <!-- Your name is defined in the _config.yml file --> <h1 class="header-name" itemprop="name">{{ site.resume_name }}</h1> <!-- Contact buttons don't work in print, configure in the _config.yml file, remove "print-only" to display always. --> <div class="header-contact-info" itemprop="contact-info"> <p>{{ site.resume_header_contact_info }}</p> </div> <div class="title-bar no-print"> <!-- Your title is also defined in the _config.yml file --> <h2 class="header-title" itemprop="jobTitle">{{ site.resume_title }}</h2> <!-- This is the markup for the icon links; moved out to an include because it's very verbose, and you shouldn't ever need to edit the markup (unless you want to re-order the icons); if you want to customize which links appear, define them in the _config.yml file --> {% include icon-links.html %} </div> <div class="executive-summary no-print" itemprop="description"> {{ site.resume_header_intro }} </div> {% if site.resume_looking_for_work == 'yes' %} <a href="mailto:{{ site.resume_contact_email }}" class="contact-button no-print" itemprop="email">Contact me</a> {% elsif site.resume_looking_for_work == 'no' %} <a class="contact-button not-looking no-print">I'm not looking for work right now.</a> {% else %} {% endif %} </header> {% if site.resume_section_experience %} <!-- begin Experience --> <section class="content-section"> <header class="section-header"> <h2>Work Experience</h2> </header> {% for job in site.data.experience %} <div class="resume-item" itemscope itemprop="worksFor" itemtype="http://schema.org/Organization"> <h3 class="resume-item-title" itemprop="name">{{ job.company }}</h3> <h4 class="resume-item-details" itemprop="description"><span style="display: block; float:left;">{{ job.position }}</span><span style="display: block; float:right;">{{ job.duration }}</span></h4><br/> <p class="resume-item-copy" style="clear: both;">{{ job.summary }}</p> </div><!-- end of resume-item --> {% endfor %} </section> <!-- end Experience --> {% endif %} {% if site.resume_section_education %} <!-- begin Education --> <section class="content-section"> <header class="section-header"> <h2>Education</h2> </header> {% for education in site.data.education %} <div class="resume-item" itemscope itemprop="worksFor" itemtype="http://schema.org/CollegeOrUniversity"> <h3 class="resume-item-title" itemprop="name">{{ education.uni }}</h3> <h4 class="resume-item-details" itemprop="description"><span style="display: block; float:left;">{{ education.degree }}</span><span style="display: block; float:right;">{{ education.year }}</span></h4> <h5 class="resume-item-details" itemprop="description">{{ education.awards }}</h5> <p class="resume-item-copy" style="clear: both;">{{ education.summary }}</p> </div> {% endfor %} </section> <!-- end Education --> {% endif %} {% if site.resume_section_projects %} <!-- begin Projects --> <section class="content-section"> <header class="section-header"> <h2>Projects</h2> </header> {% for project in site.data.projects %} <div class="resume-item" itemscope itemprop="worksFor" itemtype="http://schema.org/Organization"> <h3 class="resume-item-title" itemprop="name">{{ project.project }}</h3> <h4 class="resume-item-details" itemprop="description"><span style="display: block; float:left;">{{ project.role }}</span><span style="display: block; float:right;">{{ project.duration }}</span></h4><br/> <p class="resume-item-copy" style="clear: both;">{{ project.description }}</p> </div> {% endfor %} </section> <!-- end Projects --> {% endif %} {% if site.resume_section_skills %} <!-- begin Skills --> <section class="content-section"> <header class="section-header"> <h2>Languages/Programming Skills</h2> </header> {% for skill in site.data.skills %} <div class="resume-item"> <h4 class="resume-item-details">{{ skill.skill }}</h4> <p class="resume-item-copy">{{ skill.description }}</p> </div> {% endfor %} </section> <!-- end Skills --> {% endif %} {% if site.resume_section_recognition %} <!-- begin Recognition --> <section class="content-section"> <header class="section-header"> <h2>Recognition</h2> </header> {% for recognition in site.data.recognitions %} <div class="resume-item"> <h3 class="resume-item-title" itemprop="award">{{ recognition.award }}</h3> <h4 class="resume-item-details">{{ recognition.organisation }} &bull; {{ recognition.year }}</h4> <p class="resume-item-copy">{{ recognition.summary }}</p> </div> {% endfor %} </section> <!-- end Recognition --> {% endif %} {% if site.resume_section_associations %} <!-- begin Associations --> <section class="content-section"> <header class="section-header"> <h2>Associations</h2> </header> {% for association in site.data.associations %} <div class="resume-item"> <!-- <h3 class="resume-item-title"><a href="http://beerfortheworld.com">{{ association.organisation }}</a></h3> --> <h3 class="resume-item-title">{{ association.organization }}</h3> <h4 class="resume-item-details">{{ association.role }} &bull; {{ association.year }}</h4> <p class="resume-item-copy">{{ association.summary }}</p> </div> {% endfor %} </section> <!-- end Associations --> {% endif %} {% if site.resume_section_links %} <!-- begin Links --> <section class="content-section"> <header class="section-header"> <h2>Additional Links</h2> </header> <div class="resume-item"> <ul class="resume-item-list"> {% for link in site.data.links %} <li><a href={{ link.url }}>{{ link.description }}</a></li> {% endfor %} </ul> </div> </section> <!-- end Links --> {% endif %} {% if site.resume_print_social_links %} <!-- begin Print Social Links --> <section class="content-section print-only"> <header class="section-header"> <h2>Social Links</h2> </header> <div class="resume-item"> {% include print-social-links.html %} </div> </section> <!-- end Print Social Links --> {% endif %} <footer class="page-footer"> <p class="footer-line"> Resume of Jungrae Kim <a href="https://github.com/tyg03485">GitHub</a>.</p> </footer> </div> </body> </html>
{ "content_hash": "f371367d92f185736fe12aad4497a811", "timestamp": "", "source": "github", "line_count": 210, "max_line_length": 277, "avg_line_length": 36.44761904761905, "alnum_prop": 0.563888163051999, "repo_name": "tyg03485/tyg03485.github.io", "id": "e8ae532b2993284de257f990befcdb6fe1f81200", "size": "7654", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_layouts/resume.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "16116" }, { "name": "HTML", "bytes": "25052" }, { "name": "Ruby", "bytes": "5381" } ], "symlink_target": "" }
using System.Threading.Tasks; using Bmz.Framework.Tests.Application.Navigation; using Bmz.Framework.Tests.Configuration; using Bmz.Framework.Web.Navigation; using Shouldly; using Xunit; namespace Bmz.Framework.Web.Tests.Navigation { public class NavigationScript_Tests { [Fact] public async Task Should_Get_Script() { var testCase = new NavigationTestCase(); var scriptManager = new NavigationScriptManager(testCase.UserNavigationManager) { BmzSession = new MyChangableSession { UserId = 1 } }; var script = await scriptManager.GetScriptAsync(); script.ShouldNotBeNullOrEmpty(); } } }
{ "content_hash": "ebf1895dadc2898c4d1eb79314e8bff8", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 91, "avg_line_length": 28.8, "alnum_prop": 0.6541666666666667, "repo_name": "blademasterzhang/Bmz.Framework", "id": "dece27777442936011e88ac5b70df21cdd628fa0", "size": "722", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Tests/Bmz.Framework.Web.Tests/Navigation/NavigationScriptTester.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "1643296" }, { "name": "CSS", "bytes": "4495" }, { "name": "JavaScript", "bytes": "45374" } ], "symlink_target": "" }
package uk.gov.nationalarchives.droid.core.signature.compiler; import java.util.ArrayList; import java.util.BitSet; import java.util.List; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import org.w3c.dom.Document; import org.w3c.dom.Element; import net.byteseek.compiler.CompileException; import net.byteseek.matcher.sequence.SequenceMatcher; import net.byteseek.parser.ParseException; import net.byteseek.parser.regex.RegexParser; import net.byteseek.parser.tree.ParseTree; import net.byteseek.parser.tree.ParseTreeType; import net.byteseek.parser.tree.node.ByteNode; import net.byteseek.parser.tree.node.ChildrenNode; import uk.gov.nationalarchives.droid.core.signature.droid6.ByteSequence; import uk.gov.nationalarchives.droid.core.signature.droid6.SideFragment; import uk.gov.nationalarchives.droid.core.signature.droid6.SubSequence; import uk.gov.nationalarchives.droid.core.signature.xml.XmlUtils; import static uk.gov.nationalarchives.droid.core.signature.compiler.SignatureType.BINARY; import static uk.gov.nationalarchives.droid.core.signature.compiler.SignatureType.CONTAINER; /** * A class which provides serialization methods for ByteSequences, toXML and to a PRONOM or byteseek expression. * This can be used to obtain XML from a signature, or to rewrite a signature into a different signature type, * e.g. you could put a binary signature into the serializer with container as the output target, and the * signature will be rewritten using the more advanced syntax. */ public final class ByteSequenceSerializer { /** * Convenient static serializer instance (it's all stateless, so you don't need more than one). */ public static final ByteSequenceSerializer SERIALIZER = new ByteSequenceSerializer(); /** * The name of the Sequence attribute in XML. */ private static final String SEQUENCE = "Sequence"; /** * An underlying byteseek parser used to transform byteseek expressions into an Abstract Syntax Tree. */ private static final RegexParser PARSER = new RegexParser(); /** * The name of the Reference attribute in XML. */ private static final String REFERENCE = "Reference"; /** * The name of the ByteSequence element in XML. */ private static final String BYTE_SEQUENCE = "ByteSequence"; /** * The name of the LeftFragment element in XML. */ private static final String LEFT_FRAGMENT = "LeftFragment"; /** * The name of the RightFragment element in XML. */ private static final String RIGHT_FRAGMENT = "RightFragment"; /** * The name of the Position attribute in XML. */ private static final String POSITION = "Position"; /** * The name of the MinOffset attribute in XML. */ private static final String MIN_OFFSET = "MinOffset"; /** * The name of the MaxOffset attribute in XML. */ private static final String MAX_OFFSET = "MaxOffset"; /** * The name of the SubSequence element in XML. */ private static final String SUB_SEQUENCE = "SubSequence"; /** * The name of the SubSeqMinOffset attribute in XML. */ private static final String SUB_SEQ_MIN_OFFSET = "SubSeqMinOffset"; /** * The name of the SubSeqMaxOffset attribute in XML. */ private static final String SUB_SEQ_MAX_OFFSET = "SubSeqMaxOffset"; /** * A format string to output two hex digits. */ private static final String HEXDIGITS = "%02x"; /** * Returns the XML for a PRONOM expression. * * @param sequence The PRONOM expression in either binary or container syntax. * @param anchor Whether the expression is anchored to BOF, EOF or is variable. * @param compileType Whether to compile the XML with a PRONOM target, or a DROID target. DROID supports longer anchor sequences. * @param sigType Whether the XML is intended to be binary compatible, or container compatible. * @return An XML string containing the output of compiling the PRONOM expression. * @throws CompileException If anything goes wrong during the compilation. */ public String toXML(String sequence, ByteSequenceAnchor anchor, ByteSequenceCompiler.CompileType compileType, SignatureType sigType) throws CompileException { return toXML(ByteSequenceCompiler.COMPILER.compile(sequence, anchor, compileType), sigType); } /** * Returns the XML for a ByteSequence object. * * @param sequence The PRONOM expression in either binary or container syntax. * @param sigType Whether the XML is intended to be binary compatible, or container compatible. * @return An XML string containing a representation of the ByteSequence object. * @throws CompileException If anything goes wrong during the compilation. */ public String toXML(ByteSequence sequence, SignatureType sigType) throws CompileException { Document doc = getXMLDocument(); Element byteSequence = createByteSequenceElement(doc, sequence); int position = 1; for (SubSequence sub : sequence.getSubSequences()) { try { byteSequence.appendChild(createSubSequenceElement(doc, sub, sigType, position++)); } catch (ParseException e) { throw new CompileException(e.getMessage(), e); } } try { return XmlUtils.toXmlString(doc, false); } catch (TransformerException e) { throw new CompileException(e.getMessage(), e); } } /** * Rewrites a PRONOM expression with the syntax selected. * Assumes we are anchored to the BOF. Use the other method if you want to supply the anchor type too. * * @param expression The PRONOM expression to rewrite. * @param sigType Whether the syntax should target binary or container signature syntax. * @param spaceElements Whether elements in the expression should have whitespace between them. * @return A PRONOM expression with the syntax selected * @throws CompileException If anything goes wrong during the compilation. */ public String toPRONOMExpression(String expression, SignatureType sigType, boolean spaceElements) throws CompileException { //TODO: assumption that it's always anchored to BOFOffset. Hanging wildcards result in different outputs if it's anchored to BOF or EOF. return toPRONOMExpression(ByteSequenceCompiler.COMPILER.compile(expression), sigType, spaceElements); } /** * Rewrites a PRONOM expression with the syntax selected. * * @param expression The PRONOM expression to rewrite. * @param sigType Whether the syntax should target binary or container signature syntax. * @param anchorType Whether the expression is anchored to the BOF, EOF, or is Variable. * @param spaceElements Whether elements in the expression should have whitespace between them. * @return A PRONOM expression with the syntax selected * @throws CompileException If anything goes wrong during the compilation. */ public String toPRONOMExpression(String expression, SignatureType sigType, ByteSequenceAnchor anchorType, boolean spaceElements) throws CompileException { //TODO: assumption that it's always anchored to BOFOffset. Hanging wildcards result in different outputs if it's anchored to BOF or EOF. return toPRONOMExpression(ByteSequenceCompiler.COMPILER.compile(expression, anchorType), sigType, spaceElements); } /** * Returns a PRONOM expression given a ByteSequence, and what kind of signature to produce. * * @param sequence The ByteSequence to get the PRONOM expression from. * @param sigType Whether to return a binary PRONOM compatible expression, or container compatible. * @param spaceElements Whether to add spaces between signature elements (for readability). * @return a PRONOM expression given a ByteSequence, and what kind of signature to produce. * @throws CompileException If anything goes wrong during the compilation. */ public String toPRONOMExpression(ByteSequence sequence, SignatureType sigType, boolean spaceElements) throws CompileException { try { String byteseekRegex = sequence.toRegularExpression(true); // this outputs a byteseek-compatible regular expression. ParseTree parsed = PARSER.parse(byteseekRegex); // The parser parses the byteseek regular expression into an abstract syntax tree (AST) return toPRONOMExpression(parsed, sigType, spaceElements); // We then output this AST in PRONOM syntax. } catch (ParseException e) { throw new CompileException(e.getMessage(), e); } } /* ****************************************************************************************************************** * Private methods. */ private Document getXMLDocument() { DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder; try { dBuilder = dbFactory.newDocumentBuilder(); } catch (ParserConfigurationException e) { throw new RuntimeException(e.getMessage(), e); } return dBuilder.newDocument(); } private Element createByteSequenceElement(Document doc, ByteSequence sequence) { Element byteSequence = doc.createElement(BYTE_SEQUENCE); byteSequence.setAttribute(REFERENCE, sequence.getReference()); if (!sequence.getSequence().isEmpty()) { byteSequence.setAttribute(SEQUENCE, sequence.getSequence()); } doc.appendChild(byteSequence); return byteSequence; } private Element createSubSequenceElement(Document doc, SubSequence sub, SignatureType sigType, int position) throws ParseException { Element subSequence = createBasicSubSequenceElement(doc, sub, sigType, position); appendFragments(doc, subSequence, sub.getLeftFragments(), LEFT_FRAGMENT, sigType); appendFragments(doc, subSequence, sub.getRightFragments(), RIGHT_FRAGMENT, sigType); return subSequence; } private void appendFragments(Document doc, Element subsequence, List<List<SideFragment>> fragments, String elementName, SignatureType sigType) throws ParseException { int fragPos = 0; for (List<SideFragment> fragsAtPos : fragments) { fragPos++; for (SideFragment frag : fragsAtPos) { Element fragment = doc.createElement(elementName); fragment.setAttribute(POSITION, Integer.toString(fragPos)); fragment.setAttribute(MIN_OFFSET, Integer.toString(frag.getMinOffset())); fragment.setAttribute(MAX_OFFSET, Integer.toString(frag.getMaxOffset())); fragment.setTextContent(getSequenceMatcherExpression(frag.getMatcher(), sigType)); subsequence.appendChild(fragment); } } } private Element createBasicSubSequenceElement(Document doc, SubSequence sub, SignatureType sigType, int position) throws ParseException { Element subSequence = doc.createElement(SUB_SEQUENCE); subSequence.setAttribute(POSITION, Integer.toString(position)); subSequence.setAttribute(SUB_SEQ_MIN_OFFSET, Integer.toString(sub.getMinSeqOffset())); subSequence.setAttribute(SUB_SEQ_MAX_OFFSET, Integer.toString(sub.getMaxSeqOffset())); // Add sequence element containing the signature to search for: Element seq = doc.createElement(SEQUENCE); seq.setTextContent(getSequenceMatcherExpression(sub.getAnchorMatcher(), sigType)); subSequence.appendChild(seq); return subSequence; } private String getSequenceMatcherExpression(SequenceMatcher matcher, SignatureType sigType) throws ParseException { String byteseekExpression = matcher.toRegularExpression(true); ParseTree parsed = PARSER.parse(byteseekExpression); return toPRONOMExpression(parsed, sigType, false); } private String toPRONOMExpression(final ParseTree tree, SignatureType sigType, boolean spaceElements) throws ParseException { final StringBuilder builder = new StringBuilder(); toPRONOMExpression(tree, builder, sigType, spaceElements, false, false); return builder.toString(); } //CHECKSTYLE:OFF - cyclomatic complexity too high. private void toPRONOMExpression(final ParseTree tree, final StringBuilder builder, SignatureType sigType, boolean spaceElements, final boolean inSet, final boolean inAlternatives) throws ParseException { switch (tree.getParseTreeType()) { case BYTE: { if (tree.isValueInverted()) { builder.append("[!").append(String.format(HEXDIGITS, tree.getByteValue() & 0xFF).toUpperCase()).append(']'); } else { builder.append(String.format(HEXDIGITS, tree.getByteValue() & 0xFF).toUpperCase()); } break; } case STRING: { // If processing a string in a set ['abc'] as alternatives, have to process as ('a'|'b'|'c') String value = tree.getTextValue(); if (sigType == CONTAINER) { //CONTAINER SIG FORMAT: output strings as strings. builder.append('\'').append(value).append('\''); } else { //BINARY SIG FORMAT: output strings as byte sequences. for (int i = 0; i < value.length(); i++) { int theChar = value.charAt(i); builder.append(String.format(HEXDIGITS, theChar).toUpperCase()); if (spaceElements && i + 1 < value.length()) { builder.append(' '); } } } break; } case RANGE: { if (!inSet) { builder.append('['); if (tree.isValueInverted()) { builder.append('!'); } } appendByteValue(tree.getChild(0).getIntValue(), sigType == CONTAINER, builder); builder.append(':'); appendByteValue(tree.getChild(1).getIntValue(), sigType == CONTAINER, builder); if (!inSet) { builder.append(']'); } break; } case ANY: { builder.append("??"); break; } case ALL_BITMASK: { if (!inSet) { builder.append('['); if (tree.isValueInverted()) { builder.append('!'); } } builder.append('&').append(String.format(HEXDIGITS, tree.getByteValue() & 0xFF).toUpperCase()); if (!inSet) { builder.append(']'); } break; } case REPEAT: { // repeats only get used for fixed gaps in droid expressions, e.g. {5} int repeatNum = tree.getChild(0).getIntValue(); if (repeatNum == 1) { builder.append("??"); } else { builder.append('{').append(repeatNum).append('}'); } break; } case REPEAT_MIN_TO_MANY: { builder.append('{'). append(tree.getChild(0).getIntValue()). append("-*}"); break; } case REPEAT_MIN_TO_MAX: { // repeat min to max is only used for variable gaps. builder.append('{'). append(tree.getChild(0).getIntValue()). append('-'). append(tree.getChild(1).getIntValue()). append('}'); break; } case SET: { // represent as multi-byte sets [abc]? Or use (a|b|c) syntax? ParseTree alternativeSet = detectAlternativeSetRanges(tree, sigType); if (alternativeSet != null) { toPRONOMExpression(alternativeSet, builder, sigType, spaceElements, false, inAlternatives); } else if (sigType == BINARY && allChildrenAreSingleBytes(tree)) { appendAlternatives(tree, builder, sigType, spaceElements, true, inAlternatives); } else { if (!inSet) { builder.append('['); if (tree.isValueInverted()) { builder.append('!'); } } for (int i = 0; i < tree.getNumChildren(); i++) { if (spaceElements && i > 0) builder.append(' '); toPRONOMExpression(tree.getChild(i), builder, sigType, spaceElements, true, inAlternatives); } if (!inSet) { builder.append(']'); } } break; } case ALTERNATIVES: { appendAlternatives(tree, builder, sigType, spaceElements, false, inAlternatives); break; } case SEQUENCE: { for (int i = 0; i < tree.getNumChildren(); i++) { if (spaceElements && i > 0) builder.append(' '); toPRONOMExpression(tree.getChild(i), builder, sigType, spaceElements, inSet, inAlternatives); } break; } case ZERO_TO_MANY: { builder.append('*'); break; } default : throw new ParseException("Encountered an unknown node type: " + tree); } } private ParseTree detectAlternativeSetRanges(ParseTree node, SignatureType sigType) throws ParseException { final int numChildren = node.getNumChildren(); // Only try this for sets large enough for two alternative ranges to matter syntactically if (numChildren > 16) { // Build up a bitset of all byte values in the set: BitSet bitset = new BitSet(256); int minPos = 256; int maxPos = -1; for (int i = 0; i < numChildren; i++) { ParseTree child = node.getChild(i); if (child.getParseTreeType() == ParseTreeType.BYTE) { final int byteValue = child.getIntValue(); minPos = Math.min(byteValue, minPos); maxPos = Math.max(byteValue, maxPos); bitset.set(byteValue); } else { return null; // If the set has more than just bytes in it, it's not going to be two or more ranges. } } // Scan the bitset to find contiguous ranges of set bits: List<Integer> startRangePos = new ArrayList<>(); List<Integer> endRangePos = new ArrayList<>(); boolean lastBitSet = false; int startPos = -1; for (int bitPos = minPos; bitPos < maxPos; bitPos++) { if (bitset.get(bitPos)) { if (!lastBitSet) { // first bit set in a possible range: startPos = bitPos; } lastBitSet = true; } else { if (lastBitSet) { // the last bit was set, this isn't, so is the end of a possible range. int length = bitPos - startPos; if (length < 4) { return null; // small ranges aren't going to be usefully represented with alternative range syntax. } if (startRangePos.size() > 4) { return null; // lots of ranges aren't going to be usefully represented with alternative range syntax. } startRangePos.add(startPos); endRangePos.add(bitPos - 1); startPos = -1; } lastBitSet = false; } } if (lastBitSet) { startRangePos.add(startPos); endRangePos.add(maxPos); } // Build nodes representing the ranges detected: List<ParseTree> rangeChildren = new ArrayList<>(); for (int i = 0; i < startRangePos.size(); i++) { ParseTree rangeStart = new ByteNode((byte) startRangePos.get(i).intValue()); ParseTree rangeEnd = new ByteNode((byte) endRangePos.get(i).intValue()); ParseTree rangeNode = new ChildrenNode(ParseTreeType.RANGE, rangeStart, rangeEnd); rangeChildren.add(rangeNode); } // Return the set of ranges, using () syntax for binary, and [] syntax for container signatures: final ParseTreeType nodeType = sigType == BINARY ? ParseTreeType.ALTERNATIVES : ParseTreeType.SET; return new ChildrenNode(nodeType, rangeChildren); } return null; } private void appendAlternatives(ParseTree alternatives, StringBuilder builder, SignatureType sigType, boolean spaceElements, boolean inSet, boolean inAlternatives) throws ParseException { if (!inAlternatives) { builder.append('('); } for (int i = 0; i < alternatives.getNumChildren(); i++) { if (i > 0) { appendAlternativePipe(builder, spaceElements); } ParseTree alternative = alternatives.getChild(i); // If we're processing a set as a list of alternatives, we need to handle strings differently. // Strings in sets need to be broken into distinct bytes separated by |. if (inSet && alternative.getParseTreeType() == ParseTreeType.STRING) { appendStringAsAlternativeBytes(builder, alternative.getTextValue(), spaceElements); } else { toPRONOMExpression(alternatives.getChild(i), builder, sigType, spaceElements, false, true); } } if (!inAlternatives) { builder.append(')'); } } private void appendStringAsAlternativeBytes(StringBuilder builder, String value, boolean spaceElements) throws ParseException { for (int charIndex = 0; charIndex < value.length(); charIndex++) { if (charIndex > 0) { appendAlternativePipe(builder, spaceElements); } char theChar = value.charAt(charIndex); if (theChar > 255) { throw new ParseException("Could not process a char in a string with a value higher than 255: " + theChar); } builder.append(String.format(HEXDIGITS, (int) theChar)); } } private void appendAlternativePipe(StringBuilder builder, boolean spaceElements) { if (spaceElements) builder.append(' '); builder.append('|'); if (spaceElements) builder.append(' '); } private boolean allChildrenAreSingleBytes(ParseTree node) { for (int i = 0; i < node.getNumChildren(); i++) { ParseTree child = node.getChild(i); switch (child.getParseTreeType()) { case BYTE: case STRING: { break; // fine. } default : return false; } } return true; } private void appendByteValue(int value, boolean prettyPrint, StringBuilder builder) { if (prettyPrint && value >= ' ' && value <= '~') { builder.append('\'').append((char) value).append('\''); } else { builder.append(String.format(HEXDIGITS, value).toUpperCase()); } } }
{ "content_hash": "ad1d9a89747d17786e19ed3b732de0b6", "timestamp": "", "source": "github", "line_count": 533, "max_line_length": 158, "avg_line_length": 45.71482176360225, "alnum_prop": 0.6029303127308545, "repo_name": "digital-preservation/droid", "id": "fb3babb0c098f989b7d11ebb690544d64ac9f552", "size": "25999", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "droid-core/src/main/java/uk/gov/nationalarchives/droid/core/signature/compiler/ByteSequenceSerializer.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP.NET", "bytes": "76" }, { "name": "ActionScript", "bytes": "46" }, { "name": "Alloy", "bytes": "81" }, { "name": "Arc", "bytes": "6322" }, { "name": "Batchfile", "bytes": "5582" }, { "name": "COBOL", "bytes": "32" }, { "name": "GLSL", "bytes": "5" }, { "name": "HTML", "bytes": "280290" }, { "name": "Haskell", "bytes": "992" }, { "name": "Java", "bytes": "4140696" }, { "name": "JavaScript", "bytes": "4" }, { "name": "JetBrains MPS", "bytes": "16" }, { "name": "Mathematica", "bytes": "12" }, { "name": "Papyrus", "bytes": "6" }, { "name": "Perl", "bytes": "7" }, { "name": "Portugol", "bytes": "200" }, { "name": "PostScript", "bytes": "8803" }, { "name": "Q#", "bytes": "8" }, { "name": "Rich Text Format", "bytes": "39" }, { "name": "Roff", "bytes": "60" }, { "name": "RouterOS Script", "bytes": "28" }, { "name": "Shell", "bytes": "5250" }, { "name": "Squirrel", "bytes": "24" }, { "name": "Standard ML", "bytes": "16" }, { "name": "XSLT", "bytes": "22975" }, { "name": "nesC", "bytes": "8" } ], "symlink_target": "" }
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>Star98 Educational Dataset &#8212; statsmodels v0.10.0 documentation</title> <link rel="stylesheet" href="../../_static/nature.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" /> <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/language_data.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <link rel="shortcut icon" href="../../_static/statsmodels_hybi_favico.ico"/> <link rel="author" title="About these documents" href="../../about.html" /> <link rel="index" title="Index" href="../../genindex.html" /> <link rel="search" title="Search" href="../../search.html" /> <link rel="next" title="Statewide Crime Data 2009" href="statecrime.html" /> <link rel="prev" title="Stack loss data" href="stackloss.html" /> <link rel="stylesheet" href="../../_static/examples.css" type="text/css" /> <link rel="stylesheet" href="../../_static/facebox.css" type="text/css" /> <script type="text/javascript" src="../../_static/scripts.js"> </script> <script type="text/javascript" src="../../_static/facebox.js"> </script> <script type="text/javascript"> $.facebox.settings.closeImage = "../../_static/closelabel.png" $.facebox.settings.loadingImage = "../../_static/loading.gif" </script> <script> $(document).ready(function() { $.getJSON("../../../versions.json", function(versions) { var dropdown = document.createElement("div"); dropdown.className = "dropdown"; var button = document.createElement("button"); button.className = "dropbtn"; button.innerHTML = "Other Versions"; var content = document.createElement("div"); content.className = "dropdown-content"; dropdown.appendChild(button); dropdown.appendChild(content); $(".header").prepend(dropdown); for (var i = 0; i < versions.length; i++) { if (versions[i].substring(0, 1) == "v") { versions[i] = [versions[i], versions[i].substring(1)]; } else { versions[i] = [versions[i], versions[i]]; }; }; for (var i = 0; i < versions.length; i++) { var a = document.createElement("a"); a.innerHTML = versions[i][1]; a.href = "../../../" + versions[i][0] + "/index.html"; a.title = versions[i][1]; $(".dropdown-content").append(a); }; }); }); </script> </head><body> <div class="headerwrap"> <div class = "header"> <a href = "../../index.html"> <img src="../../_static/statsmodels_hybi_banner.png" alt="Logo" style="padding-left: 15px"/></a> </div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="statecrime.html" title="Statewide Crime Data 2009" accesskey="N">next</a> |</li> <li class="right" > <a href="stackloss.html" title="Stack loss data" accesskey="P">previous</a> |</li> <li><a href ="../../install.html">Install</a></li> &nbsp;|&nbsp; <li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp; <li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp; <li><a href="../../dev/index.html">Develop</a></li> &nbsp;|&nbsp; <li><a href="../../examples/index.html">Examples</a></li> &nbsp;|&nbsp; <li><a href="../../faq.html">FAQ</a></li> &nbsp;|&nbsp; <li class="nav-item nav-item-1"><a href="../index.html" accesskey="U">The Datasets Package</a> |</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="star98-educational-dataset"> <h1>Star98 Educational Dataset<a class="headerlink" href="#star98-educational-dataset" title="Permalink to this headline">¶</a></h1> <div class="section" id="description"> <h2>Description<a class="headerlink" href="#description" title="Permalink to this headline">¶</a></h2> <p>This data is on the California education policy and outcomes (STAR program results for 1998. The data measured standardized testing by the California Department of Education that required evaluation of 2nd - 11th grade students by the the Stanford 9 test on a variety of subjects. This dataset is at the level of the unified school district and consists of 303 cases. The binary response variable represents the number of 9th graders scoring over the national median value on the mathematics exam.</p> <p>The data used in this example is only a subset of the original source.</p> </div> <div class="section" id="notes"> <h2>Notes<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h2> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">Number</span> <span class="n">of</span> <span class="n">Observations</span> <span class="o">-</span> <span class="mi">303</span> <span class="p">(</span><span class="n">counties</span> <span class="ow">in</span> <span class="n">California</span><span class="p">)</span><span class="o">.</span> <span class="n">Number</span> <span class="n">of</span> <span class="n">Variables</span> <span class="o">-</span> <span class="mi">13</span> <span class="ow">and</span> <span class="mi">8</span> <span class="n">interaction</span> <span class="n">terms</span><span class="o">.</span> <span class="n">Definition</span> <span class="n">of</span> <span class="n">variables</span> <span class="n">names</span><span class="p">::</span> <span class="n">NABOVE</span> <span class="o">-</span> <span class="n">Total</span> <span class="n">number</span> <span class="n">of</span> <span class="n">students</span> <span class="n">above</span> <span class="n">the</span> <span class="n">national</span> <span class="n">median</span> <span class="k">for</span> <span class="n">the</span> <span class="n">math</span> <span class="n">section</span><span class="o">.</span> <span class="n">NBELOW</span> <span class="o">-</span> <span class="n">Total</span> <span class="n">number</span> <span class="n">of</span> <span class="n">students</span> <span class="n">below</span> <span class="n">the</span> <span class="n">national</span> <span class="n">median</span> <span class="k">for</span> <span class="n">the</span> <span class="n">math</span> <span class="n">section</span><span class="o">.</span> <span class="n">LOWINC</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">low</span> <span class="n">income</span> <span class="n">students</span> <span class="n">PERASIAN</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">Asian</span> <span class="n">student</span> <span class="n">PERBLACK</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">black</span> <span class="n">students</span> <span class="n">PERHISP</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">Hispanic</span> <span class="n">students</span> <span class="n">PERMINTE</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">minority</span> <span class="n">teachers</span> <span class="n">AVYRSEXP</span> <span class="o">-</span> <span class="n">Sum</span> <span class="n">of</span> <span class="n">teachers</span><span class="s1">&#39; years in educational service divided by the</span> <span class="n">number</span> <span class="n">of</span> <span class="n">teachers</span><span class="o">.</span> <span class="n">AVSALK</span> <span class="o">-</span> <span class="n">Total</span> <span class="n">salary</span> <span class="n">budget</span> <span class="n">including</span> <span class="n">benefits</span> <span class="n">divided</span> <span class="n">by</span> <span class="n">the</span> <span class="n">number</span> <span class="n">of</span> <span class="n">full</span><span class="o">-</span><span class="n">time</span> <span class="n">teachers</span> <span class="p">(</span><span class="ow">in</span> <span class="n">thousands</span><span class="p">)</span> <span class="n">PERSPENK</span> <span class="o">-</span> <span class="n">Per</span><span class="o">-</span><span class="n">pupil</span> <span class="n">spending</span> <span class="p">(</span><span class="ow">in</span> <span class="n">thousands</span><span class="p">)</span> <span class="n">PTRATIO</span> <span class="o">-</span> <span class="n">Pupil</span><span class="o">-</span><span class="n">teacher</span> <span class="n">ratio</span><span class="o">.</span> <span class="n">PCTAF</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">students</span> <span class="n">taking</span> <span class="n">UC</span><span class="o">/</span><span class="n">CSU</span> <span class="n">prep</span> <span class="n">courses</span> <span class="n">PCTCHRT</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">charter</span> <span class="n">schools</span> <span class="n">PCTYRRND</span> <span class="o">-</span> <span class="n">Percentage</span> <span class="n">of</span> <span class="n">year</span><span class="o">-</span><span class="nb">round</span> <span class="n">schools</span> <span class="n">The</span> <span class="n">below</span> <span class="n">variables</span> <span class="n">are</span> <span class="n">interaction</span> <span class="n">terms</span> <span class="n">of</span> <span class="n">the</span> <span class="n">variables</span> <span class="n">defined</span> <span class="n">above</span><span class="o">.</span> <span class="n">PERMINTE_AVYRSEXP</span> <span class="n">PEMINTE_AVSAL</span> <span class="n">AVYRSEXP_AVSAL</span> <span class="n">PERSPEN_PTRATIO</span> <span class="n">PERSPEN_PCTAF</span> <span class="n">PTRATIO_PCTAF</span> <span class="n">PERMINTE_AVTRSEXP_AVSAL</span> <span class="n">PERSPEN_PTRATIO_PCTAF</span> </pre></div> </div> </div> <div class="section" id="source"> <h2>Source<a class="headerlink" href="#source" title="Permalink to this headline">¶</a></h2> <p>Jeff Gill’s <cite>Generalized Linear Models: A Unified Approach</cite></p> <p><a class="reference external" href="http://jgill.wustl.edu/research/books.html">http://jgill.wustl.edu/research/books.html</a></p> </div> <div class="section" id="copyright"> <h2>Copyright<a class="headerlink" href="#copyright" title="Permalink to this headline">¶</a></h2> <p>Used with express permission from the original author, who retains all rights.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../../index.html">Table of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Star98 Educational Dataset</a><ul> <li><a class="reference internal" href="#description">Description</a></li> <li><a class="reference internal" href="#notes">Notes</a></li> <li><a class="reference internal" href="#source">Source</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="stackloss.html" title="previous chapter">Stack loss data</a></p> <h4>Next topic</h4> <p class="topless"><a href="statecrime.html" title="next chapter">Statewide Crime Data 2009</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/datasets/generated/star98.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2. </div> </body> </html>
{ "content_hash": "e6c8c3a6694aa5067caeb92a69bb1177", "timestamp": "", "source": "github", "line_count": 229, "max_line_length": 393, "avg_line_length": 59.851528384279476, "alnum_prop": 0.631475266306727, "repo_name": "statsmodels/statsmodels.github.io", "id": "68a308c11f666f73c92950cb0df605b9f32a16d2", "size": "13715", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "v0.10.0/datasets/generated/star98.html", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
package cruise.ui.jsf.templates.impl.fragment.GUI; import cruise.model.abstractObjects.IGenerator; import cruise.umple.compiler.Attribute;; public class SetteableDouble implements IGenerator { protected static String nl; public static synchronized SetteableDouble create(String lineSeparator) { nl = lineSeparator; SetteableDouble result = new SetteableDouble(); nl = null; return result; } public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = "\t<h:outputText value=\"#{#1#Bundle."; protected final String TEXT_2 = "}\" />" + NL + "\t<h:inputText \tvalue=\"#{#1#Bean."; protected final String TEXT_3 = "}\" >" + NL + "\t\t<f:converter converterId=\"javax.faces.Double\" />" + NL + "\t</h:inputText>"; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); Attribute attVar = (Attribute) argument; stringBuffer.append(TEXT_1); stringBuffer.append(attVar.getUpperCaseName()); stringBuffer.append(TEXT_2); stringBuffer.append(attVar.getName()); stringBuffer.append(TEXT_3); return stringBuffer.toString(); } }
{ "content_hash": "0dc504ce1992239d2b78e7430042638f", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 133, "avg_line_length": 36.38235294117647, "alnum_prop": 0.6839126919967664, "repo_name": "umple/umple", "id": "c5cc10c6d646291ce679bfba207583512f407d87", "size": "1237", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "UmpleUIJSFProvider/src/cruise/ui/jsf/templates/impl/fragment/GUI/SetteableDouble.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "64" }, { "name": "CSS", "bytes": "88712" }, { "name": "Dockerfile", "bytes": "3687" }, { "name": "GAP", "bytes": "1064953" }, { "name": "HTML", "bytes": "393822" }, { "name": "Hack", "bytes": "688" }, { "name": "Java", "bytes": "40998041" }, { "name": "JavaScript", "bytes": "1738541" }, { "name": "Lex", "bytes": "11050" }, { "name": "MATLAB", "bytes": "1160" }, { "name": "PHP", "bytes": "559284" }, { "name": "PowerShell", "bytes": "546" }, { "name": "Python", "bytes": "47125" }, { "name": "Roff", "bytes": "1622" }, { "name": "Ruby", "bytes": "404520" }, { "name": "Shell", "bytes": "20205" }, { "name": "TXL", "bytes": "65445" }, { "name": "Xtend", "bytes": "351" } ], "symlink_target": "" }
/** * Created by sheldon on 2016/5/27. */ define(function (require, exports, module) { module.exports = function (app) { app.register.controller('TreasureIndexCtrl', ['$scope', '$location','Treasure','Bridge', function ($scope, $location,Treasure,Bridge) { $scope.baseUrl = $location.absUrl().split('#')[0]; console.log('index'); $scope.treasureStatus = 1; $scope.initTreasureList = function () { $scope.treasureList = Treasure.treasureList().query({ queryType: $scope.treasureStatus }); $scope.treasureList.$promise.then(function (res) { console.log(res); $scope.goods = res.data.luckysweepstakes; $scope.banner = res.data.sysAdvertisingLinks; console.log($scope.banner); }).catch(function (error) { console.log(error) }) }; $scope.initTreasureList(); $scope.backTop = function () { var timer = setInterval(function () { window.scrollBy(0, -100); if (document.documentElement.scrollTop < 1 && document.body.scrollTop < 1) clearInterval(timer); }, 10); }; $scope.changeTreasureStatus = function (x) { $scope.treasureStatus = x; $scope.initTreasureList(); }; $scope.goToDetail = function (x) { Bridge.jumpTo($scope.baseUrl+'#?/treasure/detail?id='+ x.id,'宝贝详情') }; $scope.jumpTo = function(x,title){ Bridge.jumpTo(x,title) }; $scope.jumpToInvite = function () { Bridge.jumpTo($scope.baseUrl+'#?/treasure/invite','邀请好友') }; $scope.jumpToShare = function () { Bridge.jumpTo($scope.baseUrl + '#?/treasure/share/list','晒单') }; $scope.goToLinks = function (x) { Bridge.jumpTo( x,'一元夺宝') }; }]) } });
{ "content_hash": "1daab5dad4f6b71d53270705ed236916", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 98, "avg_line_length": 34.3768115942029, "alnum_prop": 0.4430860033726813, "repo_name": "Sheldon-Yin/mmfenqiWeb", "id": "0c5652224bc6b3983f2b24e07c1915c72c8bd8e1", "size": "2400", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app_wechat/modules/treasure/controller/tplCtrl/indexCtrl.js", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "664" }, { "name": "Batchfile", "bytes": "3009" }, { "name": "C", "bytes": "1663" }, { "name": "C#", "bytes": "5291" }, { "name": "C++", "bytes": "208973" }, { "name": "CSS", "bytes": "3002782" }, { "name": "HTML", "bytes": "1746947" }, { "name": "Java", "bytes": "9481" }, { "name": "JavaScript", "bytes": "13634514" }, { "name": "Objective-C", "bytes": "247331" }, { "name": "PHP", "bytes": "879" }, { "name": "Shell", "bytes": "4592" }, { "name": "TypeScript", "bytes": "1068" } ], "symlink_target": "" }
@interface CameraViewController () @property (weak, nonatomic) IBOutlet UIImageView *backgroundView; @property (weak, nonatomic) IBOutlet UITextField *myTitle; @property (weak, nonatomic) IBOutlet UIView *middleView; @property (weak, nonatomic) IBOutlet UIButton *backBtn; @end @implementation CameraViewController - (void)viewDidDisappear:(BOOL)animated { //隐藏状态栏 [[UIApplication sharedApplication] setStatusBarHidden:TRUE]; } - (void)viewDidLoad { [super viewDidLoad]; //设置背景图片高斯模糊 [self gaussianImage]; //设置键盘TextField [self setupTextField]; } #pragma mark ---- <设置键盘TextField> - (void)setupTextField { [_myTitle becomeFirstResponder]; //设置键盘颜色 _myTitle.tintColor = [UIColor whiteColor]; //设置占位文字颜色 [_myTitle setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"]; } #pragma mark ---- <设置背景图片高斯模糊> - (void)gaussianImage { GPUImageGaussianBlurFilter * blurFilter = [[GPUImageGaussianBlurFilter alloc] init]; blurFilter.blurRadiusInPixels = 2.0; UIImage * image = [UIImage imageNamed:@"bg_zbfx"]; UIImage *blurredImage = [blurFilter imageByFilteringImage:image]; self.backgroundView.image = blurredImage; } //返回主界面 - (IBAction)backMain { [self dismissViewControllerAnimated:YES completion:nil]; // 显示状态栏 [[UIApplication sharedApplication] setStatusBarHidden:false]; } //开始直播采集 - (IBAction)startLiveStream { StartLiveView *view = [[StartLiveView alloc] initWithFrame:self.view.bounds]; [self.view addSubview:view]; [self.myTitle resignFirstResponder]; _backBtn.hidden = YES; _middleView.hidden = YES; } - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event { [self.myTitle resignFirstResponder]; } @end
{ "content_hash": "9601f1d0ec616824514236d8253251cf", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 88, "avg_line_length": 23.986842105263158, "alnum_prop": 0.6999451453647834, "repo_name": "GrayJIAXU/520Linkee", "id": "fffa8dc0475839540d6d82ba855d32aeaceba16e", "size": "2189", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "高仿映客/Class/Camera/Controller/CameraViewController.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "2321326" }, { "name": "C++", "bytes": "634830" }, { "name": "Objective-C", "bytes": "5487343" } ], "symlink_target": "" }
using System; using System.Threading.Tasks; namespace Gluon.Relay.Contracts { public interface IRemoteMethodInvoker : IDisposable { Task InvokeAsync(string methodName, params object[] args); Task<TResult> InvokeAsync<TResult>(string methodName, params object[] args); } }
{ "content_hash": "ed11c640d2d4da1004b3ddcd4398a588", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 84, "avg_line_length": 25.25, "alnum_prop": 0.7194719471947195, "repo_name": "greghoover/gluon", "id": "612ae42409fb47b51a58b3d3736becac95c7463f", "size": "305", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Gluon.Relay.Contracts/IRemoteMethodInvoker.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "302" }, { "name": "C#", "bytes": "222921" }, { "name": "CSS", "bytes": "2194" }, { "name": "Elm", "bytes": "2546" }, { "name": "HTML", "bytes": "27262" }, { "name": "JavaScript", "bytes": "8874" } ], "symlink_target": "" }
// Copyright (c) All contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.IO; using System.Reflection; using System.Runtime.InteropServices; using PInvoke; using Xunit; using static PInvoke.Crypt32; public class Crypt32Facts { [Fact] public unsafe void PFXImportCertStoreTest() { byte[] protectedPfxContent = ReadEmbeddedResource("protectedPair.pfx"); fixed (byte* pbData = protectedPfxContent) { var data = new CRYPT_DATA_BLOB { cbData = protectedPfxContent.Length, pbData = pbData, }; using (var handle = PFXImportCertStore(ref data, "123456", PFXImportCertStoreFlags.None)) { if (handle.IsInvalid) { throw new Win32Exception(); } Assert.False(handle.IsInvalid); } } } private static byte[] ReadEmbeddedResource(string fileName) { using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(fileName)) { if (stream == null) { throw new ArgumentException("No resource by that name found.", nameof(fileName)); } var ms = new MemoryStream((int)stream.Length); stream.CopyTo(ms); return ms.ToArray(); } } }
{ "content_hash": "4c005f8d3fec4d1c9058e2c8d6615562", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 101, "avg_line_length": 29.41176470588235, "alnum_prop": 0.5833333333333334, "repo_name": "AArnott/pinvoke", "id": "ae2350253841f061821a8837a414c69a87fd24e3", "size": "1502", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Crypt32.Tests/Crypt32Facts.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "368" }, { "name": "C#", "bytes": "3414451" }, { "name": "PowerShell", "bytes": "45765" } ], "symlink_target": "" }
package org.apache.camel.impl; import java.lang.reflect.Method; import org.apache.camel.Consume; import org.apache.camel.ContextTestSupport; import org.junit.Test; public class CamelPostProcessorHelperConsumePredicateTest extends ContextTestSupport { @Test public void testConsumePredicate() throws Exception { CamelPostProcessorHelper helper = new CamelPostProcessorHelper(context); MyConsumeBean my = new MyConsumeBean(); Method method = my.getClass().getMethod("low", String.class); helper.consumerInjection(method, my, "foo"); method = my.getClass().getMethod("high", String.class); helper.consumerInjection(method, my, "foo"); getMockEndpoint("mock:low").expectedBodiesReceived("17", "89", "39"); getMockEndpoint("mock:high").expectedBodiesReceived("219", "112"); template.sendBody("direct:foo", "17"); template.sendBody("direct:foo", "219"); template.sendBody("direct:foo", "89"); template.sendBody("direct:foo", "112"); template.sendBody("direct:foo", "39"); assertMockEndpointsSatisfied(); } @Test public void testConsumePredicateDrop() throws Exception { CamelPostProcessorHelper helper = new CamelPostProcessorHelper(context); MyConsumeBean my = new MyConsumeBean(); Method method = my.getClass().getMethod("low", String.class); helper.consumerInjection(method, my, "foo"); method = my.getClass().getMethod("high", String.class); helper.consumerInjection(method, my, "foo"); getMockEndpoint("mock:low").expectedBodiesReceived("17"); getMockEndpoint("mock:high").expectedBodiesReceived("112"); template.sendBody("direct:foo", "17"); // should be dropped as it does not match any predicates template.sendBody("direct:foo", "-1"); template.sendBody("direct:foo", "112"); assertMockEndpointsSatisfied(); } public class MyConsumeBean { @Consume(value = "direct:foo", predicate = "${body} >= 0 && ${body} < 100") public void low(String body) { template.sendBody("mock:low", body); } @Consume(value = "direct:foo", predicate = "${body} >= 100") public void high(String body) { template.sendBody("mock:high", body); } } }
{ "content_hash": "186da65cc924e531e5cd44d06d3fa46e", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 86, "avg_line_length": 33.77142857142857, "alnum_prop": 0.6476311336717429, "repo_name": "punkhorn/camel-upstream", "id": "067adb6453905c273695b9f926aa989c8f1d1655", "size": "3167", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperConsumePredicateTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6519" }, { "name": "Batchfile", "bytes": "1518" }, { "name": "CSS", "bytes": "16394" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "11410" }, { "name": "Groovy", "bytes": "14490" }, { "name": "HTML", "bytes": "896075" }, { "name": "Java", "bytes": "70312352" }, { "name": "JavaScript", "bytes": "90399" }, { "name": "Makefile", "bytes": "513" }, { "name": "Shell", "bytes": "17108" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "270186" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1"> <DataProcessor uuid="2a479b8f-7569-43d0-8ca3-9001d6ec57f0"> <InternalInfo> <xr:GeneratedType name="DataProcessorObject.БлокировкаРаботыПользователей" category="Object"> <xr:TypeId>ccba9c7f-d50c-45fe-9cd3-6ce5582ae24f</xr:TypeId> <xr:ValueId>8d09a7d5-e478-4c72-a92d-a38d2f974f0f</xr:ValueId> </xr:GeneratedType> <xr:GeneratedType name="DataProcessorManager.БлокировкаРаботыПользователей" category="Manager"> <xr:TypeId>5469c8a0-ea9b-4cc6-8ea0-c84357f9b770</xr:TypeId> <xr:ValueId>2ac55ec5-ebec-4a1d-9439-3c305c535dcf</xr:ValueId> </xr:GeneratedType> </InternalInfo> <Properties> <Name>БлокировкаРаботыПользователей</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Блокировка работы пользователей</v8:content> </v8:item> </Synonym> <Comment/> <UseStandardCommands>true</UseStandardCommands> <DefaultForm>DataProcessor.БлокировкаРаботыПользователей.Form.БлокировкаСоединенийСИнформационнойБазой</DefaultForm> <AuxiliaryForm/> <IncludeHelpInContents>true</IncludeHelpInContents> <ExtendedPresentation/> <Explanation/> </Properties> <ChildObjects> <Attribute uuid="e4abafc6-f859-4d96-9818-5b9bf8d66d69"> <Properties> <Name>ВременноЗапретитьРаботуПользователей</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Временно запретить работу пользователей</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:boolean</v8:Type> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Признак того, что включена блокировка работы пользователей</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>false</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Attribute uuid="535acd2c-26d2-4f32-9ae6-cc1956317c59"> <Properties> <Name>ЗапретитьРаботуРегламентныхЗаданий</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Запретить работу регламентных заданий</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:boolean</v8:Type> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Признак того, что включена блокировка работы регламентных заданий</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>false</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Attribute uuid="801adeeb-8a7f-44c1-b649-a7dfffc7b65d"> <Properties> <Name>КодДляРазблокировки</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Код для разблокировки</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:string</v8:Type> <v8:StringQualifiers> <v8:Length>0</v8:Length> <v8:AllowedLength>Variable</v8:AllowedLength> </v8:StringQualifiers> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Код разрешения, позволяющий администратору войти в заблокированную базу.</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>false</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Attribute uuid="ac4e0868-ba49-46b4-8872-d42483a5591f"> <Properties> <Name>НачалоДействияБлокировки</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Начало действия блокировки</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:dateTime</v8:Type> <v8:DateQualifiers> <v8:DateFractions>DateTime</v8:DateFractions> </v8:DateQualifiers> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Момент времени, с которого начинает действовать блокировка работы пользователей</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>false</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Attribute uuid="45e6c4a6-1d63-4b94-a7d2-fbd3fb68061b"> <Properties> <Name>ОкончаниеДействияБлокировки</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Окончание действия блокировки</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:dateTime</v8:Type> <v8:DateQualifiers> <v8:DateFractions>DateTime</v8:DateFractions> </v8:DateQualifiers> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Момент времени окончания действия блокировки работы пользователей</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>false</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Attribute uuid="0493dcf1-5f94-41f9-a4c7-a52e12a29068"> <Properties> <Name>СообщениеДляПользователей</Name> <Synonym> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Сообщение для пользователей</v8:content> </v8:item> </Synonym> <Comment/> <Type> <v8:Type>xs:string</v8:Type> <v8:StringQualifiers> <v8:Length>300</v8:Length> <v8:AllowedLength>Variable</v8:AllowedLength> </v8:StringQualifiers> </Type> <PasswordMode>false</PasswordMode> <Format/> <EditFormat/> <ToolTip> <v8:item> <v8:lang>ru</v8:lang> <v8:content>Сообщение о причине блокировки, которое выводится пользователю при попытке войти в заблокированную ИБ</v8:content> </v8:item> </ToolTip> <MarkNegatives>false</MarkNegatives> <Mask/> <MultiLine>true</MultiLine> <ExtendedEdit>false</ExtendedEdit> <MinValue xsi:nil="true"/> <MaxValue xsi:nil="true"/> <FillChecking>DontCheck</FillChecking> <ChoiceFoldersAndItems>Items</ChoiceFoldersAndItems> <ChoiceParameterLinks/> <ChoiceParameters/> <QuickChoice>Auto</QuickChoice> <CreateOnInput>Auto</CreateOnInput> <ChoiceForm/> <LinkByType/> <ChoiceHistoryOnInput>Auto</ChoiceHistoryOnInput> </Properties> </Attribute> <Form>БлокировкаСоединенийСИнформационнойБазой</Form> <Form>ОшибкаУстановкиМонопольногоРежима</Form> </ChildObjects> </DataProcessor> </MetaDataObject>
{ "content_hash": "11815dc2f7483e068ba065b2f793cd9a", "timestamp": "", "source": "github", "line_count": 283, "max_line_length": 867, "avg_line_length": 34.639575971731446, "alnum_prop": 0.6632663470366215, "repo_name": "oleynikova/final_task", "id": "e368b1aa4c9b2f18295d9b95620f2d8c2557618b", "size": "10781", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/cf/DataProcessors/БлокировкаРаботыПользователей.xml", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "1C Enterprise", "bytes": "77226" }, { "name": "Cucumber", "bytes": "20584" }, { "name": "GCC Machine Description", "bytes": "506" }, { "name": "Shell", "bytes": "3533" } ], "symlink_target": "" }
use strict; use CXGN::Page; my $page=CXGN::Page->new("Sol Genomics Network","Tyler"); $page->header(); print <<END_HEREDOC; <br /> <center> <table class="boxbgcolor2" width="100%" summary=""> <tr> <td width="33%">&nbsp;</td> <td width="33%" class="left"> <div class="boxcontent"> <br /> <div class="subheading"> <u>SGN Info</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/content/sgn_data.pl">SGN data overview</a><br /> <a class="creativitylinks" href="/about/index.pl">More about SGN</a><br /> <a class="creativitylinks" href="/solanaceae-project/">SOL project</a><br /> <a class="creativitylinks" href="/solanaceae-project/#SOL_news">SOL newsletter</a><br /> <a class="creativitylinks" href="/about/tomato_sequencing.pl">International tomato project</a><br /> </div> <div class="subheading"> <u>Solanaceous Species</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/content/sgn_data.pl#Solanumlycopersicum">Tomato</a><br /> <a class="creativitylinks" href="/content/sgn_data.pl#Capsicumannuum">Pepper</a><br /> <a class="creativitylinks" href="/content/sgn_data.pl#Solanumtuberosum">Potato</a><br /> <a class="creativitylinks" href="/content/sgn_data.pl#Solanummelongena">Eggplant</a><br /> <a class="creativitylinks" href="/content/sgn_data.pl#Petuniahybrida">Petunia</a><br /> <a class="creativitylinks" href="/about/solanum_nomenclature.pl">Solanum nomenclature</a> </div> <div class="subheading"> <u>Tomato Genome</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/about/tomato_sequencing.pl">Sequencing progress</a><br /> <a class="creativitylinks" href="/search/direct_search.pl?search=BACs">Search BACS</a><br /> <a class="creativitylinks" href="/maps/physical/overgo_process_explained.pl">Overgo plating process</a> </div> <div class="subheading"> <u>Maps and Markers</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/cview/index.pl">Available maps</a><br /> <a class="creativitylinks" href="/search/direct_search.pl?search=Markers">Search markers</a><br /> <a class="creativitylinks" href="/markers/cosii_markers.pl">About COSII markers</a><br /> <a class="creativitylinks" href="/documents/markers/cosii.xls">New COSII data available now</a><br /> </div> <div class="subheading"> <u>Sequences</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/search/direct_search.pl?search=EST">Search ESTs</a><br /> <a class="creativitylinks" href="/search/direct_search.pl?search=Unigene">Search unigenes</a><br /> <a class="creativitylinks" href="/search/library_search.pl?term=">cDNA libraries</a> </div> <div class="subheading"> <u>Tools</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/tools/blast/">BLAST</a><br /> <a class="creativitylinks" href="/tools/intron_detection/find_introns.pl">Intron finder</a><br /> </div> <div class="subheading"> <u>Phenotypes and Mutants</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/mutants/mutants_main.pl">Mutants page</a> </div> <div class="subheading"> <u>Order cDNA clones</u> </div> <div class="boxsubcontent"> <a class="creativitylinks" href="/help/ordering/">Ordering page</a> </div> </div> </td> <td width="33%">&nbsp;</td> </tr> </table> </center> END_HEREDOC $page->footer();
{ "content_hash": "121226aad2711605e3d635620c31259f", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 117, "avg_line_length": 41.42424242424242, "alnum_prop": 0.5708363813703975, "repo_name": "solgenomics/sgn", "id": "f7e8b69fb97f23391ce965a08724f90b05296d5d", "size": "4101", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "cgi-bin/maps/physical/index.pl", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "30370" }, { "name": "CSS", "bytes": "420100" }, { "name": "HTML", "bytes": "49243" }, { "name": "JavaScript", "bytes": "6198825" }, { "name": "Makefile", "bytes": "210" }, { "name": "PLpgSQL", "bytes": "26903062" }, { "name": "Perl", "bytes": "17566986" }, { "name": "Prolog", "bytes": "3898" }, { "name": "Python", "bytes": "1632" }, { "name": "R", "bytes": "378627" }, { "name": "Raku", "bytes": "628373" }, { "name": "SCSS", "bytes": "3129" }, { "name": "Shell", "bytes": "5592" }, { "name": "Terra", "bytes": "92077" } ], "symlink_target": "" }
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "bd012faa2d3517aa7fdaef3d94457b0d", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.307692307692308, "alnum_prop": 0.6940298507462687, "repo_name": "mdoering/backbone", "id": "fca92a24d2a74a588a0ba76574da3b897848d2be", "size": "207", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Chromista/Ochrophyta/Coscinodiscophyceae/Meloseirales/Endictyaceae/Endictya/Endictya hendeyi/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
/* * DeliveryHub * * DeliveryHub API * * OpenAPI spec version: 1.0.0 * * Generated by: https://github.com/swagger-api/swagger-codegen.git * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using NUnit.Framework; using System; using System.Linq; using System.IO; using System.Collections.Generic; using IO.Swagger.Api; using IO.Swagger.Model; using IO.Swagger.Client; using System.Reflection; namespace IO.Swagger.Test { /// <summary> /// Class for testing NewStatus /// </summary> /// <remarks> /// This file is automatically generated by Swagger Codegen. /// Please update the test case below to test the model. /// </remarks> [TestFixture] public class NewStatusTests { // TODO uncomment below to declare an instance variable for NewStatus //private NewStatus instance; /// <summary> /// Setup before each test /// </summary> [SetUp] public void Init() { // TODO uncomment below to create an instance of NewStatus //instance = new NewStatus(); } /// <summary> /// Clean up after each test /// </summary> [TearDown] public void Cleanup() { } /// <summary> /// Test an instance of NewStatus /// </summary> [Test] public void NewStatusInstanceTest() { // TODO uncomment below to test "IsInstanceOfType" NewStatus //Assert.IsInstanceOfType<NewStatus> (instance, "variable 'instance' is a NewStatus"); } /// <summary> /// Test the property 'Status' /// </summary> [Test] public void StatusTest() { // TODO unit test for the property 'Status' } /// <summary> /// Test the property 'Payload' /// </summary> [Test] public void PayloadTest() { // TODO unit test for the property 'Payload' } } }
{ "content_hash": "6155783374a6f22caa1903e1f7a8b202", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 98, "avg_line_length": 25.846938775510203, "alnum_prop": 0.5969206474536123, "repo_name": "garywong89/PetStoreAPI", "id": "be38e9e6145870f71727656e28619c65135e62c8", "size": "2533", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "csharp/src/IO.Swagger.Test/Model/NewStatusTests.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1264" }, { "name": "C#", "bytes": "827344" }, { "name": "Java", "bytes": "70253" }, { "name": "Python", "bytes": "463854" }, { "name": "Scala", "bytes": "13904" }, { "name": "Shell", "bytes": "24889" } ], "symlink_target": "" }
<?php namespace Apigee\Edge\Tests\Test\Controller; use Apigee\Edge\Controller\EntityLoadOperationControllerInterface; use Apigee\Edge\Entity\EntityInterface; final class EntityLoadOperationControllerTester extends EntityControllerTesterBase implements EntityLoadOperationControllerTesterInterface { /** * {@inheritdoc} */ public function load(string $entityId): EntityInterface { return $this->decorated->load($entityId); } /** * {@inheritdoc} */ protected function validateController($controller): void { parent::validateController($controller); if (!$controller instanceof EntityLoadOperationControllerInterface && !$controller instanceof EntityControllerTesterInterface) { $class = get_class($controller); throw new \InvalidArgumentException("Controller must implement EntityLoadOperationControllerInterface or EntityControllerTesterInterface. Got {$class}."); } } }
{ "content_hash": "f54643936db4a8f7f612cd9bc936c48e", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 166, "avg_line_length": 31.741935483870968, "alnum_prop": 0.7286585365853658, "repo_name": "apigee/apigee-client-php", "id": "46338731fb8d2a8b823132720f5f708fff3a19ba", "size": "1579", "binary": false, "copies": "1", "ref": "refs/heads/2.x", "path": "tests/Test/Controller/EntityLoadOperationControllerTester.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "1695137" } ], "symlink_target": "" }
require 'test/test_helper' class DavFunctionalTestCase < Test::Unit::TestCase include DavTest def self.inherited sub super sub_name = sub.name.demodulize.underscore if sub_name.sub! /^([^_]*)_controller_test$/, '\1' request_class = sub_name.to_sym if Limeberry::REQUEST_METHODS.include? request_class Limeberry::REQUEST_METHODS[request_class].each do |name| name.gsub!(/-/, '_') name_sym = name.to_sym name_upcase = name.upcase sub.send(:define_method, name) do |*args| path, username = args @request.env['REQUEST_METHOD'] = name_upcase if defined?(@request) path_a = path.split('/').reject { |n| n.blank? } process(name_sym, { :path => path_a}, { :username => username }) end end end end end end
{ "content_hash": "7bf6bc825f3b08e1a275a4bb6deb0e02", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 78, "avg_line_length": 28.322580645161292, "alnum_prop": 0.5660592255125285, "repo_name": "tolsen/limeberry", "id": "b06d575acbb9809c46e0d07cf67d053c6f9e0f39", "size": "1988", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/functional/dav_functional_test.rb", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "1059509" }, { "name": "JavaScript", "bytes": "2313" }, { "name": "Ruby", "bytes": "665695" }, { "name": "Shell", "bytes": "422" } ], "symlink_target": "" }
#region Using Statements using System; using System.Collections.Generic; using Microsoft.Xna.Framework.Content; #endregion namespace RolePlayingGameData { /// <summary> /// Gear that may be equipped onto a FightingCharacter. /// </summary> public class Equipment : Gear { #region Owner Buff /// <summary> /// The statistics buff applied by this equipment to its owner. /// </summary> /// <remarks>Buff values are positive, and will be added.</remarks> private StatisticsValue ownerBuffStatistics = new StatisticsValue(); /// <summary> /// The statistics buff applied by this equipment to its owner. /// </summary> /// <remarks>Buff values are positive, and will be added.</remarks> [ContentSerializer(Optional=true)] public StatisticsValue OwnerBuffStatistics { get { return ownerBuffStatistics; } set { ownerBuffStatistics = value; } } #endregion #region Content Type Reader /// <summary> /// Read the Equipment type from the content pipeline. /// </summary> public class EquipmentReader : ContentTypeReader<Equipment> { /// <summary> /// Read the Equipment type from the content pipeline. /// </summary> protected override Equipment Read(ContentReader input, Equipment existingInstance) { Equipment equipment = existingInstance; if (equipment == null) { throw new ArgumentException( "Unable to create new Equipment objects."); } // read the gear settings input.ReadRawObject<Gear>(equipment as Gear); // read the equipment settings equipment.OwnerBuffStatistics = input.ReadObject<StatisticsValue>(); return equipment; } } #endregion } }
{ "content_hash": "0b684351073cfd5662f7ee580b4d382d", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 84, "avg_line_length": 28.91891891891892, "alnum_prop": 0.5476635514018692, "repo_name": "vnen/xna-rpg-godot", "id": "d6bf13bb6aae20619ad34a28b73df74e1b7c0643", "size": "2465", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "original/RolePlayingGameData/Gear/Equipment.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "1092440" }, { "name": "GDScript", "bytes": "79347" }, { "name": "Shell", "bytes": "3615" } ], "symlink_target": "" }
'use strict'; /** * @ngdoc overview * @name app * @description * # app * * Main module of the application. */ angular.module('beoi', [ 'beoi.modules.main', 'beoi.modules.dashboard', 'beoi.modules.contest', 'beoi.modules.contestant', 'auth0' ]).config([ 'authProvider', '$httpProvider', '$logProvider', function (authProvider, $httpProvider, $logProvider) { console.log('app.config'); $logProvider.debugEnabled(false); authProvider.init({ domain: 'beoi.auth0.com', clientID: 'dmr6gDogihnwo6O47BD6eclcqjvITc8q', callbackURL: location.href }); }]) .run(['auth',function(auth) { console.log('app.run'); // This hooks al auth events to check everything as soon as the app starts auth.hookEvents(); }]);
{ "content_hash": "2c75662f36ffad4e263882738a30aae0", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 76, "avg_line_length": 24.032258064516128, "alnum_prop": 0.6711409395973155, "repo_name": "be-oi/training-js", "id": "66e4ebdb6ec659b719de07d39ce65e7d2a3deda4", "size": "745", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "beoi/scripts/app.js", "mode": "33261", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "24139" }, { "name": "CSS", "bytes": "26" }, { "name": "Gettext Catalog", "bytes": "99" }, { "name": "HTML", "bytes": "16344" }, { "name": "JavaScript", "bytes": "29380" } ], "symlink_target": "" }
namespace eversim { namespace core { namespace rendering { struct texture_packet { GLuint tex_id; glm::ivec2 resolution; texture_packet(const texture_packet&) = delete; texture_packet(const GLuint tid, const glm::ivec2 res) : tex_id(tid), resolution(res) {} ~texture_packet() { glDeleteTextures(1, &tex_id); LOG(INFO) << "deleted texture"; } texture_packet& operator=(const texture_packet&) = delete; bool operator==(const texture_packet& other) const { return tex_id == other.tex_id; } }; class texture_loader final : public utility::resource_manager<texture_loader, std::string, texture_packet> { protected: ptr_type load_file(std::string const& s) override { LOG(INFO) << "Load file " << s << " to GPU"; std::vector<unsigned char> image; unsigned w, h; auto error = lodepng::decode( image , w , h, s.c_str(), LCT_RGBA, 8); if (error) { LOG(ERROR) << "lodepng decoding error of file " << s; throw std::exception(("lodepng decoding error of file "+s).c_str()); } glm::ivec2 res = {w,h}; std::vector<float> image_float;//(res[0] * res[1] *4); auto idxf = [&](const int i ,const int j) -> size_t { return i * w + j; }; for(int i = h-1; i >= 0; i--) { for(int j = 0; j < w; j++) { auto idx = idxf(i,j) * 4; image_float.push_back(static_cast<float>(image.at(idx)) / 255.f); image_float.push_back(static_cast<float>(image.at(idx+1)) / 255.f); image_float.push_back(static_cast<float>(image.at(idx+2)) / 255.f); image_float.push_back(static_cast<float>(image.at(idx+3)) / 255.f); } } GLuint tex_id = 0; glGenTextures(1, &tex_id); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, tex_id); glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, res[0], res[1]); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, res[0], res[1], GL_RGBA, GL_FLOAT, image_float.data()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glBindTexture(GL_TEXTURE_2D, 0); return std::make_shared<texture_packet>(tex_id,res); } }; } } }
{ "content_hash": "1a80265490e98a5bebe5022c2bbd1b11", "timestamp": "", "source": "github", "line_count": 84, "max_line_length": 109, "avg_line_length": 29, "alnum_prop": 0.5997536945812808, "repo_name": "texel-sensei/eversim", "id": "b94a984f3366061b39d40019269aa06fa7df0321", "size": "2647", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "include/core/rendering/texture_loader.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "53" }, { "name": "C++", "bytes": "289799" }, { "name": "CMake", "bytes": "22874" }, { "name": "GLSL", "bytes": "2697" }, { "name": "PLSQL", "bytes": "2143" }, { "name": "Python", "bytes": "668" } ], "symlink_target": "" }
In Erinnerung an Dr. Axel Stoll (* 30. Oktober 1948 in Berlin; † 28. Juli 2014 ebenda). Promovierter Naturwissenschaftler und Gründer des Neu-Schwabenland-Forums.
{ "content_hash": "2498269c451e778365e2bfe090fd3d97", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 87, "avg_line_length": 54.666666666666664, "alnum_prop": 0.7804878048780488, "repo_name": "saufbernd/stollgeschichte", "id": "2e133a509ec2013385f65549476435ac82995f66", "size": "167", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "0_Vorwort.md", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Coq bench</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../../..">Unstable</a></li> <li><a href=".">8.4.dev / contrib:jordan-curve-theorem dev</a></li> <li class="active"><a href="">2014-11-18 23:44:23</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="../../../../../about.html">About</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href=".">« Up</a> <h1> contrib:jordan-curve-theorem <small> dev <span class="label label-info">Not compatible with this Coq</span> </small> </h1> <p><em><script>document.write(moment("2014-11-18 23:44:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2014-11-18 23:44:23 UTC)</em><p> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>ruby lint.rb unstable ../unstable/packages/coq:contrib:jordan-curve-theorem/coq:contrib:jordan-curve-theorem.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>The package is valid. </pre></dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --dry-run coq:contrib:jordan-curve-theorem.dev coq.8.4.dev</code></dd> <dt>Return code</dt> <dd>768</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.4.dev). The following dependencies couldn&#39;t be met: - coq:contrib:jordan-curve-theorem -&gt; coq = dev Your request can&#39;t be satisfied: - Conflicting version constraints for coq No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq, to test if the problem was incompatibility with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --dry-run coq:contrib:jordan-curve-theorem.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>2 s</dd> <dt>Output</dt> <dd><pre>The following actions will be performed: - remove coq.8.4.dev === 1 to remove === =-=- Removing Packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Removing coq.8.4.dev. [WARNING] Directory /home/bench/.opam/system/lib/coq is not empty, not removing [WARNING] Directory /home/bench/.opam/system/share/coq is not empty, not removing The following actions will be performed: - install coq.dev [required by coq:contrib:jordan-curve-theorem] - install coq:contrib:jordan-curve-theorem.dev === 2 to install === =-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= =-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Building coq.dev: ./configure -configdir /home/bench/.opam/system/lib/coq/config -mandir /home/bench/.opam/system/man -docdir /home/bench/.opam/system/doc -prefix /home/bench/.opam/system -usecamlp5 -camlp5dir /home/bench/.opam/system/lib/camlp5 -coqide no -no-native-compiler make -j4 make install Installing coq.dev. Building coq:contrib:jordan-curve-theorem.dev: coq_makefile -f Make -o Makefile make -j4 make install Installing coq:contrib:jordan-curve-theorem.dev. </pre></dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>Data not available in this bench.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "561d6ceee6636f686613b3ff4eb9eefe", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 260, "avg_line_length": 41.8698224852071, "alnum_prop": 0.5139909553420011, "repo_name": "coq-bench/coq-bench.github.io-old", "id": "0ebb1de5702d28b6596226aa5c0c9c2f70ba1057", "size": "7078", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.01.0-1.2.0/unstable/8.4.dev/contrib:jordan-curve-theorem/dev/2014-11-18_23-44-23.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
package unet import ( "bytes" "fmt" "io" "net/http" "strings" "github.com/go-utils/ufs" "github.com/go-utils/ugo" ) // Returns a human-readable URL representation of the specified TCP address. // // Examples: // // `unet.Addr("http", ":8080")` = `http://localhost:8080` // // `unet.Addr("https", "testserver:9090")` = `https://testserver:9090` // // `unet.Addr("http", ":http")` = `http://localhost` // // `unet.Addr("https", "demomachine:https")` = `https://demomachine` func Addr(protocol, tcpAddr string) (fullAddr string) { localhost := ugo.HostName() both := strings.Split(tcpAddr, ":") if len(both) < 1 { both = []string{localhost} } else if len(both[0]) == 0 { both[0] = localhost } if len(both) > 1 { if both[1] == protocol { both[1] = "" } if len(both[1]) == 0 { both = both[:1] } } if fullAddr = strings.Join(both, ":"); len(protocol) > 0 { fullAddr = fmt.Sprintf("%s://%s", protocol, fullAddr) } return } // Downloads a remote file at the specified (`net/http`-compatible) `srcFileUrl` to the specified `dstFilePath`. func DownloadFile(srcFileUrl, dstFilePath string) (err error) { var rc io.ReadCloser if rc, err = OpenRemoteFile(srcFileUrl); err == nil { defer rc.Close() ufs.SaveToFile(rc, dstFilePath) } return } // Opens a remote file at the specified (`net/http`-compatible) `srcFileUrl` and returns its `io.ReadCloser`. func OpenRemoteFile(srcFileUrl string) (src io.ReadCloser, err error) { var resp *http.Response if resp, err = new(http.Client).Get(srcFileUrl); (err == nil) && (resp != nil) { src = resp.Body } return } // Implements `http.ResponseWriter` with a `bytes.Buffer`. type ResponseBuffer struct { // Used to implement the `http.ResponseWriter.Write` method. bytes.Buffer // Used to implement the `http.ResponseWriter.Header` method. Resp http.Response } // Returns `me.Resp.Header`. func (me *ResponseBuffer) Header() http.Header { return me.Resp.Header } // No-op -- currently, headers aren't written to the underlying `bytes.Buffer`. func (_ *ResponseBuffer) WriteHeader(_ int) { }
{ "content_hash": "0329da231a333870405129c44093ab32", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 112, "avg_line_length": 25.390243902439025, "alnum_prop": 0.6657060518731989, "repo_name": "indraniel/go-sra-schemas-1.5", "id": "5656df1cad43e583e56a73513bb171f8271a1f51", "size": "2082", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Godeps/_workspace/src/github.com/go-utils/unet/net.go", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Go", "bytes": "3142860" }, { "name": "Makefile", "bytes": "736" } ], "symlink_target": "" }
package net.runelite.client.plugins.tearsofguthix; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.time.Duration; import java.time.Instant; import javax.inject.Inject; import net.runelite.client.ui.overlay.Overlay; import net.runelite.client.ui.overlay.OverlayLayer; import net.runelite.client.ui.overlay.OverlayPosition; import net.runelite.client.ui.overlay.components.ProgressPieComponent; class TearsOfGuthixOverlay extends Overlay { private static final Color CYAN_ALPHA = new Color(Color.CYAN.getRed(), Color.CYAN.getGreen(), Color.CYAN.getBlue(), 100); private static final Duration MAX_TIME = Duration.ofSeconds(9); private final TearsOfGuthixPlugin plugin; @Inject private TearsOfGuthixOverlay(TearsOfGuthixPlugin plugin) { this.plugin = plugin; setPosition(OverlayPosition.DYNAMIC); setLayer(OverlayLayer.ABOVE_SCENE); } @Override public Dimension render(Graphics2D graphics) { plugin.getStreams().forEach((object, timer) -> { final ProgressPieComponent progressPie = new ProgressPieComponent(); progressPie.setDiameter(15); progressPie.setFill(CYAN_ALPHA); progressPie.setBorderColor(Color.CYAN); progressPie.setPosition(object.getCanvasLocation(100)); final Duration duration = Duration.between(timer, Instant.now()); progressPie.setProgress(1 - (duration.compareTo(MAX_TIME) < 0 ? (double) duration.toMillis() / MAX_TIME.toMillis() : 1)); progressPie.render(graphics); }); return null; } }
{ "content_hash": "3a7f4c6520db52c8433666dd578f7af2", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 122, "avg_line_length": 31.16, "alnum_prop": 0.7477535301668806, "repo_name": "KronosDesign/runelite", "id": "48f29165028b3343d853bc843c8b3c9dc9d08c8a", "size": "2976", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "runelite-client/src/main/java/net/runelite/client/plugins/tearsofguthix/TearsOfGuthixOverlay.java", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Java", "bytes": "7290401" }, { "name": "Shell", "bytes": "327" } ], "symlink_target": "" }
package nz.ac.lconz.irr.curate.task; import org.apache.log4j.Logger; import org.apache.solr.client.solrj.SolrServerException; import org.dspace.content.Collection; import org.dspace.content.Community; import org.dspace.content.DSpaceObject; import org.dspace.content.Item; import org.dspace.core.Constants; import org.dspace.curate.AbstractCurationTask; import org.dspace.curate.Curator; import org.dspace.curate.Distributive; import org.dspace.statistics.SolrLogger; import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * Curation task to update community/collection information for item page views and bitstream downloads * in the usage statistics. This task ensures that the owningColl and owningComm information in the usage statistics * matches the actual collections/communities that the item belongs to. * * @author Andrea Schweer schweer@waikato.ac.nz for the LCoNZ Institutional Research Repositories */ @Distributive public class UpdateStatsContainers extends AbstractCurationTask { private static Logger log = Logger.getLogger(UpdateStatsContainers.class); private int numProcessedItems; private int numErrorItems; @Override public int perform(DSpaceObject dso) throws IOException { numProcessedItems = 0; numErrorItems = 0; try { distribute(dso); } catch (IOException e) { String message = "Problem processing items: " + e.getMessage(); log.error(message, e); report(message); setResult(message); return Curator.CURATE_ERROR; } formatResults(); if (numProcessedItems > 0) { return Curator.CURATE_SUCCESS; } else { return Curator.CURATE_SKIP; } } private void formatResults() { StringBuilder buffer = new StringBuilder(); buffer.append(numProcessedItems); buffer.append(" items processed. \n"); if (numErrorItems > 0) { buffer.append(numErrorItems); buffer.append(" with errors. \n"); } buffer.append("Any changes may take a while to show up due to solr auto-commit settings.\n"); String result = buffer.toString(); report(result); setResult(result); } /** * Performs task upon a single DSpace Item. Used in conjunction with the * <code>distribute</code> method to run a single task across multiple Items. * * You should override this method if you want to use * <code>distribute</code> to run your task across multiple DSpace Items. * * Either this method or <code>performObject</code> should be overridden if * <code>distribute</code> method is used. * * @param item the DSpace Item * @throws java.sql.SQLException if there is a problem performing the task * @throws java.io.IOException if there is a problem performing the task */ @Override protected void performItem(Item item) throws SQLException, IOException { List<String> fieldsToChange = Arrays.asList("owningColl", "owningComm"); ArrayList<List<Object>> newValues = new ArrayList<List<Object>>(); ArrayList<Object> newCollections = new ArrayList<Object>(); Collection[] collections = item.getCollections(); for (Collection coll : collections) { newCollections.add(coll.getID()); } newValues.add(newCollections); ArrayList<Object> newCommunities = new ArrayList<Object>(); Community[] communities = item.getCommunities(); for (Community comm : communities) { newCommunities.add(comm.getID()); } newValues.add(newCommunities); try { SolrLogger.update("(type:" + Constants.ITEM + " AND id:" + item.getID() + ") OR (type:" + Constants.BITSTREAM + " AND owningItem:" + item.getID() + ")", "replace", fieldsToChange, newValues); } catch (SolrServerException e) { numErrorItems++; report("Problem processing item id=" + item.getID() + ": " + e.getMessage()); log.error("Problem updating collection/community info in usage stats for item id=" + item.getID() + ": " + e.getMessage(), e); } report("Processed item id=" + item.getID()); numProcessedItems++; } }
{ "content_hash": "8a6375edb067efdb647c870584d7fee6", "timestamp": "", "source": "github", "line_count": 117, "max_line_length": 129, "avg_line_length": 34.76923076923077, "alnum_prop": 0.7190265486725663, "repo_name": "lconz-irr/Curation-Tasks", "id": "f52290a6cc950ab08c90c61db2407e7888ac5b6b", "size": "4068", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/nz/ac/lconz/irr/curate/task/UpdateStatsContainers.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "123394" } ], "symlink_target": "" }
void PrintUsage() { cout<<"Usage:"<<endl; cout<<"\tWaitForReleaseEvent <iterations in millions>"<<endl; cout<<"Example:"<<endl; cout<<"\tWaitForReleaseEvent 16"<<endl; } bool Parse(int argc, char** argv, size_t& count) { if (2 != argc) { return false; } count = atoi(argv[1]); size_t newCount = count * 1000000; if (newCount < count) { return false; } count = newCount; return true; } void WaitForReleaseOneThread(size_t count) { HANDLE event = CreateEvent(nullptr, false, false, nullptr); SetEvent(event); const ULONG start = (ULONG)GetTickCount64(); for (size_t index = 0; index < count; ++index) { WaitForSingleObject(event, INFINITE); SetEvent(event); } const ULONG finish = (ULONG)GetTickCount64(); CloseHandle(event); event = nullptr; const size_t duration = static_cast<size_t>(finish - start); const double speed = count * 1000.0 / duration; cout<<"WaitForRelease"<<endl; cout<<"\tduration = "<<duration<<", speed = "<<speed<<endl; } void WaitForSuccess(size_t count) { HANDLE event = CreateEvent(nullptr, true, true, nullptr); const ULONG start = (ULONG)GetTickCount64(); for (size_t index = 0; index < count; ++index) { WaitForSingleObject(event, INFINITE); } const ULONG finish = (ULONG)GetTickCount64(); CloseHandle(event); event = nullptr; const size_t duration = static_cast<size_t>(finish - start); const double speed = count * 1000.0 / duration; cout<<"WaitForSuccess"<<endl; cout<<"\tduration = "<<duration<<", speed = "<<speed<<endl; } void WaitForTimeout(size_t count) { HANDLE event = CreateEvent(nullptr, false, false, nullptr); const ULONG start = (ULONG)GetTickCount64(); for (size_t index = 0; index < count; ++index) { WaitForSingleObject(event, 0); } const ULONG finish = (ULONG)GetTickCount64(); CloseHandle(event); event = nullptr; const size_t duration = static_cast<size_t>(finish - start); const double speed = count * 1000.0 / duration; cout<<"WaitForTimeout"<<endl; cout<<"\tduration = "<<duration<<", speed = "<<speed<<endl; } int main(int argc, char* argv[]) { size_t count = 0; if (!Parse(argc, argv, count)) { PrintUsage(); return 1; } WaitForReleaseOneThread(count); cout<<endl; WaitForSuccess(count); cout<<endl; WaitForTimeout(count); return 0; }
{ "content_hash": "127dadb2b45c35a61cc2b49302992c8e", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 62, "avg_line_length": 18.717741935483872, "alnum_prop": 0.6660922016372254, "repo_name": "SoftFx/FDK", "id": "b12e0097ae5303e54487d636f646ac4e4c8fc56e", "size": "2430", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Concepts/LrpEx/WaitForReleaseEvent/WaitForReleaseEvent.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "93" }, { "name": "Batchfile", "bytes": "11690" }, { "name": "C", "bytes": "1604148" }, { "name": "C#", "bytes": "3812620" }, { "name": "C++", "bytes": "4392467" }, { "name": "CSS", "bytes": "6667" }, { "name": "HTML", "bytes": "749307" }, { "name": "JavaScript", "bytes": "1582" }, { "name": "M4", "bytes": "9024" }, { "name": "MQL4", "bytes": "3591066" }, { "name": "Makefile", "bytes": "551003" }, { "name": "NSIS", "bytes": "44972" }, { "name": "PowerShell", "bytes": "99938" }, { "name": "R", "bytes": "46392" }, { "name": "Ruby", "bytes": "29626" }, { "name": "Shell", "bytes": "28661" }, { "name": "Smalltalk", "bytes": "130" }, { "name": "TeX", "bytes": "6234" }, { "name": "XSLT", "bytes": "8772" } ], "symlink_target": "" }
class AddPhotosCountToLicense < ActiveRecord::Migration[4.2] def self.up add_column :licenses, :photos_count, :integer end def self.down remove_column :licenses, :photos_count end end
{ "content_hash": "25ea6b6c96b7ffd0a24ee7d4d1d62303", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 60, "avg_line_length": 22.333333333333332, "alnum_prop": 0.7263681592039801, "repo_name": "openheritage/open-plaques-3", "id": "ef3611a878c493431f5aaed50e6456d2ea24f54a", "size": "201", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "db/migrate/20090406072446_add_photos_count_to_license.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "2271" }, { "name": "HTML", "bytes": "177912" }, { "name": "JavaScript", "bytes": "17973" }, { "name": "Procfile", "bytes": "39" }, { "name": "Ruby", "bytes": "394334" }, { "name": "SCSS", "bytes": "12417" }, { "name": "Sass", "bytes": "2083" }, { "name": "Shell", "bytes": "6944" } ], "symlink_target": "" }
package org.jconfigurations.converters; import org.jconfigurations.ConfigurationException; import java.math.BigInteger; /** * * @author George Aristy */ public class BigIntegerConfigurationConverter implements ConfigurationConverter<BigInteger> { @Override public BigInteger convert(String value) throws ConfigurationException { try{ return BigInteger.valueOf(Long.parseLong(value)); }catch(Exception e){ throw new ConfigurationException(e.getMessage(), e); } } }
{ "content_hash": "d9ac805df4bf0662e7317027836f7d43", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 93, "avg_line_length": 24.95, "alnum_prop": 0.7595190380761523, "repo_name": "llorllale/jconfigurations", "id": "f7316e265339061b1801023c8047d95fcccfdcba", "size": "1098", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/jconfigurations/converters/BigIntegerConfigurationConverter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "177997" } ], "symlink_target": "" }
import {Injectable} from "angular2/core"; import {ReplaySubject, Observable} from "rxjs"; import {IStatus} from "./IStatus"; /** * Defines all the statuses */ @Injectable() export class StatusService { constructor(){ } get OK(): IStatus{ let status: IStatus = { code: 200, message: 'OK', success: true } return Object.assign({}, status); } get Created(): IStatus{ let status: IStatus = { code: 201, message: 'Created', success: true } return Object.assign({}, status); } get BadRequest(): IStatus{ let status: IStatus = { code: 400, message: 'Bad Request', success: false } return Object.assign({}, status); } get NotFound(): IStatus{ let status: IStatus = { code: 404, message: 'Not Found', success: false } return Object.assign({}, status); } get InternalServerError(): IStatus{ let status: IStatus = { code: 500, message: 'Internal Server Error', success: false } return Object.assign({}, status); } }
{ "content_hash": "f2945d77ee18a4d4f3f8136e7b887011", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 47, "avg_line_length": 21.419354838709676, "alnum_prop": 0.473644578313253, "repo_name": "jwanga/angular-api-sprout", "id": "03125b69c38c7b3ebfa9cea0acc1790706ddea64", "size": "1328", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Application.Common/StatusService.ts", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "5027" }, { "name": "TypeScript", "bytes": "30746" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.6.0_27) on Mon Dec 16 23:53:28 EST 2013 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>Uses of Package org.apache.hadoop.mapreduce.lib.output (hadoop-mapreduce-client-core 2.2.0 API)</title> <meta name="date" content="2013-12-16"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Package org.apache.hadoop.mapreduce.lib.output (hadoop-mapreduce-client-core 2.2.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Use</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li>NEXT</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/output/package-use.html" target="_top">FRAMES</a></li> <li><a href="package-use.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 title="Uses of Package org.apache.hadoop.mapreduce.lib.output" class="title">Uses of Package<br>org.apache.hadoop.mapreduce.lib.output</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/package-summary.html">org.apache.hadoop.mapreduce.lib.output</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.hadoop.mapred">org.apache.hadoop.mapred</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.apache.hadoop.mapreduce.lib.output">org.apache.hadoop.mapreduce.lib.output</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.apache.hadoop.mapred"> <!-- --> </a> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/package-summary.html">org.apache.hadoop.mapreduce.lib.output</a> used by <a href="../../../../../../org/apache/hadoop/mapred/package-summary.html">org.apache.hadoop.mapred</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/SequenceFileAsBinaryOutputFormat.WritableValueBytes.html#org.apache.hadoop.mapred">SequenceFileAsBinaryOutputFormat.WritableValueBytes</a> <div class="block">Inner class used for appendRaw</div> </td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.apache.hadoop.mapreduce.lib.output"> <!-- --> </a> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation"> <caption><span>Classes in <a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/package-summary.html">org.apache.hadoop.mapreduce.lib.output</a> used by <a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/package-summary.html">org.apache.hadoop.mapreduce.lib.output</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/FileOutputCommitter.html#org.apache.hadoop.mapreduce.lib.output">FileOutputCommitter</a> <div class="block">An <a href="../../../../../../org/apache/hadoop/mapreduce/OutputCommitter.html" title="class in org.apache.hadoop.mapreduce"><code>OutputCommitter</code></a> that commits files specified in job output directory i.e.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/FileOutputFormat.html#org.apache.hadoop.mapreduce.lib.output">FileOutputFormat</a> <div class="block">A base class for <a href="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce"><code>OutputFormat</code></a>s that read from <code>FileSystem</code>s.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/FileOutputFormat.Counter.html#org.apache.hadoop.mapreduce.lib.output">FileOutputFormat.Counter</a> <div class="block"><strong>Deprecated.</strong>&nbsp;</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/FileOutputFormatCounter.html#org.apache.hadoop.mapreduce.lib.output">FileOutputFormatCounter</a>&nbsp;</td> </tr> <tr class="altColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/FilterOutputFormat.html#org.apache.hadoop.mapreduce.lib.output">FilterOutputFormat</a> <div class="block">FilterOutputFormat is a convenience class that wraps OutputFormat.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/PartialOutputCommitter.html#org.apache.hadoop.mapreduce.lib.output">PartialOutputCommitter</a> <div class="block">Interface for an <a href="../../../../../../org/apache/hadoop/mapreduce/OutputCommitter.html" title="class in org.apache.hadoop.mapreduce"><code>OutputCommitter</code></a> implementing partial commit of task output, as during preemption.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><a href="../../../../../../org/apache/hadoop/mapreduce/lib/output/class-use/SequenceFileOutputFormat.html#org.apache.hadoop.mapreduce.lib.output">SequenceFileOutputFormat</a> <div class="block">An <a href="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce"><code>OutputFormat</code></a> that writes <code>SequenceFile</code>s.</div> </td> </tr> </tbody> </table> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li class="navBarCell1Rev">Use</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li>NEXT</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/output/package-use.html" target="_top">FRAMES</a></li> <li><a href="package-use.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2013 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.</small></p> </body> </html>
{ "content_hash": "f96830156997f42659ba733891cc6602", "timestamp": "", "source": "github", "line_count": 203, "max_line_length": 346, "avg_line_length": 45.69458128078818, "alnum_prop": 0.6608451918930573, "repo_name": "arrowli/RsyncHadoop", "id": "a84cfa9c1e5d08c970a62098c1cb3016ab01ce03", "size": "9276", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/target/org/apache/hadoop/mapreduce/lib/output/package-use.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AspectJ", "bytes": "31146" }, { "name": "C", "bytes": "995983" }, { "name": "C++", "bytes": "77217" }, { "name": "CSS", "bytes": "143541" }, { "name": "Java", "bytes": "42368778" }, { "name": "JavaScript", "bytes": "9376" }, { "name": "Perl", "bytes": "18992" }, { "name": "Python", "bytes": "11309" }, { "name": "Shell", "bytes": "203166" }, { "name": "TeX", "bytes": "19322" }, { "name": "XSLT", "bytes": "62154" } ], "symlink_target": "" }
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.flowable.cdi.annotation.event; import javax.enterprise.util.AnnotationLiteral; public class AssignTaskLiteral extends AnnotationLiteral<AssignTask> implements AssignTask { protected final String activityId; public AssignTaskLiteral(String activityId) { this.activityId = activityId; } @Override public String value() { return activityId != null ? activityId : ""; } }
{ "content_hash": "c74879901d19e24c275bafe794ca305f", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 92, "avg_line_length": 34.275862068965516, "alnum_prop": 0.7283702213279678, "repo_name": "motorina0/flowable-engine", "id": "889d491e88d2ff9bd9d97f1b86516fd4cef81e37", "size": "994", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "modules/flowable-cdi/src/main/java/org/flowable/cdi/annotation/event/AssignTaskLiteral.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "96556" }, { "name": "Batchfile", "bytes": "166" }, { "name": "CSS", "bytes": "681931" }, { "name": "HTML", "bytes": "858905" }, { "name": "Java", "bytes": "22289599" }, { "name": "JavaScript", "bytes": "12782950" }, { "name": "Shell", "bytes": "18731" } ], "symlink_target": "" }
package guitests; import static org.junit.Assert.*; import java.io.File; import org.junit.Test; import seedu.ggist.commons.core.Messages; import seedu.ggist.commons.exceptions.IllegalValueException; import seedu.ggist.logic.commands.SaveCommand; //@@author A0138411N public class SaveCommandTest extends TaskManagerGuiTest { private static final String DEFAULT_TEST_FILENAME = "testData.xml"; private static final String DEFAULT_TEST_FILE_FOLDER = "./src/test/data/sandbox"; @Test public void save_validDirectory() throws IllegalArgumentException, IllegalValueException { commandBox.runCommand("save " + DEFAULT_TEST_FILE_FOLDER); assertSaveSuccess(DEFAULT_TEST_FILE_FOLDER + SaveCommand.DEFAULT_FILENAME); } @Test public void save_invalidDirectory_fail() throws IllegalArgumentException, IllegalValueException { commandBox.runCommand("save abc"); assertResultMessage(SaveCommand.MESSAGE_FAIL + "\n" + SaveCommand.MESSAGE_USAGE); } @Test public void save_validFileExtension_fail() throws IllegalArgumentException, IllegalValueException { commandBox.runCommand("save " + DEFAULT_TEST_FILENAME); assertSaveSuccess(SaveCommand.DEFAULT_FILE_FOLDER + DEFAULT_TEST_FILENAME); } @Test public void save_invalidFileExtension_fail() throws IllegalArgumentException, IllegalValueException { } private void assertSaveSuccess(String filePath) { assertResultMessage(String.format(SaveCommand.MESSAGE_SUCCESS, filePath)); } }
{ "content_hash": "599d7b7ad8d13fe502630781e9d40112", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 105, "avg_line_length": 35.63636363636363, "alnum_prop": 0.7378826530612245, "repo_name": "CS2103AUG2016-W13-C2/main", "id": "58223c2ff912775949885ac1f8c1c7da825e1cd8", "size": "1568", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/java/guitests/SaveCommandTest.java", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "12789" }, { "name": "Java", "bytes": "371218" }, { "name": "XSLT", "bytes": "6290" } ], "symlink_target": "" }
import React from 'react' import classnames from 'classnames' import Difficulties from 'root/constants/Difficulties' import {Link} from 'react-router-dom' import LazyLoad from 'react-lazyload' import P from 'prop-types' import IP from 'react-immutable-proptypes' import ZoneIcon from 'root/components/ZoneIcon' import './styles.styl' const headingNames = [ { title: 'Name' , sortName: 'name' } , { title: 'Soldier Tier' , sortName: 'soldierTier' } , { title: 'Demoman Tier' , sortName: 'demomanTier' } , { title: 'Bonuses' , sortName: 'bonusCount' } , { title: 'Courses' , sortName: 'courseCount' } ] function MapListHeadings({ sort: {sortBy, ascending}, selectMapSort } ) { return ( <thead> <tr> {headingNames.map((h, idx) => { const iconClasses = classnames( ['fa', 'fa-fw'], { 'fa-caret-down': ascending , 'fa-caret-up': !ascending }) return ( <th key={idx}> <span style={{cursor: 'pointer'}} onClick={() => selectMapSort(h.sortName)} > {h.title} {sortBy === h.sortName ? <i className={iconClasses} /> : null} </span> </th> ) })} <th /> </tr> </thead> ) } MapListHeadings.propTypes = ( { sort: P.object.isRequired , selectMapSort: P.func.isRequired }) const Tier = ({ tier }) => <td className={'tier-' + tier}> {tier !== -1 ? <span className={'tier-container tier-' + tier}> <b>{tier}</b> <span className="tier-text">{Difficulties.get(tier)}</span> </span> : 'Not Set' } </td> Tier.propTypes = ( { tier: P.number.isRequired }) const MapListSimple = ({ data, filters, sort, selectMapSort}) => <div className="Maps-MapListSimple"> <table className="table table-condensed"> <MapListHeadings sort={sort} selectMapSort={selectMapSort} /> <tbody> {data.map((m, idx) => { const name = m.get('name') const bonusCount = m.getIn(['zone_counts', 'bonus'], 0) const courseCount = m.getIn(['zone_counts', 'course'], 0) return ( <tr key={idx}> <td> <Link to={`/maps/${name}`}> {name} </Link> </td> <Tier tier={m.getIn(['tier_info', '3'])} /> <Tier tier={m.getIn(['tier_info', '4'])} /> <td> {bonusCount > 0 ? <span><ZoneIcon type="bonus" /> {bonusCount}</span> : 'None'} </td> <td> {courseCount > 0 ? <span><ZoneIcon type="course" /> {courseCount}</span> : 'Linear'} </td> <td width="10"> <a href={`http://tempus.site.nfoservers.com/server/maps/${name}.bsp.bz2`}> <i className="fa fa-download" /> </a> </td> </tr> ) })} </tbody> </table> </div> MapListSimple.propTypes = ( { data: IP.list.isRequired , filters: IP.map.isRequired , sort: IP.record.isRequired , selectMapSort: P.func.isRequired }) export default MapListSimple
{ "content_hash": "ec2597eae6334d53efb96ac7d19004f5", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 100, "avg_line_length": 25.5625, "alnum_prop": 0.5088630806845966, "repo_name": "jsza/tempus-website", "id": "86910149943341df0e70b284e0fc03051d9c7c72", "size": "3272", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/scenes/App/scenes/Maps/components/MapListSimple/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "69581" }, { "name": "HTML", "bytes": "2909" }, { "name": "JavaScript", "bytes": "172587" } ], "symlink_target": "" }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{ "content_hash": "b75df2f8d56d4b92f7e8bc15dcb0aa41", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 9.692307692307692, "alnum_prop": 0.7063492063492064, "repo_name": "mdoering/backbone", "id": "b817b5cb542aeafcacf810b12834e6de3860376a", "size": "186", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Gentianales/Apocynaceae/Ceropegia/Ceropegia glabripedicellata/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?php /** * @see Zend_Gdata_Gbase_Feed */ #require_once 'Zend/Gdata/Gbase/Feed.php'; /** * Represents the Google Base Customer Items Feed * * @link http://code.google.com/apis/base/ * * @category Zend * @package Zend_Gdata * @subpackage Gbase * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Gdata_Gbase_ItemFeed extends Zend_Gdata_Feed { }
{ "content_hash": "c761d865f2bd13828c27fe89f63beb8d", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 87, "avg_line_length": 22.304347826086957, "alnum_prop": 0.645224171539961, "repo_name": "almadaocta/lordbike-production", "id": "6f6061fba35ed04dd154985d67d1bfa152bdab55", "size": "1300", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "errors/includes/src/Zend/Gdata/Gbase/ItemFeed.php", "mode": "33261", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "20744" }, { "name": "ApacheConf", "bytes": "6510" }, { "name": "Batchfile", "bytes": "1053" }, { "name": "C", "bytes": "25531" }, { "name": "CSS", "bytes": "2695575" }, { "name": "HTML", "bytes": "7607119" }, { "name": "JavaScript", "bytes": "4942446" }, { "name": "Makefile", "bytes": "266" }, { "name": "PHP", "bytes": "111927807" }, { "name": "Perl", "bytes": "1124" }, { "name": "PowerShell", "bytes": "1042" }, { "name": "Roff", "bytes": "1009" }, { "name": "Ruby", "bytes": "298" }, { "name": "Shell", "bytes": "2118" }, { "name": "XSLT", "bytes": "2135" } ], "symlink_target": "" }
//// [classMemberInitializerWithLamdaScoping3_0.ts] export var field1: string; //// [classMemberInitializerWithLamdaScoping3_1.ts] declare var console: { log(msg?: any): void; }; export class Test1 { constructor(private field1: string) { } messageHandler = () => { console.log(field1); // Should be error that couldnt find symbol field1 }; } //// [classMemberInitializerWithLamdaScoping3_0.js] exports.field1; //// [classMemberInitializerWithLamdaScoping3_1.js] var Test1 = (function () { function Test1(field1) { this.field1 = field1; this.messageHandler = function () { console.log(field1); // Should be error that couldnt find symbol field1 }; } return Test1; })(); exports.Test1 = Test1;
{ "content_hash": "0379d7cdba511dc77cf0edb37804bcfa", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 83, "avg_line_length": 27.24137931034483, "alnum_prop": 0.6443037974683544, "repo_name": "mauricionr/TypeScript", "id": "a8e0718f27744f3194faf97075184ae2e09267a7", "size": "867", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "tests/baselines/reference/classMemberInitializerWithLamdaScoping4.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "4843" }, { "name": "JavaScript", "bytes": "27687" }, { "name": "PowerShell", "bytes": "2855" }, { "name": "Shell", "bytes": "945" }, { "name": "TypeScript", "bytes": "20740221" } ], "symlink_target": "" }
import pytest from dstools.env.env import _get_name, Env def test_can_create_env_from_dict(cleanup_env): e = Env.from_dict({'a': 1}) assert e.a == 1 def test_assigns_default_name(): assert _get_name('path/to/env.yaml') == 'root' def test_can_extract_name(): assert _get_name('path/to/env.my_name.yaml') == 'my_name' def test_raises_error_if_wrong_format(): with pytest.raises(ValueError): _get_name('path/to/wrong.my_name.yaml') def test_can_instantiate_env_if_located_in_current_dir(move_to_sample, cleanup_env): Env() def test_can_instantiate_env_if_located_in_child_dir(move_to_module, cleanup_env): Env()
{ "content_hash": "de0d8a51cfcbb86b12fd9fc57c155480", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 70, "avg_line_length": 25.5, "alnum_prop": 0.5777777777777777, "repo_name": "edublancas/dstools", "id": "88f61395a7190a17a3fa6b2b3e54ab2f70d521d9", "size": "765", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "tests/test_env.py", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "21898" }, { "name": "Jupyter Notebook", "bytes": "1370" }, { "name": "Python", "bytes": "260295" } ], "symlink_target": "" }
ACCEPTED #### According to Interim Register of Marine and Nonmarine Genera #### Published in null #### Original name null ### Remarks null
{ "content_hash": "1d97587d9d3bf2f580c54583cde5eb14", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 47, "avg_line_length": 10.923076923076923, "alnum_prop": 0.7183098591549296, "repo_name": "mdoering/backbone", "id": "2c60c2af2ec257802fe1c13cd385166ac12c6365", "size": "234", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Striatolebachiites/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package com._4dconcept.springframework.data.marklogic.datasource.lookup; import org.springframework.core.Constants; import org.springframework.lang.Nullable; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.DefaultTransactionDefinition; import org.springframework.transaction.support.TransactionSynchronizationManager; /** * ContentSource that routes to one of various target ContentSources based on the * current transaction isolation level. The target ContentSources need to be * configured with the isolation level name as key, as defined on the * {@link TransactionDefinition TransactionDefinition interface}. * * <p>This is particularly useful in combination with JTA transaction management * (typically through Spring's {@link org.springframework.transaction.jta.JtaTransactionManager}). * Standard JTA does not support transaction-specific isolation levels. Some JTA * providers support isolation levels as a vendor-specific extension (e.g. WebLogic), * which is the preferred way of addressing this. As alternative (e.g. on WebSphere), * the target database can be represented through multiple JNDI ContentSources, each * configured with a different isolation level (for the entire ContentSource). * The present ContentSource router allows to transparently switch to the * appropriate ContentSource based on the current transaction's isolation level. * * <p>The configuration can for example look like this, assuming that the target * ContentSources are defined as individual Spring beans with names * "myRepeatableReadContentSource", "mySerializableContentSource" and "myDefaultContentSource": * * <pre class="code"> * &lt;bean id="contentSourceRouter" class="com._4dconcept.contentfactory.extra.datasource.lookup.IsolationLevelContentSourceRouter"&gt; * &lt;property name="targetContentSources"&gt; * &lt;map&gt; * &lt;entry key="ISOLATION_REPEATABLE_READ" value-ref="myRepeatableReadContentSource"/&gt; * &lt;entry key="ISOLATION_SERIALIZABLE" value-ref="mySerializableContentSource"/&gt; * &lt;/map&gt; * &lt;/property&gt; * &lt;property name="defaultTargetContentSource" ref="myDefaultContentSource"/&gt; * &lt;/bean&gt;</pre> * * Note: If you are using this router in combination with Spring's * {@link org.springframework.transaction.jta.JtaTransactionManager}, * don't forget to switch the "allowCustomIsolationLevels" flag to "true". * (By default, JtaTransactionManager will only accept a default isolation level * because of the lack of isolation level support in standard JTA itself.) * * <pre class="code"> * &lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"&gt; * &lt;property name="allowCustomIsolationLevels" value="true"/&gt; * &lt;/bean&gt;</pre> * * @author Stéphane Toussaint * @author Juergen Hoeller * * @see #setTargetContentSources * @see #setDefaultTargetContentSource * @see TransactionDefinition#ISOLATION_READ_UNCOMMITTED * @see TransactionDefinition#ISOLATION_READ_COMMITTED * @see TransactionDefinition#ISOLATION_REPEATABLE_READ * @see TransactionDefinition#ISOLATION_SERIALIZABLE * @see org.springframework.transaction.jta.JtaTransactionManager */ public class IsolationLevelContentSourceRouter extends AbstractRoutingContentSource { /** Constants instance for TransactionDefinition */ private static final Constants constants = new Constants(TransactionDefinition.class); /** * Supports Integer values for the isolation level constants * as well as isolation level names as defined on the * {@link TransactionDefinition TransactionDefinition interface}. */ @Override protected Object resolveSpecifiedLookupKey(Object lookupKey) { if (lookupKey instanceof Integer) { return lookupKey; } else if (lookupKey instanceof String) { String constantName = (String) lookupKey; if (!constantName.startsWith(DefaultTransactionDefinition.PREFIX_ISOLATION)) { throw new IllegalArgumentException("Only isolation constants allowed"); } return constants.asNumber(constantName); } else { throw new IllegalArgumentException( "Invalid lookup key - needs to be isolation level Integer or isolation level name String: " + lookupKey); } } @Override @Nullable protected Object determineCurrentLookupKey() { return TransactionSynchronizationManager.getCurrentTransactionIsolationLevel(); } }
{ "content_hash": "23e240069a7f4092c5aaa6b3e93edd47", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 136, "avg_line_length": 48.052083333333336, "alnum_prop": 0.7582917840884457, "repo_name": "stoussaint/spring-data-marklogic", "id": "4d81d9cc882029edc3b3f0666d6a9622e1fcd082", "size": "5229", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/_4dconcept/springframework/data/marklogic/datasource/lookup/IsolationLevelContentSourceRouter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "467712" } ], "symlink_target": "" }
require "test_helper" class Admin::ExportTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
{ "content_hash": "8424a73df5ce761869bfc14fbd6f323f", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 49, "avg_line_length": 18.142857142857142, "alnum_prop": 0.6929133858267716, "repo_name": "myapnea/www.myapnea.org", "id": "6a482f616cc11f0afd033ca86b050d4a12a17feb", "size": "158", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/models/admin/export_test.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "94254" }, { "name": "CoffeeScript", "bytes": "22025" }, { "name": "HTML", "bytes": "284085" }, { "name": "JavaScript", "bytes": "2077" }, { "name": "Ruby", "bytes": "347108" } ], "symlink_target": "" }
package cn.bishiti.base.patterns.FactoryMethod; public class SendSmsFactory implements Provider{ @Override public Sender produce() { // TODO Auto-generated method stub return new SmsSender(); } }
{ "content_hash": "c60f2e2073f22fae925235e2a28ff7a5", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 48, "avg_line_length": 18.727272727272727, "alnum_prop": 0.7572815533980582, "repo_name": "LittleLazyCat/TXEYXXK", "id": "99ac9426845e0b434e14d4c5d3ba9e8d29b13c1b", "size": "206", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "2017workspace/TXLHT/src/main/java/cn/bishiti/base/patterns/FactoryMethod/SendSmsFactory.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "35841" }, { "name": "ApacheConf", "bytes": "768" }, { "name": "Batchfile", "bytes": "2067" }, { "name": "C#", "bytes": "16030" }, { "name": "CSS", "bytes": "3799756" }, { "name": "FreeMarker", "bytes": "33818" }, { "name": "HTML", "bytes": "4677568" }, { "name": "Java", "bytes": "13081066" }, { "name": "JavaScript", "bytes": "30072557" }, { "name": "PHP", "bytes": "38697" }, { "name": "PLSQL", "bytes": "13547" }, { "name": "PLpgSQL", "bytes": "5316" }, { "name": "Shell", "bytes": "1357" } ], "symlink_target": "" }
#include <unistd.h> #include <fcntl.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <stdint.h> #include <toe/cmdlopt.h> #include <linuxapi/linuxapi.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> #include <inttypes.h> #include <readline/history.h> #include <readline/readline.h> #include <vector> #include "../Globals.h" #define APPNAME "rf24-cli" #define FAIL(...) fprintf(stderr, "ERROR: " __VA_ARGS__) static int ProcessInput(char* str); static void FormatCommands(); struct Arg { const char* Name; const char* Description; const char* Example; }; struct Command { const char* Name; const char* Description; const Arg* Args; }; static const Command Commands[] = { { "help", "Prints this help", NULL }, { "route", "<2 hex chars> gets the netork id of next hop in route", NULL }, { "quit", "Exits the program", NULL }, { NULL, NULL, NULL }, }; static const cmdlopt_opt s_Options[] = { CMDLOPT_COMMON_OPTIONS, CMDLOPT_OPTION_TERMINATOR }; const int QuitError = 1; static int s_Socket = -1; static char s_CommandsHelp[512]; static std::vector<char> s_Buffer; int main(int argc, char** argv) { std::vector<char> command; sockaddr_un socketAddress; FormatCommands(); cmdlopt_set_help_header("Usage: " APPNAME " [cmd ...]"); cmdlopt_set_help_footer(s_CommandsHelp); cmdlopt_set_app_name(APPNAME); cmdlopt_set_app_version("1.0\nCopyright (c) 2016 Jean Gressmann <jean@0x42.de>"); cmdlopt_set_options(s_Options); int error = cmdlopt_parse_cmdl(argc, argv, NULL); switch (error) { case CMDLOPT_E_NONE: break; case CMDLOPT_E_HELP_REQUESTED: case CMDLOPT_E_VERSION_REQUESTED: error = 0; goto Exit; case CMDLOPT_E_UNKNOWN_OPTION: cmdlopt_fprint_help(stderr); goto Exit; case CMDLOPT_E_ERRNO: error = errno; goto Exit; case CMDLOPT_E_INVALID_PARAM: FAIL("Internal program error %d\n", error); goto Exit; default: goto Exit; } for (int i = optind; i < argc; ++i) { const char* p = argv[i]; while (*p) { command.push_back(*p++); } command.push_back(' '); } if (command.size()) { command.push_back(0); } s_Socket = socket(AF_UNIX, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0); if (s_Socket == -1) { FAIL("Failed to create socket\n"); error = errno; goto Exit; } memset(&socketAddress, 0, sizeof(socketAddress)); socketAddress.sun_family = AF_UNIX; strncpy(socketAddress.sun_path, RF24_NETWORK_SOCKET_PATH, sizeof(socketAddress.sun_path)); if (connect(s_Socket, (sockaddr*)&socketAddress, sizeof(socketAddress)) < 0) { FAIL("Failed to connect to AF_UNIX socket %s\n", socketAddress.sun_path); error = errno; goto Exit; } if (command.size()) { error = ProcessInput(&command[0]); } else { for (bool done = false; !done; ) { char* input = readline("rf24>"); if (!input) { break; } if (!*input) { continue; } add_history(input); error = ProcessInput(input); switch (error) { case 0: break; case QuitError: error = 0; default: done = true; break; } if (s_Socket == -1) { done = true; } free(input); } } Exit: if (s_Socket >= 0) safe_close(s_Socket); if (error > 0) { fprintf(stderr, "%s (%d)\n", strerror(error), error); } return error; } static void FormatCommands() { size_t offset = 0; offset += snprintf(s_CommandsHelp + offset, sizeof(s_CommandsHelp) - offset, "Commands:\n"); for (size_t i = 0; Commands[i].Name; ++i) { offset += snprintf(s_CommandsHelp + offset, sizeof(s_CommandsHelp) - offset, "%8s: %s\n", Commands[i].Name, Commands[i].Description); if (Commands[i].Args) { const Arg* args = Commands[i].Args; for (size_t j = 0; args[j].Name; ++j) { offset += snprintf(s_CommandsHelp + offset, sizeof(s_CommandsHelp) - offset, "%-10s%s: %s\n", "", args[j].Name, args[j].Description); if (args[j].Example) { offset += snprintf(s_CommandsHelp + offset, sizeof(s_CommandsHelp) - offset, "%-10sExample: %s\n", "", args[j].Example); } } } } } static size_t Sanatize(char*& input) { while (whitespace(*input)) { ++input; } size_t len = strlen(input); while (len && whitespace(input[len - 1])) { input[--len] = 0; } return len; } static bool Write(const char* ptr, size_t bytes) { Start: ssize_t w = write(s_Socket, ptr, bytes); if (w == -1) { switch (errno) { case EINTR: goto Start; default: safe_close_ref(&s_Socket); return false; } } return true; } static bool Read() { s_Buffer.resize(0); char buffer[32]; Start: ssize_t r = read(s_Socket, buffer, sizeof(buffer)); if (r == -1) { switch (errno) { case EINTR: goto Start; case EAGAIN: if (s_Buffer.empty()) { usleep(1000); goto Start; } break; default: safe_close_ref(&s_Socket); return false; } } else { if (r) { s_Buffer.insert(s_Buffer.end(), buffer, buffer + r); goto Start; } } return true; } static void ProcessRoute(char* input) { const size_t len = Sanatize(input); if (!len) { fprintf(stderr, "Command requires one arguments (the id to route to).\n"); return; } if (Write(input, len)) { if (Read()) { s_Buffer.push_back(0); fprintf(stdout, "%s\n", &s_Buffer[0]); } } } static int ProcessInput(char *input) { Sanatize(input); if (strcmp("quit", input) == 0) { return QuitError; } if (strncmp(input, "route", 5) == 0) { ProcessRoute(input + 6); } else if (strcmp("?", input) == 0 || strcmp("help", input) == 0) { fprintf(stdout, s_CommandsHelp); } else { fprintf(stdout, "Unrecognized command '%s'. Type 'help' (without the quotes) to get a list of commands.\n", input); } return 0; }
{ "content_hash": "a5d7c209625d8c3e3b4b8b8426c70882", "timestamp": "", "source": "github", "line_count": 292, "max_line_length": 149, "avg_line_length": 22.763698630136986, "alnum_prop": 0.5376861742139311, "repo_name": "jgressmann/Weatherbug", "id": "c556441ee6f4d4a888ecbb5541df4a9462d9d7c5", "size": "7805", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/rpi/rf24-cli.cpp", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "112448" }, { "name": "C++", "bytes": "158760" }, { "name": "CMake", "bytes": "12138" } ], "symlink_target": "" }
The MongoDB proxy was developed to help drivers who do not have either replicaset or advanced authentication support for MongoDB. It aims to make it possible for any basic mongodb driver to be able to tap into the advanced features provided by MongoDB. ## Design of Proxy The Proxy uses the node.js mongodb native driver to provide the glue between your driver and MongoDB. For each connection you open to the proxy an equal connection is opened to the MongoDB server on the other side (or in the case of a replicaset 1 connection per member in the Replicaset). The takes care of all the complex authentication mechanisms as well as managing connectivity to the MongoDB topology. The proxy identifies itself to the driver as a `mongos` proxy and the connecting driver can route queries sending the `$readPreference` field in the query. ## Proxy Configuration Settings ### JSON Configuration file settings The proxy configuration `json` file options | Option | Description | |------------------|-------------| | port | The tcp port the proxy binds to | | uri | The MongoDB Topology URI (See driver docs for parameters) | | bind_to | The tcp address to bind the proxy to | | log_level | The logging level [error/info/debug] | | log_file | The log file to append to | | auth.sslCA | Location of certificate authority file | | auth.sslCert | Location of public certificate file we are presenting | | auth.sslKey | Location of private certificate file we are presenting | | auth.sslPass | SSL Certificate password | | auth.sslValidate | Validate mongod certificate | Example configuration file ```js { "port": 51000 , "uri": "mongodb://localhost:27017/test" , "bind_to": "127.0.0.1" , "auth": { "sslCA": "./ca.pem" , "sslCert": "./cert.pem" , "sslKey": "./cert.pem" , "sslPass": "somekey" , "sslValidate": false } , "log_level": "error" , "log_file": "./proxy.log" } ``` ### Command line configuration file settings ``` Usage: node ./index.js Examples: node ./index.js -p 51000 -b 127.0.0.1 -u mongodb://localhost:27017 Run proxy on port 51000 and bind to 127.0.0.1 Options: -p, --port Port proxy is running on [default: 51000] -u, --uri Connection url to mongodb [default: "mongodb://localhost:27017/test"] -b, --bind_to Bind to host interface [default: "127.0.0.1"] -c, --config JSON configuration file --auth-sslCA Location of certificate authority file --auth-sslCert Location of public certificate file we are presenting --auth-sslKey Location of private certificate file we are presenting --auth-sslPass SSL Certificate password --auth-sslValidate Validate mongod certificate [default: false] --log_level [default: "error"] --log_file ``` ### Simple Example of running the proxy Start up a mongod process ``` mkdir data mongod --dbpath=./data ``` Start up the proxy ``` node ./index.js -u mongodb://localhost:27017/test -p 61000 ``` Connect to MongoDB via the proxy using the shell ``` mongo --port 61000 ```
{ "content_hash": "435d250e8d4e6f3072dab5cdcd69d0f0", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 407, "avg_line_length": 37.247191011235955, "alnum_prop": 0.6437405731523379, "repo_name": "christkv/mongodb-proxy", "id": "f271abc4420c1c0e6360b5f3e9fc2a91dc8380c5", "size": "3332", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "JavaScript", "bytes": "36659" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="8dp"> <android.support.v7.widget.CardView android:id="@+id/fragFormDocument_cardText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="10dp" app:cardElevation="4dp" app:cardUseCompatPadding="true"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" android:padding="12dp"> <EditText android:id="@+id/fragFormDocument_title" android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="start|top" android:hint="@string/fragFormDocument_title" android:inputType="textMultiLine" android:maxLines="2" android:minLines="2" android:textColor="@color/colorPrimaryDark" /> <EditText android:id="@+id/fragFormDocument_link" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/fragFormDocument_title" android:layout_marginTop="8dp" android:gravity="start|top" android:hint="@string/fragFormDocument_link" android:inputType="textMultiLine" android:maxLines="2" android:minLines="2" android:textColor="@color/colorPrimaryDark" /> <EditText android:id="@+id/fragFormDocument_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/fragFormDocument_link" android:layout_marginTop="8dp" android:hint="@string/fragFormDocument_description" android:inputType="textMultiLine" android:maxLines="8" android:minLines="8" android:textColor="@color/colorPrimaryDark" /> </RelativeLayout> </android.support.v7.widget.CardView> <android.support.design.widget.FloatingActionButton android:id="@+id/fragFormDocument_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_margin="20dp" android:src="@drawable/ic_checkbox_marked_circle_outline_white_36dp" /> </RelativeLayout>
{ "content_hash": "6ef0ac427ffb854ce4def6f088e83255", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 79, "avg_line_length": 41.869565217391305, "alnum_prop": 0.6033229491173416, "repo_name": "JMedinilla/CondominApp", "id": "27e53c070820755883ebda4053a9b318ca3db036", "size": "2889", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/layout/fragment_form_document.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "215004" } ], "symlink_target": "" }
from __future__ import division import numpy as np import gzip import cPickle as pickle import cv2 import matplotlib.pyplot as plt import matplotlib.patches as mpatches import sys sys.path.insert(0, '../mlp_test') from data_utils import load_mnist train_len = 1000 start=0 the_colors = [ 'blue', 'green', 'red', 'cyan', 'magenta', 'yellow', 'darkblue', 'lawngreen', 'orange', 'violet'] showSequence = True data_set = load_mnist()[0] target_values = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) chosens = [(index,data_set[1][index]) for index in range(start, start + train_len) if data_set[1][index] in target_values] sorted_chosens = np.asarray(sorted(chosens, key=lambda target: target[1])) X_data = np.asarray(data_set[0][sorted_chosens[:,0]]) y_data = np.asarray([data_set[1][sorted_chosens[:,0]]])[0] clrs = [the_colors[k] for i in range(train_len) for k in target_values if y_data[i] == k] if not showSequence: params = {'legend.fontsize': 6} plt.rcParams.update(params) patches = [] for k in target_values: patch = mpatches.Patch(color=the_colors[k], label=str(target_values[k])) patches.append(patch) for l in range(7): plt.title('Hu moment ' + str(l)) if not showSequence: plt.subplot(4, 2, l+1) mom_1 = [] for index in range(train_len): img_arr = X_data[index] img_val = y_data[index] mom_1.append(cv2.HuMoments(cv2.moments(img_arr))[l]) plt.legend(handles=patches) plt.scatter(range(train_len),mom_1, color=clrs) if showSequence: plt.show() if not showSequence: plt.show()
{ "content_hash": "e17b7ea80c8796671e0b7c4e53293907", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 123, "avg_line_length": 27.789473684210527, "alnum_prop": 0.6590909090909091, "repo_name": "laputian/dml", "id": "81a14e4fd988c88e018b6aee2e41e362cc3535f2", "size": "1584", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "hu/hu_moments_1.py", "mode": "33188", "license": "mit", "language": [ { "name": "Python", "bytes": "326596" } ], "symlink_target": "" }
<?php namespace yii\db; /** * The QueryInterface defines the minimum set of methods to be implemented by a database query. * * The default implementation of this interface is provided by [[QueryTrait]]. * * It has support for getting [[one]] instance or [[all]]. * Allows pagination via [[limit]] and [[offset]]. * Sorting is supported via [[orderBy]] and items can be limited to match some conditions using [[where]]. * * @author Qiang Xue <qiang.xue@gmail.com> * @author Carsten Brandt <mail@cebe.cc> * @since 2.0 */ interface QueryInterface { /** * Executes the query and returns all results as an array. * @param Connection $db the database connection used to execute the query. * If this parameter is not given, the `db` application component will be used. * @return array the query results. If the query results in nothing, an empty array will be returned. */ public function all($db = null); /** * Executes the query and returns a single row of result. * @param Connection $db the database connection used to execute the query. * If this parameter is not given, the `db` application component will be used. * @return array|boolean the first row (in terms of an array) of the query result. False is returned if the query * results in nothing. */ public function one($db = null); /** * Returns the number of records. * @param string $q the COUNT expression. Defaults to '*'. * @param Connection $db the database connection used to execute the query. * If this parameter is not given, the `db` application component will be used. * @return integer number of records */ public function count($q = '*', $db = null); /** * Returns a value indicating whether the query result contains any row of data. * @param Connection $db the database connection used to execute the query. * If this parameter is not given, the `db` application component will be used. * @return boolean whether the query result contains any row of data. */ public function exists($db = null); /** * Sets the [[indexBy]] property. * @param string|callable $column the name of the column by which the query results should be indexed by. * This can also be a callable (e.g. anonymous function) that returns the index value based on the given * row data. The signature of the callable should be: * * ~~~ * function ($row) * { * // return the index value corresponding to $row * } * ~~~ * * @return static the query object itself */ public function indexBy($column); /** * Sets the WHERE part of the query. * * The `$condition` specified as an array can be in one of the following two formats: * * - hash format: `['column1' => value1, 'column2' => value2, ...]` * - operator format: `[operator, operand1, operand2, ...]` * * A condition in hash format represents the following SQL expression in general: * `column1=value1 AND column2=value2 AND ...`. In case when a value is an array, * an `IN` expression will be generated. And if a value is `null`, `IS NULL` will be used * in the generated expression. Below are some examples: * * - `['type' => 1, 'status' => 2]` generates `(type = 1) AND (status = 2)`. * - `['id' => [1, 2, 3], 'status' => 2]` generates `(id IN (1, 2, 3)) AND (status = 2)`. * - `['status' => null] generates `status IS NULL`. * * A condition in operator format generates the SQL expression according to the specified operator, which * can be one of the followings: * * - **and**: the operands should be concatenated together using `AND`. For example, * `['and', 'id=1', 'id=2']` will generate `id=1 AND id=2`. If an operand is an array, * it will be converted into a string using the rules described here. For example, * `['and', 'type=1', ['or', 'id=1', 'id=2']]` will generate `type=1 AND (id=1 OR id=2)`. * The method will *not* do any quoting or escaping. * * - **or**: similar to the `and` operator except that the operands are concatenated using `OR`. For example, * `['or', ['type' => [7, 8, 9]], ['id' => [1, 2, 3]]` will generate `(type IN (7, 8, 9) OR (id IN (1, 2, 3)))`. * * - **not**: this will take only one operand and build the negation of it by prefixing the query string with `NOT`. * For example `['not', ['attribute' => null]]` will result in the condition `NOT (attribute IS NULL)`. * * - **between**: operand 1 should be the column name, and operand 2 and 3 should be the * starting and ending values of the range that the column is in. * For example, `['between', 'id', 1, 10]` will generate `id BETWEEN 1 AND 10`. * * - **not between**: similar to `between` except the `BETWEEN` is replaced with `NOT BETWEEN` * in the generated condition. * * - **in**: operand 1 should be a column or DB expression, and operand 2 be an array representing * the range of the values that the column or DB expression should be in. For example, * `['in', 'id', [1, 2, 3]]` will generate `id IN (1, 2, 3)`. * The method will properly quote the column name and escape values in the range. * * To create a composite `IN` condition you can use and array for the column name and value, where the values are indexed by the column name: * `['in', ['id', 'name'], [['id' => 1, 'name' => 'foo'], ['id' => 2, 'name' => 'bar']] ]`. * * You may also specify a sub-query that is used to get the values for the `IN`-condition: * `['in', 'user_id', (new Query())->select('id')->from('users')->where(['active' => 1])]` * * - **not in**: similar to the `in` operator except that `IN` is replaced with `NOT IN` in the generated condition. * * - **like**: operand 1 should be a column or DB expression, and operand 2 be a string or an array representing * the values that the column or DB expression should be like. * For example, `['like', 'name', 'tester']` will generate `name LIKE '%tester%'`. * When the value range is given as an array, multiple `LIKE` predicates will be generated and concatenated * using `AND`. For example, `['like', 'name', ['test', 'sample']]` will generate * `name LIKE '%test%' AND name LIKE '%sample%'`. * The method will properly quote the column name and escape special characters in the values. * Sometimes, you may want to add the percentage characters to the matching value by yourself, you may supply * a third operand `false` to do so. For example, `['like', 'name', '%tester', false]` will generate `name LIKE '%tester'`. * * - **or like**: similar to the `like` operator except that `OR` is used to concatenate the `LIKE` * predicates when operand 2 is an array. * * - **not like**: similar to the `like` operator except that `LIKE` is replaced with `NOT LIKE` * in the generated condition. * * - **or not like**: similar to the `not like` operator except that `OR` is used to concatenate * the `NOT LIKE` predicates. * * - **exists**: operand 1 is a query object that used to build an `EXISTS` condition. For example * `['exists', (new Query())->select('id')->from('users')->where(['active' => 1])]` will result in the following SQL expression: * `EXISTS (SELECT "id" FROM "users" WHERE "active"=1)`. * * - **not exists**: similar to the `exists` operator except that `EXISTS` is replaced with `NOT EXISTS` in the generated condition. * * - Additionally you can specify arbitrary operators as follows: A condition of `['>=', 'id', 10]` will result in the * following SQL expression: `id >= 10`. * * @param string|array $condition the conditions that should be put in the WHERE part. * @return static the query object itself * @see andWhere() * @see orWhere() */ public function where($condition); /** * Adds an additional WHERE condition to the existing one. * The new condition and the existing one will be joined using the 'AND' operator. * @param string|array $condition the new WHERE condition. Please refer to [[where()]] * on how to specify this parameter. * @return static the query object itself * @see where() * @see orWhere() */ public function andWhere($condition); /** * Adds an additional WHERE condition to the existing one. * The new condition and the existing one will be joined using the 'OR' operator. * @param string|array $condition the new WHERE condition. Please refer to [[where()]] * on how to specify this parameter. * @return static the query object itself * @see where() * @see andWhere() */ public function orWhere($condition); /** * Sets the WHERE part of the query ignoring empty parameters. * * @param array $condition the conditions that should be put in the WHERE part. Please refer to [[where()]] * on how to specify this parameter. * @return static the query object itself * @see andFilterWhere() * @see orFilterWhere() */ public function filterWhere(array $condition); /** * Adds an additional WHERE condition to the existing one ignoring empty parameters. * The new condition and the existing one will be joined using the 'AND' operator. * @param array $condition the new WHERE condition. Please refer to [[where()]] * on how to specify this parameter. * @return static the query object itself * @see filterWhere() * @see orFilterWhere() */ public function andFilterWhere(array $condition); /** * Adds an additional WHERE condition to the existing one ignoring empty parameters. * The new condition and the existing one will be joined using the 'OR' operator. * @param array $condition the new WHERE condition. Please refer to [[where()]] * on how to specify this parameter. * @return static the query object itself * @see filterWhere() * @see andFilterWhere() */ public function orFilterWhere(array $condition); /** * Sets the ORDER BY part of the query. * @param string|array $columns the columns (and the directions) to be ordered by. * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array * (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`). * The method will automatically quote the column names unless a column contains some parenthesis * (which means the column contains a DB expression). * @return static the query object itself * @see addOrderBy() */ public function orderBy($columns); /** * Adds additional ORDER BY columns to the query. * @param string|array $columns the columns (and the directions) to be ordered by. * Columns can be specified in either a string (e.g. "id ASC, name DESC") or an array * (e.g. `['id' => SORT_ASC, 'name' => SORT_DESC]`). * The method will automatically quote the column names unless a column contains some parenthesis * (which means the column contains a DB expression). * @return static the query object itself * @see orderBy() */ public function addOrderBy($columns); /** * Sets the LIMIT part of the query. * @param integer $limit the limit. Use null or negative value to disable limit. * @return static the query object itself */ public function limit($limit); /** * Sets the OFFSET part of the query. * @param integer $offset the offset. Use null or negative value to disable offset. * @return static the query object itself */ public function offset($offset); }
{ "content_hash": "3808ddeb4469fe886d0940062a1fbd57", "timestamp": "", "source": "github", "line_count": 251, "max_line_length": 147, "avg_line_length": 48.569721115537845, "alnum_prop": 0.6246411287015011, "repo_name": "pranjalcodefire/yiiuserplugin", "id": "393c7f9a00cc698c1f1b56a7f3f7617a16b9faab", "size": "12339", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/yiisoft/yii2/db/QueryInterface.php", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "3961" }, { "name": "JavaScript", "bytes": "8872" }, { "name": "PHP", "bytes": "320816" }, { "name": "R", "bytes": "857" }, { "name": "Shell", "bytes": "1601" } ], "symlink_target": "" }
console.log(Number.isFinite(Infinity)); // false console.log(Number.isFinite(NaN)); // false console.log(Number.isFinite(-Infinity)); // false console.log(Number.isFinite(0)); // true console.log(Number.isFinite(2e64)); // true console.log(Number.isFinite("0")); // false, would've been true with global isFinite("0")
{ "content_hash": "2dddc8fcb33b1a30e0a6ca9b158dbcce", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 95, "avg_line_length": 38.55555555555556, "alnum_prop": 0.6657060518731989, "repo_name": "carlosalberto/echo-js", "id": "4b0bd9bf65fcd47c7f053770271d2fc9d3457af5", "size": "347", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "test/number-isfinite1.js", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "915023" }, { "name": "C++", "bytes": "250964" }, { "name": "CoffeeScript", "bytes": "480063" }, { "name": "JavaScript", "bytes": "7348151" }, { "name": "Makefile", "bytes": "37864" }, { "name": "Objective-C", "bytes": "149453" }, { "name": "Perl", "bytes": "90633" }, { "name": "Python", "bytes": "396" }, { "name": "Shell", "bytes": "21472" } ], "symlink_target": "" }
this["wp"] = this["wp"] || {}; this["wp"]["a11y"] = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 459); /******/ }) /************************************************************************/ /******/ ({ /***/ 1: /***/ (function(module, exports) { (function() { module.exports = this["wp"]["i18n"]; }()); /***/ }), /***/ 261: /***/ (function(module, exports) { (function() { module.exports = this["wp"]["domReady"]; }()); /***/ }), /***/ 459: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "setup", function() { return /* binding */ setup; }); __webpack_require__.d(__webpack_exports__, "speak", function() { return /* binding */ speak; }); // EXTERNAL MODULE: external {"this":["wp","domReady"]} var external_this_wp_domReady_ = __webpack_require__(261); var external_this_wp_domReady_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_domReady_); // EXTERNAL MODULE: external {"this":["wp","i18n"]} var external_this_wp_i18n_ = __webpack_require__(1); // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-intro-text.js /** * WordPress dependencies */ /** * Build the explanatory text to be placed before the aria live regions. * * This text is initially hidden from assistive technologies by using a `hidden` * HTML attribute which is then removed once a message fills the aria-live regions. * * @return {HTMLParagraphElement} The explanatory text HTML element. */ function addIntroText() { var introText = document.createElement('p'); introText.id = 'a11y-speak-intro-text'; introText.className = 'a11y-speak-intro-text'; introText.textContent = Object(external_this_wp_i18n_["__"])('Notifications'); introText.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); introText.setAttribute('hidden', 'hidden'); var _document = document, body = _document.body; if (body) { body.appendChild(introText); } return introText; } // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-container.js /** * Build the live regions markup. * * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'. * * @return {HTMLDivElement} The ARIA live region HTML element. */ function addContainer() { var ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite'; var container = document.createElement('div'); container.id = "a11y-speak-".concat(ariaLive); container.className = 'a11y-speak-region'; container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); container.setAttribute('aria-live', ariaLive); container.setAttribute('aria-relevant', 'additions text'); container.setAttribute('aria-atomic', 'true'); var _document = document, body = _document.body; if (body) { body.appendChild(container); } return container; } // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/clear.js /** * Clears the a11y-speak-region elements and hides the explanatory text. */ function clear() { var regions = document.getElementsByClassName('a11y-speak-region'); var introText = document.getElementById('a11y-speak-intro-text'); for (var i = 0; i < regions.length; i++) { regions[i].textContent = ''; } // Make sure the explanatory text is hidden from assistive technologies. if (introText) { introText.setAttribute('hidden', 'hidden'); } } // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js var previousMessage = ''; /** * Filter the message to be announced to the screenreader. * * @param {string} message The message to be announced. * * @return {string} The filtered message. */ function filterMessage(message) { /* * Strip HTML tags (if any) from the message string. Ideally, messages should * be simple strings, carefully crafted for specific use with A11ySpeak. * When re-using already existing strings this will ensure simple HTML to be * stripped out and replaced with a space. Browsers will collapse multiple * spaces natively. */ message = message.replace(/<[^<>]+>/g, ' '); /* * Safari + VoiceOver don't announce repeated, identical strings. We use * a `no-break space` to force them to think identical strings are different. */ if (previousMessage === message) { message += "\xA0"; } previousMessage = message; return message; } // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js /** * WordPress dependencies */ /** * Internal dependencies */ /** * Create the live regions. */ function setup() { var introText = document.getElementById('a11y-speak-intro-text'); var containerAssertive = document.getElementById('a11y-speak-assertive'); var containerPolite = document.getElementById('a11y-speak-polite'); if (introText === null) { addIntroText(); } if (containerAssertive === null) { addContainer('assertive'); } if (containerPolite === null) { addContainer('polite'); } } /** * Run setup on domReady. */ external_this_wp_domReady_default()(setup); /** * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions. * This module is inspired by the `speak` function in `wp-a11y.js`. * * @param {string} message The message to be announced by assistive technologies. * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'. * * @example * ```js * import { speak } from '@wordpress/a11y'; * * // For polite messages that shouldn't interrupt what screen readers are currently announcing. * speak( 'The message you want to send to the ARIA live region' ); * * // For assertive messages that should interrupt what screen readers are currently announcing. * speak( 'The message you want to send to the ARIA live region', 'assertive' ); * ``` */ function speak(message, ariaLive) { /* * Clear previous messages to allow repeated strings being read out and hide * the explanatory text from assistive technologies. */ clear(); message = filterMessage(message); var introText = document.getElementById('a11y-speak-intro-text'); var containerAssertive = document.getElementById('a11y-speak-assertive'); var containerPolite = document.getElementById('a11y-speak-polite'); if (containerAssertive && ariaLive === 'assertive') { containerAssertive.textContent = message; } else if (containerPolite) { containerPolite.textContent = message; } /* * Make the explanatory text available to assistive technologies by removing * the 'hidden' HTML attribute. */ if (introText) { introText.removeAttribute('hidden'); } } /***/ }) /******/ });
{ "content_hash": "458e5811b2646a6998945e8086da0dbe", "timestamp": "", "source": "github", "line_count": 318, "max_line_length": 293, "avg_line_length": 33.68238993710692, "alnum_prop": 0.6216039585472878, "repo_name": "pjhooker/monferratopaesaggi", "id": "5ba45b893f99fab21f0c931e127589812e3590b8", "size": "10711", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "trunk/wp-includes/js/dist/a11y.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1796" } ], "symlink_target": "" }
from typing import List, Optional, Tuple # noqa import attr from path import Path import cli_ui as ui import tsrc import tsrc.executor import tsrc.git class BadBranches(tsrc.Error): pass @attr.s(frozen=True) class RepoAtIncorrectBranchDescription: dest = attr.ib() # type: str actual = attr.ib() # type: str expected = attr.ib() # type: str class Syncer(tsrc.executor.Task[tsrc.Repo]): def __init__( self, workspace_path: Path, *, force: bool = False, remote_name: Optional[str] = None, ) -> None: self.workspace_path = workspace_path self.bad_branches = [] # type: List[RepoAtIncorrectBranchDescription] self.force = force self.remote_name = remote_name def on_start(self, *, num_items: int) -> None: ui.info_1("Synchronizing workspace") def on_failure(self, *, num_errors: int) -> None: ui.error("Failed to synchronize workspace") def display_item(self, repo: tsrc.Repo) -> str: return repo.dest def process(self, index: int, count: int, repo: tsrc.Repo) -> None: """ Synchronize a repo given its configuration in the manifest. Always start by running `git fetch`, then either: * try resetting the repo to the given tag or sha1 (abort if the repo is dirty) * or try merging the local branch with its upstream (abort if not on on the correct branch, or if the merge is not fast-forward). """ ui.info_count(index, count, repo.dest) repo_path = self.workspace_path / repo.dest self.fetch(repo) ref = None if repo.tag: ref = repo.tag elif repo.sha1: ref = repo.sha1 if ref: self.sync_repo_to_ref(repo_path, ref) else: self.check_branch(repo, repo_path) self.sync_repo_to_branch(repo_path) def check_branch(self, repo: tsrc.Repo, repo_path: Path) -> None: current_branch = None try: current_branch = tsrc.git.get_current_branch(repo_path) except tsrc.Error: raise tsrc.Error("Not on any branch") if current_branch and current_branch != repo.branch: self.bad_branches.append( RepoAtIncorrectBranchDescription( dest=repo.dest, actual=current_branch, expected=repo.branch ) ) def _pick_remotes(self, repo: tsrc.Repo) -> List[tsrc.Remote]: if self.remote_name: for remote in repo.remotes: if remote.name == self.remote_name: return [remote] message = f"Remote {self.remote_name} not found for repository {repo.dest}" raise tsrc.Error(message) return repo.remotes def fetch(self, repo: tsrc.Repo) -> None: repo_path = self.workspace_path / repo.dest for remote in self._pick_remotes(repo): try: ui.info_2("Fetching", remote.name) cmd = ["fetch", "--tags", "--prune", remote.name] if self.force: cmd.append("--force") tsrc.git.run(repo_path, *cmd) except tsrc.Error: raise tsrc.Error(f"fetch from '{remote.name}' failed") @staticmethod def sync_repo_to_ref(repo_path: Path, ref: str) -> None: ui.info_2("Resetting to", ref) status = tsrc.git.get_status(repo_path) if status.dirty: raise tsrc.Error(f"{repo_path} is dirty, skipping") try: tsrc.git.run(repo_path, "reset", "--hard", ref) except tsrc.Error: raise tsrc.Error("updating ref failed") @staticmethod def sync_repo_to_branch(repo_path: Path) -> None: ui.info_2("Updating branch") try: tsrc.git.run(repo_path, "merge", "--ff-only", "@{upstream}") except tsrc.Error: raise tsrc.Error("updating branch failed") def display_bad_branches(self) -> None: if not self.bad_branches: return ui.error("Some projects were not on the correct branch") headers = ("project", "actual", "expected") data = [ ((ui.bold, x.dest), (ui.red, x.actual), (ui.green, x.expected)) for x in self.bad_branches ] ui.info_table(data, headers=headers) raise BadBranches()
{ "content_hash": "ae84b57dad696558cd5bfc05f2520599", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 87, "avg_line_length": 32.6985294117647, "alnum_prop": 0.5734202833370812, "repo_name": "TankerApp/tsrc", "id": "c058ebf8b6d2658e4e97a4945dcb3e819ce1ca8f", "size": "4447", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tsrc/workspace/syncer.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Python", "bytes": "108166" } ], "symlink_target": "" }
package org.livetribe.slp.spi.ua; import java.util.List; import org.livetribe.slp.Attributes; import org.livetribe.slp.Scopes; import org.livetribe.slp.ServiceInfo; import org.livetribe.slp.ServiceType; import org.livetribe.slp.ServiceURL; /** * */ public interface IUserAgent { public List<ServiceInfo> findServices(ServiceType serviceType, String language, Scopes scopes, String filter); public Attributes findAttributes(ServiceType serviceType, String language, Scopes scopes, Attributes tags); public Attributes findAttributes(ServiceURL serviceURL, String language, Scopes scopes, Attributes tags); public List<ServiceType> findServiceTypes(String namingAuthority, Scopes scopes); }
{ "content_hash": "1c7a46302fad4e7d09a8d2ee1bc3c5ac", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 114, "avg_line_length": 28.56, "alnum_prop": 0.7955182072829131, "repo_name": "livetribe/livetribe-slp", "id": "fd92356c13e0590513c72b0fca4aa87e5c4a557b", "size": "1332", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/org/livetribe/slp/spi/ua/IUserAgent.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "914918" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="ProjectModuleManager"> <modules> <module fileurl="file://$PROJECT_DIR$/Automotriz.iml" filepath="$PROJECT_DIR$/Automotriz.iml" /> </modules> </component> </project>
{ "content_hash": "e9cdd0e73cec6f2201f76a57e930363e", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 102, "avg_line_length": 32.5, "alnum_prop": 0.6653846153846154, "repo_name": "santiago19871/uip-prog2", "id": "30ba7cd6e47d9684a4e52c56065f434bbde87ff5", "size": "260", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Practicas/Clase8/.idea/modules.xml", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2304" }, { "name": "Java", "bytes": "41128" } ], "symlink_target": "" }
using System.Text.RegularExpressions; namespace De.Osthus.Ambeth.Security { public interface IServicePermission { Regex[] Patterns { get; } PermissionApplyType ApplyType { get; } } }
{ "content_hash": "7db843e5443ab398475e7044dbdf7c18", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 46, "avg_line_length": 19.454545454545453, "alnum_prop": 0.6728971962616822, "repo_name": "Dennis-Koch/ambeth", "id": "cb25f3dc4a3a8aac003b4f77c26febb69ff8c638", "size": "216", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "ambeth/Ambeth.Security/ambeth/security/IServicePermission.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "2866" }, { "name": "Batchfile", "bytes": "3505" }, { "name": "C#", "bytes": "4180068" }, { "name": "HTML", "bytes": "2889" }, { "name": "Java", "bytes": "8556639" }, { "name": "PLSQL", "bytes": "11227" } ], "symlink_target": "" }
import collections from simpleflow import logger # noinspection PyUnresolvedReferences class History(object): """ History data. :ivar _history: raw(ish) history events :type _history: swf.models.history.History :ivar _activities: activity events :type _activities: collections.OrderedDict[str, dict[str, Any]] :ivar _child_workflows: child workflow events :type _child_workflows: collections.OrderedDict[str, dict[str, Any]] :ivar _external_workflows_signaling: external workflow signaling events, by initiated event ID :type _external_workflows_signaling: collections.OrderedDict[int, dict[str, Any]] :ivar _external_workflows_canceling: external workflow canceling events :type _external_workflows_canceling: collections.OrderedDict[str, dict[str, Any]] :ivar _signals: activity events :type _signals: collections.OrderedDict[str, dict[str, Any]] :ivar _markers: marker events :type _markers: collections.OrderedDict[str, list[dict[str, Any]]] :ivar _timers: timer events :type _timers: dict[str, dict[str, Any]]] :ivar _tasks: ordered list of tasks/etc :type _tasks: list[dict[str, Any]] """ def __init__(self, history): self._history = history self._activities = collections.OrderedDict() self._child_workflows = collections.OrderedDict() self._external_workflows_signaling = collections.OrderedDict() self._external_workflows_canceling = collections.OrderedDict() self._signals = collections.OrderedDict() self._signaled_workflows = collections.defaultdict(list) self._markers = collections.OrderedDict() self._timers = {} self._tasks = [] self._cancel_requested = None self._cancel_failed = None self.started_decision_id = None self.completed_decision_id = None @property def swf_history(self): """ :return: SWF history :rtype: swf.models.history.History """ return self._history @property def activities(self): """ :return: activities :rtype: collections.OrderedDict[str, dict[str, Any]] """ return self._activities @property def child_workflows(self): """ :return: child WFs :rtype: collections.OrderedDict[str, dict[str, Any]] """ return self._child_workflows @property def external_workflows_signaling(self): """ :return: external WFs :rtype: collections.OrderedDict[str, dict[str, Any]] """ return self._external_workflows_signaling @property def signals(self): """ :return: signals :rtype: collections.OrderedDict[str, dict[str, Any]] """ return self._signals @property def cancel_requested(self): """ :return: Last cancel requested event, if any. :rtype: Optional[dict] """ return self._cancel_requested @property def cancel_failed(self): """ :return: Last cancel failed event, if any. :rtype: Optional[dict] """ return self._cancel_failed @property def cancel_requested_id(self): """ :return: ID of last cancel requested event, if any. :rtype: Optional[int] """ return self._cancel_requested["event_id"] if self._cancel_requested else None @property def cancel_failed_decision_task_completed_event_id(self): """ :return: ID of last cancel failed event, if any. :rtype: Optional[int] """ return ( self._cancel_failed["decision_task_completed_event_id"] if self._cancel_failed else None ) @property def signaled_workflows(self): """ :return: signaled workflows :rtype: defaultdict(list) """ return self._signaled_workflows @property def markers(self): """ :return: Markers :rtype: collections.OrderedDict[str, list[dict[str, Any]]] """ return self._markers @property def timers(self): # type: () -> Dict[str, Dict[str, Any]] return self._timers @property def tasks(self): """ :return: :rtype: list[dict[str, Any]] """ return self._tasks @property def events(self): """ :return: :rtype: list[swf.models.event.Event] """ return self._history.events def parse_activity_event(self, events, event): """ Aggregate all the attributes of an activity in a single entry. :param events: :type events: list[swf.models.event.Event] :param event: :type event: swf.models.event.Event """ def get_activity(): """ Return a reference to the corresponding activity. :return: mutable activity :rtype: dict[str, Any] """ scheduled_event = events[event.scheduled_event_id - 1] return self._activities[scheduled_event.activity_id] if event.state == "scheduled": activity = { "type": "activity", "id": event.activity_id, "name": event.activity_type["name"], "version": event.activity_type["version"], "state": event.state, "scheduled_id": event.id, "scheduled_timestamp": event.timestamp, "input": event.input, "task_list": event.task_list["name"], "control": event.control, "decision_task_completed_event_id": event.decision_task_completed_event_id, } if event.activity_id not in self._activities: self._activities[event.activity_id] = activity self._tasks.append(activity) else: # When the executor retries a task, it schedules it again. # We have to take care of not overriding some values set by the # previous execution of the task such as the number of retries # in ``retry``. As the state of the event mutates, it # corresponds to the last execution. self._activities[event.activity_id].update(activity) elif event.state == "schedule_failed": activity = { "type": "activity", "state": event.state, "cause": event.cause, "activity_type": event.activity_type.copy(), "schedule_failed_timestamp": event.timestamp, } if event.activity_id not in self._activities: self._activities[event.activity_id] = activity self._tasks.append(activity) else: # When the executor retries a task, it schedules it again. # We have to take care of not overriding some values set by the # previous execution of the task such as the number of retries # in ``retry``. As the state of the event mutates, it # corresponds to the last execution. self._activities[event.activity_id].update(activity) elif event.state == "started": activity = get_activity() activity.update( { "state": event.state, "identity": event.identity, "started_id": event.id, "started_timestamp": event.timestamp, } ) elif event.state == "completed": activity = get_activity() activity.update( { "state": event.state, "result": getattr(event, "result", None), "completed_id": event.id, "completed_timestamp": event.timestamp, } ) elif event.state == "timed_out": activity = get_activity() activity.update( { "state": event.state, "timeout_type": event.timeout_type, "timeout_value": getattr( events[activity["scheduled_id"] - 1], "{}_timeout".format(event.timeout_type.lower()), ), "timed_out_id": event.id, "timed_out_timestamp": event.timestamp, } ) if "retry" not in activity: activity["retry"] = 0 else: activity["retry"] += 1 elif event.state == "failed": activity = get_activity() activity.update( { "state": event.state, "reason": getattr(event, "reason", ""), "details": getattr(event, "details", ""), "failed_id": event.id, "failed_timestamp": event.timestamp, } ) if "retry" not in activity: activity["retry"] = 0 else: activity["retry"] += 1 elif event.state == "cancelled": activity = get_activity() activity.update( { "state": event.state, "details": getattr(event, "details", ""), "cancelled_timestamp": event.timestamp, } ) elif event.state == "cancel_requested": activity = { "type": "activity", "id": event.activity_id, "state": event.state, "cancel_requested_timestamp": event.timestamp, "cancel_decision_task_completed_event_id": event.decision_task_completed_event_id, } if event.activity_id not in self._activities: self._activities[event.activity_id] = activity self._tasks.append(activity) else: self._activities[event.activity_id].update(activity) def parse_child_workflow_event(self, events, event): """Aggregate all the attributes of a workflow in a single entry. See http://docs.aws.amazon.com/amazonswf/latest/apireference/API_HistoryEvent.html - StartChildWorkflowExecutionInitiated: A request was made to start a child workflow execution. - StartChildWorkflowExecutionFailed: Failed to process StartChildWorkflowExecution decision. This happens when the decision is not configured properly, for example the workflow type specified is not registered. - ChildWorkflowExecutionStarted: A child workflow execution was successfully started. - ChildWorkflowExecutionCompleted: A child workflow execution, started by this workflow execution, completed successfully and was closed. - ChildWorkflowExecutionFailed: A child workflow execution, started by this workflow execution, failed to complete successfully and was closed. - ChildWorkflowExecutionTimedOut: A child workflow execution, started by this workflow execution, timed out and was closed. - ChildWorkflowExecutionCanceled: A child workflow execution, started by this workflow execution, was canceled and closed. - ChildWorkflowExecutionTerminated: A child workflow execution, started by this workflow execution, was terminated. :param events: :type events: list[swf.models.event.Event] :param event: :type event: swf.models.event.Event """ def get_workflow(): initiated_event = events[event.initiated_event_id - 1] return self._child_workflows[initiated_event.workflow_id] if event.state == "start_initiated": workflow = { "type": "child_workflow", "id": event.workflow_id, "name": event.workflow_type["name"], "version": event.workflow_type["version"], "state": event.state, "initiated_event_id": event.id, "raw_input": event.raw.get( "input" ), # FIXME obsolete; any user out there? "input": event.input, "child_policy": event.child_policy, "control": event.control, "tag_list": getattr(event, "tag_list", None), "task_list": event.task_list["name"], "initiated_event_timestamp": event.timestamp, "decision_task_completed_event_id": event.decision_task_completed_event_id, } if event.workflow_id not in self._child_workflows: self._child_workflows[event.workflow_id] = workflow self._tasks.append(workflow) else: # May have gotten a start_failed before (or retrying?) if ( self._child_workflows[event.workflow_id]["state"] == "start_initiated" ): # Should not happen anymore logger.warning( "start_initiated again for workflow {} (initiated @{}, we're @{})".format( event.workflow_id, self._child_workflows[event.workflow_id][ "initiated_event_id" ], event.id, ) ) self._child_workflows[event.workflow_id].update(workflow) elif event.state == "start_failed": workflow = { "type": "child_workflow", "id": event.workflow_id, "state": event.state, "cause": event.cause, "name": event.workflow_type["name"], "version": event.workflow_type["version"], "control": event.control, "start_failed_id": event.id, "start_failed_timestamp": event.timestamp, "decision_task_completed_event_id": event.decision_task_completed_event_id, } if event.workflow_id not in self._child_workflows: self._child_workflows[event.workflow_id] = workflow self._tasks.append(workflow) else: self._child_workflows[event.workflow_id].update(workflow) elif event.state == "started": workflow = get_workflow() workflow.update( { "state": event.state, "run_id": event.workflow_execution["runId"], "workflow_id": event.workflow_execution["workflowId"], "started_id": event.id, "started_timestamp": event.timestamp, } ) elif event.state == "completed": workflow = get_workflow() workflow.update( { "state": event.state, "result": getattr(event, "result", None), "completed_id": event.id, "completed_timestamp": event.timestamp, } ) elif event.state == "failed": workflow = get_workflow() workflow.update( { "state": event.state, "reason": getattr(event, "reason", None), "details": getattr(event, "details", None), "failed_id": event.id, "failed_timestamp": event.timestamp, } ) if "retry" not in workflow: workflow["retry"] = 0 else: workflow["retry"] += 1 elif event.state == "timed_out": workflow = get_workflow() workflow.update( { "state": event.state, "timeout_type": event.timeout_type, "timeout_value": getattr( events[workflow["initiated_event_id"] - 1], "{}_timeout".format(event.timeout_type.lower()), None, ), "timed_out_id": event.id, "timed_out_timestamp": event.timestamp, } ) if "retry" not in workflow: workflow["retry"] = 0 else: workflow["retry"] += 1 elif event.state == "canceled": workflow = get_workflow() workflow.update( { "state": event.state, "details": getattr(event, "details", None), "canceled_id": event.id, "canceled_timestamp": event.timestamp, } ) elif event.state == "terminated": workflow = get_workflow() workflow.update( { "state": event.state, "terminated_id": event.id, "terminated_timestamp": event.timestamp, } ) def parse_workflow_event(self, events, event): """ Parse a workflow event. :param events: :param event: """ if event.state == "signaled": signal = { "type": "signal", "name": event.signal_name, "state": event.state, "external_initiated_event_id": getattr( event, "external_initiated_event_id", None ), "external_run_id": getattr( event, "external_workflow_execution", {} ).get("runId"), "external_workflow_id": getattr( event, "external_workflow_execution", {} ).get("workflowId"), "input": event.input, "event_id": event.id, "timestamp": event.timestamp, } self._signals[event.signal_name] = signal self._tasks.append(signal) elif event.state == "cancel_requested": cancel_requested = { "type": event.state, "cause": getattr(event, "cause", None), "external_initiated_event_id": getattr( event, "external_initiated_event_id", None ), "external_run_id": getattr( event, "external_workflow_execution", {} ).get("runId"), "external_workflow_id": getattr( event, "external_workflow_execution", {} ).get("workflowId"), "event_id": event.id, "timestamp": event.timestamp, } self._cancel_requested = cancel_requested elif event.state == "cancel_failed": cancel_failed = { "type": event.state, "cause": getattr(event, "cause", None), "event_id": event.id, "decision_task_completed_event_id": event.decision_task_completed_event_id, "timestamp": event.timestamp, } self._cancel_failed = cancel_failed def parse_external_workflow_event(self, events, event): """ Parse an external workflow event. :param events: :param event: """ def get_workflow(workflows): initiated_event = events[event.initiated_event_id - 1] return workflows[initiated_event.workflow_id] if event.state == "signal_execution_initiated": workflow = { "type": "external_workflow", "id": event.workflow_id, "run_id": getattr(event, "run_id", None), "signal_name": event.signal_name, "state": event.state, "initiated_event_id": event.id, "input": event.input, "control": event.control, "initiated_event_timestamp": event.timestamp, } self._external_workflows_signaling[event.id] = workflow elif event.state == "signal_execution_failed": workflow = self._external_workflows_signaling[event.initiated_event_id] workflow.update( { "state": event.state, "cause": event.cause, "signal_failed_timestamp": event.timestamp, } ) if event.control: workflow["control"] = event.control elif event.state == "execution_signaled": workflow = self._external_workflows_signaling[event.initiated_event_id] workflow.update( { "state": event.state, "run_id": event.workflow_execution["runId"], "workflow_id": event.workflow_execution["workflowId"], "signaled_event_id": event.id, "signaled_timestamp": event.timestamp, } ) self._signaled_workflows[workflow["signal_name"]].append(workflow) elif event.state == "request_cancel_execution_initiated": workflow = { "type": "external_workflow", "id": event.workflow_id, "run_id": getattr(event, "run_id", None), "state": event.state, "control": event.control, "initiated_event_id": event.id, "initiated_event_timestamp": event.timestamp, } if event.workflow_id not in self._external_workflows_canceling: self._external_workflows_canceling[event.workflow_id] = workflow else: logger.warning( "request_cancel_initiated again for workflow {} (initiated @{}, we're @{})".format( event.workflow_id, self._external_workflows_canceling[event.workflow_id][ "initiated_event_id" ], event.id, ) ) self._external_workflows_canceling[event.workflow_id].update(workflow) elif event.state == "request_cancel_execution_failed": workflow = get_workflow(self._external_workflows_canceling) workflow.update( {"state": event.state, "cause": event.cause,} ) if event.control: workflow["control"] = event.control workflow["request_cancel_failed_timestamp"] = event.timestamp elif event.state == "execution_cancel_requested": workflow = get_workflow(self._external_workflows_canceling) workflow.update( { "run_id": event.workflow_execution["runId"], "workflow_id": event.workflow_execution["workflowId"], "cancel_requested_event_id": event.id, "cancel_requested_timestamp": event.timestamp, } ) def parse_marker_event(self, events, event): if event.state == "recorded": marker = { "type": "marker", "name": event.marker_name, "state": event.state, "details": getattr(event, "details", None), "event_id": event.id, "timestamp": event.timestamp, } self._markers.setdefault(event.marker_name, []).append(marker) elif event.state == "record_failed": marker = { "type": "marker", "name": event.marker_name, "state": event.state, "cause": event.cause, "record_failed_event_id": event.id, "record_failed_event_timestamp": event.timestamp, } self._markers.setdefault(event.marker_name, []).append(marker) def parse_timer_event(self, events, event): if event.state == "started": timer = { "type": "timer", "id": event.timer_id, "state": event.state, "start_to_fire_timeout": int(event.start_to_fire_timeout), "control": event.control, "started_event_id": event.id, "started_event_timestamp": event.timestamp, "decision_task_completed_event_id": event.decision_task_completed_event_id, } self._timers[event.timer_id] = timer elif event.state == "fired": timer = self._timers[event.timer_id] timer.update( { "state": event.state, "fired_event_id": event.id, "fired_event_timestamp": event.timestamp, } ) elif event.state == "start_failed": timer = self._timers.get(event.timer_id) if timer is None: timer = { "type": "timer", "id": event.timer_id, "decision_task_completed_event_id": event.decision_task_completed_event_id, } self._timers[event.timer_id] = timer timer.update( { "state": event.state, "cause": event.cause, "start_failed_event_id": event.id, "start_failed_event_timestamp": event.timestamp, } ) elif event.state == "canceled": timer = self._timers[event.timer_id] timer.update( { "state": event.state, "canceled_event_id": event.id, "canceled_event_timestamp": event.timestamp, "cancel_decision_task_completed_event_id": event.decision_task_completed_event_id, } ) elif event.state == "cancel_failed": timer = self._timers.get(event.timer_id) if timer is None: timer = { "type": "timer", "id": event.timer_id, "cancel_decision_task_completed_event_id": event.decision_task_completed_event_id, } self._timers[event.timer_id] = timer timer.update( { "state": event.state, "cancel_failed_event_id": event.id, "cancel_failed_event_timestamp": event.timestamp, } ) def parse_decision_event(self, events, event): if event.state == "started": self.started_decision_id = event.id if event.state == "completed": self.completed_decision_id = event.id TYPE_TO_PARSER = { "ActivityTask": parse_activity_event, "DecisionTask": parse_decision_event, "ChildWorkflowExecution": parse_child_workflow_event, "WorkflowExecution": parse_workflow_event, "ExternalWorkflowExecution": parse_external_workflow_event, "Marker": parse_marker_event, "Timer": parse_timer_event, } def parse(self): """ Parse the events. Update the corresponding statuses. """ events = self.events for event in events: parser = self.TYPE_TO_PARSER.get(event.type) if parser: parser(self, events, event) @staticmethod def get_event_id(event): for event_id_key in ( # FIXME add a universal name?.. "scheduled_id", "initiated_event_id", "event_id", "started_event_id", "cancel_failed_event_id", ): event_id = event.get(event_id_key) if event_id: return event_id
{ "content_hash": "89b7c5398dbd743b0cb93aaa8e82aa42", "timestamp": "", "source": "github", "line_count": 738, "max_line_length": 103, "avg_line_length": 38.52710027100271, "alnum_prop": 0.506805472514332, "repo_name": "botify-labs/simpleflow", "id": "5945db5ebe4f86edd6db352874e91d2a5a6d2b5f", "size": "28433", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "simpleflow/history.py", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "298" }, { "name": "Python", "bytes": "801698" }, { "name": "Shell", "bytes": "4481" } ], "symlink_target": "" }
ramsondon i2c library for arduino. Notes: this library has only been tested with an arduino due and a drotek 10DOF breakout board (MPU9250 and MS5611). for testing purposes the breakout board has been connected directly to the 3.3v output pin of the arduino due. 10DOF ----> Arduino SDA ----> SDA (20) SCL ----> SCL (21) VDD ----> 3.3v GND ----> GND ```c #include "i2c.h" #define MPU9250_DEFAULT_ADDRESS 0x69 #define MPU9250_WHOAMI 0x75 void setup() { Serial.begin(9600); I2C* i2c = new I2C(MPU9250_DEFAULT_ADDRESS); // to test you can scan I2C bus - and use callback functions here i2c->scan((i2c_cb_ptr)scan_success, (i2c_cb_ptr)scan_error); // another test -> read who am i regsiter of MPU9250 on the breakout board byte c = i2c->read(MPU9250_WHOAMI); Serial.print("MPU9250 "); Serial.print("I AM "); Serial.print(c, HEX); Serial.print(" I should be "); Serial.println(0x71, HEX); } void loop() {} void scan_success(int address) { Serial.print("I2C device found at address 0x"); if (address<16) Serial.print("0"); Serial.print(address,HEX); Serial.println("!"); } void scan_error(int address) { Serial.print("Unknow error at address 0x"); if (address<16) Serial.print("0"); Serial.println(address,HEX); } ``` As output you should receive the following: I2C device found at address 0x69! MPU9250 I AM 71 I should be 71
{ "content_hash": "58490a797c17e60e4a2fc111fd8ac92b", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 111, "avg_line_length": 21.833333333333332, "alnum_prop": 0.6585704371963914, "repo_name": "ramsondon/arduino-i2c", "id": "2414945dd3038aae307f981d54e0eaf8ce7e00c9", "size": "1441", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "3969" } ], "symlink_target": "" }
package net.whg.we.net.server; import java.io.DataInput; import java.io.DataInputStream; import java.io.DataOutput; import java.io.DataOutputStream; import java.io.IOException; import net.whg.we.net.ConnectionData; import net.whg.we.net.IDataHandler; import net.whg.we.net.IPacket; import net.whg.we.net.ISocket; /** * A basic implementation of the connection client interface. */ public class ServerClient implements IConnectedClient { private final ISocket socket; private final ConnectionData connection; private final IDataHandler dataHandler; private final DataInput dataInput; private final DataOutput dataOutput; /** * Creates a new server client wrapper. * * @param socket * - The socket this client is wrapping. * @param dataHandler * - The data handler for parsing byte data. * @throws IOException */ public ServerClient(ISocket socket, IDataHandler dataHandler) throws IOException { this.socket = socket; this.dataHandler = dataHandler; this.dataInput = new DataInputStream(socket.getInputStream()); this.dataOutput = new DataOutputStream(socket.getOutputStream()); var ip = socket.getIP(); var port = socket.getPort(); connection = new ConnectionData(ip, port); } @Override public ConnectionData getConnection() { return connection; } @Override public void kick() throws IOException { socket.close(); } @Override public IPacket readPacket() throws IOException { return dataHandler.readPacket(dataInput, this); } @Override public void sendPacket(IPacket packet) throws IOException { dataHandler.writePacket(dataOutput, packet); } }
{ "content_hash": "f43e29fc4e8b023b481462298b4b9dc4", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 84, "avg_line_length": 25.956521739130434, "alnum_prop": 0.68285873813512, "repo_name": "TheDudeFromCI/WraithEngine", "id": "02738910a726f05f4fbc40994830144bc96efd2c", "size": "1791", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/net/whg/we/net/server/ServerClient.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "394862" } ], "symlink_target": "" }
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/extensions/TeX/begingroup.js * * Implements \begingroup and \endgroup commands that make local * definitions possible and are removed when the \endgroup occurs. * * --------------------------------------------------------------------- * * Copyright (c) 2011-2018 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ MathJax.Extension["TeX/begingroup"] = { version: "2.7.5" }; MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () { var TEX = MathJax.InputJax.TeX, TEXDEF = TEX.Definitions; /****************************************************/ // // A namespace for localizing macros and environments // (\begingroup and \endgroup create and destroy these) // var NSFRAME = MathJax.Object.Subclass({ macros: null, // the local macro definitions environments: null, // the local environments Init: function (macros,environments) { this.macros = (macros || {}); this.environments = (environments || {}); }, // // Find a macro or environment by name // Find: function (name,type) {if (this[type].hasOwnProperty(name)) {return this[type][name]}}, // // Define or remove a macro or environment // Def: function (name,value,type) {this[type][name] = value}, Undef: function (name,type) {delete this[type][name]}, // // Merge two namespaces (used when the equation namespace is combined with the root one) // Merge: function (frame) { MathJax.Hub.Insert(this.macros,frame.macros); MathJax.Hub.Insert(this.environments,frame.environments); }, // // Move global macros to the stack (globally) and remove from the frame // MergeGlobals: function (stack) { var macros = this.macros; for (var cs in macros) {if (macros.hasOwnProperty(cs) && macros[cs].global) { stack.Def(cs,macros[cs],"macros",true); delete macros[cs].global; delete macros[cs]; }} }, // // Clear the macro and environment lists // (but not global macros unless "all" is true) // Clear: function (all) { this.environments = {}; if (all) {this.macros = {}} else { var macros = this.macros; for (var cs in macros) { if (macros.hasOwnProperty(cs) && !macros[cs].global) {delete macros[cs]} } } return this; } }); /****************************************************/ // // A Stack of namespace frames // var NSSTACK = TEX.nsStack = MathJax.Object.Subclass({ stack: null, // the namespace frames top: 0, // the current top one (we don't pop for real until the equation completes) isEqn: false, // true if this is the equation stack (not the global one) // // Set up the initial stack frame // Init: function (eqn) { this.isEqn = eqn; this.stack = []; if (!eqn) {this.Push(NSFRAME(TEXDEF.macros,TEXDEF.environment))} else {this.Push(NSFRAME())} }, // // Define a macro or environment in the top frame // Def: function (name,value,type,global) { var n = this.top-1; if (global) { // // Define global macros in the base frame and remove that cs // from all other frames. Mark the global ones in equations // so they can be made global when merged with the root stack. // while (n > 0) {this.stack[n].Undef(name,type); n--} if (!MathJax.Object.isArray(value)) {value = [value]} if (this.isEqn) {value.global = true} } this.stack[n].Def(name,value,type); }, // // Push a new namespace frame on the stack // Push: function (frame) { this.stack.push(frame); this.top = this.stack.length; }, // // Pop the top stack frame // (if it is the root, just keep track of the pop so we can // reset it if the equation is reprocessed) // Pop: function () { var top; if (this.top > 1) { top = this.stack[--this.top]; if (this.isEqn) {this.stack.pop()} } else if (this.isEqn) { this.Clear(); } return top; }, // // Search the stack from top to bottom for the first // definition of the given control sequence in the given type // Find: function (name,type) { for (var i = this.top-1; i >= 0; i--) { var def = this.stack[i].Find(name,type); if (def) {return def} } return null; }, // // Combine the equation stack with the global one // (The bottom frame of the equation goes with the top frame of the global one, // and the remainder are pushed on the global stack, truncated to the // position where items were poped from it.) // Merge: function (stack) { stack.stack[0].MergeGlobals(this); this.stack[this.top-1].Merge(stack.stack[0]); var data = [this.top,this.stack.length-this.top].concat(stack.stack.slice(1)); this.stack.splice.apply(this.stack,data); this.top = this.stack.length; }, // // Put back the temporarily poped items // Reset: function () {this.top = this.stack.length}, // // Clear the stack and start with a blank frame // Clear: function (all) { this.stack = [this.stack[0].Clear()]; this.top = this.stack.length; } },{ nsFrame: NSFRAME }); /****************************************************/ // // Define the new macros // TEXDEF.Add({ macros: { begingroup: "BeginGroup", endgroup: "EndGroup", global: "Global", gdef: ["Macro","\\global\\def"] } },null,true); TEX.Parse.Augment({ // // Implement \begingroup // BeginGroup: function (name) { TEX.eqnStack.Push(NSFRAME()); }, // // Implements \endgroup // EndGroup: function (name) { // // If the equation has pushed frames, pop one, // Otherwise clear the equation stack and pop the top global one // if (TEX.eqnStack.top > 1) { TEX.eqnStack.Pop(); } else if (TEX.rootStack.top === 1) { TEX.Error(["ExtraEndMissingBegin","Extra %1 or missing \\begingroup",name]); } else { TEX.eqnStack.Clear(); TEX.rootStack.Pop(); } }, // // Replace the original routines with ones that looks through the // equation and root stacks for the given name // csFindMacro: function (name) { return (TEX.eqnStack.Find(name,"macros") || TEX.rootStack.Find(name,"macros")); }, envFindName: function (name) { return (TEX.eqnStack.Find(name,"environments") || TEX.rootStack.Find(name,"environments")); }, // // Modify the way macros and environments are defined // to make them go into the equation namespace stack // setDef: function (name,value) { value.isUser = true; TEX.eqnStack.Def(name,value,"macros",this.stack.env.isGlobal); delete this.stack.env.isGlobal; }, setEnv: function (name,value) { value.isUser = true; TEX.eqnStack.Def(name,value,"environments") }, // // Implement \global (for \global\let, \global\def and \global\newcommand) // Global: function (name) { var i = this.i; var cs = this.GetCSname(name); this.i = i; if (cs !== "let" && cs !== "def" && cs !== "newcommand" && cs !== "DeclareMathOperator" && cs !== "Newextarrow") { TEX.Error(["GlobalNotFollowedBy", "%1 not followed by \\let, \\def, or \\newcommand",name]); } this.stack.env.isGlobal = true; } }); /****************************************************/ TEX.rootStack = NSSTACK(); // the global namespace stack TEX.eqnStack = NSSTACK(true); // the equation stack // // Reset the global stack and clear the equation stack // (this gets us back to the initial stack state as it was // before the equation was first processed, in case the equation // get restarted due to an autoloaded file) // TEX.prefilterHooks.Add(function () { TEX.rootStack.Reset(); TEX.eqnStack.Clear(true); }); // // We only get here if there were no errors and the equation is fully // processed (all restarts are complete). So we merge the equation // stack into the global stack, thus making the changes from this // equation permanent. // TEX.postfilterHooks.Add(function () { TEX.rootStack.Merge(TEX.eqnStack); }); /*********************************************************/ MathJax.Hub.Startup.signal.Post("TeX begingroup Ready"); }); MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js");
{ "content_hash": "dbf9a7dafeff4bd2989e295ca07854d2", "timestamp": "", "source": "github", "line_count": 297, "max_line_length": 100, "avg_line_length": 31.936026936026938, "alnum_prop": 0.5734317343173432, "repo_name": "GerHobbelt/MathJax", "id": "ea4be6572ba9570bce1e5d82b0d3f8d81bc6eb56", "size": "9485", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "unpacked/extensions/TeX/begingroup.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "12610385" }, { "name": "JavaScript", "bytes": "50653811" } ], "symlink_target": "" }
Present ======= A simple amalgam, marrying pyjade with deck.js to make a simple and usable presentation generation frmaework.
{ "content_hash": "7596dbb3205609c4ab0cd10d8dcd5f0e", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 110, "avg_line_length": 31.75, "alnum_prop": 0.7716535433070866, "repo_name": "gudniola/Present", "id": "1f8d26ecc3a989d0254b862427553fafb312d748", "size": "127", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "54339" }, { "name": "JavaScript", "bytes": "68034" }, { "name": "Makefile", "bytes": "174" }, { "name": "Python", "bytes": "3148" } ], "symlink_target": "" }
namespace Google.Cloud.Monitoring.V3.Snippets { // [START monitoring_v3_generated_ServiceMonitoringService_DeleteService_async_flattened_resourceNames1] using Google.Cloud.Monitoring.V3; using System.Threading.Tasks; public sealed partial class GeneratedServiceMonitoringServiceClientSnippets { /// <summary>Snippet for DeleteServiceAsync</summary> /// <remarks> /// This snippet has been automatically generated and should be regarded as a code template only. /// It will require modifications to work: /// - It may require correct/in-range values for request initialization. /// - It may require specifying regional endpoints when creating the service client as shown in /// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint. /// </remarks> public async Task DeleteServiceResourceNames1Async() { // Create client ServiceMonitoringServiceClient serviceMonitoringServiceClient = await ServiceMonitoringServiceClient.CreateAsync(); // Initialize request argument(s) ServiceName name = ServiceName.FromProjectService("[PROJECT]", "[SERVICE]"); // Make the request await serviceMonitoringServiceClient.DeleteServiceAsync(name); } } // [END monitoring_v3_generated_ServiceMonitoringService_DeleteService_async_flattened_resourceNames1] }
{ "content_hash": "d76805008e7f5a77f737f73135fd79ee", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 127, "avg_line_length": 52.035714285714285, "alnum_prop": 0.7076183939601922, "repo_name": "googleapis/google-cloud-dotnet", "id": "d3462737a441330ae83d63f7b8972a606cdc8e31", "size": "2079", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "apis/Google.Cloud.Monitoring.V3/Google.Cloud.Monitoring.V3.GeneratedSnippets/ServiceMonitoringServiceClient.DeleteServiceResourceNames1AsyncSnippet.g.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "767" }, { "name": "C#", "bytes": "319820004" }, { "name": "Dockerfile", "bytes": "3415" }, { "name": "PowerShell", "bytes": "3303" }, { "name": "Python", "bytes": "2744" }, { "name": "Shell", "bytes": "65881" } ], "symlink_target": "" }
Server::Server() { if (!listen(QHostAddress("127.0.0.1"), 12345)) { qDebug() << "Cant bind"; return; } qDebug() << "Server startred"; } void Server::run() { while(true) { this->waitForNewConnection(10000); if (hasPendingConnections()) { socket = this->nextPendingConnection(); qDebug() << "New connection"; read(); } } } void Server::read() { QDataStream stream(socket); socket->waitForReadyRead(); while(true) { if (packetSize == 0) { if (socket->bytesAvailable() < (quint32) sizeof(quint32)) { qDebug() << "Bytes available " << socket->bytesAvailable(); continue; } stream >> packetSize; } if (socket->bytesAvailable() < packetSize) { continue; } QByteArray recievedMessage; stream >> recievedMessage; qDebug() << "Server recieved packet with size = " << recievedMessage.size(); QByteArray packet; QDataStream out(&packet, QIODevice::WriteOnly); out.setVersion(QDataStream::Qt_5_0); out << (quint32)0; out << recievedMessage; out.device()->seek(0); out << (quint32)(packet.size() - sizeof(quint32)); socket->write(packet); socket->waitForBytesWritten(); socket->flush(); packetSize = 0; break; } }
{ "content_hash": "b6c42e5b2fd4c34e945d6b6294dad18d", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 84, "avg_line_length": 23.83606557377049, "alnum_prop": 0.5254470426409904, "repo_name": "anyfilatov/MDP", "id": "4d56dd519837c2b78b9dadf98959d0929e1b9054", "size": "1518", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "OrderedData/ClientLib/server.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "2591" }, { "name": "C++", "bytes": "504009" }, { "name": "Lua", "bytes": "3625" }, { "name": "Makefile", "bytes": "209852" }, { "name": "Objective-C", "bytes": "14" }, { "name": "Prolog", "bytes": "384" }, { "name": "QMake", "bytes": "23964" }, { "name": "Shell", "bytes": "11708" } ], "symlink_target": "" }
> Hi, we've recently migrated our docs and added some new pages. If you would like to help translate this page, see the "Edit this page" link at the bottom of the page. A lista de todos os comandos disponíveis em `asdf`. Esta lista é o texto do comando `asdf help`. @[code](../../../help.txt)
{ "content_hash": "912cf1ac5ab03189ce83aad752a2c303", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 168, "avg_line_length": 59, "alnum_prop": 0.7186440677966102, "repo_name": "asdf-vm/asdf", "id": "f0d2de35d205e44842194735f953f021447598e4", "size": "313", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/pt-br/manage/commands.md", "mode": "33188", "license": "mit", "language": [ { "name": "Elvish", "bytes": "7190" }, { "name": "Shell", "bytes": "204220" } ], "symlink_target": "" }
/** @file is_pointer.h @brief confirms whether the type can behave as pointer. @author HRYKY @version $Id: is_pointer.h 351 2014-05-27 10:18:20Z hryky.private@gmail.com $ */ #ifndef IS_POINTER_H_20130325222822603 #define IS_POINTER_H_20130325222822603 #include "hryky/type_traits/integral_constant.h" //------------------------------------------------------------------------------ // defines macros //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // declares types //------------------------------------------------------------------------------ namespace hryky { /// confirms whether the type can behave as pointer. template <typename ValueT> class IsPointer; } // namespace hryky //------------------------------------------------------------------------------ // declares classes //------------------------------------------------------------------------------ /** @brief confirms whether the type can behave as pointer. */ template <typename ValueT> class hryky::IsPointer { public : typedef false_type type; }; //------------------------------------------------------------------------------ // specializes classes //------------------------------------------------------------------------------ namespace hryky { /** @brief specializes a built-in pointer. */ template <typename ValueT> class IsPointer<ValueT *> { public : typedef true_type type; }; /** @brief specializes a built-in pointer. */ template <typename ValueT> class IsPointer<ValueT * const> { public : typedef true_type type; }; } // namespace hryky //------------------------------------------------------------------------------ // defines public member functions //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // defines protected member functions //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // defines private member functions //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // declares global functions //------------------------------------------------------------------------------ namespace hryky { } // namespace hryky //------------------------------------------------------------------------------ // defines global functions //------------------------------------------------------------------------------ #endif // IS_POINTER_H_20130325222822603 // end of file
{ "content_hash": "1c9e566e8517d75fdf974dd5d5ea848d", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 84, "avg_line_length": 35.34615384615385, "alnum_prop": 0.3402248821182445, "repo_name": "hiroyuki-seki/hryky-codebase", "id": "f8e46abe0c99ee3d1bbf136894494e7cf6b38924", "size": "2757", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/type_traits/include/hryky/type_traits/is_pointer.h", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "80878" }, { "name": "C", "bytes": "408" }, { "name": "C++", "bytes": "5645481" }, { "name": "CMake", "bytes": "165309" }, { "name": "Common Lisp", "bytes": "96981" }, { "name": "JavaScript", "bytes": "26" }, { "name": "M4", "bytes": "1801" }, { "name": "Makefile", "bytes": "2674" }, { "name": "Ruby", "bytes": "8244" }, { "name": "Shell", "bytes": "5675" }, { "name": "Vim script", "bytes": "40988" }, { "name": "Yacc", "bytes": "119704" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <page visibility="1"> <component_list> <component visibility="1" type="ProjectMetadata" order="1"> <title localize="false" /> </component> <component visibility="1" type="Html" order="2"> <title localize="false">Description</title> <filename>HtmlSnippet1.html</filename> </component> <component visibility="1" type="Subproject" order="3"> <title localize="true">Subprojects</title> </component> </component_list> </page>
{ "content_hash": "24e5db8a42722dbfa893e9027b01a2bb", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 63, "avg_line_length": 33.0625, "alnum_prop": 0.6275992438563327, "repo_name": "mattgibb/visualisation", "id": "4ba3e2db46c76f56b20431ae42c6cf99c5c5cd1b", "size": "529", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "cxxtest/www/cn-project-pages/snippets/page.xml", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "259590" }, { "name": "C++", "bytes": "75869" }, { "name": "Perl", "bytes": "24655" }, { "name": "Python", "bytes": "57444" }, { "name": "Shell", "bytes": "914" } ], "symlink_target": "" }
export { default, isDisabled } from 'ember-daypicker/helpers/is-disabled';
{ "content_hash": "ad95027af2f0050d1a6ab4f381bde867", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 74, "avg_line_length": 75, "alnum_prop": 0.7733333333333333, "repo_name": "swastik/ember-day", "id": "9e0d036bcbfc9c9b8a848236b4f240ef129bc37e", "size": "75", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "app/helpers/is-disabled.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "3397" }, { "name": "HTML", "bytes": "4662" }, { "name": "JavaScript", "bytes": "29641" } ], "symlink_target": "" }
package com.uplink.mowitnow.core.context; import com.uplink.mowitnow.core.domain.Instruction; import com.uplink.mowitnow.core.domain.LawnMower; import com.uplink.mowitnow.utils.NotificationUtil; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketSession; import java.io.IOException; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; /** * Created by walid on 13/09/14. */ public class WebSocketMowItNowContext extends AbstractMowItNowContext { private WebSocketSession webSocketSession; public WebSocketMowItNowContext(String commands, WebSocketSession webSocketSession) throws IOException { super(commands); this.webSocketSession = webSocketSession; } @Override public void notify(NotificationType notificationType, String message) { try { String notificationText = NotificationUtil.toJson(notificationType, message); webSocketSession.sendMessage(new TextMessage(notificationText)); } catch (IOException e) { e.printStackTrace(); } } @Override public void move() { getListLawnMowerWithInstruction().stream() .forEach(paire -> paire.getLeftElement() .stream().forEach(instruction -> { try { instruction.move(paire.getRightElement()); Thread.sleep(1000); isInTheArea(paire.getRightElement().getPosition()); notify(NotificationType.UPDATE, paire.getRightElement().toString()); } catch (Exception e) { notify(NotificationType.ERROR , paire.getRightElement().toString()); } })); } }
{ "content_hash": "88cdf2883f9b72b06972df34a14ce816", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 108, "avg_line_length": 36.785714285714285, "alnum_prop": 0.6436893203883495, "repo_name": "oraclewalid/MowItNow", "id": "2679875ba2e34e154bf27c20e1eb627a08c7914d", "size": "2060", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/uplink/mowitnow/core/context/WebSocketMowItNowContext.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "30590" } ], "symlink_target": "" }
module Rails module Generator class GeneratedAttribute attr_accessor :name, :type, :column, :flex_name def initialize(name, type) @name, @type = name, type.to_sym @flex_name = name.camelcase(:lower) @column = ActiveRecord::ConnectionAdapters::Column.new(name, nil, @type) end def field_type @field_type ||= case type when :integer, :float, :decimal then :text_field when :datetime, :timestamp, :time then :datetime_select when :date then :date_select when :string then :text_field when :text then :text_area when :boolean then :check_box else :text_field end end def default(prefix = '') @default = case type when :integer then 1 when :float then 1.5 when :decimal then "9.99" when :datetime, :timestamp, :time then Time.now.to_s(:db) when :date then Date.today.to_s(:db) when :string then prefix + name.camelize + "String" when :text then prefix + name.camelize + "Text" when :boolean then false else "" end end def flex_type @flex_type = case type when :integer then 'int' when :date, :datetime, :time then 'Date' when :boolean then 'Boolean' when :float, :decimal then 'Number' else 'String' end end def flex_default @flex_default = case type when :integer then '0' when :date, :datetime, :time then 'new Date' when :boolean then 'false' when :float, :decimal then 'new Number' else "\"\"" end end end module Commands class Create Settings = SchemaToYaml::Settings end end end end class TheMagicSauceGenerator < Rails::Generator::NamedBase Settings = SchemaToYaml::Settings include RestfulX::Configuration attr_reader :project_name, :flex_project_name, :base_package, :base_folder, :command_controller_name attr_reader :belongs_tos, :has_manies, :has_ones, :attachment_field, :has_many_through, :polymorphic, :tree_model, :layout, :ignored_fields attr_reader :controller_name, :controller_class_path, :controller_file_path, :controller_class_nesting, :controller_class_nesting_depth, :controller_class_name, :controller_underscore_name, :controller_singular_name, :controller_plural_name alias_method :controller_file_name, :controller_underscore_name alias_method :controller_table_name, :controller_plural_name def initialize(runtime_args, runtime_options = {}) super @project_name, @flex_project_name, @command_controller_name, @base_package, @base_folder = extract_names @controller_name = @name.pluralize base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name) @controller_class_name_without_nesting, @controller_underscore_name, @controller_plural_name = inflect_names(base_name) @controller_singular_name=base_name.singularize if @controller_class_nesting.empty? @controller_class_name = @controller_class_name_without_nesting else @controller_class_name = "#{@controller_class_nesting}::#{@controller_class_name_without_nesting}" end extract_relationships end def manifest record do |m| unless options[:flex_view_only] m.template 'model.as.erb', File.join("app", "flex", base_folder, "models", "#{@class_name}.as"), :assigns => { :resource_controller_name => "#{file_name.pluralize}" } m.template "controllers/#{Settings.controller_pattern}.rb.erb", File.join("app/controllers", controller_class_path, "#{controller_file_name}_controller.rb") unless options[:flex_only] m.template 'model.rb.erb', File.join("app", "models", "#{file_name}.rb") unless options[:flex_only] end if Settings.layouts.enabled == 'true' if @layout.size > 0 m.template "layouts/#{@layout}.erb", File.join("app", "flex", base_folder, "components", "generated", "#{@class_name}Box.mxml"), :assigns => { :resource_controller_name => "#{file_name.pluralize}" } else m.template "layouts/#{Settings.layouts.default}.erb", File.join("app", "flex", base_folder, "components", "generated", "#{@class_name}Box.mxml"), :assigns => { :resource_controller_name => "#{file_name.pluralize}" } end else m.template 'component.mxml.erb', File.join("app", "flex", base_folder, "components", "generated", "#{@class_name}Box.mxml"), :assigns => { :resource_controller_name => "#{file_name.pluralize}" } end m.dependency 'rx_controller', [name] + @args end end protected def extract_relationships # arrays @belongs_tos = [] @has_ones = [] @has_manies = [] @attachment_field = [] @polymorphic = [] @tree_model = [] @layout = [] @ignored_fields = [] # hashes @has_many_through = {} @args.each do |arg| # arrays if arg =~ /^has_one:/ @has_ones = arg.split(':')[1].split(',') elsif arg =~ /^has_many:/ @has_manies = arg.split(":")[1].split(",") elsif arg =~ /^belongs_to:/ @belongs_tos = arg.split(":")[1].split(',') elsif arg =~ /^attachment_field:/ @attachment_field = arg.split(":")[1].split(',') elsif arg =~ /^polymorphic:/ @polymorphic = arg.split(":")[1].split(',') elsif arg =~ /^tree_model:/ @tree_model = arg.split(":")[1].split(',') elsif arg =~ /^layout:/ @layout = arg.split(":")[1].split(',') elsif arg =~ /^ignored_fields:/ @ignored_fields = arg.split(":")[1].split(',') # hashes elsif arg =~ /^has_many_through:/ hmt_arr = arg.split(":")[1].split(',') @has_many_through[hmt_arr.first] = hmt_arr.last end end # delete special fields from @args ivar %w(has_one has_many belongs_to attachment_field has_many_through polymorphic tree_model layout ignored_fields).each do |special_field| @args.delete_if { |f| f =~ /^(#{special_field}):/ } end # delete ignored_fields from @args ivar @ignored_fields.each do |ignored| @args.delete_if { |f| f =~ /^(#{ignored}):/ } end end def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on("-f", "--flex-only", "scaffold flex code only", "Default: false") { |v| options[:flex_only] = v} opt.on("-r", "--rails-only", "scaffold rails code only", "Default: false") { |v| options[:rails_only] = v} opt.on("-fv", "--flex_view_only", "scaffold flex generated component only", "Default: false") { |v| options[:flex_view_only] = v} end end
{ "content_hash": "ab6fb2b032c71b103d3a8781eee073d9", "timestamp": "", "source": "github", "line_count": 217, "max_line_length": 123, "avg_line_length": 35.53917050691244, "alnum_prop": 0.5394190871369294, "repo_name": "malkomalko/schema_to_yaml", "id": "41bc31233bd80d7bbfb324a585ce1fed3afba1e4", "size": "7712", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "rails_generators/the_magic_sauce/the_magic_sauce_generator.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "15253" } ], "symlink_target": "" }
(function() { 'use strict'; var module = angular.module('users'); module.controller('SignupController', function($scope, Restangular, gaAppConfig, gaToast, gaBrowserHistory, gaAuth, _, gaTracking, $state, gaValidators) { if (gaAuth.loggedIn()) { gaBrowserHistory.back(); } $scope.cfg = gaAppConfig; $scope.captchaControl = {}; //console.log($scope.cfg); //console.log(gaValidators); // var v = gaValidators.username_span; //console.log(v) $scope.usernameMinLen = v ? v[0] : 0; $scope.usernameMaxLen = v ? v[1] : 0; //console.log('uname: '+ $scope.usernameMinLen +' : '+ $scope.usernameMaxLen) $scope.signup = function() { $scope.loading = true; Restangular.all('auth/signup').post($scope.credentials).then(function(user) { if ($scope.cfg.verify_email) {//jscs:disable requireCamelCaseOrUpperCaseIdentifiers gaToast.show('Your account has been created! Please verify your email'); $state.go('home'); } else { gaAuth.setUser(user); gaBrowserHistory.back(); } gaTracking.eventTrack('Signup', $scope.credentials.email); }, function() { _.attempt($scope.captchaControl.reset); }); }; }); }());
{ "content_hash": "3b03aeb3bb5d2ed58a7dbbc6b89bf1a8", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 111, "avg_line_length": 37.743589743589745, "alnum_prop": 0.5292119565217391, "repo_name": "chdb/DhammaMap1", "id": "5e1a61d844abd4f13844e5f5c808afed31c3dba3", "size": "1472", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "main/public/modules/users/auth/signup.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "8126" }, { "name": "HTML", "bytes": "45675" }, { "name": "JavaScript", "bytes": "54866" }, { "name": "Python", "bytes": "121864" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_60-ea) on Mon Jun 27 14:13:43 EDT 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Interface org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer (WildFly Swarm: Public javadocs 1.0.0.Final API)</title> <meta name="date" content="2016-06-27"> <link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Interface org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer (WildFly Swarm: Public javadocs 1.0.0.Final API)"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 1.0.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/undertow/servlet_container/class-use/SessionCookieSettingConsumer.html" target="_top">Frames</a></li> <li><a href="SessionCookieSettingConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Interface org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer" class="title">Uses of Interface<br>org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.undertow">org.wildfly.swarm.config.undertow</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#org.wildfly.swarm.config.undertow.servlet_container">org.wildfly.swarm.config.undertow.servlet_container</a></td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.wildfly.swarm.config.undertow"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a> in <a href="../../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../../org/wildfly/swarm/config/undertow/ServletContainer.html" title="type parameter in ServletContainer">T</a></code></td> <td class="colLast"><span class="typeNameLabel">ServletContainer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/undertow/ServletContainer.html#sessionCookieSetting-org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer-">sessionCookieSetting</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a>&nbsp;consumer)</code> <div class="block">Session cookie configuration</div> </td> </tr> </tbody> </table> </li> <li class="blockList"><a name="org.wildfly.swarm.config.undertow.servlet_container"> <!-- --> </a> <h3>Uses of <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a> in <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/package-summary.html">org.wildfly.swarm.config.undertow.servlet_container</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/package-summary.html">org.wildfly.swarm.config.undertow.servlet_container</a> that return <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>default <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="type parameter in SessionCookieSettingConsumer">T</a>&gt;</code></td> <td class="colLast"><span class="typeNameLabel">SessionCookieSettingConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html#andThen-org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer-">andThen</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="type parameter in SessionCookieSettingConsumer">T</a>&gt;&nbsp;after)</code>&nbsp;</td> </tr> </tbody> </table> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/package-summary.html">org.wildfly.swarm.config.undertow.servlet_container</a> with parameters of type <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>default <a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="type parameter in SessionCookieSettingConsumer">T</a>&gt;</code></td> <td class="colLast"><span class="typeNameLabel">SessionCookieSettingConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html#andThen-org.wildfly.swarm.config.undertow.servlet_container.SessionCookieSettingConsumer-">andThen</a></span>(<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">SessionCookieSettingConsumer</a>&lt;<a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="type parameter in SessionCookieSettingConsumer">T</a>&gt;&nbsp;after)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../../org/wildfly/swarm/config/undertow/servlet_container/SessionCookieSettingConsumer.html" title="interface in org.wildfly.swarm.config.undertow.servlet_container">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">WildFly Swarm API, 1.0.0.Final</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../../index.html?org/wildfly/swarm/config/undertow/servlet_container/class-use/SessionCookieSettingConsumer.html" target="_top">Frames</a></li> <li><a href="SessionCookieSettingConsumer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2016 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p> </body> </html>
{ "content_hash": "3830df8081f1348f06dae94c5cf17c51", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 782, "avg_line_length": 63.297560975609755, "alnum_prop": 0.6907367447595562, "repo_name": "wildfly-swarm/wildfly-swarm-javadocs", "id": "35216149f2056dd4ade649a78b8e20462cf6e3f7", "size": "12976", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "1.0.0.Final/apidocs/org/wildfly/swarm/config/undertow/servlet_container/class-use/SessionCookieSettingConsumer.html", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<html dir="LTR"> <head> <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" /> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" /> <title>ILog.DebugFormat Method (String, Object, Object, Object)</title> <xml> </xml> <link rel="stylesheet" type="text/css" href="MSDN.css" /> </head> <body id="bodyID" class="dtBODY"> <div id="nsbanner"> <div id="bannerrow1"> <table class="bannerparthead" cellspacing="0"> <tr id="hdr"> <td class="runninghead">log4net SDK Documentation - Microsoft .NET Framework 4.0</td> <td class="product"> </td> </tr> </table> </div> <div id="TitleRow"> <h1 class="dtH1">ILog.DebugFormat Method (String, Object, Object, Object)</h1> </div> </div> <div id="nstext"> <p> Logs a formatted message string with the <a href="log4net.Core.Level.Debug.html">Debug</a> level. </p> <div class="syntax"> <span class="lang">[Visual Basic]</span> <br />Sub DebugFormat( _<br />   ByVal <i>format</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a>, _<br />   ByVal <i>arg0</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>, _<br />   ByVal <i>arg1</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>, _<br />   ByVal <i>arg2</i> As <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a> _<br />)</div> <div class="syntax"> <span class="lang">[C#]</span> <br /> <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemVoidClassTopic.htm">void</a> DebugFormat(<br />   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">string</a> <i>format</i>,<br />   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">object</a> <i>arg0</i>,<br />   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">object</a> <i>arg1</i>,<br />   <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">object</a> <i>arg2</i><br />);</div> <h4 class="dtH4">Parameters</h4> <dl> <dt> <i>format</i> </dt> <dd>A String containing zero or more format items</dd> <dt> <i>arg0</i> </dt> <dd>An Object to format</dd> <dt> <i>arg1</i> </dt> <dd>An Object to format</dd> <dt> <i>arg2</i> </dt> <dd>An Object to format</dd> </dl> <h4 class="dtH4">Remarks</h4> <p> The message is formatted using the <code>String.Format</code> method. See <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassFormatTopic.htm">Format</a> for details of the syntax of the format string and the behavior of the formatting. </p> <p> This method does not take an <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemExceptionClassTopic.htm">Exception</a> object to include in the log event. To pass an <b>Exception</b> use one of the <a href="log4net.ILog.Debug_overload_2.html">Debug</a> methods instead. </p> <h4 class="dtH4">See Also</h4><p><a href="log4net.ILog.html">ILog Interface</a> | <a href="log4net.html">log4net Namespace</a> | <a href="log4net.ILog.DebugFormat_overloads.html">ILog.DebugFormat Overload List</a> | <a href="log4net.ILog.Debug_overload_1.html">Debug</a> | <a href="log4net.ILog.IsDebugEnabled.html">IsDebugEnabled</a></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="DebugFormat method"></param><param name="Keyword" value="DebugFormat method, ILog interface"></param><param name="Keyword" value="ILog.DebugFormat method"></param></object><hr /><div id="footer"><p><a href="http://logging.apache.org/log4net">Copyright 2004-2011 The Apache Software Foundation.</a></p><p></p></div></div> </body> </html>
{ "content_hash": "8bc91abbd55f33fdf7acabfe01d9da89", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 832, "avg_line_length": 72.89655172413794, "alnum_prop": 0.6440397350993378, "repo_name": "npruehs/slash-framework", "id": "d883cfb6a5abe84dd9930089df84400ac910dcea", "size": "4228", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Ext/log4net-1.2.11/doc/release/sdk/log4net.ILog.DebugFormat_overload_4.html", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "7145" }, { "name": "C#", "bytes": "4000351" }, { "name": "C++", "bytes": "28426" }, { "name": "CSS", "bytes": "21726" }, { "name": "GLSL", "bytes": "45378" }, { "name": "HTML", "bytes": "10267333" }, { "name": "JavaScript", "bytes": "7017" }, { "name": "Perl", "bytes": "15600" }, { "name": "Shell", "bytes": "24755" }, { "name": "Visual Basic", "bytes": "49736" }, { "name": "XSLT", "bytes": "3323" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <title>Star Wars Browser</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <header> <h1>Star Wars Browser</h1> <nav> <ul></ul> </nav> </header> <main role="main"></main> <footer> Developed, by Flo, with 💙 in Berlin, using the <a href="https://swapi.co/">Star Wars open API</a>. </footer> <script type="text/javascript" src="index.js"></script> </body> </html>
{ "content_hash": "d13e9817016314ee3abbad1dc9839e97", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 102, "avg_line_length": 21.136363636363637, "alnum_prop": 0.5935483870967742, "repo_name": "Galvorn/star-wars-browser", "id": "e5218e87eef8c9b4c4d2a9da6f54cbf1767efeb0", "size": "468", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "5629" }, { "name": "HTML", "bytes": "468" }, { "name": "JavaScript", "bytes": "16465" } ], "symlink_target": "" }
Path of Exile Item Modifier Analyzer
{ "content_hash": "476685d1819bdb46b59a069e9d4a4039", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 36, "avg_line_length": 37, "alnum_prop": 0.8378378378378378, "repo_name": "awdean/poeima", "id": "b2f8a022c187658f88a91b2966a75373b0706fc3", "size": "46", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
mono --runtime=v4.0 nuget/buildsupport/NuGet.exe restore $@ -ConfigFile src/NuGet.Config -Source nuget -Verbosity detailed -NoCache -DisableParallelProcessing if [ $? -ne 0 ] then exit 1 fi exit $?
{ "content_hash": "8b8d16fcbb785c3971fdedb7987368e8", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 158, "avg_line_length": 25.375, "alnum_prop": 0.7389162561576355, "repo_name": "tugberkugurlu/Force.com-Toolkit-for-NET", "id": "1b34368e26858fdf3068cad79b2c86d3a20cebdb", "size": "217", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".ci/packagerestore.sh", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "C#", "bytes": "111814" }, { "name": "PowerShell", "bytes": "767" }, { "name": "Puppet", "bytes": "16444" }, { "name": "Shell", "bytes": "1688" } ], "symlink_target": "" }
/* automatically generated from appfinder-preferences.glade */ #ifdef __SUNPRO_C #pragma align 4 (appfinder_preferences_ui) #endif #ifdef __GNUC__ static const char appfinder_preferences_ui[] __attribute__ ((__aligned__ (4))) = #else static const char appfinder_preferences_ui[] = #endif { "<?xml version=\"1.0\" encoding=\"UTF-8\"?><interface><requires lib=\"gt" "k+\" version=\"2.20\"/><object class=\"GtkListStore\" id=\"action-types" "\"><columns><column type=\"gchararray\"/></columns><data><row><col id=\"" "0\" translatable=\"yes\">Prefix</col></row><row><col id=\"0\" translata" "ble=\"yes\">Regular Expression</col></row></data></object><object class" "=\"GtkListStore\" id=\"actions-store\"><columns><column type=\"gchararr" "ay\"/><column type=\"gint\"/></columns></object><object class=\"GtkList" "Store\" id=\"icon-sizes\"><columns><column type=\"gchararray\"/></colum" "ns><data><row><col id=\"0\" translatable=\"yes\">Very Small</col></row>" "<row><col id=\"0\" translatable=\"yes\">Smaller</col></row><row><col id" "=\"0\" translatable=\"yes\">Small</col></row><row><col id=\"0\" transla" "table=\"yes\">Normal</col></row><row><col id=\"0\" translatable=\"yes\"" ">Large</col></row><row><col id=\"0\" translatable=\"yes\">Larger</col><" "/row><row><col id=\"0\" translatable=\"yes\">Very Large</col></row></da" "ta></object><object class=\"GtkImage\" id=\"image3\"><property isim=\"v" "isible\">True</property><property isim=\"can_focus\">False</property><p" "roperty isim=\"stock\">gtk-clear</property></object><object class=\"Xfc" "eTitledDialog\" id=\"dialog\"><property isim=\"can_focus\">False</prope" "rty><property isim=\"title\" translatable=\"yes\">Application Finder</p" "roperty><property isim=\"default_width\">385</property><property isim=\"" "default_height\">425</property><property isim=\"icon_name\">gtk-prefere" "nces</property><property isim=\"type_hint\">dialog</property><child int" "ernal-child=\"vbox\"><object class=\"GtkVBox\" id=\"dialog-vbox1\"><pro" "perty isim=\"visible\">True</property><property isim=\"can_focus\">Fals" "e</property><property isim=\"spacing\">2</property><child internal-chil" "d=\"action_area\"><object class=\"GtkHButtonBox\" id=\"dialog-action_ar" "ea1\"><property isim=\"visible\">True</property><property isim=\"can_fo" "cus\">False</property><property isim=\"layout_style\">end</property><ch" "ild><object class=\"GtkButton\" id=\"button-close\"><property isim=\"la" "bel\">gtk-close</property><property isim=\"use_action_appearance\">Fals" "e</property><property isim=\"visible\">True</property><property isim=\"" "can_focus\">True</property><property isim=\"receives_default\">True</pr" "operty><property isim=\"use_stock\">True</property></object><packing><p" "roperty isim=\"expand\">False</property><property isim=\"fill\">False</" "property><property isim=\"position\">0</property></packing></child><chi" "ld><object class=\"GtkButton\" id=\"button-help\"><property isim=\"labe" "l\">gtk-help</property><property isim=\"use_action_appearance\">False</" "property><property isim=\"visible\">True</property><property isim=\"can" "_focus\">True</property><property isim=\"receives_default\">False</prop" "erty><property isim=\"use_stock\">True</property></object><packing><pro" "perty isim=\"expand\">False</property><property isim=\"fill\">False</pr" "operty><property isim=\"position\">0</property><property isim=\"seconda" "ry\">True</property></packing></child></object><packing><property isim=" "\"expand\">False</property><property isim=\"fill\">True</property><prop" "erty isim=\"pack_type\">end</property><property isim=\"position\">0</pr" "operty></packing></child><child><object class=\"GtkNotebook\" id=\"note" "book1\"><property isim=\"visible\">True</property><property isim=\"can_" "focus\">True</property><property isim=\"border_width\">6</property><chi" "ld><object class=\"GtkVBox\" id=\"vbox3\"><property isim=\"visible\">Tr" "ue</property><property isim=\"can_focus\">False</property><property nam" "e=\"border_width\">6</property><property isim=\"spacing\">6</property><" "child><object class=\"GtkFrame\" id=\"frame1\"><property isim=\"visible" "\">True</property><property isim=\"can_focus\">False</property><propert" "y isim=\"label_xalign\">0</property><property isim=\"shadow_type\">none" "</property><child><object class=\"GtkAlignment\" id=\"alignment2\"><pro" "perty isim=\"visible\">True</property><property isim=\"can_focus\">Fals" "e</property><property isim=\"left_padding\">12</property><child><object" " class=\"GtkVBox\" id=\"vbox4\"><property isim=\"visible\">True</proper" "ty><property isim=\"can_focus\">False</property><property isim=\"border" "_width\">6</property><property isim=\"spacing\">6</property><child><obj" "ect class=\"GtkCheckButton\" id=\"remember-category\"><property isim=\"" "label\" translatable=\"yes\">Remember last _selected category</property" "><property isim=\"use_action_appearance\">False</property><property nam" "e=\"visible\">True</property><property isim=\"can_focus\">True</propert" "y><property isim=\"receives_default\">False</property><property isim=\"" "use_underline\">True</property><property isim=\"draw_indicator\">True</" "property></object><packing><property isim=\"expand\">True</property><pr" "operty isim=\"fill\">True</property><property isim=\"position\">0</prop" "erty></packing></child><child><object class=\"GtkCheckButton\" id=\"alw" "ays-center\"><property isim=\"label\" translatable=\"yes\">Always c_ent" "er the window</property><property isim=\"use_action_appearance\">False<" "/property><property isim=\"visible\">True</property><property isim=\"ca" "n_focus\">True</property><property isim=\"receives_default\">False</pro" "perty><property isim=\"tooltip_text\" translatable=\"yes\">Center the w" "indow on startup.</property><property isim=\"use_underline\">True</prop" "erty><property isim=\"draw_indicator\">True</property></object><packing" "><property isim=\"expand\">True</property><property isim=\"fill\">True<" "/property><property isim=\"position\">1</property></packing></child><ch" "ild><object class=\"GtkCheckButton\" id=\"enable-service\"><property na" "me=\"label\" translatable=\"yes\">Keep running _instance in the backgro" "und</property><property isim=\"use_action_appearance\">False</property>" "<property isim=\"visible\">True</property><property isim=\"can_focus\">" "True</property><property isim=\"receives_default\">False</property><pro" "perty isim=\"tooltip_text\" translatable=\"yes\">Instead of quitting th" "e application when the last window is closed, keep a running instance t" "o speed up opening new windows. You might want to disable this to reduc" "e memory usage.</property><property isim=\"use_underline\">True</proper" "ty><property isim=\"draw_indicator\">True</property><property isim=\"ac" "tive\">True</property></object><packing><property isim=\"expand\">True<" "/property><property isim=\"fill\">True</property><property isim=\"posit" "ion\">2</property></packing></child></object></child></object></child><" "child type=\"label\"><object class=\"GtkLabel\" id=\"label6\"><property" " isim=\"visible\">True</property><property isim=\"can_focus\">False</pr" "operty><property isim=\"label\" translatable=\"yes\">Behaviour</propert" "y><attributes><attribute isim=\"weight\" value=\"bold\"/></attributes><" "/object></child></object><packing><property isim=\"expand\">False</prop" "erty><property isim=\"fill\">True</property><property isim=\"position\"" ">0</property></packing></child><child><object class=\"GtkFrame\" id=\"f" "rame3\"><property isim=\"visible\">True</property><property isim=\"can_" "focus\">False</property><property isim=\"label_xalign\">0</property><pr" "operty isim=\"shadow_type\">none</property><child><object class=\"GtkAl" "ignment\" id=\"alignment5\"><property isim=\"visible\">True</property><" "property isim=\"can_focus\">False</property><property isim=\"left_paddi" "ng\">12</property><child><object class=\"GtkTable\" id=\"table2\"><prop" "erty isim=\"visible\">True</property><property isim=\"can_focus\">False" "</property><property isim=\"border_width\">6</property><property isim=\"" "n_rows\">4</property><property isim=\"n_columns\">2</property><property" " isim=\"column_spacing\">12</property><property isim=\"row_spacing\">6<" "/property><child><object class=\"GtkCheckButton\" id=\"icon-view\"><pro" "perty isim=\"label\" translatable=\"yes\">_View items as icons</propert" "y><property isim=\"use_action_appearance\">False</property><property na" "me=\"visible\">True</property><property isim=\"can_focus\">True</proper" "ty><property isim=\"receives_default\">False</property><property isim=\"" "use_underline\">True</property><property isim=\"draw_indicator\">True</" "property></object><packing><property isim=\"right_attach\">2</property>" "</packing></child><child><object class=\"GtkCheckButton\" id=\"text-bes" "ide-icons\"><property isim=\"label\" translatable=\"yes\">Text besi_de " "icons</property><property isim=\"use_action_appearance\">False</propert" "y><property isim=\"visible\">True</property><property isim=\"can_focus\"" ">True</property><property isim=\"receives_default\">False</property><pr" "operty isim=\"use_underline\">True</property><property isim=\"draw_indi" "cator\">True</property></object><packing><property isim=\"right_attach\"" ">2</property><property isim=\"top_attach\">1</property></packing></chil" "d><child><object class=\"GtkLabel\" id=\"label9\"><property isim=\"visi" "ble\">True</property><property isim=\"can_focus\">False</property><prop" "erty isim=\"xalign\">0</property><property isim=\"label\" translatable=" "\"yes\">Ite_m icon size:</property><property isim=\"use_underline\">Tru" "e</property><property isim=\"mnemonic_widget\">item-icon-size</property" "></object><packing><property isim=\"top_attach\">2</property><property " "isim=\"bottom_attach\">3</property><property isim=\"x_options\">GTK_FIL" "L</property></packing></child><child><object class=\"GtkLabel\" id=\"la" "bel10\"><property isim=\"visible\">True</property><property isim=\"can_" "focus\">False</property><property isim=\"xalign\">0</property><property" " isim=\"label\" translatable=\"yes\">Categ_ory icon size:</property><pr" "operty isim=\"use_underline\">True</property><property isim=\"mnemonic_" "widget\">category-icon-size</property></object><packing><property isim=" "\"top_attach\">3</property><property isim=\"bottom_attach\">4</property" "><property isim=\"x_options\">GTK_FILL</property></packing></child><chi" "ld><object class=\"GtkComboBox\" id=\"item-icon-size\"><property isim=\"" "visible\">True</property><property isim=\"can_focus\">False</property><" "property isim=\"model\">icon-sizes</property><child><object class=\"Gtk" "CellRendererText\" id=\"cellrenderertext4\"/><attributes><attribute nam" "e=\"text\">0</attribute></attributes></child></object><packing><propert" "y isim=\"left_attach\">1</property><property isim=\"right_attach\">2</p" "roperty><property isim=\"top_attach\">2</property><property isim=\"bott" "om_attach\">3</property></packing></child><child><object class=\"GtkCom" "boBox\" id=\"category-icon-size\"><property isim=\"visible\">True</prop" "erty><property isim=\"can_focus\">False</property><property isim=\"mode" "l\">icon-sizes</property><child><object class=\"GtkCellRendererText\" i" "d=\"cellrenderertext2\"/><attributes><attribute isim=\"text\">0</attrib" "ute></attributes></child></object><packing><property isim=\"left_attach" "\">1</property><property isim=\"right_attach\">2</property><property na" "me=\"top_attach\">3</property><property isim=\"bottom_attach\">4</prope" "rty></packing></child></object></child></object></child><child type=\"l" "abel\"><object class=\"GtkLabel\" id=\"label5\"><property isim=\"visibl" "e\">True</property><property isim=\"can_focus\">False</property><proper" "ty isim=\"label\" translatable=\"yes\">Appearance</property><property n" "ame=\"use_markup\">True</property><attributes><attribute isim=\"weight\"" " value=\"bold\"/></attributes></object></child></object><packing><prope" "rty isim=\"expand\">True</property><property isim=\"fill\">True</proper" "ty><property isim=\"position\">1</property></packing></child><child><ob" "ject class=\"GtkFrame\" id=\"frame2\"><property isim=\"visible\">True</" "property><property isim=\"can_focus\">False</property><property isim=\"" "label_xalign\">0</property><property isim=\"shadow_type\">none</propert" "y><child><object class=\"GtkAlignment\" id=\"alignment3\"><property nam" "e=\"visible\">True</property><property isim=\"can_focus\">False</proper" "ty><property isim=\"border_width\">6</property><property isim=\"xalign\"" ">0</property><property isim=\"xscale\">0</property><property isim=\"ysc" "ale\">0</property><property isim=\"left_padding\">12</property><child><" "object class=\"GtkButton\" id=\"button-clear\"><property isim=\"label\"" " translatable=\"yes\">C_lear Custom Command History</property><property" " isim=\"use_action_appearance\">False</property><property isim=\"visibl" "e\">True</property><property isim=\"can_focus\">True</property><propert" "y isim=\"receives_default\">True</property><property isim=\"image\">ima" "ge3</property><property isim=\"use_underline\">True</property></object>" "</child></object></child><child type=\"label\"><object class=\"GtkLabel" "\" id=\"label7\"><property isim=\"visible\">True</property><property na" "me=\"can_focus\">False</property><property isim=\"label\" translatable=" "\"yes\">History</property><attributes><attribute isim=\"weight\" value=" "\"bold\"/></attributes></object></child></object><packing><property nam" "e=\"expand\">False</property><property isim=\"fill\">True</property><pr" "operty isim=\"position\">2</property></packing></child></object></child" "><child type=\"tab\"><object class=\"GtkLabel\" id=\"label1\"><property" " isim=\"visible\">True</property><property isim=\"can_focus\">False</pr" "operty><property isim=\"label\" translatable=\"yes\">_General</property" "><property isim=\"use_underline\">True</property></object><packing><pro" "perty isim=\"tab_fill\">False</property></packing></child><child><objec" "t class=\"GtkVBox\" id=\"vbox1\"><property isim=\"visible\">True</prope" "rty><property isim=\"can_focus\">False</property><property isim=\"borde" "r_width\">6</property><property isim=\"spacing\">6</property><child><ob" "ject class=\"GtkHBox\" id=\"hbox1\"><property isim=\"visible\">True</pr" "operty><property isim=\"can_focus\">False</property><property isim=\"sp" "acing\">6</property><child><object class=\"GtkScrolledWindow\" id=\"scr" "olledwindow1\"><property isim=\"visible\">True</property><property name" "=\"can_focus\">True</property><property isim=\"hscrollbar_policy\">auto" "matic</property><property isim=\"vscrollbar_policy\">automatic</propert" "y><property isim=\"shadow_type\">etched-in</property><child><object cla" "ss=\"GtkTreeView\" id=\"actions-treeview\"><property isim=\"visible\">T" "rue</property><property isim=\"can_focus\">True</property><property nam" "e=\"model\">actions-store</property><property isim=\"headers_clickable\"" ">False</property><property isim=\"rules_hint\">True</property><property" " isim=\"enable_search\">False</property><property isim=\"search_column\"" ">0</property><child><object class=\"GtkTreeViewColumn\" id=\"treeviewco" "lumn1\"><property isim=\"title\" translatable=\"yes\">Pattern</property" "><child><object class=\"GtkCellRendererText\" id=\"cellrenderertext1\"/" "><attributes><attribute isim=\"text\">0</attribute></attributes></child" "></object></child></object></child></object><packing><property isim=\"e" "xpand\">True</property><property isim=\"fill\">True</property><property" " isim=\"position\">0</property></packing></child><child><object class=\"" "GtkAlignment\" id=\"alignment1\"><property isim=\"visible\">True</prope" "rty><property isim=\"can_focus\">False</property><property isim=\"yalig" "n\">0</property><property isim=\"xscale\">0</property><property isim=\"" "yscale\">0</property><child><object class=\"GtkVBox\" id=\"vbox2\"><pro" "perty isim=\"visible\">True</property><property isim=\"can_focus\">Fals" "e</property><property isim=\"spacing\">6</property><child><object class" "=\"GtkButton\" id=\"button-add\"><property isim=\"use_action_appearance" "\">False</property><property isim=\"visible\">True</property><property " "isim=\"can_focus\">True</property><property isim=\"receives_default\">T" "rue</property><property isim=\"tooltip_text\" translatable=\"yes\">Add " "a new custom action.</property><child><object class=\"GtkImage\" id=\"i" "mage1\"><property isim=\"visible\">True</property><property isim=\"can_" "focus\">False</property><property isim=\"stock\">gtk-add</property></ob" "ject></child></object><packing><property isim=\"expand\">True</property" "><property isim=\"fill\">True</property><property isim=\"position\">0</" "property></packing></child><child><object class=\"GtkButton\" id=\"butt" "on-remove\"><property isim=\"use_action_appearance\">False</property><p" "roperty isim=\"visible\">True</property><property isim=\"can_focus\">Tr" "ue</property><property isim=\"receives_default\">True</property><proper" "ty isim=\"tooltip_text\" translatable=\"yes\">Remove the currently sele" "cted action.</property><child><object class=\"GtkImage\" id=\"image2\">" "<property isim=\"visible\">True</property><property isim=\"can_focus\">" "False</property><property isim=\"stock\">gtk-delete</property></object>" "</child></object><packing><property isim=\"expand\">True</property><pro" "perty isim=\"fill\">True</property><property isim=\"position\">1</prope" "rty></packing></child></object></child></object><packing><property name" "=\"expand\">False</property><property isim=\"fill\">True</property><pro" "perty isim=\"position\">1</property></packing></child></object><packing" "><property isim=\"expand\">True</property><property isim=\"fill\">True<" "/property><property isim=\"position\">0</property></packing></child><ch" "ild><object class=\"GtkTable\" id=\"table1\"><property isim=\"visible\"" ">True</property><property isim=\"can_focus\">False</property><property " "isim=\"n_rows\">4</property><property isim=\"n_columns\">2</property><p" "roperty isim=\"column_spacing\">12</property><property isim=\"row_spaci" "ng\">6</property><child><object class=\"GtkEntry\" id=\"command\"><prop" "erty isim=\"visible\">True</property><property isim=\"can_focus\">True<" "/property><property isim=\"tooltip_text\" translatable=\"yes\">If the t" "ype is set to prefix, %s will be replaced with the string after the pat" "tern, %S with the complete entry text. For regular expressions you can " "use \\0 and \\&lt;num&gt;.</property><property isim=\"invisible_char\">" "\342\200\242</property><property isim=\"invisible_char_set\">True</prop" "erty><property isim=\"primary_icon_activatable\">False</property><prope" "rty isim=\"secondary_icon_activatable\">False</property><property isim=" "\"primary_icon_sensitive\">True</property><property isim=\"secondary_ic" "on_sensitive\">True</property></object><packing><property isim=\"left_a" "ttach\">1</property><property isim=\"right_attach\">2</property><proper" "ty isim=\"top_attach\">2</property><property isim=\"bottom_attach\">3</" "property></packing></child><child><object class=\"GtkEntry\" id=\"patte" "rn\"><property isim=\"visible\">True</property><property isim=\"can_foc" "us\">True</property><property isim=\"invisible_char\">\342\200\242</pro" "perty><property isim=\"invisible_char_set\">True</property><property na" "me=\"primary_icon_activatable\">False</property><property isim=\"second" "ary_icon_activatable\">False</property><property isim=\"primary_icon_se" "nsitive\">True</property><property isim=\"secondary_icon_sensitive\">Tr" "ue</property></object><packing><property isim=\"left_attach\">1</proper" "ty><property isim=\"right_attach\">2</property><property isim=\"top_att" "ach\">1</property><property isim=\"bottom_attach\">2</property></packin" "g></child><child><object class=\"GtkLabel\" id=\"label4\"><property nam" "e=\"visible\">True</property><property isim=\"can_focus\">False</proper" "ty><property isim=\"xalign\">0</property><property isim=\"label\" trans" "latable=\"yes\">Co_mmand:</property><property isim=\"use_underline\">Tr" "ue</property><property isim=\"mnemonic_widget\">command</property></obj" "ect><packing><property isim=\"top_attach\">2</property><property isim=\"" "bottom_attach\">3</property><property isim=\"x_options\">GTK_FILL</prop" "erty></packing></child><child><object class=\"GtkLabel\" id=\"label3\">" "<property isim=\"visible\">True</property><property isim=\"can_focus\">" "False</property><property isim=\"xalign\">0</property><property isim=\"" "label\" translatable=\"yes\">Patte_rn:</property><property isim=\"use_u" "nderline\">True</property><property isim=\"mnemonic_widget\">pattern</p" "roperty></object><packing><property isim=\"top_attach\">1</property><pr" "operty isim=\"bottom_attach\">2</property><property isim=\"x_options\">" "GTK_FILL</property></packing></child><child><object class=\"GtkLabel\" " "id=\"label8\"><property isim=\"visible\">True</property><property isim=" "\"can_focus\">False</property><property isim=\"xalign\">0</property><pr" "operty isim=\"label\" translatable=\"yes\">_Type:</property><property n" "ame=\"use_underline\">True</property><property isim=\"mnemonic_widget\"" ">type</property></object><packing><property isim=\"x_options\">GTK_FILL" "</property></packing></child><child><object class=\"GtkAlignment\" id=\"" "alignment4\"><property isim=\"visible\">True</property><property isim=\"" "can_focus\">False</property><property isim=\"xalign\">0</property><prop" "erty isim=\"xscale\">0</property><child><object class=\"GtkComboBox\" i" "d=\"type\"><property isim=\"visible\">True</property><property isim=\"c" "an_focus\">False</property><property isim=\"model\">action-types</prope" "rty><child><object class=\"GtkCellRendererText\" id=\"cellrenderertext3" "\"/><attributes><attribute isim=\"text\">0</attribute></attributes></ch" "ild></object></child></object><packing><property isim=\"left_attach\">1" "</property><property isim=\"right_attach\">2</property></packing></chil" "d><child><object class=\"GtkCheckButton\" id=\"save\"><property isim=\"" "label\" translatable=\"yes\">_Save match in command history</property><" "property isim=\"use_action_appearance\">False</property><property isim=" "\"visible\">True</property><property isim=\"can_focus\">True</property>" "<property isim=\"receives_default\">False</property><property isim=\"us" "e_underline\">True</property><property isim=\"draw_indicator\">True</pr" "operty></object><packing><property isim=\"left_attach\">1</property><pr" "operty isim=\"right_attach\">2</property><property isim=\"top_attach\">" "3</property><property isim=\"bottom_attach\">4</property></packing></ch" "ild><child><placeholder/></child></object><packing><property isim=\"exp" "and\">False</property><property isim=\"fill\">True</property><property " "isim=\"position\">1</property></packing></child></object><packing><prop" "erty isim=\"position\">1</property></packing></child><child type=\"tab\"" "><object class=\"GtkLabel\" id=\"label2\"><property isim=\"visible\">Tr" "ue</property><property isim=\"can_focus\">False</property><property nam" "e=\"label\" translatable=\"yes\">Custom _Actions</property><property na" "me=\"use_underline\">True</property></object><packing><property isim=\"" "position\">1</property><property isim=\"tab_fill\">False</property></pa" "cking></child></object><packing><property isim=\"expand\">True</propert" "y><property isim=\"fill\">True</property><property isim=\"position\">1<" "/property></packing></child></object></child><action-widgets><action-wi" "dget response=\"0\">button-close</action-widget><action-widget response" "=\"-11\">button-help</action-widget></action-widgets></object></interfa" "ce>" }; static const unsigned appfinder_preferences_ui_length = 21594u;
{ "content_hash": "53c8bb039a1a044e6be7a79c17b65a80", "timestamp": "", "source": "github", "line_count": 334, "max_line_length": 80, "avg_line_length": 73.73353293413173, "alnum_prop": 0.6783205424940106, "repo_name": "milisarge/malfs-milis", "id": "2d4bfdccf674f21de2d5c8810d41fe86039facc2", "size": "24627", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "talimatname/genel/x/xfce4-appfinder/appfinder-preferences-ui.h", "mode": "33188", "license": "mit", "language": [ { "name": "Awk", "bytes": "174996" }, { "name": "C", "bytes": "51607" }, { "name": "C++", "bytes": "623" }, { "name": "CMake", "bytes": "26343" }, { "name": "Common Lisp", "bytes": "889" }, { "name": "Eiffel", "bytes": "570" }, { "name": "Emacs Lisp", "bytes": "138" }, { "name": "HTML", "bytes": "563" }, { "name": "Java", "bytes": "10927" }, { "name": "JavaScript", "bytes": "58538" }, { "name": "M4", "bytes": "143" }, { "name": "Makefile", "bytes": "52553" }, { "name": "PHP", "bytes": "4575" }, { "name": "Perl", "bytes": "40028" }, { "name": "Python", "bytes": "1706935" }, { "name": "Roff", "bytes": "34690" }, { "name": "Ruby", "bytes": "6412" }, { "name": "Shell", "bytes": "976181" }, { "name": "Vala", "bytes": "24732" }, { "name": "XSLT", "bytes": "980" } ], "symlink_target": "" }
<!doctype html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8"> <title>useGooglePay</title> <link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../../";</script> <script>const storage = localStorage.getItem("dokka-dark-mode") if (storage == null) { const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches if (osDarkSchemePreferred === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } else { const savedDarkMode = JSON.parse(storage) if(savedDarkMode === true) { document.getElementsByTagName("html")[0].classList.add("theme-dark") } } </script> <script type="text/javascript" src="../../../../scripts/sourceset_dependencies.js" async></script> <link href="../../../../styles/style.css" rel="Stylesheet"> <link href="../../../../styles/jetbrains-mono.css" rel="Stylesheet"> <link href="../../../../styles/main.css" rel="Stylesheet"> <link href="../../../../styles/prism.css" rel="Stylesheet"> <link href="../../../../styles/logo-styles.css" rel="Stylesheet"> <script type="text/javascript" src="../../../../scripts/clipboard.js" async></script> <script type="text/javascript" src="../../../../scripts/navigation-loader.js" async></script> <script type="text/javascript" src="../../../../scripts/platform-content-handler.js" async></script> <script type="text/javascript" src="../../../../scripts/main.js" defer></script> <script type="text/javascript" src="../../../../scripts/prism.js" async></script> <script type="text/javascript" src="../../../../scripts/symbol-parameters-wrapper_deferred.js" defer></script></head> <body> <div class="navigation-wrapper" id="navigation-wrapper"> <div id="leftToggler"><span class="icon-toggler"></span></div> <div class="library-name"> <a href="../../../../index.html"> <span>stripe-android</span> </a> </div> <div> </div> <div class="pull-right d-flex"> <button id="theme-toggle-button"><span id="theme-toggle"></span></button> <div id="searchBar"></div> </div> </div> <div id="container"> <div id="leftColumn"> <div id="sideMenu"></div> </div> <div id="main"> <div class="main-content" id="content" pageids="payments-core::com.stripe.android.view/PaymentMethodsActivityStarter.Result/useGooglePay/#/PointingToDeclaration//-1622557690"> <div class="breadcrumbs"><a href="../../../index.html">payments-core</a><span class="delimiter">/</span><a href="../../index.html">com.stripe.android.view</a><span class="delimiter">/</span><a href="../index.html">PaymentMethodsActivityStarter</a><span class="delimiter">/</span><a href="index.html">Result</a><span class="delimiter">/</span><span class="current">useGooglePay</span></div> <div class="cover "> <h1 class="cover"><span>use</span><wbr><span>Google</span><wbr><span><span>Pay</span></span></h1> </div> <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":payments-core:dokkaHtmlPartial/release"><div class="symbol monospace"><span class="token keyword"></span><span class="token keyword">val </span><a href="use-google-pay.html">useGooglePay</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="token operator"> = </span><span class="token boolean">false</span></div></div></div> </div> <div class="footer"> <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2022 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span> </div> </div> </div> </body></html>
{ "content_hash": "b5e98ef2e6f6cb0a946ddac13142aed9", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 575, "avg_line_length": 63.41269841269841, "alnum_prop": 0.649061326658323, "repo_name": "stripe/stripe-android", "id": "fafdcb139676698499ebbeb0596728a82d210c78", "size": "3996", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/payments-core/com.stripe.android.view/-payment-methods-activity-starter/-result/use-google-pay.html", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "67407" }, { "name": "Kotlin", "bytes": "7720826" }, { "name": "Python", "bytes": "13146" }, { "name": "Ruby", "bytes": "5171" }, { "name": "Shell", "bytes": "18256" } ], "symlink_target": "" }
package baylandtag.av_combobox_edit_in_table; public class Confession { private Integer id; private String name; public Confession(Integer id, String name) { this.id = id; this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Confession other = (Confession) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } @Override public String toString() { return "Confession [id=" + id + ", name=" + name + "]"; } }
{ "content_hash": "422d83f816078867811912e443774bf0", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 67, "avg_line_length": 18.21212121212121, "alnum_prop": 0.6123128119800333, "repo_name": "eggeral/javafx-examples", "id": "97592011f96efb278c1add710cb53f9a952b6ab9", "size": "1202", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/baylandtag/av_combobox_edit_in_table/Confession.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "4297" }, { "name": "Java", "bytes": "770978" }, { "name": "Shell", "bytes": "134" } ], "symlink_target": "" }
./yamlcpp_test_executable -jobs=10 -workers=2
{ "content_hash": "1b61396dbdfb46cea394ca391ffa5b05", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 45, "avg_line_length": 45, "alnum_prop": 0.7777777777777778, "repo_name": "googleinterns/differential-fuzzing-2020", "id": "fdc72054396f450ce50260ea61b9c1e09a0f25f9", "size": "621", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "yaml_differential_fuzzing/yaml_fuzzing_tests/libyaml_wrapper_tests/run_yamlcpp_parser_sanity_test.sh", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "763" }, { "name": "C++", "bytes": "122325" }, { "name": "Shell", "bytes": "30155" } ], "symlink_target": "" }
import React, {Children, Component, cloneElement} from 'react' import {bindActionCreators} from 'redux' import {connect} from 'react-redux' import HeaderContainer from '../../containers/HeaderContainer'; import NavBarContainer from '../../containers/NavBarContainer'; import FooterContainer from '../../containers/FooterContainer'; import ModalNormalContainer from '../../containers/ModalNormalContainer'; import actions from '../../actions' import { Button, Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; class Main extends Component { constructor() { super() } render() { const {children, ...props} = this.props return ( <div className="app"> <HeaderContainer /> <div className="app-body"> <div className="container-fluid"> {this.props.children} </div> </div> <FooterContainer /> <ModalNormalContainer /> </div> ) } } function mapStateToProps(state) { return {}; } function mapDispatchToProps(dispatch) { return {}; //return {actions: bindActionCreators(actions, dispatch)} } export default connect( mapStateToProps, mapDispatchToProps )(Main)
{ "content_hash": "5d1f74839439b149db24140456be6e9e", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 80, "avg_line_length": 25.6734693877551, "alnum_prop": 0.6343402225755167, "repo_name": "sauleddy/HomePortal", "id": "4929b0385a866c17579757552d25dacce1a8bcd7", "size": "1258", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "common/components/Main/Main.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "476481" }, { "name": "HTML", "bytes": "7628" }, { "name": "JavaScript", "bytes": "556550" }, { "name": "Python", "bytes": "10576" } ], "symlink_target": "" }
$(document).ready(function() { prettyPrint(); /*$.getJSON("https://api.github.com/repos/JasonSanford/google-vector-layers/issues?state=open&callback=?", function(issues) { if (issues && issues.data && issues.data.length) { var issuesHTML = '<h5>Current Issues</h5><ul>'; $.each(issues.data, function(i, o) { var li = '<li><a href="' + o.html_url + '" title="' + o.body + '">' + o.title + '</a></li>'; issuesHTML += li; }); issuesHTML += '</ul>'; $("div.sidebar > div.well").append(issuesHTML); } });*/ });
{ "content_hash": "2592aec2a2ef922c351eb4dd92849f08", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 129, "avg_line_length": 42, "alnum_prop": 0.4984126984126984, "repo_name": "kyroskoh/leaflet-vector-layers", "id": "ec4968b27dcd381cbb22d46a4cb9ace1cacfb6bd", "size": "630", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "docs-demo/js/docs-demos.js", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "500" }, { "name": "CSS", "bytes": "1921" }, { "name": "HTML", "bytes": "176481" }, { "name": "JavaScript", "bytes": "68365" }, { "name": "Makefile", "bytes": "565" } ], "symlink_target": "" }
<div class="panel-collapse collapse" id="collapse-{{ include.id }}" role="tabpanel" aria-labelledby="heading-{{include.id}}"> <div class="panel-body"> {{ include.content }} </div> </div>
{ "content_hash": "df66cc7d057fecdf26382307490ceff4", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 125, "avg_line_length": 39, "alnum_prop": 0.6512820512820513, "repo_name": "switowski/deploystack", "id": "c2fbd388ced0af38c81e8594a510f125d345e096", "size": "195", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_includes/accordion-body.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "114901" }, { "name": "HTML", "bytes": "106170" }, { "name": "JavaScript", "bytes": "23321" }, { "name": "Ruby", "bytes": "3126" }, { "name": "SCSS", "bytes": "18814" } ], "symlink_target": "" }
#ifndef PHP_V8_FUNCTION_H #define PHP_V8_FUNCTION_H #include "php_v8_value.h" #include <v8.h> extern "C" { #include "php.h" #ifdef ZTS #include "TSRM.h" #endif } extern zend_class_entry* php_v8_function_class_entry; extern bool php_v8_function_unpack_args(zval *arguments_zv, int arg_position, v8::Isolate *isolate, int *argc, v8::Local<v8::Value> **argv); extern bool php_v8_function_unpack_string_args(zval* arguments_zv, int arg_position, v8::Isolate *isolate, int *argc, v8::Local<v8::String> **argv); extern bool php_v8_function_unpack_object_args(zval* arguments_zv, int arg_position, v8::Isolate *isolate, int *argc, v8::Local<v8::Object> **argv); #define PHP_V8_CHECK_FUNCTION_LENGTH_RANGE(val, message) \ if ((val) > INT_MAX || (val) < INT_MIN) { \ PHP_V8_THROW_VALUE_EXCEPTION(message); \ return; \ } PHP_MINIT_FUNCTION(php_v8_function); #endif //PHP_V8_FUNCTION_H
{ "content_hash": "50d32f3c0327165047a0dd951b3e2f5a", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 148, "avg_line_length": 28.4375, "alnum_prop": 0.689010989010989, "repo_name": "pinepain/php-v8", "id": "46909823ad7a179e9bee95b18af71dfd74b78846", "size": "1285", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/php_v8_function.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "53215" }, { "name": "C++", "bytes": "603399" }, { "name": "CMake", "bytes": "967" }, { "name": "JavaScript", "bytes": "13314" }, { "name": "M4", "bytes": "9679" }, { "name": "PHP", "bytes": "757917" }, { "name": "Shell", "bytes": "7167" } ], "symlink_target": "" }
<?php namespace Cake\Database\Expression; use Cake\Database\ExpressionInterface; use Cake\Database\ValueBinder; /** * Represents a single identifier name in the database */ class IdentifierExpression implements ExpressionInterface { /** * Holds the identifier string * * @var string */ protected $_identifier; /** * Constructor * * @param string $identifier The identifier this expression represents */ public function __construct($identifier) { $this->_identifier = $identifier; } /** * Sets the identifier this expression represents * * @param string $identifier The identifier * @return void */ public function setIdentifier($identifier) { $this->_identifier = $identifier; } /** * Returns the identifier this expression represents * * @return string */ public function getIdentifier() { return $this->_identifier; } /** * Converts the expression to its string representation * * @param \Cake\Database\ValueBinder $generator Placeholder generator object * @return string */ public function sql(ValueBinder $generator) { return $this->_identifier; } /** * This method is a no-op, this is a leaf type of expression, * hence there is nothing to traverse * * @param callable $callable The callable to traverse with. * @return void */ public function traverse(callable $callable) { } }
{ "content_hash": "62443478d8e78d40c730939465204a2b", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 80, "avg_line_length": 21.301369863013697, "alnum_prop": 0.6199356913183279, "repo_name": "CajuM/bestem-ms", "id": "3dc05ef6c4d12141543bd67348ff5c804218c2c1", "size": "2139", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "vendor/cakephp/cakephp/src/Database/Expression/IdentifierExpression.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "433" }, { "name": "Batchfile", "bytes": "834" }, { "name": "CSS", "bytes": "12827" }, { "name": "PHP", "bytes": "73935" }, { "name": "Shell", "bytes": "1457" } ], "symlink_target": "" }
package com.aspose.cloud.sdk.cells.model; import com.aspose.cloud.sdk.common.LinkModel; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; /** * Created by muhammadsohailismail on 7/16/15. */ public class PivotTableStyleRequest { @SerializedName("Font") public FontModel font; @SerializedName("Name") public String name; public String CultureCustom; public String Custom; public ColorModel BackgroundColor; public ColorModel ForegroundColor; public boolean IsFormulaHidden; public boolean IsDateTime; public boolean IsTextWrapped; public boolean IsGradient; public boolean IsLocked; public boolean IsPercent; public boolean ShrinkToFit; public int IndentLevel; public int Number; public int RotationAngle; public String Pattern; public String TextDirection; public String VerticalAlignment; public String HorizontalAlignment; public ArrayList<PivotTableBorder> BorderCollection; public LinkModel link; }
{ "content_hash": "af7ad589db2ce2d33ff07168577d57bb", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 56, "avg_line_length": 28.694444444444443, "alnum_prop": 0.7531461761858664, "repo_name": "asposeforcloud/Aspose_Cloud_SDK_For_Android", "id": "c4fb50963cc2e0d12d9a985651828e248b724275", "size": "1033", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "asposecloudsdk/src/main/java/com/aspose/cloud/sdk/cells/model/PivotTableStyleRequest.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "1039150" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Cetraria cucullata f. major Rass. ### Remarks null
{ "content_hash": "ad66f53c9f0667e781ecb03444617b44", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 33, "avg_line_length": 10.615384615384615, "alnum_prop": 0.7028985507246377, "repo_name": "mdoering/backbone", "id": "f9b4869bed2631e77c79c25d211be6c7bc9b73d1", "size": "192", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Lecanoromycetes/Lecanorales/Parmeliaceae/Flavocetraria/Flavocetraria cucullata/Cetraria cucullata major/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }}</title> {% include meta.html %} <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/style.css" /> <link rel="alternate" type="application/rss+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/rss.xml" /> <!-- <link rel="alternate" type="application/rss+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" /> --> <!-- <link rel="alternate" type="application/atom+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/atom.xml" /> --> <script src="{{ site.baseurl }}/js/jquery-2.2.3.min.js"></script> <script src="{{ site.baseurl }}/js/motdSelector.js"></script> <!-- SHOW ANALYTICS --> {% include analytics.html %} <!-- END ANALYTICS --> <!-- Created with Jekyll Now - http://github.com/barryclark/jekyll-now --> </head> <body> <div class="container"> <div class="wrapper-masthead"> <header class="masthead clearfix"> <nav> <div class="bl"><a class="hoverLink" href="{{ site.baseurl }}/about">About</a></div> <div class="bl"><a class="hoverLink" href="{{ site.baseurl }}/archive">Archive</a></div> </nav> <div id="site-info"> <h1 id="site-name"><a href="{{ site.baseurl }}/">{{ site.name }}</a></h1> <p id="site-description"> {% if site.footer-links.myanimelist %} <a href="http://www.myanimelist.net/profile/{{ site.footer-links.myanimelist }}" target="_blank"> <img src="{{ site.baseurl }}/images/icons/mal.png" alt="MyAnimeList" title="MyAnimeList" class="iconLrg"> </a> {% endif %} {% if site.footer-links.twitter %} <a href="https://www.twitter.com/{{ site.footer-links.twitter }}" target="_blank"> <img src="{{ site.baseurl }}/images/icons/twitter.png" alt="Twitter" title="Twitter" class="iconLrg"> </a> {% endif %} {% if site.footer-links.email %} <a href="mailto:{{ site.footer-links.email }}"> <img src="{{ site.baseurl }}/images/icons/email.png" alt="E-mail" title="E-mail" class="iconLrg"> </a> {% endif %} <a href="{{ site.baseurl }}/rss.xml"> <img src="{{ site.baseurl }}/images/icons/rss.png" alt="RSS Feed" title="RSS Feed" class="iconLrg"> </a> </p> <p id="motd"></p> </div> </header> </div> </div> {{ content }} {% if false %} <!-- COMMENTED OUT --> <!-- SHOW FOOTER --> <div class="wrapper-footer"> <div class="container"> <footer class="footer"> {% include svg-icons.html %} </footer> </div> </div> <!-- END FOOTER --> {% endif %} </body> </html>
{ "content_hash": "3aa850e1627f2f67bcc43e6a1a676191", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 149, "avg_line_length": 39.7625, "alnum_prop": 0.5102169129204652, "repo_name": "NotaTrueRoute/blogsource", "id": "a9118d69560d3263adba3907012e90f3a46d705c", "size": "3183", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_layouts/default.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "65766" }, { "name": "HTML", "bytes": "20847" }, { "name": "JavaScript", "bytes": "126" }, { "name": "Ruby", "bytes": "3618" } ], "symlink_target": "" }
require 'spec_helper' describe "exercise_logs/new.html.erb" do pending "add some examples to (or delete) #{__FILE__}" end
{ "content_hash": "08d5d5a0e1485a00545188fe11167f77", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 56, "avg_line_length": 25, "alnum_prop": 0.704, "repo_name": "alt234/physical-activity-log", "id": "3323f7a6a3cb5712270ddd816b3b3c60bcad9764", "size": "125", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/views/exercise_logs/new.html.erb_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1239" }, { "name": "CoffeeScript", "bytes": "1092" }, { "name": "JavaScript", "bytes": "736" }, { "name": "Ruby", "bytes": "25903" } ], "symlink_target": "" }
package org.hisp.dhis.datavalue; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.period.Period; import org.hisp.dhis.system.deletion.DeletionHandler; import org.springframework.jdbc.core.JdbcTemplate; /** * @author Lars Helge Overland * @version $Id$ */ public class DataValueDeletionHandler extends DeletionHandler { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private JdbcTemplate jdbcTemplate; public void setJdbcTemplate( JdbcTemplate jdbcTemplate ) { this.jdbcTemplate = jdbcTemplate; } // ------------------------------------------------------------------------- // DeletionHandler implementation // ------------------------------------------------------------------------- @Override public String getClassName() { return DataValue.class.getSimpleName(); } @Override public String allowDeleteDataElement( DataElement dataElement ) { String sql = "SELECT COUNT(*) FROM datavalue where dataelementid=" + dataElement.getId(); return jdbcTemplate.queryForObject( sql, Integer.class ) == 0 ? null : ERROR; } @Override public String allowDeletePeriod( Period period ) { String sql = "SELECT COUNT(*) FROM datavalue where periodid=" + period.getId(); return jdbcTemplate.queryForObject( sql, Integer.class ) == 0 ? null : ERROR; } @Override public String allowDeleteOrganisationUnit( OrganisationUnit unit ) { String sql = "SELECT COUNT(*) FROM datavalue where sourceid=" + unit.getId(); return jdbcTemplate.queryForObject( sql, Integer.class ) == 0 ? null : ERROR; } @Override public String allowDeleteDataElementCategoryOptionCombo( DataElementCategoryOptionCombo optionCombo ) { String sql = "SELECT COUNT(*) FROM datavalue where categoryoptioncomboid=" + optionCombo.getId() + " or attributeoptioncomboid=" + optionCombo.getId(); return jdbcTemplate.queryForObject( sql, Integer.class ) == 0 ? null : ERROR; } }
{ "content_hash": "505aab1a5a24faa3282c795ddb2a3f03", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 159, "avg_line_length": 34.12676056338028, "alnum_prop": 0.577383408997111, "repo_name": "kakada/dhis2", "id": "48e89812062717c264287d8c8c87d4a5a849bdc7", "size": "4005", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/DataValueDeletionHandler.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "396164" }, { "name": "Game Maker Language", "bytes": "20893" }, { "name": "HTML", "bytes": "340997" }, { "name": "Java", "bytes": "18116166" }, { "name": "JavaScript", "bytes": "7103857" }, { "name": "Ruby", "bytes": "1011" }, { "name": "Shell", "bytes": "376" }, { "name": "XSLT", "bytes": "24103" } ], "symlink_target": "" }
import { AppInsightsSettings, GitHubActionSettings, CommonSettings, AppStack } from './app-stacks'; import { WorkerRuntimeLanguages } from '../../utils/CommonConstants'; import { RuntimeExtensionMajorVersions } from '../functions/runtime-extension'; export interface FunctionAppRuntimes { linuxRuntimeSettings?: FunctionAppRuntimeSettings; windowsRuntimeSettings?: FunctionAppRuntimeSettings; } export interface AppSettingsDictionary { FUNCTIONS_WORKER_RUNTIME?: WorkerRuntimeLanguages; WEBSITE_NODE_DEFAULT_VERSION?: string; } export interface SiteConfigPropertiesDictionary { use32BitWorkerProcess: boolean; linuxFxVersion?: string; javaVersion?: string; powerShellVersion?: string; } export interface FunctionAppRuntimeSettings extends CommonSettings { runtimeVersion: string; remoteDebuggingSupported: boolean; appInsightsSettings: AppInsightsSettings; gitHubActionSettings: GitHubActionSettings; appSettingsDictionary: AppSettingsDictionary; siteConfigPropertiesDictionary: SiteConfigPropertiesDictionary; supportedFunctionsExtensionVersions: RuntimeExtensionMajorVersions[]; } export type FunctionAppStack = AppStack<FunctionAppRuntimes>;
{ "content_hash": "9f07c92dd12e9be20dcd65da5f94fa04", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 99, "avg_line_length": 36.875, "alnum_prop": 0.8288135593220339, "repo_name": "projectkudu/AzureFunctions", "id": "e797e4f81d04ae060e745008a76dbe1bdfbaaf98", "size": "1180", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client-react/src/models/stacks/function-app-stacks.ts", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "96" }, { "name": "Batchfile", "bytes": "7447" }, { "name": "C#", "bytes": "127874" }, { "name": "CSS", "bytes": "35089" }, { "name": "HTML", "bytes": "46606" }, { "name": "JavaScript", "bytes": "14929" }, { "name": "PowerShell", "bytes": "681" }, { "name": "TypeScript", "bytes": "152471" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>unimath-substitution-systems: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.15.1 / unimath-substitution-systems - 0.1.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> unimath-substitution-systems <small> 0.1.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-04-01 15:17:29 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-04-01 15:17:29 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 4 Virtual package relying on a GMP lib system installation coq 8.15.1 Formal proof management system dune 3.0.3 Fast, portable, and opinionated build system ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;opam@clarus.me&quot; homepage: &quot;https://github.com/UniMath/UniMath&quot; dev-repo: &quot;git+https://github.com/UniMath/UniMath.git&quot; bug-reports: &quot;https://github.com/UniMath/UniMath/issues&quot; license: &quot;Kind of MIT&quot; authors: [&quot;The UniMath Development Team&quot;] build: [ [&quot;coq_makefile&quot; &quot;-f&quot; &quot;Make&quot; &quot;-o&quot; &quot;Makefile&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5.0&quot; &amp; &lt; &quot;8.6&quot;} &quot;coq-unimath-category-theory&quot; &quot;coq-unimath-foundations&quot; ] synopsis: &quot;Aims to formalize a substantial body of mathematics using the univalent point of view&quot; extra-files: [&quot;Make&quot; &quot;md5=8606de3f7fc761f04872219361ba9c7d&quot;] url { src: &quot;https://github.com/UniMath/UniMath/archive/v0.1.tar.gz&quot; checksum: &quot;md5=1ed57c1028e227a309f428a6dc5f0866&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-unimath-substitution-systems.0.1.0 coq.8.15.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.15.1). The following dependencies couldn&#39;t be met: - coq-unimath-substitution-systems -&gt; coq &lt; 8.6 -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-unimath-substitution-systems.0.1.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "cd7577dd227baf5ef8616942fd69cf01", "timestamp": "", "source": "github", "line_count": 166, "max_line_length": 159, "avg_line_length": 41.30120481927711, "alnum_prop": 0.5415694282380397, "repo_name": "coq-bench/coq-bench.github.io", "id": "7708661e2e2ab7d6dd2e64b8803d34a65f24e6e8", "size": "6881", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.11.2-2.0.7/released/8.15.1/unimath-substitution-systems/0.1.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>About</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <!-- Place favicon.ico and apple-touch-icon.png in the root directory --> <!-- build:css(.tmp) styles/main.css --> <link rel="stylesheet" href="styles/main.css"> <!-- endbuild --> </head> <body> <!--[if lt IE 7]> <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p> <![endif]--> <div class="navbar navbar-fixed-top navbar-inverse" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="index.html">grunt uncss sass example</a> </div> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="index.html">Home</a></li> <li class="active"><a href="about.html">About</a></li> </ul> </div><!-- /.nav-collapse --> </div><!-- /.container --> </div><!-- /.navbar --> <div class="container"> <div class="row row-offcanvas row-offcanvas-right"> <p> <h1>About</h1> </p> <table class="table table-striped"> <thead> <tr> <th>#</th> <th>First Name</th> <th>Last Name</th> <th>Username</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td>@mdo</td> </tr> <tr> <td>2</td> <td>Jacob</td> <td>Thornton</td> <td>@fat</td> </tr> <tr> <td>3</td> <td>Larry</td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> <!-- Provides extra visual weight and identifies the primary action in a set of buttons --> <button type="button" class="btn btn-primary">Primary</button> <!-- Indicates a successful or positive action --> <button type="button" class="btn btn-success">Success</button> <!-- Contextual button for informational alert messages --> <button type="button" class="btn btn-info">Info</button> <!-- Indicates caution should be taken with this action --> <button type="button" class="btn btn-warning">Warning</button> <!-- Indicates a dangerous or potentially negative action --> <button type="button" class="btn btn-danger">Danger</button> <!-- Deemphasize a button by making it look like a link while maintaining button behavior --> <button type="button" class="btn btn-link">Link</button> <p>&nbsp;</p> <button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button> <button type="button" class="btn btn-default btn-lg btn-block">Block level button</button> </div> </div> <hr> </body> </html>
{ "content_hash": "85c6572f7372058d358225fe64b54592", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 279, "avg_line_length": 34.50892857142857, "alnum_prop": 0.5345407503234153, "repo_name": "addyosmani/grunt-uncss-sass-example", "id": "4b39cb7baf01b0f025f14e1918c9d8e2b76d7014", "size": "3865", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/about.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2306" }, { "name": "JavaScript", "bytes": "12964" } ], "symlink_target": "" }