Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    TypeError
Message:      Couldn't cast array of type
struct<content_hash: string, timestamp: string, source: string, line_count: int64, max_line_length: int64, avg_line_length: double, alnum_prop: double, repo_name: string, id: string, size: string, binary: bool, copies: string, ref: string, path: string, mode: string, license: string, language: list<item: struct<name: string, bytes: string>>, symlink_target: string>
to
{'content_hash': Value(dtype='string', id=None), 'timestamp': Value(dtype='string', id=None), 'source': Value(dtype='string', id=None), 'line_count': Value(dtype='int64', id=None), 'max_line_length': Value(dtype='int64', id=None), 'avg_line_length': Value(dtype='float64', id=None), 'alnum_prop': Value(dtype='float64', id=None), 'repo_name': Value(dtype='string', id=None), 'id': Value(dtype='string', id=None), 'size': Value(dtype='string', id=None), 'binary': Value(dtype='bool', id=None), 'copies': Value(dtype='string', id=None), 'ref': Value(dtype='string', id=None), 'path': Value(dtype='string', id=None), 'mode': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'language': [{'name': Value(dtype='string', id=None), 'bytes': Value(dtype='string', id=None)}]}
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2261, in cast_table_to_schema
                  arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2261, in <listcomp>
                  arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1802, in wrapper
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1802, in <listcomp>
                  return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2122, in cast_array_to_feature
                  raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
              TypeError: Couldn't cast array of type
              struct<content_hash: string, timestamp: string, source: string, line_count: int64, max_line_length: int64, avg_line_length: double, alnum_prop: double, repo_name: string, id: string, size: string, binary: bool, copies: string, ref: string, path: string, mode: string, license: string, language: list<item: struct<name: string, bytes: string>>, symlink_target: string>
              to
              {'content_hash': Value(dtype='string', id=None), 'timestamp': Value(dtype='string', id=None), 'source': Value(dtype='string', id=None), 'line_count': Value(dtype='int64', id=None), 'max_line_length': Value(dtype='int64', id=None), 'avg_line_length': Value(dtype='float64', id=None), 'alnum_prop': Value(dtype='float64', id=None), 'repo_name': Value(dtype='string', id=None), 'id': Value(dtype='string', id=None), 'size': Value(dtype='string', id=None), 'binary': Value(dtype='bool', id=None), 'copies': Value(dtype='string', id=None), 'ref': Value(dtype='string', id=None), 'path': Value(dtype='string', id=None), 'mode': Value(dtype='string', id=None), 'license': Value(dtype='string', id=None), 'language': [{'name': Value(dtype='string', id=None), 'bytes': Value(dtype='string', id=None)}]}
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

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

