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
/****************************************************************************** * Copyright 2019 The Apollo 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. *****************************************************************************/ #pragma once #include "modules/canbus/proto/chassis_detail.pb.h" #include "modules/drivers/canbus/can_comm/protocol_data.h" namespace apollo { namespace canbus { namespace ch { class Controlcommand115 : public ::apollo::drivers::canbus::ProtocolData< ::apollo::canbus::ChassisDetail> { public: static const int32_t ID; Controlcommand115(); uint32_t GetPeriod() const override; void UpdateData(uint8_t* data) override; void Reset() override; // config detail: {'description': 'Take control(Command)', 'enum': {0: // 'CTRL_CMD_OUT_OF_CONTROL', 1: 'CTRL_CMD_UNDER_CONTROL'}, 'precision': 1.0, // 'len': 8, 'name': 'CTRL_CMD', 'is_signed_var': False, 'offset': 0.0, // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'intel', // 'physical_unit': ''} Controlcommand115* set_ctrl_cmd(Control_command_115::Ctrl_cmdType ctrl_cmd); private: // config detail: {'description': 'Take control(Command)', 'enum': {0: // 'CTRL_CMD_OUT_OF_CONTROL', 1: 'CTRL_CMD_UNDER_CONTROL'}, 'precision': 1.0, // 'len': 8, 'name': 'CTRL_CMD', 'is_signed_var': False, 'offset': 0.0, // 'physical_range': '[0|1]', 'bit': 0, 'type': 'enum', 'order': 'intel', // 'physical_unit': ''} void set_p_ctrl_cmd(uint8_t* data, Control_command_115::Ctrl_cmdType ctrl_cmd); private: Control_command_115::Ctrl_cmdType ctrl_cmd_; }; } // namespace ch } // namespace canbus } // namespace apollo
C
4
seeclong/apollo
modules/canbus/vehicle/ch/protocol/control_command_115.h
[ "Apache-2.0" ]
"""Support for ISY994 locks.""" from __future__ import annotations from typing import Any from pyisy.constants import ISY_VALUE_UNKNOWN from homeassistant.components.lock import DOMAIN as LOCK, LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddEntitiesCallback from .const import _LOGGER, DOMAIN as ISY994_DOMAIN, ISY994_NODES, ISY994_PROGRAMS from .entity import ISYNodeEntity, ISYProgramEntity from .helpers import migrate_old_unique_ids VALUE_TO_STATE = {0: False, 100: True} async def async_setup_entry( hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback ) -> None: """Set up the ISY994 lock platform.""" hass_isy_data = hass.data[ISY994_DOMAIN][entry.entry_id] entities: list[ISYLockEntity | ISYLockProgramEntity] = [] for node in hass_isy_data[ISY994_NODES][LOCK]: entities.append(ISYLockEntity(node)) for name, status, actions in hass_isy_data[ISY994_PROGRAMS][LOCK]: entities.append(ISYLockProgramEntity(name, status, actions)) await migrate_old_unique_ids(hass, LOCK, entities) async_add_entities(entities) class ISYLockEntity(ISYNodeEntity, LockEntity): """Representation of an ISY994 lock device.""" @property def is_locked(self) -> bool | None: """Get whether the lock is in locked state.""" if self._node.status == ISY_VALUE_UNKNOWN: return None return VALUE_TO_STATE.get(self._node.status) async def async_lock(self, **kwargs: Any) -> None: """Send the lock command to the ISY994 device.""" if not await self._node.secure_lock(): _LOGGER.error("Unable to lock device") async def async_unlock(self, **kwargs: Any) -> None: """Send the unlock command to the ISY994 device.""" if not await self._node.secure_unlock(): _LOGGER.error("Unable to lock device") class ISYLockProgramEntity(ISYProgramEntity, LockEntity): """Representation of a ISY lock program.""" @property def is_locked(self) -> bool: """Return true if the device is locked.""" return bool(self._node.status) async def async_lock(self, **kwargs: Any) -> None: """Lock the device.""" if not await self._actions.run_then(): _LOGGER.error("Unable to lock device") async def async_unlock(self, **kwargs: Any) -> None: """Unlock the device.""" if not await self._actions.run_else(): _LOGGER.error("Unable to unlock device")
Python
5
MrDelik/core
homeassistant/components/isy994/lock.py
[ "Apache-2.0" ]
div.message { font-size: 12pt; } footer .message { color: #888; } footer div.message { color: #888; } h2, h2.message, h3 { color: #888; } div.message:hovered { color: #f00; } footer .message #text { color: #369; } .message:hover { color: #963; } .message[data-attr='42'] { color: #AAA; } .sublist H4 { /* h4 descendant */ color: #BBB; } .sublist H4 p { /* h4 is _NOT_ the rightmost type selector */ color: #111; } h4.good { /* h4 _IS_ rightmost type selector */ color: #222; } h4 .bad { /* h4 is _NOT_ rightmost type selector */ color: #444; } h4 p .description { /* h4 is _NOT_ the rightmost simple selector */ color: #333; } h4#sidebar { /* Has an ID selector */ color: #888; } h4[data-attr='42'] { /* Has an attribute selector */ color: #369; } h4:first-child { /* Has a pseudo-selector */ font-size: 20pt; } #h4 { /* h4 as an ID */ color: #000 } .h4 { /* h4 as a class */ color: #000 } body[foo='0'] { /* h4 as an attribute name */ color: #000 } h40 { /* h4 substring */ color: #000 } _h4 { /* h4 substring */ color: #000 }
CSS
3
ravitejavalluri/brackets
test/spec/CSSUtils-test-files/sprint4.css
[ "MIT" ]
dialect "logo" def length = 150 def diagonal = length * 1.414 lineWidth := 2 square(length) turnRight(45) lineColor := blue forward(diagonal) turnLeft(90) lineColor := red forward(diagonal / 2) turnLeft(90) forward(diagonal / 2) turnLeft(90) lineColor := blue forward(diagonal) method square(len) { repeat 4 times { forward(len) turnRight(90) } }
Grace
3
Dmitri-2/GraceWebsite
js-simple/sample/graphics/logoExample.grace
[ "MIT", "BSD-3-Clause" ]
--# -path=.:../portuguese:../romance:../common:../abstract:../prelude resource TryPor = SyntaxPor, LexiconPor, ParadigmsPor - [mkAdv,mkAdN] ;
Grammatical Framework
2
daherb/gf-rgl
src/api/TryPor.gf
[ "BSD-3-Clause" ]
// Cell coords. attribute vec2 cellCoords; // Glyph coords. attribute vec2 glyphCoords; // uv mapping. attribute vec2 uv; // Text foreground rgb packed together with cell flags. textColor.a // are the bitflags; consult RenderingGlyphFlags in renderer/mod.rs // for the possible values. attribute vec4 textColor; // Background color. attribute vec4 backgroundColor; varying vec2 TexCoords; varying vec3 fg; varying float colored; varying vec4 bg; uniform highp int renderingPass; uniform vec4 projection; void main() { vec2 projectionOffset = projection.xy; vec2 projectionScale = projection.zw; vec2 position; if (renderingPass == 0) { TexCoords = vec2(0, 0); position = cellCoords; } else { TexCoords = uv; position = glyphCoords; } fg = vec3(float(textColor.r), float(textColor.g), float(textColor.b)) / 255.; colored = float(textColor.a); bg = vec4(float(backgroundColor.r), float(backgroundColor.g), float(backgroundColor.b), float(backgroundColor.a)) / 255.; vec2 finalPosition = projectionOffset + position * projectionScale; gl_Position = vec4(finalPosition, 0., 1.); }
GLSL
5
ipatch/alacritty
alacritty/res/gles2/text.v.glsl
[ "Apache-2.0" ]
#pragma rtGlobals=1 // Use modern global access method. // fileutils - Utility functions to work with files #ifndef FILEUTILS_INCLUDE #define FILEUTILS_INCLUDE // Open a file for writing and return reference (handle) to it Function File_openForWrite(filepath) String filepath Variable fileref Open fileref as filepath return fileref End // Open a file for reading and return reference to it Function File_openForRead(filepath) String filepath Variable fileref Open/R fileref as filepath return fileref End Function File_writeString(fileref, string_in) Variable fileref String string_in FBinWrite fileref, string_in End // Close the file pointed to by a file reference Function File_close(fileref) Variable fileref Close fileref End #endif
IGOR Pro
4
ajnavarro/language-dataset
data/github.com/yamad/igorutils/6eafc6a246974796f7680e5746b9003b68937e3c/fileutils.ipf
[ "MIT" ]
(defun_header function_name: (sym_lit) @definition.function (#set! definition.function.scope "parent")) (defun_header lambda_list: (list_lit (sym_lit) @definition.parameter)) (defun_header keyword: (defun_keyword "defmethod") lambda_list: (list_lit (list_lit . (sym_lit) . (sym_lit) @definition.type))) (defun_header lambda_list: (list_lit (list_lit . (sym_lit) @definition.parameter . (_)))) (sym_lit) @reference (defun) @scope ((list_lit . (sym_lit) @_defvar . (sym_lit) @definition.var) (#match? @_defvar "^(cl:)?(defvar|defparameter)$")) (list_lit . (sym_lit) @_deftest . (sym_lit) @definition.function (#match? @_deftest "^(deftest)$")) @scope (list_lit . (sym_lit) @_deftest . (sym_lit) @definition.function (#match? @_deftest "^(deftest)$")) @scope (for_clause . (sym_lit) @definition.var) (with_clause . (sym_lit) @definition.var) (loop_macro) @scope (list_lit . (sym_lit) @_let (#match? @_let "(cl:|cffi:)?(with-accessors|with-foreign-objects|let[*]?)") . (list_lit (list_lit . (sym_lit) @definition.var))) @scope (list_lit . (sym_lit) @_let (#match? @_let "(cl:|alexandria:)?(with-gensyms|dotimes|with-foreign-object)") . (list_lit . (sym_lit) @definition.var)) @scope (list_lit . (kwd_lit) @_import_from (#eq? @_import_from ":import-from") . (_) (kwd_lit (kwd_symbol) @definition.import)) (list_lit . (kwd_lit) @_import_from (#eq? @_import_from ":import-from") . (_) (sym_lit) @definition.import) (list_lit . (kwd_lit) @_use (#eq? @_use ":use") (kwd_lit (kwd_symbol) @definition.import)) (list_lit . (kwd_lit) @_use (#eq? @_use ":use") (sym_lit) @definition.import)
Scheme
2
hmac/nvim-treesitter
queries/commonlisp/locals.scm
[ "Apache-2.0" ]
[Desktop Entry] Name=Qt4 QDbusViewer GenericName=D-Bus Debugger Comment=Debug D-Bus applications Exec=qdbusviewer-qt4 Icon=qdbusviewer-qt4 Terminal=false Type=Application Categories=Qt;Development;Debugger;
desktop
0
cyberqueen-meg/blackarch
packages/qt4/qdbusviewer-qt4.desktop
[ "BSD-3-Clause" ]
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"> <p py:def="greeting(name)"> Hello, ${name}! </p> <body py:match="item.tag == '{http://www.w3.org/1999/xhtml}body'" py:strip=""> <div id="header"> <h1>${title}</h1> </div> ${item} <div id="footer" /> </body> </html>
Genshi
3
LordAro/mako
examples/bench/kid/base.kid
[ "MIT" ]
BaseCheck,{{ command }},{{ title }}
AutoHotkey
0
scslmd/ahk
ahk/templates/daemon/base_check.ahk
[ "MIT" ]
# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 inherit eutils git-r3 DESCRIPTION="Create ctags/etags for a cargo project and all of its dependencies" HOMEPAGE="https://github.com/dan-t/rusty-tags" SRC_URI="" LICENSE="BSD" SLOT="0" KEYWORDS="" IUSE="" EGIT_REPO_URI="https://github.com/dan-t/rusty-tags.git" RDEPEND="virtual/rust:*" DEPEND="${DEPEND}" src_compile() { cargo build --release || die } src_install() { dobin target/release/rusty-tags || die dodoc README.md }
Gentoo Ebuild
4
gentoo/gentoo-rust
dev-util/rusty-tags/rusty-tags-9999.ebuild
[ "BSD-3-Clause" ]
.main { background: url('https://github.com/vercel/next.js/raw/canary/test/integration/url/public/vercel.png'); background-size: contain; width: 300px; height: 300px; }
CSS
4
blomqma/next.js
test/integration/url-imports/pages/css.module.css
[ "MIT" ]
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Siler's Hello World</title> </head> <body> <h1>Hello World!</h1> <p>Name <?= $params['name'] ?></p> </body> </html>
HTML+PHP
2
factormaarten/siler
examples/hello-world/hello-world.phtml
[ "MIT" ]
#+TITLE: :ui minimap #+DATE: May 8, 2020 #+SINCE: v3.0.0 #+STARTUP: inlineimages nofold * Table of Contents :TOC_3:noexport: - [[#description][Description]] - [[#maintainers][Maintainers]] - [[#module-flags][Module Flags]] - [[#plugins][Plugins]] - [[#features][Features]] - [[#configuration][Configuration]] - [[#troubleshooting][Troubleshooting]] - [[#scrolling-is-slowlaggy][Scrolling is slow/laggy]] - [[#minimap-doesnt-close-when-disabled][Minimap doesn't close when disabled]] * Description This module adds a minimap to the right side of Emacs, similar to the feature found in many other editors. ** Maintainers + [[https://github.com/rushsteve1][@rushsteve1]] (Author) ** Module Flags This module provides no flags. ** Plugins + [[https://elpa.gnu.org/packages/minimap.html][minimap.el]] * Features A minimap which provides an overview of the current buffer to the side, displaying the currently visible region and the current line. You can left-click and drag to scroll along the buffer, or right-click anywhere to jump to there. * Configuration There are a number of options provided by the =minimap.el= package this module is based on. The easiest way to see all of them is =SPC h v minimap=. * Troubleshooting ** Scrolling is slow/laggy Disable the minimap using =SPC t m= ** TODO Minimap doesn't close when disabled
Org
3
leezu/doom-emacs
modules/ui/minimap/README.org
[ "MIT" ]
//tab_size=4 // Copyright 2021 nickmqb // SPDX-License-Identifier: Apache-2.0 main() { ::currentAllocator = Memory.newArenaAllocator(checked_cast(uint.maxValue, ssize)) IntVector2.static_init_delta_8() IntVector3.static_init_delta() Biomes.static_init_masks() argErrors := new List<CommandLineArgsParserError>{} parser := new CommandLineArgsParser.from(Environment.getCommandLineArgs(), argErrors) args := parseArgs(parser) if argErrors.count > 0 { info := parser.getCommandLineInfo() for argErrors { Stderr.writeLine(CommandLineArgsParser.getErrorDesc(it, info)) } exit(1) } seed := args.seed != 0 ? args.seed : time(null) grid := cast(null, Grid) if args.dimension == 1 { grid = generateOverworld(seed) } else if args.dimension == 2 { grid = generateDimStub(seed, 128) } else if args.dimension == 3 { grid = generateDimStub(seed, 256) } else { abandon() } writeGrid(grid, args.outputPath) Stdout.writeLine(format("Map written to: {}", args.outputPath)) }
mupad
3
nickmqb/fpga_craft
terrain_gen/main.mu
[ "Apache-2.0" ]
#tag IOSView Begin iosView MainView BackButtonTitle = "" Compatibility = "" LargeTitleMode = 2 Left = 0 NavigationBarVisible= True TabIcon = "" TabTitle = "" Title = "" Top = 0 Begin iOSTable Table1 AccessibilityHint= "" AccessibilityLabel= "" AllowRefresh = False AutoLayout = Table1, 4, BottomLayoutGuide, 4, False, +1.00, 1, 1, -69, , True AutoLayout = Table1, 2, <Parent>, 2, False, +1.00, 1, 1, -0, , True AutoLayout = Table1, 3, TopLayoutGuide, 4, False, +1.00, 1, 1, *kStdControlGapV, , True AutoLayout = Table1, 1, <Parent>, 1, False, +1.00, 1, 1, 0, , True EditingEnabled = False EditingEnabled = False EstimatedRowHeight= -1 Format = 0 Height = 426.0 Left = 0 LockedInPosition= False Scope = 0 SectionCount = 0 Top = 73 Visible = True Width = 320.0 End End #tag EndIOSView #tag WindowCode #tag Event Sub Activate() if ParentSplitView.Available then ParentSplitView.Detail = new EmptyView end if End Sub #tag EndEvent #tag Event Sub Open() self.Title = "Version: " + getAppVersion call Foundation.LoadFramework("MessageUI") call Foundation.LoadFramework("CoreImage") call Foundation.LoadFramework("CoreMotion") End Sub #tag EndEvent #tag EndWindowCode #tag Events Table1 #tag Event Sub Action(section As Integer, row As Integer) #Pragma Unused section //rows // 0 = UIActivity // 1 = Camera // 2 = Missing UIControls // 3 = Create QRCode // 4 = Read QRCode (real device only) // 5 = Sounds // 6 = Email // 7 = Reachability // 8 = CoreMotion // 9 = Keychain Services // 10 = AVFoundation Demo views // 11 = Record and Play video // 12 = UIActionController // 13 = Unit Tests // 14 = GameKit Dim newMasterView As iOSView Dim newDetailView As iOSView Select Case row Case 0 newDetailView = New ActivityView Case 1 newDetailView = New CameraView Case 2 newDetailView = New MissingControlsView Case 3 newDetailView = New CreateQRView Case 4 newDetailView = New ReadQRView Case 5 newDetailView = New SoundsView Case 6 newDetailView = New EmailView Case 7 newDetailView = New ReachabilityView Case 8 newDetailView = New CoreMotionView Case 9 newDetailView = New KeychainView Case 10 newDetailView = New AVFoundationDemoView Case 11 newDetailView = New RecordPlayVideo Case 12 newDetailView = New UIAlertView Case 13 newDetailView = New ShakingView Case 14 newDetailView = New GameKitDemoView Case 15 'newDetailView = new UIDocumentPickerView //for a future version when entitlements actually work Case 16 newDetailView = New improvediOSTableView Case 17 newDetailView = New HapticFeedbackView Case 18 newDetailView = new HTMLView Case 19 newDetailView = new MessageView Case 20 newDetailView = new ColorPickerView case 21 newDetailView = new UIMenuView Case 22 newMasterView = New XojoUnitTestGroupView newDetailView = New XojoUnitTestDetailsView Else //shouldn't get here Return End Select 'declare sub presentViewController_ lib UIKitLib selector "presentViewController:animated:completion:" (obj_id as ptr, viewControllerToPresent as ptr, flag as Boolean, completion as ptr) 'PresentViewController_(self.ViewControllerHandle, newDetailView.ViewControllerHandle, True, nil) If newMasterView IsA iOSView Then Self.PushTo newMasterView End If If newDetailView IsA iOSView Then If ParentSplitView.Available Then Self.ParentSplitView.Detail = newDetailView Else Self.PushTo newDetailView End If end if End Sub #tag EndEvent #tag Event Sub Open() Me.AddSection("Select a view") Dim d As iOSTableCellData #If XojoVersion < 2016.03 d = New iOSTableCellData("UIActivityView") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Camera") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Missing UIControls") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Create QRCode") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Read QRCode") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("System Sounds") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Email") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Reachability") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Core Motion") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Keychain Services") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("AVFoundation Demos") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Record and Play video") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("UIActionController") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Shaking") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("GameKit Demos (In progress)") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("UIDocumentPicker") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) d = New iOSTableCellData("Improved iOSTable") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) If Self.ParentSplitView.Available Then d = New iOSTableCellData("Unit Tests") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure Me.AddRow(0,d) End If #Else d = Me.CreateCell("UIActivityView","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Camera","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Missing UIControls","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Create QRCode","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Read QRCode","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("System Sounds","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Email","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Reachability","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Core Motion","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Keychain Services","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("AVFoundation Demos","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Record and Play video","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("UIActionController","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Shaking","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("GameKit Demos (In progress)","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("UIDocumentPicker","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Improved iOSTable","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Haptic Feedback","iPhone only",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("HTMLViewer Delegate","2018r2+",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Message","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Color Picker","iOS14+",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) d = Me.CreateCell("Dropdown menu","iOS13+",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) If Self.ParentSplitView.Available Then d = Me.CreateCell("Unit Tests","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) Me.AddRow(0,d) End If #endif End Sub #tag EndEvent #tag EndEvents #tag ViewBehavior #tag ViewProperty Name="LargeTitleMode" Visible=true Group="Behavior" InitialValue="2" Type="LargeTitleDisplayModes" EditorType="Enum" #tag EnumValues "0 - Automatic" "1 - Always" "2 - Never" #tag EndEnumValues #tag EndViewProperty #tag ViewProperty Name="BackButtonTitle" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="MultiLineEditor" #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="Name" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="NavigationBarVisible" Visible=false Group="Behavior" InitialValue="" Type="Boolean" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Super" Visible=true Group="ID" InitialValue="" Type="String" EditorType="" #tag EndViewProperty #tag ViewProperty Name="TabIcon" Visible=false Group="Behavior" InitialValue="" Type="iOSImage" EditorType="" #tag EndViewProperty #tag ViewProperty Name="TabTitle" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="" #tag EndViewProperty #tag ViewProperty Name="Title" Visible=false Group="Behavior" InitialValue="" Type="Text" EditorType="MultiLineEditor" #tag EndViewProperty #tag ViewProperty Name="Top" Visible=true Group="Position" InitialValue="0" Type="Integer" EditorType="" #tag EndViewProperty #tag EndViewBehavior
Xojo
4
kingj5/iOSKit
ExampleViews/MainView.xojo_code
[ "MIT" ]
module openconfig-codegen-extensions { yang-version "1"; // namespace namespace "http://openconfig.net/yang/openconfig-codegen-ext"; prefix "oc-codegen-ext"; // import some basic types import openconfig-extensions { prefix oc-ext; } // meta organization "OpenConfig working group"; contact "OpenConfig working group www.openconfig.net"; description "This module provides OpenConfig-specific code generation extensions to the YANG language."; oc-ext:openconfig-version "0.1.0"; revision "2020-10-05" { description "Initial commit of code generation extensions."; reference "0.1.0"; } // extension statements extension camelcase-name { argument "name" { yin-element false; } description "When specified, this extension indicates a specific CamelCase name that is to be used for the field, for example, this can allow for more natural capitalisation than can be achieved algorithmically (e.g., IPv4Address rather than Ipv4Address)."; } extension field-number { argument "number" { yin-element false; } description "field-number is used to explicitly specify the field number used in the protocol buffer generated code instead of auto-generating them. Only 1-1000 are valid numbers. The rest is either reserved for Protobuf internal usage or for use by the generated code when generating field numbers automatically. Specification at https://github.com/openconfig/ygot/blob/master/docs/yang-to-protobuf-transformations-spec.md#field-numbering"; } extension field-number-offset { argument "offset" { yin-element false; } description "field-number-offset is used within a uses statement to specify the offset that is added to every explicit field-number for fields directly within the grouping. When field-number is used to explicitly specify Protobuf field numbers used in the protocol buffer generated code, it's possible that different fields having the same field number could collide when multiple logical groupings are imported into the same schema tree location. field-number-offset helps resolve this by adding a different offset to each grouping. Specification at https://github.com/openconfig/ygot/blob/master/docs/yang-to-protobuf-transformations-spec.md#field-numbering"; } }
YANG
5
xw-g/public
release/models/extensions/openconfig-codegen-extensions.yang
[ "Apache-2.0" ]
DROP VIEW hdb_catalog.hdb_role; DROP TABLE hdb_catalog.hdb_action_permission; DROP TABLE hdb_catalog.hdb_action; DROP TABLE hdb_catalog.hdb_custom_types; DROP TABLE hdb_catalog.hdb_action_log; DELETE FROM hdb_catalog.hdb_relationship where table_schema = 'hdb_catalog' and table_name in ('hdb_action', 'hdb_action_permission', 'hdb_action_log', 'hdb_custom_types', 'hdb_role'); DELETE FROM hdb_catalog.hdb_table where table_schema = 'hdb_catalog' and table_name in ('hdb_action', 'hdb_action_permission', 'hdb_action_log', 'hdb_custom_types', 'hdb_role');
SQL
2
gh-oss-contributor/graphql-engine-1
server/src-rsr/migrations/32_to_31.sql
[ "Apache-2.0", "MIT" ]
import Demo "../../backend/Demo"; import Types "../../backend/Types"; module { public let allVideos : [Types.VideoId] = [ "alice-dog-0", "bob-fish-0", "cathy-bunny-0", "dexter-hampster-0", "esther-weasel-0", ]; public let demoScript : [Demo.Command] = [ #reset(#script 0), // clear CanCan state and set timeMode to #script. #createTestData{ users = ["alice", "bob", "cathy", "dex", "esther"]; videos = [ ("alice", "dog"), ("bob", "fish"), ("cathy", "bunny"), ("dexter", "hampster"), ("esther", "weasel"), ]; }, #putProfileFollow{ userId = "alice"; toFollow = "cathy"; follows = true; }, #putProfileFollow{ userId = "cathy"; toFollow = "alice"; follows = true; }, #assertVideoFeed{ userId = "alice"; limit = ?1; videosPred = #equals(["cathy-bunny-0"]); }, #assertVideoFeed{ userId = "cathy"; limit = ?1; videosPred = #equals(["alice-dog-0"]); }, #assertVideoFeed{ userId = "alice"; limit = null; videosPred = #containsAll allVideos; }, #assertVideoFeed{ userId = "bob"; limit = null; videosPred = #containsAll allVideos; }, ]; }
Modelica
5
gajendraks/cancan
service/Demo/Can30_VideoRecommendations.mo
[ "Apache-2.0" ]
$$ MODE TUSCRIPT host=HOST ()
Turing
0
LaudateCorpus1/RosettaCodeData
Task/Hostname/TUSCRIPT/hostname.tu
[ "Info-ZIP" ]
scriptname _Camp_WoodChoppingFurnitureScript extends ObjectReference import _CampInternal Quest property _Camp_MainQuest auto FormList property woodChoppingAxes auto Actor property PlayerRef auto weapon EquippedWeapon Event OnActivate(ObjectReference akActionRef) if (akActionRef as Actor) == Game.GetPlayer() CampDebug(0, "I was activated by the player!") RegisterForSingleUpdate(0.5) endif endEvent Event OnUpdate() bool hasBaseObject = self.GetBaseObject() if !hasBaseObject CampDebug(2, "Invalid registration detected. You should run 'ClearInvalidRegistrations' from the console while playing using SKSE in order to fix this.") return endif if self.IsFurnitureInUse() CampDebug(0, "I am in use by the player!") (_Camp_MainQuest as _Camp_ConditionValues).IsChoppingWood = true if woodChoppingAxes.HasForm(PlayerRef.GetEquippedWeapon()) EquippedWeapon = PlayerRef.GetEquippedWeapon() PlayerRef.UnequipItem(EquippedWeapon as Form, abSilent = true) endif RegisterForSingleUpdate(0.25) else CampDebug(0, "I am not in use by the player!") (_Camp_MainQuest as _Camp_ConditionValues).IsChoppingWood = false if EquippedWeapon != none PlayerRef.EquipItem(EquippedWeapon as Form, abSilent = true) EquippedWeapon = none endif endif endEvent
Papyrus
4
chesko256/Campfire
Scripts/Source/_Camp_WoodChoppingFurnitureScript.psc
[ "MIT" ]
FROM golang:1.12.9-alpine3.10 as builder COPY web.go . RUN go build -o /web . FROM alpine:3.10 # Define GOTRACEBACK to mark this container as using the Go language runtime # for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/). ENV GOTRACEBACK=single CMD ["./web"] COPY --from=builder /web .
Dockerfile
3
mwht/minikube
test/integration/testdata/skaffold/leeroy-web/Dockerfile
[ "Apache-2.0" ]
#! /usr/bin/jconsole db =: 2e4,~(([%~0.5<.@:+*)~ 10^100&>) 19.4806*2^48%~i.479 gen =: 3 : 0"1 f =. (1.5&%-%&12) 4 o. (-(<.65*5+{:y)&{) (1.7+{.y) %: db%60 g =. ^ (-3*2+?2$0) * (%~ 0.1 + 1 o. ^&(-:3+|.y)) (1200*1+2**:y) %~/ db crinkle =. 20 %~ (1-+:|.y) +/ .* 0>.g-1.2+(0.4*?0)-{:y res =. -10^.(1+*:@]-*)`(^~%&db)/((1.5 3*0.2+0.5 4^~(0.05*0.5-~?0)|@:+-.),60*[:*:+/)1|8*y (0.2*480?@$0) + 10 * 1 >. 4 + res + crinkle + f ) TEMPLATE =: 0 : 0 Frequency dB UnweightedDATA overall dB 0.0 dB decay Average averaging No Smoothing source Totally Made Up saved --/-/--, --:-- AM peak 0.0Hz ) fmtfr =: TEMPLATE rplc 'DATA';LF,@:,.db ([,TAB,])&":"0 ] writefr =: ((1+i.5)(],' R',":@[,'.txt'"_)&.><@[) (1!:2~ fmtfr)"_1 (0.5<.@:+])&.(10&*)@] getbrand =: 3 : 0 randsel =. ('- -',]) {~ (1|.3 3{.~[) + (0?@$~[) I.~ +/\@:(%+/)@:(7%@:+i.@#)@] y ;< ,&.>/ (2 0+(2,2+?9)?@$3) randsel&.> ({.@":"0 i.10) ;~ 'HXADT',y ) scatter =: #@[ (?~@[{{.) ] MOD =: <;._1'|Reference|Pro|Gamergate|Bass Style|Deluxe' mod =: [`;@.(*@#@])&.> scatter&MOD BRANDS =: ((~.@[,.</.) mod)/|:(#~[:~:{:"1);<@(,.>)/"1 getbrand@> ;:'Auditory Groot Himmler Stonks' SUFFIXES =: <;._1' Technology Sound Designs ' BRANDS =: 0 2 1 {"1 BRANDS ,. SUFFIXES fmt_brands =: 3 : 0 surr =. {.@[ , ] , {:@[ ind =. ' '&,"1 fmtF =. ('{"name":"',[,' ',],'","file":"',[,'"}'"_)&>/ y =. (}: , fmtF^:(0<L.)L:_2@{:)"1 y fmtList =. ('['(<0 0)}>) @: (}:,,&' ]'&.>@{:) @: (', '&,&.>) fmtBP =. ,&': '@>@[ (],"1~#@]{.[) ;@:(,&','&.>@}:,fmtList&.>@{:)@] fields =. ;:'name suffix phones' b =. fmtBP/@|:&.> '"'&(surr^:(-.@e.)) L: 0 fields <@(,.#~a:~:])"1 y ;<@(LF,~dtb)"1 (,.'[]') surr ind (,.'{}') surr }. ; ('}, {',ind)&.> b ) 'phone_book.json' (1!:2<)~ fmt_brands BRANDS ((0&{::^:L.@>@[writefr])"_1 [: gen 5(#"_1)0?@$~1 2,~#) ;{:"1 BRANDS exit ''
J
3
Banbeucmas/CrinGraph
data_hp/gen.ijs
[ "0BSD" ]
module: part2 define constant $n = 251; let m = make(<vector>, size: $n); for (i from 0 below $n) m[i] := make(<vector>, size: $n, fill: '#') end; for (i from 1 below $n - 1 by 2) for (j from 1 below $n by 2) m[i][j] := '.' end end; let r = read-line(*standard-input*); define function f(i, q) let pq = q.shallow-copy; let s = make(<set>); local method move(q, i, j) let t = make(<set>); for (p in q) let (y, x) = values(p.head, p.tail); m[y + i][x + j] := ' '; add!(t, pair(y + i * 2, x + j * 2)) end; t end; local method loop(k) if (k >= r.size - 1 | r[k] = ')') values(k, s) else select (r[k]) '(' => let (nk, nq) = f(k + 1, q); k := nk; q := nq; '|' => for (e in q) add!(s, e) end; q := pq.shallow-copy; 'N' => q := move(q, -1, 0); 'S' => q := move(q, 1, 0); 'W' => q := move(q, 0, -1); 'E' => q := move(q, 0, 1); end; loop(k + 1) end; end; loop(i) end; let p = make(<set>); let (y, x) = values(floor/($n, 2), floor/($n, 2)); f(1, add!(p, pair(y, x))); let v = make(<vector>, size: $n); for (i from 0 below $n) v[i] := make(<vector>, size: $n, fill: #f); end; let q = make(<deque>, size: 1, fill: vector(y, x, 0)); let c = 0; until (q.empty?) let e = pop(q); let (y, x, d) = values(e[0], e[1], e[2]); v[y][x] := d; when (d >= 1000) c := c + 1 end; when (m[y - 1][x] = ' ' & ~v[y - 2][x]) push-last(q, vector(y - 2, x, d + 1)) end; when (m[y + 1][x] = ' ' & ~v[y + 2][x]) push-last(q, vector(y + 2, x, d + 1)) end; when (m[y][x - 1] = ' ' & ~v[y][x - 2]) push-last(q, vector(y, x - 2, d + 1)) end; when (m[y][x + 1] = ' ' & ~v[y][x + 2]) push-last(q, vector(y, x + 2, d + 1)) end end; format-out("%=\n", c);
Dylan
4
Ashindustry007/competitive-programming
advent-of-code/2018/day20/part2.dylan
[ "WTFPL" ]
start_server {} { set i [r info] regexp {redis_version:(.*?)\r\n} $i - version regexp {redis_git_sha1:(.*?)\r\n} $i - sha1 puts "Testing Redis version $version ($sha1)" }
Tcl
3
tomliugen/tomliugen-redis-3.2.2-rc
tests/unit/printver.tcl
[ "BSD-3-Clause" ]
\require "c"
LilyPond
0
HolgerPeters/lyp
spec/user_files/pinclude2.ly
[ "MIT" ]
//////////////////////////////////////////////////////////////////////////////// // AssemblyInfo.prg using System.Reflection using System.Runtime.InteropServices using System.Security [assembly: AssemblyTitleAttribute( "VO-Compatible System Classes Library" )] [assembly: AssemblyDescriptionAttribute( "VO-Compatible System Classes" )]
xBase
4
orangesocks/XSharpPublic
Runtime/VOSDK/Source/VOSDK/System_Classes_SDK/Properties/AssemblyInfo.prg
[ "Apache-2.0" ]
[[actuator.whats-next]] == What to Read Next You might want to read about graphing tools such as https://graphiteapp.org[Graphite]. Otherwise, you can continue on to read about <<deployment#deployment, "`deployment options`">> or jump ahead for some in-depth information about Spring Boot's <<build-tool-plugins#build-tool-plugins, build tool plugins>>.
AsciiDoc
0
techAi007/spring-boot
spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/whats-next.adoc
[ "Apache-2.0" ]
actor Main new create(env: Env) => meaning_of_life() fun meaning_of_life(): (String, (String|U32)) => let x = U32(1) ("hi", "hi")
Pony
3
presidentbeef/ponyc
minimal-cases/issue-849/849.pony
[ "BSD-2-Clause" ]
invoke_method =: ] : (dyad def '(''__y'' ,~ >{:x)~ >{.x') method_chain_z_ =: ($:~ a:"0) : (coname@'' invoke_method F..invoke_method ,.) then_RADWIMPS_ =: coname [ stdout@'前' se_RADWIMPS_ =: empty [ stdout@('世' , LF) method_chain_RADWIMPS_ then`then`then`se exit 0
J
2
kokkiemouse/RADWIMPS
RADWIMPS.ijs
[ "MIT" ]
;;;;------------------------------------------------------------------------ ;;;; Global variables globals [ root ; root of the generated tree cont ; Counter to enumerate the nodes in a sequencial way acont; Counter to enumerate the depth of links ] ;;;; Agents Families breed [nodes node] ; Nodes of Tree/Graphs nodes-own [ visited? ; Tells if the node has been visited previously ; (in use in DFS and BFS) in-development? ; Tells if the node has been developed/expanded ; in the seacrh (in use in BFS) index ; The index of the node in the exploration height ] ;;;;------------------------------------------------------------------------ ;;;; Generation of Trees/Graphs ; Generate a tree with constant branching (#width) with #depth levels to generate-tree [#depth #width] ; The main procedure generates one only node (the root) and launch a ; recursive procedure for the creation of children create-nodes 1 [ setxy random-xcor random-ycor set shape "square" set color blue set label-color white set size 1 set root self set visited? true set in-development? false set index -1 ; Call to auxiliary recursive procedure. See bellow generate-tree-aux (#depth - 1) #width self ] ; After the completion of generation, we provide a radial layout layout-radial nodes links root end ; Recursive procedure from a father node to generate-tree-aux [#depth #width father] ; It is executed only if depth > 0 if #depth > 0 [ ; Ask the father to generate its children and connect them to it ask father [ hatch-nodes #width [ set visited? false set in-development? false create-link-with father ; For every child, we repeat the process generate-tree-aux (#depth - 1) #width self ] ] ] end ; Procedure to generate a random graph. to generate-graph ca ; Primero, generamos todos los nodes create-nodes Num-nodes [ setxy random-xcor random-ycor set shape "square" set color blue set label-color white set size 1 set visited? true set in-development? false set index -1 ] ; We take initially one of the nodes as root set root node 0 ; Generate links randomly while [count links < Num-Links] [ ask one-of nodes [ create-link-with one-of other nodes ] ] ; We provide an adequated layout repeat 500 [ layout-spring nodes links 0.2 (sqrt Num-nodes) / Num-nodes 1 ] end ; Procedure to reset the values in nodes to reset set cont 0 set acont 1 ask nodes [ set visited? false set in-development? false set label "" ] end ; Procedure to make a radial layout from start node to re-layout layout-radial nodes links (one-of nodes with [index = 0]) end ;;;;------------------------------------------------------------------------ ;;;; Exploration Algorithms ; Breadth Exploration: From a starting node. ; Every step, ir enumerates every ring in a sorted way (first, children of nodes ; with lower enumeration) ; Visited but not expanded nodes are "in-development" to explore-BFS [#start] ; We start mrking the starting node ask #start [ set in-development? true set visited? true set label cont set index cont set cont cont + 1 ] ; "in-development?" mark allows us to know if there are nodes to be expanded while [any? nodes with [in-development?]] [ ; We take to be developed nodes sorted by index let successors sort-by [ [n1 n2] -> [index] of n1 <= [index] of n2 ] nodes with [in-development?]; ; And each of them is expanded enumerating their children foreach successors [ s -> ask s [ ; After that, they are visited but not in development set in-development? false ask link-neighbors with [not visited?] [ set in-development? true set visited? true set label cont set index cont set cont cont + 1 wait (1 - speed) ] ] ] ] end ; Depth Exploration: From a starting node. ; Every step, it goes down until the end of the branch, til the leaves, and ; enumerates them sequently. ; It uses backtracking to come back up. We model it ina recursive way. to explore-DFS [#start] ; Every input node is marked as visited, enumerated and we cross it to their ; children. ask #start [ set visited? true set label cont set index cont set cont cont + 1 wait (1 - speed) ; For every not visited child, we repeat the procedure ask link-neighbors with [not visited?] [ if not visited? [ explore-DFS self ] ; We must control again because it could be ; vsited in the same level ] ] end ; Random Exploration: From a starting node. ; Once marked the staring node, we mark the other nodes randomly with no repetition. to explore-randomly [#start] ask #start [ set visited? true set label cont set index cont set cont cont + 1 wait (1 - speed) ] ask nodes with [not visited?] [ set visited? true set label cont set index cont set cont cont + 1 wait (1 - speed) ] end @#$#@#$#@ GRAPHICS-WINDOW 210 10 779 580 -1 -1 17.0 1 12 1 1 1 0 0 0 1 -16 16 -16 16 0 0 1 ticks 30.0 SLIDER 7 10 110 43 Depth Depth 1 10 5.0 1 1 NIL HORIZONTAL SLIDER 7 42 110 75 Width Width 1 5 3.0 1 1 NIL HORIZONTAL BUTTON 110 10 200 75 Generate Tree ca\ngenerate-tree Depth Width NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 75 195 185 228 Explore in Depth reset\nrun (word \"explore-DFS \" Start) NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 10 195 75 228 NIL reset NIL 1 T OBSERVER NIL NIL NIL NIL 1 CHOOSER 10 150 185 195 Start Start "root" "(one-of nodes)" 1 BUTTON 75 230 185 263 Explore in Breadth reset\nrun (word \"explore-BFS \" Start) NIL 1 T OBSERVER NIL NIL NIL NIL 1 BUTTON 10 230 75 263 Re-Layout re-layout NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 7 76 110 109 Num-nodes Num-nodes 0 200 52.0 1 1 NIL HORIZONTAL SLIDER 7 109 110 142 Num-Links Num-Links 0 10 * Num-nodes 60.0 1 1 NIL HORIZONTAL BUTTON 110 76 200 142 Generate Graph generate-graph NIL 1 T OBSERVER NIL NIL NIL NIL 1 SLIDER 10 300 185 333 speed speed 0 1 1.0 .1 1 NIL HORIZONTAL BUTTON 10 265 185 298 Explore Randomly reset\nrun (word \"explore-randomly \" Start) NIL 1 T OBSERVER NIL NIL NIL NIL 1 @#$#@#$#@ ## WHAT IS IT? (a general understanding of what the model is trying to show or explain) ## HOW IT WORKS (what rules the agents use to create the overall behavior of the model) ## HOW TO USE IT (how to use the model, including a description of each of the items in the Interface tab) ## THINGS TO NOTICE (suggested things for the user to notice while running the model) ## THINGS TO TRY (suggested things for the user to try to do (move sliders, switches, etc.) with the model) ## EXTENDING THE MODEL (suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.) ## NETLOGO FEATURES (interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features) ## RELATED MODELS (models in the NetLogo Models Library and elsewhere which are of related interest) ## CREDITS AND REFERENCES (a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links) @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 airplane true 0 Polygon -7500403 true true 150 0 135 15 120 60 120 105 15 165 15 195 120 180 135 240 105 270 120 285 150 270 180 285 210 270 165 240 180 180 285 195 285 165 180 105 180 60 165 15 arrow true 0 Polygon -7500403 true true 150 0 0 150 105 150 105 293 195 293 195 150 300 150 box false 0 Polygon -7500403 true true 150 285 285 225 285 75 150 135 Polygon -7500403 true true 150 135 15 75 150 15 285 75 Polygon -7500403 true true 15 75 15 225 150 285 150 135 Line -16777216 false 150 285 150 135 Line -16777216 false 150 135 15 75 Line -16777216 false 150 135 285 75 bug true 0 Circle -7500403 true true 96 182 108 Circle -7500403 true true 110 127 80 Circle -7500403 true true 110 75 80 Line -7500403 true 150 100 80 30 Line -7500403 true 150 100 220 30 butterfly true 0 Polygon -7500403 true true 150 165 209 199 225 225 225 255 195 270 165 255 150 240 Polygon -7500403 true true 150 165 89 198 75 225 75 255 105 270 135 255 150 240 Polygon -7500403 true true 139 148 100 105 55 90 25 90 10 105 10 135 25 180 40 195 85 194 139 163 Polygon -7500403 true true 162 150 200 105 245 90 275 90 290 105 290 135 275 180 260 195 215 195 162 165 Polygon -16777216 true false 150 255 135 225 120 150 135 120 150 105 165 120 180 150 165 225 Circle -16777216 true false 135 90 30 Line -16777216 false 150 105 195 60 Line -16777216 false 150 105 105 60 car false 0 Polygon -7500403 true true 300 180 279 164 261 144 240 135 226 132 213 106 203 84 185 63 159 50 135 50 75 60 0 150 0 165 0 225 300 225 300 180 Circle -16777216 true false 180 180 90 Circle -16777216 true false 30 180 90 Polygon -16777216 true false 162 80 132 78 134 135 209 135 194 105 189 96 180 89 Circle -7500403 true true 47 195 58 Circle -7500403 true true 195 195 58 circle false 0 Circle -7500403 true true 0 0 300 circle 2 false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 cow false 0 Polygon -7500403 true true 200 193 197 249 179 249 177 196 166 187 140 189 93 191 78 179 72 211 49 209 48 181 37 149 25 120 25 89 45 72 103 84 179 75 198 76 252 64 272 81 293 103 285 121 255 121 242 118 224 167 Polygon -7500403 true true 73 210 86 251 62 249 48 208 Polygon -7500403 true true 25 114 16 195 9 204 23 213 25 200 39 123 cylinder false 0 Circle -7500403 true true 0 0 300 dot false 0 Circle -7500403 true true 90 90 120 face happy false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 255 90 239 62 213 47 191 67 179 90 203 109 218 150 225 192 218 210 203 227 181 251 194 236 217 212 240 face neutral false 0 Circle -7500403 true true 8 7 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Rectangle -16777216 true false 60 195 240 225 face sad false 0 Circle -7500403 true true 8 8 285 Circle -16777216 true false 60 75 60 Circle -16777216 true false 180 75 60 Polygon -16777216 true false 150 168 90 184 62 210 47 232 67 244 90 220 109 205 150 198 192 205 210 220 227 242 251 229 236 206 212 183 fish false 0 Polygon -1 true false 44 131 21 87 15 86 0 120 15 150 0 180 13 214 20 212 45 166 Polygon -1 true false 135 195 119 235 95 218 76 210 46 204 60 165 Polygon -1 true false 75 45 83 77 71 103 86 114 166 78 135 60 Polygon -7500403 true true 30 136 151 77 226 81 280 119 292 146 292 160 287 170 270 195 195 210 151 212 30 166 Circle -16777216 true false 215 106 30 flag false 0 Rectangle -7500403 true true 60 15 75 300 Polygon -7500403 true true 90 150 270 90 90 30 Line -7500403 true 75 135 90 135 Line -7500403 true 75 45 90 45 flower false 0 Polygon -10899396 true false 135 120 165 165 180 210 180 240 150 300 165 300 195 240 195 195 165 135 Circle -7500403 true true 85 132 38 Circle -7500403 true true 130 147 38 Circle -7500403 true true 192 85 38 Circle -7500403 true true 85 40 38 Circle -7500403 true true 177 40 38 Circle -7500403 true true 177 132 38 Circle -7500403 true true 70 85 38 Circle -7500403 true true 130 25 38 Circle -7500403 true true 96 51 108 Circle -16777216 true false 113 68 74 Polygon -10899396 true false 189 233 219 188 249 173 279 188 234 218 Polygon -10899396 true false 180 255 150 210 105 210 75 240 135 240 house false 0 Rectangle -7500403 true true 45 120 255 285 Rectangle -16777216 true false 120 210 180 285 Polygon -7500403 true true 15 120 150 15 285 120 Line -16777216 false 30 120 270 120 leaf false 0 Polygon -7500403 true true 150 210 135 195 120 210 60 210 30 195 60 180 60 165 15 135 30 120 15 105 40 104 45 90 60 90 90 105 105 120 120 120 105 60 120 60 135 30 150 15 165 30 180 60 195 60 180 120 195 120 210 105 240 90 255 90 263 104 285 105 270 120 285 135 240 165 240 180 270 195 240 210 180 210 165 195 Polygon -7500403 true true 135 195 135 240 120 255 105 255 105 285 135 285 165 240 165 195 line true 0 Line -7500403 true 150 0 150 300 line half true 0 Line -7500403 true 150 0 150 150 pentagon false 0 Polygon -7500403 true true 150 15 15 120 60 285 240 285 285 120 person false 0 Circle -7500403 true true 110 5 80 Polygon -7500403 true true 105 90 120 195 90 285 105 300 135 300 150 225 165 300 195 300 210 285 180 195 195 90 Rectangle -7500403 true true 127 79 172 94 Polygon -7500403 true true 195 90 240 150 225 180 165 105 Polygon -7500403 true true 105 90 60 150 75 180 135 105 plant false 0 Rectangle -7500403 true true 135 90 165 300 Polygon -7500403 true true 135 255 90 210 45 195 75 255 135 285 Polygon -7500403 true true 165 255 210 210 255 195 225 255 165 285 Polygon -7500403 true true 135 180 90 135 45 120 75 180 135 210 Polygon -7500403 true true 165 180 165 210 225 180 255 120 210 135 Polygon -7500403 true true 135 105 90 60 45 45 75 105 135 135 Polygon -7500403 true true 165 105 165 135 225 105 255 45 210 60 Polygon -7500403 true true 135 90 120 45 150 15 180 45 165 90 sheep false 0 Rectangle -7500403 true true 151 225 180 285 Rectangle -7500403 true true 47 225 75 285 Rectangle -7500403 true true 15 75 210 225 Circle -7500403 true true 135 75 150 Circle -16777216 true false 165 76 116 square false 0 Rectangle -7500403 true true 30 30 270 270 square 2 false 0 Rectangle -7500403 true true 30 30 270 270 Rectangle -16777216 true false 60 60 240 240 star false 0 Polygon -7500403 true true 151 1 185 108 298 108 207 175 242 282 151 216 59 282 94 175 3 108 116 108 target false 0 Circle -7500403 true true 0 0 300 Circle -16777216 true false 30 30 240 Circle -7500403 true true 60 60 180 Circle -16777216 true false 90 90 120 Circle -7500403 true true 120 120 60 tree false 0 Circle -7500403 true true 118 3 94 Rectangle -6459832 true false 120 195 180 300 Circle -7500403 true true 65 21 108 Circle -7500403 true true 116 41 127 Circle -7500403 true true 45 90 120 Circle -7500403 true true 104 74 152 triangle false 0 Polygon -7500403 true true 150 30 15 255 285 255 triangle 2 false 0 Polygon -7500403 true true 150 30 15 255 285 255 Polygon -16777216 true false 151 99 225 223 75 224 truck false 0 Rectangle -7500403 true true 4 45 195 187 Polygon -7500403 true true 296 193 296 150 259 134 244 104 208 104 207 194 Rectangle -1 true false 195 60 195 105 Polygon -16777216 true false 238 112 252 141 219 141 218 112 Circle -16777216 true false 234 174 42 Rectangle -7500403 true true 181 185 214 194 Circle -16777216 true false 144 174 42 Circle -16777216 true false 24 174 42 Circle -7500403 false true 24 174 42 Circle -7500403 false true 144 174 42 Circle -7500403 false true 234 174 42 turtle true 0 Polygon -10899396 true false 215 204 240 233 246 254 228 266 215 252 193 210 Polygon -10899396 true false 195 90 225 75 245 75 260 89 269 108 261 124 240 105 225 105 210 105 Polygon -10899396 true false 105 90 75 75 55 75 40 89 31 108 39 124 60 105 75 105 90 105 Polygon -10899396 true false 132 85 134 64 107 51 108 17 150 2 192 18 192 52 169 65 172 87 Polygon -10899396 true false 85 204 60 233 54 254 72 266 85 252 107 210 Polygon -7500403 true true 119 75 179 75 209 101 224 135 220 225 175 261 128 261 81 224 74 135 88 99 wheel false 0 Circle -7500403 true true 3 3 294 Circle -16777216 true false 30 30 240 Line -7500403 true 150 285 150 15 Line -7500403 true 15 150 285 150 Circle -7500403 true true 120 120 60 Line -7500403 true 216 40 79 269 Line -7500403 true 40 84 269 221 Line -7500403 true 40 216 269 79 Line -7500403 true 84 40 221 269 wolf false 0 Polygon -7500403 true true 135 285 195 285 270 90 30 90 105 285 Polygon -7500403 true true 270 90 225 15 180 90 Polygon -7500403 true true 30 90 75 15 120 90 Circle -1 true false 183 138 24 Circle -1 true false 93 138 24 x false 0 Polygon -7500403 true true 270 75 225 30 30 225 75 270 Polygon -7500403 true true 30 75 75 30 270 225 225 270 @#$#@#$#@ NetLogo 6.0.4 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ default 0.0 -0.2 0 0.0 1.0 0.0 1 1.0 0.0 0.2 0 0.0 1.0 link direction true 0 Line -7500403 true 150 150 90 180 Line -7500403 true 150 150 210 180 @#$#@#$#@ 1 @#$#@#$#@
NetLogo
5
fsancho/IA
02. Uninformed Search/Uninformed Explorations.nlogo
[ "MIT" ]
# Copyright (c) 2018-2021, Carnegie Mellon University # See LICENSE for details _neon_binop_ev := rec( ev := self >> self.t.value(self.semantic(self._vval(1), self._vval(2), [])).ev(), ); ############### HALF NEON ############# Class(vunpacklo_half, _neon_binop_ev, VecExp_2.binary(), rec( semantic := (in1, in2, p) -> unpacklo(in1, in2, 2, 1))); Class(vunpackhi_half, _neon_binop_ev, VecExp_2.binary(), rec( semantic := (in1, in2, p) -> unpackhi(in1, in2, 2, 1))); Class(vrev_half, VecExp_2.unary(), rec( semantic := (in1, p) -> vrev64(in1,2), )); Class(vtrnq_half, _neon_binop_ev, VecExp_2.binary(), rec( semantic := (in1, in2, p) -> [vtransposelo(in1, in2, 2), vtransposehi(in1, in2, 2)], computeType := self >> TVect(TVect(T_Real(32), 2), 2), )); Class(vextract_half, VecExp_2.unary(), rec( computeType := self >> TVect(T_Real(32), 2), semantic := (in1, p) -> Checked(Length(in1)=2, in1[p[1]+1]), ev := self >> self.t.value(self.semantic(self._vval(1), self.args[2].p)).ev(), )); Class(vmulcx_half, VecExp_2.binary()); Class(vswapcx_half, VecExp_2.unary()); Class(vload1_half, VecExp_2.binary()); Class(vstore1_half, VecExpCommand); # vdup_lane_half(<float32x2>, <int lane_num>) ==> float32x2 Class(vdup_lane_half, VecExp_2.binary(), rec( ev := self >> let(lane := self.args[2].ev(), Checked(IsInt(lane), lane >=0, lane <= 1, self.t.value( Replicate(2, self.args[1].ev()[1+lane]) ))) )); # vext_half(<float32x2>, <float32x2>, 1) ==> float32x2 # vext_half([a, b], [c, d], 1) = [b c] Class(vext_half, VecExp_2.ternary(), rec( ev := self >> let(num := self.args[3].ev(), Checked(IsInt(num), num=1, self.t.value( self.args[1].ev()[2], self.args[2].ev()[1]))) )); ############################################################# # Composite instructions. Serve as a bridge between NEON and # TL ISA DB. Later rewritten into combination of vuzpq_32f, # vzipq_32f and vtrnq_32f with vextract_neon_4x32f. # Class(vpacklo_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> shuffle(in1, in2, [1, 3, 1, 3], 4, 1))); Class(vpackhi_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> shuffle(in1, in2, [2, 4, 2, 4], 4, 1))); Class(vunpacklo_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> unpacklo(in1, in2, 4, 1))); Class(vunpackhi_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> unpackhi(in1, in2, 4, 1))); Class(vtransposelo_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> vtransposelo(in1, in2, 4))); Class(vtransposehi_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> vtransposehi(in1, in2, 4))); Class(vunpacklolo2_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> unpacklo(in1, in2, 4, 2))); Class(vunpacklohi2_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> shuffle(in1, in2, [1,2,3,4], 4, 1))); Class(vunpackhilo2_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> shuffle(in1, in2, [3,4,1,2], 4, 1))); Class(vunpackhihi2_neon, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> unpackhi(in1, in2, 4, 2))); Class(vrev_neon, VecExp_4.unary(), rec( semantic := (in1, p) -> vrev64(in1,4), )); ############################################################# Class(vuzpq_32f, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> [shuffle(in1, in2, [1, 3, 1, 3], 4, 1), shuffle(in1, in2, [2, 4, 2, 4], 4, 1)], computeType := self >> TVect(TVect(T_Real(32), 4), 2), )); Class(vzipq_32f, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> [unpacklo(in1, in2, 4, 1), unpackhi(in1, in2, 4, 1)], computeType := self >> TVect(TVect(T_Real(32), 4), 2), )); Class(vtrnq_32f, _neon_binop_ev, VecExp_4.binary(), rec( semantic := (in1, in2, p) -> [vtransposelo(in1, in2, 4), vtransposehi(in1, in2, 4)], computeType := self >> TVect(TVect(T_Real(32), 4), 2), )); Class(vextract_neon_4x32f, VecExp_4.unary(), rec( computeType := self >> TVect(T_Real(32), 4), semantic := (in1, p) -> Checked(Length(in1)=2, in1[p[1]+1]), ev := self >> self.t.value(self.semantic(self._vval(1), self.args[2].p)).ev(), )); Class(vmulcx_neon, VecExp_4.binary()); Class(vswapcx_neon, VecExp_4.unary()); # vload1_neon(<float*>, <float32x4>, <int lane_num>) => float32x4 Class(vload1_neon, VecExp_4.binary()); # vload_half_neon(<float*>) => float32x2 Class(vload_half_neon, VecExp_2.unary()); # vstore1_neon(<float*>, <float32x4>, <int lane_num>) Class(vstore1_neon, VecStoreCommand.binary()); # vstore2lo_neon(<float*>, <float32x4>) Class(vstore2lo_neon, VecStoreCommand.binary()); # vstore2hi_neon(<float*>, <float32x4>) Class(vstore2hi_neon, VecStoreCommand.binary()); # vcombine_neon(<float32x2>, <float32x>) => float32x4 Class(vcombine_neon, VecExp_4.binary()); # vdup_lane_neon(<float32x4>, <int lane_num>) ==> float32x4 Class(vdup_lane_neon, VecExp_4.binary(), rec( ev := self >> let(lane := self.args[2].ev(), Checked(IsInt(lane), lane >=0, lane <= 3, self.t.value( Replicate(4, self.args[1].ev()[1+lane]) ))) )); # vext_neon(<float32x4>, <float32x4>, 1) ==> float32x4 # vext_neon([a, b, c, d], [e, f, g, h], 1) = [d e f g] # vext_neon([a, b, c, d], [e, f, g, h], 2) = [c d e f] Class(vext_neon, VecExp_4.ternary(), rec( ev := self >> let(num := self.args[3].ev(), Checked(IsInt(num), num>=0, num<=3, self.t.value( self.args[1].ev(){[5-num .. 4]} :: self.args[2].ev(){[1..4-num]}))) ));
GAP
4
sr7cb/spiral-software
namespaces/spiral/platforms/neon/code.gi
[ "BSD-2-Clause-FreeBSD" ]
#!/usr/bin/env bash # Copyright 2016 The Kubernetes 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 # # 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. # This script is a vestigial redirection. Please do not add "real" logic. # The "true" target of this makerule is `hack/make-rules/test-e2e-node.sh`. # This script runs `make test-e2e-node` command. # The command builds and runs node end-to-end tests. # Args: # FOCUS: Regexp that matches the tests to be run. Defaults to "". # SKIP: Regexp that matches the tests that needs to be skipped. Defaults # Usage: `hack/e2e-node-test.sh `. # Example: `hack/e2e-node-test.sh FOCUS=Kubelet SKIP=container`. set -o errexit set -o nounset set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. # For help output ARGHELP="" if [[ -n "${FOCUS:-}" ]]; then ARGHELP="FOCUS='${FOCUS}' " fi if [[ -n "${SKIP:-}" ]]; then ARGHELP="${ARGHELP}SKIP='${SKIP}'" fi echo "NOTE: $0 has been replaced by 'make test-e2e-node'" echo echo "This script supports a number of parameters passed as environment variables." echo "Please see the Makefile for more details." echo echo "The equivalent of this invocation is: " echo " make test-e2e-node ${ARGHELP}" echo echo make --no-print-directory -C "${KUBE_ROOT}" test-e2e-node FOCUS="${FOCUS:-}" SKIP="${SKIP:-}"
Shell
4
lack/kubernetes
hack/e2e-node-test.sh
[ "Apache-2.0" ]
{ "targets": [ { "target_name": "perfcounters", "sources": [ "src/hardware-counter.cpp", "src/perf-counters.cpp", "src/thread-local.cpp", ], "cflags": [ "-Wno-sign-compare", ], }, ], }
Python
1
vegYY/react
scripts/perf-counters/binding.gyp
[ "MIT" ]
% Copyright (c) Facebook, Inc. and its affiliates. % % This source code is licensed under the MIT license found in the % LICENSE file in the root directory of this source tree. -module(case_guards). -export([ test_accepts_positive_Bad/0, test_accepts_positive_Ok/0, test_accepts_positive2_Bad/0, test_accepts_positive2_Ok/0, test_accepts_all_Ok/0 ]). accepts_positive(X) -> case X of X when X > 0 -> ok end. accepts_positive2(X) -> case X of X when 1 =:= 1, 1 =:= 0; X > 0 -> ok end. accepts_all(X) -> case X of X when X > 0 -> ok; X when not (X > 0) -> ok end. test_accepts_positive_Bad() -> accepts_positive(0). test_accepts_positive_Ok() -> accepts_positive(1). test_accepts_positive2_Bad() -> accepts_positive2(0). test_accepts_positive2_Ok() -> accepts_positive2(1). test_accepts_all_Ok() -> accepts_all(0), accepts_all(1).
Erlang
4
niranthhr/facebook_prj
infer/tests/codetoanalyze/erlang/nonmatch/src/case_guards.erl
[ "MIT" ]
---------------------------------------------------------------------------------- -- Company: -- Engineer: -- -- Create Date: 24.05.2016 21:14:53 -- Design Name: -- Module Name: tb_main_design - Behavioral -- Project Name: -- Target Devices: -- Tool Versions: -- Description: -- -- Dependencies: -- -- Revision: -- Revision 0.01 - File Created -- Additional Comments: -- ---------------------------------------------------------------------------------- library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity tb_main_design_tcp is end tb_main_design_tcp; architecture Behavioral of tb_main_design_tcp is signal clk125Mhz : STD_LOGIC := '0'; signal clk125Mhz90 : STD_LOGIC := '0'; signal phy_ready : STD_LOGIC := '1'; signal status : STD_LOGIC_VECTOR (3 downto 0) := (others => '0'); signal input_empty : STD_LOGIC := '0'; signal input_read : STD_LOGIC := '0'; signal input_data : STD_LOGIC_VECTOR (7 downto 0) := (others => '0'); signal input_data_present : STD_LOGIC := '0'; signal input_data_error : STD_LOGIC := '0'; component main_design is generic ( our_mac : std_logic_vector(47 downto 0) := (others => '0'); our_netmask : std_logic_vector(31 downto 0) := (others => '0'); our_ip : std_logic_vector(31 downto 0) := (others => '0')); Port ( clk125Mhz : in STD_LOGIC; clk125Mhz90 : in STD_LOGIC; input_empty : in STD_LOGIC; input_read : out STD_LOGIC; input_data : in STD_LOGIC_VECTOR (7 downto 0); input_data_present : in STD_LOGIC; input_data_error : in STD_LOGIC; phy_ready : in STD_LOGIC; status : out STD_LOGIC_VECTOR (3 downto 0); -- data received over UDP udp_rx_valid : out std_logic := '0'; udp_rx_data : out std_logic_vector(7 downto 0) := (others => '0'); udp_rx_src_ip : out std_logic_vector(31 downto 0) := (others => '0'); udp_rx_src_port : out std_logic_vector(15 downto 0) := (others => '0'); udp_rx_dst_broadcast : out std_logic := '0'; udp_rx_dst_port : out std_logic_vector(15 downto 0) := (others => '0'); -- data to be sent over UDP udp_tx_busy : out std_logic := '1'; udp_tx_valid : in std_logic := '0'; udp_tx_data : in std_logic_vector(7 downto 0) := (others => '0'); udp_tx_src_port : in std_logic_vector(15 downto 0) := (others => '0'); udp_tx_dst_mac : in std_logic_vector(47 downto 0) := (others => '0'); udp_tx_dst_ip : in std_logic_vector(31 downto 0) := (others => '0'); udp_tx_dst_port : in std_logic_vector(15 downto 0) := (others => '0'); -- data received over TCP/IP tcp_rx_data_valid : out std_logic := '0'; tcp_rx_data : out std_logic_vector(7 downto 0) := (others => '0'); tcp_rx_hdr_valid : out std_logic := '0'; tcp_rx_src_ip : out std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_src_port : out std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_dst_port : out std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_seq_num : out std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_ack_num : out std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_window : out std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_checksum : out std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_flag_urg : out std_logic := '0'; tcp_rx_flag_ack : out std_logic := '0'; tcp_rx_flag_psh : out std_logic := '0'; tcp_rx_flag_rst : out std_logic := '0'; tcp_rx_flag_syn : out std_logic := '0'; tcp_rx_flag_fin : out std_logic := '0'; tcp_rx_urgent_ptr : out std_logic_vector(15 downto 0) := (others => '0'); -- data to be sent over TCP/IP tcp_tx_busy : out std_logic := '0'; tcp_tx_data_valid : in std_logic := '0'; tcp_tx_data : in std_logic_vector(7 downto 0) := (others => '0'); tcp_tx_hdr_valid : in std_logic := '0'; tcp_tx_src_port : in std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_dst_mac : in std_logic_vector(47 downto 0) := (others => '0'); tcp_tx_dst_ip : in std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_dst_port : in std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_seq_num : in std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_ack_num : in std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_window : in std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_checksum : in std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_flag_urg : in std_logic := '0'; tcp_tx_flag_ack : in std_logic := '0'; tcp_tx_flag_psh : in std_logic := '0'; tcp_tx_flag_rst : in std_logic := '0'; tcp_tx_flag_syn : in std_logic := '0'; tcp_tx_flag_fin : in std_logic := '0'; tcp_tx_urgent_ptr : in std_logic_vector(15 downto 0) := (others => '0'); eth_txck : out std_logic := '0'; eth_txctl : out std_logic := '0'; eth_txd : out std_logic_vector(3 downto 0) := (others => '0')); end component; signal udp_rx_valid : std_logic := '0'; signal udp_rx_data : std_logic_vector(7 downto 0) := (others => '0'); signal udp_rx_src_ip : std_logic_vector(31 downto 0) := (others => '0'); signal udp_rx_src_port : std_logic_vector(15 downto 0) := (others => '0'); signal udp_rx_dst_broadcast : std_logic := '0'; signal udp_rx_dst_port : std_logic_vector(15 downto 0) := (others => '0'); signal udp_rx_valid_last : std_logic := '0'; signal udp_tx_busy : std_logic := '0'; signal udp_tx_valid : std_logic := '0'; signal udp_tx_data : std_logic_vector(7 downto 0) := (others => '0'); signal udp_tx_src_port : std_logic_vector(15 downto 0) := (others => '0'); signal udp_tx_dst_mac : std_logic_vector(47 downto 0) := (others => '0'); signal udp_tx_dst_ip : std_logic_vector(31 downto 0) := (others => '0'); signal udp_tx_dst_port : std_logic_vector(15 downto 0) := (others => '0'); -- data received over TCP/IP signal tcp_rx_data_valid : std_logic := '0'; signal tcp_rx_data : std_logic_vector(7 downto 0) := (others => '0'); signal tcp_rx_hdr_valid : std_logic := '0'; signal tcp_rx_src_ip : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_rx_src_port : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_rx_dst_port : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_rx_seq_num : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_rx_ack_num : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_rx_window : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_rx_checksum : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_rx_flag_urg : std_logic := '0'; signal tcp_rx_flag_ack : std_logic := '0'; signal tcp_rx_flag_psh : std_logic := '0'; signal tcp_rx_flag_rst : std_logic := '0'; signal tcp_rx_flag_syn : std_logic := '0'; signal tcp_rx_flag_fin : std_logic := '0'; signal tcp_rx_urgent_ptr : std_logic_vector(15 downto 0) := (others => '0'); -- data to be sent over TCP/IP signal tcp_tx_busy : std_logic := '0'; signal tcp_tx_data_valid : std_logic := '0'; signal tcp_tx_data : std_logic_vector(7 downto 0) := (others => '0'); signal tcp_tx_hdr_valid : std_logic := '0'; signal tcp_tx_src_port : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_tx_dst_ip : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_tx_dst_port : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_tx_seq_num : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_tx_ack_num : std_logic_vector(31 downto 0) := (others => '0'); signal tcp_tx_window : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_tx_checksum : std_logic_vector(15 downto 0) := (others => '0'); signal tcp_tx_flag_urg : std_logic := '0'; signal tcp_tx_flag_ack : std_logic := '0'; signal tcp_tx_flag_psh : std_logic := '0'; signal tcp_tx_flag_rst : std_logic := '0'; signal tcp_tx_flag_syn : std_logic := '0'; signal tcp_tx_flag_fin : std_logic := '0'; signal tcp_tx_urgent_ptr : std_logic_vector(15 downto 0) := (others => '0'); signal eth_txck : std_logic := '0'; signal eth_txctl : std_logic := '0'; signal eth_txd : std_logic_vector(3 downto 0) := (others => '0'); signal count : integer := 999; signal count2 : integer := 180; signal arp_src_hw : std_logic_vector(47 downto 0) := x"A0B3CC4CF9EF"; signal arp_src_ip : std_logic_vector(31 downto 0) := x"0A000001"; signal arp_tgt_hw : std_logic_vector(47 downto 0) := x"000000000000"; signal arp_tgt_ip : std_logic_vector(31 downto 0) := x"0A00000A"; constant our_mac : std_logic_vector(47 downto 0) := x"AB_89_67_45_23_02"; -- NOTE this is 02:23:45:67:89:AB constant our_ip : std_logic_vector(31 downto 0) := x"0A_00_00_0A"; constant our_netmask : std_logic_vector(31 downto 0) := x"00_FF_FF_FF"; component tcp_engine is port ( clk : in STD_LOGIC; -- data received over TCP/IP tcp_rx_data_valid : in std_logic := '0'; tcp_rx_data : in std_logic_vector(7 downto 0) := (others => '0'); tcp_rx_hdr_valid : in std_logic := '0'; tcp_rx_src_ip : in std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_src_port : in std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_dst_broadcast : in std_logic := '0'; tcp_rx_dst_port : in std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_seq_num : in std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_ack_num : in std_logic_vector(31 downto 0) := (others => '0'); tcp_rx_window : in std_logic_vector(15 downto 0) := (others => '0'); tcp_rx_flag_urg : in std_logic := '0'; tcp_rx_flag_ack : in std_logic := '0'; tcp_rx_flag_psh : in std_logic := '0'; tcp_rx_flag_rst : in std_logic := '0'; tcp_rx_flag_syn : in std_logic := '0'; tcp_rx_flag_fin : in std_logic := '0'; tcp_rx_urgent_ptr : in std_logic_vector(15 downto 0) := (others => '0'); -- data to be sent over TP tcp_tx_busy : in std_logic := '0'; tcp_tx_data_valid : out std_logic := '0'; tcp_tx_data : out std_logic_vector(7 downto 0) := (others => '0'); tcp_tx_hdr_valid : out std_logic := '0'; tcp_tx_src_port : out std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_dst_ip : out std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_dst_port : out std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_seq_num : out std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_ack_num : out std_logic_vector(31 downto 0) := (others => '0'); tcp_tx_window : out std_logic_vector(15 downto 0) := (others => '0'); tcp_tx_flag_urg : out std_logic := '0'; tcp_tx_flag_ack : out std_logic := '0'; tcp_tx_flag_psh : out std_logic := '0'; tcp_tx_flag_rst : out std_logic := '0'; tcp_tx_flag_syn : out std_logic := '0'; tcp_tx_flag_fin : out std_logic := '0'; tcp_tx_urgent_ptr : out std_logic_vector(15 downto 0) := (others => '0')); end component; begin process begin clk125Mhz <= '1'; wait for 2 ns; clk125Mhz90 <= '1'; wait for 2 ns; clk125Mhz <= '0'; wait for 2 ns; clk125Mhz90 <= '0'; wait for 2 ns; end process; i_main_design: main_design generic map ( our_mac => our_mac, our_netmask => our_netmask, our_ip => our_ip ) port map ( clk125Mhz => clk125Mhz, clk125Mhz90 => clk125Mhz90, input_empty => input_empty, input_read => input_read, input_data => input_data, input_data_present => input_data_present, input_data_error => input_data_error, phy_ready => phy_ready, status => status, -- data received over UDP udp_rx_valid => udp_rx_valid, udp_rx_data => udp_rx_data, udp_rx_src_ip => udp_rx_src_ip, udp_rx_src_port => udp_rx_src_port, udp_rx_dst_broadcast => udp_rx_dst_broadcast, udp_rx_dst_port => udp_rx_dst_port, udp_tx_busy => udp_tx_busy, udp_tx_valid => udp_tx_valid, udp_tx_data => udp_tx_data, udp_tx_src_port => udp_tx_src_port, udp_tx_dst_mac => udp_tx_dst_mac, udp_tx_dst_ip => udp_tx_dst_ip, udp_tx_dst_port => udp_tx_dst_port, -- data received over TCP/IP tcp_tx_busy => tcp_tx_busy, tcp_rx_data_valid => tcp_rx_data_valid, tcp_rx_data => tcp_rx_data, tcp_rx_hdr_valid => tcp_rx_hdr_valid, tcp_rx_src_ip => tcp_rx_src_ip, tcp_rx_src_port => tcp_rx_src_port, tcp_rx_dst_port => tcp_rx_dst_port, tcp_rx_seq_num => tcp_rx_seq_num, tcp_rx_ack_num => tcp_rx_ack_num, tcp_rx_window => tcp_rx_window, tcp_rx_checksum => tcp_rx_checksum, tcp_rx_flag_urg => tcp_rx_flag_urg, tcp_rx_flag_ack => tcp_rx_flag_ack, tcp_rx_flag_psh => tcp_rx_flag_psh, tcp_rx_flag_rst => tcp_rx_flag_rst, tcp_rx_flag_syn => tcp_rx_flag_syn, tcp_rx_flag_fin => tcp_rx_flag_fin, tcp_rx_urgent_ptr => tcp_rx_urgent_ptr, -- data to be sent over TCP/IP tcp_tx_data_valid => tcp_tx_data_valid, tcp_tx_data => tcp_tx_data, tcp_tx_hdr_valid => tcp_tx_hdr_valid, tcp_tx_src_port => tcp_tx_src_port, tcp_tx_dst_ip => tcp_tx_dst_ip, tcp_tx_dst_port => tcp_tx_dst_port, tcp_tx_seq_num => tcp_tx_seq_num, tcp_tx_ack_num => tcp_tx_ack_num, tcp_tx_window => tcp_tx_window, tcp_tx_checksum => tcp_tx_checksum, tcp_tx_flag_urg => tcp_tx_flag_urg, tcp_tx_flag_ack => tcp_tx_flag_ack, tcp_tx_flag_psh => tcp_tx_flag_psh, tcp_tx_flag_rst => tcp_tx_flag_rst, tcp_tx_flag_syn => tcp_tx_flag_syn, tcp_tx_flag_fin => tcp_tx_flag_fin, tcp_tx_urgent_ptr => tcp_tx_urgent_ptr, eth_txck => eth_txck, eth_txctl => eth_txctl, eth_txd => eth_txd); i_tcp_engine: tcp_engine port map ( clk => clk125MHz, -- data received over TCP/IP tcp_rx_data_valid => tcp_rx_data_valid, tcp_rx_data => tcp_rx_data, tcp_rx_hdr_valid => tcp_rx_hdr_valid, tcp_rx_src_ip => tcp_rx_src_ip, tcp_rx_src_port => tcp_rx_src_port, tcp_rx_dst_port => tcp_rx_dst_port, tcp_rx_seq_num => tcp_rx_seq_num, tcp_rx_ack_num => tcp_rx_ack_num, tcp_rx_window => tcp_rx_window, tcp_rx_flag_urg => tcp_rx_flag_urg, tcp_rx_flag_ack => tcp_rx_flag_ack, tcp_rx_flag_psh => tcp_rx_flag_psh, tcp_rx_flag_rst => tcp_rx_flag_rst, tcp_rx_flag_syn => tcp_rx_flag_syn, tcp_rx_flag_fin => tcp_rx_flag_fin, tcp_rx_urgent_ptr => tcp_rx_urgent_ptr, -- data to be sent over TCP/IP tcp_tx_busy => tcp_tx_busy, tcp_tx_data_valid => tcp_tx_data_valid, tcp_tx_data => tcp_tx_data, tcp_tx_hdr_valid => tcp_tx_hdr_valid, tcp_tx_src_port => tcp_tx_src_port, tcp_tx_dst_ip => tcp_tx_dst_ip, tcp_tx_dst_port => tcp_tx_dst_port, tcp_tx_seq_num => tcp_tx_seq_num, tcp_tx_ack_num => tcp_tx_ack_num, tcp_tx_window => tcp_tx_window, tcp_tx_flag_urg => tcp_tx_flag_urg, tcp_tx_flag_ack => tcp_tx_flag_ack, tcp_tx_flag_psh => tcp_tx_flag_psh, tcp_tx_flag_rst => tcp_tx_flag_rst, tcp_tx_flag_syn => tcp_tx_flag_syn, tcp_tx_flag_fin => tcp_tx_flag_fin, tcp_tx_urgent_ptr => tcp_tx_urgent_ptr); process(clk125MHz) begin if rising_edge(clk125MHz) then if count < 86 then input_empty <= '0'; else input_empty <= '1'; end if; if count2 = 2000 then count <= 0; count2 <= 0; else count2 <= count2+1; end if; if input_read = '1' then if count = 87 then count <= 0; else count <= count + 1; end if; case count is when 0 => input_data <= x"55"; input_data_present <= '1'; when 1 => input_data <= x"55"; when 2 => input_data <= x"55"; when 3 => input_data <= x"55"; when 4 => input_data <= x"55"; when 5 => input_data <= x"55"; when 6 => input_data <= x"55"; when 7 => input_data <= x"D5"; ----------------------------- -- Ethernet Header ----------------------------- -- Destination MAC address when 8 => input_data <= x"02"; when 9 => input_data <= x"23"; when 10 => input_data <= x"45"; when 11 => input_data <= x"67"; when 12 => input_data <= x"89"; when 13 => input_data <= x"ab"; -- Source MAC address when 14 => input_data <= x"A0"; when 15 => input_data <= x"B3"; -- when 16 => input_data <= x"CC"; when 17 => input_data <= x"4C"; when 18 => input_data <= x"F9"; when 19 => input_data <= x"EF"; -- Ether Type 08:06 << ARP! when 20 => input_data <= x"08"; when 21 => input_data <= x"00"; ------------------------ -- TCP packet ------------------------ -- IP Header when 22 => input_data <= x"45"; when 23 => input_data <= x"00"; -- when 24 => input_data <= x"00"; when 25 => input_data <= x"34"; when 26 => input_data <= x"23"; when 27 => input_data <= x"93"; when 28 => input_data <= x"40"; when 29 => input_data <= x"00"; when 30 => input_data <= x"80"; when 31 => input_data <= x"06"; -- when 32 => input_data <= x"00"; when 33 => input_data <= x"00"; when 34 => input_data <= x"0a"; when 35 => input_data <= x"00"; when 36 => input_data <= x"00"; when 37 => input_data <= x"01"; when 38 => input_data <= x"0a"; when 39 => input_data <= x"00"; -- when 40 => input_data <= x"00"; when 41 => input_data <= x"0a"; -- TCP Header when 42 => input_data <= x"c5"; when 43 => input_data <= x"81"; when 44 => input_data <= x"00"; when 45 => input_data <= x"50"; when 46 => input_data <= x"6f"; when 47 => input_data <= x"22"; -- when 48 => input_data <= x"be"; when 49 => input_data <= x"2c"; when 50 => input_data <= x"00"; when 51 => input_data <= x"00"; when 52 => input_data <= x"00"; when 53 => input_data <= x"00"; when 54 => input_data <= x"80"; when 55 => input_data <= x"02"; when 56 => input_data <= x"20"; when 57 => input_data <= x"00"; when 58 => input_data <= x"48"; when 59 => input_data <= x"1F"; when 60 => input_data <= x"00"; when 61 => input_data <= x"00"; when 62 => input_data <= x"02"; when 63 => input_data <= x"04"; when 64 => input_data <= x"05"; when 65 => input_data <= x"b4"; when 66 => input_data <= x"01"; when 67 => input_data <= x"03"; when 68 => input_data <= x"03"; when 69 => input_data <= x"08"; when 70 => input_data <= x"01"; when 71 => input_data <= x"01"; when 72 => input_data <= x"04"; when 73 => input_data <= x"02"; -- Misc padding when 74 => input_data <= x"FF"; when 75 => input_data <= x"FF"; when 76 => input_data <= x"FF"; when 77 => input_data <= x"FF"; when 78 => input_data <= x"FF"; when 79 => input_data <= x"FF"; when 80 => input_data <= x"FF"; when 81 => input_data <= x"FF"; --- FCS when 82 => input_data <= x"01"; when 83 => input_data <= x"01"; when 84 => input_data <= x"04"; when 85 => input_data <= x"02"; when 86 => input_data <= x"DD"; input_data_present <= '0'; when others => input_data <= x"DD"; input_data_present <= '0'; end case; count2 <= 0; end if; end if; end process; end Behavioral;
VHDL
4
hamsternz/FPGA_Webserver
testbenches/tb_main_design_tcp.vhd
[ "MIT" ]
# Copyright 2014 Guillaume LE VAILLANT # Distributed under the terms of the GNU General Public License v3 EAPI="5" inherit eutils autotools DESCRIPTION="A bruteforce cracker for Peercoin (and Bitcoin, Litecoin, etc...) encrypted wallet files." HOMEPAGE="https://github.com/glv2/${PN}" SRC_URI="https://github.com/glv2/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~arm ~x86" DEPEND=" dev-libs/openssl sys-libs/db " RDEPEND="${DEPEND}" src_prepare() { eautoreconf } src_configure() { econf } src_install() { dobin "${PN}" dodoc AUTHORS ChangeLog COPYING NEWS README }
Gentoo Ebuild
4
benjaga202/bitcoin-hacking-tools
private-key-harvesters/bruteforce-wallet/contrib/gentoo/app-crypt/bruteforce-wallet/bruteforce-wallet-1.2.ebuild
[ "Unlicense" ]
<script src='bug.js'></script>
HTML
0
frank-dspeed/nw.js
test/sanity/issue4018-vm-crash/bug.html
[ "MIT" ]
@protocol TrunkBranchProtocol; __attribute__((objc_root_class)) @interface Trunk - (instancetype)init; - (void)addLimb:(id<TrunkBranchProtocol>)limb; @end // NS_SWIFT_NAME(Trunk.Branch) __attribute__((swift_name("Trunk.Branch"))) @protocol TrunkBranchProtocol - (void) flower; @end
C
4
gandhi56/swift
test/ClangImporter/Inputs/nested_protocol_name.h
[ "Apache-2.0" ]
------------------------------------------------------------------------------ -- -- -- GNAT ncurses Binding Samples -- -- -- -- ncurses -- -- -- -- B O D Y -- -- -- ------------------------------------------------------------------------------ -- Copyright (c) 2000-2006,2009 Free Software Foundation, Inc. -- -- -- -- Permission is hereby granted, free of charge, to any person obtaining a -- -- copy of this software and associated documentation files (the -- -- "Software"), to deal in the Software without restriction, including -- -- without limitation the rights to use, copy, modify, merge, publish, -- -- distribute, distribute with modifications, sublicense, and/or sell -- -- copies of the Software, and to permit persons to whom the Software is -- -- furnished to do so, subject to the following conditions: -- -- -- -- The above copyright notice and this permission notice shall be included -- -- in all copies or substantial portions of the Software. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -- -- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -- -- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -- -- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -- -- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -- -- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR -- -- THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- -- -- -- Except as contained in this notice, the name(s) of the above copyright -- -- holders shall not be used in advertising or otherwise to promote the -- -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ -- Author: Eugene V. Melaragno <aldomel@ix.netcom.com> 2000 -- Version Control -- $Revision: 1.3 $ -- $Date: 2009/12/26 17:38:58 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Ada.Text_IO; use Ada.Text_IO; with Ada.Strings.Bounded; use Ada.Strings.Bounded; with Interfaces.C; use Interfaces.C; with Interfaces.C.Strings; use Interfaces.C.Strings; with Terminal_Interface.Curses; generic Max : Natural; -- type mystring is private; -- type myint is package ncurses2.genericPuts is package BS is new Ada.Strings.Bounded.Generic_Bounded_Length (Max); use BS; procedure myGet (Win : Terminal_Interface.Curses.Window := Terminal_Interface.Curses.Standard_Window; Str : out BS.Bounded_String; Len : Integer := -1); procedure myPut (Str : out BS.Bounded_String; i : Integer; Base : Number_Base := 10); -- the default should be Ada.Text_IO.Integer_IO.Default_Base -- but Default_Base is hidden in the generic so doesn't exist! procedure myAdd (Str : BS.Bounded_String); procedure Fill_String (Cp : chars_ptr; Str : out BS.Bounded_String); end ncurses2.genericPuts;
Ada
4
CandyROM/external_libncurses
Ada95/samples/ncurses2-genericputs.ads
[ "X11" ]
- page_title _('Invitation declined') .decline-page.gl-display-flex.gl-flex-direction-column.gl-mx-auto{ class: 'gl-xs-w-full!' } .gl-align-self-center.gl-mb-4.gl-mt-7.gl-sm-mt-0= sprite_icon('check-circle', size: 48, css_class: 'gl-text-green-400') %h2.gl-font-size-h2= _('You successfully declined the invitation') %p = html_escape(_('We will notify %{inviter} that you declined their invitation to join GitLab. You will stop receiving reminders.')) % { inviter: sanitize_name(@member.created_by.name) } %p = _('You can now close this window.')
Haml
4
glimmerhq/glimmerhq
app/views/invites/decline.html.haml
[ "MIT" ]
[Code] { Exec Helper for executing commands without blocking the InnoSetup GUI ---- The main procedure is NonUiBlockingExec(). Your GUI will remain responsive during the operation. Initially written for 7zip by Rik and Jens A. Koch (@jakoch) on StackOverflow: http://stackoverflow.com/questions/32256432/how-to-execute-7zip-without-blocking-the-innosetup-ui ---- Usage: 1. Include this ISS with // #include "..\some\where\non-ui-blocking-exec.iss" 2. extract your files using NonUiBlockingExec(command, params); in the [Code] section. } #IFDEF UNICODE #DEFINE AW "W" #ELSE #DEFINE AW "A" #ENDIF // --- Start "ShellExecuteEx" Helper const WAIT_TIMEOUT = $00000102; SEE_MASK_NOCLOSEPROCESS = $00000040; INFINITE = $FFFFFFFF; { Infinite timeout } type TShellExecuteInfo = record cbSize: DWORD; fMask: Cardinal; Wnd: HWND; lpVerb: string; lpFile: string; lpParameters: string; lpDirectory: string; nShow: Integer; hInstApp: THandle; lpIDList: DWORD; lpClass: string; hkeyClass: THandle; dwHotKey: DWORD; hMonitor: THandle; hProcess: THandle; end; function ShellExecuteEx(var lpExecInfo: TShellExecuteInfo): BOOL; external 'ShellExecuteEx{#AW}@shell32.dll stdcall'; function WaitForSingleObject(hHandle: THandle; dwMilliseconds: DWORD): DWORD; external 'WaitForSingleObject@kernel32.dll stdcall'; function CloseHandle(hObject: THandle): BOOL; external 'CloseHandle@kernel32.dll stdcall'; // --- End "ShellExecuteEx" Helper // --- Start "Application.ProcessMessage" Helper { InnoSetup does not provide Application.ProcessMessage(). This is "generic" code to recreate a "Application.ProcessMessages"-ish procedure, using the WinAPI function PeekMessage(), TranslateMessage() and DispatchMessage(). } type TMsg = record hwnd: HWND; message: UINT; wParam: Longint; lParam: Longint; time: DWORD; pt: TPoint; end; const PM_REMOVE = 1; function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external 'PeekMessageA@user32.dll stdcall'; function TranslateMessage(const lpMsg: TMsg): BOOL; external 'TranslateMessage@user32.dll stdcall'; function DispatchMessage(const lpMsg: TMsg): Longint; external 'DispatchMessageA@user32.dll stdcall'; procedure AppProcessMessage; var Msg: TMsg; begin while PeekMessage(Msg, WizardForm.Handle, 0, 0, PM_REMOVE) do begin TranslateMessage(Msg); DispatchMessage(Msg); end; end; // --- End "Application.ProcessMessage" Helper procedure NonUiBlockingExec(command: String; params: String); var ExecInfo: TShellExecuteInfo; // info object for ShellExecuteEx() begin // source and targetdir might contain {tmp} or {app} constant, so expand/resolve it to path names command := ExpandConstant(command); params := ExpandConstant(params); // prepare information about the application being executed by ShellExecuteEx() ExecInfo.cbSize := SizeOf(ExecInfo); ExecInfo.fMask := SEE_MASK_NOCLOSEPROCESS; ExecInfo.Wnd := 0; ExecInfo.lpFile := command; ExecInfo.lpParameters := params; ExecInfo.nShow := SW_HIDE; { The executable is executed via ShellExecuteEx() Then the installer uses a while loop with the condition WaitForSingleObject and a very minimal timeout to execute AppProcessMessage. AppProcessMessage is itself a helper function, because Innosetup does not provide Application.ProcessMessages(). Its job is to be the message pump to the InnoSetup GUI. This trick makes the window responsive/dragable again, while the extraction is done in the background. } if ShellExecuteEx(ExecInfo) then begin while WaitForSingleObject(ExecInfo.hProcess, 100) = WAIT_TIMEOUT do begin AppProcessMessage; WizardForm.Refresh(); end; CloseHandle(ExecInfo.hProcess); end; end;
Inno Setup
5
dendisuhubdy/opentrack
installer/non-ui-blocking-exec.iss
[ "ISC" ]
##! Add countries for the originator and responder of a connection ##! to the connection logs. module Conn; export { redef record Conn::Info += { ## Country code for the originator of the connection based ## on a GeoIP lookup. orig_cc: string &optional &log; ## Country code for the responser of the connection based ## on a GeoIP lookup. resp_cc: string &optional &log; }; } event connection_state_remove(c: connection) { local orig_loc = lookup_location(c$id$orig_h); if ( orig_loc?$country_code ) c$conn$orig_cc = orig_loc$country_code; local resp_loc = lookup_location(c$id$resp_h); if ( resp_loc?$country_code ) c$conn$resp_cc = resp_loc$country_code; }
Bro
4
websharks/ace-builds
demo/kitchen-sink/docs/bro.bro
[ "BSD-3-Clause" ]
--TEST-- DBA dba.default_handler tests --EXTENSIONS-- dba --SKIPIF-- <?php $handler = "flatfile"; require_once(__DIR__ .'/skipif.inc'); ?> --INI-- dba.default_handler=flatfile --FILE-- <?php $handler = "flatfile"; require_once(__DIR__ .'/test.inc'); echo "database handler: $handler\n"; echo "Test 1\n"; ini_set('dba.default_handler', 'does_not_exist'); var_dump(dba_open($db_filename, 'c')); echo "Test 2\n"; ini_set('dba.default_handler', ''); var_dump(dba_open($db_filename, 'n')); ?> --CLEAN-- <?php require(__DIR__ .'/clean.inc'); ?> --EXPECTF-- database handler: flatfile Test 1 Warning: ini_set(): No such handler: does_not_exist in %sdba012.php on line %d resource(%d) of type (dba) Test 2 Warning: dba_open(): No default handler selected in %sdba012.php on line %d bool(false)
PHP
3
NathanFreeman/php-src
ext/dba/tests/dba012.phpt
[ "PHP-3.01" ]
/** * OnDemandConfigPortal.ino * example of running the configPortal AP manually, independantly from the captiveportal * trigger pin will start a configPortal AP for 120 seconds then turn it off. * */ #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager // select which pin will trigger the configuration portal when set to LOW #define TRIGGER_PIN 0 int timeout = 120; // seconds to run for void setup() { WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP // put your setup code here, to run once: Serial.begin(115200); Serial.println("\n Starting"); pinMode(TRIGGER_PIN, INPUT_PULLUP); } void loop() { // is configuration portal requested? if ( digitalRead(TRIGGER_PIN) == LOW) { WiFiManager wm; //reset settings - for testing //wm.resetSettings(); // set configportal timeout wm.setConfigPortalTimeout(timeout); if (!wm.startConfigPortal("OnDemandAP")) { Serial.println("failed to connect and hit timeout"); delay(3000); //reset and try again, or maybe put it to deep sleep ESP.restart(); delay(5000); } //if you get here you have connected to the WiFi Serial.println("connected...yeey :)"); } // put your main code here, to run repeatedly: }
Arduino
5
ortlof/OSSM-hardware
PlatformIO ESP32 code/OSSM_ESP32/lib/WiFiManager-master/examples/OnDemand/OnDemandConfigPortal/OnDemandConfigPortal.ino
[ "MIT" ]
<!DOCTYPE html> <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Copyright (c) 2015-2018 Skymind, Inc. ~ Copyright (c) 2019 Konduit, KK ~ ~ This program and the accompanying materials are made available under the ~ terms of the Apache License, Version 2.0 which is available 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. ~ ~ SPDX-License-Identifier: Apache-2.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> <html lang="en"> <head> <meta charset="utf-8"> <title>${train\.pagetitle}</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/assets/webjars/coreui__coreui/2.1.9/dist/css/coreui.min.css"> <link rel="stylesheet" href="/assets/css/style.css"> <script src="/assets/webjars/jquery/3.4.1/dist/jquery.min.js"></script> <script src="/assets/webjars/popper.js/1.12.9/dist/umd/popper.min.js"></script> <script src="/assets/webjars/bootstrap/4.3.1/dist/js/bootstrap.min.js"></script> <script src="/assets/webjars/coreui__coreui/2.1.9/dist/js/coreui.min.js"></script> <!-- Icons --> <link rel="stylesheet" href="/assets/webjars/coreui__icons/0.3.0/css/coreui-icons.min.css"></script> <link rel="shortcut icon" href="/assets/img/favicon.ico"> </head> <body class="app sidebar-show aside-menu-show"> <header class="app-header navbar"> <a class="header-text" href="#"><span>${train\.pagetitle}</span></a> <div id="sessionSelectDiv" style="display:none; float:right;"> <div style="color:white;">${train\.session\.label}</div> <select id="sessionSelect" onchange='selectNewSession()'> <option>(Session ID)</option> </select> </div> <div id="workerSelectDiv" style="display:none; float:right"> <div style="color:white;">${train\.session\.worker\.label}</div> <select id="workerSelect" onchange='selectNewWorker()'> <option>(Worker ID)</option> </select> </div> </header> <div class="app-body"> <div class="sidebar"> <nav class="sidebar-nav"> <ul class="nav"> <li class="nav-item"><a class="nav-link" href="overview"><i class="nav-icon cui-chart"></i>${train\.nav\.overview}</a></li> <li class="nav-item"><a class="nav-link" href="model"><i class="nav-icon cui-graph"></i>${train\.nav\.model}</a></li> <li class="nav-item"><a class="nav-link" href="system"><i class="nav-icon cui-speedometer"></i>${train\.nav\.system}</a></li> <li class="nav-item nav-dropdown"> <a class="nav-link nav-dropdown-toggle" href="#"> <i class="nav-icon cui-globe"></i> ${train\.nav\.language} </a> <ul class="nav-dropdown-items"> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('en', 'overview')"><i class="icon-file-alt"></i>English</a></li> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('de', 'overview')"><i class="icon-file-alt"></i>Deutsch</a></li> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('ja', 'overview')"><i class="icon-file-alt"></i>日本語</a></li> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('zh', 'overview')"><i class="icon-file-alt"></i>中文</a></li> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('ko', 'overview')"><i class="icon-file-alt"></i>한글</a></li> <li class="nav-item"><a class="nav-link" href="javascript:void(0);" onclick="languageSelect('ru', 'overview')"><i class="icon-file-alt"></i>русский</a></li> </ul> </li> </ul> </nav> </div> <main id="content" class="main"> <div class="row"> <div class="col-8 chart-box"> <div class="chart-header"> <h2><b>${train\.overview\.chart\.scoreTitle}</b></h2> </div> <div> <div id="scoreiterchart" class="center" style="height: 300px;" ></div> <p id="hoverdata"><b>${train\.overview\.chart\.scoreTitleShort} :</b> <span id="y">0</span>, <b>${train\.overview\.charts\.iteration} :</b> <span id="x"> 0</span></p> </div> </div> <!-- End Score Chart--> <!-- Start Model Table--> <div class="col-4 chart-box"> <div class="chart-header"> <h2><b>${train\.overview\.perftable\.title}</b></h2> </div> <div> <table class="table table-bordered table-striped table-condensed"> <tr> <td>${train\.overview\.modeltable\.modeltype}</td> <td id="modelType">Loading...</td> </tr> <tr> <td>${train\.overview\.modeltable\.nLayers}</td> <td id="nLayers">Loading...</td> </tr> <tr> <td>${train\.overview\.modeltable\.nParams}</td> <td id="nParams">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.startTime}</td> <td id="startTime">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.totalRuntime}</td> <td id="totalRuntime">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.lastUpdate}</td> <td id="lastUpdate">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.totalParamUpdates}</td> <td id="totalParamUpdates">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.updatesPerSec}</td> <td id="updatesPerSec">Loading...</td> </tr> <tr> <td>${train\.overview\.perftable\.examplesPerSec}</td> <td id="examplesPerSec">Loading...</td> </tr> </table> </div> </div> <!--End Model Table --> </div> <div class="row"> <!--Start Ratio Table --> <div class="col chart-box"> <div class="chart-header"> <h2><b>${train\.overview\.chart\.updateRatioTitle}: log<sub>10</sub></b></h2> </div> <div class="box-content"> <div id="updateRatioChart" class="center" style="height: 300px;" ></div> <p id="hoverdata"><b>${train\.overview\.chart\.updateRatioTitleShort} :</b> <span id="yRatio">0</span>, <b>log<sub> 10</sub> ${train\.overview\.chart\.updateRatioTitleShort} :</b> <span id="yLogRatio">0</span> , <b>${train\.overview\.charts\.iteration}:</b> <span id="xRatio"> 0</span></p> </div> </div> <!--End Ratio Table --> <!--Start Variance Table --> <div class="col chart-box"> <div class="chart-header"> <h2><b>${train\.overview\.chart\.stdevTitle}: log<sub>10</sub></b></h2> <ul class="nav tab-menu nav-tabs" style="position:absolute; margin-top: -30px; right: 22px;"> <li class="active" id="stdevActivations"><a href="javascript:void(0);" onclick="selectStdevChart('stdevActivations')">${train\.overview\.chart\.stdevBtn\.activations}</a></li> <li id="stdevGradients"><a href="javascript:void(0);" onclick="selectStdevChart('stdevGradients')">${train\.overview\.chart\.stdevBtn\.gradients}</a></li> <li id="stdevUpdates"><a href="javascript:void(0);" onclick="selectStdevChart('stdevUpdates')">${train\.overview\.chart\.stdevBtn\.updates}</a></li> </ul> </div> <div class="box-content"> <div id="stdevChart" class="center" style="height: 300px;" ></div> <p id="hoverdata"><b>${train\.overview\.chart\.stdevTitleShort} :</b> <span id="yStdev">0</span>, <b>log<sub> 10</sub> ${train\.overview\.chart\.stdevTitleShort} :</b> <span id="yLogStdev">0</span> , <b>${train\.overview\.charts\.iteration}:</b> <span id="xStdev"> 0</span></p> </div> </div> <!-- End Variance Table --> </div> </main> </div> <script src="/assets/webjars/fullcalendar/1.6.4/fullcalendar.min.js"></script> <script src="/assets/webjars/excanvas/3/excanvas.js"></script> <script src="/assets/webjars/retinajs/0.0.2/retina.js"></script> <script src="/assets/webjars/flot/0.8.3/jquery.flot.js"></script> <script src="/assets/webjars/flot/0.8.3/jquery.flot.pie.js"></script> <script src="/assets/webjars/flot/0.8.3/jquery.flot.stack.js"></script> <script src="/assets/webjars/flot/0.8.3/jquery.flot.resize.min.js"></script> <script src="/assets/webjars/flot/0.8.3/jquery.flot.selection.js"></script> <script src="/assets/js/train/overview.js"></script> <!-- Charts and tables are generated here! --> <script src="/assets/js/train/train.js"></script> <!-- Common (lang selection, etc) --> <script src="/assets/js/counter.js"></script> <!-- Execute once on page load --> <script> $(document).ready(function () { renderOverviewPage(true); }); </script> <!-- Execute periodically (every 2 sec) --> <script> setInterval(function () { renderOverviewPage(false); }, 2000); </script> </body> </html>
FreeMarker
4
mjlorenzo305/deeplearning4j
deeplearning4j/deeplearning4j-ui-parent/deeplearning4j-vertx/src/main/resources/templates/TrainingOverview.html.ftl
[ "Apache-2.0" ]
/* Copyright 2019 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 "utils/ssd_utils.h" #include <math.h> #include <cmath> #include <glog/logging.h> #include "absl/strings/str_cat.h" namespace lstm_object_detection { namespace tflite { namespace { using protos::AnchorGenerationOptions; using protos::BoxCornerEncoding; using protos::BoxCornerOffsetCoder; using protos::CenterSizeEncoding; using protos::CenterSizeOffsetCoder; using protos::DetectionResults; void DecreasingArgSort(const std::vector<float>& values, std::vector<int>* indices) { indices->resize(values.size()); for (int i = 0; i < values.size(); ++i) (*indices)[i] = i; std::sort( indices->begin(), indices->end(), [&values](const int i, const int j) { return values[i] > values[j]; }); } void DecreasingPartialArgSort(const float* values, int num_values, int num_to_sort, int* indices) { for (int i = 0; i < num_values; ++i) { indices[i] = i; } std::partial_sort( indices, indices + num_to_sort, indices + num_values, [&values](const int i, const int j) { return values[i] > values[j]; }); } // The row index offset is 1 if background class is included and 0 otherwise. int GetLabelOffset(const int num_boxes, const int num_classes, const int score_size) { const int label_offset = score_size / num_boxes - num_classes; CHECK_EQ(score_size, (num_classes + label_offset) * num_boxes); return label_offset; } void ApplyThreshold(const std::vector<float>& values, const float threshold, std::vector<float>* keep_values, std::vector<int>* keep_indices) { for (int i = 0; i < values.size(); i++) { if (values[i] >= threshold) { keep_values->emplace_back(values[i]); keep_indices->emplace_back(i); } } } void ValidateBoxes(const BoxCornerEncoding& boxes) { const int num_boxes = boxes.ymin_size(); CHECK_EQ(num_boxes, boxes.ymax_size()); CHECK_EQ(num_boxes, boxes.xmin_size()); CHECK_EQ(num_boxes, boxes.xmax_size()); for (int i = 0; i < num_boxes; ++i) { CHECK_GE(boxes.ymax(i), boxes.ymin(i)); CHECK_GE(boxes.xmax(i), boxes.xmin(i)); } } } // namespace void DecodeBoxCornerBoxes(const BoxCornerEncoding& predictions, const CenterSizeEncoding& anchors, const BoxCornerOffsetCoder& coder, BoxCornerEncoding* decoded_boxes) { const int num_boxes = predictions.ymin_size(); CHECK_EQ(num_boxes, anchors.y_size()); CHECK_EQ(predictions.keypoint_y_size(), 0) << "BoxCornerOffsetCoder doesn't work with keypoints."; float ymin, xmin, ymax, xmax; for (int i = 0; i < num_boxes; ++i) { ymin = predictions.ymin(i) * coder.stddev() + (anchors.y(i) - anchors.h(i) / 2); xmin = predictions.xmin(i) * coder.stddev() + (anchors.x(i) - anchors.w(i) / 2); ymax = predictions.ymax(i) * coder.stddev() + (anchors.y(i) + anchors.h(i) / 2); xmax = predictions.xmax(i) * coder.stddev() + (anchors.x(i) + anchors.w(i) / 2); decoded_boxes->add_ymin(ymin); decoded_boxes->add_xmin(xmin); decoded_boxes->add_ymax(std::max(ymax, ymin)); decoded_boxes->add_xmax(std::max(xmax, xmin)); } } void DecodeCenterSizeBoxes(const CenterSizeEncoding& predictions, const CenterSizeEncoding& anchors, const CenterSizeOffsetCoder& coder, BoxCornerEncoding* decoded_boxes) { CHECK_EQ(predictions.y_size(), anchors.y_size()); const int num_boxes = predictions.y_size(); const int num_keypoints = predictions.keypoint_y_size() / num_boxes; float ycenter, xcenter, h, w, ymin, xmin, ymax, xmax; for (int i = 0; i < num_boxes; ++i) { ycenter = predictions.y(i) / coder.y_scale() * anchors.h(i) + anchors.y(i); xcenter = predictions.x(i) / coder.x_scale() * anchors.w(i) + anchors.x(i); h = std::exp(predictions.h(i) / coder.h_scale()) * anchors.h(i); w = std::exp(predictions.w(i) / coder.w_scale()) * anchors.w(i); ymin = ycenter - h / 2.; xmin = xcenter - w / 2.; ymax = ycenter + h / 2.; xmax = xcenter + w / 2.; decoded_boxes->add_ymin(ymin); decoded_boxes->add_xmin(xmin); decoded_boxes->add_ymax(ymax); decoded_boxes->add_xmax(xmax); // keypoints for (int j = 0; j < num_keypoints; ++j) { float keypoint_y = predictions.keypoint_y(num_keypoints * i + j) / coder.keypoint_y_scale() * anchors.h(i) + anchors.y(i); float keypoint_x = predictions.keypoint_x(num_keypoints * i + j) / coder.keypoint_x_scale() * anchors.w(i) + anchors.x(i); decoded_boxes->add_keypoint_y(keypoint_y); decoded_boxes->add_keypoint_x(keypoint_x); } } } float ComputeIOU(const BoxCornerEncoding& boxes, const int i, const int j) { const float area_i = (boxes.ymax(i) - boxes.ymin(i)) * (boxes.xmax(i) - boxes.xmin(i)); const float area_j = (boxes.ymax(j) - boxes.ymin(j)) * (boxes.xmax(j) - boxes.xmin(j)); if (area_i <= 0 || area_j <= 0) return 0.0; const float intersection_ymin = std::max<float>(boxes.ymin(i), boxes.ymin(j)); const float intersection_xmin = std::max<float>(boxes.xmin(i), boxes.xmin(j)); const float intersection_ymax = std::min<float>(boxes.ymax(i), boxes.ymax(j)); const float intersection_xmax = std::min<float>(boxes.xmax(i), boxes.xmax(j)); const float intersection_area = std::max<float>(intersection_ymax - intersection_ymin, 0.0) * std::max<float>(intersection_xmax - intersection_xmin, 0.0); return intersection_area / (area_i + area_j - intersection_area); } void NonMaxSuppressionMultiClass(const BoxCornerEncoding& boxes, const std::vector<float>& scores, const int num_classes, const int max_detection_per_class, const float score_threshold, const float iou_threshold, DetectionResults* detections) { const int num_boxes = boxes.ymin_size(); const int num_keypoints = boxes.keypoint_y_size() / num_boxes; // The row index offset is 1 if the background class is included. const int label_offset = GetLabelOffset(num_boxes, num_classes, scores.size()); detections->Clear(); std::vector<int> selected; std::vector<float> class_scores; class_scores.resize(num_boxes); // For each class, perform non-max suppression. for (int col = 0; col < num_classes; col++) { for (int row = 0; row < num_boxes; row++) { class_scores[row] = scores[row * (num_classes + label_offset) + col + label_offset]; } NonMaxSuppression(boxes, class_scores, max_detection_per_class, score_threshold, iou_threshold, &selected); for (const auto& selected_index : selected) { auto* new_detection = detections->add_detection(); auto* new_detection_box = new_detection->mutable_box(); new_detection_box->add_ymin(boxes.ymin(selected_index)); new_detection_box->add_xmin(boxes.xmin(selected_index)); new_detection_box->add_ymax(boxes.ymax(selected_index)); new_detection_box->add_xmax(boxes.xmax(selected_index)); new_detection->add_score(class_scores[selected_index]); new_detection->add_class_index(col); for (int i = 0; i < num_keypoints; ++i) { new_detection_box->add_keypoint_y(boxes.keypoint_y( selected_index * num_keypoints + i)); new_detection_box->add_keypoint_x(boxes.keypoint_x( selected_index * num_keypoints + i)); } } } } void NonMaxSuppressionMultiClassFast( const BoxCornerEncoding& boxes, const std::vector<float>& scores, const int num_classes, const int max_detection, const int max_category, const float score_threshold, const float iou_threshold, DetectionResults* detections) { const int num_boxes = boxes.ymin_size(); const int num_keypoints = boxes.keypoint_y_size() / num_boxes; const int label_offset = GetLabelOffset(num_boxes, num_classes, scores.size()); int num_category = std::min(max_category, num_classes); detections->Clear(); std::vector<float> max_scores; max_scores.resize(num_boxes); std::vector<int> sorted_class_indices; sorted_class_indices.resize(num_boxes * num_classes); for (int row = 0; row < num_boxes; row++) { const float* box_scores = scores.data() + row * (num_classes + label_offset) + label_offset; int* class_indices = sorted_class_indices.data() + row * num_classes; DecreasingPartialArgSort(box_scores, num_classes, num_category, class_indices); max_scores[row] = box_scores[class_indices[0]]; } // Perform non-max suppression on max scores std::vector<int> selected; NonMaxSuppression(boxes, max_scores, max_detection, score_threshold, iou_threshold, &selected); for (const auto& selected_index : selected) { auto* new_detection = detections->add_detection(); auto* new_detection_box = new_detection->mutable_box(); new_detection_box->add_ymin(boxes.ymin(selected_index)); new_detection_box->add_xmin(boxes.xmin(selected_index)); new_detection_box->add_ymax(boxes.ymax(selected_index)); new_detection_box->add_xmax(boxes.xmax(selected_index)); const float* box_scores = scores.data() + selected_index * (num_classes + label_offset) + label_offset; const int* class_indices = sorted_class_indices.data() + selected_index * num_classes; for (int i = 0; i < num_category; ++i) { new_detection->add_score(box_scores[class_indices[i]]); new_detection->add_class_index(class_indices[i]); } for (int i = 0; i < num_keypoints; ++i) { new_detection_box->add_keypoint_y(boxes.keypoint_y( selected_index * num_keypoints + i)); new_detection_box->add_keypoint_x(boxes.keypoint_x( selected_index * num_keypoints + i)); } } } void NonMaxSuppressionMultiClassRestrict( std::vector<int> restricted_class_indices, const BoxCornerEncoding& boxes, const std::vector<float>& scores, const int num_classes, const int max_detection, const int max_category, const float score_threshold, const float iou_threshold, DetectionResults* detections) { int num_boxes = boxes.ymin_size(); const int label_offset = GetLabelOffset(num_boxes, num_classes, scores.size()); // Slice the score matrix along columns to extract the scores of the // restricted classes. int restricted_num_classes = restricted_class_indices.size(); std::vector<float> restricted_scores; restricted_scores.reserve(num_boxes * restricted_num_classes); for (int i = 0; i < num_boxes; ++i) { for (int index : restricted_class_indices) { CHECK(index >= 0 && index < num_classes + label_offset); restricted_scores.push_back( scores[i * (num_classes + label_offset) + index + label_offset]); } } // Apply non-maxima suppression to the sliced score matrix. NonMaxSuppressionMultiClassFast( boxes, restricted_scores, restricted_num_classes, max_detection, max_category, score_threshold, iou_threshold, detections); // Resulting indices are based on score matrix column index: remap to the // original class indices. for (auto& detection : *detections->mutable_detection()) { for (int i = 0; i < detection.class_index_size(); ++i) { detection.set_class_index( i, restricted_class_indices[detection.class_index(i)]); } } } void NonMaxSuppression(const BoxCornerEncoding& boxes, const std::vector<float>& scores, const int max_detection, const float score_threshold, const float iou_threshold, std::vector<int>* selected) { CHECK_EQ(boxes.ymin_size(), scores.size()) << "The number of bounding boxes and scores does not match."; CHECK_GT(max_detection, 0) << "Maximum detections should be positive."; CHECK_GT(iou_threshold, 0.0) << "iou_threshold should be positive."; CHECK_LT(iou_threshold, 1.0) << "iou_threshold should be less than 1."; ValidateBoxes(boxes); // threshold scores std::vector<int> keep_indices; std::vector<float> keep_scores; ApplyThreshold(scores, score_threshold, &keep_scores, &keep_indices); std::vector<int> sorted_indices; DecreasingArgSort(keep_scores, &sorted_indices); const int num_boxes = keep_scores.size(); const int output_size = std::min(num_boxes, max_detection); std::vector<bool> active(num_boxes, true); selected->clear(); int num_active = active.size(); for (int i = 0; i < num_boxes; ++i) { if (num_active == 0 || selected->size() >= output_size) break; if (active[i]) { selected->push_back(keep_indices[sorted_indices[i]]); active[i] = false; num_active--; } else { continue; } for (int j = i + 1; j < num_boxes; ++j) { if (active[j]) { float iou = ComputeIOU(boxes, keep_indices[sorted_indices[i]], keep_indices[sorted_indices[j]]); if (iou > iou_threshold) { active[j] = false; num_active--; } } } } } void NormalizeDetectionBoxes(const int width, const int height, DetectionResults* boxes) { for (auto& det : *boxes->mutable_detection()) { auto *box = det.mutable_box(); box->set_ymin(0, box->ymin(0) / height); box->set_ymax(0, box->ymax(0) / height); box->set_xmin(0, box->xmin(0) / width); box->set_xmax(0, box->xmax(0) / width); const int num_keypoints = box->keypoint_y_size(); for (int i = 0; i < num_keypoints; ++i) { box->set_keypoint_y(i, box->keypoint_y(i) / height); box->set_keypoint_x(i, box->keypoint_x(i) / width); } } } void DenormalizeDetectionBoxes(const int width, const int height, DetectionResults* boxes) { for (auto& det : *boxes->mutable_detection()) { auto* box = det.mutable_box(); box->set_ymin(0, box->ymin(0) * (height - 1)); box->set_ymax(0, box->ymax(0) * (height - 1)); box->set_xmin(0, box->xmin(0) * (width - 1)); box->set_xmax(0, box->xmax(0) * (width - 1)); const int num_keypoints = box->keypoint_y_size(); for (int i = 0; i < num_keypoints; ++i) { box->set_keypoint_y(i, box->keypoint_y(i) * (height - 1)); box->set_keypoint_x(i, box->keypoint_x(i) * (width - 1)); } } } void ClampBoxCoordinates(DetectionResults* boxes) { for (auto& detection : *boxes->mutable_detection()) { auto* box = detection.mutable_box(); box->set_ymin(0, std::max(0.f, box->ymin(0))); box->set_ymax(0, std::min(1.f, box->ymax(0))); box->set_xmin(0, std::max(0.f, box->xmin(0))); box->set_xmax(0, std::min(1.f, box->xmax(0))); } } bool GenerateSsdAnchors(const AnchorGenerationOptions& options, CenterSizeEncoding* anchors) { const int base_anchor_width = options.base_anchor_width(); const int base_anchor_height = options.base_anchor_height(); const float min_anchor_scale = options.min_anchor_scale(); const float max_anchor_scale = options.max_anchor_scale(); const float* aspect_ratios_ptr = options.anchor_aspect_ratios().data(); const int num_aspect_ratios = options.anchor_aspect_ratios_size(); const std::vector<float> anchor_aspect_ratios( aspect_ratios_ptr, aspect_ratios_ptr + num_aspect_ratios); const int* strides_ptr = options.anchor_strides().data(); const int num_strides = options.anchor_strides_size(); const std::vector<int> anchor_strides(strides_ptr, strides_ptr + num_strides); // Must set both image width and height or neither CHECK_EQ(options.has_image_width(), options.has_image_height()); if (options.has_image_width() && options.has_image_height()) { const int* offsets_ptr = options.anchor_offsets().data(); const int num_offsets = options.anchor_offsets_size(); const std::vector<int> anchor_offsets(offsets_ptr, offsets_ptr + num_offsets); return GenerateSsdAnchors( options.image_width(), options.image_height(), base_anchor_width, base_anchor_height, min_anchor_scale, max_anchor_scale, anchor_aspect_ratios, anchor_strides, anchor_offsets, anchors); } return GenerateSsdAnchors(base_anchor_width, base_anchor_height, min_anchor_scale, max_anchor_scale, anchor_aspect_ratios, anchor_strides, anchors); } bool GenerateSsdAnchors(int input_width, int input_height, float min_scale, float max_scale, const std::vector<float>& aspect_ratios, const std::vector<int>& anchor_strides, CenterSizeEncoding* anchors) { int num_layers = anchor_strides.size(); std::vector<int> anchor_offsets(num_layers); for (int i = 0; i < num_layers; ++i) { anchor_offsets[i] = (anchor_strides[i] + 1) / 2; } return GenerateSsdAnchors(input_width, input_height, input_width, input_height, min_scale, max_scale, aspect_ratios, anchor_strides, anchor_offsets, anchors); } bool GenerateSsdAnchors(int input_width, int input_height, int base_anchor_width, int base_anchor_height, float min_scale, float max_scale, const std::vector<float>& aspect_ratios, const std::vector<int>& anchor_strides, const std::vector<int>& anchor_offsets, CenterSizeEncoding* anchors) { constexpr float kSqrt2 = 1.414213562f; int num_layers = anchor_strides.size(); if (num_layers != anchor_offsets.size()) { LOG(ERROR) << absl::StrCat("The size of anchor strides (", anchor_strides.size(), ") and anchor " "offsets (", anchor_offsets.size(), ") must be the same."); return false; } std::vector<float> scales(num_layers); // Populate scales. for (int i = 0; i < num_layers; ++i) { scales[i] = min_scale + (max_scale - min_scale) * i / (num_layers - 1); } // Populate square roots of aspect ratios. int num_aspect_ratios = aspect_ratios.size(); std::vector<float> sqrt_aspect_ratios(num_aspect_ratios); for (int i = 0; i < num_aspect_ratios; ++i) { sqrt_aspect_ratios[i] = std::sqrt(aspect_ratios[i]); } // Generate anchors. float normalized_width = static_cast<float>(base_anchor_width) / input_width; float normalized_height = static_cast<float>(base_anchor_height) / input_height; anchors->Clear(); for (int i = 0; i < num_layers; ++i) { float scale = scales[i]; float next_scale; if (i == num_layers - 1) { next_scale = 1.0; } else { next_scale = scales[i + 1]; } float interpolated_scale = std::sqrt(scale * next_scale); float normalized_scale_width = scale * normalized_width; float normalized_scale_height = scale * normalized_height; int anchor_map_height = (input_height + anchor_strides[i] - 1) / anchor_strides[i]; int anchor_map_width = (input_width + anchor_strides[i] - 1) / anchor_strides[i]; for (int anchor_idx_y = 0; anchor_idx_y < anchor_map_height; ++anchor_idx_y) { float y = static_cast<float>( anchor_offsets[i] + anchor_strides[i] * anchor_idx_y) / input_height; for (int anchor_idx_x = 0; anchor_idx_x < anchor_map_width; ++anchor_idx_x) { float x = static_cast<float>( anchor_offsets[i] + anchor_strides[i] * anchor_idx_x) / input_width; if (i == 0) { // Scale: 0.1, Aspect Ratio: 1.0 anchors->add_x(x); anchors->add_y(y); anchors->add_w(0.1 * normalized_width); anchors->add_h(0.1 * normalized_height); // Scale: scale, Aspect Ratio: 2.0 anchors->add_x(x); anchors->add_y(y); anchors->add_w(normalized_scale_width * kSqrt2); anchors->add_h(normalized_scale_height / kSqrt2); // Scale: scale, Aspect Ratio: 0.5 anchors->add_x(x); anchors->add_y(y); anchors->add_w(normalized_scale_width / kSqrt2); anchors->add_h(normalized_scale_height * kSqrt2); continue; } for (int j = 0; j < num_aspect_ratios; ++j) { // Scale: scale, Aspect Ratio: aspect_ratio anchors->add_x(x); anchors->add_y(y); anchors->add_w(normalized_scale_width * sqrt_aspect_ratios[j]); anchors->add_h(normalized_scale_height / sqrt_aspect_ratios[j]); } // Interpolated anchors anchors->add_x(x); anchors->add_y(y); anchors->add_w(interpolated_scale * normalized_width); anchors->add_h(interpolated_scale * normalized_height); } } } return true; } } // namespace tflite } // namespace lstm_object_detection
C++
5
873040/Abhishek
research/lstm_object_detection/tflite/utils/ssd_utils.cc
[ "Apache-2.0" ]
{ "Body" : { "Data" : { "Inverters" : { "1" : { "Battery_Mode" : "suspended", "DT" : 1, "E_Day" : null, "E_Total" : 7512664.4041666668, "E_Year" : null, "P" : 186.54914855957031, "SOC" : 4.5999999999999996 } }, "Site" : { "BackupMode" : true, "BatteryStandby" : false, "E_Day" : null, "E_Total" : 7512664.4041666668, "E_Year" : null, "Meter_Location" : "grid", "Mode" : "bidirectional", "P_Akku" : 0.15907810628414154, "P_Grid" : 2274.9000000000001, "P_Load" : -2459.3092254638673, "P_PV" : 216.43276786804199, "rel_Autonomy" : 7.4984155532163506, "rel_SelfConsumption" : 100.0 }, "Smartloads" : { "Ohmpilots" : { "0" : { "P_AC_Total" : 0.0, "State" : "normal", "Temperature" : 38.799999999999997 } } }, "Version" : "12" } }, "Head" : { "RequestArguments" : {}, "Status" : { "Code" : 0, "Reason" : "", "UserMessage" : "" }, "Timestamp" : "2021-11-28T13:12:20+00:00" } }
JSON
3
MrDelik/core
tests/components/fronius/fixtures/gen24_storage/GetPowerFlowRealtimeData.json
[ "Apache-2.0" ]
# Copyright 2005-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/qt3.eclass,v 1.41 2009/05/17 15:17:03 hwoarang Exp $ # @ECLASS: qt3.eclass # @MAINTAINER: # kde-sunset overlay maintainers # @BLURB: Eclass for Qt3 packages # @DESCRIPTION: # This eclass contains various functions that may be useful # when dealing with packages using Qt3 libraries. inherit toolchain-funcs versionator eutils QTPKG="x11-libs/qt-" QT3MAJORVERSIONS="3.3 3.2 3.1 3.0" QT3VERSIONS="3.3.8b-r1 3.3.8b 3.3.8-r4 3.3.8-r3 3.3.8-r2 3.3.8-r1 3.3.8 3.3.6-r5 3.3.6-r4 3.3.6-r3 3.3.6-r2 3.3.6-r1 3.3.6 3.3.5-r1 3.3.5 3.3.4-r9 3.3.4-r8 3.3.4-r7 3.3.4-r6 3.3.4-r5 3.3.4-r4 3.3.4-r3 3.3.4-r2 3.3.4-r1 3.3.4 3.3.3-r3 3.3.3-r2 3.3.3-r1 3.3.3 3.3.2 3.3.1-r2 3.3.1-r1 3.3.1 3.3.0-r1 3.3.0 3.2.3-r1 3.2.3 3.2.2-r1 3.2.2 3.2.1-r2 3.2.1-r1 3.2.1 3.2.0 3.1.2-r4 3.1.2-r3 3.1.2-r2 3.1.2-r1 3.1.2 3.1.1-r2 3.1.1-r1 3.1.1 3.1.0-r3 3.1.0-r2 3.1.0-r1 3.1.0" if [[ -z "${QTDIR}" ]]; then export QTDIR="/usr/qt/3" fi addwrite "${QTDIR}/etc/settings" addpredict "${QTDIR}/etc/settings" # @FUNCTION: qt_min_version # @USAGE: [minimum version] # @DESCRIPTION: # This function is deprecated. Use slot dependencies instead. qt_min_version() { local list=$(qt_min_version_list "$@") ewarn "${CATEGORY}/${PF}: qt_min_version() is deprecated. Use slot dependencies instead." if [[ ${list%% *} == "${list}" ]]; then echo "${list}" else echo "|| ( ${list} )" fi } qt_min_version_list() { local MINVER="$1" local VERSIONS="" case "${MINVER}" in 3|3.0|3.0.0) VERSIONS="=${QTPKG}3*";; 3.1|3.1.0|3.2|3.2.0|3.3|3.3.0) for x in ${QT3MAJORVERSIONS}; do if $(version_is_at_least "${MINVER}" "${x}"); then VERSIONS="${VERSIONS} =${QTPKG}${x}*" fi done ;; 3*) for x in ${QT3VERSIONS}; do if $(version_is_at_least "${MINVER}" "${x}"); then VERSIONS="${VERSIONS} =${QTPKG}${x}" fi done ;; *) VERSIONS="=${QTPKG}3*";; esac echo ${VERSIONS} } # @FUNCTION: eqmake3 # @USAGE: [.pro file] [additional parameters to qmake] # @MAINTAINER: # Przemyslaw Maciag <troll@gentoo.org> # Davide Pesavento <davidepesa@gmail.com> # @DESCRIPTION: # Runs qmake on the specified .pro file (defaults to # ${PN}.pro if eqmake3 was called with no argument). # Additional parameters are passed unmodified to qmake. eqmake3() { local LOGFILE="${T}/qmake-$$.out" local projprofile="${1}" [[ -z ${projprofile} ]] && projprofile="${PN}.pro" shift 1 ebegin "Processing qmake ${projprofile}" # file exists? if [[ ! -f ${projprofile} ]]; then echo eerror "Project .pro file \"${projprofile}\" does not exist" eerror "qmake cannot handle non-existing .pro files" echo eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org" echo die "Project file not found in ${PN} sources" fi echo >> ${LOGFILE} echo "****** qmake ${projprofile} ******" >> ${LOGFILE} echo >> ${LOGFILE} # some standard config options local configoptplus="CONFIG += no_fixpath" local configoptminus="CONFIG -=" if has debug ${IUSE} && use debug; then configoptplus="${configoptplus} debug" configoptminus="${configoptminus} release" else configoptplus="${configoptplus} release" configoptminus="${configoptminus} debug" fi ${QTDIR}/bin/qmake ${projprofile} \ QTDIR=${QTDIR} \ QMAKE=${QTDIR}/bin/qmake \ QMAKE_CC=$(tc-getCC) \ QMAKE_CXX=$(tc-getCXX) \ QMAKE_LINK=$(tc-getCXX) \ QMAKE_CFLAGS_RELEASE="${CFLAGS}" \ QMAKE_CFLAGS_DEBUG="${CFLAGS}" \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS}" \ QMAKE_LFLAGS_RELEASE="${LDFLAGS}" \ QMAKE_LFLAGS_DEBUG="${LDFLAGS}" \ "${configoptminus}" \ "${configoptplus}" \ QMAKE_RPATH= \ QMAKE_STRIP= \ ${@} >> ${LOGFILE} 2>&1 local result=$? eend ${result} # was qmake successful? if [[ ${result} -ne 0 ]]; then echo eerror "Running qmake on \"${projprofile}\" has failed" echo eerror "This shouldn't happen - please send a bug report to bugs.gentoo.org" echo die "qmake failed on ${projprofile}" fi return ${result} }
Gentoo Eclass
4
ivecera/gentoo-overlay
eclass/qt3.eclass
[ "Apache-2.0" ]
{# # Copyright (c) 2018 Deciso B.V. # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. 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. # # THIS SOFTWARE IS PROVIDED “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 # AUTHOR 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. #} <script> 'use strict'; const descriptionMapThread = { 'recursion': { 'time': { 'avg': "{{ lang._('Recursion time (average)') }}", 'median': "{{ lang._('Recursion time (median)') }}" } }, 'tcpusage': "{{ lang._('TCP usage') }}", 'num': { 'queries_ip_ratelimited': "{{ lang._('IP ratelimited queries') }}", 'recursivereplies': "{{ lang._('Recursive replies') }}", 'cachemiss': "{{ lang._('Cache misses') }}", 'cachehits': "{{ lang._('Cache hits') }}", 'zero_ttl': "{{ lang._('Zero TTL') }}", 'prefetch': "{{ lang._('Prefetch') }}", 'queries': "{{ lang._('Queries') }}", } }; const descriptionMapTime = { 'now': "{{ lang._('Now') }}", 'up': "{{ lang._('Uptime') }}", 'elapsed': "{{ lang._('Elapsed') }}" }; function writeDescs(parent, data, descriptions) { $.each(descriptions, function(descKey, descValue) { if (typeof descValue !== 'object') { let tr = document.createElement("tr"); let th = document.createElement("th"); th.innerHTML = descValue + ':'; let td = document.createElement("td"); td.innerHTML = data[descKey]; tr.append(th); tr.append(td); parent.append(tr); } else { writeDescs(parent, data[descKey], descriptions[descKey]); } }); } /** * fetch Unbound stats */ function updateStats() { ajaxGet("/api/unbound/diagnostics/stats", {}, function (data, status) { if (status === "success") { // Clear old view let statsView = $("#statsView"); statsView.html(''); // Sort the keys in order to ensure that Thread 0 will come before Thread 1. let dataKeys = Object.keys(data['data']); dataKeys.sort(); dataKeys.forEach(function(key) { let value = data['data'][key]; if (key === 'total' || key.substr(0, 6) === 'thread') { let description; if (key === 'total') { description = 'Total'; } else { description = 'Thread ' + key.substr(6); } let title = document.createElement("h2"); title.innerHTML = description; statsView.append(title); let table = document.createElement('table'); table.classList.add('table'); table.classList.add('table-striped'); table.style.width = 'auto'; let tbody = document.createElement('tbody'); writeDescs(tbody, value, descriptionMapThread); table.append(tbody); statsView.append(table); } else if (key === "time") { let title = document.createElement("h2"); title.innerHTML = "Times"; statsView.append(title); let table = document.createElement('table'); table.classList.add('table'); table.classList.add('table-striped'); table.style.width = 'auto'; let tbody = document.createElement('tbody'); writeDescs(tbody, value, descriptionMapTime); table.append(tbody); statsView.append(table); } }); } } ); } $(document).ready(function() { // Autorefresh every 10 seconds. setInterval(function() { if ($("#auto_refresh").is(':checked')) { updateStats(); } }, 10000); // initial fetch updateStats(); updateServiceControlUI('unbound'); }); </script> <div class="content-box"> <div class="content-box-main"> <div class="table-responsive"> <div class="col-sm-12" id="statsView"> </div> <div class="col-sm-12"> <div class="row"> <div class="col-xs-12"> <div class="pull-right"> <label> <input id="auto_refresh" type="checkbox" checked="checked"> <span class="fa fa-refresh"></span> {{ lang._('Auto refresh') }} </label> </div> </div> </div> <hr/> </div> </div> </div> </div>
Volt
4
Kipjr/core
src/opnsense/mvc/app/views/OPNsense/Unbound/stats.volt
[ "BSD-2-Clause" ]
#define TORCH_ASSERT_NO_OPERATORS #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Reduce.cuh> #include <ATen/native/cuda/ReduceOps.h> #include <ATen/native/DispatchStub.h> #include <ATen/native/SharedReduceOps.h> #include <ATen/Dispatch.h> #include <ATen/cuda/NumericLimits.cuh> #include <ATen/native/ReduceOps.h> #include <ATen/native/ReduceAllOps.h> #include <ATen/native/TensorCompare.h> #include <ATen/NumericUtils.h> #include <ATen/Dispatch.h> #include <ATen/NumericUtils.h> #include <ATen/cuda/NumericLimits.cuh> namespace at { namespace native { template <typename acc_t> struct MaxNanFunctor { __device__ __forceinline__ acc_t operator()(acc_t a, acc_t b) const { return (at::_isnan(a) || a > b) ? a : b; } }; template <typename scalar_t, typename acc_t=scalar_t> void max_values_kernel_cuda_impl(TensorIterator& iter) { gpu_reduce_kernel<scalar_t, scalar_t>( iter, func_wrapper<acc_t> (MaxNanFunctor<acc_t>()), at::numeric_limits<acc_t>::lower_bound()); } template <typename acc_t> struct MinNanFunctor { __device__ __forceinline__ acc_t operator()(acc_t a, acc_t b) const { return (at::_isnan(a) || a < b) ? a : b; } }; template <typename scalar_t, typename acc_t=scalar_t> void min_values_kernel_cuda_impl(TensorIterator& iter) { gpu_reduce_kernel<scalar_t, scalar_t>( iter, func_wrapper<acc_t> (MinNanFunctor<acc_t>()), at::numeric_limits<acc_t>::upper_bound()); } void max_values_kernel_cuda(TensorIterator& iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.dtype(), "max_values_cuda", [&]() { max_values_kernel_cuda_impl<scalar_t>(iter); }); } void min_values_kernel_cuda(TensorIterator& iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.dtype(), "min_values_cuda", [&]() { min_values_kernel_cuda_impl<scalar_t>(iter); }); } template <typename scalar_t, typename acc_t=scalar_t> void argmax_kernel_cuda_impl(TensorIterator& iter) { gpu_reduce_kernel<scalar_t, int64_t>( iter, ArgMaxOps<acc_t>{}, thrust::pair<acc_t, int64_t>(at::numeric_limits<acc_t>::lower_bound(), 0)); }; template <typename scalar_t, typename acc_t=scalar_t> void argmin_kernel_cuda_impl(TensorIterator& iter) { gpu_reduce_kernel<scalar_t, int64_t>( iter, ArgMinOps<acc_t>{}, thrust::pair<acc_t, int64_t>(at::numeric_limits<acc_t>::upper_bound(), 0)); }; void argmax_kernel_cuda(TensorIterator& iter) { // For float16 & bfloat16, instead of implementing is_nan and warp_shfl_down, // we can convert float16 & bfloat16 to float and do all the operations in float. if (iter.dtype(1) == kHalf) { argmax_kernel_cuda_impl<at::Half, float>(iter); } else if (iter.dtype(1) == kBFloat16) { argmax_kernel_cuda_impl<at::BFloat16, float>(iter); } else { AT_DISPATCH_ALL_TYPES(iter.dtype(1), "argmax_cuda", [&]() { argmax_kernel_cuda_impl<scalar_t>(iter); }); } } void argmin_kernel_cuda(TensorIterator& iter) { // For float16 & bfloat16, instead of implementing is_nan and warp_shfl_down, // we can convert float16 & bfloat16 to float and do all the operations in float. if (iter.dtype(1) == kHalf) { argmin_kernel_cuda_impl<at::Half, float>(iter); } else if (iter.dtype(1) == kBFloat16) { argmin_kernel_cuda_impl<at::BFloat16, float>(iter); } else { AT_DISPATCH_ALL_TYPES(iter.dtype(1), "argmin_cuda", [&]() { argmin_kernel_cuda_impl<scalar_t>(iter); }); } } void min_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "min_cuda", [&]() { gpu_reduce_kernel<scalar_t, scalar_t>( iter, MinOps<scalar_t>{}, thrust::pair<scalar_t, int64_t>(at::numeric_limits<scalar_t>::upper_bound(), 0)); }); } void max_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "max_cuda", [&]() { gpu_reduce_kernel<scalar_t, scalar_t>( iter, MaxOps<scalar_t>{}, thrust::pair<scalar_t, int64_t>(at::numeric_limits<scalar_t>::lower_bound(), 0)); }); } void aminmax_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "aminmax_cuda", [&]() { gpu_reduce_kernel<scalar_t, scalar_t>( iter, MinMaxOps<scalar_t, scalar_t, int32_t>{}, thrust::pair<scalar_t, scalar_t>( at::numeric_limits<scalar_t>::upper_bound(), at::numeric_limits<scalar_t>::lower_bound() ) ); }); } void min_all_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "min_all_cuda", [&] { min_values_kernel_cuda_impl<scalar_t>(iter); }); } void max_all_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "max_all_cuda", [&] { max_values_kernel_cuda_impl<scalar_t>(iter); }); } template <typename scalar_t> void _min_max_values_kernel_cuda_impl(TensorIterator& iter) { gpu_reduce_kernel<scalar_t, scalar_t>( iter, MinMaxOps<scalar_t, scalar_t, int32_t>{}, thrust::pair<scalar_t, scalar_t>( at::numeric_limits<scalar_t>::upper_bound(), at::numeric_limits<scalar_t>::lower_bound() )); } void aminmax_allreduce_launch_kernel(TensorIterator &iter) { AT_DISPATCH_ALL_TYPES_AND3(kBFloat16, kHalf, kBool, iter.input_dtype(), "aminmax_all_cuda", [&] { _min_max_values_kernel_cuda_impl<scalar_t>(iter); }); } REGISTER_DISPATCH(max_values_stub, &max_values_kernel_cuda); REGISTER_DISPATCH(min_values_stub, &min_values_kernel_cuda); REGISTER_DISPATCH(argmax_stub, &argmax_kernel_cuda); REGISTER_DISPATCH(argmin_stub, &argmin_kernel_cuda); }} // namespace at::native
Cuda
4
xiaohanhuang/pytorch
aten/src/ATen/native/cuda/ReduceMinMaxKernel.cu
[ "Intel" ]
<% listed_taxa ||= @listed_taxa ||= @list.listed_taxa %> <ul class="listed_taxa"> <% for listed_taxon in listed_taxa %> <li class="clear"> <%= render :partial => 'lists/listed_taxon', :locals => {:listed_taxon => listed_taxon} %> </li> <% end %> </ul>
RHTML
3
alexshepard/inaturalist
app/views/lists/_listed_taxa.rhtml
[ "MIT" ]
//--------------------------------------------------------- // Buffered NeoPixel driver // by teachop // #include <xs1.h> #include <stdint.h> #include "neopixel.h" // --------------------------------------------------------- // neopixel_task - output driver for one neopixel strip // [[combinable]] void neopixel_task(port neo, static const uint32_t buf_size, uint32_t order, interface neopixel_if server dvr) { const uint32_t length = buf_size/3; uint8_t colors[buf_size]; const uint32_t delay_first = NEO_P1; const uint32_t delay_second = NEO_P2; const uint32_t delay_third = NEO_P3; uint8_t brightness=0; for ( uint32_t loop=0; loop<(buf_size); ++loop ) { colors[loop] = 0; } while( 1 ) { select { case dvr.Color(uint8_t r, uint8_t g, uint8_t b) -> uint32_t return_val: return_val = ((uint32_t)r << 16) | ((uint32_t)g << 8) | b; break; case dvr.numPixels() -> uint32_t return_val: return_val = length; break; case dvr.setBrightness(uint8_t bright): brightness = bright+1; break; case dvr.getEstimate(uint32_t scale) -> uint32_t return_val: for ( uint32_t index =return_val =0; index<buf_size; ++index ) { // add all the pwm values assuming linear relationship return_val += colors[index]; } if ( brightness ) { // scale down by brightness setting if used return_val = (brightness*return_val)>>8; } // scale to mA, assuming 17 max per uint32_t div = (0==scale)? 52 : scale; return_val = (4*return_val)/div; break; case dvr.getPixelColor(uint32_t pixel) -> uint32_t return_val: if ( length > pixel ) { uint32_t index = 3*pixel; return_val = (uint32_t)colors[index++] << (order?16:8);//r:g return_val |= (uint32_t)colors[index++] << (order?8:16);//g:r return_val |= colors[index]; } else { return_val = 0; } break; case dvr.setPixelColor(uint32_t pixel, uint32_t color): if ( length > pixel ) { uint32_t index = 3*pixel; colors[index++] = color>>(order?16:8);//r:g colors[index++] = color>>(order?8:16);//g:r colors[index] = color;//b } break; case dvr.setPixelColorRGB(uint32_t pixel, uint8_t r, uint8_t g, uint8_t b): if ( length > pixel ) { uint32_t index = 3*pixel; colors[index++] = (order?r:g); colors[index++] = (order?g:r); colors[index] = b; } break; case dvr.show(): // beginning of strip, sync counter uint32_t delay_count, bit; neo <: 0 @ delay_count; #pragma unsafe arrays for (uint32_t index=0; index<buf_size; ++index) { uint32_t color_shift = colors[index]; uint32_t bit_count = 8; while (bit_count--) { // output low->high transition delay_count += delay_third; neo @ delay_count <: 1; // output high->data transition if ( brightness && (7==bit_count) ) { color_shift = (brightness*color_shift)>>8; } bit = (color_shift & 0x80)? 1 : 0; color_shift <<=1; delay_count += delay_first; neo @ delay_count <: bit; // output data->low transition delay_count += delay_second; neo @ delay_count <: 0; } } break; } } }
XC
5
smola/language-dataset
data/github.com/teachop/xcore_neopixel_buffered/37bbce485d28b4eadbd57adbbbf6e8c0aa8d8d68/module_neopixel/src/neopixel.xc
[ "MIT" ]
// stdlib.hb import stddef; // for size_t extern void exit(int status); extern void* calloc(size_t nmemb, size_t size); extern void* malloc(size_t size); extern void free(void* ptr); extern void* realloc(void* ptr, size_t size); extern int system(char* command);
Harbour
3
ueki5/cbc
import/stdlib.hb
[ "Unlicense" ]
import { imageDemoTest } from '../../../tests/shared/imageTest'; describe('Comment image', () => { imageDemoTest('comment'); });
TypeScript
3
chnliquan/ant-design
components/comment/__tests__/image.test.ts
[ "MIT" ]
vcl 4.0; // this is just here so that the configuration is valid
VCL
0
ausi/FOSHttpCacheBundle
tests/Functional/Fixtures/app/Resources/varnish/fos.vcl
[ "MIT" ]
/* * SRT - Secure, Reliable, Transport * Copyright (c) 2019 Haivision Systems Inc. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * */ /***************************************************************************** written by Haivision Systems Inc. 2019-06-27 (jdube) GnuTLS/Nettle CRYSPR/4SRT (CRYypto Service PRovider for SRT) *****************************************************************************/ #include "hcrypt.h" #include <string.h> #include <mbedtls/aes.h> #include <mbedtls/md.h> #include <mbedtls/pkcs5.h> #include <mbedtls/entropy.h> // Static members of cryspr::mbedtls class. static mbedtls_ctr_drbg_context crysprMbedtls_ctr_drbg; static mbedtls_entropy_context crysprMbedtls_entropy; static mbedtls_md_context_t crysprMbedtls_mdctx; typedef struct tag_crysprGnuTLS_AES_cb { CRYSPR_cb ccb; /* CRYSPR control block */ /* Add other cryptolib specific data here */ } crysprMbedtls_cb; int crysprMbedtls_Prng(unsigned char *rn, int len) { int ret = mbedtls_ctr_drbg_random( &crysprMbedtls_ctr_drbg, rn, len ); if (ret != 0) { return -1; } return 0; } int crysprMbedtls_AES_SetKey( bool bEncrypt, /* true:encrypt key, false:decrypt key*/ const unsigned char *kstr, /* key string */ size_t kstr_len, /* kstr length in bytes (16, 24, or 32 bytes, for AES128,AES192, or AES256) */ CRYSPR_AESCTX *aes_key) /* Cryptolib Specific AES key context */ { if (!(kstr_len == 16 || kstr_len == 24 || kstr_len == 32)) { HCRYPT_LOG(LOG_ERR, "%s", "AES_set_encrypt_key(kek) bad length\n"); return -1; } int ret; // mbedtls uses the "bits" convention (128, 192, 254), just like openssl. // kstr_len is in "bytes" convention (16, 24, 32). if (bEncrypt) { /* Encrypt key */ ret = mbedtls_aes_setkey_enc(aes_key, kstr, kstr_len*8); } else { /* Decrypt key */ ret = mbedtls_aes_setkey_dec(aes_key, kstr, kstr_len*8); } return ret == 0 ? 0 : -1; } int crysprMbedtls_AES_EcbCipher( /* AES Electronic Codebook cipher*/ bool bEncrypt, /* true:encrypt, false:decrypt */ CRYSPR_AESCTX *aes_key, /* CryptoLib AES context */ const unsigned char *indata,/* src (clear text)*/ size_t inlen, /* length */ unsigned char *out_txt, /* dst (cipher text) */ size_t *outlen) /* dst len */ { int nblk = inlen/CRYSPR_AESBLKSZ; int nmore = inlen%CRYSPR_AESBLKSZ; int i; if (bEncrypt) { /* Encrypt packet payload, block by block, in output buffer */ for (i = 0; i < nblk; i++) { // NOTE: CRYSPR_AESBLKSZ is implicitly the ONLY POSSIBLE // size of the block. mbedtls_aes_crypt_ecb(aes_key, MBEDTLS_AES_ENCRYPT, &indata[(i*CRYSPR_AESBLKSZ)], &out_txt[(i*CRYSPR_AESBLKSZ)]); } /* Encrypt last incomplete block */ if (0 < nmore) { unsigned char intxt[CRYSPR_AESBLKSZ]; memcpy(intxt, &indata[(nblk*CRYSPR_AESBLKSZ)], nmore); memset(intxt+nmore, 0, CRYSPR_AESBLKSZ-nmore); mbedtls_aes_crypt_ecb(aes_key, MBEDTLS_AES_ENCRYPT, intxt, &out_txt[(nblk*CRYSPR_AESBLKSZ)]); nblk++; } if (outlen != NULL) *outlen = nblk*CRYSPR_AESBLKSZ; } else { /* Decrypt */ for (i=0; i<nblk; i++){ mbedtls_aes_crypt_ecb(aes_key, MBEDTLS_AES_DECRYPT, &indata[(i*CRYSPR_AESBLKSZ)], &out_txt[(i*CRYSPR_AESBLKSZ)]); } /* Encrypt last incomplete block */ if (0 < nmore) { //shall not happens in decrypt } if (outlen != NULL) *outlen = nblk*CRYSPR_AESBLKSZ; } return 0; } int crysprMbedtls_AES_CtrCipher( /* AES-CTR128 Encryption */ bool bEncrypt, /* true:encrypt, false:decrypt */ CRYSPR_AESCTX *aes_key, /* CryptoLib AES context */ unsigned char *iv, /* iv */ const unsigned char *indata,/* src */ size_t inlen, /* src length */ unsigned char *out_txt) /* dest buffer[inlen] */ { unsigned char ctr[CRYSPR_AESBLKSZ]; size_t blk_ofs = 0; (void)bEncrypt; /* CTR mode encrypt for both encryption and decryption */ memset(&ctr[0], 0, sizeof(ctr)); mbedtls_aes_crypt_ctr(aes_key, inlen, &blk_ofs, iv, ctr, indata, out_txt); return 0; } /* * Password-based Key Derivation Function */ int crysprMbedtls_KmPbkdf2( CRYSPR_cb *cryspr_cb, char *passwd, /* passphrase */ size_t passwd_len, /* passphrase len */ unsigned char *salt, /* salt */ size_t salt_len, /* salt_len */ int itr, /* iterations */ size_t key_len, /* key_len */ unsigned char *out) /* derived key buffer[key_len]*/ { (void)cryspr_cb; int ret = mbedtls_pkcs5_pbkdf2_hmac(&crysprMbedtls_mdctx, (unsigned char*)passwd, passwd_len, salt, salt_len, itr, key_len, out); if (ret == 0) return 0; // XXX report error, log? return -1; } static CRYSPR_methods crysprMbedtls_methods; CRYSPR_methods *crysprMbedtls(void) { if (crysprMbedtls_methods.open) return(&crysprMbedtls_methods); crysprInit(&crysprMbedtls_methods); /* Set default methods */ /* CryptoLib Primitive API */ crysprMbedtls_methods.prng = crysprMbedtls_Prng; crysprMbedtls_methods.aes_set_key = crysprMbedtls_AES_SetKey; #if CRYSPR_HAS_AESCTR crysprMbedtls_methods.aes_ctr_cipher = crysprMbedtls_AES_CtrCipher; #endif #if !(CRYSPR_HAS_AESCTR && CRYSPR_HAS_AESKWRAP) /* AES-ECB only required if cryspr has no AES-CTR or no AES KeyWrap */ crysprMbedtls_methods.aes_ecb_cipher = crysprMbedtls_AES_EcbCipher; #endif #if !CRYSPR_HAS_PBKDF2 crysprMbedtls_methods.sha1_msg_digest= crysprMbedtls_SHA1_MsgDigest; //Onl required if using generic KmPbkdf2 #endif //--Crypto Session (Top API) // crysprMbedtls_methods.open = // crysprMbedtls_methods.close = //--Keying material (km) encryption crysprMbedtls_methods.km_pbkdf2 = crysprMbedtls_KmPbkdf2; // crysprMbedtls_methods.km_setkey = // crysprMbedtls_methods.km_wrap = // crysprMbedtls_methods.km_unwrap = //--Media stream (ms) encryption // crysprMbedtls_methods.ms_setkey = // crysprMbedtls_methods.ms_encrypt = // crysprMbedtls_methods.ms_decrypt = // Initialize extra static data mbedtls_entropy_init( &crysprMbedtls_entropy ); mbedtls_ctr_drbg_init( &crysprMbedtls_ctr_drbg ); int ret; if ( (ret = mbedtls_ctr_drbg_seed( &crysprMbedtls_ctr_drbg, mbedtls_entropy_func, &crysprMbedtls_entropy, NULL, 0)) != 0 ) { HCRYPT_LOG(LOG_CRIT, "crysprMbedtls: STATIC INIT FAILED on mbedtls_ctr_drbg_init: -0x%04x", -ret); return NULL; } // Ok, mbedtls with all flexibility you couldn't make it more complicated. mbedtls_md_init(&crysprMbedtls_mdctx); const mbedtls_md_info_t* ifo = mbedtls_md_info_from_type(MBEDTLS_MD_SHA1); const int yes_use_hmac = 1; mbedtls_md_setup(&crysprMbedtls_mdctx, ifo, yes_use_hmac); return(&crysprMbedtls_methods); }
C
5
attenuation/srs
trunk/3rdparty/srt-1-fit/haicrypt/cryspr-mbedtls.c
[ "MIT" ]
// Code generated by avx512test. DO NOT EDIT. #include "../../../../../../runtime/textflag.h" TEXT asmtest_aes_avx512f(SB), NOSPLIT, $0 VAESDEC X24, X7, X11 // 62124508ded8 or 6212c508ded8 VAESDEC X20, X7, X11 // 62324508dedc or 6232c508dedc VAESDEC X24, X0, X11 // 62127d08ded8 or 6212fd08ded8 VAESDEC X20, X0, X11 // 62327d08dedc or 6232fd08dedc VAESDEC X24, X7, X31 // 62024508def8 or 6202c508def8 VAESDEC X20, X7, X31 // 62224508defc or 6222c508defc VAESDEC X7, X7, X31 // 62624508deff or 6262c508deff VAESDEC -7(DI)(R8*1), X7, X31 // 62224508debc07f9ffffff or 6222c508debc07f9ffffff VAESDEC (SP), X7, X31 // 62624508de3c24 or 6262c508de3c24 VAESDEC X24, X0, X31 // 62027d08def8 or 6202fd08def8 VAESDEC X20, X0, X31 // 62227d08defc or 6222fd08defc VAESDEC X7, X0, X31 // 62627d08deff or 6262fd08deff VAESDEC -7(DI)(R8*1), X0, X31 // 62227d08debc07f9ffffff or 6222fd08debc07f9ffffff VAESDEC (SP), X0, X31 // 62627d08de3c24 or 6262fd08de3c24 VAESDEC X24, X7, X3 // 62924508ded8 or 6292c508ded8 VAESDEC X20, X7, X3 // 62b24508dedc or 62b2c508dedc VAESDEC X24, X0, X3 // 62927d08ded8 or 6292fd08ded8 VAESDEC X20, X0, X3 // 62b27d08dedc or 62b2fd08dedc VAESDEC Y5, Y31, Y22 // 62e20520def5 or 62e28520def5 VAESDEC Y19, Y31, Y22 // 62a20520def3 or 62a28520def3 VAESDEC Y31, Y31, Y22 // 62820520def7 or 62828520def7 VAESDEC 99(R15)(R15*1), Y31, Y22 // 62820520deb43f63000000 or 62828520deb43f63000000 VAESDEC (DX), Y31, Y22 // 62e20520de32 or 62e28520de32 VAESDEC Y5, Y5, Y22 // 62e25528def5 or 62e2d528def5 VAESDEC Y19, Y5, Y22 // 62a25528def3 or 62a2d528def3 VAESDEC Y31, Y5, Y22 // 62825528def7 or 6282d528def7 VAESDEC 99(R15)(R15*1), Y5, Y22 // 62825528deb43f63000000 or 6282d528deb43f63000000 VAESDEC (DX), Y5, Y22 // 62e25528de32 or 62e2d528de32 VAESDEC Y5, Y0, Y22 // 62e27d28def5 or 62e2fd28def5 VAESDEC Y19, Y0, Y22 // 62a27d28def3 or 62a2fd28def3 VAESDEC Y31, Y0, Y22 // 62827d28def7 or 6282fd28def7 VAESDEC 99(R15)(R15*1), Y0, Y22 // 62827d28deb43f63000000 or 6282fd28deb43f63000000 VAESDEC (DX), Y0, Y22 // 62e27d28de32 or 62e2fd28de32 VAESDEC Y5, Y31, Y9 // 62720520decd or 62728520decd VAESDEC Y19, Y31, Y9 // 62320520decb or 62328520decb VAESDEC Y31, Y31, Y9 // 62120520decf or 62128520decf VAESDEC 99(R15)(R15*1), Y31, Y9 // 62120520de8c3f63000000 or 62128520de8c3f63000000 VAESDEC (DX), Y31, Y9 // 62720520de0a or 62728520de0a VAESDEC Y19, Y5, Y9 // 62325528decb or 6232d528decb VAESDEC Y31, Y5, Y9 // 62125528decf or 6212d528decf VAESDEC Y19, Y0, Y9 // 62327d28decb or 6232fd28decb VAESDEC Y31, Y0, Y9 // 62127d28decf or 6212fd28decf VAESDEC Y5, Y31, Y23 // 62e20520defd or 62e28520defd VAESDEC Y19, Y31, Y23 // 62a20520defb or 62a28520defb VAESDEC Y31, Y31, Y23 // 62820520deff or 62828520deff VAESDEC 99(R15)(R15*1), Y31, Y23 // 62820520debc3f63000000 or 62828520debc3f63000000 VAESDEC (DX), Y31, Y23 // 62e20520de3a or 62e28520de3a VAESDEC Y5, Y5, Y23 // 62e25528defd or 62e2d528defd VAESDEC Y19, Y5, Y23 // 62a25528defb or 62a2d528defb VAESDEC Y31, Y5, Y23 // 62825528deff or 6282d528deff VAESDEC 99(R15)(R15*1), Y5, Y23 // 62825528debc3f63000000 or 6282d528debc3f63000000 VAESDEC (DX), Y5, Y23 // 62e25528de3a or 62e2d528de3a VAESDEC Y5, Y0, Y23 // 62e27d28defd or 62e2fd28defd VAESDEC Y19, Y0, Y23 // 62a27d28defb or 62a2fd28defb VAESDEC Y31, Y0, Y23 // 62827d28deff or 6282fd28deff VAESDEC 99(R15)(R15*1), Y0, Y23 // 62827d28debc3f63000000 or 6282fd28debc3f63000000 VAESDEC (DX), Y0, Y23 // 62e27d28de3a or 62e2fd28de3a VAESDEC Z27, Z3, Z11 // 62126548dedb or 6212e548dedb VAESDEC Z15, Z3, Z11 // 62526548dedf or 6252e548dedf VAESDEC 99(R15)(R15*1), Z3, Z11 // 62126548de9c3f63000000 or 6212e548de9c3f63000000 VAESDEC (DX), Z3, Z11 // 62726548de1a or 6272e548de1a VAESDEC Z27, Z12, Z11 // 62121d48dedb or 62129d48dedb VAESDEC Z15, Z12, Z11 // 62521d48dedf or 62529d48dedf VAESDEC 99(R15)(R15*1), Z12, Z11 // 62121d48de9c3f63000000 or 62129d48de9c3f63000000 VAESDEC (DX), Z12, Z11 // 62721d48de1a or 62729d48de1a VAESDEC Z27, Z3, Z25 // 62026548decb or 6202e548decb VAESDEC Z15, Z3, Z25 // 62426548decf or 6242e548decf VAESDEC 99(R15)(R15*1), Z3, Z25 // 62026548de8c3f63000000 or 6202e548de8c3f63000000 VAESDEC (DX), Z3, Z25 // 62626548de0a or 6262e548de0a VAESDEC Z27, Z12, Z25 // 62021d48decb or 62029d48decb VAESDEC Z15, Z12, Z25 // 62421d48decf or 62429d48decf VAESDEC 99(R15)(R15*1), Z12, Z25 // 62021d48de8c3f63000000 or 62029d48de8c3f63000000 VAESDEC (DX), Z12, Z25 // 62621d48de0a or 62629d48de0a VAESDECLAST X21, X5, X9 // 62325508dfcd or 6232d508dfcd VAESDECLAST X21, X31, X9 // 62320500dfcd or 62328500dfcd VAESDECLAST X1, X31, X9 // 62720500dfc9 or 62728500dfc9 VAESDECLAST X11, X31, X9 // 62520500dfcb or 62528500dfcb VAESDECLAST -7(CX), X31, X9 // 62720500df89f9ffffff or 62728500df89f9ffffff VAESDECLAST 15(DX)(BX*4), X31, X9 // 62720500df8c9a0f000000 or 62728500df8c9a0f000000 VAESDECLAST X21, X3, X9 // 62326508dfcd or 6232e508dfcd VAESDECLAST X21, X5, X7 // 62b25508dffd or 62b2d508dffd VAESDECLAST X21, X31, X7 // 62b20500dffd or 62b28500dffd VAESDECLAST X1, X31, X7 // 62f20500dff9 or 62f28500dff9 VAESDECLAST X11, X31, X7 // 62d20500dffb or 62d28500dffb VAESDECLAST -7(CX), X31, X7 // 62f20500dfb9f9ffffff or 62f28500dfb9f9ffffff VAESDECLAST 15(DX)(BX*4), X31, X7 // 62f20500dfbc9a0f000000 or 62f28500dfbc9a0f000000 VAESDECLAST X21, X3, X7 // 62b26508dffd or 62b2e508dffd VAESDECLAST X21, X5, X14 // 62325508dff5 or 6232d508dff5 VAESDECLAST X21, X31, X14 // 62320500dff5 or 62328500dff5 VAESDECLAST X1, X31, X14 // 62720500dff1 or 62728500dff1 VAESDECLAST X11, X31, X14 // 62520500dff3 or 62528500dff3 VAESDECLAST -7(CX), X31, X14 // 62720500dfb1f9ffffff or 62728500dfb1f9ffffff VAESDECLAST 15(DX)(BX*4), X31, X14 // 62720500dfb49a0f000000 or 62728500dfb49a0f000000 VAESDECLAST X21, X3, X14 // 62326508dff5 or 6232e508dff5 VAESDECLAST Y31, Y27, Y28 // 62022520dfe7 or 6202a520dfe7 VAESDECLAST Y3, Y27, Y28 // 62622520dfe3 or 6262a520dfe3 VAESDECLAST Y14, Y27, Y28 // 62422520dfe6 or 6242a520dfe6 VAESDECLAST -17(BP)(SI*8), Y27, Y28 // 62622520dfa4f5efffffff or 6262a520dfa4f5efffffff VAESDECLAST (R15), Y27, Y28 // 62422520df27 or 6242a520df27 VAESDECLAST Y31, Y0, Y28 // 62027d28dfe7 or 6202fd28dfe7 VAESDECLAST Y3, Y0, Y28 // 62627d28dfe3 or 6262fd28dfe3 VAESDECLAST Y14, Y0, Y28 // 62427d28dfe6 or 6242fd28dfe6 VAESDECLAST -17(BP)(SI*8), Y0, Y28 // 62627d28dfa4f5efffffff or 6262fd28dfa4f5efffffff VAESDECLAST (R15), Y0, Y28 // 62427d28df27 or 6242fd28df27 VAESDECLAST Y31, Y11, Y28 // 62022528dfe7 or 6202a528dfe7 VAESDECLAST Y3, Y11, Y28 // 62622528dfe3 or 6262a528dfe3 VAESDECLAST Y14, Y11, Y28 // 62422528dfe6 or 6242a528dfe6 VAESDECLAST -17(BP)(SI*8), Y11, Y28 // 62622528dfa4f5efffffff or 6262a528dfa4f5efffffff VAESDECLAST (R15), Y11, Y28 // 62422528df27 or 6242a528df27 VAESDECLAST Y31, Y27, Y2 // 62922520dfd7 or 6292a520dfd7 VAESDECLAST Y3, Y27, Y2 // 62f22520dfd3 or 62f2a520dfd3 VAESDECLAST Y14, Y27, Y2 // 62d22520dfd6 or 62d2a520dfd6 VAESDECLAST -17(BP)(SI*8), Y27, Y2 // 62f22520df94f5efffffff or 62f2a520df94f5efffffff VAESDECLAST (R15), Y27, Y2 // 62d22520df17 or 62d2a520df17 VAESDECLAST Y31, Y0, Y2 // 62927d28dfd7 or 6292fd28dfd7 VAESDECLAST Y31, Y11, Y2 // 62922528dfd7 or 6292a528dfd7 VAESDECLAST Y31, Y27, Y24 // 62022520dfc7 or 6202a520dfc7 VAESDECLAST Y3, Y27, Y24 // 62622520dfc3 or 6262a520dfc3 VAESDECLAST Y14, Y27, Y24 // 62422520dfc6 or 6242a520dfc6 VAESDECLAST -17(BP)(SI*8), Y27, Y24 // 62622520df84f5efffffff or 6262a520df84f5efffffff VAESDECLAST (R15), Y27, Y24 // 62422520df07 or 6242a520df07 VAESDECLAST Y31, Y0, Y24 // 62027d28dfc7 or 6202fd28dfc7 VAESDECLAST Y3, Y0, Y24 // 62627d28dfc3 or 6262fd28dfc3 VAESDECLAST Y14, Y0, Y24 // 62427d28dfc6 or 6242fd28dfc6 VAESDECLAST -17(BP)(SI*8), Y0, Y24 // 62627d28df84f5efffffff or 6262fd28df84f5efffffff VAESDECLAST (R15), Y0, Y24 // 62427d28df07 or 6242fd28df07 VAESDECLAST Y31, Y11, Y24 // 62022528dfc7 or 6202a528dfc7 VAESDECLAST Y3, Y11, Y24 // 62622528dfc3 or 6262a528dfc3 VAESDECLAST Y14, Y11, Y24 // 62422528dfc6 or 6242a528dfc6 VAESDECLAST -17(BP)(SI*8), Y11, Y24 // 62622528df84f5efffffff or 6262a528df84f5efffffff VAESDECLAST (R15), Y11, Y24 // 62422528df07 or 6242a528df07 VAESDECLAST Z8, Z23, Z23 // 62c24540dff8 or 62c2c540dff8 VAESDECLAST Z28, Z23, Z23 // 62824540dffc or 6282c540dffc VAESDECLAST -17(BP)(SI*8), Z23, Z23 // 62e24540dfbcf5efffffff or 62e2c540dfbcf5efffffff VAESDECLAST (R15), Z23, Z23 // 62c24540df3f or 62c2c540df3f VAESDECLAST Z8, Z6, Z23 // 62c24d48dff8 or 62c2cd48dff8 VAESDECLAST Z28, Z6, Z23 // 62824d48dffc or 6282cd48dffc VAESDECLAST -17(BP)(SI*8), Z6, Z23 // 62e24d48dfbcf5efffffff or 62e2cd48dfbcf5efffffff VAESDECLAST (R15), Z6, Z23 // 62c24d48df3f or 62c2cd48df3f VAESDECLAST Z8, Z23, Z5 // 62d24540dfe8 or 62d2c540dfe8 VAESDECLAST Z28, Z23, Z5 // 62924540dfec or 6292c540dfec VAESDECLAST -17(BP)(SI*8), Z23, Z5 // 62f24540dfacf5efffffff or 62f2c540dfacf5efffffff VAESDECLAST (R15), Z23, Z5 // 62d24540df2f or 62d2c540df2f VAESDECLAST Z8, Z6, Z5 // 62d24d48dfe8 or 62d2cd48dfe8 VAESDECLAST Z28, Z6, Z5 // 62924d48dfec or 6292cd48dfec VAESDECLAST -17(BP)(SI*8), Z6, Z5 // 62f24d48dfacf5efffffff or 62f2cd48dfacf5efffffff VAESDECLAST (R15), Z6, Z5 // 62d24d48df2f or 62d2cd48df2f VAESENC X14, X16, X13 // 62527d00dcee or 6252fd00dcee VAESENC X19, X16, X13 // 62327d00dceb or 6232fd00dceb VAESENC X8, X16, X13 // 62527d00dce8 or 6252fd00dce8 VAESENC 99(R15)(R15*8), X16, X13 // 62127d00dcacff63000000 or 6212fd00dcacff63000000 VAESENC 7(AX)(CX*8), X16, X13 // 62727d00dcacc807000000 or 6272fd00dcacc807000000 VAESENC X19, X14, X13 // 62320d08dceb or 62328d08dceb VAESENC X19, X11, X13 // 62322508dceb or 6232a508dceb VAESENC X14, X16, X0 // 62d27d00dcc6 or 62d2fd00dcc6 VAESENC X19, X16, X0 // 62b27d00dcc3 or 62b2fd00dcc3 VAESENC X8, X16, X0 // 62d27d00dcc0 or 62d2fd00dcc0 VAESENC 99(R15)(R15*8), X16, X0 // 62927d00dc84ff63000000 or 6292fd00dc84ff63000000 VAESENC 7(AX)(CX*8), X16, X0 // 62f27d00dc84c807000000 or 62f2fd00dc84c807000000 VAESENC X19, X14, X0 // 62b20d08dcc3 or 62b28d08dcc3 VAESENC X19, X11, X0 // 62b22508dcc3 or 62b2a508dcc3 VAESENC X14, X16, X30 // 62427d00dcf6 or 6242fd00dcf6 VAESENC X19, X16, X30 // 62227d00dcf3 or 6222fd00dcf3 VAESENC X8, X16, X30 // 62427d00dcf0 or 6242fd00dcf0 VAESENC 99(R15)(R15*8), X16, X30 // 62027d00dcb4ff63000000 or 6202fd00dcb4ff63000000 VAESENC 7(AX)(CX*8), X16, X30 // 62627d00dcb4c807000000 or 6262fd00dcb4c807000000 VAESENC X14, X14, X30 // 62420d08dcf6 or 62428d08dcf6 VAESENC X19, X14, X30 // 62220d08dcf3 or 62228d08dcf3 VAESENC X8, X14, X30 // 62420d08dcf0 or 62428d08dcf0 VAESENC 99(R15)(R15*8), X14, X30 // 62020d08dcb4ff63000000 or 62028d08dcb4ff63000000 VAESENC 7(AX)(CX*8), X14, X30 // 62620d08dcb4c807000000 or 62628d08dcb4c807000000 VAESENC X14, X11, X30 // 62422508dcf6 or 6242a508dcf6 VAESENC X19, X11, X30 // 62222508dcf3 or 6222a508dcf3 VAESENC X8, X11, X30 // 62422508dcf0 or 6242a508dcf0 VAESENC 99(R15)(R15*8), X11, X30 // 62022508dcb4ff63000000 or 6202a508dcb4ff63000000 VAESENC 7(AX)(CX*8), X11, X30 // 62622508dcb4c807000000 or 6262a508dcb4c807000000 VAESENC Y18, Y15, Y2 // 62b20528dcd2 or 62b28528dcd2 VAESENC Y24, Y15, Y2 // 62920528dcd0 or 62928528dcd0 VAESENC Y18, Y22, Y2 // 62b24d20dcd2 or 62b2cd20dcd2 VAESENC Y24, Y22, Y2 // 62924d20dcd0 or 6292cd20dcd0 VAESENC Y9, Y22, Y2 // 62d24d20dcd1 or 62d2cd20dcd1 VAESENC 7(SI)(DI*8), Y22, Y2 // 62f24d20dc94fe07000000 or 62f2cd20dc94fe07000000 VAESENC -15(R14), Y22, Y2 // 62d24d20dc96f1ffffff or 62d2cd20dc96f1ffffff VAESENC Y18, Y20, Y2 // 62b25d20dcd2 or 62b2dd20dcd2 VAESENC Y24, Y20, Y2 // 62925d20dcd0 or 6292dd20dcd0 VAESENC Y9, Y20, Y2 // 62d25d20dcd1 or 62d2dd20dcd1 VAESENC 7(SI)(DI*8), Y20, Y2 // 62f25d20dc94fe07000000 or 62f2dd20dc94fe07000000 VAESENC -15(R14), Y20, Y2 // 62d25d20dc96f1ffffff or 62d2dd20dc96f1ffffff VAESENC Y18, Y15, Y13 // 62320528dcea or 62328528dcea VAESENC Y24, Y15, Y13 // 62120528dce8 or 62128528dce8 VAESENC Y18, Y22, Y13 // 62324d20dcea or 6232cd20dcea VAESENC Y24, Y22, Y13 // 62124d20dce8 or 6212cd20dce8 VAESENC Y9, Y22, Y13 // 62524d20dce9 or 6252cd20dce9 VAESENC 7(SI)(DI*8), Y22, Y13 // 62724d20dcacfe07000000 or 6272cd20dcacfe07000000 VAESENC -15(R14), Y22, Y13 // 62524d20dcaef1ffffff or 6252cd20dcaef1ffffff VAESENC Y18, Y20, Y13 // 62325d20dcea or 6232dd20dcea VAESENC Y24, Y20, Y13 // 62125d20dce8 or 6212dd20dce8 VAESENC Y9, Y20, Y13 // 62525d20dce9 or 6252dd20dce9 VAESENC 7(SI)(DI*8), Y20, Y13 // 62725d20dcacfe07000000 or 6272dd20dcacfe07000000 VAESENC -15(R14), Y20, Y13 // 62525d20dcaef1ffffff or 6252dd20dcaef1ffffff VAESENC Y18, Y15, Y27 // 62220528dcda or 62228528dcda VAESENC Y24, Y15, Y27 // 62020528dcd8 or 62028528dcd8 VAESENC Y9, Y15, Y27 // 62420528dcd9 or 62428528dcd9 VAESENC 7(SI)(DI*8), Y15, Y27 // 62620528dc9cfe07000000 or 62628528dc9cfe07000000 VAESENC -15(R14), Y15, Y27 // 62420528dc9ef1ffffff or 62428528dc9ef1ffffff VAESENC Y18, Y22, Y27 // 62224d20dcda or 6222cd20dcda VAESENC Y24, Y22, Y27 // 62024d20dcd8 or 6202cd20dcd8 VAESENC Y9, Y22, Y27 // 62424d20dcd9 or 6242cd20dcd9 VAESENC 7(SI)(DI*8), Y22, Y27 // 62624d20dc9cfe07000000 or 6262cd20dc9cfe07000000 VAESENC -15(R14), Y22, Y27 // 62424d20dc9ef1ffffff or 6242cd20dc9ef1ffffff VAESENC Y18, Y20, Y27 // 62225d20dcda or 6222dd20dcda VAESENC Y24, Y20, Y27 // 62025d20dcd8 or 6202dd20dcd8 VAESENC Y9, Y20, Y27 // 62425d20dcd9 or 6242dd20dcd9 VAESENC 7(SI)(DI*8), Y20, Y27 // 62625d20dc9cfe07000000 or 6262dd20dc9cfe07000000 VAESENC -15(R14), Y20, Y27 // 62425d20dc9ef1ffffff or 6242dd20dc9ef1ffffff VAESENC Z12, Z16, Z21 // 62c27d40dcec or 62c2fd40dcec VAESENC Z27, Z16, Z21 // 62827d40dceb or 6282fd40dceb VAESENC 7(SI)(DI*8), Z16, Z21 // 62e27d40dcacfe07000000 or 62e2fd40dcacfe07000000 VAESENC -15(R14), Z16, Z21 // 62c27d40dcaef1ffffff or 62c2fd40dcaef1ffffff VAESENC Z12, Z13, Z21 // 62c21548dcec or 62c29548dcec VAESENC Z27, Z13, Z21 // 62821548dceb or 62829548dceb VAESENC 7(SI)(DI*8), Z13, Z21 // 62e21548dcacfe07000000 or 62e29548dcacfe07000000 VAESENC -15(R14), Z13, Z21 // 62c21548dcaef1ffffff or 62c29548dcaef1ffffff VAESENC Z12, Z16, Z5 // 62d27d40dcec or 62d2fd40dcec VAESENC Z27, Z16, Z5 // 62927d40dceb or 6292fd40dceb VAESENC 7(SI)(DI*8), Z16, Z5 // 62f27d40dcacfe07000000 or 62f2fd40dcacfe07000000 VAESENC -15(R14), Z16, Z5 // 62d27d40dcaef1ffffff or 62d2fd40dcaef1ffffff VAESENC Z12, Z13, Z5 // 62d21548dcec or 62d29548dcec VAESENC Z27, Z13, Z5 // 62921548dceb or 62929548dceb VAESENC 7(SI)(DI*8), Z13, Z5 // 62f21548dcacfe07000000 or 62f29548dcacfe07000000 VAESENC -15(R14), Z13, Z5 // 62d21548dcaef1ffffff or 62d29548dcaef1ffffff VAESENCLAST X23, X12, X8 // 62321d08ddc7 or 62329d08ddc7 VAESENCLAST X31, X12, X8 // 62121d08ddc7 or 62129d08ddc7 VAESENCLAST X23, X16, X8 // 62327d00ddc7 or 6232fd00ddc7 VAESENCLAST X11, X16, X8 // 62527d00ddc3 or 6252fd00ddc3 VAESENCLAST X31, X16, X8 // 62127d00ddc7 or 6212fd00ddc7 VAESENCLAST (AX), X16, X8 // 62727d00dd00 or 6272fd00dd00 VAESENCLAST 7(SI), X16, X8 // 62727d00dd8607000000 or 6272fd00dd8607000000 VAESENCLAST X23, X23, X8 // 62324500ddc7 or 6232c500ddc7 VAESENCLAST X11, X23, X8 // 62524500ddc3 or 6252c500ddc3 VAESENCLAST X31, X23, X8 // 62124500ddc7 or 6212c500ddc7 VAESENCLAST (AX), X23, X8 // 62724500dd00 or 6272c500dd00 VAESENCLAST 7(SI), X23, X8 // 62724500dd8607000000 or 6272c500dd8607000000 VAESENCLAST X23, X12, X26 // 62221d08ddd7 or 62229d08ddd7 VAESENCLAST X11, X12, X26 // 62421d08ddd3 or 62429d08ddd3 VAESENCLAST X31, X12, X26 // 62021d08ddd7 or 62029d08ddd7 VAESENCLAST (AX), X12, X26 // 62621d08dd10 or 62629d08dd10 VAESENCLAST 7(SI), X12, X26 // 62621d08dd9607000000 or 62629d08dd9607000000 VAESENCLAST X23, X16, X26 // 62227d00ddd7 or 6222fd00ddd7 VAESENCLAST X11, X16, X26 // 62427d00ddd3 or 6242fd00ddd3 VAESENCLAST X31, X16, X26 // 62027d00ddd7 or 6202fd00ddd7 VAESENCLAST (AX), X16, X26 // 62627d00dd10 or 6262fd00dd10 VAESENCLAST 7(SI), X16, X26 // 62627d00dd9607000000 or 6262fd00dd9607000000 VAESENCLAST X23, X23, X26 // 62224500ddd7 or 6222c500ddd7 VAESENCLAST X11, X23, X26 // 62424500ddd3 or 6242c500ddd3 VAESENCLAST X31, X23, X26 // 62024500ddd7 or 6202c500ddd7 VAESENCLAST (AX), X23, X26 // 62624500dd10 or 6262c500dd10 VAESENCLAST 7(SI), X23, X26 // 62624500dd9607000000 or 6262c500dd9607000000 VAESENCLAST X23, X12, X23 // 62a21d08ddff or 62a29d08ddff VAESENCLAST X11, X12, X23 // 62c21d08ddfb or 62c29d08ddfb VAESENCLAST X31, X12, X23 // 62821d08ddff or 62829d08ddff VAESENCLAST (AX), X12, X23 // 62e21d08dd38 or 62e29d08dd38 VAESENCLAST 7(SI), X12, X23 // 62e21d08ddbe07000000 or 62e29d08ddbe07000000 VAESENCLAST X23, X16, X23 // 62a27d00ddff or 62a2fd00ddff VAESENCLAST X11, X16, X23 // 62c27d00ddfb or 62c2fd00ddfb VAESENCLAST X31, X16, X23 // 62827d00ddff or 6282fd00ddff VAESENCLAST (AX), X16, X23 // 62e27d00dd38 or 62e2fd00dd38 VAESENCLAST 7(SI), X16, X23 // 62e27d00ddbe07000000 or 62e2fd00ddbe07000000 VAESENCLAST X23, X23, X23 // 62a24500ddff or 62a2c500ddff VAESENCLAST X11, X23, X23 // 62c24500ddfb or 62c2c500ddfb VAESENCLAST X31, X23, X23 // 62824500ddff or 6282c500ddff VAESENCLAST (AX), X23, X23 // 62e24500dd38 or 62e2c500dd38 VAESENCLAST 7(SI), X23, X23 // 62e24500ddbe07000000 or 62e2c500ddbe07000000 VAESENCLAST Y5, Y19, Y3 // 62f26520dddd or 62f2e520dddd VAESENCLAST Y16, Y19, Y3 // 62b26520ddd8 or 62b2e520ddd8 VAESENCLAST Y2, Y19, Y3 // 62f26520ddda or 62f2e520ddda VAESENCLAST 7(SI)(DI*1), Y19, Y3 // 62f26520dd9c3e07000000 or 62f2e520dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Y19, Y3 // 62f26520dd9cda0f000000 or 62f2e520dd9cda0f000000 VAESENCLAST Y16, Y14, Y3 // 62b20d28ddd8 or 62b28d28ddd8 VAESENCLAST Y5, Y21, Y3 // 62f25520dddd or 62f2d520dddd VAESENCLAST Y16, Y21, Y3 // 62b25520ddd8 or 62b2d520ddd8 VAESENCLAST Y2, Y21, Y3 // 62f25520ddda or 62f2d520ddda VAESENCLAST 7(SI)(DI*1), Y21, Y3 // 62f25520dd9c3e07000000 or 62f2d520dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Y21, Y3 // 62f25520dd9cda0f000000 or 62f2d520dd9cda0f000000 VAESENCLAST Y5, Y19, Y19 // 62e26520dddd or 62e2e520dddd VAESENCLAST Y16, Y19, Y19 // 62a26520ddd8 or 62a2e520ddd8 VAESENCLAST Y2, Y19, Y19 // 62e26520ddda or 62e2e520ddda VAESENCLAST 7(SI)(DI*1), Y19, Y19 // 62e26520dd9c3e07000000 or 62e2e520dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Y19, Y19 // 62e26520dd9cda0f000000 or 62e2e520dd9cda0f000000 VAESENCLAST Y5, Y14, Y19 // 62e20d28dddd or 62e28d28dddd VAESENCLAST Y16, Y14, Y19 // 62a20d28ddd8 or 62a28d28ddd8 VAESENCLAST Y2, Y14, Y19 // 62e20d28ddda or 62e28d28ddda VAESENCLAST 7(SI)(DI*1), Y14, Y19 // 62e20d28dd9c3e07000000 or 62e28d28dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Y14, Y19 // 62e20d28dd9cda0f000000 or 62e28d28dd9cda0f000000 VAESENCLAST Y5, Y21, Y19 // 62e25520dddd or 62e2d520dddd VAESENCLAST Y16, Y21, Y19 // 62a25520ddd8 or 62a2d520ddd8 VAESENCLAST Y2, Y21, Y19 // 62e25520ddda or 62e2d520ddda VAESENCLAST 7(SI)(DI*1), Y21, Y19 // 62e25520dd9c3e07000000 or 62e2d520dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Y21, Y19 // 62e25520dd9cda0f000000 or 62e2d520dd9cda0f000000 VAESENCLAST Y5, Y19, Y23 // 62e26520ddfd or 62e2e520ddfd VAESENCLAST Y16, Y19, Y23 // 62a26520ddf8 or 62a2e520ddf8 VAESENCLAST Y2, Y19, Y23 // 62e26520ddfa or 62e2e520ddfa VAESENCLAST 7(SI)(DI*1), Y19, Y23 // 62e26520ddbc3e07000000 or 62e2e520ddbc3e07000000 VAESENCLAST 15(DX)(BX*8), Y19, Y23 // 62e26520ddbcda0f000000 or 62e2e520ddbcda0f000000 VAESENCLAST Y5, Y14, Y23 // 62e20d28ddfd or 62e28d28ddfd VAESENCLAST Y16, Y14, Y23 // 62a20d28ddf8 or 62a28d28ddf8 VAESENCLAST Y2, Y14, Y23 // 62e20d28ddfa or 62e28d28ddfa VAESENCLAST 7(SI)(DI*1), Y14, Y23 // 62e20d28ddbc3e07000000 or 62e28d28ddbc3e07000000 VAESENCLAST 15(DX)(BX*8), Y14, Y23 // 62e20d28ddbcda0f000000 or 62e28d28ddbcda0f000000 VAESENCLAST Y5, Y21, Y23 // 62e25520ddfd or 62e2d520ddfd VAESENCLAST Y16, Y21, Y23 // 62a25520ddf8 or 62a2d520ddf8 VAESENCLAST Y2, Y21, Y23 // 62e25520ddfa or 62e2d520ddfa VAESENCLAST 7(SI)(DI*1), Y21, Y23 // 62e25520ddbc3e07000000 or 62e2d520ddbc3e07000000 VAESENCLAST 15(DX)(BX*8), Y21, Y23 // 62e25520ddbcda0f000000 or 62e2d520ddbcda0f000000 VAESENCLAST Z25, Z6, Z22 // 62824d48ddf1 or 6282cd48ddf1 VAESENCLAST Z12, Z6, Z22 // 62c24d48ddf4 or 62c2cd48ddf4 VAESENCLAST 7(SI)(DI*1), Z6, Z22 // 62e24d48ddb43e07000000 or 62e2cd48ddb43e07000000 VAESENCLAST 15(DX)(BX*8), Z6, Z22 // 62e24d48ddb4da0f000000 or 62e2cd48ddb4da0f000000 VAESENCLAST Z25, Z8, Z22 // 62823d48ddf1 or 6282bd48ddf1 VAESENCLAST Z12, Z8, Z22 // 62c23d48ddf4 or 62c2bd48ddf4 VAESENCLAST 7(SI)(DI*1), Z8, Z22 // 62e23d48ddb43e07000000 or 62e2bd48ddb43e07000000 VAESENCLAST 15(DX)(BX*8), Z8, Z22 // 62e23d48ddb4da0f000000 or 62e2bd48ddb4da0f000000 VAESENCLAST Z25, Z6, Z11 // 62124d48ddd9 or 6212cd48ddd9 VAESENCLAST Z12, Z6, Z11 // 62524d48dddc or 6252cd48dddc VAESENCLAST 7(SI)(DI*1), Z6, Z11 // 62724d48dd9c3e07000000 or 6272cd48dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Z6, Z11 // 62724d48dd9cda0f000000 or 6272cd48dd9cda0f000000 VAESENCLAST Z25, Z8, Z11 // 62123d48ddd9 or 6212bd48ddd9 VAESENCLAST Z12, Z8, Z11 // 62523d48dddc or 6252bd48dddc VAESENCLAST 7(SI)(DI*1), Z8, Z11 // 62723d48dd9c3e07000000 or 6272bd48dd9c3e07000000 VAESENCLAST 15(DX)(BX*8), Z8, Z11 // 62723d48dd9cda0f000000 or 6272bd48dd9cda0f000000 RET
GAS
1
Havoc-OS/androidprebuilts_go_linux-x86
src/cmd/asm/internal/asm/testdata/avx512enc/aes_avx512f.s
[ "BSD-3-Clause" ]
--# -path=.:../abstract:../common:prelude concrete GrammarDut of Grammar = NounDut, VerbDut, AdjectiveDut, AdverbDut, NumeralDut, SentenceDut, QuestionDut, RelativeDut, ConjunctionDut, PhraseDut, TextX, IdiomDut, StructuralDut, TenseX ;
Grammatical Framework
3
daherb/gf-rgl
src/dutch/GrammarDut.gf
[ "BSD-3-Clause" ]
import "std/test" test.run("delete variable", fn(assert) { let hello = "world" assert.isTrue(isDefined("hello")) delete hello assert.isFalse(isDefined("hello")) }) test.run("delete constant", fn(assert) { assert.shouldThrow(fn() { const place = "Earth" delete place }) })
Inform 7
5
lfkeitel/nitrogen
tests/basic/delete.ni
[ "BSD-3-Clause" ]
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon")); var _jsxRuntime = require("react/jsx-runtime"); var _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M14 4.5c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm3.22 13.4 1.93.63-.46 1.43-3.32-1.08-.47 1.42 3.32 1.08c1.31.43 2.72-.29 3.15-1.61.43-1.31-.29-2.72-1.61-3.15l.46-1.43c2.1.68 3.25 2.94 2.57 5.04-.68 2.1-2.94 3.25-5.04 2.57L1 17.36l.46-1.43 3.93 1.28.46-1.43-3.92-1.28.46-1.43L4 13.6V9.5l5.47-2.35c.39-.17.84-.21 1.28-.07.95.31 1.46 1.32 1.16 2.27l-1.05 3.24L14.5 12l2.72 5.9zM6 14.25l.48.16.75-2.31.69-2.1-1.92.82v3.43zm7.94 4.16-6.66-2.16-.46 1.43 6.66 2.16.46-1.43zm.69-1.36-1.18-2.56-3.97.89 5.15 1.67z" }), 'SleddingSharp'); exports.default = _default;
JavaScript
4
good-gym/material-ui
packages/material-ui-icons/lib/SleddingSharp.js
[ "MIT" ]
fn foo<T, U>(x: T, y: U) { let mut xx = x; xx = y; //~^ ERROR mismatched types //~| expected type parameter `T`, found type parameter `U` //~| expected type parameter `T` //~| found type parameter `U` } fn main() { }
Rust
3
Eric-Arellano/rust
src/test/ui/issues/issue-2951.rs
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
@prog say3-10.MUF 1 99999 d 1 i ( Say program v 3.10 By Warwick on FurryMUCK2.2fb4.1 18th February 1993 ---- say is major action, sayhelp;sayset;sayfilter provide front ending ---- Properties on say program-object: _convert : optional <DBint of property conversion program> _version : Say version 3.10 {c} 1993 by Warwick on FurryMUCK. _message : Type 'sayhelp' for clarified help. Concerns to Warwick asap. ) $define verb-chop-const 18 $enddef $define OOC "_OOC" $enddef $define toOlower "ooo" "o O" subst tolower "o O" "ooo" subst $enddef lvar query lvar ploc lvar mee : show-version ( -- ) prog "_version" getpropstr " (#" prog int intostr ")" strcat strcat strcat .tell prog "_message" getpropstr .tell ; : split-message? ( message -- partone parttwo 1 ) ( message -- message 0 ) dup ",," instr dup not if exit then 1 - strcut 2 strcut swap pop 1 ; : cut-end ( message -- messag e ) ( $define? Phht => 'Primitive') dup if dup strlen 1 - strcut else "" then ; : broadcast ( s -- s ) loc @ "_say/nobcst" envpropstr swap pop not if dup .broadcast then ; : do-query ( "query" -- 0 ) ( "query,,request" -- "request" 1 ) ( and update var query ) split-message? dup if rot else swap then loc @ swap rmatch dup int 0 < if 0 swap int - "Object is your home!" "I don't know which one you mean." "I can't see that here." 4 rotate rotate -3 rotate pop pop swap if swap pop then .tell 0 exit then ( message 1 db or 0 db ) dup player? not if pop if pop then "That is not a player." else dup awake? if swap if name query @ dup if dup " and " instr if 3 strcut rot " " swap "," strcat strcat swap strcat strcat else " and " strcat swap strcat then else pop " to " swap strcat then query ! 1 exit then " is here and awake." else swap if swap pop then " is here but asleep." then swap name swap strcat then .tell 0 ; : find-infix ( message -- message' osayt ) ( -- message "" ) split-message? if split-message? if 1 strcut over "," strcmp not if -3 rotate strcat else strcat swap then rot ",," strcat rot strcat swap exit then ",," swap strcat strcat then "" ; : these-verbs? ( message ch db "_say/ch" -- message sayt osayt ch 1 ) ( message ch db "_say/ch" -- message ch 0 ) over over "/osay" strcat getpropstr dup if dup "$" 1 strncmp if -3 rotate "/say" strcat getpropstr else 1 strcut swap pop atoi dbref call ( db "_say/ch" -- osayt sayt ) then dup if swap else pop dup then rot 1 else pop pop pop 0 then ; : get-verbs ( essage m -- message' sayt osayt ch ) (checked OK) mee @ OOC getpropstr "yes" strcmp not if swap strcat ploc @ "_say/ooc" propdir? if "ooc" else "def" then else dup "/: @~" over instr dup not if pop else 2 * 2 - "slcospattw" swap strcut swap pop 2 strcut pop swap pop then "_say/" over strcat ploc @ swap propdir? if "_say/" over strcat "/suffix" strcat ploc @ swap getpropstr if pop swap strcat "def" else swap pop then else pop swap strcat "def" then dup "def" strcmp not if pop dup cut-end swap pop dup "/: @~" over instr dup not if pop pop else 2 * 2 - "slcospattw" swap strcut swap pop 2 strcut pop 2 put pop then "_say/" over strcat ploc @ swap propdir? if "_say/" over strcat "/suffix" strcat ploc @ swap getpropstr dup if "s" strcmp if swap cut-end pop swap then else pop pop "def" then else pop "def" then then then swap mee @ "_say/adhoc" getpropstr if find-infix else "" then dup if dup 4 rotate exit then pop swap dup "def" strcmp if ploc @ "_say/" 3 pick strcat these-verbs? if exit then then loc @ "_say/here/osay" envpropstr dup if dup "$" 1 strncmp if swap "_say/here/say" getpropstr else "_say/here" swap 1 strcut swap pop atoi dbref call then ( db "_say/ch" -- osayt sayt ) dup if swap else pop dup then else pop pop ploc @ "_say/def" these-verbs? if over "%m" instr if exit then rot verb-chop-const strcut pop rot verb-chop-const strcut pop rot exit then trigger @ "_say/say" these-verbs? if exit then "say," "says," then rot ; : run-filters ( +-n db ch message ["filter1"] -- message notbit0 ) ( -- notify onotify bit0 ) 0 -6 rotate begin atoi dbref call ( +-n db ch message -- +-n db ch message notbit0 ) ( -- +-n me other bit0 ) ( bit1 - repeat request bit2 - list term ) dup 1 bitand if 4 rotate pop 4 rotate pop exit then ( bit 0 ) 6 pick over bitor 6 put dup 4 bitand not while pop ( Return bit2 stops list and env climbing ) 3 pick "_say/" 4 pick strcat "/" strcat 6 pick dup 0 > if 1 + dup else 1 - 0 over - swap then 7 put intostr strcat getpropstr dup not until pop 3 put pop pop swap ; : do-filter ( ch message -- message' 0/2 or -- notify notify_except 1 ) over "2." 2 strncmp if 1 else swap 2 strcut swap pop swap -1 then -3 rotate ploc @ dup -4 rotate 3 pick "def" strcmp if "_say/ch/1" 4 pick "ch" subst getpropstr else pop "" then dup not if pop "def" 2 put ploc @ "_say/def/1" getpropstr then dup if 5 pick -5 rotate run-filters ( Run <ch> or 'def' filters ) dup 1 bitand if pop 1 4 rotate pop exit then ( bit0 - notify exit ) dup 4 bitand if 2 bitand rot pop exit then ( bit2 - 'halt') else pop 2 put pop 0 then 3 pick rot loc @ begin "_say/here/1" envpropstr dup while swap dup -6 rotate -3 rotate "here" -3 rotate run-filters dup 1 bitand if 3 put 3 put 3 put exit then ( bit0 - notify exit ) dup 4 bitand if rot bitor 2 bitand 2 put 2 put exit then ( bit2 - 'halt' ) rot bitor -3 rotate 4 pick swap rot dup #0 dbcmp if "" break then location repeat pop pop 3 put pop ; : mix-split ( quotes verb t m2 m1 -- result 1 ) cut-end ".,:;?!" over instr not if strcat "," then strcat 5 pick " " strcat swap "%m" subst swap 4 rotate dup "OOC" instr if "%^ooc&*" "OOC" subst tolower "OOC" "%^ooc&*" subst else tolower then dup "%n" instr not if cut-end ".2,;:?!" over instr if "%n " -3 rotate query @ swap strcat else " %n" query @ "," strcat strcat then strcat strcat else dup dup "%n" instr 1 + strcut swap pop 1 strcut pop "'\".,!? " swap dup not if pop " " then instr not if "%n " "%n" subst then then 4 rotate 2 = if "you" else mee @ name "-" " " subst then "%n" subst swap dup if " " 5 rotate strcat swap "%m" subst over "%2" instr if "," swap strcat "%2" subst else strcat then else pop rot pop "" "%2" subst cut-end dup "," strcmp not if pop "." then strcat then strcat 1 ; : mix-verb ( quote message verb t -- quote message result t ) ( t:0-csay 1-osay 2-say ) 3 pick -3 rotate over "%m" instr not over and if ( Split allowed? ) rot split-message? if swap dup if 6 pick -5 rotate mix-split exit then pop then else rot then ( do conventional ) split-message? if ", " swap strcat strcat then rot dup "%m" instr not if 3 pick 2 = if "" " you" subst "" "you " subst "You " swap strcat else "" " %n" subst "" "%n " subst then cut-end ":;?!.," over instr not if strcat "," then strcat dup "%2" instr if ", " 6 pick strcat "%2" subst else " " 6 pick strcat strcat then then swap "%m" subst query @ dup if "." strcat then strcat swap 2 = not if " " swap strcat broadcast ( broadcast csay ) mee @ name "-" " " subst swap strcat then 0 ; : my-notify (osay csay -- ) (checked OK) mee @ 1 loc @ contents begin dup player? if dup awake? else 0 then if dup mee @ dbcmp not if dup "_say/normal" getpropstr not if swap 1 + over over 4 + pick notify ( Do osay notify ) over then then then next dup ok? not until pop loc @ over 3 + put dup 2 + rotate notify_exclude ; : mix-for-notify ( quotes sayt osayt message -- 0 osay csay ) ( -- 1 ) (Broadcast during mix-verb csay) dup not if pop pop pop pop show-version 1 exit then -3 rotate over over strcmp if ( sayt != osayt ) -4 rotate 2 (say) mix-verb pop mee @ swap notify 3 pick 1 (osay) mix-verb if (osay) -4 rotate rot 0 (csay) mix-verb pop 2 put pop 0 exit else (csay) 3 put pop pop dup 0 exit then else ( sayt==osayt ) -4 rotate 1 (osay) mix-verb if (osay) dup mee @ swap notify -4 rotate rot 0 (csay) mix-verb pop 2 put pop 0 exit else (csay) 3 put pop pop me @ over notify dup 0 exit then then ; : mix-notify ( quotes sayt osayt message -- ) mix-for-notify if exit then loc @ "_say/notify" envpropstr swap pop atoi dup if dbref "GUARD-STRING" -4 rotate dup -5 rotate call ( osay csay -- ) "GUARD-STRING" strcmp if "Bad _say/notify routine -- complain to " swap owner strcat abort else pop then else pop my-notify then ; : get-quotes ( ch -- quotes ) dup "def" strcmp if ploc @ "_say/" rot strcat "/quotes" strcat getpropstr else pop "" then dup not if pop ploc @ "_say/def/quotes" getpropstr dup not if pop "\"%m\"" exit then then strip toOlower dup "" " %m " subst "" "%m" subst dup strlen 6 > swap strlen 2 < or ( Length 4..8 ) over "!" instr or over "*" instr or ( '!' & '*' banned ) over "%m" instr not or ( Contains '%m' ... ) over dup strlen 2 - dup 0 < if pop 0 then strcut swap pop "%m" strcmp not or ( but not at the end ) over "%m" 2 strncmp not or if 1 else ( ...or at the start ) prog "_say/badquotes" getpropstr dup if over "" "%m" subst begin dup not if pop pop 0 break then 1 strcut 3 pick 3 pick instr if "SAY: Bad quote character '" rot strcat "'." strcat .tell pop pop 1 break then "" rot subst (Try to clear quotes quicker. Dunno if this is worth it.) repeat then then if pop "\"%m\"" "SAY: You need to set valid quotes using 'sayset quotes'" .tell then ; : make-say ( message -- ) dup if 1 strcut swap else pop show-version exit then get-verbs -4 rotate dup not if pop "says," then ( "" <- "says," ) over not if swap pop dup then ( say<-osay ) 4 pick 4 pick dup not if pop pop pop pop pop pop exit then (mesg empty) do-filter dup 1 = if pop dup if mee @ name "-" " " subst " " strcat swap strcat loc @ mee @ rot broadcast notify_except else pop then .tell pop pop pop pop else -4 rotate 6 pick get-quotes -4 rotate mix-notify if ( Re-call filter support. Phhht ) "2." rot strcat swap do-filter 1 = if dup if mee @ name "-" " " subst " " strcat swap strcat loc @ me @ rot broadcast notify_except else pop then .tell pop pop else pop then else pop pop then then ; : start-say ( message -- ) dup "#help" stringcmp not over "##help" stringcmp not or if "*** FOR HELP ON SAY, TYPE: 'sayhelp' ***" .tell then ( Puppet? ) me @ mee ! trigger @ location dup thing? over "_puppet?" getpropstr and if dup "dark" flag? if pop "Say: Puppets cannot be dark." .tell pop exit then loc @ "_puppet_okay?" envpropstr swap pop "no" 2 strncmp not if "Say: Puppetry not allowed here." .tell pop pop exit then dup mee ! name " " explode begin dup while 1 - swap .pmatch #-1 over dbcmp not if "Say: Illegal puppet name! (%n)" swap name "%n" subst .tell .popn exit then pop repeat pop else pop then ( Proploc? ) mee @ dup ploc ! "_proploc" getpropstr atoi dup if dbref dup ok? not if pop mee @ then "me" match over owner dbcmp not if pop mee @ then dup "/_say" propdir? if ploc ! else pop then else pop then ( Version update? ) mee @ "_say/version" getpropstr prog "_version" getpropstr strcmp mee @ owner me @ dbcmp and if mee @ "_say_version" getpropstr if mee @ "_say_version" remove_prop prog "_convert" getpropstr atoi dup if dbref ploc @ swap call else pop then mee @ "_say/version" prog "_version" getpropstr 0 addprop show-version then then ( Query request? ) "" query ! dup "?" 1 strncmp not if mee @ "_say/query" getpropstr "yes" strcmp not if begin 1 strcut swap pop do-query not if exit then dup "?" 1 strncmp until then then make-say ; . c q @register #me say3-10.MUF=tmp/prog1 @set $tmp/prog1=L @set $tmp/prog1=3 @propset $tmp/prog1=str:/_/de:A scroll containing a spell called say3-10.MUF @propset $tmp/prog1=str:/_message:Type 'sayhelp' for help on say. Local notify-routines now supported. Sayhelp 5 @propset $tmp/prog1=str:/_version:Say version 3.11a (c)1993 by Warwick on FurryMUCK
MUF
3
seanmcelroy/moo
moo.console/scripts/warwick/progsay3-10.muf
[ "MIT" ]
#world [a = 1.2e3][b = 1.2e-3][c = 1.2e+3] { polygon-fill:#fff; }
CartoCSS
0
nimix/carto
test/rendering/filterexp.mss
[ "Apache-2.0" ]
FROM node:10.12 ENTRYPOINT [ "sh" ]
Dockerfile
2
Andre305/angular-cli
Dockerfile
[ "MIT" ]
.badge { color: #fff; background-color: #6c757d; display: inline-block; padding: .25em .4em; font-size: 75%; font-weight: 1; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; border-radius: 0.25rem; // Empty badges collapse automatically &:empty { display: none; } }
SCSS
4
0x7c48/mitmproxy
docs/style/badge.scss
[ "MIT" ]
20 5 0 0 94 0 1 9 6 5 1 2 3 9 7 4 8 [0] [0] [0] [0] [0] [0] [0] [0] [0] 1 1 5 14 13 19 17 18 [16] [1] [23] [16] [9] 2 1 5 17 19 14 18 13 [-7] [9] [12] [18] [-9] 3 1 7 15 14 17 20 19 16 18 [12] [6] [3] [-5] [14] [4] [-1] 4 1 3 11 17 18 [13] [21] [7] 5 1 7 19 18 16 15 14 17 20 [9] [8] [3] [3] [1] [0] [-1] 6 1 6 17 14 20 15 19 16 [0] [3] [2] [2] [2] [0] 7 1 3 11 18 17 [21] [-6] [11] 8 1 5 14 18 19 17 13 [0] [1] [3] [0] [1] 9 1 5 18 19 20 17 12 [24] [7] [10] [2] [22] 10 1 4 14 11 20 12 [8] [-9] [9] [7] 11 1 3 19 10 13 [9] [7] [8] 12 1 5 9 8 13 15 16 [-38] [-23] [-45] [2] [8] 13 1 2 12 20 [-3] [11] 14 1 2 21 3 [10] [-41] 15 1 1 21 [5] 16 1 1 21 [4] 17 1 1 21 [4] 18 1 1 21 [4] 19 1 2 9 21 [-55] [6] 20 1 1 21 [7] 21 1 0 0 1 0 0 0 0 0 0 1 1 9 1 4 2 2 1 2 1 10 5 3 2 1 2 3 1 9 5 4 4 5 1 4 1 8 2 1 5 1 2 5 1 3 3 4 1 2 2 6 1 1 3 1 1 3 5 7 1 10 5 1 3 2 2 8 1 1 1 2 1 1 5 9 1 8 4 1 3 3 5 10 1 3 3 3 1 3 5 11 1 3 5 2 3 4 2 12 1 5 1 5 5 2 5 13 1 5 2 2 5 1 3 14 1 10 5 2 1 1 5 15 1 5 1 1 2 3 5 16 1 4 5 2 2 2 3 17 1 4 2 4 5 3 2 18 1 4 4 2 4 2 3 19 1 6 4 1 1 4 1 20 1 7 2 2 2 1 2 21 1 0 0 0 0 0 0 8 8 10 10 6
Eagle
1
klorel/or-tools
examples/data/rcpsp/single_mode_investment/rip20/rip234.sch
[ "Apache-2.0" ]
\ @(#) $M$ 98/01/26 1.2 \ standard { v0 v1 ... vn | l0 l1 .. lm -- } syntax \ based on ANSI basis words (LOCAL) and TO \ \ Author: Phil Burk \ Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom \ \ Permission to use, copy, modify, and/or distribute this \ software for any purpose with or without fee is hereby granted. \ \ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL \ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED \ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL \ THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR \ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING \ FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF \ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF \ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ MOD: PLB 2/11/00 Allow EOL and \ between { }. anew task-locals.fth private{ variable loc-temp-mode \ if true, declaring temporary variables variable loc-comment-mode \ if true, in comment section variable loc-done }private : { ( <local-declaration}> -- ) loc-done off loc-temp-mode off loc-comment-mode off BEGIN bl word count dup 0> \ make sure we are not at the end of a line IF over c@ CASE \ handle special characters ascii } OF loc-done on 2drop ENDOF ascii | OF loc-temp-mode on 2drop ENDOF ascii - OF loc-comment-mode on 2drop ENDOF ascii ) OF ." { ... ) imbalance!" cr abort ENDOF ascii \ OF postpone \ 2drop ENDOF \ Forth comment \ process name >r ( save char ) ( addr len ) loc-comment-mode @ IF 2drop ELSE \ if in temporary mode, assign local var = 0 loc-temp-mode @ IF compile false THEN \ otherwise take value from stack (local) THEN r> ENDCASE ELSE 2drop refill 0= abort" End of input while defining local variables!" THEN loc-done @ UNTIL 0 0 (local) ; immediate privatize \ tests : tlv1 { n -- } n dup n * dup n * ; : tlv2 { v1 v2 | l1 l2 -- } v1 . v2 . cr v1 v2 + -> l1 l1 . l2 . cr ;
Forth
4
nickpascucci/pforth
fth/locals.fth
[ "0BSD" ]
.. _appendix_box: Box === Rich has a number of constants that set the box characters used to draw tables and panels. To select a box style import one of the constants below from ``rich.box``. For example:: from rich import box table = Table(box=box.SQUARE) .. note:: Some of the box drawing characters will not display correctly on Windows legacy terminal (cmd.exe) with *raster* fonts, and are disabled by default. If you want the full range of box options on Windows legacy terminal, use a *truetype* font and set the ``safe_box`` parameter on the Table class to ``False``. The following table is generated with this command:: python -m rich.box .. raw:: html <pre style="font-size:90%;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace"><span style="color: #008000">╭──────────────────────────────────────────────────────────────────────────────╮</span> <span style="color: #008000">│</span> <span style="color: #008000; font-weight: bold">Box Constants</span> <span style="color: #008000">│ ╰──────────────────────────────────────────────────────────────────────────────╯</span> <span style="color: #800080"> box.ASCII </span> <span style="color: #800080"> box.SQUARE </span> <span style="color: #800080"> box.MINIMAL </span> +------------------------+ ┌────────────┬───────────┐ |<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>|<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>| │<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>│ <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> |------------+-----------| ├────────────┼───────────┤ ───────────┼────────── |<span style="color: #7f7f7f"> Cell </span>|<span style="color: #7f7f7f"> Cell </span>| │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> |<span style="color: #7f7f7f"> Cell </span>|<span style="color: #7f7f7f"> Cell </span>| │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> |------------+-----------| ├────────────┼───────────┤ ───────────┼────────── |<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>|<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>| │<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>│ <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> +------------------------+ └────────────┴───────────┘ <span style="color: #800080"> box.MINIMAL_HEAVY_HEAD </span> <span style="color: #800080"> box.MINIMAL_DOUBLE_HEAD </span> <span style="color: #800080"> box.SIMPLE </span> <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> ━━━━━━━━━━━━┿━━━━━━━━━━━ ════════════╪═══════════ ──────────────────────── <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> ────────────┼─────────── ────────────┼─────────── ──────────────────────── <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> <span style="color: #800080"> box.SIMPLE_HEAVY </span> <span style="color: #800080"> box.HORIZONTALS </span> <span style="color: #800080"> box.ROUNDED </span> ────────────────────────── ╭───────────┬──────────╮ <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Header 2 </span> │<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>│ ╺━━━━━━━━━━━━━━━━━━━━━━━━╸ ────────────────────────── ├───────────┼──────────┤ <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> <span style="color: #7f7f7f"> Cell </span> │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ ╺━━━━━━━━━━━━━━━━━━━━━━━━╸ ────────────────────────── ├───────────┼──────────┤ <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span> <span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span> │<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>│ ────────────────────────── ╰───────────┴──────────╯ <span style="color: #800080"> box.HEAVY </span> <span style="color: #800080"> box.HEAVY_EDGE </span> <span style="color: #800080"> box.HEAVY_HEAD </span> ┏━━━━━━━━━━━━┳━━━━━━━━━━━┓ ┏━━━━━━━━━━━━┯━━━━━━━━━━━┓ ┏━━━━━━━━━━━┳━━━━━━━━━━┓ ┃<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>┃<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>┃ ┃<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>┃ ┃<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>┃<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>┃ ┣━━━━━━━━━━━━╋━━━━━━━━━━━┫ ┠────────────┼───────────┨ ┡━━━━━━━━━━━╇━━━━━━━━━━┩ ┃<span style="color: #7f7f7f"> Cell </span>┃<span style="color: #7f7f7f"> Cell </span>┃ ┃<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>┃ │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ ┃<span style="color: #7f7f7f"> Cell </span>┃<span style="color: #7f7f7f"> Cell </span>┃ ┃<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>┃ │<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>│ ┣━━━━━━━━━━━━╋━━━━━━━━━━━┫ ┠────────────┼───────────┨ ├───────────┼──────────┤ ┃<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>┃<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>┃ ┃<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>┃ │<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>│ ┗━━━━━━━━━━━━┻━━━━━━━━━━━┛ ┗━━━━━━━━━━━━┷━━━━━━━━━━━┛ └───────────┴──────────┘ <span style="color: #800080"> box.DOUBLE </span> <span style="color: #800080"> box.DOUBLE_EDGE </span> ╔════════════╦═══════════╗ ╔════════════╤═══════════╗ ║<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>║<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>║ ║<span style="color: #7f7f7f; font-weight: bold"> Header 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Header 2 </span>║ ╠════════════╬═══════════╣ ╟────────────┼───────────╢ ║<span style="color: #7f7f7f"> Cell </span>║<span style="color: #7f7f7f"> Cell </span>║ ║<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>║ ║<span style="color: #7f7f7f"> Cell </span>║<span style="color: #7f7f7f"> Cell </span>║ ║<span style="color: #7f7f7f"> Cell </span>│<span style="color: #7f7f7f"> Cell </span>║ ╠════════════╬═══════════╣ ╟────────────┼───────────╢ ║<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>║<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>║ ║<span style="color: #7f7f7f; font-weight: bold"> Footer 1 </span>│<span style="color: #7f7f7f; font-weight: bold"> Footer 2 </span>║ ╚════════════╩═══════════╝ ╚════════════╧═══════════╝ </pre>
reStructuredText
4
traviscook21/rich
docs/source/appendix/box.rst
[ "MIT" ]
#include <stdio.h> #include <math.h> #include <upc_relaxed.h> #if WITH_UPC /* with RTED */ #include "RuntimeSystem.h" // instrument code // runtimeCheck heattrans.upc -rose:UPC -rose:upc_threads 8 -DWITH_UPC -I../../../ROSE/config -c -I../../../ROSE/projects/RTED -I. -I../.. // compile instrumented code // upc -O0 -g -dwarf-2-upc -DWITH_UPC=1 -Wall -Wextra -fupc-threads-8 -I../../../ROSE/projects/RTED -I. -I../.. -c rose_heattrans.upc // link instrumented code // upc++link -dwarf-2-upc -o rose_heattrans.bin rose_heattrans.o RuntimeSystemUpc.o ParallelRTS.o -L./CppRuntimeSystem/.libs/ -lUpcRuntimeSystem #endif #define N 32 #define Q (N-1) #define BLOCKSIZE 1 shared[BLOCKSIZE] double grids[2][N][N][N]; shared double dTmax_local[THREADS]; void initialize(void) { // boundary values on the edges for (int a = 1; a < Q; ++a) { upc_forall(int b = 1; b < Q; ++b; &grids[0][0][a][b]) { grids[0][0][a][b] = grids[1][0][a][b] = 1.0; grids[0][a][b][0] = grids[1][a][b][0] = 1.0; grids[0][a][0][b] = grids[1][a][0][b] = 1.0; grids[0][Q][a][b] = grids[1][Q][a][b] = 1.0; grids[0][a][b][Q] = grids[1][a][b][Q] = 1.0; grids[0][a][Q][b] = grids[1][a][Q][b] = 1.0; } } // initial value for (int z = 1; z < Q; ++z) { for (int y = 1; y < Q; ++y) { upc_forall(int x = 1; x < Q; ++x; &grids[0][z][y][x]) { grids[0][z][y][x] = 2.0; } } } } int main() { double dTmax; double dT; double epsilon; int x; int y; int z; double T; int nr_iter; int sg; // source grid int dg; // destination grid initialize(); epsilon = .0001; nr_iter = 0; sg = 1; dg = !sg; upc_barrier; do { dg = sg; sg = !sg; ++nr_iter; dTmax = 0.0; for (z = 1; z < Q; ++z) { for (y = 1; y < Q; ++y) { upc_forall(x = 1; x < Q; ++x; &grids[sg][z][y][x]) { T = ( grids[sg][z+1][y][x] + grids[sg][z-1][y][x] + grids[sg][z][y+1][x] + grids[sg][z][y-1][x] + grids[sg][z][y][x+1] + grids[sg][z][y][x-1] ) / 6.0; dT = T - grids[sg][z][y][x]; grids[dg][z][y][x] = T; if (dTmax < fabs(dT)) dTmax = fabs(dT); } } } dTmax_local[MYTHREAD] = dTmax; upc_barrier; dTmax = dTmax_local[0]; for (int i = 1; i<THREADS; ++i) { if (dTmax < dTmax_local[i]) dTmax = dTmax_local[i]; } upc_barrier; } while (dTmax > epsilon); upc_barrier; if (MYTHREAD == 0) { printf("%d iterations\n", nr_iter); } return 0; }
Unified Parallel C
4
maurizioabba/rose
projects/RTED/tests/UPC/noerrortests/heattrans.upc
[ "BSD-3-Clause" ]
// ParserTests.prg // Created by : nvk // Creation Date : 2/6/2021 11:31:16 AM // Created for : // WorkStation : I7 USING System USING System.Collections.Generic USING System.Text // Rudimentary parser tests // Should parse without errors FUNCTION ParserTestsFox(mc AS XSharp.Runtime.MacroCompiler) AS VOID ParseScript(mc, String.Join(e"\n",<STRING>{; "LPARAMETERS a,b as int, c",; "PARAMETERS a as string,b, c as int"; })) RETURN FUNCTION ParserTests(mc AS XSharp.Runtime.MacroCompiler) AS VOID ParseScript(mc, String.Join(e"\n",<STRING>{; "PRIVATE a,b[4,5][4],c := 1+1, d[5] := {1,2,3,4}",; "PUBLIC a as float,b[4,5][4],c := 1+1 as system.int, d[5] := {1,2,3,4}",; "MEMVAR x, y",; "MEMVAR q",; "LOCAL a, b := 1+2, c[2] := {P1,2}, d := 1234 as int, e as system.string",; "STATIC LOCAL a, b := 1+2, DIM c[2] := {P1,2}, d := 1234 as int",; "LOCAL STATIC a, const b := 1+2, c[2] := {P1,2}, d := 1234 as int",; "VAR a := 1+2, b := P1",; "LOCAL IMPLIED a := 1+2, b := P1",; "DIMENSION a[10] as int",; "DECLARE a[10][4][3+5,2] as int",; "x+1,2",; "y*x",; "NOP",; "NOP()"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "WHILE x > 3",; "x-=1",; "do while x > 0",; "--x",; "end while",; "do while x > 0",; "--x",; "end do",; "while x > 0",; "--x",; "enddo",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "FOR x := 1 to 10",; "NEXT",; "FOR x := 1 downto 10 step -1",; "FOR VAR y := 1 to 10",; "y:=x+1",; "END",; "FOR LOCAL y := 1 as int to 10",; "y:=x+1",; "END",; "END FOR"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "IF x > 0",; "y:=x+1",; "END IF"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "IF x > 0",; "y:=x+1",; "ELSE",; "y:=x-1",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "DO CASE",; "CASE x == 1",; "y = x",; "CASE x == 2",; "OTHERWISE",; "y = z",; "END CASE",; "DO CASE",; "OTHERWISE",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "FOREACH VAR x IN list",; "exit",; "END",; "FOREACH IMPLIED x IN list",; "write(x)",; "END FOR",; "FOR EACH x AS INT IN list",; "loop",; "NEXT"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "break",; "break e{}",; "return",; "return void",; "return 1+1"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "? 1, 2, a+b",; "?? 1, 2, a+b",; "? x",; "??"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "TRY",; "THROW Error{123}",; "CATCH",; "FINALLY",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "REPEAT",; "loop",; "UNTIL false"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SWITCH e",; "CASE 1",; "write(1)",; "CASE x AS INT",; "write(x)",; "CASE M.x AS INT",; "write(x)",; "CASE x AS List WHEN x:Count > 0",; "write(x)",; "CASE 1 WHEN y < 0",; "write(x)",; "OTHERWISE",; "error()",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SEQUENCE",; "write(x)",; "END SEQUENCE"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SEQUENCE",; "write(x)",; "RECOVER USING x",; "test(x)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SEQUENCE",; "write(x)",; "FINALLY",; "test()",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SEQUENCE",; "write(x)",; "RECOVER USING x",; "test(x)",; "FINALLY",; "test()",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN LOCK o:key",; "write(o)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN LOCK key",; "write(o)",; "END LOCK"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SCOPE",; "write(o)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN SCOPE",; "write(o)",; "END SCOPE"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING o:f",; "write('thr')",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING file",; "file:write(o)",; "END USING"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING VAR file := File{'test'}",; "file:write(o)",; "END USING"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING VAR file := File{'test'}, o := Output{}",; "o:write(file)",; "END USING"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING LOCAL IMPLIED file := File{'test'}, o := Output{}",; "o:write(file)",; "END USING"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING LOCAL VAR file := File{'test'}, o := Output{}",; "o:write(file)",; "END USING"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN USING LOCAL file := File{'test'}, o := Output{} as System.File",; "o:write(file)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN UNSAFE",; "write(o)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN UNSAFE",; "write(o)",; "END UNSAFE"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN CHECKED",; "write(o)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN CHECKED",; "write(o)",; "END CHECKED"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN UNCHECKED",; "write(o)",; "END"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN UNCHECKED",; "write(o)",; "END UNCHECKED"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN FIXED VAR file := File{'test'}, o := Output{}",; "o:write(file)",; "END FIXED"; })) ParseScript(mc, String.Join(e"\n",<STRING>{; "BEGIN FIXED LOCAL file := File{'test'}, o := Output{} as System.File",; "o:write(file)",; "END"; })) RETURN
xBase
5
orangesocks/XSharpPublic
Runtime/MacroCompiler.Example/ParserTests.prg
[ "Apache-2.0" ]
extends: capitalization message: "'%s' should be in title case" level: error scope: heading.h1 match: $title style: AP exceptions: - brew(1) - macOS - Homebrew/brew - Homebrew/homebrew-core - Homebrew/linuxbrew-core - Homebrew/homebrew-cask - (or Linux)
YAML
3
ylht/brew
docs/vale-styles/Homebrew/Titles.yml
[ "BSD-2-Clause" ]
; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Doron Ofek ; ; Script Function: ; Build CodeXL documentation with WordToHelp. ; This script uses the AutoIt 3.0 scripting automation language to run the WordToHelp application and generate the CodeXL User Guide CHM and HTML outputs. ; AutoIt can be freely downloaded from http://www.autoitscript.com ConsoleWrite ( @CRLF & @CRLF & "[AutoIt3] Beginning script execution." & @CRLF) Local $ExitCode = 0 If FileSetAttrib(".\CodeXL User Guide\*.*", "-R", 1) Then ConsoleWrite("[AutoIt3] Successfully removed read-only attribute." & @CRLF) Else ConsoleWrite("[AutoIt3] Error removing read-only attribute." & @CRLF) $ExitCode = -1 EndIf Local $WordToHelpCmd = "C:\Program Files (x86)\Softany\WordToHelp\word2help.exe " & Chr(34) & "D:\jenkins\workspace\CodeXL-Doc\CodeXL\Help\CodeXL User Guide\CodeXL User Guide.wfw" & Chr(34) & " /B" ConsoleWrite ( "[AutoIt3] Executing command: " & $WordToHelpCmd & @CRLF) ; Run WordToHelp to generate the documentation Local $WordToHelpPID = Run($WordToHelpCmd) If $WordToHelpPID = 0 Then ConsoleWrite ( "[AutoIt3] Error: failed to Run WordToHelp" & @CRLF) $ExitCode = -2 Else ConsoleWrite ( "[AutoIt3] Succeeded in running WordToHelp" & @CRLF) ; Now wait for the Word2Help to close before continuing Local $WordToHelpClose = ProcessWaitClose ($WordToHelpPID, 360) If $WordToHelpClose = 0 Then ConsoleWrite ( "[AutoIt3] Error: timeout reached while waiting for WordToHelp to complete the build." & @CRLF) $ExitCode = -3 EndIf EndIf ConsoleWrite ( "[AutoIt3] Finished. Exit code = " & $ExitCode & @CRLF & @CRLF) Exit($ExitCode) ; Finished!
AutoIt
4
jeongjoonyoo/CodeXL
CodeXL/Help/AutoItWordToHelp.au3
[ "MIT" ]
CLASS zcl_abapgit_persist_factory DEFINITION PUBLIC CREATE PRIVATE GLOBAL FRIENDS zcl_abapgit_persist_injector . PUBLIC SECTION. CLASS-METHODS get_repo RETURNING VALUE(ri_repo) TYPE REF TO zif_abapgit_persist_repo . CLASS-METHODS get_repo_cs RETURNING VALUE(ri_repo_cs) TYPE REF TO zif_abapgit_persist_repo_cs . CLASS-METHODS get_settings RETURNING VALUE(ri_settings) TYPE REF TO zif_abapgit_persist_settings . PROTECTED SECTION. PRIVATE SECTION. CLASS-DATA gi_repo TYPE REF TO zif_abapgit_persist_repo . CLASS-DATA gi_repo_cs TYPE REF TO zif_abapgit_persist_repo_cs . CLASS-DATA gi_settings TYPE REF TO zif_abapgit_persist_settings . ENDCLASS. CLASS ZCL_ABAPGIT_PERSIST_FACTORY IMPLEMENTATION. METHOD get_repo. IF gi_repo IS INITIAL. CREATE OBJECT gi_repo TYPE zcl_abapgit_persistence_repo. ENDIF. ri_repo = gi_repo. ENDMETHOD. METHOD get_repo_cs. IF gi_repo_cs IS INITIAL. CREATE OBJECT gi_repo_cs TYPE zcl_abapgit_persistence_repo. ENDIF. ri_repo_cs = gi_repo_cs. ENDMETHOD. METHOD get_settings. IF gi_settings IS INITIAL. CREATE OBJECT gi_settings TYPE zcl_abapgit_persist_settings. ENDIF. ri_settings = gi_settings. ENDMETHOD. ENDCLASS.
ABAP
4
gepparta/abapGit
src/persist/zcl_abapgit_persist_factory.clas.abap
[ "MIT" ]
provider "aws" { version = "~> 2.58" } provider "random" { version = "~> 2.2" } resource "random_id" "suffix" { byte_length = 4 } resource "random_password" "db" { length = 16 special = false } resource "aws_db_instance" "test" { identifier = "metricbeat-test-${random_id.suffix.hex}" allocated_storage = 20 // Gigabytes engine = "mysql" instance_class = "db.t2.micro" name = "metricbeattest" username = "foo" password = random_password.db.result skip_final_snapshot = true // Required for cleanup } resource "aws_sqs_queue" "test" { name = "metricbeat-test-${random_id.suffix.hex}" receive_wait_time_seconds = 10 } resource "aws_s3_bucket" "test" { bucket = "metricbeat-test-${random_id.suffix.hex}" force_destroy = true // Required for cleanup } resource "aws_s3_bucket_metric" "test" { bucket = aws_s3_bucket.test.id name = "EntireBucket" } resource "aws_s3_bucket_object" "test" { key = "someobject" bucket = aws_s3_bucket.test.id content = "something" } resource "aws_instance" "test" { ami = data.aws_ami.latest-amzn.id monitoring = true instance_type = "t2.micro" tags = { Name = "metricbeat-test" } } data "aws_ami" "latest-amzn" { most_recent = true owners = ["amazon"] filter { name = "name" values = [ "amzn2-ami-hvm-*", ] } }
HCL
4
tetianakravchenko/beats
x-pack/metricbeat/module/aws/terraform.tf
[ "ECL-2.0", "Apache-2.0" ]
exec("swigtest.start", -1); x = "hello"; // li_std_string tests // Function tests checkequal(test_ccvalue(x), x, "test_ccvalue()"); checkequal(test_cvalue(x), x, "test_cvalue(x)"); checkequal(test_value(x), x, "test_value()"); checkequal(test_const_reference(x), x, "test_const_reference(x)"); checkequal(test_reference_input(x), x, "test_reference_input(x)"); checkequal(test_reference_inout(x), x+x, "test_reference_inout(x)"); //checkequal(test_reference_out(), "test_reference_out message", "test_reference_out()"); //checkequal(test_const_pointer_out(), "x", "test_const_pointer_out()"); s = "initial string"; // Global variable tests checkequal(GlobalString2_get(), "global string 2", "GlobalString2_get()"); GlobalString2_set(s); checkequal(GlobalString2_get(), s, "GlobalString2_get()"); checkequal(ConstGlobalString_get(), "const global string", "ConstGlobalString_get()"); // Member variable tests myStructure = new_Structure(); checkequal(Structure_Str2_get(myStructure), "member string 2", "Structure_Str2_get(myStructure)"); Structure_Str2_set(myStructure, s); checkequal(Structure_Str2_get(myStructure), s, "Structure_Str2_get(myStructure)"); checkequal(Structure_ConstStr_get(myStructure), "const member string", "Structure_ConstStr_get(myStructure)"); checkequal(Structure_StaticStr2_get(), "static member string 2", "Structure_StaticStr2_get()"); Structure_StaticStr2_set(s); checkequal(Structure_StaticStr2_get(), s, "Structure_StaticStr2_get()"); checkequal(Structure_ConstStati_get(), "const static member string", "Structure_ConstStaticStr_get()"); checkequal(stdstring_empty(), "", "stdstring_empty()"); checkequal(c_empty(), "", "c_empty()"); // li_std_string_extra tests //checkequal(test_value_basic1(x), x, ""); //checkequal(test_value_basic2(x), x, ""); //checkequal(test_value_basic3(x), x, ""); exec("swigtest.quit", -1);
Scilab
3
kyletanyag/LL-Smartcard
cacreader/swig-4.0.2/Examples/test-suite/scilab/li_std_string_extra_runme.sci
[ "BSD-3-Clause" ]
; Kovri Installer for Windows, 32 bit variant ; Copyright (c) 2017, The Kovri I2P Router Project ; See LICENSE #define Bitness 32 #include "Common.iss"
Inno Setup
1
byterubpay/kovri
pkg/installers/windows/Kovri32.iss
[ "BSD-3-Clause" ]
"""The button tests for the Mazda Connected Services integration.""" from pymazda import MazdaException import pytest from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS from homeassistant.const import ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME, ATTR_ICON from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import entity_registry as er from . import init_integration async def test_button_setup_non_electric_vehicle(hass) -> None: """Test creation of button entities.""" await init_integration(hass) entity_registry = er.async_get(hass) entry = entity_registry.async_get("button.my_mazda3_start_engine") assert entry assert entry.unique_id == "JM000000000000000_start_engine" state = hass.states.get("button.my_mazda3_start_engine") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Start Engine" assert state.attributes.get(ATTR_ICON) == "mdi:engine" entry = entity_registry.async_get("button.my_mazda3_stop_engine") assert entry assert entry.unique_id == "JM000000000000000_stop_engine" state = hass.states.get("button.my_mazda3_stop_engine") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Stop Engine" assert state.attributes.get(ATTR_ICON) == "mdi:engine-off" entry = entity_registry.async_get("button.my_mazda3_turn_on_hazard_lights") assert entry assert entry.unique_id == "JM000000000000000_turn_on_hazard_lights" state = hass.states.get("button.my_mazda3_turn_on_hazard_lights") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Turn On Hazard Lights" assert state.attributes.get(ATTR_ICON) == "mdi:hazard-lights" entry = entity_registry.async_get("button.my_mazda3_turn_off_hazard_lights") assert entry assert entry.unique_id == "JM000000000000000_turn_off_hazard_lights" state = hass.states.get("button.my_mazda3_turn_off_hazard_lights") assert state assert ( state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Turn Off Hazard Lights" ) assert state.attributes.get(ATTR_ICON) == "mdi:hazard-lights" # Since this is a non-electric vehicle, electric vehicle buttons should not be created entry = entity_registry.async_get("button.my_mazda3_refresh_vehicle_status") assert entry is None state = hass.states.get("button.my_mazda3_refresh_vehicle_status") assert state is None async def test_button_setup_electric_vehicle(hass) -> None: """Test creation of button entities for an electric vehicle.""" await init_integration(hass, electric_vehicle=True) entity_registry = er.async_get(hass) entry = entity_registry.async_get("button.my_mazda3_start_engine") assert entry assert entry.unique_id == "JM000000000000000_start_engine" state = hass.states.get("button.my_mazda3_start_engine") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Start Engine" assert state.attributes.get(ATTR_ICON) == "mdi:engine" entry = entity_registry.async_get("button.my_mazda3_stop_engine") assert entry assert entry.unique_id == "JM000000000000000_stop_engine" state = hass.states.get("button.my_mazda3_stop_engine") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Stop Engine" assert state.attributes.get(ATTR_ICON) == "mdi:engine-off" entry = entity_registry.async_get("button.my_mazda3_turn_on_hazard_lights") assert entry assert entry.unique_id == "JM000000000000000_turn_on_hazard_lights" state = hass.states.get("button.my_mazda3_turn_on_hazard_lights") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Turn On Hazard Lights" assert state.attributes.get(ATTR_ICON) == "mdi:hazard-lights" entry = entity_registry.async_get("button.my_mazda3_turn_off_hazard_lights") assert entry assert entry.unique_id == "JM000000000000000_turn_off_hazard_lights" state = hass.states.get("button.my_mazda3_turn_off_hazard_lights") assert state assert ( state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Turn Off Hazard Lights" ) assert state.attributes.get(ATTR_ICON) == "mdi:hazard-lights" entry = entity_registry.async_get("button.my_mazda3_refresh_status") assert entry assert entry.unique_id == "JM000000000000000_refresh_vehicle_status" state = hass.states.get("button.my_mazda3_refresh_status") assert state assert state.attributes.get(ATTR_FRIENDLY_NAME) == "My Mazda3 Refresh Status" assert state.attributes.get(ATTR_ICON) == "mdi:refresh" @pytest.mark.parametrize( "entity_id_suffix, api_method_name", [ ("start_engine", "start_engine"), ("stop_engine", "stop_engine"), ("turn_on_hazard_lights", "turn_on_hazard_lights"), ("turn_off_hazard_lights", "turn_off_hazard_lights"), ("refresh_status", "refresh_vehicle_status"), ], ) async def test_button_press(hass, entity_id_suffix, api_method_name) -> None: """Test pressing the button entities.""" client_mock = await init_integration(hass, electric_vehicle=True) await hass.services.async_call( BUTTON_DOMAIN, SERVICE_PRESS, {ATTR_ENTITY_ID: f"button.my_mazda3_{entity_id_suffix}"}, blocking=True, ) await hass.async_block_till_done() api_method = getattr(client_mock, api_method_name) api_method.assert_called_once_with(12345) async def test_button_press_error(hass) -> None: """Test the Mazda API raising an error when a button entity is pressed.""" client_mock = await init_integration(hass) client_mock.start_engine.side_effect = MazdaException("Test error") with pytest.raises(HomeAssistantError) as err: await hass.services.async_call( BUTTON_DOMAIN, SERVICE_PRESS, {ATTR_ENTITY_ID: "button.my_mazda3_start_engine"}, blocking=True, ) await hass.async_block_till_done() assert str(err.value) == "Test error"
Python
5
MrDelik/core
tests/components/mazda/test_button.py
[ "Apache-2.0" ]
syntax = "proto3"; package math2; service Math2 { rpc Sum2 (RequestSum) returns (SumResult) {} } message SumResult { int32 result = 1; } message RequestSum { repeated int32 data = 1; }
Protocol Buffer
4
SuperHuangXu/nest
integration/microservices/src/grpc/math2.proto
[ "MIT" ]
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime version: 4.0.30319.42000 // Generator : XSharp.CodeDomProvider 2.9.0.0 // Timestamp : 29/09/2021 16:32:43 // // Changes to this file may cause incorrect behavior and may be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ BEGIN NAMESPACE UDCTesterApp EXPORT PARTIAL CLASS UDCTester HIDDEN label1 AS System.Windows.Forms.Label HIDDEN label2 AS System.Windows.Forms.Label HIDDEN label3 AS System.Windows.Forms.Label HIDDEN panel1 AS System.Windows.Forms.Panel HIDDEN TestButton AS System.Windows.Forms.Button HIDDEN OkButton AS System.Windows.Forms.Button HIDDEN tbUDC AS System.Windows.Forms.TextBox HIDDEN tbSource AS System.Windows.Forms.TextBox HIDDEN tbResult AS System.Windows.Forms.TextBox HIDDEN chkStandardDefs AS System.Windows.Forms.CheckBox HIDDEN lblDialect AS System.Windows.Forms.Label HIDDEN comboDialect AS System.Windows.Forms.ComboBox HIDDEN btnSettings AS System.Windows.Forms.Button HIDDEN tableLayoutPanel1 AS System.Windows.Forms.TableLayoutPanel /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> PROTECTED METHOD Dispose(disposing AS LOGIC) AS VOID STRICT SUPER:Dispose(disposing) RETURN #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> HIDDEN METHOD InitializeComponent() AS VOID STRICT LOCAL resources := System.ComponentModel.ComponentResourceManager{TYPEOF(UDCTester)} AS System.ComponentModel.ComponentResourceManager SELF:tableLayoutPanel1 := System.Windows.Forms.TableLayoutPanel{} SELF:tbResult := System.Windows.Forms.TextBox{} SELF:tbSource := System.Windows.Forms.TextBox{} SELF:label1 := System.Windows.Forms.Label{} SELF:label2 := System.Windows.Forms.Label{} SELF:label3 := System.Windows.Forms.Label{} SELF:panel1 := System.Windows.Forms.Panel{} SELF:btnSettings := System.Windows.Forms.Button{} SELF:lblDialect := System.Windows.Forms.Label{} SELF:comboDialect := System.Windows.Forms.ComboBox{} SELF:chkStandardDefs := System.Windows.Forms.CheckBox{} SELF:OkButton := System.Windows.Forms.Button{} SELF:TestButton := System.Windows.Forms.Button{} SELF:tbUDC := System.Windows.Forms.TextBox{} SELF:tableLayoutPanel1:SuspendLayout() SELF:panel1:SuspendLayout() SELF:SuspendLayout() // // tableLayoutPanel1 // SELF:tableLayoutPanel1:AutoSizeMode := System.Windows.Forms.AutoSizeMode.GrowAndShrink SELF:tableLayoutPanel1:ColumnCount := 2 SELF:tableLayoutPanel1:ColumnStyles:Add(System.Windows.Forms.ColumnStyle{System.Windows.Forms.SizeType.Absolute, 75}) SELF:tableLayoutPanel1:ColumnStyles:Add(System.Windows.Forms.ColumnStyle{}) SELF:tableLayoutPanel1:Controls:Add(SELF:tbResult, 1, 2) SELF:tableLayoutPanel1:Controls:Add(SELF:tbSource, 1, 1) SELF:tableLayoutPanel1:Controls:Add(SELF:label1, 0, 0) SELF:tableLayoutPanel1:Controls:Add(SELF:label2, 0, 1) SELF:tableLayoutPanel1:Controls:Add(SELF:label3, 0, 2) SELF:tableLayoutPanel1:Controls:Add(SELF:panel1, 1, 3) SELF:tableLayoutPanel1:Controls:Add(SELF:tbUDC, 1, 0) SELF:tableLayoutPanel1:Dock := System.Windows.Forms.DockStyle.Fill SELF:tableLayoutPanel1:Location := System.Drawing.Point{0, 0} SELF:tableLayoutPanel1:Margin := System.Windows.Forms.Padding{2} SELF:tableLayoutPanel1:Name := "tableLayoutPanel1" SELF:tableLayoutPanel1:RowCount := 4 SELF:tableLayoutPanel1:RowStyles:Add(System.Windows.Forms.RowStyle{System.Windows.Forms.SizeType.Percent, 33.3333321}) SELF:tableLayoutPanel1:RowStyles:Add(System.Windows.Forms.RowStyle{System.Windows.Forms.SizeType.Percent, 33.3333359}) SELF:tableLayoutPanel1:RowStyles:Add(System.Windows.Forms.RowStyle{System.Windows.Forms.SizeType.Percent, 33.3333359}) SELF:tableLayoutPanel1:RowStyles:Add(System.Windows.Forms.RowStyle{System.Windows.Forms.SizeType.Absolute, 50}) SELF:tableLayoutPanel1:Size := System.Drawing.Size{1018, 597} SELF:tableLayoutPanel1:TabIndex := 0 // // tbResult // SELF:tbResult:Dock := System.Windows.Forms.DockStyle.Fill SELF:tbResult:Font := System.Drawing.Font{"Courier New", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:tbResult:Location := System.Drawing.Point{78, 367} SELF:tbResult:Multiline := true SELF:tbResult:Name := "tbResult" SELF:tbResult:ReadOnly := true SELF:tbResult:ScrollBars := System.Windows.Forms.ScrollBars.Vertical SELF:tbResult:Size := System.Drawing.Size{940, 176} SELF:tbResult:TabIndex := 7 // // tbSource // SELF:tbSource:AcceptsReturn := true SELF:tbSource:Dock := System.Windows.Forms.DockStyle.Fill SELF:tbSource:Font := System.Drawing.Font{"Courier New", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:tbSource:Location := System.Drawing.Point{78, 185} SELF:tbSource:Multiline := true SELF:tbSource:Name := "tbSource" SELF:tbSource:ScrollBars := System.Windows.Forms.ScrollBars.Vertical SELF:tbSource:Size := System.Drawing.Size{940, 176} SELF:tbSource:TabIndex := 6 SELF:tbSource:WordWrap := false // // label1 // SELF:label1:AutoSize := true SELF:label1:Font := System.Drawing.Font{"Microsoft Sans Serif", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:label1:Location := System.Drawing.Point{3, 0} SELF:label1:Name := "label1" SELF:label1:Size := System.Drawing.Size{44, 20} SELF:label1:TabIndex := 2 SELF:label1:Text := "UDC" // // label2 // SELF:label2:AutoSize := true SELF:label2:Font := System.Drawing.Font{"Microsoft Sans Serif", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:label2:Location := System.Drawing.Point{3, 182} SELF:label2:Name := "label2" SELF:label2:Size := System.Drawing.Size{64, 20} SELF:label2:TabIndex := 3 SELF:label2:Text := "Source:" // // label3 // SELF:label3:AutoSize := true SELF:label3:Font := System.Drawing.Font{"Microsoft Sans Serif", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:label3:Location := System.Drawing.Point{3, 364} SELF:label3:Name := "label3" SELF:label3:Size := System.Drawing.Size{55, 20} SELF:label3:TabIndex := 4 SELF:label3:Text := "Result" // // panel1 // SELF:panel1:Controls:Add(SELF:btnSettings) SELF:panel1:Controls:Add(SELF:lblDialect) SELF:panel1:Controls:Add(SELF:comboDialect) SELF:panel1:Controls:Add(SELF:chkStandardDefs) SELF:panel1:Controls:Add(SELF:OkButton) SELF:panel1:Controls:Add(SELF:TestButton) SELF:panel1:Dock := System.Windows.Forms.DockStyle.Fill SELF:panel1:Location := System.Drawing.Point{78, 549} SELF:panel1:Name := "panel1" SELF:panel1:Size := System.Drawing.Size{940, 45} SELF:panel1:TabIndex := 8 // // btnSettings // SELF:btnSettings:Font := System.Drawing.Font{"Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:btnSettings:Location := System.Drawing.Point{10, 7} SELF:btnSettings:Name := "btnSettings" SELF:btnSettings:Size := System.Drawing.Size{75, 31} SELF:btnSettings:TabIndex := 5 SELF:btnSettings:Text := "&Settings" SELF:btnSettings:UseVisualStyleBackColor := true SELF:btnSettings:Click += System.EventHandler{ SELF, @btnSettings_Click() } // // lblDialect // SELF:lblDialect:AutoSize := true SELF:lblDialect:Location := System.Drawing.Point{177, 16} SELF:lblDialect:Name := "lblDialect" SELF:lblDialect:Size := System.Drawing.Size{43, 13} SELF:lblDialect:TabIndex := 4 SELF:lblDialect:Text := "Dialect:" // // comboDialect // SELF:comboDialect:DropDownStyle := System.Windows.Forms.ComboBoxStyle.DropDownList SELF:comboDialect:FormattingEnabled := true SELF:comboDialect:Items:AddRange(<System.Object>{ "Core", "Vulcan", "VO", "FoxPro", "XPP", "Harbour" }) SELF:comboDialect:Location := System.Drawing.Point{226, 13} SELF:comboDialect:Name := "comboDialect" SELF:comboDialect:Size := System.Drawing.Size{222, 21} SELF:comboDialect:TabIndex := 3 // // chkStandardDefs // SELF:chkStandardDefs:AutoSize := true SELF:chkStandardDefs:Location := System.Drawing.Point{96, 15} SELF:chkStandardDefs:Name := "chkStandardDefs" SELF:chkStandardDefs:Size := System.Drawing.Size{77, 17} SELF:chkStandardDefs:TabIndex := 2 SELF:chkStandardDefs:Text := "/nostddefs" SELF:chkStandardDefs:UseVisualStyleBackColor := true // // OkButton // SELF:OkButton:Anchor := ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))) SELF:OkButton:Font := System.Drawing.Font{"Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:OkButton:Location := System.Drawing.Point{853, 7} SELF:OkButton:Name := "OkButton" SELF:OkButton:Size := System.Drawing.Size{75, 31} SELF:OkButton:TabIndex := 1 SELF:OkButton:Text := "&Close" SELF:OkButton:UseVisualStyleBackColor := true SELF:OkButton:Click += System.EventHandler{ SELF, @OkButton_Click() } // // TestButton // SELF:TestButton:Anchor := ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))) SELF:TestButton:Font := System.Drawing.Font{"Microsoft Sans Serif", 9.75, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:TestButton:Location := System.Drawing.Point{742, 7} SELF:TestButton:Name := "TestButton" SELF:TestButton:Size := System.Drawing.Size{75, 31} SELF:TestButton:TabIndex := 0 SELF:TestButton:Text := "&Test" SELF:TestButton:UseVisualStyleBackColor := true SELF:TestButton:Click += System.EventHandler{ SELF, @TestButton_Click() } // // tbUDC // SELF:tbUDC:AcceptsReturn := true SELF:tbUDC:Dock := System.Windows.Forms.DockStyle.Fill SELF:tbUDC:Font := System.Drawing.Font{"Courier New", 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((BYTE)(0))} SELF:tbUDC:Location := System.Drawing.Point{78, 3} SELF:tbUDC:Multiline := true SELF:tbUDC:Name := "tbUDC" SELF:tbUDC:ScrollBars := System.Windows.Forms.ScrollBars.Vertical SELF:tbUDC:Size := System.Drawing.Size{940, 176} SELF:tbUDC:TabIndex := 5 SELF:tbUDC:WordWrap := false // // UDCTester // SELF:AutoScaleDimensions := System.Drawing.SizeF{6, 13} SELF:AutoScaleMode := System.Windows.Forms.AutoScaleMode.Font SELF:ClientSize := System.Drawing.Size{1018, 597} SELF:Controls:Add(SELF:tableLayoutPanel1) SELF:Icon := ((System.Drawing.Icon)(resources:GetObject("$this.Icon"))) SELF:Margin := System.Windows.Forms.Padding{2} SELF:Name := "UDCTester" SELF:StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen SELF:Text := "UDCTester" SELF:tableLayoutPanel1:ResumeLayout(false) SELF:tableLayoutPanel1:PerformLayout() SELF:panel1:ResumeLayout(false) SELF:panel1:PerformLayout() SELF:ResumeLayout(false) #endregion END CLASS END NAMESPACE
xBase
3
orangesocks/XSharpPublic
Tools/UDCTester/UDCTester.Designer.prg
[ "Apache-2.0" ]
declare default element namespace "http://www.w3.org/1999/xhtml"; declare variable $specs := "xqft-usecases"; declare variable $sample := "xqft"; declare variable $stopwords := "xqft-sw.txt"; declare function local:getQueries() { for $ex in doc($specs)//div[@class = 'div3'] let $header := normalize-space($ex/h4/text()) return <query section="{ replace($header, " .*", "") }"> <xquery>{ local:getQuery($ex, 'xquery') }</xquery> <xpath>{ local:getQuery($ex, 'xpath') }</xpath> </query> }; declare function local:getQuery($node, $version) { let $string := concat('solution in ', $version, ':') let $qu := $node/p[lower-case(em) = $string]/following-sibling::*[1]/pre return replace(replace($qu, "http://bstore1.example.com/full-text.xml", $sample), "http://bstore1.example.com/StopWordList.xml", $stopwords) }; <results> { for $query in local:getQueries() let $xquery := $query/xquery/text() return <result section="{ $query/@section }"> <query>{ $xquery }</query>{ try { <output>{ basex:eval($xquery) }</output> } catch *($error) { <error>{ $error }</error> } } </result> } </results>
XQuery
4
JensErat/basex
basex-examples/src/main/resources/xml/xqft-usecases.xq
[ "BSD-3-Clause" ]
/// $Id: HplAtm128InterruptPinP.nc,v 1.7 2010-06-29 22:07:43 scipio Exp $ /* * Copyright (c) 2004-2005 Crossbow Technology, Inc. All 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 name of Crossbow Technology 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 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 COPYRIGHT HOLDER 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. */ /** * Interrupt interface access for interrupt capable GPIO pins. * * @author Martin Turon <mturon@xbow.com> */ generic module HplAtm128InterruptPinP (uint8_t ctrl_addr, uint8_t edge0bit, uint8_t edge1bit, uint8_t bit) @safe() { provides interface HplAtm128Interrupt as Irq; uses interface HplAtm128InterruptSig as IrqSignal; } implementation { inline async command bool Irq.getValue() { return (EIFR & (1 << bit)) != 0; } inline async command void Irq.clear() { EIFR = 1 << bit; } inline async command void Irq.enable() { EIMSK |= 1 << bit; } inline async command void Irq.disable() { EIMSK &= ~(1 << bit); } #define ctrl (*TCAST(volatile uint8_t * ONE, ctrl_addr)) inline async command void Irq.edge(bool low_to_high) { ctrl |= 1 << edge1bit; // use edge mode // and select rising vs falling if (low_to_high) ctrl |= 1 << edge0bit; else ctrl &= ~(1 << edge0bit); } /** * Forward the external interrupt event. This ties the statically * allocated interrupt vector SIG_INTERRUPT##bit to a particular * pin passed in via the generic component instantiation. */ async event void IrqSignal.fired() { signal Irq.fired(); } default async event void Irq.fired() { } }
nesC
5
mtaghiza/tinyos-main-1
tos/chips/atm128/pins/HplAtm128InterruptPinP.nc
[ "BSD-3-Clause" ]
import panel as Panel from './panel'; define foo extends Panel { @title > 'Foo title' @body { i > tt > 'Content' } }
Mask
3
atmajs/MaskJS
examples/components/foo.mask
[ "MIT" ]
B-aircraft_code B-airline_code B-airline_name B-airport_code B-airport_name B-arrive_date.date_relative B-arrive_date.day_name B-arrive_date.day_number B-arrive_date.month_name B-arrive_date.today_relative B-arrive_time.end_time B-arrive_time.period_mod B-arrive_time.period_of_day B-arrive_time.start_time B-arrive_time.time B-arrive_time.time_relative B-booking_class B-city_name B-class_type B-compartment B-connect B-cost_relative B-day_name B-day_number B-days_code B-depart_date.date_relative B-depart_date.day_name B-depart_date.day_number B-depart_date.month_name B-depart_date.today_relative B-depart_date.year B-depart_time.end_time B-depart_time.period_mod B-depart_time.period_of_day B-depart_time.start_time B-depart_time.time B-depart_time.time_relative B-economy B-fare_amount B-fare_basis_code B-flight B-flight_days B-flight_mod B-flight_number B-flight_stop B-flight_time B-fromloc.airport_code B-fromloc.airport_name B-fromloc.city_name B-fromloc.state_code B-fromloc.state_name B-meal B-meal_code B-meal_description B-mod B-month_name B-or B-period_of_day B-restriction_code B-return_date.date_relative B-return_date.day_name B-return_date.day_number B-return_date.month_name B-return_date.today_relative B-return_time.period_mod B-return_time.period_of_day B-round_trip B-state_code B-state_name B-stoploc.airport_code B-stoploc.airport_name B-stoploc.city_name B-stoploc.state_code B-time B-time_relative B-today_relative B-toloc.airport_code B-toloc.airport_name B-toloc.city_name B-toloc.country_name B-toloc.state_code B-toloc.state_name B-transport_type I-airline_name I-airport_name I-arrive_date.day_number I-arrive_time.end_time I-arrive_time.period_of_day I-arrive_time.start_time I-arrive_time.time I-arrive_time.time_relative I-city_name I-class_type I-cost_relative I-depart_date.day_name I-depart_date.day_number I-depart_date.today_relative I-depart_time.end_time I-depart_time.period_of_day I-depart_time.start_time I-depart_time.time I-depart_time.time_relative I-economy I-fare_amount I-fare_basis_code I-flight_mod I-flight_number I-flight_stop I-flight_time I-fromloc.airport_name I-fromloc.city_name I-fromloc.state_name I-meal_code I-meal_description I-mod I-restriction_code I-return_date.date_relative I-return_date.day_number I-return_date.today_relative I-round_trip I-state_name I-stoploc.city_name I-time I-today_relative I-toloc.airport_name I-toloc.city_name I-toloc.state_name I-transport_type O
Mathematica
1
burhandodhy/CNTK
Examples/LanguageUnderstanding/ATIS/BrainScript/slots.wl
[ "MIT" ]
# This file is a part of Julia. License is MIT: https://julialang.org/license using Test using LibCURL_jll @testset "LibCURL_jll" begin v = unsafe_string(ccall((:curl_version, libcurl), Cstring, ())) @test startswith(v, "libcurl/") end
Julia
4
vanillajonathan/julia
stdlib/LibCURL_jll/test/runtests.jl
[ "Zlib" ]
module com.networknt.cluster { exports com.networknt.cluster; requires com.networknt.balance; requires com.networknt.registry; requires com.networknt.service; requires com.networknt.utility; requires org.slf4j; }
Jasmin
3
KellyShao/light-4j
cluster/src/main/java/module-info.j
[ "Apache-2.0" ]
package com.alibaba.json.bvt.jdk8; import java.time.LocalDate; import java.util.Locale; import org.junit.Assert; import com.alibaba.fastjson.JSON; import junit.framework.TestCase; public class LocalDateTest5 extends TestCase { private Locale origin; protected void setUp() throws Exception { origin = Locale.getDefault(); } protected void tearDown() throws Exception { Locale.setDefault(origin); } public void test_for_tw() throws Exception { VO vo = JSON.parseObject("{\"date\":\"2016/05/06\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_jp() throws Exception { VO vo = JSON.parseObject("{\"date\":\"2016年5月6日\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_kr() throws Exception { VO vo = JSON.parseObject("{\"date\":\"2016년5월6일\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_us() throws Exception { VO vo = JSON.parseObject("{\"date\":\"05/26/2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(26, vo.date.getDayOfMonth()); } public void test_for_eur() throws Exception { VO vo = JSON.parseObject("{\"date\":\"26/05/2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(26, vo.date.getDayOfMonth()); } public void test_for_us_1() throws Exception { Locale.setDefault(Locale.US); VO vo = JSON.parseObject("{\"date\":\"05/06/2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(06, vo.date.getDayOfMonth()); } public void test_for_br() throws Exception { Locale.setDefault(new Locale("pt", "BR")); VO vo = JSON.parseObject("{\"date\":\"06/05/2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_au() throws Exception { Locale.setDefault(new Locale("en", "AU")); VO vo = JSON.parseObject("{\"date\":\"06/05/2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_de() throws Exception { Locale.setDefault(new Locale("pt", "BR")); VO vo = JSON.parseObject("{\"date\":\"06.05.2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public void test_for_in() throws Exception { VO vo = JSON.parseObject("{\"date\":\"06-05-2016\"}", VO.class); Assert.assertEquals(2016, vo.date.getYear()); Assert.assertEquals(5, vo.date.getMonthValue()); Assert.assertEquals(6, vo.date.getDayOfMonth()); } public static class VO { public LocalDate date; } }
Java
3
Czarek93/fastjson
src/test/java/com/alibaba/json/bvt/jdk8/LocalDateTest5.java
[ "Apache-2.0" ]
.. _routines.fft: .. automodule:: numpy.fft
reStructuredText
1
iam-abbas/numpy
doc/source/reference/routines.fft.rst
[ "BSD-3-Clause" ]
--TEST-- Cannot resume fiber within destructor --FILE-- <?php $fiber = new Fiber(function () { Fiber::suspend(); }); $fiber->start(); return new class ($fiber) { private $fiber; public function __construct(Fiber $fiber) { $this->fiber = $fiber; } public function __destruct() { $this->fiber->throw(new Error()); } }; ?> --EXPECTF-- Fatal error: Uncaught FiberError: Cannot switch fibers in current execution context in %sno-switch-dtor-throw.php:%d Stack trace: #0 %sno-switch-dtor-throw.php(%d): Fiber->throw(Object(Error)) #1 %sno-switch-dtor-throw.php(%d): class@anonymous->__destruct() #2 {main} thrown in %sno-switch-dtor-throw.php on line %d
PHP
3
NathanFreeman/php-src
Zend/tests/fibers/no-switch-dtor-throw.phpt
[ "PHP-3.01" ]
insert into various_types () values ();
SQL
0
WizardXiao/tidb
br/tests/lightning_generated_columns/data/gencol.various_types.0.sql
[ "Apache-2.0" ]
// Currently, the pattern matcher widens the type of the // scrutinee, so this doesn't typecheck. This test just // confirms this behaviour, although it would be an improvement // to change this and make this a `pos` test. // // But, to the intrepid hacker who works on this, a few notes: // You'll have to look into places in the pattern matcher that // call `dealias`, and see if they need to be `dealiasWiden`. object Test { val a = ""; var b: a.type = a b = b match { case x => x } }
Scala
3
jamesanto/scala
test/files/neg/t6771b.scala
[ "Apache-2.0" ]
Test ^^Superscript^^
Creole
1
jquorning/ada-wiki
regtests/expect/wiki-import/sup.creole
[ "Apache-2.0" ]
#include <console> b_main() { print("hello"); }
PAWN
1
pawn-lang/pawn
source/compiler/tests/gh_206_multiple_inputs_2.pwn
[ "Zlib" ]
<mat-card class="example-card"> <mat-card-subtitle>Dog Breed</mat-card-subtitle> <mat-card-title>Shiba Inu</mat-card-title> <mat-card-content> <p>This card has divider and indeterminate progress as footer</p> <p>{{ longText }}</p> </mat-card-content> <mat-divider inset></mat-divider> <mat-card-actions> <button mat-button>LIKE</button> <button mat-button>SHARE</button> </mat-card-actions> <mat-card-footer> <mat-progress-bar mode="indeterminate"></mat-progress-bar> </mat-card-footer> </mat-card>
HTML
4
tungyingwaltz/components
src/components-examples/material/card/card-footer/card-footer-example.html
[ "MIT" ]
/** * @file undgraphs.yap * @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan> * @date 2006 * * @brief Undirected Graph Processing Utilities. * * */ :- module( undgraphs, [ undgraph_add_edge/4, undgraph_add_edges/3, undgraph_add_vertices/3, undgraph_del_edge/4, undgraph_del_edges/3, undgraph_del_vertex/3, undgraph_del_vertices/3, undgraph_edges/2, undgraph_neighbors/3, undgraph_neighbours/3, undgraph_components/2, undgraph_min_tree/2]). /** @defgroup undgraphs Undirected Graphs @ingroup library @{ The following graph manipulation routines use the red-black tree graph library to implement undirected graphs. Mostly, this is done by having two directed edges per undirected edge. */ :- reexport(dgraphs, [ dgraph_new/1 as undgraph_new, dgraph_add_vertex/3 as undgraph_add_vertex, dgraph_vertices/2 as undgraph_vertices, dgraph_complement/2 as undgraph_complement, dgraph_symmetric_closure/2 as dgraph_to_undgraph, dgraph_edge/3 as undgraph_edge, dgraph_reachable/3 as undgraph_reachable ]). :- use_module(dgraphs, [ dgraph_add_edge/4, dgraph_add_edges/3, dgraph_add_vertices/3, dgraph_del_edge/4, dgraph_del_edges/3, dgraph_del_vertex/3, dgraph_del_vertices/3, dgraph_edges/2, dgraph_neighbors/3, dgraph_neighbours/3]). :- use_module(wundgraphs, [ undgraph_to_wundgraph/2, wundgraph_min_tree/3, wundgraph_max_tree/3, wundgraph_to_undgraph/2]). :- use_module(ordsets, [ ord_del_element/3, ord_union/3, ord_subtract/3]). :- use_module(rbtrees, [ rb_delete/4, rb_delete/3, rb_insert/4, rb_in/3, rb_partial_map/4 ]). /** @pred undgraph_new(+ _Graph_) Create a new directed graph. This operation must be performed before trying to use the graph. */ /** @pred undgraph_complement(+ _Graph_, - _NewGraph_) Unify _NewGraph_ with the graph complementary to _Graph_. */ /** @pred undgraph_vertices(+ _Graph_, - _Vertices_) Unify _Vertices_ with all vertices appearing in graph _Graph_. */ undgraph_add_edge(Vs0,V1,V2,Vs2) :- dgraphs:dgraph_new_edge(V1,V2,Vs0,Vs1), dgraphs:dgraph_new_edge(V2,V1,Vs1,Vs2). /** @pred undgraph_add_edges(+ _Graph_, + _Edges_, - _NewGraph_) Unify _NewGraph_ with a new graph obtained by adding the list of edges _Edges_ to the graph _Graph_. */ undgraph_add_edges(G0, Edges, GF) :- dup_edges(Edges, DupEdges), dgraph_add_edges(G0, DupEdges, GF). dup_edges([],[]). dup_edges([E1-E2|Edges], [E1-E2,E2-E1|DupEdges]) :- dup_edges(Edges, DupEdges). /** @pred undgraph_add_vertices(+ _Graph_, + _Vertices_, - _NewGraph_) Unify _NewGraph_ with a new graph obtained by adding the list of vertices _Vertices_ to the graph _Graph_. */ undgraph_add_vertices(G, [], G). undgraph_add_vertices(G0, [V|Vs], GF) :- dgraph_add_vertex(G0, V, GI), undgraph_add_vertices(GI, Vs, GF). /** @pred undgraph_edges(+ _Graph_, - _Edges_) Unify _Edges_ with all edges appearing in graph _Graph_. */ undgraph_edges(Vs,Edges) :- dgraph_edges(Vs,DupEdges), remove_dups(DupEdges,Edges). remove_dups([],[]). remove_dups([V1-V2|DupEdges],NEdges) :- V1 @< V2, !, NEdges = [V1-V2|Edges], remove_dups(DupEdges,Edges). remove_dups([_|DupEdges],Edges) :- remove_dups(DupEdges,Edges). /** @pred undgraph_neighbours(+ _Vertex_, + _Graph_, - _Vertices_) Unify _Vertices_ with the list of neighbours of vertex _Vertex_ in _Graph_. */ undgraph_neighbours(V,Vertices,Children) :- dgraph_neighbours(V,Vertices,Children0), ( ord_del_element(Children0,V,Children) -> true ; Children = Children0 ). undgraph_neighbors(V,Vertices,Children) :- dgraph_neighbors(V,Vertices,Children0), ( ord_del_element(Children0,V,Children) -> true ; Children = Children0 ). undgraph_del_edge(Vs0,V1,V2,VsF) :- dgraph_del_edge(Vs0,V1,V2,Vs1), dgraph_del_edge(Vs1,V2,V1,VsF). /** @pred undgraph_del_edges(+ _Graph_, + _Edges_, - _NewGraph_) Unify _NewGraph_ with a new graph obtained by removing the list of edges _Edges_ from the graph _Graph_. Notice that no vertices are deleted. */ undgraph_del_edges(G0, Edges, GF) :- dup_edges(Edges,DupEdges), dgraph_del_edges(G0, DupEdges, GF). undgraph_del_vertex(Vs0, V, Vsf) :- rb_delete(Vs0, V, BackEdges, Vsi), ( ord_del_element(BackEdges,V,RealBackEdges) -> true ; BackEdges = RealBackEdges ), rb_partial_map(Vsi, RealBackEdges, del_edge(V), Vsf). /** @pred undgraph_del_vertices(+ _Graph_, + _Vertices_, - _NewGraph_) Unify _NewGraph_ with a new graph obtained by deleting the list of vertices _Vertices_ and all the edges that start from or go to a vertex in _Vertices_ to the graph _Graph_. */ undgraph_del_vertices(G0, Vs, GF) :- sort(Vs,SortedVs), delete_all(SortedVs, [], BackEdges, G0, GI), ord_subtract(BackEdges, SortedVs, TrueBackEdges), delete_remaining_edges(SortedVs, TrueBackEdges, GI, GF). % it would be nice to be able to delete a set of elements from an RB tree % but I don't how to do it yet. delete_all([], BackEdges, BackEdges) --> []. delete_all([V|Vs], BackEdges0, BackEdgesF, Vs0,Vsf) :- rb_delete(Vs0, V, NewEdges, Vsi), ord_union(NewEdges,BackEdges0,BackEdgesI), delete_all(Vs, BackEdgesI ,BackEdgesF, Vsi,Vsf). delete_remaining_edges(SortedVs, TrueBackEdges, Vs0,Vsf) :- rb_partial_map(Vs0, TrueBackEdges, del_edges(SortedVs), Vsf). del_edges(ToRemove,E0,E) :- ord_subtract(E0,ToRemove,E). del_edge(ToRemove,E0,E) :- ord_del_element(E0,ToRemove,E). undgraph_min_tree(G, T) :- undgraph_to_wundgraph(G, WG), wundgraph_min_tree(WG, WT, _), wundgraph_to_undgraph(WT, T). undgraph_max_tree(G, T) :- undgraph_to_wundgraph(G, WG), wundgraph_max_tree(WG, WT, _), wundgraph_to_undgraph(WT, T). undgraph_components(Graph,[Map|Gs]) :- pick_node(Graph,Node,Children,Graph1), !, undgraph_new(Map0), rb_insert(Map0, Node, Children, Map1), expand_component(Children, Map1, Map, Graph1, NGraph), undgraph_components(NGraph,Gs). undgraph_components(_,[]). expand_component([], Map, Map, Graph, Graph). expand_component([C|Children], Map1, Map, Graph1, NGraph) :- rb_delete(Graph1, C, Edges, Graph2), !, rb_insert(Map1, C, Edges, Map2), expand_component(Children, Map2, Map3, Graph2, Graph3), expand_component(Edges, Map3, Map, Graph3, NGraph). expand_component([_|Children], Map1, Map, Graph1, NGraph) :- expand_component(Children, Map1, Map, Graph1, NGraph). pick_node(Graph,Node,Children,Graph1) :- rb_in(Node,Children,Graph), !, rb_delete(Graph, Node, Graph1). %% @}
Logtalk
5
PaulBrownMagic/logtalk3
library/graphs/undgraphs.lgt
[ "Apache-2.0" ]
% Copyright (c) Facebook, Inc. and its affiliates. % % This source code is licensed under the MIT license found in the % LICENSE file in the root directory of this source tree. -module(infer_parse_transform). -export([parse_transform/2]). -type forms() :: erl_parse:abstract_form() | erl_parse:form_info(). -spec parse_transform([forms()], [compile:option()]) -> [forms()]. parse_transform(Forms, Options) -> {infer_compiled_list_path, ListPath} = lists:keyfind(infer_compiled_list_path, 1, Options), FileName = case lists:keyfind(file, 3, Forms) of {attribute, _, file, {FilePath, _}} -> BaseName = filename:basename(FilePath), filename:rootname(BaseName) end, {outdir, BeamDir} = lists:keyfind(outdir, 1, Options), BeamFilePath = filename:join(BeamDir, FileName ++ ".beam"), {ok, Handle} = file:open(ListPath, [append]), io:format(Handle, "~p.~n", [BeamFilePath]), file:close(Handle), Forms.
Erlang
3
niranthhr/facebook_prj
infer/lib/erlang/infer_parse_transform/src/infer_parse_transform.erl
[ "MIT" ]
namespace OpenAPI.Tests open System open System.Net open System.Net.Http open System.IO open Microsoft.AspNetCore.Builder open Microsoft.AspNetCore.Hosting open Microsoft.AspNetCore.TestHost open Microsoft.Extensions.DependencyInjection open FSharp.Control.Tasks.V2.ContextInsensitive open Xunit open System.Text open TestHelper open OpenAPI.UserApiHandler open OpenAPI.UserApiHandlerParams module UserApiHandlerTestsHelper = let mutable CreateUserExamples = Map.empty let mutable CreateUserBody = "" CreateUserBody <- WebUtility.HtmlDecode "{ &quot;firstName&quot; : &quot;firstName&quot;, &quot;lastName&quot; : &quot;lastName&quot;, &quot;password&quot; : &quot;password&quot;, &quot;userStatus&quot; : 6, &quot;phone&quot; : &quot;phone&quot;, &quot;id&quot; : 0, &quot;email&quot; : &quot;email&quot;, &quot;username&quot; : &quot;username&quot; }" CreateUserExamples <- CreateUserExamples.Add("application/json", CreateUserBody) let getCreateUserExample mediaType = CreateUserExamples.[mediaType] |> getConverter mediaType let mutable CreateUsersWithArrayInputExamples = Map.empty let mutable CreateUsersWithArrayInputBody = "" CreateUsersWithArrayInputBody <- WebUtility.HtmlDecode "{ &quot;firstName&quot; : &quot;firstName&quot;, &quot;lastName&quot; : &quot;lastName&quot;, &quot;password&quot; : &quot;password&quot;, &quot;userStatus&quot; : 6, &quot;phone&quot; : &quot;phone&quot;, &quot;id&quot; : 0, &quot;email&quot; : &quot;email&quot;, &quot;username&quot; : &quot;username&quot; }" CreateUsersWithArrayInputExamples <- CreateUsersWithArrayInputExamples.Add("application/json", CreateUsersWithArrayInputBody) let getCreateUsersWithArrayInputExample mediaType = CreateUsersWithArrayInputExamples.[mediaType] |> getConverter mediaType let mutable CreateUsersWithListInputExamples = Map.empty let mutable CreateUsersWithListInputBody = "" CreateUsersWithListInputBody <- WebUtility.HtmlDecode "{ &quot;firstName&quot; : &quot;firstName&quot;, &quot;lastName&quot; : &quot;lastName&quot;, &quot;password&quot; : &quot;password&quot;, &quot;userStatus&quot; : 6, &quot;phone&quot; : &quot;phone&quot;, &quot;id&quot; : 0, &quot;email&quot; : &quot;email&quot;, &quot;username&quot; : &quot;username&quot; }" CreateUsersWithListInputExamples <- CreateUsersWithListInputExamples.Add("application/json", CreateUsersWithListInputBody) let getCreateUsersWithListInputExample mediaType = CreateUsersWithListInputExamples.[mediaType] |> getConverter mediaType () () () () let mutable UpdateUserExamples = Map.empty let mutable UpdateUserBody = "" UpdateUserBody <- WebUtility.HtmlDecode "{ &quot;firstName&quot; : &quot;firstName&quot;, &quot;lastName&quot; : &quot;lastName&quot;, &quot;password&quot; : &quot;password&quot;, &quot;userStatus&quot; : 6, &quot;phone&quot; : &quot;phone&quot;, &quot;id&quot; : 0, &quot;email&quot; : &quot;email&quot;, &quot;username&quot; : &quot;username&quot; }" UpdateUserExamples <- UpdateUserExamples.Add("application/json", UpdateUserBody) let getUpdateUserExample mediaType = UpdateUserExamples.[mediaType] |> getConverter mediaType
F#
3
MalcolmScoffable/openapi-generator
samples/server/petstore/fsharp-giraffe/OpenAPI.Tests/UserApiTestsHelper.fs
[ "Apache-2.0" ]
/* Copyright 2018 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. ==============================================================================*/ #ifndef TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_CANCELLABLE_CALL_H_ #define TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_CANCELLABLE_CALL_H_ #include <string> #include "tensorflow/core/distributed_runtime/call_options.h" #include "tensorflow/core/distributed_runtime/worker_cache.h" #include "tensorflow/core/framework/cancellation.h" #include "tensorflow/core/platform/mutex.h" namespace tensorflow { // Supports client side cancellation of WorkerInterface calls via // registration with a CancellationManager. class CancellableCall { public: CancellableCall(CancellationManager* cancel_mgr, const string& remote_worker, WorkerCacheInterface* wc) : is_cancelled_(false), cancel_mgr_(cancel_mgr), remote_worker_(remote_worker), wc_(wc), wi_(wc_->GetOrCreateWorker(remote_worker_)) {} virtual ~CancellableCall() { wc_->ReleaseWorker(remote_worker_, wi_); } virtual void IssueCall(const StatusCallback& done) = 0; void Start(const StatusCallback& done); // Cancels the RPC if it's not cancelled yet. This must be called after // Start(). This is normally used if there's a needed to cancel the RPC from a // sideband. If appliable, pass a cancellation manager to the constructor // instead of using this method. void Cancel() TF_LOCKS_EXCLUDED(mu_); protected: mutex mu_; bool is_cancelled_; CancellationManager* const cancel_mgr_; // Not owned const string remote_worker_; WorkerCacheInterface* const wc_; // Not owned WorkerInterface* const wi_; // Owned by wc_, must be released. CallOptions opts_; }; } // namespace tensorflow #endif // TENSORFLOW_CORE_DISTRIBUTED_RUNTIME_CANCELLABLE_CALL_H_
C
4
EricRemmerswaal/tensorflow
tensorflow/core/distributed_runtime/cancellable_call.h
[ "Apache-2.0" ]
/** @flow */ 'use strict'; const listAppUtils = require('./list-app-utils'); const devToolsUtils = require('./devtools-utils'); const {test, expect} = require('@playwright/test'); const config = require('../../playwright.config'); test.use(config); test.describe('Components', () => { let page; test.beforeEach(async ({browser}) => { page = await browser.newPage(); await page.goto('http://localhost:8080/e2e.html', { waitUntil: 'domcontentloaded', }); await page.waitForSelector('#iframe'); await devToolsUtils.clickButton(page, 'TabBarButton-components'); }); test('Should display initial React components', async () => { const appRowCount = await page.evaluate(() => { const {createTestNameSelector, findAllNodes} = window.REACT_DOM_APP; const container = document.getElementById('iframe').contentDocument; const rows = findAllNodes(container, [ createTestNameSelector('ListItem'), ]); return rows.length; }); expect(appRowCount).toBe(3); const devToolsRowCount = await devToolsUtils.getElementCount( page, 'ListItem' ); expect(devToolsRowCount).toBe(3); }); test('Should display newly added React components', async () => { await listAppUtils.addItem(page, 'four'); const count = await devToolsUtils.getElementCount(page, 'ListItem'); expect(count).toBe(4); }); test('Should allow elements to be inspected', async () => { // Select the first list item in DevTools. await devToolsUtils.selectElement(page, 'ListItem', 'List\nApp'); // Then read the inspected values. const [propName, propValue, sourceText] = await page.evaluate(() => { const {createTestNameSelector, findAllNodes} = window.REACT_DOM_DEVTOOLS; const container = document.getElementById('devtools'); const editableName = findAllNodes(container, [ createTestNameSelector('InspectedElementPropsTree'), createTestNameSelector('EditableName'), ])[0]; const editableValue = findAllNodes(container, [ createTestNameSelector('InspectedElementPropsTree'), createTestNameSelector('EditableValue'), ])[0]; const source = findAllNodes(container, [ createTestNameSelector('InspectedElementView-Source'), ])[0]; return [editableName.value, editableValue.value, source.innerText]; }); expect(propName).toBe('label'); expect(propValue).toBe('"one"'); expect(sourceText).toContain('ListApp.js'); }); test('should allow props to be edited', async () => { // Select the first list item in DevTools. await devToolsUtils.selectElement(page, 'ListItem', 'List\nApp'); // Then edit the label prop. await page.evaluate(() => { const {createTestNameSelector, focusWithin} = window.REACT_DOM_DEVTOOLS; const container = document.getElementById('devtools'); focusWithin(container, [ createTestNameSelector('InspectedElementPropsTree'), createTestNameSelector('EditableValue'), ]); }); page.keyboard.press('Backspace'); // " page.keyboard.press('Backspace'); // e page.keyboard.press('Backspace'); // n page.keyboard.press('Backspace'); // o page.keyboard.insertText('new"'); page.keyboard.press('Enter'); await page.waitForFunction(() => { const {createTestNameSelector, findAllNodes} = window.REACT_DOM_APP; const container = document.getElementById('iframe').contentDocument; const rows = findAllNodes(container, [ createTestNameSelector('ListItem'), ])[0]; return rows.innerText === 'new'; }); }); test('should load and parse hook names for the inspected element', async () => { // Select the List component DevTools. await devToolsUtils.selectElement(page, 'List', 'App'); // Then click to load and parse hook names. await devToolsUtils.clickButton(page, 'LoadHookNamesButton'); // Make sure the expected hook names are parsed and displayed eventually. await page.waitForFunction( hookNames => { const { createTestNameSelector, findAllNodes, } = window.REACT_DOM_DEVTOOLS; const container = document.getElementById('devtools'); const hooksTree = findAllNodes(container, [ createTestNameSelector('InspectedElementHooksTree'), ])[0]; if (!hooksTree) { return false; } const hooksTreeText = hooksTree.innerText; for (let i = 0; i < hookNames.length; i++) { if (!hooksTreeText.includes(hookNames[i])) { return false; } } return true; }, ['State(items)', 'Ref(inputRef)'] ); }); test('should allow searching for component by name', async () => { async function getComponentSearchResultsCount() { return await page.evaluate(() => { const { createTestNameSelector, findAllNodes, } = window.REACT_DOM_DEVTOOLS; const container = document.getElementById('devtools'); const element = findAllNodes(container, [ createTestNameSelector('ComponentSearchInput-ResultsCount'), ])[0]; return element.innerText; }); } await page.evaluate(() => { const {createTestNameSelector, focusWithin} = window.REACT_DOM_DEVTOOLS; const container = document.getElementById('devtools'); focusWithin(container, [ createTestNameSelector('ComponentSearchInput-Input'), ]); }); page.keyboard.insertText('List'); let count = await getComponentSearchResultsCount(); expect(count).toBe('1 | 4'); page.keyboard.insertText('Item'); count = await getComponentSearchResultsCount(); expect(count).toBe('1 | 3'); page.keyboard.press('Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('2 | 3'); page.keyboard.press('Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('3 | 3'); page.keyboard.press('Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('1 | 3'); page.keyboard.press('Shift+Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('3 | 3'); page.keyboard.press('Shift+Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('2 | 3'); page.keyboard.press('Shift+Enter'); count = await getComponentSearchResultsCount(); expect(count).toBe('1 | 3'); }); });
JavaScript
5
GBKstc/react-analysis
packages/react-devtools-inline/__tests__/__e2e__/components.test.js
[ "MIT" ]