content
stringlengths
4
1.04M
lang
stringclasses
358 values
score
int64
0
5
repo_name
stringlengths
5
114
repo_path
stringlengths
4
229
repo_licenses
listlengths
1
8
!macro EnsureAppIsNotRunning ${For} $retryNumEnsureAppIsNotRunning 0 1000 DetailPrint "Checking if ${PRODUCT_EXE} is running..." nsExec::ExecToStack /OEM 'tasklist /NH /FI "IMAGENAME eq ${PRODUCT_EXE}"' Pop $0 ${If} $0 != 0 DetailPrint "Error checking ${PRODUCT_EXE}: $0" MessageBox MB_ICONSTOP|MB_OK "Failed to check whether process is running" /SD IDOK Quit ${EndIf} Pop $1 ${StrStr} $0 $1 "${PRODUCT_EXE}" ${If} $0 == "" DetailPrint "${PRODUCT_EXE} is not running" ${If} $isUpdaterMode == 1 Sleep 2000 ${EndIf} ${ExitFor} ${Else} ${If} $isUpdaterMode == 1 ${AndIf} $retryNumEnsureAppIsNotRunning < 5 DetailPrint "${PRODUCT_EXE} is running, waiting... next check in 2s" Sleep 2000 ${Else} MessageBox MB_ICONQUESTION|MB_OKCANCEL|MB_DEFBUTTON1 "To proceed, please close ${PRODUCT_NAME} and click OK" /SD IDCANCEL IDOK ok Quit ok: ${EndIf} ${EndIf} ${Next} !macroend
NSIS
4
mocheer/keeweb
package/nsis/check-running.nsh
[ "Apache-2.0", "MIT" ]
The post-test process involves linting all of the files under `test/`. By writing this file in Literate (style?) it verifies that literate files are automatically detected. path = require 'path' vows = require 'vows' assert = require 'assert' coffeelint = require path.join('..', 'lib', 'coffeelint') vows.describe('literate').addBatch({ Markdown uses trailing spaces to force a line break. 'Trailing whitespace in markdown' : topic : The line of code is written weird because I had trouble getting the 4 space prefix in place. """This is some `Markdown`. \n\n \n x = 1234 \n y = 1 """ 'is ignored' : (source) -> The 3rd parameter here indicates that the incoming source is literate. errors = coffeelint.lint(source, {}, true) This intentionally includes trailing whitespace in code so it also verifies that the way `Markdown` spaces are stripped are not also stripping code. assert.equal(errors.length, 1) }).export(module)
Literate CoffeeScript
3
alubbe/coffeelint
test/test_literate.litcoffee
[ "MIT" ]
ruleset io.picolabs.tic_tac_toe { meta { use module io.picolabs.tic_tac_toe.ui alias ui shares __testing, state, them, html, is_winner } global { __testing = { "queries": [ { "name": "__testing" } , { "name": "state" } , { "name": "them" } , { "name": "is_winner", "args": [ "player" ] } ] , "events": [ { "domain": "ttt", "type": "send_move", "attrs": [ "move", "them" ] } , { "domain": "ttt", "type": "receive_move", "attrs": [ "move" ] } , { "domain": "ttt", "type": "start", "attrs": [ "me", "move", "them" ] } , { "domain": "ttt", "type": "reset_requested" } ] } states = [ null, "my_move", "their_move", "wrap_up", "done" ] state = function(){ states >< ent:state => ent:state | "invalid state" } them = function(){ ent:them } html = function(){ ui:ui_html( ent:moves, ent:state, ent:me, ent:them, ent:winner, ent:protocol_rid, ent:possible_opponents_string.decode()) } board = function(move){ cell = move.extract(re#([A-C][1-3])$#).head() ent:moves >< "X:"+cell => "X" | ent:moves >< "O:"+cell => "O" | null } check_spec = function(spec,player){ spec.all(function(s){board(s)==player}) } specs = [ ["A1", "A2", "A3"], ["B1", "B2", "B3"], ["C1", "C2", "C3"], ["A1", "B1", "C1"], ["A2", "B2", "C2"], ["A3", "B3", "C3"], ["A1", "B2", "C3"], ["A3", "B2", "C1"] ] is_winner = function(player){ specs.any(function(s){s.check_spec(player)}) } } // // capture protocol rid if any // rule capture_protocol_rid_if_any { select when wrangler ruleset_added where event:attr("rids") >< meta:rid pre { proto_rid = event:attr("proto_rid") } if proto_rid then noop() fired { ent:protocol_rid := proto_rid } } // // update possible opponents // rule update_possible_opponents { select when ttt possible_opponents_change fired { ent:possible_opponents_string := event:attr("possible_opponents").encode() } } // // initial configuration // rule initial_configuration { select when ttt start me re#^([XO])$# setting(me) pre { move = event:attr("move") } fired { ent:them := event:attr("them") ent:me := me ent:state := "their_move" ent:moves := move => [move] | [] clear ent:winner } } // // my initiative // rule start_game { select when ttt send_move move re#^([XO]):[A-C][1-3]$# setting(player) where ent:state.isnull() fired { ent:them := event:attr("them") ent:me := player ent:state := "my_move" ent:moves := [] clear ent:winner } } rule vet_move { select when ttt send_move move re#^([XO]):[A-C][1-3]$# setting(player) pre { right_player = player == ent:me right_state = ent:state == "my_move" message = not right_state => "It's not my turn" | not right_player => <<I am not "#{player}"" but "#{ent:me}">> | null } if message then send_directive("bad move",{"msg":message}) fired { last } } rule check_for_duplicate { select when ttt send_move move re#^([XO]):([A-C][1-3])$# setting(player,move) pre { play = board(move) message = play.isnull() => null | move + " has already been played (as " + play + ")" } if message then send_directive("bad move",{"msg":message}) fired { last } } rule make_move { select when ttt send_move move re#^([XO]:[A-C][1-3])$# setting(move) every { send_directive("moved "+move.split(":").tail().head(), {"next":<<#{meta:host}/sky/cloud/#{meta:eci}/#{meta:rid}/html.html>>}) } fired { ent:moves := ent:moves.append(move) ent:state := "their_move" last raise event "ttt:new_move_made" raise event "ttt:new_move_to_send" attributes { "me": ent:me, "moves": ent:moves } } } rule catch_all { select when ttt send_move send_directive("something is wrong") } // // their initiative // rule join_and_start_game { select when ttt start_of_new_game me re#^([XO])# setting(player) fired { ent:them := event:attr("them") ent:me := player == "X" => "O" | "X" ent:state := "my_move" ent:moves := [] clear ent:winner } } rule join_starting_game { select when ttt receive_move move re#^([XO]:[A-C][1-3])$# setting(move) where ent:state.isnull() pre { player = move.substr(0,1) } fired { ent:them := event:attr("them") ent:me := player == "X" => "O" | "X" ent:state := "my_move" ent:moves := [move] clear ent:winner } } rule accept_their_move { select when ttt receive_move move re#^([XO]:[A-C][1-3])$# setting(move) where ent:state == "their_move" //TODO check everything; for now: be careful testing fired { ent:them := event:attr("them") ent:moves := ent:moves.append(move) ent:state := "my_move" raise event "ttt:new_move_made" } } // // check for outcome // rule check_for_outcome { select when ttt:new_move_made pre { draw = ent:moves.length() >= 9 winner = "X".is_winner() => "X" | "O".is_winner() => "O" | draw => "none" | null } if winner then send_directive("game over",{"winner":winner}) fired { ent:state := "done" ent:winner := winner raise ttt event "game_over" attributes { "winner": winner, "comment": draw => "Cat's game" | winner == ent:me => "I won!" | "You won!" } } } // // initialize for new game // rule initialize_for_new_game { select when ttt:reset_requested pre { options = { "winner": "none", "comment": "abandonned" } } send_directive("game over",options) fired { clear ent:them clear ent:me clear ent:moves clear ent:state clear ent:winner raise ttt event "game_over" attributes options } } }
KRL
4
Picolab/TicTacToe
krl/io.picolabs.tic_tac_toe.krl
[ "MIT" ]
<?php foreach ($object as $report): ?> <?php echo $this->render($report) ?> <?php endforeach ?>
HTML+PHP
4
rustamwin/phpbench
templates/html/Reports.phtml
[ "MIT" ]
a = MtClass.A.class
Web Ontology Language
0
michaeldesu/Concurnas
tests/com/concurnas/compiler/ast/testGenneral.owl
[ "MIT" ]
load ../solvers/cp/cp.dll; function element; var x >= 0 <= 2; minimize o: element({i in 1..3} i, x);
AMPL
2
ampl/plugins
test/data/element.ampl
[ "BSD-3-Clause" ]
(* Refer to Alex Aiken, "The Cool Reference Manual": http://theory.stanford.edu/~aiken/software/cool/cool-manual.pdf for language specification. *) -- Exhibit various language constructs class Sample { testCondition(x: Int): Bool { if x = 0 then false else if x < (1 + 2) * 3 then true else false fi fi }; testLoop(y: Int): Bool { while y > 0 loop { if not condition(y) then y <- y / 2 else y <- y - 1; } pool }; testAssign(z: Int): Bool { i : Int; i <- ~z; }; testCase(var: Sample): SELF_TYPE { io : IO <- new IO; case var of a : A => io.out_string("Class type is A\n"); b : B => io.out_string("Class type is B\n"); s : Sample => io.out_string("Class type is Sample\n"); o : Object => io.out_string("Class type is object\n"); esac }; testLet(i: Int): Int { let (a: Int in let(b: Int <- 3, c: Int <- 4 in { a <- 2; a * b * 2 / c; } ) ) }; }; -- Used to test subclasses class A inherits Sample {}; class B inherits A {}; class C { main() : Int { (new Sample).testLet(1) }; }; -- "Hello, world" example class Main inherits IO { main(): SELF_TYPE { out_string("Hello, World.\n") }; };
OpenCL
4
JavascriptID/sourcerer-app
src/test/resources/samples/langs/Cool/sample.cl
[ "MIT" ]
/** * * {{name}} actions * */ import { DEFAULT_ACTION } from './constants'; // eslint-disable-next-line import/prefer-default-export export const defaultAction = () => { return { type: DEFAULT_ACTION, }; };
Handlebars
3
Mithenks/strapi
packages/generators/admin/component/templates/actions.js.hbs
[ "MIT" ]
[CustomMessages] bg.IDP_FormCaption =Изтегляне на допълнителни файлове bg.IDP_FormDescription =Моля, изчакайте, докато съветникът изтегля допълнителните файлове... bg.IDP_TotalProgress =Общ ход bg.IDP_CurrentFile =Текущ файл bg.IDP_File =Файл: bg.IDP_Speed =Скорост: bg.IDP_Status =Състояние: bg.IDP_ElapsedTime =Изминало време: bg.IDP_RemainingTime =Оставащо време: bg.IDP_DetailsButton =Повече информация bg.IDP_HideButton =Скрий bg.IDP_RetryButton =Опитай отново bg.IDP_IgnoreButton =Пренебрегни bg.IDP_KBs =КБ/с bg.IDP_MBs =МБ/с bg.IDP_X_of_X =%.2f от %.2f bg.IDP_KB =КБ bg.IDP_MB =МБ bg.IDP_GB =ГБ bg.IDP_Initializing =Стартиране... bg.IDP_GettingFileInformation=Получаване на информация за файла... bg.IDP_StartingDownload =Започване на изтеглянето... bg.IDP_Connecting =Свързване... bg.IDP_Downloading =Изтегляне... bg.IDP_DownloadComplete =Изтеглянето е завършено bg.IDP_DownloadFailed =Изтеглянето беше неуспешно bg.IDP_CannotConnect =Връзката е невъзможна bg.IDP_CancellingDownload =Отмяна на изтеглянето... bg.IDP_Unknown =Неизвестно bg.IDP_DownloadCancelled =Изтеглянето е отменено bg.IDP_RetryNext =Проверете Вашата Интернет връзка и кликнете „Опитай отново“, за да направите повторен опит за изтегляне на файловете, или кликнете „Напред“, за да продължите с инсталацията въпреки това. bg.IDP_RetryCancel =Проверете Вашата Интернет връзка и кликнете „Опитай отново“, за да направите повторен опит за изтегляне на файловете, или кликнете „Отмени“, за да прекратите инсталацията. bg.IDP_FilesNotDownloaded =Следните файлове не бяха изтеглени: bg.IDP_HTTPError_X =HTTP грешка %d bg.IDP_400 =Грешна заявка (400) bg.IDP_401 =Достъпът е отказан (401) bg.IDP_404 =Файлът не е открит (404) bg.IDP_407 =Изисква се идентификация на прокси (407) bg.IDP_500 =Вътрешна сървърна грешка (500) bg.IDP_502 =Грешен шлюз (502) bg.IDP_503 =Услугата е временно недостъпна (503)
Inno Setup
2
thedruz/WPN-XM
bin/innosetup-download-plugin/unicode/idplang/bulgarian.iss
[ "MIT" ]
test_priv_key: x509.private_key_managed: - name: {{ pillar['keyfile'] }} - bits: 4096 test_crt: x509.certificate_managed: - name: {{ pillar['crtfile'] }} - public_key: {{ pillar['keyfile'] }} - ca_server: minion - signing_policy: {{ pillar['signing_policy'] }} - CN: {{ grains.get('id') }} - days_remaining: 30 - backup: True - require: - test_priv_key
SaltStack
4
Noah-Huppert/salt
tests/integration/files/file/base/x509_compound_match/check.sls
[ "Apache-2.0" ]
h2. JavaScript Style Guide endprologue. h3. Code Conventions WARNING: The current codebase does not yet follow all of these principles. * We use jslint. Look for jslint4java-maven-plugin in pom.xml in the repository root to see our jslint configuration. * We use only the +TAB+ character for indentation. * We use +UpperCamelCase+ for class names, and +lowerCamelCase+ for method and property names. * Methods and properties that begin with an underscore (+_+) are @private@. * We don't use obfuscated variable names (e.g. with all vowels removed). Understandable abbreviations are OK. * Don't use "that" to refer to an outer "this". Use the name of the class instead (with first char lowercased). <javascript> var MyObject = Class.extend({ _constructor: function() { // GOOD var myObject = this; setTimeout(function() { console.log(myObject.name + ' done.'); }; // BAD var that = this; setTimeout(function() { console.log(that.name + ' done.'); }; } }); </javascript> h3. Code Documentation We use @JSDoc@ for code documentation. Please see +plugins/common/block/+ for an example on how to use this. Further information about rendering documentation can be found in the "Documentation Guide":/documentation_guidelines.html. h3. RequireJS module skeleton All files which are RequireJS modules (scripts in +package/lib+) should follow this structure. <javascript filename="package/lib/module.js"> /*! * Aloha Editor * Author & Copyright (c) 2011 Gentics Software GmbH * aloha-sales@gentics.com * Licensed unter the terms of http://www.aloha-editor.com/license.html */ define([ 'dependency' ], function( Dependency ) { 'use strict'; // Declare exports return exports; }); </javascript> h3. Classes and Extension Mechanisms We use the class definition syntax of "John Resig":http://ejohn.org - slightly adjusted. This means you can create a new class with +Class.extend({ ....})+. The following example shows how to create and instanciate a class, and how the constructor (which must be named +_construct()+) is called. <javascript> var Greeter = Class.extend({ name: null, _constructor: function(name) { this.name = name; }, greet: function() { alert('Good Morning ' + this.name); } }); var greeterInstance = new Greeter('Christopher'); greeterInstance.greet(); // alerts "Good Morning Chistopher" </javascript> Now, if we want to subclass @Greeter@, this is very easy: Just use @Greeter.extend@ for that: <javascript> var GreeterForMen = Greeter.extend({ _constructor: function(name) { this._super('Mr. ' + name); } }); var greeterInstance = new GreeterForMen('Christopher'); greeterInstance.greet(); // alerts "Good Morning Mr. Chistopher" </javascript> You can use +this._super()+ to call the superclass constructor. h3. Singletons All singletons should follow this structure: <javascript> /*! * Aloha Editor * Author & Copyright (c) 2011 Gentics Software GmbH * aloha-sales@gentics.com * Licensed unter the terms of http://www.aloha-editor.com/license.html */ define([], function() { "use strict"; var component = Class.extend({ // Class definition here }); return new component(); }); </javascript> It will define a class and return a new instance that will be exported. Singletons are useful for global objects that have state. h3. RequireJS Dependency Order The order of a module's dependencies listed in the call to define([...], function(...) should be in the following order: * The base class, if the module exports a subclass * Other Classes, if the module instantiates or uses other classes * i18n - plugin specific internationalization if applicable * i18nCore - core specific internationalization if applicable * vendor - third party modules and libraries * css - css files if applicable h3. Public API, Private methods and attributes All methods and properties which are public API are marked with +@api+. The public API is supported for a longer period by the Aloha Core Team, and when a public API changes, this is clearly communicated in the Release Notes of a version. If you use methods that are not marked with +@api@+ you are on your own. h3. Initialization Methods Initialization methods should be named +init()+. Good: * +init()+ * +initSidebar()+ Bad: * @initialize()@ * @initializeSidebar()@ * @start()@ * @run()@ h4. Shutdown methods Shutdown methods should be named +destroy()+. Good: * +destroy()+ Bad: * @shutdown()@ * @stop()@
Textile
4
luciany/Aloha-Editor
doc/guides/source/style_guide.textile
[ "CC-BY-3.0" ]
<?xml version='1.0' encoding='UTF-8'?> <Project Type="Project" LVVersion="20008000"> <Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property> <Item Name="My Computer" Type="My Computer"> <Property Name="IOScan.Faults" Type="Str"></Property> <Property Name="IOScan.NetVarPeriod" Type="UInt">100</Property> <Property Name="IOScan.NetWatchdogEnabled" Type="Bool">false</Property> <Property Name="IOScan.Period" Type="UInt">10000</Property> <Property Name="IOScan.PowerupMode" Type="UInt">0</Property> <Property Name="IOScan.Priority" Type="UInt">9</Property> <Property Name="IOScan.ReportModeConflict" Type="Bool">true</Property> <Property Name="IOScan.StartEngineOnDeploy" Type="Bool">false</Property> <Property Name="server.app.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.control.propertiesEnabled" Type="Bool">true</Property> <Property Name="server.tcp.enabled" Type="Bool">false</Property> <Property Name="server.tcp.port" Type="Int">0</Property> <Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property> <Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property> <Property Name="server.vi.callsEnabled" Type="Bool">true</Property> <Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property> <Property Name="specify.custom.address" Type="Bool">false</Property> <Item Name="Gbird-16-outline.ico" Type="Document" URL="../../images/Gbird-16-outline.ico"/> <Item Name="SplashLoader.vi" Type="VI" URL="../../PicoG-App/SplashLoader.vi"/> <Item Name="Dependencies" Type="Dependencies"> <Item Name="vi.lib" Type="Folder"> <Item Name="Application Directory.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/file.llb/Application Directory.vi"/> <Item Name="BuildErrorSource.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/BuildErrorSource.vi"/> <Item Name="BuildHelpPath.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/BuildHelpPath.vi"/> <Item Name="Check Special Tags.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Check Special Tags.vi"/> <Item Name="Clear Errors.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Clear Errors.vi"/> <Item Name="Convert property node font to graphics font.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Convert property node font to graphics font.vi"/> <Item Name="Details Display Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Details Display Dialog.vi"/> <Item Name="DialogType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogType.ctl"/> <Item Name="DialogTypeEnum.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/DialogTypeEnum.ctl"/> <Item Name="Error Cluster From Error Code.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Cluster From Error Code.vi"/> <Item Name="Error Code Database.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Error Code Database.vi"/> <Item Name="ErrWarn.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/ErrWarn.ctl"/> <Item Name="eventvkey.ctl" Type="VI" URL="/&lt;vilib&gt;/event_ctls.llb/eventvkey.ctl"/> <Item Name="FileVersionInfo.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/FileVersionInfo.vi"/> <Item Name="FileVersionInformation.ctl" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/FileVersionInformation.ctl"/> <Item Name="Find Tag.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Find Tag.vi"/> <Item Name="FixedFileInfo_Struct.ctl" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/FixedFileInfo_Struct.ctl"/> <Item Name="Format Message String.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Format Message String.vi"/> <Item Name="General Error Handler Core CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler Core CORE.vi"/> <Item Name="General Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/General Error Handler.vi"/> <Item Name="Get LV Class Default Value.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/LVClass/Get LV Class Default Value.vi"/> <Item Name="Get String Text Bounds.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Get String Text Bounds.vi"/> <Item Name="Get Text Rect.vi" Type="VI" URL="/&lt;vilib&gt;/picture/picture.llb/Get Text Rect.vi"/> <Item Name="GetFileVersionInfo.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/GetFileVersionInfo.vi"/> <Item Name="GetFileVersionInfoSize.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/GetFileVersionInfoSize.vi"/> <Item Name="GetHelpDir.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetHelpDir.vi"/> <Item Name="GetRTHostConnectedProp.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/GetRTHostConnectedProp.vi"/> <Item Name="Longest Line Length in Pixels.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Longest Line Length in Pixels.vi"/> <Item Name="LVBoundsTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVBoundsTypeDef.ctl"/> <Item Name="LVRectTypeDef.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/miscctls.llb/LVRectTypeDef.ctl"/> <Item Name="MoveMemory.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/MoveMemory.vi"/> <Item Name="NI_FileType.lvlib" Type="Library" URL="/&lt;vilib&gt;/Utility/lvfile.llb/NI_FileType.lvlib"/> <Item Name="Not Found Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Not Found Dialog.vi"/> <Item Name="Search and Replace Pattern.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Search and Replace Pattern.vi"/> <Item Name="Set Bold Text.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set Bold Text.vi"/> <Item Name="Set String Value.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Set String Value.vi"/> <Item Name="Simple Error Handler.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Simple Error Handler.vi"/> <Item Name="Stall Data Flow.vim" Type="VI" URL="/&lt;vilib&gt;/Utility/Stall Data Flow.vim"/> <Item Name="TagReturnType.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/TagReturnType.ctl"/> <Item Name="Three Button Dialog CORE.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog CORE.vi"/> <Item Name="Three Button Dialog.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Three Button Dialog.vi"/> <Item Name="Trim Whitespace.vi" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/Trim Whitespace.vi"/> <Item Name="VerQueryValue.vi" Type="VI" URL="/&lt;vilib&gt;/Platform/fileVersionInfo.llb/VerQueryValue.vi"/> <Item Name="whitespace.ctl" Type="VI" URL="/&lt;vilib&gt;/Utility/error.llb/whitespace.ctl"/> </Item> <Item Name="kernel32.dll" Type="Document" URL="kernel32.dll"> <Property Name="NI.PreserveRelativePath" Type="Bool">true</Property> </Item> <Item Name="version.dll" Type="Document" URL="version.dll"> <Property Name="NI.PreserveRelativePath" Type="Bool">true</Property> </Item> </Item> <Item Name="Build Specifications" Type="Build"> <Item Name="picoG Exe" Type="EXE"> <Property Name="App_copyErrors" Type="Bool">true</Property> <Property Name="App_INI_aliasGUID" Type="Str">{C4094243-4445-4A51-85C4-70738F9A752C}</Property> <Property Name="App_INI_GUID" Type="Str">{238D7C86-EE81-4001-9B45-68799B4E8BBD}</Property> <Property Name="App_serverConfig.httpPort" Type="Int">8002</Property> <Property Name="App_serverType" Type="Int">0</Property> <Property Name="App_winsec.description" Type="Str">http://www.NI.com</Property> <Property Name="Bld_autoIncrement" Type="Bool">true</Property> <Property Name="Bld_buildCacheID" Type="Str">{6242D0F1-142E-4C98-9B67-DC3E7CFDC873}</Property> <Property Name="Bld_buildSpecName" Type="Str">picoG Exe</Property> <Property Name="Bld_excludeDependentPPLs" Type="Bool">true</Property> <Property Name="Bld_excludeInlineSubVIs" Type="Bool">true</Property> <Property Name="Bld_excludeLibraryItems" Type="Bool">true</Property> <Property Name="Bld_excludePolymorphicVIs" Type="Bool">true</Property> <Property Name="Bld_localDestDir" Type="Path">../Builds/picoG/bin</Property> <Property Name="Bld_localDestDirType" Type="Str">relativeToCommon</Property> <Property Name="Bld_modifyLibraryFile" Type="Bool">true</Property> <Property Name="Bld_previewCacheID" Type="Str">{4BD6DCF4-6B98-47BE-91EF-87CAC6846FF1}</Property> <Property Name="Bld_version.build" Type="Int">2</Property> <Property Name="Bld_version.major" Type="Int">0</Property> <Property Name="Bld_version.minor" Type="Int">1</Property> <Property Name="Bld_version.patch" Type="Int">0</Property> <Property Name="Destination[0].destName" Type="Str">picoG.exe</Property> <Property Name="Destination[0].path" Type="Path">../Builds/picoG/bin/picoG.exe</Property> <Property Name="Destination[0].preserveHierarchy" Type="Bool">true</Property> <Property Name="Destination[0].type" Type="Str">App</Property> <Property Name="Destination[1].destName" Type="Str">Support Directory</Property> <Property Name="Destination[1].path" Type="Path">../Builds/picoG/bin/data</Property> <Property Name="DestinationCount" Type="Int">2</Property> <Property Name="Exe_iconItemID" Type="Ref">/My Computer/Gbird-16-outline.ico</Property> <Property Name="Source[0].itemID" Type="Str">{08E41F54-07FA-4356-9513-0C75605D0039}</Property> <Property Name="Source[0].type" Type="Str">Container</Property> <Property Name="Source[1].destinationIndex" Type="Int">0</Property> <Property Name="Source[1].itemID" Type="Ref">/My Computer/SplashLoader.vi</Property> <Property Name="Source[1].sourceInclusion" Type="Str">TopLevel</Property> <Property Name="Source[1].type" Type="Str">VI</Property> <Property Name="SourceCount" Type="Int">2</Property> <Property Name="TgtF_companyName" Type="Str">NI</Property> <Property Name="TgtF_enableDebugging" Type="Bool">true</Property> <Property Name="TgtF_fileDescription" Type="Str">picoG Deploy Tool</Property> <Property Name="TgtF_internalName" Type="Str">picoG Exe</Property> <Property Name="TgtF_legalCopyright" Type="Str">Copyright © 2021 NI</Property> <Property Name="TgtF_productName" Type="Str">picoG Exe</Property> <Property Name="TgtF_targetfileGUID" Type="Str">{7C1F2543-356C-4C38-88A1-707B5B61E361}</Property> <Property Name="TgtF_targetfileName" Type="Str">picoG.exe</Property> <Property Name="TgtF_versionIndependent" Type="Bool">true</Property> </Item> </Item> </Item> </Project>
LabVIEW
1
MicroLabVIEW/MicroLabVIEW
lvproj/PicoG-Exe.lvproj
[ "MIT" ]
NAME ParaView::ClientKit LIBRARY_NAME vtkPVClientKit
Kit
0
xj361685640/ParaView
Clients/Catalyst/vtk.kit
[ "Apache-2.0", "BSD-3-Clause" ]
# Generated by detect.nim const AIO_ALLDONE* = cint(1) AIO_CANCELED* = cint(2) AIO_NOTCANCELED* = cint(4) LIO_NOP* = cint(0) LIO_NOWAIT* = cint(1) LIO_READ* = cint(1) LIO_WAIT* = cint(2) LIO_WRITE* = cint(2) RTLD_LAZY* = cint(1) RTLD_NOW* = cint(2) RTLD_GLOBAL* = cint(8) RTLD_LOCAL* = cint(4) E2BIG* = cint(7) EACCES* = cint(13) EADDRINUSE* = cint(48) EADDRNOTAVAIL* = cint(49) EAFNOSUPPORT* = cint(47) EAGAIN* = cint(35) EALREADY* = cint(37) EBADF* = cint(9) EBADMSG* = cint(94) EBUSY* = cint(16) ECANCELED* = cint(89) ECHILD* = cint(10) ECONNABORTED* = cint(53) ECONNREFUSED* = cint(61) ECONNRESET* = cint(54) EDEADLK* = cint(11) EDESTADDRREQ* = cint(39) EDOM* = cint(33) EDQUOT* = cint(69) EEXIST* = cint(17) EFAULT* = cint(14) EFBIG* = cint(27) EHOSTUNREACH* = cint(65) EIDRM* = cint(90) EILSEQ* = cint(92) EINPROGRESS* = cint(36) EINTR* = cint(4) EINVAL* = cint(22) EIO* = cint(5) EISCONN* = cint(56) EISDIR* = cint(21) ELOOP* = cint(62) EMFILE* = cint(24) EMLINK* = cint(31) EMSGSIZE* = cint(40) EMULTIHOP* = cint(95) ENAMETOOLONG* = cint(63) ENETDOWN* = cint(50) ENETRESET* = cint(52) ENETUNREACH* = cint(51) ENFILE* = cint(23) ENOBUFS* = cint(55) ENODATA* = cint(96) ENODEV* = cint(19) ENOENT* = cint(2) ENOEXEC* = cint(8) ENOLCK* = cint(77) ENOLINK* = cint(97) ENOMEM* = cint(12) ENOMSG* = cint(91) ENOPROTOOPT* = cint(42) ENOSPC* = cint(28) ENOSR* = cint(98) ENOSTR* = cint(99) ENOSYS* = cint(78) ENOTCONN* = cint(57) ENOTDIR* = cint(20) ENOTEMPTY* = cint(66) ENOTSOCK* = cint(38) ENOTSUP* = cint(45) ENOTTY* = cint(25) ENXIO* = cint(6) EOPNOTSUPP* = cint(102) EOVERFLOW* = cint(84) EPERM* = cint(1) EPIPE* = cint(32) EPROTO* = cint(100) EPROTONOSUPPORT* = cint(43) EPROTOTYPE* = cint(41) ERANGE* = cint(34) EROFS* = cint(30) ESPIPE* = cint(29) ESRCH* = cint(3) ESTALE* = cint(70) ETIME* = cint(101) ETIMEDOUT* = cint(60) ETXTBSY* = cint(26) EWOULDBLOCK* = cint(35) EXDEV* = cint(18) F_DUPFD* = cint(0) F_GETFD* = cint(1) F_SETFD* = cint(2) F_GETFL* = cint(3) F_SETFL* = cint(4) F_GETLK* = cint(7) F_SETLK* = cint(8) F_SETLKW* = cint(9) F_GETOWN* = cint(5) F_SETOWN* = cint(6) FD_CLOEXEC* = cint(1) F_RDLCK* = cint(1) F_UNLCK* = cint(2) F_WRLCK* = cint(3) O_CREAT* = cint(512) O_EXCL* = cint(2048) O_NOCTTY* = cint(131072) O_TRUNC* = cint(1024) O_APPEND* = cint(8) O_DSYNC* = cint(4194304) O_NONBLOCK* = cint(4) O_SYNC* = cint(128) O_ACCMODE* = cint(3) O_RDONLY* = cint(0) O_RDWR* = cint(2) O_WRONLY* = cint(1) FE_DIVBYZERO* = cint(4) FE_INEXACT* = cint(32) FE_INVALID* = cint(1) FE_OVERFLOW* = cint(8) FE_UNDERFLOW* = cint(16) FE_ALL_EXCEPT* = cint(63) FE_DOWNWARD* = cint(1024) FE_TONEAREST* = cint(0) FE_TOWARDZERO* = cint(3072) FE_UPWARD* = cint(2048) FE_DFL_ENV* = when defined(amd64): cast[pointer](0x7fff9533b1b4) else: cast[pointer](0x904797f4) MM_HARD* = cint(1) MM_SOFT* = cint(2) MM_FIRM* = cint(4) MM_APPL* = cint(16) MM_UTIL* = cint(32) MM_OPSYS* = cint(64) MM_RECOVER* = cint(4096) MM_NRECOV* = cint(8192) MM_HALT* = cint(1) MM_ERROR* = cint(2) MM_WARNING* = cint(3) MM_INFO* = cint(4) MM_NOSEV* = cint(0) MM_PRINT* = cint(256) MM_CONSOLE* = cint(512) MM_OK* = cint(0) MM_NOTOK* = cint(3) MM_NOMSG* = cint(1) MM_NOCON* = cint(2) FNM_NOMATCH* = cint(1) FNM_PATHNAME* = cint(2) FNM_PERIOD* = cint(4) FNM_NOESCAPE* = cint(1) FNM_NOSYS* = cint(-1) FTW_F* = cint(0) FTW_D* = cint(1) FTW_DNR* = cint(2) FTW_DP* = cint(3) FTW_NS* = cint(4) FTW_SL* = cint(5) FTW_SLN* = cint(6) FTW_PHYS* = cint(1) FTW_MOUNT* = cint(2) FTW_DEPTH* = cint(4) FTW_CHDIR* = cint(8) GLOB_APPEND* = cint(1) GLOB_DOOFFS* = cint(2) GLOB_ERR* = cint(4) GLOB_MARK* = cint(8) GLOB_NOCHECK* = cint(16) GLOB_NOESCAPE* = cint(8192) GLOB_NOSORT* = cint(32) GLOB_ABORTED* = cint(-2) GLOB_NOMATCH* = cint(-3) GLOB_NOSPACE* = cint(-1) GLOB_NOSYS* = cint(-4) CODESET* = cint(0) D_T_FMT* = cint(1) D_FMT* = cint(2) T_FMT* = cint(3) T_FMT_AMPM* = cint(4) AM_STR* = cint(5) PM_STR* = cint(6) DAY_1* = cint(7) DAY_2* = cint(8) DAY_3* = cint(9) DAY_4* = cint(10) DAY_5* = cint(11) DAY_6* = cint(12) DAY_7* = cint(13) ABDAY_1* = cint(14) ABDAY_2* = cint(15) ABDAY_3* = cint(16) ABDAY_4* = cint(17) ABDAY_5* = cint(18) ABDAY_6* = cint(19) ABDAY_7* = cint(20) MON_1* = cint(21) MON_2* = cint(22) MON_3* = cint(23) MON_4* = cint(24) MON_5* = cint(25) MON_6* = cint(26) MON_7* = cint(27) MON_8* = cint(28) MON_9* = cint(29) MON_10* = cint(30) MON_11* = cint(31) MON_12* = cint(32) ABMON_1* = cint(33) ABMON_2* = cint(34) ABMON_3* = cint(35) ABMON_4* = cint(36) ABMON_5* = cint(37) ABMON_6* = cint(38) ABMON_7* = cint(39) ABMON_8* = cint(40) ABMON_9* = cint(41) ABMON_10* = cint(42) ABMON_11* = cint(43) ABMON_12* = cint(44) ERA* = cint(45) ERA_D_FMT* = cint(46) ERA_D_T_FMT* = cint(47) ERA_T_FMT* = cint(48) ALT_DIGITS* = cint(49) RADIXCHAR* = cint(50) THOUSEP* = cint(51) YESEXPR* = cint(52) NOEXPR* = cint(53) CRNCYSTR* = cint(56) LC_ALL* = cint(0) LC_COLLATE* = cint(1) LC_CTYPE* = cint(2) LC_MESSAGES* = cint(6) LC_MONETARY* = cint(3) LC_NUMERIC* = cint(4) LC_TIME* = cint(5) PTHREAD_CANCEL_ASYNCHRONOUS* = cint(0) PTHREAD_CANCEL_ENABLE* = cint(1) PTHREAD_CANCEL_DEFERRED* = cint(2) PTHREAD_CANCEL_DISABLE* = cint(0) PTHREAD_CREATE_DETACHED* = cint(2) PTHREAD_CREATE_JOINABLE* = cint(1) PTHREAD_EXPLICIT_SCHED* = cint(2) PTHREAD_INHERIT_SCHED* = cint(1) PTHREAD_MUTEX_DEFAULT* = cint(0) PTHREAD_MUTEX_ERRORCHECK* = cint(1) PTHREAD_MUTEX_NORMAL* = cint(0) PTHREAD_MUTEX_RECURSIVE* = cint(2) PTHREAD_PRIO_INHERIT* = cint(1) PTHREAD_PRIO_NONE* = cint(0) PTHREAD_PRIO_PROTECT* = cint(2) PTHREAD_PROCESS_SHARED* = cint(1) PTHREAD_PROCESS_PRIVATE* = cint(2) PTHREAD_SCOPE_PROCESS* = cint(2) PTHREAD_SCOPE_SYSTEM* = cint(1) F_OK* = cint(0) R_OK* = cint(4) W_OK* = cint(2) X_OK* = cint(1) CS_PATH* = cint(1) CS_POSIX_V6_ILP32_OFF32_CFLAGS* = cint(2) CS_POSIX_V6_ILP32_OFF32_LDFLAGS* = cint(3) CS_POSIX_V6_ILP32_OFF32_LIBS* = cint(4) CS_POSIX_V6_ILP32_OFFBIG_CFLAGS* = cint(5) CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS* = cint(6) CS_POSIX_V6_ILP32_OFFBIG_LIBS* = cint(7) CS_POSIX_V6_LP64_OFF64_CFLAGS* = cint(8) CS_POSIX_V6_LP64_OFF64_LDFLAGS* = cint(9) CS_POSIX_V6_LP64_OFF64_LIBS* = cint(10) CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS* = cint(11) CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS* = cint(12) CS_POSIX_V6_LPBIG_OFFBIG_LIBS* = cint(13) CS_POSIX_V6_WIDTH_RESTRICTED_ENVS* = cint(14) F_LOCK* = cint(1) F_TEST* = cint(3) F_TLOCK* = cint(2) F_ULOCK* = cint(0) PC_2_SYMLINKS* = cint(15) PC_ALLOC_SIZE_MIN* = cint(16) PC_ASYNC_IO* = cint(17) PC_CHOWN_RESTRICTED* = cint(7) PC_FILESIZEBITS* = cint(18) PC_LINK_MAX* = cint(1) PC_MAX_CANON* = cint(2) PC_MAX_INPUT* = cint(3) PC_NAME_MAX* = cint(4) PC_NO_TRUNC* = cint(8) PC_PATH_MAX* = cint(5) PC_PIPE_BUF* = cint(6) PC_PRIO_IO* = cint(19) PC_REC_INCR_XFER_SIZE* = cint(20) PC_REC_MIN_XFER_SIZE* = cint(22) PC_REC_XFER_ALIGN* = cint(23) PC_SYMLINK_MAX* = cint(24) PC_SYNC_IO* = cint(25) PC_VDISABLE* = cint(9) SC_2_C_BIND* = cint(18) SC_2_C_DEV* = cint(19) SC_2_CHAR_TERM* = cint(20) SC_2_FORT_DEV* = cint(21) SC_2_FORT_RUN* = cint(22) SC_2_LOCALEDEF* = cint(23) SC_2_PBS* = cint(59) SC_2_PBS_ACCOUNTING* = cint(60) SC_2_PBS_CHECKPOINT* = cint(61) SC_2_PBS_LOCATE* = cint(62) SC_2_PBS_MESSAGE* = cint(63) SC_2_PBS_TRACK* = cint(64) SC_2_SW_DEV* = cint(24) SC_2_UPE* = cint(25) SC_2_VERSION* = cint(17) SC_ADVISORY_INFO* = cint(65) SC_AIO_LISTIO_MAX* = cint(42) SC_AIO_MAX* = cint(43) SC_AIO_PRIO_DELTA_MAX* = cint(44) SC_ARG_MAX* = cint(1) SC_ASYNCHRONOUS_IO* = cint(28) SC_ATEXIT_MAX* = cint(107) SC_BARRIERS* = cint(66) SC_BC_BASE_MAX* = cint(9) SC_BC_DIM_MAX* = cint(10) SC_BC_SCALE_MAX* = cint(11) SC_BC_STRING_MAX* = cint(12) SC_CHILD_MAX* = cint(2) SC_CLK_TCK* = cint(3) SC_CLOCK_SELECTION* = cint(67) SC_COLL_WEIGHTS_MAX* = cint(13) SC_CPUTIME* = cint(68) SC_DELAYTIMER_MAX* = cint(45) SC_EXPR_NEST_MAX* = cint(14) SC_FSYNC* = cint(38) SC_GETGR_R_SIZE_MAX* = cint(70) SC_GETPW_R_SIZE_MAX* = cint(71) SC_HOST_NAME_MAX* = cint(72) SC_IOV_MAX* = cint(56) SC_IPV6* = cint(118) SC_JOB_CONTROL* = cint(6) SC_LINE_MAX* = cint(15) SC_LOGIN_NAME_MAX* = cint(73) SC_MAPPED_FILES* = cint(47) SC_MEMLOCK* = cint(30) SC_MEMLOCK_RANGE* = cint(31) SC_MEMORY_PROTECTION* = cint(32) SC_MESSAGE_PASSING* = cint(33) SC_MONOTONIC_CLOCK* = cint(74) SC_MQ_OPEN_MAX* = cint(46) SC_MQ_PRIO_MAX* = cint(75) SC_NGROUPS_MAX* = cint(4) SC_OPEN_MAX* = cint(5) SC_PAGE_SIZE* = cint(29) SC_PRIORITIZED_IO* = cint(34) SC_PRIORITY_SCHEDULING* = cint(35) SC_RAW_SOCKETS* = cint(119) SC_RE_DUP_MAX* = cint(16) SC_READER_WRITER_LOCKS* = cint(76) SC_REALTIME_SIGNALS* = cint(36) SC_REGEXP* = cint(77) SC_RTSIG_MAX* = cint(48) SC_SAVED_IDS* = cint(7) SC_SEM_NSEMS_MAX* = cint(49) SC_SEM_VALUE_MAX* = cint(50) SC_SEMAPHORES* = cint(37) SC_SHARED_MEMORY_OBJECTS* = cint(39) SC_SHELL* = cint(78) SC_SIGQUEUE_MAX* = cint(51) SC_SPAWN* = cint(79) SC_SPIN_LOCKS* = cint(80) SC_SPORADIC_SERVER* = cint(81) SC_SS_REPL_MAX* = cint(126) SC_STREAM_MAX* = cint(26) SC_SYMLOOP_MAX* = cint(120) SC_SYNCHRONIZED_IO* = cint(40) SC_THREAD_ATTR_STACKADDR* = cint(82) SC_THREAD_ATTR_STACKSIZE* = cint(83) SC_THREAD_CPUTIME* = cint(84) SC_THREAD_DESTRUCTOR_ITERATIONS* = cint(85) SC_THREAD_KEYS_MAX* = cint(86) SC_THREAD_PRIO_INHERIT* = cint(87) SC_THREAD_PRIO_PROTECT* = cint(88) SC_THREAD_PRIORITY_SCHEDULING* = cint(89) SC_THREAD_PROCESS_SHARED* = cint(90) SC_THREAD_SAFE_FUNCTIONS* = cint(91) SC_THREAD_SPORADIC_SERVER* = cint(92) SC_THREAD_STACK_MIN* = cint(93) SC_THREAD_THREADS_MAX* = cint(94) SC_THREADS* = cint(96) SC_TIMEOUTS* = cint(95) SC_TIMER_MAX* = cint(52) SC_TIMERS* = cint(41) SC_TRACE* = cint(97) SC_TRACE_EVENT_FILTER* = cint(98) SC_TRACE_EVENT_NAME_MAX* = cint(127) SC_TRACE_INHERIT* = cint(99) SC_TRACE_LOG* = cint(100) SC_TRACE_NAME_MAX* = cint(128) SC_TRACE_SYS_MAX* = cint(129) SC_TRACE_USER_EVENT_MAX* = cint(130) SC_TTY_NAME_MAX* = cint(101) SC_TYPED_MEMORY_OBJECTS* = cint(102) SC_TZNAME_MAX* = cint(27) SC_V6_ILP32_OFF32* = cint(103) SC_V6_ILP32_OFFBIG* = cint(104) SC_V6_LP64_OFF64* = cint(105) SC_V6_LPBIG_OFFBIG* = cint(106) SC_VERSION* = cint(8) SC_XBS5_ILP32_OFF32* = cint(122) SC_XBS5_ILP32_OFFBIG* = cint(123) SC_XBS5_LP64_OFF64* = cint(124) SC_XBS5_LPBIG_OFFBIG* = cint(125) SC_XOPEN_CRYPT* = cint(108) SC_XOPEN_ENH_I18N* = cint(109) SC_XOPEN_LEGACY* = cint(110) SC_XOPEN_REALTIME* = cint(111) SC_XOPEN_REALTIME_THREADS* = cint(112) SC_XOPEN_SHM* = cint(113) SC_XOPEN_STREAMS* = cint(114) SC_XOPEN_UNIX* = cint(115) SC_XOPEN_VERSION* = cint(116) SEEK_SET* = cint(0) SEEK_CUR* = cint(1) SEEK_END* = cint(2) SEM_FAILED* = cast[pointer](-1) IPC_CREAT* = cint(512) IPC_EXCL* = cint(1024) IPC_NOWAIT* = cint(2048) IPC_PRIVATE* = cint(0) IPC_RMID* = cint(0) IPC_SET* = cint(1) IPC_STAT* = cint(2) S_IFMT* = cint(61440) S_IFBLK* = cint(24576) S_IFCHR* = cint(8192) S_IFIFO* = cint(4096) S_IFREG* = cint(32768) S_IFDIR* = cint(16384) S_IFLNK* = cint(40960) S_IFSOCK* = cint(49152) S_IRWXU* = cint(448) S_IRUSR* = cint(256) S_IWUSR* = cint(128) S_IXUSR* = cint(64) S_IRWXG* = cint(56) S_IRGRP* = cint(32) S_IWGRP* = cint(16) S_IXGRP* = cint(8) S_IRWXO* = cint(7) S_IROTH* = cint(4) S_IWOTH* = cint(2) S_IXOTH* = cint(1) S_ISUID* = cint(2048) S_ISGID* = cint(1024) S_ISVTX* = cint(512) ST_RDONLY* = cint(1) ST_NOSUID* = cint(2) PROT_READ* = cint(1) PROT_WRITE* = cint(2) PROT_EXEC* = cint(4) PROT_NONE* = cint(0) MAP_SHARED* = cint(1) MAP_PRIVATE* = cint(2) MAP_FIXED* = cint(16) MS_ASYNC* = cint(1) MS_SYNC* = cint(16) MS_INVALIDATE* = cint(2) MCL_CURRENT* = cint(1) MCL_FUTURE* = cint(2) MAP_FAILED* = cast[pointer](-1) POSIX_MADV_NORMAL* = cint(0) POSIX_MADV_SEQUENTIAL* = cint(2) POSIX_MADV_RANDOM* = cint(1) POSIX_MADV_WILLNEED* = cint(3) POSIX_MADV_DONTNEED* = cint(4) CLOCKS_PER_SEC* = clong(1000000) WNOHANG* = cint(1) WUNTRACED* = cint(2) WEXITED* = cint(4) WSTOPPED* = cint(8) WCONTINUED* = cint(16) WNOWAIT* = cint(32) SIGEV_NONE* = cint(0) SIGEV_SIGNAL* = cint(1) SIGEV_THREAD* = cint(3) SIGABRT* = cint(6) SIGALRM* = cint(14) SIGBUS* = cint(10) SIGCHLD* = cint(20) SIGCONT* = cint(19) SIGFPE* = cint(8) SIGHUP* = cint(1) SIGILL* = cint(4) SIGINT* = cint(2) SIGKILL* = cint(9) SIGPIPE* = cint(13) SIGQUIT* = cint(3) SIGSEGV* = cint(11) SIGSTOP* = cint(17) SIGTERM* = cint(15) SIGTSTP* = cint(18) SIGTTIN* = cint(21) SIGTTOU* = cint(22) SIGUSR1* = cint(30) SIGUSR2* = cint(31) SIGPROF* = cint(27) SIGSYS* = cint(12) SIGTRAP* = cint(5) SIGURG* = cint(16) SIGVTALRM* = cint(26) SIGXCPU* = cint(24) SIGXFSZ* = cint(25) SA_NOCLDSTOP* = cint(8) SIG_BLOCK* = cint(1) SIG_UNBLOCK* = cint(2) SIG_SETMASK* = cint(3) SA_ONSTACK* = cint(1) SA_RESETHAND* = cint(4) SA_RESTART* = cint(2) SA_SIGINFO* = cint(64) SA_NOCLDWAIT* = cint(32) SA_NODEFER* = cint(16) SS_ONSTACK* = cint(1) SS_DISABLE* = cint(4) MINSIGSTKSZ* = cint(32768) SIGSTKSZ* = cint(131072) NL_SETD* = cint(1) NL_CAT_LOCALE* = cint(1) SCHED_FIFO* = cint(4) SCHED_RR* = cint(2) SCHED_OTHER* = cint(1) FD_SETSIZE* = cint(1024) SCM_RIGHTS* = cint(1) SOCK_DGRAM* = cint(2) SOCK_RAW* = cint(3) SOCK_SEQPACKET* = cint(5) SOCK_STREAM* = cint(1) SOL_SOCKET* = cint(65535) SO_ACCEPTCONN* = cint(2) SO_BROADCAST* = cint(32) SO_DEBUG* = cint(1) SO_DONTROUTE* = cint(16) SO_ERROR* = cint(4103) SO_KEEPALIVE* = cint(8) SO_LINGER* = cint(128) SO_OOBINLINE* = cint(256) SO_RCVBUF* = cint(4098) SO_RCVLOWAT* = cint(4100) SO_RCVTIMEO* = cint(4102) SO_REUSEADDR* = cint(4) SO_SNDBUF* = cint(4097) SO_SNDLOWAT* = cint(4099) SO_SNDTIMEO* = cint(4101) SO_TYPE* = cint(4104) SOMAXCONN* = cint(128) MSG_CTRUNC* = cint(32) MSG_DONTROUTE* = cint(4) MSG_EOR* = cint(8) MSG_OOB* = cint(1) MSG_PEEK* = cint(2) MSG_TRUNC* = cint(16) MSG_WAITALL* = cint(64) AF_INET* = cint(2) AF_INET6* = cint(30) AF_UNIX* = cint(1) AF_UNSPEC* = cint(0) SHUT_RD* = cint(0) SHUT_RDWR* = cint(2) SHUT_WR* = cint(1) IPPROTO_IP* = cint(0) IPPROTO_IPV6* = cint(41) IPPROTO_ICMP* = cint(1) IPPROTO_RAW* = cint(255) IPPROTO_TCP* = cint(6) IPPROTO_UDP* = cint(17) INADDR_ANY* = cint(0) INADDR_BROADCAST* = cint(-1) INET_ADDRSTRLEN* = cint(16) IPV6_JOIN_GROUP* = cint(12) IPV6_LEAVE_GROUP* = cint(13) IPV6_MULTICAST_HOPS* = cint(10) IPV6_MULTICAST_IF* = cint(9) IPV6_MULTICAST_LOOP* = cint(11) IPV6_UNICAST_HOPS* = cint(4) IPV6_V6ONLY* = cint(27) IPPORT_RESERVED* = cint(1024) HOST_NOT_FOUND* = cint(1) NO_DATA* = cint(4) NO_RECOVERY* = cint(3) TRY_AGAIN* = cint(2) AI_PASSIVE* = cint(1) AI_CANONNAME* = cint(2) AI_NUMERICHOST* = cint(4) AI_NUMERICSERV* = cint(4096) AI_V4MAPPED* = cint(2048) AI_ALL* = cint(256) AI_ADDRCONFIG* = cint(1024) NI_NOFQDN* = cint(1) NI_NUMERICHOST* = cint(2) NI_NAMEREQD* = cint(4) NI_NUMERICSERV* = cint(8) NI_DGRAM* = cint(16) EAI_AGAIN* = cint(2) EAI_BADFLAGS* = cint(3) EAI_FAIL* = cint(4) EAI_FAMILY* = cint(5) EAI_MEMORY* = cint(6) EAI_NONAME* = cint(8) EAI_SERVICE* = cint(9) EAI_SOCKTYPE* = cint(10) EAI_SYSTEM* = cint(11) EAI_OVERFLOW* = cint(14) POLLIN* = cshort(1) POLLRDNORM* = cshort(64) POLLRDBAND* = cshort(128) POLLPRI* = cshort(2) POLLOUT* = cshort(4) POLLWRNORM* = cshort(4) POLLWRBAND* = cshort(256) POLLERR* = cshort(8) POLLHUP* = cshort(16) POLLNVAL* = cshort(32) POSIX_SPAWN_RESETIDS* = cint(1) POSIX_SPAWN_SETPGROUP* = cint(2) POSIX_SPAWN_SETSIGDEF* = cint(4) POSIX_SPAWN_SETSIGMASK* = cint(8) IOFBF* = cint(0) IONBF* = cint(2)
Nimrod
1
alehander92/Nim
tools/detect/macosx_consts.nim
[ "MIT" ]
<template name="popout"> <div class="rc-popout-wrapper rc-popout--{{ type }}" draggable="true"> <div class="rc-popout rc-popout--{{ state }}" data-modal="modal"> <header class="rc-popout__header"> <h1 class="rc-popout__title">{{> icon icon="podcast"}}</h1> {{#if showVideoControls}} <div class="rc-popout__controls"> {{#if isPlaying}} <button class="rc-popout__controls--pause"> {{> icon icon="pause" }} </button> {{else}} <button class="rc-popout__controls--play"> {{> icon icon="play" }} </button> {{/if}} {{#if isMuted}} <button class="rc-popout__controls--unmute"> {{> icon icon="volume-mute" }} </button> {{else}} <button class="rc-popout__controls--mute"> {{> icon icon="volume" }} </button> {{/if}} </div> {{/if}} {{#if showStreamControls}} <div class="rc-popout__controls"> <button class="rc-popout__controls--record {{ getStreamStatus }}"> {{> icon icon="circle" }} </button> <span> {{ getStreamStatus }} </span> </div> {{/if}} {{#unless isAudioOnly}} <button class="contextual-bar__minimize js-minimize"> {{> icon classes="rc-popout__minimize" icon="arrow-down"}} </button> {{/unless}} <button class="contextual-bar__close js-close" aria-label="{{_ "Close"}}"> {{> icon classes="rc-popout__close" icon="plus"}} </button> </header> <section class="rc-popout__content rc-popout--{{ state }} "> {{#if content}} {{> Template.dynamic template=content data=data}} {{/if}} {{#if showVideoControls}} <div class="rc-popout__controls"> {{#if isPlaying}} <button class="rc-popout__controls--pause"> {{> icon icon="pause" }} </button> {{else}} <button class="rc-popout__controls--play"> {{> icon icon="play" }} </button> {{/if}} {{#if isMuted}} <button class="rc-popout__controls--unmute"> {{> icon icon="volume-mute" }} </button> {{else}} <button class="rc-popout__controls--mute"> {{> icon icon="volume" }} </button> {{/if}} </div> {{/if}} {{#if showStreamControls}} <div class="rc-popout__controls"> <button class="rc-popout__controls--record {{ getStreamStatus }}"> {{> icon icon="circle" }} </button> <span> {{ getStreamStatus }} </span> </div> {{/if}} </section> </div> </div> </template>
HTML
3
subramanir2143/Rocket.Chat
app/ui-utils/client/lib/popout.html
[ "MIT" ]
<files-datatable title-text="Host browser - {{ $ctrl.getRelativePath() }}" title-icon="fa-file" dataset="$ctrl.files" table-key="host_browser" order-by="Dir" is-root="$ctrl.isRoot()" go-to-parent="$ctrl.goToParent()" browse="$ctrl.browse(name)" rename="$ctrl.renameFile(name, newName)" download="$ctrl.downloadFile(name)" delete="$ctrl.confirmDeleteFile(name)" is-upload-allowed="true" on-file-selected-for-upload="($ctrl.onFileSelectedForUpload)" > </files-datatable>
HTML
4
dzma352/portainer
app/agent/components/host-browser/hostBrowser.html
[ "Zlib" ]
// rustfmt-format_macro_matchers: true macro_rules! foo { ($a:ident : $b:ty) => { $a(42): $b; }; ($a:ident $b:ident $c:ident) => { $a = $b + $c; }; }
Rust
3
mbc-git/rust
src/tools/rustfmt/tests/target/configs/format_macro_matchers/true.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="20dp" android:height="20dp" android:viewportWidth="20" android:viewportHeight="20" android:tint="?attr/colorControlNormal"> <path android:fillColor="@android:color/white" android:pathData="M14.5,3.75V4.5H13V4c0,-0.55 -0.45,-1 -1,-1H8C7.45,3 7,3.45 7,4v0.5H5.5V3.75C5.5,3.34 5.16,3 4.75,3h0C4.34,3 4,3.34 4,3.75v12.5C4,16.66 4.34,17 4.75,17h0c0.41,0 0.75,-0.34 0.75,-0.75V15.5H7V16c0,0.55 0.45,1 1,1h4c0.55,0 1,-0.45 1,-1v-0.5h1.5v0.75c0,0.41 0.34,0.75 0.75,0.75h0c0.41,0 0.75,-0.34 0.75,-0.75V3.75C16,3.34 15.66,3 15.25,3h0C14.84,3 14.5,3.34 14.5,3.75zM14.5,6v1.67H13V6H14.5zM13,9.17h1.5v1.67H13V9.17zM7,10.83H5.5V9.17H7V10.83zM7,6v1.67H5.5V6H7zM5.5,14v-1.67H7V14H5.5zM13,14v-1.67h1.5V14H13z"/> </vector>
XML
2
Imudassir77/material-design-icons
android/maps/local_movies/materialiconsround/black/res/drawable/round_local_movies_20.xml
[ "Apache-2.0" ]
CREATE TABLE `tb_bbvvzzczcw` ( `col_ruygkecjzp` longblob, `col_orycjbfrss` year(4) DEFAULT '2019', `col_aqqnunnega` varbinary(225) DEFAULT NULL, `col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0', UNIQUE KEY `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_hcvvpyqbtd` ( `col_ruygkecjzp` longblob, `col_orycjbfrss` year(4) DEFAULT '2019', `col_aqqnunnega` varbinary(225) DEFAULT NULL, `col_pxwauaruqw` enum('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT 'enum_or_set_0', UNIQUE KEY `col_ruygkecjzp` (`col_ruygkecjzp`(14),`col_orycjbfrss`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_ljqeyzesru` ( `col_qmvlxemsmt` datetime(6) DEFAULT NULL, `col_wcntsrfsjf` int(11) DEFAULT '1', `col_kekvofvtus` int(70) unsigned DEFAULT '1', `col_bhbfokpfhm` float DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `tb_rpuyybsdob` ( `col_qmvlxemsmt` datetime(6) DEFAULT NULL, `col_wcntsrfsjf` int(11) DEFAULT '1', `col_kekvofvtus` int(70) unsigned DEFAULT '1', `col_bhbfokpfhm` float DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `tb_wewsxxqmxd` ( `col_zmjbwpsrnw` timestamp(3) NULL DEFAULT CURRENT_TIMESTAMP(3), `col_qqzmxlmztj` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') CHARACTER SET utf8mb4 DEFAULT 'enum_or_set_0', `col_hwnlilelpf` smallint(5) unsigned DEFAULT '1', `col_oyeoemafea` date DEFAULT '2019-07-04', UNIQUE KEY `symb_biynehpjlu` (`col_hwnlilelpf`,`col_oyeoemafea`), UNIQUE KEY `uk_ztxuhpyaxo` (`col_zmjbwpsrnw`,`col_oyeoemafea`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `tb_yfjonexaag` ( `col_hfydymybbg` tinytext, UNIQUE KEY `symb_gpchhhvhwm` (`col_hfydymybbg`(20)) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
SQL
3
yuanweikang2020/canal
parse/src/test/resources/ddl/table/mysql_1.sql
[ "Apache-2.0" ]
#include <metal_stdlib> #include "OperationShaderTypes.h" using namespace metal; typedef struct { float2 center; } StretchDistortionUniform; fragment half4 stretchDistortionFragment(SingleInputVertexIO fragmentInput [[stage_in]], texture2d<half> inputTexture [[texture(0)]], constant StretchDistortionUniform& uniform [[buffer(1)]]) { constexpr sampler quadSampler; float2 normCoord = 2.0 * fragmentInput.textureCoordinate - 1.0; float2 normCenter = 2.0 * uniform.center - 1.0; normCoord -= normCenter; float2 s = sign(normCoord); normCoord = abs(normCoord); normCoord = 0.5 * normCoord + 0.5 * smoothstep(0.25, 0.5, normCoord) * normCoord; normCoord = s * normCoord; normCoord += normCenter; float2 textureCoordinateToUse = normCoord / 2.0 + 0.5; return inputTexture.sample(quadSampler, textureCoordinateToUse ); }
Metal
3
luoxiao/GPUImage3
framework/Source/Operations/StretchDistortion.metal
[ "BSD-3-Clause" ]
// run-pass #![allow(unused_variables)] // pretty-expanded FIXME #23616 pub fn main() { let x = [1, 2, 3]; let y = x; }
Rust
2
Eric-Arellano/rust
src/test/ui/issues/issue-16783.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
#!/uns/bin/guile -s !# ;;; $Id: cltests.scm,v 1.4 1999/03/17 07:40:56 gjb Exp $ -*- scwm -*- ;;; simple1 ;;; be sure $CASSOWARY_HOME/guile is in your $GUILE_LOAD_PATH ;;; guile will look for app/cassowary/libconstraints.so to be somewhere off ;;; of a directory listed in $GUILE_LOAD_PATH (use-modules (cassowary constraints)) (begin (define solver (make-cl-solver)) (define x (make-cl-variable "x" 167)) (define y (make-cl-variable "y" 2)) (cl-add-stay solver (list x y)) (define eq (make-cl-equality (make-cl-expression x) y)) (cl-add-constraint solver eq) (for-each (lambda (x) (display x)) (list "x = " (cl-value x) "\n" "y = " (cl-value y) "\n")) (= (cl-value x) (cl-value y))) (define solver (make-cl-solver)) (define clv-table (make-vector 20)) (define (clv-lookup-var id) (let ((v (hash-ref clv-table id))) (if v v (begin (set! v (make-cl-variable id)) (cl-add-stay solver v) (hash-set! clv-table id v) v)))) (define c1 (make-cl-constraint-from-string "x = y" clv-lookup-var)) (define c2 (make-cl-constraint-from-string "x = 5" clv-lookup-var)) (cl-add-constraint solver c1) (cl-add-constraint solver c2) (define x (clv-lookup-var "x")) (define y (clv-lookup-var "y")) ;;; justStay1 (begin (define solver (make-cl-solver)) (define x (make-cl-variable "x" 5)) (define y (make-cl-variable "y" 10)) (cl-add-stay solver (list x y)) (for-each (lambda (x) (display x)) (list "x = " (cl-value x) "\n" "y = " (cl-value y) "\n"))) ;;; addDelete1 (begin (define solver (make-cl-solver)) (define x (make-cl-variable "x")) (cl-add-constraint solver (make-cl-equality x (make-cl-expression 100) cls-weak)) (define c10 (make-cl-inequality x <= 10)) (define c20 (make-cl-inequality x <= 20)) (cl-add-constraint solver c10) (cl-add-constraint solver c20) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 10 (cl-remove-constraint solver c10) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 20 (cl-remove-constraint solver c20) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 100 (define c10again (make-cl-inequality x <= 10)) (cl-add-constraint solver c10 c10again) ;; (cl-solver-debug-print solver) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 10 (cl-remove-constraint solver c10) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 10 (cl-remove-constraint solver c10again) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n")) ;; want 100 ) ;; addDelSimple (begin (define solver (make-cl-solver)) (define x (make-cl-variable "x" 5)) (define y (make-cl-variable "y")) (cl-add-stay solver (list x y)) (define eq (make-cl-equality x (cl-times y 2))) (cl-add-constraint solver eq) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n" "y == " (cl-value y) "\n")) (cl-add-editvar solver x) (cl-begin-edit solver) (cl-suggest-value solver x 9) (cl-resolve solver) (for-each (lambda (x) (display x)) (list "x == " (cl-value x) "\n" "y == " (cl-value y) "\n")) (cl-end-edit solver) ) ;;; Local Variables: ;;; eval: (load "scwm") ;;; eval: (scwm-mode) ;;; End:
Scheme
4
crossmob/WinObjC
deps/3rdparty/cassowary-0.60/guile/cltests.scm
[ "MIT" ]
"! Free Selections Dialog CLASS zcl_abapgit_free_sel_dialog DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. TYPES: BEGIN OF ty_free_sel_field, name TYPE fieldname, only_parameter TYPE abap_bool, param_obligatory TYPE abap_bool, value TYPE string, value_range TYPE rsds_selopt_t, ddic_tabname TYPE tabname, ddic_fieldname TYPE fieldname, text TYPE rsseltext, END OF ty_free_sel_field, ty_free_sel_field_tab TYPE STANDARD TABLE OF ty_free_sel_field WITH DEFAULT KEY. TYPES: ty_syst_title TYPE c LENGTH 70. METHODS: constructor IMPORTING iv_title TYPE ty_syst_title OPTIONAL iv_frame_text TYPE ty_syst_title OPTIONAL, set_fields CHANGING ct_fields TYPE ty_free_sel_field_tab, show RAISING zcx_abapgit_cancel zcx_abapgit_exception. PROTECTED SECTION. PRIVATE SECTION. TYPES: ty_field_text_tab TYPE STANDARD TABLE OF rsdstexts WITH DEFAULT KEY. METHODS: convert_input_fields EXPORTING et_default_values TYPE rsds_trange es_restriction TYPE sscr_restrict_ds et_fields TYPE rsdsfields_t et_field_texts TYPE ty_field_text_tab, free_selections_init IMPORTING it_default_values TYPE rsds_trange is_restriction TYPE sscr_restrict_ds EXPORTING ev_selection_id TYPE dynselid CHANGING ct_fields TYPE rsdsfields_t ct_field_texts TYPE ty_field_text_tab RAISING zcx_abapgit_exception, free_selections_dialog IMPORTING iv_selection_id TYPE dynselid EXPORTING et_result_ranges TYPE rsds_trange CHANGING ct_fields TYPE rsdsfields_t RAISING zcx_abapgit_cancel zcx_abapgit_exception, validate_results IMPORTING it_result_ranges TYPE rsds_trange RAISING zcx_abapgit_exception, transfer_results_to_input IMPORTING it_result_ranges TYPE rsds_trange. DATA: mr_fields TYPE REF TO ty_free_sel_field_tab, mv_title TYPE ty_syst_title, mv_frame_text TYPE ty_syst_title. ENDCLASS. CLASS zcl_abapgit_free_sel_dialog IMPLEMENTATION. METHOD constructor. mv_title = iv_title. mv_frame_text = iv_frame_text. ENDMETHOD. METHOD convert_input_fields. CONSTANTS: lc_only_eq_optlist_name TYPE c LENGTH 10 VALUE 'ONLYEQ'. DATA: ls_parameter_opt_list TYPE sscr_opt_list. FIELD-SYMBOLS: <ls_input_field> TYPE ty_free_sel_field, <lt_input_fields> TYPE ty_free_sel_field_tab, <ls_free_sel_field> TYPE rsdsfields, <ls_restriction_ass> TYPE sscr_ass_ds, <ls_text> TYPE rsdstexts, <ls_default_value> TYPE rsds_range, <ls_default_value_range> TYPE rsds_frange, <ls_default_val_range_line> TYPE rsdsselopt. ASSERT mr_fields IS BOUND. ASSIGN mr_fields->* TO <lt_input_fields>. LOOP AT <lt_input_fields> ASSIGNING <ls_input_field>. APPEND INITIAL LINE TO et_fields ASSIGNING <ls_free_sel_field>. <ls_free_sel_field>-fieldname = <ls_input_field>-ddic_fieldname. <ls_free_sel_field>-tablename = <ls_input_field>-ddic_tabname. IF <ls_input_field>-only_parameter = abap_true. IF es_restriction IS INITIAL. ls_parameter_opt_list-name = lc_only_eq_optlist_name. ls_parameter_opt_list-options-eq = abap_true. APPEND ls_parameter_opt_list TO es_restriction-opt_list_tab. ENDIF. APPEND INITIAL LINE TO es_restriction-ass_tab ASSIGNING <ls_restriction_ass>. <ls_restriction_ass>-kind = 'S'. <ls_restriction_ass>-fieldname = <ls_input_field>-ddic_fieldname. <ls_restriction_ass>-tablename = <ls_input_field>-ddic_tabname. <ls_restriction_ass>-sg_main = 'I'. <ls_restriction_ass>-sg_addy = 'N'. <ls_restriction_ass>-op_main = lc_only_eq_optlist_name. ENDIF. IF <ls_input_field>-text IS NOT INITIAL. APPEND INITIAL LINE TO et_field_texts ASSIGNING <ls_text>. <ls_text>-fieldname = <ls_input_field>-ddic_fieldname. <ls_text>-tablename = <ls_input_field>-ddic_tabname. <ls_text>-text = <ls_input_field>-text. ENDIF. IF <ls_input_field>-value IS NOT INITIAL OR <ls_input_field>-value_range IS NOT INITIAL. READ TABLE et_default_values WITH KEY tablename = <ls_input_field>-ddic_tabname ASSIGNING <ls_default_value>. IF sy-subrc <> 0. APPEND INITIAL LINE TO et_default_values ASSIGNING <ls_default_value>. <ls_default_value>-tablename = <ls_input_field>-ddic_tabname. ENDIF. APPEND INITIAL LINE TO <ls_default_value>-frange_t ASSIGNING <ls_default_value_range>. <ls_default_value_range>-fieldname = <ls_input_field>-ddic_fieldname. IF <ls_input_field>-value IS NOT INITIAL. APPEND INITIAL LINE TO <ls_default_value_range>-selopt_t ASSIGNING <ls_default_val_range_line>. <ls_default_val_range_line>-sign = 'I'. <ls_default_val_range_line>-option = 'EQ'. <ls_default_val_range_line>-low = <ls_input_field>-value. ELSEIF <ls_input_field>-value_range IS NOT INITIAL. <ls_default_value_range>-selopt_t = <ls_input_field>-value_range. ENDIF. ENDIF. ENDLOOP. ENDMETHOD. METHOD free_selections_dialog. DATA ls_position TYPE zcl_abapgit_popups=>ty_popup_position. ls_position = zcl_abapgit_popups=>center( iv_width = 60 iv_height = lines( ct_fields ) + 15 ). CALL FUNCTION 'FREE_SELECTIONS_DIALOG' EXPORTING selection_id = iv_selection_id title = mv_title frame_text = mv_frame_text status = 1 start_col = ls_position-start_column start_row = ls_position-start_row as_window = abap_true no_intervals = abap_true tree_visible = abap_false IMPORTING field_ranges = et_result_ranges TABLES fields_tab = ct_fields EXCEPTIONS internal_error = 1 no_action = 2 selid_not_found = 3 illegal_status = 4 OTHERS = 5. CASE sy-subrc. WHEN 0 ##NEEDED. WHEN 2. RAISE EXCEPTION TYPE zcx_abapgit_cancel. WHEN OTHERS. zcx_abapgit_exception=>raise( |Error from FREE_SELECTIONS_DIALOG: { sy-subrc }| ). ENDCASE. ENDMETHOD. METHOD free_selections_init. CALL FUNCTION 'FREE_SELECTIONS_INIT' EXPORTING kind = 'F' field_ranges_int = it_default_values restriction = is_restriction IMPORTING selection_id = ev_selection_id TABLES fields_tab = ct_fields field_texts = ct_field_texts EXCEPTIONS fields_incomplete = 1 fields_no_join = 2 field_not_found = 3 no_tables = 4 table_not_found = 5 expression_not_supported = 6 incorrect_expression = 7 illegal_kind = 8 area_not_found = 9 inconsistent_area = 10 kind_f_no_fields_left = 11 kind_f_no_fields = 12 too_many_fields = 13 dup_field = 14 field_no_type = 15 field_ill_type = 16 dup_event_field = 17 node_not_in_ldb = 18 area_no_field = 19 OTHERS = 20. IF sy-subrc <> 0. zcx_abapgit_exception=>raise( |Error from FREE_SELECTIONS_INIT: { sy-subrc }| ). ENDIF. ENDMETHOD. METHOD set_fields. GET REFERENCE OF ct_fields INTO mr_fields. ENDMETHOD. METHOD show. DATA: lt_default_values TYPE rsds_trange, ls_restriction TYPE sscr_restrict_ds, lt_fields TYPE rsdsfields_t, lt_field_texts TYPE ty_field_text_tab, lv_repeat_dialog TYPE abap_bool VALUE abap_true, lv_selection_id TYPE dynselid, lt_results TYPE rsds_trange, lx_validation_error TYPE REF TO zcx_abapgit_exception. convert_input_fields( IMPORTING et_default_values = lt_default_values es_restriction = ls_restriction et_fields = lt_fields et_field_texts = lt_field_texts ). WHILE lv_repeat_dialog = abap_true. lv_repeat_dialog = abap_false. free_selections_init( EXPORTING it_default_values = lt_default_values is_restriction = ls_restriction IMPORTING ev_selection_id = lv_selection_id CHANGING ct_fields = lt_fields ct_field_texts = lt_field_texts ). free_selections_dialog( EXPORTING iv_selection_id = lv_selection_id IMPORTING et_result_ranges = lt_results CHANGING ct_fields = lt_fields ). TRY. validate_results( lt_results ). CATCH zcx_abapgit_exception INTO lx_validation_error. lv_repeat_dialog = abap_true. lt_default_values = lt_results. MESSAGE lx_validation_error TYPE 'I' DISPLAY LIKE 'E'. CONTINUE. ENDTRY. transfer_results_to_input( lt_results ). ENDWHILE. ENDMETHOD. METHOD transfer_results_to_input. FIELD-SYMBOLS: <ls_input_field> TYPE ty_free_sel_field, <lt_input_fields> TYPE ty_free_sel_field_tab, <ls_result_range_for_tab> TYPE rsds_range, <ls_result_range_line> TYPE rsds_frange, <ls_selopt_line> TYPE rsdsselopt. ASSIGN mr_fields->* TO <lt_input_fields>. ASSERT sy-subrc = 0. LOOP AT <lt_input_fields> ASSIGNING <ls_input_field>. READ TABLE it_result_ranges WITH KEY tablename = <ls_input_field>-ddic_tabname ASSIGNING <ls_result_range_for_tab>. IF sy-subrc = 0. READ TABLE <ls_result_range_for_tab>-frange_t WITH KEY fieldname = <ls_input_field>-ddic_fieldname ASSIGNING <ls_result_range_line>. IF sy-subrc = 0 AND <ls_result_range_line>-selopt_t IS NOT INITIAL. IF <ls_input_field>-only_parameter = abap_true. ASSERT lines( <ls_result_range_line>-selopt_t ) = 1. READ TABLE <ls_result_range_line>-selopt_t INDEX 1 ASSIGNING <ls_selopt_line>. ASSERT sy-subrc = 0. ASSERT <ls_selopt_line>-sign = 'I' AND <ls_selopt_line>-option = 'EQ' AND <ls_selopt_line>-high IS INITIAL. <ls_input_field>-value = <ls_selopt_line>-low. ELSE. <ls_input_field>-value_range = <ls_result_range_line>-selopt_t. ENDIF. ELSE. CLEAR: <ls_input_field>-value, <ls_input_field>-value_range. ENDIF. ELSE. CLEAR: <ls_input_field>-value, <ls_input_field>-value_range. ENDIF. ENDLOOP. ENDMETHOD. METHOD validate_results. DATA: ls_error_msg TYPE symsg, lv_ddut_fieldname TYPE fnam_____4, lv_value TYPE rsdsselop_. FIELD-SYMBOLS: <ls_result_range_for_tab> TYPE rsds_range, <ls_result_range_line> TYPE rsds_frange, <ls_input_field> TYPE ty_free_sel_field, <lt_input_fields> TYPE ty_free_sel_field_tab, <ls_selopt_line> TYPE rsdsselopt. ASSIGN mr_fields->* TO <lt_input_fields>. ASSERT sy-subrc = 0. LOOP AT it_result_ranges ASSIGNING <ls_result_range_for_tab>. LOOP AT <ls_result_range_for_tab>-frange_t ASSIGNING <ls_result_range_line>. READ TABLE <lt_input_fields> WITH KEY ddic_tabname = <ls_result_range_for_tab>-tablename ddic_fieldname = <ls_result_range_line>-fieldname ASSIGNING <ls_input_field>. ASSERT sy-subrc = 0. IF <ls_input_field>-only_parameter = abap_false. CONTINUE. ENDIF. CASE lines( <ls_result_range_line>-selopt_t ). WHEN 0. CLEAR lv_value. WHEN 1. READ TABLE <ls_result_range_line>-selopt_t INDEX 1 ASSIGNING <ls_selopt_line>. ASSERT sy-subrc = 0. lv_value = <ls_selopt_line>-low. WHEN OTHERS. ASSERT 1 = 2. ENDCASE. CLEAR ls_error_msg. lv_ddut_fieldname = <ls_input_field>-ddic_fieldname. CALL FUNCTION 'DDUT_INPUT_CHECK' EXPORTING tabname = <ls_input_field>-ddic_tabname fieldname = lv_ddut_fieldname value = lv_value accept_all_initial = abap_true value_list = 'S' IMPORTING msgid = ls_error_msg-msgid msgty = ls_error_msg-msgty msgno = ls_error_msg-msgno msgv1 = ls_error_msg-msgv1 msgv2 = ls_error_msg-msgv2 msgv3 = ls_error_msg-msgv3 msgv4 = ls_error_msg-msgv4. IF ls_error_msg IS NOT INITIAL. zcx_abapgit_exception=>raise_t100( iv_msgid = ls_error_msg-msgid iv_msgno = ls_error_msg-msgno iv_msgv1 = ls_error_msg-msgv1 iv_msgv2 = ls_error_msg-msgv2 iv_msgv3 = ls_error_msg-msgv3 iv_msgv4 = ls_error_msg-msgv4 ). ELSEIF <ls_input_field>-param_obligatory = abap_true AND lv_value IS INITIAL. zcx_abapgit_exception=>raise( |Field '{ <ls_input_field>-name }' is obligatory| ). ENDIF. ENDLOOP. ENDLOOP. ENDMETHOD. ENDCLASS.
ABAP
4
IvxLars/abapGit
src/ui/zcl_abapgit_free_sel_dialog.clas.abap
[ "MIT" ]
= Lists : Working with Structured Data > module Lists > import Basics > %hide Prelude.Basics.fst > %hide Prelude.Basics.snd > %hide Prelude.Nat.pred > %hide Prelude.List.(++) > %access public export > %default total == Pairs of Numbers In an inductive type definition, each constructor can take any number of arguments -- none (as with \idr{True} and \idr{Z}), one (as with \idr{S}), or more than one, as here: > data NatProd : Type where > Pair : Nat -> Nat -> NatProd This declaration can be read: "There is just one way to construct a pair of numbers: by applying the constructor \idr{Pair} to two arguments of type \idr{Nat}." ```idris λΠ> :t Pair 3 5 ``` Here are two simple functions for extracting the first and second components of a pair. The definitions also illustrate how to do pattern matching on two-argument constructors. > fst : (p : NatProd) -> Nat > fst (Pair x y) = x > snd : (p : NatProd) -> Nat > snd (Pair x y) = y ```idris λΠ> fst (Pair 3 5) 3 : Nat ``` Since pairs are used quite a bit, it is nice to be able to write them with the standard mathematical notation \idr{(x,y)} instead of \idr{Pair x y}. We can tell Idris to allow this with a \idr{syntax} declaration. > syntax "(" [x] "," [y] ")" = Pair x y The new pair notation can be used both in expressions and in pattern matches (indeed, we've actually seen this already in the previous chapter, in the definition of the \idr{minus} function -- this works because the pair notation is also provided as part of the standard library): ```idris λΠ> fst (3,5) 3 : Nat ``` > fst' : (p : NatProd) -> Nat > fst' (x,y) = x > snd' : (p : NatProd) -> Nat > snd' (x,y) = y > swap_pair : (p : NatProd) -> NatProd > swap_pair (x,y) = (y,x) Let's try to prove a few simple facts about pairs. If we state things in a particular (and slightly peculiar) way, we can complete proofs with just reflexivity (and its built-in simplification): > surjective_pairing' : (n,m : Nat) -> (n,m) = (fst (n,m), snd (n,m)) > surjective_pairing' n m = Refl But \idr{Refl} is not enough if we state the lemma in a more natural way: ```idris surjective_pairing_stuck : (p : NatProd) -> p = (fst p, snd p) surjective_pairing_stuck p = Refl ``` ``` When checking right hand side of surjective_pairing_stuck with expected type p = Pair (fst p) (snd p) ... Type mismatch between p and Pair (fst p) (snd p) ``` We have to expose the structure of \idr{p} so that Idris can perform the pattern match in \idr{fst} and \idr{snd}. We can do this with \idr{case}. > surjective_pairing : (p : NatProd) -> p = (fst p, snd p) > surjective_pairing p = case p of (n,m) => Refl Notice that \idr{case} matches just one pattern here. That's because \idr{NatProd}s can only be constructed in one way. === Exercise: 1 star (snd_fst_is_swap) > snd_fst_is_swap : (p : NatProd) -> (snd p, fst p) = swap_pair p > snd_fst_is_swap p = ?snd_fst_is_swap_rhs $\square$ === Exercise: 1 star, optional (fst_swap_is_snd) > fst_swap_is_snd : (p : NatProd) -> fst (swap_pair p) = snd p > fst_swap_is_snd p = ?fst_swap_is_snd_rhs $\square$ == Lists of Numbers Generalizing the definition of pairs, we can describe the type of _lists_ of numbers like this: "A list is either the empty list or else a pair of a number and another list." > data NatList : Type where > Nil : NatList > (::) : Nat -> NatList -> NatList For example, here is a three-element list: > mylist : NatList > mylist = (::) 1 ((::) 2 ((::) 3 Nil)) \todo[inline]{Edit the section - Idris's list sugar automatically works for anything with constructors \idr{Nil} and \idr{(::)}} As with pairs, it is more convenient to write lists in familiar programming notation. The following declarations allow us to use \idr{::} as an infix Cons operator and square brackets as an "outfix" notation for constructing lists. It is not necessary to understand the details of these declarations, but in case you are interested, here is roughly what's going on. The right associativity annotation tells Coq how to parenthesize expressions involving several uses of :: so that, for example, the next three declarations mean exactly the same thing: > mylist1 : NatList > mylist1 = 1 :: (2 :: (3 :: Nil)) > mylist2 : NatList > mylist2 = 1::2::3::[] > mylist3 : NatList > mylist3 = [1,2,3] The at level 60 part tells Coq how to parenthesize expressions that involve both :: and some other infix operator. For example, since we defined + as infix notation for the plus function at level 50, ```coq Notation "x + y" := ( plus x y ) ( at level 50, left associativity ). ``` the `+` operator will bind tighter than `::` , so `1 + 2 :: [3]` will be parsed, as we'd expect, as `(1 + 2) :: [3]` rather than `1 + (2 :: [3])`. (Expressions like "`1 + 2 :: [3]`" can be a little confusing when you read them in a `.v` file. The inner brackets, around `3`, indicate a list, but the outer brackets, which are invisible in the HTML rendering, are there to instruct the "coqdoc" tool that the bracketed part should be displayed as Coq code rather than running text.) The second and third `Notation` declarations above introduce the standard square-bracket notation for lists; the right-hand side of the third one illustrates Coq's syntax for declaring n-ary notations and translating them to nested sequences of binary constructors. === Repeat A number of functions are useful for manipulating lists. For example, the \idr{repeat} function takes a number \idr{n} and a \idr{count} and returns a list of length \idr{count} where every element is \idr{n}. > repeat : (n, count : Nat) -> NatList > repeat n Z = [] > repeat n (S k) = n :: repeat n k === Length The \idr{length} function calculates the length of a list. > length : (l : NatList) -> Nat > length [] = Z > length (h :: t) = S (length t) === Append The \idr{app} function concatenates (appends) two lists. > app : (l1, l2 : NatList) -> NatList > app [] l2 = l2 > app (h :: t) l2 = h :: app t l2 Actually, \idr{app} will be used a lot in some parts of what follows, so it is convenient to have an infix operator for it. > infixr 7 ++ > (++) : (x, y : NatList) -> NatList > (++) = app > test_app1 : [1,2,3] ++ [4,5,6] = [1,2,3,4,5,6] > test_app1 = Refl > test_app2 : [] ++ [4,5] = [4,5] > test_app2 = Refl > test_app3 : [1,2,3] ++ [] = [1,2,3] > test_app3 = Refl === Head (with default) and Tail Here are two smaller examples of programming with lists. The \idr{hd} function returns the first element (the "head") of the list, while \idr{tl} returns everything but the first element (the "tail"). Of course, the empty list has no first element, so we must pass a default value to be returned in that case. > hd : (default : Nat) -> (l : NatList) -> Nat > hd default [] = default > hd default (h :: t) = h > tl : (l : NatList) -> NatList > tl [] = [] > tl (h :: t) = t > test_hd1 : hd 0 [1,2,3] = 1 > test_hd1 = Refl > test_hd2 : hd 0 [] = 0 > test_hd2 = Refl > test_tl : tl [1,2,3] = [2,3] > test_tl = Refl === Exercises ==== Exercise: 2 stars, recommended (list_funs) Complete the definitions of \idr{nonzeros}, \idr{oddmembers} and \idr{countoddmembers} below. Have a look at the tests to understand what these functions should do. > nonzeros : (l : NatList) -> NatList > nonzeros l = ?nonzeros_rhs > test_nonzeros : nonzeros [0,1,0,2,3,0,0] = [1,2,3] > test_nonzeros = ?test_nonzeros_rhs > oddmembers : (l : NatList) -> NatList > oddmembers l = ?oddmembers_rhs > test_oddmembers : oddmembers [0,1,0,2,3,0,0] = [1,3] > test_oddmembers = ?test_oddmembers_rhs > countoddmembers : (l : NatList) -> Nat > countoddmembers l = ?countoddmembers_rhs > test_countoddmembers1 : countoddmembers [1,0,3,1,4,5] = 4 > test_countoddmembers1 = ?test_countoddmembers1_rhs $\square$ ==== Exercise: 3 stars, advanced (alternate) Complete the definition of \idr{alternate}, which "zips up" two lists into one, alternating between elements taken from the first list and elements from the second. See the tests below for more specific examples. Note: one natural and elegant way of writing \idr{alternate} will fail to satisfy Idris's requirement that all function definitions be "obviously terminating." If you find yourself in this rut, look for a slightly more verbose solution that considers elements of both lists at the same time. (One possible solution requires defining a new kind of pairs, but this is not the only way.) > alternate : (l1, l2 : NatList) -> NatList > alternate l1 l2 = ?alternate_rhs > test_alternate1 : alternate [1,2,3] [4,5,6] = > [1,4,2,5,3,6] > test_alternate1 = ?test_alternate1_rhs > test_alternate2 : alternate [1] [4,5,6] = [1,4,5,6] > test_alternate2 = ?test_alternate2_rhs > test_alternate3 : alternate [1,2,3] [4] = [1,4,2,3] > test_alternate3 = ?test_alternate3_rhs > test_alternate4 : alternate [] [20,30] = [20,30] > test_alternate4 = ?test_alternate4_rhs $\square$ === Bags via Lists A \idr{Bag} (or \idr{Multiset}) is like a set, except that each element can appear multiple times rather than just once. One possible implementation is to represent a bag of numbers as a list. > Bag : Type > Bag = NatList ==== Exercise: 3 stars, recommended (bag_functions) Complete the following definitions for the functions \idr{count}, \idr{sum}, \idr{add}, and \idr{member} for bags. > count : (v : Nat) -> (s : Bag) -> Nat > count v s = ?count_rhs All these proofs can be done just by \idr{Refl}. > test_count1 : count 1 [1,2,3,1,4,1] = 3 > test_count1 = ?test_count1_rhs > test_count2 : count 6 [1,2,3,1,4,1] = 0 > test_count2 = ?test_count2_rhs Multiset \idr{sum} is similar to set \idr{union}: \idr{sum a b} contains all the elements of \idr{a} and of \idr{b}. (Mathematicians usually define union on multisets a little bit differently, which is why we don't use that name for this operation.) \todo[inline]{How to forbid recursion here? Edit} For \idr{sum} we're giving you a header that does not give explicit names to the arguments. Moreover, it uses the keyword Definition instead of Fixpoint, so even if you had names for the arguments, you wouldn't be able to process them recursively. The point of stating the question this way is to encourage you to think about whether sum can be implemented in another way -- perhaps by using functions that have already been defined. > sum : Bag -> Bag -> Bag > sum x y = ?sum_rhs > test_sum1 : count 1 (sum [1,2,3] [1,4,1]) = 3 > test_sum1 = ?test_sum1_rhs > add : (v : Nat) -> (s : Bag) -> Bag > add v s = ?add_rhs > test_add1 : count 1 (add 1 [1,4,1]) = 3 > test_add1 = ?test_add1_rhs > test_add2 : count 5 (add 1 [1,4,1]) = 0 > test_add2 = ?test_add2_rhs > member : (v : Nat) -> (s : Bag) -> Bool > member v s = ?member_rhs > test_member1 : member 1 [1,4,1] = True > test_member1 = ?test_member1_rhs > test_member2 : member 2 [1,4,1] = False > test_member2 = ?test_member2_rhs $\square$ ==== Exercise: 3 stars, optional (bag_more_functions) Here are some more bag functions for you to practice with. When \idr{remove_one} is applied to a bag without the number to remove, it should return the same bag unchanged. > remove_one : (v : Nat) -> (s : Bag) -> Bag > remove_one v s = ?remove_one_rhs > test_remove_one1 : count 5 (remove_one 5 [2,1,5,4,1]) = 0 > test_remove_one1 = ?test_remove_one1_rhs > test_remove_one2 : count 5 (remove_one 5 [2,1,4,1]) = 0 > test_remove_one2 = ?test_remove_one2_rhs > test_remove_one3 : count 4 (remove_one 5 [2,1,5,4,1,4]) = 2 > test_remove_one3 = ?test_remove_one3_rhs > test_remove_one4 : count 5 (remove_one 5 [2,1,5,4,5,1,4]) = 1 > test_remove_one4 = ?test_remove_one4_rhs > remove_all : (v : Nat) -> (s : Bag) -> Bag > remove_all v s = ?remove_all_rhs > test_remove_all1 : count 5 (remove_all 5 [2,1,5,4,1]) = 0 > test_remove_all1 = ?test_remove_all1_rhs > test_remove_all2 : count 5 (remove_all 5 [2,1,4,1]) = 0 > test_remove_all2 = ?test_remove_all2_rhs > test_remove_all3 : count 4 (remove_all 5 [2,1,5,4,1,4]) = 2 > test_remove_all3 = ?test_remove_all3_rhs > test_remove_all4 : count 5 > (remove_all 5 [2,1,5,4,5,1,4,5,1,4]) = 0 > test_remove_all4 = ?test_remove_all4_rhs > subset : (s1 : Bag) -> (s2 : Bag) -> Bool > subset s1 s2 = ?subset_rhs > test_subset1 : subset [1,2] [2,1,4,1] = True > test_subset1 = ?test_subset1_rhs > test_subset2 : subset [1,2,2] [2,1,4,1] = False > test_subset2 = ?test_subset2_rhs $\square$ ==== Exercise: 3 stars, recommended (bag_theorem) Write down an interesting theorem \idr{bag_theorem} about bags involving the functions \idr{count} and \idr{add}, and prove it. Note that, since this problem is somewhat open-ended, it's possible that you may come up with a theorem which is true, but whose proof requires techniques you haven't learned yet. Feel free to ask for help if you get stuck! > bag_theorem : ?bag_theorem $\square$ == Reasoning About Lists As with numbers, simple facts about list-processing functions can sometimes be proved entirely by simplification. For example, the simplification performed by \idr{Refl} is enough for this theorem... > nil_app : (l : NatList) -> ([] ++ l) = l > nil_app l = Refl ... because the \idr{[]} is substituted into the "scrutinee" (the value being "scrutinized" by the match) in the definition of \idr{app}, allowing the match itself to be simplified. Also, as with numbers, it is sometimes helpful to perform case analysis on the possible shapes (empty or non-empty) of an unknown list. > tl_length_pred : (l : NatList) -> pred (length l) = length (tl l) > tl_length_pred [] = Refl > tl_length_pred (n::l') = Refl Here, the \idr{Nil} case works because we've chosen to define \idr{tl Nil = Nil}. Notice that the case for \idr{Cons} introduces two names, \idr{n} and \idr{l'}, corresponding to the fact that the \idr{Cons} constructor for lists takes two arguments (the head and tail of the list it is constructing). Usually, though, interesting theorems about lists require induction for their proofs. ==== Micro-Sermon Simply reading example proof scripts will not get you very far! It is important to work through the details of each one, using Idris and thinking about what each step achieves. Otherwise it is more or less guaranteed that the exercises will make no sense when you get to them. 'Nuff said. === Induction on Lists Proofs by induction over datatypes like \idr{NatList} are a little less familiar than standard natural number induction, but the idea is equally simple. Each \idr{data} declaration defines a set of data values that can be built up using the declared constructors: a boolean can be either \idr{True} or \idr{False}; a number can be either \idr{Z} or \idr{S} applied to another number; a list can be either \idr{Nil} or \idr{Cons} applied to a number and a list. Moreover, applications of the declared constructors to one another are the _only_ possible shapes that elements of an inductively defined set can have, and this fact directly gives rise to a way of reasoning about inductively defined sets: a number is either \idr{Z} or else it is \idr{S} applied to some _smaller_ number; a list is either \idr{Nil} or else it is \idr{Cons} applied to some number and some _smaller_ list; etc. So, if we have in mind some proposition \idr{p} that mentions a list \idr{l} and we want to argue that \idr{p} holds for _all_ lists, we can reason as follows: - First, show that \idr{p} is true of \idr{l} when \idr{l} is \idr{Nil}. - Then show that \idr{P} is true of \idr{l} when \idr{l} is \idr{Cons n l'} for some number \idr{n} and some smaller list \idr{l'}, assuming that \idr{p} is true for \idr{l'}. Since larger lists can only be built up from smaller ones, eventually reaching \idr{Nil}, these two arguments together establish the truth of \idr{p} for all lists \idr{l}. Here's a concrete example: > app_assoc : (l1, l2, l3 : NatList) -> ((l1 ++ l2) ++ l3) = (l1 ++ (l2 ++ l3)) > app_assoc [] l2 l3 = Refl > app_assoc (n::l1') l2 l3 = > let inductiveHypothesis = app_assoc l1' l2 l3 in > rewrite inductiveHypothesis in Refl \todo[inline]{Edit} Notice that, as when doing induction on natural numbers, the as ... clause provided to the induction tactic gives a name to the induction hypothesis corresponding to the smaller list l1' in the cons case. Once again, this Coq proof is not especially illuminating as a static written document -- it is easy to see what's going on if you are reading the proof in an interactive Coq session and you can see the current goal and context at each point, but this state is not visible in the written-down parts of the Coq proof. So a natural-language proof -- one written for human readers -- will need to include more explicit signposts; in particular, it will help the reader stay oriented if we remind them exactly what the induction hypothesis is in the second case. For comparison, here is an informal proof of the same theorem. _Theorem_: For all lists \idr{l1}, \idr{l2}, and \idr{l3}, \idr{(l1 ++ l2) ++ l3 = l1 ++ (l2 ++l3)}. _Proof_: By induction on \idr{l1}. - First, suppose \idr{l1 = []}. We must show \idr{([] ++ l2) ++ l3 = [] ++ (l2 ++ l3)}, which follows directly from the definition of \idr{++}. - Next, suppose \idr{l1 = n :: l1'}, with \idr{(l1' ++ l2) ++ l3 = l1' ++ (l2 ++ l3)} (the induction hypothesis). We must show \idr{((n :: l1') ++ l2) ++ l3 = (n :: l1') ++ (l2 ++ l3)}. By the definition of \idr{++}, this follows from \idr{n :: ((l1' ++ l2) ++ l 3) = n :: (l1' ++ (l2 ++ l3))}, which is immediate from the induction hypothesis. $\square$ ==== Reversing a List For a slightly more involved example of inductive proof over lists, suppose we use \idr{app} to define a list-reversing function \idr{rev}: > rev : (l : NatList) -> NatList > rev Nil = Nil > rev (h :: t) = (rev t) ++ [h] > test_rev1 : rev [1,2,3] = [3,2,1] > test_rev1 = Refl > test_rev2 : rev Nil = Nil > test_rev2 = Refl ==== Properties of rev Now let's prove some theorems about our newly defined \idr{rev}. For something a bit more challenging than what we've seen, let's prove that reversing a list does not change its length. Our first attempt gets stuck in the successor case... ```idris rev_length_firsttry : (l : NatList) -> length (rev l) = length l rev_length_firsttry Nil = Refl rev_length_firsttry (n :: l') = -- Now we seem to be stuck: the goal is an equality involving `++`, but we don't -- have any useful equations in either the immediate context or in the global -- environment! We can make a little progress by using the IH to rewrite the -- goal... let inductiveHypothesis = rev_length_firsttry l' in rewrite inductiveHypothesis in -- ... but now we can't go any further. Refl ``` So let's take the equation relating \idr{++} and \idr{length} that would have enabled us to make progress and prove it as a separate lemma. > app_length : (l1, l2 : NatList) -> > length (l1 ++ l2) = (length l1) + (length l2) > app_length Nil l2 = Refl > app_length (n :: l1') l2 = > let inductiveHypothesis = app_length l1' l2 in > rewrite inductiveHypothesis in > Refl Note that, to make the lemma as general as possible, we quantify over _all_ \idr{NatList}s, not just those that result from an application of \idr{rev}. This should seem natural, because the truth of the goal clearly doesn't depend on the list having been reversed. Moreover, it is easier to prove the more general property. Now we can complete the original proof. > rev_length : (l : NatList) -> length (rev l) = length l > rev_length Nil = Refl > rev_length (n :: l') = > rewrite app_length (rev l') [n] in > -- Prelude's version of `Induction.plus_comm` > rewrite plusCommutative (length (rev l')) 1 in > let inductiveHypothesis = rev_length l' in > rewrite inductiveHypothesis in Refl For comparison, here are informal proofs of these two theorems: _Theorem_: For all lists \idr{l1} and \idr{l2}, \idr{length (l1 ++ l2) = length l1 + length l2}. _Proof_: By induction on \idr{l1}. - First, suppose \idr{l1 = []}. We must show \idr{length ([] ++ l2) = length [] + length l2}, which follows directly from the definitions of \idr{length} and \idr{++}. - Next, suppose \idr{l1 = n :: l1'}, with \idr{length (l1' ++ l2) = length l1' + length l2}. We must show \idr{length ((n :: l1') ++ l2) = length (n :: l1') + length l2)}. This follows directly from the definitions of \idr{length} and \idr{++} together with the induction hypothesis. $\square$ _Theorem_: For all lists \idr{l}, \idr{length (rev l) = length l}. _Proof_: By induction on \idr{l}. - First, suppose \idr{l = []}. We must show \idr{length (rev []) = length []}, which follows directly from the definitions of \idr{length} and \idr{rev}. - Next, suppose l = n :: l' , with \idr{length (rev l') = length l'}. We must show \idr{length (rev (n :: l')) = length (n :: l')}. By the definition of \idr{rev}, this follows from \idr{length ((rev l') ++ [n]) = S (length l')} which, by the previous lemma, is the same as \idr{length (rev l') + length [n] = S (length l')}. This follows directly from the induction hypothesis and the definition of \idr{length}. $\square$ The style of these proofs is rather longwinded and pedantic. After the first few, we might find it easier to follow proofs that give fewer details (which can easily work out in our own minds or on scratch paper if necessary) and just highlight the non-obvious steps. In this more compressed style, the above proof might look like this: _Theorem_: For all lists \idr{l}, \idr{length (rev l) = length l}. _Proof_: First, observe that length \idr{(l ++ [n]) = S (length l)} for any \idr{l} (this follows by a straightforward induction on \idr{l}). The main property again follows by induction on \idr{l}, using the observation together with the induction hypothesis in the case where \idr{l = n' :: l'}. $\square$ Which style is preferable in a given situation depends on the sophistication of the expected audience and how similar the proof at hand is to ones that the audience will already be familiar with. The more pedantic style is a good default for our present purposes. === Search \ \todo[inline]{Edit, mention \idr{:s} and \idr{:apropos}?} We've seen that proofs can make use of other theorems we've already proved, e.g., using \idr{rewrite}. But in order to refer to a theorem, we need to know its name! Indeed, it is often hard even to remember what theorems have been proven, much less what they are called. Coq's `Search` command is quite helpful with this. Typing `Search foo` will cause Coq to display a list of all theorems involving `foo`. For example, try uncommenting the following line to see a list of theorems that we have proved about `rev`: ```coq (* Search rev. *) ``` Keep `Search` in mind as you do the following exercises and throughout the rest of the book; it can save you a lot of time! If you are using ProofGeneral, you can run `Search` with `C-c C-a C-a`. Pasting its response into your buffer can be accomplished with `C-c C-;`. === List Exercises, Part 1 ==== Exercise: 3 stars (list_exercises) More practice with lists: > app_nil_r : (l : NatList) -> (l ++ []) = l > app_nil_r l = ?app_nil_r_rhs > rev_app_distr : (l1, l2 : NatList) -> rev (l1 ++ l2) = (rev l2) ++ (rev l1) > rev_app_distr l1 l2 = ?rev_app_distr_rhs > rev_involutive : (l : NatList) -> rev (rev l) = l > rev_involutive l = ?rev_involutive_rhs There is a short solution to the next one. If you find yourself getting tangled up, step back and try to look for a simpler way. > app_assoc4 : (l1, l2, l3, l4 : NatList) -> > (l1 ++ (l2 ++ (l3 ++ l4))) = ((l1 ++ l2) ++ l3) ++ l4 > app_assoc4 l1 l2 l3 l4 = ?app_assoc4_rhs An exercise about your implementation of \idr{nonzeros}: > nonzeros_app : (l1, l2 : NatList) -> > nonzeros (l1 ++ l2) = (nonzeros l1) ++ (nonzeros l2) > nonzeros_app l1 l2 = ?nonzeros_app_rhs $\square$ ==== Exercise: 2 stars (beq_NatList) Fill in the definition of \idr{beq_NatList}, which compares lists of numbers for equality. Prove that \idr{beq_NatList l l} yields \idr{True} for every list \idr{l}. > beq_NatList : (l1, l2 : NatList) -> Bool > beq_NatList l1 l2 = ?beq_NatList_rhs > test_beq_NatList1 : beq_NatList Nil Nil = True > test_beq_NatList1 = ?test_beq_NatList1_rhs > test_beq_NatList2 : beq_NatList [1,2,3] [1,2,3] = True > test_beq_NatList2 = ?test_beq_NatList2_rhs > test_beq_NatList3 : beq_NatList [1,2,3] [1,2,4] = False > test_beq_NatList3 = ?test_beq_NatList3_rhs > beq_NatList_refl : (l : NatList) -> True = beq_NatList l l > beq_NatList_refl l = ?beq_NatList_refl_rhs $\square$ === List Exercises, Part 2 ==== Exercise: 3 stars, advanced (bag_proofs) Here are a couple of little theorems to prove about your definitions about bags above. > count_member_nonzero : (s : Bag) -> lte 1 (count 1 (1 :: s)) = True > count_member_nonzero s = ?count_member_nonzero_rhs The following lemma about \idr{lte} might help you in the next proof. > ble_n_Sn : (n : Nat) -> lte n (S n) = True > ble_n_Sn Z = Refl > ble_n_Sn (S k) = > let inductiveHypothesis = ble_n_Sn k in > rewrite inductiveHypothesis in Refl > remove_decreases_count : (s : Bag) -> > lte (count 0 (remove_one 0 s)) (count 0 s) = True > remove_decreases_count s = ?remove_decreases_count_rhs $\square$ ==== Exercise: 3 stars, optional (bag_count_sum) Write down an interesting theorem \idr{bag_count_sum} about bags involving the functions \idr{count} and \idr{sum}, and prove it. (You may find that the difficulty of the proof depends on how you defined \idr{count}!) > bag_count_sum : ?bag_count_sum $\square$ ==== Exercise: 4 stars, advanced (rev_injective) Prove that the \idr{rev} function is injective -- that is, > rev_injective : (l1, l2 : NatList) -> rev l1 = rev l2 -> l1 = l2 > rev_injective l1 l2 prf = ?rev_injective_rhs (There is a hard way and an easy way to do this.) $\square$ == Options Suppose we want to write a function that returns the \idr{n}th element of some list. If we give it type \idr{Nat -> NatList -> Nat}, then we'll have to choose some number to return when the list is too short... > nth_bad : (l : NatList) -> (n : Nat) -> Nat > nth_bad Nil n = 42 -- arbitrary! > nth_bad (a :: l') n = case n == 0 of > True => a > False => nth_bad l' (pred n) This solution is not so good: If \idr{nth_bad} returns \idr{42}, we can't tell whether that value actually appears on the input without further processing. A better alternative is to change the return type of \idr{nth_bad} to include an error value as a possible outcome. We call this type \idr{NatOption}. > data NatOption : Type where > Some : Nat -> NatOption > None : NatOption We can then change the above definition of \idr{nth_bad} to return \idr{None} when the list is too short and \idr{Some a} when the list has enough members and \idr{a} appears at position \idr{n}. We call this new function \idr{nth_error} to indicate that it may result in an error. > nth_error : (l : NatList) -> (n : Nat) -> NatOption > nth_error Nil n = None > nth_error (a :: l') n = case n == 0 of > True => Some a > False => nth_error l' (pred n) > test_nth_error1 : nth_error [4,5,6,7] 0 = Some 4 > test_nth_error1 = Refl > test_nth_error2 : nth_error [4,5,6,7] 3 = Some 7 > test_nth_error2 = Refl > test_nth_error3 : nth_error [4,5,6,7] 9 = None > test_nth_error3 = Refl This example is also an opportunity to introduce one more small feature of Idris programming language: conditional expressions... > nth_error' : (l : NatList) -> (n : Nat) -> NatOption > nth_error' Nil n = None > nth_error' (a :: l') n = if n == 0 > then Some a > else nth_error' l' (pred n) \todo[inline]{Edit or remove this paragraph, doesn't seem to hold in Idris} Coq's conditionals are exactly like those found in any other language, with one small generalization. Since the boolean type is not built in, Coq actually supports conditional expressions over any inductively defined type with exactly two constructors. The guard is considered true if it evaluates to the first constructor in the Inductive definition and false if it evaluates to the second. The function below pulls the \idr{Nat} out of a \idr{NatOption}, returning a supplied default in the \idr{None} case. > option_elim : (d : Nat) -> (o : NatOption) -> Nat > option_elim d (Some k) = k > option_elim d None = d ==== Exercise: 2 stars (hd_error) Using the same idea, fix the \idr{hd} function from earlier so we don't have to pass a default element for the \idr{Nil} case. > hd_error : (l : NatList) -> NatOption > hd_error l = ?hd_error_rhs > test_hd_error1 : hd_error [] = None > test_hd_error1 = ?test_hd_error1_rhs > test_hd_error2 : hd_error [1] = Some 1 > test_hd_error2 = ?test_hd_error2_rhs > test_hd_error3 : hd_error [5,6] = Some 5 > test_hd_error3 = ?test_hd_error3_rhs $\square$ ==== Exercise: 1 star, optional (option_elim_hd) This exercise relates your new \idr{hd_error} to the old \idr{hd}. > option_elim_hd : (l : NatList) -> (default : Nat) -> > hd default l = option_elim default (hd_error l) > option_elim_hd l default = ?option_elim_hd_rhs $\square$ == Partial Maps As a final illustration of how data structures can be defined in Idris, here is a simple _partial map_ data type, analogous to the map or dictionary data structures found in most programming languages. First, we define a new inductive datatype \idr{Id} to serve as the "keys" of our partial maps. > data Id : Type where > MkId : Nat -> Id Internally, an \idr{Id} is just a number. Introducing a separate type by wrapping each \idr{Nat} with the tag \idr{MkId} makes definitions more readable and gives us the flexibility to change representations later if we wish. We'll also need an equality test for \idr{Id}s: > beq_id : (x1, x2 : Id) -> Bool > beq_id (MkId n1) (MkId n2) = n1 == n2 ==== Exercise: 1 star (beq_id_refl) > beq_id_refl : (x : Id) -> True = beq_id x x > beq_id_refl x = ?beq_id_refl_rhs $\square$ Now we define the type of partial maps: > namespace PartialMap > data PartialMap : Type where > Empty : PartialMap > Record : Id -> Nat -> PartialMap -> PartialMap This declaration can be read: "There are two ways to construct a \idr{PartialMap}: either using the constructor \idr{Empty} to represent an empty partial map, or by applying the constructor \idr{Record} to a key, a value, and an existing \idr{PartialMap} to construct a \idr{PartialMap} with an additional key-to-value mapping." The \idr{update} function overrides the entry for a given key in a partial map (or adds a new entry if the given key is not already present). > update : (d : PartialMap) -> (x : Id) -> (value : Nat) -> PartialMap > update d x value = Record x value d Last, the \idr{find} function searches a \idr{PartialMap} for a given key. It returns \idr{None} if the key was not found and \idr{Some val} if the key was associated with \idr{val}. If the same key is mapped to multiple values, \idr{find} will return the first one it encounters. > find : (x : Id) -> (d : PartialMap) -> NatOption > find x Empty = None > find x (Record y v d') = if beq_id x y > then Some v > else find x d' ==== Exercise: 1 star (update_eq) > update_eq : (d : PartialMap) -> (x : Id) -> (v : Nat) -> > find x (update d x v) = Some v > update_eq d x v = ?update_eq_rhs $\square$ ==== Exercise: 1 star (update_neq) > update_neq : (d : PartialMap) -> (x, y : Id) -> (o : Nat) -> > beq_id x y = False -> > find x (update d y o) = find x d > update_neq d x y o prf = ?update_neq_rhs $\square$ ==== Exercise: 2 stars (baz_num_elts) Consider the following inductive definition: > data Baz : Type where > Baz1 : Baz -> Baz > Baz2 : Baz -> Bool -> Baz How _many_ elements does the type \idr{Baz} have? (Answer in English or the natural language of your choice.) $\square$
Idris
5
diseraluca/software-foundations
src/Lists.lidr
[ "MIT" ]
DROP TABLE IF EXISTS test; create table test (id UInt64,insid UInt64,insidvalue Nullable(UInt64), index insid_idx (insid) type bloom_filter() granularity 1, index insidvalue_idx (insidvalue) type bloom_filter() granularity 1) ENGINE=MergeTree() ORDER BY (insid,id); insert into test values(1,1,1),(2,2,2); select * from test where insid IN (1) OR insidvalue IN (1); select * from test where insid IN (1) AND insidvalue IN (1); DROP TABLE test;
SQL
3
pdv-ru/ClickHouse
tests/queries/0_stateless/01914_index_bgranvea.sql
[ "Apache-2.0" ]
/* Copyright (c) 2012 Advanced Micro Devices, Inc. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. */ //Originally written by Takahiro Harada typedef unsigned int u32; #define GET_GROUP_IDX get_group_id(0) #define GET_LOCAL_IDX get_local_id(0) #define GET_GLOBAL_IDX get_global_id(0) #define GET_GROUP_SIZE get_local_size(0) #define GROUP_LDS_BARRIER barrier(CLK_LOCAL_MEM_FENCE) // takahiro end #define WG_SIZE 128 #define m_numElems x #define m_numBlocks y #define m_numScanBlocks z /*typedef struct { uint m_numElems; uint m_numBlocks; uint m_numScanBlocks; uint m_padding[1]; } ConstBuffer; */ u32 ScanExclusive(__local u32* data, u32 n, int lIdx, int lSize) { u32 blocksum; int offset = 1; for(int nActive=n>>1; nActive>0; nActive>>=1, offset<<=1) { GROUP_LDS_BARRIER; for(int iIdx=lIdx; iIdx<nActive; iIdx+=lSize) { int ai = offset*(2*iIdx+1)-1; int bi = offset*(2*iIdx+2)-1; data[bi] += data[ai]; } } GROUP_LDS_BARRIER; if( lIdx == 0 ) { blocksum = data[ n-1 ]; data[ n-1 ] = 0; } GROUP_LDS_BARRIER; offset >>= 1; for(int nActive=1; nActive<n; nActive<<=1, offset>>=1 ) { GROUP_LDS_BARRIER; for( int iIdx = lIdx; iIdx<nActive; iIdx += lSize ) { int ai = offset*(2*iIdx+1)-1; int bi = offset*(2*iIdx+2)-1; u32 temp = data[ai]; data[ai] = data[bi]; data[bi] += temp; } } GROUP_LDS_BARRIER; return blocksum; } __attribute__((reqd_work_group_size(WG_SIZE,1,1))) __kernel void LocalScanKernel(__global u32* dst, __global u32 *src, __global u32 *sumBuffer, uint4 cb) { __local u32 ldsData[WG_SIZE*2]; int gIdx = GET_GLOBAL_IDX; int lIdx = GET_LOCAL_IDX; ldsData[2*lIdx] = ( 2*gIdx < cb.m_numElems )? src[2*gIdx]: 0; ldsData[2*lIdx + 1] = ( 2*gIdx+1 < cb.m_numElems )? src[2*gIdx + 1]: 0; u32 sum = ScanExclusive(ldsData, WG_SIZE*2, GET_LOCAL_IDX, GET_GROUP_SIZE); if( lIdx == 0 ) sumBuffer[GET_GROUP_IDX] = sum; if( (2*gIdx) < cb.m_numElems ) { dst[2*gIdx] = ldsData[2*lIdx]; } if( (2*gIdx + 1) < cb.m_numElems ) { dst[2*gIdx + 1] = ldsData[2*lIdx + 1]; } } __attribute__((reqd_work_group_size(WG_SIZE,1,1))) __kernel void AddOffsetKernel(__global u32 *dst, __global u32 *blockSum, uint4 cb) { const u32 blockSize = WG_SIZE*2; int myIdx = GET_GROUP_IDX+1; int lIdx = GET_LOCAL_IDX; u32 iBlockSum = blockSum[myIdx]; int endValue = min((myIdx+1)*(blockSize), cb.m_numElems); for(int i=myIdx*blockSize+lIdx; i<endValue; i+=GET_GROUP_SIZE) { dst[i] += iBlockSum; } } __attribute__((reqd_work_group_size(WG_SIZE,1,1))) __kernel void TopLevelScanKernel(__global u32* dst, uint4 cb) { __local u32 ldsData[2048]; int gIdx = GET_GLOBAL_IDX; int lIdx = GET_LOCAL_IDX; int lSize = GET_GROUP_SIZE; for(int i=lIdx; i<cb.m_numScanBlocks; i+=lSize ) { ldsData[i] = (i<cb.m_numBlocks)? dst[i]:0; } GROUP_LDS_BARRIER; u32 sum = ScanExclusive(ldsData, cb.m_numScanBlocks, GET_LOCAL_IDX, GET_GROUP_SIZE); for(int i=lIdx; i<cb.m_numBlocks; i+=lSize ) { dst[i] = ldsData[i]; } if( gIdx == 0 ) { dst[cb.m_numBlocks] = sum; } }
OpenCL
4
N0hbdy/godot
thirdparty/bullet/Bullet3OpenCL/ParallelPrimitives/kernels/PrefixScanKernels.cl
[ "CC-BY-3.0", "Apache-2.0", "MIT" ]
package hello; public class IncorrectJavaCode {
Java
0
qussarah/declare
compiler/testData/integration/ant/jvm/doNotFailOnError/IncorrectJavaCode.java
[ "Apache-2.0" ]
<div class="ui stackable grid"> {% include '@SyliusAdmin/Customer/Show/_content.html.twig' %} {% include '@SyliusAdmin/Customer/Show/_address.html.twig' %} </div>
Twig
2
titomtd/Sylius
src/Sylius/Bundle/AdminBundle/Resources/views/Customer/Show/_contentWidget.html.twig
[ "MIT" ]
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.springframework.boot.context.properties.source; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; /** * Maintains a mapping of {@link ConfigurationPropertyName} aliases. * * @author Phillip Webb * @author Madhura Bhave * @since 2.0.0 * @see ConfigurationPropertySource#withAliases(ConfigurationPropertyNameAliases) */ public final class ConfigurationPropertyNameAliases implements Iterable<ConfigurationPropertyName> { private final MultiValueMap<ConfigurationPropertyName, ConfigurationPropertyName> aliases = new LinkedMultiValueMap<>(); public ConfigurationPropertyNameAliases() { } public ConfigurationPropertyNameAliases(String name, String... aliases) { addAliases(name, aliases); } public ConfigurationPropertyNameAliases(ConfigurationPropertyName name, ConfigurationPropertyName... aliases) { addAliases(name, aliases); } public void addAliases(String name, String... aliases) { Assert.notNull(name, "Name must not be null"); Assert.notNull(aliases, "Aliases must not be null"); addAliases(ConfigurationPropertyName.of(name), Arrays.stream(aliases).map(ConfigurationPropertyName::of).toArray(ConfigurationPropertyName[]::new)); } public void addAliases(ConfigurationPropertyName name, ConfigurationPropertyName... aliases) { Assert.notNull(name, "Name must not be null"); Assert.notNull(aliases, "Aliases must not be null"); this.aliases.addAll(name, Arrays.asList(aliases)); } public List<ConfigurationPropertyName> getAliases(ConfigurationPropertyName name) { return this.aliases.getOrDefault(name, Collections.emptyList()); } public ConfigurationPropertyName getNameForAlias(ConfigurationPropertyName alias) { return this.aliases.entrySet().stream().filter((e) -> e.getValue().contains(alias)).map(Map.Entry::getKey) .findFirst().orElse(null); } @Override public Iterator<ConfigurationPropertyName> iterator() { return this.aliases.keySet().iterator(); } }
Java
5
yiou362/spring-boot-2.2.9.RELEASE
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyNameAliases.java
[ "Apache-2.0" ]
%tr %td.text-content %p Your request to join the - if @source_hidden #{content_tag :span, 'Hidden', class: :highlight} - else #{link_to member_source.human_name, member_source.web_url, class: :highlight} #{member_source.model_name.singular} has been #{content_tag :span, 'denied', class: :highlight}.
Haml
3
nowkoai/test
app/views/notify/member_access_denied_email.html.haml
[ "MIT" ]
package extensions import spock.lang.IgnoreRest import spock.lang.Specification class IgnoreRestTest extends Specification { def "I won't run"() { } @IgnoreRest def 'I will run'() { } def "I won't run too"() { } }
Groovy
3
DBatOWL/tutorials
testing-modules/groovy-spock/src/test/groovy/extensions/IgnoreRestTest.groovy
[ "MIT" ]
<span>Test template</span>
HTML
0
John-Cassidy/angular
packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/class_metadata/test_cmp_template.html
[ "MIT" ]
@echo off rem bx - Build only the project in this directory without cleaning it first. rem This is another script to help Microsoft developers feel at home working on rem the terminal project. call bcz exclusive no_clean %*
Batchfile
4
hessedoneen/terminal
tools/bx.cmd
[ "MIT" ]
(module (memory $0 2) (global $global$0 (mut i32) (i32.const 66112)) (global $global$1 i32 (i32.const 66112)) (global $global$2 i32 (i32.const 576)) (export "memory" (memory $0)) (export "main" (func $main)) (export "__heap_base" (global $global$1)) (export "__data_end" (global $global$2)) (func $__original_main (param $0 i32) (param $1 i32) (result i32) (nop) ) (func $main (param $0 i32) (param $1 i32) (result i32) (call $__original_main (local.get $0) (local.get $1)) ) )
WebAssembly
3
phated/binaryen
test/lld/standalone-wasm2.wat
[ "Apache-2.0" ]
insert into properties values('baeldung.archaius.properties.one', 'one FROM:jdbc_source'); insert into properties values('baeldung.archaius.properties.three', 'three FROM:jdbc_source');
SQL
3
DBatOWL/tutorials
spring-cloud/spring-cloud-archaius/jdbc-config/src/main/resources/data.sql
[ "MIT" ]
(function(exports){ //帮助文档 help = function(){ return { "指令:功能", "BRBundleId" : "当前调试的APP的bundle ID", "BRMainBundlePath" : "", "BRDocumentPath":"", "BRCachesPath":"", "redColor('view')":"调试:view为red", "blackColor('view')":"调试:view为black", "whiteColor('view')":"调试:view为white", "hiddenOrNot(view,willHidden)":"是否隐藏view", "CGPointMake(x,y)":"构造一个CGPoint", "CGSizeMake(w,h)":"构造一个CGSize", "CGRect(x,y,w,h)":"构造一个CGRect", "BRKeyWindow":"打印根控制器", "BRFrontVc":"打印当前控制器", "BRSubViewcontrollers":"打印控制器层级结构", "BRSubclasses(vc)":"打印vc子类", "GetMethods":"查看所有的方法", "getMethodNames":"获取所有方法名", "NSLog":"正常使用NSLog", "BRRunLoopDescrip":"打印当前runloop信息", "BRInstanceMethodNames":"查看所有实例方法", "BRClassMethods","查看所有类方法", "BRClassMethodNames","查看所有类方法名", "BRIvars":"查看所有实例变量", "BRIvarNames":"查看所有实例变量名" } } //当前调试的APP的bundle ID BRBundleId = [NSBundle mainBundle].bundleIdentifier; // 沙盒路径 BRMainBundlePath = [NSBundle mainBundle].bundlePath; // 沙盒 document BRDocumentPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; // 沙盒 caches BRCachesPath = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0]; //调试用的颜色 redColor = function(view)){ return view.backgroundColor = [UIColor redColor]; } blackColor = function(view){ return view.backgroundColor = [UIColor blackColor]; } whiteColor = (view){ return view.backgroundColor = [UIColor whiteColor]; } //隐藏显示 willhidden传 YES/NO (oc语法) hiddenOrNot = function(view,willHidden){ return view.hidden = willHidden; } // CGPoint、CGRect CGPointMake = function(x, y) { return {0 : x, 1 : y}; }; CGSizeMake = function(w, h) { return {0 : w, 1 : h}; }; CGRectMake = function(x, y, w, h) { return {0 : CGPointMake(x, y), 1 : CGSizeMake(w, h)}; }; // 根控制器 BRKeyWindow = function() { return UIApp.keyWindow; }; // 当前显示的控制器 var _FrontVc = function(vc) { if (vc.presentedViewController) { return _FrontVc(vc.presentedViewController); }else if ([vc isKindOfClass:[UITabBarController class]]) { return _FrontVc(vc.selectedViewController); } else if ([vc isKindOfClass:[UINavigationController class]]) { return _FrontVc(vc.visibleViewController); } else { var count = vc.childViewControllers.count; for (var i = count - 1; i >= 0; i--) { var childVc = vc.childViewControllers[i]; if (childVc && childVc.view.window) { vc = _FrontVc(childVc); break; } } return vc; } }; BRFrontVc = function() { return _FrontVc(UIApp.keyWindow.rootViewController); }; //控制器层级结构 BRSubViewcontrollers = function(vc) { if (![vc isKindOfClass:[UIViewController class]]) throw new Error(invalidParamStr); return vc.view.recursiveDescription().toString(); }; //view的层级结构 BRSubviews = function(view) { if (![view isKindOfClass:[UIView class]]) throw new Error(invalidParamStr); return view.recursiveDescription().toString(); }; var ClassInfo = function(className) { if (!className) throw new Error(missingParamStr); if (MJIsString(className)) { return NSClassFromString(className); } if (!className) throw new Error(invalidParamStr); // 对象或者类 return className.class(); }; // 查看所有的子类 BRSubclasses = function(className, reg) { className = ClassInfo(className); return [c for each (c in ObjectiveC.classes) if (c != className && class_getSuperclass(c) && [c isSubclassOfClass:className] && (!reg || reg.test(c))) ]; }; // 查看所有的方法 var GetMethods = function(className, reg, clazz) { className = ClassInfo(className); var count = new new Type('I'); var classObj = clazz ? className.constructor : className; var methodList = class_copyMethodList(classObj, count); var methodsArray = []; var methodNamesArray = []; for(var i = 0; i < *count; i++) { var method = methodList[i]; var selector = method_getName(method); var name = sel_getName(selector); if (reg && !reg.test(name)) continue; methodsArray.push({ selector : selector, type : method_getTypeEncoding(method) }); methodNamesArray.push(name); } free(methodList); return [methodsArray, methodNamesArray]; }; var MethodsInfo = function(className, reg, clazz) { return GetMethods(className, reg, clazz)[0]; }; // 查看方法名 var getMethodNames = function(className, reg, clazz) { return GetMethods(className, reg, clazz)[1]; }; // 查看实例方法信息 BRInstanceMethods = function(className, reg) { return MethodsInfo(className, reg); }; // 查看实例方法名字 BRInstanceMethodNames = function(className, reg) { return getMethodNames(className, reg); }; // 查看所有的类方法 BRClassMethods = function(className, reg) { return MethodsInfo(className, reg, true); }; // 查看所有的类方法名字 BRClassMethodNames = function(className, reg) { return getMethodNames(className, reg, true); }; // 查看所有的成员变量 BRIvars = function(obj, reg){ if (!obj) throw new Error(missingParamStr); var x = {}; for(var i in *obj) { try { var value = (*obj)[i]; if (reg && !reg.test(i) && !reg.test(value)) continue; x[i] = value; } catch(e){} } return x; }; // 查看所有的成员变量名字 BRIvarNames = function(obj, reg) { if (!obj) throw new Error(missingParamStr); var array = []; for(var name in *obj) { if (reg && !reg.test(name)) continue; array.push(name); } return array; }; // 在控制台使用log eg:NSLog("value: %@", value) NSLog = function(){ var types = 'v', args = [], count = arguments.length; for (var i = 0; i != count; ++i) { types += '@'; args.push(arguments[i]); } new Functor(NSLog_, types).apply(null, args); } NSLog_ = dlsym(RTLD_DEFAULT, "NSLog") //打印当前runloop信息 BRRunLoopDescrip = NSRunLoop.messages['description'] NSRunLoop.messages[‘description’] = function() { return original_NSRunLoop_description.call(this).toString().substr(0, 80)+”, etc.”; } })(exports);
Cycript
4
Dtheme/Burin-master
burin.cy
[ "MIT" ]
create-react-class = require \create-react-class Form = create-react-class do # render :: a -> ReactElement render: -> React.create-element SimpleSelect, options: @state.options placeholder: "Select a fruit" # create-from-search :: [Item] -> String -> Item? create-from-search: (options, search) ~> # only create an option from search if the length of the search string is > 0 and # it does no match the label property of an existing option return null if search.length == 0 or search in map (.label), options label: search, value: search # on-value-change :: Item -> (a -> Void) -> Void on-value-change: ({label, value, new-option}?) !~> # here, we add the selected item to the options array, the "new-option" # property, added to items created by the "create-from-search" function above, # helps us ensure that the item doesn't already exist in the options array if !!new-option @set-state options: [{label, value}] ++ @state.options get-initial-state: -> options: <[apple mango grapes melon strawberry]> |> map ~> label: it, value: it render (React.create-element Form, null), mount-node
LiveScript
4
santiagoGuti/react-selectize
public/examples/simple/CreateFromSearch.ls
[ "Apache-2.0" ]
# # # Nim's Runtime Library # (c) Copyright 2020 Nim contributors # # See the file "copying.txt", included in this # distribution, for details about the copyright. # ## This module implements the `Isolated[T]` type for ## safe construction of isolated subgraphs that can be ## passed efficiently to different channels and threads. ## ## .. warning:: This module is experimental and its interface may change. ## type Isolated*[T] = object ## Isolated data can only be moved, not copied. value: T proc `=copy`*[T](dest: var Isolated[T]; src: Isolated[T]) {.error.} proc `=sink`*[T](dest: var Isolated[T]; src: Isolated[T]) {.inline.} = # delegate to value's sink operation `=sink`(dest.value, src.value) proc `=destroy`*[T](dest: var Isolated[T]) {.inline.} = # delegate to value's destroy operation `=destroy`(dest.value) func isolate*[T](value: sink T): Isolated[T] {.magic: "Isolate".} = ## Creates an isolated subgraph from the expression `value`. ## Isolation is checked at compile time. ## ## Please read https://github.com/nim-lang/RFCs/issues/244 ## for more details. Isolated[T](value: value) func unsafeIsolate*[T](value: sink T): Isolated[T] = ## Creates an isolated subgraph from the expression `value`. ## ## .. warning:: The proc doesn't check whether `value` is isolated. ## Isolated[T](value: value) func extract*[T](src: var Isolated[T]): T = ## Returns the internal value of `src`. ## The value is moved from `src`. result = move(src.value)
Nimrod
5
JohnAD/Nim
lib/std/isolation.nim
[ "MIT" ]
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-pane-view .pane > .pane-header h3.title { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 11px; margin: 0; }
CSS
3
sbj42/vscode
src/vs/base/browser/ui/tree/media/paneviewlet.css
[ "MIT" ]
local petstore_client = require "petstore.api.pet_api" local petstore_client_pet = require "petstore.model.pet" local my_pet_http_api = petstore_client.new("petstore.swagger.io", "/v2", {"http"}) local my_pet = my_pet_http_api:get_pet_by_id(5) for k,v in pairs(my_pet) do print(k,v) end local my_new_pet = petstore_client_pet.new("Mr. Barks") my_pet_http_api:add_pet(my_new_pet)
Lua
4
MalcolmScoffable/openapi-generator
samples/client/petstore/lua/test.lua
[ "Apache-2.0" ]
\chapter{Appendix 1} This test document is created to test advanced TOC functionality. \section{Appendix subsection} \subsection{sub} \subsubsection{subsub} \paragraph{par} \subsection{Test sub section 1} \chapter{Appendix 2} \label{chap: appendix 2} \section{Testing TOC levels} Testing more input and TOC levels. \subsection{Testing TOC sub levels} \subsubsection{Testing TOC sub sub levels} Hello world. \subsubsection{Text $\Gamma^{r}(\ensuremath{{\mathbf{Z}}}_p^d,\mathbf{K})$} \subsection{Another test subsection} \subsubsection{Other text $\Gamma^{r}$} \section{Testing more appendix levels} Testing more input and TOC levels. \subsection{Testing TOC sub levels}
TeX
4
tiagoboldt/vimtex
test/examples/book-multifile/appendix.tex
[ "MIT" ]
issue-9983-handleerror: salttest.hello: []
SaltStack
0
byteskeptical/salt
tests/integration/files/file/base/issue-9983-handleerror.sls
[ "Apache-2.0" ]
#lang scribble/manual @(require (for-label racket help/search help/bug-report help/help-utils)) @title{Bug Reporting} @defmodule[help/bug-report] @defproc[(help-desk:report-bug [this-bug-id #f (or/c #f exact-positive-integer?)] [#:frame-mixin frame-mixin (make-mixin-contract frame%) values]) void?]{ Opens a bug report window to edit the bug report identified by @racket[this-bug-id]. If @racket[this-bug-id] is @racket[#f], then creates a new bug ID and uses that one. The @racket[frame-mixin] argument is passed the frame class before creating the window. } @defproc[(saved-bug-report-titles/ids) (listof brinfo?)]{ Returns a list of the saved bug reports. } @defproc[(discard-all-saved-bug-reports) void?]{ Deletes all of the saved bug reports, except those currently open in frames. } @defproc[(unsave-bug-report [bug-id exact-positive-integer?]) void?]{ Deletes the saved bug report identified by @racket[bug-id]. } @defstruct[brinfo ([title label-string?] [id number?]) #:transparent]{ A record representing a saved bug report. The @racket[id] field is suitable for use with @racket[help-desk:report-bug], and the @racket[label] field is suitable for use in a GUI control. }
Racket
5
rrthomas/drracket
drracket/help/bug-report.scrbl
[ "Apache-2.0", "MIT" ]
insert into tf values (33, '44ea7e50', 1597631244433372786); insert into tf values (21, 'ea92b2bc', 8350061931822383463); insert into tf values (29, 'd800f4f3', 3042440053175428524); insert into tf values (31, '5f7a7433', 629744129778687863); insert into tf values (38, '403ff15f', 9033713940787535967); insert into tf values (37, 'c0e45d01', 7653840776950387220); insert into tf values (23, '743451c9', 2927177247690449560); insert into tf values (30, '9902a484', 5400540290819425776); insert into tf values (25, '02a7bb50', 1185903850246039530); insert into tf values (36, 'a627b715', 5509484231837701063); insert into tf values (27, 'a6f3cb68', 1369177643137253967); insert into tf values (22, '68c3dfff', 6078765541659054341); insert into tf values (39, '1d51c1ee', 3275520354324329535); insert into tf values (28, '37004961', 607245858542281825); insert into tf values (32, '2a8578bc', 6167139244725398395); insert into tf values (35, '5a954409', 6995093837120471966); insert into tf values (24, '72cb0e83', 2743887494442705099); insert into tf values (40, '68994d18', 4122602285058024098); insert into tf values (34, 'bf46ff42', 9168528035600890456); insert into tf values (26, 'cc58d76c', 4747694359350761982);
SQL
2
cuishuang/tidb
br/tests/lightning_duplicate_detection/data/dup_detect.tf.1.sql
[ "Apache-2.0" ]
// these are supercollider instruments. Gathered from around. // go see https://github.com/brunoruviaro/SynthDefs-for-Patterns for more. SynthDef(\blips, {arg out = 0, freq = 25, numharm = 10, att = 0.01, rel = 1, amp = 0.1, pan = 0.5; var snd, env; env = Env.perc(att, rel, amp).kr(doneAction: 2); snd = LeakDC.ar(Mix(Blip.ar([freq, freq*1.01], numharm, env))); Out.ar(out, Pan2.ar(snd, pan)); }).add; SynthDef(\sawpulse, { |out, freq = 440, gate = 0.5, plfofreq = 6, mw = 0, ffreq = 2000, rq = 0.3, freqlag = 0.05, amp = 1| var sig, plfo, fcurve; plfo = SinOsc.kr(plfofreq, mul:mw, add:1); freq = Lag.kr(freq, freqlag) * plfo; fcurve = EnvGen.kr(Env.adsr(0, 0.3, 0.1, 20), gate); fcurve = (fcurve - 1).madd(0.7, 1) * ffreq; sig = Mix.ar([Pulse.ar(freq, 0.9), Saw.ar(freq*1.007)]); sig = RLPF.ar(sig, fcurve, rq) * EnvGen.kr(Env.adsr(0.04, 0.2, 0.6, 0.1), gate, doneAction:2) * amp; Out.ar(out, sig ! 2) }).add; // kick ------- // http://www.soundonsound.com/sos/jan02/articles/synthsecrets0102.asp // increase mod_freq and mod_index for interesting electronic percussion SynthDef(\kick, { arg out = 0, freq = 50, mod_freq = 5, mod_index = 5, sustain = 0.4, amp = 0.8, beater_noise_level = 0.025; var pitch_contour, drum_osc, drum_lpf, drum_env; var beater_source, beater_hpf, beater_lpf, lpf_cutoff_contour, beater_env; var kick_mix; // hardcoding, otherwise skoar will set to the length of the noat ) ] ]]] etc sustain = 0.4; freq = 50; pitch_contour = Line.kr(freq*2, freq, 0.02); drum_osc = PMOsc.ar( pitch_contour, mod_freq, mod_index/1.3, mul: 1, add: 0); drum_lpf = LPF.ar(in: drum_osc, freq: 1000, mul: 1, add: 0); drum_env = drum_lpf * EnvGen.ar(Env.perc(0.005, sustain), 1.0, doneAction: 2); beater_source = WhiteNoise.ar(beater_noise_level); beater_hpf = HPF.ar(in: beater_source, freq: 500, mul: 1, add: 0); lpf_cutoff_contour = Line.kr(6000, 500, 0.03); beater_lpf = LPF.ar(in: beater_hpf, freq: lpf_cutoff_contour, mul: 1, add: 0); beater_env = beater_lpf * EnvGen.ar(Env.perc, 1.0, doneAction: 2); kick_mix = Mix.new([drum_env, beater_env]) * 2 * amp; Out.ar(out, [kick_mix, kick_mix]) }).add; // snare ------- // http://www.soundonsound.com/sos/Mar02/articles/synthsecrets0302.asp SynthDef(\snare, {arg out = 0, sustain = 0.1, drum_mode_level = 0.25, snare_level = 40, snare_tightness = 1000, freq = 405, amp = 0.8; var drum_mode_sin_1, drum_mode_sin_2, drum_mode_pmosc, drum_mode_mix, drum_mode_env; var snare_noise, snare_brf_1, snare_brf_2, snare_brf_3, snare_brf_4, snare_reson; var snare_env; var snare_drum_mix; sustain = 0.1; freq = 405; drum_mode_env = EnvGen.ar(Env.perc(0.005, sustain), 1.0, doneAction: 2); drum_mode_sin_1 = SinOsc.ar(freq*0.53, 0, drum_mode_env * 0.5); drum_mode_sin_2 = SinOsc.ar(freq, 0, drum_mode_env * 0.5); drum_mode_pmosc = PMOsc.ar( Saw.ar(freq*0.85), 184, 0.5/1.3, mul: drum_mode_env*5, add: 0); drum_mode_mix = Mix.new([drum_mode_sin_1, drum_mode_sin_2, drum_mode_pmosc]) * drum_mode_level; snare_noise = LFNoise0.ar(20000, 0.1); snare_env = EnvGen.ar(Env.perc(0.005, sustain), 1.0, doneAction: 2); snare_brf_1 = BRF.ar(in: snare_noise, freq: 8000, mul: 0.5, rq: 0.1); snare_brf_2 = BRF.ar(in: snare_brf_1, freq: 5000, mul: 0.5, rq: 0.1); snare_brf_3 = BRF.ar(in: snare_brf_2, freq: 3600, mul: 0.5, rq: 0.1); snare_brf_4 = BRF.ar(in: snare_brf_3, freq: 2000, mul: snare_env, rq: 0.0001); snare_reson = Resonz.ar(snare_brf_4, snare_tightness, mul: snare_level) ; snare_drum_mix = Mix.new([drum_mode_mix, snare_reson]) * 5 * amp; Out.ar(out, [snare_drum_mix, snare_drum_mix]); }).add; // hats ------- // http://www.soundonsound.com/sos/Jun02/articles/synthsecrets0602.asp SynthDef(\hats, {arg out = 0, freq = 6000, sustain = 0.1, amp = 0.8; var root_cymbal, root_cymbal_square, root_cymbal_pmosc; var initial_bpf_contour, initial_bpf, initial_env; var body_hpf, body_env; var cymbal_mix; amp = amp * 0.5; sustain = 0.1; freq = 6000; root_cymbal_square = Pulse.ar(freq, 0.5, mul: 1); root_cymbal_pmosc = PMOsc.ar(root_cymbal_square, [freq*1.34, freq*2.405, freq*3.09, freq*1.309], [310/1.3, 26/0.5, 11/3.4, 0.72772], mul: 1, add: 0); root_cymbal = Mix.new(root_cymbal_pmosc); initial_bpf_contour = Line.kr(15000, 9000, 0.1); initial_env = EnvGen.ar(Env.perc(0.005, 0.1), 1.0); initial_bpf = BPF.ar(root_cymbal, initial_bpf_contour, mul:initial_env); body_env = EnvGen.ar(Env.perc(0.005, sustain, 1, -2), 1.0, doneAction: 2); body_hpf = HPF.ar(in: root_cymbal, freq: Line.kr(9000, 12000, sustain),mul: body_env, add: 0); cymbal_mix = Mix.new([initial_bpf, body_hpf]) * amp; Out.ar(out, [cymbal_mix, cymbal_mix]) }).add; SynthDef("PMCrotale", { arg freq = 261, tone = 3, art = 1, amp = 0.8, pan = 0; var env, out, mod; env = Env.perc(0, art); mod = 5 + (1/IRand(2, 6)); out = PMOsc.ar(freq, mod*freq, pmindex: EnvGen.kr(env, timeScale: art, levelScale: tone), mul: EnvGen.kr(env, timeScale: art, levelScale: 0.3)); out = Pan2.ar(out, pan); out = out * EnvGen.kr(env, timeScale: 1.3*art, levelScale: Rand(0.1, 0.5), doneAction:2); Out.ar(0, out*amp); //Out.ar(bus, out); }).add; SynthDef("kick3", {arg punch = 1, amp = 1; var freq = EnvGen.kr(Env([400, 66], [0.08], -3)), sig = Normalizer.ar(SinOsc.ar(freq, 0.5pi, punch).distort, 1) * amp * EnvGen.kr(Env([0, 1, 0.8, 0], [0.01, 0.1, 0.2]), doneAction: 2); Out.ar(0, sig ! 2); }).add; SynthDef("ringkick", {arg freq = 40, decay = 0.25, amp = 1; var snd; snd = Ringz.ar( in: LPF.ar( in: Impulse.ar(0), freq: 1000), freq: freq, decaytime: decay, mul: 7 * amp).tanh.sin*2; Out.ar(0, snd!2); }).add; SynthDef("beating", {arg freq = 440, amp = 0.1, art = 1; var env, snd1, snd2; env = EnvGen.ar(Env.perc(0.01, art), doneAction: 2); snd1 = SinOsc.ar(freq); snd2 = SinOsc.ar(Line.kr(freq+15, freq, art)); Out.ar(0, Pan2.ar(Mix([snd1, snd2]), 0, amp*env)) }).add; SynthDef("bass", { |freq = 440, gate = 1, amp = 0.5, slideTime = 0.17, ffreq = 1100, width = 0.15, detune = 1.005, preamp = 4| var sig, env; env = Env.adsr(0.01, 0.3, 0.4, 0.1); freq = Lag.kr(freq, slideTime); sig = Mix(VarSaw.ar([freq, freq * detune], 0, width, preamp)).distort; sig = sig * amp * EnvGen.kr(env, gate, doneAction: 2); sig = LPF.ar(sig, ffreq); Out.ar(0, sig ! 2) }).add; SynthDef("kik", { |basefreq = 50, ratio = 7, sweeptime = 0.05, preamp = 1, amp = 1, decay1 = 0.3, decay1L = 0.8, decay2 = 0.15, out| var fcurve = EnvGen.kr(Env([basefreq * ratio, basefreq], [sweeptime], \exp)), env = EnvGen.kr(Env([1, decay1L, 0], [decay1, decay2], -4), doneAction: 2), sig = SinOsc.ar(fcurve, 0.5pi, preamp).distort * env * amp; Out.ar(out, sig ! 2) }).add; SynthDef("kraftySnr", { |amp = 1, freq = 2000, rq = 3, decay = 0.3, pan, out| var sig = PinkNoise.ar(amp), env = EnvGen.kr(Env.perc(0.01, decay), doneAction: 2); sig = BPF.ar(sig, freq, rq, env); Out.ar(out, Pan2.ar(sig, pan)) }).add; SynthDef("sillyvoice", { arg freq = 220, amp = 0.5, vibratoSpeed = 6, vibratoDepth = 4, vowel = 0, att = 0.01, rel = 0.1, lag = 1, gate = 1; var in, vibrato, env, va, ve, vi, vo, vu, snd; vibrato = SinOsc.kr(vibratoSpeed, mul: vibratoDepth); in = Saw.ar(Lag.kr(freq, lag) + vibrato); env = EnvGen.kr(Env.asr(att, 1, rel), gate, doneAction: 2); va = BBandPass.ar( in: in, freq: [ 600, 1040, 2250, 2450, 2750 ], bw: [ 0.1, 0.067307692307692, 0.048888888888889, 0.048979591836735, 0.047272727272727 ], mul: [ 1, 0.44668359215096, 0.35481338923358, 0.35481338923358, 0.1 ]); ve = BBandPass.ar( in: in, freq: [ 400, 1620, 2400, 2800, 3100 ] , bw: [ 0.1, 0.049382716049383, 0.041666666666667, 0.042857142857143, 0.038709677419355 ], mul: [ 1, 0.25118864315096, 0.35481338923358, 0.25118864315096, 0.12589254117942 ]); vi = BBandPass.ar( in: in, freq: [ 250, 1750, 2600, 3050, 3340 ] , bw: [ 0.24, 0.051428571428571, 0.038461538461538, 0.039344262295082, 0.035928143712575 ], mul: [ 1, 0.031622776601684, 0.15848931924611, 0.079432823472428, 0.03981071705535 ] ); vo = BBandPass.ar( in: in, freq:[ 400, 750, 2400, 2600, 2900 ] , bw: [ 0.1, 0.10666666666667, 0.041666666666667, 0.046153846153846, 0.041379310344828 ], mul: [ 1, 0.28183829312645, 0.089125093813375, 0.1, 0.01 ]); vu = BBandPass.ar( in: in, freq: [ 350, 600, 2400, 2675, 2950 ], bw: [ 0.11428571428571, 0.13333333333333, 0.041666666666667, 0.044859813084112, 0.040677966101695 ], mul: [ 1, 0.1, 0.025118864315096, 0.03981071705535, 0.015848931924611 ]); snd = SelectX.ar(Lag.kr(vowel, lag), [va, ve, vi, vo, vu]); snd = Mix.new(snd); Out.ar(0, snd!2 * env * amp); }).add; SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 5, coef = 0.1; var env, snd; env = EnvGen.kr(Env.linen(0, decay, 0), doneAction: 2); snd = Pluck.ar( in: WhiteNoise.ar(amp), trig: Impulse.kr(0), maxdelaytime: 0.1, delaytime: freq.reciprocal, decaytime: decay, coef: coef); Out.ar(0, [snd, snd]); }).add; SynthDef("defaultB", { arg out=0, freq=440, amp=0.1, pan=0, gate=1; var z; z = LPF.ar( Mix.new(VarSaw.ar(freq + [0, Rand(-0.4,0.0), Rand(0.0,0.4)], 0, 0.3)), XLine.kr(Rand(4000,5000), Rand(2500,3200), 1) ) * Linen.kr(gate, 0.01, 0.7, 0.3, 2); OffsetOut.ar(out, Pan2.ar(z, pan, amp)); }, [\ir]).add; SynthDef("trig_demo", { |freq = 440, gate = 1, t_trig = 1| var env, sig; env = Decay2.kr(t_trig, 0.01, 0.1); sig = SinOsc.ar(freq, 0, env); sig = sig * Linen.kr(gate, 0.01, 0.1, 0.1, doneAction: 2); Out.ar(0, sig ! 2) }).add; SynthDef("marimba1", {arg freq = 440, amp = 0.4; var snd, env; env = Env.linen(0.015, 1, 0.5, amp).kr(doneAction: 2); snd = BPF.ar(Saw.ar(0), freq, 0.02); snd = BLowShelf.ar(snd, 220, 0.81, 6); snd = snd * env; Out.ar(0, Splay.ar(snd)); }).add; SynthDef("trianglewavebells",{ arg out = 0, pan = 0.0, freq = 440, amp = 1.0, gate = 1, att = 0.01, dec = 0.1, sus = 1, rel = 0.5, lforate = 10, lfowidth = 0.0, cutoff = 100, rq = 0.5; var osc1, osc2, vibrato, filter, env; vibrato = SinOsc.ar(lforate, Rand(0, 2.0)); osc1 = Saw.ar(freq * (1.0 + (lfowidth * vibrato)), 0.75); osc2 = Mix(LFTri.ar((freq.cpsmidi + [11.9, 12.1]).midicps)); filter = RHPF.ar((osc1 + (osc2 * 0.5)) * 0.5, cutoff, rq); env = EnvGen.ar( envelope: Env.adsr(att, dec, sus, rel, amp), gate: gate, doneAction: 2); Out.ar(out, Pan2.ar(filter * env, pan)); }).add; SynthDef("organdonor",{ arg out = 0, pan = 0.0, freq = 440, amp = 0.1, gate = 1, att = 0.01, dec = 0.5, sus = 1, rel = 0.5, lforate = 10, lfowidth = 0.01, cutoff = 100, rq = 0.5; var vibrato, pulse, filter, env; vibrato = SinOsc.ar(lforate, Rand(0, 2.0)); // up octave, detune by 4 cents // 11.96.midiratio = 1.9953843530485 // up octave and a half, detune up by 10 cents // 19.10.midiratio = 3.0139733629359 freq = freq * [1, 1.9953843530485, 3.0139733629359]; freq = freq * (1.0 + (lfowidth * vibrato)); pulse = VarSaw.ar( freq: freq, iphase: Rand(0.0, 1.0) ! 3, width: Rand(0.3, 0.5) ! 3, mul: [1.0,0.7,0.3]); pulse = Mix(pulse); filter = RLPF.ar(pulse, cutoff, rq); env = EnvGen.ar( envelope: Env.adsr(att, dec, sus, rel, amp), gate: gate, doneAction: 2); Out.ar(out, Pan2.ar(filter * env, pan)); }).add; SynthDef(\mario, { |out, amp=0.3, freq=440, att=0.001, sustain=0.3, rel=0.03, dur=1| var snd; snd = LFPulse.ar(freq)!2; snd = snd * EnvGen.ar(Env.linen(att, sustain * 0.5, rel), doneAction:2); OffsetOut.ar(out, snd*amp*0.5); }).add;
SuperCollider
4
sofakid/Skoarcery
SuperCollider/examples/synthdefs.scd
[ "Artistic-2.0" ]
import * as React from 'react'; import ApiPage from 'docs/src/modules/components/ApiPage'; import mapApiPageTranslations from 'docs/src/modules/utils/mapApiPageTranslations'; import jsonPageContent from './mobile-date-time-picker.json'; export default function Page(props) { const { descriptions, pageContent } = props; return <ApiPage descriptions={descriptions} pageContent={pageContent} />; } Page.getInitialProps = () => { const req = require.context( 'docs/translations/api-docs/mobile-date-time-picker', false, /mobile-date-time-picker.*.json$/, ); const descriptions = mapApiPageTranslations(req); return { descriptions, pageContent: jsonPageContent, }; };
JavaScript
4
good-gym/material-ui
docs/pages/api-docs/mobile-date-time-picker.js
[ "MIT" ]
/** * */ import Util; import OpenApi; import EndpointUtil; extends OpenApi; init(config: OpenApi.Config){ super(config); @endpointRule = 'central'; @endpointMap = { ap-southeast-1 = 'dysmsapi.ap-southeast-1.aliyuncs.com', ap-southeast-5 = 'dysmsapi-xman.ap-southeast-5.aliyuncs.com', cn-beijing = 'dysmsapi-proxy.cn-beijing.aliyuncs.com', cn-hongkong = 'dysmsapi-xman.cn-hongkong.aliyuncs.com', }; checkConfig(config); @endpoint = getEndpoint('dysmsapi', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint); } function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{ if (!Util.empty(endpoint)) { return endpoint; } if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) { return endpointMap[regionId]; } return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix); } model QueryMessageRequest { messageId?: string(name='MessageId'), } model QueryMessageResponseBody = { status?: string(name='Status'), errorDescription?: string(name='ErrorDescription'), responseCode?: string(name='ResponseCode'), receiveDate?: string(name='ReceiveDate'), numberDetail?: { carrier?: string(name='Carrier'), region?: string(name='Region'), country?: string(name='Country'), }(name='NumberDetail'), message?: string(name='Message'), responseDescription?: string(name='ResponseDescription'), errorCode?: string(name='ErrorCode'), sendDate?: string(name='SendDate'), to?: string(name='To'), messageId?: string(name='MessageId'), } model QueryMessageResponse = { headers: map[string]string(name='headers'), body: QueryMessageResponseBody(name='body'), } async function queryMessageWithOptions(request: QueryMessageRequest, runtime: Util.RuntimeOptions): QueryMessageResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('QueryMessage', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function queryMessage(request: QueryMessageRequest): QueryMessageResponse { var runtime = new Util.RuntimeOptions{}; return queryMessageWithOptions(request, runtime); } model BatchSendMessageToGlobeRequest { to?: string(name='To'), from?: string(name='From'), message?: string(name='Message'), type?: string(name='Type'), taskId?: string(name='TaskId'), } model BatchSendMessageToGlobeResponseBody = { responseCode?: string(name='ResponseCode'), requestId?: string(name='RequestId'), failedList?: string(name='FailedList'), responseDescription?: string(name='ResponseDescription'), from?: string(name='From'), messageIdList?: string(name='MessageIdList'), successCount?: string(name='SuccessCount'), } model BatchSendMessageToGlobeResponse = { headers: map[string]string(name='headers'), body: BatchSendMessageToGlobeResponseBody(name='body'), } async function batchSendMessageToGlobeWithOptions(request: BatchSendMessageToGlobeRequest, runtime: Util.RuntimeOptions): BatchSendMessageToGlobeResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('BatchSendMessageToGlobe', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function batchSendMessageToGlobe(request: BatchSendMessageToGlobeRequest): BatchSendMessageToGlobeResponse { var runtime = new Util.RuntimeOptions{}; return batchSendMessageToGlobeWithOptions(request, runtime); } model SmsConversionRequest { messageId?: string(name='MessageId'), delivered?: boolean(name='Delivered'), conversionTime?: long(name='ConversionTime'), } model SmsConversionResponseBody = { responseCode?: string(name='ResponseCode'), responseDescription?: string(name='ResponseDescription'), requestId?: string(name='RequestId'), } model SmsConversionResponse = { headers: map[string]string(name='headers'), body: SmsConversionResponseBody(name='body'), } async function smsConversionWithOptions(request: SmsConversionRequest, runtime: Util.RuntimeOptions): SmsConversionResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SmsConversion', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function smsConversion(request: SmsConversionRequest): SmsConversionResponse { var runtime = new Util.RuntimeOptions{}; return smsConversionWithOptions(request, runtime); } model SendMessageToGlobeRequest { to?: string(name='To'), from?: string(name='From'), message?: string(name='Message'), taskId?: string(name='TaskId'), } model SendMessageToGlobeResponseBody = { responseCode?: string(name='ResponseCode'), numberDetail?: { carrier?: string(name='Carrier'), region?: string(name='Region'), country?: string(name='Country'), }(name='NumberDetail'), requestId?: string(name='RequestId'), segments?: string(name='Segments'), responseDescription?: string(name='ResponseDescription'), from?: string(name='From'), to?: string(name='To'), messageId?: string(name='MessageId'), } model SendMessageToGlobeResponse = { headers: map[string]string(name='headers'), body: SendMessageToGlobeResponseBody(name='body'), } async function sendMessageToGlobeWithOptions(request: SendMessageToGlobeRequest, runtime: Util.RuntimeOptions): SendMessageToGlobeResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SendMessageToGlobe', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function sendMessageToGlobe(request: SendMessageToGlobeRequest): SendMessageToGlobeResponse { var runtime = new Util.RuntimeOptions{}; return sendMessageToGlobeWithOptions(request, runtime); } model ConversionDataRequest { reportTime?: long(name='ReportTime'), conversionRate?: string(name='ConversionRate'), } model ConversionDataResponseBody = { responseCode?: string(name='ResponseCode'), responseDescription?: string(name='ResponseDescription'), requestId?: string(name='RequestId'), } model ConversionDataResponse = { headers: map[string]string(name='headers'), body: ConversionDataResponseBody(name='body'), } async function conversionDataWithOptions(request: ConversionDataRequest, runtime: Util.RuntimeOptions): ConversionDataResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('ConversionData', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function conversionData(request: ConversionDataRequest): ConversionDataResponse { var runtime = new Util.RuntimeOptions{}; return conversionDataWithOptions(request, runtime); } model SendMessageWithTemplateRequest { to?: string(name='To'), from?: string(name='From'), templateCode?: string(name='TemplateCode'), templateParam?: string(name='TemplateParam'), smsUpExtendCode?: string(name='SmsUpExtendCode'), } model SendMessageWithTemplateResponseBody = { responseCode?: string(name='ResponseCode'), numberDetail?: { carrier?: string(name='Carrier'), region?: string(name='Region'), country?: string(name='Country'), }(name='NumberDetail'), responseDescription?: string(name='ResponseDescription'), segments?: string(name='Segments'), to?: string(name='To'), messageId?: string(name='MessageId'), } model SendMessageWithTemplateResponse = { headers: map[string]string(name='headers'), body: SendMessageWithTemplateResponseBody(name='body'), } async function sendMessageWithTemplateWithOptions(request: SendMessageWithTemplateRequest, runtime: Util.RuntimeOptions): SendMessageWithTemplateResponse { Util.validateModel(request); var req = new OpenApi.OpenApiRequest{ body = Util.toMap(request), }; return doRPCRequest('SendMessageWithTemplate', '2018-05-01', 'HTTPS', 'POST', 'AK', 'json', req, runtime); } async function sendMessageWithTemplate(request: SendMessageWithTemplateRequest): SendMessageWithTemplateResponse { var runtime = new Util.RuntimeOptions{}; return sendMessageWithTemplateWithOptions(request, runtime); }
Tea
5
aliyun/alibabacloud-sdk
dysmsapi-20180501/main.tea
[ "Apache-2.0" ]
// Copyright 2017 Elias Aebi // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace Xi { class Blinker { private uint interval; private TimeoutSource source; private uint counter; public signal void redraw(); public Blinker(uint interval) { this.interval = interval; } private bool blink() { counter++; redraw(); return counter < 18; } public void stop() { if (source != null) { source.destroy(); } counter = 0; } public void restart() { stop(); source = new TimeoutSource(interval); source.set_callback(blink); source.attach(null); } public bool draw_cursor() { return counter % 2 == 0; } } }
Vala
4
Timmmm/xi-gtk
src/Blinker.vala
[ "Apache-2.0" ]
/* * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "config.h" #include "common.h" #include "pixelutils.h" #include "internal.h" #if CONFIG_PIXELUTILS #include "x86/pixelutils.h" static av_always_inline int sad_wxh(const uint8_t *src1, ptrdiff_t stride1, const uint8_t *src2, ptrdiff_t stride2, int w, int h) { int x, y, sum = 0; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) sum += abs(src1[x] - src2[x]); src1 += stride1; src2 += stride2; } return sum; } #define DECLARE_BLOCK_FUNCTIONS(size) \ static int block_sad_##size##x##size##_c(const uint8_t *src1, ptrdiff_t stride1, \ const uint8_t *src2, ptrdiff_t stride2) \ { \ return sad_wxh(src1, stride1, src2, stride2, size, size); \ } DECLARE_BLOCK_FUNCTIONS(2) DECLARE_BLOCK_FUNCTIONS(4) DECLARE_BLOCK_FUNCTIONS(8) DECLARE_BLOCK_FUNCTIONS(16) DECLARE_BLOCK_FUNCTIONS(32) static const av_pixelutils_sad_fn sad_c[] = { block_sad_2x2_c, block_sad_4x4_c, block_sad_8x8_c, block_sad_16x16_c, block_sad_32x32_c, }; #endif /* CONFIG_PIXELUTILS */ av_pixelutils_sad_fn av_pixelutils_get_sad_fn(int w_bits, int h_bits, int aligned, void *log_ctx) { #if !CONFIG_PIXELUTILS av_log(log_ctx, AV_LOG_ERROR, "pixelutils support is required " "but libavutil is not compiled with it\n"); return NULL; #else av_pixelutils_sad_fn sad[FF_ARRAY_ELEMS(sad_c)]; memcpy(sad, sad_c, sizeof(sad)); if (w_bits < 1 || w_bits > FF_ARRAY_ELEMS(sad) || h_bits < 1 || h_bits > FF_ARRAY_ELEMS(sad)) return NULL; if (w_bits != h_bits) // only squared sad for now return NULL; #if ARCH_X86 ff_pixelutils_sad_init_x86(sad, aligned); #endif return sad[w_bits - 1]; #endif }
C
4
attenuation/srs
trunk/3rdparty/ffmpeg-4-fit/libavutil/pixelutils.c
[ "MIT" ]
// run-pass fn main() { let x = 1; #[cfg(FALSE)] if false { x = 2; } else if true { x = 3; } else { x = 4; } assert_eq!(x, 1); }
Rust
3
Eric-Arellano/rust
src/test/ui/expr/if/attrs/gate-whole-expr.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
### /product-spu/page 成功(全部) GET {{baseUrl}}/pay/transaction/page?pageNo=1&pageSize=10 Content-Type: application/x-www-form-urlencoded Authorization: Bearer {{accessToken}} dubbo-tag: {{dubboTag}} ###
HTTP
2
ssSlowDown/onemall
management-web-app/src/main/java/cn/iocoder/mall/managementweb/controller/pay/PayTransactionController.http
[ "MulanPSL-1.0" ]
fun foo(): Int { return <caret>a }
Kotlin
0
Mu-L/kotlin
analysis/analysis-api/testData/components/expressionTypeProvider/expectedExpressionType/returnFromFunction.kt
[ "ECL-2.0", "Apache-2.0" ]
@import "subs.css"; @import "print-main.css" print; @media print { body { font-size: 10pt } nav { color: blue; } } h1 {color: red; }
CSS
2
KarlParkinson/mitmproxy
test/mitmproxy/contentviews/test_css_data/media-directive.css
[ "MIT" ]
MODULE = Agar::Scrollbar PACKAGE = Agar::Scrollbar PREFIX = AG_ PROTOTYPES: ENABLE VERSIONCHECK: DISABLE Agar::Scrollbar newHoriz(package, parent, ...) const char * package Agar::Widget parent PREINIT: Uint wflags = 0; CODE: if ((items == 3 && SvTYPE(SvRV(ST(2))) != SVt_PVHV) || items > 3) { Perl_croak(aTHX_ "Usage: Agar::Scrollbar->newHoriz(parent,[{opts}])"); } if (items == 3) { AP_MapHashToFlags(SvRV(ST(2)), apWidgetFlagNames, &wflags); } RETVAL = AG_ScrollbarNew(parent, AG_SCROLLBAR_HORIZ, 0); if (RETVAL) { AGWIDGET(RETVAL)->flags |= wflags; } OUTPUT: RETVAL Agar::Scrollbar newVert(package, parent, ...) const char * package Agar::Widget parent PREINIT: Uint wflags = 0; CODE: if ((items == 3 && SvTYPE(SvRV(ST(2))) != SVt_PVHV) || items > 3) { Perl_croak(aTHX_ "Usage: Agar::Scrollbar->newVert(parent,[{opts}])"); } if (items == 3) { AP_MapHashToFlags(SvRV(ST(2)), apWidgetFlagNames, &wflags); } RETVAL = AG_ScrollbarNew(parent, AG_SCROLLBAR_VERT, 0); if (RETVAL) { AGWIDGET(RETVAL)->flags |= wflags; } OUTPUT: RETVAL void setIncrementInt(self, step) Agar::Scrollbar self int step CODE: AG_SetInt(self, "inc", step); void setIncrementFloat(self, step) Agar::Scrollbar self double step CODE: AG_SetFloat(self, "inc", step); void incAction(self, coderef) Agar::Scrollbar self SV * coderef CODE: if (SvTYPE(SvRV(coderef)) == SVt_PVCV) { SvREFCNT_inc(coderef); AP_DecRefEventPV(self->buttonIncFn); AG_ScrollbarSetIncFn(self, AP_EventHandler, "%p", coderef); } else { Perl_croak(aTHX_ "Usage: $scrollbar->incAction(codeRef)"); } void decAction(self, coderef) Agar::Scrollbar self SV * coderef CODE: if (SvTYPE(SvRV(coderef)) == SVt_PVCV) { SvREFCNT_inc(coderef); AP_DecRefEventPV(self->buttonDecFn); AG_ScrollbarSetDecFn(self, AP_EventHandler, "%p", coderef); } else { Perl_croak(aTHX_ "Usage: $scrollbar->decAction(codeRef)"); } void setFlag(self, name) Agar::Scrollbar self const char * name CODE: AP_SetNamedFlag(name, apWidgetFlagNames, &(AGWIDGET(self)->flags)); void unsetFlag(self, name) Agar::Scrollbar self const char * name CODE: AP_UnsetNamedFlag(name, apWidgetFlagNames, &(AGWIDGET(self)->flags)); Uint getFlag(self, name) Agar::Scrollbar self const char * name CODE: if (AP_GetNamedFlag(name, apWidgetFlagNames, AGWIDGET(self)->flags, &RETVAL)) { XSRETURN_UNDEF; } OUTPUT: RETVAL
XS
4
auzkok/libagar
p5-Agar/Agar/Scrollbar.xs
[ "BSD-2-Clause" ]
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { IWebviewViewService, WebviewViewService } from 'vs/workbench/contrib/webviewView/browser/webviewViewService'; registerSingleton(IWebviewViewService, WebviewViewService, true);
TypeScript
3
sbj42/vscode
src/vs/workbench/contrib/webviewView/browser/webviewView.contribution.ts
[ "MIT" ]
#tag Class Class NSUUID Inherits NSObject #tag Method, Flags = &h21 Private Sub Constructor() End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(data as Text) // Create a class dim cl as ptr = NSClassFromString("NSUUID") declare function initWithUUIDString lib FoundationLib selector "initWithUUIDString:" (obj as ptr, s as CFStringRef) as ptr dim obj as ptr = initWithUUIDString(allocate(cl),data) super.Constructor(obj) End Sub #tag EndMethod #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function UUIDString lib UIKitLib selector "UUIDString" (obj as ptr) as ptr dim p as ptr = UUIDString(self.ID) dim nss as new NSString(p) dim txt as text = nss.UTF8String return txt End Get #tag EndGetter UUIDString As Text #tag EndComputedProperty #tag ViewBehavior #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="UUIDString" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
Xojo
3
kingj5/iOSKit
Modules/Foundation/NSUUID.xojo_code
[ "MIT" ]
#!/opt/local/bin/gnuplot -persist # # # G N U P L O T # Version 4.4 patchlevel 3 # last modified March 2011 # System: Darwin 10.8.0 # # Copyright (C) 1986-1993, 1998, 2004, 2007-2010 # Thomas Williams, Colin Kelley and many others # # gnuplot home: http://www.gnuplot.info # faq, bugs, etc: type "help seeking-assistance" # immediate help: type "help" # plot window: hit 'h' set terminal postscript eps noenhanced defaultplex \ leveldefault color colortext \ solid linewidth 1.2 butt noclip \ palfuncparam 2000,0.003 \ "Helvetica" 14 set output 'bench.eps' unset clip points set clip one unset clip two set bar 1.000000 front set border 31 front linetype -1 linewidth 1.000 set xdata set ydata set zdata set x2data set y2data set timefmt x "%d/%m/%y,%H:%M" set timefmt y "%d/%m/%y,%H:%M" set timefmt z "%d/%m/%y,%H:%M" set timefmt x2 "%d/%m/%y,%H:%M" set timefmt y2 "%d/%m/%y,%H:%M" set timefmt cb "%d/%m/%y,%H:%M" set boxwidth set style fill empty border set style rectangle back fc lt -3 fillstyle solid 1.00 border lt -1 set style circle radius graph 0.02, first 0, 0 set dummy x,y set format x "% g" set format y "% g" set format x2 "% g" set format y2 "% g" set format z "% g" set format cb "% g" set angles radians unset grid set key title "" set key outside left top horizontal Right noreverse enhanced autotitles columnhead nobox set key noinvert samplen 4 spacing 1 width 0 height 0 set key maxcolumns 2 maxrows 0 unset label unset arrow set style increment default unset style line set style line 1 linetype 1 linewidth 2.000 pointtype 1 pointsize default pointinterval 0 unset style arrow set style histogram clustered gap 2 title offset character 0, 0, 0 unset logscale set offsets graph 0.05, 0.15, 0, 0 set pointsize 1.5 set pointintervalbox 1 set encoding default unset polar unset parametric unset decimalsign set view 60, 30, 1, 1 set samples 100, 100 set isosamples 10, 10 set surface unset contour set clabel '%8.3g' set mapping cartesian set datafile separator whitespace unset hidden3d set cntrparam order 4 set cntrparam linear set cntrparam levels auto 5 set cntrparam points 5 set size ratio 0 1,1 set origin 0,0 set style data points set style function lines set xzeroaxis linetype -2 linewidth 1.000 set yzeroaxis linetype -2 linewidth 1.000 set zzeroaxis linetype -2 linewidth 1.000 set x2zeroaxis linetype -2 linewidth 1.000 set y2zeroaxis linetype -2 linewidth 1.000 set ticslevel 0.5 set mxtics default set mytics default set mztics default set mx2tics default set my2tics default set mcbtics default set xtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 set xtics norangelimit set xtics () set ytics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 set ytics autofreq norangelimit set ztics border in scale 1,0.5 nomirror norotate offset character 0, 0, 0 set ztics autofreq norangelimit set nox2tics set noy2tics set cbtics border in scale 1,0.5 mirror norotate offset character 0, 0, 0 set cbtics autofreq norangelimit set title "" set title offset character 0, 0, 0 font "" norotate set timestamp bottom set timestamp "" set timestamp offset character 0, 0, 0 font "" norotate set rrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) set autoscale rfixmin set autoscale rfixmax set trange [ * : * ] noreverse nowriteback # (currently [-5.00000:5.00000] ) set autoscale tfixmin set autoscale tfixmax set urange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set autoscale ufixmin set autoscale ufixmax set vrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set autoscale vfixmin set autoscale vfixmax set xlabel "" set xlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate set x2label "" set x2label offset character 0, 0, 0 font "" textcolor lt -1 norotate set xrange [ * : * ] noreverse nowriteback # (currently [-0.150000:3.15000] ) set autoscale xfixmin set autoscale xfixmax set x2range [ * : * ] noreverse nowriteback # (currently [0.00000:3.00000] ) set autoscale x2fixmin set autoscale x2fixmax set ylabel "" set ylabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 set y2label "" set y2label offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 set yrange [ 0.00000 : 1.90000e+06 ] noreverse nowriteback # (currently [:] ) set autoscale yfixmin set autoscale yfixmax set y2range [ * : * ] noreverse nowriteback # (currently [0.00000:1.90000e+06] ) set autoscale y2fixmin set autoscale y2fixmax set zlabel "" set zlabel offset character 0, 0, 0 font "" textcolor lt -1 norotate set zrange [ * : * ] noreverse nowriteback # (currently [-10.0000:10.0000] ) set autoscale zfixmin set autoscale zfixmax set cblabel "" set cblabel offset character 0, 0, 0 font "" textcolor lt -1 rotate by -270 set cbrange [ * : * ] noreverse nowriteback # (currently [8.98847e+307:-8.98847e+307] ) set autoscale cbfixmin set autoscale cbfixmax set zero 1e-08 set lmargin -1 set bmargin -1 set rmargin -1 set tmargin -1 set pm3d explicit at s set pm3d scansautomatic set pm3d interpolate 1,1 flush begin noftriangles nohidden3d corners2color mean set palette positive nops_allcF maxcolors 0 gamma 1.5 color model RGB set palette rgbformulae 7, 5, 15 set colorbox default set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front bdefault set loadpath set fontpath set fit noerrorvariables GNUTERM = "aqua" plot 'bench_results.txt' using 2:xticlabel(1) w lp lw 2, '' using 3:xticlabel(1) w lp lw 2, '' using 4:xticlabel(1) w lp lw 2, '' using 5:xticlabel(1) w lp lw 2, '' using 6:xticlabel(1) w lp lw 2, '' using 7:xticlabel(1) w lp lw 2, '' using 8:xticlabel(1) w lp lw 2, '' using 9:xticlabel(1) w lp lw 2 # EOF
Gnuplot
3
andela-jejezie/peopleProject
node_modules/node-uuid/benchmark/bench.gnu
[ "MIT" ]
module org-openroadm-device { namespace "http://org/openroadm/device"; prefix org-openroadm-device; import ietf-yang-types { prefix ietf-yang-types; } import ietf-inet-types { prefix ietf-inet-types; } import ietf-netconf { prefix ietf-nc; } import org-openroadm-common-types { prefix org-openroadm-common-types; } import org-openroadm-resource-types { prefix org-openroadm-resource-types; } import org-openroadm-wavelength-map { prefix org-openroadm-wavelength-map; } import org-openroadm-physical-types { prefix org-openroadm-physical-types; } import org-openroadm-user-mgmt { prefix org-openroadm-user-mgmt; } import org-openroadm-port-types { prefix org-openroadm-port-types; } import org-openroadm-interfaces { prefix org-openroadm-interfaces; } import org-openroadm-swdl { prefix org-openroadm-swdl; } import org-openroadm-equipment-states-types { prefix org-openroadm-equipment-states-types; } organization "Open ROADM MSA"; contact "OpenROADM.org"; description "YANG definitions of ROADM device Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016, AT&T Intellectual Property. All other rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the Members of the Open ROADM MSA Agreement nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Also contains code components extracted from IETF netconf. These code components are copyrighted and licensed as follows: Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License."; revision 2017-02-06 { description "Version 1.2.1 - removed pattern for current-datetime in info tree and rpc"; } revision 2016-10-14 { description "Version 1.2"; } rpc get-connection-port-trail { input { leaf connection-number { type string; mandatory true; } } output { uses org-openroadm-common-types:rpc-response-status; list ports { uses org-openroadm-common-types:physical-location; uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } } } rpc disable-automatic-shutoff { input { leaf amp { type leafref { path "/org-openroadm-device/shelves/shelf-name"; } mandatory true; description "The shelf where amp is located"; } leaf degree-number { type uint16; mandatory true; } leaf support-timer { type uint16 { range "1..600"; } default "20"; } } output { uses org-openroadm-common-types:rpc-response-status; } } rpc start-scan { input { leaf degree-number { type uint16; mandatory true; } leaf port-direction { type org-openroadm-common-types:direction; } leaf distance { type uint32; } leaf resolution { type uint32; } } output { uses org-openroadm-common-types:rpc-response-status; } } notification otdr-scan-result { leaf status { type enumeration { enum "Completed" { value 1; } enum "Failed" { value 2; } } mandatory true; description "Completed or Failed for the scan's final status"; } leaf result-file { type string; } } rpc set-current-datetime { description "Set the info/current-datetime leaf to the specified value."; input { leaf current-datetime { type ietf-yang-types:date-and-time; mandatory true; description "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS"; } } output { uses org-openroadm-common-types:rpc-response-status; } } grouping device-common { leaf node-id { type string; description "Globally unique identifer for a device."; default "openroadm"; } leaf node-number { type uint32; description "Number assigned to a ROADM node at a given office"; } leaf node-type { type org-openroadm-common-types:node-types; description "Identifier for node-type e.g Roadm, xponder"; config false; mandatory true; } leaf clli { type string; description "Common Language Location Identifier."; } uses org-openroadm-physical-types:node-info; leaf ipAddress { type ietf-inet-types:ip-address; description "IP Address of device"; } leaf prefix-length { type uint8 { range "0..128"; } description "The length of the subnet prefix"; } leaf defaultGateway { type ietf-inet-types:ip-address; description "Default Gateway"; } leaf source { type enumeration { enum "static" { value 1; } enum "dhcp" { value 2; } } config false; } leaf current-ipAddress { type ietf-inet-types:ip-address; config false; description "Current IP Address of device"; } leaf current-prefix-length { type uint8 { range "0..128"; } config false; description "The current length of the subnet prefix"; } leaf current-defaultGateway { type ietf-inet-types:ip-address; config false; description "Current Default Gateway"; } leaf macAddress { type ietf-yang-types:mac-address; description "MAC Address of device"; config false; } leaf softwareVersion { type string; config false; description "Software version"; } leaf template { type string; description "Template information used in the deployment."; } leaf current-datetime { type ietf-yang-types:date-and-time; config false; description "The current system date and time in UTC. Format: YYYY-MM-DDTHH:MM:SS.mm+ "; } container geoLocation { description "GPS location"; leaf latitude { type decimal64 { fraction-digits 16; range "-90 .. 90"; } description "[From wikipedia] Latitude is an angle (defined below) which ranges from 0° at the Equator to 90° (North or South) at the poles"; } leaf longitude { type decimal64 { fraction-digits 16; range "-180 .. 180"; } description "[From wikipedia] The longitude is measured as the angle east or west from the Prime Meridian, ranging from 0° at the Prime Meridian to +180° eastward and −180° westward."; } } } grouping slot-info { description "slots information. To be populated by NE during retrieval."; leaf slot-name { type string; description "The name of this slot."; } leaf label { type string; description "Faceplate label"; } leaf provisioned-circuit-pack { type leafref { path "/org-openroadm-device/circuit-packs/circuit-pack-name"; } description "The supported circuit-pack. It will be empty if no provision on this slot."; } } grouping shelves { list shelves { key "shelf-name"; uses shelf; } } grouping shelf { leaf shelf-name { description "Unique identifier for this shelf within a device"; type string; } leaf shelf-type { description "The shelf type: describe the shelf with a unique string."; type string; mandatory true; } leaf rack { description "Reflect the shelf physical location data including floor, aisle, bay values."; type string; } leaf shelf-position { description "Reflect the shelf vertical position within an equipment bay."; type string; } leaf administrative-state { description "Admin State of the shelf"; type org-openroadm-equipment-states-types:admin-states; } uses org-openroadm-physical-types:common-info; leaf equipment-state { type org-openroadm-equipment-states-types:states; description "equipment state for the shelf, used to track the lifecycle state."; } leaf due-date { type ietf-yang-types:date-and-time; description "due date for the shelf."; } list slots { description "List of slots on this shelf. To be populated by NE during retrieval."; key "slot-name"; config false; uses slot-info; } } grouping circuit-packs { list circuit-packs { description "List of circuit packs. This includes common equipment, like fans, power supplies, etc."; key "circuit-pack-name"; leaf circuit-pack-type { description "Type of circuit-pack"; type string; mandatory true; } leaf circuit-pack-product-code { description "Product Code for the circuit-pack"; type string; } uses circuit-pack; } } grouping circuit-pack { leaf circuit-pack-name { description "Unique identifier for this circuit-pack within a device"; type string; } leaf administrative-state { description "Administrative state of circuit-pack"; type org-openroadm-equipment-states-types:admin-states; } uses org-openroadm-physical-types:common-info; container circuit-pack-category { description "General type of circuit-pack"; uses org-openroadm-common-types:equipment-type; config false; } leaf equipment-state { description "Equipment state, which complements operational state."; type org-openroadm-equipment-states-types:states; } leaf circuit-pack-mode { description "Circuit-pack mode allowed. e.g. NORMAL or REGEN"; type string; default "NORMAL"; } leaf shelf { type leafref { path "/org-openroadm-device/shelves/shelf-name"; } mandatory true; } leaf slot { type string; mandatory true; } leaf subSlot { type string; mandatory false; } leaf due-date { type ietf-yang-types:date-and-time; description "due date for this circuit-pack."; } container parent-circuit-pack { description "In the case of circuit packs that contain other equipment (modules or pluggables), this captures the hierarchy of that equipment. It is a vendor specific design decision if the ports for single-port pluggables are modeled as children of the parent circuit-pack, or as children of the pluggable circuit-pack contained in the parent circuit-pack. For modules with multiple ports, it is recommended that ports be children of the module and not the carrier, to help in fault correlation and isolation in the case of a module failure."; uses circuit-pack-name; leaf cp-slot-name { type string; description "Slot name on parent-circuit-pack."; } } list cp-slots { description "List of circuit-pack slots on this circuit-pack. To be populated by NE during retrieval."; key "slot-name"; config false; uses slot-info; } list ports { key "port-name"; description "List of ports on this circuit-pack. For single port pluggables, the port may be modeled against the pluggable itself, or against the parent-circuit-pack. For mulit-port pluggables, it is recommended that ports be modeled against the module itself. Modeling ports as close to the equipment hierarchy as possible will help in fault correlation and isolation since common failures associated with supporting equipment can be used to help identify symptomatic failures on the contained ports."; uses port; container roadm-port { when "../port-qual='roadm-external'"; uses org-openroadm-port-types:roadm-port; } container transponder-port { when "../port-qual='xpdr-network' or ../port-qual='xpdr-client'"; uses org-openroadm-port-types:common-port; } container otdr-port { when "../port-qual='otdr'"; description "Settings for otdr port."; leaf launch-cable-length { type uint32; default "30"; units "m"; } leaf port-direction { type org-openroadm-common-types:direction; } } } } grouping connection { description "Grouping used to define connections."; leaf connection-number { type string; } leaf wavelength-number { type uint32; mandatory true; description "wavelength-number, can be used to access wavelength-map to get wavelength value in nm."; } leaf opticalControlMode { description "Whether connection is currently in power or gain/loss mode"; type org-openroadm-common-types:optical-control-mode; reference "openroadm.org: Open ROADM MSA Specification."; default "off"; } leaf target-output-power { type org-openroadm-common-types:power-dBm; description "The output target power for this connection. When set, the ROADM will work to ensure that current-output-power reaches this level."; } container source { leaf src-if { type leafref { path "/org-openroadm-device/interface/name"; } mandatory true; } } container destination { leaf dst-if { type leafref { path "/org-openroadm-device/interface/name"; } mandatory true; } } } grouping degree { leaf degree-number { type uint16; must "not( current() > /org-openroadm-device/info/max-degrees) and current() > 0" { error-message "Degree not supported by device "; description "Validating if the degree is supported by device"; } } leaf max-wavelengths { type uint16; description "maximum number of wavelengths"; config false; mandatory true; } list circuit-packs { key "index"; description "list for Cards associated with a degree"; leaf index { type uint32; } uses circuit-pack-name { refine "circuit-pack-name" { mandatory true; } } } list connection-ports { description "Port associated with degree: One if bi-directional; two if uni-directional"; key "index"; leaf index { type uint32; } uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } container otdr-port { description "otdr port associated with degree."; uses port-name; } } grouping external-links { description "YANG definitions for external links.. - physical links between ROADMs and between the ROADMs and XPonders, which can be added and removed maually."; list external-link { key "external-link-name"; uses external-link; } } grouping external-link { leaf external-link-name { type string; } container source { uses org-openroadm-resource-types:device-id { refine "node-id" { mandatory true; } } uses org-openroadm-resource-types:port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } container destination { uses org-openroadm-resource-types:device-id { refine "node-id" { mandatory true; } } uses org-openroadm-resource-types:port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } } grouping internal-links { list internal-link { key "internal-link-name"; config false; uses internal-link; } } grouping internal-link { leaf internal-link-name { type string; } container source { uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } container destination { uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } } grouping physical-links { description "YANG definitions for physical links. - phyical links between cards within a ROADM, which are populated by the ROADM and cannot be added or removed manually. "; list physical-link { key "physical-link-name"; uses physical-link; } } grouping physical-link { leaf physical-link-name { type string; } container source { uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } container destination { uses port-name { refine "circuit-pack-name" { mandatory true; } refine "port-name" { mandatory true; } } } } grouping srg { leaf max-add-drop-ports { type uint16; config false; mandatory true; } leaf srg-number { type uint16; must "not(current()>/org-openroadm-device/info/max-srgs) and current()>0" { error-message "invalid SRG"; description "Validating if the srg is supported by add/drop group"; } } leaf wavelengthDuplication { description "Whether the SRG can handle duplicate wavelengths and if so to what extent."; config false; mandatory true; type enumeration { enum "onePerSRG" { description "The SRG cannot handle wavelength duplication. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will result in failure."; value 1; } enum "onePerDegree" { description "The SRG can handle wavelength duplication, but only one per degree. Attempting to provision a connection on this SRG that uses the same wavelength as an existing service will succeed, so long as the connections are not using the same degree."; value 2; } } } list circuit-packs { key "index"; description "list for Cards associated with an add/drop group and srg"; leaf index { type uint32; } uses circuit-pack-name { refine "circuit-pack-name" { mandatory true; } } } } grouping degree-number { leaf degree-number { description "Degree identifier. Unique within the context of a device."; type leafref { path "/org-openroadm-device/degree/degree-number"; } } } grouping circuit-pack-name { leaf circuit-pack-name { description "Circuit-Pack identifier. Unique within the context of a device."; type leafref { path "/org-openroadm-device/circuit-packs/circuit-pack-name"; } } } grouping port-name { uses circuit-pack-name; leaf port-name { description "Port identifier. Unique within the context of a circuit-pack."; type leafref { path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name"; } } } grouping srg-number { leaf srg-number { description "Shared Risk Group identifier. Unique within the context of a device."; type leafref { path "/org-openroadm-device/shared-risk-group/srg-number"; } } } grouping supporting-port-name { leaf supporting-circuit-pack-name { description "Identifier of the supporting circuit-pack."; type leafref { path "/org-openroadm-device/circuit-packs/circuit-pack-name"; } mandatory true; } leaf supporting-port { description "Identifier of the supporting port."; mandatory true; type leafref { path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../supporting-circuit-pack-name]/ports/port-name"; } } } grouping interface-name { leaf interface-name { description "Name of an interface. Unique within the context of a device."; type leafref { path "/org-openroadm-device/interface/name"; } config false; } } grouping interfaces-grp { description "OpenROADM Interface configuration parameters."; list interface { key "name"; description "The list of configured interfaces on the device."; leaf name { type string; description "The name of the interface."; } leaf description { type string; description "A textual description of the interface."; } leaf type { type identityref { base org-openroadm-interfaces:interface-type; } mandatory true; description "The type of the interface."; } leaf administrative-state { type org-openroadm-equipment-states-types:admin-states; } leaf operational-state { type org-openroadm-common-types:state; config false; } leaf circuit-id { type string { length "0..45"; } description "circuit identifier/user label, can be used in alarm correlation and/or connection management "; } leaf supporting-interface { type leafref { path "/org-openroadm-device/interface/name"; } } uses supporting-port-name; } } grouping port { description "Grouping of attributes related to a port object."; leaf port-name { type string; mandatory true; description "Identifier for a port, unique within a circuit pack"; } leaf port-type { type string; description "Type of the pluggable or fixed port."; } leaf port-qual { type enumeration { enum "roadm-internal" { value 1; } enum "roadm-external" { value 2; } enum "xpdr-network" { value 3; } enum "xpdr-client" { value 4; } enum "otdr" { value 5; } } } leaf port-wavelength-type { type org-openroadm-port-types:port-wavelength-types; config false; description "Type of port - single, multiple-wavelength, etc."; } leaf port-direction { type org-openroadm-common-types:direction; config false; mandatory true; description "Whether port is uni (tx/rx) or bi-directional and"; } leaf label { type string; config false; description "Faceplate label"; } leaf circuit-id{ type string{ length "0..45"; } description "circuit identifier/user label, can be used in alarm correlation and/or connection management "; } leaf administrative-state { type org-openroadm-equipment-states-types:admin-states; description "Administrative state of port. The value of this field independant of the state of its contained and containing resources. Setting this a port to administratively down will impact both its operational state, as well the operational state of its contained resources. If this port is an endpoint to a connection, internal-link, physical-link, etc, then administratevely disabling this port will impact the operational state of those items unless they are using some form of port-protection schema."; default "outOfService"; } leaf operational-state { type org-openroadm-common-types:state; config false; mandatory true; description "Operational state of a port"; } leaf-list supported-interface-capability { description "Interface types supported on this port"; config false; type identityref { base org-openroadm-port-types:supported-if-capability; } } leaf logical-connection-point { type string; description "delete or replace with list logical-ports or connections?"; } container partner-port { config false; description "For ports which are not identified as having a direction of bidirectional, this field is used to identify the port which corresponds to the reverse direction. A port pair should include a port for each direction (tx, rx) and report their mate as partner-port."; uses port-name; } container parent-port { config false; description "In the case of port hierarchy, this is the parent port, which is also modeled as port within this circuit-pack. This is used in the case of a port that supports a parallel connector that contains subports. The parent-port of the subport will be the port that contains this subport. This can be used to help isolate faults when a single fault on a parallel connector introduces symptomatic failures on the contained subports."; uses port-name; } list interfaces { config false; description "List of the interfaces this port supports. This is a list of names of instances in the flat instance list"; uses interface-name; } } uses org-openroadm-device-container; grouping org-openroadm-device-container { container org-openroadm-device { container info { uses device-common; leaf max-degrees { type uint16; description "Max. number of degrees supported by device"; config false; } leaf max-srgs { type uint16; description "Max. number of SRGs in an add/drop group"; config false; } } container users { description "Stores a list of users"; uses org-openroadm-user-mgmt:user-profile; } container pending-sw { config false; uses org-openroadm-swdl:sw-bank; } uses shelves; uses circuit-packs; uses interfaces-grp; container protocols { description "Contains the supported protocols"; } container wavelength-map { description "The wavelength-number and center frequency, wavelength mapping"; config false; uses org-openroadm-wavelength-map:wavelength-map-g; } uses internal-links; uses physical-links; uses external-links; list degree { when "/org-openroadm-device/info/node-type='rdm'"; key "degree-number"; uses degree; } list shared-risk-group { when "/org-openroadm-device/info/node-type='rdm'"; key "srg-number"; uses srg; } list roadm-connections { when "/org-openroadm-device/info/node-type='rdm'"; key "connection-number"; uses connection; } list connection-map { key "connection-map-number"; config false; leaf connection-map-number { description "Unique identifier for this connection-map entry"; type uint32; } container source { leaf circuit-pack-name { type leafref { path "/org-openroadm-device/circuit-packs/circuit-pack-name"; } mandatory true; } leaf port-name { description "Port identifier. Unique within the context of a circuit-pack."; type leafref { path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name"; } mandatory true; } } list destination { key "circuit-pack-name port-name"; min-elements 1; leaf circuit-pack-name { type leafref { path "/org-openroadm-device/circuit-packs/circuit-pack-name"; } mandatory true; } leaf port-name { description "Port identifier. Unique within the context of a circuit-pack."; type leafref { path "/org-openroadm-device/circuit-packs[circuit-pack-name=current()/../circuit-pack-name]/ports/port-name"; } mandatory true; } } } } } grouping common-session-parms { description "Common session parameters to identify a management session."; leaf username { type string; mandatory true; description "Name of the user for the session."; } leaf session-id { type ietf-nc:session-id-or-zero-type; mandatory true; description "Identifier of the session. A NETCONF session MUST be identified by a non-zero value. A non-NETCONF session MAY be identified by the value zero."; } leaf source-host { type ietf-inet-types:ip-address; description "Address of the remote host for the session."; } } grouping changed-by-parms { description "Common parameters to identify the source of a change event, such as a configuration or capability change."; container changed-by { description "Indicates the source of the change. If caused by internal action, then the empty leaf 'server' will be present. If caused by a management session, then the name, remote host address, and session ID of the session that made the change will be reported."; choice server-or-user { leaf server { type empty; description "If present, the change was caused by the server."; } case by-user { uses common-session-parms; } } // choice server-or-user } // container changed-by-parms } notification change-notification { description "The Notification that a resource has been added, modified or removed. This notification can be triggered by changes in configuration and operational data. It shall contain the changed field pointed by the xpath. Typically it is not intended for frequently changing volatile data e.g. PM, power levels"; leaf change-time { description "The time the change occurs."; type ietf-yang-types:date-and-time; } uses changed-by-parms; leaf datastore { type enumeration { enum running { description "The <running> datastore has changed."; } enum startup { description "The <startup> datastore has changed"; } } default "running"; description "Indicates which configuration datastore has changed."; } list edit { description "An edit (change) record SHOULD be present for each distinct edit operation that the server has detected on the target datastore. This list MAY be omitted if the detailed edit operations are not known. The server MAY report entries in this list for changes not made by a NETCONF session."; leaf target { type instance-identifier; description "Topmost node associated with the configuration or operationa change. A server SHOULD set this object to the node within the datastore that is being altered. A server MAY set this object to one of the ancestors of the actual node that was changed, or omit this object, if the exact node is not known."; } leaf operation { type ietf-nc:edit-operation-type; description "Type of edit operation performed. A server MUST set this object to the NETCONF edit operation performed on the target datastore."; } } // list edit } // notification change-notification }
YANG
5
meodaiduoi/onos
models/openroadm/src/main/yang/org-openroadm-device@2017-02-06.yang
[ "Apache-2.0" ]
Prefix(:=<http://example.org/>) Ontology(:TestClassAssertion Declaration(Class(:c)) Declaration(NamedIndividual(:i)) ClassAssertion(:c :i) ClassAssertion(:c _:anonymousIndividual) )
Web Ontology Language
2
jmcmurry/SciGraph
SciGraph-core/src/test/resources/ontologies/cases/TestClassAssertion.owl
[ "Apache-2.0" ]
drop table if exists t; create table t(i8 Int8, i16 Int16, i32 Int32, i64 Int64) engine Memory; insert into t values (-1, -1, -1, -1), (-2, -2, -2, -2), (-3, -3, -3, -3), (-4, -4, -4, -4), (-5, -5, -5, -5); select * apply bitmapMin, * apply bitmapMax from (select * apply groupBitmapState from t); drop table t;
SQL
3
pdv-ru/ClickHouse
tests/queries/0_stateless/01702_bitmap_native_integers.sql
[ "Apache-2.0" ]
using ZLib; public static int main(string[] args) { stdout.printf("ZLIB_VERSION is: %s\n", ZLib.VERSION.STRING); return 0; }
Vala
3
kira78/meson
test cases/vala/13 find library/test.vala
[ "Apache-2.0" ]
KtFile: 1.6.kt PACKAGE_DIRECTIVE <empty list> IMPORT_LIST <empty list> PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.0_0e-') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_0___0E+') PsiWhiteSpace('\n\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.0_0e-F') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0__________________________0E+') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_00e') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.0_0__0___0E') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_1e+f') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.0_0E-') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0___0__0e') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_00_0ef') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.0_5E-F') PsiWhiteSpace('\n\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.8____8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888_____8888888888888888888e+f') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000_0eF') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_e-f') PsiWhiteSpace('\n') PROPERTY PsiElement(val)('val') PsiWhiteSpace(' ') PsiElement(IDENTIFIER)('value') PsiWhiteSpace(' ') PsiElement(EQ)('=') PsiWhiteSpace(' ') FLOAT_CONSTANT PsiElement(FLOAT_CONSTANT)('.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+')
Text
0
punzki/kotlin
compiler/tests-spec/testData/psi/linked/constant-literals/real-literals/p-4/pos/1.6.txt
[ "ECL-2.0", "Apache-2.0" ]
@import "~common/stylesheet/index";
SCSS
0
dajibapb/algorithm-visualizer
src/core/renderers/ScatterRenderer/ScatterRenderer.module.scss
[ "MIT" ]
/* * Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibJS/Runtime/AsyncFunctionPrototype.h> #include <LibJS/Runtime/GlobalObject.h> namespace JS { AsyncFunctionPrototype::AsyncFunctionPrototype(GlobalObject& global_object) : Object(*global_object.function_prototype()) { } void AsyncFunctionPrototype::initialize(GlobalObject& global_object) { auto& vm = this->vm(); Object::initialize(global_object); // 27.7.3.2 AsyncFunction.prototype [ @@toStringTag ], https://tc39.es/ecma262/#sec-async-function-prototype-properties-toStringTag define_direct_property(*vm.well_known_symbol_to_string_tag(), js_string(vm, vm.names.AsyncFunction.as_string()), Attribute::Configurable); } }
C++
4
r00ster91/serenity
Userland/Libraries/LibJS/Runtime/AsyncFunctionPrototype.cpp
[ "BSD-2-Clause" ]
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/variant.h" #include "tensorflow/core/framework/variant_encode_decode.h" #include "tensorflow/core/kernels/composite_tensor_variant.h" #include "tensorflow/core/platform/errors.h" #include "tensorflow/core/protobuf/composite_tensor_variant.pb.h" #include "tensorflow/core/protobuf/struct.pb.h" namespace tensorflow { class CompositeTensorVariantFromComponents : public OpKernel { public: explicit CompositeTensorVariantFromComponents(OpKernelConstruction* context) : OpKernel(context) { string type_spec_string; OP_REQUIRES_OK(context, context->GetAttr("metadata", &type_spec_string)); OP_REQUIRES(context, metadata_.ParseFromString(type_spec_string), errors::InvalidArgument("Error parsing metadata")); } void Compute(OpKernelContext* context) override { OpInputList components_in; OP_REQUIRES_OK(context, context->input_list("components", &components_in)); Tensor* encoded; OP_REQUIRES_OK(context, context->allocate_output(0, TensorShape({}), &encoded)); std::vector<Tensor> components{components_in.begin(), components_in.end()}; encoded->flat<Variant>()(0) = CompositeTensorVariant(metadata_, absl::MakeSpan(components)); } private: CompositeTensorVariantMetadata metadata_; }; class CompositeTensorVariantToComponents : public OpKernel { public: explicit CompositeTensorVariantToComponents(OpKernelConstruction* context) : OpKernel(context) { string type_spec_string; OP_REQUIRES_OK(context, context->GetAttr("metadata", &type_spec_string)); OP_REQUIRES(context, metadata_.ParseFromString(type_spec_string), errors::InvalidArgument("Error parsing `metadata`")); OP_REQUIRES_OK(context, context->GetAttr("Tcomponents", &component_dtypes_)); } void Compute(OpKernelContext* context) override { Tensor encoded_t = context->input(0); auto* encoded = encoded_t.flat<Variant>()(0).get<CompositeTensorVariant>(); // Check that the encoded TypeSpec is compatible with the expected TypeSpec. // For now, we just check that the class matches. // // TODO(b/173744905): Update this to do a generic compatibility check. This // would require replacing the current design, where Python subclasses of // TypeSpec can override is_compatible, with a design where compatibility // can be deterministically determined from the metadata. auto expected_class = metadata_.type_spec_proto().type_spec_class(); auto actual_class = encoded->metadata().type_spec_proto().type_spec_class(); OP_REQUIRES( context, expected_class == actual_class, errors::InvalidArgument( "Expected a ", TypeSpecProto::TypeSpecClass_Name(expected_class), " (based on `type_spec`), but `encoded` contains a ", TypeSpecProto::TypeSpecClass_Name(actual_class))); // Extract the component tensors. OpOutputList components; OP_REQUIRES_OK(context, context->output_list("components", &components)); int num_components = encoded->flat_components().size(); OP_REQUIRES(context, component_dtypes_.size() == num_components, errors::InvalidArgument("Encoded value has ", num_components, " tensor components; expected ", component_dtypes_.size(), " components based on type_spec")); for (int i = 0; i < component_dtypes_.size(); i++) { const Tensor& component = encoded->flat_components()[i]; OP_REQUIRES(context, component_dtypes_[i] == component.dtype(), errors::InvalidArgument("Tensor component ", i, " had dtype ", DataType_Name(component.dtype()), "; expected dtype ", DataType_Name(component_dtypes_[i]))); components.set(i, component); } } private: CompositeTensorVariantMetadata metadata_; std::vector<DataType> component_dtypes_; }; REGISTER_KERNEL_BUILDER( Name("CompositeTensorVariantToComponents").Device(DEVICE_CPU), CompositeTensorVariantToComponents); REGISTER_KERNEL_BUILDER( Name("CompositeTensorVariantFromComponents").Device(DEVICE_CPU), CompositeTensorVariantFromComponents); } // namespace tensorflow
C++
5
EricRemmerswaal/tensorflow
tensorflow/core/kernels/composite_tensor_ops.cc
[ "Apache-2.0" ]
#ifndef HEADER_CURL_TOOL_FORMPARSE_H #define HEADER_CURL_TOOL_FORMPARSE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include "tool_setup.h" /* Private structure for mime/parts. */ typedef enum { TOOLMIME_NONE = 0, TOOLMIME_PARTS, TOOLMIME_DATA, TOOLMIME_FILE, TOOLMIME_FILEDATA, TOOLMIME_STDIN, TOOLMIME_STDINDATA } toolmimekind; struct tool_mime { /* Structural fields. */ toolmimekind kind; /* Part kind. */ struct tool_mime *parent; /* Parent item. */ struct tool_mime *prev; /* Previous sibling (reverse order link). */ /* Common fields. */ const char *data; /* Actual data or data filename. */ const char *name; /* Part name. */ const char *filename; /* Part's filename. */ const char *type; /* Part's mime type. */ const char *encoder; /* Part's requested encoding. */ struct curl_slist *headers; /* User-defined headers. */ /* TOOLMIME_PARTS fields. */ struct tool_mime *subparts; /* Part's subparts. */ /* TOOLMIME_STDIN/TOOLMIME_STDINDATA fields. */ curl_off_t origin; /* Stdin read origin offset. */ curl_off_t size; /* Stdin data size. */ curl_off_t curpos; /* Stdin current read position. */ struct GlobalConfig *config; /* For access from callback. */ }; size_t tool_mime_stdin_read(char *buffer, size_t size, size_t nitems, void *arg); int tool_mime_stdin_seek(void *instream, curl_off_t offset, int whence); int formparse(struct OperationConfig *config, const char *input, struct tool_mime **mimeroot, struct tool_mime **mimecurrent, bool literal_value); CURLcode tool2curlmime(CURL *curl, struct tool_mime *m, curl_mime **mime); void tool_mime_free(struct tool_mime *mime); #endif /* HEADER_CURL_TOOL_FORMPARSE_H */
C
4
Greg-Muchka/curl
src/tool_formparse.h
[ "curl" ]
#lang scribble/doc @(require "common.rkt" scribble/core) @(tools-title "frame") @defclass[drracket:frame:name-message% canvas% ()]{ This class implements the little filename button in the top-left hand side of DrRacket's frame. @defconstructor/make[([parent (is-a?/c area-container<%>)])]{} @defmethod[(set-message [name (or/c string? false/c)] [short-name string?]) void?]{ @methspec{ Sets the names that the button shows. } @methimpl{ The string @racket[short-name] is the name that is shown on the button and @racket[name] is shown when the button is clicked on, in a separate window. If @racket[name] is @racket[#f], a message indicating that the file hasn't been saved is shown. }}} @defmixin[drracket:frame:mixin (drracket:frame:basics<%> frame:text-info<%> frame:editor<%>) (drracket:frame:<%>)]{ Provides an implementation of @racket[drracket:frame:<%>] } @defmixin[drracket:frame:basics-mixin (frame:standard-menus<%>) (drracket:frame:basics<%>)]{ Use this mixin to establish some common menu items across various DrRacket windows. @defmethod[#:mode override (edit-menu:between-find-and-preferences [edit-menu (is-a?/c menu%)]) void?]{ Adds a @racket[separator-menu-item%]. Next, adds the @racket["Keybindings"] menu item to the edit menu. Finally, if the @racket[current-eventspace-has-standard-menus?] procedure returns @racket[#f], creates another @racket[separator-menu-item%]. } @defmethod[#:mode override (file-menu:between-open-and-revert [file-menu (is-a?/c menu%)]) void?]{ Adds an ``Install .plt File...'' menu item, which downloads and installs .plt files from the web, or installs them from the local disk. After that, calls the super method. } @defmethod[#:mode override (file-menu:between-print-and-close [file-menu (is-a?/c menu%)]) void?]{ Calls the super method. Then, creates a menu item for multi-file searching. Finally, adds a @racket[separator-menu-item%]. } @defmethod[#:mode override (file-menu:new-callback [item (is-a?/c menu-item%)] [evt (is-a?/c control-event%)]) void?]{ Opens a new, empty DrRacket window. } @defmethod[#:mode override (file-menu:new-string) string?]{ Returns the empty string. } @defmethod[#:mode override (file-menu:open-callback [item (is-a?/c menu-item%)] [evt (is-a?/c control-event%)]) void?]{ Calls @racket[handler:edit-file]. } @defmethod[#:mode override (file-menu:open-string) string?]{ Returns the empty string. } @defmethod[(get-additional-important-urls) (listof (list string string))]{ @methspec{ Each string in the result of this method is added as a menu item to DrRacket's ``Related Web Sites'' menu item. The first string is the name of the menu item and the second string is a url that, when the menu item is chosen, is sent to the user's browser. } @methimpl{ Returns the empty list by default. }} @defmethod[#:mode override (help-menu:about-callback [item (is-a?/c menu-item%)] [evt (is-a?/c control-event%)]) void?]{ Opens an about box for DrRacket. } @defmethod[#:mode override (help-menu:about-string) string?]{ Returns the string @racket["DrRacket"]. } @defmethod[#:mode override (help-menu:before-about [help-menu (is-a?/c menu%)]) void?]{ Adds the Help Desk menu item and the Welcome to DrRacket menu item. } @defmethod[#:mode override (help-menu:create-about?) boolean?]{ Returns @racket[#t]. }} @definterface[drracket:frame:basics<%> (frame:standard-menus<%>)]{ This interface is the result of the @racket[drracket:frame:basics-mixin] } @definterface[drracket:frame:<%> (frame:editor<%> frame:text-info<%> drracket:frame:basics<%>)]{ @defmethod[(add-show-menu-items [show-menu (is-a?/c menu%)]) void?]{ @methspec{ This method is called during the construction of the @onscreen{View} menu. This method is intended to be overridden with the overriding methods adding other Show/Hide menu items to the @onscreen{View} menu. See also @method[drracket:frame:<%> set-show-menu-sort-key] and @method[drracket:frame:<%> get-show-menu]. } @methimpl{ Does nothing. }} @defmethod[(set-show-menu-sort-key [item (is-a?/c menu-item<%>)] [key (and/c real? positive?)]) void?]{ Controls the ordering of items in the @onscreen{View} menu. The number determines the sorting order and where separators in the menu appear (smaller numbers first). These are the numbers for many of the @onscreen{View} menu items that come built-in to DrRacket: @table[(style #f '()) (let () (define (add-blocks lol) (for/list ([strs (in-list lol)]) (for/list ([str (in-list (reverse strs))] [i (in-naturals)]) @paragraph[(style #f '()) (if (zero? i) (list str "\ua0\ua0\ua0\ua0\ua0") str)]))) (add-blocks (list (list @racket[1] @onscreen{Toolbar}) (list @racket[2] @onscreen{Split}) (list @racket[3] @onscreen{Collapse}) (list @racket[101] @onscreen{Show Definitions}) (list @racket[102] @onscreen{Show Interactions}) (list @racket[103] @onscreen{Use Horizontal Layout}) (list @racket[205] @onscreen{Show Log}) (list @racket[206] @onscreen{Show Tracing}) (list @racket[207] @onscreen{Hide Profile}) (list @racket[301] @onscreen{Show Program Contour}) (list @racket[302] @onscreen{Show Line Numbers}) (list @racket[401] @onscreen{Show Module Browser}))))] In addition, a separator is inserted for each 100. So, for example, a separator is inserted between @onscreen{Collapse} and @onscreen{Show Definitions}. Note that the argument may be a rational number, effectively allowing insertion between any two menu items already in the menu. For this reason, avoid using @racket[0], or any number is that @racket[0] modulo @racket[100]. } @defmethod[(get-show-menu) (is-a?/c menu%)]{ @index{View menu} returns the @onscreen{View} menu, for use by the @method[drracket:frame:<%> update-shown] method. See also @method[drracket:frame:<%> add-show-menu-items]. The method (and others) uses the word @tt{show} to preserve backwards compatibility from when the menu itself was named the @onscreen{Show} menu. } @defmethod[(update-shown) void?]{ @methspec{ This method is intended to be overridden. It's job is to update the @racket["View"] menu to match the state of the visible windows. In the case of the standard DrRacket window, it change the menu items to reflect the visibility of the definitions and interaction @racket[editor-canvas%]s. Call this method whenever the state of the show menu might need to change. See also @method[drracket:frame:<%> get-show-menu]. } @methimpl{ Does nothing. }}} @(tools-include "frame")
Racket
5
rrthomas/drracket
drracket/scribblings/tools/frame.scrbl
[ "Apache-2.0", "MIT" ]
#!/usr/bin/env bash # # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # apt-get update apt-get install -y vim g++ make cmake wget git python-pip python-dev build-essential
Shell
3
KatyaKos/fastText
.circleci/setup_debian.sh
[ "MIT" ]
/* * @LANG: indep */ int return_to; %%{ machine targs1; unused := 'unused'; one := 'one' @{ print_str "one\n"; fnext *return_to; }; two := 'two' @{ print_str "two\n"; fnext *return_to; }; main := ( '1' @{ return_to = ftargs; fnext one; } | '2' @{ return_to = ftargs; fnext two; } | '\n' )*; }%% ##### INPUT ##### "1one2two1one\n" ##### OUTPUT ##### one two one ACCEPT
Ragel in Ruby Host
4
podsvirov/colm-suite
test/trans.d/case/targs1.rl
[ "MIT" ]
component{ function foo(){ cfthread.myThread1.foo=1; } }
ColdFusion CFC
1
tonym128/CFLint
src/test/resources/com/cflint/tests/VarScoper/fpositive/cfthread.cfc
[ "BSD-3-Clause" ]
*** Settings *** Resource atest_resource.robot Suite Setup Run Tests ${EMPTY} core/keyword_teardown.robot *** Test Cases *** Passing Keyword with Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} In UK Check Log Message ${tc.kws[0].teardown.msgs[0]} In UK Teardown Failing Keyword with Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} Expected Failure! FAIL Check Log Message ${tc.kws[0].teardown.msgs[0]} In Failing UK Teardown Teardown in keyword with embedded arguments ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} In UK with Embedded Arguments Check Log Message ${tc.kws[0].teardown.msgs[0]} In Teardown of UK with Embedded Arguments Check Log Message ${tc.kws[1].kws[0].msgs[0]} Expected Failure in UK with Embedded Arguments FAIL Check Log Message ${tc.kws[1].teardown.msgs[0]} In Teardown of Failing UK with Embedded Arguments Failure in Keyword Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} In UK Check Log Message ${tc.kws[0].teardown.msgs[0]} Failing in UK Teardown FAIL Failures in Keyword and Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} Expected Failure! FAIL Check Log Message ${tc.kws[0].teardown.msgs[0]} Failing in UK Teardown FAIL Multiple Failures in Keyword Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].teardown.kws[0].msgs[0]} Failure in Teardown FAIL Check Log Message ${tc.kws[0].teardown.kws[1].kws[0].msgs[0]} Expected Failure! FAIL Check Log Message ${tc.kws[0].teardown.kws[1].kws[1].msgs[0]} Executed if in nested Teardown Check Log Message ${tc.kws[0].teardown.kws[2].msgs[0]} Third failure in Teardown FAIL Nested Keyword Teardowns ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].kws[0].msgs[0]} In UK Check Log Message ${tc.kws[0].kws[0].teardown.msgs[0]} In UK Teardown Check Log Message ${tc.kws[0].teardown.kws[0].msgs[0]} In UK Check Log Message ${tc.kws[0].teardown.teardown.msgs[0]} In UK Teardown Nested Keyword Teardown Failures ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].teardown.msgs[0]} Failing in UK Teardown FAIL Check Log Message ${tc.kws[0].teardown.msgs[0]} Failing in outer UK Teardown FAIL Continuable Failure in Keyword ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].kws[0].msgs[0]} Please continue FAIL Check Log Message ${tc.kws[0].kws[1].msgs[0]} After continuable failure Check Log Message ${tc.kws[0].teardown.msgs[0]} In UK Teardown Non-ASCII Failure in Keyword Teardown ${tc}= Check Test Case ${TESTNAME} Check Log Message ${tc.kws[0].kws[0].msgs[0]} åäö Check Log Message ${tc.kws[0].teardown.msgs[0]} Hyvää äitienpäivää! FAIL Keyword cannot have only teardown Check Test Case ${TESTNAME} Replacing Variables in Keyword Teardown Fails Check Test Case ${TESTNAME}
RobotFramework
3
bhirsz/robotframework
atest/robot/core/keyword_teardown.robot
[ "ECL-2.0", "Apache-2.0" ]
package http_test import "testing" import "http" import "json" option now = () => 2030-01-01T00:00:00Z inData = " #datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string #group,false,false,false,false,true,true,true,true,true,true #default,_result,,,,,,,,, ,result,table,_time,_value,_field,_measurement,device,fstype,host,path ,,0,2018-05-22T00:00:00Z,1,used_percent,disk,disk1s1,apfs,host.local,/ ,,0,2018-05-22T00:00:10Z,2,used_percent,disk,disk1s1,apfs,host.local,/ ,,0,2018-05-22T00:00:20Z,3,used_percent,disk,disk1s1,apfs,host.local,/ " outData = " #datatype,string,long,dateTime:RFC3339,double,string,string,string,string,string,string,string #group,false,false,false,false,true,true,true,true,true,true,true #default,_result,,,,,,,,,, ,result,table,_time,_value,_field,_measurement,device,fstype,host,path,_sent ,,0,2018-05-22T00:00:00Z,1,used_percent,disk,disk1s1,apfs,host.local,/,true ,,0,2018-05-22T00:00:10Z,2,used_percent,disk,disk1s1,apfs,host.local,/,true ,,0,2018-05-22T00:00:20Z,3,used_percent,disk,disk1s1,apfs,host.local,/,true " endpoint = http.endpoint(url: "http://localhost:7777") post = (table=<-) => table |> range(start: 2018-05-22T00:00:00Z) |> drop(columns: ["_start", "_stop"]) |> endpoint(mapFn: (r) => ({data: json.encode(v: r)}))() test _post = () => ({input: testing.loadStorage(csv: inData), want: testing.loadMem(csv: outData), fn: post})
FLUX
4
metrico/flux
stdlib/http/http_endpoint_test.flux
[ "MIT" ]
Require Import Arith. Fixpoint A m := fix A_m n := match m with | 0 => n + 1 | S pm => match n with | 0 => A pm 1 | S pn => A pm (A_m pn) end end.
Coq
4
LaudateCorpus1/RosettaCodeData
Task/Ackermann-function/Coq/ackermann-function-1.coq
[ "Info-ZIP" ]
--TEST-- Cleaning must preserve breakpoints --INI-- opcache.enable_cli=0 --PHPDBG-- b 4 b foo r c clean y c r c q --EXPECTF-- [Successful compilation of %s] prompt> [Breakpoint #0 added at %s:4] prompt> [Breakpoint #1 added at foo] prompt> 1 [Breakpoint #0 at %s:4, hits: 1] >00004: echo 2; 00005: echo 3; 00006: foo(); prompt> 23 [Breakpoint #1 in foo() at %s:9, hits: 1] >00009: echo 4; 00010: } 00011: prompt> Do you really want to clean your current environment? (type y or n): Cleaning Execution Environment Classes %d Functions %d Constants %d Includes 0 prompt> [Not running] prompt> 1 [Breakpoint #0 at %s:4, hits: 1] >00004: echo 2; 00005: echo 3; 00006: foo(); prompt> 23 [Breakpoint #1 in foo() at %s:9, hits: 1] >00009: echo 4; 00010: } 00011: prompt> 4 [Script ended normally] prompt> --FILE-- <?php echo 1; echo 2; echo 3; foo(); function foo() { echo 4; }
PHP
4
thiagooak/php-src
sapi/phpdbg/tests/clean_001.phpt
[ "PHP-3.01" ]
# RUN: not llc -march=x86-64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s --- | declare void @foo(i32) define i32 @test(i32 %a, i32 %b, i32 %c, i32 %d) { entry: %add = add nsw i32 %b, %a %add1 = add nsw i32 %add, %c %add2 = add nsw i32 %add1, %d tail call void @foo(i32 %add2) %add6 = add nsw i32 %add2, %add2 ret i32 %add6 } ... --- name: test tracksRegLiveness: true frameInfo: stackSize: 8 adjustsStack: true hasCalls: true fixedStack: - { id: 0, type: spill-slot, offset: -16, size: 8, alignment: 16 } body: | bb.0.entry: PUSH64r killed $rbx, implicit-def $rsp, implicit $rsp CFI_INSTRUCTION def_cfa_offset 16 ; CHECK: [[@LINE+1]]:33: expected ',' CFI_INSTRUCTION offset $rbx -16 $ebx = COPY $edi, implicit-def $rbx $ebx = ADD32rr $ebx, killed $esi, implicit-def dead $eflags $ebx = ADD32rr $ebx, killed $edx, implicit-def dead $eflags $ebx = ADD32rr $ebx, killed $ecx, implicit-def dead $eflags $edi = COPY $ebx CALL64pcrel32 @foo, csr_64, implicit $rsp, implicit $edi, implicit-def $rsp $eax = LEA64_32r killed $rbx, 1, $rbx, 0, _ $rbx = POP64r implicit-def $rsp, implicit $rsp RETQ $eax ...
Mirah
3
medismailben/llvm-project
llvm/test/CodeGen/MIR/X86/expected-comma-after-cfi-register.mir
[ "Apache-2.0" ]
-- See also: src/nvim/testdir/test_options.vim local helpers = require('test.functional.helpers')(after_each) local command, clear = helpers.command, helpers.clear local source, expect = helpers.source, helpers.expect local exc_exec = helpers.exc_exec; local matches = helpers.matches; local Screen = require('test.functional.ui.screen') describe('options', function() setup(clear) it('should not throw any exception', function() command('options') end) end) describe('set', function() before_each(clear) it("should keep two comma when 'path' is changed", function() source([[ set path=foo,,bar set path-=bar set path+=bar $put =&path]]) expect([[ foo,,bar]]) end) it('winminheight works', function() local screen = Screen.new(20, 11) screen:attach() source([[ set wmh=0 stal=2 below sp | wincmd _ below sp | wincmd _ below sp | wincmd _ below sp ]]) matches('E36: Not enough room', exc_exec('set wmh=1')) end) it('winminheight works with tabline', function() local screen = Screen.new(20, 11) screen:attach() source([[ set wmh=0 stal=2 split split split split tabnew ]]) matches('E36: Not enough room', exc_exec('set wmh=1')) end) it('scroll works', function() local screen = Screen.new(42, 16) screen:attach() source([[ set scroll=2 set laststatus=2 ]]) command('verbose set scroll?') screen:expect([[ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | ~ | | scroll=7 | Last set from changed window size | Press ENTER or type command to continue^ | ]]) end) end)
Lua
4
uga-rosa/neovim
test/functional/legacy/options_spec.lua
[ "Vim" ]
(ns immer-benchmark (:require [criterium.core :as c] [clojure.core.rrb-vector :as fv])) (defn h0 [& args] (apply println "\n####" args)) (defn h1 [& args] (apply println "\n====" args)) (defn h2 [& args] (apply println "\n----" args)) (defn run-benchmarks [N S] (h0 "Running benchmarks: N =" N " S =" S) (def c-steps 10) (defn vector-push-f [v] (loop [v v i 0] (if (< i N) (recur (fv/catvec (fv/vector i) v) (inc i)) v))) (defn vector-push [v] (loop [v v i 0] (if (< i N) (recur (conj v i) (inc i)) v))) (defn vector-push! [v] (loop [v (transient v) i 0] (if (< i N) (recur (conj! v i) (inc i)) (persistent! v)))) (defn vector-concat [v vc] (loop [v v i 0] (if (< i c-steps) (recur (fv/catvec v vc) (inc i)) v))) (defn vector-update [v] (loop [v v i 0] (if (< i N) (recur (assoc v i (+ i 1)) (inc i)) v))) (defn vector-update-random [v] (loop [v v i 0] (if (< i N) (recur (assoc v (rand-int N) i) (inc i)) v))) (defn vector-update! [v] (loop [v (transient v) i 0] (if (< i N) (recur (assoc! v i (+ i 1)) (inc i)) (persistent! v)))) (defn vector-update-random! [v] (loop [v (transient v) i 0] (if (< i N) (recur (assoc! v (rand-int N) i) (inc i)) (persistent! v)))) (defn vector-iter [v] (reduce + 0 v)) (defn the-benchmarks [empty-v] (def full-v (into empty-v (range N))) (h2 "iter") (c/bench (vector-iter full-v) :samples S) (if (> N 100000) (h2 "skipping updates 'cuz N > 100000 (would run out of mem)") (do (h2 "update!") (c/bench (vector-update! full-v) :samples S) (h2 "update-random!") (c/bench (vector-update-random! full-v) :samples S) (h2 "push!") (c/bench (vector-push! empty-v) :samples S) (h2 "update") (c/bench (vector-update full-v) :samples S) (h2 "update-random") (c/bench (vector-update-random full-v) :samples S) (h2 "push") (c/bench (vector-push empty-v) :samples S)))) (defn the-rrb-benchmarks [empty-v] (if (> N 1000) (h2 "skipping relaxed test 'cuz N > 1000 (rrb-vector bug)") (do (def full-v (vector-push-f empty-v)) (h2 "iter/f") (c/bench (vector-iter full-v) :samples S) (h2 "update/f") (c/bench (vector-update full-v) :samples S) (h2 "update-random/f") (c/bench (vector-update-random full-v) :samples S))) (def short-v (into empty-v (range (/ N c-steps)))) (h2 "concat") (c/bench (vector-concat empty-v short-v)) :samples S) (h1 "vector") (the-benchmarks (vector)) (h1 "rrb-vector") (the-benchmarks (fv/vector)) (the-rrb-benchmarks (fv/vector))) (defn -main [] (run-benchmarks 1000 100) (run-benchmarks 100000 20) (run-benchmarks 10000000 3))
Clojure
5
ikrima/immer
tools/clojure/src/immer_benchmark.clj
[ "BSL-1.0" ]
%{-- - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --}% <g:set var="wasfiltered" value="${paginateParams?.keySet().grep(~/.*Filter|groupPath$/)}"/> <g:render template="workflowsFull" model="${[small:true,groupTree:groupTree,wasfiltered:wasfiltered?true:false,nextExecutions:nextExecutions,authMap:authMap,max:max,offset:offset,paginateParams:paginateParams,sortEnabled:true]}"/> <g:set var="sectionTitle" value="${g.message(code:'domain.ScheduledExecution.title')+'s'}"/> <g:render template="/common/boxinfo" model="${[name:'workflows',model:[title:sectionTitle,total:total,linkUrl:createLink(controller:'menu',action:'jobs',params:[project:params.project])]]}"/>
Groovy Server Pages
3
kbens/rundeck
rundeckapp/grails-app/views/menu/jobsFragment.gsp
[ "Apache-2.0" ]
<html> <head> <title>frame</title> </head> <frameset cols="20%, 80%"> <frame id="test-frame" src="iframe.html"> <frame src="iframe.html"> </frameset> </html>
HTML
1
ggomez3/survey
data/frame.html
[ "MIT" ]
// Copyright 2014 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import 'package:flutter/scheduler.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { test('Priority operators control test', () async { Priority priority = Priority.idle + (Priority.kMaxOffset + 100); expect(priority.value, equals(Priority.idle.value + Priority.kMaxOffset)); priority = Priority.animation - (Priority.kMaxOffset + 100); expect(priority.value, equals(Priority.animation.value - Priority.kMaxOffset)); }); }
Dart
4
Mayb3Nots/flutter
packages/flutter/test/scheduler/priority_test.dart
[ "BSD-3-Clause" ]
### All Types | Name | Summary | |---|---| | [leakcanary.FailAnnotatedTestOnLeakRunListener](../leakcanary/-fail-annotated-test-on-leak-run-listener/index.md) | A JUnit [RunListener](#) extending [FailTestOnLeakRunListener](../leakcanary/-fail-test-on-leak-run-listener/index.md) to detecting memory leaks in Android instrumentation tests only when the [FailTestOnLeak](../leakcanary/-fail-test-on-leak/index.md) annotation is used. | | [leakcanary.FailTestOnLeak](../leakcanary/-fail-test-on-leak/index.md) | An [Annotation](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-annotation/index.html) class to be used in conjunction with [FailAnnotatedTestOnLeakRunListener](../leakcanary/-fail-annotated-test-on-leak-run-listener/index.md) for detecting memory leaks. When using [FailAnnotatedTestOnLeakRunListener](../leakcanary/-fail-annotated-test-on-leak-run-listener/index.md), the tests should be annotated with this class in order for the listener to detect memory leaks. | | [leakcanary.FailTestOnLeakRunListener](../leakcanary/-fail-test-on-leak-run-listener/index.md) | A JUnit [RunListener](#) that uses [InstrumentationLeakDetector](../leakcanary/-instrumentation-leak-detector/index.md) to detect memory leaks in Android instrumentation tests. It waits for the end of a test, and if the test succeeds then it will look for retained objects, trigger a heap dump if needed and perform an analysis. | | [leakcanary.InstrumentationLeakDetector](../leakcanary/-instrumentation-leak-detector/index.md) | [InstrumentationLeakDetector](../leakcanary/-instrumentation-leak-detector/index.md) can be used to detect memory leaks in instrumentation tests. |
Markdown
4
BraisGabin/leakcanary
docs/api/leakcanary-android-instrumentation/alltypes/index.md
[ "Apache-2.0" ]
if view.error div.alert.alert-danger pre #{view.error} div for tag in (view.tags || []) span.label.label-primary(style="margin: 5px; float: left; line-height: 1.2em") #{tag}
Jade
3
cihatislamdede/codecombat
app/templates/artisans/tag-test-tags-view.jade
[ "CC-BY-4.0", "MIT" ]
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // License Agreement // For Open Source Computer Vision Library // // Copyright (C) 2017, Intel Corporation, all rights reserved. // Copyright (c) 2016-2017 Fabian David Tschopp, all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // * The name of the copyright holders may not be used to endorse or promote products // derived from this software without specific prior written permission. // // This software is provided by the copyright holders and contributors "as is" and // any express or implied warranties, including, but not limited to, the implied // warranties of merchantability and fitness for a particular purpose are disclaimed. // In no event shall the Intel Corporation or contributors be liable for any direct, // indirect, incidental, special, exemplary, or consequential damages // (including, but not limited to, procurement of substitute goods or services; // loss of use, data, or profits; or business interruption) however caused // and on any theory of liability, whether in contract, strict liability, // or tort (including negligence or otherwise) arising in any way out of // the use of this software, even if advised of the possibility of such damage. // //M*/ #define CONCAT(A,B) A##_##B #define TEMPLATE(name,type) CONCAT(name,type) #define KERNEL_ARG_DTYPE float #if defined(cl_khr_fp16) #pragma OPENCL EXTENSION cl_khr_fp16 : enable #endif __kernel void TEMPLATE(lrn_full_no_scale,Dtype)(const int nthreads, __global const Dtype* in, const int num, const int channels, const int height, const int width, const int size, const KERNEL_ARG_DTYPE alpha_over_size, const KERNEL_ARG_DTYPE k, __global Dtype* const out, const KERNEL_ARG_DTYPE negative_beta) { for (int index = get_global_id(0); index < nthreads; index += get_global_size(0)) { // find out the local offset const int w = index % width; const int h = (index / width) % height; const int n = index / width / height; const int offset = (n * channels * height + h) * width + w; const int step = height * width; __global const Dtype* in_off = in + offset; __global Dtype* out_off = out + offset; int head = 0; const int pre_pad = (size - 1) / 2; const int post_pad = size - pre_pad - 1; float accum_scale = 0; // fill the scale at [n, :, h, w] // accumulate values while (head < post_pad && head < channels) { float v = in_off[head * step]; accum_scale += v * v; ++head; } // both add and subtract while (head < channels) { float v = in_off[head * step]; accum_scale += v * v; if (head - size >= 0) { v = in_off[(head - size) * step]; accum_scale -= v * v; } float scale_val = k + accum_scale * alpha_over_size; out_off[(head - post_pad) * step] = (Dtype)((float)in_off[(head - post_pad) * step] * native_powr(scale_val, negative_beta)); ++head; } // subtract only while (head < channels + post_pad) { if (head - size >= 0) { float v = in_off[(head - size) * step]; accum_scale -= v * v; } float scale_val = k + accum_scale * alpha_over_size; out_off[(head - post_pad) * step] = (Dtype)((float)in_off[(head - post_pad) * step] * native_powr(scale_val, negative_beta)); ++head; } } }
OpenCL
4
nowireless/opencv
modules/dnn/src/opencl/ocl4dnn_lrn.cl
[ "Apache-2.0" ]
footer div :class = "container text-center" div (:class "row justify-content-center pt-4") .col span = "Java 13" div (:class "row justify-content-center") .col span = "Kotlin 1.3.60" div (:class "row justify-content-center pt-4 pb-2") .col span = "Created by: " a (:href https://www.driver733.com) = @driver733 div (:class "row justify-content-center") .col a (:href "https://github.com/driver733/kotlin-vs-java") img (:src "//img.shields.io/github/stars/driver733/kotlin-vs-java.svg?style=social") (:alt "GitHub stars") div (:class "row justify-content-center pt-4 pb-4") .col span = "Based on: " a (:href https://github.com/fabiomsr/from-java-to-kotlin) = fabiomsr/from-java-to-kotlin @insert ../../end.html
Cirru
3
driver733/kot
cirru/footer.cirru
[ "MIT" ]
#(define bvar "hello from b/inc/include1.ly")
LilyPond
0
HolgerPeters/lyp
spec/package_setups/test_vars/b@0.2/inc/include1.ly
[ "MIT" ]
<%= application_name.camelize %>.instanceInitializer({ name: '<%= class_name.underscore.dasherize %>' initialize: (application) -> # Write your initializer here })
EmberScript
4
JakeKaad/ember-rails
lib/generators/templates/instance-initializer.em
[ "MIT" ]
Module: pop-client Synopsis: Thin wrapper around POP3 Author: Keith Playford Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: See License.txt in this distribution for details. Warranty: Distributed WITHOUT WARRANTY OF ANY KIND /// Parameters. define variable *debug-pop* :: <boolean> = #f; define constant $default-pop-port :: <integer> = 110; /// Conditions define class <pop-error> (<error>) constant slot pop-error-response :: <string>, required-init-keyword: response:; end class; define function check-pop-response (stream :: <stream>) => () let response = read-line(stream); when (*debug-pop*) format-out("%s\n", response); end; assert(size(response) > 3, "Error code missing from POP response"); select (response[0]) '-' => error(make(<pop-error>, response: response)); '+' => #t; otherwise => error(make(<pop-error>, response: response)); end; end function; /// Session-level interface. // Interface macro. define macro with-pop-stream { with-pop-stream (?:variable to ?host:expression, #rest ?args:*) ?:body end } => { let pop-stream = #f; block () pop-stream := open-pop-stream(?host, ?args); let ?variable = pop-stream; ?body cleanup if (pop-stream) close-pop-stream(pop-stream); end; end; } end macro; // Interface function. define method open-pop-stream (host, #key port = $default-pop-port) => (stream :: <stream>) let stream = make(<tcp-socket>, host: host, port: port); check-pop-response(stream); stream end method; // Interface function. define method close-pop-stream (stream :: <stream>) => () close(stream); end method; // Interface function. define method pop-login (stream :: <stream>, login :: <byte-string>, password :: false-or(<byte-string>)) => () format-pop-line(stream, "USER %s", login); check-pop-response(stream); format-pop-line(stream, "PASS %s", password); check-pop-response(stream); end method; // Interface function. define method pop-logout (stream :: <stream>) => () format-pop-line(stream, "QUIT"); check-pop-response(stream); end method; define class <pop-list-entry> (<object>) constant slot pop-list-entry-id :: <integer>, required-init-keyword: id:; constant slot pop-list-entry-bytes :: <integer>, required-init-keyword: bytes:; end class; // Interface function. define method read-pop-list (stream :: <stream>) => (entries :: <sequence>) format-pop-line(stream, "LIST"); check-pop-response(stream); let entries = #(); let line = #f; while ((line := read-line(stream)) ~= ".") let (id, bytes-start) = string-to-integer(line); let bytes = string-to-integer(line, start: bytes-start); entries := pair(make(<pop-list-entry>, id: id, bytes: bytes), entries); end; reverse!(entries); end method; // Interface function. define method read-pop-header (stream :: <stream>, id :: <integer>) => (entries :: <sequence>) format-pop-line(stream, "TOP %d 0", id); check-pop-response(stream); let header = with-output-to-string (header) let line = #f; while ((line := read-line(stream)) ~= ".") write-line(header, line); end; end; header end method; // Interface function. define method read-pop-body (stream :: <stream>, id :: <integer>) => (entries :: <sequence>) format-pop-line(stream, "RETR %d", id); check-pop-response(stream); let body = with-output-to-string (body) let line = #f; // Skip the header while ((line := read-line(stream)) ~= "") end; // Grab the body while ((line := read-line(stream)) ~= ".") write-line(body, line); end; end; body end method; // Interface function. define method read-pop-message (stream :: <stream>, id :: <integer>) => (entries :: <sequence>) format-pop-line(stream, "RETR %d", id); check-pop-response(stream); let body = with-output-to-string (body) let line = #f; while ((line := read-line(stream)) ~= ".") write-line(body, line); end; end; body end method; define method format-pop-line (stream :: <stream>, template :: <string>, #rest args) => () when (*debug-pop*) apply(format-out, template, args); format-out("\n"); end; apply(format, stream, template, args); write(stream, "\r\n"); end method;
Dylan
5
kryptine/opendylan
sources/network/pop-client/pop-client.dylan
[ "BSD-2-Clause" ]
# Requirements so far: # dockerd running # - image microsoft/nanoserver (matching host base image) docker load -i c:\baseimages\nanoserver.tar # - image alpine (linux) docker pull --platform=linux alpine # TODO: Add this a parameter for debugging. ie "functional-tests -debug=$true" #$env:HCSSHIM_FUNCTIONAL_TESTS_DEBUG="yes please" #pushd uvm go test -v -tags "functional uvmcreate uvmscratch uvmscsi uvmvpmem uvmvsmb uvmp9" ./... #popd
PowerShell
3
gregoryg/harvester
vendor/github.com/Microsoft/hcsshim/functional_tests.ps1
[ "Apache-2.0" ]
// ignore-emscripten // compile-flags: -C no-prepopulate-passes // Test that tuples get optimized layout, in particular with a ZST in the last field (#63244) #![crate_type="lib"] type ScalarZstLast = (u128, ()); // CHECK: define i128 @test_ScalarZstLast(i128 %_1) #[no_mangle] pub fn test_ScalarZstLast(_: ScalarZstLast) -> ScalarZstLast { loop {} } type ScalarZstFirst = ((), u128); // CHECK: define i128 @test_ScalarZstFirst(i128 %_1) #[no_mangle] pub fn test_ScalarZstFirst(_: ScalarZstFirst) -> ScalarZstFirst { loop {} } type ScalarPairZstLast = (u8, u128, ()); // CHECK: define { i128, i8 } @test_ScalarPairZstLast(i128 %_1.0, i8 %_1.1) #[no_mangle] pub fn test_ScalarPairZstLast(_: ScalarPairZstLast) -> ScalarPairZstLast { loop {} } type ScalarPairZstFirst = ((), u8, u128); // CHECK: define { i8, i128 } @test_ScalarPairZstFirst(i8 %_1.0, i128 %_1.1) #[no_mangle] pub fn test_ScalarPairZstFirst(_: ScalarPairZstFirst) -> ScalarPairZstFirst { loop {} } type ScalarPairLotsOfZsts = ((), u8, (), u128, ()); // CHECK: define { i128, i8 } @test_ScalarPairLotsOfZsts(i128 %_1.0, i8 %_1.1) #[no_mangle] pub fn test_ScalarPairLotsOfZsts(_: ScalarPairLotsOfZsts) -> ScalarPairLotsOfZsts { loop {} } type ScalarPairLottaNesting = (((), ((), u8, (), u128, ())), ()); // CHECK: define { i128, i8 } @test_ScalarPairLottaNesting(i128 %_1.0, i8 %_1.1) #[no_mangle] pub fn test_ScalarPairLottaNesting(_: ScalarPairLottaNesting) -> ScalarPairLottaNesting { loop {} }
Rust
5
Eric-Arellano/rust
src/test/codegen/tuple-layout-opt.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
// Marching Squares Metaballs // Coding in the Cabana // The Coding Train / Daniel Shiffman // https://thecodingtrain.com/challenges/coding-in-the-cabana/005-marching-squares.html // https://youtu.be/0ZONMNUKTfU // p5 port: https://editor.p5js.org/codingtrain/sketches/wwB-AA4i- class Bubble { float x, y; float vx, vy; float r; Bubble() { r = random(40, 60); x = random(r, width-r); y = random(r, height-r); vx = random(-2,2); vy = random(-2,2); } void show() { noFill(); stroke(255); fill(255,50); strokeWeight(1); circle(x, y, r*2); } void update() { x += vx; y += vy; if (x > width-r || x < r) { vx *= -1; } if (y > height-r || y < r) { vy *= -1; } } }
Processing
4
milan-micic/website
challenges/coding-in-the-cabana/005_marching_squares/Processing_metaballs/sketch_metaballs/Bubble.pde
[ "MIT" ]
<script> 'use strict'; var a; </script>
HTML
0
MMeent/pdf.js
external/builder/fixtures/include-expected.html
[ "Apache-2.0" ]
# Copyright (c) 2022 Fyde Innovations Limited and the openFyde Authors. # Distributed under the license specified in the root directory of this project. EAPI="5" DESCRIPTION="empty project" HOMEPAGE="http://fydeos.com" LICENSE="BSD-Google" SLOT="0" KEYWORDS="*" IUSE="" RDEPEND="" DEPEND="${RDEPEND}" S=$FILESDIR src_install() { insinto /etc/init doins bluetooth-input-fix.conf }
Gentoo Ebuild
3
FydeOS/chromium_os_for_raspberry_pi
baseboard-rpi3/chromeos-base/bluetooth-input-fix/bluetooth-input-fix-0.0.1.ebuild
[ "BSD-2-Clause" ]
#tag Class Protected Class AVAudioPlayer Inherits NSObject #tag Method, Flags = &h0 Function AveragePowerForChannel(channelNumber as UInteger) As Double declare function averagePowerForChannel_ lib AVFoundationLib selector "averagePowerForChannel:" (obj_id as ptr, channelNumber as UInteger) as Double Return (averagePowerForChannel_(self, channelNumber)) End Function #tag EndMethod #tag Method, Flags = &h21 Private Shared Function ClassRef() As Ptr static ref as ptr = NSClassFromString("AVAudioPlayer") return ref End Function #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(data as NSData, byref outError as NSError) declare function initWithData_ lib AVFoundationLib selector "initWithData:error:" (obj_id as ptr, data as ptr, byref outError as ptr) as ptr dim err as Ptr Super.Constructor( initWithData_(Allocate(ClassRef), data, err) ) if err <> nil then outError = new Foundation.NSError(err) end if CreateDelegate needsExtraRelease = True End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(data as NSData, utiString as Text, byref outError as NSError) declare function initWithData_ lib AVFoundationLib selector "initWithData:fileTypeHint:error:" (obj_id as ptr, data as ptr, utiString as CFStringRef, byref outError as ptr) as ptr dim err as Ptr Super.Constructor( initWithData_(Allocate(ClassRef), data, utiString, err) ) if err <> nil then outError = new Foundation.NSError(err) end if CreateDelegate needsExtraRelease = True End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(url as NSURL, utiString as CFStringRef, byref outError as NSError) declare function initWithContentsOfURL_ lib AVFoundationLib selector "initWithContentsOfURL:fileTypeHint:error:" (obj_id as ptr, url as ptr, utiString as CFStringRef, byref outError as ptr) as ptr dim err as ptr Super.Constructor( initWithContentsOfURL_(Allocate(ClassRef), url, utiString, err) ) if err <> nil then outError = new Foundation.NSError(err) end if CreateDelegate needsExtraRelease = True End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Constructor(url as NSURL, byref outError as NSError) declare function initWithContentsOfURL_ lib AVFoundationLib selector "initWithContentsOfURL:error:" (obj_id as ptr, url as ptr, byref outError as ptr) as ptr dim err as ptr Super.Constructor( initWithContentsOfURL_(Allocate(ClassRef), url, err) ) if err <> nil then outError = new Foundation.NSError(err) end if CreateDelegate needsExtraRelease = True End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub CreateDelegate() dim target as ptr = Initialize(Allocate(TargetClass)) if dispatch = nil then dispatch = new xojo.Core.Dictionary dispatch.Value(target) = xojo.core.WeakRef.Create(self) mdelegate = target End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub HandleDecodeError(err as Foundation.NSError) RaiseEvent DecodeError(err) End Sub #tag EndMethod #tag Method, Flags = &h21 Private Sub HandleFinishedPlaying(successfully as Boolean) RaiseEvent FinishedPlaying(successfully) End Sub #tag EndMethod #tag Method, Flags = &h21 Private Shared Sub impl_decodeError(pid as ptr, sel as ptr, player as ptr, err as ptr) dim error as Foundation.NSError if err <> nil then error = new Foundation.NSError(err) end if dim w as xojo.Core.WeakRef = xojo.core.WeakRef(dispatch.Value(pid)) if w.Value <> nil Then AVAudioPlayer(w.Value).HandleDecodeError(error) end if #Pragma unused sel #Pragma unused player End Sub #tag EndMethod #tag Method, Flags = &h21 Private Shared Sub impl_didFinishPlaying(pid as ptr, sel as ptr, player as ptr, success as Boolean) dim w as xojo.Core.WeakRef = xojo.core.WeakRef(dispatch.Value(pid)) if w.Value <> nil Then AVAudioPlayer(w.Value).HandleFinishedPlaying(success) end if #Pragma unused sel #Pragma unused player End Sub #tag EndMethod #tag Method, Flags = &h0 Sub Pause() declare sub pause_ lib AVFoundationLib selector "pause" (obj_id as ptr) pause_(self) End Sub #tag EndMethod #tag Method, Flags = &h0 Function PeakPowerForChannel(channelNumber as UInteger) As Double declare function peakPowerForChannel_ lib AVFoundationLib selector "peakPowerForChannel:" (obj_id as ptr, channelNumber as UInteger) as Double Return (peakPowerForChannel_(self, channelNumber)) End Function #tag EndMethod #tag Method, Flags = &h0 Function Play() As Boolean declare function play_ lib AVFoundationLib selector "play" (obj_id as ptr) as Boolean Return play_(self) End Function #tag EndMethod #tag Method, Flags = &h0 Function PlayAtTime(time as Double) As Boolean declare function playAtTime_ lib AVFoundationLib selector "playAtTime:" (obj_id as ptr, time as Double) as Boolean Return playAtTime_(self, time) End Function #tag EndMethod #tag Method, Flags = &h0 Function PrepareToPlay() As Boolean declare function prepareToPlay_ lib AVFoundationLib selector "prepareToPlay" (obj_id as ptr) as Boolean Return prepareToPlay_(self) End Function #tag EndMethod #tag Method, Flags = &h0 Sub Stop() declare sub stop_ lib AVFoundationLib selector "stop" (obj_id as ptr) stop_(self) End Sub #tag EndMethod #tag Method, Flags = &h21 Private Shared Function TargetClass() As Ptr static targetID as ptr if targetID = Nil then using UIKit dim methods() as TargetClassMethodHelper //delegate methods methods.Append new TargetClassMethodHelper("audioPlayerDecodeErrorDidOccur:error:", AddressOf impl_decodeError, "v@:@@") methods.Append new TargetClassMethodHelper("audioPlayerDidFinishPlaying:successfully:", AddressOf impl_didFinishPlaying, "v@:@B") targetID = BuildTargetClass("NSObject","MyAVAudioPlayerDel",methods) end if Return targetID End Function #tag EndMethod #tag Method, Flags = &h0 Sub UpdateMeters() declare sub updateMeters_ lib AVFoundationLib selector "updateMeters" (obj_id as ptr) updateMeters_(self) End Sub #tag EndMethod #tag Hook, Flags = &h0 Event DecodeError(err as Foundation.NSError) #tag EndHook #tag Hook, Flags = &h0 Event FinishedPlaying(successfully as Boolean) #tag EndHook #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function currentTime_ lib AVFoundationLib selector "currentTime" (obj_id as ptr) as Double Return currentTime_(self) End Get #tag EndGetter #tag Setter Set declare sub currentTime_ lib AVFoundationLib selector "setCurrentTime:" (obj_id as ptr, val as Double) currentTime_(self,value) End Set #tag EndSetter currentTime As Double #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function data_ lib AVFoundationLib selector "data" (obj_id as ptr) as ptr Return new NSData(data_(self)) End Get #tag EndGetter data As NSData #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function deviceCurrentTime_ lib AVFoundationLib selector "deviceCurrentTime" (obj_id as ptr) as Double Return (deviceCurrentTime_(self)) End Get #tag EndGetter deviceCurrentTime As Double #tag EndComputedProperty #tag Property, Flags = &h21 Private Shared dispatch As xojo.Core.Dictionary #tag EndProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function duration_ lib AVFoundationLib selector "duration" (obj_id as ptr) as Double Return (duration_(self)) End Get #tag EndGetter duration As Double #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function enableRate_ lib AVFoundationLib selector "enableRate" (obj_id as ptr) as Boolean Return enableRate_(self) End Get #tag EndGetter #tag Setter Set declare sub enableRate_ lib AVFoundationLib selector "setEnabledRate:" (obj_id as ptr, val as Boolean) enableRate_(self,value) End Set #tag EndSetter enableRate As Boolean #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function delegate_ lib AVFoundationLib selector "delegate" (obj_id as ptr) as ptr Return (delegate_(self)) End Get #tag EndGetter #tag Setter Set declare sub delegate_ lib AVFoundationLib selector "setDelegate:" (obj_id as ptr, del as ptr) delegate_(self, value) End Set #tag EndSetter mdelegate As Ptr #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function meteringEnabled_ lib AVFoundationLib selector "isMeteringEnabled" (obj_id as ptr) as Boolean Return meteringEnabled_(self) End Get #tag EndGetter #tag Setter Set declare sub setMeteringEnabled_ lib AVFoundationLib selector "setMeteringEnabled:" (obj_id as ptr, YES as Boolean) setMeteringEnabled_(self, value) End Set #tag EndSetter meteringEnabled As Boolean #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function numberOfChannels_ lib AVFoundationLib selector "numberOfChannels" (obj_id as ptr) as UInteger Return numberOfChannels_(self) End Get #tag EndGetter numberOfChannels As UInteger #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function numberOfLoops_ lib AVFoundationLib selector "numberOfLoops" (obj_id as ptr) as Integer Return numberOfLoops_(self) End Get #tag EndGetter #tag Setter Set declare sub numberOfLoops_ lib AVFoundationLib selector "setNumberOfLoops:" (obj_id as ptr, num as Integer) numberOfLoops_(self,value) End Set #tag EndSetter numberOfLoops As Integer #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function pan_ lib AVFoundationLib selector "pan" (obj_id as ptr) as Double Return pan_(self) End Get #tag EndGetter #tag Setter Set declare sub setPan lib AVFoundationLib selector "setPan:" (obj_id as ptr, pan as Double) setPan(self,value) End Set #tag EndSetter pan As Double #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function playing_ lib AVFoundationLib selector "isPlaying" (obj_id as ptr) as Boolean Return playing_(self) End Get #tag EndGetter playing As Boolean #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function rate_ lib AVFoundationLib selector "rate" (obj_id as ptr) as Double Return rate_(self) End Get #tag EndGetter #tag Setter Set declare sub setRate lib AVFoundationLib selector "setRate:" (obj_id as ptr, rate as Double) setRate(self,value) End Set #tag EndSetter rate As double #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function settings_ lib AVFoundationLib selector "settings" (obj_id as ptr) as ptr Return new NSDictionary(settings_(self)) End Get #tag EndGetter settings As NSDictionary #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare function url_ lib AVFoundationLib selector "url" (obj_id as ptr) as ptr Return new NSURL(url_(self)) End Get #tag EndGetter url As NSURL #tag EndComputedProperty #tag ComputedProperty, Flags = &h0 #tag Getter Get declare Function volume_ lib AVFoundationLib selector "volume" (obj_id as ptr) as Double Return volume_(self) End Get #tag EndGetter #tag Setter Set declare sub setVolume lib AVFoundationLib selector "setVolume:" (obj_id as ptr, vol as Double) setVolume(self,value) End Set #tag EndSetter volume As double #tag EndComputedProperty #tag ViewBehavior #tag ViewProperty Name="currentTime" Visible=false Group="Behavior" InitialValue="" Type="Double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="deviceCurrentTime" Visible=false Group="Behavior" InitialValue="" Type="Double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="duration" Visible=false Group="Behavior" InitialValue="" Type="Double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="enableRate" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Index" Visible=true Group="ID" InitialValue="-2147483648" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Left" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="meteringEnabled" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="numberOfLoops" Visible=false Group="Behavior" InitialValue="" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="pan" Visible=false Group="Behavior" InitialValue="" Type="Double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="playing" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="rate" Visible=false Group="Behavior" InitialValue="" Type="double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag ViewProperty Name="volume" Visible=false Group="Behavior" InitialValue="" Type="double" EditorType="" #tag EndViewProperty #tag ViewProperty Name="numberOfChannels" Visible=false Group="Behavior" InitialValue="" Type="UInteger" EditorType="" #tag EndViewProperty #tag EndViewBehavior End Class #tag EndClass
Xojo
4
kingj5/iOSKit
Modules/AVFoundation/AVAudioPlayer.xojo_code
[ "MIT" ]
CREATE FUNCTION hdb_catalog.gen_hasura_uuid() RETURNS uuid AS 'select gen_random_uuid()' LANGUAGE SQL; ALTER TABLE hdb_catalog.hdb_version ALTER COLUMN hasura_uuid SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.event_log ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.event_invocation_logs ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.hdb_action_log ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.hdb_cron_events ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.hdb_cron_event_invocation_logs ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.hdb_scheduled_events ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid(); ALTER TABLE hdb_catalog.hdb_scheduled_event_invocation_logs ALTER COLUMN id SET DEFAULT hdb_catalog.gen_hasura_uuid();
SQL
3
gh-oss-contributor/graphql-engine-1
server/src-rsr/migrations/41_to_42.sql
[ "Apache-2.0", "MIT" ]
fn main() { struct U; // A tuple is a "non-reference pattern". // A `mut` binding pattern resets the binding mode to by-value. let p = (U, U); let (a, mut b) = &p; //~^ ERROR cannot move out of a shared reference let mut p = (U, U); let (a, mut b) = &mut p; //~^ ERROR cannot move out of a mutable reference }
Rust
4
Eric-Arellano/rust
src/test/ui/pattern/move-ref-patterns/move-ref-patterns-default-binding-modes.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
--TEST-- Bug #75242: RecursiveArrayIterator doesn't have constants from parent class --FILE-- <?php class Foo extends ArrayIterator { } $r = new ReflectionClass(Foo::class); var_dump($r->getConstants()); $r = new ReflectionClass(ArrayIterator::class); var_dump($r->getConstants()); $r = new ReflectionClass(RecursiveArrayIterator::class); var_dump($r->getConstants()); ?> --EXPECT-- array(2) { ["STD_PROP_LIST"]=> int(1) ["ARRAY_AS_PROPS"]=> int(2) } array(2) { ["STD_PROP_LIST"]=> int(1) ["ARRAY_AS_PROPS"]=> int(2) } array(3) { ["STD_PROP_LIST"]=> int(1) ["ARRAY_AS_PROPS"]=> int(2) ["CHILD_ARRAYS_ONLY"]=> int(4) }
PHP
3
thiagooak/php-src
ext/spl/tests/bug75242.phpt
[ "PHP-3.01" ]
pragma solidity ^0.5.0; import "./contract.sol"; contract RelativeImport is Contract { }
Solidity
1
wbt/truffle
packages/truffle/test/sources/contract_names/contracts/relative_import.sol
[ "MIT" ]
#!/usr/bin/env bash cd $(dirname $0)/../.. export METEOR_HOME=`pwd` export phantom=$phantom # only install dependencies if required if [ "$phantom" = true ] then # Just in case these packages haven't been installed elsewhere. ./meteor npm install -g phantomjs-prebuilt browserstack-webdriver else # Installs into dev_bundle/lib/node_modules/puppeteer. ./meteor npm install -g puppeteer fi export PATH=$METEOR_HOME:$PATH # synchronously get the dev bundle and NPM modules if they're not there. ./meteor --help || exit 1 export URL='http://localhost:4096/' exec 3< <(meteor test-packages --driver-package test-in-console -p 4096 --exclude ${TEST_PACKAGES_EXCLUDE:-''}) EXEC_PID=$! sed '/test-in-console listening$/q' <&3 if [ "$phantom" = true ] then ./dev_bundle/bin/phantomjs "$METEOR_HOME/packages/test-in-console/phantomRunner.js" else node "$METEOR_HOME/packages/test-in-console/puppeteerRunner.js" fi STATUS=$? pkill -TERM -P $EXEC_PID exit $STATUS
Shell
4
joseconstela/meteor
packages/test-in-console/run.sh
[ "Apache-2.0", "BSD-2-Clause", "MIT" ]
% This is a Arc example document. % Using `%` starts line comment % import data from other files import "package.json" as package import json "package.json" as pkg [integer] int1 =+99 int2 = 42 int3 = 0 int4 =-17 int5 = 1_000 int6 = 1_2_3_4_5 [integer_typed] int1 =+99i32 int2 = 42u32 int3 = 0u8 int4 =-17i8 int5 = 1_000u64 int6 = 1_2_3_4_5i64 [decimal] flt1 = 0.0 flt2 =-0.0_2 flt3 = 3.1415 flt4 =-0.01 flt5 = 224_617.445_991_228 flt6 = 1e5 [decimal_typed] flt1 = 0.0f32 flt2 =-0.0_2 flt3 = 3.1415 flt4 =-0.01 flt5 = 224_617.445_991_228 flt6 = 1e5e5 [byte] hex1 = 0x00 oct1 = 0o00 bin1 = 0b00 [byte_typed] hex1 = 0x00_f32 oct1 = 0o00_f64 bin1 = 0b00_f64 [string] singleline = 'This is a string.' singleline = "This is a string." multiline = """ \b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) \" - quote (U+0022) \/ - slash (U+002F) \\ - backslash (U+005C) \u1234 - unicode (U+1234) """ literal = ''' \b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) \" - quote (U+0022) \/ - slash (U+002F) \\ - backslash (U+005C) \u1234 - unicode (U+1234) ''' [string_typed] singleline1 = f'This is a string.' singleline2 = f"This is a string." multiline = f""" \b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) \" - quote (U+0022) \/ - slash (U+002F) \\ - backslash (U+005C) \u1234 - unicode (U+1234) """ literal = f''' \b - backspace (U+0008) \t - tab (U+0009) \n - linefeed (U+000A) \f - form feed (U+000C) \r - carriage return (U+000D) \" - quote (U+0022) \/ - slash (U+002F) \\ - backslash (U+005C) \u1234 - unicode (U+1234) ''' [list.inline] arr1 = [1, 2, 3] arr2 = ["red", "yellow", "green"] arr3 = [[1, 2], [3, 4, 5]] arr4 = ["all", 'strings', """are the same""", '''type'''] arr5 = [ [1, 2] ["a", "b", "c"] ] arr6 = [1, 2.0] inline = [ { x = 1, y = 2, z = 3 }, { x = 7, y = 5, z = 9 }, { x = 2, y = 4, z = 8 }, ] %=========================================================================================== <list.scope.insert> & 42 & 'string' & [true, false, null] <list.scope.string> & 'Apple' & 'Banana' & 'Cherry' <list.scope.dict> * name = "Apple" color = "red" * name = "Banana" color = "yellow" * name = "apple" color = "red" % expand above syntax [list.scope.expand] insert = [42, 'string', [true, false, null]] string = ['Apple', 'Banana', 'Cherry'] dict = [ {name = 'Apple', color = 'red'}, {name = 'Banana', color = 'yellow'}, {name = 'apple', color = 'red'} ] %=========================================================================================== [dict.server] [.meta] ip = [ $dict.server.alpha.ip $dict.server.beta.ip ] % child node [.alpha] id = 10000 pw = "力微任重久神疲" % child node at same level [.beta] id = 10001 pw = "再竭衰庸定不支" % expand above syntax [dict.server.expand] %=========================================================================================== [version] alias = 'v|version' eg1.expand = { major = 1u64 mino = 0u64 patch = 0u64 } [DateTime] ld1 = dt'1979-05-27' % Local Date lt1 = dt'07:32:00' % Local Time ldt1 = dt'1979-05-27T07:32:00' % Local Date-Time odt1 = dt'1979-05-27T07:32:00Z' % Offset Date-Time odt2 = dt'1979-05-27T07:32:00X' [Regex] ipv4 = re|(\^)?\s*([A-Za-z_-][\\/@A-Za-z0-9_-]*|".+"|'.+'|[0-9]+)\s*(@[A-Za-z]+)\s*(=|:)\s* ipv6 = re|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$ [Embed] table = csv''' a,1 '''
Arc
4
nyar-lang/arc-language
test/showtime.arc
[ "CC0-1.0" ]
- startup_filename_default = user_application_theme == 'gl-dark' ? 'dark' : 'general' - startup_filename = local_assigns.fetch(:startup_filename, nil) || startup_filename_default %style = Rails.application.assets_manifest.find_sources("themes/#{user_application_theme_css_filename}.css").first.to_s.html_safe if user_application_theme_css_filename = Rails.application.assets_manifest.find_sources("startup/startup-#{startup_filename}.css").first.to_s.html_safe
Haml
3
Testiduk/gitlabhq
app/views/layouts/_startup_css.haml
[ "MIT" ]