text
string
meta
dict
module Clearance module App module Controllers module ApplicationController def self.included(base) base.class_eval do helper_method :current_user helper_method :logged_in? include InstanceMethods protected include ProtectedInstanceMethods end end module InstanceMethods def current_user @current_user ||= (user_from_session || user_from_cookie) end def logged_in? ! current_user.nil? end end module ProtectedInstanceMethods def login_required logged_in? || deny_access('Permission denied', :redirect => new_session_path) end def authenticate deny_access unless logged_in? end def user_from_session user_model.find_by_id session[:user_id] end def user_from_cookie user = user_model.find_by_remember_token(cookies[:auth_token]) if cookies[:auth_token] user && user.remember_token? ? user : nil end # Level of indirection so you can easily override this method # but also call #login . def log_user_in(user) login(user) end def login(user) session[:user_id] = user.id if user @current_user = user end def redirect_back_or(default) session[:return_to] ? redirect_to(session[:return_to]) : redirect_to(default) session[:return_to] = nil end def redirect_to_root redirect_to root_url end def store_location session[:return_to] = request.request_uri end def deny_access(flash_message = nil, opts = {}) opts[:redirect] ||= new_session_path store_location flash[:error] = flash_message if flash_message redirect_to opts[:redirect] end def user_model User end def mailer_model ClearanceMailer end end end end end end
{ "content_hash": "734b5cd320aa7952ada079c362dbef7d", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 98, "avg_line_length": 25.65909090909091, "alnum_prop": 0.5186005314437555, "repo_name": "hashrocket/clearance", "id": "35ac7d0813d2b8c4656155292f49c5f83a349138", "size": "2258", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lib/clearance/app/controllers/application_controller.rb", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "22826" }, { "name": "Ruby", "bytes": "85371" } ] }
@interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. return YES; } - (void)applicationWillResignActive:(UIApplication *)application { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - (void)applicationDidEnterBackground:(UIApplication *)application { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - (void)applicationWillEnterForeground:(UIApplication *)application { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - (void)applicationWillTerminate:(UIApplication *)application { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } @end
{ "content_hash": "e9a813f2b3bcfa35014f254d588e61eb", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 281, "avg_line_length": 53.48571428571429, "alnum_prop": 0.7863247863247863, "repo_name": "spagosx/ColorFromPointImageView", "id": "71c8cdfe868917d658df6b85fcccf687d1bcf073", "size": "3023", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "SOXColorFromPointView/AppDelegate.m", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "13481" } ] }
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name Helipterum haigii F.Muell. ### Remarks null
{ "content_hash": "0cc687f19560f1666acd9198aa831cba", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 31, "avg_line_length": 11.384615384615385, "alnum_prop": 0.722972972972973, "repo_name": "mdoering/backbone", "id": "e09b762f05be6562901ca3898f964121cfc4ebbc", "size": "213", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Rhodanthe haigii/README.md", "mode": "33188", "license": "apache-2.0", "language": [] }
## Closure-ök és referenciák A JavaScript nyelv egyik legerőteljesebb tulajdonsága a *closure*-ök használatában rejlik. Ezek használatával a hatókörök egymásba ágyazhatóak, és egy belső hatókör mindig hozzáfér az őt körülvevő, külső hatókör változóihoz. Miután JavaScriptben egyetlen dologgal lehet hatóköröket kifejezni, és ez a [funkció](#function.scopes) (bizony az if, try/catch és hasonló blokkok **nem** jelentenek új hatókört, mint pl. a Javaban), az összes funkció closure-ként szerepel. ### Privát változók emulálása function Counter(start) { var count = start; return { increment: function() { count++; }, get: function() { return count; } } } var foo = Counter(4); foo.increment(); foo.get(); // 5 Ebben a példában a `Counter` **két** closure-rel tér vissza: az `increment` és a `get` funkcióval. Mind a két funkció **referenciát** tárol a `Counter` hatókörre, és így mindketten hozzáférnek a `count` változóhoz, ami ebben a hatókörben lett definiálva. ### Miért működnek a privát változók? Mivel a JavaScriptben egyszerűen **nem** lehet hatókörre referálni, vagy hatókört értékül adni, így ezért szintén lehetetlen elérni az iménti `count` változót a külvilág számára. Egyetlen mód van a megszólítására, ezt pedig láttuk a fentebbi két closure-ön belül. var foo = new Counter(4); foo.hack = function() { count = 1337; }; A fentebbi kód **nem** fogja megváltoztatni a `Counter` hatókör `count` változóját, mivel a `foo.hack` mező **nem abban** a hatókörben lett létrehozva. Ehelyett, okosan, létre fogja hozni, vagy felül fogja írni a *globális* `count` változót (window.count). ### Closure-ök használata ciklusokban Az egyik leggyakoribb hiba amit el lehet követni, az a closure-ök ciklusokban való használata. Annak is azon speciális esete amikor a ciklus indexváltozóját szeretnénk lemásolni a closure-ön belül. for(var i = 0; i < 10; i++) { setTimeout(function() { console.log(i); }, 1000); } A fenti kódrészlet marhára **nem** a számokat fogja kiírni `0`-tól `9`-ig, de inkább a `10`-et fogja tízszer kiírni. Ugyanis a belső *névtelen* függvény egy **referenciát** fog tárolni a külső `i` változóra, és akkor, amikor végül a `console.log` sor lefut, a `for loop` már végzett az egész ciklussal, így az `i` értéke `10`-re lesz beállítva. Ahhoz, hogy a várt működést kapjuk (tehát a számokat 0-tól 9-ig), szükségszerű az `i` változó értékét **lemásolni**. ### A referencia probléma elkerülése Az előző problémára megoldást úgy lehet jól adni, hogy az utasításoknak megfelelően lemásoljuk a ciklusváltozót, úgy hogy a jelenlegi ciklusmagöt körbevesszük egy [névtelen függvénnyel](#function.scopes). for(var i = 0; i < 10; i++) { (function(e) { setTimeout(function() { console.log(e); }, 1000); })(i); } A külső (wrapper) névtelen függvény így azonnal meghívódik az `i` ciklusváltozóval, mint paraméterrel, és így mindig egy másolatot fog kapni az `i` változó **értékéről**, amit ő `e` néven emészt tovább. Így a `setTimeout`ban lévő névtelen fgv. mindig az `e` nevű referenciára fog mutatni, aminek az értéke így már **nem** változik meg a ciklus futása során. Egy másik lehetséges út a megoldáshoz az, hogy egy wrapper függvényt visszatérítünk a setTimeoutból, aminek ugyanaz lesz a hatása, mint a fentebbi példának. for(var i = 0; i < 10; i++) { setTimeout((function(e) { return function() { console.log(e); } })(i), 1000) }
{ "content_hash": "c5a8efb33adf933df3c3072f8bc0b321", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 196, "avg_line_length": 37.2020202020202, "alnum_prop": 0.6834102633722509, "repo_name": "manekinekko/JavaScript-Garden", "id": "436f58e28a676f97cd3d6566c74f83158726395c", "size": "3942", "binary": false, "copies": "18", "ref": "refs/heads/master", "path": "doc/hu/function/closures.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "11673" }, { "name": "HTML", "bytes": "2860" }, { "name": "JavaScript", "bytes": "9093" }, { "name": "Shell", "bytes": "668" } ] }
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/video/livestream/v1/resources.proto package com.google.cloud.video.livestream.v1; public interface VideoStreamPropertyOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.video.livestream.v1.VideoStreamProperty) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * Index of this video stream. * </pre> * * <code>int32 index = 1;</code> * * @return The index. */ int getIndex(); /** * * * <pre> * Properties of the video format. * </pre> * * <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code> * * @return Whether the videoFormat field is set. */ boolean hasVideoFormat(); /** * * * <pre> * Properties of the video format. * </pre> * * <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code> * * @return The videoFormat. */ com.google.cloud.video.livestream.v1.VideoFormat getVideoFormat(); /** * * * <pre> * Properties of the video format. * </pre> * * <code>.google.cloud.video.livestream.v1.VideoFormat video_format = 2;</code> */ com.google.cloud.video.livestream.v1.VideoFormatOrBuilder getVideoFormatOrBuilder(); }
{ "content_hash": "b6aaec4c1d9f65a04f9add58bbd2c572", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 103, "avg_line_length": 22.45762711864407, "alnum_prop": 0.6415094339622641, "repo_name": "googleapis/java-video-live-stream", "id": "2c3791cfbcfdca3304af7096f41f05e46c84e361", "size": "1919", "binary": false, "copies": "2", "ref": "refs/heads/main", "path": "proto-google-cloud-live-stream-v1/src/main/java/com/google/cloud/video/livestream/v1/VideoStreamPropertyOrBuilder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "801" }, { "name": "Java", "bytes": "2816391" }, { "name": "Python", "bytes": "787" }, { "name": "Shell", "bytes": "20462" } ] }
package org.pwd.domain.processing; import org.pwd.domain.audit.Audit; import org.pwd.domain.audit.WebsiteAudit; import org.pwd.domain.audit.WebsiteAuditReport; import org.pwd.domain.audit.WebsiteAuditRepository; import org.pwd.domain.websites.Website; import org.pwd.interfaces.analysis.AnalysisRestClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; /** * Does audit for one website * * @author bartosz.walacik */ @Service class WebsiteAuditor { private final AnalysisRestClient analysisRestClient; private final WebsiteAuditRepository websiteAuditRepository; @Autowired WebsiteAuditor(AnalysisRestClient analysisRestClient, WebsiteAuditRepository websiteAuditRepository) { this.analysisRestClient = analysisRestClient; this.websiteAuditRepository = websiteAuditRepository; } WebsiteAudit auditWebsite(Audit audit, Website website) { Optional<WebsiteAuditReport> auditReport = analysisRestClient.getAnalysis(website.getUrl()); Double prevScore = websiteAuditRepository.getPreviousScore(website.getId()); if (prevScore == null) { prevScore = new Double("0"); } final Double prev = prevScore; WebsiteAudit websiteAudit = auditReport .map(websiteAuditReport -> audit.createWebsiteAudit(website, websiteAuditReport, prev)) .orElseThrow(AnalysisNotCompleteException::new); return websiteAuditRepository.save(websiteAudit); } }
{ "content_hash": "193c4c6b94d72ca79c2e78179999b03f", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 106, "avg_line_length": 33.48936170212766, "alnum_prop": 0.7522236340533672, "repo_name": "pwd-project/pwd", "id": "aae0cdd68c665c9ea6514fa267d9244319da55f9", "size": "1574", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pwd-service/src/main/java/org/pwd/domain/processing/WebsiteAuditor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "23707" }, { "name": "Groovy", "bytes": "20353" }, { "name": "HTML", "bytes": "103005" }, { "name": "Java", "bytes": "90651" }, { "name": "JavaScript", "bytes": "23467" } ] }
<?php use yii\db\Schema; use yii\db\Migration; class m150929_124559_alter_table_poll_locked_column extends Migration { public function up() { $this->alterColumn('poll', 'locked', Schema::TYPE_INTEGER .' not null'); } public function down() { $this->alterColumn('poll', 'locked', Schema::TYPE_INTEGER); } }
{ "content_hash": "a269405d47b3ddb25ef850c92f548333", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 80, "avg_line_length": 19.444444444444443, "alnum_prop": 0.6257142857142857, "repo_name": "EuresTools/eVote-web", "id": "fdd1c47a66afc0df3142c0ca7b79bf43f2d99f63", "size": "350", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "migrations/m150929_124559_alter_table_poll_locked_column.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "1862" }, { "name": "Batchfile", "bytes": "1030" }, { "name": "CSS", "bytes": "4715" }, { "name": "JavaScript", "bytes": "4202" }, { "name": "PHP", "bytes": "420147" } ] }
package org.terracotta.firefoxwsanddownload; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.handler.annotation.SendTo; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class GreetingController { @RequestMapping("/greeting") public String greeting(@RequestParam(value="name", required=false, defaultValue="World") String name, Model model) { model.addAttribute("name", name); return "greeting"; } @MessageMapping("/hello") @SendTo("/topic/greetings") public Greeting greeting(HelloMessage message) throws Exception { Thread.sleep(1000); // simulated delay return new Greeting("Hello, " + message.getName() + "!"); } public static class Greeting { private String content; public Greeting() { } public Greeting(String content) { this.content = content; } public String getContent() { return content; } } public static class HelloMessage { private String name; public HelloMessage() { } public HelloMessage(String name) { this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } } }
{ "content_hash": "cd72dbda7577433598999b4afe112c44", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 120, "avg_line_length": 24.77777777777778, "alnum_prop": 0.643818065342729, "repo_name": "anthonydahanne/firefox-ws-and-download", "id": "fb1971d3d54b4b47e23258ff41adcfb6ff5a914a", "size": "1561", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/org/terracotta/firefoxwsanddownload/GreetingController.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "4994" }, { "name": "CSS", "bytes": "272" }, { "name": "HTML", "bytes": "3101" }, { "name": "Java", "bytes": "5003" }, { "name": "JavaScript", "bytes": "1320" }, { "name": "Shell", "bytes": "6468" } ] }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>User agent detail - Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="../circle.css" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /><small>vendor/piwik/device-detector/Tests/fixtures/smartphone.yml</small></td><td>QQ Browser 6.0</td><td>WebKit </td><td>Android 4.4.2</td><td style="border-left: 1px solid #555">Gionee</td><td>V188S</td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-a952e161-ace3-4c73-a03c-12746b7cf6d1">Detail</a> <!-- Modal Structure --> <div id="modal-a952e161-ace3-4c73-a03c-12746b7cf6d1" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [user_agent] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 [os] => Array ( [name] => Android [short_name] => AND [version] => 4.4.2 [platform] => ) [client] => Array ( [type] => browser [name] => QQ Browser [short_name] => QQ [version] => 6.0 [engine] => WebKit ) [device] => Array ( [type] => smartphone [brand] => GI [model] => V188S ) [os_family] => Android [browser_family] => Unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Android 4.0</td><td>WebKit </td><td>Android 4.4</td><td style="border-left: 1px solid #555"></td><td></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.013</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a> <!-- Modal Structure --> <div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapFull result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.4.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?4.4* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => 4.4 [platform_description] => Android OS [platform_bits] => 32 [platform_maker] => Google Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => 1 [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [isfake] => [isanonymized] => [ismodified] => [cssversion] => 3 [aolversion] => 0 [device_name] => general Mobile Phone [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => general Mobile Phone [device_brand_name] => unknown [renderingengine_name] => WebKit [renderingengine_version] => unknown [renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3. [renderingengine_maker] => Apple Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.005</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-42bb56ba-b834-47c5-bea0-c0270e9ab371">Detail</a> <!-- Modal Structure --> <div id="modal-42bb56ba-b834-47c5-bea0-c0270e9ab371" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapLite result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => unknown [browser_modus] => unknown [version] => 4.0 [majorver] => 0 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => false [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => unknown [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.007</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a> <!-- Modal Structure --> <div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.4.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?4.4* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>Android Browser 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a> <!-- Modal Structure --> <div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Android [browser] => Android Browser [version] => 4.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td>AndroidOS 4.4.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a> <!-- Modal Structure --> <div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>JenssegersAgent result detail</h4> <p><pre><code class="php">Array ( [browserName] => Safari [browserVersion] => 4.0 [osName] => AndroidOS [osVersion] => 4.4.2 [deviceModel] => WebKit [isMobile] => 1 [isRobot] => [botName] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555">Gionee</td><td>V188</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.29302</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a> <!-- Modal Structure --> <div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [mobile_screen_height] => 320 [is_mobile] => 1 [type] => mobile-browser [mobile_brand] => Gionee [mobile_model] => V188 [version] => 4.0 [is_android] => 1 [browser_name] => Android Webkit [operating_system_family] => Android [operating_system_version] => 4.4.2 [is_ios] => [producer] => Google Inc. [operating_system] => Android 4.0.x Ice Cream Sandwich [mobile_screen_width] => 240 [mobile_browser] => Android Webkit ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>QQ Browser 6.0</td><td>WebKit </td><td>Android 4.4</td><td style="border-left: 1px solid #555">Gionee</td><td>V188S</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.004</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a> <!-- Modal Structure --> <div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => QQ Browser [short_name] => QQ [version] => 6.0 [engine] => WebKit ) [operatingSystem] => Array ( [name] => Android [short_name] => AND [version] => 4.4 [platform] => ) [device] => Array ( [brand] => GI [brandName] => Gionee [model] => V188S [device] => 1 [deviceName] => smartphone ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => 1 [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Navigator 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a> <!-- Modal Structure --> <div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 ) [name:Sinergi\BrowserDetector\Browser:private] => Navigator [version:Sinergi\BrowserDetector\Browser:private] => 4.0 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => [isFacebookWebView:Sinergi\BrowserDetector\Browser:private] => [isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Android [version:Sinergi\BrowserDetector\Os:private] => 4.4.2 [isMobile:Sinergi\BrowserDetector\Os:private] => 1 [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>QQ Browser Mobile 6.0</td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555"></td><td>V188S</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a> <!-- Modal Structure --> <div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 6 [minor] => 0 [patch] => [family] => QQ Browser Mobile ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 4 [minor] => 4 [patch] => 2 [patchMinor] => [family] => Android ) [device] => UAParser\Result\Device Object ( [brand] => Generic_Android [model] => V188S [family] => V188S ) [originalUserAgent] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td>Safari 537.36</td><td>WebKit 537.36</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15101</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a> <!-- Modal Structure --> <div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [platform_name] => Android [platform_version] => 4.4.2 [platform_type] => Mobile [browser_name] => Safari [browser_version] => 537.36 [engine_name] => WebKit [engine_version] => 537.36 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.07501</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a> <!-- Modal Structure --> <div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentStringCom result detail</h4> <p><pre><code class="php">stdClass Object ( [agent_type] => Browser [agent_name] => Android Webkit Browser [agent_version] => -- [os_type] => Android [os_name] => Android [os_versionName] => [os_versionNumber] => 4.4.2 [os_producer] => [os_producerURL] => [linux_distibution] => Null [agent_language] => Chinese - China [agent_languageTag] => zh-cn ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>QQ Browser 6.0</td><td>WebKit 537.36</td><td>Android 4.4.2</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.23401</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a> <!-- Modal Structure --> <div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [operating_system_name] => Android [simple_sub_description_string] => [simple_browser_string] => QQ Browser 6 on Android (KitKat) [browser_version] => 6 [extra_info] => Array ( ) [operating_platform] => [extra_info_table] => stdClass Object ( [System Build] => KOT49H ) [layout_engine_name] => WebKit [detected_addons] => Array ( ) [operating_system_flavour_code] => [hardware_architecture] => [operating_system_flavour] => [operating_system_frameworks] => Array ( ) [browser_name_code] => qq-browser [operating_system_version] => KitKat [simple_operating_platform_string] => [is_abusive] => [layout_engine_version] => 537.36 [browser_capabilities] => Array ( ) [operating_platform_vendor_name] => [operating_system] => Android (KitKat) [operating_system_version_full] => 4.4.2 [operating_platform_code] => [browser_name] => QQ Browser [operating_system_name_code] => android [user_agent] => Mozilla/5.0 (Linux; U; Android 4.4.2; zh-cn; V188S Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.0 Mobile Safari/537.36 [browser_version_full] => 6.0 [browser] => QQ Browser 6 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>QQ Browser 6.0</td><td>Webkit 537.36</td><td>Android 4.4.2</td><td style="border-left: 1px solid #555">Gionee</td><td>V188</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a> <!-- Modal Structure --> <div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => QQ Browser [version] => 6.0 [type] => browser ) [engine] => Array ( [name] => Webkit [version] => 537.36 ) [os] => Array ( [name] => Android [version] => 4.4.2 ) [device] => Array ( [type] => mobile [subtype] => smart [manufacturer] => Gionee [model] => V188 ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a> <!-- Modal Structure --> <div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Safari [vendor] => Apple [version] => 4.0 [category] => smartphone [os] => Android [os_version] => 4.4.2 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>Android Webkit 4.4.2</td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555">Gionee</td><td>V188S</td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.018</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a> <!-- Modal Structure --> <div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => true [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => false [is_largescreen] => true [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Android [advertised_device_os_version] => 4.4.2 [advertised_browser] => Android Webkit [advertised_browser_version] => 4.4.2 [complete_device_name] => Gionee V188S [device_name] => Gionee V188S [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => Gionee [model_name] => V188S [unique] => true [ununiqueness_handler] => [is_wireless_device] => true [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Android [mobile_browser] => Chrome Mobile [mobile_browser_version] => [device_os_version] => 4.4 [pointing_method] => touchscreen [release_date] => 2014_october [marketing_name] => [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => true [softkey_support] => false [table_support] => true [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => true [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => true [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => true [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => wtai://wp/mc; [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => false [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => false [xhtml_select_as_radiobutton] => false [xhtml_select_as_popup] => false [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => true [xhtml_supports_css_cell_table_coloring] => true [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => true [xhtml_document_title_support] => true [xhtml_preferred_charset] => iso-8859-1 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => tel: [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => true [xhtml_send_sms_string] => sms: [xhtml_send_mms_string] => mms: [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => none [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => true [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 720 [resolution_height] => 1280 [columns] => 60 [max_image_width] => 320 [max_image_height] => 640 [rows] => 40 [physical_screen_width] => 63 [physical_screen_height] => 111 [dual_orientation] => true [density_class] => 1.0 [wbmp] => true [bmp] => false [epoc_bmp] => false [gif_animated] => false [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => true [transparent_png_index] => true [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => true [webp_lossless_support] => true [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 3600 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => true [max_deck_size] => 2000000 [max_url_length_in_requests] => 256 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => true [inline_support] => false [oma_support] => true [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => 10 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => 2 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => 3.0 [streaming_acodec_amr] => nb [streaming_acodec_aac] => lc [streaming_wmv] => none [streaming_preferred_protocol] => http [streaming_preferred_http_protocol] => apple_live_streaming [wap_push_support] => false [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => false [sender] => false [mms_max_size] => 0 [mms_max_height] => 0 [mms_max_width] => 0 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => false [mms_jpeg_progressive] => false [mms_gif_static] => false [mms_gif_animated] => false [mms_png] => false [mms_bmp] => false [mms_wbmp] => false [mms_amr] => false [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => false [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => false [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => false [mms_mp4] => false [mms_3gpp] => false [mms_3gpp2] => false [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => false [css_supports_width_as_percentage] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => none [css_spriting] => true [css_gradient_linear] => none [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => 10 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => 0 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => false [playback_mp4] => true [playback_mov] => false [playback_acodec_amr] => nb [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => true [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [viewport_userscalable] => no [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => false [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => false ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>MQQBrowser 6.0</td><td><i class="material-icons">close</i></td><td>Android 4.4.2</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a> <!-- Modal Structure --> <div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Zsxsoft result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [link] => http://browser.qq.com/ [title] => MQQBrowser 6.0 [code] => qqbrowser [version] => 6.0 [name] => MQQBrowser [image] => img/16/browser/qqbrowser.png ) [os] => Array ( [link] => http://www.android.com/ [name] => Android [version] => 4.4.2 [code] => android [x64] => [title] => Android 4.4.2 [type] => os [dir] => os [image] => img/16/os/android.png ) [device] => Array ( [link] => [title] => [model] => [brand] => [code] => null [dir] => device [type] => device [image] => img/16/device/null.png ) [platform] => Array ( [link] => http://www.android.com/ [name] => Android [version] => 4.4.2 [code] => android [x64] => [title] => Android 4.4.2 [type] => os [dir] => os [image] => img/16/os/android.png ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-05-10 07:57:17</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
{ "content_hash": "2565315e1d0e4aa32551365edd13e685", "timestamp": "", "source": "github", "line_count": 1396, "max_line_length": 877, "avg_line_length": 40.779369627507165, "alnum_prop": 0.5448988195615514, "repo_name": "ThaDafinser/UserAgentParserComparison", "id": "cf5ce66b7ffba4a6c3fd1f0111b313dd6bbfdf8d", "size": "56929", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "v5/user-agent-detail/54/2d/542d93f2-3849-42fa-a1ee-c88234ca9f6a.html", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "2060859160" } ] }
extern int cpld_gpio_request(unsigned gpio); extern void cpld_gpio_free(unsigned gpio); extern int cpld_gpio_direction_input(unsigned gpio); extern int cpld_gpio_direction_output(unsigned gpio, int value); extern int cpld_gpio_get_value(unsigned gpio); extern void cpld_gpio_set_value(unsigned gpio, int value); extern int cpld_gpio_to_irq(unsigned gpio); extern int cpld_gpio_irq_to_gpio(unsigned irq); #endif
{ "content_hash": "a220b675fefe49d62871d0fe118659e3", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 64, "avg_line_length": 37.54545454545455, "alnum_prop": 0.784503631961259, "repo_name": "mikrj/MPS_Exercises", "id": "ebf4829e40158d479d6edd6664aa1b26cc6777ec", "size": "457", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MPS_Exercise_9/Exercise_C/linux/cpld-gpio.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "110465" }, { "name": "C++", "bytes": "9958" }, { "name": "Objective-C", "bytes": "124" }, { "name": "Prolog", "bytes": "541" }, { "name": "Shell", "bytes": "78963" } ] }
package com.gemstone.gemfire.cache.hdfs.internal; import com.gemstone.gemfire.GemFireConfigException; import com.gemstone.gemfire.cache.hdfs.HDFSEventQueueAttributes; import com.gemstone.gemfire.cache.hdfs.HDFSEventQueueAttributesFactory; import com.gemstone.gemfire.cache.hdfs.HDFSStore; import com.gemstone.gemfire.cache.hdfs.HDFSStoreFactory; import com.gemstone.gemfire.cache.hdfs.HDFSStoreMutator; import com.gemstone.gemfire.cache.hdfs.HDFSStoreMutator.HDFSCompactionConfigMutator; import com.gemstone.gemfire.cache.hdfs.HDFSStoreMutator.HDFSEventQueueAttributesMutator; import com.gemstone.gemfire.cache.hdfs.StoreExistsException; import com.gemstone.gemfire.i18n.LogWriterI18n; import com.gemstone.gemfire.internal.cache.persistence.soplog.ComponentLogWriter; import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; import com.gemstone.gemfire.internal.util.LogService; /** * Class to hold all hdfs store related configuration. Instead of copying the * same members in two different classes, factory and store, this class will be * used. The idea is let HdfsStoreImpl and HdfsStoreCreation delegate get calls, * set calls and copy constructor calls this class. Moreover this config holder * can be entirely replaced to support alter config * * @author ashvina */ public class HDFSStoreConfigHolder implements HDFSStore, HDFSStoreFactory { private String name = null; private String namenodeURL = null; private String homeDir = DEFAULT_HOME_DIR; private String clientConfigFile = null; private float blockCacheSize = DEFAULT_BLOCK_CACHE_SIZE; private int maxFileSize = DEFAULT_MAX_WRITE_ONLY_FILE_SIZE; private int fileRolloverInterval = DEFAULT_WRITE_ONLY_FILE_ROLLOVER_INTERVAL; private AbstractHDFSCompactionConfigHolder compactionConfig = null; private HDFSEventQueueAttributes hdfsEventQueueAttrs = new HDFSEventQueueAttributesFactory().create(); protected LogWriterI18n logger; public HDFSStoreConfigHolder() { this(null); } /** * @param config configuration source for creating this instance */ public HDFSStoreConfigHolder(HDFSStore config) { if (config == null) { // initialize default compaction strategy and leave the rest for getting // set later this.compactionConfig = AbstractHDFSCompactionConfigHolder.createInstance(null); return; } this.name = config.getName(); this.namenodeURL = config.getNameNodeURL(); this.homeDir = config.getHomeDir(); this.clientConfigFile = config.getHDFSClientConfigFile(); setHDFSCompactionConfig(config.getHDFSCompactionConfig()); this.blockCacheSize = config.getBlockCacheSize(); setHDFSEventQueueAttributes(config.getHDFSEventQueueAttributes()); this.maxFileSize = config.getMaxFileSize(); this.fileRolloverInterval = config.getFileRolloverInterval(); logger = ComponentLogWriter.getHoplogLogWriter(getName(), LogService.logger()); } public void resetDefaultValues() { name = null; namenodeURL = null; homeDir = null; clientConfigFile = null; blockCacheSize = -1f; maxFileSize = -1; fileRolloverInterval = -1; compactionConfig.resetDefaultValues(); // TODO reset hdfseventqueueattributes; } public void copyFrom(HDFSStoreMutator mutator) { if (mutator.getFileRolloverInterval() >= 0) { logAttrMutation("fileRolloverInterval", mutator.getFileRolloverInterval()); setFileRolloverInterval(mutator.getFileRolloverInterval()); } if (mutator.getMaxFileSize() >= 0) { logAttrMutation("MaxFileSize", mutator.getFileRolloverInterval()); setMaxFileSize(mutator.getMaxFileSize()); } compactionConfig.copyFrom(mutator.getCompactionConfigMutator()); HDFSEventQueueAttributesFactory newFactory = new HDFSEventQueueAttributesFactory(hdfsEventQueueAttrs); HDFSEventQueueAttributesMutator qMutator = mutator.getHDFSEventQueueAttributesMutator(); if (qMutator.getBatchSizeMB() >= 0) { logAttrMutation("batchSizeMB", mutator.getFileRolloverInterval()); newFactory.setBatchSizeMB(qMutator.getBatchSizeMB()); } if (qMutator.getBatchTimeInterval() >= 0) { logAttrMutation("batchTimeInterval", mutator.getFileRolloverInterval()); newFactory.setBatchTimeInterval(qMutator.getBatchTimeInterval()); } hdfsEventQueueAttrs = newFactory.create(); } void logAttrMutation(String name, Object value) { if (logger.fineEnabled()) { logger.fine("Alter " + name + ":" + value); } } @Override public String getName() { return name; } @Override public HDFSStoreFactory setName(String name) { this.name = name; return this; } @Override public String getNameNodeURL() { return namenodeURL; } @Override public HDFSStoreFactory setNameNodeURL(String namenodeURL) { this.namenodeURL = namenodeURL; return this; } @Override public String getHomeDir() { return homeDir; } @Override public HDFSStoreFactory setHomeDir(String homeDir) { this.homeDir = homeDir; return this; } @Override public String getHDFSClientConfigFile() { return clientConfigFile; } @Override public HDFSStoreFactory setHDFSClientConfigFile(String clientConfigFile) { this.clientConfigFile = clientConfigFile; return this; } @Override public HDFSStoreFactory setBlockCacheSize(float percentage) { if(percentage < 0 || percentage > 100) { throw new IllegalArgumentException("Block cache size must be between 0 and 100, inclusive"); } this.blockCacheSize = percentage; return this; } @Override public float getBlockCacheSize() { return blockCacheSize; } /** * Sets the HDFS event queue attributes * This causes the store to use the {@link HDFSEventQueueAttributes}. * @param hdfsEventQueueAttrs the attributes of the HDFS Event queue */ public HDFSStoreFactory setHDFSEventQueueAttributes(HDFSEventQueueAttributes hdfsEventQueueAttrs) { this.hdfsEventQueueAttrs = hdfsEventQueueAttrs; return this; } @Override public HDFSEventQueueAttributes getHDFSEventQueueAttributes() { return hdfsEventQueueAttrs; } @Override public AbstractHDFSCompactionConfigHolder getHDFSCompactionConfig() { return compactionConfig; } @Override public HDFSStoreConfigHolder setHDFSCompactionConfig(HDFSCompactionConfig config) { if (config == null) { return this; } String s = config.getCompactionStrategy(); compactionConfig = AbstractHDFSCompactionConfigHolder.createInstance(s); compactionConfig.copyFrom(config); return this; } @Override public HDFSCompactionConfigFactory createCompactionConfigFactory(String name) { return AbstractHDFSCompactionConfigHolder.createInstance(name); } @Override public HDFSStoreFactory setMaxFileSize(int maxFileSize) { assertIsPositive(CacheXml.HDFS_MAX_FILE_SIZE, maxFileSize); this.maxFileSize = maxFileSize; return this; } @Override public int getMaxFileSize() { return maxFileSize; } @Override public HDFSStoreFactory setFileRolloverInterval(int count) { assertIsPositive(CacheXml.HDFS_TIME_FOR_FILE_ROLLOVER, count); this.fileRolloverInterval = count; return this; } @Override public int getFileRolloverInterval() { return fileRolloverInterval; } /** * Abstract config class for compaction configuration. A concrete class must * extend setters for all configurations it consumes. This class will throw an * exception for any unexpected configuration. Concrete class must also * validate the configuration * * @author ashvina */ public static abstract class AbstractHDFSCompactionConfigHolder implements HDFSCompactionConfig, HDFSCompactionConfigFactory { protected int maxInputFileSizeMB = HDFSCompactionConfig.DEFAULT_MAX_INPUT_FILE_SIZE_MB; protected int maxInputFileCount = HDFSCompactionConfig.DEFAULT_MAX_INPUT_FILE_COUNT; protected int minInputFileCount = HDFSCompactionConfig.DEFAULT_MIN_INPUT_FILE_COUNT; protected boolean isAutoCompact = HDFSCompactionConfig.DEFAULT_AUTO_COMPACTION; protected int maxConcurrency = HDFSCompactionConfig.DEFAULT_MAX_THREADS; protected boolean autoMajorCompact = HDFSCompactionConfig.DEFAULT_AUTO_MAJOR_COMPACTION; protected int majorCompactionConcurrency = HDFSCompactionConfig.DEFAULT_MAJOR_COMPACTION_MAX_THREADS; protected int majorCompactionIntervalMins = HDFSCompactionConfig.DEFAULT_MAJOR_COMPACTION_INTERVAL_MINS; protected int oldFileCleanupIntervalMins = HDFSCompactionConfig.DEFAULT_OLD_FILE_CLEANUP_INTERVAL_MINS; private LogWriterI18n logger; public AbstractHDFSCompactionConfigHolder() { logger = ComponentLogWriter.getHoplogLogWriter("", LogService.logger()); } void copyFrom(HDFSCompactionConfig config) { setMaxInputFileSizeMB(config.getMaxInputFileSizeMB()); setMaxInputFileCount(config.getMaxInputFileCount()); setMinInputFileCount(config.getMinInputFileCount()); setAutoCompaction(config.getAutoCompaction()); setMaxThreads(config.getMaxThreads()); setAutoMajorCompaction(config.getAutoMajorCompaction()); setMajorCompactionMaxThreads(config.getMajorCompactionMaxThreads()); setMajorCompactionIntervalMins(config.getMajorCompactionIntervalMins()); setOldFilesCleanupIntervalMins(config.getOldFilesCleanupIntervalMins()); } void copyFrom(HDFSCompactionConfigMutator mutator) { if (mutator.getMaxInputFileCount() >= 0) { logAttrMutation("maxInputFileCount", mutator.getMaxInputFileCount()); setMaxInputFileCount(mutator.getMaxInputFileCount()); } if (mutator.getMaxInputFileSizeMB() >= 0) { logAttrMutation("MaxInputFileSizeMB", mutator.getMaxInputFileSizeMB()); setMaxInputFileSizeMB(mutator.getMaxInputFileSizeMB()); } if (mutator.getMaxThreads() >= 0) { logAttrMutation("MaxThreads", mutator.getMaxThreads()); setMaxThreads(mutator.getMaxThreads()); } if (mutator.getMinInputFileCount() >= 0) { logAttrMutation("MinInputFileCount", mutator.getMinInputFileCount()); setMinInputFileCount(mutator.getMinInputFileCount()); } if (mutator.getAutoCompaction() != null) { logAttrMutation("AutoCompaction", mutator.getAutoCompaction()); setAutoCompaction(mutator.getAutoCompaction()); } if (mutator.getMajorCompactionIntervalMins() > -1) { logAttrMutation("MajorCompactionIntervalMins", mutator.getMajorCompactionIntervalMins()); setMajorCompactionIntervalMins(mutator.getMajorCompactionIntervalMins()); } if (mutator.getMajorCompactionMaxThreads() >= 0) { logAttrMutation("MajorCompactionMaxThreads", mutator.getMajorCompactionMaxThreads()); setMajorCompactionMaxThreads(mutator.getMajorCompactionMaxThreads()); } if (mutator.getAutoMajorCompaction() != null) { logAttrMutation("AutoMajorCompaction", mutator.getAutoMajorCompaction()); setAutoMajorCompaction(mutator.getAutoMajorCompaction()); } if (mutator.getOldFilesCleanupIntervalMins() >= 0) { logAttrMutation("OldFilesCleanupIntervalMins", mutator.getOldFilesCleanupIntervalMins()); setOldFilesCleanupIntervalMins(mutator.getOldFilesCleanupIntervalMins()); } } void logAttrMutation(String name, Object value) { if (logger.fineEnabled()) { logger.fine("Alter " + name + ":" + value); } } public void resetDefaultValues() { maxInputFileSizeMB = -1; maxInputFileCount = -1; minInputFileCount = -1; isAutoCompact = false; maxConcurrency = -1; autoMajorCompact = false; majorCompactionConcurrency = -1; majorCompactionIntervalMins = -1; oldFileCleanupIntervalMins = -1; } @Override public HDFSCompactionConfigFactory setAutoCompaction(boolean auto) { this.isAutoCompact = auto; return this; } @Override public boolean getAutoCompaction() { return isAutoCompact; } @Override public HDFSCompactionConfigFactory setMaxInputFileSizeMB(int size) { throw new GemFireConfigException("This configuration is not applicable to configured compaction strategy"); } @Override public int getMaxInputFileSizeMB() { return maxInputFileSizeMB; } @Override public HDFSCompactionConfigFactory setMinInputFileCount(int count) { throw new GemFireConfigException("This configuration is not applicable to configured compaction strategy"); } @Override public int getMinInputFileCount() { return minInputFileCount; } @Override public HDFSCompactionConfigFactory setMaxInputFileCount(int size) { throw new GemFireConfigException("This configuration is not applicable to configured compaction strategy"); } @Override public int getMaxInputFileCount() { return maxInputFileCount; } @Override public HDFSCompactionConfigFactory setMaxThreads(int count) { assertIsPositive(CacheXml.HDFS_COMPACTION_MAX_CONCURRENCY, count); this.maxConcurrency = count; return this; } @Override public int getMaxThreads() { return maxConcurrency; } @Override public HDFSCompactionConfigFactory setAutoMajorCompaction(boolean auto) { this.autoMajorCompact = auto; return this; } @Override public boolean getAutoMajorCompaction() { return autoMajorCompact; } @Override public HDFSCompactionConfigFactory setMajorCompactionIntervalMins(int count) { throw new GemFireConfigException("This configuration is not applicable to configured compaction strategy"); } @Override public int getMajorCompactionIntervalMins() { return majorCompactionIntervalMins; } @Override public HDFSCompactionConfigFactory setMajorCompactionMaxThreads(int count) { throw new GemFireConfigException("This configuration is not applicable to configured compaction strategy"); } @Override public int getMajorCompactionMaxThreads() { return majorCompactionConcurrency; } @Override public int getOldFilesCleanupIntervalMins() { return oldFileCleanupIntervalMins ; } @Override public HDFSCompactionConfigFactory setOldFilesCleanupIntervalMins(int interval) { assertIsPositive(CacheXml.HDFS_COMPACTION_OLD_FILES_CLEANUP_INTERVAL_MINS, interval); this.oldFileCleanupIntervalMins = interval; return this; } @Override public HDFSCompactionConfig getConfigView() { return (HDFSCompactionConfig) this; } @Override public HDFSCompactionConfig create() throws GemFireConfigException { AbstractHDFSCompactionConfigHolder config = createInstance(getCompactionStrategy()); config.copyFrom(this); config.validate(); return config; } protected void validate() { } public static AbstractHDFSCompactionConfigHolder createInstance(String name) { if (name == null) { name = DEFAULT_STRATEGY; } if (name.equalsIgnoreCase(SIZE_ORIENTED)) { return new SizeTieredHdfsCompactionConfigHolder(); } return new InvalidCompactionConfigHolder(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("AbstractHDFSCompactionConfigHolder@"); builder.append(System.identityHashCode(this)); builder.append(" [isAutoCompact="); builder.append(isAutoCompact); builder.append(", autoMajorCompact="); builder.append(autoMajorCompact); builder.append(", "); if (maxInputFileSizeMB > -1) { builder.append("maxInputFileSizeMB="); builder.append(maxInputFileSizeMB); builder.append(", "); } if (maxInputFileCount > -1) { builder.append("maxInputFileCount="); builder.append(maxInputFileCount); builder.append(", "); } if (minInputFileCount > -1) { builder.append("minInputFileCount="); builder.append(minInputFileCount); builder.append(", "); } if (maxConcurrency > -1) { builder.append("maxConcurrency="); builder.append(maxConcurrency); builder.append(", "); } if (majorCompactionConcurrency > -1) { builder.append("majorCompactionConcurrency="); builder.append(majorCompactionConcurrency); builder.append(", "); } if (majorCompactionIntervalMins > -1) { builder.append("majorCompactionIntervalMins="); builder.append(majorCompactionIntervalMins); builder.append(", "); } if (oldFileCleanupIntervalMins > -1) { builder.append("oldFileCleanupIntervalMins="); builder.append(oldFileCleanupIntervalMins); } builder.append("]"); return builder.toString(); } } public static class InvalidCompactionConfigHolder extends AbstractHDFSCompactionConfigHolder { @Override public String getCompactionStrategy() { return INVALID; } } /** * This method should not be called on this class. * @see HDFSStoreFactory#create(String) */ @Override public HDFSStore create(String name) throws GemFireConfigException, StoreExistsException { throw new UnsupportedOperationException(); } /** * This method should not be called on this class. * @see HDFSStoreImpl#destroy() */ @Override public void destroy() { throw new UnsupportedOperationException(); } public static void assertIsPositive(String name, int count) { if (count < 1) { throw new IllegalArgumentException( LocalizedStrings.DiskWriteAttributesImpl_0_HAS_TO_BE_POSITIVE_NUMBER_AND_THE_VALUE_GIVEN_1_IS_NOT_ACCEPTABLE .toLocalizedString(new Object[] { name, count })); } } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("HDFSStoreConfigHolder@"); builder.append(System.identityHashCode(this)); builder.append(" ["); if (name != null) { builder.append("name="); builder.append(name); builder.append(", "); } if (namenodeURL != null) { builder.append("namenodeURL="); builder.append(namenodeURL); builder.append(", "); } if (homeDir != null) { builder.append("homeDir="); builder.append(homeDir); builder.append(", "); } if (clientConfigFile != null) { builder.append("clientConfigFile="); builder.append(clientConfigFile); builder.append(", "); } if (blockCacheSize > -1) { builder.append("blockCacheSize="); builder.append(blockCacheSize); builder.append(", "); } if (maxFileSize > -1) { builder.append("maxFileSize="); builder.append(maxFileSize); builder.append(", "); } if (fileRolloverInterval > -1) { builder.append("fileRolloverInterval="); builder.append(fileRolloverInterval); builder.append(", "); } if (compactionConfig != null) { builder.append("compactionConfig="); builder.append(compactionConfig); builder.append(", "); } if (hdfsEventQueueAttrs != null) { builder.append("hdfsEventQueueAttrs="); builder.append(hdfsEventQueueAttrs); } builder.append("]"); return builder.toString(); } @Override public HDFSStoreMutator createHdfsStoreMutator() { // as part of alter execution, hdfs store will replace the config holder // completely. Hence mutator at the config holder is not needed throw new UnsupportedOperationException(); } @Override public HDFSStore alter(HDFSStoreMutator mutator) { // as part of alter execution, hdfs store will replace the config holder // completely. Hence mutator at the config holder is not needed throw new UnsupportedOperationException(); } }
{ "content_hash": "06475ee6194d768d6870817104a70442", "timestamp": "", "source": "github", "line_count": 594, "max_line_length": 118, "avg_line_length": 33.9983164983165, "alnum_prop": 0.7141866798712553, "repo_name": "gemxd/gemfirexd-oss", "id": "5d8a4314973b6c115512cf3a9e5a8317e1259555", "size": "20860", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSStoreConfigHolder.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AGS Script", "bytes": "90653" }, { "name": "Assembly", "bytes": "962433" }, { "name": "Batchfile", "bytes": "30248" }, { "name": "C", "bytes": "311620" }, { "name": "C#", "bytes": "1352292" }, { "name": "C++", "bytes": "2030283" }, { "name": "CSS", "bytes": "54987" }, { "name": "Gnuplot", "bytes": "3125" }, { "name": "HTML", "bytes": "8609160" }, { "name": "Java", "bytes": "118027963" }, { "name": "JavaScript", "bytes": "33027" }, { "name": "Makefile", "bytes": "18443" }, { "name": "Mathematica", "bytes": "92588" }, { "name": "Objective-C", "bytes": "1069" }, { "name": "PHP", "bytes": "581417" }, { "name": "PLSQL", "bytes": "86549" }, { "name": "PLpgSQL", "bytes": "33847" }, { "name": "Pascal", "bytes": "808" }, { "name": "Perl", "bytes": "196843" }, { "name": "Python", "bytes": "12796" }, { "name": "Ruby", "bytes": "1380" }, { "name": "SQLPL", "bytes": "219147" }, { "name": "Shell", "bytes": "533575" }, { "name": "SourcePawn", "bytes": "22351" }, { "name": "Thrift", "bytes": "33033" }, { "name": "XSLT", "bytes": "67112" } ] }
<jqxGrid #myGrid [width]="850" [source]="dataAdapter" [columns]="columns" [filterable]="true" [showeverpresentrow]="true" [editable]="true" [showfilterrow]="true" [everpresentrowposition]="'top'" [selectionmode]="'multiplecellsadvanced'"> </jqxGrid> <br /> <jqxRadioButton (onChecked)="topBtnOnChecked()" [checked]="true">Top Position</jqxRadioButton> <jqxRadioButton (onChecked)="topAboveFilterRowBtnOnChecked()">Top Position Above Filter Row</jqxRadioButton> <jqxRadioButton (onChecked)="bottomBtnOnChecked()">Bottom Position</jqxRadioButton>
{ "content_hash": "e34764dfe0249209c392f27d004cfae6", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 108, "avg_line_length": 37.93333333333333, "alnum_prop": 0.7363796133567663, "repo_name": "juannelisalde/holter", "id": "c355890f821e93359619f7724488dfa2755fe0b7", "size": "571", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "assets/jqwidgets/demos/angular/app/grid/positioning/app.component.html", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "1327" }, { "name": "Batchfile", "bytes": "802" }, { "name": "C#", "bytes": "374733" }, { "name": "CSS", "bytes": "882785" }, { "name": "HTML", "bytes": "18898187" }, { "name": "Java", "bytes": "12788" }, { "name": "JavaScript", "bytes": "9712220" }, { "name": "PHP", "bytes": "2051144" }, { "name": "TypeScript", "bytes": "3437214" } ] }
redirect_to: 'pages_forked_sample_project.md' --- This document was moved to [pages_forked_sample_project.md](pages_forked_sample_project.md).
{ "content_hash": "e6c5c86ae80d519b110484d8903eac60", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 92, "avg_line_length": 36, "alnum_prop": 0.7638888888888888, "repo_name": "mmkassem/gitlabhq", "id": "250e90f0302f63d78547564651f8de21abfe27f3", "size": "148", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/user/project/pages/getting_started/fork_sample_project.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "113683" }, { "name": "CoffeeScript", "bytes": "139197" }, { "name": "Cucumber", "bytes": "119759" }, { "name": "HTML", "bytes": "447030" }, { "name": "JavaScript", "bytes": "29805" }, { "name": "Ruby", "bytes": "2417833" }, { "name": "Shell", "bytes": "14336" } ] }
#import "RCTTextFieldManager.h" #import "RCTBridge.h" #import "RCTShadowView.h" #import "RCTTextField.h" #import "RCTFont.h" @interface RCTTextFieldManager() <UITextFieldDelegate> @end @implementation RCTTextFieldManager RCT_EXPORT_MODULE() - (UIView *)view { RCTTextField *textField = [[RCTTextField alloc] initWithEventDispatcher:self.bridge.eventDispatcher]; textField.delegate = self; return textField; } - (BOOL)textField:(RCTTextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { // Only allow single keypresses for onKeyPress, pasted text will not be sent. if (textField.textWasPasted) { textField.textWasPasted = NO; } else { [textField sendKeyValueForString:string]; } if (textField.maxLength == nil || [string isEqualToString:@"\n"]) { // Make sure forms can be submitted via return return YES; } NSUInteger allowedLength = textField.maxLength.integerValue - textField.text.length + range.length; if (string.length > allowedLength) { if (string.length > 1) { // Truncate the input string so the result is exactly maxLength NSString *limitedString = [string substringToIndex:allowedLength]; NSMutableString *newString = textField.text.mutableCopy; [newString replaceCharactersInRange:range withString:limitedString]; textField.text = newString; // Collapse selection at end of insert to match normal paste behavior UITextPosition *insertEnd = [textField positionFromPosition:textField.beginningOfDocument offset:(range.location + allowedLength)]; textField.selectedTextRange = [textField textRangeFromPosition:insertEnd toPosition:insertEnd]; [textField textFieldDidChange]; } return NO; } else { return YES; } } // This method allows us to detect a `Backspace` keyPress // even when there is no more text in the TextField - (BOOL)keyboardInputShouldDelete:(RCTTextField *)textField { [self textField:textField shouldChangeCharactersInRange:NSMakeRange(0, 0) replacementString:@""]; return YES; } - (BOOL)textFieldShouldEndEditing:(RCTTextField *)textField { return [textField textFieldShouldEndEditing:textField]; } RCT_EXPORT_VIEW_PROPERTY(caretHidden, BOOL) RCT_EXPORT_VIEW_PROPERTY(autoCorrect, BOOL) RCT_REMAP_VIEW_PROPERTY(editable, enabled, BOOL) RCT_EXPORT_VIEW_PROPERTY(placeholder, NSString) RCT_EXPORT_VIEW_PROPERTY(placeholderTextColor, UIColor) RCT_EXPORT_VIEW_PROPERTY(selection, RCTTextSelection) RCT_EXPORT_VIEW_PROPERTY(text, NSString) RCT_EXPORT_VIEW_PROPERTY(maxLength, NSNumber) RCT_EXPORT_VIEW_PROPERTY(clearButtonMode, UITextFieldViewMode) RCT_REMAP_VIEW_PROPERTY(clearTextOnFocus, clearsOnBeginEditing, BOOL) RCT_EXPORT_VIEW_PROPERTY(selectTextOnFocus, BOOL) RCT_EXPORT_VIEW_PROPERTY(blurOnSubmit, BOOL) RCT_EXPORT_VIEW_PROPERTY(keyboardType, UIKeyboardType) RCT_EXPORT_VIEW_PROPERTY(keyboardAppearance, UIKeyboardAppearance) RCT_EXPORT_VIEW_PROPERTY(onSelectionChange, RCTDirectEventBlock) RCT_EXPORT_VIEW_PROPERTY(returnKeyType, UIReturnKeyType) RCT_EXPORT_VIEW_PROPERTY(enablesReturnKeyAutomatically, BOOL) RCT_EXPORT_VIEW_PROPERTY(secureTextEntry, BOOL) RCT_REMAP_VIEW_PROPERTY(password, secureTextEntry, BOOL) // backwards compatibility RCT_REMAP_VIEW_PROPERTY(color, textColor, UIColor) RCT_REMAP_VIEW_PROPERTY(autoCapitalize, autocapitalizationType, UITextAutocapitalizationType) RCT_REMAP_VIEW_PROPERTY(textAlign, textAlignment, NSTextAlignment) RCT_REMAP_VIEW_PROPERTY(selectionColor, tintColor, UIColor) RCT_CUSTOM_VIEW_PROPERTY(fontSize, NSNumber, RCTTextField) { view.font = [RCTFont updateFont:view.font withSize:json ?: @(defaultView.font.pointSize)]; } RCT_CUSTOM_VIEW_PROPERTY(fontWeight, NSString, __unused RCTTextField) { view.font = [RCTFont updateFont:view.font withWeight:json]; // defaults to normal } RCT_CUSTOM_VIEW_PROPERTY(fontStyle, NSString, __unused RCTTextField) { view.font = [RCTFont updateFont:view.font withStyle:json]; // defaults to normal } RCT_CUSTOM_VIEW_PROPERTY(fontFamily, NSString, RCTTextField) { view.font = [RCTFont updateFont:view.font withFamily:json ?: defaultView.font.familyName]; } RCT_EXPORT_VIEW_PROPERTY(mostRecentEventCount, NSInteger) - (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(RCTShadowView *)shadowView { NSNumber *reactTag = shadowView.reactTag; UIEdgeInsets padding = shadowView.paddingAsInsets; return ^(__unused RCTUIManager *uiManager, NSDictionary<NSNumber *, RCTTextField *> *viewRegistry) { viewRegistry[reactTag].contentInset = padding; }; } @end
{ "content_hash": "e3534f45484a19ee49e1995dd7c960b3", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 125, "avg_line_length": 38.483333333333334, "alnum_prop": 0.7730619315721091, "repo_name": "naoufal/react-native", "id": "c1d965509bc8a9a1d3605bbdcaef9f0524380d93", "size": "4926", "binary": false, "copies": "12", "ref": "refs/heads/master", "path": "Libraries/Text/RCTTextFieldManager.m", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Assembly", "bytes": "15592" }, { "name": "Awk", "bytes": "121" }, { "name": "Batchfile", "bytes": "683" }, { "name": "C", "bytes": "121416" }, { "name": "C++", "bytes": "585840" }, { "name": "CSS", "bytes": "30914" }, { "name": "HTML", "bytes": "31466" }, { "name": "IDL", "bytes": "897" }, { "name": "Java", "bytes": "2407244" }, { "name": "JavaScript", "bytes": "2306066" }, { "name": "Makefile", "bytes": "6295" }, { "name": "Objective-C", "bytes": "1359263" }, { "name": "Objective-C++", "bytes": "95403" }, { "name": "Prolog", "bytes": "287" }, { "name": "Python", "bytes": "118345" }, { "name": "Ruby", "bytes": "4802" }, { "name": "Shell", "bytes": "17750" } ] }
package com.yoda.yodao.internal; import java.util.List; import com.yoda.yodao.internal.query.YoQuery; public class DaoInfo { private Clazz entityClass; private Clazz daoClass; private String pkClass; private List<DaoMethod> methods; private boolean isInterface; public Clazz getEntityClass() { return entityClass; } public void setEntityClass(Clazz entityClass) { this.entityClass = entityClass; } public List<DaoMethod> getMethods() { return methods; } public void setMethods(List<DaoMethod> methods) { this.methods = methods; } public Clazz getDaoClass() { return daoClass; } public void setDaoClass(Clazz daoClass) { this.daoClass = daoClass; } public boolean isInterface() { return isInterface; } public void setIsInterface(boolean isInterface) { this.isInterface = isInterface; } public String getPkClass() { return pkClass; } public void setPkClass(String pkClass) { this.pkClass = pkClass; } @Override public String toString() { return "DaoInfo [entityClass=" + entityClass + ", daoClass=" + daoClass + ", pkClass=" + pkClass + ", methods=" + methods + ", isInterface=" + isInterface + "]"; } }
{ "content_hash": "5ae68c62baf5a8cde1fb3e9a92890c7e", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 73, "avg_line_length": 17.87878787878788, "alnum_prop": 0.7101694915254237, "repo_name": "sandin/YoDao", "id": "f18fc7a222c4e7e366407d960aaacc382395692f", "size": "1180", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "yodao-compiler/src/main/java/com/yoda/yodao/internal/DaoInfo.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "195873" } ] }
(function() { var ABORT, CHANNEL_URL_PREFIX, Channel, CookieJar, MAX_RETRIES, NetworkError, ORIGIN_URL, PushDataParser, Q, UA, authhead, crypto, find, fmterr, isUnknownSID, log, op, ref, req, request, sapisidof, wait, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; require('fnuc').expose(global); CookieJar = require('tough-cookie').CookieJar; request = require('request'); crypto = require('crypto'); log = require('bog'); Q = require('q'); ref = require('./util'), req = ref.req, find = ref.find, wait = ref.wait, NetworkError = ref.NetworkError, fmterr = ref.fmterr; PushDataParser = require('./pushdataparser'); ORIGIN_URL = 'https://talkgadget.google.com'; CHANNEL_URL_PREFIX = 'https://0.client-channel.google.com/client-channel'; UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36'; op = function(o) { return CHANNEL_URL_PREFIX + "/" + o; }; isUnknownSID = function(res) { return res.statusCode === 400 && res.statusMessage === 'Unknown SID'; }; ABORT = {}; authhead = function(sapisid, msec, origin) { var auth_hash, auth_string; auth_string = msec + " " + sapisid + " " + origin; auth_hash = crypto.createHash('sha1').update(auth_string).digest('hex'); return { authorization: "SAPISIDHASH " + msec + "_" + auth_hash, 'x-origin': origin, 'x-goog-authuser': '0' }; }; sapisidof = function(jarstore) { var cookie, cookies, jar; jar = new CookieJar(jarstore); cookies = jar.getCookiesSync(ORIGIN_URL); cookie = find(cookies, function(cookie) { return cookie.key === 'SAPISID'; }); return cookie != null ? cookie.value : void 0; }; MAX_RETRIES = 5; module.exports = Channel = (function() { function Channel(jarstore1, proxy) { this.jarstore = jarstore1; this.proxy = proxy; this.subscribe = bind(this.subscribe, this); this.reqpoll = bind(this.reqpoll, this); this.poll = bind(this.poll, this); this.stop = bind(this.stop, this); this.start = bind(this.start, this); this.getLines = bind(this.getLines, this); this.fetchSid = bind(this.fetchSid, this); this.fetchPvt = bind(this.fetchPvt, this); this.pushParser = new PushDataParser(); } Channel.prototype.fetchPvt = function() { var opts; log.debug('fetching pvt'); opts = { method: 'GET', uri: ORIGIN_URL + "/talkgadget/_/extension-start", jar: request.jar(this.jarstore) }; return req(opts).then((function(_this) { return function(res) { var data; data = JSON.parse(res.body); log.debug('found pvt token', data[1]); return data[1]; }; })(this)).fail(function(err) { log.info('fetchPvt failed', fmterr(err)); return Q.reject(err); }); }; Channel.prototype.authHeaders = function() { var sapisid; sapisid = sapisidof(this.jarstore); if (!sapisid) { log.warn('no SAPISID cookie'); return null; } return authhead(sapisid, Date.now(), ORIGIN_URL); }; Channel.prototype.fetchSid = function() { var auth; auth = this.authHeaders(); if (!auth) { return Q.reject(new Error("No auth headers")); } return Q().then((function(_this) { return function() { var opts; opts = { method: 'POST', uri: op('channel/bind'), jar: request.jar(_this.jarstore), qs: { VER: 8, RID: 81187, ctype: 'hangouts' }, form: { count: 0 }, headers: auth, encoding: null }; return req(opts).then(function(res) { var _, gsid, line, p, ref1, ref2, ref3, ref4, ref5, sid; if (res.statusCode === 200) { p = new PushDataParser(res.body); line = p.pop(); ref1 = line[0], _ = ref1[0], (ref2 = ref1[1], _ = ref2[0], sid = ref2[1]); ref3 = line[1], _ = ref3[0], (ref4 = ref3[1], (ref5 = ref4[0], gsid = ref5.gsid)); log.debug('found sid/gsid', sid, gsid); return { sid: sid, gsid: gsid }; } else { return log.warn('failed to get sid', res.statusCode, res.body); } }); }; })(this)).fail(function(err) { log.info('fetchSid failed', fmterr(err)); return Q.reject(err); }); }; Channel.prototype.getLines = function() { if (!this.running) { this.start(); } return this.pushParser.allLines(); }; Channel.prototype.start = function() { var retries, run; retries = MAX_RETRIES; this.running = true; this.sid = null; this.gsid = null; this.subscribed = false; run = (function(_this) { return function() { if (!_this.running) { return; } return _this.poll(retries).then(function() { retries = MAX_RETRIES; return run(); }).fail(function(err) { if (err === ABORT) { return; } retries--; log.debug('poll error', err); if (retries > 0) { return run(); } else { _this.running = false; return _this.pushParser.reset(err); } }); }; })(this); run(); return null; }; Channel.prototype.stop = function() { var ref1, ref2; log.debug('channel stop'); this.running = false; if ((ref1 = this.pushParser) != null) { if (typeof ref1.reset === "function") { ref1.reset(); } } return (ref2 = this.currentReq) != null ? typeof ref2.abort === "function" ? ref2.abort() : void 0 : void 0; }; Channel.prototype.poll = function(retries) { return Q().then(function() { var backoffTime; backoffTime = 2 * (MAX_RETRIES - retries) * 1000; if (backoffTime) { log.debug('backing off for', backoffTime, 'ms'); } return wait(backoffTime); }).then((function(_this) { return function() { if (!_this.running) { return Q.reject(ABORT); } }; })(this)).then((function(_this) { return function() { if (!_this.sid) { return _this.fetchSid().then(function(o) { merge(_this, o); return _this.pushParser.reset(); }); } }; })(this)).then((function(_this) { return function() { return _this.reqpoll(); }; })(this)); }; Channel.prototype.reqpoll = function() { return Q.Promise((function(_this) { return function(rs, rj) { var ok, opts; log.debug('long poll req'); opts = { method: 'GET', uri: op('channel/bind'), jar: request.jar(_this.jarstore), qs: { VER: 8, gsessionid: _this.gsid, RID: 'rpc', t: 1, SID: _this.sid, CI: 0, ctype: 'hangouts', TYPE: 'xmlhttp' }, headers: _this.authHeaders(), encoding: null, timeout: 30000 }; ok = false; return _this.currentReq = request(opts).on('response', function(res) { log.debug('long poll response', res.statusCode, res.statusMessage); if (res.statusCode === 200) { return ok = true; } else if (isUnknownSID(res)) { ok = false; log.debug('sid became invalid'); _this.sid = null; _this.gsid = null; _this.subscribed = false; } return rj(NetworkError.forRes(res)); }).on('data', function(chunk) { if (ok) { _this.pushParser.parse(chunk); } if (!_this.subscribed) { return _this.subscribe(); } }).on('error', function(err) { log.debug('long poll error', err); return rj(err); }).on('end', function() { log.debug('long poll end'); return rs(); }); }; })(this)); }; Channel.prototype.subscribe = function() { if (this.subscribed) { return; } this.subscribed = true; return Q().then(function() { return wait(1000); }).then((function(_this) { return function() { var opts, timestamp; timestamp = Date.now() * 1000; opts = { method: 'POST', uri: op('channel/bind'), jar: request.jar(_this.jarstore), proxy: _this.proxy, qs: { VER: 8, RID: 81188, ctype: 'hangouts', gsessionid: _this.gsid, SID: _this.sid }, headers: _this.authHeaders(), timeout: 30000, form: { count: 3, ofs: 0, req0_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":0,"5":"c1"},"2":{}}', req1_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":' + timestamp + ',"5":"c3"},"3":{"1":{"1":"babel"}}}', req2_p: '{"1":{"1":{"1":{"1":3,"2":2}},"2":{"1":{"1":3,"2":' + '2},"2":"","3":"JS","4":"lcsclient"},"3":' + timestamp + ',"4":' + timestamp + ',"5":"c4"},"3":{"1":{"1":"hangout_invite"}}}' } }; return req(opts); }; })(this)).then(function(res) { var ok; if (res.statusCode === 200) { return log.debug('subscribed channel'); } else if (isUnknownSID(res)) { ok = false; log.debug('sid became invalid'); this.sid = null; this.gsid = null; this.subscribed = false; } return Q.reject(NetworkError.forRes(res)); }).fail((function(_this) { return function(err) { log.info('subscribe failed', fmterr(err)); _this.subscribed = false; return Q.reject(err); }; })(this)); }; return Channel; })(); }).call(this);
{ "content_hash": "cc403892d8f904df601a3af48723456f", "timestamp": "", "source": "github", "line_count": 350, "max_line_length": 205, "avg_line_length": 30.76, "alnum_prop": 0.48337358350362253, "repo_name": "ramedeiros/yakyak-ptbr", "id": "08b1cfe1efded9f00525f335d122dec74e3612c6", "size": "10801", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "resources/app/node_modules/hangupsjs/lib/channel.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "61581" }, { "name": "HTML", "bytes": "960223" }, { "name": "JavaScript", "bytes": "1691" } ] }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "5f87f1c623d695ffe8dae4fbff466003", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "67968da862cb5aaaa6dd690bad1f534ab96ab694", "size": "177", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Rosa/Rosa foliolosa/ Syn. Rosa ignota/README.md", "mode": "33188", "license": "apache-2.0", "language": [] }
alter table MODULE drop column COMMENT; alter table MODULE drop column PUBLISHED;
{ "content_hash": "82208409099f803528a8af632e21fdaf", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 41, "avg_line_length": 41, "alnum_prop": 0.8292682926829268, "repo_name": "slipstream/SlipStreamServer", "id": "88db2503ea409686d47d361dbb298768fec1b2e3", "size": "172", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "rpm/src/main/migrations/004_module_delete_fields.sql", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "AMPL", "bytes": "106" }, { "name": "Clojure", "bytes": "1890161" }, { "name": "HTML", "bytes": "149740" }, { "name": "Java", "bytes": "1476155" }, { "name": "Makefile", "bytes": "6625" }, { "name": "PLpgSQL", "bytes": "2571" }, { "name": "Python", "bytes": "41223" }, { "name": "Shell", "bytes": "9608" }, { "name": "XSLT", "bytes": "4699" } ] }
@class NSString; @interface DVTFilterExpression : NSObject <NSCopying, NSSecureCoding> { BOOL _isNegation; NSString *_identifier; } + (BOOL)supportsSecureCoding; + (id)allocWithZone:(struct _NSZone *)arg1; - (void).cxx_destruct; @property(readonly) BOOL isNegation; // @synthesize isNegation=_isNegation; @property(retain) NSString *identifier; // @synthesize identifier=_identifier; - (id)copyWithZone:(struct _NSZone *)arg1; - (id)initWithCoder:(id)arg1; - (void)encodeWithCoder:(id)arg1; - (id)negatedCopy; - (id)initWithIdentifier:(id)arg1 isNegation:(BOOL)arg2; - (id)initWithIdentifier:(id)arg1; @end
{ "content_hash": "4ba6a366e9f92524f9c7f9ee720dd956", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 78, "avg_line_length": 28.136363636363637, "alnum_prop": 0.7399030694668821, "repo_name": "XVimProject/XVim2", "id": "a5411e16aa66aebcb03ba800f3e8a8cd61e04aa9", "size": "885", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "XVim2/XcodeHeader/DVTFoundation/DVTFilterExpression.h", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "3672" }, { "name": "C", "bytes": "65096" }, { "name": "C++", "bytes": "10438" }, { "name": "Makefile", "bytes": "2176" }, { "name": "Objective-C", "bytes": "5172541" }, { "name": "Python", "bytes": "1161" }, { "name": "Ruby", "bytes": "1083" }, { "name": "Shell", "bytes": "593" }, { "name": "Swift", "bytes": "24720" } ] }
require 'httpi' require 'active_support/core_ext/string' require 'active_support/core_ext/object' module AntiCaptcha class Client def initialize(options = {}) @retries_count = options.delete(:retries_count) || 10 @sleep = options.delete(:sleep) || 5 @options = AntiCaptcha.configuration.options.merge(options) end # type: file data (bin) # type: base64 (base64) def decode(image, type = :bin) case request_image(image, type) when /OK\|(.+)/ @captcha_id = $1 check when /^ERROR_(.+)/ raise error_class($1) else raise UnknownResponse end end def check return if @captcha_id.blank? begin get_status rescue CaptchaNotReady => e attempt ||= @retries_count raise e if (attempt -= 1) < 0 sleep @sleep retry end end def report_bad return if @captcha_id.blank? request_report_bad end def get_balance request_balance end def get_stats(date = Date.today) request_stats date end private def get_status case request_status when /^OK\|(.+)/ $1 when 'CAPCHA_NOT_READY' raise CaptchaNotReady when /^ERROR_(.+)/ raise error_class($1) else raise UnknownResponse end end def request_status request 'http://anti-captcha.com/res.php', key: AntiCaptcha.configuration.key, action: 'get', id: @captcha_id end # type: file data (bin) # type: base64 (base64) def request_image(image, type = :bin) body = (type == :bin ? Base64.encode64(image) : image) request 'http://anti-captcha.com/in.php', @options.merge(method: 'base64', body: body) end def request_report_bad request 'http://anti-captcha.com/res.php', key: AntiCaptcha.configuration.key, action: 'reportbad', id: @captcha_id end def request_balance request 'http://anti-captcha.com/res.php', key: AntiCaptcha.configuration.key, action: 'getbalance' end def request_stats(date) request 'http://anti-captcha.com/res.php', key: AntiCaptcha.configuration.key, action: 'getstats', date: date.strftime('%Y-%m-%d') end def request(url, params) request = HTTPI::Request.new.tap do |request| request.url = url request.body = params end HTTPI.post(request).body end def error_class(string) "AntiCaptcha::#{string.downcase.classify}".constantize rescue NameError UnknownErrorResponse end end end
{ "content_hash": "9c351900027d461dda5e714a3e5be072", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 65, "avg_line_length": 22.822033898305083, "alnum_prop": 0.5852209431860379, "repo_name": "debbbbie/anti-captcha", "id": "363d31a619586eefd2e0968e85ae9589120db849", "size": "2693", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "lib/anti-captcha/client.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "9884" } ] }
using System; using System.Threading.Tasks; using DavidLievrouw.Utils.ForTesting.FakeItEasy; using DavidLievrouw.Utils.ForTesting.FluentAssertions; using FakeItEasy; using FluentAssertions; using NUnit.Framework; using ProjectionSystem.Diagnostics; using ProjectionSystem.ModelsForTest; namespace ProjectionSystem.States.Transitions { [TestFixture] public class LoggingStateTransitionOrchestratorTests { IStateTransitionOrchestrator<Department> _inner; ITraceLogger _traceLogger; LoggingStateTransitionOrchestrator<Department> _sut; [SetUp] public virtual void SetUp() { _inner = _inner.Fake(); _traceLogger = _traceLogger.Fake(); _sut = new LoggingStateTransitionOrchestrator<Department>(_inner, _traceLogger); } [TestFixture] public class Construction : LoggingStateTransitionOrchestratorTests { [Test] public void HasExactlyOneConstructor_WithNoOptionalParameters() { _sut.Should().HaveExactlyOneConstructorWithoutOptionalParameters(); } } [TestFixture] public class TransitionToState : LoggingStateTransitionOrchestratorTests { IState _state; [SetUp] public override void SetUp() { base.SetUp(); _state = _state.Fake(); } [Test] public void GivenNullState_Throws() { Assert.ThrowsAsync<ArgumentNullException>(() => _sut.TransitionToState((IState)null)); } [Test] public async Task DelegatesToInnerOrchestrator() { await _sut.TransitionToState(_state); A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened(); } [Test] public async Task LogsVerboseMessageBeforeTransitioning() { await _sut.TransitionToState(_state); A.CallTo(() => _traceLogger.Verbose(A<string>._)).MustHaveHappened() .Then(A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened()); } [Test] public async Task LogsVerboseMessageAfterTransitioning() { await _sut.TransitionToState(_state); A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened() .Then(A.CallTo(() => _traceLogger.Verbose(A<string>._)).MustHaveHappened()); } } [TestFixture] public class TransitionToStateOfTItem : LoggingStateTransitionOrchestratorTests { IState<Department> _state; [SetUp] public override void SetUp() { base.SetUp(); _state = _state.Fake(); } [Test] public void GivenNullState_Throws() { Assert.ThrowsAsync<ArgumentNullException>(() => _sut.TransitionToState((IState<Department>)null)); } [Test] public async Task DelegatesToInnerOrchestrator() { await _sut.TransitionToState(_state); A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened(); } [Test] public async Task LogsVerboseMessageBeforeTransitioning() { await _sut.TransitionToState(_state); A.CallTo(() => _traceLogger.Verbose(A<string>._)).MustHaveHappened() .Then(A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened()); } [Test] public async Task LogsVerboseMessageAfterTransitioning() { await _sut.TransitionToState(_state); A.CallTo(() => _inner.TransitionToState(_state)).MustHaveHappened() .Then(A.CallTo(() => _traceLogger.Verbose(A<string>._)).MustHaveHappened()); } } [TestFixture] public class CurrentState : LoggingStateTransitionOrchestratorTests { [Test] public void ReturnsCurrentStateOfDecoratedOrchestrator() { var currentState = A.Fake<IState<Department>>(); A.CallTo(() => _inner.CurrentState).Returns(currentState); var actual = _sut.CurrentState; Assert.That(actual, Is.EqualTo(currentState)); } } } }
{ "content_hash": "b1070f17cd3b53e418597a23318fca17", "timestamp": "", "source": "github", "line_count": 116, "max_line_length": 106, "avg_line_length": 33.28448275862069, "alnum_prop": 0.6671846671846672, "repo_name": "DavidLievrouw/ProjectionSystem", "id": "900e3c3772a0bddb5296cde0151636da8971f088", "size": "3863", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/ProjectionSystem.Tests/States/Transitions/LoggingStateTransitionOrchestratorTests.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "2057" }, { "name": "C#", "bytes": "133251" } ] }
.. spelling:: Tesseract .. index:: computer-vision ; Tesseract .. _pkg.Tesseract: Tesseract ========= .. |hunter| image:: https://img.shields.io/badge/hunter-v0.19.20-blue.svg :target: https://github.com/cpp-pm/hunter/releases/tag/v0.19.20 :alt: Hunter v0.19.20 - `Official <https://github.com/tesseract-ocr/tesseract>`__ - `Hunterized <https://github.com/hunter-packages/tesseract>`__ - `Example <https://github.com/cpp-pm/hunter/blob/master/examples/Tesseract/CMakeLists.txt>`__ - Available since |hunter| - Added by `Sacha Refshauge <https://github.com/xsacha>`__ (`pr-830 <https://github.com/ruslo/hunter/pull/830>`__) .. literalinclude:: /../examples/Tesseract/CMakeLists.txt :language: cmake :start-after: # DOCUMENTATION_START { :end-before: # DOCUMENTATION_END }
{ "content_hash": "5e331f1da8e86065a1c3b9de63437988", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 115, "avg_line_length": 32, "alnum_prop": 0.68875, "repo_name": "dan-42/hunter", "id": "d7327eaff5640275d9247289bdb40eb90e5156e8", "size": "800", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "docs/packages/pkg/Tesseract.rst", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Batchfile", "bytes": "1008" }, { "name": "C", "bytes": "60" }, { "name": "C++", "bytes": "69027" }, { "name": "CMake", "bytes": "1564938" }, { "name": "Python", "bytes": "44806" }, { "name": "Shell", "bytes": "29052" } ] }
/* Licensed under the Apache License, ersion 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.camunda.bpm.engine.impl.pvm.runtime; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.logging.Logger; import org.camunda.bpm.engine.ProcessEngineServices; import org.camunda.bpm.engine.delegate.BpmnModelExecutionContext; import org.camunda.bpm.engine.delegate.ProcessEngineServicesAware; import org.camunda.bpm.engine.impl.cmmn.execution.CaseExecutionImpl; import org.camunda.bpm.engine.impl.cmmn.execution.CmmnExecution; import org.camunda.bpm.engine.impl.cmmn.model.CmmnCaseDefinition; import org.camunda.bpm.engine.impl.core.variable.scope.CoreVariableStore; import org.camunda.bpm.engine.impl.core.variable.scope.SimpleVariableStore; import org.camunda.bpm.engine.impl.pvm.PvmProcessInstance; import org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution; import org.camunda.bpm.model.bpmn.BpmnModelInstance; import org.camunda.bpm.model.bpmn.instance.FlowElement; /** * @author Tom Baeyens * @author Joram Barrez * @author Daniel Meyer * @author Falko Menge */ public class ExecutionImpl extends PvmExecutionImpl implements Serializable, ActivityExecution, PvmProcessInstance { private static final long serialVersionUID = 1L; private static Logger log = Logger.getLogger(ExecutionImpl.class.getName()); private static AtomicInteger idGenerator = new AtomicInteger(); // current position ///////////////////////////////////////////////////////// /** the process instance. this is the root of the execution tree. * the processInstance of a process instance is a self reference. */ protected ExecutionImpl processInstance; /** the parent execution */ protected ExecutionImpl parent; /** nested executions representing scopes or concurrent paths */ protected List<ExecutionImpl> executions; /** super execution, not-null if this execution is part of a subprocess */ protected ExecutionImpl superExecution; /** reference to a subprocessinstance, not-null if currently subprocess is started from this execution */ protected ExecutionImpl subProcessInstance; /** super case execution, not-null if this execution is part of a case execution */ protected CaseExecutionImpl superCaseExecution; /** reference to a subcaseinstance, not-null if currently subcase is started from this execution */ protected CaseExecutionImpl subCaseInstance; // variables///////////////////////////////////////////////////////////////// protected SimpleVariableStore variableStore = new SimpleVariableStore(); // lifecycle methods //////////////////////////////////////////////////////// public ExecutionImpl() { } /** creates a new execution. properties processDefinition, processInstance and activity will be initialized. */ public ExecutionImpl createExecution(boolean initializeExecutionStartContext) { // create the new child execution ExecutionImpl createdExecution = newExecution(); // initialize sequence counter createdExecution.setSequenceCounter(getSequenceCounter()); // manage the bidirectional parent-child relation createdExecution.setParent(this); // initialize the new execution createdExecution.setProcessDefinition(getProcessDefinition()); createdExecution.setProcessInstance(getProcessInstance()); createdExecution.setActivity(getActivity()); // make created execution start in same activity instance createdExecution.activityInstanceId = activityInstanceId; if (initializeExecutionStartContext) { createdExecution.setStartContext(new ExecutionStartContext()); } else if (startContext != null) { createdExecution.setStartContext(startContext); } createdExecution.skipCustomListeners = this.skipCustomListeners; createdExecution.skipIoMapping = this.skipIoMapping; return createdExecution; } /** instantiates a new execution. can be overridden by subclasses */ protected ExecutionImpl newExecution() { return new ExecutionImpl(); } public void initialize() { return; } public void initializeTimerDeclarations() { return; } // parent /////////////////////////////////////////////////////////////////// /** ensures initialization and returns the parent */ public ExecutionImpl getParent() { return parent; } public void setParentExecution(PvmExecutionImpl parent) { this.parent = (ExecutionImpl) parent; } // executions /////////////////////////////////////////////////////////////// public List<ExecutionImpl> getExecutionsAsCopy() { return new ArrayList<ExecutionImpl>(getExecutions()); } /** ensures initialization and returns the non-null executions list */ public List<ExecutionImpl> getExecutions() { if(executions == null) { executions = new ArrayList<ExecutionImpl>(); } return executions; } public ExecutionImpl getSuperExecution() { return superExecution; } public void setSuperExecution(PvmExecutionImpl superExecution) { this.superExecution = (ExecutionImpl) superExecution; if (superExecution != null) { superExecution.setSubProcessInstance(null); } } public ExecutionImpl getSubProcessInstance() { return subProcessInstance; } public void setSubProcessInstance(PvmExecutionImpl subProcessInstance) { this.subProcessInstance = (ExecutionImpl) subProcessInstance; } // super case execution ///////////////////////////////////////////////////// public CaseExecutionImpl getSuperCaseExecution() { return superCaseExecution; } public void setSuperCaseExecution(CmmnExecution superCaseExecution) { this.superCaseExecution = (CaseExecutionImpl) superCaseExecution; } // sub case execution //////////////////////////////////////////////////////// public CaseExecutionImpl getSubCaseInstance() { return subCaseInstance; } public void setSubCaseInstance(CmmnExecution subCaseInstance) { this.subCaseInstance = (CaseExecutionImpl) subCaseInstance; } public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition) { return createSubCaseInstance(caseDefinition, null); } public CaseExecutionImpl createSubCaseInstance(CmmnCaseDefinition caseDefinition, String businessKey) { CaseExecutionImpl caseInstance = (CaseExecutionImpl) caseDefinition.createCaseInstance(businessKey); // manage bidirectional super-process-sub-case-instances relation subCaseInstance.setSuperExecution(this); setSubCaseInstance(subCaseInstance); return caseInstance; } // process definition /////////////////////////////////////////////////////// public String getProcessDefinitionId() { return processDefinition.getId(); } // process instance ///////////////////////////////////////////////////////// public void start(Map<String, Object> variables) { if (isProcessInstanceExecution()) { if (startContext == null) { startContext = new ProcessInstanceStartContext(processDefinition.getInitial()); } } super.start(variables); } /** ensures initialization and returns the process instance. */ public ExecutionImpl getProcessInstance() { return processInstance; } public String getProcessInstanceId() { return getProcessInstance().getId(); } public String getBusinessKey() { return getProcessInstance().getBusinessKey(); } public void setBusinessKey(String businessKey) { this.businessKey = businessKey; } public String getProcessBusinessKey() { return getProcessInstance().getBusinessKey(); } /** for setting the process instance, this setter must be used as subclasses can override */ public void setProcessInstance(PvmExecutionImpl processInstance) { this.processInstance = (ExecutionImpl) processInstance; } // activity ///////////////////////////////////////////////////////////////// /** * generates an activity instance id */ protected String generateActivityInstanceId(String activityId) { int nextId = idGenerator.incrementAndGet(); String compositeId = activityId+":"+nextId; if(compositeId.length()>64) { return String.valueOf(nextId); } else { return compositeId; } } // toString ///////////////////////////////////////////////////////////////// public String toString() { if (isProcessInstanceExecution()) { return "ProcessInstance["+getToStringIdentity()+"]"; } else { return (isEventScope? "EventScope":"")+(isConcurrent? "Concurrent" : "")+(isScope() ? "Scope" : "")+"Execution["+getToStringIdentity()+"]"; } } protected String getToStringIdentity() { return Integer.toString(System.identityHashCode(this)); } // allow for subclasses to expose a real id ///////////////////////////////// public String getId() { return String.valueOf(System.identityHashCode(this)); } // getters and setters ////////////////////////////////////////////////////// protected CoreVariableStore getVariableStore() { return variableStore; } public ExecutionImpl getReplacedBy() { return (ExecutionImpl) replacedBy; } public void setExecutions(List<ExecutionImpl> executions) { this.executions = executions; } public String getCurrentActivityName() { String currentActivityName = null; if (this.activity != null) { currentActivityName = (String) activity.getProperty("name"); } return currentActivityName; } public FlowElement getBpmnModelElementInstance() { throw new UnsupportedOperationException(BpmnModelExecutionContext.class.getName() +" is unsupported in transient ExecutionImpl"); } public BpmnModelInstance getBpmnModelInstance() { throw new UnsupportedOperationException(BpmnModelExecutionContext.class.getName() +" is unsupported in transient ExecutionImpl"); } public ProcessEngineServices getProcessEngineServices() { throw new UnsupportedOperationException(ProcessEngineServicesAware.class.getName() +" is unsupported in transient ExecutionImpl"); } public void forceUpdate() { // nothing to do } public void fireHistoricProcessStartEvent() { // do nothing } }
{ "content_hash": "e8535a5710fa7ef0b93c5cd432a2a0ba", "timestamp": "", "source": "github", "line_count": 330, "max_line_length": 145, "avg_line_length": 32.657575757575756, "alnum_prop": 0.696668831771365, "repo_name": "fouasnon/camunda-bpm-platform", "id": "0ddbf1243646233e7a80eb4af62f9679837dce02", "size": "10777", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/ExecutionImpl.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "6657" }, { "name": "CSS", "bytes": "1301" }, { "name": "Groovy", "bytes": "1594" }, { "name": "HTML", "bytes": "35196" }, { "name": "Java", "bytes": "18632613" }, { "name": "JavaScript", "bytes": "43" }, { "name": "PLpgSQL", "bytes": "3267" }, { "name": "Python", "bytes": "187" }, { "name": "Ruby", "bytes": "60" }, { "name": "Shell", "bytes": "4048" } ] }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Function template erase_nth</title> <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="../../string_algo/reference.html#header.boost.algorithm.string.erase_hpp" title="Header &lt;boost/algorithm/string/erase.hpp&gt;"> <link rel="prev" href="erase_nth_copy.html" title="Function erase_nth_copy"> <link rel="next" href="ierase_nth_copy.html" title="Function ierase_nth_copy"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> <td align="center"><a href="../../../../index.html">Home</a></td> <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="erase_nth_copy.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.erase_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ierase_nth_copy.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.algorithm.erase_nth"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Function template erase_nth</span></h2> <p>boost::algorithm::erase_nth &#8212; Erase nth algorithm. </p> </div> <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../string_algo/reference.html#header.boost.algorithm.string.erase_hpp" title="Header &lt;boost/algorithm/string/erase.hpp&gt;">boost/algorithm/string/erase.hpp</a>&gt; </span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> SequenceT<span class="special">,</span> <span class="keyword">typename</span> RangeT<span class="special">&gt;</span> <span class="keyword">void</span> <span class="identifier">erase_nth</span><span class="special">(</span><span class="identifier">SequenceT</span> <span class="special">&amp;</span> Input<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">RangeT</span> <span class="special">&amp;</span> Search<span class="special">,</span> <span class="keyword">int</span> Nth<span class="special">)</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="idp115911840"></a><h2>Description</h2> <p>Remove the Nth occurrence of the substring in the input. The input sequence is modified in-place.</p> <p> </p> <div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody><tr> <td><p><span class="term">Parameters:</span></p></td> <td><div class="variablelist"><table border="0" class="variablelist compact"> <colgroup> <col align="left" valign="top"> <col> </colgroup> <tbody> <tr> <td><p><span class="term"><code class="computeroutput">Input</code></span></p></td> <td><p>An input string </p></td> </tr> <tr> <td><p><span class="term"><code class="computeroutput">Nth</code></span></p></td> <td><p>An index of the match to be replaced. The index is 0-based. For negative N, matches are counted from the end of string. </p></td> </tr> <tr> <td><p><span class="term"><code class="computeroutput">Search</code></span></p></td> <td><p>A substring to be searched for. </p></td> </tr> </tbody> </table></div></td> </tr></tbody> </table></div> </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2002-2004 Pavol Droba<p>Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file <code class="filename">LICENSE_1_0.txt</code> or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="erase_nth_copy.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../string_algo/reference.html#header.boost.algorithm.string.erase_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="ierase_nth_copy.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
{ "content_hash": "68443c40e0a823d49022de44bbec7c3f", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 474, "avg_line_length": 63.804597701149426, "alnum_prop": 0.6649252386957305, "repo_name": "keichan100yen/ode-ext", "id": "1ee585b174a4609f92354ff01159ba44c1de7d8e", "size": "5551", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "boost/doc/html/boost/algorithm/erase_nth.html", "mode": "33188", "license": "mit", "language": [ { "name": "Assembly", "bytes": "309067" }, { "name": "Batchfile", "bytes": "37875" }, { "name": "C", "bytes": "2967570" }, { "name": "C#", "bytes": "40804" }, { "name": "C++", "bytes": "189322982" }, { "name": "CMake", "bytes": "119251" }, { "name": "CSS", "bytes": "456744" }, { "name": "Cuda", "bytes": "52444" }, { "name": "DIGITAL Command Language", "bytes": "6246" }, { "name": "Fortran", "bytes": "1856" }, { "name": "Groff", "bytes": "5189" }, { "name": "HTML", "bytes": "181460055" }, { "name": "IDL", "bytes": "28" }, { "name": "JavaScript", "bytes": "419776" }, { "name": "Lex", "bytes": "1231" }, { "name": "M4", "bytes": "29689" }, { "name": "Makefile", "bytes": "1088024" }, { "name": "Max", "bytes": "36857" }, { "name": "Objective-C", "bytes": "11406" }, { "name": "Objective-C++", "bytes": "630" }, { "name": "PHP", "bytes": "68641" }, { "name": "Perl", "bytes": "36491" }, { "name": "Perl6", "bytes": "2053" }, { "name": "Python", "bytes": "1612978" }, { "name": "QML", "bytes": "593" }, { "name": "QMake", "bytes": "16692" }, { "name": "Rebol", "bytes": "354" }, { "name": "Ruby", "bytes": "5532" }, { "name": "Shell", "bytes": "354720" }, { "name": "Tcl", "bytes": "1172" }, { "name": "TeX", "bytes": "32117" }, { "name": "XSLT", "bytes": "553585" }, { "name": "Yacc", "bytes": "19623" } ] }
using System; using System.ComponentModel; using System.Net; using System.Runtime.CompilerServices; using Titanium.Web.Proxy.EventArguments; using Titanium.Web.Proxy.Examples.Wpf.Annotations; using Titanium.Web.Proxy.Http; namespace Titanium.Web.Proxy.Examples.Wpf { public class SessionListItem : INotifyPropertyChanged { private long? bodySize; private Exception exception; private string host; private int processId; private string protocol; private long receivedDataCount; private long sentDataCount; private string statusCode; private string url; private Guid clientConnectionId; private Guid serverConnectionId; public int Number { get; set; } public Guid ClientConnectionId { get => clientConnectionId; set => SetField(ref clientConnectionId, value); } public Guid ServerConnectionId { get => serverConnectionId; set => SetField(ref serverConnectionId, value); } public HttpWebClient HttpClient { get; set; } public IPEndPoint ClientLocalEndPoint { get; set; } public IPEndPoint ClientRemoteEndPoint { get; set; } public bool IsTunnelConnect { get; set; } public string StatusCode { get => statusCode; set => SetField(ref statusCode, value); } public string Protocol { get => protocol; set => SetField(ref protocol, value); } public string Host { get => host; set => SetField(ref host, value); } public string Url { get => url; set => SetField(ref url, value); } public long? BodySize { get => bodySize; set => SetField(ref bodySize, value); } public int ProcessId { get => processId; set { if (SetField(ref processId, value)) { OnPropertyChanged(nameof(Process)); } } } public string Process { get { try { var process = System.Diagnostics.Process.GetProcessById(processId); return process.ProcessName + ":" + processId; } catch (Exception) { return string.Empty; } } } public long ReceivedDataCount { get => receivedDataCount; set => SetField(ref receivedDataCount, value); } public long SentDataCount { get => sentDataCount; set => SetField(ref sentDataCount, value); } public Exception Exception { get => exception; set => SetField(ref exception, value); } public event PropertyChangedEventHandler PropertyChanged; protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) { if (!Equals(field, value)) { field = value; OnPropertyChanged(propertyName); return true; } return false; } [NotifyPropertyChangedInvocator] protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } public void Update(SessionEventArgsBase args) { var request = HttpClient.Request; var response = HttpClient.Response; int statusCode = response?.StatusCode ?? 0; StatusCode = statusCode == 0 ? "-" : statusCode.ToString(); Protocol = request.RequestUri.Scheme; ClientConnectionId = args.ClientConnectionId; ServerConnectionId = args.ServerConnectionId; if (IsTunnelConnect) { Host = "Tunnel to"; Url = request.RequestUri.Host + ":" + request.RequestUri.Port; } else { Host = request.RequestUri.Host; Url = request.RequestUri.AbsolutePath; } if (!IsTunnelConnect) { long responseSize = -1; if (response != null) { if (response.ContentLength != -1) { responseSize = response.ContentLength; } else if (response.IsBodyRead && response.Body != null) { responseSize = response.Body.Length; } } BodySize = responseSize; } ProcessId = HttpClient.ProcessId.Value; } } }
{ "content_hash": "d2ef9c3d4a7d4a248159ec7c73e5f65e", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 103, "avg_line_length": 27.605405405405406, "alnum_prop": 0.5091051497943998, "repo_name": "justcoding121/Titanium-Web-Proxy", "id": "513e0ffc27b4e833b85014e451bc10f70ca15f9b", "size": "5109", "binary": false, "copies": "3", "ref": "refs/heads/beta", "path": "examples/Titanium.Web.Proxy.Examples.Wpf/SessionListItem.cs", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "479" }, { "name": "C#", "bytes": "876732" }, { "name": "PowerShell", "bytes": "6773" } ] }
--TEST-- Test sscanf() function : error conditions --FILE-- <?php /* Prototype : mixed sscanf ( string $str , string $format [, mixed &$... ] ) * Description: Parses input from a string according to a format * Source code: ext/standard/string.c */ echo "*** Testing sscanf() : error conditions ***\n"; $str = "Hello World"; $format = "%s %s"; echo "\n-- Testing sscanf() function with no arguments --\n"; var_dump( sscanf() ); echo "\n-- Testing sscanf() function with one argument --\n"; var_dump( sscanf($str) ); echo "\n-- Testing sscanf() function with more than expected no. of arguments --\n"; var_dump( sscanf($str, $format, $str1, $str2, $extra_str) ); ?> ===DONE=== --EXPECTF-- *** Testing sscanf() : error conditions *** -- Testing sscanf() function with no arguments -- Warning: sscanf() expects at least 2 parameters, 0 given in %s on line %d NULL -- Testing sscanf() function with one argument -- Warning: sscanf() expects at least 2 parameters, 1 given in %s on line %d NULL -- Testing sscanf() function with more than expected no. of arguments -- Warning: sscanf(): Variable is not assigned by any conversion specifiers in %s on line %d int(-1) ===DONE===
{ "content_hash": "e6654f1952a00a7bfe5734c32f2bca21", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 89, "avg_line_length": 27.068181818181817, "alnum_prop": 0.6649874055415617, "repo_name": "lunaczp/learning", "id": "8d883a1f9260e0d4e40f3027ef0e0890fa1d565d", "size": "1191", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "language/c/testPhpSrc/php-5.6.17/ext/standard/tests/strings/sscanf_error.phpt", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "4526" }, { "name": "Assembly", "bytes": "14500403" }, { "name": "Awk", "bytes": "21252" }, { "name": "Batchfile", "bytes": "2526" }, { "name": "C", "bytes": "381839655" }, { "name": "C++", "bytes": "10162228" }, { "name": "CMake", "bytes": "68196" }, { "name": "CSS", "bytes": "3943" }, { "name": "D", "bytes": "1022" }, { "name": "DTrace", "bytes": "4528" }, { "name": "Fortran", "bytes": "1834" }, { "name": "GAP", "bytes": "4344" }, { "name": "GDB", "bytes": "31864" }, { "name": "Gnuplot", "bytes": "148" }, { "name": "Go", "bytes": "732" }, { "name": "HTML", "bytes": "86756" }, { "name": "Java", "bytes": "8286" }, { "name": "JavaScript", "bytes": "238365" }, { "name": "Lex", "bytes": "121233" }, { "name": "Limbo", "bytes": "1609" }, { "name": "Lua", "bytes": "96" }, { "name": "M4", "bytes": "483288" }, { "name": "Makefile", "bytes": "1915601" }, { "name": "Nix", "bytes": "180099" }, { "name": "Objective-C", "bytes": "1742504" }, { "name": "OpenEdge ABL", "bytes": "4238" }, { "name": "PHP", "bytes": "27984629" }, { "name": "Pascal", "bytes": "74868" }, { "name": "Perl", "bytes": "317465" }, { "name": "Perl 6", "bytes": "6916" }, { "name": "Python", "bytes": "21547" }, { "name": "R", "bytes": "1112" }, { "name": "Roff", "bytes": "435717" }, { "name": "Scilab", "bytes": "22980" }, { "name": "Shell", "bytes": "468206" }, { "name": "UnrealScript", "bytes": "20840" }, { "name": "Vue", "bytes": "563" }, { "name": "XSLT", "bytes": "7946" }, { "name": "Yacc", "bytes": "172805" }, { "name": "sed", "bytes": "2073" } ] }
#include "tango-gl/drawable_object.h" #include "tango-gl/shaders.h" namespace tango_gl { void DrawableObject::SetShader() { shader_program_ = util::CreateProgram(shaders::GetBasicVertexShader().c_str(), shaders::GetBasicFragmentShader().c_str()); if (!shader_program_) { LOGE("Could not create program."); } uniform_mvp_mat_ = glGetUniformLocation(shader_program_, "mvp"); attrib_vertices_ = glGetAttribLocation(shader_program_, "vertex"); uniform_color_ = glGetUniformLocation(shader_program_, "color"); } void DrawableObject::DeleteGlResources() { if (shader_program_) { glDeleteShader(shader_program_); } } void DrawableObject::SetColor(float red, float green, float blue) { red_ = red; green_ = green; blue_ = blue; } void DrawableObject::SetColor(const Color& color) { SetColor(color.r, color.g, color.b); } void DrawableObject::SetAlpha(const float alpha) { alpha_ = alpha; } void DrawableObject::SetVertices(const std::vector<GLfloat>& vertices) { vertices_ = vertices; } void DrawableObject::SetVertices(const std::vector<GLfloat>& vertices, const std::vector<GLushort>& indices) { vertices_ = vertices; indices_ = indices; } void DrawableObject::SetVertices(const std::vector<GLfloat>& vertices, const std::vector<GLfloat>& normals) { vertices_ = vertices; normals_ = normals; } } // namespace tango_gl
{ "content_hash": "59305335620666409a51abc090115a68", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 72, "avg_line_length": 28.134615384615383, "alnum_prop": 0.6657552973342447, "repo_name": "googlearchive/tango-examples-c", "id": "e87974e7e2819c4727cfc48ba7f2efd27b8b3cf1", "size": "2079", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "tango_gl/src/drawable_object.cc", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "801788" }, { "name": "Java", "bytes": "158560" }, { "name": "Makefile", "bytes": "43349" } ] }
"use strict"; var toInteger = require("../../../number/to-integer") , value = require("../../../object/valid-value") , isValue = require("../../../object/is-value") , min = Math.min , max = Math.max; module.exports = function (searchString/*, endPosition*/) { var self, start, endPos; self = String(value(this)); searchString = String(searchString); endPos = arguments[1]; start = (isValue(endPos) ? min(max(toInteger(endPos), 0), self.length) : self.length) - searchString.length; return start < 0 ? false : self.indexOf(searchString, start) === start; };
{ "content_hash": "65cf3d5ee27499539d4a03480c1d2c6a", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 81, "avg_line_length": 33.05555555555556, "alnum_prop": 0.626890756302521, "repo_name": "emccosky/emccosky.github.io", "id": "725c2b7fe6f3dbac828a173bbfb5a796c89c0ad3", "size": "595", "binary": false, "copies": "14", "ref": "refs/heads/master", "path": "node_modules/es5-ext/string/#/ends-with/shim.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "181558" }, { "name": "HTML", "bytes": "12354" }, { "name": "JavaScript", "bytes": "5326" }, { "name": "SCSS", "bytes": "5364" } ] }
<?php class Topic extends Eloquent{ protected $table='temas'; protected $fillable=['nombre', 'active', 'bloque_id']; /* * ## A theme can have many activities */ public function Activity(){ return $this->hasMany('actividad','tema_id'); } public function Block(){ return $this->belongsTo('bloque'); } }
{ "content_hash": "96bfcb6a09a9caa2e3b6598c4b610fc5", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 56, "avg_line_length": 21.5625, "alnum_prop": 0.6057971014492753, "repo_name": "Curiosity-Education/curiosity-v.1.0", "id": "61d8fbd01517b7ff16bbe50c6ebc9a19a1efdeda", "size": "345", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/models/Topic.php", "mode": "33261", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "4684" }, { "name": "CSS", "bytes": "1063913" }, { "name": "HTML", "bytes": "1543573" }, { "name": "JavaScript", "bytes": "2519023" }, { "name": "PHP", "bytes": "728843" } ] }
using djfoxer.dp.notification.Core.Model; using NotificationsExtensions.Toasts; using System; using System.Globalization; using System.Linq; using Windows.Data.Xml.Dom; using Windows.System; using Windows.UI.Notifications; namespace djfoxer.dp.notification.Core.Logic { public class ToastLogic { public void ShowToast(Notification notification, bool isForeground) { if (notification != null) { ToastContent toastContent = new ToastContent() { Launch = isForeground ? "fore" : notification.TargetUrl, Visual = new ToastVisual() { //BindingGeneric = new ToastBindingGeneric() //{ // AppLogoOverride = new ToastGenericAppLogo() // { // HintCrop = ToastGenericAppLogoCrop.Circle, // Source = notification.Avatar // }, // Attribution = new ToastGenericAttributionText() // { // Text = notification.Title + " - " + notification.FullText, // }, //}, TitleText = new ToastText() { Text = notification.Title }, BodyTextLine1 = new ToastText() { Text = notification.AddedDate. ToString("dd.MM.yyyy HH:mm", CultureInfo.InvariantCulture) }, BodyTextLine2 = new ToastText() { Text = notification.FullText }, AppLogoOverride = new ToastAppLogo() { Crop = ToastImageCrop.Circle, Source = new ToastImageSource(notification.Avatar) } }, //Audio = new ToastAudio() //{ // Src = new Uri("ms-appx:///Assets/Sounds/alert_1.mp3") //} }; if (isForeground) { toastContent.Actions = new ToastActionsCustom() { Buttons = { new ToastButton("pokaż", "show") { ActivationType = ToastActivationType.Foreground, TextBoxId = notification.TargetUrl }, new ToastButton("anuluj", "hide") { ActivationType = ToastActivationType.Foreground }, } }; } ToastNotification toast = new ToastNotification(toastContent.GetXml()); toast.Activated += Toast_Activated; ToastNotificationManager.CreateToastNotifier().Show(toast); } } private async void Toast_Activated(ToastNotification sender, object args) { if ((args as ToastActivatedEventArgs).Arguments == "show") { string url = ((XmlElement)sender.Content.GetElementsByTagName("action").First()) .GetAttribute("hint-inputId"); if (!string.IsNullOrEmpty(url)) { await Launcher.LaunchUriAsync(new Uri(url)); } } } } }
{ "content_hash": "ae845607ca2e21711464d6c32cfa5f78", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 96, "avg_line_length": 37.06603773584906, "alnum_prop": 0.40646474930007637, "repo_name": "djfoxer/dp.notification", "id": "d05a683bb6a4ee498f261f0c1ab3843b03adc5c6", "size": "3932", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "djfoxer.dp.notification/djfoxer.dp.notification.Core/Logic/ToastLogic.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "100385" } ] }
single: true --- {% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} {% include head.html %} <body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %} {% if page.sidebar == 'collapse' or site.sidebar == 'collapse' %} class="collapse-sidebar sidebar-footer" {% endif %}> <nav role="navigation">{% include navigation.html %}</nav> <div class="wrapper_single"> <div class="container"> <article class="span8 offset2" role="article"> {% include article.html %} {% if site.disqus_short_name and page.comments == true %} <div class="article-format"> <h1>Comments</h1> <div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div> </div> {% endif %} </article> </div> </div> {% include footer.html %} {% include after_footer.html %} </body> </html>
{ "content_hash": "56619d6934a24112ea7c92efca03cb74", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 244, "avg_line_length": 41.21739130434783, "alnum_prop": 0.5812236286919831, "repo_name": "Mine4aCause/Mine4aCauseSite", "id": "5af49f74377de43c06ec0eade24297472f1452ae", "size": "952", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "source/_layouts/post.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "257006" }, { "name": "JavaScript", "bytes": "75619" }, { "name": "Ruby", "bytes": "95830" } ] }
 #region Using directives using System; using System.Xml; using System.Xml.Serialization; using NUnit.Framework; using Nettiers.AdventureWorks.Entities; using Nettiers.AdventureWorks.Data; #endregion namespace Nettiers.AdventureWorks.UnitTests { /// <summary> /// Provides tests for the and <see cref="ProductModel"/> objects (entity, collection and repository). /// </summary> /// <remarks> /// This file is generated once and will never be overwritten. /// </remarks> [TestFixture] public partial class ProductModelTest { /// <summary> /// Creates a new <see cref="ProductModelTest"/> instance. /// </summary> public ProductModelTest() { } /// <summary> /// This method is used to construct the test environment prior to running the tests. /// </summary> [TestFixtureSetUp] public void Init() { Init_Generated(); // Add your initialization here } /// <summary> /// This method is used to restore the environment after the tests are completed. /// </summary> [TestFixtureTearDown] public void Dispose() { CleanUp_Generated(); // Add you clean up here } /// <summary> /// Inserts a mock ProductModel entity into the database. /// </summary> [NUnit.Framework.Test] public void Step_01_Insert() { // Establish additional pre-conditions here Step_01_Insert_Generated(); // Add additional verification here } /// <summary> /// Selects a sample of ProductModel objects of the database. /// </summary> [NUnit.Framework.Test] public void Step_02_SelectAll() { // Establish additional pre-conditions here Step_02_SelectAll_Generated(); // Add additional verification here } /// <summary> /// Deep load all ProductModel children. /// </summary> [NUnit.Framework.Test] public void Step_03_DeepLoad() { // Establish additional pre-conditions here Step_03_DeepLoad_Generated(); // Add additional verification here } /// <summary> /// Updates a mock ProductModel entity into the database. /// </summary> [NUnit.Framework.Test] public void Step_04_Update() { // Establish additional pre-conditions here Step_04_Update_Generated(); // Add additional verification here } /// <summary> /// Delete the mock ProductModel entity into the database. /// </summary> [NUnit.Framework.Test] public void Step_05_Delete() { // Establish additional pre-conditions here Step_05_Delete_Generated(); // Add additional verification here } #region Serialization tests /// <summary> /// Serialize the mock ProductModel entity into a temporary file. /// </summary> [NUnit.Framework.Test] public void Step_06_SerializeEntity() { // Establish additional pre-conditions here Step_06_SerializeEntity_Generated(); // Add additional verification here } /// <summary> /// Deserialize the mock ProductModel entity from a temporary file. /// </summary> [NUnit.Framework.Test] public void Step_07_DeserializeEntity() { // Establish additional pre-conditions here Step_07_DeserializeEntity_Generated(); // Add additional verification here } /// <summary> /// Serialize a ProductModel collection into a temporary file. /// </summary> [NUnit.Framework.Test] public void Step_08_SerializeCollection() { // Establish additional pre-conditions here Step_08_SerializeCollection_Generated(); // Add additional verification here } /// <summary> /// Deserialize a ProductModel collection from a temporary file. /// </summary> [NUnit.Framework.Test] public void Step_09_DeserializeCollection() { // Establish additional pre-conditions here Step_09_DeserializeCollection_Generated(); // Add additional verification here } #endregion /// <summary> /// Check the foreign key dal methods. /// </summary> [NUnit.Framework.Test] public void Step_10_FK() { // Establish additional pre-conditions here Step_10_FK_Generated(); // Add additional verification here } /// <summary> /// Check the indexes dal methods. /// </summary> [NUnit.Framework.Test] public void Step_11_IX() { // Establish additional pre-conditions here Step_11_IX_Generated(); // Add additional verification here } /// <summary> /// Test methods exposed by the EntityHelper class. /// </summary> [NUnit.Framework.Test] public void Step_20_TestEntityHelper() { Step_20_TestEntityHelper_Generated(); } /// <summary> /// Test Find using the Query class /// </summary> [NUnit.Framework.Test] public void Step_30_TestFindByQuery() { Step_30_TestFindByQuery_Generated(); } ///<summary> /// Returns a Typed ProductModel Entity with mock values. ///</summary> static public ProductModel CreateMockInstance(TransactionManager tm) { // get the default mock instance ProductModel mock = ProductModelTest.CreateMockInstance_Generated(tm); // make any alterations necessary // (i.e. for DB check constraints, special test cases, etc.) SetSpecialTestData(mock); // return the modified object return mock; } ///<summary> /// Update the Typed ProductModel Entity with modified mock values. ///</summary> static public void UpdateMockInstance(TransactionManager tm, ProductModel mock) { ProductModelTest.UpdateMockInstance_Generated(tm, mock); // make any alterations necessary // (i.e. for DB check constraints, special test cases, etc.) SetSpecialTestData(mock); } /// <summary> /// Make any alterations necessary (i.e. for DB check constraints, special test cases, etc.) /// </summary> /// <param name="mock">Object to be modified</param> static private void SetSpecialTestData(ProductModel mock) { //Code your changes to the data object here. mock.CatalogDescription = null; mock.Instructions = null; } } }
{ "content_hash": "7b35fe25b619963c81d1e3f1e12dbd79", "timestamp": "", "source": "github", "line_count": 245, "max_line_length": 106, "avg_line_length": 26.714285714285715, "alnum_prop": 0.6158899923605806, "repo_name": "Giten2004/netTiers", "id": "796ae655d8d726cf3998bc699234b3c19e5a1712", "size": "6547", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Samples/AdventureWorks/Generated/Nettiers.AdventureWorks.UnitTests/ProductModelTest.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "620" }, { "name": "C#", "bytes": "331739" }, { "name": "CSS", "bytes": "9299" }, { "name": "JavaScript", "bytes": "18312" }, { "name": "XSLT", "bytes": "25193" } ] }
window.lang = 'zh'; var sounder = require('/assets/js/module/sounder.js'); var cNav = require('/components/nav/nav.js'); var cOverlay = require('/components/overlay/overlay.js'); // 登录 // var login = require('/assets/js/login.js'); // login.check(); var resources = [ // __uri('/assets/sounds/coin.mp3'), // __uri('/components/weapon/cannon/fire.mp3'), __uri('/components/bg/img/clound-s.png'), __uri('/components/bg/img/clound-l.png'), __uri('/components/bg/img/clound-m.png'), __uri('/components/bg/img/house.png'), __uri('/components/bg/img/house1.png'), __uri('/components/bg/img/wall.png'), __uri('/components/role/barrier/barrier.png'), __uri('/components/role/barrier/repeat.png'), __uri('/components/role/enemy/devil/devil.png'), __uri('/components/role/enemy/devil/weapon.png'), __uri('/components/role/player/player.png'), __uri('/components/weapon/cannon/cannon.png'), __uri('/components/bullets/bullet-pea/bullet-pea.png'), __uri('/components/bullets/rocket/rocket.png'), __uri('/components/layout/about/wxqcode.jpg'), __uri('/views/index/bg.png'), __uri('/views/index/index-bg.png') ]; // 加载资源....................................................................... var loader = require('/assets/js/module/loader.js'); loader.load(resources); var cLoad = require('/components/load/load.js'); loader.registLoadingCb(function(progress) { cLoad.showLoading(progress); }); var sStart = new Howl({ urls: [__uri('/assets/sounds/coin.mp3')] }); var cBrand = require('/components/brand/brand.js'); loader.registCompleteCb(function() { cLoad.hide(); cBrand.show(); setTimeout(function(e) { sStart.play(); cNav.show(); cOverlay.show(); initGameContext(); cBrand.hide(); // cCover.registHideCb(initGame); }, 3000); // cOverlay.show(); // cNav.show(); // initGameContext(); // game.togglePaused(); // cOverlay.hide(); // cNav.hide(); // initGame(); }); // Init Game....................................................................... var stageWidth = 1080; var stageHeight = 1550; var Game = require('/assets/js/gameEngine.js'); $('body').prepend('<div class="stage"><canvas id="gameCanvas" class="canvas" width="' + stageWidth + '" height="' + stageHeight + '">Canvas not supported</canvas></div>'); var bg; var player; var barrier; var enemy; var cannon; var bullets = require('/components/bullets/bullets.js'); bullets.init(stageWidth, stageHeight); var cScore = require('/components/score/score.js'); var particleSprite = require('assets/js/module/particleGenerator.js'); // 初始化重力系统 var PLATFORM_HEIGHT_IN_METERS = 18; // 50 meters window.pixelsPerMeter = 1200 / PLATFORM_HEIGHT_IN_METERS; window.GRAVITY_FORCE = 9.81; var game = new Game('Cannon', 'gameCanvas'); document.addEventListener('gameOver', function(e) { showGameOver(); }); // var bgMusic; function initGameContext() { initFps(game); bg = require('/components/bg/bg.js'); player = require('/components/role/player/player.js'); barrier = require('/components/role/barrier/barrier.js'); enemy = require('/components/role/enemy/devil/devil.js'); cannon = require('/components/weapon/cannon/cannon.js'); player.equip(cannon); game.addSprite(bg); game.addSprite(barrier); game.addSprite(bullets); game.addSprite(player); bullets.addTarget(barrier); bullets.addTarget(player); bullets.addTarget(enemy); game.addSprite(particleSprite); cScore.reset(); game.start(); setTimeout(function() { game.togglePaused(); }, 0); } function initGame() { player.addEvent(); // bgMusic = new Howl({ // urls: [ // __uri('/assets/sounds/bg.wav'), // __uri('/assets/sounds/bg.mp3') // ], // buffer: true, // autoplay: true // }); } // FPS function initFps(game) { var lastFpsUpdateTime = 0; var cFps = require('/components/fps/fps.js'); game.paintUnderSprites = function() { var now = +new Date(); // console.log('fps', game.fps); if (now - lastFpsUpdateTime > 1000) { cFps.update(game.fps); lastFpsUpdateTime = now; } }; } var cResultScore = require('/components/layout/result/result.js'); var request = require('/assets/js/request.js'); var loading = require('/components/loading/loading.js'); document.addEventListener('fireMiss', function(e) { enemy.fire(); }); function showGameOver() { console.log('gameOver'); console.log(bullets.getBullets()); cOverlay.show(); cNav.show(); player.removeEvent(); // bgMusic.fade(1, 0, 500); var scrore = cScore.getScore(); cResultScore.show(scrore); // sEnd.play(); // loading.set('存档…', '存档失败!', 'bottom'); // request({ // url: 'http://zz-game.com/score', // type: 'POST', // data: { // score: scrore // }, // load: loading, // success: function(msg) { // console.log('record success', msg); // } // }); game.togglePaused(); } document.addEventListener('gameStart', function(e) { game.togglePaused(); cOverlay.hide(); cNav.hide(); initGame(); }); document.addEventListener('gameRestart', function(e) { cOverlay.hide(); cNav.hide(); cScore.reset(); player.reset(); bg.reset(); cannon.reset(); barrier.reset(); cResultScore.hide(); // bgMusic.stop(); // bgMusic.play(); // bgMusic.fade(0, 1, 500); game.togglePaused(); }); // 敌人被击毁 document.addEventListener('destroyEnemy', function(e) { bg.start(); // enemy.create(); barrier.move(); cannon.reset(); }); // 新敌人出现 document.addEventListener('enemyReady', function(e) { bg.stop(); });
{ "content_hash": "b0e4a76dc8d817904173dcce213ad0cd", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 171, "avg_line_length": 25.74074074074074, "alnum_prop": 0.6318345323741007, "repo_name": "babyzone2004/ZombieH5", "id": "1b5b4e99c57dec9ac068cdd2ebe9ca4ab5e2f122", "size": "5622", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "views/index/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "13839" }, { "name": "HTML", "bytes": "1722" }, { "name": "JavaScript", "bytes": "162135" }, { "name": "Smarty", "bytes": "9761" } ] }
layout: post title: Usefull info about Spark published: true --- **Follow these simple steps and your page refresh issue will be resolved. 1. Install IIS url rewrite module. 2. Add web.config file in your code base. **Pyspark: Pyspark provides python APIs for Spark.
{ "content_hash": "16b7529cd43cd422e23dfd8b9fbbea40", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 73, "avg_line_length": 20.285714285714285, "alnum_prop": 0.7253521126760564, "repo_name": "Nitin-Panwar/Nitin-Panwar.github.io", "id": "c23fb9b439e9e7e6bb27d1a561b682e797f65412", "size": "288", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_posts/Spark.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "62905" }, { "name": "HTML", "bytes": "6264" } ] }
End of preview.

No dataset card yet

Downloads last month
3