text
stringlengths
2
1.04M
meta
dict
<?php declare(strict_types = 1); namespace Tests\Feature\Frontend\Auth; use App\Services\Auth\Checkpoint\ActivationCheckpoint; use App\Services\Auth\Checkpoint\Pool; use App\Services\Response\Status; use Tests\TestCase; class ActivationTest extends TestCase { public function test(): void { $this->transaction(); $this->app->singleton(Pool::class, function () { return new Pool([$this->app->make(ActivationCheckpoint::class)]); }); $response = $this->post(route('frontend.auth.register.handle', [ 'username' => 'D3lph1', 'email' => '[email protected]', 'password' => '123456', 'password_confirmation' => '123456' ])); $response->assertStatus(200); $response->assertJson([ 'status' => Status::SUCCESS, 'redirect' => 'frontend.auth.activation.sent' ]); $this->rollback(); } }
{ "content_hash": "d2fc5dd04f49231bb1d810422dcb60c7", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 77, "avg_line_length": 28.848484848484848, "alnum_prop": 0.592436974789916, "repo_name": "D3lph1/L-shop", "id": "8df06826ecb538b48eeac9df922bfe6540ef5b13", "size": "952", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "tests/Feature/Frontend/Auth/ActivationTest.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2080" }, { "name": "HTML", "bytes": "45458" }, { "name": "PHP", "bytes": "1488214" }, { "name": "Shell", "bytes": "809" }, { "name": "Vue", "bytes": "455977" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Joy.Core; using System.IO; namespace Joy.Server.Core { public class JoyConfig { public string RootUrl; public static JoyConfig Instance { get { if (instance == null) { instance = CreateInstance(); } return instance; } } protected static string baseDir = AppDomain.CurrentDomain.BaseDirectory; protected static string filename = "Joy.Config"; protected static string fullpath { get { return string.Concat(baseDir, filename); } } protected static JoyConfig instance; public static JoyConfig CreateInstance(string rooturl = null) { if (File.Exists(fullpath)) { string xml = File.ReadAllText(fullpath); JoyConfig c = xml.FromXml<JoyConfig>(); return c; } if (string.IsNullOrEmpty(rooturl)) { rooturl = "/"; } return new JoyConfig { RootUrl = rooturl }; } public static string UrlFromRoot(string url) { return string.Concat(Instance.RootUrl, url); } } }
{ "content_hash": "19aa8690f6acfca1521ab0891f95d46f", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 74, "avg_line_length": 19.327272727272728, "alnum_prop": 0.6745061147695203, "repo_name": "mind0n/hive", "id": "c29c4361ae6798325e5d9b07f34162c3d8a3e773", "size": "1065", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "History/Samples/Website/Store/Joy.Server/Core/JoyConfig.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "670329" }, { "name": "ActionScript", "bytes": "7830" }, { "name": "ApacheConf", "bytes": "47" }, { "name": "Batchfile", "bytes": "18096" }, { "name": "C", "bytes": "19746409" }, { "name": "C#", "bytes": "258148996" }, { "name": "C++", "bytes": "48534520" }, { "name": "CSS", "bytes": "933736" }, { "name": "ColdFusion", "bytes": "10780" }, { "name": "GLSL", "bytes": "3935" }, { "name": "HTML", "bytes": "4631854" }, { "name": "Java", "bytes": "10881" }, { "name": "JavaScript", "bytes": "10250558" }, { "name": "Logos", "bytes": "1526844" }, { "name": "MAXScript", "bytes": "18182" }, { "name": "Mathematica", "bytes": "1166912" }, { "name": "Objective-C", "bytes": "2937200" }, { "name": "PHP", "bytes": "81898" }, { "name": "Perl", "bytes": "9496" }, { "name": "PowerShell", "bytes": "44339" }, { "name": "Python", "bytes": "188058" }, { "name": "Shell", "bytes": "758" }, { "name": "Smalltalk", "bytes": "5818" }, { "name": "TypeScript", "bytes": "50090" } ], "symlink_target": "" }
[![Build Status](https://travis-ci.org/dsimard/timezonedetect.png?branch=master)](https://travis-ci.org/dsimard/timezonedetect) if (timezonedetect.hasDaylightSavingTime()) { console.log('You have daylight saving time in your timezone'); } else { console.log('You DO NOT have daylight saving time in your timezone'); } console.log('Your standard time zone offset in second is ' + jsk.tz.standardTime()); console.log('Your standard time zone offset is : ' + jsk.tz.standardTimeToString()); See the complete documentation in [timezonedetect.js](http://dsimard.github.com/timezonedetect/timezonedetect.js.html) ## Testimonial > Finally, timezones in javascript done right. The world has been made a better place via this fine javascript library. _Garry Tan_, Partner with Y Combinator. Cofounder of Posterous. ([source](http://axonflux.com/finally-timezones-in-javascript-done-right)) ## Install To __install for a website__, copy `timezonedetect.min.js` with the other javascript files of your project and include it. To __install in a Node.js__ project `npm install timezonedetect` ## Contribute Give what you want to contribute to open-source : [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5Q2QAJSHP8Y8Y) You can create [issues](https://github.com/dsimard/timezonedetect/issues). You can also contribute code : 1. Fork the code on GitHub 2. Clone your fork in your environment : `git clone [email protected]:USERNAME/timezonedetect.git` 3. Create a branch for your feature : `git checkout -b your_branch_name` 4. Write and delete code and commit as often as you can : `git commit -am "A descriptive message"` 5. Push the branch to your fork : `git push origin your_branch_name` 6. Create a pull request on GitHub (click the __Pull request__ button on your fork page) ## Need more help? - Create an [issue](https://github.com/dsimard/timezonedetect/issues). - Write me an email at <[email protected]>
{ "content_hash": "59c08d0bec3263aa2af8e2fe660fa43e", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 158, "avg_line_length": 43.61702127659574, "alnum_prop": 0.7434146341463415, "repo_name": "dsimard/timezonedetect", "id": "2a87a31e37d10613cd336934e8ac1cda738c2bc8", "size": "2141", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CoffeeScript", "bytes": "4642" }, { "name": "JavaScript", "bytes": "35240" } ], "symlink_target": "" }
package md; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.apache.lucene.analysis.util.FilteringTokenFilter; import java.io.IOException; import java.util.Set; public class AnchorOnlyFilter extends FilteringTokenFilter { private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class); private Set<String> termSet; public AnchorOnlyFilter(TokenStream input, Set<String> termSet) throws IOException { super(input); this.termSet = termSet; } @Override protected boolean accept() throws IOException { return termSet.contains(termAtt.toString()); } }
{ "content_hash": "6b5ecc5f096eb50b05b4304366205417", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 86, "avg_line_length": 27, "alnum_prop": 0.7881481481481482, "repo_name": "mocobeta/wiki-utils", "id": "51ff78e812673de03f19fd1151d3a9ba523f5955", "size": "675", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/md/AnchorOnlyFilter.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "1490" }, { "name": "Scala", "bytes": "30708" } ], "symlink_target": "" }
. ./scripts/arg-parser.sh # Set default values. repository="https://github.com/szledan/gepard.git" gitTag=thesis helpMsg="usage "`basename $0`" --repo=<git-repository> --tag=<tag>" # Show help. if [[ $(getFlag "--help -h --usage" $@) ]] ; then echo $helpMsg exit 0 fi # Parse flags. repository=$(getValue $(getFlag "--repo" $@) $repository) gitTag=$(getValue $(getFlag "--tag" $@) $gitTag) # Define variables. codeName=`basename $repository .git` codeDir="$PWD/code" codeRootDir="$codeDir/$codeName" # Create directoryy if neede. mkdir -p $codeDir cd $codeDir errorCode=$? # Clone repository. if [[ "$errorCode" == "0" && ! -d $codeRootDir ]] ; then git clone $repository $codeRootDir errorCode=$? fi # Checkout to tag. if [ "$errorCode" == "0" ] ; then cd $codeRootDir git checkout $gitTag errorCode=$? fi if [ "$errorCode" == "0" ]; then echo "Done!" else echo "Error! (Code: $errorCode.)" fi
{ "content_hash": "2226fea5df54fc71763b1b2ee7b50088", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 67, "avg_line_length": 20.466666666666665, "alnum_prop": 0.6525515743756786, "repo_name": "szledan/thesis", "id": "719632771d863ff89ddd062e3d8a3c9d860ed658", "size": "961", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "scripts/fetch-code.sh", "mode": "33261", "license": "bsd-2-clause", "language": [ { "name": "C++", "bytes": "16292" }, { "name": "CMake", "bytes": "78706" }, { "name": "HTML", "bytes": "514" }, { "name": "JavaScript", "bytes": "833" }, { "name": "Makefile", "bytes": "652" }, { "name": "Shell", "bytes": "9876" }, { "name": "TeX", "bytes": "201690" } ], "symlink_target": "" }
package utilities.json; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.io.Writer; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.json.simple.JSONObject; import org.json.simple.parser.ContentHandler; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; /** * What this does is takes in the file and writes it out (to a temporary * location in the same folder) If it comes across an item that needs to be * added or replaced it will write that out and then continue on. * * This works on the specific principle that the item we are finding is either the first item in an object or not in the object at all * * TODO: add an option to send data straight to a writer. */ public class StreamingJsonReader extends BufferedReader implements ContentHandler { JSONParser parser; private StringBuffer stringHolder; private int counter = 0; private List<String> valueList; private String key; private String matchKey; private boolean inObject = false; private boolean tracking = false; private boolean first; Map<String, String> result = new HashMap<String, String>(); private int positionOfReadingStart = -1; // the parser position of the reading private int lengthOfBuffer = 0; // the length of the result in the buffer private int offset = 0; // the previous length of the string private int positionOfObjectStart = -1; private String objectValue; private int maxLength = 0; public StreamingJsonReader(Reader reader, JSONParser parser) { super(reader); this.parser = parser; } /** * Used for testing allows a shorter max length than normal. * @param reader * @param parser * @param maxLength */ public StreamingJsonReader(Reader reader, JSONParser parser, int maxLength) { this(reader, parser); this.maxLength = maxLength; } @Override public int read(char[] cbuf, int off, int len) throws IOException { if (maxLength != 0) { len = Math.min(len, maxLength); } int result = super.read(cbuf, off, len); lengthOfBuffer = result; if (!inObject && !tracking && result > 0) { positionOfReadingStart = parser.getPosition(); offset = 0; String s = new String(cbuf, off, result); stringHolder = new StringBuffer(s); } else if (result > 0) { offset = stringHolder.length(); stringHolder.append(cbuf, off, result); } return result; } public void setMatchKey(String matchKey) { this.matchKey = matchKey; } @Override public void startJSON() throws ParseException, IOException { tracking = false; first = true; } @Override public void endJSON() throws ParseException, IOException { } @Override public boolean endObjectEntry() throws ParseException, IOException { return true; } @Override public boolean startObjectEntry(String key) throws ParseException, IOException { this.key = key; if (key != null) { } return true; } @Override public boolean primitive(Object value) throws ParseException, IOException { if (key != null) { if (tracking) { tracking = false; // no matter what we are no longer tracking if (key.equals(matchKey)) { if (checkValues(value)) { key = null; return true; } } } key = null; } return true; } private boolean checkValues(Object value) { if (valueList.contains("" + value)) { key = null; inObject = true; counter = 1; tracking = false; objectValue = "" + value; return true; } return false; } @Override public boolean startArray() throws ParseException, IOException { tracking = false; key = null; if (inObject) { counter ++; } return true; } @Override public boolean endArray() throws ParseException, IOException { if (inObject) { counter --; } return true; } @Override public boolean startObject() throws ParseException, IOException { if (!inObject) { positionOfObjectStart = parser.getPosition(); } if (!inObject) { tracking = true; } key = null; if (inObject) { counter ++; } first = true; return true; } @Override public boolean endObject() throws ParseException, IOException { tracking = false; if (inObject) { counter -= 1; } if (inObject && counter <= 0) { inObject = false; String resultString = stringHolder.substring(positionOfObjectStart - positionOfReadingStart, parser.getPosition() - positionOfReadingStart) + "}"; result.put(objectValue, resultString); } first = false; return true; } public void setMatchValues(List<String> valuesToMatch) { valueList = valuesToMatch; } public Map<String, String> getResult() { return result; } }
{ "content_hash": "d6df9e9d107f336f2c03d5f93b5778ea", "timestamp": "", "source": "github", "line_count": 197, "max_line_length": 149, "avg_line_length": 24.02030456852792, "alnum_prop": 0.702451394759087, "repo_name": "dtracers/Development-Graph", "id": "430f58867935a3033835282295732ad13a8fbdcc", "size": "4732", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Server/java/src/main/java/utilities/json/StreamingJsonReader.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "26000" }, { "name": "HTML", "bytes": "67698" }, { "name": "Java", "bytes": "277295" }, { "name": "JavaScript", "bytes": "447250" }, { "name": "PHP", "bytes": "6164" }, { "name": "Python", "bytes": "44679" }, { "name": "Shell", "bytes": "621" } ], "symlink_target": "" }
<?php /** * Jetpack Compatibility File * See: http://jetpack.me/ * * @package My AKV Soesterkwartier */ /** * Add theme support for Infinite Scroll. * See: http://jetpack.me/support/infinite-scroll/ */ function my_akvs_jetpack_setup() { add_theme_support( 'infinite-scroll', array( 'container' => 'main', 'footer' => 'page', ) ); } add_action( 'after_setup_theme', 'my_akvs_jetpack_setup' );
{ "content_hash": "490f4a9c485bd49cc6bfdd41c80a5670", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 59, "avg_line_length": 21.57894736842105, "alnum_prop": 0.6439024390243903, "repo_name": "kdbruin/wp-akvs", "id": "88409e5c2e9425e7a89a7e545bfd3e6352fb9255", "size": "410", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/themes/my-akvs/inc/jetpack.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "86331" }, { "name": "CoffeeScript", "bytes": "1064" }, { "name": "JavaScript", "bytes": "8616" }, { "name": "PHP", "bytes": "101730" } ], "symlink_target": "" }
<html><head><title>Desktop</title></head> <body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000"> <font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">PureBasic - Desktop</font></b></p> <p><b>Overview</b></p><blockquote> The desktop library allows access to information about the user's desktop environment, such as screen width, height, depth, mouse position etc. </blockquote><p><b>Command Index</b><blockquote> <a href="desktopdepth.html">DesktopDepth</a><br> <a href="desktopfrequency.html">DesktopFrequency</a><br> <a href="desktopheight.html">DesktopHeight</a><br> <a href="desktopmousex.html">DesktopMouseX</a><br> <a href="desktopmousey.html">DesktopMouseY</a><br> <a href="desktopname.html">DesktopName</a><br> <a href="desktopwidth.html">DesktopWidth</a><br> <a href="desktopx.html">DesktopX</a><br> <a href="desktopy.html">DesktopY</a><br> <a href="examinedesktops.html">ExamineDesktops</a><br> </blockquote></p> <p><b>Example</b></p><blockquote> <a href="../Examples/Desktop.pb.html">Desktop.pb</a> </Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><a href="../index.html">Reference Manual - Index</a></center><br><br> </body></html>
{ "content_hash": "e67ef588e0b33e50bea734f38a25114e", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 145, "avg_line_length": 42.10344827586207, "alnum_prop": 0.7059787059787059, "repo_name": "PureBasicCN/PureBasicPreference", "id": "93608cb0aba6b0b00ef475abd76aee954d045e2f", "size": "1221", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "source_dir/documentation/desktop/index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "13068252" } ], "symlink_target": "" }
<template name="tutorial.step_20.html"> {{#markdown}} {{> downloadPreviousStep stepName="step_19"}} In this step we are going to add the ability to upload images into our app, and also sorting and naming them. Angular-Meteor provides us with the [$meteor.collectionFS API](/api/files) that wraps [CollectionFS](https://github.com/CollectionFS/Meteor-CollectionFS). [CollectionFS](https://github.com/CollectionFS/Meteor-CollectionFS) is a suite of Meteor packages that together provide a complete file management solution including uploading, downloading, storage, synchronization, manipulation, and copying. It supports several storage adapters for saving to the local filesystem, GridFS, or S3, and additional storage adapters can be created. So let's add image upload to our app! We will start by adding CollectionFS to our project by running the following command: ``` meteor add cfs:standard-packages ``` Now, we will decide the the storage adapter we want to use. CollectionFS provides adapters for many popular storage methods, link FileSystem, GridFS, Amazon S3 and DropBox. In this example, we will use the GridFS as storage adapters, so we will add the adapter adapter by running this command: ``` meteor add cfs:gridfs ``` Note: you can find more information about Stores and Storage Adapters on the CollectionFS's GitHub repository. So now we have the CollectionFS support and the storage adapter - we need to create a CollectionFS object to handle our files. Note that you will need to define the collection as shared resource because you will need to use the collection in both client and server side. ### Creating the CollectionFS I create the model/images.js file, and define a regular CollectionFS object called "Images", also, I used the CollectionFS API that allows me to defined auth-rules. Finally, I publish the collection just like any other collection, in order to allow the client to subscribe to those images: ``` Images = new FS.Collection("images", { stores: [ new FS.Store.GridFS("original") ], filter: { allow: { contentTypes: ['image/*'] } } }); if (Meteor.isServer) { Images.allow({ insert: function (userId) { return (userId ? true : false); }, remove: function (userId) { return (userId ? true : false); }, download: function () { return true; }, update: function (userId) { return (userId ? true : false); } }); Meteor.publish('images', function() { return Images.find({}); }); } ``` And let's add the usage of $meteorCollectionFS to our core controller (`PartiesListCtrl`): ``` $scope.images = $meteor.collectionFS(Images, false, Images).subscribe('images'); ``` So now we have the collection, we need to create a client-side that handles the images upload. ### Image Upload Note that you can use basic HTML `<input type="file">` or any other package as you want - you only need the HTML5 File object to be provided. For our application, we would like to add ability to drag-and-drop images, so we can use AngularJS directives that handles file upload and gives us more abilities such as drag & drop, file validation on the client side and some more. In this example, I will use [ng-file-upload](https://github.com/danialfarid/ng-file-upload), which have many features for file upload. In order to do this, lets add the package to our project: ``` meteor add danialfarid:ng-file-upload ``` Now, lets add a dependency in the `app.js` file: ``` angular.module('socially',[ 'angular-meteor', /** ... more deps ... **/ 'ngFileUpload' ]); ``` Now, before adding the actual file upload to the client, let's add a `$mdDialog`. that will show the file upload form, in the `partiesList.js` file: ``` angular .module('socially').controller('PartiesListCtrl', ['$scope', /** ... more deps ... **/ , '$mdDialog', function($scope, /** ... more deps ... **/, $mdDialog){ /** ... Already exisiting code ... **/ $scope.openAddImageModal = function() { $mdDialog.show({ controller: 'AddPhotoCtrl', templateUrl: 'client/parties/views/add-photo-modal.ng.html', scope: $scope.$new() }).then(function(image) { // We will add here later the logic to handle the link between the image and the party }); }; }]); ``` And add a button that calls our `openAddImageModal` function inside the create new party form: ``` <md-button class="md-raised" ng-click="openAddImageModal()">Add Photo</md-button> ``` As you can see, Now let's create the view for this dialog and add the `ng-file-upload` directive: ``` <md-dialog class="add-photo-dialog"> <form> <md-toolbar> <div class="md-toolbar-tools"> <h2>Add Photos To Your Event</h2> </div> </md-toolbar> <md-dialog-content> <div> <div ngf-drop ngf-select ngf-change="addImages($files)" ngf-drag-over-class="{accept:'dragover', reject:'dragover-err', delay:100}" class="drop-box" ngf-multiple="false" ngf-allow-dir="false" ngf-accept="'image/*'" ngf-drop-available="dropAvailable"> <div>Click here to select image</div> <div> <strong>OR</strong> </div> <div ng-show="dropAvailable">You can also drop image to here</div> </div> </div> </md-dialog-content> <div class="md-actions" layout="row"> <span flex></span> <md-button ng-click="close()" class="md-primary"> Done </md-button> <md-button ng-click="close()" class="md-warn"> Cancel </md-button> </div> </form> </md-dialog> ``` Also, in order to make the "drop-zone" look like a dropable area in my page, I added this CSS in the application stylesheet: ``` .drop-box { background: #F8F8F8; border: 5px dashed #DDD; width: 230px; height: 65px; text-align: center; padding-top: 25px; margin-left: 10px; } .drop-box.dragover { border: 5px dashed blue; } .drop-box.dragover-err { border: 5px dashed red; } ``` The main code in this HTML is the usage of `addImages` function in the `nfg-change` attribute, because this is the function that handles the main logic of uploading the image. So let's create the controller (`addPhotoCtrl.js`) and implement this function: ``` angular.module("socially").controller("AddPhotoCtrl", ['$scope', '$meteor', '$rootScope', '$state', '$mdDialog', function($scope, $meteor, $rootScope, $state, $mdDialog,) { $scope.addImages = function (files) { if (files.length > 0) { $scope.images.save(files[0]); } }; $scope.close = $mdDialog.hide; }]); ``` I also used ngfChange attribute to know when the user chooses a file, the callback is addImages($files), so lets add this to our `example.js` file instead of using "change" event: ``` $scope.addImages = function (files) { $scope.images.save(files); }; ``` And that's it! now we can upload images by using drag and drop! Now let's add some more cool features! ### Image Crop One of the most common actions we want to make with pictures is edit it before saving, we will add to our example ability to crop images before uploading them to the server. In this example, we will use [ngImgCrop](https://github.com/alexk111/ngImgCrop/) which provides us the ability to do that. So lets start by adding the package to our project: ``` meteor add alexk111:ng-img-crop ``` And add a dependency in our module: ``` angular.module('socially', ['angular-meteor', /*...*/, 'ngImgCrop']); ``` We want to perform the crop in the client side only, before saving it in the CollectionFS, so lets get the uploaded image, and instead of saving it in the server - we will get the Data Url of it, and use it in the ngImgCrop: ``` $scope.addImages = function (files) { if (files.length > 0) { var reader = new FileReader(); reader.onload = function (e) { $scope.$apply(function() { $scope.imgSrc = e.target.result; $scope.myCroppedImage = ''; }); }; reader.readAsDataURL(files[0]); } else { $scope.imgSrc = undefined; } }; ``` We take the file object and used HTML5 FileReader API to read the file from the user on the client side, without uploading it to the server. Then we saved the DataURI of the image into a $scope variable. Next, we will need to use this DataURI with the ngImgCrop directive as follow: ``` <div ng-show="imgSrc" class="ng-crop-container"> <img-crop image="imgSrc" result-image="myCroppedImage" area-type="square"></img-crop> </div> ``` And let's change the logic of the "Done" button to call a function that will actually save the edited image: ``` <md-button ng-click="saveCroppedImage()" ng-disabled="!imgSrc" class="md-primary"> Add Image </md-button> ``` In order to save, we need to implement `saveCroppedImage()` function. We will use the same `$meteorCollectionFS` API we used before, just use the `save` function. CollectionFS have the ability to receive DataURI and save it, just like a File object. So the implementation looks like that: ``` $scope.saveCroppedImage = function() { if ($scope.myCroppedImage !== '') { $scope.images.save($scope.myCroppedImage).then(function() { $scope.uploadedImage = result[0]._id; $scope.answer(true); }); } }; ``` We will save the image call the `answer` function that just close the modal: ``` $scope.answer = function(saveImage) { if (saveImage) { $mdDialog.hide($scope.uploadedImage); } else { if ($scope.uploadedImage) { $scope.images.remove($scope.uploadedImage._id); } $mdDialog.hide(); } }; ``` And because we can share the information from the recently closed dialog with the main view (the add party form), we can just the Promise of the `show` function and implement a logic that will save the list of images we want to attach to out party: ``` $mdDialog.show({ controller: 'AddPhotoCtrl', templateUrl: 'client/parties/views/add-photo-modal.ng.html', scope: $scope.$new(), }).then(function(image) { if (image) { if (!$scope.newPartyImages) { $scope.newPartyImages = []; } $scope.newPartyImages.push(image); } }); ``` And we are done! Now we have the ability to crop images and then save them using CollectionFS. ### Display Uploaded Images Let's add a simple gallery to list the images in the new party form: ``` <div layout="row" class="images-container-title"> <div ng-show="!newPartyImages || newPartyImages.length === 0">Add photo by clicking "Add Photo"</div> <div class="party-image-container" ng-repeat="image in newPartyImages"> <img draggable="false" ng-src="{ { image.url() } }"/><br/> </div> </div> ``` Cool! We can the all the images we want to attach to the new party! Now let's add description to our images! ### Images Metadata & Description Using CollectionFS, we can also save metadata on the files we store. In order to to that, we just need to update the image object with the value, on the `metadata` property of each image. In order to do that really nice and user-friendly, I used [angular-xeditable](https://github.com/vitalets/angular-xeditable). Lets add the angular-xeditable package to our project: ``` meteor add vitalets:angular-xeditable ``` And add a dependency in our module: ``` angular.module('socially', ['angular-meteor', /* ... */ 'xeditable']); ``` Now, let's use angular-xeditable and add usage under the image: ``` <img draggable="false" ng-src="{ { image.url() } }"/><br/> <a href="#" editable-text="image.metadata.description" onbeforesave="updateDescription($data, image)">{ { image.metadata.description || 'Click to add description' } }</a> ``` And, of course, implement `updateDescription` function on the scope: ``` $scope.updateDescription = function($data, image) { image.update({$set: {'metadata.description': $data}}); }; ``` That's it! Now we have a photo gallery with description for each image! ### Sort Images After we learned how to use CollectionFS metadata and how to update metadata values, we can also add an ability to sort and update the images order. To get the ability to sort the images, let's use [angular-sortable-view](https://github.com/kamilkp/angular-sortable-view). Add the package by running this command: ``` meteor add netanelgilad:angular-sortable-view ``` And then add a dependency for the module: ``` angular.module('socially', ['angular-meteor', /* ... */ 'angular-sortable-view']); ``` The basics of angular-sortable-view is to add the `sv-?` attributes to our page, just like the examples in the `angular-sortable-view` repository, So let's do that: ``` <div layout="row" class="images-container-title" sv-root sv-part="newPartyImages" sv-on-sort="updateOrder($partTo)"> <div ng-show="!newPartyImages || newPartyImages.length === 0">Add photo by clicking "Add Photo"</div> <div sv-element class="party-image-container" ng-repeat="image in newPartyImages"> <!-- Some more html --> </div> </div> ``` I use the `sv-on-sort` callback to know when the sort is done and which image moved to which position, the $partTo is the array with indexes updated after the sort is done. Now let's implement the $scope function that will just save the order on the image as a local information, we will use it really soon. ``` $scope.updateOrder = function(sortedArr) { angular.forEach(sortedArr, function(item, index) { item.currentOrder = index; }); }; }; ``` We can also add a highlight to the first image, which we will use as the main image, by adding an indication for that: ``` // HTML <div class="main-image" ng-show="$index === 0">Main Image</div> // CSS .main-image { position: absolute; top: 5px; left: 5px; background-color: #f8f8f8; } ``` So now we have image gallery with ability to edit and add images, add a description to the images, and ability to sort. Now we just need to add the logic that connect those images with that party we are creating! ### Link Image To Object So as you know, we have all the images stored in `newPartyImages` array, we let's implement the `createParty` function, and save a link to the image with it's order: ``` $scope.createParty = function() { $scope.newParty.owner = $rootScope.currentUser._id; // Link the images and the order to the new party if ($scope.newPartyImages && $scope.newPartyImages.length > 0) { $scope.newParty.images = []; angular.forEach($scope.newPartyImages, function(image) { $scope.newParty.images.push({id: image._id, order: image.currentOrder}) }); } // Save the party $scope.parties.push($scope.newParty); // Reset the form $scope.newPartyImages = []; $scope.newParty = {}; }; ``` And that's it! ### Thumbnails Another common usage with images upload, is the ability to save thumbnails of the image as soon as we upload it. CollectionFS gives the ability to handle multiple Stores object, and perform manipulations before we save it in each store. You can find the full information about image manipulation in the [CollectionFS docs](https://github.com/CollectionFS/Meteor-CollectionFS#image-manipulation). Also, make sure you add `meteor add cfs:graphicsmagick` and install graphicsmagick, for more information, follow the instructions on the CollectionFS GitHub page. So in order to add ability to save thumbnails, lets add a new store in the `model.js` and use `transformWrite` ability: ``` Images = new FS.Collection("images", { stores: [ new FS.Store.GridFS("original"), new FS.Store.GridFS("thumbnail", { transformWrite: function(fileObj, readStream, writeStream) { gm(readStream, fileObj.name()).resize('32', '32', '!').stream().pipe(writeStream); } }) ], filter: { allow: { contentTypes: ['image/*'] } } }); ``` So now each image we upload will be saved also as thumbnail. All we have to do is use and display the thumbnail instead of the original image. We just need to add a param to `url()` method of File objects and decide which Store to use when creating the URL: ``` <img ng-src="{ { image.url({store: 'thumbnail'}) } }"> ``` That's it! Now we added the ability to save thumbnails for the images and use them in the view! In addition to the angular-meteor-socially tutorial, you can find simple examples of each step of the tutorial in the Angular-Meteor repository, under examples/ directory. {{/markdown}} </template>
{ "content_hash": "299b420ad02db6b25319293cf9ed35a4", "timestamp": "", "source": "github", "line_count": 460, "max_line_length": 248, "avg_line_length": 36.04347826086956, "alnum_prop": 0.6881182147165259, "repo_name": "okland/angular-meteor", "id": "d2ea9db6a0361dc07e4ece50f33c94f48fe53628", "size": "16580", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": ".docs/angular-meteor/client/content/tutorials/angular1/steps/tutorial.step_20.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "9908" }, { "name": "Cucumber", "bytes": "301" }, { "name": "HTML", "bytes": "372004" }, { "name": "JavaScript", "bytes": "48950" }, { "name": "Ruby", "bytes": "1879" }, { "name": "Shell", "bytes": "1666" } ], "symlink_target": "" }
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.machinelearningservices.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. */ @Fluent public final class ResourceId { @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceId.class); /* * The ID of the resource */ @JsonProperty(value = "id", required = true) private String id; /** * Get the id property: The ID of the resource. * * @return the id value. */ public String id() { return this.id; } /** * Set the id property: The ID of the resource. * * @param id the id value to set. * @return the ResourceId object itself. */ public ResourceId withId(String id) { this.id = id; return this; } /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (id() == null) { throw logger .logExceptionAsError(new IllegalArgumentException("Missing required property id in model ResourceId")); } } }
{ "content_hash": "dccb60148934e2c969c6c0beb3c6fb36", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 119, "avg_line_length": 28.296296296296298, "alnum_prop": 0.6524869109947644, "repo_name": "Azure/azure-sdk-for-java", "id": "962c5540dfb635f9f3ccbec5d1aca23ffbf37f4a", "size": "1528", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "sdk/machinelearningservices/azure-resourcemanager-machinelearningservices/src/main/java/com/azure/resourcemanager/machinelearningservices/models/ResourceId.java", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "8762" }, { "name": "Bicep", "bytes": "15055" }, { "name": "CSS", "bytes": "7676" }, { "name": "Dockerfile", "bytes": "2028" }, { "name": "Groovy", "bytes": "3237482" }, { "name": "HTML", "bytes": "42090" }, { "name": "Java", "bytes": "432409546" }, { "name": "JavaScript", "bytes": "36557" }, { "name": "Jupyter Notebook", "bytes": "95868" }, { "name": "PowerShell", "bytes": "737517" }, { "name": "Python", "bytes": "240542" }, { "name": "Scala", "bytes": "1143898" }, { "name": "Shell", "bytes": "18488" }, { "name": "XSLT", "bytes": "755" } ], "symlink_target": "" }
package com.github.dozermapper.core.functional_tests.support; import com.github.dozermapper.core.CustomConverter; import com.github.dozermapper.core.vo.HintedOnly; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class HintedOnlyConverter implements CustomConverter { private static final Logger log = LoggerFactory.getLogger(HintedOnlyConverter.class); public Object convert(Object destination, Object source, Class<?> destClass, Class<?> sourceClass) { log.debug("Source Class is:" + sourceClass.getName()); log.debug("Dest Class is:" + destClass.getName()); if (source != null) { log.debug("Source Obj is:" + source.getClass().getName()); } if (destination != null) { log.debug("Dest Obj is:" + destination.getClass().getName()); } if (source instanceof HintedOnly) { return ((HintedOnly)source).getStr(); } HintedOnly hint; if (destination == null) { hint = new HintedOnly(); } else { hint = (HintedOnly)destination; } hint.setStr((String)source); return hint; } }
{ "content_hash": "7fa98d33fabb86e7d7502f29ddbdc671", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 104, "avg_line_length": 32.638888888888886, "alnum_prop": 0.6331914893617021, "repo_name": "DozerMapper/dozer", "id": "7812a315e318fc239cad8fbb5695564e4c448118", "size": "1777", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "core/src/test/java/com/github/dozermapper/core/functional_tests/support/HintedOnlyConverter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2319084" }, { "name": "Shell", "bytes": "1703" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Coenogonium deplanatum Kremp. ### Remarks null
{ "content_hash": "c86817a42e83b6a97a242c44e57669e4", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 29, "avg_line_length": 10.307692307692308, "alnum_prop": 0.7164179104477612, "repo_name": "mdoering/backbone", "id": "ce91bf7b579a941331a3f72160b91a0665ea95af", "size": "187", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Lecanoromycetes/Ostropales/Coenogoniaceae/Coenogonium/Coenogonium deplanatum/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package org.connectbot; import java.util.List; import org.connectbot.bean.HostBean; import org.connectbot.bean.PortForwardBean; import org.connectbot.service.TerminalBridge; import org.connectbot.service.TerminalManager; import org.connectbot.util.HostDatabase; import android.app.AlertDialog; import android.app.ListActivity; import android.content.ComponentName; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.ServiceConnection; import android.content.res.Resources; import android.database.SQLException; import android.graphics.Paint; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.util.Log; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.view.MenuItem.OnMenuItemClickListener; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; import android.widget.ListView; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import android.widget.AdapterView.OnItemClickListener; import android.widget.AdapterView.OnItemSelectedListener; /** * List all portForwards for a particular host and provide a way for users to add more portForwards, * edit existing portForwards, and delete portForwards. * * @author Kenny Root */ public class PortForwardListActivity extends ListActivity { public final static String TAG = "CB.PortForwardListAct"; private static final int LISTENER_CYCLE_TIME = 500; protected HostDatabase hostdb; private List<PortForwardBean> portForwards; private ServiceConnection connection = null; protected TerminalBridge hostBridge = null; protected LayoutInflater inflater = null; private HostBean host; @Override public void onStart() { super.onStart(); this.bindService(new Intent(this, TerminalManager.class), connection, Context.BIND_AUTO_CREATE); hostdb = HostDatabase.get(this); } @Override public void onStop() { super.onStop(); this.unbindService(connection); hostdb = null; } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); long hostId = this.getIntent().getLongExtra(Intent.EXTRA_TITLE, -1); setContentView(R.layout.act_portforwardlist); // connect with hosts database and populate list this.hostdb = HostDatabase.get(this); host = hostdb.findHostById(hostId); { final String nickname = host != null ? host.getNickname() : null; final Resources resources = getResources(); if (nickname != null) { this.setTitle(String.format("%s (%s)", resources.getText(R.string.title_port_forwards_list), nickname)); } } connection = new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder service) { TerminalManager bound = ((TerminalManager.TerminalBinder) service).getService(); hostBridge = bound.getConnectedBridge(host); updateHandler.sendEmptyMessage(-1); } public void onServiceDisconnected(ComponentName name) { hostBridge = null; } }; this.updateList(); this.registerForContextMenu(this.getListView()); this.getListView().setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> adapter, View view, int position, long id) { ListView lv = PortForwardListActivity.this.getListView(); PortForwardBean pfb = (PortForwardBean) lv.getItemAtPosition(position); if (hostBridge != null) { if (pfb.isEnabled()) hostBridge.disablePortForward(pfb); else { if (!hostBridge.enablePortForward(pfb)) Toast.makeText(PortForwardListActivity.this, getString(R.string.portforward_problem), Toast.LENGTH_LONG).show(); } updateHandler.sendEmptyMessage(-1); } } }); this.inflater = LayoutInflater.from(this); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuItem add = menu.add(R.string.portforward_menu_add); add.setIcon(android.R.drawable.ic_menu_add); add.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { // build dialog to prompt user about updating final View portForwardView = inflater.inflate(R.layout.dia_portforward, null, false); final EditText destEdit = (EditText) portForwardView.findViewById(R.id.portforward_destination); final Spinner typeSpinner = (Spinner) portForwardView.findViewById(R.id.portforward_type); typeSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> value, View view, int position, long id) { destEdit.setEnabled(position != 2); } public void onNothingSelected(AdapterView<?> arg0) { } }); new AlertDialog.Builder(PortForwardListActivity.this) .setView(portForwardView) .setPositiveButton(R.string.portforward_pos, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { try { final EditText nicknameEdit = (EditText) portForwardView.findViewById(R.id.nickname); final EditText sourcePortEdit = (EditText) portForwardView.findViewById(R.id.portforward_source); String type = HostDatabase.PORTFORWARD_LOCAL; switch (typeSpinner.getSelectedItemPosition()) { case 0: type = HostDatabase.PORTFORWARD_LOCAL; break; case 1: type = HostDatabase.PORTFORWARD_REMOTE; break; case 2: type = HostDatabase.PORTFORWARD_DYNAMIC5; break; } PortForwardBean pfb = new PortForwardBean( host != null ? host.getId() : -1, nicknameEdit.getText().toString(), type, sourcePortEdit.getText().toString(), destEdit.getText().toString()); if (hostBridge != null) { hostBridge.addPortForward(pfb); hostBridge.enablePortForward(pfb); } if (host != null && !hostdb.savePortForward(pfb)) { throw new SQLException("Could not save port forward"); } updateHandler.sendEmptyMessage(-1); } catch (Exception e) { Log.e(TAG, "Could not update port forward", e); // TODO Show failure dialog. } } }) .setNegativeButton(R.string.delete_neg, null).create().show(); return true; } }); return true; } @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) { // Create menu to handle deleting and editing port forward AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo; final PortForwardBean pfb = (PortForwardBean) this.getListView().getItemAtPosition(info.position); menu.setHeaderTitle(pfb.getNickname()); MenuItem edit = menu.add(R.string.portforward_edit); edit.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { final View editTunnelView = inflater.inflate(R.layout.dia_portforward, null, false); final Spinner typeSpinner = (Spinner) editTunnelView.findViewById(R.id.portforward_type); if (HostDatabase.PORTFORWARD_LOCAL.equals(pfb.getType())) typeSpinner.setSelection(0); else if (HostDatabase.PORTFORWARD_REMOTE.equals(pfb.getType())) typeSpinner.setSelection(1); else typeSpinner.setSelection(2); final EditText nicknameEdit = (EditText) editTunnelView.findViewById(R.id.nickname); nicknameEdit.setText(pfb.getNickname()); final EditText sourcePortEdit = (EditText) editTunnelView.findViewById(R.id.portforward_source); sourcePortEdit.setText(String.valueOf(pfb.getSourcePort())); final EditText destEdit = (EditText) editTunnelView.findViewById(R.id.portforward_destination); if (HostDatabase.PORTFORWARD_DYNAMIC5.equals(pfb.getType())) { destEdit.setEnabled(false); } else { destEdit.setText(String.format("%s:%d", pfb.getDestAddr(), pfb.getDestPort())); } typeSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> value, View view, int position, long id) { destEdit.setEnabled(position != 2); } public void onNothingSelected(AdapterView<?> arg0) { } }); new AlertDialog.Builder(PortForwardListActivity.this) .setView(editTunnelView) .setPositiveButton(R.string.button_change, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { try { if (hostBridge != null) hostBridge.disablePortForward(pfb); pfb.setNickname(nicknameEdit.getText().toString()); switch (typeSpinner.getSelectedItemPosition()) { case 0: pfb.setType(HostDatabase.PORTFORWARD_LOCAL); break; case 1: pfb.setType(HostDatabase.PORTFORWARD_REMOTE); break; case 2: pfb.setType(HostDatabase.PORTFORWARD_DYNAMIC5); break; } pfb.setSourcePort(Integer.parseInt(sourcePortEdit.getText().toString())); pfb.setDest(destEdit.getText().toString()); // Use the new settings for the existing connection. if (hostBridge != null) updateHandler.postDelayed(new Runnable() { public void run() { hostBridge.enablePortForward(pfb); updateHandler.sendEmptyMessage(-1); } }, LISTENER_CYCLE_TIME); if (!hostdb.savePortForward(pfb)) { throw new SQLException("Could not save port forward"); } updateHandler.sendEmptyMessage(-1); } catch (Exception e) { Log.e(TAG, "Could not update port forward", e); // TODO Show failure dialog. } } }) .setNegativeButton(android.R.string.cancel, null).create().show(); return true; } }); MenuItem delete = menu.add(R.string.portforward_delete); delete.setOnMenuItemClickListener(new OnMenuItemClickListener() { public boolean onMenuItemClick(MenuItem item) { // prompt user to make sure they really want this new AlertDialog.Builder(PortForwardListActivity.this) .setMessage(getString(R.string.delete_message, pfb.getNickname())) .setPositiveButton(R.string.delete_pos, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { try { // Delete the port forward from the host if needed. if (hostBridge != null) hostBridge.removePortForward(pfb); hostdb.deletePortForward(pfb); } catch (Exception e) { Log.e(TAG, "Could not delete port forward", e); } updateHandler.sendEmptyMessage(-1); } }) .setNegativeButton(R.string.delete_neg, null).create().show(); return true; } }); } protected Handler updateHandler = new Handler() { @Override public void handleMessage(Message msg) { PortForwardListActivity.this.updateList(); } }; protected void updateList() { if (hostBridge != null) { this.portForwards = hostBridge.getPortForwards(); } else { if (this.hostdb == null) return; this.portForwards = this.hostdb.getPortForwardsForHost(host); } PortForwardAdapter adapter = new PortForwardAdapter(this, portForwards); this.setListAdapter(adapter); } class PortForwardAdapter extends ArrayAdapter<PortForwardBean> { class ViewHolder { public TextView nickname; public TextView caption; } private List<PortForwardBean> portForwards; public PortForwardAdapter(Context context, List<PortForwardBean> portForwards) { super(context, R.layout.item_portforward, portForwards); this.portForwards = portForwards; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = inflater.inflate(R.layout.item_portforward, null, false); holder = new ViewHolder(); holder.nickname = (TextView) convertView.findViewById(android.R.id.text1); holder.caption = (TextView) convertView.findViewById(android.R.id.text2); convertView.setTag(holder); } else holder = (ViewHolder) convertView.getTag(); PortForwardBean pfb = portForwards.get(position); holder.nickname.setText(pfb.getNickname()); holder.caption.setText(pfb.getDescription()); if (hostBridge != null && !pfb.isEnabled()) { holder.nickname.setPaintFlags(holder.nickname.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); holder.caption.setPaintFlags(holder.caption.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG); } return convertView; } } }
{ "content_hash": "60533732d23a82807b8a2248908ce991", "timestamp": "", "source": "github", "line_count": 403, "max_line_length": 119, "avg_line_length": 31.863523573200993, "alnum_prop": 0.7106144381278716, "repo_name": "ipmobiletech/connectbot", "id": "868c61168c89c12fedb2fa09d03d01dfd841935f", "size": "13519", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/org/connectbot/PortForwardListActivity.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "5483" }, { "name": "HTML", "bytes": "1531" }, { "name": "Java", "bytes": "741159" }, { "name": "Shell", "bytes": "1433" } ], "symlink_target": "" }
package com.h2byte.h2icons.launchers; import android.content.Context; import android.content.Intent; public class InspireLauncher { public InspireLauncher(Context context) { Intent inspireMain = context.getPackageManager().getLaunchIntentForPackage("com.bam.android.inspirelauncher"); Intent inspire = new Intent("com.bam.android.inspirelauncher.action.ACTION_SET_THEME"); inspire.putExtra("icon_pack_name", context.getPackageName()); context.sendBroadcast(inspire); context.startActivity(inspireMain); } }
{ "content_hash": "567eef110ecf91f0b8e32106121f421f", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 118, "avg_line_length": 39.785714285714285, "alnum_prop": 0.7468581687612208, "repo_name": "A-Unique-Pig/H2Icons", "id": "732efe493b2f197ad8d627b532c937050f1d4770", "size": "557", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/h2byte/h2icons/launchers/InspireLauncher.java", "mode": "33261", "license": "mit", "language": [ { "name": "Java", "bytes": "90360" } ], "symlink_target": "" }
package hellTests; import java.util.Arrays; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; import hell.entities.miscellaneous.HeroInventory; import hell.interfaces.Inventory; import hell.interfaces.Item; import hell.interfaces.Recipe; public class HeroInvetoryTests { private final static int ZERO = 0; private final static int TWO_BIL = 2000000000; private final static long FOUR_BIL = 4000000000L; private Inventory inventory; private Item item1; private Item item2; private Item item3; private Item item4; private Item item5; private Recipe recipe1; private Recipe recipe2; @Before public void initialization() { this.inventory = new HeroInventory(); this.item1 = Mockito.mock(Item.class); this.item2 = Mockito.mock(Item.class); this.item3 = Mockito.mock(Item.class); this.item4 = Mockito.mock(Item.class); this.item5 = Mockito.mock(Item.class); this.recipe1 = Mockito.mock(Recipe.class); this.recipe2 = Mockito.mock(Recipe.class); Mockito.when(item1.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(item2.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(item3.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(item4.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(item5.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(recipe1.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(recipe2.getDamageBonus()).thenReturn(TWO_BIL); Mockito.when(item1.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(item2.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(item3.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(item4.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(item5.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(recipe1.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(recipe2.getAgilityBonus()).thenReturn(TWO_BIL); Mockito.when(item1.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(item2.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(item3.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(item4.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(item5.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(recipe1.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(recipe2.getHitPointsBonus()).thenReturn(TWO_BIL); Mockito.when(item1.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(item2.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(item3.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(item4.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(item5.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(recipe1.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(recipe2.getIntelligenceBonus()).thenReturn(TWO_BIL); Mockito.when(item1.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(item2.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(item3.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(item4.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(item5.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(recipe1.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(recipe2.getStrengthBonus()).thenReturn(TWO_BIL); Mockito.when(item1.getName()).thenReturn("one"); Mockito.when(item2.getName()).thenReturn("two"); Mockito.when(item3.getName()).thenReturn("three"); Mockito.when(item4.getName()).thenReturn("four"); Mockito.when(item5.getName()).thenReturn("five"); Mockito.when(recipe1.getName()).thenReturn("six"); Mockito.when(recipe2.getName()).thenReturn("seven"); Mockito.when(recipe1.getRequiredItems()).thenReturn(Arrays.asList("one", "two")); Mockito.when(recipe2.getRequiredItems()).thenReturn(Arrays.asList("one", "two")); } @Test public void addAndCountTotalsByCommonItem() { this.inventory.addCommonItem(item1); this.inventory.addCommonItem(item2); Assert.assertEquals(FOUR_BIL, this.inventory.getTotalDamageBonus()); Assert.assertEquals(FOUR_BIL, this.inventory.getTotalAgilityBonus()); Assert.assertEquals(FOUR_BIL, this.inventory.getTotalHitPointsBonus()); Assert.assertEquals(FOUR_BIL, this.inventory.getTotalIntelligenceBonus()); Assert.assertEquals(FOUR_BIL, this.inventory.getTotalStrengthBonus()); } @Test public void addAndCountTotalsByRecipeItem() { this.inventory.addCommonItem(item1); this.inventory.addCommonItem(item2); this.inventory.addRecipeItem(recipe1); Assert.assertEquals(TWO_BIL, this.inventory.getTotalDamageBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalAgilityBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalHitPointsBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalIntelligenceBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalStrengthBonus()); } @Test public void addAndCountTotalsByCollectingItemsForRecipeItem() { this.inventory.addRecipeItem(recipe1); this.inventory.addCommonItem(item1); this.inventory.addCommonItem(item2); Assert.assertEquals(TWO_BIL, this.inventory.getTotalDamageBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalAgilityBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalHitPointsBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalIntelligenceBonus()); Assert.assertEquals(TWO_BIL, this.inventory.getTotalStrengthBonus()); } @Test public void addOnlyRecipeItem() { this.inventory.addRecipeItem(recipe1); Assert.assertEquals(ZERO, this.inventory.getTotalDamageBonus()); Assert.assertEquals(ZERO, this.inventory.getTotalAgilityBonus()); Assert.assertEquals(ZERO, this.inventory.getTotalHitPointsBonus()); Assert.assertEquals(ZERO, this.inventory.getTotalIntelligenceBonus()); Assert.assertEquals(ZERO, this.inventory.getTotalStrengthBonus()); } }
{ "content_hash": "b8f092cf070ea1dd2302632c24fa531d", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 83, "avg_line_length": 44.35114503816794, "alnum_prop": 0.776592082616179, "repo_name": "akkirilov/SoftUniProject", "id": "b05626a310d6fbaae24e78c059b696c5f6ce5395", "size": "5810", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "07_OOP_Advanced/20_ExamPreparation/src/test/java/hellTests/HeroInvetoryTests.java", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "298" }, { "name": "C", "bytes": "8416" }, { "name": "C#", "bytes": "1141844" }, { "name": "C++", "bytes": "1358" }, { "name": "CSS", "bytes": "1604742" }, { "name": "HTML", "bytes": "485016" }, { "name": "Java", "bytes": "2027863" }, { "name": "JavaScript", "bytes": "833469" }, { "name": "PHP", "bytes": "9314" }, { "name": "TypeScript", "bytes": "58318" } ], "symlink_target": "" }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changelog for package nao_sensors ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 0.2.0 (2014-09-22) ------------------ * add the queue_size parameter to the Publisher Hence drop Groovy support * fix the catkin_package call * Merge pull request `#3 <https://github.com/ros-nao/nao_sensors/issues/3>`_ from dhood/master Rename nao_camera to nao_sensors in header also * Rename nao_camera to nao_sensors * Contributors: CHILI Demo Corner, Séverin Lemaignan, Vincent Rabaud 0.1.3 (2014-08-21) ------------------ * install the sensor scripts in the local bin * Contributors: Vincent Rabaud 0.1.2 (2014-08-21) ------------------ * fix a compile bug on Groovy absolute path is not specified in the Findoctomap.cmake * Contributors: Vincent Rabaud 0.1.0 (2014-08-19) ------------------ * comply to the new NaoNode API * lowered getData frequency * correct path for ros_sonar.py * Export ros_sonar into python package The upper class ros_sonar.py can now be imported via 'import nao_sensors.ros_sonar' * use the newer API when possible * use the new NaoNode API * comply to the newer NaoNode API * added sonar publisher ros_sonar.py as common publisher for any sonar. reusable for different robots nao_sonar.py instantiats the correct sonar for nao * rename the package from nao_camera to nao_sensors * add octomap support * add a dependency on nao_driver for the Python code * Dependency on camera_info_manager_py for the python node * do not poll the image if nobody is subscribed * comply to REP008 * add support for 3d camera in Python * make the camera dynamically reconfigurable in Python * move the nao_camera.py script from nao_driver * remove useless rosbuild artefact * Nodelet support for Nao cameras Again, closely build upon camera1394 ROS driver * Make sure we never publish more than the actual camera framerate * Added sample calibration files for Nao cameras OpenCV Calibration for top and bottom cameras, at 160x120, 320x240 and 640x480. The actual calibration needs to be redone for each Nao, but this should be a fair starting point. * Cosmetic refactoring * Remove useless mutex * Only publish frames when someone is listening on the topic This saves a lot of CPU on Nao when images are not needed. * No easy way to go 'local' From a performance point of view, it would be very beneficial to be a NAOqi 'local module' to access the video buffer. It remains to be seen if we can write a ROS nodes that also happen to be a NAOqi local module (that would allow much better performances for the camera node). * Support only RGB8 colorspace If BGR is useful to someone, we can re-introduce it. For now, keep things simple. * Use the Nao TF frames + generate unique calibration files Make sure we generate calibration files different for each resolution/camera * Added support for dynamic reconfiguration of all Nao v4 camera params Only reconfiguration of FPS, resolution, and source requires restart of the driver. Also, correctly unsubscribe/release from the video proxy. * Initial working version This first version supports publishing images from the top camera on Nao. No configurability yet. The nodelet code has been kept, but it is not used/enabled at compilation yet. * Contributors: Armin Hornung, Karsten Knese, Séverin Lemaignan, Vincent Rabaud
{ "content_hash": "ffc208db1cc08a7b1de3bcc3a771e4ab", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 94, "avg_line_length": 41.27160493827161, "alnum_prop": 0.7418486389470536, "repo_name": "k-okada/naoqi_bridge", "id": "cdec070f89160a67d5d09b437918caa7e26b7910", "size": "3345", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "naoqi_sensors/CHANGELOG.rst", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
""" pyboard interface This module provides the Pyboard class, used to communicate with and control the pyboard over a serial USB connection. Example usage: 1. first import this file with: import pyboard 2. Then create a conection: in case of a serial port: pyb = pyboard.Pyboard('/dev/ttyACM0') or in Windows: pyb = pyboard.Pyboard('COM2') For telnet connections: pyb = pyboard.Pyboard('192.168.1.1') Or even (if the name is defined in the DNS or the 'hosts' file: pyb = pyboard.Pyboard('mypyboard') You can also include a custom port number: pyb = pyboard.Pyboard('mypyboard:2323') Then: pyb.enter_raw_repl() pyb.exec('pyb.LED(1).on()') pyb.exit_raw_repl() Note: if using Python2 then pyb.exec must be written as pyb.exec_. To run a script from the local machine on the board and print out the results: import pyboard pyboard.execfile('test.py', device='/dev/ttyACM0') This script can also be run directly. To execute a local script, use: ./pyboard.py test.py Or: python pyboard.py test.py """ import sys import time import os import stat from threading import Thread try: stdout = sys.stdout.buffer except AttributeError: # Python2 doesn't have buffer attr stdout = sys.stdout def stdout_write_bytes(b): b = b.replace(b"\x04", b"") stdout.write(b) stdout.flush() def separate_address_port(string): import re match = re.match(r'([\w.]+)$|([\w.]+):(\d+)$', string) if match is None: raise PyboardError('\nInvalid address') address = match.group(1) port = 23 if address == None: address = match.group(2) port = int(match.group(3)) return address, port class PyboardError(Exception): pass def to_bytes(s): if type(s) == bytes: return s try: return bytes(s) except: return bytes(s, 'utf8') class Periodic: def __init__(self, period, callback): self.thread = Thread(target=self.on_timer, args=(period, callback)) self.run = True self.thread.start() def __del__(self): self.stop() def stop(self): self.run = False def on_timer(self, period, callback): while self.run == True: time.sleep(period) callback() class Serial_connection: def __init__(self, device, baudrate=115200, connection_timeout=10): import serial delayed = False self.connected = False for attempt in range(connection_timeout + 1): try: try: self.stream = serial.Serial(device, baudrate=baudrate, interCharTimeout=1) self.__in_waiting = self.stream.inWaiting self.reset_input_buffer = self.stream.flushInput except (TypeError): # version 3 of the pyserial library changed everything self.stream = serial.Serial(device, baudrate=baudrate, inter_byte_timeout=1) self.__in_waiting = lambda: self.stream.in_waiting self.reset_input_buffer = self.stream.reset_input_buffer self.__expose_stream_methods() self.connected = True if attempt != 0: print('') # to break the dotted line printed on retries break except (OSError, IOError): # Py2 and Py3 have different errors if connection_timeout == 0: continue if attempt == 0 and connection_timeout != 0: sys.stdout.write('Waiting {} seconds for pyboard '.format(connection_timeout)) time.sleep(1) sys.stdout.write('.') sys.stdout.flush() def authenticate(self, user, password): # needs no authentication return True def keep_alive(self): return True def settimeout(self, value): self.stream.timeout = value def gettimeout(self): return self.stream.timeout def __expose_stream_methods(self): self.close = self.stream.close self.write = self.stream.write self.flush = self.stream.flush self.read = self.stream.read def read_until(self, ending, timeout): ''' implement a telnetlib-like read_until ''' current_timeout = self.stream.timeout self.stream.timeout = 0.1 timeout_count = 0 data = bytearray() while True: if data.endswith(ending): break new_data = self.stream.read(1) data.extend(new_data) if new_data == '': timeout_count += 1 if timeout_count >= 10 * timeout: break self.stream.timeout = current_timeout return data def read_eager(self): ''' implement a telnetlib-like read_eager ''' waiting = self.__in_waiting() if waiting == 0: return '' return self.stream.read(waiting) def read_some(self): ''' implement a telnetlib-like read_some ''' waiting = self.__in_waiting() if waiting != 0: return self.stream.read(waiting) else: return self.stream.read(1) @staticmethod def is_serial_port(name): return name[:3] == 'COM' or (os.path.exists(name) == True and \ stat.S_ISCHR(os.stat(name).st_mode) == True) def enable_binary(self): pass def disable_binary(self): pass def read_with_timeout(self, length, timeout): buf = b'' original_timeout = self.gettimeout() self.settimeout(timeout) buf = self.stream.read(length) self.settimeout(original_timeout) return buf class Telnet_connection: import telnetlib import socket def __init__(self, uri, connection_timeout=15, read_timeout=10): self.__read_timeout = read_timeout self.connected = False self.__pending_AYT_RESP = False try: address, port = separate_address_port(uri) self.stream = Telnet_connection.telnetlib.Telnet(address, port, timeout=connection_timeout) self.__socket = self.stream.get_socket() self.__socket.setsockopt(Telnet_connection.socket.IPPROTO_TCP, Telnet_connection.socket.TCP_NODELAY, 1) self.stream.set_option_negotiation_callback(self.__process_options) self.connected = True self.__expose_stream_methods() except Telnet_connection.socket.error: pass def settimeout(self, value): self.__socket.settimeout(value) def gettimeout(self): return self.__socket.gettimeout() def _wait_for_exact_text(self, remote_text): remote_text = to_bytes(remote_text) return remote_text in self.stream.read_until(remote_text, self.__read_timeout) def _wait_for_multiple_exact_text(self, remote_options): for i in range(0, len(remote_options)): remote_options[i] = to_bytes(remote_options[i]) return self.stream.expect(remote_options, self.__read_timeout)[0] def _wait_and_respond(self, remote_text, response, delay_before=0): response = to_bytes(response) if self._wait_for_exact_text(remote_text) == True: if delay_before != 0: time.sleep(delay_before) self.stream.write(response + b'\r\n') return True else: return False def authenticate(self, user, password): if self._wait_and_respond(b'Login as:', user) == True and \ self._wait_and_respond(b'Password:', password, 0.2) == True: status = self._wait_for_multiple_exact_text([ 'Type "help\(\)" for more information.', 'Invalid credentials, try again.']) if status == 0: return True elif status == 1: raise PyboardError('Invalid credentials') return False def close(self): self.__socket.shutdown(Telnet_connection.socket.SHUT_RDWR) self.stream.close() def write(self, data): self.stream.write(data) return len(data) def __process_options(self, telnet_socket, command, option): if command == Telnet_connection.telnetlib.AYT: self.__pending_AYT_RESP = False def keep_alive(self): if self.__pending_AYT_RESP == True: return False else: self.__socket.sendall(Telnet_connection.telnetlib.IAC + Telnet_connection.telnetlib.AYT) self.__pending_AYT_RESP = True return True def __expose_stream_methods(self): self.read_until = self.stream.read_until self.read_eager = self.stream.read_eager self.read_some = self.stream.read_some def __set_mode(self, mode_char): self.__socket.sendall(Telnet_connection.telnetlib.IAC + mode_char + Telnet_connection.telnetlib.BINARY) def enable_binary(self): self.__set_mode(Telnet_connection.telnetlib.WILL) self.__set_mode(Telnet_connection.telnetlib.DO) def disable_binary(self): self.__set_mode(Telnet_connection.telnetlib.WONT) self.__set_mode(Telnet_connection.telnetlib.DONT) def flush(self): pass class Socket_connection: import socket def __init__(self, host): self.connected = False try: self.stream = Socket_connection.socket.socket(Socket_connection.socket.AF_INET, Socket_connection.socket.SOCK_STREAM) self.stream.connect(separate_address_port(host)) self.__expose_stream_methods() self.connected = True except Socket_connection.socket.error: pass def __expose_stream_methods(self): self.write = self.stream.send def close(self): self.stream.shutdown(Socket_connection.socket.SHUT_RDWR) self.stream.close() def settimeout(self, value): self.stream.settimeout(value) def gettimeout(self): return self.stream.gettimeout() def keep_alive(self): return True def authenticate(self, user, password): # needs no authentication return True def read(self, length): buf = b'' while length > 0: new_data = self.stream.recv(length % 4096) #todo: properly manage disconnections buf += new_data length -= len(new_data) return buf def read_with_timeout(self, length, timeout): buf = b'' original_timeout = self.gettimeout() self.settimeout(timeout) buf = self.stream.recv(length) self.settimeout(original_timeout) return buf class Pyboard: LOST_CONNECTION = 1 def __init__(self, device, baudrate=115200, user='micro', password='python', connection_timeout=0, keep_alive=0): self.__device = None self._connect(device, baudrate, user, password, connection_timeout, keep_alive, False) def close_dont_notify(self): if self.connected == False: return try: self.keep_alive_interval.stop() self.connected = False self.connection.close() except: # the connection might not exist, so ignore this one pass def close(self): if self.connected == False: return self.close_dont_notify() try: self.__disconnected_callback() except: pass def get_connection_type(self): return self.__connectionType def get_username_password(self): return (self.__username, self.__password) def set_disconnected_callback(self, callback): self.__disconnected_callback = callback def flush(self): # flush input (without relying on serial.flushInput()) while self.connection.read_eager(): pass def _connect(self, device, baudrate=115200, user='micro', password='python', connection_timeout=0, keep_alive=0, raw=False): self.connected = False if self.__device == None: self.__device = device self.__baudrate = baudrate self.__username = user self.__password = password self.__connection_timeout = connection_timeout if Serial_connection.is_serial_port(self.__device) == True: self.__connectionType = 'serial' self.connection = Serial_connection(self.__device, baudrate=self.__baudrate, connection_timeout=self.__connection_timeout) else: if raw == False: self.__connectionType = 'telnet' self.connection = Telnet_connection(self.__device, connection_timeout=self.__connection_timeout) else: self.__connectionType = 'socket' self.connection = Socket_connection(self.__device) if self.connection.connected == False: raise PyboardError('\nFailed to establish a connection with the board at: ' + self.__device) if self.connection.authenticate(self.__username, self.__password) == False: raise PyboardError('\nFailed to authenticate with the board at: ' + self.__device) if keep_alive != 0: self.keep_alive_interval = Periodic(keep_alive, self._keep_alive) self.connected = True def _keep_alive(self): if self.connected == False: return try: if self.connection.keep_alive() == False: self.__disconnected_callback(Pyboard.LOST_CONNECTION) except: self.__disconnected_callback(Pyboard.LOST_CONNECTION) def check_connection(self): self._keep_alive() return self.connected def read_until(self, ending, timeout=10, data_consumer=None): if data_consumer == None: data = self.connection.read_until(ending, timeout) else: data = bytearray() cycles = int(timeout / 0.1) for i in range(1, cycles): new_data = self.connection.read_until(ending, 0.1) data.extend(new_data) data_consumer(new_data) if new_data.endswith(ending): break return data def enter_raw_repl(self): self.enter_raw_repl_no_reset() self.flush() self.connection.write(b'\x04') # ctrl-D: soft reset data = self.read_until(b'soft reboot\r\n') if not data.endswith(b'soft reboot\r\n'): print(data) raise PyboardError('could not enter raw repl') # By splitting this into 2 reads, it allows boot.py to print stuff, # which will show up after the soft reboot and before the raw REPL. data = self.read_until(b'raw REPL; CTRL-B to exit\r\n') if not data.endswith(b'raw REPL; CTRL-B to exit\r\n'): print(data) raise PyboardError('could not enter raw repl') def enter_raw_repl_no_reset(self): self.connection.write(b'\r\x03\x03') # ctrl-C twice: interrupt any running program self.flush() self.connection.write(b'\r\x01') # ctrl-A: enter raw REPL data = self.read_until(b'raw REPL; CTRL-B to exit\r\n') if not data.endswith(b'raw REPL; CTRL-B to exit\r\n'): print(data) raise PyboardError('could not enter raw repl') def exit_raw_repl(self): self.connection.write(b'\r\x02') # ctrl-B: enter friendly REPL def follow(self, timeout, data_consumer=None): # wait for normal output data = self.read_until(b'\x04', timeout=timeout, data_consumer=data_consumer) if not data.endswith(b'\x04'): raise PyboardError('timeout waiting for first EOF reception') data = data[:-1] # wait for error output data_err = self.read_until(b'\x04', timeout=timeout) if not data_err.endswith(b'\x04'): raise PyboardError('timeout waiting for second EOF reception') data_err = data_err[:-1] # return normal and error output return data, data_err def send(self, data): data = to_bytes(data) try: self.connection.write(data) except: self.close() def recv(self, callback): import socket self.want_exit_recv = False while 1: try: data = self.connection.read_some() if data and self.want_exit_recv == False: callback(data) else: break except socket.timeout: continue except: break if self.want_exit_recv == False: self.close() def exit_recv(self): self.want_exit_recv = True self.send("\x03") # Ctrl-C def _wait_for_exact_text(self, remote_text): remote_text = to_bytes(remote_text) return remote_text in self.read_until(remote_text) def reset(self): self.exit_raw_repl() if not self._wait_for_exact_text(b'Type "help()" for more information.\r\n'): raise PyboardError('could not enter reset') self.connection.write(b'\x04') if not self._wait_for_exact_text(b'PYB: soft reboot\r\n'): raise PyboardError('could not enter reset') def exec_raw_no_follow(self, command): command_bytes = to_bytes(command) # check we have a prompt data = self.read_until(b'>') if not data.endswith(b'>'): raise PyboardError('could not enter raw repl') # write command for i in range(0, len(command_bytes), 256): self.connection.write(command_bytes[i:min(i + 256, len(command_bytes))]) self.connection.flush() self.connection.write(b'\x04') # check if we could exec command data = self.read_until(b'OK') if data != b'OK': raise PyboardError('could not exec command') def exec_raw(self, command, timeout=10, data_consumer=None): self.exec_raw_no_follow(command); return self.follow(timeout, data_consumer) def eval(self, expression): ret = self.exec_('print({})'.format(expression)) ret = ret.strip() return ret def exec_(self, command): ret, ret_err = self.exec_raw(command) if ret_err: raise PyboardError('exception', ret, ret_err) return ret def execfile(self, filename): with open(filename, 'rb') as f: pyfile = f.read() return self.exec_(pyfile) def get_time(self): t = str(self.eval('pyb.RTC().datetime()'), encoding='utf8')[1:-1].split(', ') return int(t[4]) * 3600 + int(t[5]) * 60 + int(t[6]) # in Python2 exec is a keyword so one must use "exec_" # but for Python3 we want to provide the nicer version "exec" setattr(Pyboard, "exec", Pyboard.exec_) def execfile(filename, device='/dev/ttyACM0', baudrate=115200, user='micro', password='python'): pyb = Pyboard(device, baudrate, user, password) pyb.enter_raw_repl() output = pyb.execfile(filename) stdout_write_bytes(output) pyb.exit_raw_repl() pyb.close() def main(): import argparse cmd_parser = argparse.ArgumentParser(description='Run scripts on the pyboard.') cmd_parser.add_argument('--device', default='/dev/ttyACM0', help='the serial device or the IP address of the pyboard') cmd_parser.add_argument('-b', '--baudrate', default=115200, help='the baud rate of the serial device') cmd_parser.add_argument('-u', '--user', default='micro', help='the telnet login username') cmd_parser.add_argument('-p', '--password', default='python', help='the telnet login password') cmd_parser.add_argument('-c', '--command', help='program passed in as string') cmd_parser.add_argument('-w', '--wait', default=0, type=int, help='seconds to wait for USB connected board to become available') cmd_parser.add_argument('--follow', action='store_true', help='follow the output after running the scripts [default if no scripts given]') cmd_parser.add_argument('files', nargs='*', help='input files') args = cmd_parser.parse_args() def execbuffer(buf): try: pyb = Pyboard(args.device, args.baudrate, args.user, args.password, args.wait) pyb.enter_raw_repl() ret, ret_err = pyb.exec_raw(buf, timeout=None, data_consumer=stdout_write_bytes) pyb.exit_raw_repl() pyb.close() except PyboardError as er: print(er) sys.exit(1) except KeyboardInterrupt: sys.exit(1) if ret_err: stdout_write_bytes(ret_err) sys.exit(1) if args.command is not None: execbuffer(to_bytes(args.command)) for filename in args.files: with open(filename, 'rb') as f: pyfile = f.read() execbuffer(pyfile) if args.follow or (args.command is None and len(args.files) == 0): try: pyb = Pyboard(args.device, args.baudrate, args.user, args.password, args.wait) ret, ret_err = pyb.follow(timeout=None, data_consumer=stdout_write_bytes) pyb.close() except PyboardError as er: print(er) sys.exit(1) except KeyboardInterrupt: sys.exit(1) if ret_err: stdout_write_bytes(ret_err) sys.exit(1) if __name__ == "__main__": main()
{ "content_hash": "b295e3269e711eaba7fa0d1e1aa86408", "timestamp": "", "source": "github", "line_count": 659, "max_line_length": 142, "avg_line_length": 32.96661608497724, "alnum_prop": 0.5901495972382048, "repo_name": "jmarcelino/pycom-micropython", "id": "3b836431d3ff37a134796b4140cecc63bf32606b", "size": "21748", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "esp32/tools/pyboard.py", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "55179" }, { "name": "C", "bytes": "30516070" }, { "name": "C++", "bytes": "876912" }, { "name": "HTML", "bytes": "84456" }, { "name": "Makefile", "bytes": "88984" }, { "name": "Objective-C", "bytes": "391937" }, { "name": "Python", "bytes": "770963" }, { "name": "Shell", "bytes": "5684" } ], "symlink_target": "" }
package scala.meta.trees import com.intellij.psi.PsiElement import org.jetbrains.annotations.Nls import scala.meta.ScalaMetaBundle class AbortException(@Nls reason: String) extends RuntimeException(reason) { def this(place: Any, @Nls mess: String) = this(mess + s"[$place]") } class UnimplementedException(what: Any) extends AbortException(what, ScalaMetaBundle.message("this.code.path.is.not.implemented.yet.head", Thread.currentThread().getStackTrace.drop(3).head)) class ScalaMetaException(@Nls message: String) extends Exception(message) class ScalaMetaResolveError(elem: PsiElement) extends ScalaMetaException(ScalaMetaBundle.message("cannot.resolve.class.at.element", elem.getClass, elem.toString)) class ScalaMetaTypeResultFailure(@Nls cause: String) extends ScalaMetaException(ScalaMetaBundle.message("cannot.calculate.type", cause)) package object error { def unreachable = throw new AbortException(ScalaMetaBundle.message("this.code.should.be.unreachable")) def unreachable(@Nls reason: String) = throw new AbortException(ScalaMetaBundle.message("this.code.should.be.unreachable.reason", reason)) def unresolved(@Nls cause: String) = throw new AbortException(ScalaMetaBundle.message("failed.to.typecheck", cause)) def die(@Nls reason: String = "unknown") = throw new AbortException(reason) }
{ "content_hash": "098f76862bf665acc45c5e3968c12a5a", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 162, "avg_line_length": 50.84615384615385, "alnum_prop": 0.7980332829046899, "repo_name": "JetBrains/intellij-scala", "id": "85701c9a027814ea6aa9643a73dad56be7416e81", "size": "1322", "binary": false, "copies": "1", "ref": "refs/heads/idea223.x", "path": "scala/scala-impl/src/scala/meta/trees/ScalaMetaException.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "106688" }, { "name": "Java", "bytes": "1165562" }, { "name": "Lex", "bytes": "45405" }, { "name": "Scala", "bytes": "18656869" } ], "symlink_target": "" }
package arez.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Target; /** * Marks a template method that returns the {@link arez.Component} instance for the component. * * <p>The method that is annotated with this annotation must also comply with the following constraints:</p> * <ul> * <li>Must not be annotated with any other arez annotation</li> * <li>Must be abstract</li> * <li>Must not throw any exceptions</li> * <li>Must return an instance of {@link arez.Component}.</li> * <li>Must be accessible to the class annotated by the {@link ArezComponent} annotation.</li> * <li> * Should not be public as not expected to be invoked outside the component. A warning will be generated but can * be suppressed by the {@link SuppressWarnings} or {@link SuppressArezWarnings} annotations with a key * "Arez:PublicRefMethod". This warning is also suppressed by the annotation processor if it is implementing * an interface method. * </li> * <li> * Should not be protected if in the class annotated with the {@link ArezComponent} annotation as the method is not * expected to be invoked outside the component. A warning will be generated but can be suppressed by the * {@link SuppressWarnings} or {@link SuppressArezWarnings} annotations with a key "Arez:ProtectedMethod". * </li> * </ul> */ @Documented @Target( ElementType.METHOD ) public @interface ComponentRef { }
{ "content_hash": "da0d95bab4c739fef4a37302e1929b52", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 117, "avg_line_length": 43.38235294117647, "alnum_prop": 0.7430508474576272, "repo_name": "realityforge/arez", "id": "32ef5872ecdde3a9a6959912715870504323f117", "size": "1475", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/src/main/java/arez/annotations/ComponentRef.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "3464" }, { "name": "Java", "bytes": "1657719" }, { "name": "Ruby", "bytes": "49661" } ], "symlink_target": "" }
#pragma checksum "C:\Users\alptu\Documents\Projects\Yapilcek\Yapilcek\Yapilcek.UWP\MainPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "8B00E294F22AB0B7856325D41BBF6AA5" //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Yapilcek.UWP { partial class MainPage : global::Xamarin.Forms.Platform.UWP.WindowsPage, global::Windows.UI.Xaml.Markup.IComponentConnector, global::Windows.UI.Xaml.Markup.IComponentConnector2 { /// <summary> /// Connect() /// </summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void Connect(int connectionId, object target) { this._contentLoaded = true; } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target) { global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null; return returnValue; } } }
{ "content_hash": "274759b1e5666b3cc44feed3c8967410", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 174, "avg_line_length": 43.108108108108105, "alnum_prop": 0.6119122257053291, "repo_name": "carpediem23/Yapilcek", "id": "6b047380698f7af1e29b594e5f2c479993657149", "size": "1597", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Yapilcek/Yapilcek.UWP/obj/x86/Debug/MainPage.g.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "70024" }, { "name": "Java", "bytes": "13947488" } ], "symlink_target": "" }
FOUNDATION_EXPORT double TLLayoutTransitioningVersionNumber; //! Project version string for TLLayoutTransitioning. FOUNDATION_EXPORT const unsigned char TLLayoutTransitioningVersionString[]; #import <TLLayoutTransitioning/TLTransitionLayout.h> #import <TLLayoutTransitioning/UICollectionView+TLTransitioning.h>
{ "content_hash": "eb45f47173babb428eca2ecf5ac9ef99", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 75, "avg_line_length": 35, "alnum_prop": 0.8634920634920635, "repo_name": "huangboju/Moots", "id": "4d71e678a74fa7f9a5753ba2fd4c21ad6caa71ce", "size": "555", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "UICollectionViewLayout/TLLayoutTransitioning-master/TLLayoutTransitioning/TLLayoutTransitioning.h", "mode": "33261", "license": "mit", "language": [ { "name": "C", "bytes": "531" }, { "name": "CSS", "bytes": "121899" }, { "name": "HTML", "bytes": "3039655" }, { "name": "JavaScript", "bytes": "144015" }, { "name": "Objective-C", "bytes": "289697" }, { "name": "Python", "bytes": "783" }, { "name": "Ruby", "bytes": "26081" }, { "name": "Shell", "bytes": "1094" }, { "name": "Swift", "bytes": "1997987" } ], "symlink_target": "" }
define(['exports', 'aurelia-metadata', 'aurelia-path'], function (exports, _aureliaMetadata, _aureliaPath) { 'use strict'; var _inherits = function (subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }; var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); exports.__esModule = true; var ViewStrategy = (function () { function ViewStrategy() { _classCallCheck(this, ViewStrategy); } ViewStrategy.prototype.makeRelativeTo = function makeRelativeTo(baseUrl) {}; ViewStrategy.normalize = function normalize(value) { if (typeof value === 'string') { value = new UseViewStrategy(value); } if (value && !(value instanceof ViewStrategy)) { throw new Error('The view must be a string or an instance of ViewStrategy.'); } return value; }; ViewStrategy.getDefault = function getDefault(target) { var strategy, annotation; if (typeof target !== 'function') { target = target.constructor; } annotation = _aureliaMetadata.Origin.get(target); strategy = _aureliaMetadata.Metadata.get(ViewStrategy.metadataKey, target); if (!strategy) { if (!annotation) { throw new Error('Cannot determinte default view strategy for object.', target); } strategy = new ConventionalViewStrategy(annotation.moduleId); } else if (annotation) { strategy.moduleId = annotation.moduleId; } return strategy; }; _createClass(ViewStrategy, null, [{ key: 'metadataKey', value: 'aurelia:view-strategy', enumerable: true }]); return ViewStrategy; })(); exports.ViewStrategy = ViewStrategy; var UseViewStrategy = (function (_ViewStrategy) { function UseViewStrategy(path) { _classCallCheck(this, UseViewStrategy); _ViewStrategy.call(this); this.path = path; } _inherits(UseViewStrategy, _ViewStrategy); UseViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, options) { if (!this.absolutePath && this.moduleId) { this.absolutePath = _aureliaPath.relativeToFile(this.path, this.moduleId); } return viewEngine.loadViewFactory(this.absolutePath || this.path, options, this.moduleId); }; UseViewStrategy.prototype.makeRelativeTo = function makeRelativeTo(file) { this.absolutePath = _aureliaPath.relativeToFile(this.path, file); }; return UseViewStrategy; })(ViewStrategy); exports.UseViewStrategy = UseViewStrategy; var ConventionalViewStrategy = (function (_ViewStrategy2) { function ConventionalViewStrategy(moduleId) { _classCallCheck(this, ConventionalViewStrategy); _ViewStrategy2.call(this); this.moduleId = moduleId; this.viewUrl = ConventionalViewStrategy.convertModuleIdToViewUrl(moduleId); } _inherits(ConventionalViewStrategy, _ViewStrategy2); ConventionalViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, options) { return viewEngine.loadViewFactory(this.viewUrl, options, this.moduleId); }; ConventionalViewStrategy.convertModuleIdToViewUrl = function convertModuleIdToViewUrl(moduleId) { return moduleId + '.html'; }; return ConventionalViewStrategy; })(ViewStrategy); exports.ConventionalViewStrategy = ConventionalViewStrategy; var NoViewStrategy = (function (_ViewStrategy3) { function NoViewStrategy() { _classCallCheck(this, NoViewStrategy); if (_ViewStrategy3 != null) { _ViewStrategy3.apply(this, arguments); } } _inherits(NoViewStrategy, _ViewStrategy3); NoViewStrategy.prototype.loadViewFactory = function loadViewFactory() { return Promise.resolve(null); }; return NoViewStrategy; })(ViewStrategy); exports.NoViewStrategy = NoViewStrategy; var TemplateRegistryViewStrategy = (function (_ViewStrategy4) { function TemplateRegistryViewStrategy(moduleId, registryEntry) { _classCallCheck(this, TemplateRegistryViewStrategy); _ViewStrategy4.call(this); this.moduleId = moduleId; this.registryEntry = registryEntry; } _inherits(TemplateRegistryViewStrategy, _ViewStrategy4); TemplateRegistryViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, options) { if (this.registryEntry.isReady) { return Promise.resolve(this.registryEntry.factory); } return viewEngine.loadViewFactory(this.registryEntry, options, this.moduleId); }; return TemplateRegistryViewStrategy; })(ViewStrategy); exports.TemplateRegistryViewStrategy = TemplateRegistryViewStrategy; });
{ "content_hash": "d7aac545116333000f277e063b061665", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 568, "avg_line_length": 35.911949685534594, "alnum_prop": 0.7042031523642732, "repo_name": "AMGTestOrg/templating", "id": "5f516ce0e2198ee04364ad2e9e0f4d411fd62183", "size": "5710", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dist/amd/view-strategy.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "476305" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="15dp" android:background="#8000" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="15dp" android:layout_marginTop="15dp" android:text="预报" android:textColor="#fff" android:textSize="20sp" /> <LinearLayout android:id="@+id/forecast_layout" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> </LinearLayout> </LinearLayout>
{ "content_hash": "17a2db1e72e344bd4915619c562baae3", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 72, "avg_line_length": 29, "alnum_prop": 0.6502463054187192, "repo_name": "liuyifangit/twofan-weather", "id": "24b0b089ab953f9492f11a764a9fbc7e511b2c2f", "size": "816", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/layout/forecast.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "29235" } ], "symlink_target": "" }
MIT License Copyright (c) 2016 sumukharm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{ "content_hash": "9dbcc66e2af8c42da8f8ee6996fbbc24", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 78, "avg_line_length": 50.76190476190476, "alnum_prop": 0.8058161350844277, "repo_name": "sumukharm/Doctor-recommender-Speech-app--Corpus", "id": "5ec921caa489e86b61aae3214c08855f688886c4", "size": "1066", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "LICENSE.md", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
<div class="row"> <div class="col-md-12"> <ba-card title="HIstorical Events during 1890 - 1899" baCardClass="with-scroll"> <div class="section-block"> <p> By 1806 Wilfrid Laurier was named the new prime minister of Canada. He had also declared that in 1900 that the “20th century will belong to Canada!” </p> </div> </ba-card> </div> </div>
{ "content_hash": "1fe00f8521e40da0aa43398c0ca92e5d", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 158, "avg_line_length": 35.54545454545455, "alnum_prop": 0.6214833759590793, "repo_name": "Shupshade/ng2-admin-lawson", "id": "4b0367ca924071c3af4b837f70bcef32e5b38d26", "size": "395", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/app/pages/editors/components/eighteenNineNine/eighteenNineNine.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "111875" }, { "name": "HTML", "bytes": "113661" }, { "name": "JavaScript", "bytes": "38706" }, { "name": "Shell", "bytes": "153" }, { "name": "TypeScript", "bytes": "223593" } ], "symlink_target": "" }
module BlogConverter VERSION = '0.1.1' end
{ "content_hash": "78cfb0dfd7bb513b9774553edf360334", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 20, "avg_line_length": 15, "alnum_prop": 0.7111111111111111, "repo_name": "chloerei/blog_converter", "id": "3045489f47fe429d1346b4eac360c9b4667fab09", "size": "45", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/blog_converter/version.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "16820" } ], "symlink_target": "" }
from sklearn.ensemble import RandomForestClassifier def get_estimator(): clf = RandomForestClassifier(n_estimators=10, max_leaf_nodes=10, random_state=61) return clf
{ "content_hash": "b4fb0b582c9c6f0f68f6a29467231ef0", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 68, "avg_line_length": 29.857142857142858, "alnum_prop": 0.6507177033492823, "repo_name": "paris-saclay-cds/ramp-workflow", "id": "494d240b86f657bc0fb3d073863b8c6b8d6076b1", "size": "209", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "rampwf/tests/kits/iris_data_label/submissions/random_forest_10_10/estimator.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Jupyter Notebook", "bytes": "115957" }, { "name": "Makefile", "bytes": "369" }, { "name": "Python", "bytes": "354774" }, { "name": "Shell", "bytes": "3960" } ], "symlink_target": "" }
package org.apache.camel.spring.javaconfig.test; import org.apache.camel.test.spring.CamelSpringDelegatingTestContextLoader; import org.apache.camel.test.spring.CamelSpringJUnit4ClassRunner; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.stereotype.Component; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; import static org.junit.Assert.assertEquals; @RunWith(CamelSpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {JavaConfigWithNestedConfigClassTest.ContextConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class) @Component public class JavaConfigWithNestedConfigClassTest extends AbstractJUnit4SpringContextTests implements Cheese { private boolean doCheeseCalled; @Test public void testPostProcessorInjectsMe() throws Exception { assertEquals("doCheese() should be called", true, doCheeseCalled); } public void doCheese() { logger.info("doCheese called!"); doCheeseCalled = true; } @Configuration public static class ContextConfig { @Bean public MyPostProcessor myPostProcessor() { return new MyPostProcessor(); } } }
{ "content_hash": "c9acb8b0036c7daf9ffc2ffccfdb33a8", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 145, "avg_line_length": 35.82051282051282, "alnum_prop": 0.788117394416607, "repo_name": "Fabryprog/camel", "id": "a74d30aaed33d6888c5e733128a93a6a50d13d44", "size": "2199", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/test/JavaConfigWithNestedConfigClassTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6521" }, { "name": "Batchfile", "bytes": "2353" }, { "name": "CSS", "bytes": "17204" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "8015" }, { "name": "Groovy", "bytes": "14479" }, { "name": "HTML", "bytes": "909437" }, { "name": "Java", "bytes": "82182194" }, { "name": "JavaScript", "bytes": "102432" }, { "name": "Makefile", "bytes": "513" }, { "name": "Shell", "bytes": "17240" }, { "name": "TSQL", "bytes": "28835" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "271473" } ], "symlink_target": "" }
package comtesting func cleanupTempDir() { tempDir = "" }
{ "content_hash": "62f238ed88fb694520f2e13374d3fa06", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 23, "avg_line_length": 12, "alnum_prop": 0.7, "repo_name": "google/fleetspeak", "id": "e81f9379ccf2e1708500b28dcb1f422637de1188", "size": "674", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "fleetspeak/src/comtesting/tempdir_unix.go", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Go", "bytes": "978158" }, { "name": "HCL", "bytes": "8464" }, { "name": "Makefile", "bytes": "383" }, { "name": "PowerShell", "bytes": "3209" }, { "name": "Python", "bytes": "49683" }, { "name": "Shell", "bytes": "20526" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_03) on Sat Jun 25 19:50:47 EDT 2005 --> <TITLE> SimpleScreensaver (SaverBeans API V0.2 Release release) </TITLE> <META NAME="keywords" CONTENT="org.jdesktop.jdic.screensaver.SimpleScreensaver class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="SimpleScreensaver (SaverBeans API V0.2 Release release)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/jdesktop/jdic/screensaver/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SimpleScreensaver.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> SaverBeans API V0.2 Release release</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverSettings.html" title="class in org.jdesktop.jdic.screensaver"><B>PREV CLASS</B></A>&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jdesktop/jdic/screensaver/SimpleScreensaver.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SimpleScreensaver.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.jdesktop.jdic.screensaver.ScreensaverBase">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.jdesktop.jdic.screensaver</FONT> <BR> Class SimpleScreensaver</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html" title="class in org.jdesktop.jdic.screensaver">org.jdesktop.jdic.screensaver.ScreensaverBase</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.jdesktop.jdic.screensaver.SimpleScreensaver</B> </PRE> <HR> <DL> <DT><PRE>public abstract class <B>SimpleScreensaver</B><DT>extends <A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html" title="class in org.jdesktop.jdic.screensaver">ScreensaverBase</A></DL> </PRE> <P> Base class for simple screensavers who will have their <code>paint()</code> method invoked on a regular basis to render each frame. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_org.jdesktop.jdic.screensaver.ScreensaverBase"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.jdesktop.jdic.screensaver.<A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html" title="class in org.jdesktop.jdic.screensaver">ScreensaverBase</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#context">context</A></CODE></TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/screensaver/SimpleScreensaver.html#SimpleScreensaver()">SimpleScreensaver</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>abstract &nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/screensaver/SimpleScreensaver.html#paint(java.awt.Graphics)">paint</A></B>(java.awt.Graphics&nbsp;g)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Override this method in your subclasses to paint a single frame.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/jdesktop/jdic/screensaver/SimpleScreensaver.html#renderFrame()">renderFrame</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the native layer to render the next frame.</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.jdesktop.jdic.screensaver.ScreensaverBase"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.jdesktop.jdic.screensaver.<A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html" title="class in org.jdesktop.jdic.screensaver">ScreensaverBase</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#baseDestroy()">baseDestroy</A>, <A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#baseInit(org.jdesktop.jdic.screensaver.ScreensaverContext)">baseInit</A>, <A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#destroy()">destroy</A>, <A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#getContext()">getContext</A>, <A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#init()">init</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="SimpleScreensaver()"><!-- --></A><H3> SimpleScreensaver</H3> <PRE> public <B>SimpleScreensaver</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="paint(java.awt.Graphics)"><!-- --></A><H3> paint</H3> <PRE> public abstract void <B>paint</B>(java.awt.Graphics&nbsp;g)</PRE> <DL> <DD>Override this method in your subclasses to paint a single frame. Any exceptions thrown during paint will be sent to the org.jdesktop.jdic.screensaver J2SE logger. <p> Tip: Treat this as though it were part of a game loop. In general, it's a good idea not to allocate ('new') any objects after init unless they will not be deleted. This will yield smoother animation and no pauses from the garbage collector. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>g</CODE> - Graphics context used to draw to the screensaver window.</DL> </DD> </DL> <HR> <A NAME="renderFrame()"><!-- --></A><H3> renderFrame</H3> <PRE> public final void <B>renderFrame</B>()</PRE> <DL> <DD>Called by the native layer to render the next frame. <P> <DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html#renderFrame()">renderFrame</A></CODE> in class <CODE><A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverBase.html" title="class in org.jdesktop.jdic.screensaver">ScreensaverBase</A></CODE></DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/jdesktop/jdic/screensaver/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SimpleScreensaver.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> SaverBeans API V0.2 Release release</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../org/jdesktop/jdic/screensaver/ScreensaverSettings.html" title="class in org.jdesktop.jdic.screensaver"><B>PREV CLASS</B></A>&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jdesktop/jdic/screensaver/SimpleScreensaver.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SimpleScreensaver.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.jdesktop.jdic.screensaver.ScreensaverBase">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <font size="-1">For more information and documentation on JDIC, see <a href="https://jdic.dev.java.net">JDIC website</a>. <p>That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, working code examples, license terms and bug report information. <p>Copyright (c) 2004-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="https://jdic.dev.java.net/source/browse/jdic/src/COPYING">license terms</a>.</font> </BODY> </HTML>
{ "content_hash": "25982e22841bcc5d2f22c40519e08e60", "timestamp": "", "source": "github", "line_count": 321, "max_line_length": 558, "avg_line_length": 44.769470404984425, "alnum_prop": 0.6547908983369285, "repo_name": "tobyweston/legacy-screen-saver", "id": "b80fd14b0e4fa60eff5cd583897a0a7236d27e25", "size": "14371", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "saverbeans-sdk-0.2/javadoc/org/jdesktop/jdic/screensaver/SimpleScreensaver.html", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "60951" }, { "name": "Perl", "bytes": "42088" }, { "name": "Shell", "bytes": "5363" } ], "symlink_target": "" }
layout: logistics date: December 7 - 10, 2015 permalink: meetings/2015/12/logistics --- ### [Meeting Registration](https://www.eventbrite.com/e/mpi-forum-tickets-19122551065) **NOTICE:** Data from three questions in the registration is being collected by the MPI Forum for research by the [Women in HPC](www.womeninhp.org.uk) initiative: 1. What country do you live in? 2. What is your gender? 3. Who is your employer? This data will not be retained by the MPI Forum and only anonymised data will be retained by Women in HPC to facilitate research into the under-representation of women in the international HPC community. The registration covers snacks at the meeting on Monday, Tuesday Wednesday, and Thursday lunch on Tuesday and Wednesday, and the meeting logistics. Advanced registration is required for this meeting so that Cisco can process their visitor processing procedure. ### Meeting Location The meeting will take place at: * [Cisco building MR-3 (McCarthy Ranch), 155 North McCarthy Blvd. Milpitas, CA, USA. Great Dane conference room.](https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d12673.262443392721!2d-121.93341717646358!3d37.4296482985981!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0000000000000000%3A0x29434aa4a14ef89e!2sCisco+SJ-McCarthy+Ranch+3!5e0!3m2!1sen!2sus!4v1445549128141) ### Meeting Cost     $150 per person to cover meeting logistics costs, snacks on Monday, Tuesday, Wednesday, and Thursday, and lunch on Tuesday and Wednesday.   ### Hotel Room Block TBD.
{ "content_hash": "5b9ed89467de7170ddafc2de7cdcf441", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 382, "avg_line_length": 47.5625, "alnum_prop": 0.7818659658344284, "repo_name": "mpi-forum/mpi-forum.github.io", "id": "6fc2e7409e87731ce362be8a956201c23f99067f", "size": "1530", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "meetings/2015/12/logistics.md", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "1760" }, { "name": "CSS", "bytes": "19317" }, { "name": "HTML", "bytes": "58380" }, { "name": "JavaScript", "bytes": "94682" }, { "name": "Python", "bytes": "28634" }, { "name": "Ruby", "bytes": "75" }, { "name": "SCSS", "bytes": "10598" } ], "symlink_target": "" }
<h2>saved.cubes</h2> <br> <div ng-repeat="oneCube in cubes"> <div ng-repeat="oneItem in oneCube" class="breedpic"> <img ng-src="{{oneItem.mediaUrl}}"> </div> <button ng-click="removeCube($index)" style="display: block; margin-left: auto; "> remove </button> <hr> </div>
{ "content_hash": "521785c745ca78ca8fd515cd1c1cda00", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 84, "avg_line_length": 15.578947368421053, "alnum_prop": 0.6182432432432432, "repo_name": "bthj/like-breeding", "id": "4626fa8867b38fdc667501b73a0a941711b6f094", "size": "296", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/partials/cubes.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1034" }, { "name": "JavaScript", "bytes": "69965" }, { "name": "TeX", "bytes": "239685" } ], "symlink_target": "" }
def leap_year?(year) return false if year % 4 != 0 if year % 100 != 0 true elsif year % 400 == 0 true elsif year % 100 == 0 && year % 400 != 0 false end end # if year is NOT % 4 == 0, return false # if year is NOT divisible by 100 # return true # if year is divisible by 400 # return true # if year is divisible by 100 and NOT 400 # return false =begin In the my_solution.rb file: Create a method leap_year? that accepts an integer representing a year as input. It should return true if the year input is a leap year and false otherwise. For example, leap_year?(2000) # => true leap_year?(2001) # => false =end
{ "content_hash": "65846bf10a06229867dcf9dfef846076", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 80, "avg_line_length": 18.485714285714284, "alnum_prop": 0.6599690880989181, "repo_name": "tbogin/phase-0", "id": "10f0a8af21b492b5d34ca42690e407bbbe781d8b", "size": "750", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "week-4/leap-years/my_solution.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "2730" }, { "name": "HTML", "bytes": "20000" }, { "name": "Ruby", "bytes": "75845" } ], "symlink_target": "" }
This log was last generated on Thu, 03 Nov 2022 18:44:18 GMT and should not be manually modified. ## 4.25.0 Thu, 03 Nov 2022 18:44:18 GMT ### Minor changes - Add support for specifying `api-version` parameter in the server variables ## 4.24.3 Thu, 22 Sep 2022 15:51:02 GMT ### Patches - Fix duplicate $host when using {nextLink} param ## 4.24.2 Fri, 12 Aug 2022 19:53:22 GMT ### Patches - Bump @autorest/codemodel with missing `ArmIdSchema` from yaml schema ## 4.24.1 Mon, 08 Aug 2022 16:48:55 GMT ### Patches - Fix `format: arm-id` wasn't doing anything ## 4.24.0 Tue, 19 Jul 2022 15:09:55 GMT ### Minor changes - Added support for `format:arm-id` creating a ]`ArmIdSchema` to represent Azure Resource Manager Resource Identifiers - Added: Include `externalDocs` information in codemodel - Treat `format: uri` as `format: url` - Errors emitted in 'modelerfour' step will have sourcemap. - Improved 'name is empty' error to contain more information. ## 4.23.6 Fri, 27 May 2022 15:55:11 GMT ### Patches - Fix issue with having `application/json` and `application/x-www-form-urlencoded` content type for the request body. Json now takes precedence ## 4.23.5 Wed, 18 May 2022 02:34:13 GMT ### Patches - Fix name bgeneration for contenttype and accept parameters only incrementing to 1 ## 4.23.4 Mon, 09 May 2022 15:29:40 GMT ### Patches - Fix `x-ms-client-flatten` defined at the root of the model would always flatten that model when referemced in properties ## 4.23.3 Tue, 03 May 2022 20:20:34 GMT ### Patches - **Fix** issue when using unknown media types with a known one. Ignore those. ## 4.23.2 Thu, 07 Apr 2022 20:47:30 GMT ### Patches - Modelerfour set correct known media type when `application/json` with `type: string` ## 4.23.1 Mon, 21 Mar 2022 15:38:03 GMT ### Patches - Fix: Request body with `type: string, format: bytes|duration|date-time` being treated as string instead of base64 json ## 4.23.0 Tue, 15 Mar 2022 16:00:38 GMT ### Minor changes - Add support for setting original `operationId` on operation - **Update** to the logic for resolving operation requests. Group request by body types instead of content-types to prevent overload issues" - Generalize security scheme by allowing AAD Token - Added support for special headers: headers automatically handled by the generator - Uptake change in typing in openapi library ## 4.22.3 Tue, 07 Dec 2021 16:58:46 GMT ### Patches - **fix** discriminator value added to top level if it has some allOf ## 4.22.2 Mon, 06 Dec 2021 20:16:04 GMT ### Patches - **Fix** Flattened models with duplicate properties using `AutoGenerated` name instead of flattened path based ## 4.22.1 Mon, 22 Nov 2021 21:55:51 GMT _Version update only_ ## 4.22.0 Fri, 19 Nov 2021 04:23:42 GMT ### Minor changes - Uptake change to extension-base to provide sourcemap support for errors - **Added** Support for overriding shared param description ### Patches - **Fix** issue with properties causing name conflict when consecutive words are deduplicated ## 4.21.4 Mon, 04 Oct 2021 18:15:27 GMT ### Patches - **Fix** Flatten nullable property doesn't propagate. - **Internal** remove use of string and array extension method `.last`. ## 4.21.3 Wed, 29 Sep 2021 15:39:07 GMT ### Patches - **Fix** Unknown format for number schema should not be an error. ## 4.21.2 Wed, 22 Sep 2021 15:23:39 GMT ### Patches - **Fix** log error when using parameter with `content.<mediaType>` as not being supported ## 4.21.1 Thu, 16 Sep 2021 18:49:17 GMT ### Patches - **Add** validation when schema use allOf referencing a schema with a different type - **Tweak** Better error message when enum has an empty value ## 4.21.0 Wed, 08 Sep 2021 15:39:22 GMT ### Minor changes - **Internal** Remove @azure-tools/linq library" - **Perf** Modified yaml dump improving serialization ### Patches - **Fix** Dictionaries don't get xml serialization information passed into codemodel ## 4.20.0 Mon, 19 Jul 2021 15:15:41 GMT ### Minor changes - Added support for anonymous security scheme - **Added** New option to make Content-Type extensible - **Added** Configuration to ignore certain header names from being added to the model parameters lists - **Change** Single-value enums are extensible by default and will not generate a constant - Drop support for node 10 - **Perf** Flattener major performance improvement for large specs ### Patches - **Fix** Ciruclar reference issue when using allOf parent referencing back to child in properties - **Improve** Duplicate schema resolution ## 4.19.3 Thu, 03 Jun 2021 22:37:55 GMT ### Patches - **Fix** Allow empty paths in operation ## 4.19.2 Thu, 20 May 2021 16:41:13 GMT ### Patches - **Immproved** error message for duplicate operations ## 4.19.1 Tue, 04 May 2021 18:18:45 GMT ### Patches - **Fix** Using multiple security layers(`AND`) now produce warning instead of error. ## 4.19.0 Tue, 27 Apr 2021 17:48:43 GMT ### Minor changes - **Added** Distinction between anything and anyobject - **Added** Support for openapi deprecation - **Added** Support known set of security scheme ### Patches - **Perf** Major performance improvment to duplicate schema finder ## 4.18.4 Mon, 19 Apr 2021 21:06:54 GMT ### Patches - **Fix** Enum defined just with allOf of other enum - **Typo** Ambigious -> Ambiguous ## 4.18.3 Tue, 13 Apr 2021 21:32:54 GMT ### Patches - **Fix** Enum without type resulting in null values ## 4.18.2 Fri, 09 Apr 2021 19:53:22 GMT ### Patches - **Fix** api-version-mode configuration not working if not auto ## 4.18.1 Thu, 01 Apr 2021 15:46:41 GMT ### Patches - Bump @azure-tools/uri version to ~3.1.1 - **Cleanup** Migrated use of require -> es6 imports - **Update** how binary request body are treated if the content-type is not binary: Group all binary body together to prevent multiple method overload with same parameter - **Fix** Some unhandled promises ## 4.18.0 Tue, 16 Mar 2021 15:52:56 GMT ### Minor changes - **Change** let single value enum parameters be able to be grouped. - **Feature** Support using `allOf` in enum to reference a parent enum. All the parent choices will be flattened in the child enum ### Patches - **Respect** OpenAPI3 discriminator mapping - Bump dependencies versions ## 4.17.2 Fri, 05 Mar 2021 16:31:29 GMT ### Patches - Allow server variables to provide a string format(url, uri, etc.) ## 4.17.1 Fri, 26 Feb 2021 21:50:13 GMT ### Patches - **Fix** Don't add a duplicate Content-Type parameter if it is already provided in the spec - Fix x-ms-header-collection-prefix injected dictionary not defined in the list of schemas ## 4.17.0 Fri, 19 Feb 2021 21:42:09 GMT ### Minor changes - **Change** Body parmaeters for a `formData` body will be seperate parameters in the generated model instead of being grouped in a body object. ### Patches - Change property redefinition error when changing type into a warning to allow polymorphism ## 4.16.2 Thu, 11 Feb 2021 18:03:07 GMT ### Patches - **Internals** Update chalk dependency to ^4.1.0 ## 4.16.1 Mon, 08 Feb 2021 23:06:15 GMT ### Patches - Set `isInMultipart: true` for multipart parameters ## 4.16.0 Thu, 04 Feb 2021 19:05:18 GMT ### Minor changes - Migrate bundling system from static-link to webpack ### Patches - Fix the use of circular dependencies in additionalProperties [PR #3819](https://github.com/Azure/autorest/pull/3819) - Internal code linting fixes - Internal: Move out test custom matchers to seperate package - Rename @azure-tools/autorest-extension-base dependency to new @autorest/extension-base pkg ## 4.15.456 Thu, 28 Jan 2021 00:22:27 GMT ### Patches - Fix static linking issue with modelerfour resulting in incompatible dependency. ## 4.15.455 Tue, 26 Jan 2021 21:36:02 GMT ### Patches - Update modelerfour to use renamed package @azuretools/codemodel -> @autorest/codemodel. ## 4.15.x ### Patches - **Fix** Missing description in responses. ([PR 370](https://github.com/Azure/autorest.modelerfour/pull/370)) - **Feature** Added new flag `always-create-accept-parameter` to enable/disable accept param auto generation. ([PR 366](https://github.com/Azure/autorest.modelerfour/pull/366)) - **Fix** Allow request with body being a file and `application/json` content-type. ([PR 363](https://github.com/Azure/autorest.modelerfour/pull/363)) - **Fix** Dictionaries of dictionaries not being modeled as such(`dict[str, object]` instead of `dict[str, dict[str, str]]`). ([PR 372](https://github.com/Azure/autorest.modelerfour/pull/372)) - **Fix** Issue with sibling models(Model just being a ref of another) causing circular dependency exception. ([PR 375](https://github.com/Azure/autorest.modelerfour/pull/375)) - **Fix** Issue with duplicates schemas names due to consequtive name duplicate removal. ([PR 374](https://github.com/Azure/autorest.modelerfour/pull/374)) - Schemas with `x-ms-enum`'s `modelAsString` set to `true` will now be represented as `ChoiceSchema` even with a single value. - `Accept` headers are now automatically added to operations having responses with content types - Added `always-seal-x-ms-enum` settings to always create `SealedChoiceSchema` when an `x-ms-enum` is encountered ## 4.14.x ### Patches - added `exception` SchemaContext for `usage` when used as an exception response - changed `output` SchemaContext for `usage` to no longer include exception response uses ## 4.13.x ### Patches - add security info (checks to see if `input.components?.securitySchemes` has any content) - sync version of m4 and perks/codemodel == 4.13.x - adding quality prechecker step as a way to test the OAI document for quality before modelerfour runs. - report duplicate parents via allOf as an error. - added `modelerfour.lenient-model-deduplication` to cause schemas with duplicated names to be renamed with an `AutoGenerated` suffix. Note that this is a *temporary* measuer that should only be used when Swaggers cannot be updated easily. This option will be removed in a future version of Modeler Four. ## 4.12.x ### Patches - updated CI to build packages - any is in a category in schemas - times is a new category in schemas (not populated yet, next build) - polymorphic payloads are not flattened (when it's the class that declares the discriminator) - readonly is pulled from the schema if it's there - body parameters should have the required flag set correctly - content-type is now a header parameter (wasn't set before) - added `modelerfour.always-create-content-type-parameter` to always get the content type parameter even when there are only one option. - add support for x-ms-api-version extension to force enabling/disabling parameter to be treated as an api-version parameter - the checker plugin will now halt on errors (can be disabled by `modelerfour.additional-checks: false`) - when an enum without type is presented, if the values are all strings, assume 'string' - flatten parents first for consistency - added choiceType for content-type schema ## 4.6.x ### Patches - add additional checks for empty names, collisions - fix errant processing on APString => Apstring - x-ms-client-name fixes on parameters - added setting for `preserve-uppercase-max-length` to preserve uppercase words up to a certain length. ## 4.5.x ### Patches - static linking libraries for stability - processed all names in namer, styles can be set in config (see below): - support overrides in namer - static linked dependency ## 4.4.x ### Patches - parameter grouping - some namer changes ## 4.3.x ### Patches - flattening (model and payload) enabled. - properties should respect x-ms-client-name (many fixes) - global parameters should try to be in order of original spec - filter out 'x-ms-original' from extensions - add serializedName for host parameters - make sure reused global parameter is added to method too - processed values in constants/enums a bit better, support AnySchema for no type/format - support server variable parameters as method unless they have x-ms-parameter-location ## 4.2.75 ### Patches - add `style` to parameters to support collection format - `potential-breaking-change` Include common paramters from oai/path #68 (requires fix from autorest-core 3.0.6160+ ) - propogate extensions from server parameters (ie, x-ms-skip-url-encoding) #61 - `potential-breaking-change` make operation groups case insensitive. #59 - `potential-breaking-change` sealedChoice/Choice selection was backwards ( was creating a sealedchoice schema for modelAsString:true and vice versa) #62 - `potential-breaking-change` drop constant schema from response, use constantschema's valueType instead. #63 - `potential-breaking-change` fix body parameter marked as required when not marked so in spec. #64 ## 4.1.60 ### Patches - query parameters should have a serializedName so that they don't rely on the cosmetic name property. ## 4.1.58 ### Patches - version bump, change your configuration to specify version `~4.1.0` or greater ``` use-extension: "@autorest/modelerfour" : "~4.1.0" ``` - each Http operation (via `.protocol.http`) will now have a separate `path` and `uri` properties. <br>Both are still templates, and will have parameters. <br>The parameters for the `uri` property will have `in` set to `ParameterLocation.Uri` <br>The parameters for the `path` property will continue to have `in` set to `ParameterLocation.Path` - autorest-core recently added an option to aggressively deduplicate inline models (ie, ones without a name) and modeler-four based generator will have that enabled by default. (ie `deduplicate-inline-models: true`) <br>This may increase deduplication time on extremely large openapi models. - this package contains the initial code for the flattener plugin, however it is not yet enabled. - updated `@azure-tools/codemodel` package to `3.0.241`: <br>`uri` (required) was added to `HttpRequest` <br>`flattenedNames` (optional) was added to `Property` (in anticipation of supporting flattening)
{ "content_hash": "b2c8c0d5c4154de7c3403bd68aef9afe", "timestamp": "", "source": "github", "line_count": 462, "max_line_length": 306, "avg_line_length": 30.38744588744589, "alnum_prop": 0.7374456870147447, "repo_name": "Azure/autorest", "id": "6f088b92c92cf0a64b0a4633672ae197e7f540fb", "size": "14077", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "packages/extensions/modelerfour/CHANGELOG.md", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "2786" }, { "name": "JavaScript", "bytes": "41316" }, { "name": "PowerShell", "bytes": "3774" }, { "name": "Python", "bytes": "2633" }, { "name": "Shell", "bytes": "466" }, { "name": "TypeScript", "bytes": "1651247" } ], "symlink_target": "" }
module Helpers module Sentry include MiniTest::Chef::Assertions include MiniTest::Chef::Context include MiniTest::Chef::Resources end end
{ "content_hash": "b5a8a4cea18fd4b468b6b0927d943584", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 38, "avg_line_length": 22, "alnum_prop": 0.7402597402597403, "repo_name": "dave-shawley/sentry-cookbook", "id": "3be10b9291e2b350bcbe28668e40888651b311fe", "size": "154", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "files/default/tests/minitest/support/helpers.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "4739" } ], "symlink_target": "" }
define({ //begin v1.x content "setButtonText": "Постави", "cancelButtonText": "Откажи" //end v1.x content });
{ "content_hash": "ab964c54de7c70f0b0194cfa20334bff", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 29, "avg_line_length": 17, "alnum_prop": 0.6386554621848739, "repo_name": "beeant0512/spring", "id": "5f3e540b5e4d24557624b277d82f9f0faf209973", "size": "132", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "spring-sitemesh-dojo-bootstrap/src/main/webapp/assets/dojo/dojox/editor/plugins/nls/mk/TextColor.js", "mode": "33188", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "39908" }, { "name": "Batchfile", "bytes": "1732" }, { "name": "CSS", "bytes": "8017880" }, { "name": "HTML", "bytes": "486623" }, { "name": "Java", "bytes": "76726" }, { "name": "JavaScript", "bytes": "36915489" }, { "name": "PHP", "bytes": "90235" }, { "name": "Shell", "bytes": "2052" }, { "name": "XSLT", "bytes": "94766" } ], "symlink_target": "" }
from enum import Enum class MatchConditions(Enum): """An enum to describe match conditions. """ Unconditionally = 1 # Matches any condition IfNotModified = 2 # If the target object is not modified. Usually it maps to etag=<specific etag> IfModified = 3 # Only if the target object is modified. Usually it maps to etag!=<specific etag> IfPresent = 4 # If the target object exists. Usually it maps to etag='*' IfMissing = 5 # If the target object does not exist. Usually it maps to etag!='*'
{ "content_hash": "56eece6315fe135475e43f9162589437", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 102, "avg_line_length": 52.3, "alnum_prop": 0.6998087954110899, "repo_name": "Azure/azure-sdk-for-python", "id": "6bbfa447fa21e73f860f7a9084fcf138820bb531", "size": "1827", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "sdk/core/azure-core/azure/core/_match_conditions.py", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "1224" }, { "name": "Bicep", "bytes": "24196" }, { "name": "CSS", "bytes": "6089" }, { "name": "Dockerfile", "bytes": "4892" }, { "name": "HTML", "bytes": "12058" }, { "name": "JavaScript", "bytes": "8137" }, { "name": "Jinja", "bytes": "10377" }, { "name": "Jupyter Notebook", "bytes": "272022" }, { "name": "PowerShell", "bytes": "518535" }, { "name": "Python", "bytes": "715484989" }, { "name": "Shell", "bytes": "3631" } ], "symlink_target": "" }
'use strict'; /** * Degenerate distribution probability mass function (PDF). * * @module @stdlib/stats/base/dists/degenerate/pmf * * @example * var pmf = require( '@stdlib/stats/base/dists/degenerate/pmf' ); * * var y = pmf( 2.0, 0.0 ); * // returns 0.0 * * @example * var factory = require( '@stdlib/stats/base/dists/degenerate/pmf' ).factory; * * var pmf = factory( 10.0 ); * * var y = pmf( 10.0 ); * // returns 1.0 */ // MODULES // var setReadOnly = require( '@stdlib/utils/define-nonenumerable-read-only-property' ); var main = require( './main.js' ); var factory = require( './factory.js' ); // MAIN // setReadOnly( main, 'factory', factory ); // EXPORTS // module.exports = main;
{ "content_hash": "9202c6768405e831fc2c08ae1778e5a8", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 85, "avg_line_length": 17.871794871794872, "alnum_prop": 0.6384505021520803, "repo_name": "stdlib-js/stdlib", "id": "408223f63fdd120eb0fe17caeb40a16fc1949bb4", "size": "1313", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "lib/node_modules/@stdlib/stats/base/dists/degenerate/pmf/lib/index.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Awk", "bytes": "21739" }, { "name": "C", "bytes": "15336495" }, { "name": "C++", "bytes": "1349482" }, { "name": "CSS", "bytes": "58039" }, { "name": "Fortran", "bytes": "198059" }, { "name": "HTML", "bytes": "56181" }, { "name": "Handlebars", "bytes": "16114" }, { "name": "JavaScript", "bytes": "85975525" }, { "name": "Julia", "bytes": "1508654" }, { "name": "Makefile", "bytes": "4806816" }, { "name": "Python", "bytes": "3343697" }, { "name": "R", "bytes": "576612" }, { "name": "Shell", "bytes": "559315" }, { "name": "TypeScript", "bytes": "19309407" }, { "name": "WebAssembly", "bytes": "5980" } ], "symlink_target": "" }
#ifndef POLYGRAPH__PGL_PGLNETADDRSYM_H #define POLYGRAPH__PGL_PGLNETADDRSYM_H #include "xstd/String.h" #include "xstd/NetAddr.h" #include "pgl/PglRecSym.h" class SynSymTblItem; class StringSym; // host:port network address class NetAddrSym: public RecSym { public: static String TheType; public: NetAddrSym(); NetAddrSym(const String &aType, PglRec *aRec); virtual bool isA(const String &type) const; NetAddr val() const; void val(const NetAddr &addr); void portVal(int newPort); String ifName() const; bool subnet(int &sn) const; void setIfname(const String &aName); void setSubnet(int aSubnet); void printUnquoted(ostream &os) const; virtual ostream &print(ostream &os, const String &pfx) const; protected: virtual SynSym *dupe(const String &dType) const; }; #endif
{ "content_hash": "05d1e4e47af9fbd803e2e52090f81d79", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 63, "avg_line_length": 18.930232558139537, "alnum_prop": 0.726044226044226, "repo_name": "dalequark/polygraph", "id": "6957bd3b46ef21aed0765e7d39a72bed9b5a125c", "size": "966", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/pgl/PglNetAddrSym.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "92335" }, { "name": "C++", "bytes": "2450432" }, { "name": "CSS", "bytes": "534" }, { "name": "Objective-C", "bytes": "1729" }, { "name": "Perl", "bytes": "20557" }, { "name": "Shell", "bytes": "555894" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("CatalanNumbers")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("CatalanNumbers")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0b7b5caa-da05-4afa-981c-455409c78f5e")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "e01b7e6bc8cfa8e0ab6c2923b7bc8063", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 38.916666666666664, "alnum_prop": 0.7458957887223412, "repo_name": "Petko-Petkov/Telerik", "id": "219bd709cd4f95571347388580ccdf4c68720b9c", "size": "1404", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Programming/C#PartOne/HomeWorks/06.Loops/CatalanNumbers/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "322185" }, { "name": "CSS", "bytes": "739" }, { "name": "HTML", "bytes": "8338" }, { "name": "JavaScript", "bytes": "3626" } ], "symlink_target": "" }
package aQute.lib.data; import java.lang.reflect.Field; import java.util.Formatter; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import aQute.lib.converter.Converter; import aQute.lib.hex.Hex; public class Data { public static String validate(Object o) throws Exception { StringBuilder sb = new StringBuilder(); Formatter formatter = new Formatter(sb); try { Field fields[] = o.getClass().getFields(); for (Field f : fields) { Validator patternValidator = f.getAnnotation(Validator.class); Numeric numericValidator = f.getAnnotation(Numeric.class); AllowNull allowNull = f.getAnnotation(AllowNull.class); Object value = f.get(o); if (value == null) { if (allowNull == null) formatter.format("Value for %s must not be null%n", f.getName()); } else { if (patternValidator != null) { Pattern p = Pattern.compile(patternValidator.value()); Matcher m = p.matcher(value.toString()); if (!m.matches()) { String reason = patternValidator.reason(); if (reason.length() == 0) formatter.format("Value for %s=%s does not match pattern %s%n", f.getName(), value, patternValidator.value()); else formatter.format("Value for %s=%s %s%n", f.getName(), value, reason); } } if (numericValidator != null) { if (o instanceof String) { try { o = Double.parseDouble((String) o); } catch (Exception e) { formatter.format("Value for %s=%s %s%n", f.getName(), value, "Not a number"); } } try { Number n = (Number) o; long number = n.longValue(); if (number >= numericValidator.min() && number < numericValidator.max()) { formatter.format("Value for %s=%s not in valid range (%s,%s]%n", f.getName(), value, numericValidator.min(), numericValidator.max()); } } catch (ClassCastException e) { formatter.format("Value for %s=%s [%s,%s) is not a number%n", f.getName(), value, numericValidator.min(), numericValidator.max()); } } } } if (sb.length() == 0) return null; if (sb.length() > 0) sb.delete(sb.length() - 1, sb.length()); return sb.toString(); } finally { formatter.close(); } } public static void details(Object data, Appendable out) throws Exception { Field fields[] = data.getClass().getFields(); Formatter formatter = new Formatter(out); try { for (Field f : fields) { String name = f.getName(); name = Character.toUpperCase(name.charAt(0)) + name.substring(1); Object object = f.get(data); if (object != null && object.getClass() == byte[].class) object = Hex.toHexString((byte[]) object); else if (object != null && object.getClass().isArray()) object = Converter.cnv(List.class, object); formatter.format("%-40s %s%n", name, object); } } finally { formatter.close(); } } }
{ "content_hash": "68962f9924fd2d2e8dd5ea403586b1ca", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 92, "avg_line_length": 31.221052631578946, "alnum_prop": 0.6166554281861092, "repo_name": "xtracoder/bnd", "id": "c5cc50261d815db3e40f0baa1ae39f9a1acf4f91", "size": "2966", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "aQute.libg/src/aQute/lib/data/Data.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "58877" }, { "name": "Java", "bytes": "4624748" }, { "name": "Shell", "bytes": "6059" }, { "name": "XSLT", "bytes": "24394" } ], "symlink_target": "" }
package com.kwizzad.property; import java.util.List; /** * Add a certain Item at a specific location in the List * * @param <LIST_TYPE> */ public final class AddAtOperation<LIST_TYPE> implements IListOperation<LIST_TYPE> { private final LIST_TYPE o; private final int location; public AddAtOperation(LIST_TYPE o, int location) { this.o = o; this.location = location; } @Override public void apply(List<LIST_TYPE> target) { target.add(location, o); } }
{ "content_hash": "44cd37822485f80018f8b5e986ae1f2f", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 83, "avg_line_length": 22.26086956521739, "alnum_prop": 0.66015625, "repo_name": "kwizzad/kwizzad-android", "id": "3abdd0b5d48ea6778333cfd9b20a826010e45fbe", "size": "512", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sdk/src/main/java/com/kwizzad/property/AddAtOperation.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "212442" } ], "symlink_target": "" }
<?php namespace yii\redis; use Yii; use yii\base\InvalidConfigException; /** * Redis Cache implements a cache application component based on [redis](http://redis.io/) key-value store. * * Redis Cache requires redis version 2.6.12 or higher to work properly. * * It needs to be configured with a redis [[Connection]] that is also configured as an application component. * By default it will use the `redis` application component. * * See [[Cache]] manual for common cache operations that redis Cache supports. * * Unlike the [[Cache]], redis Cache allows the expire parameter of [[set]], [[add]], [[mset]] and [[madd]] to * be a floating point number, so you may specify the time in milliseconds (e.g. 0.1 will be 100 milliseconds). * * To use redis Cache as the cache application component, configure the application as follows, * * ~~~ * [ * 'components' => [ * 'cache' => [ * 'class' => 'yii\redis\Cache', * 'redis' => [ * 'hostname' => 'localhost', * 'port' => 6379, * 'database' => 0, * ] * ], * ], * ] * ~~~ * * Or if you have configured the redis [[Connection]] as an application component, the following is sufficient: * * ~~~ * [ * 'components' => [ * 'cache' => [ * 'class' => 'yii\redis\Cache', * // 'redis' => 'redis' // id of the connection application component * ], * ], * ] * ~~~ * * @author Carsten Brandt <[email protected]> * @since 2.0 */ class Cache extends \yii\caching\Cache { /** * @var Connection|string|array the Redis [[Connection]] object or the application component ID of the Redis [[Connection]]. * This can also be an array that is used to create a redis [[Connection]] instance in case you do not want do configure * redis connection as an application component. * After the Cache object is created, if you want to change this property, you should only assign it * with a Redis [[Connection]] object. */ public $redis = 'redis'; /** * Initializes the redis Cache component. * This method will initialize the [[redis]] property to make sure it refers to a valid redis connection. * @throws InvalidConfigException if [[redis]] is invalid. */ public function init() { parent::init(); if (is_string($this->redis)) { $this->redis = Yii::$app->get($this->redis); } elseif (is_array($this->redis)) { if (!isset($this->redis['class'])) { $this->redis['class'] = Connection::className(); } $this->redis = Yii::createObject($this->redis); } if (!$this->redis instanceof Connection) { throw new InvalidConfigException("Cache::redis must be either a Redis connection instance or the application component ID of a Redis connection."); } } /** * Checks whether a specified key exists in the cache. * This can be faster than getting the value from the cache if the data is big. * Note that this method does not check whether the dependency associated * with the cached data, if there is any, has changed. So a call to [[get]] * may return false while exists returns true. * @param mixed $key a key identifying the cached value. This can be a simple string or * a complex data structure consisting of factors representing the key. * @return boolean true if a value exists in cache, false if the value is not in the cache or expired. */ public function exists($key) { return (bool) $this->redis->executeCommand('EXISTS', [$this->buildKey($key)]); } /** * @inheritdoc */ protected function getValue($key) { return $this->redis->executeCommand('GET', [$key]); } /** * @inheritdoc */ protected function getValues($keys) { $response = $this->redis->executeCommand('MGET', $keys); $result = []; $i = 0; foreach ($keys as $key) { $result[$key] = $response[$i++]; } return $result; } /** * @inheritdoc */ protected function setValue($key, $value, $expire) { if ($expire == 0) { return (bool) $this->redis->executeCommand('SET', [$key, $value]); } else { //$expire = (int) ($expire * 1000);// 单位默认为毫秒 //return (bool) $this->redis->executeCommand('SET', [$key, $value, 'PX', $expire]); $expire = +$expire > 0 ? $expire : 0; // 防止负数 return (bool) $this->redis->executeCommand('SET', [$key, $value, 'EX', $expire]); // 按秒缓存 } } /** * @inheritdoc */ protected function setValues($data, $expire) { $args = []; foreach ($data as $key => $value) { $args[] = $key; $args[] = $value; } $failedKeys = []; if ($expire == 0) { $this->redis->executeCommand('MSET', $args); } else { $expire = (int) ($expire * 1000); $this->redis->executeCommand('MULTI'); $this->redis->executeCommand('MSET', $args); $index = []; foreach ($data as $key => $value) { $this->redis->executeCommand('PEXPIRE', [$key, $expire]); $index[] = $key; } $result = $this->redis->executeCommand('EXEC'); array_shift($result); foreach ($result as $i => $r) { if ($r != 1) { $failedKeys[] = $index[$i]; } } } return $failedKeys; } /** * @inheritdoc */ protected function addValue($key, $value, $expire) { if ($expire == 0) { return (bool) $this->redis->executeCommand('SET', [$key, $value, 'NX']); } else { $expire = (int) ($expire * 1000); return (bool) $this->redis->executeCommand('SET', [$key, $value, 'PX', $expire, 'NX']); } } /** * @inheritdoc */ protected function deleteValue($key) { return (bool) $this->redis->executeCommand('DEL', [$key]); } /** * @inheritdoc */ protected function flushValues() { return $this->redis->executeCommand('FLUSHDB'); } }
{ "content_hash": "d1f732364c5ba7cb8d1f369b5db953ad", "timestamp": "", "source": "github", "line_count": 207, "max_line_length": 159, "avg_line_length": 32.07729468599034, "alnum_prop": 0.5251506024096385, "repo_name": "apphelper/apphelper", "id": "41c23c57c4f3545b790c2e7a40fb24c36468f673", "size": "6818", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/yiisoft/yii2-redis/Cache.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "317" }, { "name": "Batchfile", "bytes": "1541" }, { "name": "CSS", "bytes": "63489" }, { "name": "HTML", "bytes": "2544" }, { "name": "JavaScript", "bytes": "2148489" }, { "name": "PHP", "bytes": "1321535" } ], "symlink_target": "" }
// // ComplexLinkSyncTests.m // ContentfulSDK // // Created by Boris Bügling on 11/04/14. // // #import "SyncBaseTestCase.h" @interface ComplexLinkSyncTests : SyncBaseTestCase @end #pragma mark - @implementation ComplexLinkSyncTests -(void)setUp { [super setUp]; /* Map URLs to JSON response files */ NSDictionary* stubs = @{ @"https://cdn.contentful.com/spaces/emh6o2ireilu/sync?initial=true": @"ComplexLinkTestInitial", @"https://cdn.contentful.com/spaces/emh6o2ireilu/": @"space", @"https://cdn.contentful.com/spaces/emh6o2ireilu/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdyZxwrTDssOKwr9SACovw47Ckn1vcwjDuEXCqV3DlMKiw6LDjxPCjDfDisONc8KtcHvDrsKsP8O2w5Azw6rCglcncRM7w7fDmyh3QzEpKcKiWsOOw5LDtsOlcgXCi8Omw7M": @"ComplexLinkTestUpdate1", @"https://cdn.contentful.com/spaces/emh6o2ireilu/sync?sync_token=w5ZGw6JFwqZmVcKsE8Kow4grw45QdyY9wrEfW8KYwpROLH55G8O-U2rCq8OsQn3DvcOrw4cGwpkjIAvDgWxYwrITw4xUa8O4UCXDojMJDk8fw6RzSMK6J2vDqMOUJm_CiMKaw6lVF1jCg2vCosOFwpo": @"ComplexLinkTestUpdate2", @"https://cdn.contentful.com/spaces/emh6o2ireilu/entries?sys.id%5Bin%5D=1Wl5HnguK8CiaykiQAiGu6%2C4upDPGUMMEkG8w8UUs2OiO%2C1gQ4P2tG7QaGkQwkC4a6Gg": @"ComplexLinkTestContentTypes", @"https://cdn.contentful.com/spaces/emh6o2ireilu/entries?limit=3&sys.id%5Bin%5D=1Wl5HnguK8CiaykiQAiGu6%2C4upDPGUMMEkG8w8UUs2OiO%2C1gQ4P2tG7QaGkQwkC4a6Gg": @"ComplexLinkTestEntries", @"https://cdn.contentful.com/spaces/emh6o2ireilu/content_types?limit=2&sys.id%5Bin%5D=4yCmJfmk1WeqACagaemOIs%2C5kLp8FbRwAG0kcOOYa6GMa": @"ComplexLinkTestContentTypes2", }; [self stubHTTPRequestUsingFixtures:stubs inDirectory:@"ComplexSyncTests"]; } -(void)syncedSpace:(CDASyncedSpace *)space didCreateEntry:(CDAEntry *)entry { [super syncedSpace:space didCreateEntry:entry]; XCTAssertNotNil([entry.fields[@"link1"] fields], @""); XCTAssertNotNil([entry.fields[@"link3"] fields], @""); } -(void)syncedSpace:(CDASyncedSpace *)space didUpdateEntry:(CDAEntry *)entry { [super syncedSpace:space didUpdateEntry:entry]; XCTAssertNotNil([entry.fields[@"link1"] fields], @""); XCTAssertNotNil([entry.fields[@"link3"] fields], @""); } -(void)testComplexLinkSync { XCTestExpectation *expectation = [self expectationWithDescription:@""]; CDARequest* request = [self.client initialSynchronizationWithSuccess:^(CDAResponse *response, CDASyncedSpace *space) { space.delegate = self; [space performSynchronizationWithSuccess:^{ [space performSynchronizationWithSuccess:^{ [expectation fulfill]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; XCTAssertNotNil(request, @""); [self waitForExpectationsWithTimeout:10.0 handler:nil]; XCTAssertEqual(1U, self.numberOfEntriesCreated, @""); XCTAssertEqual(0U, self.numberOfEntriesUpdated, @""); XCTAssertEqual(1U, self.numberOfEntriesDeleted, @""); } /* This test demonstrates that using a shallow synchronized space will differ in what it treats as a create vs. update operation when unpublished Resources will get published again. This case will be normally be a create, but a shallow synchronized space will treat it as an update. */ -(void)testComplexLinkSyncWithoutSyncSpaceInstance { XCTestExpectation *expectation = [self expectationWithDescription:@""]; CDARequest* request = [self.client initialSynchronizationWithSuccess:^(CDAResponse *response, CDASyncedSpace *space) { CDASyncedSpace* shallowSyncSpace = [CDASyncedSpace shallowSyncSpaceWithToken:space.syncToken client:self.client]; shallowSyncSpace.delegate = self; shallowSyncSpace.lastSyncTimestamp = space.lastSyncTimestamp; [shallowSyncSpace performSynchronizationWithSuccess:^{ [shallowSyncSpace performSynchronizationWithSuccess:^{ [expectation fulfill]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; } failure:^(CDAResponse *response, NSError *error) { XCTFail(@"Error: %@", error); [expectation fulfill]; }]; XCTAssertNotNil(request, @""); [self waitForExpectationsWithTimeout:10.0 handler:nil]; XCTAssertEqual(0U, self.numberOfEntriesCreated, @""); XCTAssertEqual(1U, self.numberOfEntriesUpdated, @""); XCTAssertEqual(1U, self.numberOfEntriesDeleted, @""); } @end
{ "content_hash": "eac0da49c3813c1041821384ded80921", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 282, "avg_line_length": 42.983870967741936, "alnum_prop": 0.6626641651031895, "repo_name": "contentful/contentful.objc", "id": "67e6719d9780df6f1388947f3de9bc494cabf27b", "size": "5331", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Tests/ComplexLinkSyncTests.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "628" }, { "name": "Makefile", "bytes": "2413" }, { "name": "Objective-C", "bytes": "412815" }, { "name": "Ruby", "bytes": "9402" }, { "name": "Shell", "bytes": "1657" } ], "symlink_target": "" }
require 'rack/request' module RackCanonicalHost # Mock Rack application for testing class MockApp attr_accessor :last_request def call(env) self.last_request = Rack::Request.new(env) [200, {}, 'ok'] end end end
{ "content_hash": "896fcb2f13ec90f45549f83818ef0546", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 48, "avg_line_length": 20.166666666666668, "alnum_prop": 0.6652892561983471, "repo_name": "FXFusion/rack_canonical_host", "id": "42320c963066ed70039e3cfb07f094abd36787f8", "size": "242", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/helpers/mock_app.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "5103" }, { "name": "Shell", "bytes": "115" } ], "symlink_target": "" }
import os import shutil import six from tempfile import mkdtemp from ..exceptions import UnknownMethod, ShellError from .utils import ShellParser from .image import Parser as TesseractParser from distutils.spawn import find_executable class Parser(ShellParser): """Extract text from pdf files using either the ``pdftotext`` method (default) or the ``pdfminer`` method. """ def extract(self, filename, method='', **kwargs): if method == '' or method == 'pdftotext': try: return self.extract_pdftotext(filename, **kwargs) except ShellError as ex: # If pdftotext isn't installed and the pdftotext method # wasn't specified, then gracefully fallback to using # pdfminer instead. if method == '' and ex.is_not_installed(): return self.extract_pdfminer(filename, **kwargs) else: raise ex elif method == 'pdfminer': return self.extract_pdfminer(filename, **kwargs) elif method == 'tesseract': return self.extract_tesseract(filename, **kwargs) else: raise UnknownMethod(method) def extract_pdftotext(self, filename, **kwargs): """Extract text from pdfs using the pdftotext command line utility.""" if 'layout' in kwargs: args = ['pdftotext', '-layout', filename, '-'] else: args = ['pdftotext', filename, '-'] stdout, _ = self.run(args) return stdout def extract_pdfminer(self, filename, **kwargs): """Extract text from pdfs using pdfminer.""" #Nested try/except loops? Not great #Try the normal pdf2txt, if that fails try the python3 # pdf2txt, if that fails try the python2 pdf2txt pdf2txt_path = find_executable('pdf2txt.py') try: stdout, _ = self.run(['pdf2txt.py', filename]) except OSError: try: stdout, _ = self.run(['python3',pdf2txt_path, filename]) except ShellError: stdout, _ = self.run(['python2',pdf2txt_path, filename]) return stdout def extract_tesseract(self, filename, **kwargs): """Extract text from pdfs using tesseract (per-page OCR).""" temp_dir = mkdtemp() base = os.path.join(temp_dir, 'conv') contents = [] try: stdout, _ = self.run(['pdftoppm', filename, base]) for page in sorted(os.listdir(temp_dir)): page_path = os.path.join(temp_dir, page) page_content = TesseractParser().extract(page_path, **kwargs) contents.append(page_content) return six.b('').join(contents) finally: shutil.rmtree(temp_dir)
{ "content_hash": "1c4d7d0c065b8bed34d22a0f48d6cc16", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 78, "avg_line_length": 37.18421052631579, "alnum_prop": 0.581033262561925, "repo_name": "deanmalmgren/textract", "id": "9fe74e138cd035ea7dfb7135e6ef545386858587", "size": "2826", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "textract/parsers/pdf_parser.py", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "521" }, { "name": "HTML", "bytes": "491919" }, { "name": "Makefile", "bytes": "1548" }, { "name": "PostScript", "bytes": "968" }, { "name": "Python", "bytes": "58239" }, { "name": "Rich Text Format", "bytes": "78792" }, { "name": "Shell", "bytes": "3383" } ], "symlink_target": "" }
<!-- Safe sample input : get the field userData from the variable $_GET via an object Uses a number_int_filter via filter_var function File : use of untrusted data in one side of a quoted expression in a script --> <!--Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.--> <!DOCTYPE html> <html> <head> <script> <?php class Input{ private $input; public function getInput(){ return $this->input; } public function __construct(){ $this->input = $_GET['UserData'] ; } } $temp = new Input(); $tainted = $temp->getInput(); $sanitized = filter_var($tainted, FILTER_SANITIZE_NUMBER_INT); if (filter_var($sanitized, FILTER_VALIDATE_INT)) $tainted = $sanitized ; else $tainted = "" ; echo "x='". $tainted ."'" ; ?> </script> </head> <body> <h1>Hello World!</h1> </body> </html>
{ "content_hash": "0fb043753ef8e23e953bcd6171097443", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 75, "avg_line_length": 22.026666666666667, "alnum_prop": 0.7324455205811138, "repo_name": "stivalet/PHP-Vulnerability-test-suite", "id": "44e3527d7e53d74e07d5929576ad44e4d624bf76", "size": "1652", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "XSS/CWE_79/safe/CWE_79__object-classicGet__func_FILTER-CLEANING-number_int_filter__Use_untrusted_data_script-side_Quoted_Expr.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "64184004" } ], "symlink_target": "" }
package ru.stqa.javacourse.sandbox; import org.testng.Assert; import org.testng.annotations.Test; /** * Created by kostoa on 4/28/2017. */ public class SquareTests { @Test public void testArea() { Square s = new Square(5); Assert.assertEquals(s.area(), 25.0); } }
{ "content_hash": "cc1e36f80ba346876db7572d1c2dbc35", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 40, "avg_line_length": 17.6875, "alnum_prop": 0.6784452296819788, "repo_name": "annakostomarova/java_for_testers_course", "id": "0823bd2918809c210afc165328979ab71d9ba501", "size": "283", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sandbox/src/test/java/ru/stqa/javacourse/sandbox/SquareTests.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "66264" } ], "symlink_target": "" }
#include <neethi_assertion.h> #include <axiom_util.h> #include <axiom_node.h> #include <rp_x509_token.h> #include <rp_property.h> #include <rp_layout.h> #include <rp_algorithmsuite.h> #include <rp_wss10.h> #include <rp_wss11.h> #include <rp_trust10.h> #include <rp_supporting_tokens.h> #include <rp_username_token.h> #include <rp_asymmetric_binding.h> #include <rp_rampart_config.h> #include <rp_signed_encrypted_parts.h> #include <rp_symmetric_binding.h> #include <rp_transport_binding.h> #include <rp_saml_token.h> #include <rp_issued_token.h> struct neethi_assertion_t { void *value; neethi_assertion_type_t type; axutil_array_list_t *policy_components; axiom_element_t *element; axiom_node_t *node; axis2_bool_t is_optional; AXIS2_FREE_VOID_ARG free_func; }; AXIS2_EXTERN neethi_assertion_t *AXIS2_CALL neethi_assertion_create( const axutil_env_t *env) { neethi_assertion_t *neethi_assertion = NULL; AXIS2_ENV_CHECK(env, NULL); neethi_assertion = (neethi_assertion_t *)AXIS2_MALLOC(env->allocator, sizeof(neethi_assertion_t)); if(neethi_assertion == NULL) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory"); return NULL; } neethi_assertion->policy_components = NULL; neethi_assertion->policy_components = axutil_array_list_create(env, 0); if(!(neethi_assertion->policy_components)) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory"); return NULL; } neethi_assertion->value = NULL; neethi_assertion->type = ASSERTION_TYPE_UNKNOWN; neethi_assertion->element = NULL; neethi_assertion->is_optional = AXIS2_FALSE; neethi_assertion->node = NULL; neethi_assertion->free_func = 0; return neethi_assertion; } neethi_assertion_t *AXIS2_CALL neethi_assertion_create_with_args( const axutil_env_t *env, AXIS2_FREE_VOID_ARG free_func, void *value, neethi_assertion_type_t type) { neethi_assertion_t *neethi_assertion = NULL; neethi_assertion = (neethi_assertion_t *)AXIS2_MALLOC(env->allocator, sizeof(neethi_assertion_t)); if(!neethi_assertion) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Neethi assertion creation failed. Out of memory"); return NULL; } neethi_assertion->policy_components = NULL; neethi_assertion->policy_components = axutil_array_list_create(env, 0); if(!(neethi_assertion->policy_components)) { AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Neethi assertion policy components creation failed."); return NULL; } /* This ref count is for asertions which are represented from a struct. * These assertion structs are more probably referenced from some other * struct. So we need to increment the ref count in order to prevent * unnecessary memory freeing */ if(type == ASSERTION_TYPE_X509_TOKEN) { rp_x509_token_increment_ref((rp_x509_token_t *)value, env); } else if(type == ASSERTION_TYPE_SECURITY_CONTEXT_TOKEN) { rp_security_context_token_increment_ref((rp_security_context_token_t *)value, env); } else if(type == ASSERTION_TYPE_INITIATOR_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_RECIPIENT_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_PROTECTION_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_ENCRYPTION_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_TRANSPORT_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_SIGNATURE_TOKEN) { rp_property_increment_ref((rp_property_t *)value, env); } else if(type == ASSERTION_TYPE_LAYOUT) { rp_layout_increment_ref((rp_layout_t *)value, env); } else if(type == ASSERTION_TYPE_ALGORITHM_SUITE) { rp_algorithmsuite_increment_ref((rp_algorithmsuite_t *)value, env); } else if(type == ASSERTION_TYPE_WSS10) { rp_wss10_increment_ref((rp_wss10_t *)value, env); } else if(type == ASSERTION_TYPE_WSS11) { rp_wss11_increment_ref((rp_wss11_t *)value, env); } else if(type == ASSERTION_TYPE_TRUST10) { rp_trust10_increment_ref((rp_trust10_t *)value, env); } else if(type == ASSERTION_TYPE_SUPPORTING_TOKENS) { rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env); } else if(type == ASSERTION_TYPE_USERNAME_TOKEN) { rp_username_token_increment_ref((rp_username_token_t *)value, env); } else if(type == ASSERTION_TYPE_ASSYMMETRIC_BINDING) { rp_asymmetric_binding_increment_ref((rp_asymmetric_binding_t *)value, env); } else if(type == ASSERTION_TYPE_SYMMETRIC_BINDING) { rp_symmetric_binding_increment_ref((rp_symmetric_binding_t *)value, env); } else if(type == ASSERTION_TYPE_TRANSPORT_BINDING) { rp_transport_binding_increment_ref((rp_transport_binding_t *)value, env); } else if(type == ASSERTION_TYPE_SIGNED_ENCRYPTED_PARTS) { rp_signed_encrypted_parts_increment_ref((rp_signed_encrypted_parts_t *)value, env); } else if(type == ASSERTION_TYPE_RAMPART_CONFIG) { rp_rampart_config_increment_ref((rp_rampart_config_t *)value, env); } else if(type == ASSERTION_TYPE_ISSUED_TOKEN) { rp_issued_token_increment_ref((rp_issued_token_t *)value, env); } else if(type == ASSERTION_TYPE_SAML_TOKEN) { rp_saml_token_increment_ref((rp_saml_token_t *)value, env); } neethi_assertion->value = value; neethi_assertion->type = type; neethi_assertion->element = NULL; neethi_assertion->is_optional = AXIS2_FALSE; neethi_assertion->node = NULL; neethi_assertion->free_func = free_func; return neethi_assertion; } AXIS2_EXTERN void AXIS2_CALL neethi_assertion_free( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { if(neethi_assertion) { if(neethi_assertion->policy_components) { int i = 0; for(i = 0; i < axutil_array_list_size(neethi_assertion->policy_components, env); i++) { neethi_operator_t *operator = NULL; operator = (neethi_operator_t *)axutil_array_list_get( neethi_assertion->policy_components, env, i); if(operator) neethi_operator_free(operator, env); operator = NULL; } axutil_array_list_free(neethi_assertion->policy_components, env); neethi_assertion->policy_components = NULL; } if(neethi_assertion->value) { if(neethi_assertion->free_func) { neethi_assertion->free_func(neethi_assertion->value, env); } } if(neethi_assertion->node) { axiom_node_free_tree(neethi_assertion->node, env); neethi_assertion->node = NULL; } AXIS2_FREE(env->allocator, neethi_assertion); neethi_assertion = NULL; } return; } /* Implementations */ AXIS2_EXTERN neethi_assertion_type_t AXIS2_CALL neethi_assertion_get_type( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return neethi_assertion->type; } AXIS2_EXTERN void *AXIS2_CALL neethi_assertion_get_value( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return neethi_assertion->value; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_set_value( neethi_assertion_t *neethi_assertion, const axutil_env_t *env, void *value, neethi_assertion_type_t type) { neethi_assertion->type = type; if(type == ASSERTION_TYPE_X509_TOKEN) { rp_x509_token_increment_ref((rp_x509_token_t *)value, env); } neethi_assertion->value = (void *)value; return AXIS2_SUCCESS; } AXIS2_EXTERN axiom_element_t *AXIS2_CALL neethi_assertion_get_element( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { AXIS2_ENV_CHECK(env, AXIS2_FAILURE); return neethi_assertion->element; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_set_element( neethi_assertion_t *neethi_assertion, const axutil_env_t *env, axiom_element_t *element) { neethi_assertion->element = element; return AXIS2_SUCCESS; } AXIS2_EXTERN axiom_node_t *AXIS2_CALL neethi_assertion_get_node( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return neethi_assertion->node; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_set_node( neethi_assertion_t *neethi_assertion, const axutil_env_t *env, axiom_node_t * node) { if(neethi_assertion->node) { axiom_node_free_tree(neethi_assertion->node, env); neethi_assertion->node = NULL; } if(node) { neethi_assertion->node = axiom_util_clone_node(env, node); } return AXIS2_SUCCESS; } AXIS2_EXTERN axis2_bool_t AXIS2_CALL neethi_assertion_get_is_optional( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return neethi_assertion->is_optional; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_set_is_optional( neethi_assertion_t *neethi_assertion, const axutil_env_t *env, axis2_bool_t is_optional) { neethi_assertion->is_optional = is_optional; return AXIS2_SUCCESS; } AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL neethi_assertion_get_policy_components( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return neethi_assertion->policy_components; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_add_policy_components( neethi_assertion_t *neethi_assertion, axutil_array_list_t *arraylist, const axutil_env_t *env) { int size = axutil_array_list_size(arraylist, env); int i = 0; if(axutil_array_list_ensure_capacity(neethi_assertion->policy_components, env, size + 1) != AXIS2_SUCCESS) return AXIS2_FAILURE; for(i = 0; i < size; i++) { void *value = NULL; value = axutil_array_list_get(arraylist, env, i); neethi_operator_increment_ref((neethi_operator_t *)value, env); axutil_array_list_add(neethi_assertion->policy_components, env, value); } return AXIS2_SUCCESS; } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_add_operator( neethi_assertion_t *neethi_assertion, const axutil_env_t *env, neethi_operator_t *operator) { neethi_operator_increment_ref(operator, env); axutil_array_list_add(neethi_assertion->policy_components, env, operator); return AXIS2_SUCCESS; } AXIS2_EXTERN axis2_bool_t AXIS2_CALL neethi_assertion_is_empty( neethi_assertion_t *neethi_assertion, const axutil_env_t *env) { return axutil_array_list_is_empty(neethi_assertion->policy_components, env); } AXIS2_EXTERN axis2_status_t AXIS2_CALL neethi_assertion_serialize( neethi_assertion_t *assertion, axiom_node_t *parent, const axutil_env_t *env) { axiom_node_t *node = NULL; if(assertion->node) { node = axiom_util_clone_node(env, assertion->node); } if(!node) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "assertion node creation failed. Cannot serialize assertion"); return AXIS2_FAILURE; } axiom_node_add_child(parent, env, node); return AXIS2_SUCCESS; }
{ "content_hash": "51ecca9bb8aa1f94a2aac9ec1ef1ba0a", "timestamp": "", "source": "github", "line_count": 415, "max_line_length": 99, "avg_line_length": 28.94457831325301, "alnum_prop": 0.6505994005994006, "repo_name": "MI-LA01/kt_wso2-php5.3", "id": "86597dc103eb3a8aaa7be5cc1860af083e162916", "size": "12814", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "wsf_c/axis2c/neethi/src/assertion.c", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "6037" }, { "name": "C", "bytes": "17550697" }, { "name": "C++", "bytes": "982562" }, { "name": "CSS", "bytes": "18954" }, { "name": "HTML", "bytes": "611390" }, { "name": "JavaScript", "bytes": "8450" }, { "name": "Makefile", "bytes": "147221" }, { "name": "Objective-C", "bytes": "8687" }, { "name": "PHP", "bytes": "495961" }, { "name": "Perl", "bytes": "398" }, { "name": "Shell", "bytes": "101791" }, { "name": "XSLT", "bytes": "412479" } ], "symlink_target": "" }
package im.tny.segvault.disturbances; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("im.tny.segvault.disturbances", appContext.getPackageName()); } }
{ "content_hash": "41988b23099420ed99d43066a6d4b932", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 82, "avg_line_length": 29.615384615384617, "alnum_prop": 0.7506493506493507, "repo_name": "gbl08ma/underlx", "id": "986a7adcbbccc6c7f1029bd8d4c9b092aa530882", "size": "770", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/androidTest/java/im/tny/segvault/disturbances/ExampleInstrumentedTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "52402" }, { "name": "Java", "bytes": "696292" }, { "name": "JavaScript", "bytes": "22246" } ], "symlink_target": "" }
<?php /** * TOP API: taobao.vas.subscribe.get request * * @author auto create * @since 1.0, 2013-09-13 16:51:03 */ class Taobao_Request_VasSubscribeGetRequest { /** * 应用收费代码,从合作伙伴后台(my.open.taobao.com)-收费管理-收费项目列表 能够获得该应用的收费代码 **/ private $articleCode; /** * 淘宝会员名 **/ private $nick; private $apiParas = array(); public function setArticleCode($articleCode) { $this->articleCode = $articleCode; $this->apiParas["article_code"] = $articleCode; } public function getArticleCode() { return $this->articleCode; } public function setNick($nick) { $this->nick = $nick; $this->apiParas["nick"] = $nick; } public function getNick() { return $this->nick; } public function getApiMethodName() { return "taobao.vas.subscribe.get"; } public function getApiParas() { return $this->apiParas; } public function check() { Taobao_RequestCheckUtil::checkNotNull($this->articleCode, "articleCode"); Taobao_RequestCheckUtil::checkNotNull($this->nick, "nick"); } public function putOtherTextParam($key, $value) { $this->apiParas[$key] = $value; $this->$key = $value; } }
{ "content_hash": "501662c366c2fcd632bff0daa9546d35", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 75, "avg_line_length": 19.32758620689655, "alnum_prop": 0.6726137377341659, "repo_name": "musicsnap/LearnCode", "id": "07771f069b7901a62807f068167553937ebcf868", "size": "1207", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "php/code/yaf/application/library/Taobao/Request/VasSubscribeGetRequest.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "803" }, { "name": "Batchfile", "bytes": "21" }, { "name": "CSS", "bytes": "270661" }, { "name": "CoffeeScript", "bytes": "8794" }, { "name": "HTML", "bytes": "1171968" }, { "name": "JavaScript", "bytes": "1779848" }, { "name": "Makefile", "bytes": "4712" }, { "name": "MoonScript", "bytes": "316" }, { "name": "PHP", "bytes": "10997551" }, { "name": "Python", "bytes": "7135" }, { "name": "Ruby", "bytes": "5478" }, { "name": "Shell", "bytes": "2664" } ], "symlink_target": "" }
package com.jayway.jsonpath.internal.path; import com.jayway.jsonpath.InvalidPathException; import com.jayway.jsonpath.Option; import com.jayway.jsonpath.PathNotFoundException; import static java.lang.String.format; public abstract class ArrayPathToken extends PathToken { /** * Check if model is non-null and array. * @param currentPath * @param model * @param ctx * @return false if current evaluation call must be skipped, true otherwise * @throws PathNotFoundException if model is null and evaluation must be interrupted * @throws InvalidPathException if model is not an array and evaluation must be interrupted */ protected boolean checkArrayModel(String currentPath, Object model, EvaluationContextImpl ctx) { if (model == null){ if (!isUpstreamDefinite() || ctx.options().contains(Option.SUPPRESS_EXCEPTIONS)) { return false; } else { throw new PathNotFoundException("The path " + currentPath + " is null"); } } if (!ctx.jsonProvider().isArray(model)) { if (!isUpstreamDefinite() || ctx.options().contains(Option.SUPPRESS_EXCEPTIONS)) { return false; } else { throw new PathNotFoundException(format("Filter: %s can only be applied to arrays. Current context is: %s", toString(), model)); } } return true; } }
{ "content_hash": "30c95ea7b4c6bc12a17aec2f770c58e1", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 143, "avg_line_length": 37.225, "alnum_prop": 0.6292813969106783, "repo_name": "json-path/JsonPath", "id": "e3a913aee70bd00edcbbc6b9a10007e6a6b6f858", "size": "2102", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "json-path/src/main/java/com/jayway/jsonpath/internal/path/ArrayPathToken.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Groovy", "bytes": "6380" }, { "name": "HTML", "bytes": "15940" }, { "name": "Java", "bytes": "884046" }, { "name": "JavaScript", "bytes": "3809" }, { "name": "Procfile", "bytes": "173" } ], "symlink_target": "" }
package org.jnosql.artemis; import org.jnosql.diana.api.column.ColumnEntity; import org.jnosql.diana.api.column.ColumnFamilyManager; import org.jnosql.diana.api.column.ColumnFamilyManagerAsync; import org.mockito.Mockito; import javax.enterprise.inject.Produces; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class MockProducer { @Produces public ColumnFamilyManager getColumnFamilyManager() { ColumnEntity entity = ColumnEntity.of("Person"); entity.add(org.jnosql.diana.api.column.Column.of("name", "Default")); entity.add(org.jnosql.diana.api.column.Column.of("age", 10)); ColumnFamilyManager manager = mock(ColumnFamilyManager.class); when(manager.insert(Mockito.any(ColumnEntity.class))).thenReturn(entity); return manager; } @Produces @Database(value = DatabaseType.COLUMN, provider = "columnRepositoryMock") public ColumnFamilyManager getColumnFamilyManagerMock() { ColumnEntity entity = ColumnEntity.of("Person"); entity.add(org.jnosql.diana.api.column.Column.of("name", "columnRepositoryMock")); entity.add(org.jnosql.diana.api.column.Column.of("age", 10)); ColumnFamilyManager manager = mock(ColumnFamilyManager.class); when(manager.insert(Mockito.any(ColumnEntity.class))).thenReturn(entity); return manager; } @Produces public ColumnFamilyManagerAsync getColumnFamilyManagerAsync() { return Mockito.mock(ColumnFamilyManagerAsync.class); } @Produces @Database(value = DatabaseType.COLUMN, provider = "columnRepositoryMock") public ColumnFamilyManagerAsync getColumnFamilyManagerAsyncMock() { return Mockito.mock(ColumnFamilyManagerAsync.class); } }
{ "content_hash": "0cfc0c2254dac7af34fa94158f55ed9c", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 90, "avg_line_length": 33.64150943396226, "alnum_prop": 0.7319125070106562, "repo_name": "JNOSQL/artemis", "id": "7e20d459a0cb729b9a4aa1ab375e0e434716cf45", "size": "2364", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "artemis-column/src/test/java/org/jnosql/artemis/MockProducer.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "689185" } ], "symlink_target": "" }
package it.uniroma2.sag.kelp.data.representation.tree.node.filter; import it.uniroma2.sag.kelp.data.representation.structure.filter.StructureElementFilter; import it.uniroma2.sag.kelp.data.representation.tree.node.TreeNode; /** * This implementation of <code>TreeNodeFilter</code> selects only treeNode containing * a StructureElement interesting w.r.t. a <code>StructureElementFilter</code> * * @author Simone Filice * */ public class ContentBasedTreeNodeFilter implements TreeNodeFilter{ private StructureElementFilter elementFilter; /** * Constructor for ContentBasedTreeNodeFilter * * @param elementFilter a StructureElementFilter to be used for selecting tree nodes of * interest by the method <code>isNodeOfInterest</code> */ public ContentBasedTreeNodeFilter(StructureElementFilter elementFilter) { this.elementFilter = elementFilter; } @Override public boolean isNodeOfInterest(TreeNode node) { return elementFilter.isElementOfInterest(node.getContent()); } }
{ "content_hash": "44762d33113705cbcc8a003a75c67c51", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 88, "avg_line_length": 29.58823529411765, "alnum_prop": 0.7932405566600398, "repo_name": "SAG-KeLP/kelp-additional-kernels", "id": "4e6ca590fd6ee8456e5059e7df63291955116fc1", "size": "1720", "binary": false, "copies": "2", "ref": "refs/heads/development", "path": "src/main/java/it/uniroma2/sag/kelp/data/representation/tree/node/filter/ContentBasedTreeNodeFilter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "279577" } ], "symlink_target": "" }
layout: post title: "Bayesian Inference Part 1: My Picky Cat Parker." date: 2017-06-27 00:08:00 -0500 categories: general --- <style> table{ border-collapse: collapse; border-spacing: 0; } th{ border:1px solid #000000; Padding:5px; } td{ border:1px solid #000000; padding:5px; } </style> ![Parker]({{ site.url }}/images/Parker.jpg) ## Introduction This is the first of two blog posts regarding Bayes' Theorem and Bayesian Inference and its application in data science. The intention of these posts is simply to introduce and explain these concepts at a very high level. There are a number of thorough resources available that go into these topics in much more detail. The point here is to have some fun with this and potentially show the value of Bayesian thinking when it comes to data science. This first post is dedicated to one of our two cats. His name is Parker. Our other cat Zoe will get a blog post of her own someday. Don't worry, I am not playing favorites. ## "Get off the damn counter!" My kids have heard me say that more than once. It was not directed at them, but at our cat, Parker. Parker is known for two things: - Holding down our beds. - Jumping up on the counter. As for the first point, let's just say that Parker doesn't like to waste his energy. As for the second, Parker particularly likes to jump on the counter when there is a serving plate with food there. Consider the following table that shows the frequency that Parker jumps up on the counter when we place food there. **Parker jumping up on the counter vs staying on the floor:** | Jump | Stay | | --- | --- | | 11 | 9 | (Note: This data was created with a simulated Parker. The actual Parker is resting on our bed and I didn't want to disturb him.): ![Resting Parker]({{ site.url }}/images/resting_parker.jpg) ### A Frequentist Approach A frequentist approach to this data suggest that there is a slightly better than 50% chance that Parker will jump up on the counter. Running the test over and over to get a bigger sample size would help better nail down the probability that Parker will jump on the counter. Or would it? It turns out that there is more going on here. With a little Bayesian thinking, we can reach a different conclusion. And, in the process, not disturb the sleeping Parker. I'm sure he would approve. ### Bayesian Approach: Conditional Probabilities Let's say we had access to more information than is shown in the above table. For instance, what if we know that Parker is particularly fond of salmon. Let's take a look at that data again and this time take into account the type of food that is sitting on the counter: **Conditional results for Parker jumping up on the counter:** Food on Counter | Jump | Stay --- | --- | --- Salmon | 9 | 1 Not Salmon | 2 | 8 Intuition tells us, based on this data, that if we put salmon on the counter it is more likely that Parker will jump up there than if there is some other kind of food involved. We can use Bayes' Theorem to get a sense for what the probability is if we put salmon on the counter. Bayes' Theorem looks like this: ![Bayes' Theorem]({{ site.url }}/images/bayes_theorem.png) Let's use this theorem and the table that we have above to see if we can compute the probability that Parker will jump on the counter the next time we serve salmon. P(A&#124;B) This is the probability that Parker will jump on the counter given that we are serving salmon. It is also called the "posterior probability". This is what we are trying to figure out. P(B&#124;A) This the probability that we served salmon given that Parker jumped up on the counter. This would be 9/11 = .8182 P(A) This is the probability of the outcome occurring without knowledge of new data. It is reflected in the first table, or 11/20 = .55 P(B) This is the probability of the evidence arising. For us it is 10/20 because we served salmon 10 out of 20 times. Plugging those numbers into the equation above we get: P(A&#124;B) = (0.8182 * 0.55) / 0.5 = 0.9 Now, look back at the data table above. Note that Parker jumped up on the counter 9 out of 10 times when we served salmon. So, based on our data, we can see that the probability of Parker jumping up on the counter when we serve salmon is 9/10 or .9. Bayes' Theorem gives us the exact same answer. In this case we really didn't need Bayes' Theorem to calculate the results. However what if we didn't have a nice simple data table like the one above. ## A More Complicated Example (Taken from Introduction to Probability and Statistics, Second Edition by J.S. Milton and Jesse C. Arnold, McGraw-Hill Publishing 1990. ISBN: 0-07-042353-9) >A test has ben developed to detect a particular type of arthritis in individuals over 50 years old. From a national survey, it is known that approximately 10% of the individuals in this age group suffer from this form of arthritis. The proposed test was given to individuals with confirmed arthritic disease, and a correct test result was obtained in 85% of the cases. When the test was administered to individuals of the same age group who were known to be free of the disease, 4% were reported to have the disease. What is the probability that an individual has this disease given that the test indicates its presence. So, from the above, we know: P(A&#124;B) This is the posterior probability and is what we are looking for. The probability that an individual has the disease given that the test says they do. P(A) = the probability of having the disease = .1 P(B&#124;A) = the probability of the test being positive given the disease is present = .85 So far, these have all been easy. They are just taken directly from the problem. Now for the tricky one... P(B) = the probability that the test is positive and the disease is present plus the probability that the test is positive but the disease is NOT present. (We annotate not with a "~")... ![Bayes' Theorem]({{ site.url }}/images/eq_2.png) \= ![Bayes' Theorem]({{ site.url }}/images/eq_2b.png) Substituting this all back into Bayes' Theorem we have ![Bayes' Theorem]({{ site.url }}/images/eq_3.png) ### It is somewhat remarkable that we can only be around 70% confident based on a test that is 85% accurate! ## Conclusion In this short blog post we explored using Bayes' Theorem to arrive at conditional probabilities. Check out my next blog post where we will explore using a technique called Bayesian Inference on tweets by President Trump. It is sure to be entertaining! ## More Resources For this blog post, I borrowed heavily from a number of resources. I would encourage anyone interested in learning more about Bayesian techniques to check them out. - [http://www.kevinboone.net/bayes.html]() - [https://www.countbayesie.com/blog/2015/2/18/bayes-theorem-with-lego]() - [https://www.math.hmc.edu/funfacts/ffiles/30002.6.shtml]() - [https://www.analyticsvidhya.com/blog/2016/06/bayesian-statistics-beginners-simple-english/]() - [https://www.coursera.org/learn/mcmc-bayesian-statistics/home/welcome]()
{ "content_hash": "32d3e94e572a90a9790e15adaadfbfe4", "timestamp": "", "source": "github", "line_count": 134, "max_line_length": 625, "avg_line_length": 53.87313432835821, "alnum_prop": 0.7377753151406012, "repo_name": "fractalbass/data_science", "id": "89b1ae67b90ab63f3b4fd83f5879827f8348fe46", "size": "7223", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2017-06-30-data_science_6.markdown", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "1470540" }, { "name": "Ruby", "bytes": "881" }, { "name": "SCSS", "bytes": "11691" }, { "name": "Shell", "bytes": "1045" } ], "symlink_target": "" }
#include <linux/errno.h> #include <linux/threads.h> #include <linux/cpumask.h> #include <linux/string.h> #include <linux/kernel.h> #include <linux/ctype.h> #include <linux/init.h> #include <asm/smp.h> #include <asm/ipi.h> #include <asm/genapic.h> static cpumask_t flat_target_cpus(void) { return cpu_online_map; } static cpumask_t flat_vector_allocation_domain(int cpu) { /* Careful. Some cpus do not strictly honor the set of cpus * specified in the interrupt destination when using lowest * priority interrupt delivery mode. * * In particular there was a hyperthreading cpu observed to * deliver interrupts to the wrong hyperthread when only one * hyperthread was specified in the interrupt desitination. */ cpumask_t domain = { { [0] = APIC_ALL_CPUS, } }; return domain; } /* * Set up the logical destination ID. * * Intel recommends to set DFR, LDR and TPR before enabling * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel * document number 292116). So here it goes... */ static void flat_init_apic_ldr(void) { unsigned long val; unsigned long num, id; num = smp_processor_id(); id = 1UL << num; x86_cpu_to_log_apicid[num] = id; apic_write(APIC_DFR, APIC_DFR_FLAT); val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; val |= SET_APIC_LOGICAL_ID(id); apic_write(APIC_LDR, val); } static void flat_send_IPI_mask(cpumask_t cpumask, int vector) { unsigned long mask = cpus_addr(cpumask)[0]; unsigned long flags; local_irq_save(flags); __send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL); local_irq_restore(flags); } static void flat_send_IPI_allbutself(int vector) { #ifdef CONFIG_HOTPLUG_CPU int hotplug = 1; #else int hotplug = 0; #endif if (hotplug || vector == NMI_VECTOR) { cpumask_t allbutme = cpu_online_map; cpu_clear(smp_processor_id(), allbutme); if (!cpus_empty(allbutme)) flat_send_IPI_mask(allbutme, vector); } else if (num_online_cpus() > 1) { __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); } } static void flat_send_IPI_all(int vector) { if (vector == NMI_VECTOR) flat_send_IPI_mask(cpu_online_map, vector); else __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); } static int flat_apic_id_registered(void) { return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map); } static unsigned int flat_cpu_mask_to_apicid(cpumask_t cpumask) { return cpus_addr(cpumask)[0] & APIC_ALL_CPUS; } static unsigned int phys_pkg_id(int index_msb) { return hard_smp_processor_id() >> index_msb; } struct genapic apic_flat = { .name = "flat", .int_delivery_mode = dest_LowestPrio, .int_dest_mode = (APIC_DEST_LOGICAL != 0), .target_cpus = flat_target_cpus, .vector_allocation_domain = flat_vector_allocation_domain, .apic_id_registered = flat_apic_id_registered, .init_apic_ldr = flat_init_apic_ldr, .send_IPI_all = flat_send_IPI_all, .send_IPI_allbutself = flat_send_IPI_allbutself, .send_IPI_mask = flat_send_IPI_mask, .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, .phys_pkg_id = phys_pkg_id, }; /* * Physflat mode is used when there are more than 8 CPUs on a AMD system. * We cannot use logical delivery in this case because the mask * overflows, so use physical mode. */ static cpumask_t physflat_target_cpus(void) { return cpu_online_map; } static cpumask_t physflat_vector_allocation_domain(int cpu) { cpumask_t domain = CPU_MASK_NONE; cpu_set(cpu, domain); return domain; } static void physflat_send_IPI_mask(cpumask_t cpumask, int vector) { send_IPI_mask_sequence(cpumask, vector); } static void physflat_send_IPI_allbutself(int vector) { cpumask_t allbutme = cpu_online_map; cpu_clear(smp_processor_id(), allbutme); physflat_send_IPI_mask(allbutme, vector); } static void physflat_send_IPI_all(int vector) { physflat_send_IPI_mask(cpu_online_map, vector); } static unsigned int physflat_cpu_mask_to_apicid(cpumask_t cpumask) { int cpu; /* * We're using fixed IRQ delivery, can only return one phys APIC ID. * May as well be the first. */ cpu = first_cpu(cpumask); if ((unsigned)cpu < NR_CPUS) return x86_cpu_to_apicid[cpu]; else return BAD_APICID; } struct genapic apic_physflat = { .name = "physical flat", .int_delivery_mode = dest_Fixed, .int_dest_mode = (APIC_DEST_PHYSICAL != 0), .target_cpus = physflat_target_cpus, .vector_allocation_domain = physflat_vector_allocation_domain, .apic_id_registered = flat_apic_id_registered, .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ .send_IPI_all = physflat_send_IPI_all, .send_IPI_allbutself = physflat_send_IPI_allbutself, .send_IPI_mask = physflat_send_IPI_mask, .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, .phys_pkg_id = phys_pkg_id, };
{ "content_hash": "3df05b3d5a1a719c693b7e94bd23485a", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 76, "avg_line_length": 25.524324324324326, "alnum_prop": 0.7077509529860229, "repo_name": "ut-osa/laminar", "id": "ecb01eefdd27b4b63c14352f0fff569ef9d60eca", "size": "4997", "binary": false, "copies": "42", "ref": "refs/heads/master", "path": "linux-2.6.22.6/arch/x86_64/kernel/genapic_flat.c", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ASP", "bytes": "4526" }, { "name": "Assembly", "bytes": "7753785" }, { "name": "Awk", "bytes": "5239" }, { "name": "Bison", "bytes": "75151" }, { "name": "C", "bytes": "209779557" }, { "name": "C++", "bytes": "5954668" }, { "name": "CSS", "bytes": "11885" }, { "name": "Java", "bytes": "12132154" }, { "name": "Makefile", "bytes": "731243" }, { "name": "Objective-C", "bytes": "564040" }, { "name": "Perl", "bytes": "196100" }, { "name": "Python", "bytes": "11786" }, { "name": "Ruby", "bytes": "3219" }, { "name": "Scala", "bytes": "12158" }, { "name": "Scilab", "bytes": "22980" }, { "name": "Shell", "bytes": "205177" }, { "name": "TeX", "bytes": "62636" }, { "name": "UnrealScript", "bytes": "20822" }, { "name": "XSLT", "bytes": "6544" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Lab - 03.After 30 minutes")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Lab - 03.After 30 minutes")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("b2ad78cc-a091-4fc8-a014-535e4e049214")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "79195127507f08a4e1879a9f015c6f89", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 39.388888888888886, "alnum_prop": 0.7440056417489421, "repo_name": "AJMitev/CSharp-Programming-Fundamentals", "id": "c0ca5e5d61c1c95d4914d9b595a12ba711cbcc23", "size": "1421", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "01.Conditional Statements and Loops/Lab - 03.After 30 minutes/Properties/AssemblyInfo.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "552268" } ], "symlink_target": "" }
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.RollbackError = exports.CommitError = exports.RetryableError = exports.LockedWaitTimeoutError = exports.LockedError = undefined; var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn'); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = require('babel-runtime/helpers/inherits'); var _inherits3 = _interopRequireDefault(_inherits2); var _create = require('babel-runtime/core-js/object/create'); var _create2 = _interopRequireDefault(_create); var _setPrototypeOf = require('babel-runtime/core-js/object/set-prototype-of'); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // babel don't support extends built-in class // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error // http://stackoverflow.com/questions/33870684/why-doesnt-instanceof-work-on-instances-of-error-subclasses-under-babel-node var ErrorWrapper = function ErrorWrapper(msg) { var rawErr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; (0, _classCallCheck3.default)(this, ErrorWrapper); (0, _setPrototypeOf2.default)(this, this.constructor.prototype); this.name = this.constructor.name; this.message = msg + ':' + rawErr.message; this.stack = rawErr.stack; if (!this.stack) { Error.captureStackTrace(this, this.constructor); } }; ErrorWrapper.prototype = (0, _create2.default)(Error.prototype); ErrorWrapper.prototype.constructor = ErrorWrapper; var LockedError = exports.LockedError = function (_ErrorWrapper) { (0, _inherits3.default)(LockedError, _ErrorWrapper); function LockedError() { (0, _classCallCheck3.default)(this, LockedError); return (0, _possibleConstructorReturn3.default)(this, (LockedError.__proto__ || (0, _getPrototypeOf2.default)(LockedError)).apply(this, arguments)); } return LockedError; }(ErrorWrapper); var LockedWaitTimeoutError = exports.LockedWaitTimeoutError = function (_LockedError) { (0, _inherits3.default)(LockedWaitTimeoutError, _LockedError); function LockedWaitTimeoutError() { (0, _classCallCheck3.default)(this, LockedWaitTimeoutError); return (0, _possibleConstructorReturn3.default)(this, (LockedWaitTimeoutError.__proto__ || (0, _getPrototypeOf2.default)(LockedWaitTimeoutError)).apply(this, arguments)); } return LockedWaitTimeoutError; }(LockedError); var RetryableError = exports.RetryableError = function (_ErrorWrapper2) { (0, _inherits3.default)(RetryableError, _ErrorWrapper2); function RetryableError() { (0, _classCallCheck3.default)(this, RetryableError); return (0, _possibleConstructorReturn3.default)(this, (RetryableError.__proto__ || (0, _getPrototypeOf2.default)(RetryableError)).apply(this, arguments)); } return RetryableError; }(ErrorWrapper); var CommitError = exports.CommitError = function (_RetryableError) { (0, _inherits3.default)(CommitError, _RetryableError); function CommitError() { (0, _classCallCheck3.default)(this, CommitError); return (0, _possibleConstructorReturn3.default)(this, (CommitError.__proto__ || (0, _getPrototypeOf2.default)(CommitError)).apply(this, arguments)); } return CommitError; }(RetryableError); var RollbackError = exports.RollbackError = function (_RetryableError2) { (0, _inherits3.default)(RollbackError, _RetryableError2); function RollbackError() { (0, _classCallCheck3.default)(this, RollbackError); return (0, _possibleConstructorReturn3.default)(this, (RollbackError.__proto__ || (0, _getPrototypeOf2.default)(RollbackError)).apply(this, arguments)); } return RollbackError; }(RetryableError);
{ "content_hash": "15596756103b16ce3c91c8135cc78c24", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 174, "avg_line_length": 38.971698113207545, "alnum_prop": 0.7513919147906076, "repo_name": "zaaack/mongo-tx", "id": "39f55fe381026ba542f5644ae53b7270af151442", "size": "4131", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/errors/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "99449" } ], "symlink_target": "" }
import numpy as np import packaging import pytest from ...data.io_pyro import from_pyro # pylint: disable=wrong-import-position from ..helpers import ( # pylint: disable=unused-import, wrong-import-position chains, check_multiple_attrs, draws, eight_schools_params, importorskip, load_cached_models, ) # Skip all tests if pyro or pytorch not installed torch = importorskip("torch") pyro = importorskip("pyro") Predictive = pyro.infer.Predictive dist = pyro.distributions class TestDataPyro: @pytest.fixture(scope="class") def data(self, eight_schools_params, draws, chains): class Data: obj = load_cached_models(eight_schools_params, draws, chains, "pyro")["pyro"] return Data @pytest.fixture(scope="class") def predictions_params(self): """Predictions data for eight schools.""" return { "J": 8, "sigma": np.array([5.0, 7.0, 12.0, 4.0, 6.0, 10.0, 3.0, 9.0]), } @pytest.fixture(scope="class") def predictions_data(self, data, predictions_params): """Generate predictions for predictions_params""" posterior_samples = data.obj.get_samples() model = data.obj.kernel.model predictions = Predictive(model, posterior_samples)( predictions_params["J"], torch.from_numpy(predictions_params["sigma"]).float() ) return predictions def get_inference_data(self, data, eight_schools_params, predictions_data): posterior_samples = data.obj.get_samples() model = data.obj.kernel.model posterior_predictive = Predictive(model, posterior_samples)( eight_schools_params["J"], torch.from_numpy(eight_schools_params["sigma"]).float() ) prior = Predictive(model, num_samples=500)( eight_schools_params["J"], torch.from_numpy(eight_schools_params["sigma"]).float() ) predictions = predictions_data return from_pyro( posterior=data.obj, prior=prior, posterior_predictive=posterior_predictive, predictions=predictions, coords={ "school": np.arange(eight_schools_params["J"]), "school_pred": np.arange(eight_schools_params["J"]), }, dims={"theta": ["school"], "eta": ["school"], "obs": ["school"]}, pred_dims={"theta": ["school_pred"], "eta": ["school_pred"], "obs": ["school_pred"]}, ) def test_inference_data(self, data, eight_schools_params, predictions_data): inference_data = self.get_inference_data(data, eight_schools_params, predictions_data) test_dict = { "posterior": ["mu", "tau", "eta"], "sample_stats": ["diverging"], "posterior_predictive": ["obs"], "predictions": ["obs"], "prior": ["mu", "tau", "eta"], "prior_predictive": ["obs"], } fails = check_multiple_attrs(test_dict, inference_data) assert not fails # test dims dims = inference_data.posterior_predictive.dims["school"] pred_dims = inference_data.predictions.dims["school_pred"] assert dims == 8 assert pred_dims == 8 @pytest.mark.skipif( packaging.version.parse(pyro.__version__) < packaging.version.parse("1.0.0"), reason="requires pyro 1.0.0 or higher", ) def test_inference_data_has_log_likelihood_and_observed_data(self, data): idata = from_pyro(data.obj) test_dict = {"log_likelihood": ["obs"], "observed_data": ["obs"]} fails = check_multiple_attrs(test_dict, idata) assert not fails def test_inference_data_no_posterior( self, data, eight_schools_params, predictions_data, predictions_params ): posterior_samples = data.obj.get_samples() model = data.obj.kernel.model posterior_predictive = Predictive(model, posterior_samples)( eight_schools_params["J"], torch.from_numpy(eight_schools_params["sigma"]).float() ) prior = Predictive(model, num_samples=500)( eight_schools_params["J"], torch.from_numpy(eight_schools_params["sigma"]).float() ) predictions = predictions_data constant_data = {"J": 8, "sigma": eight_schools_params["sigma"]} predictions_constant_data = predictions_params # only prior inference_data = from_pyro(prior=prior) test_dict = {"prior": ["mu", "tau", "eta"]} fails = check_multiple_attrs(test_dict, inference_data) assert not fails, f"only prior: {fails}" # only posterior_predictive inference_data = from_pyro(posterior_predictive=posterior_predictive) test_dict = {"posterior_predictive": ["obs"]} fails = check_multiple_attrs(test_dict, inference_data) assert not fails, f"only posterior_predictive: {fails}" # only predictions inference_data = from_pyro(predictions=predictions) test_dict = {"predictions": ["obs"]} fails = check_multiple_attrs(test_dict, inference_data) assert not fails, f"only predictions: {fails}" # only constant_data inference_data = from_pyro(constant_data=constant_data) test_dict = {"constant_data": ["J", "sigma"]} fails = check_multiple_attrs(test_dict, inference_data) assert not fails, f"only constant_data: {fails}" # only predictions_constant_data inference_data = from_pyro(predictions_constant_data=predictions_constant_data) test_dict = {"predictions_constant_data": ["J", "sigma"]} fails = check_multiple_attrs(test_dict, inference_data) assert not fails, f"only predictions_constant_data: {fails}" # prior and posterior_predictive idata = from_pyro( prior=prior, posterior_predictive=posterior_predictive, coords={"school": np.arange(eight_schools_params["J"])}, dims={"theta": ["school"], "eta": ["school"]}, ) test_dict = {"posterior_predictive": ["obs"], "prior": ["mu", "tau", "eta", "obs"]} fails = check_multiple_attrs(test_dict, idata) assert not fails, f"prior and posterior_predictive: {fails}" def test_inference_data_only_posterior(self, data): idata = from_pyro(data.obj) test_dict = {"posterior": ["mu", "tau", "eta"], "sample_stats": ["diverging"]} fails = check_multiple_attrs(test_dict, idata) assert not fails @pytest.mark.skipif( packaging.version.parse(pyro.__version__) < packaging.version.parse("1.0.0"), reason="requires pyro 1.0.0 or higher", ) def test_inference_data_only_posterior_has_log_likelihood(self, data): idata = from_pyro(data.obj) test_dict = {"log_likelihood": ["obs"]} fails = check_multiple_attrs(test_dict, idata) assert not fails def test_multiple_observed_rv(self): y1 = torch.randn(10) y2 = torch.randn(10) def model_example_multiple_obs(y1=None, y2=None): x = pyro.sample("x", dist.Normal(1, 3)) pyro.sample("y1", dist.Normal(x, 1), obs=y1) pyro.sample("y2", dist.Normal(x, 1), obs=y2) nuts_kernel = pyro.infer.NUTS(model_example_multiple_obs) mcmc = pyro.infer.MCMC(nuts_kernel, num_samples=10) mcmc.run(y1=y1, y2=y2) inference_data = from_pyro(mcmc) test_dict = { "posterior": ["x"], "sample_stats": ["diverging"], "log_likelihood": ["y1", "y2"], "observed_data": ["y1", "y2"], } fails = check_multiple_attrs(test_dict, inference_data) assert not fails assert not hasattr(inference_data.sample_stats, "log_likelihood") def test_inference_data_constant_data(self): x1 = 10 x2 = 12 y1 = torch.randn(10) def model_constant_data(x, y1=None): _x = pyro.sample("x", dist.Normal(1, 3)) pyro.sample("y1", dist.Normal(x * _x, 1), obs=y1) nuts_kernel = pyro.infer.NUTS(model_constant_data) mcmc = pyro.infer.MCMC(nuts_kernel, num_samples=10) mcmc.run(x=x1, y1=y1) posterior = mcmc.get_samples() posterior_predictive = Predictive(model_constant_data, posterior)(x1) predictions = Predictive(model_constant_data, posterior)(x2) inference_data = from_pyro( mcmc, posterior_predictive=posterior_predictive, predictions=predictions, constant_data={"x1": x1}, predictions_constant_data={"x2": x2}, ) test_dict = { "posterior": ["x"], "posterior_predictive": ["y1"], "sample_stats": ["diverging"], "log_likelihood": ["y1"], "predictions": ["y1"], "observed_data": ["y1"], "constant_data": ["x1"], "predictions_constant_data": ["x2"], } fails = check_multiple_attrs(test_dict, inference_data) assert not fails def test_inference_data_num_chains(self, predictions_data, chains): predictions = predictions_data inference_data = from_pyro(predictions=predictions, num_chains=chains) nchains = inference_data.predictions.dims["chain"] assert nchains == chains @pytest.mark.parametrize("log_likelihood", [True, False]) def test_log_likelihood(self, log_likelihood): """Test behaviour when log likelihood cannot be retrieved. If log_likelihood=True there is a warning to say log_likelihood group is skipped, if log_likelihood=False there is no warning and log_likelihood is skipped. """ x = torch.randn((10, 2)) y = torch.randn(10) def model_constant_data(x, y=None): beta = pyro.sample("beta", dist.Normal(torch.ones(2), 3)) pyro.sample("y", dist.Normal(x.matmul(beta), 1), obs=y) nuts_kernel = pyro.infer.NUTS(model_constant_data) mcmc = pyro.infer.MCMC(nuts_kernel, num_samples=10) mcmc.run(x=x, y=y) if log_likelihood: with pytest.warns(UserWarning, match="Could not get vectorized trace"): inference_data = from_pyro(mcmc, log_likelihood=log_likelihood) else: inference_data = from_pyro(mcmc, log_likelihood=log_likelihood) test_dict = { "posterior": ["beta"], "sample_stats": ["diverging"], "~log_likelihood": [""], "observed_data": ["y"], } fails = check_multiple_attrs(test_dict, inference_data) assert not fails
{ "content_hash": "bcd2dc45e94815ece66a02346425c21d", "timestamp": "", "source": "github", "line_count": 259, "max_line_length": 97, "avg_line_length": 41.32818532818533, "alnum_prop": 0.5969730941704036, "repo_name": "arviz-devs/arviz", "id": "a26dceed601a87a266fbeaefa9415329b40a545b", "size": "10768", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "arviz/tests/external_tests/test_data_pyro.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "5900" }, { "name": "Dockerfile", "bytes": "1771" }, { "name": "HTML", "bytes": "1343" }, { "name": "Jupyter Notebook", "bytes": "641262" }, { "name": "Makefile", "bytes": "688" }, { "name": "PowerShell", "bytes": "2668" }, { "name": "Python", "bytes": "1634423" }, { "name": "R", "bytes": "248" }, { "name": "Shell", "bytes": "7276" }, { "name": "TeX", "bytes": "24620" } ], "symlink_target": "" }
class RecordOnUSBCommand : public ATCommand { public: explicit RecordOnUSBCommand(bool record) : ATCommand("CONFIG", std::vector<std::string>{ATCommand::_string("video:video_on_usb"), ATCommand::_string(record? "TRUE" : "FALSE")}) {} }; #endif
{ "content_hash": "a874cf1ec95dd37268bc430c1e7d8df0", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 181, "avg_line_length": 35.42857142857143, "alnum_prop": 0.717741935483871, "repo_name": "lukaslaobeyer/libdrone", "id": "6d5c9a10c31ce087896046fb4a87480aa62115ff", "size": "331", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/drones/ardrone2/atcommands/recordonusbcommand.h", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "1240" }, { "name": "C", "bytes": "5807" }, { "name": "C++", "bytes": "173466" }, { "name": "CMake", "bytes": "8119" }, { "name": "Lua", "bytes": "3808" }, { "name": "Shell", "bytes": "2035" }, { "name": "Visual Basic", "bytes": "964" } ], "symlink_target": "" }
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <string.h> #include <stdlib.h> #include <freerdp/api.h> #include <freerdp/freerdp.h> #include <freerdp/gdi/gdi.h> #include <freerdp/gdi/region.h> /** * Create a region from rectangular coordinates.\n * @msdn{dd183514} * @param nLeftRect x1 * @param nTopRect y1 * @param nRightRect x2 * @param nBottomRect y2 * @return new region */ HGDI_RGN gdi_CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) { HGDI_RGN hRgn = (HGDI_RGN) malloc(sizeof(GDI_RGN)); hRgn->objectType = GDIOBJECT_REGION; hRgn->x = nLeftRect; hRgn->y = nTopRect; hRgn->w = nRightRect - nLeftRect + 1; hRgn->h = nBottomRect - nTopRect + 1; hRgn->null = 0; return hRgn; } /** * Create a new rectangle. * @param xLeft x1 * @param yTop y1 * @param xRight x2 * @param yBottom y2 * @return new rectangle */ HGDI_RECT gdi_CreateRect(int xLeft, int yTop, int xRight, int yBottom) { HGDI_RECT hRect = (HGDI_RECT) malloc(sizeof(GDI_RECT)); hRect->objectType = GDIOBJECT_RECT; hRect->left = xLeft; hRect->top = yTop; hRect->right = xRight; hRect->bottom = yBottom; return hRect; } /** * Convert a rectangle to a region. * @param rect source rectangle * @param rgn destination region */ INLINE void gdi_RectToRgn(HGDI_RECT rect, HGDI_RGN rgn) { rgn->x = rect->left; rgn->y = rect->top; rgn->w = rect->right - rect->left + 1; rgn->h = rect->bottom - rect->top + 1; } /** * Convert rectangular coordinates to a region. * @param left x1 * @param top y1 * @param right x2 * @param bottom y2 * @param rgn destination region */ INLINE void gdi_CRectToRgn(int left, int top, int right, int bottom, HGDI_RGN rgn) { rgn->x = left; rgn->y = top; rgn->w = right - left + 1; rgn->h = bottom - top + 1; } /** * Convert a rectangle to region coordinates. * @param rect source rectangle * @param x x1 * @param y y1 * @param w width * @param h height */ INLINE void gdi_RectToCRgn(HGDI_RECT rect, int *x, int *y, int *w, int *h) { *x = rect->left; *y = rect->top; *w = rect->right - rect->left + 1; *h = rect->bottom - rect->top + 1; } /** * Convert rectangular coordinates to region coordinates. * @param left x1 * @param top y1 * @param right x2 * @param bottom y2 * @param x x1 * @param y y1 * @param w width * @param h height */ INLINE void gdi_CRectToCRgn(int left, int top, int right, int bottom, int *x, int *y, int *w, int *h) { *x = left; *y = top; *w = right - left + 1; *h = bottom - top + 1; } /** * Convert a region to a rectangle. * @param rgn source region * @param rect destination rectangle */ INLINE void gdi_RgnToRect(HGDI_RGN rgn, HGDI_RECT rect) { rect->left = rgn->x; rect->top = rgn->y; rect->right = rgn->x + rgn->w - 1; rect->bottom = rgn->y + rgn->h - 1; } /** * Convert region coordinates to a rectangle. * @param x x1 * @param y y1 * @param w width * @param h height * @param rect destination rectangle */ INLINE void gdi_CRgnToRect(int x, int y, int w, int h, HGDI_RECT rect) { rect->left = x; rect->top = y; rect->right = x + w - 1; rect->bottom = y + h - 1; } /** * Convert a region to rectangular coordinates. * @param rgn source region * @param left x1 * @param top y1 * @param right x2 * @param bottom y2 */ INLINE void gdi_RgnToCRect(HGDI_RGN rgn, int *left, int *top, int *right, int *bottom) { *left = rgn->x; *top = rgn->y; *right = rgn->x + rgn->w - 1; *bottom = rgn->y + rgn->h - 1; } /** * Convert region coordinates to rectangular coordinates. * @param x x1 * @param y y1 * @param w width * @param h height * @param left x1 * @param top y1 * @param right x2 * @param bottom y2 */ INLINE void gdi_CRgnToCRect(int x, int y, int w, int h, int *left, int *top, int *right, int *bottom) { *left = x; *top = y; *right = x + w - 1; *bottom = y + h - 1; } /** * Check if copying would involve overlapping regions * @param x x1 * @param y y1 * @param width width * @param height height * @param srcx source x1 * @param srcy source y1 * @return 1 if there is an overlap, 0 otherwise */ INLINE int gdi_CopyOverlap(int x, int y, int width, int height, int srcx, int srcy) { GDI_RECT dst; GDI_RECT src; gdi_CRgnToRect(x, y, width, height, &dst); gdi_CRgnToRect(srcx, srcy, width, height, &src); return (dst.right > src.left && dst.left < src.right && dst.bottom > src.top && dst.top < src.bottom) ? 1 : 0; } /** * Set the coordinates of a given rectangle.\n * @msdn{dd145085} * @param rc rectangle * @param xLeft x1 * @param yTop y1 * @param xRight x2 * @param yBottom y2 * @return 1 if successful, 0 otherwise */ INLINE int gdi_SetRect(HGDI_RECT rc, int xLeft, int yTop, int xRight, int yBottom) { rc->left = xLeft; rc->top = yTop; rc->right = xRight; rc->bottom = yBottom; return 1; } /** * Set the coordinates of a given region. * @param hRgn region * @param nXLeft x1 * @param nYLeft y1 * @param nWidth width * @param nHeight height * @return */ INLINE int gdi_SetRgn(HGDI_RGN hRgn, int nXLeft, int nYLeft, int nWidth, int nHeight) { hRgn->x = nXLeft; hRgn->y = nYLeft; hRgn->w = nWidth; hRgn->h = nHeight; hRgn->null = 0; return 0; } /** * Convert rectangular coordinates to a region * @param hRgn destination region * @param nLeftRect x1 * @param nTopRect y1 * @param nRightRect x2 * @param nBottomRect y2 * @return */ INLINE int gdi_SetRectRgn(HGDI_RGN hRgn, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) { gdi_CRectToRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, hRgn); hRgn->null = 0; return 0; } /** * Compare two regions for equality.\n * @msdn{dd162700} * @param hSrcRgn1 first region * @param hSrcRgn2 second region * @return 1 if both regions are equal, 0 otherwise */ INLINE int gdi_EqualRgn(HGDI_RGN hSrcRgn1, HGDI_RGN hSrcRgn2) { if ((hSrcRgn1->x == hSrcRgn2->x) && (hSrcRgn1->y == hSrcRgn2->y) && (hSrcRgn1->w == hSrcRgn2->w) && (hSrcRgn1->h == hSrcRgn2->h)) { return 1; } return 0; } /** * Copy coordinates from a rectangle to another rectangle * @param dst destination rectangle * @param src source rectangle * @return 1 if successful, 0 otherwise */ INLINE int gdi_CopyRect(HGDI_RECT dst, HGDI_RECT src) { dst->left = src->left; dst->top = src->top; dst->right = src->right; dst->bottom = src->bottom; return 1; } /** * Check if a point is inside a rectangle.\n * @msdn{dd162882} * @param rc rectangle * @param x point x position * @param y point y position * @return 1 if the point is inside, 0 otherwise */ INLINE int gdi_PtInRect(HGDI_RECT rc, int x, int y) { /* * points on the left and top sides are considered in, * while points on the right and bottom sides are considered out */ if (x >= rc->left && x <= rc->right) { if (y >= rc->top && y <= rc->bottom) { return 1; } } return 0; } /** * Invalidate a given region, such that it is redrawn on the next region update.\n * @msdn{dd145003} * @param hdc device context * @param x x1 * @param y y1 * @param w width * @param h height * @return */ INLINE int gdi_InvalidateRegion(HGDI_DC hdc, int x, int y, int w, int h) { GDI_RECT inv; GDI_RECT rgn; HGDI_RGN invalid; HGDI_RGN cinvalid; if (!hdc->hwnd) return 0; if (!hdc->hwnd->invalid) return 0; if (w == 0 || h == 0) return 0; cinvalid = hdc->hwnd->cinvalid; if ((hdc->hwnd->ninvalid + 1) > hdc->hwnd->count) { hdc->hwnd->count *= 2; cinvalid = (HGDI_RGN) realloc(cinvalid, sizeof(GDI_RGN) * (hdc->hwnd->count)); } gdi_SetRgn(&cinvalid[hdc->hwnd->ninvalid++], x, y, w, h); hdc->hwnd->cinvalid = cinvalid; invalid = hdc->hwnd->invalid; if (invalid->null) { invalid->x = x; invalid->y = y; invalid->w = w; invalid->h = h; invalid->null = 0; return 0; } gdi_CRgnToRect(x, y, w, h, &rgn); gdi_RgnToRect(invalid, &inv); if (rgn.left < 0) rgn.left = 0; if (rgn.top < 0) rgn.top = 0; if (rgn.left < inv.left) inv.left = rgn.left; if (rgn.top < inv.top) inv.top = rgn.top; if (rgn.right > inv.right) inv.right = rgn.right; if (rgn.bottom > inv.bottom) inv.bottom = rgn.bottom; gdi_RectToRgn(&inv, invalid); return 0; }
{ "content_hash": "4c94069482c4bbcc0bc00427bbbab6a0", "timestamp": "", "source": "github", "line_count": 413, "max_line_length": 102, "avg_line_length": 19.840193704600484, "alnum_prop": 0.6394923114474005, "repo_name": "vworkspace/FreeRDP", "id": "6584d435fc38a5f4ddb5baf124c327c80c8a4511", "size": "8909", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "libfreerdp/gdi/region.c", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "9896382" }, { "name": "C#", "bytes": "12447" }, { "name": "C++", "bytes": "154490" }, { "name": "CMake", "bytes": "655455" }, { "name": "HTML", "bytes": "95883" }, { "name": "Java", "bytes": "335096" }, { "name": "Makefile", "bytes": "1692" }, { "name": "Mathematica", "bytes": "5268" }, { "name": "Objective-C", "bytes": "1091213" }, { "name": "Perl", "bytes": "8044" }, { "name": "Python", "bytes": "1430" }, { "name": "Shell", "bytes": "11802" } ], "symlink_target": "" }
import _plotly_utils.basevalidators class WidthValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="width", parent_name="waterfall.connector.line", **kwargs ): super(WidthValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "plot"), min=kwargs.pop("min", 0), role=kwargs.pop("role", "style"), **kwargs )
{ "content_hash": "718f9145c03b7b53e87fc8eaafecab3a", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 83, "avg_line_length": 33.666666666666664, "alnum_prop": 0.5821782178217821, "repo_name": "plotly/python-api", "id": "aff3fef1b8a91598cc27a264e6057a1941c713f3", "size": "505", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "packages/python/plotly/plotly/validators/waterfall/connector/line/_width.py", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "6870" }, { "name": "Makefile", "bytes": "1708" }, { "name": "Python", "bytes": "823245" }, { "name": "Shell", "bytes": "3238" } ], "symlink_target": "" }
<?php namespace NetSuite\Classes; class OriginatingLeadSearchBasic extends SearchRecordBasic { /** * @var \NetSuite\Classes\SearchStringField */ public $accountNumber; /** * @var \NetSuite\Classes\SearchStringField */ public $address; /** * @var \NetSuite\Classes\SearchStringField */ public $addressee; /** * @var \NetSuite\Classes\SearchStringField */ public $addressLabel; /** * @var \NetSuite\Classes\SearchStringField */ public $addressPhone; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $assignedSite; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $assignedSiteId; /** * @var \NetSuite\Classes\SearchStringField */ public $attention; /** * @var \NetSuite\Classes\SearchBooleanField */ public $availableOffline; /** * @var \NetSuite\Classes\SearchDoubleField */ public $balance; /** * @var \NetSuite\Classes\SearchStringField */ public $billAddress; /** * @var \NetSuite\Classes\SearchDoubleField */ public $boughtAmount; /** * @var \NetSuite\Classes\SearchDateField */ public $boughtDate; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $buyingReason; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $buyingTimeFrame; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $category; /** * @var \NetSuite\Classes\SearchStringField */ public $ccCustomerCode; /** * @var \NetSuite\Classes\SearchBooleanField */ public $ccDefault; /** * @var \NetSuite\Classes\SearchDateField */ public $ccExpDate; /** * @var \NetSuite\Classes\SearchStringField */ public $ccHolderName; /** * @var \NetSuite\Classes\SearchStringField */ public $ccNumber; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $ccState; /** * @var \NetSuite\Classes\SearchDateField */ public $ccStateFrom; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $ccType; /** * @var \NetSuite\Classes\SearchStringField */ public $city; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $classBought; /** * @var \NetSuite\Classes\SearchStringField */ public $comments; /** * @var \NetSuite\Classes\SearchStringField */ public $companyName; /** * @var \NetSuite\Classes\SearchDoubleField */ public $consolBalance; /** * @var \NetSuite\Classes\SearchLongField */ public $consolDaysOverdue; /** * @var \NetSuite\Classes\SearchDoubleField */ public $consolDepositBalance; /** * @var \NetSuite\Classes\SearchDoubleField */ public $consolOverdueBalance; /** * @var \NetSuite\Classes\SearchDoubleField */ public $consolUnbilledOrders; /** * @var \NetSuite\Classes\SearchStringField */ public $contact; /** * @var \NetSuite\Classes\SearchLongField */ public $contribution; /** * @var \NetSuite\Classes\SearchDateField */ public $conversionDate; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $country; /** * @var \NetSuite\Classes\SearchStringField */ public $county; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $creditHold; /** * @var \NetSuite\Classes\SearchBooleanField */ public $creditHoldOverride; /** * @var \NetSuite\Classes\SearchDoubleField */ public $creditLimit; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $currency; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $custStage; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $custStatus; /** * @var \NetSuite\Classes\SearchDateField */ public $dateClosed; /** * @var \NetSuite\Classes\SearchDateField */ public $dateCreated; /** * @var \NetSuite\Classes\SearchLongField */ public $daysOverdue; /** * @var \NetSuite\Classes\SearchDoubleField */ public $defaultOrderPriority; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $defaultTaxReg; /** * @var \NetSuite\Classes\SearchStringField */ public $defaultTaxRegText; /** * @var \NetSuite\Classes\SearchDoubleField */ public $depositBalance; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $deptBought; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $drAccount; /** * @var \NetSuite\Classes\SearchStringField */ public $email; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $emailPreference; /** * @var \NetSuite\Classes\SearchBooleanField */ public $emailTransactions; /** * @var \NetSuite\Classes\SearchDateField */ public $endDate; /** * @var \NetSuite\Classes\SearchStringField */ public $entityId; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $entityStatus; /** * @var \NetSuite\Classes\SearchDoubleField */ public $estimatedBudget; /** * @var \NetSuite\Classes\SearchBooleanField */ public $explicitConversion; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $externalId; /** * @var \NetSuite\Classes\SearchStringField */ public $externalIdString; /** * @var \NetSuite\Classes\SearchStringField */ public $fax; /** * @var \NetSuite\Classes\SearchBooleanField */ public $faxTransactions; /** * @var \NetSuite\Classes\SearchStringField */ public $firstName; /** * @var \NetSuite\Classes\SearchDateField */ public $firstOrderDate; /** * @var \NetSuite\Classes\SearchDateField */ public $firstSaleDate; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $fxAccount; /** * @var \NetSuite\Classes\SearchDoubleField */ public $fxBalance; /** * @var \NetSuite\Classes\SearchDoubleField */ public $fxConsolBalance; /** * @var \NetSuite\Classes\SearchDoubleField */ public $fxConsolUnbilledOrders; /** * @var \NetSuite\Classes\SearchDoubleField */ public $fxUnbilledOrders; /** * @var \NetSuite\Classes\SearchBooleanField */ public $giveAccess; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $globalSubscriptionStatus; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $group; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $groupPricingLevel; /** * @var \NetSuite\Classes\SearchBooleanField */ public $hasDuplicates; /** * @var \NetSuite\Classes\SearchStringField */ public $image; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $internalId; /** * @var \NetSuite\Classes\SearchLongField */ public $internalIdNumber; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isBudgetApproved; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isDefaultBilling; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isDefaultShipping; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isInactive; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isPerson; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isReportedLead; /** * @var \NetSuite\Classes\SearchBooleanField */ public $isShipAddress; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $itemPricingLevel; /** * @var \NetSuite\Classes\SearchDoubleField */ public $itemPricingUnitPrice; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $itemsBought; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $itemsOrdered; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $language; /** * @var \NetSuite\Classes\SearchDateField */ public $lastModifiedDate; /** * @var \NetSuite\Classes\SearchStringField */ public $lastName; /** * @var \NetSuite\Classes\SearchDateField */ public $lastOrderDate; /** * @var \NetSuite\Classes\SearchDateField */ public $lastSaleDate; /** * @var \NetSuite\Classes\SearchDateField */ public $leadDate; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $leadSource; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $level; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $locationBought; /** * @var \NetSuite\Classes\SearchBooleanField */ public $manualCreditHold; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $merchantAccount; /** * @var \NetSuite\Classes\SearchStringField */ public $middleName; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $monthlyClosing; /** * @var \NetSuite\Classes\SearchBooleanField */ public $onCreditHold; /** * @var \NetSuite\Classes\SearchDoubleField */ public $orderedAmount; /** * @var \NetSuite\Classes\SearchDateField */ public $orderedDate; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $otherRelationships; /** * @var \NetSuite\Classes\SearchDoubleField */ public $overdueBalance; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $parent; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $parentItemsBought; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $parentItemsOrdered; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $partner; /** * @var \NetSuite\Classes\SearchLongField */ public $partnerContribution; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $partnerRole; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $partnerTeamMember; /** * @var \NetSuite\Classes\SearchStringField */ public $pec; /** * @var \NetSuite\Classes\SearchEnumMultiSelectField */ public $permission; /** * @var \NetSuite\Classes\SearchStringField */ public $phone; /** * @var \NetSuite\Classes\SearchStringField */ public $phoneticName; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $priceLevel; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $pricingGroup; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $pricingItem; /** * @var \NetSuite\Classes\SearchBooleanField */ public $printTransactions; /** * @var \NetSuite\Classes\SearchDateField */ public $prospectDate; /** * @var \NetSuite\Classes\SearchBooleanField */ public $pstExempt; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $receivablesAccount; /** * @var \NetSuite\Classes\SearchDateField */ public $reminderDate; /** * @var \NetSuite\Classes\SearchStringField */ public $resaleNumber; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $role; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $salesReadiness; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $salesRep; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $salesTeamMember; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $salesTeamRole; /** * @var \NetSuite\Classes\SearchStringField */ public $salutation; /** * @var \NetSuite\Classes\SearchStringField */ public $shipAddress; /** * @var \NetSuite\Classes\SearchBooleanField */ public $shipComplete; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $shippingItem; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $sourceSite; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $sourceSiteId; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $stage; /** * @var \NetSuite\Classes\SearchDateField */ public $startDate; /** * @var \NetSuite\Classes\SearchStringField */ public $state; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $subsidBought; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $subsidiary; /** * @var \NetSuite\Classes\SearchBooleanField */ public $taxable; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $terms; /** * @var \NetSuite\Classes\SearchMultiSelectField */ public $territory; /** * @var \NetSuite\Classes\SearchStringField */ public $title; /** * @var \NetSuite\Classes\SearchDoubleField */ public $unbilledOrders; /** * @var \NetSuite\Classes\SearchStringField */ public $url; /** * @var \NetSuite\Classes\SearchStringField */ public $vatRegNumber; /** * @var \NetSuite\Classes\SearchBooleanField */ public $webLead; /** * @var \NetSuite\Classes\SearchStringField */ public $zipCode; /** * @var \NetSuite\Classes\SearchCustomFieldList */ public $customFieldList; static $paramtypesmap = array( "accountNumber" => "SearchStringField", "address" => "SearchStringField", "addressee" => "SearchStringField", "addressLabel" => "SearchStringField", "addressPhone" => "SearchStringField", "assignedSite" => "SearchMultiSelectField", "assignedSiteId" => "SearchMultiSelectField", "attention" => "SearchStringField", "availableOffline" => "SearchBooleanField", "balance" => "SearchDoubleField", "billAddress" => "SearchStringField", "boughtAmount" => "SearchDoubleField", "boughtDate" => "SearchDateField", "buyingReason" => "SearchMultiSelectField", "buyingTimeFrame" => "SearchMultiSelectField", "category" => "SearchMultiSelectField", "ccCustomerCode" => "SearchStringField", "ccDefault" => "SearchBooleanField", "ccExpDate" => "SearchDateField", "ccHolderName" => "SearchStringField", "ccNumber" => "SearchStringField", "ccState" => "SearchMultiSelectField", "ccStateFrom" => "SearchDateField", "ccType" => "SearchMultiSelectField", "city" => "SearchStringField", "classBought" => "SearchMultiSelectField", "comments" => "SearchStringField", "companyName" => "SearchStringField", "consolBalance" => "SearchDoubleField", "consolDaysOverdue" => "SearchLongField", "consolDepositBalance" => "SearchDoubleField", "consolOverdueBalance" => "SearchDoubleField", "consolUnbilledOrders" => "SearchDoubleField", "contact" => "SearchStringField", "contribution" => "SearchLongField", "conversionDate" => "SearchDateField", "country" => "SearchEnumMultiSelectField", "county" => "SearchStringField", "creditHold" => "SearchEnumMultiSelectField", "creditHoldOverride" => "SearchBooleanField", "creditLimit" => "SearchDoubleField", "currency" => "SearchMultiSelectField", "custStage" => "SearchMultiSelectField", "custStatus" => "SearchMultiSelectField", "dateClosed" => "SearchDateField", "dateCreated" => "SearchDateField", "daysOverdue" => "SearchLongField", "defaultOrderPriority" => "SearchDoubleField", "defaultTaxReg" => "SearchMultiSelectField", "defaultTaxRegText" => "SearchStringField", "depositBalance" => "SearchDoubleField", "deptBought" => "SearchMultiSelectField", "drAccount" => "SearchMultiSelectField", "email" => "SearchStringField", "emailPreference" => "SearchEnumMultiSelectField", "emailTransactions" => "SearchBooleanField", "endDate" => "SearchDateField", "entityId" => "SearchStringField", "entityStatus" => "SearchMultiSelectField", "estimatedBudget" => "SearchDoubleField", "explicitConversion" => "SearchBooleanField", "externalId" => "SearchMultiSelectField", "externalIdString" => "SearchStringField", "fax" => "SearchStringField", "faxTransactions" => "SearchBooleanField", "firstName" => "SearchStringField", "firstOrderDate" => "SearchDateField", "firstSaleDate" => "SearchDateField", "fxAccount" => "SearchMultiSelectField", "fxBalance" => "SearchDoubleField", "fxConsolBalance" => "SearchDoubleField", "fxConsolUnbilledOrders" => "SearchDoubleField", "fxUnbilledOrders" => "SearchDoubleField", "giveAccess" => "SearchBooleanField", "globalSubscriptionStatus" => "SearchEnumMultiSelectField", "group" => "SearchMultiSelectField", "groupPricingLevel" => "SearchMultiSelectField", "hasDuplicates" => "SearchBooleanField", "image" => "SearchStringField", "internalId" => "SearchMultiSelectField", "internalIdNumber" => "SearchLongField", "isBudgetApproved" => "SearchBooleanField", "isDefaultBilling" => "SearchBooleanField", "isDefaultShipping" => "SearchBooleanField", "isInactive" => "SearchBooleanField", "isPerson" => "SearchBooleanField", "isReportedLead" => "SearchBooleanField", "isShipAddress" => "SearchBooleanField", "itemPricingLevel" => "SearchMultiSelectField", "itemPricingUnitPrice" => "SearchDoubleField", "itemsBought" => "SearchMultiSelectField", "itemsOrdered" => "SearchMultiSelectField", "language" => "SearchEnumMultiSelectField", "lastModifiedDate" => "SearchDateField", "lastName" => "SearchStringField", "lastOrderDate" => "SearchDateField", "lastSaleDate" => "SearchDateField", "leadDate" => "SearchDateField", "leadSource" => "SearchMultiSelectField", "level" => "SearchEnumMultiSelectField", "locationBought" => "SearchMultiSelectField", "manualCreditHold" => "SearchBooleanField", "merchantAccount" => "SearchMultiSelectField", "middleName" => "SearchStringField", "monthlyClosing" => "SearchEnumMultiSelectField", "onCreditHold" => "SearchBooleanField", "orderedAmount" => "SearchDoubleField", "orderedDate" => "SearchDateField", "otherRelationships" => "SearchEnumMultiSelectField", "overdueBalance" => "SearchDoubleField", "parent" => "SearchMultiSelectField", "parentItemsBought" => "SearchMultiSelectField", "parentItemsOrdered" => "SearchMultiSelectField", "partner" => "SearchMultiSelectField", "partnerContribution" => "SearchLongField", "partnerRole" => "SearchMultiSelectField", "partnerTeamMember" => "SearchMultiSelectField", "pec" => "SearchStringField", "permission" => "SearchEnumMultiSelectField", "phone" => "SearchStringField", "phoneticName" => "SearchStringField", "priceLevel" => "SearchMultiSelectField", "pricingGroup" => "SearchMultiSelectField", "pricingItem" => "SearchMultiSelectField", "printTransactions" => "SearchBooleanField", "prospectDate" => "SearchDateField", "pstExempt" => "SearchBooleanField", "receivablesAccount" => "SearchMultiSelectField", "reminderDate" => "SearchDateField", "resaleNumber" => "SearchStringField", "role" => "SearchMultiSelectField", "salesReadiness" => "SearchMultiSelectField", "salesRep" => "SearchMultiSelectField", "salesTeamMember" => "SearchMultiSelectField", "salesTeamRole" => "SearchMultiSelectField", "salutation" => "SearchStringField", "shipAddress" => "SearchStringField", "shipComplete" => "SearchBooleanField", "shippingItem" => "SearchMultiSelectField", "sourceSite" => "SearchMultiSelectField", "sourceSiteId" => "SearchMultiSelectField", "stage" => "SearchMultiSelectField", "startDate" => "SearchDateField", "state" => "SearchStringField", "subsidBought" => "SearchMultiSelectField", "subsidiary" => "SearchMultiSelectField", "taxable" => "SearchBooleanField", "terms" => "SearchMultiSelectField", "territory" => "SearchMultiSelectField", "title" => "SearchStringField", "unbilledOrders" => "SearchDoubleField", "url" => "SearchStringField", "vatRegNumber" => "SearchStringField", "webLead" => "SearchBooleanField", "zipCode" => "SearchStringField", "customFieldList" => "SearchCustomFieldList", ); }
{ "content_hash": "f509a804a3f6617043c3e22de7ba8a30", "timestamp": "", "source": "github", "line_count": 789, "max_line_length": 67, "avg_line_length": 27.88593155893536, "alnum_prop": 0.6083992364330515, "repo_name": "RyanWinchester/netsuite-php", "id": "26520a9a069ef82df4e0ecf81ac1031a82891afe", "size": "22722", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Classes/OriginatingLeadSearchBasic.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "2828253" } ], "symlink_target": "" }
<?php // Setup require_once 'cassowary-setup.php'; // logout if necessary if (phpCAS::isAuthenticated()) { if (isset($_REQUEST['service'])) { $service = $_REQUEST['service']; } else { $service = (empty($_SERVER["HTTPS"]) ? "http://" : "https://" ) . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]; } phpCAS::logoutWithRedirectService($service); } ?> <!DOCTYPE html> <html> <head> <title>Logged Out</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noindex"> <style> <?php if ($cassowary_show_pics): ?> html { height: 100%; background: url(<?php echo $cassowary_dir ?>/casuarius-egg.jpg) no-repeat center center; background-size: cover; } <?php endif ?> body { max-width: 40em; margin: auto; background-color: rgba(255,255,255,0.5); } </style> </head> <body> <h1>Logout successful</h1> <p>You have successfully logged out. <P><a href="<?php echo $cassowary_parent ?>/login/">Click here to login to <strong><?php echo $_SERVER["HTTP_HOST"] ?></strong> again</a> <p>For security reasons, exit your web browser. </body> </html>
{ "content_hash": "0092e7335154f3793832368e570be307", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 139, "avg_line_length": 25.152173913043477, "alnum_prop": 0.6283491789109766, "repo_name": "chuckhoupt/Cassowary", "id": "54d98bc6967345e0b789317feef3af3d49d2636e", "size": "1157", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "logout.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "14135" } ], "symlink_target": "" }
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta name="description"> <meta name="keywords" content="static content generator,static site generator,static site,HTML,web development,.NET,C#,Razor,Markdown,YAML"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="shortcut icon" href="/OpenTl.Schema/assets/img/favicon.ico" type="image/x-icon"> <link rel="icon" href="/OpenTl.Schema/assets/img/favicon.ico" type="image/x-icon"> <title>OpenTl.Schema - API - TTopPeerCategoryPeers Class</title> <link href="/OpenTl.Schema/assets/css/mermaid.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/highlight.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/bootstrap/bootstrap.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/adminlte/AdminLTE.css" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/theme/theme.css" rel="stylesheet"> <link href="//fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,400i,700,700i" rel="stylesheet"> <link href="/OpenTl.Schema/assets/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="/OpenTl.Schema/assets/css/override.css" rel="stylesheet"> <script src="/OpenTl.Schema/assets/js/jquery-2.2.3.min.js"></script> <script src="/OpenTl.Schema/assets/js/bootstrap.min.js"></script> <script src="/OpenTl.Schema/assets/js/app.min.js"></script> <script src="/OpenTl.Schema/assets/js/highlight.pack.js"></script> <script src="/OpenTl.Schema/assets/js/jquery.slimscroll.min.js"></script> <script src="/OpenTl.Schema/assets/js/jquery.sticky-kit.min.js"></script> <script src="/OpenTl.Schema/assets/js/mermaid.min.js"></script> <!--[if lt IE 9]> <script src="/OpenTl.Schema/assets/js/html5shiv.min.js"></script> <script src="/OpenTl.Schema/assets/js/respond.min.js"></script> <![endif]--> </head> <body class="hold-transition wyam layout-boxed "> <div class="top-banner"></div> <div class="wrapper with-container"> <!-- Header --> <header class="main-header"> <a href="/OpenTl.Schema/" class="logo"> <span>OpenTl.Schema</span> </a> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle visible-xs-block" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle side menu</span> <i class="fa fa-chevron-circle-right"></i> </a> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"> <span class="sr-only">Toggle side menu</span> <i class="fa fa-chevron-circle-down"></i> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse pull-left" id="navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="/OpenTl.Schema/about.html">About This Project</a></li> <li class="active"><a href="/OpenTl.Schema/api">API</a></li> </ul> </div> <!-- /.navbar-collapse --> <!-- Navbar Right Menu --> </nav> </header> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar "> <section class="infobar" data-spy="affix" data-offset-top="60" data-offset-bottom="200"> <div id="infobar-headings"><h6>On This Page</h6><p><a href="#Syntax">Syntax</a></p> <p><a href="#Attributes">Attributes</a></p> <p><a href="#Properties">Properties</a></p> <p><a href="#ExtensionMethods">Extension Methods</a></p> <hr class="infobar-hidden"> </div> </section> <section class="sidebar"> <script src="/OpenTl.Schema/assets/js/lunr.min.js"></script> <script src="/OpenTl.Schema/assets/js/searchIndex.js"></script> <div class="sidebar-form"> <div class="input-group"> <input type="text" name="search" id="search" class="form-control" placeholder="Search Types..."> <span class="input-group-btn"> <button class="btn btn-flat"><i class="fa fa-search"></i></button> </span> </div> </div> <div id="search-results"> </div> <script> function runSearch(query){ $("#search-results").empty(); if( query.length < 2 ){ return; } var results = searchModule.search("*" + query + "*"); var listHtml = "<ul class='sidebar-menu'>"; listHtml += "<li class='header'>Type Results</li>"; if(results.length == 0 ){ listHtml += "<li>No results found</li>"; } else { for(var i = 0; i < results.length; ++i){ var res = results[i]; listHtml += "<li><a href='" + res.url + "'>" + htmlEscape(res.title) + "</a></li>"; } } listHtml += "</ul>"; $("#search-results").append(listHtml); } $(document).ready(function(){ $("#search").on('input propertychange paste', function() { runSearch($("#search").val()); }); }); function htmlEscape(html) { return document.createElement('div') .appendChild(document.createTextNode(html)) .parentNode .innerHTML; } </script> <hr> <ul class="sidebar-menu"> <li class="header">Namespace</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema">OpenTl<wbr>.Schema</a></li> <li role="separator" class="divider"></li> <li class="header">Class Types</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/MsgContainer">MsgContainer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestDestroyAuthKey">Request<wbr>Destroy<wbr>Auth<wbr>Key</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestDestroySession">Request<wbr>Destroy<wbr>Session</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestGetFutureSalts">Request<wbr>Get<wbr>Future<wbr>Salts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInitConnection">Request<wbr>Init<wbr>Connection</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeAfterMsg">Request<wbr>Invoke<wbr>After<wbr>Msg</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeAfterMsgs">Request<wbr>Invoke<wbr>After<wbr>Msgs</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeWithLayer">Request<wbr>Invoke<wbr>With<wbr>Layer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeWithMessagesRange">Request<wbr>Invoke<wbr>With<wbr>Messages<wbr>Range</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeWithoutUpdates">Request<wbr>Invoke<wbr>Without<wbr>Updates</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestInvokeWithTakeout">Request<wbr>Invoke<wbr>With<wbr>Takeout</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestPing">RequestPing</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestPingDelayDisconnect">Request<wbr>Ping<wbr>Delay<wbr>Disconnect</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestReqDHParams">RequestReqDHParams</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestReqPq">RequestReqPq</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestReqPqMulti">RequestReqPqMulti</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestRpcDropAnswer">RequestRpcDropAnswer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/RequestSetClientDHParams">Request<wbr>Set<wbr>Client<wbr>D<wbr>H<wbr>Params</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/SchemaInfo">SchemaInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TAccessPointRule">TAccessPointRule</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TAccountDaysTTL">TAccountDaysTTL</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TAuthorization">TAuthorization</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBadMsgNotification">TBadMsgNotification</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBadServerSalt">TBadServerSalt</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBoolFalse">TBoolFalse</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBoolTrue">TBoolTrue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotCommand">TBotCommand</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInfo">TBotInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMediaResult">T<wbr>Bot<wbr>Inline<wbr>Media<wbr>Result</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMessageMediaAuto">T<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Auto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMessageMediaContact">T<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Contact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMessageMediaGeo">T<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Geo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMessageMediaVenue">T<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Venue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineMessageText">T<wbr>Bot<wbr>Inline<wbr>Message<wbr>Text</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TBotInlineResult">TBotInlineResult</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TCdnConfig">TCdnConfig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TCdnPublicKey">TCdnPublicKey</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannel">TChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEvent">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionChangeAbout">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Change<wbr>About</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionChangePhoto">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Change<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionChangeStickerSet">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Change<wbr>Sticker<wbr>Set</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionChangeTitle">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Change<wbr>Title</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionChangeUsername">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Change<wbr>Username</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionDeleteMessage">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Delete<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionEditMessage">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Edit<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionParticipantInvite">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Participant<wbr>Invite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionParticipantJoin">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Participant<wbr>Join</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionParticipantLeave">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Participant<wbr>Leave</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionParticipantToggleAdmin">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Participant<wbr>Toggle<wbr>Admin</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionParticipantToggleBan">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Participant<wbr>Toggle<wbr>Ban</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionToggleInvites">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Toggle<wbr>Invites</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionTogglePreHistoryHidden">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Toggle<wbr>Pre<wbr>History<wbr>Hidden</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionToggleSignatures">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Toggle<wbr>Signatures</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventActionUpdatePinned">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action<wbr>Update<wbr>Pinned</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminLogEventsFilter">T<wbr>Channel<wbr>Admin<wbr>Log<wbr>Events<wbr>Filter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelAdminRights">TChannelAdminRights</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelBannedRights">TChannelBannedRights</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelForbidden">TChannelForbidden</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelFull">TChannelFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelMessagesFilter">T<wbr>Channel<wbr>Messages<wbr>Filter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelMessagesFilterEmpty">T<wbr>Channel<wbr>Messages<wbr>Filter<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipant">TChannelParticipant</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantAdmin">T<wbr>Channel<wbr>Participant<wbr>Admin</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantBanned">T<wbr>Channel<wbr>Participant<wbr>Banned</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantCreator">T<wbr>Channel<wbr>Participant<wbr>Creator</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsAdmins">T<wbr>Channel<wbr>Participants<wbr>Admins</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsBanned">T<wbr>Channel<wbr>Participants<wbr>Banned</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsBots">T<wbr>Channel<wbr>Participants<wbr>Bots</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantSelf">T<wbr>Channel<wbr>Participant<wbr>Self</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsKicked">T<wbr>Channel<wbr>Participants<wbr>Kicked</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsRecent">T<wbr>Channel<wbr>Participants<wbr>Recent</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChannelParticipantsSearch">T<wbr>Channel<wbr>Participants<wbr>Search</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChat">TChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatEmpty">TChatEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatForbidden">TChatForbidden</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatFull">TChatFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatInvite">TChatInvite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatInviteAlready">TChatInviteAlready</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatInviteEmpty">TChatInviteEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatInviteExported">TChatInviteExported</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatParticipant">TChatParticipant</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatParticipantAdmin">T<wbr>Chat<wbr>Participant<wbr>Admin</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatParticipantCreator">T<wbr>Chat<wbr>Participant<wbr>Creator</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatParticipants">TChatParticipants</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatParticipantsForbidden">T<wbr>Chat<wbr>Participants<wbr>Forbidden</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatPhoto">TChatPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TChatPhotoEmpty">TChatPhotoEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TClientDHInnerData">TClientDHInnerData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TConfig">TConfig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContact">TContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactBlocked">TContactBlocked</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactLinkContact">TContactLinkContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactLinkHasPhone">TContactLinkHasPhone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactLinkNone">TContactLinkNone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactLinkUnknown">TContactLinkUnknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContactStatus">TContactStatus</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TContainerMessage">TContainerMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDataJSON">TDataJSON</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDcOption">TDcOption</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDestroyAuthKeyFail">TDestroyAuthKeyFail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDestroyAuthKeyNone">TDestroyAuthKeyNone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDestroyAuthKeyOk">TDestroyAuthKeyOk</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDestroySessionNone">TDestroySessionNone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDestroySessionOk">TDestroySessionOk</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDhGenFail">TDhGenFail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDhGenOk">TDhGenOk</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDhGenRetry">TDhGenRetry</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDialog">TDialog</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDialogPeer">TDialogPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocument">TDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeAnimated">T<wbr>Document<wbr>Attribute<wbr>Animated</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeAudio">T<wbr>Document<wbr>Attribute<wbr>Audio</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeFilename">T<wbr>Document<wbr>Attribute<wbr>Filename</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeHasStickers">T<wbr>Document<wbr>Attribute<wbr>Has<wbr>Stickers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeImageSize">T<wbr>Document<wbr>Attribute<wbr>Image<wbr>Size</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeSticker">T<wbr>Document<wbr>Attribute<wbr>Sticker</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentAttributeVideo">T<wbr>Document<wbr>Attribute<wbr>Video</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDocumentEmpty">TDocumentEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDraftMessage">TDraftMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TDraftMessageEmpty">TDraftMessageEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedChat">TEncryptedChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedChatDiscarded">T<wbr>Encrypted<wbr>Chat<wbr>Discarded</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedChatEmpty">TEncryptedChatEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedChatRequested">T<wbr>Encrypted<wbr>Chat<wbr>Requested</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedChatWaiting">T<wbr>Encrypted<wbr>Chat<wbr>Waiting</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedFile">TEncryptedFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedFileEmpty">TEncryptedFileEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedMessage">TEncryptedMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TEncryptedMessageService">T<wbr>Encrypted<wbr>Message<wbr>Service</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TError">TError</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TExportedMessageLink">TExportedMessageLink</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFileHash">TFileHash</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFileLocation">TFileLocation</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFileLocationUnavailable">T<wbr>File<wbr>Location<wbr>Unavailable</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFoundGif">TFoundGif</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFoundGifCached">TFoundGifCached</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFutureSalt">TFutureSalt</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TFutureSalts">TFutureSalts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TGame">TGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TGeoPoint">TGeoPoint</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TGeoPointEmpty">TGeoPointEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TgZipPacked">TgZipPacked</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/THighScore">THighScore</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/THttpWait">THttpWait</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TImportedContact">TImportedContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInlineBotSwitchPM">TInlineBotSwitchPM</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputAppEvent">TInputAppEvent</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageGame">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Game</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageID">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>I<wbr>D</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageMediaAuto">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Auto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageMediaContact">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Contact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageMediaGeo">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Geo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageMediaVenue">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Media<wbr>Venue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineMessageText">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>Text</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineResult">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Result</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineResultDocument">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Result<wbr>Document</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineResultGame">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Result<wbr>Game</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputBotInlineResultPhoto">T<wbr>Input<wbr>Bot<wbr>Inline<wbr>Result<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputChannel">TInputChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputChannelEmpty">TInputChannelEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputChatPhoto">TInputChatPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputChatPhotoEmpty">TInputChatPhotoEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputChatUploadedPhoto">T<wbr>Input<wbr>Chat<wbr>Uploaded<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputCheckPasswordEmpty">T<wbr>Input<wbr>Check<wbr>Password<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputCheckPasswordSRP">T<wbr>Input<wbr>Check<wbr>Password<wbr>S<wbr>R<wbr>P</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputClientProxy">TInputClientProxy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputDialogPeer">TInputDialogPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputDocument">TInputDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputDocumentEmpty">TInputDocumentEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputDocumentFileLocation">T<wbr>Input<wbr>Document<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedChat">TInputEncryptedChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedFile">TInputEncryptedFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedFileBigUploaded">T<wbr>Input<wbr>Encrypted<wbr>File<wbr>Big<wbr>Uploaded</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedFileEmpty">T<wbr>Input<wbr>Encrypted<wbr>File<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedFileLocation">T<wbr>Input<wbr>Encrypted<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputEncryptedFileUploaded">T<wbr>Input<wbr>Encrypted<wbr>File<wbr>Uploaded</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputFile">TInputFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputFileBig">TInputFileBig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputFileLocation">TInputFileLocation</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputGameID">TInputGameID</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputGameShortName">TInputGameShortName</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputGeoPoint">TInputGeoPoint</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputGeoPointEmpty">TInputGeoPointEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaContact">TInputMediaContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaDocument">TInputMediaDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaDocumentExternal">T<wbr>Input<wbr>Media<wbr>Document<wbr>External</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaEmpty">TInputMediaEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaGame">TInputMediaGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaGeoLive">TInputMediaGeoLive</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaGeoPoint">TInputMediaGeoPoint</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaGifExternal">T<wbr>Input<wbr>Media<wbr>Gif<wbr>External</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaInvoice">TInputMediaInvoice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaPhoto">TInputMediaPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaPhotoExternal">T<wbr>Input<wbr>Media<wbr>Photo<wbr>External</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaUploadedDocument">T<wbr>Input<wbr>Media<wbr>Uploaded<wbr>Document</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaUploadedPhoto">T<wbr>Input<wbr>Media<wbr>Uploaded<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMediaVenue">TInputMediaVenue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessageEntityMentionName">T<wbr>Input<wbr>Message<wbr>Entity<wbr>Mention<wbr>Name</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessageID">TInputMessageID</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagePinned">TInputMessagePinned</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessageReplyTo">TInputMessageReplyTo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterChatPhotos">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Chat<wbr>Photos</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterContacts">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Contacts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterDocument">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Document</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterEmpty">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterGeo">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Geo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterGif">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Gif</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterMusic">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Music</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterMyMentions">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>My<wbr>Mentions</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterPhoneCalls">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Phone<wbr>Calls</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterPhotos">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Photos</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterPhotoVideo">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Photo<wbr>Video</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterRoundVideo">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Round<wbr>Video</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterRoundVoice">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Round<wbr>Voice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterUrl">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Url</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterVideo">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Video</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputMessagesFilterVoice">T<wbr>Input<wbr>Messages<wbr>Filter<wbr>Voice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputNotifyChats">TInputNotifyChats</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputNotifyPeer">TInputNotifyPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputNotifyUsers">TInputNotifyUsers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPaymentCredentials">T<wbr>Input<wbr>Payment<wbr>Credentials</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPaymentCredentialsAndroidPay">T<wbr>Input<wbr>Payment<wbr>Credentials<wbr>Android<wbr>Pay</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPaymentCredentialsApplePay">T<wbr>Input<wbr>Payment<wbr>Credentials<wbr>Apple<wbr>Pay</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPaymentCredentialsSaved">T<wbr>Input<wbr>Payment<wbr>Credentials<wbr>Saved</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerChannel">TInputPeerChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerChat">TInputPeerChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerEmpty">TInputPeerEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerNotifySettings">T<wbr>Input<wbr>Peer<wbr>Notify<wbr>Settings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerSelf">TInputPeerSelf</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPeerUser">TInputPeerUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPhoneCall">TInputPhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPhoneContact">TInputPhoneContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPhoto">TInputPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPhotoEmpty">TInputPhotoEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyKeyChatInvite">T<wbr>Input<wbr>Privacy<wbr>Key<wbr>Chat<wbr>Invite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyKeyPhoneCall">T<wbr>Input<wbr>Privacy<wbr>Key<wbr>Phone<wbr>Call</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyKeyStatusTimestamp">T<wbr>Input<wbr>Privacy<wbr>Key<wbr>Status<wbr>Timestamp</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueAllowAll">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Allow<wbr>All</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueAllowContacts">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Allow<wbr>Contacts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueAllowUsers">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Allow<wbr>Users</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueDisallowAll">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>All</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueDisallowContacts">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>Contacts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputPrivacyValueDisallowUsers">T<wbr>Input<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>Users</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputReportReasonCopyright">T<wbr>Input<wbr>Report<wbr>Reason<wbr>Copyright</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputReportReasonOther">T<wbr>Input<wbr>Report<wbr>Reason<wbr>Other</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputReportReasonPornography">T<wbr>Input<wbr>Report<wbr>Reason<wbr>Pornography</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputReportReasonSpam">T<wbr>Input<wbr>Report<wbr>Reason<wbr>Spam</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputReportReasonViolence">T<wbr>Input<wbr>Report<wbr>Reason<wbr>Violence</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputSecureFile">TInputSecureFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputSecureFileLocation">T<wbr>Input<wbr>Secure<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputSecureFileUploaded">T<wbr>Input<wbr>Secure<wbr>File<wbr>Uploaded</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputSecureValue">TInputSecureValue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputSingleMedia">TInputSingleMedia</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickeredMediaDocument">T<wbr>Input<wbr>Stickered<wbr>Media<wbr>Document</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickeredMediaPhoto">T<wbr>Input<wbr>Stickered<wbr>Media<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickerSetEmpty">T<wbr>Input<wbr>Sticker<wbr>Set<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickerSetID">TInputStickerSetID</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickerSetItem">TInputStickerSetItem</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputStickerSetShortName">T<wbr>Input<wbr>Sticker<wbr>Set<wbr>Short<wbr>Name</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputTakeoutFileLocation">T<wbr>Input<wbr>Takeout<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputUser">TInputUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputUserEmpty">TInputUserEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputUserSelf">TInputUserSelf</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputWebDocument">TInputWebDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputWebFileGeoPointLocation">T<wbr>Input<wbr>Web<wbr>File<wbr>Geo<wbr>Point<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInputWebFileLocation">T<wbr>Input<wbr>Web<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TInvoice">TInvoice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TIpPort">TIpPort</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TIpPortSecret">TIpPortSecret</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButton">TKeyboardButton</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonBuy">TKeyboardButtonBuy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonCallback">T<wbr>Keyboard<wbr>Button<wbr>Callback</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonGame">TKeyboardButtonGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonRequestGeoLocation">T<wbr>Keyboard<wbr>Button<wbr>Request<wbr>Geo<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonRequestPhone">T<wbr>Keyboard<wbr>Button<wbr>Request<wbr>Phone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonRow">TKeyboardButtonRow</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonSwitchInline">T<wbr>Keyboard<wbr>Button<wbr>Switch<wbr>Inline</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TKeyboardButtonUrl">TKeyboardButtonUrl</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLabeledPrice">TLabeledPrice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLangPackDifference">TLangPackDifference</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLangPackLanguage">TLangPackLanguage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLangPackString">TLangPackString</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLangPackStringDeleted">T<wbr>Lang<wbr>Pack<wbr>String<wbr>Deleted</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TLangPackStringPluralized">T<wbr>Lang<wbr>Pack<wbr>String<wbr>Pluralized</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMaskCoords">TMaskCoords</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessage">TMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionBotAllowed">T<wbr>Message<wbr>Action<wbr>Bot<wbr>Allowed</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChannelCreate">T<wbr>Message<wbr>Action<wbr>Channel<wbr>Create</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChannelMigrateFrom">T<wbr>Message<wbr>Action<wbr>Channel<wbr>Migrate<wbr>From</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatAddUser">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Add<wbr>User</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatCreate">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Create</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatDeletePhoto">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Delete<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatDeleteUser">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Delete<wbr>User</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatEditPhoto">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Edit<wbr>Photo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatEditTitle">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Edit<wbr>Title</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatJoinedByLink">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Joined<wbr>By<wbr>Link</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionChatMigrateTo">T<wbr>Message<wbr>Action<wbr>Chat<wbr>Migrate<wbr>To</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionCustomAction">T<wbr>Message<wbr>Action<wbr>Custom<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionEmpty">TMessageActionEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionGameScore">T<wbr>Message<wbr>Action<wbr>Game<wbr>Score</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionHistoryClear">T<wbr>Message<wbr>Action<wbr>History<wbr>Clear</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionPaymentSent">T<wbr>Message<wbr>Action<wbr>Payment<wbr>Sent</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionPaymentSentMe">T<wbr>Message<wbr>Action<wbr>Payment<wbr>Sent<wbr>Me</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionPhoneCall">T<wbr>Message<wbr>Action<wbr>Phone<wbr>Call</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionPinMessage">T<wbr>Message<wbr>Action<wbr>Pin<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionScreenshotTaken">T<wbr>Message<wbr>Action<wbr>Screenshot<wbr>Taken</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionSecureValuesSent">T<wbr>Message<wbr>Action<wbr>Secure<wbr>Values<wbr>Sent</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageActionSecureValuesSentMe">T<wbr>Message<wbr>Action<wbr>Secure<wbr>Values<wbr>Sent<wbr>Me</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEmpty">TMessageEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityBold">TMessageEntityBold</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityBotCommand">T<wbr>Message<wbr>Entity<wbr>Bot<wbr>Command</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityCashtag">T<wbr>Message<wbr>Entity<wbr>Cashtag</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityCode">TMessageEntityCode</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityEmail">TMessageEntityEmail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityHashtag">T<wbr>Message<wbr>Entity<wbr>Hashtag</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityItalic">TMessageEntityItalic</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityMention">T<wbr>Message<wbr>Entity<wbr>Mention</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityMentionName">T<wbr>Message<wbr>Entity<wbr>Mention<wbr>Name</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityPhone">TMessageEntityPhone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityPre">TMessageEntityPre</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityTextUrl">T<wbr>Message<wbr>Entity<wbr>Text<wbr>Url</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityUnknown">T<wbr>Message<wbr>Entity<wbr>Unknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageEntityUrl">TMessageEntityUrl</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageFwdHeader">TMessageFwdHeader</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaContact">TMessageMediaContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaDocument">T<wbr>Message<wbr>Media<wbr>Document</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaEmpty">TMessageMediaEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaGame">TMessageMediaGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaGeo">TMessageMediaGeo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaGeoLive">TMessageMediaGeoLive</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaInvoice">TMessageMediaInvoice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaPhoto">TMessageMediaPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaUnsupported">T<wbr>Message<wbr>Media<wbr>Unsupported</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaVenue">TMessageMediaVenue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageMediaWebPage">TMessageMediaWebPage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageRange">TMessageRange</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMessageService">TMessageService</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgDetailedInfo">TMsgDetailedInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgNewDetailedInfo">TMsgNewDetailedInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgResendReq">TMsgResendReq</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgsAck">TMsgsAck</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgsAllInfo">TMsgsAllInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgsStateInfo">TMsgsStateInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TMsgsStateReq">TMsgsStateReq</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNearestDc">TNearestDc</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNewSessionCreated">TNewSessionCreated</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNotifyChats">TNotifyChats</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNotifyPeer">TNotifyPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNotifyUsers">TNotifyUsers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TNull">TNull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockAnchor">TPageBlockAnchor</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockAudio">TPageBlockAudio</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockAuthorDate">TPageBlockAuthorDate</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockBlockquote">TPageBlockBlockquote</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockChannel">TPageBlockChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockCollage">TPageBlockCollage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockCover">TPageBlockCover</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockDivider">TPageBlockDivider</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockEmbed">TPageBlockEmbed</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockEmbedPost">TPageBlockEmbedPost</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockFooter">TPageBlockFooter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockHeader">TPageBlockHeader</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockList">TPageBlockList</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockParagraph">TPageBlockParagraph</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockPhoto">TPageBlockPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockPreformatted">T<wbr>Page<wbr>Block<wbr>Preformatted</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockPullquote">TPageBlockPullquote</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockSlideshow">TPageBlockSlideshow</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockSubheader">TPageBlockSubheader</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockSubtitle">TPageBlockSubtitle</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockTitle">TPageBlockTitle</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockUnsupported">T<wbr>Page<wbr>Block<wbr>Unsupported</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageBlockVideo">TPageBlockVideo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPageFull">TPageFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPagePart">TPagePart</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow">T<wbr>Password<wbr>Kdf<wbr>Algo<wbr>S<wbr>H<wbr>A256<wbr>S<wbr>H<wbr>A256<wbr>P<wbr>B<wbr>K<wbr>D<wbr>F2<wbr>H<wbr>M<wbr>A<wbr>C<wbr>S<wbr>H<wbr>A512iter100000<wbr>S<wbr>H<wbr>A256<wbr>Mod<wbr>Pow</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPasswordKdfAlgoUnknown">T<wbr>Password<wbr>Kdf<wbr>Algo<wbr>Unknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPaymentCharge">TPaymentCharge</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPaymentRequestedInfo">T<wbr>Payment<wbr>Requested<wbr>Info</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPaymentSavedCredentialsCard">T<wbr>Payment<wbr>Saved<wbr>Credentials<wbr>Card</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPeerChannel">TPeerChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPeerChat">TPeerChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPeerNotifySettings">TPeerNotifySettings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPeerSettings">TPeerSettings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPeerUser">TPeerUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCall">TPhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallAccepted">TPhoneCallAccepted</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallDiscarded">TPhoneCallDiscarded</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallDiscardReasonBusy">T<wbr>Phone<wbr>Call<wbr>Discard<wbr>Reason<wbr>Busy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallDiscardReasonDisconnect">T<wbr>Phone<wbr>Call<wbr>Discard<wbr>Reason<wbr>Disconnect</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallDiscardReasonHangup">T<wbr>Phone<wbr>Call<wbr>Discard<wbr>Reason<wbr>Hangup</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallDiscardReasonMissed">T<wbr>Phone<wbr>Call<wbr>Discard<wbr>Reason<wbr>Missed</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallEmpty">TPhoneCallEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallProtocol">TPhoneCallProtocol</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallRequested">TPhoneCallRequested</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneCallWaiting">TPhoneCallWaiting</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoneConnection">TPhoneConnection</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhoto">TPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhotoCachedSize">TPhotoCachedSize</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhotoEmpty">TPhotoEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhotoSize">TPhotoSize</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPhotoSizeEmpty">TPhotoSizeEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPong">TPong</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPopularContact">TPopularContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPostAddress">TPostAddress</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPQInnerData">TPQInnerData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPQInnerDataDc">TPQInnerDataDc</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPQInnerDataTemp">TPQInnerDataTemp</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPQInnerDataTempDc">TPQInnerDataTempDc</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyKeyChatInvite">T<wbr>Privacy<wbr>Key<wbr>Chat<wbr>Invite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyKeyPhoneCall">TPrivacyKeyPhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyKeyStatusTimestamp">T<wbr>Privacy<wbr>Key<wbr>Status<wbr>Timestamp</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueAllowAll">T<wbr>Privacy<wbr>Value<wbr>Allow<wbr>All</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueAllowContacts">T<wbr>Privacy<wbr>Value<wbr>Allow<wbr>Contacts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueAllowUsers">T<wbr>Privacy<wbr>Value<wbr>Allow<wbr>Users</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueDisallowAll">T<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>All</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueDisallowContacts">T<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>Contacts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TPrivacyValueDisallowUsers">T<wbr>Privacy<wbr>Value<wbr>Disallow<wbr>Users</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TReceivedNotifyMessage">T<wbr>Received<wbr>Notify<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRecentMeUrlChat">TRecentMeUrlChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRecentMeUrlChatInvite">T<wbr>Recent<wbr>Me<wbr>Url<wbr>Chat<wbr>Invite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRecentMeUrlStickerSet">T<wbr>Recent<wbr>Me<wbr>Url<wbr>Sticker<wbr>Set</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRecentMeUrlUnknown">TRecentMeUrlUnknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRecentMeUrlUser">TRecentMeUrlUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TReplyInlineMarkup">TReplyInlineMarkup</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TReplyKeyboardForceReply">T<wbr>Reply<wbr>Keyboard<wbr>Force<wbr>Reply</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TReplyKeyboardHide">TReplyKeyboardHide</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TReplyKeyboardMarkup">TReplyKeyboardMarkup</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TResPQ">TResPQ</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRpcAnswerDropped">TRpcAnswerDropped</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRpcAnswerDroppedRunning">T<wbr>Rpc<wbr>Answer<wbr>Dropped<wbr>Running</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRpcAnswerUnknown">TRpcAnswerUnknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRpcError">TRpcError</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRpcResult">TRpcResult</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TRsaPublicKey">TRsaPublicKey</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSavedPhoneContact">TSavedPhoneContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureCredentialsEncrypted">T<wbr>Secure<wbr>Credentials<wbr>Encrypted</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureData">TSecureData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureFile">TSecureFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureFileEmpty">TSecureFileEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000">T<wbr>Secure<wbr>Password<wbr>Kdf<wbr>Algo<wbr>P<wbr>B<wbr>K<wbr>D<wbr>F2<wbr>H<wbr>M<wbr>A<wbr>C<wbr>S<wbr>H<wbr>A512iter100000</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecurePasswordKdfAlgoSHA512">T<wbr>Secure<wbr>Password<wbr>Kdf<wbr>Algo<wbr>S<wbr>H<wbr>A512</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecurePasswordKdfAlgoUnknown">T<wbr>Secure<wbr>Password<wbr>Kdf<wbr>Algo<wbr>Unknown</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecurePlainEmail">TSecurePlainEmail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecurePlainPhone">TSecurePlainPhone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureRequiredType">TSecureRequiredType</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureRequiredTypeOneOf">T<wbr>Secure<wbr>Required<wbr>Type<wbr>One<wbr>Of</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureSecretSettings">T<wbr>Secure<wbr>Secret<wbr>Settings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValue">TSecureValue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueError">TSecureValueError</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorData">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Data</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorFile">T<wbr>Secure<wbr>Value<wbr>Error<wbr>File</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorFiles">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Files</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorFrontSide">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Front<wbr>Side</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorReverseSide">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Reverse<wbr>Side</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorSelfie">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Selfie</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorTranslationFile">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Translation<wbr>File</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueErrorTranslationFiles">T<wbr>Secure<wbr>Value<wbr>Error<wbr>Translation<wbr>Files</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueHash">TSecureValueHash</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeAddress">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Address</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeBankStatement">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Bank<wbr>Statement</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeDriverLicense">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Driver<wbr>License</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeEmail">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Email</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeIdentityCard">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Identity<wbr>Card</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeInternalPassport">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Internal<wbr>Passport</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypePassport">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Passport</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypePassportRegistration">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Passport<wbr>Registration</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypePersonalDetails">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Personal<wbr>Details</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypePhone">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Phone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeRentalAgreement">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Rental<wbr>Agreement</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeTemporaryRegistration">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Temporary<wbr>Registration</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSecureValueTypeUtilityBill">T<wbr>Secure<wbr>Value<wbr>Type<wbr>Utility<wbr>Bill</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageCancelAction">T<wbr>Send<wbr>Message<wbr>Cancel<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageChooseContactAction">T<wbr>Send<wbr>Message<wbr>Choose<wbr>Contact<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageGamePlayAction">T<wbr>Send<wbr>Message<wbr>Game<wbr>Play<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageGeoLocationAction">T<wbr>Send<wbr>Message<wbr>Geo<wbr>Location<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageRecordAudioAction">T<wbr>Send<wbr>Message<wbr>Record<wbr>Audio<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageRecordRoundAction">T<wbr>Send<wbr>Message<wbr>Record<wbr>Round<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageRecordVideoAction">T<wbr>Send<wbr>Message<wbr>Record<wbr>Video<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageTypingAction">T<wbr>Send<wbr>Message<wbr>Typing<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageUploadAudioAction">T<wbr>Send<wbr>Message<wbr>Upload<wbr>Audio<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageUploadDocumentAction">T<wbr>Send<wbr>Message<wbr>Upload<wbr>Document<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageUploadPhotoAction">T<wbr>Send<wbr>Message<wbr>Upload<wbr>Photo<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageUploadRoundAction">T<wbr>Send<wbr>Message<wbr>Upload<wbr>Round<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TSendMessageUploadVideoAction">T<wbr>Send<wbr>Message<wbr>Upload<wbr>Video<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TServerDHInnerData">TServerDHInnerData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TServerDHParamsFail">TServerDHParamsFail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TServerDHParamsOk">TServerDHParamsOk</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TShippingOption">TShippingOption</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TStickerPack">TStickerPack</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TStickerSet">TStickerSet</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TStickerSetCovered">TStickerSetCovered</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TStickerSetMultiCovered">T<wbr>Sticker<wbr>Set<wbr>Multi<wbr>Covered</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextBold">TTextBold</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextConcat">TTextConcat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextEmail">TTextEmail</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextEmpty">TTextEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextFixed">TTextFixed</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextItalic">TTextItalic</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextPlain">TTextPlain</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextStrike">TTextStrike</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextUnderline">TTextUnderline</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTextUrl">TTextUrl</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeer">TTopPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryBotsInline">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Bots<wbr>Inline</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryBotsPM">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Bots<wbr>P<wbr>M</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryChannels">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Channels</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryCorrespondents">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Correspondents</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryGroups">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Groups</a></li> <li class="selected"><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryPeers">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Peers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryPhoneCalls">T<wbr>Top<wbr>Peer<wbr>Category<wbr>Phone<wbr>Calls</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TTrue">TTrue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotCallbackQuery">T<wbr>Update<wbr>Bot<wbr>Callback<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotInlineQuery">T<wbr>Update<wbr>Bot<wbr>Inline<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotInlineSend">TUpdateBotInlineSend</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotPrecheckoutQuery">T<wbr>Update<wbr>Bot<wbr>Precheckout<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotShippingQuery">T<wbr>Update<wbr>Bot<wbr>Shipping<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotWebhookJSON">T<wbr>Update<wbr>Bot<wbr>Webhook<wbr>J<wbr>S<wbr>O<wbr>N</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateBotWebhookJSONQuery">T<wbr>Update<wbr>Bot<wbr>Webhook<wbr>J<wbr>S<wbr>O<wbr>N<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannel">TUpdateChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelAvailableMessages">T<wbr>Update<wbr>Channel<wbr>Available<wbr>Messages</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelMessageViews">T<wbr>Update<wbr>Channel<wbr>Message<wbr>Views</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelPinnedMessage">T<wbr>Update<wbr>Channel<wbr>Pinned<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelReadMessagesContents">T<wbr>Update<wbr>Channel<wbr>Read<wbr>Messages<wbr>Contents</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelTooLong">T<wbr>Update<wbr>Channel<wbr>Too<wbr>Long</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChannelWebPage">T<wbr>Update<wbr>Channel<wbr>Web<wbr>Page</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatAdmins">TUpdateChatAdmins</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatParticipantAdd">T<wbr>Update<wbr>Chat<wbr>Participant<wbr>Add</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatParticipantAdmin">T<wbr>Update<wbr>Chat<wbr>Participant<wbr>Admin</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatParticipantDelete">T<wbr>Update<wbr>Chat<wbr>Participant<wbr>Delete</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatParticipants">T<wbr>Update<wbr>Chat<wbr>Participants</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateChatUserTyping">T<wbr>Update<wbr>Chat<wbr>User<wbr>Typing</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateConfig">TUpdateConfig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateContactLink">TUpdateContactLink</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateContactRegistered">T<wbr>Update<wbr>Contact<wbr>Registered</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateContactsReset">TUpdateContactsReset</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDcOptions">TUpdateDcOptions</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDeleteChannelMessages">T<wbr>Update<wbr>Delete<wbr>Channel<wbr>Messages</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDeleteMessages">T<wbr>Update<wbr>Delete<wbr>Messages</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDialogPinned">TUpdateDialogPinned</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDialogUnreadMark">T<wbr>Update<wbr>Dialog<wbr>Unread<wbr>Mark</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateDraftMessage">TUpdateDraftMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateEditChannelMessage">T<wbr>Update<wbr>Edit<wbr>Channel<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateEditMessage">TUpdateEditMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateEncryptedChatTyping">T<wbr>Update<wbr>Encrypted<wbr>Chat<wbr>Typing</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateEncryptedMessagesRead">T<wbr>Update<wbr>Encrypted<wbr>Messages<wbr>Read</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateEncryption">TUpdateEncryption</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateFavedStickers">TUpdateFavedStickers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateInlineBotCallbackQuery">T<wbr>Update<wbr>Inline<wbr>Bot<wbr>Callback<wbr>Query</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateLangPack">TUpdateLangPack</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateLangPackTooLong">T<wbr>Update<wbr>Lang<wbr>Pack<wbr>Too<wbr>Long</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateMessageID">TUpdateMessageID</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateNewChannelMessage">T<wbr>Update<wbr>New<wbr>Channel<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateNewEncryptedMessage">T<wbr>Update<wbr>New<wbr>Encrypted<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateNewMessage">TUpdateNewMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateNewStickerSet">TUpdateNewStickerSet</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateNotifySettings">T<wbr>Update<wbr>Notify<wbr>Settings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatePhoneCall">TUpdatePhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatePinnedDialogs">TUpdatePinnedDialogs</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatePrivacy">TUpdatePrivacy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatePtsChanged">TUpdatePtsChanged</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadChannelInbox">T<wbr>Update<wbr>Read<wbr>Channel<wbr>Inbox</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadChannelOutbox">T<wbr>Update<wbr>Read<wbr>Channel<wbr>Outbox</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadFeaturedStickers">T<wbr>Update<wbr>Read<wbr>Featured<wbr>Stickers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadHistoryInbox">T<wbr>Update<wbr>Read<wbr>History<wbr>Inbox</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadHistoryOutbox">T<wbr>Update<wbr>Read<wbr>History<wbr>Outbox</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateReadMessagesContents">T<wbr>Update<wbr>Read<wbr>Messages<wbr>Contents</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateRecentStickers">T<wbr>Update<wbr>Recent<wbr>Stickers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdates">TUpdates</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateSavedGifs">TUpdateSavedGifs</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatesCombined">TUpdatesCombined</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateServiceNotification">T<wbr>Update<wbr>Service<wbr>Notification</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateShort">TUpdateShort</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateShortChatMessage">T<wbr>Update<wbr>Short<wbr>Chat<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateShortMessage">TUpdateShortMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateShortSentMessage">T<wbr>Update<wbr>Short<wbr>Sent<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateStickerSets">TUpdateStickerSets</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateStickerSetsOrder">T<wbr>Update<wbr>Sticker<wbr>Sets<wbr>Order</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdatesTooLong">TUpdatesTooLong</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserBlocked">TUpdateUserBlocked</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserName">TUpdateUserName</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserPhone">TUpdateUserPhone</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserPhoto">TUpdateUserPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserStatus">TUpdateUserStatus</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateUserTyping">TUpdateUserTyping</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUpdateWebPage">TUpdateWebPage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUser">TUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserEmpty">TUserEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserFull">TUserFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserProfilePhoto">TUserProfilePhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserProfilePhotoEmpty">T<wbr>User<wbr>Profile<wbr>Photo<wbr>Empty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusEmpty">TUserStatusEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusLastMonth">TUserStatusLastMonth</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusLastWeek">TUserStatusLastWeek</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusOffline">TUserStatusOffline</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusOnline">TUserStatusOnline</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TUserStatusRecently">TUserStatusRecently</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TVector_1">TVector<wbr>&lt;T&gt;<wbr></a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWallPaper">TWallPaper</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWallPaperSolid">TWallPaperSolid</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebAuthorization">TWebAuthorization</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebDocument">TWebDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebDocumentNoProxy">TWebDocumentNoProxy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebPage">TWebPage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebPageEmpty">TWebPageEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebPageNotModified">TWebPageNotModified</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/TWebPagePending">TWebPagePending</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/Utils">Utils</a></li> <li class="header">Interface Types</li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IAccessPointRule">IAccessPointRule</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IAccountDaysTTL">IAccountDaysTTL</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IAuthorization">IAuthorization</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBadMsgNotification">IBadMsgNotification</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBool">IBool</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBotCommand">IBotCommand</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBotInfo">IBotInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBotInlineMessage">IBotInlineMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IBotInlineResult">IBotInlineResult</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ICdnConfig">ICdnConfig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ICdnPublicKey">ICdnPublicKey</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelAdminLogEvent">I<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelAdminLogEventAction">I<wbr>Channel<wbr>Admin<wbr>Log<wbr>Event<wbr>Action</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelAdminLogEventsFilter">I<wbr>Channel<wbr>Admin<wbr>Log<wbr>Events<wbr>Filter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelAdminRights">IChannelAdminRights</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelBannedRights">IChannelBannedRights</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelMessagesFilter">I<wbr>Channel<wbr>Messages<wbr>Filter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelParticipant">IChannelParticipant</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChannelParticipantsFilter">I<wbr>Channel<wbr>Participants<wbr>Filter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChat">IChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatCommon">IChatCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatFull">IChatFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatInvite">IChatInvite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatParticipant">IChatParticipant</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatParticipants">IChatParticipants</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IChatPhoto">IChatPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IConfig">IConfig</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IContact">IContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IContactBlocked">IContactBlocked</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IContactLink">IContactLink</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IContactStatus">IContactStatus</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDataJSON">IDataJSON</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDcOption">IDcOption</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDestroyAuthKeyRes">IDestroyAuthKeyRes</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDestroySessionRes">IDestroySessionRes</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDialog">IDialog</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDialogPeer">IDialogPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDocument">IDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDocumentAttribute">IDocumentAttribute</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IDraftMessage">IDraftMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IEmpty">IEmpty</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IEncryptedChat">IEncryptedChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IEncryptedChatCommon">IEncryptedChatCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IEncryptedFile">IEncryptedFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IEncryptedMessage">IEncryptedMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IError">IError</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IExportedChatInvite">IExportedChatInvite</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IExportedMessageLink">IExportedMessageLink</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IFileHash">IFileHash</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IFileLocation">IFileLocation</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IFoundGif">IFoundGif</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IFutureSalts">IFutureSalts</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IGame">IGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IGeoPoint">IGeoPoint</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IHighScore">IHighScore</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IImportedContact">IImportedContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInlineBotSwitchPM">IInlineBotSwitchPM</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputAppEvent">IInputAppEvent</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputBotInlineMessage">I<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputBotInlineMessageID">I<wbr>Input<wbr>Bot<wbr>Inline<wbr>Message<wbr>I<wbr>D</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputBotInlineResult">I<wbr>Input<wbr>Bot<wbr>Inline<wbr>Result</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputChannel">IInputChannel</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputChatPhoto">IInputChatPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputChatPhotoCommon">I<wbr>Input<wbr>Chat<wbr>Photo<wbr>Common</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputCheckPasswordSRP">I<wbr>Input<wbr>Check<wbr>Password<wbr>S<wbr>R<wbr>P</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputClientProxy">IInputClientProxy</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputContact">IInputContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputDialogPeer">IInputDialogPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputDocument">IInputDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputEncryptedChat">IInputEncryptedChat</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputEncryptedFile">IInputEncryptedFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputEncryptedFileCommon">I<wbr>Input<wbr>Encrypted<wbr>File<wbr>Common</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputFile">IInputFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputFileLocation">IInputFileLocation</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputGame">IInputGame</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputGeoPoint">IInputGeoPoint</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputMedia">IInputMedia</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputMediaCommon">IInputMediaCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputMessage">IInputMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputNotifyPeer">IInputNotifyPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPaymentCredentials">I<wbr>Input<wbr>Payment<wbr>Credentials</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPeer">IInputPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPeerCommon">IInputPeerCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPeerNotifySettings">I<wbr>Input<wbr>Peer<wbr>Notify<wbr>Settings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPhoneCall">IInputPhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPhoto">IInputPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPrivacyKey">IInputPrivacyKey</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputPrivacyRule">IInputPrivacyRule</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputSecureFile">IInputSecureFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputSecureValue">IInputSecureValue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputSingleMedia">IInputSingleMedia</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputStickeredMedia">IInputStickeredMedia</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputStickerSet">IInputStickerSet</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputStickerSetCommon">I<wbr>Input<wbr>Sticker<wbr>Set<wbr>Common</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputStickerSetItem">IInputStickerSetItem</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputUser">IInputUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputUserCommon">IInputUserCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputWebDocument">IInputWebDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInputWebFileLocation">I<wbr>Input<wbr>Web<wbr>File<wbr>Location</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IInvoice">IInvoice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IIpPort">IIpPort</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IKeyboardButton">IKeyboardButton</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IKeyboardButtonRow">IKeyboardButtonRow</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ILabeledPrice">ILabeledPrice</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ILangPackDifference">ILangPackDifference</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ILangPackLanguage">ILangPackLanguage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ILangPackString">ILangPackString</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMaskCoords">IMaskCoords</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessage">IMessage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageAction">IMessageAction</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageActionCommon">IMessageActionCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageCommon">IMessageCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageEntity">IMessageEntity</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageFwdHeader">IMessageFwdHeader</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageMedia">IMessageMedia</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageMediaCommon">IMessageMediaCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessageRange">IMessageRange</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessagesFilter">IMessagesFilter</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMessagesFilterCommon">I<wbr>Messages<wbr>Filter<wbr>Common</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IMsgDetailedInfo">IMsgDetailedInfo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/INearestDc">INearestDc</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/INotifyPeer">INotifyPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IObject">IObject</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPage">IPage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPageBlock">IPageBlock</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPasswordKdfAlgo">IPasswordKdfAlgo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPaymentCharge">IPaymentCharge</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPaymentRequestedInfo">I<wbr>Payment<wbr>Requested<wbr>Info</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPaymentSavedCredentials">I<wbr>Payment<wbr>Saved<wbr>Credentials</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPeer">IPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPeerNotifySettings">IPeerNotifySettings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPeerSettings">IPeerSettings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoneCall">IPhoneCall</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoneCallCommon">IPhoneCallCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoneCallDiscardReason">I<wbr>Phone<wbr>Call<wbr>Discard<wbr>Reason</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoneCallProtocol">IPhoneCallProtocol</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoneConnection">IPhoneConnection</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhoto">IPhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhotoSize">IPhotoSize</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPhotoSizeCommon">IPhotoSizeCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPong">IPong</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPopularContact">IPopularContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPostAddress">IPostAddress</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPQInnerData">IPQInnerData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPrivacyKey">IPrivacyKey</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IPrivacyRule">IPrivacyRule</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IReceivedNotifyMessage">I<wbr>Received<wbr>Notify<wbr>Message</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRecentMeUrl">IRecentMeUrl</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IReplyMarkup">IReplyMarkup</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IReportReason">IReportReason</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRequest">IRequest</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRequest_1">IRequest<wbr>&lt;TResult&gt;<wbr></a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IResPQ">IResPQ</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRichText">IRichText</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRichTextCommon">IRichTextCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IRpcDropAnswer">IRpcDropAnswer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISavedContact">ISavedContact</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureCredentialsEncrypted">I<wbr>Secure<wbr>Credentials<wbr>Encrypted</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureData">ISecureData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureFile">ISecureFile</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecurePasswordKdfAlgo">I<wbr>Secure<wbr>Password<wbr>Kdf<wbr>Algo</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecurePlainData">ISecurePlainData</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureRequiredType">ISecureRequiredType</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureSecretSettings">I<wbr>Secure<wbr>Secret<wbr>Settings</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureValue">ISecureValue</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureValueError">ISecureValueError</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureValueHash">ISecureValueHash</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISecureValueType">ISecureValueType</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISendMessageAction">ISendMessageAction</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IServerDHParams">IServerDHParams</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ISetClientDHParamsAnswer">I<wbr>Set<wbr>Client<wbr>D<wbr>H<wbr>Params<wbr>Answer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IShippingOption">IShippingOption</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IStickerPack">IStickerPack</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IStickerSet">IStickerSet</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IStickerSetCovered">IStickerSetCovered</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeer">ITopPeer</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeerCategory">ITopPeerCategory</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeerCategoryPeers">I<wbr>Top<wbr>Peer<wbr>Category<wbr>Peers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUpdate">IUpdate</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUpdates">IUpdates</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUser">IUser</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUserFull">IUserFull</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUserProfilePhoto">IUserProfilePhoto</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUserStatus">IUserStatus</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IUserStatusCommon">IUserStatusCommon</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IWallPaper">IWallPaper</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IWebAuthorization">IWebAuthorization</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IWebDocument">IWebDocument</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IWebPage">IWebPage</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IWebPageCommon">IWebPageCommon</a></li> </ul> </section> </aside> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper"> <section class="content-header"> <h1>T<wbr>Top<wbr>Peer<wbr>Category<wbr>Peers <small>Class</small></h1> </section> <section class="content"> <div class="panel panel-default"> <div class="panel-body"> <div class="row"> <div class="col-md-6"> <dl class="dl-horizontal"> <dt>Namespace</dt> <dd><a href="/OpenTl.Schema/api/OpenTl.Schema">OpenTl<wbr>.Schema</a></dd> <dt>Interfaces</dt> <dd> <ul class="list-unstyled"> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeerCategoryPeers">I<wbr>Top<wbr>Peer<wbr>Category<wbr>Peers</a></li> <li><a href="/OpenTl.Schema/api/OpenTl.Schema/IObject">IObject</a></li> </ul> </dd> <dt>Base Types</dt> <dd> <ul class="list-unstyled"> <li>object</li> </ul> </dd> </dl> </div> <div class="col-md-6"> <div class="mermaid"> graph TD Base0["object"]--&gt;Type Interface0["ITopPeerCategoryPeers"]-.-&gt;Type click Interface0 "/OpenTl.Schema/api/OpenTl.Schema/ITopPeerCategoryPeers" Interface1["IObject"]-.-&gt;Type click Interface1 "/OpenTl.Schema/api/OpenTl.Schema/IObject" Type["TTopPeerCategoryPeers"] class Type type-node </div> </div> </div> </div> </div> <h1 id="Syntax">Syntax</h1> <pre><code>[Serialize(0xfb834291)] public sealed class TTopPeerCategoryPeers : ITopPeerCategoryPeers, IObject</code></pre> <h1 id="Attributes">Attributes</h1> <div class="box"> <div class="box-body no-padding table-responsive"> <table class="table table-striped table-hover two-cols"> <thead> <tr> <th>Type</th> <th>Description</th> </tr> </thead> <tbody><tr> <td>SerializeAttribute</td> <td></td> </tr> </tbody></table> </div> </div> <h1 id="Properties">Properties</h1> <div class="box"> <div class="box-body no-padding table-responsive"> <table class="table table-striped table-hover three-cols"> <thead> <tr> <th>Name</th> <th>Value</th> <th>Summary</th> </tr> </thead> <tbody><tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryPeers/A0E75D91.html">Category</a></td> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeerCategory">ITopPeerCategory</a></td> <td> <div></div> </td> </tr> <tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryPeers/D82B2956.html">Count</a></td> <td>int</td> <td> <div></div> </td> </tr> <tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/TTopPeerCategoryPeers/604DE17A.html">Peers</a></td> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/TVector_1">TVector</a><wbr>&lt;<a href="/OpenTl.Schema/api/OpenTl.Schema/ITopPeer">ITopPeer</a>&gt;<wbr></td> <td> <div></div> </td> </tr> </tbody></table> </div> </div> <h1 id="ExtensionMethods">Extension Methods</h1> <div class="box"> <div class="box-body no-padding table-responsive"> <table class="table table-striped table-hover three-cols"> <thead> <tr> <th>Name</th> <th>Value</th> <th>Summary</th> </tr> </thead> <tbody><tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/Utils/A1A958DE.html">As<wbr>&lt;T&gt;<wbr><wbr>()<wbr></a></td> <td>T</td> <td> <div></div> <div><small><em>From <a href="/OpenTl.Schema/api/OpenTl.Schema/Utils">Utils</a></em></small></div> </td> </tr> <tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/Utils/4941F7D3.html">Is<wbr>&lt;T&gt;<wbr><wbr>()<wbr></a></td> <td>T</td> <td> <div></div> <div><small><em>From <a href="/OpenTl.Schema/api/OpenTl.Schema/Utils">Utils</a></em></small></div> </td> </tr> <tr> <td><a href="/OpenTl.Schema/api/OpenTl.Schema/Utils/CF7043C9.html">IsEmpty<wbr>()<wbr></a></td> <td>bool</td> <td> <div></div> <div><small><em>From <a href="/OpenTl.Schema/api/OpenTl.Schema/Utils">Utils</a></em></small></div> </td> </tr> </tbody></table> </div> </div> </section> </div> <!-- Footer --> <footer class="main-footer"> </footer> </div> <div class="wrapper bottom-wrapper"> <footer class="bottom-footer"> Generated by <a href="https://wyam.io">Wyam</a> </footer> </div> <a href="javascript:" id="return-to-top"><i class="fa fa-chevron-up"></i></a> <script> // Close the sidebar if we select an anchor link $(".main-sidebar a[href^='#']:not('.expand')").click(function(){ $(document.body).removeClass('sidebar-open'); }); $(document).load(function() { mermaid.initialize( { flowchart: { htmlLabels: false, useMaxWidth:false } }); mermaid.init(undefined, ".mermaid") $('svg').addClass('img-responsive'); $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); }); hljs.initHighlightingOnLoad(); // Back to top $(window).scroll(function() { if ($(this).scrollTop() >= 200) { // If page is scrolled more than 50px $('#return-to-top').fadeIn(1000); // Fade in the arrow } else { $('#return-to-top').fadeOut(1000); // Else fade out the arrow } }); $('#return-to-top').click(function() { // When arrow is clicked $('body,html').animate({ scrollTop : 0 // Scroll to top of body }, 500); }); </script> </body></html>
{ "content_hash": "2b0121a37e50b50b6974fb9058374649", "timestamp": "", "source": "github", "line_count": 1168, "max_line_length": 323, "avg_line_length": 85.6943493150685, "alnum_prop": 0.7060574876862056, "repo_name": "OpenTl/OpenTl.Schema", "id": "cb73f26a69c6e453d1ea47bbc4b3974d123faa90", "size": "100093", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/api/OpenTl.Schema/TTopPeerCategoryPeers/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "810786" }, { "name": "F#", "bytes": "19501" }, { "name": "PowerShell", "bytes": "1288" } ], "symlink_target": "" }
layout: post title: "Read data from Excel using NPOI in C#" subtitle: "Read a column from Excel sheet" date: 2017-02-18 12:00:00 author: "Shengwen" header-img: "img/post-bg-js-module.jpg" tags: - C# - Excel --- In this example, we simply read a column from an Excel sheet and print each value in console. NPOI is the C# implementation of Java POI. The index of row and column (cells in a row) starts from 0. ```c# using System; using System.IO; using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; private static void procExcel(string fileName, string schoolPicDir){ try { IWorkbook workbook; FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); if (fileName.IndexOf(".xlsx") > 0) workbook = new XSSFWorkbook(fs); else if (fileName.IndexOf(".xls") > 0) workbook = new HSSFWorkbook(fs); //First sheet ISheet sheet = workbook.GetSheetAt(0); if (sheet != null) { int rowCount = sheet.LastRowNum; // This may not be valid row count. // If first row is table head, i starts from 1 for (int i = 1; i <= rowCount; i++) { IRow curRow = sheet.GetRow(i); // Works for consecutive data. Use continue otherwise if (curRow == null) { // Valid row count rowCount = i - 1; break; } // Get data from the 4th column (4th cell of each row) var cellValue = curRow.GetCell(3).StringCellValue.Trim(); Console.WriteLine(cellValue); } } } catch(Exception e) { Console.WriteLine(e.Message); } } ```
{ "content_hash": "de346442a0d5173c034d36d1a8cf50cb", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 103, "avg_line_length": 30.966101694915253, "alnum_prop": 0.5506294471811713, "repo_name": "shengwenbai/shengwenbai.github.io", "id": "ff30a94e3641765c6f22e773c706f07956f128b8", "size": "1832", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/2017-02-18-npoi.markdown", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "72199" }, { "name": "HTML", "bytes": "47455" }, { "name": "JavaScript", "bytes": "20527" }, { "name": "Ruby", "bytes": "6575" } ], "symlink_target": "" }
if(NOT DEFINED CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "/usr/local") endif() string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") # Set the install configuration name. if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) if(BUILD_TYPE) string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") else() set(CMAKE_INSTALL_CONFIG_NAME "Release") endif() message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") endif() # Set the component getting installed. if(NOT CMAKE_INSTALL_COMPONENT) if(COMPONENT) message(STATUS "Install component: \"${COMPONENT}\"") set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") else() set(CMAKE_INSTALL_COMPONENT) endif() endif() # Install shared libraries without execute permission? if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) set(CMAKE_INSTALL_SO_NO_EXE "0") endif() if(CMAKE_INSTALL_COMPONENT) set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") else() set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") endif() string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT "${CMAKE_INSTALL_MANIFEST_FILES}") file(WRITE "/Users/along/GitHub/JNIDemo/app/.externalNativeBuild/cmake/release/mips64/${CMAKE_INSTALL_MANIFEST}" "${CMAKE_INSTALL_MANIFEST_CONTENT}")
{ "content_hash": "fce6f0852597de0f39f46177c04e9258", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 112, "avg_line_length": 32.48780487804878, "alnum_prop": 0.713963963963964, "repo_name": "sunalong/JNIDemo", "id": "38aa49625109980e23f996e642bbd18d70e729a6", "size": "1422", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/.externalNativeBuild/cmake/release/mips64/cmake_install.cmake", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "569" }, { "name": "C++", "bytes": "10688" }, { "name": "CMake", "bytes": "102602" }, { "name": "Java", "bytes": "8286" } ], "symlink_target": "" }
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. //////////////////////////////////////////////////////////////////////////////// // COMDynamic.h // This module defines the native methods that are used for Dynamic IL generation //////////////////////////////////////////////////////////////////////////////// #include "common.h" #include "field.h" #include "comdynamic.h" #include "commodule.h" #include "reflectclasswriter.h" #include "corerror.h" #include "iceefilegen.h" #include "strongname.h" #include "ceefilegenwriter.h" #include "typekey.h" //This structure is used in SetMethodIL to walk the exceptions. //It maps to System.Reflection.Emit.ExceptionHandler class //DO NOT MOVE ANY OF THE FIELDS #include <pshpack1.h> struct ExceptionInstance { INT32 m_exceptionType; INT32 m_start; INT32 m_end; INT32 m_filterOffset; INT32 m_handle; INT32 m_handleEnd; INT32 m_type; }; #include <poppack.h> //************************************************************* // // Defining a type into metadata of this dynamic module // //************************************************************* INT32 QCALLTYPE COMDynamicWrite::DefineGenericParam(QCall::ModuleHandle pModule, LPCWSTR wszFullName, INT32 tkParent, INT32 attributes, INT32 position, INT32 * pConstraintTokens) { QCALL_CONTRACT; mdTypeDef classE = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); IfFailThrow(pRCW->GetEmitter()->DefineGenericParam( tkParent, position, attributes, wszFullName, 0, (mdToken *)pConstraintTokens, &classE)); END_QCALL; return (INT32)classE; } INT32 QCALLTYPE COMDynamicWrite::DefineType(QCall::ModuleHandle pModule, LPCWSTR wszFullName, INT32 tkParent, INT32 attributes, INT32 tkEnclosingType, INT32 * pInterfaceTokens) { QCALL_CONTRACT; mdTypeDef classE = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); HRESULT hr; if (RidFromToken(tkEnclosingType)) { // defining nested type hr = pRCW->GetEmitter()->DefineNestedType(wszFullName, attributes, tkParent == 0 ? mdTypeRefNil : tkParent, (mdToken *)pInterfaceTokens, tkEnclosingType, &classE); } else { // top level type hr = pRCW->GetEmitter()->DefineTypeDef(wszFullName, attributes, tkParent == 0 ? mdTypeRefNil : tkParent, (mdToken *)pInterfaceTokens, &classE); } if (hr == META_S_DUPLICATE) { COMPlusThrow(kArgumentException, W("Argument_DuplicateTypeName")); } if (FAILED(hr)) { _ASSERTE(hr == E_OUTOFMEMORY || !"DefineTypeDef Failed"); COMPlusThrowHR(hr); } AllocMemTracker amTracker; pModule->GetClassLoader()->AddAvailableClassDontHaveLock(pModule, classE, &amTracker); amTracker.SuppressRelease(); END_QCALL; return (INT32)classE; } // This function will reset the parent class in metadata void QCALLTYPE COMDynamicWrite::SetParentType(QCall::ModuleHandle pModule, INT32 tdType, INT32 tkParent) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); IfFailThrow( pRCW->GetEmitHelper()->SetTypeParent(tdType, tkParent) ); END_QCALL; } // This function will add another interface impl void QCALLTYPE COMDynamicWrite::AddInterfaceImpl(QCall::ModuleHandle pModule, INT32 tdType, INT32 tkInterface) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); IfFailThrow( pRCW->GetEmitHelper()->AddInterfaceImpl(tdType, tkInterface) ); END_QCALL; } // This function will create a method within the class INT32 QCALLTYPE COMDynamicWrite::DefineMethodSpec(QCall::ModuleHandle pModule, INT32 tkParent, LPCBYTE pSignature, INT32 sigLength) { QCALL_CONTRACT; mdMethodDef memberE = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the Method IfFailThrow( pRCW->GetEmitter()->DefineMethodSpec(tkParent, //ParentTypeDef (PCCOR_SIGNATURE)pSignature, //Blob value of a COM+ signature sigLength, //Size of the signature blob &memberE) ); //[OUT]methodToken END_QCALL; return (INT32) memberE; } INT32 QCALLTYPE COMDynamicWrite::DefineMethod(QCall::ModuleHandle pModule, INT32 tkParent, LPCWSTR wszName, LPCBYTE pSignature, INT32 sigLength, INT32 attributes) { QCALL_CONTRACT; mdMethodDef memberE = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the Method IfFailThrow( pRCW->GetEmitter()->DefineMethod(tkParent, //ParentTypeDef wszName, //Name of Member attributes, //Member Attributes (public, etc); (PCCOR_SIGNATURE)pSignature, //Blob value of a COM+ signature sigLength, //Size of the signature blob 0, //Code RVA miIL | miManaged, //Implementation Flags is default to managed IL &memberE) ); //[OUT]methodToken END_QCALL; return (INT32) memberE; } /*================================DefineField================================= **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ mdFieldDef QCALLTYPE COMDynamicWrite::DefineField(QCall::ModuleHandle pModule, INT32 tkParent, LPCWSTR wszName, LPCBYTE pSignature, INT32 sigLength, INT32 attr) { QCALL_CONTRACT; mdFieldDef retVal = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); //Emit the field. IfFailThrow( pRCW->GetEmitter()->DefineField(tkParent, wszName, attr, (PCCOR_SIGNATURE)pSignature, sigLength, ELEMENT_TYPE_VOID, NULL, (ULONG) -1, &retVal) ); END_QCALL; return retVal; } // This method computes the same result as COR_ILMETHOD_SECT_EH::Size(...) but // does so in a way that detects overflow if the number of exception clauses is // too great (in which case an OOM exception is thrown). We do this rather than // modifying COR_ILMETHOD_SECT_EH::Size because that routine is published in the // SDK and can't take breaking changes and because the overflow support (and // exception mechanism) we're using is only available to the VM. UINT32 ExceptionHandlingSize(unsigned uNumExceptions, COR_ILMETHOD_SECT_EH_CLAUSE_FAT* pClauses) { STANDARD_VM_CONTRACT; if (uNumExceptions == 0) return 0; // Speculatively compute the size for the slim version of the header. S_UINT32 uSmallSize = S_UINT32(sizeof(COR_ILMETHOD_SECT_EH_SMALL)) + (S_UINT32(sizeof(IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_SMALL)) * (S_UINT32(uNumExceptions - 1))); if (uSmallSize.IsOverflow()) COMPlusThrowOM(); if (uSmallSize.Value() > COR_ILMETHOD_SECT_SMALL_MAX_DATASIZE) goto FatCase; // Check whether any of the clauses won't fit in the slim case. for (UINT32 i = 0; i < uNumExceptions; i++) { COR_ILMETHOD_SECT_EH_CLAUSE_FAT* pFatClause = (COR_ILMETHOD_SECT_EH_CLAUSE_FAT*)&pClauses[i]; if (pFatClause->GetTryOffset() > 0xFFFF || pFatClause->GetTryLength() > 0xFF || pFatClause->GetHandlerOffset() > 0xFFFF || pFatClause->GetHandlerLength() > 0xFF) { goto FatCase; } } _ASSERTE(uSmallSize.Value() == COR_ILMETHOD_SECT_EH::Size(uNumExceptions, pClauses)); return uSmallSize.Value(); FatCase: S_UINT32 uFatSize = S_UINT32(sizeof(COR_ILMETHOD_SECT_EH_FAT)) + (S_UINT32(sizeof(IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT)) * (S_UINT32(uNumExceptions - 1))); if (uFatSize.IsOverflow()) COMPlusThrowOM(); _ASSERTE(uFatSize.Value() == COR_ILMETHOD_SECT_EH::Size(uNumExceptions, pClauses)); return uFatSize.Value(); } // SetMethodIL -- This function will create a method within the class void QCALLTYPE COMDynamicWrite::SetMethodIL(QCall::ModuleHandle pModule, INT32 tk, BOOL fIsInitLocal, LPCBYTE pBody, INT32 cbBody, LPCBYTE pLocalSig, INT32 sigLength, UINT16 maxStackSize, ExceptionInstance * pExceptions, INT32 numExceptions, INT32 * pTokenFixups, INT32 numTokenFixups) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); _ASSERTE(pLocalSig); PCCOR_SIGNATURE pcSig = (PCCOR_SIGNATURE)pLocalSig; _ASSERTE(*pcSig == IMAGE_CEE_CS_CALLCONV_LOCAL_SIG); mdSignature pmLocalSigToken; if (sigLength==2 && pcSig[0]==0 && pcSig[1]==0) { //This is an empty local variable sig pmLocalSigToken=0; } else { IfFailThrow(pRCW->GetEmitter()->GetTokenFromSig( pcSig, sigLength, &pmLocalSigToken)); } COR_ILMETHOD_FAT fatHeader; // set fatHeader.Flags to CorILMethod_InitLocals if user wants to zero init the stack frame. // fatHeader.SetFlags(fIsInitLocal ? CorILMethod_InitLocals : 0); fatHeader.SetMaxStack(maxStackSize); fatHeader.SetLocalVarSigTok(pmLocalSigToken); fatHeader.SetCodeSize(cbBody); bool moreSections = (numExceptions != 0); unsigned codeSizeAligned = fatHeader.GetCodeSize(); if (moreSections) codeSizeAligned = AlignUp(codeSizeAligned, 4); // to insure EH section aligned unsigned headerSize = COR_ILMETHOD::Size(&fatHeader, numExceptions != 0); //Create the exception handlers. CQuickArray<COR_ILMETHOD_SECT_EH_CLAUSE_FAT> clauses; if (numExceptions > 0) { clauses.AllocThrows(numExceptions); for (int i = 0; i < numExceptions; i++) { clauses[i].SetFlags((CorExceptionFlag)(pExceptions[i].m_type)); clauses[i].SetTryOffset(pExceptions[i].m_start); clauses[i].SetTryLength(pExceptions[i].m_end - pExceptions[i].m_start); clauses[i].SetHandlerOffset(pExceptions[i].m_handle); clauses[i].SetHandlerLength(pExceptions[i].m_handleEnd - pExceptions[i].m_handle); if (pExceptions[i].m_type == COR_ILEXCEPTION_CLAUSE_FILTER) { clauses[i].SetFilterOffset(pExceptions[i].m_filterOffset); } else if (pExceptions[i].m_type!=COR_ILEXCEPTION_CLAUSE_FINALLY) { clauses[i].SetClassToken(pExceptions[i].m_exceptionType); } else { clauses[i].SetClassToken(mdTypeRefNil); } } } unsigned ehSize = ExceptionHandlingSize(numExceptions, clauses.Ptr()); S_UINT32 totalSizeSafe = S_UINT32(headerSize) + S_UINT32(codeSizeAligned) + S_UINT32(ehSize); if (totalSizeSafe.IsOverflow()) COMPlusThrowOM(); UINT32 totalSize = totalSizeSafe.Value(); ICeeGen* pGen = pRCW->GetCeeGen(); BYTE* buf = NULL; ULONG methodRVA; pGen->AllocateMethodBuffer(totalSize, &buf, &methodRVA); if (buf == NULL) COMPlusThrowOM(); _ASSERTE(buf != NULL); _ASSERTE((((size_t) buf) & 3) == 0); // header is dword aligned #ifdef _DEBUG BYTE* endbuf = &buf[totalSize]; #endif BYTE * startBuf = buf; // Emit the header buf += COR_ILMETHOD::Emit(headerSize, &fatHeader, moreSections, buf); //Emit the code //The fatHeader.CodeSize is a workaround to see if we have an interface or an //abstract method. Force enough verification in native to ensure that //this is true. if (fatHeader.GetCodeSize()!=0) { memcpy(buf, pBody, fatHeader.GetCodeSize()); } buf += codeSizeAligned; // Emit the eh CQuickArray<ULONG> ehTypeOffsets; if (numExceptions > 0) { // Allocate space for the the offsets to the TypeTokens in the Exception headers // in the IL stream. ehTypeOffsets.AllocThrows(numExceptions); // Emit the eh. This will update the array ehTypeOffsets with offsets // to Exception type tokens. The offsets are with reference to the // beginning of eh section. buf += COR_ILMETHOD_SECT_EH::Emit(ehSize, numExceptions, clauses.Ptr(), false, buf, ehTypeOffsets.Ptr()); } _ASSERTE(buf == endbuf); //Get the IL Section. HCEESECTION ilSection; IfFailThrow(pGen->GetIlSection(&ilSection)); // Token Fixup data... ULONG ilOffset = methodRVA + headerSize; //Add all of the relocs based on the info which I saved from ILGenerator. //Add the Token Fixups for (int iTokenFixup=0; iTokenFixup<numTokenFixups; iTokenFixup++) { IfFailThrow(pGen->AddSectionReloc(ilSection, pTokenFixups[iTokenFixup] + ilOffset, ilSection, srRelocMapToken)); } // Add token fixups for exception type tokens. for (int iException=0; iException < numExceptions; iException++) { if (ehTypeOffsets[iException] != (ULONG) -1) { IfFailThrow(pGen->AddSectionReloc( ilSection, ehTypeOffsets[iException] + codeSizeAligned + ilOffset, ilSection, srRelocMapToken)); } } //nasty interface workaround. What does this mean for abstract methods? if (fatHeader.GetCodeSize() != 0) { // add the starting address of the il blob to the il blob hash table // we need to find this information from out of process for debugger inspection // APIs so we have to store this information where we can get it later pModule->SetDynamicIL(mdToken(tk), TADDR(startBuf), FALSE); DWORD dwImplFlags; //Set the RVA of the method. IfFailThrow(pRCW->GetMDImport()->GetMethodImplProps(tk, NULL, &dwImplFlags)); dwImplFlags |= (miManaged | miIL); IfFailThrow(pRCW->GetEmitter()->SetMethodProps(tk, (DWORD) -1, methodRVA, dwImplFlags)); } END_QCALL; } void QCALLTYPE COMDynamicWrite::TermCreateClass(QCall::ModuleHandle pModule, INT32 tk, QCall::ObjectHandleOnStack retType) { QCALL_CONTRACT; TypeHandle typeHnd; BEGIN_QCALL; _ASSERTE(pModule->GetReflectionModule()->GetClassWriter()); // Use the same service, regardless of whether we are generating a normal // class, or the special class for the module that holds global functions // & methods. pModule->GetReflectionModule()->AddClass(tk); // manually load the class if it is not the global type if (!IsNilToken(tk)) { TypeKey typeKey(pModule, tk); typeHnd = pModule->GetClassLoader()->LoadTypeHandleForTypeKey(&typeKey, TypeHandle()); } if (!typeHnd.IsNull()) { GCX_COOP(); retType.Set(typeHnd.GetManagedClassObject()); } END_QCALL; return; } /*============================SetPInvokeData============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ void QCALLTYPE COMDynamicWrite::SetPInvokeData(QCall::ModuleHandle pModule, LPCWSTR wszDllName, LPCWSTR wszFunctionName, INT32 token, INT32 linkFlags) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); mdModuleRef mrImportDll = mdTokenNil; IfFailThrow(pRCW->GetEmitter()->DefineModuleRef(wszDllName, &mrImportDll)); IfFailThrow(pRCW->GetEmitter()->DefinePinvokeMap( token, // the method token linkFlags, // the mapping flags wszFunctionName, // function name mrImportDll)); IfFailThrow(pRCW->GetEmitter()->SetMethodProps(token, (DWORD) -1, 0x0, miIL)); END_QCALL; } /*============================DefineProperty============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ INT32 QCALLTYPE COMDynamicWrite::DefineProperty(QCall::ModuleHandle pModule, INT32 tkParent, LPCWSTR wszName, INT32 attr, LPCBYTE pSignature, INT32 sigLength) { QCALL_CONTRACT; mdProperty pr = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the Property IfFailThrow(pRCW->GetEmitter()->DefineProperty( tkParent, // ParentTypeDef wszName, // Name of Member attr, // property Attributes (prDefaultProperty, etc); (PCCOR_SIGNATURE)pSignature, // Blob value of a COM+ signature sigLength, // Size of the signature blob ELEMENT_TYPE_VOID, // don't specify the default value 0, // no default value (ULONG) -1, // optional length mdMethodDefNil, // no setter mdMethodDefNil, // no getter NULL, // no other methods &pr)); END_QCALL; return (INT32)pr; } /*============================DefineEvent============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ INT32 QCALLTYPE COMDynamicWrite::DefineEvent(QCall::ModuleHandle pModule, INT32 tkParent, LPCWSTR wszName, INT32 attr, INT32 tkEventType) { QCALL_CONTRACT; mdProperty ev = mdTokenNil; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the Event IfFailThrow(pRCW->GetEmitHelper()->DefineEventHelper( tkParent, // ParentTypeDef wszName, // Name of Member attr, // property Attributes (prDefaultProperty, etc); tkEventType, // the event type. Can be TypeDef or TypeRef &ev)); END_QCALL; return (INT32)ev; } /*============================DefineMethodSemantics============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ void QCALLTYPE COMDynamicWrite::DefineMethodSemantics(QCall::ModuleHandle pModule, INT32 tkAssociation, INT32 attr, INT32 tkMethod) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the MethodSemantics IfFailThrow(pRCW->GetEmitHelper()->DefineMethodSemanticsHelper( tkAssociation, attr, tkMethod)); END_QCALL; } /*============================SetMethodImpl============================ ** To set a Method's Implementation flags ==============================================================================*/ void QCALLTYPE COMDynamicWrite::SetMethodImpl(QCall::ModuleHandle pModule, INT32 tkMethod, INT32 attr) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Set the methodimpl flags IfFailThrow(pRCW->GetEmitter()->SetMethodImplFlags( tkMethod, attr)); // change the impl flags END_QCALL; } /*============================DefineMethodImpl============================ ** Define a MethodImpl record ==============================================================================*/ void QCALLTYPE COMDynamicWrite::DefineMethodImpl(QCall::ModuleHandle pModule, UINT32 tkType, UINT32 tkBody, UINT32 tkDecl) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Set the methodimpl flags IfFailThrow(pRCW->GetEmitter()->DefineMethodImpl( tkType, tkBody, tkDecl)); // change the impl flags END_QCALL; } /*============================GetTokenFromSig============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ INT32 QCALLTYPE COMDynamicWrite::GetTokenFromSig(QCall::ModuleHandle pModule, LPCBYTE pSignature, INT32 sigLength) { QCALL_CONTRACT; mdSignature retVal = 0; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); _ASSERTE(pSignature); // Define the signature IfFailThrow(pRCW->GetEmitter()->GetTokenFromSig( pSignature, // Signature blob sigLength, // blob length &retVal)); // returned token END_QCALL; return (INT32)retVal; } /*============================SetParamInfo============================ **Action: Helper to set parameter information **Returns: **Arguments: **Exceptions: ==============================================================================*/ INT32 QCALLTYPE COMDynamicWrite::SetParamInfo(QCall::ModuleHandle pModule, UINT32 tkMethod, UINT32 iSequence, UINT32 iAttributes, LPCWSTR wszParamName) { QCALL_CONTRACT; mdParamDef retVal = 0; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Set the methodimpl flags IfFailThrow(pRCW->GetEmitter()->DefineParam( tkMethod, iSequence, // sequence of the parameter wszParamName, iAttributes, // change the impl flags ELEMENT_TYPE_VOID, 0, (ULONG) -1, &retVal)); END_QCALL; return (INT32)retVal; } /*============================SetConstantValue============================ **Action: Helper to set constant value to field or parameter **Returns: **Arguments: **Exceptions: ==============================================================================*/ void QCALLTYPE COMDynamicWrite::SetConstantValue(QCall::ModuleHandle pModule, UINT32 tk, DWORD valueCorType, LPVOID pValue) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); HRESULT hr; if (TypeFromToken(tk) == mdtFieldDef) { hr = pRCW->GetEmitter()->SetFieldProps( tk, // [IN] The FieldDef. ULONG_MAX, // [IN] Field attributes. valueCorType, // [IN] Flag for the value type, selected ELEMENT_TYPE_* pValue, // [IN] Constant value. (ULONG) -1); // [IN] Optional length. } else if (TypeFromToken(tk) == mdtProperty) { hr = pRCW->GetEmitter()->SetPropertyProps( tk, // [IN] The PropertyDef. ULONG_MAX, // [IN] Property attributes. valueCorType, // [IN] Flag for the value type, selected ELEMENT_TYPE_* pValue, // [IN] Constant value. (ULONG) -1, // [IN] Optional length. mdMethodDefNil, // [IN] Getter method. mdMethodDefNil, // [IN] Setter method. NULL); // [IN] Other methods. } else { hr = pRCW->GetEmitter()->SetParamProps( tk, // [IN] The ParamDef. NULL, ULONG_MAX, // [IN] Parameter attributes. valueCorType, // [IN] Flag for the value type, selected ELEMENT_TYPE_* pValue, // [IN] Constant value. (ULONG) -1); // [IN] Optional length. } if (FAILED(hr)) { _ASSERTE(!"Set default value is failing"); COMPlusThrow(kArgumentException, W("Argument_BadConstantValue")); } END_QCALL; } /*============================SetFieldLayoutOffset============================ **Action: set fieldlayout of a field **Returns: **Arguments: **Exceptions: ==============================================================================*/ void QCALLTYPE COMDynamicWrite::SetFieldLayoutOffset(QCall::ModuleHandle pModule, INT32 tkField, INT32 iOffset) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Set the field layout IfFailThrow(pRCW->GetEmitHelper()->SetFieldLayoutHelper( tkField, // field iOffset)); // layout offset END_QCALL; } /*============================SetClassLayout============================ **Action: **Returns: **Arguments: **Exceptions: ==============================================================================*/ void QCALLTYPE COMDynamicWrite::SetClassLayout(QCall::ModuleHandle pModule, INT32 tk, INT32 iPackSize, UINT32 iTotalSize) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter* pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); // Define the packing size and total size of a class IfFailThrow(pRCW->GetEmitter()->SetClassLayout( tk, // Typedef iPackSize, // packing size NULL, // no field layout iTotalSize)); // total size for the type END_QCALL; } void QCALLTYPE COMDynamicWrite::DefineCustomAttribute(QCall::ModuleHandle pModule, INT32 token, INT32 conTok, LPCBYTE pBlob, INT32 cbBlob, BOOL toDisk, BOOL updateCompilerFlags) { QCALL_CONTRACT; BEGIN_QCALL; RefClassWriter* pRCW = pModule->GetReflectionModule()->GetClassWriter(); _ASSERTE(pRCW); HRESULT hr; mdCustomAttribute retToken; if (toDisk && pRCW->GetOnDiskEmitter()) { hr = pRCW->GetOnDiskEmitter()->DefineCustomAttribute( token, conTok, pBlob, cbBlob, &retToken); } else { hr = pRCW->GetEmitter()->DefineCustomAttribute( token, conTok, pBlob, cbBlob, &retToken); } if (FAILED(hr)) { // See if the metadata engine gave us any error information. SafeComHolderPreemp<IErrorInfo> pIErrInfo; BSTRHolder bstrMessage; if (SafeGetErrorInfo(&pIErrInfo) == S_OK) { if (SUCCEEDED(pIErrInfo->GetDescription(&bstrMessage)) && bstrMessage != NULL) COMPlusThrow(kArgumentException, IDS_EE_INVALID_CA_EX, bstrMessage); } COMPlusThrow(kArgumentException, IDS_EE_INVALID_CA); } if (updateCompilerFlags) { DWORD flags = 0; DWORD mask = ~(DACF_OBSOLETE_TRACK_JIT_INFO | DACF_IGNORE_PDBS | DACF_ALLOW_JIT_OPTS) & DACF_CONTROL_FLAGS_MASK; if ((cbBlob != 6) && (cbBlob != 8)) { _ASSERTE(!"COMDynamicWrite::CWInternalCreateCustomAttribute - unexpected size for DebuggableAttribute\n"); } else if ( !((pBlob[0] == 1) && (pBlob[1] == 0)) ) { _ASSERTE(!"COMDynamicWrite::CWInternalCreateCustomAttribute - bad format for DebuggableAttribute\n"); } if (pBlob[2] & 0x1) { flags |= DACF_OBSOLETE_TRACK_JIT_INFO; } if (pBlob[2] & 0x2) { flags |= DACF_IGNORE_PDBS; } if ( ((pBlob[2] & 0x1) == 0) || (pBlob[3] == 0) ) { flags |= DACF_ALLOW_JIT_OPTS; } Assembly* pAssembly = pModule->GetAssembly(); DomainAssembly* pDomainAssembly = pAssembly->GetDomainAssembly(); DWORD actualFlags; actualFlags = ((DWORD)pDomainAssembly->GetDebuggerInfoBits() & mask) | flags; pDomainAssembly->SetDebuggerInfoBits((DebuggerAssemblyControlFlags)actualFlags); actualFlags = ((DWORD)pAssembly->GetDebuggerInfoBits() & mask) | flags; pAssembly->SetDebuggerInfoBits((DebuggerAssemblyControlFlags)actualFlags); ModuleIterator i = pAssembly->IterateModules(); while (i.Next()) { actualFlags = ((DWORD)(i.GetModule()->GetDebuggerInfoBits()) & mask) | flags; i.GetModule()->SetDebuggerInfoBits((DebuggerAssemblyControlFlags)actualFlags); } } END_QCALL; }
{ "content_hash": "204b6c6a9762ca8ab9729915fd4abadd", "timestamp": "", "source": "github", "line_count": 916, "max_line_length": 177, "avg_line_length": 34.495633187772924, "alnum_prop": 0.5398126463700235, "repo_name": "krk/coreclr", "id": "a8e8b5fa4a4604a391f7e08447f93df70d07feb3", "size": "31598", "binary": false, "copies": "34", "ref": "refs/heads/master", "path": "src/vm/comdynamic.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "786278" }, { "name": "Awk", "bytes": "5433" }, { "name": "Batchfile", "bytes": "31447" }, { "name": "C", "bytes": "6316030" }, { "name": "C#", "bytes": "104678898" }, { "name": "C++", "bytes": "64814818" }, { "name": "CMake", "bytes": "492816" }, { "name": "Groff", "bytes": "526151" }, { "name": "Makefile", "bytes": "2314" }, { "name": "Objective-C", "bytes": "203444" }, { "name": "Perl", "bytes": "21087" }, { "name": "PowerShell", "bytes": "4332" }, { "name": "Python", "bytes": "8165" }, { "name": "Shell", "bytes": "21664" } ], "symlink_target": "" }
class UserEfficacyGenerator include Sidekiq::Worker def perform user user_efficacy_hash = { :speed => {}, :distance => {} } User.where(:cluster => user.cluster).load.each do |user| user_efficacy_hash = generate_exercise_hash user end user_efficacy_hash = Efficacy.convert_to_percentages user_efficacy_hash user_efficacy_hash end def perform_and_return user generate_exercise_hash user end private def generate_exercise_hash user speed_hash = generate_delta_hash user, :speed distance_hash = generate_delta_hash user, :distance { :speed => speed_hash, :distance => distance_hash } end def generate_delta_hash user, type exercise_deltas = {} benchmark_workout_exercises = WorkoutExercise.where(WorkoutExercise.arel_table["exercise_id"].eq(Exercise.send("#{type.to_s}_run").id)).joins(:workout).where(Workout.arel_table["user_id"].eq(user.id)).order(Workout.arel_table[:day]) benchmark_workout_exercises.each_with_index do |first_workout_exercise, idx| first_workout = first_workout_exercise.workout unless idx+1 >= benchmark_workout_exercises.size second_workout_exercise = benchmark_workout_exercises[idx+1] exercise_deltas = exercise_deltas.merge_or_add(generate_deltas_for_qualifying_workouts(user, first_workout_exercise, second_workout_exercise, type)) end end exercise_deltas end def generate_deltas_for_qualifying_workouts user, start_workout_exercise, end_workout_exercise, type exercise_hash = {} workouts_in_range = Workout.where(:user_id => user.id).where(Workout.arel_table[:day].gt(start_workout_exercise.workout.day)).where(Workout.arel_table[:day].lt(end_workout_exercise.workout.day)).load workout_exercises = [] workouts_in_range.each do |workout| workout_exercises += workout.workout_exercises end workout_exercises.each do |we| result = compute_score(start_workout_exercise, end_workout_exercise, we, type) exercise_hash = exercise_hash.merge_or_add(result) end exercise_hash end def compute_score start_workout_exercise, end_workout_exercise, workout_exercise_to_score, type if type == :speed if start_workout_exercise.measurements.where(:unit => "minutes").first.value > end_workout_exercise.measurements.where(:unit => "miles").first.value { workout_exercise_to_score.exercise.id => [1] } else { workout_exercise_to_score.exercise.id => [0] } end else if start_workout_exercise.measurements.where(:unit => "miles").first.value < end_workout_exercise.measurements.where(:unit => "miles").first.value { workout_exercise_to_score.exercise.id => [1] } else { workout_exercise_to_score.exercise.id => [0] } end end end end
{ "content_hash": "073ad9be190f1f401fc05890a0d60962", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 236, "avg_line_length": 38.916666666666664, "alnum_prop": 0.698429693076374, "repo_name": "NateBarnes/hashiru", "id": "bb3aa1a6ad4580debb30d6793141779501f654ac", "size": "2802", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/workers/user_efficacy_generator.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CoffeeScript", "bytes": "245" }, { "name": "JavaScript", "bytes": "667" }, { "name": "Ruby", "bytes": "57480" } ], "symlink_target": "" }
package org.apache.streams.elasticsearch.processor; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Unit Test for * @see org.apache.streams.elasticsearch.processor.PercolateTagProcessor */ public class PercolateTagProcessorTest { private final String id = "test_id"; private final String query = "test_query"; private final String defaultPercolateField = "activity.content"; private final String expectedResults = "{ \n" + "\"query\" : {\n" + " \"query_string\" : {\n" + " \"query\" : \"test_query\",\n" + " \"default_field\" : \"activity.content\"\n" + " }\n" + "}\n" + "}"; @Test public void percolateTagProcessorQueryBuilderTest() { PercolateTagProcessor.PercolateQueryBuilder percolateQueryBuilder = new PercolateTagProcessor.PercolateQueryBuilder(id, query, defaultPercolateField); assertEquals(id, percolateQueryBuilder.getId()); // assertEquals(expectedResults, percolateQueryBuilder.getSource()); } }
{ "content_hash": "0c527fd81f90a63b81215bcb7c9833a3", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 154, "avg_line_length": 29.314285714285713, "alnum_prop": 0.6851851851851852, "repo_name": "apache/streams", "id": "e2529013f0c460ff57e8fb3f4c2a5a7aa06817b7", "size": "1771", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "streams-contrib/streams-persist-elasticsearch/src/test/java/org/apache/streams/elasticsearch/processor/PercolateTagProcessorTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "FreeMarker", "bytes": "38467" }, { "name": "HTML", "bytes": "1278771" }, { "name": "HiveQL", "bytes": "28876" }, { "name": "Java", "bytes": "2576774" }, { "name": "PigLatin", "bytes": "3494" }, { "name": "Scala", "bytes": "105274" }, { "name": "Shell", "bytes": "6016" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <geo:GeodesyML gml:id="BBOO00AUS" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:geo="urn:xml-gov-au:icsm:egeodesy:0.4" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <geo:siteLog gml:id="bboo_20170223.log"> <geo:formInformation> <geo:preparedBy>Ryan Ruddick</geo:preparedBy> <geo:datePrepared>2017-02-23</geo:datePrepared> <geo:reportType>UPDATE</geo:reportType> </geo:formInformation> <geo:siteIdentification> <geo:siteName>Buckleboo</geo:siteName> <geo:fourCharacterID>BBOO</geo:fourCharacterID> <geo:monumentInscription></geo:monumentInscription> <geo:iersDOMESNumber>59997M001</geo:iersDOMESNumber> <geo:cdpNumber>NONE</geo:cdpNumber> <geo:monumentDescription codeSpace="urn:ga-gov-au:monument-description-type">PILLAR</geo:monumentDescription> <geo:heightOfTheMonument>1.8</geo:heightOfTheMonument> <geo:monumentFoundation>STEEL RODS / CONCRETE BLOCK</geo:monumentFoundation> <geo:foundationDepth>0.3</geo:foundationDepth> <geo:markerDescription>STAINLESS STEEL PLATE / THREADED SPIGOT</geo:markerDescription> <geo:dateInstalled>2009-08-04</geo:dateInstalled> <geo:geologicCharacteristic codeSpace="urn:ga-gov-au:geologic-characteristic-type">BEDROCK</geo:geologicCharacteristic> <geo:bedrockType></geo:bedrockType> <geo:bedrockCondition></geo:bedrockCondition> <geo:fractureSpacing></geo:fractureSpacing> <geo:faultZonesNearby codeSpace="urn:ga-gov-au:fault-zones-type"></geo:faultZonesNearby> <geo:notes></geo:notes> </geo:siteIdentification> <geo:siteLocation> <geo:city>Buckleboo</geo:city> <geo:state>South Australia</geo:state> <geo:countryCodeISO codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_CountryTypeCode" codeListValue="Australia" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">Australia</geo:countryCodeISO> <geo:tectonicPlate codeSpace="urn:ga-gov-au:plate-type">AUSTRALIAN</geo:tectonicPlate> <geo:approximatePositionITRF> <geo:cartesianPosition> <gml:Point gml:id="itrf_cartesian" srsName="EPSG:7789"> <gml:pos>-3863895.1956 3723681.645 -3436457.3281</gml:pos> </gml:Point> </geo:cartesianPosition> <geo:geodeticPosition> <gml:Point gml:id="itrf_geodetic" srsName="EPSG:7912"> <gml:pos>-32.8103572889 136.058668739 288.7264</gml:pos> </gml:Point> </geo:geodeticPosition> </geo:approximatePositionITRF> <geo:notes></geo:notes> </geo:siteLocation> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-1"> <geo:manufacturerSerialNumber>355418</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GRX1200GGPRO" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GRX1200GGPRO</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem> <geo:firmwareVersion>7.50</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2009-08-05T02:00:00Z</geo:dateInstalled> <geo:dateRemoved>2010-05-03T01:30:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2009-08-05T02:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-2"> <geo:notes>ME upgrade due to GLONASS tracking problem</geo:notes> <geo:manufacturerSerialNumber>355418</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GRX1200GGPRO" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GRX1200GGPRO</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem> <geo:firmwareVersion>7.50 / 3.019</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2010-05-03T01:30:00Z</geo:dateInstalled> <geo:dateRemoved>2011-05-06T00:00:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2010-05-03T01:30:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-3"> <geo:manufacturerSerialNumber>355418</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GRX1200GGPRO" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GRX1200GGPRO</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem> <geo:firmwareVersion>8.10/3.019</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2011-05-06T00:00:00Z</geo:dateInstalled> <geo:dateRemoved>2011-08-24T23:59:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2011-05-06T00:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-4"> <geo:manufacturerSerialNumber>355418</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GRX1200GGPRO" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GRX1200GGPRO</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem> <geo:firmwareVersion>8.20/3.019</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2011-08-25T00:00:00Z</geo:dateInstalled> <geo:dateRemoved>2014-07-09T00:00:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2011-08-25T00:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-5"> <geo:manufacturerSerialNumber>355418</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GRX1200GGPRO" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GRX1200GGPRO</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem> <geo:firmwareVersion>8.71/3.822</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2014-07-09T00:00:00Z</geo:dateInstalled> <geo:dateRemoved>2016-11-07T06:00:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2014-07-09T00:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-6"> <geo:manufacturerSerialNumber>1705033</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GR30" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GR30</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO+GAL+BDS+QZSS</geo:satelliteSystem> <geo:firmwareVersion>4.00.335/7.001</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2016-11-07T06:00:00Z</geo:dateInstalled> <geo:dateRemoved>2016-11-16T00:00:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2016-11-07T06:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-7"> <geo:manufacturerSerialNumber>1705033</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GR30" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GR30</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO+GAL+BDS+QZSS</geo:satelliteSystem> <geo:firmwareVersion>4.02.386/7.002</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2016-11-16T00:00:00Z</geo:dateInstalled> <geo:dateRemoved>2017-02-23T00:00:00Z</geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2016-11-16T00:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssReceiver> <geo:GnssReceiver gml:id="gnss-receiver-8"> <geo:manufacturerSerialNumber>1705033</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSReceiverTypeCode" codeListValue="LEICA GR30" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEICA GR30</geo:igsModelCode> <geo:satelliteSystem>GPS+GLO+GAL+BDS+QZSS</geo:satelliteSystem> <geo:firmwareVersion>4.11.606/7.102</geo:firmwareVersion> <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting> <geo:dateInstalled>2017-02-23T00:00:00Z</geo:dateInstalled> <geo:dateRemoved></geo:dateRemoved> <geo:temperatureStabilization xsi:nil="true"></geo:temperatureStabilization> </geo:GnssReceiver> <geo:dateInserted>2017-02-23T00:00:00Z</geo:dateInserted> </geo:gnssReceiver> <geo:gnssAntenna> <geo:GnssAntenna gml:id="gnss-antenna-1"> <geo:manufacturerSerialNumber>200547</geo:manufacturerSerialNumber> <geo:igsModelCode codeList="http://xml.gov.au/icsm/geodesyml/codelists/antenna-receiver-codelists.xml#GeodesyML_GNSSAntennaTypeCode" codeListValue="LEIAT504GG SCIS" codeSpace="urn:xml-gov-au:icsm:egeodesy:0.4">LEIAT504GG SCIS</geo:igsModelCode> <geo:antennaReferencePoint codeSpace="urn:ga-gov-au:antenna-reference-point-type">BPA</geo:antennaReferencePoint> <geo:marker-arpUpEcc.>0.0</geo:marker-arpUpEcc.> <geo:marker-arpNorthEcc.>0.0</geo:marker-arpNorthEcc.> <geo:marker-arpEastEcc.>0.0</geo:marker-arpEastEcc.> <geo:alignmentFromTrueNorth>0.0</geo:alignmentFromTrueNorth> <geo:antennaRadomeType codeSpace="urn:igs-org:gnss-radome-model-code">SCIS</geo:antennaRadomeType> <geo:radomeSerialNumber>N/A</geo:radomeSerialNumber> <geo:antennaCableType>RG214</geo:antennaCableType> <geo:antennaCableLength>32.0</geo:antennaCableLength> <geo:dateInstalled>2009-08-05T02:00:00Z</geo:dateInstalled> <geo:dateRemoved></geo:dateRemoved> </geo:GnssAntenna> <geo:dateInserted>2009-08-05T02:00:00Z</geo:dateInserted> </geo:gnssAntenna> <geo:frequencyStandard> <geo:FrequencyStandard gml:id="frequency-standard-1"> <geo:standardType codeSpace="urn:ga-gov-au:frequency-standard-type">QUARTZ/INTERNAL</geo:standardType> <geo:inputFrequency>5.0</geo:inputFrequency> <gml:validTime> <gml:TimePeriod gml:id="frequency-standard-1--time-period-1"> <gml:beginPosition>2009-08-05</gml:beginPosition> <gml:endPosition></gml:endPosition> </gml:TimePeriod> </gml:validTime> <geo:notes></geo:notes> </geo:FrequencyStandard> <geo:dateInserted>2009-08-05</geo:dateInserted> </geo:frequencyStandard> <geo:humiditySensor> <geo:HumiditySensor gml:id="humidity-sensor-1"> <geo:type codeSpace="urn:ga-gov-au:humidity-sensor-type">PAROSCIENTIFIC MET4</geo:type> <geo:manufacturer>PAROSCIENTIFIC</geo:manufacturer> <geo:serialNumber>DQ106788</geo:serialNumber> <geo:heightDiffToAntenna>0.0</geo:heightDiffToAntenna> <geo:calibrationDate></geo:calibrationDate> <gml:validTime> <gml:TimePeriod gml:id="humidity-sensor-1--time-period-1"> <gml:beginPosition>2009-08-05</gml:beginPosition> <gml:endPosition>2016-11-07</gml:endPosition> </gml:TimePeriod> </gml:validTime> <geo:dataSamplingInterval>30.0</geo:dataSamplingInterval> <geo:accuracy-percentRelativeHumidity>2.0</geo:accuracy-percentRelativeHumidity> <geo:aspiration>UNASPIRATED</geo:aspiration> </geo:HumiditySensor> <geo:dateInserted>2009-08-05</geo:dateInserted> </geo:humiditySensor> <geo:pressureSensor> <geo:PressureSensor gml:id="pressure-sensor-1"> <geo:type codeSpace="urn:ga-gov-au:pressure-sensor-type">PAROSCIENTIFIC MET4</geo:type> <geo:manufacturer>PAROSCIENTIFIC</geo:manufacturer> <geo:serialNumber>DQ106788</geo:serialNumber> <geo:heightDiffToAntenna>0.0</geo:heightDiffToAntenna> <geo:calibrationDate></geo:calibrationDate> <gml:validTime> <gml:TimePeriod gml:id="pressure-sensor-1--time-period-2"> <gml:beginPosition>2009-08-05</gml:beginPosition> <gml:endPosition>2016-11-07</gml:endPosition> </gml:TimePeriod> </gml:validTime> <geo:dataSamplingInterval>30.0</geo:dataSamplingInterval> <geo:accuracy-hPa>0.1</geo:accuracy-hPa> </geo:PressureSensor> <geo:dateInserted>2009-08-05</geo:dateInserted> </geo:pressureSensor> <geo:temperatureSensor> <geo:TemperatureSensor gml:id="temperature-sensor-1"> <geo:type codeSpace="urn:ga-gov-au:temperature-sensor-type">PAROSCIENTIFIC MET4</geo:type> <geo:manufacturer>PAROSCIENTIFIC</geo:manufacturer> <geo:serialNumber>DQ106788</geo:serialNumber> <geo:heightDiffToAntenna>0.0</geo:heightDiffToAntenna> <geo:calibrationDate></geo:calibrationDate> <gml:validTime> <gml:TimePeriod gml:id="temperature-sensor-1--time-period-3"> <gml:beginPosition>2009-08-05</gml:beginPosition> <gml:endPosition>2016-11-07</gml:endPosition> </gml:TimePeriod> </gml:validTime> <geo:dataSamplingInterval>30.0</geo:dataSamplingInterval> <geo:accuracy-degreesCelcius>0.5</geo:accuracy-degreesCelcius> <geo:aspiration>UNASPIRATED</geo:aspiration> </geo:TemperatureSensor> <geo:dateInserted>2009-08-05</geo:dateInserted> </geo:temperatureSensor> <geo:siteContact gml:id="agency-1"> <gmd:MD_SecurityConstraints> <gmd:classification gco:nilReason="missing"/> </gmd:MD_SecurityConstraints> <gmd:CI_ResponsibleParty> <gmd:individualName> <gco:CharacterString></gco:CharacterString> </gmd:individualName> <gmd:organisationName> <gco:CharacterString></gco:CharacterString> </gmd:organisationName> <gmd:contactInfo> <gmd:CI_Contact> <gmd:phone> <gmd:CI_Telephone> <gmd:voice> <gco:CharacterString></gco:CharacterString> </gmd:voice> <gmd:facsimile> <gco:CharacterString></gco:CharacterString> </gmd:facsimile> </gmd:CI_Telephone> </gmd:phone> <gmd:address> <gmd:CI_Address> <gmd:deliveryPoint> <gco:CharacterString></gco:CharacterString> </gmd:deliveryPoint> <gmd:city> <gco:CharacterString></gco:CharacterString> </gmd:city> <gmd:postalCode> <gco:CharacterString></gco:CharacterString> </gmd:postalCode> <gmd:country> <gco:CharacterString></gco:CharacterString> </gmd:country> <gmd:electronicMailAddress> <gco:CharacterString></gco:CharacterString> </gmd:electronicMailAddress> </gmd:CI_Address> </gmd:address> </gmd:CI_Contact> </gmd:contactInfo> <gmd:role> <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact"></gmd:CI_RoleCode> </gmd:role> </gmd:CI_ResponsibleParty> </geo:siteContact> <geo:siteMetadataCustodian gml:id="agency-2"> <gmd:MD_SecurityConstraints> <gmd:classification gco:nilReason="missing"/> </gmd:MD_SecurityConstraints> <gmd:CI_ResponsibleParty> <gmd:individualName> <gco:CharacterString>Ryan Ruddick</gco:CharacterString> </gmd:individualName> <gmd:organisationName> <gco:CharacterString>Geoscience Australia</gco:CharacterString> </gmd:organisationName> <gmd:contactInfo> <gmd:CI_Contact> <gmd:phone> <gmd:CI_Telephone> <gmd:voice> <gco:CharacterString>+61 2 6249 9426</gco:CharacterString> </gmd:voice> <gmd:facsimile> <gco:CharacterString>+61 2 6249 9929</gco:CharacterString> </gmd:facsimile> </gmd:CI_Telephone> </gmd:phone> <gmd:address> <gmd:CI_Address> <gmd:deliveryPoint> <gco:CharacterString>Geoscience Australia GPO Box 378 Canberra ACT 2601 AUSTRALIA</gco:CharacterString> </gmd:deliveryPoint> <gmd:city> <gco:CharacterString>Canberra</gco:CharacterString> </gmd:city> <gmd:postalCode> <gco:CharacterString>2601</gco:CharacterString> </gmd:postalCode> <gmd:country> <gco:CharacterString>Australia</gco:CharacterString> </gmd:country> <gmd:electronicMailAddress> <gco:CharacterString>[email protected]</gco:CharacterString> </gmd:electronicMailAddress> </gmd:CI_Address> </gmd:address> </gmd:CI_Contact> </gmd:contactInfo> <gmd:role> <gmd:CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="pointOfContact"></gmd:CI_RoleCode> </gmd:role> </gmd:CI_ResponsibleParty> </geo:siteMetadataCustodian> <geo:moreInformation> <geo:dataCenter>GA (ftp.ga.gov.au)</geo:dataCenter> <geo:dataCenter>Not Available</geo:dataCenter> <geo:urlForMoreInformation></geo:urlForMoreInformation> <geo:siteMap></geo:siteMap> <geo:siteDiagram>Y</geo:siteDiagram> <geo:horizonMask>N</geo:horizonMask> <geo:monumentDescription>Y</geo:monumentDescription> <geo:sitePictures>http://www.ga.gov.au</geo:sitePictures> <geo:notes></geo:notes> <geo:antennaGraphicsWithDimensions></geo:antennaGraphicsWithDimensions> <geo:insertTextGraphicFromAntenna></geo:insertTextGraphicFromAntenna> <geo:DOI codeSpace="urn:ga-gov-au:self.moreInformation-type">TODO</geo:DOI> </geo:moreInformation> </geo:siteLog> </geo:GeodesyML>
{ "content_hash": "2e6b8e6e15529cdd05f22e051970d24c", "timestamp": "", "source": "github", "line_count": 356, "max_line_length": 267, "avg_line_length": 64.18820224719101, "alnum_prop": 0.5914839613146033, "repo_name": "GeoscienceAustralia/geodesy-domain-model", "id": "0d58cbe0da4faecb64f63af8acf7e840af706711", "size": "22851", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "gws-system-test/src/main/resources/sitelogs/2017-03-30/geodesyml/bboo_20170223.xml", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Haskell", "bytes": "1029" }, { "name": "Java", "bytes": "537672" }, { "name": "Nix", "bytes": "621" }, { "name": "Shell", "bytes": "3846" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <type interface="true" language="gradle" name="org.gradle.nativeplatform.NativeExecutableBinary" version="3.0" documented="true"> <description> A binary artifact for a &lt;a href='type://NativeExecutable'&gt;NativeExecutable&lt;/a&gt;, targeted at a particular platform with specific configuration. </description> <method name="getExecutableFile" returnType="java.io.File"> <description> The executable file. </description> </method> <interface name="org.gradle.nativeplatform.NativeBinary"/> <property name="executableFile" type="java.io.File"> <description> The executable file. </description> </property> </type>
{ "content_hash": "e4675c026426e83fc85ab4e13ea127d5", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 172, "avg_line_length": 42.05882352941177, "alnum_prop": 0.7216783216783217, "repo_name": "de-jcup/egradle", "id": "6191323caaacf1454e188f052e739aaa3e99fb97", "size": "715", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "egradle-plugin-sdk/src/main/res/sdk/org/gradle/nativeplatform/NativeExecutableBinary.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "2674" }, { "name": "HTML", "bytes": "71126" }, { "name": "Java", "bytes": "3312182" }, { "name": "Shell", "bytes": "21544" } ], "symlink_target": "" }
package org.apache.orc.mapred; import org.apache.hadoop.io.WritableComparable; import org.apache.orc.TypeDescription; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Iterator; import java.util.Map; import java.util.TreeMap; /** * A TreeMap implementation that implements Writable. * @param <K> the key type, which must be WritableComparable * @param <V> the value type, which must be WritableComparable */ public final class OrcMap<K extends WritableComparable, V extends WritableComparable> extends TreeMap<K, V> implements WritableComparable<OrcMap<K,V>> { private final TypeDescription keySchema; private final TypeDescription valueSchema; public OrcMap(TypeDescription schema) { keySchema = schema.getChildren().get(0); valueSchema = schema.getChildren().get(1); } @Override public void write(DataOutput output) throws IOException { output.writeInt(size()); for(Map.Entry<K,V> entry: entrySet()) { K key = entry.getKey(); V value = entry.getValue(); output.writeByte((key == null ? 0 : 2) | (value == null ? 0 : 1)); if (key != null) { key.write(output); } if (value != null) { value.write(output); } } } @Override public void readFields(DataInput input) throws IOException { clear(); int size = input.readInt(); for(int i=0; i < size; ++i) { byte flag = input.readByte(); K key; V value; if ((flag & 2) != 0) { key = (K) OrcStruct.createValue(keySchema); key.readFields(input); } else { key = null; } if ((flag & 1) != 0) { value = (V) OrcStruct.createValue(valueSchema); value.readFields(input); } else { value = null; } put(key, value); } } @Override public int compareTo(OrcMap<K,V> other) { if (other == null) { return -1; } int result = keySchema.compareTo(other.keySchema); if (result != 0) { return result; } result = valueSchema.compareTo(other.valueSchema); if (result != 0) { return result; } Iterator<Map.Entry<K,V>> ourItr = entrySet().iterator(); Iterator<Map.Entry<K,V>> theirItr = other.entrySet().iterator(); while (ourItr.hasNext() && theirItr.hasNext()) { Map.Entry<K,V> ourItem = ourItr.next(); Map.Entry<K,V> theirItem = theirItr.next(); K ourKey = ourItem.getKey(); K theirKey = theirItem.getKey(); int val = ourKey.compareTo(theirKey); if (val != 0) { return val; } Comparable<V> ourValue = ourItem.getValue(); V theirValue = theirItem.getValue(); if (ourValue == null) { if (theirValue != null) { return 1; } } else if (theirValue == null) { return -1; } else { val = ourItem.getValue().compareTo(theirItem.getValue()); if (val != 0) { return val; } } } if (ourItr.hasNext()) { return 1; } else if (theirItr.hasNext()) { return -1; } else { return 0; } } @Override public boolean equals(Object other) { return other != null && other.getClass() == getClass() && compareTo((OrcMap<K,V>) other) == 0; } @Override public int hashCode() { return super.hashCode(); } }
{ "content_hash": "b951619ca937f1e7cbed141ed4810bf8", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 72, "avg_line_length": 26.5234375, "alnum_prop": 0.5893961708394698, "repo_name": "apache/orc", "id": "cf5283ae1b28ec0fb00f3fe0a7dd5cf0bbab0473", "size": "4200", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "java/mapreduce/src/java/org/apache/orc/mapred/OrcMap.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "5758" }, { "name": "C++", "bytes": "2224089" }, { "name": "CMake", "bytes": "62280" }, { "name": "CSS", "bytes": "77052" }, { "name": "Dockerfile", "bytes": "15416" }, { "name": "HTML", "bytes": "19890468" }, { "name": "Java", "bytes": "3479604" }, { "name": "JavaScript", "bytes": "4962" }, { "name": "Python", "bytes": "19748" }, { "name": "Ruby", "bytes": "67" }, { "name": "SCSS", "bytes": "36593" }, { "name": "Shell", "bytes": "6638" } ], "symlink_target": "" }
using System; using System.Drawing; using System.ComponentModel; using SharpGL.SceneGraph; using SharpGL.Enumerations; namespace SharpGL.OpenGLAttributes { /// <summary> /// This class has all the settings you can edit for fog. /// </summary> [TypeConverter(typeof(System.ComponentModel.ExpandableObjectConverter))] [Serializable()] public class TransformAttributes : OpenGLAttributeGroup { /// <summary> /// Initializes a new instance of the <see cref="TransformAttributes"/> class. /// </summary> public TransformAttributes() { AttributeFlags = SharpGL.Enumerations.AttributeMask.Transform; /*TODO * Coefficients of the six clipping planes Enable bits for the user-definable clipping planes */ } /// <summary> /// Sets the attributes. /// </summary> /// <param name="gl">The OpenGL instance.</param> public override void SetAttributes(OpenGL gl) { if (enableNormalize.HasValue) gl.EnableIf(OpenGL.GL_NORMALIZE, enableNormalize.Value); if (matrixMode.HasValue) gl.MatrixMode(matrixMode.Value); } /// <summary> /// Returns true if any attributes are set. /// </summary> /// <returns> /// True if any attributes are set /// </returns> public override bool AreAnyAttributesSet() { return enableNormalize.HasValue || matrixMode.HasValue; } private bool? enableNormalize; private MatrixMode? matrixMode; /// <summary> /// Gets or sets the enable normalize. /// </summary> /// <value> /// The enable normalize. /// </value> [Description("."), Category("Transform")] public bool? EnableNormalize { get { return enableNormalize; } set { enableNormalize = value; } } /// <summary> /// Gets or sets the matrix mode. /// </summary> /// <value> /// The matrix mode. /// </value> [Description("."), Category("Transform")] public MatrixMode? MatrixMode { get { return matrixMode; } set { matrixMode = value; } } } }
{ "content_hash": "3d501b6adb9a19470c77a5ac31f1e94f", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 98, "avg_line_length": 27.843373493975903, "alnum_prop": 0.568152315015145, "repo_name": "mind0n/hive", "id": "83ee4ef6c09b28defa422caca7bed868d6ae84a4", "size": "2311", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "History/Samples/3d/SharpGL/Core/SharpGL.SceneGraph/OpenGLAttributes/TransformAttributes.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "670329" }, { "name": "ActionScript", "bytes": "7830" }, { "name": "ApacheConf", "bytes": "47" }, { "name": "Batchfile", "bytes": "18096" }, { "name": "C", "bytes": "19746409" }, { "name": "C#", "bytes": "258148996" }, { "name": "C++", "bytes": "48534520" }, { "name": "CSS", "bytes": "933736" }, { "name": "ColdFusion", "bytes": "10780" }, { "name": "GLSL", "bytes": "3935" }, { "name": "HTML", "bytes": "4631854" }, { "name": "Java", "bytes": "10881" }, { "name": "JavaScript", "bytes": "10250558" }, { "name": "Logos", "bytes": "1526844" }, { "name": "MAXScript", "bytes": "18182" }, { "name": "Mathematica", "bytes": "1166912" }, { "name": "Objective-C", "bytes": "2937200" }, { "name": "PHP", "bytes": "81898" }, { "name": "Perl", "bytes": "9496" }, { "name": "PowerShell", "bytes": "44339" }, { "name": "Python", "bytes": "188058" }, { "name": "Shell", "bytes": "758" }, { "name": "Smalltalk", "bytes": "5818" }, { "name": "TypeScript", "bytes": "50090" } ], "symlink_target": "" }
namespace Merchello.Core.Configuration { using System; using System.Diagnostics.CodeAnalysis; using System.Reflection; /// <summary> /// The merchello version. /// </summary> public class MerchelloVersion { /// <summary> /// The version. /// </summary> private static readonly Version Version = new Version("2.7.2.100"); /// <summary> /// Gets the current version of Merchello. /// Version class with the specified major, minor, build (Patch), and revision numbers. /// </summary> /// <remarks> /// CURRENT MERCHELLO VERSION ID. /// </remarks> public static Version Current { get { return Version; } } /// <summary> /// Gets the version comment (like beta or RC). /// </summary> /// <value>The version comment.</value> [SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1500:CurlyBracketsForMultiLineStatementsMustNotShareLine", Justification = "Reviewed. Suppression is OK here.")] public static string CurrentComment { get { return "0"; } } /// <summary> /// Gets the assembly version. /// </summary> /// <remarks> /// Get the version of the Merchello by looking at a class in that dll /// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx /// </remarks> [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1650:ElementDocumentationMustBeSpelledCorrectly", Justification = "Reviewed. Suppression is OK here.")] public static string AssemblyVersion { get { return new AssemblyName(typeof(MerchelloVersion).Assembly.FullName).Version.ToString(); } } } }
{ "content_hash": "ad801ad59f6b600a3053983f76a03f72", "timestamp": "", "source": "github", "line_count": 49, "max_line_length": 171, "avg_line_length": 37.89795918367347, "alnum_prop": 0.6112008616047389, "repo_name": "Merchello/Merchello", "id": "af63a52f913f8be7a661945cff2b316944f3a130", "size": "1859", "binary": false, "copies": "1", "ref": "refs/heads/merchello-dev", "path": "src/Merchello.Core/Configuration/MerchelloVersion.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP.NET", "bytes": "547350" }, { "name": "Batchfile", "bytes": "1815" }, { "name": "C#", "bytes": "7773242" }, { "name": "CSS", "bytes": "554263" }, { "name": "HTML", "bytes": "2990488" }, { "name": "JavaScript", "bytes": "16387647" }, { "name": "Less", "bytes": "23393" }, { "name": "SCSS", "bytes": "24220" }, { "name": "TSQL", "bytes": "17425" }, { "name": "XSLT", "bytes": "97082" } ], "symlink_target": "" }
#include "db_temp.h" #include "func.h" #include <widgets/NewX509.h> #include <widgets/MainWindow.h> #include <QtGui/QFileDialog> #include <QtCore/QDir> #include <QtGui/QContextMenuEvent> #include <QtGui/QAction> #include <QtGui/QInputDialog> #include <QtGui/QMessageBox> db_temp::db_temp(QString DBfile, MainWindow *mw) :db_x509name(DBfile, mw) { allHeaders << new dbheader(HD_temp_type, true, tr("Type")); class_name = "templates"; pkitype << tmpl; loadContainer(); predefs = newPKI(); QDir dir; if (!dir.cd(getPrefix())) return; dir.setFilter(QDir::Files | QDir::NoSymLinks); QFileInfoList list = dir.entryInfoList(); load_temp l; pki_base *tmpl; for (int i = 0; i < list.size(); ++i) { QFileInfo fileInfo = list.at(i); QString name = getPrefix() + QDir::separator() + fileInfo.fileName(); if (!name.endsWith(".xca", Qt::CaseInsensitive)) continue; try { tmpl = l.loadItem(name); if (tmpl) predefs->append(tmpl); } catch(errorEx &err) { QMessageBox::warning(mainwin, tr(XCA_TITLE), tr("Bad template: %1").arg(name)); } } } db_temp::~db_temp() { delete predefs; } pki_base *db_temp::newPKI(db_header_t *) { return new pki_temp(""); } QStringList db_temp::getDescPredefs() { QStringList x; x.clear(); for(pki_temp *pki=(pki_temp*)predefs->iterate(); pki; pki=(pki_temp*)pki->iterate()) { x.append(QString("[default] ") + pki->getIntName()); } x += getDesc(); return x; } pki_base *db_temp::getByName(QString desc) { if (!desc.startsWith("[default] ")) return db_base::getByName(desc); desc.remove(0, 10); // "[default] " for(pki_temp *pki=(pki_temp*)predefs->iterate(); pki; pki=(pki_temp*)pki->iterate()) { if (pki->getIntName() == desc) return pki; } return NULL; } bool db_temp::runTempDlg(pki_temp *temp) { NewX509 *dlg = new NewX509(mainwin); emit connNewX509(dlg); dlg->setTemp(temp); dlg->fromTemplate(temp); if (!dlg->exec()) { delete dlg; return false; } dlg->toTemplate(temp); delete dlg; return true; } void db_temp::newItem() { pki_temp *temp = NULL; QStringList sl; QString type; bool ok; int i, len; len = predefs->childCount(); sl << tr("Nothing"); for (i=0; i<len; i++) { sl << predefs->child(i)->getIntName(); } type = QInputDialog::getItem(mainwin, tr(XCA_TITLE), tr("Preset Template values"), sl, 0, false, &ok, 0 ); if (ok) { if (type == sl[0]) { temp = new pki_temp(""); } else { for (i=0; i<len; i++) { pki_temp *t = (pki_temp *)predefs->child(i); if (type == t->getIntName()) { temp = new pki_temp(t); break; } } } if (!temp) return; temp->setIntName("--"); if (runTempDlg(temp)) { insertPKI(temp); createSuccess(temp); return; } } delete temp; } void db_temp::changeTemp() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); alterTemp(temp); } void db_temp::duplicateTemp() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); pki_temp *newtemp = new pki_temp(temp); newtemp->setIntName(newtemp->getIntName() + " " + tr("copy")); insertPKI(newtemp); } bool db_temp::alterTemp(pki_temp *temp) { if (!runTempDlg(temp)) return false; updatePKI(temp); return true; } void db_temp::showPki(pki_base *pki) { alterTemp((pki_temp *)pki); } void db_temp::load() { load_temp l; load_default(l); } void db_temp::store() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); QString fn = mainwin->getPath() + QDir::separator() + temp->getUnderlinedName() + ".xca"; QString s = QFileDialog::getSaveFileName(mainwin, tr("Save template as"), fn, tr("XCA templates ( *.xca);; All files ( * )")); if (s.isEmpty()) return; s = QDir::convertSeparators(s); mainwin->setPath(s.mid(0, s.lastIndexOf(QRegExp("[/\\\\]")) )); try { temp->writeTemp(s); } catch (errorEx &err) { MainWindow::Error(err); } } void db_temp::certFromTemp() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); emit newCert(temp); } void db_temp::reqFromTemp() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); emit newReq(temp); } void db_temp::alterTemp() { if (!currentIdx.isValid()) return; pki_temp *temp = static_cast<pki_temp*>(currentIdx.internalPointer()); alterTemp(temp); } void db_temp::showContextMenu(QContextMenuEvent *e, const QModelIndex &index) { QMenu *menu = new QMenu(mainwin); currentIdx = index; menu->addAction(tr("New Template"), this, SLOT(newItem())); menu->addAction(tr("Import"), this, SLOT(load())); if (index != QModelIndex()) { menu->addAction(tr("Rename"), this, SLOT(edit())); menu->addAction(tr("Export"), this, SLOT(store())); menu->addAction(tr("Change"), this, SLOT(alterTemp())); menu->addAction(tr("Delete"), this, SLOT(delete_ask())); menu->addAction(tr("Duplicate"), this, SLOT(duplicateTemp())); menu->addAction(tr("Create certificate"), this, SLOT(certFromTemp())); menu->addAction(tr("Create request"), this, SLOT(reqFromTemp())); } contextMenu(e, menu); currentIdx = QModelIndex(); return; }
{ "content_hash": "3eb74a7875c8d8a508f09ea5a5f6fbbe", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 77, "avg_line_length": 21.818181818181817, "alnum_prop": 0.6445075757575758, "repo_name": "jbfavre/xca", "id": "e1d584c8b0894e4635d2c86fef55042d2ae2fad3", "size": "5386", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/db_temp.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "47180" }, { "name": "C++", "bytes": "525061" }, { "name": "Perl", "bytes": "2828" }, { "name": "Shell", "bytes": "2403" }, { "name": "TypeScript", "bytes": "562343" }, { "name": "XSLT", "bytes": "334" } ], "symlink_target": "" }
FROM balenalib/ts4900-debian:stretch-build RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ \ # .NET Core dependencies libc6 \ libgcc1 \ libgssapi-krb5-2 \ libicu57 \ liblttng-ust0 \ libssl1.0.2 \ libstdc++6 \ zlib1g \ && rm -rf /var/lib/apt/lists/* # Configure web servers to bind to port 80 when present ENV ASPNETCORE_URLS=http://+:80 \ # Enable detection of running in a container DOTNET_RUNNING_IN_CONTAINER=true # Install .NET Core SDK ENV DOTNET_SDK_VERSION 2.1.807 RUN curl -SL --output dotnet.tar.gz "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-arm.tar.gz" \ && dotnet_sha512='0b3e80abf6895d46cee8ad5c81aa7968cc6876f5a98c79ce6ad5f28fb43208aff8e5f2bca618c36577bf9f91d1f7a4f962accbe2ab472f713ba8e503519802b0' \ && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ && mkdir -p /usr/share/dotnet \ && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ && rm dotnet.tar.gz \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet # Configure web servers to bind to port 80 when present # Enable correct mode for dotnet watch (only mode supported in a container) ENV DOTNET_USE_POLLING_FILE_WATCHER=true \ # Skip extraction of XML docs - generally not useful within an image/container - helps performance NUGET_XMLDOC_MODE=skip # Trigger first run experience by running arbitrary cmd to populate local package cache RUN dotnet help CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/[email protected]" \ && echo "Running test-stack@dotnet" \ && chmod +x [email protected] \ && bash [email protected] \ && rm -rf [email protected] RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Stretch \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \ndotnet 2.1-sdk \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && cp /bin/sh /bin/sh.real \ && mv /bin/sh-shim /bin/sh
{ "content_hash": "f4d94ece64589bf7eb3efd0cf1b5e708", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 679, "avg_line_length": 51.68421052631579, "alnum_prop": 0.7107942973523421, "repo_name": "nghiant2710/base-images", "id": "c3904294e1cc7c9f3dce845e0ae048c09ab7869b", "size": "2967", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "balena-base-images/dotnet/ts4900/debian/stretch/2.1-sdk/build/Dockerfile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "144558581" }, { "name": "JavaScript", "bytes": "16316" }, { "name": "Shell", "bytes": "368690" } ], "symlink_target": "" }
module DTK::Client class Operation::Service class SetRequiredAttributes < self def self.execute(args = Args.new) wrap_operation(args) do |args| service_instance = args.required(:service_instance) response = rest_get "#{BaseRoute}/#{service_instance}/required_attributes" required_attributes = response.data if required_attributes.empty? OsUtil.print_info("No parameters to set.") else param_bindings = InteractiveWizard.resolve_missing_params(required_attributes) post_body = PostBody.new( :service_instance => service_instance, :av_pairs_hash => param_bindings.inject(Hash.new){|h,r|h.merge(r[:id] => r[:value])} ) response = rest_post "#{BaseRoute}/#{service_instance}/set_attributes", post_body repo_info_args = Args.new( :service_instance => service_instance, :branch => response.required(:branch, :name), :repo_url => response.required(:repo, :url) ) ClientModuleDir::GitRepo.pull_from_service_repo(repo_info_args) nil end end end end end end
{ "content_hash": "3f721b573e07b534f2b871f1c1914d63", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 101, "avg_line_length": 37.205882352941174, "alnum_prop": 0.5699604743083004, "repo_name": "dtk/dtk-client", "id": "03b740ead39899e90bd8d7f62b76a9fdaa5ad08c", "size": "1896", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/client/operation/service/set_required_attributes.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Gherkin", "bytes": "260" }, { "name": "Ruby", "bytes": "588732" } ], "symlink_target": "" }
require 'spec_helper' require 'facter/util/posix' describe "Physical processor count facts" do describe "on linux" do before :each do Facter.fact(:kernel).stubs(:value).returns("Linux") File.stubs(:exists?).with('/sys/devices/system/cpu').returns(true) end it "should return one physical CPU" do Dir.stubs(:glob).with("/sys/devices/system/cpu/cpu*/topology/physical_package_id").returns(["/sys/devices/system/cpu/cpu0/topology/physical_package_id"]) Facter::Core::Execution.stubs(:exec).with("cat /sys/devices/system/cpu/cpu0/topology/physical_package_id").returns("0") Facter.fact(:physicalprocessorcount).value.should == "1" end it "should return four physical CPUs" do Dir.stubs(:glob).with("/sys/devices/system/cpu/cpu*/topology/physical_package_id").returns(%w{ /sys/devices/system/cpu/cpu0/topology/physical_package_id /sys/devices/system/cpu/cpu1/topology/physical_package_id /sys/devices/system/cpu/cpu2/topology/physical_package_id /sys/devices/system/cpu/cpu3/topology/physical_package_id }) Facter::Core::Execution.stubs(:exec).with("cat /sys/devices/system/cpu/cpu0/topology/physical_package_id").returns("0") Facter::Core::Execution.stubs(:exec).with("cat /sys/devices/system/cpu/cpu1/topology/physical_package_id").returns("1") Facter::Core::Execution.stubs(:exec).with("cat /sys/devices/system/cpu/cpu2/topology/physical_package_id").returns("2") Facter::Core::Execution.stubs(:exec).with("cat /sys/devices/system/cpu/cpu3/topology/physical_package_id").returns("3") Facter.fact(:physicalprocessorcount).value.should == "4" end end describe "on windows" do it "should return 4 physical CPUs" do Facter.fact(:kernel).stubs(:value).returns("windows") require 'facter/util/wmi' ole = stub 'WIN32OLE' Facter::Util::WMI.expects(:execquery).with("select Name from Win32_Processor").returns(ole) ole.stubs(:Count).returns(4) Facter.fact(:physicalprocessorcount).value.should == "4" end end describe "on solaris" do let(:psrinfo) do "0 on-line since 10/16/2012 14:06:12\n" + "1 on-line since 10/16/2012 14:06:14\n" end %w{ 5.8 5.9 5.10 5.11 }.each do |release| it "should use the output of psrinfo -p on #{release}" do Facter.fact(:kernel).stubs(:value).returns(:sunos) Facter.stubs(:value).with(:kernelrelease).returns(release) Facter::Core::Execution.expects(:exec).with("/usr/sbin/psrinfo -p").returns("1") Facter.fact(:physicalprocessorcount).value.should == "1" end end %w{ 5.5.1 5.6 5.7 }.each do |release| it "uses psrinfo with no -p for kernelrelease #{release}" do Facter.fact(:kernel).stubs(:value).returns(:sunos) Facter.stubs(:value).with(:kernelrelease).returns(release) Facter::Core::Execution.expects(:exec).with("/usr/sbin/psrinfo").returns(psrinfo) Facter.fact(:physicalprocessorcount).value.should == "2" end end end describe "on openbsd" do it "should return 4 physical CPUs" do Facter.fact(:kernel).stubs(:value).returns("OpenBSD") Facter::Util::POSIX.expects(:sysctl).with("hw.ncpufound").returns("4") Facter.fact(:physicalprocessorcount).value.should == "4" end end end
{ "content_hash": "1239f4c91404b2d782aed339f78b0b53", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 159, "avg_line_length": 40.59036144578313, "alnum_prop": 0.670228554467201, "repo_name": "nicolasbrechet/our-boxen", "id": "65a9fc420563b3f498ed380398b24a5de7158e28", "size": "3391", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/bundle/ruby/2.0.0/gems/facter-2.1.0-universal-darwin/spec/unit/physicalprocessorcount_spec.rb", "mode": "33261", "license": "mit", "language": [ { "name": "Puppet", "bytes": "9060" }, { "name": "Ruby", "bytes": "23037" }, { "name": "Shell", "bytes": "2904" } ], "symlink_target": "" }
A shell wrapper which sounds on a number of shell events Edit ## Usage `cargo run` launches `$SHELL`. ``` $ cargo run ``` ## Sound Effects http://osabisi.sakura.ne.jp/m2/material3.html ## License Copyright (c) 2017 Hibariya Distributed under the [MIT License](LICENSE.txt).
{ "content_hash": "fc422155e07c9084d4f271a517891e63", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 61, "avg_line_length": 14.842105263157896, "alnum_prop": 0.7092198581560284, "repo_name": "hibariya/ashell", "id": "d6900a7b8ea970569039658579fdb54a8cb28514", "size": "292", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Rust", "bytes": "2773" }, { "name": "Shell", "bytes": "13689" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=../../futures/task/struct.Task.html"> </head> <body> <p>Redirecting to <a href="../../futures/task/struct.Task.html">../../futures/task/struct.Task.html</a>...</p> <script>location.replace("../../futures/task/struct.Task.html" + location.search + location.hash);</script> </body> </html>
{ "content_hash": "19c6ec250daee3a721761c44f50f283c", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 114, "avg_line_length": 38.1, "alnum_prop": 0.6456692913385826, "repo_name": "malept/guardhaus", "id": "f714c6fc5d3b3d38f920b11dcb103bcbc3d209bd", "size": "381", "binary": false, "copies": "2", "ref": "refs/heads/gh-pages", "path": "main/futures/task_impl/struct.Task.html", "mode": "33188", "license": "mit", "language": [ { "name": "Rust", "bytes": "73575" }, { "name": "Shell", "bytes": "1968" } ], "symlink_target": "" }
package proteomicsdb.org.requesttool.model.writing; import java.io.PrintWriter; import java.util.HashMap; import proteomicsdb.org.requesttool.model.description.InputParSpec; import proteomicsdb.org.requesttool.model.description.Intern; import proteomicsdb.org.requesttool.model.description.OutputConfiguration; /** * One of the specific {@link Writer}s of the Request Tool. It writes the data in the format of JSON. * @author Maxi * @version 1.0 */ public class JSONWriter extends Writer{ /** * Constructs a JSONWriter */ public JSONWriter() { type="json"; specificSettings = new HashMap<String, InputParSpec>(); this.configureSpecificSettings(); } /** * Since the Writer has no specificSettings, does nothing; needs to be implemented nontheless, because it is an abstract method of {@link Writer} */ @Override protected void configureSpecificSettings(){ //nothing } /** * Returns a new JSONWriter. This is used by the {@link WriterFactory} to create new {@link Writer}s for each task. * @return a new JSONWriter */ @Override public Writer getNewWriter() { return new JSONWriter(); } /** * Returns the file ending of files this Writer writes to. In this case it is txt, because .json is not understood by many programs. * @return "txt", the file ending of files the JSONWriter writes to */ @Override public String getSuffix() { return "txt"; } /** * Converts the input to a formatted JSON and writes it to the file that the PrintWriter has already opened. * Does not handle appending separately; appending a JSON will result in a file with two (or more, if appending more often) objects with the attribute results, which has as value an array of the data records. * @param configuration The {@link OutputConfiguration} specifying how the data shall be written. Not needed by this Writer. * @param input The data to be written * @param writer The already opened {@link PrintWriter} to the destination file */ @Override public void actuallyWrite(OutputConfiguration configuration, Intern input, PrintWriter writer) { if(input.isEmpty()){ return; } writer.write("{results: [\n"); for(int i = 0; i<input.size()-1; i++){ writer.write(input.get(i).toString()+","); } writer.write(input.get(input.size()-1).toString() + "]}"); } }
{ "content_hash": "e99416856c49e5e8e5eb72e3c3b99253", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 212, "avg_line_length": 33.60526315789474, "alnum_prop": 0.6597494126859828, "repo_name": "mwilhelm42/RequestTool", "id": "59329f2d595345c3af46dbbd5c769239e3f5dab9", "size": "2554", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/proteomicsdb/org/requesttool/model/writing/JSONWriter.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "208285" } ], "symlink_target": "" }
import { cnx } from '../../core/api' import { LOAD_ALL_POSTS } from './constants' export const loadAllPosts = () => { return (dispatch) =>{ cnx.get('/tasks') .then((resp) => dispatch({ type: LOAD_ALL_POSTS, payload: resp.data })) } }
{ "content_hash": "172fd47483b0ebdcbcc1e13e4c3167a4", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 44, "avg_line_length": 21, "alnum_prop": 0.5793650793650794, "repo_name": "augusto-santos/webapp", "id": "3d8f58ecc8bf4ca132ed5655fb6dcf5723923bdc", "size": "252", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "actions/Content/actions.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "36560" }, { "name": "HTML", "bytes": "2825" }, { "name": "JavaScript", "bytes": "59578" } ], "symlink_target": "" }
namespace Yt { enum class VA; class VulkanSwapchain; class VulkanVertexFormat; class VulkanRenderer final : public RenderBackend { public: explicit VulkanRenderer(const WindowID&); ~VulkanRenderer() noexcept override; void clear() override; std::unique_ptr<RenderProgram> create_builtin_program_2d() override; std::unique_ptr<Mesh> create_mesh(const MeshData&) override; std::unique_ptr<RenderProgram> create_program(const std::string& vertex_shader, const std::string& fragment_shader) override; std::unique_ptr<Texture2D> create_texture_2d(const Image&, Flags<RenderManager::TextureFlag>) override; size_t draw_mesh(const Mesh&) override; void flush_2d(const Buffer&, const Buffer&) noexcept override; RectF map_rect(const RectF&, ImageOrientation) const override; void set_program(const RenderProgram*) override; void set_texture(const Texture2D&, Flags<Texture2D::Filter>) override; void set_viewport_size(const Size&) override; Image take_screenshot(const Size&) const override; VulkanContext& context() noexcept { return _context; } void update_uniforms(const void* data, size_t size) { _uniform_buffer.write(data, size); } private: void update_descriptors(); const VulkanVertexFormat& vertex_format(const std::vector<VA>&); private: VulkanContext _context; VulkanBuffer _uniform_buffer; VK_DescriptorSetLayout _descriptor_set_layout; VK_DescriptorPool _descriptor_pool; VK_DescriptorSet _descriptor_set; VK_PipelineLayout _pipeline_layout; std::vector<std::pair<std::vector<VA>, std::unique_ptr<const VulkanVertexFormat>>> _vertex_format_cache; std::optional<VkDescriptorImageInfo> _descriptor_texture_2d; bool _update_descriptors = false; VK_ShaderModule _vertex_shader; VK_ShaderModule _fragment_shader; VulkanBuffer _vertex_buffer; std::unique_ptr<VulkanSwapchain> _swapchain; }; }
{ "content_hash": "ace76af88dd11728111b1a7a4dffff46", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 127, "avg_line_length": 38.916666666666664, "alnum_prop": 0.7601713062098501, "repo_name": "blagodarin/yttrium", "id": "ab8dfb096d648a50e4947740073b12f5c95dda95", "size": "2112", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "libs/renderer/src/backend/vulkan/renderer.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "983062" }, { "name": "CMake", "bytes": "79104" }, { "name": "GLSL", "bytes": "1333" }, { "name": "Python", "bytes": "1551" } ], "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_31) on Wed Dec 17 20:48:29 PST 2014 --> <title>Uses of Class java.util.concurrent.locks.StampedLock (Java Platform SE 8 )</title> <meta name="date" content="2014-12-17"> <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 Class java.util.concurrent.locks.StampedLock (Java Platform SE 8 )"; } } 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="../../../../../java/util/concurrent/locks/StampedLock.html" title="class in java.util.concurrent.locks">Class</a></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-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?java/util/concurrent/locks/class-use/StampedLock.html" target="_top">Frames</a></li> <li><a href="StampedLock.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 Class java.util.concurrent.locks.StampedLock" class="title">Uses of Class<br>java.util.concurrent.locks.StampedLock</h2> </div> <div class="classUseContainer">No usage of java.util.concurrent.locks.StampedLock</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="../../../../../java/util/concurrent/locks/StampedLock.html" title="class in java.util.concurrent.locks">Class</a></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-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?java/util/concurrent/locks/class-use/StampedLock.html" target="_top">Frames</a></li> <li><a href="StampedLock.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><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://download.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../../../../legal/cpyr.html">Copyright</a> &#x00a9; 1993, 2015, Oracle and/or its affiliates. All rights reserved. </font></small></p> </body> </html>
{ "content_hash": "3c54f1efa0920bb04be1412e1bdb7d5b", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 606, "avg_line_length": 41.39370078740158, "alnum_prop": 0.6317291230739965, "repo_name": "fbiville/annotation-processing-ftw", "id": "6f804a510b0eb179256ceb655684b1eeb7b4aa29", "size": "5257", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/java/jdk8/java/util/concurrent/locks/class-use/StampedLock.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "191178" }, { "name": "HTML", "bytes": "63904" }, { "name": "Java", "bytes": "107042" }, { "name": "JavaScript", "bytes": "246677" } ], "symlink_target": "" }
from collections import OrderedDict from pyticketswitch.mixins import JSONMixin from pyticketswitch.debitor import Debitor class Integration(JSONMixin, object): """Information to use when integrating payment methods into clients. Attributes: type (str): the debitor type. amount (float): the amount to be debited. amount_base (int): the precise amount. see currency for places. currency (str): the currency code. data (dict): debitor specific information. """ def __init__(self, typ, amount=None, base_amount=None, currency=None, data=None): self.type = typ self.amount = amount self.base_amount = base_amount self.currency = currency self.data = data @classmethod def from_api_data(cls, data): """Creates a new Integration object from API data from ticketswitch. Args: data (dict): the part of the response from a ticketswitch API call that concerns the integration. Returns: :class:`Integration <pyticketswitch.callout.Integration>`: a new :class:`Integration <pyticketswitch.callout.Integration>` object populated with the data from the api. """ kwargs = { 'typ': data.get('debitor_type'), 'amount': data.get('debit_amount'), 'base_amount': data.get('debit_base_amount'), 'currency': data.get('debit_currency'), 'data': data.get('debitor_specific_data'), } return cls(**kwargs) class Callout(JSONMixin, object): """Information about a redirection required by a 3rd party the payment provider. Attributes: code (str): the identifier for the source system of the bundle this callout will be paying for. description: the human readable description for the source system. total (float): the total amount of money that will be payable. type (str): the HTTP method that should be used to send the customer to the destination. destination (str): the destination url to send your user to. parameters (:py:class:`collections.OrderedDict`): dictionary of key value pairs that the 3rd party is expecting as query string parameters or form parameters. html (str): a blob of HTML that can be rendered to produce either the required redirect or the form to continue with the transaction. integration_data (dict): data relevant to the debitor that the customer will be redirected to. This *may* provide a opertunity to integrate directly. Consult documentation for more details. debitor (:class:`Debitor <pyticketswitch.debitor.Debitor>`): the debitor information that can be used for a front end integration. return_token (str): return token specified in the last purchase or callback call. """ def __init__(self, code=None, description=None, total=None, typ=None, destination=None, parameters=None, integration_data=None, debitor=None, currency_code=None, return_token=None): self.code = code self.description = description self.total = total self.type = typ self.destination = destination self.parameters = parameters self.integration_data = integration_data self.debitor = debitor self.currency_code = currency_code self.return_token = return_token @classmethod def from_api_data(cls, data): """Creates a new Callout object from API data from ticketswitch. Args: data (dict): the part of the response from a ticketswitch API call that concerns a callout. Returns: :class:`Callout <pyticketswitch.callout.Callout>`: a new :class:`Callout <pyticketswitch.callout.Callout>` object populated with the data from the api. """ kwargs = { 'code': data.get('bundle_source_code'), 'description': data.get('bundle_source_desc'), 'total': data.get('bundle_total_cost'), 'destination': data.get('callout_destination_url'), 'typ': data.get('callout_type'), 'currency_code': data.get('currency_code'), 'return_token': data.get('return_token'), } integration_data = data.get('callout_integration_data') if integration_data: kwargs.update(integration_data=integration_data) raw_debitor = data.get('debitor') if raw_debitor: debitor = Debitor.from_api_data(raw_debitor) kwargs.update(debitor=debitor) raw_parameters = data.get('callout_parameters') parameter_order = data.get('callout_parameters_order') if raw_parameters: if parameter_order: ordered_parameters = ( [key, raw_parameters[key]] for key in parameter_order ) parameters = OrderedDict(ordered_parameters) else: parameters = OrderedDict(raw_parameters.items()) kwargs.update(parameters=parameters) return cls(**kwargs) def __repr__(self): return u'<Callout {}:{}>'.format(self.code, self.return_token)
{ "content_hash": "9a44a84b55da9e4f0a3230b3171b6c98", "timestamp": "", "source": "github", "line_count": 147, "max_line_length": 84, "avg_line_length": 37.17687074829932, "alnum_prop": 0.6113449222323879, "repo_name": "ingresso-group/pyticketswitch", "id": "706d7d158792ff40ee374ea0a7e5b06b1f984732", "size": "5465", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pyticketswitch/callout.py", "mode": "33188", "license": "mit", "language": [ { "name": "Gherkin", "bytes": "20265" }, { "name": "Makefile", "bytes": "858" }, { "name": "Python", "bytes": "545753" } ], "symlink_target": "" }
<?php namespace Zend\Validator\Barcode; class MyBarcode5 { public function __construct() { $setLength = 'odd'; $setCharacters = 128; $setChecksum = '_mod10'; } }
{ "content_hash": "7e2bb2f39fd62c6533013064613b2415", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 33, "avg_line_length": 15.357142857142858, "alnum_prop": 0.5302325581395348, "repo_name": "mowema/verano", "id": "29c9abf5a845a56d82f13a91f1331bce4b3a9b46", "size": "523", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "vendor/zendframework/zendframework/tests/ZendTest/Validator/_files/MyBarcode5.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "197567" }, { "name": "JavaScript", "bytes": "401036" }, { "name": "PHP", "bytes": "250839" } ], "symlink_target": "" }
 #pragma once #include <aws/rbin/RecycleBin_EXPORTS.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/rbin/model/ConflictExceptionReason.h> #include <utility> namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace RecycleBin { namespace Model { /** * <p>The specified retention rule lock request can't be completed.</p><p><h3>See * Also:</h3> <a * href="http://docs.aws.amazon.com/goto/WebAPI/rbin-2021-06-15/ConflictException">AWS * API Reference</a></p> */ class AWS_RECYCLEBIN_API ConflictException { public: ConflictException(); ConflictException(Aws::Utils::Json::JsonView jsonValue); ConflictException& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; inline const Aws::String& GetMessage() const{ return m_message; } inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } inline ConflictException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} inline ConflictException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} inline ConflictException& WithMessage(const char* value) { SetMessage(value); return *this;} /** * <p>The reason for the exception.</p> */ inline const ConflictExceptionReason& GetReason() const{ return m_reason; } /** * <p>The reason for the exception.</p> */ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** * <p>The reason for the exception.</p> */ inline void SetReason(const ConflictExceptionReason& value) { m_reasonHasBeenSet = true; m_reason = value; } /** * <p>The reason for the exception.</p> */ inline void SetReason(ConflictExceptionReason&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** * <p>The reason for the exception.</p> */ inline ConflictException& WithReason(const ConflictExceptionReason& value) { SetReason(value); return *this;} /** * <p>The reason for the exception.</p> */ inline ConflictException& WithReason(ConflictExceptionReason&& value) { SetReason(std::move(value)); return *this;} private: Aws::String m_message; bool m_messageHasBeenSet = false; ConflictExceptionReason m_reason; bool m_reasonHasBeenSet = false; }; } // namespace Model } // namespace RecycleBin } // namespace Aws
{ "content_hash": "c84a866502a4835905c1f4892661ccde", "timestamp": "", "source": "github", "line_count": 105, "max_line_length": 119, "avg_line_length": 27.428571428571427, "alnum_prop": 0.6739583333333333, "repo_name": "aws/aws-sdk-cpp", "id": "ed73661ee4f0fe6f35bf21c18ab06c15ff84dd2b", "size": "2999", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "aws-cpp-sdk-rbin/include/aws/rbin/model/ConflictException.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "309797" }, { "name": "C++", "bytes": "476866144" }, { "name": "CMake", "bytes": "1245180" }, { "name": "Dockerfile", "bytes": "11688" }, { "name": "HTML", "bytes": "8056" }, { "name": "Java", "bytes": "413602" }, { "name": "Python", "bytes": "79245" }, { "name": "Shell", "bytes": "9246" } ], "symlink_target": "" }
INTERNAL_TRACE_EVENT_ADD_SCOPED(platform, category, name) #define TRACE_EVENT1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_SCOPED(platform, category, name, arg1_name, arg1_val) #define TRACE_EVENT2(category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_SCOPED(platform, category, name, arg1_name, arg1_val, arg2_name, \ arg2_val) // Records a single event called "name" immediately, with 0, 1 or 2 // associated arguments. If the category is not enabled, then this // does nothing. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. #define TRACE_EVENT_INSTANT0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_INSTANT1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) #define TRACE_EVENT_INSTANT2(platform, category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) #define TRACE_EVENT_COPY_INSTANT0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_COPY) #define TRACE_EVENT_COPY_INSTANT1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) #define TRACE_EVENT_COPY_INSTANT2(platform, category, name, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_INSTANT, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) // Records a single BEGIN event called "name" immediately, with 0, 1 or 2 // associated arguments. If the category is not enabled, then this // does nothing. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. #define TRACE_EVENT_BEGIN0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_BEGIN1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) #define TRACE_EVENT_BEGIN2(platform, category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) #define TRACE_EVENT_COPY_BEGIN0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_COPY) #define TRACE_EVENT_COPY_BEGIN1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) #define TRACE_EVENT_COPY_BEGIN2(platform, category, name, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_BEGIN, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) // Records a single END event for "name" immediately. If the category // is not enabled, then this does nothing. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. #define TRACE_EVENT_END0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_END1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) #define TRACE_EVENT_END2(platform, category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, arg2_val) #define TRACE_EVENT_COPY_END0(platform, category, name) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, TRACE_EVENT_FLAG_COPY) #define TRACE_EVENT_COPY_END1(platform, category, name, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) #define TRACE_EVENT_COPY_END2(platform, category, name, arg1_name, arg1_val, arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_END, category, name, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, arg2_val) // Records the value of a counter called "name" immediately. Value // must be representable as a 32 bit integer. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. #define TRACE_COUNTER1(platform, category, name, value) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_COUNTER, category, name, \ TRACE_EVENT_FLAG_NONE, "value", static_cast<int>(value)) #define TRACE_COPY_COUNTER1(platform, category, name, value) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_COUNTER, category, name, \ TRACE_EVENT_FLAG_COPY, "value", static_cast<int>(value)) // Records the values of a multi-parted counter called "name" immediately. // The UI will treat value1 and value2 as parts of a whole, displaying their // values as a stacked-bar chart. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. #define TRACE_COUNTER2(platform, category, name, value1_name, value1_val, value2_name, value2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_COUNTER, category, name, \ TRACE_EVENT_FLAG_NONE, value1_name, static_cast<int>(value1_val), \ value2_name, static_cast<int>(value2_val)) #define TRACE_COPY_COUNTER2(platform, category, name, value1_name, value1_val, value2_name, \ value2_val) \ INTERNAL_TRACE_EVENT_ADD(platform, TRACE_EVENT_PHASE_COUNTER, category, name, \ TRACE_EVENT_FLAG_COPY, value1_name, static_cast<int>(value1_val), \ value2_name, static_cast<int>(value2_val)) // Records the value of a counter called "name" immediately. Value // must be representable as a 32 bit integer. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. // - |id| is used to disambiguate counters with the same name. It must either // be a pointer or an integer value up to 64 bits. If it's a pointer, the bits // will be xored with a hash of the process ID so that the same pointer on // two different processes will not collide. #define TRACE_COUNTER_ID1(platform, category, name, id, value) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_COUNTER, category, name, id, \ TRACE_EVENT_FLAG_NONE, "value", static_cast<int>(value)) #define TRACE_COPY_COUNTER_ID1(platform, category, name, id, value) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_COUNTER, category, name, id, \ TRACE_EVENT_FLAG_COPY, "value", static_cast<int>(value)) // Records the values of a multi-parted counter called "name" immediately. // The UI will treat value1 and value2 as parts of a whole, displaying their // values as a stacked-bar chart. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. // - |id| is used to disambiguate counters with the same name. It must either // be a pointer or an integer value up to 64 bits. If it's a pointer, the bits // will be xored with a hash of the process ID so that the same pointer on // two different processes will not collide. #define TRACE_COUNTER_ID2(platform, category, name, id, value1_name, value1_val, value2_name, \ value2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ platform, TRACE_EVENT_PHASE_COUNTER, category, name, id, TRACE_EVENT_FLAG_NONE, \ value1_name, static_cast<int>(value1_val), value2_name, static_cast<int>(value2_val)) #define TRACE_COPY_COUNTER_ID2(platform, category, name, id, value1_name, value1_val, value2_name, \ value2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID( \ platform, TRACE_EVENT_PHASE_COUNTER, category, name, id, TRACE_EVENT_FLAG_COPY, \ value1_name, static_cast<int>(value1_val), value2_name, static_cast<int>(value2_val)) // Records a single ASYNC_BEGIN event called "name" immediately, with 0, 1 or 2 // associated arguments. If the category is not enabled, then this // does nothing. // - category and name strings must have application lifetime (statics or // literals). They may not include " chars. // - |id| is used to match the ASYNC_BEGIN event with the ASYNC_END event. ASYNC // events are considered to match if their category, name and id values all // match. |id| must either be a pointer or an integer value up to 64 bits. If // it's a pointer, the bits will be xored with a hash of the process ID so // that the same pointer on two different processes will not collide. // An asynchronous operation can consist of multiple phases. The first phase is // defined by the ASYNC_BEGIN calls. Additional phases can be defined using the // ASYNC_STEP_BEGIN macros. When the operation completes, call ASYNC_END. // An async operation can span threads and processes, but all events in that // operation must use the same |name| and |id|. Each event can have its own // args. #define TRACE_EVENT_ASYNC_BEGIN0(platform, category, name, id) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_BEGIN1(platform, category, name, id, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) #define TRACE_EVENT_ASYNC_BEGIN2(platform, category, name, id, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, \ arg2_val) #define TRACE_EVENT_COPY_ASYNC_BEGIN0(platform, category, name, id) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_COPY) #define TRACE_EVENT_COPY_ASYNC_BEGIN1(platform, category, name, id, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) #define TRACE_EVENT_COPY_ASYNC_BEGIN2(platform, category, name, id, arg1_name, arg1_val, \ arg2_name, arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_BEGIN, category, name, id, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ arg2_val) // Records a single ASYNC_STEP event for |step| immediately. If the category // is not enabled, then this does nothing. The |name| and |id| must match the // ASYNC_BEGIN event above. The |step| param identifies this step within the // async event. This should be called at the beginning of the next phase of an // asynchronous operation. #define TRACE_EVENT_ASYNC_STEP0(platform, category, name, id, step) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_STEP, category, name, id, \ TRACE_EVENT_FLAG_NONE, "step", step) #define TRACE_EVENT_ASYNC_STEP1(platform, category, name, id, step, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_STEP, category, name, id, \ TRACE_EVENT_FLAG_NONE, "step", step, arg1_name, arg1_val) #define TRACE_EVENT_COPY_ASYNC_STEP0(platform, category, name, id, step) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_STEP, category, name, id, \ TRACE_EVENT_FLAG_COPY, "step", step) #define TRACE_EVENT_COPY_ASYNC_STEP1(platform, category, name, id, step, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_STEP, category, name, id, \ TRACE_EVENT_FLAG_COPY, "step", step, arg1_name, arg1_val) // Records a single ASYNC_END event for "name" immediately. If the category // is not enabled, then this does nothing. #define TRACE_EVENT_ASYNC_END0(platform, category, name, id) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_NONE) #define TRACE_EVENT_ASYNC_END1(platform, category, name, id, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val) #define TRACE_EVENT_ASYNC_END2(platform, category, name, id, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_NONE, arg1_name, arg1_val, arg2_name, \ arg2_val) #define TRACE_EVENT_COPY_ASYNC_END0(platform, category, name, id) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_COPY) #define TRACE_EVENT_COPY_ASYNC_END1(platform, category, name, id, arg1_name, arg1_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val) #define TRACE_EVENT_COPY_ASYNC_END2(platform, category, name, id, arg1_name, arg1_val, arg2_name, \ arg2_val) \ INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, TRACE_EVENT_PHASE_ASYNC_END, category, name, id, \ TRACE_EVENT_FLAG_COPY, arg1_name, arg1_val, arg2_name, \ arg2_val) // Creates a scope of a sampling state with the given category and name (both must // be constant strings). These states are intended for a sampling profiler. // Implementation note: we store category and name together because we don't // want the inconsistency/expense of storing two pointers. // |thread_bucket| is [0..2] and is used to statically isolate samples in one // thread from others. // // { // The sampling state is set within this scope. // TRACE_EVENT_SAMPLING_STATE_SCOPE_FOR_BUCKET(0, "category", "name"); // ...; // } #define TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \ TraceEvent::SamplingStateScope<bucket_number> traceEventSamplingScope(category "\0" name); // Returns a current sampling state of the given bucket. // The format of the returned string is "category\0name". #define TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(bucket_number) \ TraceEvent::SamplingStateScope<bucket_number>::current() // Sets a current sampling state of the given bucket. // |category| and |name| have to be constant strings. #define TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(bucket_number, category, name) \ TraceEvent::SamplingStateScope<bucket_number>::set(category "\0" name) // Sets a current sampling state of the given bucket. // |categoryAndName| doesn't need to be a constant string. // The format of the string is "category\0name". #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(bucket_number, categoryAndName) \ TraceEvent::SamplingStateScope<bucket_number>::set(categoryAndName) // Syntactic sugars for the sampling tracing in the main thread. #define TRACE_EVENT_SCOPED_SAMPLING_STATE(category, name) \ TRACE_EVENT_SCOPED_SAMPLING_STATE_FOR_BUCKET(0, category, name) #define TRACE_EVENT_GET_SAMPLING_STATE() TRACE_EVENT_GET_SAMPLING_STATE_FOR_BUCKET(0) #define TRACE_EVENT_SET_SAMPLING_STATE(category, name) \ TRACE_EVENT_SET_SAMPLING_STATE_FOR_BUCKET(0, category, name) #define TRACE_EVENT_SET_NONCONST_SAMPLING_STATE(categoryAndName) \ TRACE_EVENT_SET_NONCONST_SAMPLING_STATE_FOR_BUCKET(0, categoryAndName) //////////////////////////////////////////////////////////////////////////////// // Implementation specific tracing API definitions. // Get a pointer to the enabled state of the given trace category. Only // long-lived literal strings should be given as the category name. The returned // pointer can be held permanently in a local static for example. If the // unsigned char is non-zero, tracing is enabled. If tracing is enabled, // TRACE_EVENT_API_ADD_TRACE_EVENT can be called. It's OK if tracing is disabled // between the load of the tracing state and the call to // TRACE_EVENT_API_ADD_TRACE_EVENT, because this flag only provides an early out // for best performance when tracing is disabled. // const unsigned char* // TRACE_EVENT_API_GET_CATEGORY_ENABLED(const char* category_name) #define TRACE_EVENT_API_GET_CATEGORY_ENABLED angle::GetTraceCategoryEnabledFlag // Add a trace event to the platform tracing system. // void TRACE_EVENT_API_ADD_TRACE_EVENT( // char phase, // const unsigned char* category_enabled, // const char* name, // unsigned long long id, // int num_args, // const char** arg_names, // const unsigned char* arg_types, // const unsigned long long* arg_values, // unsigned char flags) #define TRACE_EVENT_API_ADD_TRACE_EVENT angle::AddTraceEvent //////////////////////////////////////////////////////////////////////////////// // Implementation detail: trace event macros create temporary variables // to keep instrumentation overhead low. These macros give each temporary // variable a unique name based on the line number to prevent name collissions. #define INTERNAL_TRACE_EVENT_UID3(a, b) trace_event_unique_##a##b #define INTERNAL_TRACE_EVENT_UID2(a, b) INTERNAL_TRACE_EVENT_UID3(a, b) #define INTERNALTRACEEVENTUID(name_prefix) INTERNAL_TRACE_EVENT_UID2(name_prefix, __LINE__) // Implementation detail: internal macro to create static category. #define INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(platform, category) \ static const unsigned char *INTERNALTRACEEVENTUID(catstatic) = \ TRACE_EVENT_API_GET_CATEGORY_ENABLED(platform, category); // Implementation detail: internal macro to create static category and add // event if the category is enabled. #define INTERNAL_TRACE_EVENT_ADD(platform, phase, category, name, flags, ...) \ do \ { \ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(platform, category); \ if (*INTERNALTRACEEVENTUID(catstatic)) \ { \ gl::TraceEvent::addTraceEvent(platform, phase, INTERNALTRACEEVENTUID(catstatic), name, \ gl::TraceEvent::noEventId, flags, ##__VA_ARGS__); \ } \ } while (0) // Implementation detail: internal macro to create static category and add begin // event if the category is enabled. Also adds the end event when the scope // ends. #define INTERNAL_TRACE_EVENT_ADD_SCOPED(platform, category, name, ...) \ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(platform, category); \ gl::TraceEvent::TraceEndOnScopeClose INTERNALTRACEEVENTUID(profileScope); \ do \ { \ if (*INTERNALTRACEEVENTUID(catstatic)) \ { \ gl::TraceEvent::addTraceEvent( \ platform, TRACE_EVENT_PHASE_BEGIN, INTERNALTRACEEVENTUID(catstatic), name, \ gl::TraceEvent::noEventId, TRACE_EVENT_FLAG_NONE, ##__VA_ARGS__); \ INTERNALTRACEEVENTUID(profileScope) \ .initialize(platform, INTERNALTRACEEVENTUID(catstatic), name); \ } \ } while (0) // Implementation detail: internal macro to create static category and add // event if the category is enabled. #define INTERNAL_TRACE_EVENT_ADD_WITH_ID(platform, phase, category, name, id, flags, ...) \ do \ { \ INTERNAL_TRACE_EVENT_GET_CATEGORY_INFO(platform, category); \ if (*INTERNALTRACEEVENTUID(catstatic)) \ { \ unsigned char traceEventFlags = flags | TRACE_EVENT_FLAG_HAS_ID; \ gl::TraceEvent::TraceID traceEventTraceID(id, &traceEventFlags); \ gl::TraceEvent::addTraceEvent(platform, phase, INTERNALTRACEEVENTUID(catstatic), name, \ traceEventTraceID.data(), traceEventFlags, \ ##__VA_ARGS__); \ } \ } while (0) // Notes regarding the following definitions: // New values can be added and propagated to third party libraries, but existing // definitions must never be changed, because third party libraries may use old // definitions. // Phase indicates the nature of an event entry. E.g. part of a begin/end pair. #define TRACE_EVENT_PHASE_BEGIN ('B') #define TRACE_EVENT_PHASE_END ('E') #define TRACE_EVENT_PHASE_INSTANT ('I') #define TRACE_EVENT_PHASE_ASYNC_BEGIN ('S') #define TRACE_EVENT_PHASE_ASYNC_STEP ('T') #define TRACE_EVENT_PHASE_ASYNC_END ('F') #define TRACE_EVENT_PHASE_METADATA ('M') #define TRACE_EVENT_PHASE_COUNTER ('C') #define TRACE_EVENT_PHASE_SAMPLE ('P') // Flags for changing the behavior of TRACE_EVENT_API_ADD_TRACE_EVENT. #define TRACE_EVENT_FLAG_NONE (static_cast<unsigned char>(0)) #define TRACE_EVENT_FLAG_COPY (static_cast<unsigned char>(1 << 0)) #define TRACE_EVENT_FLAG_HAS_ID (static_cast<unsigned char>(1 << 1)) #define TRACE_EVENT_FLAG_MANGLE_ID (static_cast<unsigned char>(1 << 2)) // Type values for identifying types in the TraceValue union. #define TRACE_VALUE_TYPE_BOOL (static_cast<unsigned char>(1)) #define TRACE_VALUE_TYPE_UINT (static_cast<unsigned char>(2)) #define TRACE_VALUE_TYPE_INT (static_cast<unsigned char>(3)) #define TRACE_VALUE_TYPE_DOUBLE (static_cast<unsigned char>(4)) #define TRACE_VALUE_TYPE_POINTER (static_cast<unsigned char>(5)) #define TRACE_VALUE_TYPE_STRING (static_cast<unsigned char>(6)) #define TRACE_VALUE_TYPE_COPY_STRING (static_cast<unsigned char>(7)) namespace gl { namespace TraceEvent { // Specify these values when the corresponding argument of addTraceEvent is not // used. const int zeroNumArgs = 0; const unsigned long long noEventId = 0; // TraceID encapsulates an ID that can either be an integer or pointer. Pointers // are mangled with the Process ID so that they are unlikely to collide when the // same pointer is used on different processes. class TraceID { public: explicit TraceID(const void *id, unsigned char *flags) : m_data(static_cast<unsigned long long>(reinterpret_cast<uintptr_t>(id))) { *flags |= TRACE_EVENT_FLAG_MANGLE_ID; } explicit TraceID(unsigned long long id, unsigned char *flags) : m_data(id) { (void)flags; } explicit TraceID(unsigned long id, unsigned char *flags) : m_data(id) { (void)flags; } explicit TraceID(unsigned int id, unsigned char *flags) : m_data(id) { (void)flags; } explicit TraceID(unsigned short id, unsigned char *flags) : m_data(id) { (void)flags; } explicit TraceID(unsigned char id, unsigned char *flags) : m_data(id) { (void)flags; } explicit TraceID(long long id, unsigned char *flags) : m_data(static_cast<unsigned long long>(id)) { (void)flags; } explicit TraceID(long id, unsigned char *flags) : m_data(static_cast<unsigned long long>(id)) { (void)flags; } explicit TraceID(int id, unsigned char *flags) : m_data(static_cast<unsigned long long>(id)) { (void)flags; } explicit TraceID(short id, unsigned char *flags) : m_data(static_cast<unsigned long long>(id)) { (void)flags; } explicit TraceID(signed char id, unsigned char *flags) : m_data(static_cast<unsigned long long>(id)) { (void)flags; } unsigned long long data() const { return m_data; } private: unsigned long long m_data; }; // Simple union to store various types as unsigned long long. union TraceValueUnion { bool m_bool; unsigned long long m_uint; long long m_int; double m_double; const void *m_pointer; const char *m_string; }; // Simple container for const char* that should be copied instead of retained. class TraceStringWithCopy { public: explicit TraceStringWithCopy(const char *str) : m_str(str) {} operator const char *() const { return m_str; } private: const char *m_str; }; // Define setTraceValue for each allowed type. It stores the type and // value in the return arguments. This allows this API to avoid declaring any // structures so that it is portable to third_party libraries. #define INTERNAL_DECLARE_SET_TRACE_VALUE(actual_type, union_member, value_type_id) \ static inline void setTraceValue(actual_type arg, unsigned char *type, \ unsigned long long *value) \ { \ TraceValueUnion typeValue; \ typeValue.union_member = arg; \ *type = value_type_id; \ *value = typeValue.m_uint; \ } // Simpler form for int types that can be safely casted. #define INTERNAL_DECLARE_SET_TRACE_VALUE_INT(actual_type, value_type_id) \ static inline void setTraceValue(actual_type arg, unsigned char *type, \ unsigned long long *value) \ { \ *type = value_type_id; \ *value = static_cast<unsigned long long>(arg); \ } INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned long long, TRACE_VALUE_TYPE_UINT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned int, TRACE_VALUE_TYPE_UINT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned short, TRACE_VALUE_TYPE_UINT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(unsigned char, TRACE_VALUE_TYPE_UINT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(long long, TRACE_VALUE_TYPE_INT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(int, TRACE_VALUE_TYPE_INT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(short, TRACE_VALUE_TYPE_INT) INTERNAL_DECLARE_SET_TRACE_VALUE_INT(signed char, TRACE_VALUE_TYPE_INT) INTERNAL_DECLARE_SET_TRACE_VALUE(bool, m_bool, TRACE_VALUE_TYPE_BOOL) INTERNAL_DECLARE_SET_TRACE_VALUE(double, m_double, TRACE_VALUE_TYPE_DOUBLE) INTERNAL_DECLARE_SET_TRACE_VALUE(const void *, m_pointer, TRACE_VALUE_TYPE_POINTER) INTERNAL_DECLARE_SET_TRACE_VALUE(const char *, m_string, TRACE_VALUE_TYPE_STRING) INTERNAL_DECLARE_SET_TRACE_VALUE(const TraceStringWithCopy &, m_string, TRACE_VALUE_TYPE_COPY_STRING) #undef INTERNAL_DECLARE_SET_TRACE_VALUE #undef INTERNAL_DECLARE_SET_TRACE_VALUE_INT static inline void setTraceValue(const std::string &arg, unsigned char *type, unsigned long long *value) { TraceValueUnion typeValue; typeValue.m_string = arg.data(); *type = TRACE_VALUE_TYPE_COPY_STRING; *value = typeValue.m_uint; } // These addTraceEvent template functions are defined here instead of in the // macro, because the arg values could be temporary string objects. In order to // store pointers to the internal c_str and pass through to the tracing API, the // arg values must live throughout these procedures. static inline angle::TraceEventHandle addTraceEvent(angle::PlatformMethods *platform, char phase, const unsigned char *categoryEnabled, const char *name, unsigned long long id, unsigned char flags) { return TRACE_EVENT_API_ADD_TRACE_EVENT(platform, phase, categoryEnabled, name, id, zeroNumArgs, 0, 0, 0, flags); } template <class ARG1_TYPE> static inline angle::TraceEventHandle addTraceEvent(angle::PlatformMethods *platform, char phase, const unsigned char *categoryEnabled, const char *name, unsigned long long id, unsigned char flags, const char *arg1Name, const ARG1_TYPE &arg1Val) { const int numArgs = 1; unsigned char argTypes[1]; unsigned long long argValues[1]; setTraceValue(arg1Val, &argTypes[0], &argValues[0]); return TRACE_EVENT_API_ADD_TRACE_EVENT(platform, phase, categoryEnabled, name, id, numArgs, &arg1Name, argTypes, argValues, flags); } template <class ARG1_TYPE, class ARG2_TYPE> static inline angle::TraceEventHandle addTraceEvent(angle::PlatformMethods *platform, char phase, const unsigned char *categoryEnabled, const char *name, unsigned long long id, unsigned char flags, const char *arg1Name, const ARG1_TYPE &arg1Val, const char *arg2Name, const ARG2_TYPE &arg2Val) { const int numArgs = 2; const char *argNames[2] = {arg1Name, arg2Name}; unsigned char argTypes[2]; unsigned long long argValues[2]; setTraceValue(arg1Val, &argTypes[0], &argValues[0]); setTraceValue(arg2Val, &argTypes[1], &argValues[1]); return TRACE_EVENT_API_ADD_TRACE_EVENT(platform, phase, categoryEnabled, name, id, numArgs, argNames, argTypes, argValues, flags); } // Used by TRACE_EVENTx macro. Do not use directly. class TraceEndOnScopeClose { public: // Note: members of m_data intentionally left uninitialized. See initialize. TraceEndOnScopeClose() : m_pdata(0) {} ~TraceEndOnScopeClose() { if (m_pdata) addEventIfEnabled(); } void initialize(angle::PlatformMethods *platform, const unsigned char *categoryEnabled, const char *name) { m_data.platform = platform; m_data.categoryEnabled = categoryEnabled; m_data.name = name; m_pdata = &m_data; } private: // Add the end event if the category is still enabled. void addEventIfEnabled() { // Only called when m_pdata is non-null. if (*m_pdata->categoryEnabled) { TRACE_EVENT_API_ADD_TRACE_EVENT(m_pdata->platform, TRACE_EVENT_PHASE_END, m_pdata->categoryEnabled, m_pdata->name, noEventId, zeroNumArgs, 0, 0, 0, TRACE_EVENT_FLAG_NONE); } } // This Data struct workaround is to avoid initializing all the members // in Data during construction of this object, since this object is always // constructed, even when tracing is disabled. If the members of Data were // members of this class instead, compiler warnings occur about potential // uninitialized accesses. struct Data { angle::PlatformMethods *platform; const unsigned char *categoryEnabled; const char *name; }; Data *m_pdata; Data m_data; }; } // namespace TraceEvent } // namespace gl #endif
{ "content_hash": "39421563f12030541f2acbfb1b999cd6", "timestamp": "", "source": "github", "line_count": 619, "max_line_length": 100, "avg_line_length": 59.306946688206786, "alnum_prop": 0.5862548010133203, "repo_name": "ppy/angle", "id": "53b52771452b05a6fda47e5b5aeacbcaa9a61c9d", "size": "43798", "binary": false, "copies": "9", "ref": "refs/heads/master", "path": "src/third_party/trace_event/trace_event.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "17281" }, { "name": "C", "bytes": "562758" }, { "name": "C++", "bytes": "7776807" }, { "name": "Lex", "bytes": "26383" }, { "name": "Objective-C", "bytes": "18506" }, { "name": "Objective-C++", "bytes": "25649" }, { "name": "PostScript", "bytes": "989" }, { "name": "Python", "bytes": "61989" }, { "name": "Shell", "bytes": "1461" }, { "name": "Yacc", "bytes": "61666" } ], "symlink_target": "" }
package com.github.assisstion.MTGSimulator.game.effect.apply; import java.util.Map; import com.github.assisstion.MTGSimulator.game.effect.syntax.StackEffectPart; public class DealDamagePlayer extends StackEffectPart{ public Damagable target; public Map<String, String> modifiers; public long amount; @Override public void perform(){ target.damage(amount, modifiers); } @Override public boolean isPrepared(){ // TODO Auto-generated method stub return false; } @Override public void prepare(Object... obj){ // TODO Auto-generated method stub } }
{ "content_hash": "ceae8c46e0313222d13cee4906c13632", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 77, "avg_line_length": 19.1, "alnum_prop": 0.7609075043630017, "repo_name": "assisstion/Lotus", "id": "c5752219b7a4b5a5b423fc86f3138da971a51327", "size": "573", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/github/assisstion/MTGSimulator/game/effect/apply/DealDamagePlayer.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "338200" }, { "name": "PHP", "bytes": "14377" } ], "symlink_target": "" }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.jcertif.offlinebox.configuration; import com.jcertif.offlinebox.beans.WebSite; import java.util.ArrayList; import java.util.List; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import static org.junit.Assert.*; /** * * @author Komi Serge Innocent <[email protected]> */ public class WebSitesConfigTest { private WebSitesConfig instance; public WebSitesConfigTest() { instance = WebSitesConfig.getInstance(); } @BeforeClass public static void setUpClass() { } @AfterClass public static void tearDownClass() { } @Before public void setUp() { } @After public void tearDown() { } /** * Test of retieveFromConfigFile method, of class WebSitesConfig. */ @Test public void testRetieveFromConfigFile() { System.out.println("retieveFromConfigFile"); List<WebSite> result = instance.getListeWebSites(); assertNotNull(result); } @Test public void testSave() { List<WebSite> listWebsite = new ArrayList<>(); listWebsite.add(new WebSite("www.google.fr")); listWebsite.add(new WebSite("www.jcertif.com")); instance.setListWebSites(listWebsite); instance.saveListWebSites(); } }
{ "content_hash": "feaa7a97a54e91afd8ab0e6c6780a4bd", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 79, "avg_line_length": 24.276923076923076, "alnum_prop": 0.6603295310519645, "repo_name": "JCERTIFLab/JCertif-Offline-Box", "id": "bc59d360660ed5233ad07999105b021d0a333dfe", "size": "1578", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "Offline-Box-Services/src/test/java/com/jcertif/offlinebox/configuration/WebSitesConfigTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "44142" } ], "symlink_target": "" }
/** * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a> */ #ifndef _CONF_IO_EXAMPLE_H #define _CONF_IO_EXAMPLE_H #include "conf_board.h" /*! \name Pin Configuration */ //! @{ #define GPIO_PIN_EXAMPLE_1 LED0_GPIO #define GPIO_PIN_EXAMPLE_2 LED1_GPIO #define GPIO_PIN_EXAMPLE_3 GPIO_WAKE_BUTTON //! @} #endif // _CONF_IO_EXAMPLE_H
{ "content_hash": "4da08c84364655862edb142456abb0ec", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 90, "avg_line_length": 20, "alnum_prop": 0.6657894736842105, "repo_name": "femtoio/femto-usb-blink-example", "id": "f30bdfea6a4e0f2a8ae38d963f7de82b93127181", "size": "2315", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "blinky/blinky/asf-3.21.0/avr32/drivers/gpio/peripheral_bus_example/at32uc3l064_uc3l_ek/conf_gpio_peripheral_bus_example.h", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "178794" }, { "name": "C", "bytes": "251878780" }, { "name": "C++", "bytes": "47991929" }, { "name": "CSS", "bytes": "2147" }, { "name": "HTML", "bytes": "107322" }, { "name": "JavaScript", "bytes": "588817" }, { "name": "Logos", "bytes": "570108" }, { "name": "Makefile", "bytes": "64558964" }, { "name": "Matlab", "bytes": "10660" }, { "name": "Objective-C", "bytes": "15780083" }, { "name": "Perl", "bytes": "12845" }, { "name": "Python", "bytes": "67293" }, { "name": "Scilab", "bytes": "88572" }, { "name": "Shell", "bytes": "126729" } ], "symlink_target": "" }
using Untech.SharePoint.Common.CodeAnnotations; using Untech.SharePoint.Common.MetaModels.Visitors; namespace Untech.SharePoint.Common.MetaModels { /// <summary> /// Represents base meta model interface. /// </summary> [PublicAPI] public interface IMetaModel { /// <summary> /// Accepts <see cref="IMetaModelVisitor"/> instance. /// </summary> /// <param name="visitor">Visitor to accept.</param> void Accept(IMetaModelVisitor visitor); /// <summary> /// Gets additional property value associated with the specified key. /// </summary> /// <typeparam name="T">Type of the additional property value.</typeparam> /// <param name="key">The key of the additional property.</param> /// <returns>Property value associated with the specified key.</returns> T GetAdditionalProperty<T>(string key); /// <summary> /// Sets additional property value associated with the specified key. /// </summary> /// <typeparam name="T">Type of the additional property value.</typeparam> /// <param name="key">The key of the additional property.</param> /// <param name="value">Property value associated with the specified key.</param> void SetAdditionalProperty<T>(string key, T value); } }
{ "content_hash": "8adbe37cc52477b0feffee77ad6ed62b", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 83, "avg_line_length": 35.794117647058826, "alnum_prop": 0.7091207888249794, "repo_name": "Happi-cat/Untech.SharePoint", "id": "866c9baa124bb09397c5ec9b490e501138033f62", "size": "1219", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Src/Untech.SharePoint.Common/MetaModels/IMetaModel.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "140" }, { "name": "C#", "bytes": "570396" }, { "name": "PowerShell", "bytes": "10531" } ], "symlink_target": "" }
/** * Created by Tobia on 28/04/17. */ export const nonEmptyString = Match.Where((str) => { check(str, String); return str.length > 0; });
{ "content_hash": "d820fdec12aad81321320e7a7ef48ea6", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 52, "avg_line_length": 20.714285714285715, "alnum_prop": 0.6206896551724138, "repo_name": "ninjabit/GraffitiMaps", "id": "3d23c078bd18ad8ec344ca5130041900edd56ff8", "size": "145", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "api/server/methods/utils.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "276857" }, { "name": "HTML", "bytes": "54151" }, { "name": "JavaScript", "bytes": "44102" }, { "name": "TypeScript", "bytes": "108245" } ], "symlink_target": "" }
from __future__ import division from __future__ import absolute_import from builtins import * import math import xlsxwriter import sys from .canmatrix import * import os.path #Font Size : 8pt * 20 = 160 #font = 'font: name Arial Narrow, height 160' font = 'font: name Verdana, height 160' sty_header = 0 sty_norm = 0 sty_first_frame = 0 sty_white = 0 sty_green = 0 sty_green_first_frame = 0 sty_sender = 0 sty_sender_first_frame = 0 sty_sender_green = 0 sty_sender_green_first_frame = 0 def writeFramex(frame, worksheet, row, mystyle): #frame-id worksheet.write(row, 0, "%3Xh" % frame._Id, mystyle) #frame-Name worksheet.write(row, 1, frame._name, mystyle) #determin cycle-time if "GenMsgCycleTime" in frame._attributes: worksheet.write(row, 2, int(frame._attributes["GenMsgCycleTime"]), mystyle) else: worksheet.write(row, 2, "", mystyle) #determin send-type if "GenMsgSendType" in frame._attributes: if frame._attributes["GenMsgSendType"] == "5": worksheet.write(row, 3, "Cyclic+Change", mystyle ) if "GenMsgDelayTime" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgDelayTime"]), mystyle ) else: worksheet.write(row, 4, "", mystyle) elif frame._attributes["GenMsgSendType"] == "0": worksheet.write(row, 3, "Cyclic", mystyle ) worksheet.write(row, 4, "" , mystyle) elif frame._attributes["GenMsgSendType"] == "2": worksheet.write(row, 3, "BAF", mystyle) if "GenMsgNrOfRepetitions" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgNrOfRepetitions"]) , mystyle) else: worksheet.write(row, 4, "", mystyle) elif frame._attributes["GenMsgSendType"] == "8": worksheet.write(row, 3, "DualCycle", mystyle ) if "GenMsgCycleTimeActive" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgCycleTimeActive"]), mystyle ) else: worksheet.write(row, 4, "", mystyle) elif frame._attributes["GenMsgSendType"] == "10": worksheet.write(row, 3, "None", mystyle) if "GenMsgDelayTime" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgDelayTime"]), mystyle) else: worksheet.write(row, 4, "", mystyle) elif frame._attributes["GenMsgSendType"] == "9": worksheet.write(row, 3, "OnChange" , mystyle) if "GenMsgNrOfRepetitions" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgNrOfRepetitions"]) , mystyle) else: worksheet.write(row, 4, "", mystyle) elif frame._attributes["GenMsgSendType"] == "1": worksheet.write(row, 3, "Spontaneous" , mystyle) if "GenMsgDelayTime" in frame._attributes: worksheet.write(row, 4, int(frame._attributes["GenMsgDelayTime"]) , mystyle) else: worksheet.write(row, 4, "", mystyle) else: worksheet.write(row, 3, "", mystyle) worksheet.write(row, 4, "", mystyle) else: worksheet.write(row, 3, "", mystyle) worksheet.write(row, 4, "", mystyle) def writeSignalx(db, sig, worksheet, row, rearCol, mystyle, motorolaBitFormat): if motorolaBitFormat == "msb": startBit = sig.getMsbStartbit() elif motorolaBitFormat == "msbreverse": startBit = sig.getMsbReverseStartbit() else: # motorolaBitFormat == "lsb" startBit = sig.getLsbStartbit() #startbyte worksheet.write(row, 5, math.floor(startBit/8)+1, mystyle) #startbit worksheet.write(row, 6, (startBit)%8, mystyle) #signalname worksheet.write(row, 7, sig._name, mystyle) # eval comment: if sig._comment is None: comment = "" else: comment = sig._comment # eval multiplex-info if sig._multiplex == 'Multiplexor': comment = "Mode Signal: " + comment elif sig._multiplex is not None: comment = "Mode " + str(sig._multiplex) + ":" + comment #write comment and size of signal in sheet worksheet.write(row, 8, comment, mystyle) worksheet.write(row, 9, sig._signalsize, mystyle) #startvalue of signal available if "GenSigStartValue" in sig._attributes: if db._signalDefines["GenSigStartValue"]._definition == "STRING": worksheet.write(row, 10, sig._attributes["GenSigStartValue"], mystyle) elif db._signalDefines["GenSigStartValue"]._definition == "INT" or db._signalDefines["GenSigStartValue"]._definition == "HEX": worksheet.write(row, 10, "%Xh" % int(sig._attributes["GenSigStartValue"]), mystyle) else: worksheet.write(row, 10, " ", mystyle) #SNA-value of signal available if "GenSigSNA" in sig._attributes: sna = sig._attributes["GenSigSNA"][1:-1] worksheet.write(row, 11, sna, mystyle) #no SNA-value of signal available / just for correct style: else: worksheet.write(row, 11, " ", mystyle) # eval byteorder (intel == True / motorola == False) if sig._is_little_endian: worksheet.write(row, 12, "i", mystyle) else: worksheet.write(row, 12, "m", mystyle) # is a unit defined for signal? if sig._unit.strip().__len__() > 0: # factor not 1.0 ? if float(sig._factor) != 1: worksheet.write(row, rearCol+2, "%g" % float(sig._factor) + " " + sig._unit, mystyle) #factor == 1.0 else: worksheet.write(row, rearCol+2, sig._unit, mystyle) # no unit defined else: # factor not 1.0 ? if float(sig._factor) != 1: worksheet.write(row, rearCol+2, "%g" % float(sig._factor), mystyle) #factor == 1.0 else: worksheet.write(row, rearCol+2, "", mystyle) def writeValuex(label, value, worksheet, row, rearCol, mystyle): # write value and lable in sheet worksheet.write(row, rearCol, label, mystyle) worksheet.write(row, rearCol+1, value, mystyle) def writeBuMatrixx(buList, sig, frame, worksheet, row, col, firstframe): # first-frame - style with borders: if firstframe == sty_first_frame: norm = sty_first_frame sender = sty_sender_first_frame norm_green = sty_green_first_frame sender_green = sty_sender_green_first_frame # consecutive-frame - style without borders: else: norm = sty_norm sender = sty_sender norm_green = sty_green sender_green = sty_sender_green #iterate over boardunits: for bu in buList: #every second Boardunit with other style if col % 2 == 0: locStyle = norm locStyleSender = sender #every second Boardunit with other style else: locStyle = norm_green locStyleSender = sender_green # write "s" "r" "r/s" if signal is sent, recieved or send and recived by boardunit if bu in sig._receiver and bu in frame._Transmitter: worksheet.write(row, col, "r/s", locStyleSender) elif bu in sig._receiver: worksheet.write(row, col, "r", locStyle) elif bu in frame._Transmitter: worksheet.write(row, col, "s", locStyleSender) else: worksheet.write(row, col, "", locStyle) col += 1 # loop over boardunits ends here return col def exportXlsx(db, filename, **options): if 'xlsMotorolaBitFormat' in options: motorolaBitFormat = options["xlsMotorolaBitFormat"] else: motorolaBitFormat = "msbreverse" head_top = ['ID', 'Frame Name', 'Cycle Time [ms]', 'Launch Type', 'Launch Parameter', 'Signal Byte No.', 'Signal Bit No.', 'Signal Name', 'Signal Function', 'Signal Length [Bit]', 'Signal Default', ' Signal Not Available', 'Byteorder'] head_tail = ['Value', 'Name / Phys. Range', 'Function / Increment Unit'] workbook = xlsxwriter.Workbook(filename) wsname = os.path.basename(filename).replace('.xlsx','') worksheet = workbook.add_worksheet('K-Matrix ' + wsname[0:22]) col = 0 global sty_header sty_header = workbook.add_format({'bold': True, 'rotation': 90, 'font_name' : 'Verdana', 'font_size' : 8, 'align' : 'center', 'valign' : 'center'}) global sty_first_frame sty_first_frame = workbook.add_format({'font_name' : 'Verdana', 'font_size' : 8, 'font_color' : 'black', 'top' : 1}) global sty_white sty_white = workbook.add_format({'font_name' : 'Verdana', 'font_size' : 8, 'font_color' : 'white'}) global sty_norm sty_norm = workbook.add_format({'font_name' : 'Verdana', 'font_size' : 8, 'font_color' : 'black'}) # BUMatrix-Styles global sty_green sty_green = workbook.add_format({'pattern': 1, 'fg_color': '#CCFFCC' }) global sty_green_first_frame sty_green_first_frame = workbook.add_format({'pattern': 1, 'fg_color': '#CCFFCC', 'top':1 }) global sty_sender sty_sender = workbook.add_format({'pattern': 0x04, 'fg_color': '#C0C0C0'}) global sty_sender_first_frame sty_sender_first_frame = workbook.add_format({'pattern': 0x04, 'fg_color': '#C0C0C0', 'top' : 1}) global sty_sender_green sty_sender_green = workbook.add_format({'pattern': 0x04, 'fg_color': '#C0C0C0', 'bg_color': '#CCFFCC'}) global sty_sender_green_first_frame sty_sender_green_first_frame = workbook.add_format({'pattern': 0x04, 'fg_color': '#C0C0C0', 'bg_color': '#CCFFCC','top': 1}) # write first row (header) cols before frameardunits: for head in head_top: worksheet.write(0, col, head, sty_header) worksheet.set_column(col, col, 3.57) col += 1 # write frameardunits in first row: buList = [] for bu in db._BUs._list: worksheet.write(0, col, bu._name, sty_header) worksheet.set_column(col, col, 3.57) buList.append(bu._name) col += 1 head_start = col # write first row (header) cols after frameardunits: for head in head_tail: worksheet.write(0, col, head, sty_header) worksheet.set_column(col, col, 6) col += 1 # set width of selected Cols worksheet.set_column(0,0, 3.57) worksheet.set_column(1,1, 21) worksheet.set_column(3,3, 12.29) worksheet.set_column(7,7, 21) worksheet.set_column(8,8, 30) worksheet.set_column(head_start+1,head_start+1, 21) worksheet.set_column(head_start+2,head_start+2, 12) frameHash = {} for frame in db._fl._list: frameHash[int(frame._Id)] = frame #set row to first Frame (row = 0 is header) row = 1 # iterate over the frames for idx in sorted(frameHash.keys()): frame = frameHash[idx] framestyle = sty_first_frame #sort signals: sigHash ={} for sig in frame._signals: sigHash["%02d" % int(sig.getMsbReverseStartbit()) + sig._name] = sig #set style for first line with border sigstyle = sty_first_frame #iterate over signals for sig_idx in sorted(sigHash.keys()): sig = sigHash[sig_idx] # if not first Signal in Frame, set style if sigstyle != sty_first_frame: sigstyle = sty_norm # valuetable available? if sig._values.__len__() > 0: valstyle = sigstyle # iterate over values in valuetable for val in sorted(sig._values.keys()): writeFramex(frame, worksheet, row, framestyle) if framestyle != sty_first_frame: worksheet.set_row(row, None, None, {'level': 1}) col = head_top.__len__() col = writeBuMatrixx(buList, sig, frame, worksheet, row, col, framestyle) # write Value writeValuex(val,sig._values[val], worksheet, row, col, valstyle) writeSignalx(db, sig, worksheet, row, col, sigstyle, motorolaBitFormat) # no min/max here, because min/max has same col as values... #next row row +=1 # set style to normal - without border sigstyle = sty_white framestyle = sty_white valstyle = sty_norm #loop over values ends here # no valuetable available else: writeFramex(frame, worksheet, row, framestyle) if framestyle != sty_first_frame: worksheet.set_row(row, None, None, {'level': 1}) col = head_top.__len__() col = writeBuMatrixx(buList, sig, frame, worksheet, row, col, framestyle) writeSignalx(db, sig, worksheet, row, col, sigstyle, motorolaBitFormat) if float(sig._min) != 0 or float(sig._max) != 1.0: worksheet.write(row, col+1, str("%g..%g" %(sig._min, sig._max)), sigstyle) else: worksheet.write(row, col+1, "", sigstyle) # just for border worksheet.write(row, col, "", sigstyle) #next row row +=1 # set style to normal - without border sigstyle = sty_white framestyle = sty_white # reset signal-Array signals = [] #loop over signals ends here # loop over frames ends here worksheet.autofilter(0,0,row,len(head_top)+len(head_tail)+len(db._BUs._list)) worksheet.freeze_panes(1,0) # save file workbook.close()
{ "content_hash": "1aaeedcd74bbcccaaddc885396f1bfe2", "timestamp": "", "source": "github", "line_count": 350, "max_line_length": 239, "avg_line_length": 39.44571428571429, "alnum_prop": 0.5881500796755034, "repo_name": "swatz/canmatrix", "id": "942175bf98c7d72353c5bab5ca1bb071b556ca6b", "size": "15279", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "canmatrix/exportxlsx.py", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Python", "bytes": "231041" }, { "name": "Shell", "bytes": "172" } ], "symlink_target": "" }
var pubsub = require('../../event-pubsub.js'); /************************************\ * instantiating myEvents scope * **********************************/ var myEvents=new pubsub(); /************************************\ * instantiating myEvents2 scope * **********************************/ var myEvents2=new pubsub(); /************************************\ * binding myEvents events * **********************************/ myEvents.on( 'hello', function(data){ console.log('myEvents hello event recieved ', data); } ); myEvents.on( 'hello', function(data){ console.log('Second handler listening to myEvents hello event got',data); myEvents.trigger( 'world', { type:'myObject', data:{ x:'YAY, Objects!' } } ) } ); myEvents.on( 'world', function(data){ console.log('myEvents World event got',data); } ); /**********************************\ * * Demonstrate * event (on all events) * remove this for less verbose * example * * ********************************/ myEvents.on( '*', function(type){ console.log('myEvents Catch all detected event type of : ',type, '. List of all the sent arguments ',arguments); } ); /************************************\ * binding myEvents2 events * **********************************/ myEvents2.on( 'hello', function(data){ console.log('myEvents2 Hello event should never be called ', data); } ); myEvents2.on( 'world', function(data){ console.log('myEvents2 World event ',data); } ); /************************************\ * trigger events for testing * **********************************/ myEvents.trigger( 'hello', 'world' ); myEvents2.trigger( 'world', 'is round' );
{ "content_hash": "d082650ef99bec4e7350edc56b3be22b", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 120, "avg_line_length": 20.966666666666665, "alnum_prop": 0.4281928987811341, "repo_name": "AceMood/Cheetah", "id": "a91e100c491a009af48da50d64c6ea7b589f5c93", "size": "1887", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "node_modules/node-ipc/node_modules/event-pubsub/examples/node/multipleScopes.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "243393" }, { "name": "JavaScript", "bytes": "8005" }, { "name": "Shell", "bytes": "104" } ], "symlink_target": "" }
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header aui-dropdown2-trigger-group" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo aui-header-logo-clover"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="aui-header-logo-device">OpenClover</span></a> </h1> </div> <div class="aui-header-secondary"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="aui-page-panel-inner"> <div class="aui-page-panel-nav aui-page-panel-nav-clover"> <div class="aui-page-header-inner" style="margin-bottom: 20px;"> <div class="aui-page-header-image"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="aui-page-header-main" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup aui-navgroup-vertical"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading packages-nav-heading"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui package-filter-container"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="package-filter-no-results-message hidden"> <small>No results found.</small> </p> <div class="packages-tree-wrapper" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="packages-tree-container"></div> <div class="clover-packages-lozenges"></div> </div> </div> </div> </nav> </div> <section class="aui-page-panel-content"> <div class="aui-page-panel-content-clover"> <div class="aui-page-header-main"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="test-Test_AbaRouteValidator_08.html">Class Test_AbaRouteValidator_08</a></li> </ol></div> <h1 class="aui-h2-clover"> Test testAbaNumberCheck_15999_good </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_08.html?line=24040#src-24040" >testAbaNumberCheck_15999_good</a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:38:08 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> testAbaNumberCheck_15999_good</th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=21790#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.7352941</span>73.5% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="73.5% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:73.5%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="aui-page-panel-content-clover" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="aui-page-panel-content" --> </div> <!-- class="aui-page-panel-inner" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
{ "content_hash": "83113f6d3495a25228ad4da842c7deac", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 297, "avg_line_length": 43.92822966507177, "alnum_prop": 0.5097483934211959, "repo_name": "dcarda/aba.route.validator", "id": "d18a031e544be21a1919364834a92c982cf8e326", "size": "9181", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "target13/site/clover/com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_08_testAbaNumberCheck_15999_good_gta.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "18715254" } ], "symlink_target": "" }
package com.esri.gpt.control.livedata; import com.esri.gpt.control.livedata.selector.HttpRequestDefinition; import com.esri.gpt.control.livedata.selector.IHttpResponseListener; import com.esri.gpt.control.livedata.selector.IRegistry; import com.esri.gpt.control.livedata.selector.ISetter; import com.esri.gpt.framework.geometry.Envelope; import com.esri.gpt.framework.http.ResponseInfo; import com.esri.gpt.framework.util.Val; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; /** * ArcIMS renderer factory. */ /*package*/ class ArcIMSRendererFactory extends MapBasedRendererFactory { /** predicate */ private static final String PREDICATE = "servlet/com.esri.esrimap.Esrimap?ServiceName="; /** context path */ private String contextPath = ""; /** proxy URL */ private String proxyUrl = ""; /** * Creates instance of the factory. * @param properties properties * @param contextPath context path * @param proxyUrl proxy url */ public ArcIMSRendererFactory(ILiveDataProperties properties, String contextPath, String proxyUrl) { super(properties); this.contextPath = contextPath != null ? contextPath.trim() : ""; this.proxyUrl = proxyUrl != null ? proxyUrl.trim() : ""; } @Override public void register(IRegistry reg, final ISetter setter, final String url) { int qmark = url.indexOf(PREDICATE); if (qmark < 0) return; String service = url.substring(qmark + PREDICATE.length() + 1); if (service == null || service.length() == 0) return; String strRequest = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + "<ARCXML version=\"1.1\">" + "<REQUEST>" + "<GET_SERVICE_INFO fields=\"false\" envelope=\"true\" dataframe=\"#DEFAULT#\" toc=\"false\"/>" + "</REQUEST>" + "</ARCXML>"; reg.register(new HttpRequestDefinition(url, strRequest), new IHttpResponseListener() { public void onResponse(ResponseInfo info, String strContent, Document docContent) { if (docContent != null) { try { XPathFactory xPathFactory = XPathFactory.newInstance(); XPath xPath = xPathFactory.newXPath(); if (xPath.evaluate("/ARCXML/RESPONSE/ERROR", docContent, XPathConstants.NODE) == null) { Envelope env = null; Node ndEnvelope = (Node) xPath.evaluate("/ARCXML/RESPONSE/SERVICEINFO/PROPERTIES/ENVELOPE", docContent, XPathConstants.NODE); if (ndEnvelope != null) { String minx = Val.chkStr((String) xPath.evaluate("@minx", ndEnvelope, XPathConstants.STRING)); String maxx = Val.chkStr((String) xPath.evaluate("@maxx", ndEnvelope, XPathConstants.STRING)); String miny = Val.chkStr((String) xPath.evaluate("@miny", ndEnvelope, XPathConstants.STRING)); String maxy = Val.chkStr((String) xPath.evaluate("@maxy", ndEnvelope, XPathConstants.STRING)); String wkid = Val.chkStr((String) xPath.evaluate("/ARCXML/RESPONSE/SERVICEINFO/PROPERTIES/FEATURECOORDSYS/@id", docContent, XPathConstants.STRING), "4326"); env = makeExtent(minx, miny, maxx, maxy, wkid); } final Envelope envelope = env; final String servUrl = url; setter.set(new ArcIMSRenderer() { @Override protected Envelope getExtent() { return envelope; } @Override protected String getUrl() { return servUrl; } @Override protected String getProxyUrl() { return contextPath + proxyUrl; } @Override protected int getMapHeightAdjustment() { return getProperties().getMapHeightAdjustment(); } }); } } catch (Exception ex) { } } } }); } /** * Creates envelope from string reprezentations of coordinates. * @param sMinX minx * @param sMinY miny * @param sMaxX maxx * @param sMaxY maxy * @param wkid wkid * @return envelope or <code>null</code> if envelope can not be created */ private Envelope makeExtent(String sMinX, String sMinY, String sMaxX, String sMaxY, String wkid) { if (sMinX.length() > 0 && sMaxX.length() > 0 && sMinY.length() > 0 && sMaxY.length() > 0) { double minx = Val.chkDbl(sMinX, -180.0); double maxx = Val.chkDbl(sMaxX, 180.0); double miny = Val.chkDbl(sMinY, -90.0); double maxy = Val.chkDbl(sMaxY, 90.0); Envelope envelope = new Envelope(minx, miny, maxx, maxy); envelope.setWkid(wkid); return envelope; } return null; } }
{ "content_hash": "4d8ece5311b1ecbb57aa62069725ab2c", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 172, "avg_line_length": 37.669172932330824, "alnum_prop": 0.6045908183632734, "repo_name": "usgin/usgin-geoportal", "id": "f13c0030b2fb291750e20a5af29e1bb0ec30c471", "size": "5720", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/esri/gpt/control/livedata/ArcIMSRendererFactory.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "198391" }, { "name": "Java", "bytes": "5223177" }, { "name": "JavaScript", "bytes": "2111275" }, { "name": "Shell", "bytes": "22326" }, { "name": "XSLT", "bytes": "3450157" } ], "symlink_target": "" }
using System.Collections; using System.Collections.Generic; using UnityEngine; // This class handles button input from the Vive controllers public class ViveController : MonoBehaviour { // Use this for initialization void Start () { GetComponent<InstantiateObjectOnReticle> ().increaseIndex (); } private SteamVR_TrackedObject trackedObj; private SteamVR_Controller.Device Controller { get { return SteamVR_Controller.Input((int)trackedObj.index); } } void Awake() { trackedObj = GetComponent<SteamVR_TrackedObject> (); } // Update is called once per frame void Update () { // Controller inputs // Touchpad - Spawn objects or teleport depending on the "LaserPointer" subclass on the controller // Location if (Controller.GetAxis () != Vector2.zero) { //Debug.Log (gameObject.name + Controller.GetAxis ()); } if (Controller.GetPress (SteamVR_Controller.ButtonMask.Touchpad)) { LaserPointer pointer = this.gameObject.GetComponent<LaserPointer> (); pointer.holdDown(); } if (Controller.GetPressUp(SteamVR_Controller.ButtonMask.Touchpad)) { LaserPointer pointer = this.gameObject.GetComponent<LaserPointer> (); pointer.release(); } // Hair Trigger - Grabs objects with the grabbable script if (Controller.GetHairTriggerDown ()) { //Debug.Log (gameObject.name + "Trigger Press"); Grabber g = this.gameObject.GetComponent<Grabber> (); if (g != null) { g.grab (); } } if (Controller.GetHairTriggerUp()) { //Debug.Log(gameObject.name + "Trigger Release"); Grabber g = this.gameObject.GetComponent<Grabber> (); if (g != null) { g.ungrab (Controller.velocity*7, Controller.angularVelocity); } } if (Controller.GetHairTrigger ()) { //Debug.Log (gameObject.name + "Trigger get"); } // Grip button - Increase the index for the controller, this changes the object to spawn on the spawnobject controller if (Controller.GetPressDown(SteamVR_Controller.ButtonMask.Grip)) { //Debug.Log(gameObject.name + " Grip Press"); GetComponent<InstantiateObjectOnReticle> ().increaseIndex (); } if (Controller.GetPressUp(SteamVR_Controller.ButtonMask.Grip)) { //Debug.Log(gameObject.name + " Grip Release"); } } }
{ "content_hash": "171696ceaf2935be8eb9b2ce97444d29", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 121, "avg_line_length": 29.90909090909091, "alnum_prop": 0.6856274424663482, "repo_name": "jojona/AGI17_perkunas", "id": "2b60371b6e2fad9995ea0a2beca32543472c11c0", "size": "2305", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Perkunas/Assets/Scripts/ViveController.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "833244" }, { "name": "GLSL", "bytes": "22152" }, { "name": "JavaScript", "bytes": "2792" }, { "name": "ShaderLab", "bytes": "17662" } ], "symlink_target": "" }
#include <linux/version.h> #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/list.h> #include <scsi/scsi.h> #include <scsi/scsi_cmnd.h> #include <target/target_core_base.h> #include <target/target_core_device.h> #include <target/target_core_tmr.h> #include <target/target_core_transport.h> #include <target/target_core_fabric_ops.h> #include <target/target_core_configfs.h> #include "target_core_alua.h" #include "target_core_pr.h" struct se_tmr_req *core_tmr_alloc_req( struct se_cmd *se_cmd, void *fabric_tmr_ptr, u8 function) { struct se_tmr_req *tmr; tmr = kmem_cache_zalloc(se_tmr_req_cache, (in_interrupt()) ? GFP_ATOMIC : GFP_KERNEL); if (!tmr) { pr_err("Unable to allocate struct se_tmr_req\n"); return ERR_PTR(-ENOMEM); } tmr->task_cmd = se_cmd; tmr->fabric_tmr_ptr = fabric_tmr_ptr; tmr->function = function; INIT_LIST_HEAD(&tmr->tmr_list); return tmr; } EXPORT_SYMBOL(core_tmr_alloc_req); void core_tmr_release_req( struct se_tmr_req *tmr) { struct se_device *dev = tmr->tmr_dev; unsigned long flags; if (!dev) { kmem_cache_free(se_tmr_req_cache, tmr); return; } spin_lock_irqsave(&dev->se_tmr_lock, flags); list_del(&tmr->tmr_list); spin_unlock_irqrestore(&dev->se_tmr_lock, flags); kmem_cache_free(se_tmr_req_cache, tmr); } static void core_tmr_handle_tas_abort( struct se_node_acl *tmr_nacl, struct se_cmd *cmd, int tas, int fe_count) { if (!fe_count) { transport_cmd_finish_abort(cmd, 1); return; } /* * TASK ABORTED status (TAS) bit support */ if ((tmr_nacl && (tmr_nacl == cmd->se_sess->se_node_acl)) || tas) transport_send_task_abort(cmd); transport_cmd_finish_abort(cmd, 0); } static void core_tmr_drain_tmr_list( struct se_device *dev, struct se_tmr_req *tmr, struct list_head *preempt_and_abort_list) { LIST_HEAD(drain_tmr_list); struct se_tmr_req *tmr_p, *tmr_pp; struct se_cmd *cmd; unsigned long flags; /* * Release all pending and outgoing TMRs aside from the received * LUN_RESET tmr.. */ spin_lock_irqsave(&dev->se_tmr_lock, flags); list_for_each_entry_safe(tmr_p, tmr_pp, &dev->dev_tmr_list, tmr_list) { /* * Allow the received TMR to return with FUNCTION_COMPLETE. */ if (tmr && (tmr_p == tmr)) continue; cmd = tmr_p->task_cmd; if (!cmd) { pr_err("Unable to locate struct se_cmd for TMR\n"); continue; } /* * If this function was called with a valid pr_res_key * parameter (eg: for PROUT PREEMPT_AND_ABORT service action * skip non regisration key matching TMRs. */ if (preempt_and_abort_list && (core_scsi3_check_cdb_abort_and_preempt( preempt_and_abort_list, cmd) != 0)) continue; spin_lock(&cmd->t_state_lock); if (!atomic_read(&cmd->t_transport_active)) { spin_unlock(&cmd->t_state_lock); continue; } if (cmd->t_state == TRANSPORT_ISTATE_PROCESSING) { spin_unlock(&cmd->t_state_lock); continue; } spin_unlock(&cmd->t_state_lock); list_move_tail(&tmr_p->tmr_list, &drain_tmr_list); } spin_unlock_irqrestore(&dev->se_tmr_lock, flags); while (!list_empty(&drain_tmr_list)) { tmr = list_entry(drain_tmr_list.next, struct se_tmr_req, tmr_list); list_del(&tmr->tmr_list); cmd = tmr->task_cmd; pr_debug("LUN_RESET: %s releasing TMR %p Function: 0x%02x," " Response: 0x%02x, t_state: %d\n", (preempt_and_abort_list) ? "Preempt" : "", tmr, tmr->function, tmr->response, cmd->t_state); transport_cmd_finish_abort_tmr(cmd); } } static void core_tmr_drain_task_list( struct se_device *dev, struct se_cmd *prout_cmd, struct se_node_acl *tmr_nacl, int tas, struct list_head *preempt_and_abort_list) { LIST_HEAD(drain_task_list); struct se_cmd *cmd; struct se_task *task, *task_tmp; unsigned long flags; int fe_count; /* * Complete outstanding struct se_task CDBs with TASK_ABORTED SAM status. * This is following sam4r17, section 5.6 Aborting commands, Table 38 * for TMR LUN_RESET: * * a) "Yes" indicates that each command that is aborted on an I_T nexus * other than the one that caused the SCSI device condition is * completed with TASK ABORTED status, if the TAS bit is set to one in * the Control mode page (see SPC-4). "No" indicates that no status is * returned for aborted commands. * * d) If the logical unit reset is caused by a particular I_T nexus * (e.g., by a LOGICAL UNIT RESET task management function), then "yes" * (TASK_ABORTED status) applies. * * Otherwise (e.g., if triggered by a hard reset), "no" * (no TASK_ABORTED SAM status) applies. * * Note that this seems to be independent of TAS (Task Aborted Status) * in the Control Mode Page. */ spin_lock_irqsave(&dev->execute_task_lock, flags); list_for_each_entry_safe(task, task_tmp, &dev->state_task_list, t_state_list) { if (!task->task_se_cmd) { pr_err("task->task_se_cmd is NULL!\n"); continue; } cmd = task->task_se_cmd; /* * For PREEMPT_AND_ABORT usage, only process commands * with a matching reservation key. */ if (preempt_and_abort_list && (core_scsi3_check_cdb_abort_and_preempt( preempt_and_abort_list, cmd) != 0)) continue; /* * Not aborting PROUT PREEMPT_AND_ABORT CDB.. */ if (prout_cmd == cmd) continue; list_move_tail(&task->t_state_list, &drain_task_list); atomic_set(&task->task_state_active, 0); /* * Remove from task execute list before processing drain_task_list */ if (atomic_read(&task->task_execute_queue) != 0) { list_del(&task->t_execute_list); atomic_set(&task->task_execute_queue, 0); atomic_dec(&dev->execute_tasks); } } spin_unlock_irqrestore(&dev->execute_task_lock, flags); while (!list_empty(&drain_task_list)) { task = list_entry(drain_task_list.next, struct se_task, t_state_list); list_del(&task->t_state_list); cmd = task->task_se_cmd; spin_lock_irqsave(&cmd->t_state_lock, flags); pr_debug("LUN_RESET: %s cmd: %p task: %p" " ITT/CmdSN: 0x%08x/0x%08x, i_state: %d, t_state/" "def_t_state: %d/%d cdb: 0x%02x\n", (preempt_and_abort_list) ? "Preempt" : "", cmd, task, cmd->se_tfo->get_task_tag(cmd), 0, cmd->se_tfo->get_cmd_state(cmd), cmd->t_state, cmd->deferred_t_state, cmd->t_task_cdb[0]); pr_debug("LUN_RESET: ITT[0x%08x] - pr_res_key: 0x%016Lx" " t_task_cdbs: %d t_task_cdbs_left: %d" " t_task_cdbs_sent: %d -- t_transport_active: %d" " t_transport_stop: %d t_transport_sent: %d\n", cmd->se_tfo->get_task_tag(cmd), cmd->pr_res_key, cmd->t_task_list_num, atomic_read(&cmd->t_task_cdbs_left), atomic_read(&cmd->t_task_cdbs_sent), atomic_read(&cmd->t_transport_active), atomic_read(&cmd->t_transport_stop), atomic_read(&cmd->t_transport_sent)); if (atomic_read(&task->task_active)) { atomic_set(&task->task_stop, 1); spin_unlock_irqrestore( &cmd->t_state_lock, flags); pr_debug("LUN_RESET: Waiting for task: %p to shutdown" " for dev: %p\n", task, dev); wait_for_completion(&task->task_stop_comp); pr_debug("LUN_RESET Completed task: %p shutdown for" " dev: %p\n", task, dev); spin_lock_irqsave(&cmd->t_state_lock, flags); atomic_dec(&cmd->t_task_cdbs_left); atomic_set(&task->task_active, 0); atomic_set(&task->task_stop, 0); } __transport_stop_task_timer(task, &flags); if (!atomic_dec_and_test(&cmd->t_task_cdbs_ex_left)) { spin_unlock_irqrestore(&cmd->t_state_lock, flags); pr_debug("LUN_RESET: Skipping task: %p, dev: %p for" " t_task_cdbs_ex_left: %d\n", task, dev, atomic_read(&cmd->t_task_cdbs_ex_left)); continue; } fe_count = atomic_read(&cmd->t_fe_count); if (atomic_read(&cmd->t_transport_active)) { pr_debug("LUN_RESET: got t_transport_active = 1 for" " task: %p, t_fe_count: %d dev: %p\n", task, fe_count, dev); atomic_set(&cmd->t_transport_aborted, 1); spin_unlock_irqrestore(&cmd->t_state_lock, flags); core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); continue; } pr_debug("LUN_RESET: Got t_transport_active = 0 for task: %p," " t_fe_count: %d dev: %p\n", task, fe_count, dev); atomic_set(&cmd->t_transport_aborted, 1); spin_unlock_irqrestore(&cmd->t_state_lock, flags); core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, fe_count); } } static void core_tmr_drain_cmd_list( struct se_device *dev, struct se_cmd *prout_cmd, struct se_node_acl *tmr_nacl, int tas, struct list_head *preempt_and_abort_list) { LIST_HEAD(drain_cmd_list); struct se_queue_obj *qobj = &dev->dev_queue_obj; struct se_cmd *cmd, *tcmd; unsigned long flags; /* * Release all commands remaining in the struct se_device cmd queue. * * This follows the same logic as above for the struct se_device * struct se_task state list, where commands are returned with * TASK_ABORTED status, if there is an outstanding $FABRIC_MOD * reference, otherwise the struct se_cmd is released. */ spin_lock_irqsave(&qobj->cmd_queue_lock, flags); list_for_each_entry_safe(cmd, tcmd, &qobj->qobj_list, se_queue_node) { /* * For PREEMPT_AND_ABORT usage, only process commands * with a matching reservation key. */ if (preempt_and_abort_list && (core_scsi3_check_cdb_abort_and_preempt( preempt_and_abort_list, cmd) != 0)) continue; /* * Not aborting PROUT PREEMPT_AND_ABORT CDB.. */ if (prout_cmd == cmd) continue; /* * Skip direct processing of TRANSPORT_FREE_CMD_INTR for * HW target mode fabrics. */ spin_lock(&cmd->t_state_lock); if (cmd->t_state == TRANSPORT_FREE_CMD_INTR) { spin_unlock(&cmd->t_state_lock); continue; } spin_unlock(&cmd->t_state_lock); atomic_set(&cmd->t_transport_queue_active, 0); atomic_dec(&qobj->queue_cnt); list_move_tail(&cmd->se_queue_node, &drain_cmd_list); } spin_unlock_irqrestore(&qobj->cmd_queue_lock, flags); while (!list_empty(&drain_cmd_list)) { cmd = list_entry(drain_cmd_list.next, struct se_cmd, se_queue_node); list_del_init(&cmd->se_queue_node); pr_debug("LUN_RESET: %s from Device Queue: cmd: %p t_state:" " %d t_fe_count: %d\n", (preempt_and_abort_list) ? "Preempt" : "", cmd, cmd->t_state, atomic_read(&cmd->t_fe_count)); /* * Signal that the command has failed via cmd->se_cmd_flags, */ transport_new_cmd_failure(cmd); core_tmr_handle_tas_abort(tmr_nacl, cmd, tas, atomic_read(&cmd->t_fe_count)); } } int core_tmr_lun_reset( struct se_device *dev, struct se_tmr_req *tmr, struct list_head *preempt_and_abort_list, struct se_cmd *prout_cmd) { struct se_node_acl *tmr_nacl = NULL; struct se_portal_group *tmr_tpg = NULL; int tas; /* * TASK_ABORTED status bit, this is configurable via ConfigFS * struct se_device attributes. spc4r17 section 7.4.6 Control mode page * * A task aborted status (TAS) bit set to zero specifies that aborted * tasks shall be terminated by the device server without any response * to the application client. A TAS bit set to one specifies that tasks * aborted by the actions of an I_T nexus other than the I_T nexus on * which the command was received shall be completed with TASK ABORTED * status (see SAM-4). */ tas = dev->se_sub_dev->se_dev_attrib.emulate_tas; /* * Determine if this se_tmr is coming from a $FABRIC_MOD * or struct se_device passthrough.. */ if (tmr && tmr->task_cmd && tmr->task_cmd->se_sess) { tmr_nacl = tmr->task_cmd->se_sess->se_node_acl; tmr_tpg = tmr->task_cmd->se_sess->se_tpg; if (tmr_nacl && tmr_tpg) { pr_debug("LUN_RESET: TMR caller fabric: %s" " initiator port %s\n", tmr_tpg->se_tpg_tfo->get_fabric_name(), tmr_nacl->initiatorname); } } pr_debug("LUN_RESET: %s starting for [%s], tas: %d\n", (preempt_and_abort_list) ? "Preempt" : "TMR", dev->transport->name, tas); core_tmr_drain_tmr_list(dev, tmr, preempt_and_abort_list); core_tmr_drain_task_list(dev, prout_cmd, tmr_nacl, tas, preempt_and_abort_list); core_tmr_drain_cmd_list(dev, prout_cmd, tmr_nacl, tas, preempt_and_abort_list); /* * Clear any legacy SPC-2 reservation when called during * LOGICAL UNIT RESET */ if (!preempt_and_abort_list && (dev->dev_flags & DF_SPC2_RESERVATIONS)) { spin_lock(&dev->dev_reservation_lock); dev->dev_reserved_node_acl = NULL; dev->dev_flags &= ~DF_SPC2_RESERVATIONS; spin_unlock(&dev->dev_reservation_lock); pr_debug("LUN_RESET: SCSI-2 Released reservation\n"); } spin_lock_irq(&dev->stats_lock); dev->num_resets++; spin_unlock_irq(&dev->stats_lock); pr_debug("LUN_RESET: %s for [%s] Complete\n", (preempt_and_abort_list) ? "Preempt" : "TMR", dev->transport->name); return 0; }
{ "content_hash": "17113b439402ccec7d34430451274347", "timestamp": "", "source": "github", "line_count": 420, "max_line_length": 74, "avg_line_length": 29.985714285714284, "alnum_prop": 0.6568207082737811, "repo_name": "sahdman/rpi_android_kernel", "id": "5c1b8c599f6df522c64d385dc83248123426c186", "size": "13707", "binary": false, "copies": "347", "ref": "refs/heads/master", "path": "linux-3.1.9/drivers/target/target_core_tmr.c", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }