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
sequencelengths 1
8
|
---|---|---|---|---|---|
@0xbbfd48ae4b99d013;
using CSharp = import "/csharp.capnp";
struct SomeStruct $CSharp.name("CsStruct") {
someField @0 : Int32 $CSharp.name("CsField");
someUnion : union $CSharp.name("CsUnion") {
u0 @1 : Int32;
u1 @2 : Int32;
}
someGroup : group $CSharp.name("CsGroup") {
g0 @3 : Int32;
g1 @4 : Int32;
}
}
enum SomeEnum $CSharp.name("CsEnum") {
someEnumerant @0 $CSharp.name("CsEnumerant");
}
interface SomeInterface $CSharp.name("CsInterface") {
someMethod @0 () -> (someResult :Bool $CSharp.name("CsResult") ) $CSharp.name("CsMethod");
}
| Cap'n Proto | 3 | FabInfra/capnproto-dotnetcore_Runtime | CapnpC.CSharp.Generator.Tests/No Resources/UnitTest15.capnp | [
"MIT"
] |
--TEST--
Bug #70398 (SIGSEGV, Segmentation fault zend_ast_destroy_ex)
--FILE--
<?php
define("FILE_STREAM", fopen("php://temp", "r"));
define("FILE_STREAMS", array(fopen("php://temp", "r")));
var_dump(FILE_STREAM);
var_dump(FILE_STREAMS);
?>
--EXPECTF--
resource(%d) of type (stream)
array(1) {
[0]=>
resource(%d) of type (stream)
}
| PHP | 3 | thiagooak/php-src | Zend/tests/bug70398.phpt | [
"PHP-3.01"
] |
<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="a" uri="/WEB-INF/app.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="res" uri="http://www.unidal.org/webres"%>
<%@ taglib prefix="w" uri="http://www.unidal.org/web/core"%>
<jsp:useBean id="ctx" type="com.dianping.cat.system.page.web.Context" scope="request"/>
<jsp:useBean id="payload" type="com.dianping.cat.system.page.web.Payload" scope="request"/>
<jsp:useBean id="model" type="com.dianping.cat.system.page.web.Model" scope="request"/>
<a:web_body>
<script type="text/javascript">
$(document).ready(function() {
$('#Web_config').addClass('active open');
$('#urlPatterns').addClass('active');
});
</script>
<table class="table table-striped table-condensed table-bordered table-hover" id="contents" width="100%">
<thead>
<tr >
<th width="15%">唯一ID</th>
<th width="15%">属于组</th>
<th width="42%">Pattern内容</th>
<th width="15%">项目名</th>
<th width="8%">操作 <a href="?op=urlPatternUpdate" class="btn btn-primary btn-xs" >
<i class="ace-icon glyphicon glyphicon-plus bigger-120"></i></a></th>
</tr></thead><tbody>
<c:forEach var="item" items="${model.patternItems}"
varStatus="status">
<tr class="">
<td>${item.value.name}</td>
<td>${item.value.group}</td>
<td>${item.value.pattern}</td>
<td>${item.value.domain}</td>
<td><a href="?op=urlPatternUpdate&key=${item.value.name}" class="btn btn-primary btn-xs">
<i class="ace-icon fa fa-pencil-square-o bigger-120"></i></a>
<a href="?op=urlPatternDelete&key=${item.value.name}" class="btn btn-danger btn-xs delete" >
<i class="ace-icon fa fa-trash-o bigger-120"></i></a></td>
</tr>
</c:forEach></tbody>
</tbody>
</table>
</a:web_body>
| Java Server Pages | 3 | woozhijun/cat | cat-home/src/main/webapp/jsp/system/urlPattern/urlPattern.jsp | [
"Apache-2.0"
] |
very pawseStart is true
| Dogescript | 0 | erinkeith/dogescript | test/spec/statements/pawse/as-identifier-start/source.djs | [
"MIT"
] |
package com.baeldung.tagging;
import java.util.List;
/**
* Model for a blog post.
*
* @author Donato Rimenti
*
*/
public class Post {
/**
* Title of the post. Must be unique.
*/
private String title;
/**
* Author of the post.
*/
private String author;
/**
* Tags of the post.
*/
private List<String> tags;
/**
* Gets the {@link #title}.
*
* @return the {@link #title}
*/
public String getTitle() {
return title;
}
/**
* Sets the {@link #title}.
*
* @param title
* the new {@link #title}
*/
public void setTitle(String title) {
this.title = title;
}
/**
* Gets the {@link #author}.
*
* @return the {@link #author}
*/
public String getAuthor() {
return author;
}
/**
* Sets the {@link #author}.
*
* @param author
* the new {@link #author}
*/
public void setAuthor(String author) {
this.author = author;
}
/**
* Gets the {@link #tags}.
*
* @return the {@link #tags}
*/
public List<String> getTags() {
return tags;
}
/**
* Sets the {@link #tags}.
*
* @param tags
* the new {@link #tags}
*/
public void setTags(List<String> tags) {
this.tags = tags;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((author == null) ? 0 : author.hashCode());
result = prime * result + ((tags == null) ? 0 : tags.hashCode());
result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Post other = (Post) obj;
if (author == null) {
if (other.author != null)
return false;
} else if (!author.equals(other.author))
return false;
if (tags == null) {
if (other.tags != null)
return false;
} else if (!tags.equals(other.tags))
return false;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
return true;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "Post [title=" + title + ", author=" + author + ", tags=" + tags + "]";
}
}
| Java | 5 | zeesh49/tutorials | persistence-modules/java-mongodb/src/main/java/com/baeldung/tagging/Post.java | [
"MIT"
] |
#define LED 13
void setup() {
Serial.begin(9600);
Serial.print("\r\nStart");
pinMode(LED, OUTPUT);
// Turn it off for now.
digitalWrite(LED, LOW);
}
int incomingByte = 0;
void loop() {
// Check if there's a serial message waiting.
if (Serial.available() > 0) {
// If there is, read the incoming byte.
incomingByte = Serial.read();
if (incomingByte == 'y') {
digitalWrite(LED, HIGH);
} else if (incomingByte == 'n') {
digitalWrite(LED, LOW);
}
Serial.println(incomingByte);
}
}
| Arduino | 4 | HannesGitH/chrome-extensions-samples | apps/samples/serial/ledtoggle/sketches/serial_light/serial_light.ino | [
"Apache-2.0"
] |
package {
public class Test {
}
}
var a = [1, 2, 3, 4, 5];
for each(var i in a) {
trace(i)
} | ActionScript | 3 | Sprak1/ruffle | tests/tests/swfs/avm2/array_enumeration/Test.as | [
"Apache-2.0",
"Unlicense"
] |
<!DOCTYPE html>
<!--
* Copyright 2020 The Lighthouse 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.
-->
<html>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
<body>
Request Idle Callback Shim Smoke Test
<script>
let count = 0;
const iterations = 40;
let ricTaskDuration = 0;
if (window.location.search.includes('short')) {
ricTaskDuration = 1;
}
if (window.location.search.includes('long')) {
ricTaskDuration = 55; // ensure every task gets counted as a long task by PerformanceObserver
}
function sleep(milliseconds = 0) {
const timeStart = Date.now();
while (true) {
let elapsedTime = Date.now() - timeStart;
if (elapsedTime >= milliseconds) {
break;
}
}
}
function task(deadline) {
while (deadline.timeRemaining() > 0) {
sleep(ricTaskDuration);
}
if (count < iterations - 1) {
count++;
requestIdleCallback(task);
}
}
requestIdleCallback(task);
</script>
</body>
</html>
| HTML | 4 | martin-maunoury/lighthouse | lighthouse-cli/test/fixtures/ric-shim.html | [
"Apache-2.0"
] |
⍝ Calculate the sum of all multiples of 3 or 5 below 1000
f ← {+/⍵×(0=3|⍵)∨0=5|⍵}
sumbelow ← {f⍳⍵-1}
⎕ ← sumbelow 10 ⍝ → 23
sumbelow 1000 ⍝ → 233168
| APL | 4 | melsman/apltail | tests/sum35.apl | [
"MIT"
] |
%p
= _("Group %{group_name} couldn't be exported.") % { group_name: @group.name }
%p
= _('The errors we encountered were:')
%ul
- @errors.each do |error|
%li
#{error}
| Haml | 3 | glimmerhq/glimmerhq | app/views/notify/group_was_not_exported_email.html.haml | [
"MIT"
] |
// RUN: %target-typecheck-verify-swift
struct Pair<A, B> {
var a: A
var b: B
}
extension Pair: Codable where A: Codable, B: Codable {}
extension Pair: Collection where A == B {
// expected-error@-1 {{conditional conformance of type 'Pair<A, B>' to protocol 'Collection' does not imply conformance to inherited protocol 'Sequence'}}
// expected-note@-2 {{did you mean to explicitly state the conformance like 'extension Pair: Sequence where ...'?}}
typealias Element = A
var startIndex: Int { return 0 }
var endIndex: Int { return 2 }
subscript(index: Int) -> Element {
switch index {
case 0: return self.a
case 1: return self.b
default: fatalError("Index out of bounds.")
}
}
func index(after i: Int) -> Int {
precondition(i < endIndex, "Can't advance beyond endIndex")
return i + 1
}
}
| Swift | 4 | gandhi56/swift | test/decl/protocol/req/associated_type_inference_proto_ext.swift | [
"Apache-2.0"
] |
<html>
<head>
<meta name="go-import" content="gohugo.io/npmjs mod http://localhost:8072">
</head>
<body></body>
</html>
| HTML | 1 | jfecher/hugo | docs/static/npmjs/index.html | [
"Apache-2.0"
] |
\begin{code}
{-# LANGUAGE MagicHash #-}
import GHC.Exts
import Types
import Append
main = putStr (show (append_FC_L_L (FC2 a_ a_) []))
where a_ = case 'a' of { C# x -> x }
\end{code}
| Literate Haskell | 2 | ocharles/ghc | testsuite/tests/programs/cvh_unboxing/Main.lhs | [
"BSD-3-Clause"
] |
#include "script_component.hpp"
/*
Name: TFAR_fnc_canUseDDRadio
Author: NKey
Checks whether it is possible for the DD radio to be used at the current height and isolated status.
Arguments:
0: Eye height ASL <NUMBER>
1: Isolated and inside <BOOL>
Return Value:
radio can be used <BOOL>
Example:
_canUseDD = [-12,true] call TFAR_fnc_canUseDDRadio;
Public: Yes
*/
params ["_depth", "_isolated_and_inside"];
(_depth < 0) and !(_isolated_and_inside) and {call TFAR_fnc_haveDDRadio}
| SQF | 4 | MrDj200/task-force-arma-3-radio | addons/core/functions/fnc_canUseDDRadio.sqf | [
"RSA-MD"
] |
package com.baeldung.jgit.porcelain;
import java.io.IOException;
import com.baeldung.jgit.helper.Helper;
import org.eclipse.jgit.api.Git;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Simple snippet which shows how to get the commit-ids for a file to provide log information.
*
*
*/
public class Log {
private static final Logger logger = LoggerFactory.getLogger(Log.class);
@SuppressWarnings("unused")
public static void main(String[] args) throws IOException, GitAPIException {
try (Repository repository = Helper.openJGitRepository()) {
try (Git git = new Git(repository)) {
Iterable<RevCommit> logs = git.log()
.call();
int count = 0;
for (RevCommit rev : logs) {
logger.trace("Commit: " + rev /* + ", name: " + rev.getName() + ", id: " + rev.getId().getName() */);
count++;
}
logger.debug("Had " + count + " commits overall on current branch");
logs = git.log()
.add(repository.resolve(git.getRepository().getFullBranch()))
.call();
count = 0;
for (RevCommit rev : logs) {
logger.trace("Commit: " + rev /* + ", name: " + rev.getName() + ", id: " + rev.getId().getName() */);
count++;
}
logger.debug("Had " + count + " commits overall on "+git.getRepository().getFullBranch());
logs = git.log()
.all()
.call();
count = 0;
for (RevCommit rev : logs) {
logger.trace("Commit: " + rev /* + ", name: " + rev.getName() + ", id: " + rev.getId().getName() */);
count++;
}
logger.debug("Had " + count + " commits overall in repository");
logs = git.log()
// for all log.all()
.addPath("README.md")
.call();
count = 0;
for (RevCommit rev : logs) {
logger.trace("Commit: " + rev /* + ", name: " + rev.getName() + ", id: " + rev.getId().getName() */);
count++;
}
logger.debug("Had " + count + " commits on README.md");
logs = git.log()
// for all log.all()
.addPath("pom.xml")
.call();
count = 0;
for (RevCommit rev : logs) {
logger.trace("Commit: " + rev /* + ", name: " + rev.getName() + ", id: " + rev.getId().getName() */);
count++;
}
logger.debug("Had " + count + " commits on pom.xml");
}
}
}
}
| Java | 4 | DBatOWL/tutorials | jgit/src/main/java/com/baeldung/jgit/porcelain/Log.java | [
"MIT"
] |
import "std/string"
import "std/assert"
import "std/os"
const verbose = isString(os.env()['VERBOSE_TEST'])
const exports = {
"fatal": true,
"assertLib": assert,
}
const run = fn(desc, func) {
let cleanup = nil
if len(arguments) > 0: cleanup = arguments[0]
if verbose: println("Test: ", desc)
try {
func(exports.assertLib)
if !isNil(cleanup): cleanup()
} catch e {
if !isNil(cleanup): cleanup()
printerrln(string.format("Test '{}' failed: {}", desc, e))
if exports.fatal: exit(1)
}
}
exports.run = run
return exports
| Inform 7 | 3 | lfkeitel/nitrogen | nitrogen/std/test.ni | [
"BSD-3-Clause"
] |
DO $$ DECLARE
r RECORD;
BEGIN
FOR r IN (SELECT viewname FROM pg_views WHERE schemaname = 'hdb_views' ORDER BY viewname) LOOP
EXECUTE 'DROP VIEW IF EXISTS hdb_views.' || quote_ident(r.viewname) || ' CASCADE';
END LOOP;
END $$;
| SQL | 4 | gh-oss-contributor/graphql-engine-1 | server/src-rsr/migrations/33_to_34.sql | [
"Apache-2.0",
"MIT"
] |
// Copyright 2019 The MediaPipe 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.
#import "mediapipe/gpu/MPPMetalUtil.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
@implementation MPPMetalUtil
+ (void)blitMetalBufferTo:(id<MTLBuffer>)destination
from:(id<MTLBuffer>)source
blocking:(bool)blocking
commandBuffer:(id<MTLCommandBuffer>)commandBuffer {
size_t bytes = MIN(destination.length, source.length);
[self blitMetalBufferTo:destination
destinationOffset:0
from:source
sourceOffset:0
bytes:bytes
blocking:blocking
commandBuffer:commandBuffer];
}
+ (void)blitMetalBufferTo:(id<MTLBuffer>)destination
destinationOffset:(int)destinationOffset
from:(id<MTLBuffer>)source
sourceOffset:(int)sourceOffset
bytes:(size_t)bytes
blocking:(bool)blocking
commandBuffer:(id<MTLCommandBuffer>)commandBuffer {
id<MTLBlitCommandEncoder> blit_command = [commandBuffer blitCommandEncoder];
[blit_command copyFromBuffer:source
sourceOffset:sourceOffset
toBuffer:destination
destinationOffset:destinationOffset
size:bytes];
[blit_command endEncoding];
if (blocking) {
[MPPMetalUtil commitCommandBufferAndWait:commandBuffer];
} else {
[commandBuffer commit];
}
}
+ (void)commitCommandBufferAndWait:(id<MTLCommandBuffer>)commandBuffer {
#if !defined(MEDIAPIPE_DISABLE_ACTIVE_WAIT)
// The bufferCompleted variable doesn't require atomic access.
// std::atomic<> can't be used here because the variable must be captured
// with the block. Also std::atomic<> orders changes of the variable but
// in this case any kind of out-of-order execution will be serialized.
__block volatile bool bufferCompleted = false;
[commandBuffer addCompletedHandler:^(id<MTLCommandBuffer>) {
bufferCompleted = true;
}];
[commandBuffer commit];
absl::Time start_time = absl::Now();
while (!bufferCompleted) {
auto duration = absl::Now() - start_time;
// If the spin-lock takes more than 5 ms then go to blocking wait:
// - it frees the CPU core for another threads: increase the performance/decrease power
// consumption.
// - if a driver thread that notifies that the GPU buffer is completed has lower priority then
// the CPU core is allocated for the thread.
if (duration >= absl::Milliseconds(5)) {
[commandBuffer waitUntilCompleted];
break;
}
}
#else
[commandBuffer commit];
[commandBuffer waitUntilCompleted];
#endif
}
@end
| Objective-C++ | 4 | virdio/mediapipe | mediapipe/gpu/MPPMetalUtil.mm | [
"Apache-2.0"
] |
-- Copyright 2016-2018 The Howl Developers
-- License: MIT (see LICENSE.md at the top-level directory of the distribution)
{:activities, :Buffer, :config, :mode, :sys} = howl
{:Process} = howl.io
bundle_load 'go_completer'
{:fmt} = bundle_load 'go_fmt'
{
auto_pairs: {
'(': ')'
'[': ']'
'{': '}'
'"': '"'
"'": "'"
"`": "`"
}
comment_syntax: '//'
completers: { 'in_buffer', 'go_completer' }
default_config:
use_tabs: true
tab_width: 4
indent: 4
inspectors_on_save: { 'golint', 'gotoolvet' }
lexer: bundle_load('go_lexer')
structure: (editor) =>
[l for l in *editor.buffer.lines when l\match('^%s*func%s') or l\match('^%s*struct%s') or l\match('^%s*type%s')]
before_save: (buffer) =>
if config.go_fmt_on_save
fmt buffer
show_doc: (editor) =>
cmd_path = config.gogetdoc_path
unless sys.find_executable cmd_path
log.warning "Command '#{cmd_path}' not found, please install for docs"
return
buffer = editor.buffer
cmd_str = string.format "#{cmd_path} -pos %s:#%d -modified -linelength 999",
buffer.file,
buffer\byte_offset(editor.cursor.pos) - 2
success, pco = pcall Process.open_pipe, cmd_str, {
stdin: string.format("%s\n%d\n%s", buffer.file, buffer.size, buffer.text)
}
unless success
log.error "Failed looking up docs: #{pco}"
return
stdout, _ = activities.run_process {title: 'running gogetdoc'}, pco
unless stdout.is_empty
buf = Buffer mode.by_name 'default'
buf.text = stdout
return buf
}
| MoonScript | 3 | jasperpilgrim/howl | bundles/go/go_mode.moon | [
"MIT"
] |
<button [disabled]="isDisabled" [ngClass]="classes" #buttonRef>
<img
width="100"
src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4xLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAyNTAgMjUwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAyNTAgMjUwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDojREQwMDMxO30NCgkuc3Qxe2ZpbGw6I0MzMDAyRjt9DQoJLnN0MntmaWxsOiNGRkZGRkY7fQ0KPC9zdHlsZT4NCjxnPg0KCTxwb2x5Z29uIGNsYXNzPSJzdDAiIHBvaW50cz0iMTI1LDMwIDEyNSwzMCAxMjUsMzAgMzEuOSw2My4yIDQ2LjEsMTg2LjMgMTI1LDIzMCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAJIi8+DQoJPHBvbHlnb24gY2xhc3M9InN0MSIgcG9pbnRzPSIxMjUsMzAgMTI1LDUyLjIgMTI1LDUyLjEgMTI1LDE1My40IDEyNSwxNTMuNCAxMjUsMjMwIDEyNSwyMzAgMjAzLjksMTg2LjMgMjE4LjEsNjMuMiAxMjUsMzAgCSIvPg0KCTxwYXRoIGNsYXNzPSJzdDIiIGQ9Ik0xMjUsNTIuMUw2Ni44LDE4Mi42aDBoMjEuN2gwbDExLjctMjkuMmg0OS40bDExLjcsMjkuMmgwaDIxLjdoMEwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMUwxMjUsNTIuMQ0KCQlMMTI1LDUyLjF6IE0xNDIsMTM1LjRIMTA4bDE3LTQwLjlMMTQyLDEzNS40eiIvPg0KPC9nPg0KPC9zdmc+DQo="
/>
{{ label }}
</button>
| HTML | 3 | asksyllable/storybook | examples/angular-cli/src/stories/addons/docs/doc-button/doc-button.component.html | [
"MIT"
] |
%%
%unicode 6.3
%public
%class UnicodeScripts_6_3_extensions_1
%type int
%standalone
%include ../../resources/common-unicode-all-enumerated-property-defined-values-only-java
%%
<<EOF>> { printOutput(); return 1; }
\p{Script_Extensions:Arabic} { setCurCharPropertyValue("Script_Extensions:Arabic"); }
\p{Script_Extensions:Armenian} { setCurCharPropertyValue("Script_Extensions:Armenian"); }
\p{Script_Extensions:Bengali} { setCurCharPropertyValue("Script_Extensions:Bengali"); }
\p{Script_Extensions:Bopomofo} { setCurCharPropertyValue("Script_Extensions:Bopomofo"); }
\p{Script_Extensions:Buginese} { setCurCharPropertyValue("Script_Extensions:Buginese"); }
\p{Script_Extensions:Buhid} { setCurCharPropertyValue("Script_Extensions:Buhid"); }
\p{Script_Extensions:Cypriot} { setCurCharPropertyValue("Script_Extensions:Cypriot"); }
\p{Script_Extensions:Cyrillic} { setCurCharPropertyValue("Script_Extensions:Cyrillic"); }
\p{Script_Extensions:Greek} { setCurCharPropertyValue("Script_Extensions:Greek"); }
\p{Script_Extensions:Gujarati} { setCurCharPropertyValue("Script_Extensions:Gujarati"); }
\p{Script_Extensions:Mongolian} { setCurCharPropertyValue("Script_Extensions:Mongolian"); }
\p{Script_Extensions:Myanmar} { setCurCharPropertyValue("Script_Extensions:Myanmar"); }
[^] { }
| JFlex | 3 | Mivik/jflex | testsuite/testcases/src/test/cases/unicode-scripts/UnicodeScripts_6_3_extensions_1.flex | [
"BSD-3-Clause"
] |
div.svelte-xyz.svelte-xyz.bar{color:red}.foo.svelte-xyz.svelte-xyz.bar{color:red}.foo.svelte-xyz.bar span.svelte-xyz{color:red} | CSS | 0 | vatro/svelte | test/css/samples/global-compound-selector/expected.css | [
"MIT"
] |
#?RADIANCE
oconv ../brightball.rad
FORMAT=Radiance_octree
-1.00001 -1.00001 9.99999 2.00002 ../brightball.rad | Octave | 2 | SIMPLE-BuildingSimulation/rendering | test_data/images/ball.oct | [
"MIT"
] |
.App {
font-family: Arial, sans-serif;
max-width: 420px;
margin: 0 auto;
font-size: 1.5rem;
padding: 30px;
border-radius: 8px;
background: white;
line-height: 1;
}
body {
padding: 50px;
}
.add-todo {
display: flex;
width: 100%;
border-radius: 6px;
overflow: hidden;
border: 4px solid #313d52;
margin-bottom: 2rem;
}
.todos {
margin-top: 20px;
}
.todo {
padding-right: 1em;
cursor: pointer;
background: #eef1f6;
border-radius: 0.5rem;
margin-bottom: 1em;
font-size: 1.2rem;
box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.1);
display: flex;
align-items: center;
justify-content: space-between;
color: #313d52;
}
.todo_title {
flex-grow: 1;
padding: 1em;
}
.todo_remove {
background: #dde3ed;
width: 2em;
height: 2em;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
color: #6d7e9b;
}
.completed {
color: #a0aec0;
}
.completed .todo_title {
text-decoration: line-through;
}
button,
input {
display: block;
border: none;
overflow: hidden;
font-size: 1.2rem;
}
input {
flex-grow: 1;
padding: 1rem;
line-height: 1;
display: block;
color: #313d52;
}
button {
padding: 1rem;
flex-shrink: 0;
background: #313d52;
border: none;
color: white;
}
.no-todos {
color: #a0aec0;
font-size: 2rem;
}
* {
box-sizing: border-box;
}
| CSS | 4 | bkucera2/cypress | npm/react/cypress/component/advanced/radioactive-state/todos/todos.css | [
"MIT"
] |
\ @(#) t_corex.fth 98/03/16 1.2
\ Test ANS Forth Core Extensions
\
\ Copyright 1994 3DO, Phil Burk
INCLUDE? }T{ t_tools.fth
ANEW TASK-T_COREX.FTH
DECIMAL
\ STUB because missing definition in pForth - FIXME
: SAVE-INPUT ;
: RESTORE-INPUT -1 ;
TEST{
\ ==========================================================
T{ 1 2 3 }T{ 1 2 3 }T
\ ----------------------------------------------------- .(
T{ 27 .( IF YOU SEE THIS THEN .( WORKED!) }T{ 27 }T
CR .( 1234 - SHOULD LINE UP WITH NEXT LINE.) CR 1234 8 .R CR
T{ .( ) 987 .( TEST NULL STRING IN .( ) CR }T{ 987 }T
\ ----------------------------------------------------- 0<>
T{ 5 0<> }T{ TRUE }T
T{ 0 0<> }T{ 0 }T
T{ -1000 0<> }T{ TRUE }T
\ ----------------------------------------------------- 2>R 2R> 2R@
: T2>R ( -- .... )
17
20 5 2>R
19
2R@
37
2R>
\ 2>R should be the equivalent of SWAP >R >R so this next construct
\ should reduce to a SWAP.
88 77 2>R R> R>
;
T{ T2>R }T{ 17 19 20 5 37 20 5 77 88 }T
\ ----------------------------------------------------- :NONAME
T{ :NONAME 100 50 + ; EXECUTE }T{ 150 }T
\ ----------------------------------------------------- <>
T{ 12345 12305 <> }T{ TRUE }T
T{ HEX 98765432 98765432 DECIMAL <> }T{ 0 }T
\ ----------------------------------------------------- ?DO
: T?DO ( n -- sum_n ) 0 SWAP 1+ 0 ?DO i + LOOP ;
T{ 0 T?DO }T{ 0 }T
T{ 4 T?DO }T{ 10 }T
\ ----------------------------------------------------- AGAIN
: T.AGAIN ( n -- )
BEGIN
DUP .
DUP 6 < IF EXIT THEN
1-
AGAIN
;
T{ 10 T.AGAIN CR }T{ 5 }T
\ ----------------------------------------------------- C"
: T.C" ( -- $STRING )
C" x5&"
;
T{ T.C" C@ }T{ 3 }T
T{ T.C" COUNT DROP C@ }T{ CHAR x }T
T{ T.C" COUNT DROP CHAR+ C@ }T{ CHAR 5 }T
T{ T.C" COUNT DROP 2 CHARS + C@ }T{ CHAR & }T
\ ----------------------------------------------------- CASE
: T.CASE ( N -- )
CASE
1 OF 101 ENDOF
27 OF 892 ENDOF
941 SWAP \ default
ENDCASE
;
T{ 1 T.CASE }T{ 101 }T
T{ 27 T.CASE }T{ 892 }T
T{ 49 T.CASE }T{ 941 }T
\ ----------------------------------------------------- COMPILE,
: COMPILE.SWAP ['] SWAP COMPILE, ; IMMEDIATE
: T.COMPILE,
19 20 27 COMPILE.SWAP 39
;
T{ T.COMPILE, }T{ 19 27 20 39 }T
\ ----------------------------------------------------- CONVERT
: T.CONVERT
0 S>D S" 1234xyz" DROP CONVERT
>R
D>S
R> C@
;
T{ T.CONVERT }T{ 1234 CHAR x }T
\ ----------------------------------------------------- ERASE
: T.COMMA.SEQ ( n -- , lay down N sequential bytes )
0 ?DO I C, LOOP
;
CREATE T-ERASE-DATA 64 T.COMMA.SEQ
T{ T-ERASE-DATA 8 + C@ }T{ 8 }T
T{ T-ERASE-DATA 7 + 3 ERASE
T{ T-ERASE-DATA 6 + C@ }T{ 6 }T
T{ T-ERASE-DATA 7 + C@ }T{ 0 }T
T{ T-ERASE-DATA 8 + C@ }T{ 0 }T
T{ T-ERASE-DATA 9 + C@ }T{ 0 }T
T{ T-ERASE-DATA 10 + C@ }T{ 10 }T
\ ----------------------------------------------------- FALSE
T{ FALSE }T{ 0 }T
\ ----------------------------------------------------- HEX
T{ HEX 10 DECIMAL }T{ 16 }T
\ ----------------------------------------------------- MARKER
: INDIC? ( <name> -- ifInDic , is the following word defined? )
bl word find
swap drop 0= 0=
;
create FOOBAR
MARKER MYMARK \ create word that forgets itself
create GOOFBALL
MYMARK
T{ indic? foobar indic? mymark indic? goofball }T{ true false false }T
\ ----------------------------------------------------- NIP
T{ 33 44 55 NIP }T{ 33 55 }T
\ ----------------------------------------------------- PARSE
: T.PARSE ( char <string>char -- addr num )
PARSE
>R \ save length
PAD R@ CMOVE \ move string to pad
PAD R>
;
T{ CHAR % T.PARSE wxyz% SWAP C@ }T{ 4 CHAR w }T
\ ----------------------------------------------------- PICK
T{ 13 12 11 10 2 PICK }T{ 13 12 11 10 12 }T
\ ----------------------------------------------------- QUERY
T{ ' QUERY 0<> }T{ TRUE }T
\ ----------------------------------------------------- REFILL
T{ ' REFILL 0<> }T{ TRUE }T
\ ----------------------------------------------------- RESTORE-INPUT
T{ : T.SAVE-INPUT SAVE-INPUT RESTORE-INPUT ; T.SAVE-INPUT }T{ 0 }T \ EXPECTED FAILURE
\ ----------------------------------------------------- ROLL
T{ 15 14 13 12 11 10 0 ROLL }T{ 15 14 13 12 11 10 }T
T{ 15 14 13 12 11 10 1 ROLL }T{ 15 14 13 12 10 11 }T
T{ 15 14 13 12 11 10 2 ROLL }T{ 15 14 13 11 10 12 }T
T{ 15 14 13 12 11 10 3 ROLL }T{ 15 14 12 11 10 13 }T
T{ 15 14 13 12 11 10 4 ROLL }T{ 15 13 12 11 10 14 }T
\ ----------------------------------------------------- SOURCE-ID
T{ SOURCE-ID 0<> }T{ TRUE }T
T{ : T.SOURCE-ID S" SOURCE-ID" EVALUATE ; T.SOURCE-ID }T{ -1 }T
\ ----------------------------------------------------- SPAN
T{ ' SPAN 0<> }T{ TRUE }T
\ ----------------------------------------------------- TO VALUE
333 VALUE MY-VALUE
T{ MY-VALUE }T{ 333 }T
T{ 1000 TO MY-VALUE MY-VALUE }T{ 1000 }T
: TEST.VALUE ( -- 19 100 )
100 TO MY-VALUE
19
MY-VALUE
;
T{ TEST.VALUE }T{ 19 100 }T
\ ----------------------------------------------------- TRUE
T{ TRUE }T{ 0 0= }T
\ ----------------------------------------------------- TUCK
T{ 44 55 66 TUCK }T{ 44 66 55 66 }T
\ ----------------------------------------------------- U.R
HEX CR .( ABCD4321 - SHOULD LINE UP WITH NEXT LINE.) CR
ABCD4321 C U.R CR DECIMAL
\ ----------------------------------------------------- U>
T{ -5 3 U> }T{ TRUE }T
T{ 10 8 U> }T{ TRUE }T
\ ----------------------------------------------------- UNUSED
T{ UNUSED 0> }T{ TRUE }T
\ ----------------------------------------------------- WITHIN
T{ 4 5 10 WITHIN }T{ 0 }T
T{ 5 5 10 WITHIN }T{ TRUE }T
T{ 9 5 10 WITHIN }T{ TRUE }T
T{ 10 5 10 WITHIN }T{ 0 }T
T{ 4 10 5 WITHIN }T{ TRUE }T
T{ 5 10 5 WITHIN }T{ 0 }T
T{ 9 10 5 WITHIN }T{ 0 }T
T{ 10 10 5 WITHIN }T{ TRUE }T
T{ -6 -5 10 WITHIN }T{ 0 }T
T{ -5 -5 10 WITHIN }T{ TRUE }T
T{ 9 -5 10 WITHIN }T{ TRUE }T
T{ 10 -5 10 WITHIN }T{ 0 }T
\ ----------------------------------------------------- [COMPILE]
: T.[COMPILE].IF [COMPILE] IF ; IMMEDIATE
: T.[COMPILE] 40 0> T.[COMPILE].IF 97 ELSE 53 THEN 97 = ;
T{ T.[COMPILE] }T{ TRUE }T
\ ----------------------------------------------------- \
}TEST
| Forth | 5 | 610t/retrobsd | src/cmd/pforth/fth/t_corex.fth | [
"BSD-3-Clause"
] |
SELECT (datatype(?x +?y) AS ?z) {}
| SPARQL | 3 | alpano-unibz/ontop | test/sparql-compliance/src/test/resources/testcases-dawg-sparql-1.1/syntax-query/syntax-select-expr-03.rq | [
"Apache-2.0"
] |
{-#LANGUAGE ForeignFunctionInterface #-}
#include "cvWrapLEO.h"
-- | This module is a collection of simple edge detectors.
module CV.Edges (
-- * Common edge detectors
sobelOp,sobel
,laplaceOp,laplace,canny,susan
-- * Various aperture sizes
-- | For added safety we define the possible
-- apertures as constants, since the filters accept only
-- specific mask sizes.
,SobelAperture
,sScharr,s1,s3,s5,s7
,LaplacianAperture
,l1,l3,l5,l7
) where
import Foreign.C.Types
import Foreign.C.String
import Foreign.ForeignPtr
import Foreign.Ptr
import CV.ImageOp
import CV.Image
{#import CV.Image#}
import System.IO.Unsafe
-- | Perform Sobel filtering on image. First argument gives order of horizontal and vertical
-- derivative estimates and second one is the aperture. This function can also calculate
-- Scharr filter with aperture specification of sScharr
sobelOp :: (Int,Int) -> SobelAperture -> ImageOperation GrayScale D32
sobelOp (dx,dy) (Sb aperture)
| dx >=0 && dx <3
&& not ((aperture == -1) && (dx>1 || dy>1))
&& dy >=0 && dy<3 = ImgOp $ \i -> withGenImage i $ \image ->
({#call cvSobel#} image image cdx cdy cap)
| otherwise = error "Invalid aperture"
where [cdx,cdy,cap] = map fromIntegral [dx,dy,aperture]
sobel dd ap im = unsafeOperate (sobelOp dd ap) im
-- | Aperture sizes for sobel operator
newtype SobelAperture = Sb Int deriving(Eq,Ord,Show,Read)
-- | Use Scharr mask instead
sScharr = Sb (-1)
s1 = Sb 1
s3 = Sb 3
s5 = Sb 5
s7 = Sb 7
-- | Aperture sizes for laplacian operator
newtype LaplacianAperture = L Int deriving(Eq,Ord,Show,Read)
l1 = L 1
l3 = L 3
l5 = L 5
l7 = L 7
-- |Perform laplacian filtering of given aperture to image
laplaceOp :: LaplacianAperture -> ImageOperation GrayScale D32
laplaceOp (L s) = ImgOp $ \img -> withGenImage img $ \image ->
({#call cvLaplace #} image image (fromIntegral s))
laplace s i = unsafeOperate (laplaceOp s) i
-- |Perform canny thresholding using two threshold values and given aperture
-- Works only on 8-bit images
canny :: Int -> Int -> Int -> Image GrayScale D8 -> Image GrayScale D8
canny t1 t2 aperture src = unsafePerformIO $ do
withCloneValue src $ \clone ->
withGenImage src $ \si ->
withGenImage clone $ \ci -> do
{#call cvCanny#} si ci (fromIntegral t1)
(fromIntegral t2)
(fromIntegral aperture)
return clone
-- | SUSAN edge detection filter, see <http://users.fmrib.ox.ac.uk/~steve/susan/susan/susan.html>
susan :: (Int,Int) -> D32 -> Image GrayScale D32 -> Image GrayScale D8
susan (w,h) t image = unsafePerformIO $ do
withGenImage image $ \img ->
creatingImage
({#call susanEdge#} img (fromIntegral w) (fromIntegral h) (realToFrac t))
-- TODO: Should return a binary image
| C2hs Haskell | 5 | maaleske/CV | CV/Edges.chs | [
"BSD-3-Clause"
] |
Import brl.asyncevent
#If Not BRL_HTTPREQUEST_IMPLEMENTED
#If TARGET="android" Or TARGET="ios" Or TARGET="winrt" Or TARGET="html5" Or TARGET="flash"
#BRL_HTTPREQUEST_IMPLEMENTED=True
Import "native/httprequest.${TARGET}.${LANG}"
#Endif
#Endif
#If BRL_HTTPREQUEST_IMPLEMENTED
Extern Private
Class BBHttpRequest
Method Open:Void( req:String,url:String )
Method SetHeader:Void( name:String,value:String )
Method Send:Void()
Method SendText:Void( data:String,encoding:String )
Method ResponseText:String()
Method Status:Int()
Method BytesReceived:Int()
Method IsRunning:Bool()
End
Public
Class HttpRequest Implements IAsyncEventSource
Method New()
End
Method New( req:String,url:String,onComplete:IOnHttpRequestComplete )
Open req,url,onComplete
End
Method Open:Void( req:String,url:String,onComplete:IOnHttpRequestComplete )
If _req And _req.IsRunning() Error "HttpRequest in progress"
_req=New BBHttpRequest
_onComplete=onComplete
_req.Open( req,url )
End
Method SetHeader:Void( name:String,value:String )
If Not _req Error "HttpRequest not open"
If _req.IsRunning() Error "HttpRequest in progress"
_req.SetHeader( name,value )
End
Method Send:Void()
If Not _req Error "HttpRequest not open"
If _req.IsRunning() Error "HttpRequest in progress"
AddAsyncEventSource Self
_req.Send()
End
Method Send:Void( data:String,mimeType:String="text/plain;charset=UTF-8",encoding:String="utf8" )
If Not _req Error "HttpRequest not open"
If _req.IsRunning() Error "HttpRequest in progress"
If mimeType _req.SetHeader( "Content-Type",mimeType )
AddAsyncEventSource Self
_req.SendText( data,encoding )
End
Method Status:Int()
If Not _req Error "HttpRequest not open"
Return _req.Status()
End
Method ResponseText:String()
If Not _req Error "HttpRequest not open"
Return _req.ResponseText()
End
Method BytesReceived:Int()
If Not _req Error "HttpRequest not open"
Return _req.BytesReceived()
End
Private
Field _req:BBHttpRequest
Field _onComplete:IOnHttpRequestComplete
Method UpdateAsyncEvents:Void()
If _req.IsRunning() Return
RemoveAsyncEventSource Self
_onComplete.OnHttpRequestComplete( Self )
End Method
End
#Else
Private
Import brl.socket
Import brl.url
Public
Class HttpRequest Implements IOnConnectComplete,IOnSendComplete,IOnReceiveComplete
Method New()
End
Method New( req:String,url:String,onComplete:IOnHttpRequestComplete )
Open req,url,onComplete
End
Method Discard:Void()
_wbuf.Discard
_rbuf.Discard
If _data _data.Discard
_wbuf=Null
_rbuf=Null
_data=Null
End
Method Open:Void( req:String,url:String,onComplete:IOnHttpRequestComplete )
_req=req
_url=New Url( url,"http",80 )
_onComplete=onComplete
_data=Null
_dataLength=0
_status=-1
_response=Null
_responseText=""
_bytesReceived=0
_header=New StringStack
_header.Push _req+" /"+_url.FullPath()+" HTTP/1.0"
_header.Push "Host: "+_url.Domain()
End
Method SetHeader:Void( name:String,value:String )
_header.Push name+": "+value
End
Method Send:Void()
_sock=New Socket( "stream" )
_sock.ConnectAsync _url.Domain(),_url.Port(),Self
End
Method Send:Void( data:String,mimeType:String="text/plain;charset=UTF-8",encoding:String="utf8" )
_data=New DataBuffer( data.Length*3 )
_dataLength=_data.PokeString( 0,data,encoding )
If mimeType _header.Push "Content-Type: "+mimeType
_header.Push "Content-Length: "+_dataLength
Send
End
Method Status:Int()
Return _status
End
Method ResponseText:String()
Return _responseText
End
Method BytesReceived:Int()
Return _bytesReceived
End
Private
Field _wbuf:=New DataBuffer( 4096 )
Field _rbuf:=New DataBuffer( 16384 )
Field _req:String
Field _url:Url
Field _onComplete:IOnHttpRequestComplete
Field _header:StringStack
Field _data:DataBuffer
Field _dataLength:Int
Field _sock:Socket
Field _status:Int
Field _bytesReceived:Int
Field _response:StringStack
Field _responseText:String
Method Finish:Void()
_sock.Close
If _response _responseText=_response.Join( "" )
_onComplete.OnHttpRequestComplete Self
End
Method OnConnectComplete:Void( connected:Bool,source:Socket )
If Not connected
Finish
Return
Endif
_header.Push ""
_header.Push ""
Local t:=_header.Join( "~r~n" )
Local n:=_wbuf.PokeString( 0,t,"ascii" )
_header.Clear
_sock.SendAsync _wbuf,0,n,Self
_sock.ReceiveAsync _rbuf,0,_rbuf.Length,Self
End
Method OnReceiveComplete:Void( buf:DataBuffer,offset:Int,count:Int,source:Socket )
If Not count
Finish
Return
Endif
If _response
_bytesReceived+=count
_response.Push buf.PeekString( offset,count,"utf8" )
_sock.ReceiveAsync( buf,0,buf.Length,Self )
Return
Endif
Local start:=0
Local i:=offset
Local term:=i+count
While i<term
i+=1
If buf.PeekByte( i-1 )<>10 Continue
Local len:=i-start-1
Local t:=buf.PeekString( start,len,"ascii" ).Trim()
start=i
If t
_header.Push t
Continue
Endif
If _header.Length
Local bits:=_header.Get( 0 ).ToUpper().Split( " " )
If bits.Length>2 And bits[0].StartsWith( "HTTP/" )
_status=Int( bits[1] )
_response=New StringStack
If start<term
_bytesReceived+=term-start
_response.Push buf.PeekString( start,term-start,"utf8" )
Endif
_sock.ReceiveAsync( buf,0,buf.Length,Self )
Return
Endif
Endif
'ERROR!
Finish
Return
Wend
Local n:=term-start
If start buf.CopyBytes start,buf,0,n
_sock.ReceiveAsync( buf,n,buf.Length-n,Self )
End
Method OnSendComplete:Void( buf:DataBuffer,offset:Int,count:Int,source:Socket )
If Not _dataLength Return
_sock.SendAsync _data,0,_dataLength,Self
_dataLength=0
End
End
#End
Interface IOnHttpRequestComplete
Method OnHttpRequestComplete:Void( req:HttpRequest )
End
| Monkey | 4 | Regal-Internet-Brothers/webcc-monkey | webcc.data/modules/brl/httprequest.monkey | [
"Zlib"
] |
/*
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.test.autoconfigure.web.reactive;
import java.time.Duration;
import java.util.List;
import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.FilteredClassLoader;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.boot.web.codec.CodecCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.http.codec.CodecConfigurer;
import org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers;
import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.server.WebFilter;
import org.springframework.web.server.WebHandler;
import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
/**
* Tests for {@link WebTestClientAutoConfiguration}
*
* @author Brian Clozel
* @author Stephane Nicoll
*/
class WebTestClientAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withConfiguration(AutoConfigurations.of(WebTestClientAutoConfiguration.class));
@Test
void shouldNotBeConfiguredWithoutWebHandler() {
this.contextRunner.run((context) -> {
assertThat(context).hasNotFailed();
assertThat(context).doesNotHaveBean(WebTestClient.class);
});
}
@Test
void shouldCustomizeClientCodecs() {
this.contextRunner.withUserConfiguration(CodecConfiguration.class).run((context) -> {
assertThat(context).hasSingleBean(WebTestClient.class);
assertThat(context).hasSingleBean(CodecCustomizer.class);
verify(context.getBean(CodecCustomizer.class)).customize(any(CodecConfigurer.class));
});
}
@Test
void shouldCustomizeTimeout() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class)
.withPropertyValues("spring.test.webtestclient.timeout=15m").run((context) -> {
WebTestClient webTestClient = context.getBean(WebTestClient.class);
assertThat(webTestClient).hasFieldOrPropertyWithValue("responseTimeout", Duration.ofMinutes(15));
});
}
@Test
@SuppressWarnings("unchecked")
void shouldApplySpringSecurityConfigurer() {
this.contextRunner.withUserConfiguration(BaseConfiguration.class).run((context) -> {
WebTestClient webTestClient = context.getBean(WebTestClient.class);
WebTestClient.Builder builder = (WebTestClient.Builder) ReflectionTestUtils.getField(webTestClient,
"builder");
WebHttpHandlerBuilder httpHandlerBuilder = (WebHttpHandlerBuilder) ReflectionTestUtils.getField(builder,
"httpHandlerBuilder");
List<WebFilter> filters = (List<WebFilter>) ReflectionTestUtils.getField(httpHandlerBuilder, "filters");
assertThat(filters.get(0).getClass().getName()).isEqualTo(
"org.springframework.security.test.web.reactive.server.SecurityMockServerConfigurers$MutatorFilter");
});
}
@Test
@SuppressWarnings("unchecked")
void shouldNotApplySpringSecurityConfigurerWhenSpringSecurityNotOnClassPath() {
FilteredClassLoader classLoader = new FilteredClassLoader(SecurityMockServerConfigurers.class);
this.contextRunner.withUserConfiguration(BaseConfiguration.class).withClassLoader(classLoader)
.run((context) -> {
WebTestClient webTestClient = context.getBean(WebTestClient.class);
WebTestClient.Builder builder = (WebTestClient.Builder) ReflectionTestUtils.getField(webTestClient,
"builder");
WebHttpHandlerBuilder httpHandlerBuilder = (WebHttpHandlerBuilder) ReflectionTestUtils
.getField(builder, "httpHandlerBuilder");
List<WebFilter> filters = (List<WebFilter>) ReflectionTestUtils.getField(httpHandlerBuilder,
"filters");
assertThat(filters).isEmpty();
});
}
@Configuration(proxyBeanMethods = false)
static class BaseConfiguration {
@Bean
WebHandler webHandler() {
return mock(WebHandler.class);
}
}
@Configuration(proxyBeanMethods = false)
@Import(BaseConfiguration.class)
static class CodecConfiguration {
@Bean
CodecCustomizer myCodecCustomizer() {
return mock(CodecCustomizer.class);
}
}
}
| Java | 4 | techAi007/spring-boot | spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/reactive/WebTestClientAutoConfigurationTests.java | [
"Apache-2.0"
] |
/* Entry Point */
OUTPUT_ARCH( "riscv" )
STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x1000;
/* Specify the memory areas */
MEMORY
{
m_vector (RX) : ORIGIN = 0x000FFF00, LENGTH = 0x00000100
m_text (RX) : ORIGIN = 0x00000000, LENGTH = 0x000FFF00
m_data (RW) : ORIGIN = 0x20000000, LENGTH = 0x00030000 - 0x1800
}
/* Define output sections */
SECTIONS
{
.vectors : ALIGN(4)
{
__VECTOR_TABLE = .;
KEEP(*(.vectors))
} > m_vector
/* The program code and other data goes into internal flash */
.text :
{
. = ALIGN(4);
KEEP(*(.startup))
. = ALIGN(4);
__user_vector = .;
KEEP(*(user_vectors))
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
*(.eh_frame)
*(.init)
*(.fini)
/* section information for finsh shell */
. = ALIGN(4);
__fsymtab_start = .;
KEEP(*(FSymTab))
__fsymtab_end = .;
. = ALIGN(4);
__vsymtab_start = .;
KEEP(*(VSymTab))
__vsymtab_end = .;
. = ALIGN(4);
/* section information for initial. */
. = ALIGN(4);
__rt_init_start = .;
KEEP(*(SORT(.rti_fn*)))
__rt_init_end = .;
. = ALIGN(4);
} > m_text
.preinit_array :
{
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
} > m_text
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
} > m_text
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
} > m_text
__etext = .; /* define a global symbol at end of code */
__global_pointer = .; /* define a global symbol at end of code */
__DATA_ROM = .; /* Symbol is used by startup for data initialization */
.data : AT(__DATA_ROM)
{
. = ALIGN(4);
__DATA_RAM = .;
__data_start__ = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */
*(.sdata .sdata.*)
*(.heapsram*) /* This is only for the pulpino official test code. */
__noncachedata_start__ = .; /* create a global symbol at ncache data start */
*(NonCacheable)
__noncachedata_end__ = .; /* define a global symbol at ncache data end */
KEEP(*(.jcr*))
. = ALIGN(4);
__data_end__ = .; /* define a global symbol at data end */
} > m_data
__DATA_END = __DATA_ROM + (__data_end__ - __data_start__);
text_end = ORIGIN(m_text) + LENGTH(m_text);
ASSERT(__DATA_END <= text_end, "region m_text overflowed with text and data")
_edata = .;
.stack :
{
. = ALIGN(8);
__StackLimit = .;
. += STACK_SIZE;
__StackTop = .;
} > m_data
/* Initializes stack on the end of block */
PROVIDE(__stack = __StackTop);
/* Uninitialized data section */
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
. = ALIGN(4);
__START_BSS = .;
__bss_start__ = .;
*(.bss)
*(.bss*)
*(.sbss)
*(.sbss*)
*(COMMON)
. = ALIGN(4);
__bss_end__ = .;
__END_BSS = .;
} > m_data
/* End of uninitalized data segement */
_end = .;
PROVIDE(end = .);
}
| Linker Script | 4 | Davidfind/rt-thread | bsp/rv32m1_vega/ri5cy/link.lds | [
"Apache-2.0"
] |
/*
* Copyright (c) 2021, Jesse Buhagiar <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Types.h>
namespace Kernel::USB {
struct [[gnu::packed]] USBDescriptorCommon {
u8 length;
u8 descriptor_type;
};
//
// Device Descriptor
// =================
//
// This descriptor type (stored on the device), represents the device, and gives
// information related to it, such as the USB specification it complies to,
// as well as the vendor and product ID of the device.
//
// https://beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors
struct [[gnu::packed]] USBDeviceDescriptor {
USBDescriptorCommon descriptor_header;
u16 usb_spec_compliance_bcd;
u8 device_class;
u8 device_sub_class;
u8 device_protocol;
u8 max_packet_size;
u16 vendor_id;
u16 product_id;
u16 device_release_bcd;
u8 manufacturer_id_descriptor_index;
u8 product_string_descriptor_index;
u8 serial_number_descriptor_index;
u8 num_configurations;
};
static_assert(sizeof(USBDeviceDescriptor) == 18);
//
// Configuration Descriptor
// ========================
//
// A USB device can have multiple configurations, which tells us about how the
// device is physically configured (e.g how it's powered, max power consumption etc).
//
struct [[gnu::packed]] USBConfigurationDescriptor {
USBDescriptorCommon descriptor_header;
u16 total_length;
u8 number_of_interfaces;
u8 configuration_value;
u8 configuration_string_descriptor_index;
u8 attributes_bitmap;
u8 max_power_in_ma;
};
//
// Interface Descriptor
// ====================
//
// An interface descriptor describes to us one or more endpoints, grouped
// together to define a singular function of a device.
// As an example, a USB webcam might have two interface descriptors; one
// for the camera, and one for the microphone.
//
struct [[gnu::packed]] USBInterfaceDescriptor {
USBDescriptorCommon descriptor_header;
u8 interface_id;
u8 alternate_setting;
u8 number_of_endpoints;
u8 interface_class_code;
u8 interface_sub_class_code;
u8 interface_protocol;
u8 interface_string_descriptor_index;
};
//
// Endpoint Descriptor
// ===================
//
// The lowest leaf in the configuration tree. And endpoint descriptor describes
// the physical transfer properties of the endpoint (that isn't endpoint0).
// The description given by this structure is used by a pipe to create a
// "connection" from the host to the device.
// https://docs.microsoft.com/en-us/windows-hardware/drivers/usbcon/usb-endpoints-and-their-pipes
struct [[gnu::packed]] USBEndpointDescriptor {
USBDescriptorCommon descriptor_header;
u8 endpoint_address;
u8 endpoint_attributes_bitmap;
u16 max_packet_size;
u8 poll_interval_in_frames;
};
//
// USB 1.1/2.0 Hub Descriptor
// ==============
//
struct [[gnu::packed]] USBHubDescriptor {
USBDescriptorCommon descriptor_header;
u8 number_of_downstream_ports;
u16 hub_characteristics;
u8 power_on_to_power_good_time;
u8 hub_controller_current;
// NOTE: This does not contain DeviceRemovable or PortPwrCtrlMask because a struct cannot have two VLAs in a row.
};
static constexpr u8 DESCRIPTOR_TYPE_DEVICE = 0x01;
static constexpr u8 DESCRIPTOR_TYPE_CONFIGURATION = 0x02;
static constexpr u8 DESCRIPTOR_TYPE_STRING = 0x03;
static constexpr u8 DESCRIPTOR_TYPE_INTERFACE = 0x04;
static constexpr u8 DESCRIPTOR_TYPE_ENDPOINT = 0x05;
static constexpr u8 DESCRIPTOR_TYPE_DEVICE_QUALIFIER = 0x06;
static constexpr u8 DESCRIPTOR_TYPE_HUB = 0x29;
}
| C | 5 | r00ster91/serenity | Kernel/Bus/USB/USBDescriptors.h | [
"BSD-2-Clause"
] |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Retain Analysis</title>
<style>
body {
width: 100% !important;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
margin: 0 !important;
padding: 0 !important;
color: #353535;
}
table {
text-align: center;
font-size: 12px;
border-collapse: collapse;
min-width: 720px;
}
.count {
font-family: monospace;
}
table td,
table th {
padding: 0 2px;
border-collapse: collapse;
word-break: keep-all;
}
</style>
</head>
<body>
<table>
<tr>
<th class="count">date</th>
<th class="count">+</th>
<th class="count">@</th>
% for p in periods:
<th class="count">${ p }</th>
% endfor
% for p in periods:
<th class="count">${ p }</th>
% endfor
</tr>
% for max_period, (dt, total, ratios, activated, activated_ratios) in zip(max_periods, rows):
<tr>
<td class="count">${ dt }</td>
<td class="count">${ total }</td>
<td class="count">${ activated }</td>
% for period, value in zip(periods, ratios):
<td style="background:rgba(102,187,106,${ value })">${ '{:.2f}'.format(value) if period <= max_period else '' }</td>
% endfor
% for period, value in zip(periods, activated_ratios):
<td style="background:rgba(102,187,106,${ value })">${ '{:.2f}'.format(value) if period <= max_period else '' }</td>
% endfor
</tr>
% endfor
</table>
</body>
</html> | Mako | 3 | zuzhi/rssant | rssant/templates/email/retain_analysis.html.mako | [
"BSD-3-Clause"
] |
package com.baeldung.categories;
public interface IntegrationTest {
}
| Java | 2 | DBatOWL/tutorials | testing-modules/junit-5-basics/src/test/java/com/baeldung/categories/IntegrationTest.java | [
"MIT"
] |
;; note: this is example code and shouldn't be run in production as-is
(ns rabbitmq.tutorials.rpc-client
(:require [langohr.core :as lc]
[langohr.channel :as lch]
[langohr.queue :as lq]
[langohr.basic :as lb]
[langohr.consumers :as lcons]))
(def ^{:const true} q "rpc_queue")
(defn correlation-id-equals?
[correlation-id d]
(= (.getCorrelationId (.getProperties d)) correlation-id))
(defrecord FibonacciClient [conn ch cbq consumer]
clojure.lang.IFn
(invoke [this n]
(let [correlation-id (str (java.util.UUID/randomUUID))]
(lb/publish ch "" q (str n) {:reply-to cbq
:correlation-id correlation-id})
(lb/consume ch cbq consumer)
(-> (first (filter (partial correlation-id-equals? correlation-id)
(lcons/deliveries-seq consumer)))
.getBody
(String. "UTF-8")
(read-string))))
java.io.Closeable
(close [this]
(.close conn)))
(defn make-fibonacci-rpc-client
[]
(let [conn (lc/connect)
ch (lch/open conn)
cbq (lq/declare ch "" {:auto-delete false :exclusive true})
consumer (lcons/create-queueing ch {})]
(->FibonacciClient conn ch (:queue cbq) consumer)))
(defn -main
[& args]
(with-open [fibonacci-rpc (make-fibonacci-rpc-client)]
(println " [x] Requesting fib(30)")
(let [response (fibonacci-rpc 30)]
(println (format " [.] Got %s" response)))))
| Clojure | 5 | Diffblue-benchmarks/Rabbitmq-rabbitmq-tutorials | clojure/src/rabbitmq/tutorials/rpc_client.clj | [
"Apache-2.0"
] |
# wpscan
> WordPress vulnerability scanner.
> More information: <https://github.com/wpscanteam/wpscan>.
- Update the vulnerability database:
`wpscan --update`
- Scan a WordPress website:
`wpscan --url {{url}}`
- Scan a WordPress website, using random user agents and passive detection:
`wpscan --url {{url}} --stealthy`
- Scan a WordPress website, checking for vulnerable plugins and specifying the path to the `wp-content` directory:
`wpscan --url {{url}} --enumerate {{vp}} --wp-content-dir {{remote/path/to/wp-content}}`
- Scan a WordPress website through a proxy:
`wpscan --url {{url}} --proxy {{protocol://ip:port}} --proxy-auth {{username:password}}`
- Perform user identifiers enumeration on a WordPress website:
`wpscan --url {{url}} --enumerate {{u}}`
- Execute a password guessing attack on a WordPress website:
`wpscan --url {{url}} --usernames {{username|path/to/usernames.txt}} --passwords {{path/to/passwords.txt}} threads {{20}}`
- Scan a WordPress website, collecting vulnerability data from the WPVulnDB (https://wpvulndb.com/):
`wpscan --url {{url}} --api-token {{token}}`
| Markdown | 3 | derNiklaas/tldr | pages/common/wpscan.md | [
"CC-BY-4.0"
] |
--TEST--
Fixed bug #71537 (PCRE segfault from Opcache)
--FILE--
<?php
var_dump(preg_replace(array("/Monkey/"), array(2016), "Happy Year of Monkey"));
?>
--EXPECT--
string(18) "Happy Year of 2016"
| PHP | 3 | thiagooak/php-src | ext/pcre/tests/bug71537.phpt | [
"PHP-3.01"
] |
insert into `third` values (6339); | SQL | 2 | imtbkcat/tidb-lightning | tests/black-white-list/data/seconddb.third.1.sql | [
"Apache-2.0"
] |
# Copyright (c) 2022 Fyde Innovations Limited and the openFyde Authors.
# Distributed under the license specified in the root directory of this project.
# Copyright (c) 2018 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=5
DESCRIPTION="Chrome OS BSP config virtual package"
HOMEPAGE="http://src.chromium.org"
LICENSE="BSD"
SLOT="0"
KEYWORDS="*"
IUSE=""
RDEPEND=""
# TODO(bmgordon): Remove chromeos-base/chromeos-config-bsp once all the
# boards using unibuild are adjusted to use virtual package.
DEPEND="
${RDEPEND}
"
| Gentoo Ebuild | 3 | FydeOS/chromium_os_for_raspberry_pi | overlay-rpi4/virtual/chromeos-config-bsp/chromeos-config-bsp-1.ebuild | [
"BSD-2-Clause"
] |
fail_stage:
match: '*'
sls:
- failparse
req_fail:
match: '*'
sls:
- fail
require:
- fail_stage
| SaltStack | 2 | byteskeptical/salt | tests/integration/files/over/parse_req_fail.sls | [
"Apache-2.0"
] |
// Default parameters do not clip unless your computer's audio levels are too high.
{ SinOsc.ar() }.scope;
// Same thing with explicit parameters but using default values. Does not clip.
{ SinOsc.ar(440, 0, 1) }.scope;
// This will clip, regardless of computer audio levels.
{ SinOsc.ar(440, 0, 2) }.scope;
// Does not clip unless computer audio levels too high.
{ SinOsc.ar(440, 0, 0.6) }.scope;
// This probably won't clip, unless your computer's audio levels are really high.
{ SinOsc.ar(440, 0, 0.2) }.scope; | SuperCollider | 4 | drichardson/examples | SuperCollider/Clipping.scd | [
"Unlicense"
] |
[
{
"ProfileName": "CMS_Found",
"Name": "",
"Enabled": true,
"Scanner": 2,
"Author": "@six2dez1",
"Payloads": [],
"Encoder": [],
"UrlEncode": false,
"CharsToUrlEncode": "",
"Grep": [
"true,,Wordpress",
"true,Or,Drupal",
"true,Or,Joomla",
"true,Or,Magento",
"true,Or,Webnode",
"true,Or,Shopsys",
"true,Or,Shoptet",
"true,Or,vBulletin",
"true,Or,Liferay",
"true,Or,A-Blog Cms",
"true,Or,AVE cms",
"true,Or,Adobe Dreamweaver",
"true,Or,Adobe GoLive",
"true,Or,Adobe Muse",
"true,Or,Advantshop",
"true,Or,Agility CMS",
"true,Or,Alterian",
"true,Or,Amiro.CMS",
"true,Or,Apache Lenya",
"true,Or,ASP.NET",
"true,Or,Backdrop CMS",
"true,Or,BaseKit",
"true,Or,Big Cartel",
"true,Or,Bigace",
"true,Or,Blogger",
"true,Or,Bolt",
"true,Or,Bootply",
"true,Or,Bricolage CMS",
"true,Or,C1 CMS",
"true,Or,CM4all",
"true,Or,CMS-Tool",
"true,Or,CMS Made Simple",
"true,Or,CMSimple",
"true,Or,CMSimple_XH",
"true,Or,CanalBlog",
"true,Or,Cargo",
"true,Or,Centricity",
"true,Or,Chevereto",
"true,Or,Ciashop",
"true,Or,CivicEngage",
"true,Or,CoffeeCup",
"true,Or,CommonSpot",
"true,Or,Contao",
"true,Or,Contenido CMS",
"true,Or,Contensis CMS",
"true,Or,ContentXXL",
"true,Or,Convio",
"true,Or,Coppermine",
"true,Or,CoreMedia CMS",
"true,Or,Corepublish",
"true,Or,Crowd Fusion",
"true,Or,CubeCart",
"true,Or,DIAFAN.CMS",
"true,Or,DNN",
"true,Or,Danneo",
"true,Or,DataLife Engine",
"true,Or,Dealer.com",
"true,Or,DealerFire",
"true,Or,Demandware",
"true,Or,Dim Works",
"true,Or,Discourse",
"true,Or,Hycus",
"true,Or,Discuz!",
"true,Or,DokuWiki",
"true,Or,DotClear",
"true,Or,DotEasy",
"true,Or,LiteCart",
"true,Or,DreamCommerce",
"true,Or,Duda",
"true,Or,Dynamicweb",
"true,Or,E+ CMS",
"true,Or,E-monsite",
"true,Or,ECShop",
"true,Or,Easysite",
"true,Or,EditPlus",
"true,Or,Edito",
"true,Or,Enonic CMS",
"true,Or,Episerver",
"true,Or,Everweb",
"true,Or,Fork CMS",
"true,Or,Zeta Producer",
"true,Or,Flarum",
"true,Or,Format",
"true,Or,FrontPage",
"true,Or,GX Web Manager",
"true,Or,Geeklog",
"true,Or,GetSimple CMS",
"true,Or,Ghost",
"true,Or,GoDaddy Website Builder",
"true,Or,Google Sites",
"true,Or,Government Site Builder",
"true,Or,GraffitiCMS",
"true,Or,Grav CMS",
"true,Or,Hexo",
"true,Or,Homes.com Fusion",
"true,Or,Homestead",
"true,Or,HostCMS",
"true,Or,HostedShop",
"true,Or,HubSpot",
"true,Or,Hugo",
"true,Or,HumHub",
"true,Or,IPS Community Suite",
"true,Or,ImageCMS",
"true,Or,Immediacy",
"true,Or,Imperia CMS",
"true,Or,ImpressCMS",
"true,Or,ImpressPages CMS",
"true,Or,Infopark CMS Fiona",
"true,Or,InstantCMS",
"true,Or,InterRed",
"true,Or,Intershop",
"true,Or,JTL-Shop",
"true,Or,Jadu CMS",
"true,Or,Jekyll",
"true,Or,JetShop",
"true,Or,Jieqi CMS",
"true,Or,Jimdo",
"true,Or,JustSystems Homepage Builder",
"true,Or,KVS CMS",
"true,Or,Koken",
"true,Or,Komodo CMS",
"true,Or,Kooboo",
"true,Or,Kryptronic",
"true,Or,Labrador CMS",
"true,Or,Lauyan TOWeb",
"true,Or,LeadPages",
"true,Or,LightCMS",
"true,Or,Lightspeed",
"true,Or,LiveEdit",
"true,Or,Livedoor Blog",
"true,Or,Livestreet CMS",
"true,Or,Locomotive CMS",
"true,Or,LogiCommerce",
"true,Or,Loja Integrada",
"true,Or,MONO",
"true,Or,Mabisy",
"true,Or,MakeShop",
"true,Or,Mambo",
"true,Or,MaxSite CMS",
"true,Or,MediaWiki",
"true,Or,Medium",
"true,Or,Melody",
"true,Or,Metro Publisher",
"true,Or,Microsoft Word",
"true,Or,Midgard CMS",
"true,Or,Mijnwebwinkel",
"true,Or,Mintox",
"true,Or,Miva Merchant",
"true,Or,Mobirise",
"true,Or,Modified Shopsoftware",
"true,Or,Modx CMS",
"true,Or,MoinMoin",
"true,Or,Movable Type",
"true,Or,Mura",
"true,Or,Méthode",
"true,Or,NQcontent",
"true,Or,Nation Builder",
"true,Or,Neos",
"true,Or,NetObjects",
"true,Or,NetSuite",
"true,Or,Netvolution",
"true,Or,Nextcloud",
"true,Or,Ning",
"true,Or,Nodebb",
"true,Or,Notepad++",
"true,Or,Nucleus CMS",
"true,Or,NukeViet",
"true,Or,OU Campus",
"true,Or,OXID eSales",
"true,Or,Octopress",
"true,Or,Odoo",
"true,Or,One.com",
"true,Or,Open CMS",
"true,Or,Open Journal Systems",
"true,Or,OpenNemas",
"true,Or,OpenOffice",
"true,Or,Orchard",
"true,Or,Orthodox Web Solutions",
"true,Or,Osclass",
"true,Or,Overblog",
"true,Or,Oxatis",
"true,Or,PHP-Fusion",
"true,Or,PHP-Nuke",
"true,Or,PHP Link Directory",
"true,Or,PHPShop",
"true,Or,PHPVibe",
"true,Or,PageCloud",
"true,Or,Pagekit",
"true,Or,Pangea CMS",
"true,Or,Parallels Presence Builder",
"true,Or,Pelican",
"true,Or,Perch",
"true,Or,Percussion",
"true,Or,Pimcore",
"true,Or,Piwigo",
"true,Or,Plone",
"true,Or,PowerBoutique",
"true,Or,PrestaShop",
"true,Or,ProcessWire",
"true,Or,Pydio",
"true,Or,Quick.CMS",
"true,Or,Quick.Cart",
"true,Or,RCMS",
"true,Or,RVsitebuilder",
"true,Or,RapidWeaver",
"true,Or,Ready Pro Ecommerce",
"true,Or,Ruby on Rails",
"true,Or,SNworks",
"true,Or,SUMOshop",
"true,Or,Salesforce",
"true,Or,Sana Commerce",
"true,Or,Sandvox",
"true,Or,SchoolSitePro",
"true,Or,Seamless CMS",
"true,Or,SeoToaster",
"true,Or,Serendipity",
"true,Or,Setup.ru",
"true,Or,SharePoint",
"true,Or,ShopFactory",
"true,Or,Shopify",
"true,Or,Shoptet",
"true,Or,Shopware",
"true,Or,Showoff",
"true,Or,SilverStripe CMS",
"true,Or,Simple Machines Forum",
"true,Or,Siquando",
"true,Or,SiteDirect",
"true,Or,SiteKreator",
"true,Or,SitePad",
"true,Or,SiteSpinner",
"true,Or,Sitefinity",
"true,Or,Sitonline",
"true,Or,Sitoo",
"true,Or,SmartEtailing",
"true,Or,SmartStore.NET",
"true,Or,SmugMug",
"true,Or,SocialEngine",
"true,Or,Sparkle CMS",
"true,Or,Spip",
"true,Or,Squarespace",
"true,Or,Squiz",
"true,Or,Strikingly",
"true,Or,Sulu CMS",
"true,Or,Tailbase",
"true,Or,Tangora Web CMS",
"true,Or,Telligent",
"true,Or,Tempest",
"true,Or,Textalk Webshop",
"true,Or,Textpattern CMS",
"true,Or,ThinkCMF",
"true,Or,ThinkPHP",
"true,Or,Ticimax",
"true,Or,Tiki Wiki CMS",
"true,Or,Tilda",
"true,Or,Trellix",
"true,Or,Tumblr",
"true,Or,TypePad",
"true,Or,Typecho",
"true,Or,Typesetter",
"true,Or,Typo3",
"true,Or,UBB.threads",
"true,Or,UMI.CMS",
"true,Or,Ultimize CMS",
"true,Or,Umbraco",
"true,Or,Vanilla Forums",
"true,Or,Vigbo",
"true,Or,Vision",
"true,Or,Visual Studio",
"true,Or,Visualsoft",
"true,Or,Vivvo",
"true,Or,Volusion",
"true,Or,WMaker",
"true,Or,WYSIWYG Web Builder",
"true,Or,Web 2 Date",
"true,Or,WebAcappella",
"true,Or,Web Commander",
"true,Or,WebGUI",
"true,Or,Web Page Maker",
"true,Or,WebPlus",
"true,Or,Web Presence Builder",
"true,Or,Web Shop Manager",
"true,Or,WebSite Tonight",
"true,Or,WebSphere Studio Homepage Builder",
"true,Or,Webflow",
"true,Or,Weblication",
"true,Or,Webs",
"true,Or,Websale",
"true,Or,WebsiteBuilder",
"true,Or,WebSite X5",
"true,Or,Websplanet",
"true,Or,Webvision",
"true,Or,Weebly",
"true,Or,Wheel CMS",
"true,Or,Wikispaces",
"true,Or,Wix",
"true,Or,WiziShop",
"true,Or,WoltLab",
"true,Or,XT-Commerce",
"true,Or,Xara",
"true,Or,XenForo",
"true,Or,Xiuno BBS",
"true,Or,Xoops",
"true,Or,XpressEngine",
"true,Or,X‑Cart",
"true,Or,YaBB",
"true,Or,Yahoo Small Business",
"true,Or,Yellow Pages Canada",
"true,Or,Yola",
"true,Or,ZMS",
"true,Or,Zen Cart",
"true,Or,Zendesk",
"true,Or,Zoho Sites",
"true,Or,Zyro",
"true,Or,b2evolution",
"true,Or,blog.ir",
"true,Or,cloudrexx",
"true,Or,concrete5",
"true,Or,docsify",
"true,Or,dotCMS",
"true,Or,e107",
"true,Or,ePages",
"true,Or,eSyndiCat",
"true,Or,eZ Publish",
"true,Or,elcomCMS",
"true,Or,fCMS",
"true,Or,iWeb",
"true,Or,kimsq",
"true,Or,nopCommerce",
"true,Or,onpublix CMS",
"true,Or,1C-Bitrix",
"true,Or,pTools",
"true,Or,phpwcms",
"true,Or,phpwind",
"true,Or,plentymarkets",
"true,Or,uCoz"
],
"Tags": [
"All"
],
"PayloadResponse": false,
"NotResponse": false,
"TimeOut1": "",
"TimeOut2": "",
"isTime": false,
"contentLength": "",
"iscontentLength": false,
"CaseSensitive": false,
"ExcludeHTTP": false,
"OnlyHTTP": true,
"IsContentType": true,
"ContentType": "text/css,image/jpeg,image/png,image/svg+xml,image/gif,image/tiff,image/webp,image/x-icon,application/font-woff,image/vnd.microsoft.icon,font/ttf,font/woff2",
"HttpResponseCode": "",
"NegativeCT": true,
"IsResponseCode": false,
"ResponseCode": "",
"NegativeRC": false,
"urlextension": "",
"isurlextension": false,
"NegativeUrlExtension": false,
"MatchType": 1,
"Scope": 2,
"RedirType": 0,
"MaxRedir": 0,
"payloadPosition": 0,
"payloadsFile": "",
"grepsFile": "",
"IssueName": "CMS Detected",
"IssueSeverity": "Information",
"IssueConfidence": "Firm",
"IssueDetail": "CMS Detected",
"RemediationDetail": "CMS Detected",
"IssueBackground": "CMS Detected",
"RemediationBackground": "CMS Detected",
"Header": [],
"VariationAttributes": [],
"InsertionPointType": [],
"Scanas": false,
"Scantype": 0,
"pathDiscovery": false
}
] | BitBake | 3 | upenderadepu/BurpBounty | profiles/CMS_Found.bb | [
"Apache-2.0"
] |
#!/bin/bash
yarn add --global yarn@latest
lerna run build
lerna publish --canary
| Shell | 3 | JQuinnie/gatsby | scripts/publish-canary.sh | [
"MIT"
] |
module chapter6/mediaAssets
sig ApplicationState {
catalogs: set Catalog,
catalogState: catalogs -> one CatalogState,
currentCatalog: catalogs,
buffer: set Asset
}
sig Catalog, Asset {}
sig CatalogState {
assets: set Asset,
disj hidden, showing: set assets,
selection: set assets + Undefined
} {
hidden+showing = assets
}
one sig Undefined {}
pred catalogInv [cs: CatalogState] {
cs.selection = Undefined or (some cs.selection and cs.selection in cs.showing)
}
pred appInv [xs: ApplicationState] {
all cs: xs.catalogs | catalogInv [xs.catalogState[cs]]
}
pred showSelected [cs, cs': CatalogState] {
cs.selection != Undefined
cs'.showing = cs.selection
cs'.selection = cs.selection
cs'.assets = cs.assets
}
pred hideSelected [cs, cs': CatalogState] {
cs.selection != Undefined
cs'.hidden = cs.hidden + cs.selection
cs'.selection = Undefined
cs'.assets = cs.assets
}
pred cut [xs, xs': ApplicationState] {
let cs = xs.currentCatalog.(xs.catalogState), sel = cs.selection {
sel != Undefined
xs'.buffer = sel
some cs': CatalogState {
cs'.assets = cs.assets - sel
cs'.showing = cs.showing - sel
cs'.selection = Undefined
xs'.catalogState = xs.catalogState ++ xs.currentCatalog -> cs'
}
}
xs'.catalogs = xs.catalogs
xs'.currentCatalog = xs.currentCatalog
}
pred paste [xs, xs': ApplicationState] {
let cs = xs.currentCatalog.(xs.catalogState), buf = xs.buffer {
xs'.buffer = buf
some cs': CatalogState {
cs'.assets = cs.assets + buf
cs'.showing = cs.showing + (buf - cs.assets)
cs'.selection = buf - cs.assets
xs'.catalogState = xs.catalogState ++ xs.currentCatalog -> cs'
}
}
xs'.catalogs = xs.catalogs
xs'.currentCatalog = xs.currentCatalog
}
assert HidePreservesInv {
all cs, cs': CatalogState |
catalogInv [cs] and hideSelected [cs, cs'] => catalogInv [cs']
}
// This check should not find any counterexample
check HidePreservesInv
pred sameApplicationState [xs, xs': ApplicationState] {
xs'.catalogs = xs.catalogs
all c: xs.catalogs | sameCatalogState [c.(xs.catalogState), c.(xs'.catalogState)]
xs'.currentCatalog = xs.currentCatalog
xs'.buffer = xs.buffer
}
pred sameCatalogState [cs, cs': CatalogState] {
cs'.assets = cs.assets
cs'.showing = cs.showing
cs'.selection = cs.selection
}
assert CutPaste {
all xs, xs', xs": ApplicationState |
(appInv [xs] and cut [xs, xs'] and paste [xs', xs"]) => sameApplicationState [xs, xs"]
}
// This check should find a counterexample
check CutPaste
assert PasteCut {
all xs, xs', xs": ApplicationState |
(appInv [xs] and paste [xs, xs'] and cut [xs', xs"]) => sameApplicationState [xs, xs"]
}
// This check should find a counterexample
check PasteCut
assert PasteNotAffectHidden {
all xs, xs': ApplicationState |
(appInv [xs] and paste [xs, xs']) =>
let c = xs.currentCatalog | xs'.catalogState[c].hidden = xs.catalogState[c].hidden
}
// This check should not find any counterexample
check PasteNotAffectHidden
| Alloy | 4 | chongliujlu/ColorfulAlloy | org.alloytools.alloy.extra/extra/models/book/chapter6/mediaAssets.als | [
"Apache-2.0"
] |
% "test_file.ly"
%
% Written as a test for the music21.mei module's ability to import MEI files.
% This file is a LilyPond score representing the intended musical content of
% "music21/converter/mei/test/test_file.mei" in an easier-to-verify format than
% Python objects.
% Note that, if you want to visually check whether the file was successfully
% imported to music21, and you intend to do this by exporting the imported Score
% to MusicXML so you can visualize it, you introduce another series of possible
% errors. In particular, you'll find that nested tuplets, tuplets in grace notes,
% and nested slurs won't be exported properly to MusicXML, even though they are
% imported correctly from MEI.
%
% If you decide to perform "Test File: Movement title," please let me know,
% and if possible send a recording to me (Christopher Antila).
\version "2.18.2"
\header {
subtitle = "Movement title"
composer = "Christopher Antila"
title = "Test File"
}
PartOne = \relative e' {
\clef "french"
\key f \major
\time 8/8
% m.1
e8 ^.[ e \acciaccatura { g16 f } e8^.] e <f as>2 |
% m.2
<<
{
\voiceOne
\acciaccatura { as8 } g2
\acciaccatura { bis\longa b <bes disis>\breve^^ beses1 }
a4~ a
\bar "|." |
} \\
{
\voiceTwo
e4. f8 d4~ \times 2/3 { d8 cis d }
}
>>
% m.3
\key bes \major
\time 3/4
g16[ a bes c g a] bes8[ a16 a a a
\bar "||" |
% m.4
\times 2/3 { <c f>8] c \times 2/3 { d8 e d } c4 } bes
\bar ":.|.:" |
% m.5
\clef "treble"
\times 1/7 {
\times 4/5 { d8 f a g es }
\clef "alto"
c2 d c bes c d }
\clef "treble"
<g' beses,,>4 |
% m.6
R2. |
% m.7
\time 6/8
\key g \major
\acciaccatura { d,16 fis \times 2/3 { d16 fis d }} es2. |
% m.8
R2. |
% m.9
d16 fis \times 2/3 { d16 fis d } es2 |
}
PartTwo = \relative c {
\clef "bass"
\key f \major
\time 8/8
% m.1
c4.( r8 d4) r |
% m.2
e4\( r f( r \bar "|." |
% m.3
\clef "tenor"
\key bes \major
\time 3/4
g4)\) r f8 r \bar "||" |
% m.4
R2. |
% m.5
\clef "bass"
\times 4/5 { es8 r32 r r16 r } r4 bes' |
% m.6
R2. |
% m.7
\key g \major
R2. |
% mm.8--9
R2.*2 |
}
% The score definition
\score {
\new StaffGroup
<<
\new Staff
<<
\context Voice = "PartOne" { \PartOne }
>>
\new Staff
<<
\context Voice = "PartTwo" { \PartTwo }
>>
>>
\layout {}
}
| LilyPond | 4 | ismail4040/DeepLeanirngJazz | music21/mei/test/test_file.ly | [
"Apache-1.1"
] |
> module Literate(extension) where
>
> extension = ".lhs"
| Literate Haskell | 2 | gregoryck/ghcid | test/bar/src/Literate.lhs | [
"BSD-3-Clause"
] |
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# @ECLASS: firefox-plugin.eclass
# @MAINTAINER:
# Stefan Kuhn <[email protected]>
# @BLURB: Eclass for installing firefox plugins.
# @DESCRIPTION:
# Install extensions for firefox
inherit mozextension multilib
# This eclass supports all EAPIs
EXPORT_FUNCTIONS src_unpack src_install
RDEPEND="|| (
www-client/firefox-bin
www-client/firefox
)"
DEPEND="${RDEPEND}"
S="${WORKDIR}"
# @ECLASS-VARIABLE: FFP_XPI_FILE
# @REQUIRED
# @DEFAULT_UNSET
# @DESCRIPTION:
# Filename of downloaded .xpi file without the .xpi ending
#
# FFP_XPI_FILE="${P}"
# @FUNCTION: firefox-plugin_src_unpack
# @DESCRIPTION:
# Default unpack function for firefox plugins
firefox-plugin_src_unpack() {
xpi_unpack $A
}
# @FUNCTION: firefox-plugin_src_install
# @DESCRIPTION:
# Default install function for firefox plugins
firefox-plugin_src_install() {
declare MOZILLA_FIVE_HOME
if has_version '>=www-client/firefox-21'; then
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox/browser"
else
MOZILLA_FIVE_HOME="/usr/$(get_libdir)/firefox"
fi
if has_version '>=www-client/firefox-bin-21'; then
MOZILLA_FIVE_HOME="/opt/firefox/browser"
else
MOZILLA_FIVE_HOME="/opt/firefox/"
fi
xpi_install "${S}/${FFP_XPI_FILE}"
}
| Gentoo Eclass | 4 | longlene/clx | eclass/firefox-plugin.eclass | [
"MIT"
] |
---
prev: pattern-matching-and-functional-composition.textile
next: advanced-types.textile
title: 타입과 다형성의 기초
layout: post
---
본 강좌에서 다루는 내용은 다음과 같다.
* "정적 타입이 의미하는 것은 무엇인가?":#background
* "스칼라의 타입":#scala
* "매개변수 다형성(Parametric Polymorphism)":#parametricpoly
* "타입 추론(Type inference): 힌들리-밀너(Hindley-Milner) 시스템과 지역 타입 추론의 비교":#inference
* "공변성(Variance)":#variance
* "바운드(Bound)":#bounds
* "한정하기(Quantification)":#quantification
h2(#background). 정적 타입이란 무엇인가? 정적 타입이 유용한 이유는 무엇인가?
피어스(Benjamin C. Pierce, 역주: <a href="https://en.wikipedia.org/wiki/Types_and_Programming_Languages">타입과 프로그래밍 언어</a>라는 책의 저자)는 "타입 시스템은 프로그램 각 부분이 만들어낼 수 있는 값의 종류를 나눔으로써 그 프로그램이 특정 오류 상황을 발생시키지 않는다는 것을 자동으로 검증해주기 위한 문법적 검증 방법"이라 말한다.
타입을 사용하면 함수의 정의역과 공변역을 지정할 수 있다. 예를 들어 아래와 같은 표기를 수학에서 많이 보았을 것이다.
<pre>
f: R -> N
</pre>
이는 `f`가 실수(`R`)에 대해 자연수(`N`)를 대응시키는 함수라는 것을 말한다.
간략히 말하면 이게 _구체적(concrete)_ 타입이 의미하는 바의 전부이다. 하지만, 타입 시스템은 이보다 더 강력하다.
컴파일러는 이런 타입 표시에 기반해 _정적으로_, 즉 컴파일시에, 프로그램이 _건전한지(sound)를_ 판단한다. 즉, 프로그램의 각 구성요소에 표현되어 있는 타입 정보(이는 그 구성요소가 어떤 값을 받고 어떤 값을 출력하는지를 나타내는 제약 조건으로도 볼 수 있다)를 위배하는 프로그램은 컴파일시 실패하며, 컴파일에 성공한 프로그램은 타입을 만족하는 값만을 출력으로 발생시킨다는 의미이다.
일반적으로, _건전하지 못한_ 프로그램은 타입 검사를 통과하지 못하지만, 모든 건전한 프로그램이 타입 검사를 통과하는 것은 아니다. (즉, 타입검사를 통과하면 건전한 프로그램이지만, 타입 오류가 나는 건전한 프로그램도 있을 수 있다.)
타입 시스템의 표현력이 더 풍부해진다면 코드의 신뢰성을 더 높일 수 있다. 왜냐하면 실행해 보기 전에 프로그램이 어떤 값을 가질지를 더 자세히 예상할 수 있기 때문이다. (물론 타입을 잘못 표시해 생기는 문제는 프로그래머 책임이다!) 학계에서는 많은 노력을 하고 있으며, 값에 의존적인 타입(value dependent type) 등이 연구 중이다.
한 가지 더 알아둬야 할 것은 소스코드에 있는 타입 정보는 런타임에는 불필요하기 때문에 컴파일시 제거된다는 점이다(물론 구체적 타입에 따른 자료구조와 각종 변환 코드 등이 대신 바이트코드의 필요한 부분에 들어간다). 이를 타입 소거(type erasure)라 부른다.
h2(#scala). 스칼라의 타입
스칼라의 타입 시스템은 강력하다. 따라서 다양한 표현이 가능하다. 스칼라 타입 시스템의 가장 중요한 특징을 보면 다음과 같다.
* *매개변수 다형성(parametric polymorphism)* 대략, 일반적(generic) 프로그래밍이라 할 수 있다.
* *(지역) 타입 추론* 간단히 말하자면, <code>val i: Int = 12: Int</code>라고 장황하게 쓰지 않아도 되는 이유라 할 수 있다.
* *존재 양화(existential quantification)* 대강 설명하면 _어떤_ 타입에 대해서만 값/함수 등을 정의하는 것이다.
* *뷰(view)* 다음 강의에서 다룰 것이다. 대충 한 타입의 값을 다른 타입으로 "변환할 수 있는지" 여부이다.
(역주: 논리학 용어로 양화란 어떤 대상을 한정짓는 것이다. 존재양화-어떤 명제 p를 만족하는 대상이 대상 집합 안에 있다는 의미-와 전칭 양화-어떤 명제 p를 대상 집합 안의 모든 존재가 만족한다는 의미-가 있다. 일반적인 함수(generic function)의 경우 모든 타입에 대해 해당 함수가 정의되는 것이지만(따라서 이는 전칭 양화가 적용되는 경우라고 볼 수도 있다)., 꼭 그래야 한다는 법은 없다. 특정 조건을 만족하는 타입에 대해서만 정의되는 함수가 없으란 법은 없으니까. 이런 정의를 허용할 경우 타입의 타입이란 개념이 필요해 지고, 타입 추론이 복잡해진다.)
h2(#parametricpoly). 매개변수 다형성(Parametric polymorphism)
(역주: 함수가 값만 받는다고 생각할 지 모르겠지만, 더 일반화 시키자면 매개변수에 값, 타입, 타입의 타입, 타입의 타입의 타입 등이 들어올 수 있다. 값만 넘길 수 있도록 정의된 함수는 보통의 함수가 되고, 구체적 타입과 값을 넘겨야 하는 경우 일반적(제네릭) 함수가 된다.)
매개변수 다형성은 정적 타입의 장점을 포기하지 않으면서 일반적 코드(즉 여러 타입의 값을 처리할 수 있는 코드)를 만들기 위해 사용한다.
예를 들어 매개변수 다형성이 없었다면 일반적인 리스트 데이터 구조는 다음과 같았을 것이다(제네릭 지원 이전의 자바 리스트가 딱 이랬다).
<pre>
scala> 2 :: 1 :: "bar" :: "foo" :: Nil
res5: List[Any] = List(2, 1, bar, foo)
</pre>
위와 같은 경우 개별 멤버의 타입을 알 수가 없다.
<pre>
scala> res5.head
res6: Any = 2
</pre>
따라서 사용하는 쪽에서는 캐스팅("asInstanceOf[]")을 할 수 밖에 없고, 이는 타입 안전성을 해칠 수 있다(왜냐하면 캐스팅은 모두 동적으로 이뤄지기 때문이다).
다형성은 _타입 변수_를 지정함으로써 이루어진다.
<pre>
scala> def drop1[A](l: List[A]) = l.tail
drop1: [A](l: List[A])List[A]
scala> drop1(List(1,2,3))
res1: List[Int] = List(2, 3)
</pre>
h3. 스칼라는 1단계(rank-1) 다형성을 지원한다.
대충 설명하자면, 이는 경우에 따라서 너무 일반적이어서 스칼라 컴파일러가 이해할 수 없는 문장이 있을 수 있다는 말이다. 다음을 생각해 보자.
<pre>
def toList[A](a: A) = List(a)
</pre>
실은 이 함수를 아래와 같이 일반적으로 써먹고 싶다.
<pre>
def foo[A, B](f: A => List[A], b: B) = f(b)
</pre>
위 코드는 컴파일이 되지 않는다. 왜냐하면 모든 타입 변수는 호출하는 시점에 고정되어야 하기 때문이다. 심지어 타입 변수 <code>B</code>를 구체적 타입으로 바꾸더라도 마찬가지이다.
(역주: 호출 시점이란 말을 실제 함수가 런타임시 호출되는 시점과 혼동해서는 안된다. 여기서는 타입변수로 타입이 고정되어야 하는 어떤 코드 조각이 프로그램 코드 내에서 사용되는 시점을 의미한다.)
<pre>
def foo[A](f: A => List[A], i: Int) = f(i)
</pre>
컴파일러는 타입이 맞지 않는다고 오류를 보고할 것이다.
h2(#inference). 타입 추론(Type inference)
정적 타입 체크에 대한 전형적인 반대 의견 하나는 문법적인 부가비용이 너무 크다는 주장이다. 스칼라는 이런 부담을 _타입 추론_을 통해 줄여준다.
함수 언어에서 전통적인 타입 추론은 _힌들리-밀너(Hindley-Milner)_ 시스템이다. 이는 ML에 가장 먼저 적용되었다.
스칼라의 타입 추론은 조금 다르지만, 기본 착상은 동일하다. 즉, 제약관계를 추론해내서 타입을 단일화 하는 것이다.
예를 들어 스칼라에서는 다음과 같은 일을 할 수 없다.
<pre>
scala> { x => x }
<console>:7: error: missing parameter type
{ x => x }
</pre>
반면 OCaml에서는 가능하다.
<pre>
# fun x -> x;;
- : 'a -> 'a = <fun>
</pre>
스칼라에서 모든 타입 유추는 _지역적_이다. 스칼라는 한번에 한 식만을 고려한다. 예를 들면 다음과 같다.
<pre>
scala> def id[T](x: T) = x
id: [T](x: T)T
scala> val x = id(322)
x: Int = 322
scala> val x = id("hey")
x: java.lang.String = hey
scala> val x = id(Array(1,2,3,4))
x: Array[Int] = Array(1, 2, 3, 4)
</pre>
이제는 타입이 보존된다. 스칼라는 자동으로 타입을 유추해준다. 또한 반환 타입도 명시적으로 기술할 필요가 없었다는 점에도 유의하라.
h2(#variance). 공변성/반공변성(Variance)
스칼라의 타입 시스템은 다형성 뿐 아니라 클래스 계층관계도 처리해야만 한다. 클래스의 계층은 상/하위 타입 관계를 만든다. OO와 다형성이 합쳐지면서 생기는 핵심문제는 바로 "<tt>T'</tt>가 <tt>T</tt>의 하위클래스일 때, <tt>Container[T']</tt>가 <tt>Container[T]</tt>의 하위클래스인가?"하는 문제이다. 프로그래머는 클래스 계층과 다형성 타입에서 다음과 같은 관계를 공변성 표기를 통해 표시할 수 있다.
| |*의미* | *스칼라 표기*|
|*공변성(covariant)* |C[T']는 C[T]의 하위 클래스이다 | [+T]|
|*반공변성(contravariant)* |C[T]는 C[T']의 하위 클래스이다 | [-T]|
|*무공변성(invariant)* |C[T]와 C[T']는 아무 관계가 없다 | [T]|
하위타입 관계가 실제 의미하는 것은 "어떤 타입 T에 대해 T'이 하위 타입이라면, T'으로 T를 대치할 수 있는가?" 하는 문제이다(역주: 이를 리스코프치환원칙(Liskov Substitution Principle)이라 한다. 이는 상위타입이 쓰이는 곳에는 언제나 하위 타입의 인스턴스를 넣어도 이상이 없이 동작해야 한다는 의미이다. 이를 위해 하위 타입은 상위 타입의 인터페이스(자바의 인터페이스가 아니라 외부와의 접속을 위해 노출시키는 인터페이스)를 모두 지원하고, 상위타입에서 가지고 있는 가정을 어겨서는 안된다).
<pre>
scala> class Covariant[+A]
defined class Covariant
scala> val cv: Covariant[AnyRef] = new Covariant[String]
cv: Covariant[AnyRef] = Covariant@4035acf6
scala> val cv: Covariant[String] = new Covariant[AnyRef]
<console>:6: error: type mismatch;
found : Covariant[AnyRef]
required: Covariant[String]
val cv: Covariant[String] = new Covariant[AnyRef]
^
</pre>
<pre>
scala> class Contravariant[-A]
defined class Contravariant
scala> val cv: Contravariant[String] = new Contravariant[AnyRef]
cv: Contravariant[AnyRef] = Contravariant@49fa7ba
scala> val fail: Contravariant[AnyRef] = new Contravariant[String]
<console>:6: error: type mismatch;
found : Contravariant[String]
required: Contravariant[AnyRef]
val fail: Contravariant[AnyRef] = new Contravariant[String]
^
</pre>
반공변성은 이상해 보일지 모른다. 언제 반공변성이 사용될까? 약간 놀랄지 모르겠다!
<pre>
trait Function1 [-T1, +R] extends AnyRef
</pre>
이를 치환의 관점에서 본다면, 수긍이 된다. 우선 간단한 클래스 계층을 만들어 보자.
<pre>
scala> class Animal { val sound = "rustle" }
defined class Animal
scala> class Bird extends Animal { override val sound = "call" }
defined class Bird
scala> class Chicken extends Bird { override val sound = "cluck" }
defined class Chicken
</pre>
이제 <code>Bird</code>를 매개변수로 받는 함수를 만든다.
<pre>
scala> val getTweet: (Bird => String) = // TODO
</pre>
표준 동물 라이브러리에도 이런 일을 하는 함수가 있기는 하다. 하지만, 그 함수는 <code>Animal</code>을 매개변수로 받는다. 보통은 "난 ___가 필요한데, ___의 하위 클래스밖에 없네"라는 상황이라도 문제가 되지 않는다. 하지만, 함수 매개변수는 반공변성이다. <code>Bird</code>를 인자로 받는 함수가 필요한 상황에서, <code>Chicken</code>을 받는 함수를 사용했다고 가정하자. 이 경우 인자로 <code>Duck</code>이 들어온다면 문제가 생길 것이다. 하지만, 거기에 <code>Animal</code>을 인자로 받는 함수를 사용한다면 아무 문제가 없을 것이다.
(역주: 함수 <code>Bird=>String</code>가 있다면 이 함수 내에서는 <code>Bird</code>의 인터페이스를 사용해 무언가를 수행하리라는 것을 예상할 수 있다. 이제 이런 함수를 받아 무언가 동작을 하는 <code>f: (Bird=>String)=>String</code>이라는 타입의 함수가 있고, <code>f</code>의 몸체에서는 <code>Bird=>String</code>함수에 <code>Duck</code> 타입의 값을 전달한다고 생각해 보자. 지금까지는 아무 문제가 없다.
이제 <code>f</code>에 <code>Chicken=>String</code> 타입의 함수 <code>g</code>를 넘긴다고 생각해 보면 문제가 왜 생기는지 알 수 있다. 이런 경우 <code>g</code>에 <code>Chicken</code>이 아닌 <code>Duck</code>이 전달될 것이다. 하지만, <code>g</code> 안에서는 닭만이 할 수 있는 짓(닭짓?)을 하게 되고, 오리는 닭짓이 불가능하다. 따라서, 프로그램은 오류가 발행할 수 밖에 없다.
반면, <code>f</code>에 <code>Animal=>String</code> 타입의 함수 <code>h</code>를 넘긴다면, <code>h</code>에 <code>Duck</code>이 전달될 것이다. 바람직하게도, <code>h</code> 안에서는 모든 동물이 할 수 있는 짓만을 하기 때문에, 오리도 아무 문제 없이 사용될 수 있다.)
<pre>
scala> val getTweet: (Bird => String) = ((a: Animal) => a.sound )
getTweet: Bird => String = <function1>
</pre>
함수의 반환 값은 공변성이있다. <code>Bird</code>를 반환하는 함수가 필요한데, <code>Chicken</code>을 반환하는 함수가 있다면 아무런 문제가 없다.
<pre>
scala> val hatch: (() => Bird) = (() => new Chicken )
hatch: () => Bird = <function0>
</pre>
h2(#bounds). 바운드(Bound)
스칼라에서는 다형성 변수를 _바운드를_ 사용해 제약할 수 있다. 이런 바운드는 서브타입 관계를 표현한다.
<pre>
scala> def cacophony[T](things: Seq[T]) = things map (_.sound)
<console>:7: error: value sound is not a member of type parameter T
def cacophony[T](things: Seq[T]) = things map (_.sound)
^
scala> def biophony[T <: Animal](things: Seq[T]) = things map (_.sound)
biophony: [T <: Animal](things: Seq[T])Seq[java.lang.String]
scala> biophony(Seq(new Chicken, new Bird))
res5: Seq[java.lang.String] = List(cluck, call)
</pre>
하위 타입 바운드도 지원된다. 하위 타입 바운드는 반공변성인 경우를 처리하거나 공변성 관계를 좀 더 똑똑하게 처리할 때 유용하다. <code>List[+T]</code>는 공변성이 있다. 새의 리스트는 동물의 리스트이기도 하다.
<code>List</code>에는 <code>::(elem T)</code> 연산자가 있다. 이 연산자는 <code>elem</code>이 앞에 붙은 새 <code>List</code>를 반환한다. 이 새 <code>List</code>는 원래의 리스트와 같은 타입이 된다.
<pre>
scala> val flock = List(new Bird, new Bird)
flock: List[Bird] = List(Bird@7e1ec70e, Bird@169ea8d2)
scala> new Chicken :: flock
res53: List[Bird] = List(Chicken@56fbda05, Bird@7e1ec70e, Bird@169ea8d2)
</pre>
<code>List</code>에는 <code>::[B >: T](x: B)</code>라는 연산자가 _또한_ 있어서 <code>List[B]</code>를 반환한다. <code>B >: T</code> 관계를 보라. 이는 <code>B</code>가 <code>T</code>의 상위 클래스라는 의미이다. 이로 인해 <code>Animal</code>을 <code>List[Bird]</code>의 앞에 붙이는 경우도 제대로 처리할 수 있다.
<pre>
scala> new Animal :: flock
res59: List[Animal] = List(Animal@11f8d3a8, Bird@7e1ec70e, Bird@169ea8d2)
</pre>
이번에는 반환되는 타입이 <code>List[Animal]</code>임에 유의하라.
h2(#quantification). 한정하기(Quantification)
때때로 타입 변수에 어떤 이름이 붙던 상관이 없는 경우가 있다. 예를 들면 다음과 같다.
<pre>
scala> def count[A](l: List[A]) = l.size
count: [A](List[A])Int
</pre>
이런 경우 대신 "와일드카드"를 사용할 수 있다.
<pre>
scala> def count(l: List[_]) = l.size
count: (List[_])Int
</pre>
이는 다음을 짧게 쓴 것이다.
<pre>
scala> def count(l: List[T forSome { type T }]) = l.size
count: (List[T forSome { type T }])Int
</pre>
때때로 한정사가 하는 일이 이해가 안될 때도 있다.
<pre>
scala> def drop1(l: List[_]) = l.tail
drop1: (List[_])List[Any]
</pre>
갑자가 타입 정보가 사라져버렸다! 대체 무슨 일이 벌어진 건지 보려면, 정식 문법으로 다시 돌아가 봐야 한다.
<pre>
scala> def drop1(l: List[T forSome { type T }]) = l.tail
drop1: (List[T forSome { type T }])List[T forSome { type T }]
</pre>
T라는 타입에 대해 이야기할 수 있는 정보가 없다. 왜냐하면 타입 시스템이 이를 허용하지 않기 때문이다.
필요하면 와일드카드 타입 변수도 바운드를 할 수 있다.
<pre>
scala> def hashcodes(l: Seq[_ <: AnyRef]) = l map (_.hashCode)
hashcodes: (Seq[_ <: AnyRef])Seq[Int]
scala> hashcodes(Seq(1,2,3))
<console>:7: error: type mismatch;
found : Int(1)
required: AnyRef
Note: primitive types are not implicitly converted to AnyRef.
You can safely force boxing by casting x.asInstanceOf[AnyRef].
hashcodes(Seq(1,2,3))
^
scala> hashcodes(Seq("one", "two", "three"))
res1: Seq[Int] = List(110182, 115276, 110339486)
</pre>
*See Also* <a href="https://www.drmaciver.com/2008/03/existential-types-in-scala/">맥아이버(D. R. MacIver)가 쓴 '스칼라 특칭 타입'</a>
| Textile | 5 | AstronomiaDev/scala_school | web/ko/type-basics.textile | [
"Apache-2.0"
] |
# -*- perl -*-
use strict;
use warnings;
use tests::tests;
check_expected (IGNORE_EXIT_CODES => 1, [<<'EOF']);
(lg-full) begin
(lg-full) create "quux"
(lg-full) open "quux"
(lg-full) writing "quux"
(lg-full) close "quux"
(lg-full) open "quux" for verification
(lg-full) verified contents of "quux"
(lg-full) close "quux"
(lg-full) end
EOF
pass;
| ChucK | 3 | nguyenvannam2698/os_pintos_20211 | src/tests/filesys/base/lg-full.ck | [
"MIT"
] |
/* basic.css */
@import "sub dir/second.css";
@import url( 'sub dir/fourth.css' );
#project-title {
font-size: 25px;
}
| CSS | 3 | ravitejavalluri/brackets | test/spec/ExtensionUtils-test-files/basic.css | [
"MIT"
] |
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
<button>
Click here! Click here! Click here! Click here! Click here! Click here!
</button>
<div>
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button><button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
</div>
<div>
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
<button>Click here! Click here! Click here! Click here! Click here! Click here!</button>
</div>
<video src="brave.webm"></video>
| Handlebars | 0 | jdelStrother/prettier | tests/handlebars-whitespace/display-inline-block.hbs | [
"MIT"
] |
/******************************************************************************
* Copyright 2018 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.
*****************************************************************************/
#include "modules/canbus/vehicle/lexus/protocol/hazard_lights_cmd_114.h"
#include "modules/drivers/canbus/common/byte.h"
namespace apollo {
namespace canbus {
namespace lexus {
using ::apollo::drivers::canbus::Byte;
const int32_t Hazardlightscmd114::ID = 0x114;
// public
Hazardlightscmd114::Hazardlightscmd114() { Reset(); }
uint32_t Hazardlightscmd114::GetPeriod() const {
// TODO(QiL) modify every protocol's period manually
static const uint32_t PERIOD = 20 * 1000;
return PERIOD;
}
void Hazardlightscmd114::UpdateData(uint8_t* data) {
set_p_hazard_lights_cmd(data, hazard_lights_cmd_);
set_p_ignore_overrides(data, ignore_overrides_);
set_p_clear_override(data, clear_override_);
set_p_enable(data, enable_);
set_p_clear_faults(data, clear_faults_);
}
void Hazardlightscmd114::Reset() {
// TODO(QiL) you should check this manually
hazard_lights_cmd_ = false;
ignore_overrides_ = false;
clear_override_ = false;
enable_ = false;
clear_faults_ = false;
}
Hazardlightscmd114* Hazardlightscmd114::set_hazard_lights_cmd(
bool hazard_lights_cmd) {
hazard_lights_cmd_ = hazard_lights_cmd;
return this;
}
// config detail: {'name': 'HAZARD_LIGHTS_CMD', 'offset': 0.0, 'precision': 1.0,
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 8,
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
void Hazardlightscmd114::set_p_hazard_lights_cmd(uint8_t* data,
bool hazard_lights_cmd) {
uint8_t x = hazard_lights_cmd;
Byte to_set(data + 1);
to_set.set_value(x, 0, 1);
}
Hazardlightscmd114* Hazardlightscmd114::set_ignore_overrides(
bool ignore_overrides) {
ignore_overrides_ = ignore_overrides;
return this;
}
// config detail: {'name': 'IGNORE_OVERRIDES', 'offset': 0.0, 'precision': 1.0,
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 1,
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
void Hazardlightscmd114::set_p_ignore_overrides(uint8_t* data,
bool ignore_overrides) {
uint8_t x = ignore_overrides;
Byte to_set(data + 0);
to_set.set_value(x, 1, 1);
}
Hazardlightscmd114* Hazardlightscmd114::set_clear_override(
bool clear_override) {
clear_override_ = clear_override;
return this;
}
// config detail: {'name': 'CLEAR_OVERRIDE', 'offset': 0.0, 'precision': 1.0,
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 2,
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
void Hazardlightscmd114::set_p_clear_override(uint8_t* data,
bool clear_override) {
uint8_t x = clear_override;
Byte to_set(data + 0);
to_set.set_value(x, 2, 1);
}
Hazardlightscmd114* Hazardlightscmd114::set_enable(bool enable) {
enable_ = enable;
return this;
}
// config detail: {'name': 'ENABLE', 'offset': 0.0, 'precision': 1.0, 'len': 1,
// 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 0, 'type': 'bool',
// 'order': 'motorola', 'physical_unit': ''}
void Hazardlightscmd114::set_p_enable(uint8_t* data, bool enable) {
uint8_t x = enable;
Byte to_set(data + 0);
to_set.set_value(x, 0, 1);
}
Hazardlightscmd114* Hazardlightscmd114::set_clear_faults(bool clear_faults) {
clear_faults_ = clear_faults;
return this;
}
// config detail: {'name': 'CLEAR_FAULTS', 'offset': 0.0, 'precision': 1.0,
// 'len': 1, 'is_signed_var': False, 'physical_range': '[0|1]', 'bit': 3,
// 'type': 'bool', 'order': 'motorola', 'physical_unit': ''}
void Hazardlightscmd114::set_p_clear_faults(uint8_t* data, bool clear_faults) {
uint8_t x = clear_faults;
Byte to_set(data + 0);
to_set.set_value(x, 3, 1);
}
} // namespace lexus
} // namespace canbus
} // namespace apollo
| C++ | 4 | seeclong/apollo | modules/canbus/vehicle/lexus/protocol/hazard_lights_cmd_114.cc | [
"Apache-2.0"
] |
\documentclass[a4paper,russian]{article}
% generated by Docutils <http://docutils.sourceforge.net/>
% rubber: set program xelatex
\usepackage{fontspec}
% \defaultfontfeatures{Scale=MatchLowercase}
% straight double quotes (defined T1 but missing in TU):
\ifdefined \UnicodeEncodingName
\DeclareTextCommand{\textquotedbl}{\UnicodeEncodingName}{%
{\addfontfeatures{RawFeature=-tlig,Mapping=}\char34}}%
\fi
\usepackage{ifthen}
\usepackage{polyglossia}
\setdefaultlanguage{russian}
\setotherlanguages{english}
\setcounter{secnumdepth}{0}
%%% Custom LaTeX preamble
% Linux Libertine (free, wide coverage, not only for Linux)
\setmainfont{Linux Libertine O}
\setsansfont{Linux Biolinum O}
\setmonofont[HyphenChar=None,Scale=MatchLowercase]{DejaVu Sans Mono}
%%% User specified packages and stylesheets
%%% Fallback definitions for Docutils-specific commands
% titlereference role
\providecommand*{\DUroletitlereference}[1]{\textsl{#1}}
% hyperlinks:
\ifthenelse{\isundefined{\hypersetup}}{
\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue,unicode=false]{hyperref}
\usepackage{bookmark}
\urlstyle{same} % normal text font (alternatives: tt, rm, sf)
}{}
%%% Body
\begin{document}
\section{Заголовок%
\label{id1}%
}
первый пример: «Здравствуй, мир!»
\section{Title%
\label{title}%
}
\foreignlanguage{english}{first example: “Hello world”.}
\section{Notes%
\label{notes}%
}
\foreignlanguage{english}{This example tests rendering of Latin and Cyrillic characters by the LaTeX
and XeTeX writers. Check the compiled PDF for garbage characters in text and
bookmarks.}
\foreignlanguage{english}{To work around a problem with Cyrillic in PDF-bookmarks in \DUroletitlereference{hyperref}
versions older than v6.79g 2009/11/20, the test caller \texttt{latex\_cyrillic.py}
sets \texttt{hyperref\_options} to \texttt{'unicode=true'} while \texttt{xetex\_cyrillic.py}
sets it to \texttt{'unicode=false'}. The recommended option for current
(2011-08-24) hyperref versions is \texttt{'pdfencoding=auto'}.}
\end{document}
| TeX | 4 | kokosing/hue | desktop/core/ext-py/docutils-0.14/test/functional/expected/xetex-cyrillic.tex | [
"Apache-2.0"
] |
<template>
<ul>
<li v-for="n in 10000" :key="n">
This is row {{ n + 1 }}
</li>
</ul>
</template>
| Vue | 3 | ardyno/nuxt.js | benchmarks/pages/stateless-big.vue | [
"MIT"
] |
#pragma TextEncoding="UTF-8"
#pragma rtGlobals=3
#pragma ModuleName = SIDAMUtilWaveDf
#ifndef SIDAMshowProc
#pragma hide = 1
#endif
//******************************************************************************
// Create SIDAM temporary folder root:Packages:SIDAM:procName:grfName and
// return a string containing the path.
//******************************************************************************
Function/S SIDAMNewDF(String grfName, String procName)
String path = SIDAM_DF+":"
if (strlen(procName))
path += procName+":"
if (strlen(grfName))
path += grfName
endif
endif
DFREF dfrSav = GetDataFolderDFR()
SetDataFolder root:
int i
for (i = 1; i < ItemsInList(path,":"); i++)
NewDataFolder/O/S $StringFromList(i,path,":")
endfor
String dfTmp = GetDataFolder(1)
SetDataFolder dfrSav
return dfTmp
End
//******************************************************************************
/// Return a string converted from a wave
/// @param w A 1D text wave, a 1D/2D numeric wave
/// @param noquote Elements of a text wave are returned without quotation marks
//******************************************************************************
Function/S SIDAMWaveToString(Wave/Z w, [int noquote])
if (!WaveExists(w))
return ""
endif
int isNumeric = WaveType(w,1) == 1
int isText = WaveType(w,1) == 2
noquote = ParamIsDefault(noquote) ? 0 : noquote
if (isText && WaveDims(w)==1)
return join(w,noquote)
elseif (isNumeric && WaveDims(w)==1)
return join(num2text(w),1)
elseif (isNumeric && WaveDims(w)==2)
Make/T/N=(DimSize(w,1))/FREE txtw = join(num2text(col(w,p)),1)
return join(txtw,1)
else
return ""
endif
End
// Join elements of a text wave and return as a string
Static Function/S join(Wave/T tw, int noquote)
int i, n = numpnts(tw)
String str = ""
if (noquote)
for (i = 0; i < n; i++)
str += tw[i] + ","
endfor
else
for (i = 0; i < n; i++)
str += "\"" + tw[i] + "\","
endfor
endif
return "{" + str[0,strlen(str)-2] + "}"
End
// Convert a 1D numeric wave to a 1D text wave
Static Function/WAVE num2text(Wave w)
Make/T/N=(numpnts(w))/FREE txtw = num2str(w[p])
return txtw
End
// Return a column of a numeric wave
Static Function/WAVE col(Wave w, Variable index)
MatrixOP/FREE cw = col(w,index)
return cw
End
//******************************************************************************
/// Kill a datafolder (dfr). This function is intended for killing the temporary
/// datafolder of SIDAM.
/// Kill waves in the datafolder and subfolders at first. If the waves are in
/// use, remove them from graphs and then kill them. If the waves are used as
/// color table waves, preserve them.
/// After killing waves as much as possible, the datafolder is kill if it has no
/// wave.
/// If the datafolder is killed, its parent is recursively kill if the parent
/// does not have either a wave nor a datafolder which is a sibling of the datafolder.
///
/// @param dfr datafolder
/// @return 1 for dfr is invalid, otherwise 0
//******************************************************************************
Function SIDAMKillDataFolder(DFREF dfr)
if (!DataFolderRefStatus(dfr))
return 0
elseif (DataFolderRefsEqual(dfr,root:))
return 1
endif
int recursive = !CmpStr(GetRTStackInfo(1),GetRTStackInfo(2))
int hasWave, hasDF
if (recursive)
hasWave = CountObjectsDFR(dfr,1)
hasDF = CountObjectsDFR(dfr,4)
if (hasWave || hasDf)
return 2
endif
else
killDependence(dfr)
hasWave = killWaveDataFolder(dfr)
if (hasWave)
return 3
endif
endif
DFREF pdfr = $ParseFilePath(1, GetDataFolder(1,dfr), ":", 1, 0)
KillDataFolder dfr
return SIDAMKillDataFolder(pdfr)
End
// Kill waves in a datafolder and also in subfolders.
// If waves are in use and unless they are color table waves, kill after removing
// them from graphs. Kill a subfolder if it's empty after killing waves
// @param dfr Datafolder
// @return Number of waves remaining in the datafolder without being killed
Static Function killWaveDataFolder(DFREF dfr) // tested
int i, n, count = 0
DFREF dfrSav = GetDataFolderDFR()
SetDataFolder dfr
// Kill datafolders in the current datafolder, if possible
for (i = CountObjectsDFR(dfr,4)-1; i >= 0; i--)
KillDataFolder/Z $GetIndexedObjNameDFR(dfr,4,i)
endfor
// Call recursively this function for remaining datafolders
for (i = 0, n = CountObjectsDFR(dfr,4); i < n; i++)
count += killWaveDataFolder($GetIndexedObjNameDFR(dfr,4,i))
endfor
removeImageTrace(dfr)
KillWaves/A/Z
count += CountObjectsDFR(dfr,1)
if (DataFolderRefStatus(dfrSav))
SetDataFolder dfrSav
else
SetDataFolder root:
endif
return count
End
// Kill dependence to all waves, variables, and strings in a datafolder
// @param dfr Datafolder
Static Function killDependence(DFREF dfr)
int type, i, n
for (type = 1; type <= 3; type++)
for (i = 0, n = CountObjectsDFR(dfr, type); i < n; i++)
SetFormula dfr:$GetIndexedObjNameDFR(dfr, type, i), ""
endfor
endfor
End
// Remove traces and images of waves in a datafolder from all displayed graphs
// Color table waves are not removed.
// @param dfr DataFolder
Static Function removeImageTrace(DFREF dfr) // tested
// Not only graphs but also panels are included in the list because
// panels may contain graphs in subwindows
String grfList = WinList("*",";","WIN:65")
int i, n
for (i = 0, n = ItemsInList(grfList); i < n; i++)
removeImageTraceHelper(dfr, StringFromList(i,grfList))
endfor
End
Static Function removeImageTraceHelper(DFREF dfr, String grfName)
int i, j, n
String imgList, imgName, trcList, trcName
String chdList = ChildWindowList(grfName)
for (i = 0, n = ItemsInList(chdList); i < n; i++)
removeImageTraceHelper(dfr, grfName+"#"+StringFromList(i,chdList))
endfor
if (WinType(grfName) != 1) // not graph
return 0
endif
for (i = 0, n = CountObjectsDFR(dfr,1); i < n; i++)
Wave/SDFR=dfr w = $GetIndexedObjNameDFR(dfr,1,i)
CheckDisplayed/W=$grfName w
if (!V_flag)
continue
endif
imgList = ImageNameList(grfName,";")
for (j = ItemsInList(imgList)-1; j >= 0; j--)
imgName = StringFromList(j,imgList)
if (WaveRefsEqual(w,ImageNameToWaveRef(grfName,imgName)))
RemoveImage/W=$grfName $imgName
endif
endfor
trcList = TraceNameList(grfName,";",1)
for (j = ItemsInList(trcList)-1; j >= 0; j--)
trcName = StringFromList(j,trcList)
Wave yw = TraceNameToWaveRef(grfName,trcName)
Wave/Z xw = XWaveRefFromTrace(grfName,trcName)
if (WaveRefsEqual(w,yw) || WaveRefsEqual(w,xw))
RemoveFromGraph/W=$grfName $trcName
endif
endfor
endfor
End
//******************************************************************************
/// Return an extended wave with an end effect similar to that of Smooth
/// @param w input 2D/3D wave
/// @param endeffect
// 0: bounce, w[-i] = w[i], w[n+i] = w[n-i]
// 1: wrap, w[-i] = w[n-i], w[n+i] = w[i]
// 2: zero, w[-i] = w[n+i] = 0
// 3: repeat, w[-i] = w[0], w[n+i] = w[n]
//******************************************************************************
Function/WAVE SIDAMEndEffect(Wave w, int endeffect)
if (WaveDims(w) != 2 && WaveDims(w) != 3)
return $""
elseif (WaveType(w) & 0x01) // complex
return $""
elseif (endeffect < 0 || endeffect > 3)
return $""
endif
int nx = DimSize(w,0), ny = DimSize(w,1), nz = DimSize(w,2)
int mx = nx-1, my = ny-1
switch (endeffect)
case 0: // bounce
Duplicate/FREE w, xw, yw, xyw
Reverse/P/DIM=0 xw, xyw
Reverse/P/DIM=1 yw, xyw
Concatenate/FREE/NP=0 {xyw, yw, xyw}, ew2 // top and bottom
Concatenate/FREE/NP=0 {xw, w, xw}, ew1 // middle
Concatenate/FREE/NP=1 {ew2, ew1, ew2}, ew
break
case 1: // wrap
Concatenate/FREE/NP=0 {w, w, w}, ew1
Concatenate/FREE/NP=1 {ew1, ew1, ew1}, ew
break
case 2: // zero
Duplicate/FREE w, zw
MultiThread zw = 0
Concatenate/FREE/NP=0 {zw, w, zw}, ew1 // middle
Redimension/N=(nx*3,-1,-1) zw // top and bottom
Concatenate/FREE/NP=1 {zw, ew1, zw}, ew
break
case 3: // repeat
Duplicate/FREE w, ew1, ew2, ew3
MultiThread ew1 = w[0][0][r] // left, bottom
MultiThread ew2 = w[p][0][r] // center, bottom
MultiThread ew3 = w[mx][0][r] // right, bottom
Concatenate/FREE/NP=0 {ew1,ew2,ew3}, bottom
MultiThread ew1 = w[0][q][r] // left, middle
MultiThread ew2 = w[mx][q][r] // right, middle
Concatenate/FREE/NP=0 {ew1,w,ew2}, middle
MultiThread ew1 = w[0][my][r] // left, top
MultiThread ew2 = w[p][my][r] // center, top
MultiThread ew3 = w[mx][my][r] // right, top
Concatenate/FREE/NP=0 {ew1,ew2,ew3}, top
Concatenate/FREE/NP=1 {bottom,middle,top}, ew
break
endswitch
SetScale/P x DimOffset(w,0)-DimDelta(w,0)*nx, DimDelta(w,0), WaveUnits(w,0), ew
SetScale/P y DimOffset(w,1)-DimDelta(w,1)*ny, DimDelta(w,1), WaveUnits(w,1), ew
SetScale/P z DimOffset(w,2), DimDelta(w,2), WaveUnits(w,2), ew
return ew
End
//******************************************************************************
// return number of waves selected in the data browser
//******************************************************************************
Function SIDAMnumberOfSelectedWaves()
int i = 0, n = 0
if (!strlen(GetBrowserSelection(-1)))
return 0
endif
do
n += WaveExists($GetBrowserSelection(i))
while(strlen(GetBrowserSelection(++i)))
return n
End
//******************************************************************************
// return 0 if FFT is available for the input wave
//******************************************************************************
Function SIDAMValidateWaveforFFT(Wave/Z w)
if (!WaveExists(w))
return 1
elseif (WaveDims(w) != 2 && WaveDims(w) != 3)
return 2
// number in the x direction must be even
elseif (mod(DimSize(w,0),2))
return 3
// minimun data points are 4
elseif (DimSize(w,0) < 4 || DimSize(w,1) < 4)
return 4
// not complex, FFT itself is available also for complex, though
elseif (WaveType(w,0) & 0x01)
return 5
// must not contain NaN or INF, faster than WaveStats
elseif (numtype(sum(w)))
return 6
endif
return 0
End
Function/S SIDAMValidateWaveforFFTMsg(int flag)
Make/T/FREE tw = {\
"",\
"wave not found.",\
"the dimension of input wave must be 2 or 3.",\
"the first dimension of input wave must be an even number.",\
"the minimum length of input wave is 4 points.",\
"the input wave must be real.",\
"the input wave must not contain NaNs or INFs."\
}
return tw[flag]
End
| IGOR Pro | 5 | yuksk/SIDAM | src/SIDAM/func/SIDAM_Utilities_WaveDf.ipf | [
"MIT"
] |
/* @generated */
digraph cfg {
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_1" [label="1: Start conditional_init_div0\nFormals: \nLocals: a:int \n " color=yellow style=filled]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_1" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_12" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_2" [label="2: Exit conditional_init_div0 \n " color=yellow style=filled]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_3" [label="3: + \n " ]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_3" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_4" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_4" [label="4: between_join_and_exit \n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_4" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_2" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_5" [label="5: Prune (true branch, if) \n n$0=*&a:int [line 41, column 11]\n PRUNE(n$0, true); [line 41, column 11]\n " shape="invhouse"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_5" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_13" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_6" [label="6: Prune (false branch, if) \n n$0=*&a:int [line 41, column 11]\n PRUNE(!n$0, false); [line 41, column 11]\n " shape="invhouse"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_6" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_3" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_7" [label="7: + \n " ]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_7" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_5" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_7" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_6" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_8" [label="8: Prune (true branch, boolean exp) \n PRUNE(1, true); [line 41, column 15]\n " shape="invhouse"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_8" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_10" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_9" [label="9: Prune (false branch, boolean exp) \n PRUNE(!1, false); [line 41, column 15]\n " shape="invhouse"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_9" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_11" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_10" [label="10: ConditionalStmt Branch \n *&a:int=1 [line 41, column 15]\n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_10" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_7" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_11" [label="11: ConditionalStmt Branch \n *&a:int=0 [line 41, column 15]\n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_11" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_7" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_12" [label="12: DeclStmt \n VARIABLE_DECLARED(a:int); [line 41, column 7]\n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_12" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_8" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_12" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_9" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_13" [label="13: Return Stmt \n n$1=*&a:int [line 42, column 17]\n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_13" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_14" ;
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_14" [label="14: Return Stmt \n *&return:int=(1 / (n$1 - 1)) [line 42, column 5]\n " shape="box"]
"conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_14" -> "conditional_init_div0#15409862859031639280.1a402395676f14cae9f26917a820e9ed_2" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_1" [label="1: Start function_call_init_div0\nFormals: \nLocals: a:int \n " color=yellow style=filled]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_1" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_7" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_2" [label="2: Exit function_call_init_div0 \n " color=yellow style=filled]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_3" [label="3: + \n " ]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_3" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_4" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_4" [label="4: between_join_and_exit \n " shape="box"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_4" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_2" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_5" [label="5: Prune (true branch, if) \n n$0=*&a:int [line 35, column 11]\n PRUNE(n$0, true); [line 35, column 11]\n " shape="invhouse"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_5" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_8" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_6" [label="6: Prune (false branch, if) \n n$0=*&a:int [line 35, column 11]\n PRUNE(!n$0, false); [line 35, column 11]\n " shape="invhouse"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_6" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_3" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_7" [label="7: DeclStmt \n VARIABLE_DECLARED(a:int); [line 35, column 7]\n n$1=_fun_get1() [line 35, column 15]\n *&a:int=n$1 [line 35, column 7]\n " shape="box"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_7" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_5" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_7" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_6" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_8" [label="8: Return Stmt \n n$2=*&a:int [line 36, column 17]\n " shape="box"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_8" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_9" ;
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_9" [label="9: Return Stmt \n *&return:int=(1 / (n$2 - 1)) [line 36, column 5]\n " shape="box"]
"function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_9" -> "function_call_init_div0#7458225874916439501.0ec340f42ffbe340a808e1b8bee4f555_2" ;
"get1#13610294053118758587.bb56087449b1c212bd814280133976bb_1" [label="1: Start get1\nFormals: \nLocals: \n " color=yellow style=filled]
"get1#13610294053118758587.bb56087449b1c212bd814280133976bb_1" -> "get1#13610294053118758587.bb56087449b1c212bd814280133976bb_3" ;
"get1#13610294053118758587.bb56087449b1c212bd814280133976bb_2" [label="2: Exit get1 \n " color=yellow style=filled]
"get1#13610294053118758587.bb56087449b1c212bd814280133976bb_3" [label="3: Return Stmt \n *&return:int=1 [line 32, column 14]\n " shape="box"]
"get1#13610294053118758587.bb56087449b1c212bd814280133976bb_3" -> "get1#13610294053118758587.bb56087449b1c212bd814280133976bb_2" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_1" [label="1: Start reference_init_div0\nFormals: \nLocals: a:int& r:int \n " color=yellow style=filled]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_1" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_10" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_2" [label="2: Exit reference_init_div0 \n " color=yellow style=filled]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_3" [label="3: Return Stmt \n n$0=*&r:int [line 51, column 14]\n " shape="box"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_3" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_4" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_4" [label="4: Return Stmt \n *&return:int=(1 / n$0) [line 51, column 3]\n " shape="box"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_4" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_2" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_5" [label="5: + \n " ]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_5" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_3" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_6" [label="6: Prune (true branch, if) \n n$1=*&a:int& [line 48, column 12]\n n$2=*n$1:int [line 48, column 12]\n PRUNE(n$2, true); [line 48, column 12]\n " shape="invhouse"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_6" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_9" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_7" [label="7: Prune (false branch, if) \n n$1=*&a:int& [line 48, column 12]\n n$2=*n$1:int [line 48, column 12]\n PRUNE(!n$2, false); [line 48, column 12]\n " shape="invhouse"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_7" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_5" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_8" [label="8: DeclStmt \n VARIABLE_DECLARED(a:int&); [line 48, column 7]\n *&a:int&=&r [line 48, column 7]\n " shape="box"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_8" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_6" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_8" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_7" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_9" [label="9: BinaryOperatorStmt: Assign \n n$3=*&a:int& [line 49, column 5]\n *n$3:int=0 [line 49, column 5]\n " shape="box"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_9" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_5" ;
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_10" [label="10: DeclStmt \n VARIABLE_DECLARED(r:int); [line 47, column 3]\n *&r:int=1 [line 47, column 3]\n " shape="box"]
"reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_10" -> "reference_init_div0#8765531464226376816.66e8a6545ef6e4641561744b4125ae49_8" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_1" [label="1: Start simple_inif_elseif_div0\nFormals: \nLocals: a:int b:int \n " color=yellow style=filled]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_1" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_7" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_2" [label="2: Exit simple_inif_elseif_div0 \n " color=yellow style=filled]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_3" [label="3: + \n " ]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_3" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_4" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_4" [label="4: between_join_and_exit \n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_4" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_2" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_5" [label="5: Prune (true branch, if) \n n$0=*&a:int [line 23, column 11]\n PRUNE(n$0, true); [line 23, column 11]\n " shape="invhouse"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_5" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_8" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_6" [label="6: Prune (false branch, if) \n n$0=*&a:int [line 23, column 11]\n PRUNE(!n$0, false); [line 23, column 11]\n " shape="invhouse"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_6" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_12" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_7" [label="7: DeclStmt \n VARIABLE_DECLARED(a:int); [line 23, column 7]\n *&a:int=0 [line 23, column 7]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_7" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_5" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_7" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_6" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_8" [label="8: Return Stmt \n *&return:int=1 [line 24, column 5]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_8" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_2" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_9" [label="9: + \n " ]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_9" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_3" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_10" [label="10: Prune (true branch, if) \n n$1=*&b:int [line 25, column 18]\n PRUNE(n$1, true); [line 25, column 18]\n " shape="invhouse"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_10" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_13" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_11" [label="11: Prune (false branch, if) \n n$1=*&b:int [line 25, column 18]\n PRUNE(!n$1, false); [line 25, column 18]\n " shape="invhouse"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_11" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_14" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_12" [label="12: DeclStmt \n VARIABLE_DECLARED(b:int); [line 25, column 14]\n *&b:int=0 [line 25, column 14]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_12" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_10" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_12" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_11" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_13" [label="13: Return Stmt \n *&return:int=1 [line 26, column 5]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_13" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_2" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_14" [label="14: Return Stmt \n n$2=*&a:int [line 28, column 17]\n n$3=*&b:int [line 28, column 21]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_14" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_15" ;
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_15" [label="15: Return Stmt \n *&return:int=(1 / (n$2 + n$3)) [line 28, column 5]\n " shape="box"]
"simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_15" -> "simple_inif_elseif_div0#1757541495273878703.c8ccefe72cee28b41298deb3c0060bd6_2" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_1" [label="1: Start simple_init_div0\nFormals: \nLocals: a:int \n " color=yellow style=filled]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_1" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_7" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_2" [label="2: Exit simple_init_div0 \n " color=yellow style=filled]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_3" [label="3: + \n " ]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_3" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_4" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_4" [label="4: between_join_and_exit \n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_4" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_2" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_5" [label="5: Prune (true branch, if) \n n$0=*&a:int [line 15, column 11]\n PRUNE(n$0, true); [line 15, column 11]\n " shape="invhouse"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_5" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_8" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_6" [label="6: Prune (false branch, if) \n n$0=*&a:int [line 15, column 11]\n PRUNE(!n$0, false); [line 15, column 11]\n " shape="invhouse"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_6" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_10" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_7" [label="7: DeclStmt \n VARIABLE_DECLARED(a:int); [line 15, column 7]\n *&a:int=0 [line 15, column 7]\n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_7" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_5" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_7" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_6" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_8" [label="8: Return Stmt \n n$1=*&a:int [line 16, column 12]\n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_8" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_9" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_9" [label="9: Return Stmt \n *&return:int=n$1 [line 16, column 5]\n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_9" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_2" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_10" [label="10: Return Stmt \n n$2=*&a:int [line 18, column 16]\n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_10" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_11" ;
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_11" [label="11: Return Stmt \n *&return:int=(1 / n$2) [line 18, column 5]\n " shape="box"]
"simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_11" -> "simple_init_div0#11745425529376514034.212fa73086397a0d668498a9c8eff99e_2" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_1" [label="1: Start simple_init_div1\nFormals: \nLocals: a:int \n " color=yellow style=filled]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_1" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_7" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_2" [label="2: Exit simple_init_div1 \n " color=yellow style=filled]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_3" [label="3: + \n " ]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_3" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_4" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_4" [label="4: between_join_and_exit \n " shape="box"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_4" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_2" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_5" [label="5: Prune (true branch, if) \n n$0=*&a:int [line 9, column 11]\n PRUNE(n$0, true); [line 9, column 11]\n " shape="invhouse"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_5" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_8" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_6" [label="6: Prune (false branch, if) \n n$0=*&a:int [line 9, column 11]\n PRUNE(!n$0, false); [line 9, column 11]\n " shape="invhouse"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_6" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_3" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_7" [label="7: DeclStmt \n VARIABLE_DECLARED(a:int); [line 9, column 7]\n *&a:int=1 [line 9, column 7]\n " shape="box"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_7" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_5" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_7" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_6" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_8" [label="8: Return Stmt \n n$1=*&a:int [line 10, column 16]\n " shape="box"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_8" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_9" ;
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_9" [label="9: Return Stmt \n *&return:int=(1 / n$1) [line 10, column 5]\n " shape="box"]
"simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_9" -> "simple_init_div1#11746272153330047279.0563640869475a4683e824c15c85a68a_2" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_1" [label="1: Start simple_init_null_deref\nFormals: \nLocals: p:int* \n " color=yellow style=filled]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_1" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_7" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_2" [label="2: Exit simple_init_null_deref \n " color=yellow style=filled]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_3" [label="3: + \n " ]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_3" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_4" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_4" [label="4: between_join_and_exit \n " shape="box"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_4" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_2" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_5" [label="5: Prune (true branch, if) \n n$0=*&p:int* [line 55, column 12]\n PRUNE(n$0, true); [line 55, column 12]\n " shape="invhouse"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_5" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_8" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_6" [label="6: Prune (false branch, if) \n n$0=*&p:int* [line 55, column 12]\n PRUNE(!n$0, false); [line 55, column 12]\n " shape="invhouse"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_6" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_9" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_7" [label="7: DeclStmt \n VARIABLE_DECLARED(p:int*); [line 55, column 7]\n *&p:int*=null [line 55, column 7]\n " shape="box"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_7" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_5" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_7" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_6" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_8" [label="8: Return Stmt \n *&return:int=1 [line 56, column 5]\n " shape="box"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_8" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_2" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_9" [label="9: Return Stmt \n n$1=*&p:int* [line 58, column 13]\n n$2=*n$1:int [line 58, column 12]\n " shape="box"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_9" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_10" ;
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_10" [label="10: Return Stmt \n *&return:int=n$2 [line 58, column 5]\n " shape="box"]
"simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_10" -> "simple_init_null_deref#4388790903269166010.3931bff4c48c8b02a470a54ec37db174_2" ;
}
| Graphviz (DOT) | 4 | JacobBarthelmeh/infer | infer/tests/codetoanalyze/cpp/shared/nestedoperators/var_decl_inside_if.cpp.dot | [
"MIT"
] |
sleep 1
t app button wifi PR
| AGS Script | 0 | waltersgrey/autoexechack | WiFiButtonMode/TurnOnAndWiFi/autoexec.ash | [
"MIT"
] |
-- name: create-table-template
CREATE TABLE IF NOT EXISTS templates (
template_id SERIAL PRIMARY KEY
,template_name TEXT UNIQUE
,template_namespace VARCHAR(50)
,template_data BYTEA
,template_created INTEGER
,template_updated INTEGER
,UNIQUE(template_name, template_namespace)
);
CREATE INDEX IF NOT EXISTS ix_template_namespace ON templates (template_namespace);
| SQL | 3 | sthagen/drone-drone | store/shared/migrate/postgres/files/016_create_template_tables.sql | [
"Apache-2.0"
] |
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-2">
<input type="checkbox" id="switch-2" class="mdl-switch__input">
<span class="mdl-switch__label"></span>
</label>
| HTML | 2 | greatwqs/staffjoy | frontend/third_party/node/material_design_lite/switch/snippets/switch-off.html | [
"MIT"
] |
'$Revision:$'
'
Copyright 1992-2009 AUTHORS, Sun Microsystems, Inc. and Stanford University.
See the LICENSE file for license information.
'
'-- Module body'
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
dirent = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'dirent' -> () From: ( |
{} = 'ModuleInfo: Creator: globals dirent.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (\'\')'
name <- ''.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
dirent = bootstrap setObjectAnnotationOf: bootstrap stub -> 'traits' -> 'dirent' -> () From: ( |
{} = 'ModuleInfo: Creator: traits dirent.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
parent* = bootstrap stub -> 'traits' -> 'dirent' -> ().
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (0)'
type <- 0.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
direntReader = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'direntReader' -> () From: ( |
{} = 'ModuleInfo: Creator: globals direntReader.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (nil)'
direntVec.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (nil)'
file.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fComment: allo\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
direntVec = bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( |
{} = 'ModuleInfo: Creator: globals direntVec.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( | {
'Comment: Current index into vector, ie- next field\x7fModuleInfo: Module: dirent InitialContents: InitializeToExpression: (0)'
idxCurr <- 0.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( | {
'Comment: index into vector of current dirent block\x7fModuleInfo: Module: dirent InitialContents: InitializeToExpression: (0)'
idxDirent <- 0.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
direntVec = bootstrap setObjectAnnotationOf: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( |
{} = 'Comment: struct linux_dirent {
unsigned long d_ino; /* Inode number */
unsigned long d_off; /* Offset to next linux_dirent */
unsigned short d_reclen; /* Length of this linux_dirent */
char d_name[]; /* Filename (null-terminated) */
/* length is (d_reclen - 2 - offsetof d_name */
char pad; // Zero padding byte
char d_type; // File type (only since Linux 2.6.4;
// offset is (d_reclen - 1))
}\x7fModuleInfo: Creator: traits direntVec.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
parent* = bootstrap stub -> 'traits' -> 'direntVec' -> ().
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (byteVector cloneSize: 256+32 FillingWith: 0)'
vec <- byteVector cloneSize: 256+32 FillingWith: 0.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'direntVec' -> () From: ( | {
'Comment: length of data in vec\x7fModuleInfo: Module: dirent InitialContents: InitializeToExpression: (0)'
vecDataLen <- 0.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
dirent = bootstrap define: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () ToBe: bootstrap addSlotsTo: (
bootstrap remove: 'directory' From:
bootstrap remove: 'fileInTimeString' From:
bootstrap remove: 'myComment' From:
bootstrap remove: 'postFileIn' From:
bootstrap remove: 'revision' From:
bootstrap remove: 'subpartNames' From:
globals modules init copy ) From: bootstrap setObjectAnnotationOf: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( |
{} = 'ModuleInfo: Creator: globals modules dirent.
CopyDowns:
globals modules init. copy
SlotsToOmit: directory fileInTimeString myComment postFileIn revision subpartNames.
\x7fIsComplete: '.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
directory <- 'applications'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (_CurrentTimeString)\x7fVisibility: public'
fileInTimeString <- _CurrentTimeString.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
myComment <- ''.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
postFileIn = ( |
| resend.postFileIn).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
revision <- '$Revision:$'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'globals' -> 'modules' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: private'
subpartNames <- ''.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
initName: name Type: type = ( |
|
name: name.
type: type).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
makeWithName: name Type: type = ( |
|
dirent clone initName: name Type: type).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'dirent' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
parent* = bootstrap stub -> 'traits' -> 'clonable' -> ().
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> () From: ( | {
'Category: applications\x7fCategory: dirent\x7fModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
direntReader <- bootstrap setObjectAnnotationOf: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( |
{} = 'ModuleInfo: Creator: traits direntReader.
'.
| ) .
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
nextIfFail: fblk = ( |
nbRead.
|
"file nil when done"
(file = nil) ifTrue: [^nil].
" need to read more data ?"
direntVec atEOF ifTrue: [
nbRead: readDirentVec: direntVec
WithFileDesc: fileDesc
IfFail: [|:e|
file close. reset.
fblk value: e.
^nil.
].
].
"done reading dir ?"
nbRead = 0 ifTrue: [
file close. reset.
^nil.
].
direntVec nextDirent).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
openAt: dir = ( |
|
file: os_file openForReading: dir
"IfFail: [|:e| ^e]".
fileDesc: file fileDescriptor.
direntVec: globals direntVec copy.
self).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
parent* = bootstrap stub -> 'traits' -> 'clonable' -> ().
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
readDirentVec: direntVec WithFileDesc: fileDesc IfFail: fb = ( |
resVec.
sysCallRes.
|
"'filedesc :' print. fileDesc printLine."
resVec: os syscall: os sys_getdents
With: fileDesc And: 0
With: direntVec vec And: 0
With: direntVec vec size And: 0
IfFail: fb.
sysCallRes: sysCallResCint: resVec.
direntVec reset: sysCallRes.
sysCallRes).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
reset = ( |
|
file: nil. fileDesc: nil. "direntVec: nil").
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntReader' -> () From: ( | {
'Comment: \"Linux...\"
\"Why is result from syscall (4 byte vector) in bigEndian order ??\"
\"the normal syscall function to convert uses cInt & does NOT work\"\x7fModuleInfo: Module: dirent InitialContents: FollowSlot'
sysCallResCint: sysCallResByteVec = ( |
|
sysCallResByteVec bigEndianIntSize: 4*8 Signed: true At: 0).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
atEOF = ( |
| idxDirent >= vecDataLen).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
copy = ( |
|
direntVec clone init).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
getName = ( |
idxNull.
|
"find terminating null byte"
idxNull: idxCurr.
[idxNull: idxNull succ] untilTrue: [(vec at: idxNull) = 0].
"extract name string "
(vec copyFrom: idxCurr UpTo: idxNull) asString).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
getUlong = ( |
val.
|
val: vec cIntSize: longSizeBits Signed: false At: idxCurr.
idxCurr: idxCurr + longSize.
val).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
getUshort = ( |
val.
|
val: vec cIntSize: shortSizeBits Signed: false At: idxCurr.
idxCurr: idxCurr + shortSize.
val).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
init = ( |
|
vec: byteVector cloneSize: 256+32 FillingWith: 0.
idxCurr: 0.
idxDirent: 0.
self).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (typeSizes byteSize: \'long\')'
longSize = typeSizes byteSize: 'long'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: ( typeSizes bitSize: \'long\')'
longSizeBits = typeSizes bitSize: 'long'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
nextDirent = ( |
length.
name.
nameLen.
type.
|
"get parts, starting @ idxDirent"
idxCurr: idxDirent.
"inode" skipUlong.
"offs" skipUlong.
length: getUshort.
name: getName.
type: vec at: ((idxDirent + length) - 1).
"increment direntVec index for next dirent"
idxDirent: idxDirent + length.
"create new dirent"
dirent makeWithName: name Type: type).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
parent* = bootstrap stub -> 'traits' -> 'clonable' -> ().
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot\x7fVisibility: public'
reset: dataLen = ( |
|
idxCurr: 0.
idxDirent: 0.
vecDataLen: dataLen).
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (typeSizes byteSize: \'short\')'
shortSize = typeSizes byteSize: 'short'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: InitializeToExpression: (typeSizes bitSize: \'short\')'
shortSizeBits = typeSizes bitSize: 'short'.
} | )
bootstrap addSlotsTo: bootstrap stub -> 'traits' -> 'direntVec' -> () From: ( | {
'ModuleInfo: Module: dirent InitialContents: FollowSlot'
skipUlong = ( |
|
idxCurr: idxCurr + longSize).
} | )
'-- Side effects'
globals modules dirent postFileIn
| Self | 5 | phques/dir-walker-langcomp | dirWalker1.self/copy of applications/dirent.self | [
"AFL-3.0"
] |
(*-*-Mode:ats;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
ex: set ft=ats fenc=utf-8 sts=4 ts=4 sw=4 et nomod: *)
(*
MIT License
Copyright (c) 2021 Michael Truog <mjtruog at protonmail dot com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*)
#include "share/atspre_define.hats"
#include "share/atspre_staload.hats"
#include "cloudi.hats"
staload UNSAFE = "prelude/SATS/unsafe.sats"
vtypedef state_type = unit
fn
sequence1_abcd
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/b/c/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test1")
val response = $CLOUDI.memory2free(request)
val () = $CLOUDI.return(api, request_type, name, pattern,
$CLOUDI.StringLiteral(""), response,
timeout, trans_id, source)
in
$CLOUDI.NullError("execution never gets here")
end
fn
sequence1_abc_
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/b/c/*")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test2" || request_str = "test3")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_ab_d
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/b/*/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test4" || request_str = "test5")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_a_cd
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/*/c/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test6" || request_str = "test7")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1__bcd
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "*/b/c/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test8" || request_str = "test9")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_ab__
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/b/*")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test10")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_a__d
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/*/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test11")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1___cd
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "*/c/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test12")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_a___
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "a/*")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test13")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1____d
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "*/d")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test14")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
sequence1_____
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val pattern_expected = string0_append($CLOUDI.prefix_(api), "*")
val () = assertloc(pattern_expected = pattern)
val () = strptr_free(pattern_expected)
val request_str = $CLOUDI.memory2string(request)
val () = assertloc(request_str = "test15")
val response = $CLOUDI.memory2free(request)
in
$CLOUDI.Response(response)
end
fn
send_async
(api: !$CLOUDI.instance(state_type),
suffix: string,
request_str: string):
$CLOUDI.trans_id = let
val name_ptr = string0_append($CLOUDI.prefix_(api), suffix)
val name = $UNSAFE.strptr2string(name_ptr)
val request = $CLOUDI.string2read(request_str)
in
case+ $CLOUDI.send_async(api, name, request,
None_vt(), None_vt(), None_vt()) of
| ~$CLOUDI.Ok(trans_id) => let
val () = strptr_free(name_ptr)
in
trans_id
end
| ~$CLOUDI.Error(status) => let
val () = strptr_free(name_ptr)
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
end
fn
sequence1
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
fun
wait
(api: !$CLOUDI.instance(state_type)):
void = case+ $CLOUDI.recv_async(api, Some_vt(i2u(1000)),
None_vt(), None_vt()) of
| ~$CLOUDI.Ok(@(response_info_wait, response_wait, trans_id_wait)) => let
val done = ($CLOUDI.memory2string(response_wait) <> "end")
val ~$CLOUDI.Ptr(_, _) = response_info_wait
val ~$CLOUDI.Ptr(_, _) = response_wait
val () = $CLOUDI.trans_id_free(trans_id_wait)
in
if (done) then
()
else
wait(api)
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
val () = wait(api)
val () = println!("messaging sequence1 start ats2 (", request_str, ")")
val test1_id = let
val test1_id_temp = send_async(api, "a/b/c/d", "test1")
in
$CLOUDI.trans_id_store(test1_id_temp)
end
val test2_id = let
val test2_id_temp = send_async(api, "a/b/c/z", "test2")
in
$CLOUDI.trans_id_store(test2_id_temp)
end
val test3_id = let
val test3_id_temp = send_async(api, "a/b/c/dd", "test3")
in
$CLOUDI.trans_id_store(test3_id_temp)
end
val test4_id = let
val test4_id_temp = send_async(api, "a/b/z/d", "test4")
in
$CLOUDI.trans_id_store(test4_id_temp)
end
val test5_id = let
val test5_id_temp = send_async(api, "a/b/cc/d", "test5")
in
$CLOUDI.trans_id_store(test5_id_temp)
end
val test6_id = let
val test6_id_temp = send_async(api, "a/z/c/d", "test6")
in
$CLOUDI.trans_id_store(test6_id_temp)
end
val test7_id = let
val test7_id_temp = send_async(api, "a/bb/c/d", "test7")
in
$CLOUDI.trans_id_store(test7_id_temp)
end
val test8_id = let
val test8_id_temp = send_async(api, "z/b/c/d", "test8")
in
$CLOUDI.trans_id_store(test8_id_temp)
end
val test9_id = let
val test9_id_temp = send_async(api, "aa/b/c/d", "test9")
in
$CLOUDI.trans_id_store(test9_id_temp)
end
val test10_id = let
val test10_id_temp = send_async(api, "a/b/czd", "test10")
in
$CLOUDI.trans_id_store(test10_id_temp)
end
val test11_id = let
val test11_id_temp = send_async(api, "a/bzc/d", "test11")
in
$CLOUDI.trans_id_store(test11_id_temp)
end
val test12_id = let
val test12_id_temp = send_async(api, "azb/c/d", "test12")
in
$CLOUDI.trans_id_store(test12_id_temp)
end
val test13_id = let
val test13_id_temp = send_async(api, "a/bzczd", "test13")
in
$CLOUDI.trans_id_store(test13_id_temp)
end
val test14_id = let
val test14_id_temp = send_async(api, "azbzc/d", "test14")
in
$CLOUDI.trans_id_store(test14_id_temp)
end
val test15_id = let
val test15_id_temp = send_async(api, "azbzczd", "test15")
in
$CLOUDI.trans_id_store(test15_id_temp)
end
(* n.b., depends on cloudi_core_i_constants.hrl having
RECV_ASYNC_STRATEGY == recv_async_select_oldest *)
fn
recv_async_wait
(api: !$CLOUDI.instance(state_type),
trans_id_wait: !$CLOUDI.trans_id):
void = let
val trans_id_recv = $CLOUDI.trans_id_copy(trans_id_wait)
in
case+ $CLOUDI.recv_async(api, None_vt(),
Some_vt(trans_id_recv),
Some_vt(false)) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val ~$CLOUDI.Ptr(_, _) = response
val () = assertloc(trans_id_wait = trans_id)
in
$CLOUDI.trans_id_free(trans_id)
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
end
fn
recv_async_assert
(api: !$CLOUDI.instance(state_type),
trans_id_assert: $CLOUDI.trans_id,
response_assert: string):
void = case+ $CLOUDI.recv_async(api, None_vt(),
None_vt(), None_vt()) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val response_str = $CLOUDI.memory2string(response)
val ~$CLOUDI.Ptr(_, _) = response
val () = assertloc(trans_id_assert = trans_id)
val () = $CLOUDI.trans_id_free(trans_id)
val () = $CLOUDI.trans_id_free(trans_id_assert)
in
assertloc(response_assert = response_str)
end
| ~$CLOUDI.Error(status) => let
val () = $CLOUDI.trans_id_free(trans_id_assert)
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
val () = recv_async_wait(api, test1_id)
val () = recv_async_assert(api, test1_id, "test1")
val () = recv_async_wait(api, test2_id)
val () = recv_async_assert(api, test2_id, "test2")
val () = recv_async_wait(api, test3_id)
val () = recv_async_assert(api, test3_id, "test3")
val () = recv_async_wait(api, test4_id)
val () = recv_async_assert(api, test4_id, "test4")
val () = recv_async_wait(api, test5_id)
val () = recv_async_assert(api, test5_id, "test5")
val () = recv_async_wait(api, test6_id)
val () = recv_async_assert(api, test6_id, "test6")
val () = recv_async_wait(api, test7_id)
val () = recv_async_assert(api, test7_id, "test7")
val () = recv_async_wait(api, test8_id)
val () = recv_async_assert(api, test8_id, "test8")
val () = recv_async_wait(api, test9_id)
val () = recv_async_assert(api, test9_id, "test9")
val () = recv_async_wait(api, test10_id)
val () = recv_async_assert(api, test10_id, "test10")
val () = recv_async_wait(api, test11_id)
val () = recv_async_assert(api, test11_id, "test11")
val () = recv_async_wait(api, test12_id)
val () = recv_async_assert(api, test12_id, "test12")
val () = recv_async_wait(api, test13_id)
val () = recv_async_assert(api, test13_id, "test13")
val () = recv_async_wait(api, test14_id)
val () = recv_async_assert(api, test14_id, "test14")
val () = recv_async_wait(api, test15_id)
val () = recv_async_assert(api, test15_id, "test15")
val () = println!("messaging sequence1 end ats2 (", request_str, ")")
(* start sequence2 *)
val trans_id_next = send_async(api, "sequence2", request_str)
val () = $CLOUDI.trans_id_free(trans_id_next)
in
$CLOUDI.Response($CLOUDI.StringLiteral("end"))
end
fn
sequence2_e1
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("1"))
end
fn
sequence2_e2
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("2"))
end
fn
sequence2_e3
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("3"))
end
fn
sequence2_e4
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("4"))
end
fn
sequence2_e5
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("5"))
end
fn
sequence2_e6
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("6"))
end
fn
sequence2_e7
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("7"))
end
fn
sequence2_e8
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val ~$CLOUDI.Ptr(_, _) = request
in
$CLOUDI.Response($CLOUDI.StringLiteral("8"))
end
fn
sequence2
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
val () = println!("messaging sequence2 start ats2 (", request_str, ")")
fun
recv_asyncs_loop
(api: !$CLOUDI.instance(state_type)):
void = let
val name_mcast_ptr = string0_append($CLOUDI.prefix_(api), "e")
val name_mcast = $UNSAFE.strptr2string(name_mcast_ptr)
val request_mcast = $CLOUDI.string2read("")
in
(* the sending process is excluded from the services that receive
the asynchronous message, so in this case, the receiving thread
will not be called, despite the fact it has subscribed to "e",
to prevent a process (in this case thread) from deadlocking
with itself. *)
case+ $CLOUDI.mcast_async(api, name_mcast, request_mcast,
None_vt(), None_vt(), None_vt()) of
| ~$CLOUDI.Ok(@(trans_ids, trans_ids_size)) => let
val () = strptr_free(name_mcast_ptr)
in
(* 4 * 8 == 32, but only 3 out of 4 threads can receive messages,
since 1 thread is sending the mcast_async, so 3 * 8 == 24 *)
if (trans_ids_size = i2sz(24)) then let
val () = $CLOUDI.trans_ids_store(trans_ids, trans_ids_size)
val e_check = arrayptr_make_elt<int>(trans_ids_size, 0)
fun recv_loop {i,ni:nat | i <= ni} .<i>.
(api: !$CLOUDI.instance(state_type),
p_ids: ptr,
p_e_check: ptr,
p_i: size_t(i),
p_n: size_t(ni)):<fun1>
void = if (p_i > 0) then let
val trans_id = $UNSAFE.ptr0_get<$CLOUDI.trans_id>(p_ids)
val () = case+ $CLOUDI.recv_async(api, None_vt(),
Some_vt(trans_id),
None_vt()) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val response_str = $CLOUDI.memory2string(response)
val response_int = g0string2int(response_str)
val ~$CLOUDI.Ptr(_, _) = response
val () = $CLOUDI.trans_id_free(trans_id)
in
$UNSAFE.ptr0_set<int>(p_e_check, response_int)
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref,
"error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
val p_ids_next = ptr0_succ<$CLOUDI.trans_id>(p_ids)
val p_e_check_next = ptr0_succ<int>(p_e_check)
in
recv_loop(api, p_ids_next, p_e_check_next,
p_i - i2sz(1), p_n)
end
else
()
val () = recv_loop(api, ptrcast(trans_ids), ptrcast(e_check),
trans_ids_size, trans_ids_size)
val () = arrayptr_free($UNSAFE.castvwtp0(trans_ids))
val () = arrayptr_quicksort<int>(e_check, trans_ids_size)
fun assert_loop {i,ni:nat | i <= ni} .<i>.
(p_e_check: ptr,
p_i: size_t(i),
p_n: size_t(ni)):<!exn>
void = if (p_i > 0) then let
val e_check = $UNSAFE.ptr0_get<int>(p_e_check)
val expected = i2sz(1) + (p_n - p_i) / i2sz(3)
val () = assertloc(expected = e_check)
val p_e_check_next = ptr0_succ<int>(p_e_check)
in
assert_loop(p_e_check_next, p_i - i2sz(1), p_n)
end
else
()
val () = assert_loop(ptrcast(e_check),
trans_ids_size, trans_ids_size)
val () = arrayptr_free(e_check)
in
()
end
else let
val () = $CLOUDI.trans_ids_free(trans_ids, trans_ids_size)
val count = 4 - sz2i(trans_ids_size) / 8
val () = println!("Waiting for ", count,
" services to initialize")
in
case+ $CLOUDI.recv_async(api, Some_vt(i2u(1000)),
None_vt(), None_vt()) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val ~$CLOUDI.Ptr(_, _) = response
val () = assertloc(iseqz(trans_id))
val () = $CLOUDI.trans_id_free(trans_id)
in
recv_asyncs_loop(api)
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref,
"error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
end
end
| ~$CLOUDI.Error(status) => let
val () = strptr_free(name_mcast_ptr)
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
end
val () = recv_asyncs_loop(api)
val () = println!("messaging sequence2 end ats2 (", request_str, ")")
(* start sequence3 *)
val trans_id_next = send_async(api, "sequence3", request_str)
val () = $CLOUDI.trans_id_free(trans_id_next)
in
$CLOUDI.Response($CLOUDI.StringLiteral("end"))
end
fn
sequence3_f1
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
val request_i = g0string2int(request_str)
in
if (request_i = 4) then
$CLOUDI.Response($CLOUDI.StringLiteral("done"))
else let
val name_next = string0_append($CLOUDI.prefix_(api), "f2")
val request_new = g0int2string(request_i + 2) (* two steps forward *)
in
$CLOUDI.Forward($CLOUDI.strptr2free(name_next),
$CLOUDI.StringLiteral(""),
$CLOUDI.strptr2free(request_new))
end
end
fn
sequence3_f2
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
val request_i = g0string2int(request_str)
val name_next = string0_append($CLOUDI.prefix_(api), "f1")
val request_new = g0int2string(request_i - 1) (* one step back *)
val () = $CLOUDI.forward(api, request_type,
$CLOUDI.strptr2free(name_next),
$CLOUDI.StringLiteral(""),
$CLOUDI.strptr2free(request_new),
timeout, priority, trans_id, source)
in
$CLOUDI.NullError("execution never gets here")
end
fn
sequence3_g1
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
val response = string0_append(request_str, "suffix")
in
$CLOUDI.Response($CLOUDI.strptr2free(response))
end
fn
sequence3
(request_type: $CLOUDI.request_type,
name: string,
pattern: string,
request_info: $CLOUDI.memory_ptr,
request: $CLOUDI.memory_ptr,
timeout: $CLOUDI.timeout,
priority: $CLOUDI.priority,
trans_id: !$CLOUDI.trans_id,
source: !$CLOUDI.memory_ptr,
state: !$CLOUDI.stateptr(state_type),
api: !$CLOUDI.instance(state_type)):
$CLOUDI.response = let
val ~$CLOUDI.Ptr(_, _) = request_info
val request_str = $CLOUDI.memory2string(request)
val ~$CLOUDI.Ptr(_, _) = request
val () = println!("messaging sequence3 start ats2 (", request_str, ")")
val test1_id = send_async(api, "f1", "0")
val () = case+ $CLOUDI.recv_async(api, None_vt(),
Some_vt(test1_id), None_vt()) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val response_str = $CLOUDI.memory2string(response)
val ~$CLOUDI.Ptr(_, _) = response
val () = $CLOUDI.trans_id_free(trans_id)
in
assertloc(response_str = "done")
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
val name_send_sync_ptr = string0_append($CLOUDI.prefix_(api), "g1")
val name_send_sync = $UNSAFE.strptr2string(name_send_sync_ptr)
val request_send_sync = $CLOUDI.string2read("prefix_")
val () = case+ $CLOUDI.send_sync(api, name_send_sync, request_send_sync,
None_vt(), None_vt(), None_vt()) of
| ~$CLOUDI.Ok(@(response_info, response, trans_id)) => let
val ~$CLOUDI.Ptr(_, _) = response_info
val response_str = $CLOUDI.memory2string(response)
val ~$CLOUDI.Ptr(_, _) = response
val () = $CLOUDI.trans_id_free(trans_id)
in
assertloc(response_str = "prefix_suffix")
end
| ~$CLOUDI.Error(status) => let
val () = fprintln!(stderr_ref, "error ", status, ": ", $mylocation)
in
$raise $CLOUDI.FatalError
end
val () = strptr_free(name_send_sync_ptr)
val () = println!("messaging sequence3 end ats2 (", request_str, ")")
(* loop to find any infrequent problems, restart sequence1 *)
val iteration = g0string2int(request_str) + 1
val request_next_ptr = g0int2string(iteration)
val request_next = $UNSAFE.strptr2string(request_next_ptr)
val trans_id_next = send_async(api, "sequence1", request_next)
val () = strptr_free(request_next_ptr)
val () = $CLOUDI.trans_id_free(trans_id_next)
in
$CLOUDI.Response($CLOUDI.StringLiteral("end"))
end
fn
task
(thread_index: uint):
void = let
var state_value: unit = unit()
in
case+ $CLOUDI.new(thread_index, state_value, false) of
| ~$CLOUDI.Ok(api) => let
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_abcd
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/b/c/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_abc_
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/b/c/*")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_ab_d
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/b/*/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_a_cd
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/*/c/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1__bcd
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "*/b/c/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_ab__
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/b/*")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_a__d
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/*/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1___cd
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "*/c/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_a___
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "a/*")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1____d
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "*/d")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1_____
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "*")
implement
$CLOUDI.subscribe$function<state_type>() = sequence1
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "sequence1")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e1
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e2
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e3
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e4
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e5
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e6
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e7
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2_e8
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "e")
implement
$CLOUDI.subscribe$function<state_type>() = sequence2
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "sequence2")
implement
$CLOUDI.subscribe$function<state_type>() = sequence3_f1
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "f1")
implement
$CLOUDI.subscribe$function<state_type>() = sequence3_f2
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "f2")
implement
$CLOUDI.subscribe$function<state_type>() = sequence3_g1
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "g1")
implement
$CLOUDI.subscribe$function<state_type>() = sequence3
val- ~$CLOUDI.Ok(_) = $CLOUDI.subscribe<state_type>(api, "sequence3")
val () = if ($CLOUDI.process_index(api) = i2u(0)) then let
(* start sequence1 *)
val trans_id = send_async(api, "sequence1", "1")
in
$CLOUDI.trans_id_free(trans_id)
end
else
()
val () = case+ $CLOUDI.poll(api, ~1) of
| ~$CLOUDI.Ok(_) =>
println!("terminate messaging ats2")
| ~$CLOUDI.Error(status) =>
fprintln!(stderr_ref, "error ", status)
val () = $CLOUDI.destroy2void(api)
in
()
end
| ~$CLOUDI.Error(status) =>
fprintln!(stderr_ref, "error ", status)
end
implement main0 () = let
val thread_count = $CLOUDI.thread_count()
val threads = $CLOUDI.threads_create(thread_count, task)
in
$CLOUDI.threads_wait(threads)
end
| ATS | 5 | CloudI/CloudI | src/tests/messaging/ats/v2/main.dats | [
"MIT"
] |
a {
color: red
}
/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvZml4dHVyZXMvcG9zdGNzcy9tYXAucG9zdGNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFJQTtFQUNFLFVBQXVCO0NBQ3hCIiwiZmlsZSI6InRlc3QvZml4dHVyZXMvcG9zdGNzcy9tYXAucG9zdGNzcyIsInNvdXJjZXNDb250ZW50IjpbIjpyb290IHtcbiAgLS1tYWluQ29sb3I6IHJlZFxufVxuXG5hIHtcbiAgY29sb3I6IHZhcigtLW1haW5Db2xvcilcbn0iXX0= */ | CSS | 1 | sherryPrincess/wepy | packages/compiler-postcss/test/fixtures/css/map.css | [
"BSD-3-Clause"
] |
/* Copyright 2020 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/compiler/tf2tensorrt/segment/union_find.h"
#include "absl/strings/str_format.h"
#include "tensorflow/compiler/tf2tensorrt/convert/utils.h"
#if GOOGLE_CUDA && GOOGLE_TENSORRT
namespace tensorflow {
namespace tensorrt {
namespace segment {
namespace {
template <typename T>
inline bool CheckIfCompatible(const absl::optional<T>& a,
const absl::optional<T>& b) {
if (a.has_value() && b.has_value()) {
return *a == *b;
}
return true;
}
template <typename T>
inline bool UnifyValues(absl::optional<T>& a, absl::optional<T>& b) {
if (a.has_value()) {
b = a;
} else {
a = b;
}
return true;
}
template <typename T>
inline absl::optional<T> MergeCompatible(const absl::optional<T>& a,
const absl::optional<T>& b) {
DCHECK(CheckIfCompatible(a, b));
return a.has_value() ? a : b;
}
} // namespace
ClusterBatchSize::ClusterBatchSize()
: batch_size_(absl::nullopt), max_batch_size_(absl::nullopt) {}
bool ClusterBatchSize::operator==(const ClusterBatchSize& other) {
return batch_size_ == other.batch_size_ &&
max_batch_size_ == other.max_batch_size_;
}
ClusterBatchSize& ClusterBatchSize::SetBatchSize(int batch_size) {
SetBatchSize(static_cast<absl::optional<int>>(batch_size));
return *this;
}
ClusterBatchSize& ClusterBatchSize::SetBatchSize(
const absl::optional<int>& batch_size) {
batch_size_ = MergeCompatible<int>(batch_size_, batch_size);
if (batch_size_.has_value() && batch_size_.value() >= 0) {
SetMaxBatchSize(batch_size_);
}
return *this;
}
bool ClusterBatchSize::HasBatchSize() const { return batch_size_.has_value(); }
int ClusterBatchSize::GetBatchSize() const {
DCHECK(HasBatchSize());
return batch_size_.value();
}
ClusterBatchSize& ClusterBatchSize::SetMaxBatchSize(int max_batch_size) {
SetBatchSize(static_cast<absl::optional<int>>(max_batch_size));
return *this;
}
ClusterBatchSize& ClusterBatchSize::SetMaxBatchSize(
const absl::optional<int>& max_batch_size) {
max_batch_size_ = MergeCompatible<int>(max_batch_size_, max_batch_size);
return *this;
}
absl::optional<int> ClusterBatchSize::GetOptionalMaxBatchSize() const {
return max_batch_size_;
}
bool ClusterBatchSize::MergeIfCompatible(const ClusterBatchSize& other) {
if (!CheckIfCompatible(batch_size_, other.batch_size_) ||
!CheckIfCompatible(max_batch_size_, other.max_batch_size_)) {
return false;
}
SetBatchSize(other.batch_size_);
SetMaxBatchSize(other.max_batch_size_);
return true;
}
string ClusterBatchSize::ToString() const {
string s;
const auto append_optional_num = [&](const absl::optional<int>& num) {
if (num.has_value()) {
absl::StrAppendFormat(&s, "%d", num.value());
} else {
absl::StrAppendFormat(&s, "?");
}
};
absl::StrAppendFormat(&s, "batch_size=");
append_optional_num(batch_size_);
absl::StrAppendFormat(&s, ", max_batch_size=");
append_optional_num(max_batch_size_);
return s;
}
ClusterProperty::ClusterProperty(const ClusterBatchSize& batch_size,
const DeviceNameUtils::ParsedName& device_name)
: batch_size_(batch_size), device_name_(device_name) {}
Status ClusterProperty::Merge(const ClusterProperty& other) {
ClusterBatchSize merged_batch_size(batch_size_);
if (!merged_batch_size.MergeIfCompatible(other.batch_size_)) {
return errors::Internal(
"trying to merge clusters with incompatible batch sizes.");
}
absl::optional<DeviceNameUtils::ParsedName> merged_device_name =
MergeIfCompatible(device_name_, other.device_name_);
if (!merged_device_name.has_value()) {
return errors::Internal(
"trying to merge clusters with incompatible device assignment.");
}
batch_size_ = std::move(merged_batch_size);
device_name_ = std::move(merged_device_name.value());
return Status::OK();
}
} // namespace segment
} // namespace tensorrt
} // namespace tensorflow
#endif // GOOGLE_CUDA && GOOGLE_TENSORRT
| C++ | 4 | EricRemmerswaal/tensorflow | tensorflow/compiler/tf2tensorrt/segment/union_find.cc | [
"Apache-2.0"
] |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 <atomic>
#include <utility>
#include <folly/Likely.h>
#include <folly/MicroLock.h>
#include <folly/Portability.h>
#include <folly/SharedMutex.h>
#include <folly/functional/Invoke.h>
namespace folly {
// basic_once_flag
//
// The flag template to be used with call_once. Parameterizable by the mutex
// type and atomic template. The mutex type is required to mimic std::mutex and
// the atomic type is required to mimic std::atomic.
template <typename Mutex, template <typename> class Atom = std::atomic>
class basic_once_flag;
// compact_once_flag
//
// An alternative flag template that can be used with call_once that uses only
// 1 byte. Internally, compact_once_flag uses folly::MicroLock and its data
// storage API.
class compact_once_flag;
// call_once
//
// Drop-in replacement for std::call_once.
//
// The libstdc++ implementation has two flaws:
// * it lacks a fast path, and
// * it deadlocks (in explicit violation of the standard) when invoked twice
// with a given flag, and the callable passed to the first invocation throws.
//
// This implementation corrects both flaws.
//
// The tradeoff is a slightly larger once_flag struct at 8 bytes, vs 4 bytes
// with libstdc++ on Linux/x64. However, you may use folly::compact_once_flag
// which is 1 byte.
//
// Does not work with std::once_flag.
//
// mimic: std::call_once
template <typename OnceFlag, typename F, typename... Args>
FOLLY_ALWAYS_INLINE void call_once(OnceFlag& flag, F&& f, Args&&... args) {
if (LIKELY(flag.test_once())) {
return;
}
flag.call_once_slow(std::forward<F>(f), std::forward<Args>(args)...);
}
// try_call_once
//
// Like call_once, but using a boolean return type to signal pass/fail rather
// than throwing exceptions.
//
// Returns true if any previous call to try_call_once with the same once_flag
// has returned true or if any previous call to call_once with the same
// once_flag has completed without throwing an exception or if the function
// passed as an argument returns true; otherwise returns false.
//
// Note: This has no parallel in the std::once_flag interface.
template <typename OnceFlag, typename F, typename... Args>
FOLLY_NODISCARD FOLLY_ALWAYS_INLINE bool try_call_once(
OnceFlag& flag, F&& f, Args&&... args) noexcept {
static_assert(is_nothrow_invocable_v<F, Args...>, "must be noexcept");
if (LIKELY(flag.test_once())) {
return true;
}
return flag.try_call_once_slow(
std::forward<F>(f), std::forward<Args>(args)...);
}
// test_once
//
// Tests whether any invocation to call_once with the given flag has succeeded.
//
// May help with space usage in certain esoteric scenarios compared with caller
// code tracking a separate and possibly-padded bool.
//
// Note: This has no parallel in the std::once_flag interface.
template <typename OnceFlag>
FOLLY_ALWAYS_INLINE bool test_once(OnceFlag const& flag) noexcept {
return flag.test_once();
}
// reset_once
//
// Resets a flag.
//
// Warning: unsafe to call concurrently with any other flag operations.
template <typename OnceFlag>
FOLLY_ALWAYS_INLINE void reset_once(OnceFlag& flag) noexcept {
return flag.reset_once();
}
template <typename Mutex, template <typename> class Atom>
class basic_once_flag {
public:
constexpr basic_once_flag() noexcept = default;
basic_once_flag(const basic_once_flag&) = delete;
basic_once_flag& operator=(const basic_once_flag&) = delete;
private:
template <typename OnceFlag, typename F, typename... Args>
friend void call_once(OnceFlag&, F&&, Args&&...);
template <typename OnceFlag>
friend bool test_once(OnceFlag const& flag) noexcept;
template <typename OnceFlag>
friend void reset_once(OnceFlag&) noexcept;
template <typename F, typename... Args>
FOLLY_NOINLINE void call_once_slow(F&& f, Args&&... args) {
std::lock_guard<Mutex> lock(mutex_);
if (called_.load(std::memory_order_relaxed)) {
return;
}
invoke(std::forward<F>(f), std::forward<Args>(args)...);
called_.store(true, std::memory_order_release);
}
template <typename OnceFlag, typename F, typename... Args>
friend bool try_call_once(OnceFlag&, F&&, Args&&...) noexcept;
template <typename F, typename... Args>
FOLLY_NOINLINE bool try_call_once_slow(F&& f, Args&&... args) noexcept {
std::lock_guard<Mutex> lock(mutex_);
if (called_.load(std::memory_order_relaxed)) {
return true;
}
auto const pass = invoke(std::forward<F>(f), std::forward<Args>(args)...);
called_.store(pass, std::memory_order_release);
return pass;
}
FOLLY_ALWAYS_INLINE bool test_once() const noexcept {
return called_.load(std::memory_order_acquire);
}
FOLLY_ALWAYS_INLINE void reset_once() noexcept {
called_.store(false, std::memory_order_relaxed);
}
Atom<bool> called_{false};
Mutex mutex_;
};
class compact_once_flag {
public:
compact_once_flag() noexcept { mutex_.init(); }
compact_once_flag(const compact_once_flag&) = delete;
compact_once_flag& operator=(const compact_once_flag&) = delete;
private:
template <typename OnceFlag, typename F, typename... Args>
friend void call_once(OnceFlag&, F&&, Args&&...);
template <typename OnceFlag>
friend bool test_once(OnceFlag const& flag) noexcept;
template <typename OnceFlag>
friend void reset_once(OnceFlag&) noexcept;
template <typename F, typename... Args>
FOLLY_NOINLINE void call_once_slow(F&& f, Args&&... args) {
folly::MicroLock::LockGuardWithData guard(mutex_);
if (guard.loadedValue() != 0) {
return;
}
invoke(std::forward<F>(f), std::forward<Args>(args)...);
guard.storeValue(1);
}
template <typename OnceFlag, typename F, typename... Args>
friend bool try_call_once(OnceFlag&, F&&, Args&&...) noexcept;
template <typename F, typename... Args>
FOLLY_NOINLINE bool try_call_once_slow(F&& f, Args&&... args) noexcept {
folly::MicroLock::LockGuardWithData guard(mutex_);
if (guard.loadedValue() != 0) {
return true;
}
const auto pass = static_cast<bool>(
invoke(std::forward<F>(f), std::forward<Args>(args)...));
guard.storeValue(pass ? 1 : 0);
return pass;
}
FOLLY_ALWAYS_INLINE bool test_once() const noexcept {
return mutex_.load(std::memory_order_acquire) != 0;
}
FOLLY_ALWAYS_INLINE void reset_once() noexcept {
folly::MicroLock::LockGuardWithData guard(mutex_);
guard.storeValue(0);
}
folly::MicroLock mutex_;
};
static_assert(
sizeof(compact_once_flag) == 1, "compact_once_flag should be 1 byte");
// once_flag
//
// The flag type to be used with call_once. An instance of basic_once_flag.
//
// Does not work with std::call_once.
//
// mimic: std::once_flag
using once_flag = basic_once_flag<SharedMutex>;
} // namespace folly
| C | 5 | Harshitha91/Tmdb-react-native-node | ReactNativeFrontend/ios/Pods/Flipper-Folly/folly/synchronization/CallOnce.h | [
"Apache-2.0"
] |
/*--------------------------------------------------*/
/* SAS Programming for R Users - code for exercises */
/* Copyright 2016 SAS Institute Inc. */
/*--------------------------------------------------*/
/*SP4R05s01*/
/*Part A*/
proc freq data=sp4r.ameshousing;
tables central_air house_style / plots=freqplot;
run;
/*Part B*/
ods select pearsoncorr;
proc corr data=sp4r.ameshousing;
var saleprice garage_area basement_area gr_liv_area;
run;
/*Part C*/
ods output summary=summary_table;
proc means data=sp4r.ameshousing p10 median p90;
var saleprice gr_liv_area;
class yr_sold;
run;
proc print data=summary_table;
run;
/*Part D*/
proc univariate data=sp4r.ameshousing;
var gr_liv_area;
histogram gr_liv_area / normal kernel;
qqplot gr_liv_area / normal(mu=est sigma=est);
output out=gr_percs pctlpts= 40 to 60 by 2 pctlpre=gr_;
run;
proc print data=gr_percs;
run;
| SAS | 3 | snowdj/sas-prog-for-r-users | code/SP4R05s01.sas | [
"CC-BY-4.0"
] |
##! The UI for Log Stream Control
module LogStreamControl;
export {
# Available log ids at https://www.bro.org/sphinx/scripts/base/frameworks/logging/main.bro.html#type-Log::ID
## This line tells Bro to only disable the specified log streams.
# Predefined value is empty
redef black_list_log_ids += {};
## This line tells Bro to only enable the specified log streams.
# Predefined value is empty
redef white_list_log_ids += {};
## The additional list of log ids that should never be disabled regardless of the contents of the white list or blacklist
# The predefined values include logs useful for characterizing R-Scope performance and debugging scripts
# Recommended usage is to leave this unmodified
redef never_disabled_log_ids += {};
# The rules of precedence:
# never_disabled_log_ids are not disabled regardless of the contents of the white list or black list.
# If both black and white lists are empty then all logs are enabled
# If the black list is not empty only logs specified in the black_list are disabled, the white list is ignored
# If the black list is empty and white list is not empty then all logs except the ones in the white list are disabled
}
| Bro | 4 | reservoirlabs/bro-scripts | logging/log-stream-control-ui.bro | [
"Apache-2.0"
] |
/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "WelcomeWidget.h"
#include <LibConfig/Client.h>
#include <LibCore/System.h>
#include <LibGUI/Application.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Window.h>
#include <LibMain/Main.h>
#include <unistd.h>
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix proc exec"));
auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domains("SystemServer");
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/home", "r"));
TRY(Core::System::unveil("/tmp/portal/webcontent", "rw"));
TRY(Core::System::unveil("/bin/Help", "x"));
TRY(Core::System::unveil(nullptr, nullptr));
auto app_icon = GUI::Icon::default_icon("app-welcome");
auto window = TRY(GUI::Window::try_create());
window->resize(480, 250);
window->center_on_screen();
window->set_title("Welcome");
window->set_minimum_size(480, 250);
window->set_icon(app_icon.bitmap_for_size(16));
window->set_main_widget<WelcomeWidget>();
window->show();
return app->exec();
}
| C++ | 4 | r00ster91/serenity | Userland/Applications/Welcome/main.cpp | [
"BSD-2-Clause"
] |
#!/bin/bash
# Copyright 2019 The Kubernetes 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.
# This script executes the Kubernetes conformance tests in accordance with:
# https://github.com/cncf/k8s-conformance/blob/master/instructions.md
#
# Usage:
# conformance_tests.sh <path to minikube> <flags>
#
# Example:
# conformance_tests.sh ./out/minikube --driver=hyperkit
set -ex -o pipefail
readonly PROFILE_NAME="k8sconformance"
readonly MINIKUBE=${1:-./out/minikube}
shift || true
readonly START_ARGS=${@:-}
# Requires a fully running Kubernetes cluster.
"${MINIKUBE}" delete -p "${PROFILE_NAME}" || true
"${MINIKUBE}" start -p "${PROFILE_NAME}" ${START_ARGS} --wait=all --nodes=2
kubectl --context "${PROFILE_NAME}" get pods --all-namespaces
"${MINIKUBE}" status -p "${PROFILE_NAME}"
# Make sure jq is installed
sudo apt-get install jq -y
# Remove old sonobuoy installation
rm -rf sonobuoy
# Get latest sonobuoy version
sonobuoy=$(curl -s https://api.github.com/repos/vmware-tanzu/sonobuoy/releases/latest | jq .assets[].browser_download_url | grep linux_amd64 | cut -d '"' -f 2)
curl -LO $sonobuoy
tarball=$(echo $sonobuoy | awk -F "/" '{print $(NF)}')
tar -xzf $tarball
./sonobuoy run --mode=certified-conformance --wait --alsologtostderr
outdir="$(mktemp -d)"
./sonobuoy retrieve "${outdir}"
"${MINIKUBE}" delete -p "${PROFILE_NAME}"
cwd=$(pwd)
cd "${outdir}"
mkdir ./results; tar xzf *.tar.gz -C ./results
version=$(${cwd}/${MINIKUBE} version | cut -d" " -f3)
mkdir -p "minikube-${version}"
cd "minikube-${version}"
cat <<EOF >PRODUCT.yaml
vendor: minikube
name: minikube
version: ${version}
website_url: https://github.com/kubernetes/minikube
repo_url: https://github.com/kubernetes/minikube
documentation_url: https://minikube.sigs.k8s.io/docs/
product_logo_url: https://raw.githubusercontent.com/kubernetes/minikube/master/images/logo/logo.svg
type: installer
description: minikube runs a local Kubernetes cluster on macOS, Linux, and Windows.
EOF
cat <<EOF >README.md
# Reproducing the test results
## Run minikube with docker driver
Install [docker](https://docs.docker.com/engine/install/)
Install [kubectl](https://v1-18.docs.kubernetes.io/docs/tasks/tools/install-kubectl/)
Clone the [minikube repo](https://github.com/kubernetes/minikube)
## Compile the latest minikube binary
```console
% cd <minikube dir>
% make
```
## Trigger the tests and get back the results
We follow the [official instructions](https://github.com/cncf/k8s-conformance/blob/master/instructions.md):
```console
% cd <minikube dir>
./hack/conformance_tests.sh ${MINIKUBE} ${START_ARGS}
```
This script will run sonobuoy against a minikube cluster with two nodes and the provided parameters.
EOF
cp -r ../results/plugins/e2e/results/global/* .
cd ..
cp -r "minikube-${version}" "${cwd}"
| Shell | 5 | skyplaying/minikube | hack/conformance_tests.sh | [
"Apache-2.0"
] |
foo <%= if true do %>bar.<% end %>
| HTML+EEX | 2 | doughsay/elixir | lib/eex/test/fixtures/eex_template.eex | [
"Apache-2.0"
] |
.foo {
color: red;
}
/*# sourceMappingURL=file.css.map */
| CSS | 0 | fuelingtheweb/prettier | tests/css_comments/source-map.css | [
"MIT"
] |
"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: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"
}, "0"), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
d: "M12 18c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm3.44-8c.26.45.44.96.51 1.5h-7.9c.07-.54.24-1.05.51-1.5h6.88zm.51 2.5c-.07.54-.24 1.05-.51 1.5H8.56c-.26-.45-.44-.96-.51-1.5h7.9zM9.38 15h5.24c-.7.61-1.61 1-2.62 1s-1.91-.39-2.62-1zm5.24-6H9.38c.7-.61 1.61-1 2.62-1s1.91.39 2.62 1z"
}, "1")], 'HvacOutlined');
exports.default = _default; | JavaScript | 4 | good-gym/material-ui | packages/material-ui-icons/lib/HvacOutlined.js | [
"MIT"
] |
component {
function configure() {
coldbox = {
appName : "ColdBox MVC",
reinitPassword : "",
handlersIndexAutoReload : false,
customErrorTemplate : "/coldbox/system/exceptions/Whoops.cfm",
handlerCaching : true
};
flash = {
scope = "Mock"
};
}
function afterConfigurationLoad() {
var cache = controller.getCacheBox().getCache( 'default' );
cfloop( from="1", to="10000", index="local.i" ) {
cache.getOrSet(
'cached-world-#i#',
()=>queryExecute( '
SELECT id, randomNumber
FROM World
WHERE id = #i#
').getRow( 1 )
);
}
}
}
| ColdFusion CFC | 4 | efectn/FrameworkBenchmarks | frameworks/CFML/coldbox/src/config/Coldbox.cfc | [
"BSD-3-Clause"
] |
node ./node_modules/.bin/lol | Batchfile | 0 | Bhanditz/yarn | __tests__/fixtures/lifecycle-scripts/script_only_pre_post/node_modules/.bin/lol.cmd | [
"BSD-2-Clause"
] |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build faketime
// +build faketime
package syscall
import "unsafe"
const faketime = true
// When faketime is enabled, we redirect writes to FDs 1 and 2 through
// the runtime's write function, since that adds the framing that
// reports the emulated time.
//go:linkname runtimeWrite runtime.write
func runtimeWrite(fd uintptr, p unsafe.Pointer, n int32) int32
func faketimeWrite(fd int, p []byte) int {
var pp *byte
if len(p) > 0 {
pp = &p[0]
}
return int(runtimeWrite(uintptr(fd), unsafe.Pointer(pp), int32(len(p))))
}
| Go | 4 | PhilYue/go | src/syscall/time_fake.go | [
"BSD-3-Clause"
] |
#!/bin/bash
set -ex
if [ -n "$CLANG_VERSION" ]; then
if [[ $CLANG_VERSION == 7 && $UBUNTU_VERSION == 16.04 ]]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main"
elif [[ $CLANG_VERSION == 9 && $UBUNTU_VERSION == 18.04 ]]; then
sudo apt-get update
# gpg-agent is not available by default on 18.04
sudo apt-get install -y --no-install-recommends gpg-agent
wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${CLANG_VERSION} main"
fi
sudo apt-get update
apt-get install -y --no-install-recommends clang-"$CLANG_VERSION"
apt-get install -y --no-install-recommends llvm-"$CLANG_VERSION"
# Install dev version of LLVM.
if [ -n "$LLVMDEV" ]; then
sudo apt-get install -y --no-install-recommends llvm-"$CLANG_VERSION"-dev
fi
# Use update-alternatives to make this version the default
# TODO: Decide if overriding gcc as well is a good idea
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang-"$CLANG_VERSION" 50
# update-alternatives --install /usr/bin/g++ g++ /usr/bin/clang++-"$CLANG_VERSION" 50
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-"$CLANG_VERSION" 50
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-"$CLANG_VERSION" 50
# clang's packaging is a little messed up (the runtime libs aren't
# added into the linker path), so give it a little help
clang_lib=("/usr/lib/llvm-$CLANG_VERSION/lib/clang/"*"/lib/linux")
echo "$clang_lib" > /etc/ld.so.conf.d/clang.conf
ldconfig
# Cleanup package manager
apt-get autoclean && apt-get clean
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
fi
| Shell | 3 | Hacky-DH/pytorch | .circleci/docker/common/install_clang.sh | [
"Intel"
] |
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml.
using Go = import "/go.capnp";
using import "Admin.capnp".Admin;
using import "Animal.capnp".Animal;
@0xb2907c63dfc23a7d;
$Go.package("main");
$Go.import("main");
struct Cage {
admin @0 :Admin;
animal @1 :Animal;
}
| Cap'n Proto | 3 | mrpotes/go-raml | codegen/capnp/fixtures/struct/golang/Cage.capnp | [
"BSD-2-Clause"
] |
function _enhancd_flag_is_default
set -l opt $argv[1]
switch $SHELL
case "*bash"
switch "$opt"
case "-P" "-L" "-e" "-@"
return 0
end
case "*zsh"
switch "$opt"
case "-q" "-s" "-L" "-P"
return 0
end
end
return 1
end | fish | 4 | d3dave/enhancd | functions/_enhancd_flag_is_default.fish | [
"MIT"
] |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.spark.network.shuffle;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.roaringbitmap.RoaringBitmap;
import org.apache.spark.network.buffer.ManagedBuffer;
import org.apache.spark.network.protocol.Encoders;
/**
* Contains meta information for a merged block. Currently this information constitutes:
* 1. Number of chunks in a merged shuffle block.
* 2. Bitmaps for each chunk in the merged block. A chunk bitmap contains all the mapIds that were
* merged to that merged block chunk.
*
* @since 3.1.0
*/
public class MergedBlockMeta {
private final int numChunks;
private final ManagedBuffer chunksBitmapBuffer;
public MergedBlockMeta(int numChunks, ManagedBuffer chunksBitmapBuffer) {
this.numChunks = numChunks;
this.chunksBitmapBuffer = Preconditions.checkNotNull(chunksBitmapBuffer);
}
public int getNumChunks() {
return numChunks;
}
public ManagedBuffer getChunksBitmapBuffer() {
return chunksBitmapBuffer;
}
public RoaringBitmap[] readChunkBitmaps() throws IOException {
ByteBuf buf = Unpooled.wrappedBuffer(chunksBitmapBuffer.nioByteBuffer());
List<RoaringBitmap> bitmaps = new ArrayList<>();
while(buf.isReadable()) {
bitmaps.add(Encoders.Bitmaps.decode(buf));
}
assert (bitmaps.size() == numChunks);
return bitmaps.toArray(new RoaringBitmap[0]);
}
}
| Java | 5 | kesavanvt/spark | common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/MergedBlockMeta.java | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] |
Code.require_file("../test_helper.exs", __DIR__)
defmodule Mix.RebarTest do
use MixTest.Case
# rebar_dep and git_rebar are loaded dynamically
@compile {:no_warn_undefined, [:rebar_dep, :git_rebar]}
defmodule RebarAsDep do
def project do
[
app: :rebar_as_dep,
version: "0.1.0",
deps: [
{:rebar_dep, path: MixTest.Case.tmp_path("rebar_dep"), app: false}
]
]
end
end
defmodule RebarAsDepWithEnv do
def project do
[
app: :rebar_as_dep,
version: "0.1.0",
deps: [
{
:rebar_dep,
path: MixTest.Case.tmp_path("rebar_dep"),
app: false,
system_env: [{"FILE_FROM_ENV", "rebar-test-rebar3"}, {"CONTENTS_FROM_ENV", "rebar3"}]
}
]
]
end
end
defmodule RebarOverrideAsDep do
def project do
[
app: :rebar_as_dep,
version: "0.1.0",
deps: [
{
:rebar_override,
path: MixTest.Case.tmp_path("rebar_override"), app: false
}
]
]
end
end
defmodule Rebar2AsDep do
def project do
[
app: :rebar_as_dep,
version: "0.1.0",
deps: [
{
:rebar_dep,
path: MixTest.Case.tmp_path("rebar_dep"),
app: false,
manager: :rebar,
system_env: [{"FILE_FROM_ENV", "rebar-test-rebar"}, {"CONTENTS_FROM_ENV", "rebar"}]
}
]
]
end
end
describe "load_config/1" do
test "loads rebar.config" do
path = MixTest.Case.fixture_path("rebar_dep")
config = Mix.Rebar.load_config(path)
assert config[:erl_opts] == [:warnings_as_errors]
assert config[:SCRIPT] == 'rebar.config.script'
end
test "loads rebar.config.script on dependency directory" do
path = MixTest.Case.fixture_path("rebar_dep_script")
config = Mix.Rebar.load_config(path)
assert config[:dir] == {:ok, String.to_charlist(path)}
end
end
@git_rebar_charlist '../../test/fixtures/git_rebar'
@git_rebar_string "../../test/fixtures/git_rebar"
describe "deps/1" do
defp parse_dep(dep) do
[deps: [dep]] |> Mix.Rebar.deps() |> hd()
end
test "parses Rebar dependencies" do
assert parse_dep({:git_rebar, '~> 1.0'}) == {:git_rebar, "~> 1.0", override: true}
assert parse_dep({:git_rebar, '~> 1.0', {:pkg, :rebar_fork}}) ==
{:git_rebar, "~> 1.0", override: true, hex: :rebar_fork}
assert parse_dep({:git_rebar, {:pkg, :rebar_fork}}) ==
{:git_rebar, override: true, hex: :rebar_fork}
assert parse_dep({:git_rebar, '0.1..*', {:git, @git_rebar_charlist, :main}}) ==
{:git_rebar, ~r"0.1..*", override: true, git: @git_rebar_string, ref: "main"}
assert parse_dep({:git_rebar, {:git, @git_rebar_charlist, :main}}) ==
{:git_rebar, override: true, git: @git_rebar_string, ref: "main"}
assert parse_dep({:git_rebar, '0.1..*', {:git, @git_rebar_charlist}, [:raw]}) ==
{:git_rebar, ~r"0.1..*", override: true, git: @git_rebar_string, compile: false}
assert parse_dep({:git_rebar, '', {:git, @git_rebar_charlist, {:ref, '64691eb'}}}) ==
{:git_rebar, ~r"", override: true, git: @git_rebar_string, ref: "64691eb"}
assert parse_dep(:git_rebar) == {:git_rebar, override: true}
end
end
describe "apply_overrides/3" do
test "applies overrides" do
config = [deps: {:git_rebar, '~> 2.0'}]
overrides = [{:override, [deps: [{:git_rebar, '~> 1.0'}]]}]
assert Mix.Rebar.apply_overrides(:foo, config, overrides) ==
[deps: [{:git_rebar, '~> 1.0'}], overrides: overrides]
config = [deps: [{:git_rebar, '~> 2.0'}]]
overrides = [{:override, :bar, [deps: [{:git_rebar, '~> 1.0'}]]}]
assert Mix.Rebar.apply_overrides(:foo, config, overrides) ==
[deps: [{:git_rebar, '~> 2.0'}], overrides: overrides]
config = [deps: [{:git_rebar, '~> 2.0'}]]
overrides = [{:override, :foo, [deps: [{:git_rebar, '~> 1.0'}]]}]
assert Mix.Rebar.apply_overrides(:foo, config, overrides) ==
[deps: [{:git_rebar, '~> 1.0'}], overrides: overrides]
config = [deps: [{:git_rebar, '~> 1.0'}]]
overrides = [{:add, :foo, [deps: [{:git_rebar2, '~> 2.0'}]]}]
assert Mix.Rebar.apply_overrides(:foo, config, overrides) ==
[deps: [{:git_rebar2, '~> 2.0'}, {:git_rebar, '~> 1.0'}], overrides: overrides]
end
test "concatenates overrides" do
config = [deps: {:git_rebar, '~> 2.0'}, overrides: [{:add, :bar, []}]]
overrides = [{:override, [deps: [{:git_rebar, '~> 1.0'}]]}]
assert Mix.Rebar.apply_overrides(:foo, config, overrides) ==
[deps: [{:git_rebar, '~> 1.0'}], overrides: overrides ++ [{:add, :bar, []}]]
end
end
describe "dependency_config/1" do
test "converts Rebar config to dependency config" do
config = Mix.Rebar.load_config(fixture_path("rebar_dep"))
dep_config = Mix.Rebar.dependency_config(config)
assert config[:erl_opts] == [:warnings_as_errors]
assert config[:project_plugins] == [:remove_me]
assert dep_config[:erl_opts] == []
refute dep_config[:project_plugins]
end
end
describe "integration with Mix" do
test "inherits Rebar manager" do
Mix.Project.push(RebarAsDep)
deps = Mix.Dep.load_on_environment([])
assert Enum.all?(deps, &(&1.manager == :rebar3))
end
test "parses Rebar dependencies from rebar.config" do
Mix.Project.push(RebarAsDep)
deps = Mix.Dep.load_on_environment([])
assert Enum.all?(deps, &(&1.manager == :rebar3))
assert Enum.find(deps, &(&1.app == :rebar_dep))
assert Enum.find(deps, fn %Mix.Dep{app: app, opts: opts} ->
if app == :git_rebar do
assert Enum.find(opts, &match?({:git, _}, &1))
assert Enum.find(opts, &match?({:ref, "main"}, &1))
true
end
end)
end
test "handles Rebar overrides" do
in_tmp("Rebar overrides", fn ->
Mix.Project.push(RebarOverrideAsDep)
Mix.Tasks.Deps.Get.run([])
assert Mix.Dep.load_on_environment([]) |> Enum.map(& &1.app) ==
[:git_repo, :git_rebar, :rebar_override]
end)
after
purge([GitRepo.MixProject])
end
# We run only on Unix because Windows has a hard time
# removing the Rebar executable after executed.
@tag [unix: true]
test "gets and compiles dependencies" do
in_tmp("get and compile dependencies", fn ->
Mix.Project.push(RebarAsDep)
Mix.Tasks.Deps.Get.run([])
assert_received {:mix_shell, :info, ["* Getting git_rebar " <> _]}
Mix.Tasks.Deps.Compile.run([])
assert_received {:mix_shell, :run, ["===> Compiling git_rebar\n"]}
assert_received {:mix_shell, :run, ["===> Compiling rebar_dep\n"]}
assert :git_rebar.any_function() == :ok
assert :rebar_dep.any_function() == :ok
load_paths =
Mix.Dep.load_on_environment([])
|> Enum.map(&Mix.Dep.load_paths(&1))
|> Enum.concat()
assert File.exists?("_build/dev/lib/rebar_dep/ebin/rebar_dep.beam")
assert File.exists?("_build/dev/lib/git_rebar/ebin/git_rebar.beam")
# Assert we have no .mix/compile.lock as a .mix/compile.lock
# means we check for the Elixir version on every command.
refute File.exists?("_build/dev/lib/rebar_dep/.mix/compile.lock")
refute File.exists?("_build/dev/lib/git_rebar/.mix/compile.lock")
assert Enum.any?(load_paths, &String.ends_with?(&1, "git_rebar/ebin"))
assert Enum.any?(load_paths, &String.ends_with?(&1, "rebar_dep/ebin"))
end)
end
test "gets and compiles dependencies with build_embedded" do
Mix.ProjectStack.post_config(build_embedded: true)
in_tmp("get and compile dependencies with build_embedded", fn ->
Mix.Project.push(RebarAsDep)
Mix.Tasks.Deps.Get.run([])
assert_received {:mix_shell, :info, ["* Getting git_rebar " <> _]}
Mix.Tasks.Deps.Compile.run([])
assert_received {:mix_shell, :run, ["===> Compiling git_rebar\n"]}
assert_received {:mix_shell, :run, ["===> Compiling rebar_dep\n"]}
assert :git_rebar.any_function() == :ok
assert :rebar_dep.any_function() == :ok
assert File.exists?("_build/dev/lib/git_rebar/ebin/git_rebar.beam")
assert File.exists?("_build/dev/lib/git_rebar/ebin/git_rebar.app")
end)
end
# We run only on Unix because Windows has a hard time
# removing the Rebar executable after executed.
@tag [unix: true]
test "applies variables from :system_env option when compiling dependencies" do
in_tmp("applies variables from system_env", fn ->
Mix.Project.push(RebarAsDepWithEnv)
expected_file = Path.join(tmp_path("rebar_dep"), "rebar-test-rebar3")
File.rm(expected_file)
Mix.Tasks.Deps.Get.run([])
Mix.Tasks.Deps.Compile.run([])
assert {:ok, "rebar3"} = File.read(expected_file)
end)
end
test "gets and compiles dependencies with Mix" do
in_tmp("get and compile dependencies with Mix", fn ->
Mix.Project.push(RebarAsDep)
File.write!(MixTest.Case.tmp_path("rebar_dep/mix.exs"), """
defmodule RebarDep.MixProject do
use Mix.Project
def project do
[app: :rebar_dep,
version: "0.0.1"]
end
end
""")
Mix.Tasks.Deps.Compile.run([])
assert_received {:mix_shell, :info, ["==> rebar_dep"]}
assert_received {:mix_shell, :info, ["Generated rebar_dep app"]}
assert File.regular?("_build/dev/lib/rebar_dep/ebin/rebar_dep.app")
end)
after
File.rm(MixTest.Case.tmp_path("rebar_dep/mix.exs"))
end
test "gets and compiles dependencies with Rebar2" do
in_tmp("get and compile dependencies for Rebar2", fn ->
Mix.Project.push(Rebar2AsDep)
Mix.Tasks.Deps.Get.run([])
assert_received {:mix_shell, :info, ["* Getting git_rebar" <> _]}
Mix.Tasks.Deps.Compile.run([])
assert_received {:mix_shell, :run, ["==> git_rebar (compile)\n"]}
assert_received {:mix_shell, :run, ["==> rebar_dep (compile)\n"]}
assert :git_rebar.any_function() == :ok
assert :rebar_dep.any_function() == :ok
load_paths =
Mix.Dep.load_on_environment([])
|> Enum.map(&Mix.Dep.load_paths(&1))
|> Enum.concat()
assert File.exists?("_build/dev/lib/rebar_dep/ebin/rebar_dep.beam")
assert File.exists?("_build/dev/lib/git_rebar/ebin/git_rebar.beam")
# Assert we have no .mix/compile.lock as a .mix/compile.lock
# means we check for the Elixir version on every command.
refute File.exists?("_build/dev/lib/rebar_dep/.mix/compile.lock")
refute File.exists?("_build/dev/lib/git_rebar/.mix/compile.lock")
assert Enum.any?(load_paths, &String.ends_with?(&1, "git_rebar/ebin"))
assert Enum.any?(load_paths, &String.ends_with?(&1, "rebar_dep/ebin"))
end)
end
# We run only on Unix because Windows has a hard time
# removing the Rebar executable after executed.
@tag [unix: true]
test "applies variables from :system_env option when compiling dependencies for Rebar2" do
in_tmp("applies variables from system_env for Rebar2", fn ->
Mix.Project.push(Rebar2AsDep)
expected_file = Path.join(tmp_path("rebar_dep"), "rebar-test-rebar")
File.rm(expected_file)
Mix.Tasks.Deps.Get.run([])
Mix.Tasks.Deps.Compile.run([])
assert {:ok, "rebar"} = File.read(expected_file)
end)
end
end
end
| Elixir | 4 | doughsay/elixir | lib/mix/test/mix/rebar_test.exs | [
"Apache-2.0"
] |
[
{
"http://example.org/term": [ { "@id": "http://example.com/vocab#suffix" } ]
}
]
| JSONLD | 2 | fsteeg/json-ld-api | tests/expand/0058-out.jsonld | [
"W3C"
] |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
var windowUrl = decodeURIComponent(window.location.search.substring(3))
var opened = window.open(windowUrl, '', 'show=no')
window.addEventListener('message', function (event) {
try {
opened.close()
} finally {
console.log(event.data)
}
})
</script>
</head>
<body>
</body>
</html>
| HTML | 3 | lingxiao-Zhu/electron | spec/fixtures/pages/webview-opener-postMessage.html | [
"MIT"
] |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// To compile these two shaders:
// fxc /E pixelMain /T ps_2_0 accelerated_surface_win.hlsl
// fxc /E vertexMain /T vs_2_0 accelerated_surface_win.hlsl
//
// fxc is in the DirectX SDK.
struct Vertex {
float4 position : POSITION;
float2 texCoord : TEXCOORD0;
};
texture t;
sampler s;
// Passes a position and texture coordinate to the pixel shader.
Vertex vertexMain(Vertex input) {
return input;
};
// Samples a texture at the given texture coordinate and returns the result.
float4 pixelMain(float2 texCoord : TEXCOORD0) : COLOR0 {
return tex2D(s, texCoord);
};
| HLSL | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/HLSL/accelerated_surface_win.hlsl | [
"MIT"
] |
import text/Shlex
import structs/ArrayList
main: func {
args := "rock 'is kinda' \"fun don't\" you think"
tokens := Shlex split(args)
check := func (index: Int, value: String) {
if (tokens[index] != value) {
"Fail! expected tokens[#{index}] == #{value}, but got #{tokens[index]}" println()
exit(1)
}
}
if (tokens size != 5) {
"Fail! expected 5 tokens, got #{tokens size}" println()
exit(1)
}
check(0, "rock")
check(1, "is kinda")
check(2, "fun don't")
check(3, "you")
check(4, "think")
"Pass" println()
}
| ooc | 4 | shamanas/rock | test/sdk/text/shlex-test.ooc | [
"MIT"
] |
--# -path=.:alltenses:prelude
instance SyntaxDut of Syntax = ConstructorsDut, CatDut, StructuralDut, CombinatorsDut ;
| Grammatical Framework | 1 | daherb/gf-rgl | src/api/SyntaxDut.gf | [
"BSD-3-Clause"
] |
%!PS-Adobe-3.0
%%Creator: PCBNEW
%%CreationDate: Sun Feb 21 16:12:34 2016
%%Title: /home/mntmn/code/amiga-gfxcard/gerbers/amiga-gfxcard-drl_map.ps
%%Pages: 1
%%PageOrder: Ascend
%%BoundingBox: 0 0 596 842
%%DocumentMedia: A4 595 842 0 () ()
%%Orientation: Landscape
%%EndComments
%%BeginProlog
/line { newpath moveto lineto stroke } bind def
/cir0 { newpath 0 360 arc stroke } bind def
/cir1 { newpath 0 360 arc gsave fill grestore stroke } bind def
/cir2 { newpath 0 360 arc gsave fill grestore stroke } bind def
/arc0 { newpath arc stroke } bind def
/arc1 { newpath 4 index 4 index moveto arc closepath gsave fill
grestore stroke } bind def
/arc2 { newpath 4 index 4 index moveto arc closepath gsave fill
grestore stroke } bind def
/poly0 { stroke } bind def
/poly1 { closepath gsave fill grestore stroke } bind def
/poly2 { closepath gsave fill grestore stroke } bind def
/rect0 { rectstroke } bind def
/rect1 { rectfill } bind def
/rect2 { rectfill } bind def
/linemode0 { 0 setlinecap 0 setlinejoin 0 setlinewidth } bind def
/linemode1 { 1 setlinecap 1 setlinejoin } bind def
/dashedline { [200] 100 setdash } bind def
/solidline { [] 0 setdash } bind def
/phantomshow { moveto
/KicadFont findfont 0.000001 scalefont setfont
show } bind def
/textshow { gsave
findfont exch scalefont setfont concat 1 scale 0 0 moveto show
} bind def
/reencodefont {
findfont dup length dict begin
{ 1 index /FID ne
{ def }
{ pop pop } ifelse
} forall
/Encoding ISOLatin1Encoding def
currentdict
end } bind def
/KicadFont /Helvetica reencodefont definefont pop
/KicadFont-Bold /Helvetica-Bold reencodefont definefont pop
/KicadFont-Oblique /Helvetica-Oblique reencodefont definefont pop
/KicadFont-BoldOblique /Helvetica-BoldOblique reencodefont definefont pop
%%EndProlog
%%Page: 1 1
%%BeginPageSetup
gsave
0.0072 0.0072 scale
linemode1
82680 0 translate 90 rotate
55.1176 setlinewidth
%%EndPageSetup
0 0 0 setrgbcolor
65.0995 setlinewidth
newpath
86023.8 37041.6 moveto
30906.2 37041.6 lineto
stroke
0 0 0 setrgbcolor
newpath
86023.8 78710.4 moveto
86023.8 37041.6 lineto
stroke
0 0 0 setrgbcolor
newpath
30906.2 78710.4 moveto
86023.8 78710.4 lineto
stroke
0 0 0 setrgbcolor
newpath
30906.2 37041.6 moveto
30906.2 78710.4 lineto
stroke
78.74 setlinewidth
newpath
35724.9 41978.7 moveto
35898.5 41805.1 lineto
stroke
newpath
35898.5 41978.7 moveto
35724.9 41805.1 lineto
stroke
newpath
37323.3 50907.8 moveto
37496.9 50734.2 lineto
stroke
newpath
37496.9 50907.8 moveto
37323.3 50734.2 lineto
stroke
newpath
38425.6 48427.5 moveto
38599.2 48253.9 lineto
stroke
newpath
38599.2 48427.5 moveto
38425.6 48253.9 lineto
stroke
newpath
38756.3 50742.4 moveto
38929.9 50568.8 lineto
stroke
newpath
38929.9 50742.4 moveto
38756.3 50568.8 lineto
stroke
newpath
38756.3 44293.6 moveto
38929.9 44120 lineto
stroke
newpath
38929.9 44293.6 moveto
38756.3 44120 lineto
stroke
newpath
38811.5 61876.1 moveto
38985.1 61702.5 lineto
stroke
newpath
38985.1 61876.1 moveto
38811.5 61702.5 lineto
stroke
newpath
39197.3 44514.1 moveto
39370.9 44340.5 lineto
stroke
newpath
39370.9 44514.1 moveto
39197.3 44340.5 lineto
stroke
newpath
40134.3 61710.8 moveto
40307.9 61537.2 lineto
stroke
newpath
40307.9 61710.8 moveto
40134.3 61537.2 lineto
stroke
newpath
41567.3 46663.7 moveto
41740.9 46490.1 lineto
stroke
newpath
41740.9 46663.7 moveto
41567.3 46490.1 lineto
stroke
newpath
44653.9 46277.9 moveto
44827.5 46104.3 lineto
stroke
newpath
44827.5 46277.9 moveto
44653.9 46104.3 lineto
stroke
newpath
44709 72734.3 moveto
44882.6 72560.7 lineto
stroke
newpath
44882.6 72734.3 moveto
44709 72560.7 lineto
stroke
newpath
44709 72017.8 moveto
44882.6 71844.2 lineto
stroke
newpath
44882.6 72017.8 moveto
44709 71844.2 lineto
stroke
newpath
44709 71411.5 moveto
44882.6 71237.9 lineto
stroke
newpath
44882.6 71411.5 moveto
44709 71237.9 lineto
stroke
newpath
44709 70529.6 moveto
44882.6 70356 lineto
stroke
newpath
44882.6 70529.6 moveto
44709 70356 lineto
stroke
newpath
44709 69868.2 moveto
44882.6 69694.6 lineto
stroke
newpath
44882.6 69868.2 moveto
44709 69694.6 lineto
stroke
newpath
44709 69206.8 moveto
44882.6 69033.2 lineto
stroke
newpath
44882.6 69206.8 moveto
44709 69033.2 lineto
stroke
newpath
45370.5 50742.4 moveto
45544.1 50568.8 lineto
stroke
newpath
45544.1 50742.4 moveto
45370.5 50568.8 lineto
stroke
newpath
46748.4 47710.9 moveto
46922 47537.3 lineto
stroke
newpath
46922 47710.9 moveto
46748.4 47537.3 lineto
stroke
newpath
47024 53057.3 moveto
47197.6 52883.7 lineto
stroke
newpath
47197.6 53057.3 moveto
47024 52883.7 lineto
stroke
newpath
47134.2 47380.2 moveto
47307.8 47206.6 lineto
stroke
newpath
47307.8 47380.2 moveto
47134.2 47206.6 lineto
stroke
newpath
47464.9 46994.4 moveto
47638.5 46820.8 lineto
stroke
newpath
47638.5 46994.4 moveto
47464.9 46820.8 lineto
stroke
newpath
47795.6 46553.5 moveto
47969.2 46379.9 lineto
stroke
newpath
47969.2 46553.5 moveto
47795.6 46379.9 lineto
stroke
newpath
48181.4 46112.5 moveto
48355 45938.9 lineto
stroke
newpath
48355 46112.5 moveto
48181.4 45938.9 lineto
stroke
newpath
48567.3 46388.1 moveto
48740.9 46214.5 lineto
stroke
newpath
48740.9 46388.1 moveto
48567.3 46214.5 lineto
stroke
newpath
48953.1 46002.3 moveto
49126.7 45828.7 lineto
stroke
newpath
49126.7 46002.3 moveto
48953.1 45828.7 lineto
stroke
newpath
49173.6 67498.1 moveto
49347.2 67324.5 lineto
stroke
newpath
49347.2 67498.1 moveto
49173.6 67324.5 lineto
stroke
newpath
49338.9 46333 moveto
49512.5 46159.4 lineto
stroke
newpath
49512.5 46333 moveto
49338.9 46159.4 lineto
stroke
newpath
49835 44679.5 moveto
50008.6 44505.9 lineto
stroke
newpath
50008.6 44679.5 moveto
49835 44505.9 lineto
stroke
newpath
50220.8 45506.2 moveto
50394.4 45332.6 lineto
stroke
newpath
50394.4 45506.2 moveto
50220.8 45332.6 lineto
stroke
newpath
51212.9 50356.6 moveto
51386.5 50183 lineto
stroke
newpath
51386.5 50356.6 moveto
51212.9 50183 lineto
stroke
newpath
51323.2 66230.4 moveto
51496.8 66056.8 lineto
stroke
newpath
51496.8 66230.4 moveto
51323.2 66056.8 lineto
stroke
newpath
51653.9 52836.9 moveto
51827.5 52663.3 lineto
stroke
newpath
51827.5 52836.9 moveto
51653.9 52663.3 lineto
stroke
newpath
52149.9 48096.8 moveto
52323.5 47923.2 lineto
stroke
newpath
52323.5 48096.8 moveto
52149.9 47923.2 lineto
stroke
newpath
52590.9 50356.6 moveto
52764.5 50183 lineto
stroke
newpath
52764.5 50356.6 moveto
52590.9 50183 lineto
stroke
newpath
53362.5 52836.9 moveto
53536.1 52663.3 lineto
stroke
newpath
53536.1 52836.9 moveto
53362.5 52663.3 lineto
stroke
newpath
54189.3 48703 moveto
54362.9 48529.4 lineto
stroke
newpath
54362.9 48703 moveto
54189.3 48529.4 lineto
stroke
newpath
54189.3 45065.3 moveto
54362.9 44891.7 lineto
stroke
newpath
54362.9 45065.3 moveto
54189.3 44891.7 lineto
stroke
newpath
54630.2 47490.5 moveto
54803.8 47316.9 lineto
stroke
newpath
54803.8 47490.5 moveto
54630.2 47316.9 lineto
stroke
newpath
54905.8 50136.1 moveto
55079.4 49962.5 lineto
stroke
newpath
55079.4 50136.1 moveto
54905.8 49962.5 lineto
stroke
newpath
55594.8 51321.1 moveto
55768.4 51147.5 lineto
stroke
newpath
55768.4 51321.1 moveto
55594.8 51147.5 lineto
stroke
newpath
55787.7 74332.7 moveto
55961.3 74159.1 lineto
stroke
newpath
55961.3 74332.7 moveto
55787.7 74159.1 lineto
stroke
newpath
55787.7 72844.5 moveto
55961.3 72670.9 lineto
stroke
newpath
55961.3 72844.5 moveto
55787.7 72670.9 lineto
stroke
newpath
55787.7 53057.3 moveto
55961.3 52883.7 lineto
stroke
newpath
55961.3 53057.3 moveto
55787.7 52883.7 lineto
stroke
newpath
56008.1 48427.5 moveto
56181.7 48253.9 lineto
stroke
newpath
56181.7 48427.5 moveto
56008.1 48253.9 lineto
stroke
newpath
56283.7 44955.1 moveto
56457.3 44781.5 lineto
stroke
newpath
56457.3 44955.1 moveto
56283.7 44781.5 lineto
stroke
newpath
56669.6 43742.5 moveto
56843.2 43568.9 lineto
stroke
newpath
56843.2 43742.5 moveto
56669.6 43568.9 lineto
stroke
newpath
56890 48482.6 moveto
57063.6 48309 lineto
stroke
newpath
57063.6 48482.6 moveto
56890 48309 lineto
stroke
newpath
57110.5 47931.4 moveto
57284.1 47757.8 lineto
stroke
newpath
57284.1 47931.4 moveto
57110.5 47757.8 lineto
stroke
newpath
57220.7 47435.3 moveto
57394.3 47261.7 lineto
stroke
newpath
57394.3 47435.3 moveto
57220.7 47261.7 lineto
stroke
newpath
57716.8 47380.2 moveto
57890.4 47206.6 lineto
stroke
newpath
57890.4 47380.2 moveto
57716.8 47206.6 lineto
stroke
newpath
57992.4 58899.8 moveto
58166 58726.2 lineto
stroke
newpath
58166 58899.8 moveto
57992.4 58726.2 lineto
stroke
newpath
58378.2 47380.2 moveto
58551.8 47206.6 lineto
stroke
newpath
58551.8 47380.2 moveto
58378.2 47206.6 lineto
stroke
newpath
58929.4 39994.5 moveto
59103 39820.9 lineto
stroke
newpath
59103 39994.5 moveto
58929.4 39820.9 lineto
stroke
newpath
59893.9 51321.1 moveto
60067.5 51147.5 lineto
stroke
newpath
60067.5 51321.1 moveto
59893.9 51147.5 lineto
stroke
newpath
59921.5 48647.9 moveto
60095.1 48474.3 lineto
stroke
newpath
60095.1 48647.9 moveto
59921.5 48474.3 lineto
stroke
newpath
60197.1 53222.7 moveto
60370.7 53049.1 lineto
stroke
newpath
60370.7 53222.7 moveto
60197.1 53049.1 lineto
stroke
newpath
60417.6 60828.9 moveto
60591.1 60655.3 lineto
stroke
newpath
60591.1 60828.9 moveto
60417.6 60655.3 lineto
stroke
newpath
60417.6 60277.7 moveto
60591.1 60104.1 lineto
stroke
newpath
60591.1 60277.7 moveto
60417.6 60104.1 lineto
stroke
newpath
60858.5 73506 moveto
61032.1 73332.4 lineto
stroke
newpath
61032.1 73506 moveto
60858.5 73332.4 lineto
stroke
newpath
61079 41923.6 moveto
61252.6 41750 lineto
stroke
newpath
61252.6 41923.6 moveto
61079 41750 lineto
stroke
newpath
61244.3 73946.9 moveto
61417.9 73773.3 lineto
stroke
newpath
61417.9 73946.9 moveto
61244.3 73773.3 lineto
stroke
newpath
61685.3 52892 moveto
61858.9 52718.4 lineto
stroke
newpath
61858.9 52892 moveto
61685.3 52718.4 lineto
stroke
newpath
61740.4 50466.8 moveto
61914 50293.2 lineto
stroke
newpath
61914 50466.8 moveto
61740.4 50293.2 lineto
stroke
newpath
62181.3 42419.6 moveto
62354.9 42246 lineto
stroke
newpath
62354.9 42419.6 moveto
62181.3 42246 lineto
stroke
newpath
62842.7 48427.5 moveto
63016.3 48253.9 lineto
stroke
newpath
63016.3 48427.5 moveto
62842.7 48253.9 lineto
stroke
newpath
63173.4 60828.9 moveto
63347 60655.3 lineto
stroke
newpath
63347 60828.9 moveto
63173.4 60655.3 lineto
stroke
newpath
63173.4 60222.6 moveto
63347 60049 lineto
stroke
newpath
63347 60222.6 moveto
63173.4 60049 lineto
stroke
newpath
63283.7 42309.4 moveto
63457.3 42135.8 lineto
stroke
newpath
63457.3 42309.4 moveto
63283.7 42135.8 lineto
stroke
newpath
64138 51321.1 moveto
64311.6 51147.5 lineto
stroke
newpath
64311.6 51321.1 moveto
64138 51147.5 lineto
stroke
newpath
64275.8 53167.6 moveto
64449.4 52994 lineto
stroke
newpath
64449.4 53167.6 moveto
64275.8 52994 lineto
stroke
newpath
64386 41703.1 moveto
64559.6 41529.5 lineto
stroke
newpath
64559.6 41703.1 moveto
64386 41529.5 lineto
stroke
newpath
64496.3 52671.5 moveto
64669.8 52497.9 lineto
stroke
newpath
64669.8 52671.5 moveto
64496.3 52497.9 lineto
stroke
newpath
64716.7 53388 moveto
64890.3 53214.4 lineto
stroke
newpath
64890.3 53388 moveto
64716.7 53214.4 lineto
stroke
newpath
65212.8 53388 moveto
65386.4 53214.4 lineto
stroke
newpath
65386.4 53388 moveto
65212.8 53214.4 lineto
stroke
newpath
65984.4 52506.2 moveto
66158 52332.6 lineto
stroke
newpath
66158 52506.2 moveto
65984.4 52332.6 lineto
stroke
newpath
66149.8 53388 moveto
66323.4 53214.4 lineto
stroke
newpath
66323.4 53388 moveto
66149.8 53214.4 lineto
stroke
newpath
66480.5 45065.3 moveto
66654.1 44891.7 lineto
stroke
newpath
66654.1 45065.3 moveto
66480.5 44891.7 lineto
stroke
newpath
66590.7 53222.7 moveto
66764.3 53049.1 lineto
stroke
newpath
66764.3 53222.7 moveto
66590.7 53049.1 lineto
stroke
newpath
66921.4 52892 moveto
67095 52718.4 lineto
stroke
newpath
67095 52892 moveto
66921.4 52718.4 lineto
stroke
newpath
67527.7 44403.9 moveto
67701.3 44230.3 lineto
stroke
newpath
67701.3 44403.9 moveto
67527.7 44230.3 lineto
stroke
newpath
68078.9 43797.6 moveto
68252.5 43624 lineto
stroke
newpath
68252.5 43797.6 moveto
68078.9 43624 lineto
stroke
newpath
68354.5 51624.3 moveto
68528.1 51450.7 lineto
stroke
newpath
68528.1 51624.3 moveto
68354.5 51450.7 lineto
stroke
newpath
68795.4 43301.5 moveto
68969 43127.9 lineto
stroke
newpath
68969 43301.5 moveto
68795.4 43127.9 lineto
stroke
newpath
69842.7 43025.9 moveto
70016.3 42852.3 lineto
stroke
newpath
70016.3 43025.9 moveto
69842.7 42852.3 lineto
stroke
newpath
70724.5 53002.2 moveto
70898.1 52828.6 lineto
stroke
newpath
70898.1 53002.2 moveto
70724.5 52828.6 lineto
stroke
newpath
71000.1 52616.4 moveto
71173.7 52442.8 lineto
stroke
newpath
71173.7 52616.4 moveto
71000.1 52442.8 lineto
stroke
newpath
71000.1 42585 moveto
71173.7 42411.4 lineto
stroke
newpath
71173.7 42585 moveto
71000.1 42411.4 lineto
stroke
newpath
71110.4 51073.1 moveto
71284 50899.5 lineto
stroke
newpath
71284 51073.1 moveto
71110.4 50899.5 lineto
stroke
newpath
71110.4 49750.3 moveto
71284 49576.7 lineto
stroke
newpath
71284 49750.3 moveto
71110.4 49576.7 lineto
stroke
newpath
71716.7 58017.9 moveto
71890.3 57844.3 lineto
stroke
newpath
71890.3 58017.9 moveto
71716.7 57844.3 lineto
stroke
newpath
72212.7 58348.6 moveto
72386.3 58175 lineto
stroke
newpath
72386.3 58348.6 moveto
72212.7 58175 lineto
stroke
newpath
72929.2 60388 moveto
73102.8 60214.4 lineto
stroke
newpath
73102.8 60388 moveto
72929.2 60214.4 lineto
stroke
newpath
72929.2 45175.5 moveto
73102.8 45001.9 lineto
stroke
newpath
73102.8 45175.5 moveto
72929.2 45001.9 lineto
stroke
newpath
73094.6 58514 moveto
73268.2 58340.4 lineto
stroke
newpath
73268.2 58514 moveto
73094.6 58340.4 lineto
stroke
newpath
73204.8 41096.8 moveto
73378.4 40923.2 lineto
stroke
newpath
73378.4 41096.8 moveto
73204.8 40923.2 lineto
stroke
newpath
73259.9 44624.3 moveto
73433.5 44450.7 lineto
stroke
newpath
73433.5 44624.3 moveto
73259.9 44450.7 lineto
stroke
newpath
73535.5 44183.4 moveto
73709.1 44009.8 lineto
stroke
newpath
73709.1 44183.4 moveto
73535.5 44009.8 lineto
stroke
newpath
73756 43742.5 moveto
73929.6 43568.9 lineto
stroke
newpath
73929.6 43742.5 moveto
73756 43568.9 lineto
stroke
newpath
74307.2 40711 moveto
74480.8 40537.4 lineto
stroke
newpath
74480.8 40711 moveto
74307.2 40537.4 lineto
stroke
newpath
74472.5 56254.2 moveto
74646.1 56080.6 lineto
stroke
newpath
74646.1 56254.2 moveto
74472.5 56080.6 lineto
stroke
newpath
74803.2 52726.6 moveto
74976.8 52553 lineto
stroke
newpath
74976.8 52726.6 moveto
74803.2 52553 lineto
stroke
newpath
75078.8 53167.6 moveto
75252.4 52994 lineto
stroke
newpath
75252.4 53167.6 moveto
75078.8 52994 lineto
stroke
newpath
75299.3 53553.4 moveto
75472.9 53379.8 lineto
stroke
newpath
75472.9 53553.4 moveto
75299.3 53379.8 lineto
stroke
newpath
75795.4 54159.7 moveto
75969 53986.1 lineto
stroke
newpath
75969 54159.7 moveto
75795.4 53986.1 lineto
stroke
newpath
76291.4 54104.6 moveto
76465 53931 lineto
stroke
newpath
76465 54104.6 moveto
76291.4 53931 lineto
stroke
newpath
76677.2 53884.1 moveto
76850.8 53710.5 lineto
stroke
newpath
76850.8 53884.1 moveto
76677.2 53710.5 lineto
stroke
newpath
76952.8 50191.2 moveto
77126.4 50017.6 lineto
stroke
newpath
77126.4 50191.2 moveto
76952.8 50017.6 lineto
stroke
newpath
78937.1 45175.5 moveto
79110.7 45001.9 lineto
stroke
newpath
79110.7 45175.5 moveto
78937.1 45001.9 lineto
stroke
newpath
79047.3 39939.4 moveto
79220.9 39765.8 lineto
stroke
newpath
79220.9 39939.4 moveto
79047.3 39765.8 lineto
stroke
newpath
80039.4 50577 moveto
80213 50403.4 lineto
stroke
newpath
80213 50577 moveto
80039.4 50403.4 lineto
stroke
newpath
80811.1 48482.6 moveto
80984.7 48309 lineto
stroke
newpath
80984.7 48482.6 moveto
80811.1 48309 lineto
stroke
newpath
83070.9 50411.7 moveto
83244.5 50238.1 lineto
stroke
newpath
83244.5 50411.7 moveto
83070.9 50238.1 lineto
stroke
34047.9 50821 220.47 cir0
34047.9 49718.6 220.47 cir0
44244.7 76946.7 220.47 cir0
44244.7 75844.3 220.47 cir0
45347 76946.7 220.47 cir0
45347 75844.3 220.47 cir0
46449.4 76946.7 220.47 cir0
46449.4 75844.3 220.47 cir0
47551.7 76946.7 220.47 cir0
47551.7 75844.3 220.47 cir0
48654.1 76946.7 220.47 cir0
48654.1 75844.3 220.47 cir0
49756.4 76946.7 220.47 cir0
49756.4 75844.3 220.47 cir0
49866.7 56553.2 220.47 cir0
50858.8 76946.7 220.47 cir0
50858.8 75844.3 220.47 cir0
50969 56553.2 220.47 cir0
51961.1 76946.7 220.47 cir0
51961.1 75844.3 220.47 cir0
52071.4 56553.2 220.47 cir0
53118.6 76946.7 220.47 cir0
53118.6 75844.3 220.47 cir0
53146.2 57655.5 220.47 cir0
53146.2 56580.7 220.47 cir0
54220.9 76946.7 220.47 cir0
54220.9 75844.3 220.47 cir0
54248.5 57655.5 220.47 cir0
54248.5 56580.7 220.47 cir0
55323.3 76946.7 220.47 cir0
55323.3 75844.3 220.47 cir0
55350.9 57655.5 220.47 cir0
55350.9 56580.7 220.47 cir0
56425.6 76946.7 220.47 cir0
56425.6 75844.3 220.47 cir0
56453.2 57655.5 220.47 cir0
56453.2 56580.7 220.47 cir0
57528 76946.7 220.47 cir0
57528 75844.3 220.47 cir0
57555.6 57655.5 220.47 cir0
57555.6 56580.7 220.47 cir0
58630.4 76946.7 220.47 cir0
58630.4 75844.3 220.47 cir0
58657.9 57655.5 220.47 cir0
58657.9 56580.7 220.47 cir0
59732.7 76946.7 220.47 cir0
59732.7 75844.3 220.47 cir0
59760.3 57655.5 220.47 cir0
59760.3 56580.7 220.47 cir0
60835.1 76946.7 220.47 cir0
60835.1 75844.3 220.47 cir0
60862.6 57655.5 220.47 cir0
60862.6 56580.7 220.47 cir0
61965 57655.5 220.47 cir0
61965 56580.7 220.47 cir0
63067.3 57655.5 220.47 cir0
63067.3 56580.7 220.47 cir0
64169.7 57655.5 220.47 cir0
64169.7 56580.7 220.47 cir0
65272 57655.5 220.47 cir0
65272 56580.7 220.47 cir0
66374.4 57655.5 220.47 cir0
66374.4 56580.7 220.47 cir0
67476.7 57655.5 220.47 cir0
67476.7 56580.7 220.47 cir0
68579.1 57655.5 220.47 cir0
68579.1 56580.7 220.47 cir0
69681.4 57655.5 220.47 cir0
69681.4 56580.7 220.47 cir0
118.11 setlinewidth
newpath
31942.3 35175.5 moveto
31942.3 36356.6 lineto
32223.5 36356.6 lineto
32392.2 36300.3 lineto
32504.7 36187.9 lineto
32561 36075.4 lineto
32617.2 35850.4 lineto
32617.2 35681.7 lineto
32561 35456.7 lineto
32504.7 35344.2 lineto
32392.2 35231.7 lineto
32223.5 35175.5 lineto
31942.3 35175.5 lineto
stroke
newpath
33123.4 35175.5 moveto
33123.4 35962.9 lineto
stroke
newpath
33123.4 35737.9 moveto
33179.6 35850.4 lineto
33235.9 35906.6 lineto
33348.4 35962.9 lineto
33460.8 35962.9 lineto
stroke
newpath
33854.5 35175.5 moveto
33854.5 35962.9 lineto
stroke
newpath
33854.5 36356.6 moveto
33798.3 36300.3 lineto
33854.5 36244.1 lineto
33910.8 36300.3 lineto
33854.5 36356.6 lineto
33854.5 36244.1 lineto
stroke
newpath
34585.7 35175.5 moveto
34473.2 35231.7 lineto
34417 35344.2 lineto
34417 36356.6 lineto
stroke
newpath
35204.4 35175.5 moveto
35091.9 35231.7 lineto
35035.6 35344.2 lineto
35035.6 36356.6 lineto
stroke
newpath
36554.2 35175.5 moveto
36554.2 36356.6 lineto
36947.9 35512.9 lineto
37341.6 36356.6 lineto
37341.6 35175.5 lineto
stroke
newpath
38410.2 35175.5 moveto
38410.2 35794.2 lineto
38354 35906.6 lineto
38241.5 35962.9 lineto
38016.5 35962.9 lineto
37904 35906.6 lineto
stroke
newpath
38410.2 35231.7 moveto
38297.7 35175.5 lineto
38016.5 35175.5 lineto
37904 35231.7 lineto
37847.8 35344.2 lineto
37847.8 35456.7 lineto
37904 35569.2 lineto
38016.5 35625.4 lineto
38297.7 35625.4 lineto
38410.2 35681.7 lineto
stroke
newpath
38972.7 35962.9 moveto
38972.7 34781.8 lineto
stroke
newpath
38972.7 35906.6 moveto
39085.1 35962.9 lineto
39310.1 35962.9 lineto
39422.6 35906.6 lineto
39478.8 35850.4 lineto
39535.1 35737.9 lineto
39535.1 35400.5 lineto
39478.8 35288 lineto
39422.6 35231.7 lineto
39310.1 35175.5 lineto
39085.1 35175.5 lineto
38972.7 35231.7 lineto
stroke
newpath
40041.3 35288 moveto
40097.5 35231.7 lineto
40041.3 35175.5 lineto
39985 35231.7 lineto
40041.3 35288 lineto
40041.3 35175.5 lineto
stroke
newpath
40041.3 35906.6 moveto
40097.5 35850.4 lineto
40041.3 35794.2 lineto
39985 35850.4 lineto
40041.3 35906.6 lineto
40041.3 35794.2 lineto
stroke
newpath
30700.1 33316.3 moveto
30873.7 33142.7 lineto
stroke
newpath
30873.7 33316.3 moveto
30700.1 33142.7 lineto
stroke
newpath
32167.3 33876.3 moveto
32279.7 33876.3 lineto
32392.2 33820 lineto
32448.5 33763.8 lineto
32504.7 33651.3 lineto
32561 33426.3 lineto
32561 33145.1 lineto
32504.7 32920.1 lineto
32448.5 32807.7 lineto
32392.2 32751.4 lineto
32279.7 32695.2 lineto
32167.3 32695.2 lineto
32054.8 32751.4 lineto
31998.5 32807.7 lineto
31942.3 32920.1 lineto
31886 33145.1 lineto
31886 33426.3 lineto
31942.3 33651.3 lineto
31998.5 33763.8 lineto
32054.8 33820 lineto
32167.3 33876.3 lineto
stroke
newpath
33067.1 32807.7 moveto
33123.4 32751.4 lineto
33067.1 32695.2 lineto
33010.9 32751.4 lineto
33067.1 32807.7 lineto
33067.1 32695.2 lineto
stroke
newpath
34135.8 33482.6 moveto
34135.8 32695.2 lineto
stroke
newpath
33854.5 33932.5 moveto
33573.3 33088.9 lineto
34304.5 33088.9 lineto
stroke
newpath
34979.4 33876.3 moveto
35091.9 33876.3 lineto
35204.4 33820 lineto
35260.6 33763.8 lineto
35316.9 33651.3 lineto
35373.1 33426.3 lineto
35373.1 33145.1 lineto
35316.9 32920.1 lineto
35260.6 32807.7 lineto
35204.4 32751.4 lineto
35091.9 32695.2 lineto
34979.4 32695.2 lineto
34866.9 32751.4 lineto
34810.7 32807.7 lineto
34754.4 32920.1 lineto
34698.2 33145.1 lineto
34698.2 33426.3 lineto
34754.4 33651.3 lineto
34810.7 33763.8 lineto
34866.9 33820 lineto
34979.4 33876.3 lineto
stroke
newpath
35879.3 32695.2 moveto
35879.3 33482.6 lineto
stroke
newpath
35879.3 33370.1 moveto
35935.5 33426.3 lineto
36048 33482.6 lineto
36216.7 33482.6 lineto
36329.2 33426.3 lineto
36385.5 33313.8 lineto
36385.5 32695.2 lineto
stroke
newpath
36385.5 33313.8 moveto
36441.7 33426.3 lineto
36554.2 33482.6 lineto
36722.9 33482.6 lineto
36835.4 33426.3 lineto
36891.7 33313.8 lineto
36891.7 32695.2 lineto
stroke
newpath
37454.1 32695.2 moveto
37454.1 33482.6 lineto
stroke
newpath
37454.1 33370.1 moveto
37510.3 33426.3 lineto
37622.8 33482.6 lineto
37791.5 33482.6 lineto
37904 33426.3 lineto
37960.3 33313.8 lineto
37960.3 32695.2 lineto
stroke
newpath
37960.3 33313.8 moveto
38016.5 33426.3 lineto
38129 33482.6 lineto
38297.7 33482.6 lineto
38410.2 33426.3 lineto
38466.5 33313.8 lineto
38466.5 32695.2 lineto
stroke
newpath
40772.4 33932.5 moveto
39760.1 32414 lineto
stroke
newpath
42291 33876.3 moveto
42403.5 33876.3 lineto
42516 33820 lineto
42572.2 33763.8 lineto
42628.4 33651.3 lineto
42684.7 33426.3 lineto
42684.7 33145.1 lineto
42628.4 32920.1 lineto
42572.2 32807.7 lineto
42516 32751.4 lineto
42403.5 32695.2 lineto
42291 32695.2 lineto
42178.5 32751.4 lineto
42122.3 32807.7 lineto
42066 32920.1 lineto
42009.8 33145.1 lineto
42009.8 33426.3 lineto
42066 33651.3 lineto
42122.3 33763.8 lineto
42178.5 33820 lineto
42291 33876.3 lineto
stroke
newpath
43190.9 32807.7 moveto
43247.1 32751.4 lineto
43190.9 32695.2 lineto
43134.6 32751.4 lineto
43190.9 32807.7 lineto
43190.9 32695.2 lineto
stroke
newpath
43978.3 33876.3 moveto
44090.8 33876.3 lineto
44203.2 33820 lineto
44259.5 33763.8 lineto
44315.7 33651.3 lineto
44372 33426.3 lineto
44372 33145.1 lineto
44315.7 32920.1 lineto
44259.5 32807.7 lineto
44203.2 32751.4 lineto
44090.8 32695.2 lineto
43978.3 32695.2 lineto
43865.8 32751.4 lineto
43809.5 32807.7 lineto
43753.3 32920.1 lineto
43697.1 33145.1 lineto
43697.1 33426.3 lineto
43753.3 33651.3 lineto
43809.5 33763.8 lineto
43865.8 33820 lineto
43978.3 33876.3 lineto
stroke
newpath
45496.8 32695.2 moveto
44821.9 32695.2 lineto
stroke
newpath
45159.4 32695.2 moveto
45159.4 33876.3 lineto
45046.9 33707.5 lineto
44934.4 33595.1 lineto
44821.9 33538.8 lineto
stroke
newpath
46509.2 33876.3 moveto
46284.2 33876.3 lineto
46171.8 33820 lineto
46115.5 33763.8 lineto
46003 33595.1 lineto
45946.8 33370.1 lineto
45946.8 32920.1 lineto
46003 32807.7 lineto
46059.3 32751.4 lineto
46171.8 32695.2 lineto
46396.7 32695.2 lineto
46509.2 32751.4 lineto
46565.5 32807.7 lineto
46621.7 32920.1 lineto
46621.7 33201.4 lineto
46565.5 33313.8 lineto
46509.2 33370.1 lineto
46396.7 33426.3 lineto
46171.8 33426.3 lineto
46059.3 33370.1 lineto
46003 33313.8 lineto
45946.8 33201.4 lineto
stroke
newpath
47071.6 33876.3 moveto
47071.6 33651.3 lineto
stroke
newpath
47521.6 33876.3 moveto
47521.6 33651.3 lineto
stroke
newpath
49265.1 32245.2 moveto
49208.9 32301.5 lineto
49096.4 32470.2 lineto
49040.1 32582.7 lineto
48983.9 32751.4 lineto
48927.7 33032.6 lineto
48927.7 33257.6 lineto
48983.9 33538.8 lineto
49040.1 33707.5 lineto
49096.4 33820 lineto
49208.9 33988.8 lineto
49265.1 34045 lineto
stroke
newpath
50333.7 32695.2 moveto
49658.8 32695.2 lineto
stroke
newpath
49996.3 32695.2 moveto
49996.3 33876.3 lineto
49883.8 33707.5 lineto
49771.3 33595.1 lineto
49658.8 33538.8 lineto
stroke
newpath
51458.6 32695.2 moveto
50783.7 32695.2 lineto
stroke
newpath
51121.1 32695.2 moveto
51121.1 33876.3 lineto
51008.6 33707.5 lineto
50896.2 33595.1 lineto
50783.7 33538.8 lineto
stroke
newpath
51908.5 33763.8 moveto
51964.8 33820 lineto
52077.3 33876.3 lineto
52358.5 33876.3 lineto
52471 33820 lineto
52527.2 33763.8 lineto
52583.5 33651.3 lineto
52583.5 33538.8 lineto
52527.2 33370.1 lineto
51852.3 32695.2 lineto
52583.5 32695.2 lineto
stroke
newpath
53989.5 32695.2 moveto
53989.5 33876.3 lineto
stroke
newpath
54495.7 32695.2 moveto
54495.7 33313.8 lineto
54439.5 33426.3 lineto
54327 33482.6 lineto
54158.3 33482.6 lineto
54045.8 33426.3 lineto
53989.5 33370.1 lineto
stroke
newpath
55226.9 32695.2 moveto
55114.4 32751.4 lineto
55058.1 32807.7 lineto
55001.9 32920.1 lineto
55001.9 33257.6 lineto
55058.1 33370.1 lineto
55114.4 33426.3 lineto
55226.9 33482.6 lineto
55395.6 33482.6 lineto
55508.1 33426.3 lineto
55564.3 33370.1 lineto
55620.6 33257.6 lineto
55620.6 32920.1 lineto
55564.3 32807.7 lineto
55508.1 32751.4 lineto
55395.6 32695.2 lineto
55226.9 32695.2 lineto
stroke
newpath
56295.5 32695.2 moveto
56183 32751.4 lineto
56126.8 32863.9 lineto
56126.8 33876.3 lineto
stroke
newpath
57195.4 32751.4 moveto
57082.9 32695.2 lineto
56857.9 32695.2 lineto
56745.4 32751.4 lineto
56689.2 32863.9 lineto
56689.2 33313.8 lineto
56745.4 33426.3 lineto
56857.9 33482.6 lineto
57082.9 33482.6 lineto
57195.4 33426.3 lineto
57251.6 33313.8 lineto
57251.6 33201.4 lineto
56689.2 33088.9 lineto
stroke
newpath
57701.6 32751.4 moveto
57814 32695.2 lineto
58039 32695.2 lineto
58151.5 32751.4 lineto
58207.7 32863.9 lineto
58207.7 32920.1 lineto
58151.5 33032.6 lineto
58039 33088.9 lineto
57870.3 33088.9 lineto
57757.8 33145.1 lineto
57701.6 33257.6 lineto
57701.6 33313.8 lineto
57757.8 33426.3 lineto
57870.3 33482.6 lineto
58039 33482.6 lineto
58151.5 33426.3 lineto
stroke
newpath
58601.4 32245.2 moveto
58657.7 32301.5 lineto
58770.2 32470.2 lineto
58826.4 32582.7 lineto
58882.7 32751.4 lineto
58938.9 33032.6 lineto
58938.9 33257.6 lineto
58882.7 33538.8 lineto
58826.4 33707.5 lineto
58770.2 33820 lineto
58657.7 33988.8 lineto
58601.4 34045 lineto
stroke
30653.2 31670.4 220.47 cir0
newpath
32561 31136.1 moveto
31886 31136.1 lineto
stroke
newpath
32223.5 31136.1 moveto
32223.5 32317.2 lineto
32111 32148.5 lineto
31998.5 32036 lineto
31886 31979.8 lineto
stroke
newpath
33067.1 31248.6 moveto
33123.4 31192.4 lineto
33067.1 31136.1 lineto
33010.9 31192.4 lineto
33067.1 31248.6 lineto
33067.1 31136.1 lineto
stroke
newpath
33854.5 32317.2 moveto
33967 32317.2 lineto
34079.5 32261 lineto
34135.8 32204.7 lineto
34192 32092.2 lineto
34248.2 31867.3 lineto
34248.2 31586.1 lineto
34192 31361.1 lineto
34135.8 31248.6 lineto
34079.5 31192.4 lineto
33967 31136.1 lineto
33854.5 31136.1 lineto
33742.1 31192.4 lineto
33685.8 31248.6 lineto
33629.6 31361.1 lineto
33573.3 31586.1 lineto
33573.3 31867.3 lineto
33629.6 32092.2 lineto
33685.8 32204.7 lineto
33742.1 32261 lineto
33854.5 32317.2 lineto
stroke
newpath
34698.2 32204.7 moveto
34754.4 32261 lineto
34866.9 32317.2 lineto
35148.1 32317.2 lineto
35260.6 32261 lineto
35316.9 32204.7 lineto
35373.1 32092.2 lineto
35373.1 31979.8 lineto
35316.9 31811 lineto
34641.9 31136.1 lineto
35373.1 31136.1 lineto
stroke
newpath
35879.3 31136.1 moveto
35879.3 31923.5 lineto
stroke
newpath
35879.3 31811 moveto
35935.5 31867.3 lineto
36048 31923.5 lineto
36216.7 31923.5 lineto
36329.2 31867.3 lineto
36385.5 31754.8 lineto
36385.5 31136.1 lineto
stroke
newpath
36385.5 31754.8 moveto
36441.7 31867.3 lineto
36554.2 31923.5 lineto
36722.9 31923.5 lineto
36835.4 31867.3 lineto
36891.7 31754.8 lineto
36891.7 31136.1 lineto
stroke
newpath
37454.1 31136.1 moveto
37454.1 31923.5 lineto
stroke
newpath
37454.1 31811 moveto
37510.3 31867.3 lineto
37622.8 31923.5 lineto
37791.5 31923.5 lineto
37904 31867.3 lineto
37960.3 31754.8 lineto
37960.3 31136.1 lineto
stroke
newpath
37960.3 31754.8 moveto
38016.5 31867.3 lineto
38129 31923.5 lineto
38297.7 31923.5 lineto
38410.2 31867.3 lineto
38466.5 31754.8 lineto
38466.5 31136.1 lineto
stroke
newpath
40772.4 32373.5 moveto
39760.1 30854.9 lineto
stroke
newpath
42291 32317.2 moveto
42403.5 32317.2 lineto
42516 32261 lineto
42572.2 32204.7 lineto
42628.4 32092.2 lineto
42684.7 31867.3 lineto
42684.7 31586.1 lineto
42628.4 31361.1 lineto
42572.2 31248.6 lineto
42516 31192.4 lineto
42403.5 31136.1 lineto
42291 31136.1 lineto
42178.5 31192.4 lineto
42122.3 31248.6 lineto
42066 31361.1 lineto
42009.8 31586.1 lineto
42009.8 31867.3 lineto
42066 32092.2 lineto
42122.3 32204.7 lineto
42178.5 32261 lineto
42291 32317.2 lineto
stroke
newpath
43190.9 31248.6 moveto
43247.1 31192.4 lineto
43190.9 31136.1 lineto
43134.6 31192.4 lineto
43190.9 31248.6 lineto
43190.9 31136.1 lineto
stroke
newpath
43978.3 32317.2 moveto
44090.8 32317.2 lineto
44203.2 32261 lineto
44259.5 32204.7 lineto
44315.7 32092.2 lineto
44372 31867.3 lineto
44372 31586.1 lineto
44315.7 31361.1 lineto
44259.5 31248.6 lineto
44203.2 31192.4 lineto
44090.8 31136.1 lineto
43978.3 31136.1 lineto
43865.8 31192.4 lineto
43809.5 31248.6 lineto
43753.3 31361.1 lineto
43697.1 31586.1 lineto
43697.1 31867.3 lineto
43753.3 32092.2 lineto
43809.5 32204.7 lineto
43865.8 32261 lineto
43978.3 32317.2 lineto
stroke
newpath
45384.3 31923.5 moveto
45384.3 31136.1 lineto
stroke
newpath
45103.1 32373.5 moveto
44821.9 31529.8 lineto
45553.1 31529.8 lineto
stroke
newpath
46228 32317.2 moveto
46340.5 32317.2 lineto
46453 32261 lineto
46509.2 32204.7 lineto
46565.5 32092.2 lineto
46621.7 31867.3 lineto
46621.7 31586.1 lineto
46565.5 31361.1 lineto
46509.2 31248.6 lineto
46453 31192.4 lineto
46340.5 31136.1 lineto
46228 31136.1 lineto
46115.5 31192.4 lineto
46059.3 31248.6 lineto
46003 31361.1 lineto
45946.8 31586.1 lineto
45946.8 31867.3 lineto
46003 32092.2 lineto
46059.3 32204.7 lineto
46115.5 32261 lineto
46228 32317.2 lineto
stroke
newpath
47071.6 32317.2 moveto
47071.6 32092.2 lineto
stroke
newpath
47521.6 32317.2 moveto
47521.6 32092.2 lineto
stroke
newpath
49265.1 30686.2 moveto
49208.9 30742.4 lineto
49096.4 30911.1 lineto
49040.1 31023.6 lineto
48983.9 31192.4 lineto
48927.7 31473.6 lineto
48927.7 31698.5 lineto
48983.9 31979.8 lineto
49040.1 32148.5 lineto
49096.4 32261 lineto
49208.9 32429.7 lineto
49265.1 32485.9 lineto
stroke
newpath
50221.2 32317.2 moveto
49996.3 32317.2 lineto
49883.8 32261 lineto
49827.5 32204.7 lineto
49715.1 32036 lineto
49658.8 31811 lineto
49658.8 31361.1 lineto
49715.1 31248.6 lineto
49771.3 31192.4 lineto
49883.8 31136.1 lineto
50108.8 31136.1 lineto
50221.2 31192.4 lineto
50277.5 31248.6 lineto
50333.7 31361.1 lineto
50333.7 31642.3 lineto
50277.5 31754.8 lineto
50221.2 31811 lineto
50108.8 31867.3 lineto
49883.8 31867.3 lineto
49771.3 31811 lineto
49715.1 31754.8 lineto
49658.8 31642.3 lineto
stroke
newpath
50896.2 31136.1 moveto
51121.1 31136.1 lineto
51233.6 31192.4 lineto
51289.9 31248.6 lineto
51402.3 31417.3 lineto
51458.6 31642.3 lineto
51458.6 32092.2 lineto
51402.3 32204.7 lineto
51346.1 32261 lineto
51233.6 32317.2 lineto
51008.6 32317.2 lineto
50896.2 32261 lineto
50839.9 32204.7 lineto
50783.7 32092.2 lineto
50783.7 31811 lineto
50839.9 31698.5 lineto
50896.2 31642.3 lineto
51008.6 31586.1 lineto
51233.6 31586.1 lineto
51346.1 31642.3 lineto
51402.3 31698.5 lineto
51458.6 31811 lineto
stroke
newpath
52864.7 31136.1 moveto
52864.7 32317.2 lineto
stroke
newpath
53370.9 31136.1 moveto
53370.9 31754.8 lineto
53314.6 31867.3 lineto
53202.1 31923.5 lineto
53033.4 31923.5 lineto
52920.9 31867.3 lineto
52864.7 31811 lineto
stroke
newpath
54102 31136.1 moveto
53989.5 31192.4 lineto
53933.3 31248.6 lineto
53877 31361.1 lineto
53877 31698.5 lineto
53933.3 31811 lineto
53989.5 31867.3 lineto
54102 31923.5 lineto
54270.7 31923.5 lineto
54383.2 31867.3 lineto
54439.5 31811 lineto
54495.7 31698.5 lineto
54495.7 31361.1 lineto
54439.5 31248.6 lineto
54383.2 31192.4 lineto
54270.7 31136.1 lineto
54102 31136.1 lineto
stroke
newpath
55170.6 31136.1 moveto
55058.1 31192.4 lineto
55001.9 31304.8 lineto
55001.9 32317.2 lineto
stroke
newpath
56070.5 31192.4 moveto
55958 31136.1 lineto
55733.1 31136.1 lineto
55620.6 31192.4 lineto
55564.3 31304.8 lineto
55564.3 31754.8 lineto
55620.6 31867.3 lineto
55733.1 31923.5 lineto
55958 31923.5 lineto
56070.5 31867.3 lineto
56126.8 31754.8 lineto
56126.8 31642.3 lineto
55564.3 31529.8 lineto
stroke
newpath
56576.7 31192.4 moveto
56689.2 31136.1 lineto
56914.2 31136.1 lineto
57026.6 31192.4 lineto
57082.9 31304.8 lineto
57082.9 31361.1 lineto
57026.6 31473.6 lineto
56914.2 31529.8 lineto
56745.4 31529.8 lineto
56632.9 31586.1 lineto
56576.7 31698.5 lineto
56576.7 31754.8 lineto
56632.9 31867.3 lineto
56745.4 31923.5 lineto
56914.2 31923.5 lineto
57026.6 31867.3 lineto
stroke
newpath
57476.6 30686.2 moveto
57532.8 30742.4 lineto
57645.3 30911.1 lineto
57701.6 31023.6 lineto
57757.8 31192.4 lineto
57814 31473.6 lineto
57814 31698.5 lineto
57757.8 31979.8 lineto
57701.6 32148.5 lineto
57645.3 32261 lineto
57532.8 32429.7 lineto
57476.6 32485.9 lineto
stroke
showpage
grestore
%%EOF
| PostScript | 3 | AmigaPorts/amiga2000-gfxcard | gerbers/amiga-gfxcard-drl_map.ps | [
"MIT",
"IJG",
"Unlicense"
] |
<?xml version='1.0' encoding='UTF-8'?>
<Project Type="Project" LVVersion="17008000">
<Property Name="NI.LV.All.SourceOnly" Type="Bool">true</Property>
<Property Name="NI.LV.ExampleFinder" Type="Str"><?xml version="1.0" encoding="UTF-8"?>
<nidna:ExampleProgram
xmlns:nidna="http://www.ni.com/Schemas/DNA/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ni.com/Schemas/DNA/1.0 ..\DNA\1.0\NiExampleProgram.xsd"
SchemaVersion="1.0"
ContentType="EXAMPLE"
<Title>
<Text Locale="US">Dynamic Dispatching.lvproj</Text>
</Title>
<Description>
<Text Locale="US"> This example demonstrates dynamic dispatching with LabVIEW classes.
Refer to the LabVIEW Help for more information about LabVIEW object-oriented programming.</Text>
</Description>
<Keywords>
<Item>object-oriented</Item>
<Item>classes</Item>
<Item>dynamic</Item>
<Item>override</Item>
<Item>methods</Item>
<Item>parent</Item>
<Item>dispatch</Item>
</Keywords>
<Navigation>
<Item>8419</Item>
</Navigation>
<FileType>LV Project</FileType>
<Metadata>
<Item Name="RTSupport">LV Project</Item>
</Metadata>
<ProgrammingLanguages>
<Item>LabVIEW</Item>
</ProgrammingLanguages>
<RequiredSoftware>
<NiSoftware MinVersion="13.0">LabVIEW</NiSoftware>
</RequiredSoftware></Property>
<Property Name="NI.Project.Description" Type="Str">This example demonstrates dynamic dispatching with LabVIEW classes.
Refer to the LabVIEW Help for more information about LabVIEW object-oriented programming.</Property>
<Item Name="My Computer" Type="My Computer">
<Property Name="NI.SortType" Type="Int">3</Property>
<Property Name="server.app.propertiesEnabled" Type="Bool">true</Property>
<Property Name="server.control.propertiesEnabled" Type="Bool">true</Property>
<Property Name="server.tcp.enabled" Type="Bool">false</Property>
<Property Name="server.tcp.port" Type="Int">0</Property>
<Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property>
<Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property>
<Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
<Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
<Property Name="specify.custom.address" Type="Bool">false</Property>
<Item Name="Dynamic Dispatching.vi" Type="VI" URL="../Dynamic Dispatching.vi"/>
<Item Name="Shape.lvclass" Type="LVClass" URL="../Shape/Shape.lvclass"/>
<Item Name="Triangle.lvclass" Type="LVClass" URL="../Triangle/Triangle.lvclass"/>
<Item Name="Square.lvclass" Type="LVClass" URL="../Square/Square.lvclass"/>
<Item Name="Dependencies" Type="Dependencies">
<Item Name="vi.lib" Type="Folder">
<Item Name="Simple Error Handler.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Simple Error Handler.vi"/>
<Item Name="DialogType.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/DialogType.ctl"/>
<Item Name="General Error Handler.vi" Type="VI" URL="/<vilib>/Utility/error.llb/General Error Handler.vi"/>
<Item Name="DialogTypeEnum.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/DialogTypeEnum.ctl"/>
<Item Name="General Error Handler Core CORE.vi" Type="VI" URL="/<vilib>/Utility/error.llb/General Error Handler Core CORE.vi"/>
<Item Name="whitespace.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/whitespace.ctl"/>
<Item Name="Check Special Tags.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Check Special Tags.vi"/>
<Item Name="TagReturnType.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/TagReturnType.ctl"/>
<Item Name="Set String Value.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Set String Value.vi"/>
<Item Name="GetRTHostConnectedProp.vi" Type="VI" URL="/<vilib>/Utility/error.llb/GetRTHostConnectedProp.vi"/>
<Item Name="Error Code Database.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Error Code Database.vi"/>
<Item Name="Trim Whitespace.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Trim Whitespace.vi"/>
<Item Name="Format Message String.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Format Message String.vi"/>
<Item Name="Set Bold Text.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Set Bold Text.vi"/>
<Item Name="Find Tag.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Find Tag.vi"/>
<Item Name="Search and Replace Pattern.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Search and Replace Pattern.vi"/>
<Item Name="Details Display Dialog.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Details Display Dialog.vi"/>
<Item Name="ErrWarn.ctl" Type="VI" URL="/<vilib>/Utility/error.llb/ErrWarn.ctl"/>
<Item Name="eventvkey.ctl" Type="VI" URL="/<vilib>/event_ctls.llb/eventvkey.ctl"/>
<Item Name="Clear Errors.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Clear Errors.vi"/>
<Item Name="Not Found Dialog.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Not Found Dialog.vi"/>
<Item Name="Three Button Dialog.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Three Button Dialog.vi"/>
<Item Name="Three Button Dialog CORE.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Three Button Dialog CORE.vi"/>
<Item Name="LVRectTypeDef.ctl" Type="VI" URL="/<vilib>/Utility/miscctls.llb/LVRectTypeDef.ctl"/>
<Item Name="Longest Line Length in Pixels.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Longest Line Length in Pixels.vi"/>
<Item Name="Convert property node font to graphics font.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Convert property node font to graphics font.vi"/>
<Item Name="Get Text Rect.vi" Type="VI" URL="/<vilib>/picture/picture.llb/Get Text Rect.vi"/>
<Item Name="Get String Text Bounds.vi" Type="VI" URL="/<vilib>/Utility/error.llb/Get String Text Bounds.vi"/>
<Item Name="LVBoundsTypeDef.ctl" Type="VI" URL="/<vilib>/Utility/miscctls.llb/LVBoundsTypeDef.ctl"/>
<Item Name="BuildHelpPath.vi" Type="VI" URL="/<vilib>/Utility/error.llb/BuildHelpPath.vi"/>
<Item Name="GetHelpDir.vi" Type="VI" URL="/<vilib>/Utility/error.llb/GetHelpDir.vi"/>
</Item>
</Item>
<Item Name="Build Specifications" Type="Build"/>
</Item>
</Project>
| LabVIEW | 3 | ribeirojose/FINALE | src/testAssets/enabled/Dynamic_dispatch/Dynamic_dispatch.lvproj | [
"MIT"
] |
fails := false
main: func {
one()
if (fails) {
"We've had failures" println()
exit(1)
}
"Pass!" println()
}
TileId: cover from UInt
one: func {
// no value to check here
(row, column) := getTileRowColumn(256 as TileId)
}
getTileRowColumn: func (lid: TileId) -> (SizeT, SizeT) {
tilesPerRow: SizeT = 42
(lid / tilesPerRow, lid % tilesPerRow)
}
| ooc | 4 | shamanas/rock | test/compiler/operators/assign-numeric-and-cover.ooc | [
"MIT"
] |
/*
* Copyright (c) 2021, Linus Groh <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <LibGfx/Forward.h>
#include <LibGfx/ImageDecoder.h>
namespace Gfx {
// Decoder for the "Quite OK Image" format (v1.0).
// https://qoiformat.org/qoi-specification.pdf
struct [[gnu::packed]] QOIHeader {
char magic[4];
u32 width;
u32 height;
u8 channels;
u8 colorspace;
};
struct QOILoadingContext {
enum class State {
NotDecoded = 0,
HeaderDecoded,
ImageDecoded,
Error,
};
State state { State::NotDecoded };
u8 const* data { nullptr };
size_t data_size { 0 };
QOIHeader header {};
RefPtr<Bitmap> bitmap;
Optional<Error> error;
};
class QOIImageDecoderPlugin final : public ImageDecoderPlugin {
public:
virtual ~QOIImageDecoderPlugin() override = default;
QOIImageDecoderPlugin(u8 const*, size_t);
virtual IntSize size() override;
virtual void set_volatile() override;
[[nodiscard]] virtual bool set_nonvolatile(bool& was_purged) override;
virtual bool sniff() override;
virtual bool is_animated() override { return false; }
virtual size_t loop_count() override { return 0; }
virtual size_t frame_count() override { return 1; }
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index) override;
private:
ErrorOr<void> decode_header_and_update_context(InputMemoryStream&);
ErrorOr<void> decode_image_and_update_context(InputMemoryStream&);
OwnPtr<QOILoadingContext> m_context;
};
}
| C | 5 | densogiaichned/serenity | Userland/Libraries/LibGfx/QOILoader.h | [
"BSD-2-Clause"
] |
.class public final Lconditions/TestTernaryOneBranchInConstructor2;
.super Ljava/lang/Object;
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V
.locals 1
and-int/lit8 p6, p5, 0x2
const-string v0, ""
if-eqz p6, :cond_0
move-object p2, v0
:cond_0
and-int/lit8 p6, p5, 0x4
if-eqz p6, :cond_1
move-object p3, v0
:cond_1
and-int/lit8 p5, p5, 0x8
if-eqz p5, :cond_2
const/4 p4, 0x0
:cond_2
invoke-direct {p0, p1, p2, p3, p4}, Lconditions/TestTernaryOneBranchInConstructor2;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
return-void
.end method
| Smali | 2 | DSYliangweihao/jadx | jadx-core/src/test/smali/conditions/TestTernaryOneBranchInConstructor2.smali | [
"Apache-2.0"
] |
{
"@context": { "chem": "http://example/chem#"},
"chem:protons": 12
} | JSONLD | 3 | fsteeg/json-ld-api | tests/toRdf/0023-in.jsonld | [
"W3C"
] |
# This file is distributed under the same license as the Django package.
#
# Translators:
# F Wolff <[email protected]>, 2019-2020
# Stephen Cox <[email protected]>, 2011-2012
# unklphil <[email protected]>, 2014,2019
msgid ""
msgstr ""
"Project-Id-Version: django\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-19 20:23+0200\n"
"PO-Revision-Date: 2020-07-20 19:37+0000\n"
"Last-Translator: F Wolff <[email protected]>\n"
"Language-Team: Afrikaans (http://www.transifex.com/django/django/language/"
"af/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: af\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Afrikaans"
msgstr "Afrikaans"
msgid "Arabic"
msgstr "Arabies"
msgid "Algerian Arabic"
msgstr ""
msgid "Asturian"
msgstr "Asturies"
msgid "Azerbaijani"
msgstr "Aserbeidjans"
msgid "Bulgarian"
msgstr "Bulgaars"
msgid "Belarusian"
msgstr "Wit-Russies"
msgid "Bengali"
msgstr "Bengali"
msgid "Breton"
msgstr "Bretons"
msgid "Bosnian"
msgstr "Bosnies"
msgid "Catalan"
msgstr "Katalaans"
msgid "Czech"
msgstr "Tsjeggies"
msgid "Welsh"
msgstr "Welsh"
msgid "Danish"
msgstr "Deens"
msgid "German"
msgstr "Duits"
msgid "Lower Sorbian"
msgstr "Neder-Sorbies"
msgid "Greek"
msgstr "Grieks"
msgid "English"
msgstr "Engels"
msgid "Australian English"
msgstr "Australiese Engels"
msgid "British English"
msgstr "Britse Engels"
msgid "Esperanto"
msgstr "Esperanto"
msgid "Spanish"
msgstr "Spaans"
msgid "Argentinian Spanish"
msgstr "Argentynse Spaans"
msgid "Colombian Spanish"
msgstr "Kolombiaanse Spaans"
msgid "Mexican Spanish"
msgstr "Meksikaanse Spaans"
msgid "Nicaraguan Spanish"
msgstr "Nicaraguaanse Spaans"
msgid "Venezuelan Spanish"
msgstr "Venezolaanse Spaans"
msgid "Estonian"
msgstr "Estnies"
msgid "Basque"
msgstr "Baskies"
msgid "Persian"
msgstr "Persies"
msgid "Finnish"
msgstr "Fins"
msgid "French"
msgstr "Fraans"
msgid "Frisian"
msgstr "Fries"
msgid "Irish"
msgstr "Iers"
msgid "Scottish Gaelic"
msgstr "Skots-Gaelies"
msgid "Galician"
msgstr "Galicies"
msgid "Hebrew"
msgstr "Hebreeus"
msgid "Hindi"
msgstr "Hindoe"
msgid "Croatian"
msgstr "Kroaties"
msgid "Upper Sorbian"
msgstr "Opper-Sorbies"
msgid "Hungarian"
msgstr "Hongaars"
msgid "Armenian"
msgstr "Armeens"
msgid "Interlingua"
msgstr "Interlingua"
msgid "Indonesian"
msgstr "Indonesies"
msgid "Igbo"
msgstr ""
msgid "Ido"
msgstr "Ido"
msgid "Icelandic"
msgstr "Yslands"
msgid "Italian"
msgstr "Italiaans"
msgid "Japanese"
msgstr "Japannees"
msgid "Georgian"
msgstr "Georgian"
msgid "Kabyle"
msgstr "Kabilies"
msgid "Kazakh"
msgstr "Kazakh"
msgid "Khmer"
msgstr "Khmer"
msgid "Kannada"
msgstr "Kannada"
msgid "Korean"
msgstr "Koreaans"
msgid "Kyrgyz"
msgstr ""
msgid "Luxembourgish"
msgstr "Luxemburgs"
msgid "Lithuanian"
msgstr "Litaus"
msgid "Latvian"
msgstr "Lets"
msgid "Macedonian"
msgstr "Macedonies"
msgid "Malayalam"
msgstr "Malabaars"
msgid "Mongolian"
msgstr "Mongools"
msgid "Marathi"
msgstr "Marathi"
msgid "Burmese"
msgstr "Birmaans"
msgid "Norwegian Bokmål"
msgstr "Noorweegse Bokmål"
msgid "Nepali"
msgstr "Nepalees"
msgid "Dutch"
msgstr "Nederlands"
msgid "Norwegian Nynorsk"
msgstr "Noorweegse Nynorsk"
msgid "Ossetic"
msgstr "Osseties"
msgid "Punjabi"
msgstr "Punjabi"
msgid "Polish"
msgstr "Pools"
msgid "Portuguese"
msgstr "Portugees"
msgid "Brazilian Portuguese"
msgstr "Brasiliaanse Portugees"
msgid "Romanian"
msgstr "Roemeens"
msgid "Russian"
msgstr "Russiese"
msgid "Slovak"
msgstr "Slowaaks"
msgid "Slovenian"
msgstr "Sloweens"
msgid "Albanian"
msgstr "Albanees"
msgid "Serbian"
msgstr "Serwies"
msgid "Serbian Latin"
msgstr "Serwies Latyns"
msgid "Swedish"
msgstr "Sweeds"
msgid "Swahili"
msgstr "Swahili"
msgid "Tamil"
msgstr "Tamil"
msgid "Telugu"
msgstr "Teloegoe"
msgid "Tajik"
msgstr ""
msgid "Thai"
msgstr "Thai"
msgid "Turkmen"
msgstr ""
msgid "Turkish"
msgstr "Turks"
msgid "Tatar"
msgstr "Tataars"
msgid "Udmurt"
msgstr "Oedmoerts"
msgid "Ukrainian"
msgstr "Oekraïens"
msgid "Urdu"
msgstr "Oerdoe"
msgid "Uzbek"
msgstr "Oesbekies "
msgid "Vietnamese"
msgstr "Viëtnamees"
msgid "Simplified Chinese"
msgstr "Vereenvoudigde Sjinees"
msgid "Traditional Chinese"
msgstr "Tradisionele Sjinees"
msgid "Messages"
msgstr "Boodskappe"
msgid "Site Maps"
msgstr "Werfkaarte"
msgid "Static Files"
msgstr "Statiese lêers"
msgid "Syndication"
msgstr "Sindikasie"
msgid "That page number is not an integer"
msgstr "Daai bladsynommer is nie 'n heelgetal nie"
msgid "That page number is less than 1"
msgstr "Daai bladsynommer is minder as 1"
msgid "That page contains no results"
msgstr "Daai bladsy bevat geen resultate nie"
msgid "Enter a valid value."
msgstr "Gee 'n geldige waarde."
msgid "Enter a valid URL."
msgstr "Gee ’n geldige URL."
msgid "Enter a valid integer."
msgstr "Gee ’n geldige heelgetal."
msgid "Enter a valid email address."
msgstr "Gee ’n geldige e-posadres."
#. Translators: "letters" means latin letters: a-z and A-Z.
msgid ""
"Enter a valid “slug” consisting of letters, numbers, underscores or hyphens."
msgstr ""
msgid ""
"Enter a valid “slug” consisting of Unicode letters, numbers, underscores, or "
"hyphens."
msgstr ""
msgid "Enter a valid IPv4 address."
msgstr "Gee ’n geldige IPv4-adres."
msgid "Enter a valid IPv6 address."
msgstr "Gee ’n geldige IPv6-adres."
msgid "Enter a valid IPv4 or IPv6 address."
msgstr "Gee ’n geldige IPv4- of IPv6-adres."
msgid "Enter only digits separated by commas."
msgstr "Gee slegs syfers in wat deur kommas geskei is."
#, python-format
msgid "Ensure this value is %(limit_value)s (it is %(show_value)s)."
msgstr ""
"Maak seker dat hierdie waarde %(limit_value)s is (dit is %(show_value)s)."
#, python-format
msgid "Ensure this value is less than or equal to %(limit_value)s."
msgstr "Maak seker dat hierdie waarde kleiner of gelyk is aan %(limit_value)s."
#, python-format
msgid "Ensure this value is greater than or equal to %(limit_value)s."
msgstr "Maak seker dat hierdie waarde groter of gelyk is aan %(limit_value)s."
#, python-format
msgid ""
"Ensure this value has at least %(limit_value)d character (it has "
"%(show_value)d)."
msgid_plural ""
"Ensure this value has at least %(limit_value)d characters (it has "
"%(show_value)d)."
msgstr[0] ""
"Maak seker hierdie waarde het ten minste %(limit_value)d karakter (dit het "
"%(show_value)d)."
msgstr[1] ""
"Maak seker hierdie waarde het ten minste %(limit_value)d karakters (dit het "
"%(show_value)d)."
#, python-format
msgid ""
"Ensure this value has at most %(limit_value)d character (it has "
"%(show_value)d)."
msgid_plural ""
"Ensure this value has at most %(limit_value)d characters (it has "
"%(show_value)d)."
msgstr[0] ""
"Maak seker hierdie waarde het op die meeste %(limit_value)d karakter (dit "
"het %(show_value)d)."
msgstr[1] ""
"Maak seker hierdie waarde het op die meeste %(limit_value)d karakters (dit "
"het %(show_value)d)."
msgid "Enter a number."
msgstr "Gee ’n getal."
#, python-format
msgid "Ensure that there are no more than %(max)s digit in total."
msgid_plural "Ensure that there are no more than %(max)s digits in total."
msgstr[0] "Maak seker dat daar nie meer as %(max)s syfer in totaal is nie."
msgstr[1] "Maak seker dat daar nie meer as %(max)s syfers in totaal is nie."
#, python-format
msgid "Ensure that there are no more than %(max)s decimal place."
msgid_plural "Ensure that there are no more than %(max)s decimal places."
msgstr[0] "Maak seker dat daar nie meer as %(max)s desimale plek is nie."
msgstr[1] "Maak seker dat daar nie meer as %(max)s desimale plekke is nie."
#, python-format
msgid ""
"Ensure that there are no more than %(max)s digit before the decimal point."
msgid_plural ""
"Ensure that there are no more than %(max)s digits before the decimal point."
msgstr[0] ""
"Maak seker dat daar nie meer as %(max)s syfer voor die desimale punt is nie."
msgstr[1] ""
"Maak seker dat daar nie meer as %(max)s syfers voor die desimale punt is nie."
#, python-format
msgid ""
"File extension “%(extension)s” is not allowed. Allowed extensions are: "
"%(allowed_extensions)s."
msgstr ""
msgid "Null characters are not allowed."
msgstr "Nul-karakters word nie toegelaat nie."
msgid "and"
msgstr "en"
#, python-format
msgid "%(model_name)s with this %(field_labels)s already exists."
msgstr "%(model_name)s met hierdie %(field_labels)s bestaan alreeds."
#, python-format
msgid "Value %(value)r is not a valid choice."
msgstr "Waarde %(value)r is nie ’n geldige keuse nie."
msgid "This field cannot be null."
msgstr "Hierdie veld kan nie nil wees nie."
msgid "This field cannot be blank."
msgstr "Hierdie veld kan nie leeg wees nie."
#, python-format
msgid "%(model_name)s with this %(field_label)s already exists."
msgstr "%(model_name)s met hierdie %(field_label)s bestaan alreeds."
#. Translators: The 'lookup_type' is one of 'date', 'year' or 'month'.
#. Eg: "Title must be unique for pub_date year"
#, python-format
msgid ""
"%(field_label)s must be unique for %(date_field_label)s %(lookup_type)s."
msgstr ""
"%(field_label)s moet uniek wees per %(date_field_label)s %(lookup_type)s."
#, python-format
msgid "Field of type: %(field_type)s"
msgstr "Veld van tipe: %(field_type)s "
#, python-format
msgid "“%(value)s” value must be either True or False."
msgstr ""
#, python-format
msgid "“%(value)s” value must be either True, False, or None."
msgstr ""
msgid "Boolean (Either True or False)"
msgstr "Boole (True of False)"
#, python-format
msgid "String (up to %(max_length)s)"
msgstr "String (hoogstens %(max_length)s karakters)"
msgid "Comma-separated integers"
msgstr "Heelgetalle geskei met kommas"
#, python-format
msgid ""
"“%(value)s” value has an invalid date format. It must be in YYYY-MM-DD "
"format."
msgstr ""
#, python-format
msgid ""
"“%(value)s” value has the correct format (YYYY-MM-DD) but it is an invalid "
"date."
msgstr ""
msgid "Date (without time)"
msgstr "Datum (sonder die tyd)"
#, python-format
msgid ""
"“%(value)s” value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[."
"uuuuuu]][TZ] format."
msgstr ""
#, python-format
msgid ""
"“%(value)s” value has the correct format (YYYY-MM-DD HH:MM[:ss[.uuuuuu]]"
"[TZ]) but it is an invalid date/time."
msgstr ""
msgid "Date (with time)"
msgstr "Datum (met die tyd)"
#, python-format
msgid "“%(value)s” value must be a decimal number."
msgstr "“%(value)s”-waarde moet ’n desimale getal wees."
msgid "Decimal number"
msgstr "Desimale getal"
#, python-format
msgid ""
"“%(value)s” value has an invalid format. It must be in [DD] [[HH:]MM:]ss[."
"uuuuuu] format."
msgstr ""
msgid "Duration"
msgstr "Duur"
msgid "Email address"
msgstr "E-posadres"
msgid "File path"
msgstr "Lêerpad"
#, python-format
msgid "“%(value)s” value must be a float."
msgstr ""
msgid "Floating point number"
msgstr "Dryfpuntgetal"
#, python-format
msgid "“%(value)s” value must be an integer."
msgstr "“%(value)s”-waarde moet ’n heelgetal wees."
msgid "Integer"
msgstr "Heelgetal"
msgid "Big (8 byte) integer"
msgstr "Groot (8 greep) heelgetal"
msgid "IPv4 address"
msgstr "IPv4-adres"
msgid "IP address"
msgstr "IP-adres"
#, python-format
msgid "“%(value)s” value must be either None, True or False."
msgstr "“%(value)s”-waarde moet een wees uit None, True of False."
msgid "Boolean (Either True, False or None)"
msgstr "Boole (True, False, of None)"
msgid "Positive big integer"
msgstr "Positiewe groot heelgetal"
msgid "Positive integer"
msgstr "Positiewe heelgetal"
msgid "Positive small integer"
msgstr "Klein positiewe heelgetal"
#, python-format
msgid "Slug (up to %(max_length)s)"
msgstr "Slug (tot en met %(max_length)s karakters)"
msgid "Small integer"
msgstr "Klein heelgetal"
msgid "Text"
msgstr "Teks"
#, python-format
msgid ""
"“%(value)s” value has an invalid format. It must be in HH:MM[:ss[.uuuuuu]] "
"format."
msgstr ""
"“%(value)s”-waarde het ’n ongeldige formaat. Dit moet geformateer word as HH:"
"MM[:ss[.uuuuuu]]."
#, python-format
msgid ""
"“%(value)s” value has the correct format (HH:MM[:ss[.uuuuuu]]) but it is an "
"invalid time."
msgstr ""
msgid "Time"
msgstr "Tyd"
msgid "URL"
msgstr "URL"
msgid "Raw binary data"
msgstr "Rou binêre data"
#, python-format
msgid "“%(value)s” is not a valid UUID."
msgstr "“%(value)s” is nie ’n geldige UUID nie."
msgid "Universally unique identifier"
msgstr "Universeel unieke identifiseerder"
msgid "File"
msgstr "Lêer"
msgid "Image"
msgstr "Prent"
msgid "A JSON object"
msgstr "’n JSON-objek"
msgid "Value must be valid JSON."
msgstr "Waarde moet geldige JSON wees."
#, python-format
msgid "%(model)s instance with %(field)s %(value)r does not exist."
msgstr "%(model)s-objek met %(field)s %(value)r bestaan nie."
msgid "Foreign Key (type determined by related field)"
msgstr "Vreemde sleutel (tipe bepaal deur verwante veld)"
msgid "One-to-one relationship"
msgstr "Een-tot-een-verhouding"
#, python-format
msgid "%(from)s-%(to)s relationship"
msgstr "%(from)s-%(to)s-verwantskap"
#, python-format
msgid "%(from)s-%(to)s relationships"
msgstr "%(from)s-%(to)s-verwantskappe"
msgid "Many-to-many relationship"
msgstr "Baie-tot-baie-verwantskap"
#. Translators: If found as last label character, these punctuation
#. characters will prevent the default label_suffix to be appended to the
#. label
msgid ":?.!"
msgstr ":?.!"
msgid "This field is required."
msgstr "Dié veld is verpligtend."
msgid "Enter a whole number."
msgstr "Tik ’n heelgetal in."
msgid "Enter a valid date."
msgstr "Tik ’n geldige datum in."
msgid "Enter a valid time."
msgstr "Tik ’n geldige tyd in."
msgid "Enter a valid date/time."
msgstr "Tik ’n geldige datum/tyd in."
msgid "Enter a valid duration."
msgstr "Tik ’n geldige tydsduur in."
#, python-brace-format
msgid "The number of days must be between {min_days} and {max_days}."
msgstr "Die aantal dae moet tussen {min_days} en {max_days} wees."
msgid "No file was submitted. Check the encoding type on the form."
msgstr ""
"Geen lêer is ingedien nie. Maak seker die koderingtipe op die vorm is reg."
msgid "No file was submitted."
msgstr "Geen lêer is ingedien nie."
msgid "The submitted file is empty."
msgstr "Die ingedien lêer is leeg."
#, python-format
msgid "Ensure this filename has at most %(max)d character (it has %(length)d)."
msgid_plural ""
"Ensure this filename has at most %(max)d characters (it has %(length)d)."
msgstr[0] ""
"Maak seker hierdie lêernaam het hoogstens %(max)d karakter (dit het "
"%(length)d)."
msgstr[1] ""
"Maak seker hierdie lêernaam het hoogstens %(max)d karakters (dit het "
"%(length)d)."
msgid "Please either submit a file or check the clear checkbox, not both."
msgstr "Dien die lêer in óf merk die Maak skoon-boksie, nie altwee nie."
msgid ""
"Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image."
msgstr ""
"Laai ’n geldige prent. Die lêer wat jy opgelaai het, is nie ’n prent nie of "
"dit is ’n korrupte prent."
#, python-format
msgid "Select a valid choice. %(value)s is not one of the available choices."
msgstr ""
"Kies 'n geldige keuse. %(value)s is nie een van die beskikbare keuses nie."
msgid "Enter a list of values."
msgstr "Tik ’n lys waardes in."
msgid "Enter a complete value."
msgstr "Tik ’n volledige waarde in."
msgid "Enter a valid UUID."
msgstr "Tik ’n geldig UUID in."
msgid "Enter a valid JSON."
msgstr "Gee geldige JSON."
#. Translators: This is the default suffix added to form field labels
msgid ":"
msgstr ":"
#, python-format
msgid "(Hidden field %(name)s) %(error)s"
msgstr "(Versteekte veld %(name)s) %(error)s"
msgid "ManagementForm data is missing or has been tampered with"
msgstr "Die ManagementForm-data ontbreek of is mee gepeuter"
#, python-format
msgid "Please submit %d or fewer forms."
msgid_plural "Please submit %d or fewer forms."
msgstr[0] "Dien asseblief %d of minder vorms in."
msgstr[1] "Dien asseblief %d of minder vorms in."
#, python-format
msgid "Please submit %d or more forms."
msgid_plural "Please submit %d or more forms."
msgstr[0] "Dien asseblief %d of meer vorms in."
msgstr[1] "Dien asseblief %d of meer vorms in."
msgid "Order"
msgstr "Orde"
msgid "Delete"
msgstr "Verwyder"
#, python-format
msgid "Please correct the duplicate data for %(field)s."
msgstr "Korrigeer die dubbele data vir %(field)s."
#, python-format
msgid "Please correct the duplicate data for %(field)s, which must be unique."
msgstr "Korrigeer die dubbele data vir %(field)s, dit moet uniek wees."
#, python-format
msgid ""
"Please correct the duplicate data for %(field_name)s which must be unique "
"for the %(lookup)s in %(date_field)s."
msgstr ""
"Korrigeer die dubbele data vir %(field_name)s, dit moet uniek wees vir die "
"%(lookup)s in %(date_field)s."
msgid "Please correct the duplicate values below."
msgstr "Korrigeer die dubbele waardes hieronder."
msgid "The inline value did not match the parent instance."
msgstr "Die waarde inlyn pas nie by die ouerobjek nie."
msgid "Select a valid choice. That choice is not one of the available choices."
msgstr ""
"Kies ’n geldige keuse. Daardie keuse is nie een van die beskikbare keuses "
"nie."
#, python-format
msgid "“%(pk)s” is not a valid value."
msgstr "“%(pk)s” is nie ’n geldige waarde nie."
#, python-format
msgid ""
"%(datetime)s couldn’t be interpreted in time zone %(current_timezone)s; it "
"may be ambiguous or it may not exist."
msgstr ""
msgid "Clear"
msgstr "Maak skoon"
msgid "Currently"
msgstr "Tans"
msgid "Change"
msgstr "Verander"
msgid "Unknown"
msgstr "Onbekend"
msgid "Yes"
msgstr "Ja"
msgid "No"
msgstr "Nee"
#. Translators: Please do not add spaces around commas.
msgid "yes,no,maybe"
msgstr "ja,nee,miskien"
#, python-format
msgid "%(size)d byte"
msgid_plural "%(size)d bytes"
msgstr[0] "%(size)d greep"
msgstr[1] "%(size)d grepe"
#, python-format
msgid "%s KB"
msgstr "%s KB"
#, python-format
msgid "%s MB"
msgstr "%s MB"
#, python-format
msgid "%s GB"
msgstr "%s GB"
#, python-format
msgid "%s TB"
msgstr "%s TB"
#, python-format
msgid "%s PB"
msgstr "%s PB"
msgid "p.m."
msgstr "nm."
msgid "a.m."
msgstr "vm."
msgid "PM"
msgstr "NM"
msgid "AM"
msgstr "VM"
msgid "midnight"
msgstr "middernag"
msgid "noon"
msgstr "middag"
msgid "Monday"
msgstr "Maandag"
msgid "Tuesday"
msgstr "Dinsdag"
msgid "Wednesday"
msgstr "Woensdag"
msgid "Thursday"
msgstr "Donderdag"
msgid "Friday"
msgstr "Vrydag"
msgid "Saturday"
msgstr "Saterdag"
msgid "Sunday"
msgstr "Sondag"
msgid "Mon"
msgstr "Ma"
msgid "Tue"
msgstr "Di"
msgid "Wed"
msgstr "Wo"
msgid "Thu"
msgstr "Do"
msgid "Fri"
msgstr "Vr"
msgid "Sat"
msgstr "Sa"
msgid "Sun"
msgstr "So"
msgid "January"
msgstr "Januarie"
msgid "February"
msgstr "Februarie"
msgid "March"
msgstr "Maart"
msgid "April"
msgstr "April"
msgid "May"
msgstr "Mei"
msgid "June"
msgstr "Junie"
msgid "July"
msgstr "Julie"
msgid "August"
msgstr "Augustus"
msgid "September"
msgstr "September"
msgid "October"
msgstr "Oktober"
msgid "November"
msgstr "November"
msgid "December"
msgstr "Desember"
msgid "jan"
msgstr "jan"
msgid "feb"
msgstr "feb"
msgid "mar"
msgstr "mrt"
msgid "apr"
msgstr "apr"
msgid "may"
msgstr "mei"
msgid "jun"
msgstr "jun"
msgid "jul"
msgstr "jul"
msgid "aug"
msgstr "aug"
msgid "sep"
msgstr "sept"
msgid "oct"
msgstr "okt"
msgid "nov"
msgstr "nov"
msgid "dec"
msgstr "des"
msgctxt "abbrev. month"
msgid "Jan."
msgstr "Jan."
msgctxt "abbrev. month"
msgid "Feb."
msgstr "Feb."
msgctxt "abbrev. month"
msgid "March"
msgstr "Maart"
msgctxt "abbrev. month"
msgid "April"
msgstr "April"
msgctxt "abbrev. month"
msgid "May"
msgstr "Mei"
msgctxt "abbrev. month"
msgid "June"
msgstr "Junie"
msgctxt "abbrev. month"
msgid "July"
msgstr "Julie"
msgctxt "abbrev. month"
msgid "Aug."
msgstr "Aug."
msgctxt "abbrev. month"
msgid "Sept."
msgstr "Sept."
msgctxt "abbrev. month"
msgid "Oct."
msgstr "Okt."
msgctxt "abbrev. month"
msgid "Nov."
msgstr "Nov."
msgctxt "abbrev. month"
msgid "Dec."
msgstr "Des."
msgctxt "alt. month"
msgid "January"
msgstr "Januarie"
msgctxt "alt. month"
msgid "February"
msgstr "Februarie"
msgctxt "alt. month"
msgid "March"
msgstr "Maart"
msgctxt "alt. month"
msgid "April"
msgstr "April"
msgctxt "alt. month"
msgid "May"
msgstr "Mei"
msgctxt "alt. month"
msgid "June"
msgstr "Junie"
msgctxt "alt. month"
msgid "July"
msgstr "Julie"
msgctxt "alt. month"
msgid "August"
msgstr "Augustus"
msgctxt "alt. month"
msgid "September"
msgstr "September"
msgctxt "alt. month"
msgid "October"
msgstr "Oktober"
msgctxt "alt. month"
msgid "November"
msgstr "November"
msgctxt "alt. month"
msgid "December"
msgstr "Desember"
msgid "This is not a valid IPv6 address."
msgstr "Hierdie is nie ’n geldige IPv6-adres nie."
#, python-format
msgctxt "String to return when truncating text"
msgid "%(truncated_text)s…"
msgstr "%(truncated_text)s…"
msgid "or"
msgstr "of"
#. Translators: This string is used as a separator between list elements
msgid ", "
msgstr ", "
#, python-format
msgid "%d year"
msgid_plural "%d years"
msgstr[0] "%d jaar"
msgstr[1] "%d jare"
#, python-format
msgid "%d month"
msgid_plural "%d months"
msgstr[0] "%d maand"
msgstr[1] "%d maande"
#, python-format
msgid "%d week"
msgid_plural "%d weeks"
msgstr[0] "%d week"
msgstr[1] "%d weke"
#, python-format
msgid "%d day"
msgid_plural "%d days"
msgstr[0] "%d dag"
msgstr[1] "%d dae"
#, python-format
msgid "%d hour"
msgid_plural "%d hours"
msgstr[0] "%d uur"
msgstr[1] "%d ure"
#, python-format
msgid "%d minute"
msgid_plural "%d minutes"
msgstr[0] "%d minuut"
msgstr[1] "%d minute"
msgid "Forbidden"
msgstr "Verbode"
msgid "CSRF verification failed. Request aborted."
msgstr "CSRF-verifikasie het misluk. Versoek is laat val."
msgid ""
"You are seeing this message because this HTTPS site requires a “Referer "
"header” to be sent by your Web browser, but none was sent. This header is "
"required for security reasons, to ensure that your browser is not being "
"hijacked by third parties."
msgstr ""
msgid ""
"If you have configured your browser to disable “Referer” headers, please re-"
"enable them, at least for this site, or for HTTPS connections, or for “same-"
"origin” requests."
msgstr ""
msgid ""
"If you are using the <meta name=\"referrer\" content=\"no-referrer\"> tag or "
"including the “Referrer-Policy: no-referrer” header, please remove them. The "
"CSRF protection requires the “Referer” header to do strict referer checking. "
"If you’re concerned about privacy, use alternatives like <a rel=\"noreferrer"
"\" …> for links to third-party sites."
msgstr ""
msgid ""
"You are seeing this message because this site requires a CSRF cookie when "
"submitting forms. This cookie is required for security reasons, to ensure "
"that your browser is not being hijacked by third parties."
msgstr ""
"U sien hierdie boodskap omdat dié werf ’n CSRF-koekie benodig wanneer vorms "
"ingedien word. Dié koekie word vir sekuriteitsredes benodig om te te "
"verseker dat u blaaier nie deur derde partye gekaap word nie."
msgid ""
"If you have configured your browser to disable cookies, please re-enable "
"them, at least for this site, or for “same-origin” requests."
msgstr ""
msgid "More information is available with DEBUG=True."
msgstr "Meer inligting is beskikbaar met DEBUG=True."
msgid "No year specified"
msgstr "Geen jaar gespesifiseer nie"
msgid "Date out of range"
msgstr "Datum buite omvang"
msgid "No month specified"
msgstr "Geen maand gespesifiseer nie"
msgid "No day specified"
msgstr "Geen dag gespesifiseer nie"
msgid "No week specified"
msgstr "Geen week gespesifiseer nie"
#, python-format
msgid "No %(verbose_name_plural)s available"
msgstr "Geen %(verbose_name_plural)s beskikbaar nie"
#, python-format
msgid ""
"Future %(verbose_name_plural)s not available because %(class_name)s."
"allow_future is False."
msgstr ""
"Toekomstige %(verbose_name_plural)s is nie beskikbaar nie, omdat "
"%(class_name)s.allow_future vals is."
#, python-format
msgid "Invalid date string “%(datestr)s” given format “%(format)s”"
msgstr "Ongeldige datumstring “%(datestr)s” gegewe die formaat “%(format)s”"
#, python-format
msgid "No %(verbose_name)s found matching the query"
msgstr "Geen %(verbose_name)s gevind vir die soektog"
msgid "Page is not “last”, nor can it be converted to an int."
msgstr ""
#, python-format
msgid "Invalid page (%(page_number)s): %(message)s"
msgstr "Ongeldige bladsy (%(page_number)s): %(message)s"
#, python-format
msgid "Empty list and “%(class_name)s.allow_empty” is False."
msgstr ""
msgid "Directory indexes are not allowed here."
msgstr "Gidsindekse word nie hier toegelaat nie."
#, python-format
msgid "“%(path)s” does not exist"
msgstr "“%(path)s” bestaan nie."
#, python-format
msgid "Index of %(directory)s"
msgstr "Indeks van %(directory)s"
msgid "Django: the Web framework for perfectionists with deadlines."
msgstr "Django: die webraamwerk vir perfeksioniste met sperdatums."
#, python-format
msgid ""
"View <a href=\"https://docs.djangoproject.com/en/%(version)s/releases/\" "
"target=\"_blank\" rel=\"noopener\">release notes</a> for Django %(version)s"
msgstr ""
"Sien die <a href=\"https://docs.djangoproject.com/en/%(version)s/releases/\" "
"target=\"_blank\" rel=\"noopener\">vrystellingsnotas</a> vir Django "
"%(version)s"
msgid "The install worked successfully! Congratulations!"
msgstr "Die installasie was suksesvol! Geluk!"
#, python-format
msgid ""
"You are seeing this page because <a href=\"https://docs.djangoproject.com/en/"
"%(version)s/ref/settings/#debug\" target=\"_blank\" rel=\"noopener"
"\">DEBUG=True</a> is in your settings file and you have not configured any "
"URLs."
msgstr ""
"U sien dié bladsy omdat <a href=\"https://docs.djangoproject.com/en/"
"%(version)s/ref/settings/#debug\" target=\"_blank\" rel=\"noopener"
"\">DEBUG=True</a> in die settings-lêer is en geen URL’e opgestel is nie."
msgid "Django Documentation"
msgstr "Django-dokumentasie"
msgid "Topics, references, & how-to’s"
msgstr ""
msgid "Tutorial: A Polling App"
msgstr ""
msgid "Get started with Django"
msgstr "Kom aan die gang met Django"
msgid "Django Community"
msgstr "Django-gemeenskap"
msgid "Connect, get help, or contribute"
msgstr "Kontak, kry hulp om dra by"
| Gettext Catalog | 3 | jpmallarino/django | django/conf/locale/af/LC_MESSAGES/django.po | [
"BSD-3-Clause",
"0BSD"
] |
# - Try to find iconv
# Once done, this will define
#
# Iconv_FOUND - system has iconv
# Iconv_INCLUDE_DIRS - the iconv include directories
# Iconv_LIBRARIES - link these to use iconv
include(LibFindMacros)
find_path(ICONV_INCLUDE_DIR NAMES iconv.h)
find_library(ICONV_LIBRARY NAMES iconv libiconv)
set(Iconv_PROCESS_INCLUDES ICONV_INCLUDE_DIR)
if(ICONV_LIBRARY)
set(Iconv_PROCESS_LIBS ICONV_LIBRARY)
endif()
libfind_process(Iconv)
| CMake | 4 | uga-rosa/neovim | cmake/FindIconv.cmake | [
"Vim"
] |
(*
* 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.
*)
(* This module provides an API for reading/writing signature data which is
* stored in a compact binary encoding.
*
* The data itself is represented as a bigarray, in practice representing a
* slice of the shared heap where signatures are stored. That is, the signature
* data itself is, in practice, not in the OCaml heap.
*
* Readers do not need to read the entire signature at once. Instead, readers
* can find the "position" of the data they are interested in and only read that
* part.
*
* These navigation APIs are type-safe through the use of `'k pos` type where
* `'k` is a phantom type parameter.
*)
open Type_sig_collections
type buf = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
type 'k pos [@@immediate]
type 'k tbl
type 'k opt
type 'k hashed
type 'k serialized
type str
type dyn_module
type packed
type local_def
type remote_ref
type pattern
type type_export
type cjs_module_info
type cjs_module
type es_export
type es_module_info
type es_module
val write : Locs.index Packed_type_sig.Module.t -> int * (buf -> unit)
val read : buf -> Locs.index Packed_type_sig.Module.t
val module_kind : buf -> dyn_module pos
val module_refs : buf -> str tbl pos
val local_defs : buf -> local_def serialized tbl pos
val remote_refs : buf -> remote_ref serialized tbl pos
val pattern_defs : buf -> packed serialized tbl pos
val patterns : buf -> pattern serialized tbl pos
val cjs_module_exports : buf -> cjs_module pos -> packed serialized hashed opt pos
val cjs_module_type_exports : buf -> cjs_module pos -> type_export serialized hashed tbl pos
val cjs_module_info : buf -> cjs_module pos -> cjs_module_info serialized hashed pos
val es_module_exports : buf -> es_module pos -> es_export serialized hashed tbl pos
val es_module_type_exports : buf -> es_module pos -> type_export serialized hashed tbl pos
val es_module_info : buf -> es_module pos -> es_module_info serialized hashed pos
val read_str : buf -> str pos -> string
val read_tbl_generic :
(buf -> 'k pos -> 'a) -> buf -> 'k tbl pos -> (int -> (int -> 'a) -> 'b) -> 'b
val read_tbl : (buf -> 'k pos -> 'a) -> buf -> 'k tbl pos -> 'a array
val iter_tbl : (buf -> 'k pos -> 'a) -> ('a -> unit) -> buf -> 'k tbl pos -> unit
val fold_tbl : (buf -> 'k pos -> 'a) -> ('a -> 'b -> 'b) -> buf -> 'k tbl pos -> 'b -> 'b
val read_opt : (buf -> 'k pos -> 'a) -> buf -> 'k opt pos -> 'a option
val read_hashed : (buf -> 'k pos -> 'a) -> buf -> 'k hashed pos -> 'a
val read_hash : buf -> _ hashed pos -> int64
val read_type_export : buf -> type_export serialized pos -> Locs.index Type_sig_pack.type_export
val read_packed : buf -> packed serialized pos -> Locs.index Type_sig_pack.packed
val read_cjs_info :
buf -> cjs_module_info serialized pos -> Locs.index Type_sig_pack.cjs_module_info
val read_es_export : buf -> es_export serialized pos -> Locs.index Type_sig_pack.export
val read_es_info : buf -> es_module_info serialized pos -> Locs.index Type_sig_pack.es_module_info
val read_local_def : buf -> local_def serialized pos -> Locs.index Type_sig_pack.packed_def
val read_remote_ref : buf -> remote_ref serialized pos -> Locs.index Type_sig_pack.remote_ref
val read_pattern : buf -> pattern serialized pos -> Locs.index Type_sig_pack.pattern
val read_cjs_module : buf -> cjs_module pos -> Locs.index Type_sig_pack.module_kind
val read_es_module : buf -> es_module pos -> Locs.index Type_sig_pack.module_kind
val read_module_kind :
(buf -> cjs_module pos -> 'a) -> (buf -> es_module pos -> 'a) -> buf -> dyn_module pos -> 'a
val hash_serialized : buf -> _ serialized pos -> int64
val write_hash : buf -> _ hashed pos -> int64 -> unit
| OCaml | 5 | zhangmaijun/flow | src/parser_utils/type_sig/type_sig_bin.mli | [
"MIT"
] |
a $
b $ c
d $ e $ f
g $ h $ i j $ k $
| Cirru | 0 | Cardsareus/linguist | samples/Cirru/folding.cirru | [
"MIT"
] |
# Copyright (C) 2004-2009, Parrot Foundation.
# $Id$
# all timings Athlon 800, gcc 2.95.2
# parrot SVN-HEAD
# perl 5.8.0
# python 2.3.3
# perl oo1.pl 0.8
# python oo1.py 1.2 (first time)
# python oo1.py 0.51
# parrot -R cgp oo1.pasm -g -O3
# original list fixed 4.9 (leaks mem ~ 110 M used)
# don't clone vtable 4.4
# Dan's vtable cache 4.3 3.8
# list MIN_ITEMS 4->16 2.25
# find_global hack 2.16 1.6
# reuse exception 2.00 1.37
# reuse regsave mem 1.25
# anchor P1 1.36
# Dan's new object layout 1.05
# parrot -R jit oo1.pasm
# find_global hack 1.51
# reuse exception 1.30
# reuse regsave mem 1.23
# anchor P1 1.32
# Dan's new object layout 1.00
# parrot -R cgp oo1-prop.pasm
# invokecc 0.75
# RetCont out of loop 0.57
# parrot -R jit oo1-prop.pasm 0.54
.namespace [ "Foo" ]
newclass P1, "Foo"
addattribute P1, ".i"
addattribute P1, ".j"
set I10, 0
set I11, 100000
loop:
new P3, "Foo"
inc I10
#sleep 0.0001
lt I10, I11, loop
new P3, "Foo"
getattribute P2, P3, ".i"
print P2
print "\n"
end
.pcc_sub __init:
.include "interpinfo.pasm"
interpinfo P2, .INTERPINFO_CURRENT_OBJECT
new P10, 'Integer'
set P10, 10
setattribute P2, ".i", P10
new P10, 'Integer'
set P10, 20
setattribute P2, ".j", P10
returncc
# Local Variables:
# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
| Parrot Assembly | 3 | allisonrandal/pcc_testing | examples/benchmarks/oo1.pasm | [
"Artistic-2.0"
] |
<%= greeting %> bad customer: <%= bad_customer.name %><%= bad_customer_counter %> | HTML+ERB | 2 | mdesantis/rails | actionview/test/fixtures/actionpack/bad_customers/_bad_customer.html.erb | [
"MIT"
] |
<video></video>
| HTML | 0 | lingxiao-Zhu/electron | spec/fixtures/pages/fullscreen.html | [
"MIT"
] |
= form_errors(@project)
| Haml | 1 | hugorebelo/gitlabhq | app/views/projects/_errors.html.haml | [
"MIT"
] |
@charset "utf-8"; /* comment 1 */
@import /* comment 2 */ url("fineprint.css") /* comment 3 */ print /* comment 4 */; /* comment 5 */
@import /* comment 6 */ url("bluish.css") /* comment 7 */ projection /* comment 8 */, /* comment 9 */ tv /* comment 10 */;
/* comment 11 */ @import /* comment 12 */
/* comment 13 */ url("bluish.css") /* comment 14 */
/* comment 15 */ projection /* comment 16 */,
/* comment 17 */ tv /* comment 18 */; /* comment 19 */
/* comment 20 */
@import/* comment 21 */url("bluish.css")/* comment 22 */projection/* comment 23 */,/* comment 24 */tv/* comment 25 */;
@import /* comment 26 */'custom.css'/* comment 27 */;/* comment 28 */
@import /* comment 29 */ url('landscape.css') /* comment 30 */ screen /* comment 31 */ and /* comment 32 */ (/* comment 33 */orientation/* comment 34 */:/* comment 35 */landscape/* comment 36 */)/* comment 37 */;
@namespace /* comment 38 */ url(http://www.w3.org/1999/xhtml) /* comment 39 */ ;
@namespace /* comment 40 */ svg /* comment 41 */ url(http://www.w3.org/2000/svg) /* comment 42 */;
@keyframes /* comment 43 */ slidein /* comment 44 */ {}
/* comment 45 */ @font-feature-values /* comment 46 */ Font Two /* comment 47 */ { /* comment 48 */
/* comment 49 */ @styleset /* comment 50 */ { /* comment 51 */
nice-style: 4;
/* comment 52 */ } /* comment 53 */
/* comment 54 */ } /* comment 55 */
/* comment 56 */ @counter-style /* comment 57 */ thumbs /* comment 58 */ {}
/* comment 59 */ @viewport /* comment 60 */ {}
@page /* comment 61 */ {}
@page /* comment 62 */ :first /* comment 63 */ {}
@page /* comment 64 */ vertical /* comment 65 */ {}
/* comment 66 */ @media /* comment 67 */ print /* comment 68 */ {}
@media /* comment 69 */ screen /* comment 70 */ , /* comment 71 */ print /* comment 72 */ {} /* comment 73 */
@media /* comment 74 */ only /* comment 75 */ screen /* comment 76 */ and /* comment 77 */ ( /* comment 78 */ min-width /* comment 79 */ : /* comment 80 */ 320px /* comment 81 */ ) /* comment 82 */ and /* comment 83 */ ( /* comment 84 */ max-width /* comment 85 */ : /* comment 86 */ 480px /* comment 87 */ ) /* comment 88 */ and /* comment 89 */ ( /* comment 90 */ resolution /* comment 91 */ : /* comment 92 */ 150dpi /* comment 93 */ ) /* comment 94 */ {}
@media/* comment 95 */only/* comment 96 */screen/* comment 97 */and/* comment 98 */(/* comment 99 */min-width/* comment 100 */:/* comment 101 */320px/* comment 102 */)/* comment 103 */and/* comment 104 */(/* comment 105 */max-width/* comment 106 */:/* comment 107 */480px/* comment 108 */)/* comment 109 */and/* comment 110 */(/* comment 111 */resolution/* comment 112 */:/* comment 113 */150dpi/* comment 114 */)/* comment 115 */{}
/* comment 116 */@media/* comment 117 */
/* comment 118 */only/* comment 119 */
/* comment 120 */screen/* comment 121 */
/* comment 122 */and/* comment 123 */
/* comment 124 */(/* comment 125 */
/* comment 126 */min-width/* comment 127 */
/* comment 128 */:/* comment 129 */
/* comment 130 */320px/* comment 131 */
/* comment 132 */)/* comment 133 */
/* comment 134 */and/* comment 135 */
/* comment 136 */(/* comment 137 */
/* comment 138 */max-width/* comment 139 */
/* comment 140 */:/* comment 141 */
/* comment 142 */480px/* comment 143 */
/* comment 144 */)/* comment 145 */
/* comment 146 */and/* comment 147 */
/* comment 148 */(/* comment 149 */
/* comment 150 */resolution/* comment 151 */
/* comment 152 */:/* comment 153 */
/* comment 154 */150dpi/* comment 155 */
/* comment 156 */)/* comment 157 */
/* comment 158 */{}/* comment 159 */
@supports /* comment 160 */ ( /* comment 161 */ display /* comment 162 */ : /* comment 163 */ flex /* comment 164 */ ) /* comment 165 */ {}
@supports /* comment 166 */ not /* comment 167 */ ( /* comment 168 */ display /* comment 169 */ : /* comment 170 */ flex /* comment 171 */ ) /* comment 172 */ {}
@supports /* comment 173 */ (/* comment 174 */ display /* comment 175 */ : /* comment 176 */ table-cell /* comment 177 */ ) /* comment 178 */ and /* comment 179 */ ( /* comment 180 */ display /* comment 181 */ : /* comment 182 */ list-item /* comment 183 */ ) /* comment 184 */ and /* comment 185 */ ( /* comment 186 */display /* comment 187 */ : /* comment 188 */ run-in /* comment 189 */ ) /* comment 190 */ {}
@supports /* comment 191 */ (/* comment 192 */ --foo /* comment 193 */ : /* comment 194 */ green /* comment 195 */ ) /* comment 196 */ {}
/* comment 197 */ @supports /* comment 198 */ ( /* comment 199 */ display /* comment 200 */ : /* comment 201 */ flex /* comment 202 */ ) /* comment 203 */ {
/* comment 204 */ @media /* comment 205 */ screen /* comment 206 */ and /* comment 207 */ ( /* comment 208 */ min-width /* comment 209 */ : /* comment 210 */ 900px /* comment 211 */ ) /* comment 212 */ {
/* comment 213 */ } /* comment 214 */
/* comment 215 */ } /* comment 216 */
| CSS | 3 | fuelingtheweb/prettier | tests/css_comments/at-rules.css | [
"MIT"
] |
#!/usr/bin/env bash
# Font Logos (Font Linux) (44 icons)
# Codepoints: Nerd Fonts moved F100-F12D with holes → F300-F32D
# Nerd Fonts Version: 2.1.0
# Script Version: 1.1.0
test -n "$__i_linux_loaded" && return || __i_linux_loaded=1
i='' i_linux_alpine=$i
i='' i_linux_aosc=$i
i='' i_linux_apple=$i
i='' i_linux_archlinux=$i
i='' i_linux_centos=$i
i='' i_linux_coreos=$i
i='' i_linux_debian=$i
i='' i_linux_devuan=$i
i='' i_linux_docker=$i
i='' i_linux_elementary=$i
i='' i_linux_fedora=$i
i='' i_linux_fedora_inverse=$i
i='' i_linux_freebsd=$i
i='' i_linux_gentoo=$i
i='' i_linux_linuxmint=$i
i='' i_linux_linuxmint_inverse=$i
i='' i_linux_mageia=$i
i='' i_linux_mandriva=$i
i='' i_linux_manjaro=$i
i='' i_linux_nixos=$i
i='' i_linux_opensuse=$i
i='' i_linux_raspberry_pi=$i
i='' i_linux_redhat=$i
i='' i_linux_sabayon=$i
i='' i_linux_slackware=$i
i='' i_linux_slackware_inverse=$i
i='' i_linux_tux=$i
i='' i_linux_ubuntu=$i
i='' i_linux_ubuntu_inverse=$i
i='' i_linux_flathub=$i
i='' i_linux_gnu_guix=$i
i='' i_linux_snappy=$i
i='' i_linux_void=$i
i='' i_linux_zorin=$i
i='' i_linux_budgie=$i
i='' i_linux_deepin=$i
i='' i_linux_illumos=$i
i='' i_linux_openbsd=$i
i='' i_linux_solus=$i
i='' i_linux_archlabs=$i
i='' i_linux_ferris=$i
i='' i_linux_pop_os=$i
i='' i_linux_artix=$i
i='' i_linux_kali_linux=$i
unset i
| Shell | 2 | th3cyb3rc0p/nerd-fonts | bin/scripts/lib/i_linux.sh | [
"MIT"
] |
valid([]).
valid([Head|Tail]) :-
fd_all_different(Head),
valid(Tail).
sudoku(Puzzle, Solution) :-
Solution = Puzzle,
Puzzle = [S11, S12, S13, S14, S15, S16, S17, S18, S19,
S21, S22, S23, S24, S25, S26, S27, S28, S29,
S31, S32, S33, S34, S35, S36, S37, S38, S39,
S41, S42, S43, S44, S45, S46, S47, S48, S49,
S51, S52, S53, S54, S55, S56, S57, S58, S59,
S61, S62, S63, S64, S65, S66, S67, S68, S69,
S71, S72, S73, S74, S75, S76, S77, S78, S79,
S81, S82, S83, S84, S85, S86, S87, S88, S89,
S91, S92, S93, S94, S95, S96, S97, S98, S99],
fd_domain(Solution, 1, 9),
Row1 = [S11, S12, S13, S14, S15, S16, S17, S18, S19],
Row2 = [S21, S22, S23, S24, S25, S26, S27, S28, S29],
Row3 = [S31, S32, S33, S34, S35, S36, S37, S38, S39],
Row4 = [S41, S42, S43, S44, S45, S46, S47, S48, S49],
Row5 = [S51, S52, S53, S54, S55, S56, S57, S58, S59],
Row6 = [S61, S62, S63, S64, S65, S66, S67, S68, S69],
Row7 = [S71, S72, S73, S74, S75, S76, S77, S78, S79],
Row8 = [S81, S82, S83, S84, S85, S86, S87, S88, S89],
Row9 = [S91, S92, S93, S94, S95, S96, S97, S98, S99],
Col1 = [S11, S21, S31, S41, S51, S61, S71, S81, S91],
Col2 = [S12, S22, S32, S42, S52, S62, S72, S82, S92],
Col3 = [S13, S23, S33, S43, S53, S63, S73, S83, S93],
Col4 = [S14, S24, S34, S44, S54, S64, S74, S84, S94],
Col5 = [S15, S25, S35, S45, S55, S65, S75, S85, S95],
Col6 = [S16, S26, S36, S46, S56, S66, S76, S86, S96],
Col7 = [S17, S27, S37, S47, S57, S67, S77, S87, S97],
Col8 = [S18, S28, S38, S48, S58, S68, S78, S88, S98],
Col9 = [S19, S29, S39, S49, S59, S69, S79, S89, S99],
Sq1 = [S11, S12, S13, S21, S22, S23, S31, S32, S33],
Sq2 = [S14, S15, S16, S24, S25, S26, S34, S35, S36],
Sq3 = [S17, S18, S19, S27, S28, S29, S37, S38, S39],
Sq4 = [S41, S42, S43, S51, S52, S53, S61, S62, S63],
Sq5 = [S44, S45, S46, S54, S55, S56, S64, S65, S66],
Sq6 = [S47, S48, S49, S57, S58, S59, S67, S68, S69],
Sq7 = [S71, S72, S73, S81, S82, S83, S91, S92, S93],
Sq8 = [S74, S75, S76, S84, S85, S86, S94, S95, S96],
Sq9 = [S77, S78, S79, S87, S88, S89, S97, S98, S99],
valid([Row1, Row2, Row3, Row4, Row5, Row6, Row7, Row8, Row9,
Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9,
Sq1, Sq2, Sq3, Sq4, Sq5, Sq6, Sq7, Sq8, Sq9]),
fd_labeling(Puzzle).
| Prolog | 4 | Mynogs/Algorithm-Implementations | Sudoku/Prolog/jcla1/sudoku.prolog | [
"MIT"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.