text stringlengths 2 1.04M | meta dict |
|---|---|
package com.apigee.sdk;
import android.content.Context;
import com.apigee.sdk.apm.android.MonitoringClient;
import com.apigee.sdk.apm.android.MonitoringOptions;
import com.apigee.sdk.data.client.DataClient;
public class ApigeeClient {
public static final String LOGGING_TAG = "APIGEE_CLIENT";
public static final String SDK_VERSION = "2.0.1-SNAPSHOT";
public static final String SDK_TYPE = "Android";
private DataClient dataClient;
private MonitoringClient monitoringClient;
private AppIdentification appIdentification;
/**
* Instantiate client for a specific app
*
* @param organizationId the organization id or name
* @param applicationId the application id or name
*/
public ApigeeClient(String organizationId, String applicationId, Context appActivity) {
appIdentification = new AppIdentification(organizationId,applicationId);
dataClient = new DataClient(organizationId,applicationId);
/*
monitoringClient = MA.initialize(appIdentification, dataClient, appActivity);
if( monitoringClient != null ) {
DataClient.setLogger(monitoringClient.getLogger());
} else {
Log.d(LOGGING_TAG,"MA.initialize returned null");
DataClient.setLogger(new DefaultAndroidLog());
}
*/
}
/**
* Instantiate client for a specific app
*
* @param organizationId the organization id or name
* @param applicationId the application id or name
*/
public ApigeeClient(String organizationId, String applicationId, MonitoringOptions monitoringOptions, Context appActivity) {
appIdentification = new AppIdentification(organizationId,applicationId);
dataClient = new DataClient(organizationId,applicationId);
/*
monitoringClient = MA.initialize(appIdentification, dataClient, appActivity, monitoringOptions);
if( monitoringClient != null ) {
DataClient.setLogger(monitoringClient.getLogger());
} else {
Log.d(LOGGING_TAG,"MA.initialize returned null");
DataClient.setLogger(new DefaultAndroidLog());
}
*/
}
public ApigeeClient(String organizationId, String applicationId, String baseURL, Context appActivity) {
appIdentification = new AppIdentification(organizationId,applicationId);
appIdentification.setBaseURL(baseURL);
dataClient = new DataClient(organizationId,applicationId);
dataClient.setApiUrl(baseURL);
/*
monitoringClient = MA.initialize(appIdentification, dataClient, appActivity);
if( monitoringClient != null ) {
DataClient.setLogger(monitoringClient.getLogger());
} else {
Log.d(LOGGING_TAG,"MA.initialize returned null");
DataClient.setLogger(new DefaultAndroidLog());
}
*/
}
public ApigeeClient(String organizationId, String applicationId, String baseURL, MonitoringOptions monitoringOptions, Context appActivity) {
appIdentification = new AppIdentification(organizationId,applicationId);
appIdentification.setBaseURL(baseURL);
dataClient = new DataClient(organizationId,applicationId);
dataClient.setApiUrl(baseURL);
/*
monitoringClient = MA.initialize(appIdentification, dataClient, appActivity, monitoringOptions);
if( monitoringClient != null ) {
DataClient.setLogger(monitoringClient.getLogger());
} else {
Log.d(LOGGING_TAG,"MA.initialize returned null");
DataClient.setLogger(new DefaultAndroidLog());
}
*/
}
public DataClient getDataClient() {
return dataClient;
}
public MonitoringClient getMonitoringClient() {
return monitoringClient;
}
public AppIdentification getAppIdentification() {
return appIdentification;
}
}
| {
"content_hash": "824302242cf9f4f195c7b58830fb90bb",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 144,
"avg_line_length": 36.5,
"alnum_prop": 0.6944947014732489,
"repo_name": "math4youbyusgroupillinois/apigee-android-sdk",
"id": "a847cf02820e809b13f6af4cf12a66f203c4f090",
"size": "3869",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "source/src/main/java/com/apigee/sdk/ApigeeClient.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "396869"
},
{
"name": "Shell",
"bytes": "3390"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js - skinning - simple</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link type="text/css" rel="stylesheet" href="main.css">
</head>
<body>
<div id="info">
<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> webgl - simple skinning -
<a href="https://github.com/mrdoob/three.js/blob/master/examples/models/skinned/simple/simple.blend" target="_blank" rel="noopener">Blender File</a>
</div>
<script type="module">
import * as THREE from '../build/three.module.js';
import Stats from './jsm/libs/stats.module.js';
import { OrbitControls } from './jsm/controls/OrbitControls.js';
import { GLTFLoader } from './jsm/loaders/GLTFLoader.js';
var stats, mixer, camera, scene, renderer, clock;
init();
animate();
function init() {
var container = document.createElement( 'div' );
document.body.appendChild( container );
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.set( 18, 6, 18 );
scene = new THREE.Scene();
scene.background = new THREE.Color( 0xa0a0a0 );
scene.fog = new THREE.Fog( 0xa0a0a0, 70, 100 );
clock = new THREE.Clock();
// ground
var geometry = new THREE.PlaneBufferGeometry( 500, 500 );
var material = new THREE.MeshPhongMaterial( { color: 0x999999, depthWrite: false } );
var ground = new THREE.Mesh( geometry, material );
ground.position.set( 0, - 5, 0 );
ground.rotation.x = - Math.PI / 2;
ground.receiveShadow = true;
scene.add( ground );
var grid = new THREE.GridHelper( 500, 100, 0x000000, 0x000000 );
grid.position.y = - 5;
grid.material.opacity = 0.2;
grid.material.transparent = true;
scene.add( grid );
// lights
var light = new THREE.HemisphereLight( 0xffffff, 0x444444, 0.6 );
light.position.set( 0, 200, 0 );
scene.add( light );
light = new THREE.DirectionalLight( 0xffffff, 0.8 );
light.position.set( 0, 20, 10 );
light.castShadow = true;
light.shadow.camera.top = 18;
light.shadow.camera.bottom = - 10;
light.shadow.camera.left = - 12;
light.shadow.camera.right = 12;
scene.add( light );
//
var loader = new GLTFLoader();
loader.load( './models/gltf/SimpleSkinning.gltf', function ( gltf ) {
scene.add( gltf.scene );
gltf.scene.traverse( function ( child ) {
if ( child.isSkinnedMesh ) child.castShadow = true;
} );
mixer = new THREE.AnimationMixer( gltf.scene );
mixer.clipAction( gltf.animations[ 0 ] ).play();
} );
//
renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.shadowMap.enabled = true;
container.appendChild( renderer.domElement );
//
stats = new Stats();
container.appendChild( stats.dom );
var controls = new OrbitControls( camera, renderer.domElement );
controls.enablePan = false;
controls.minDistance = 5;
controls.maxDistance = 50;
}
function animate() {
requestAnimationFrame( animate );
if ( mixer ) mixer.update( clock.getDelta() );
render();
stats.update();
}
function render() {
renderer.render( scene, camera );
}
</script>
</body>
</html>
| {
"content_hash": "63581f0583605ee5a9b5c5dd1cb6c734",
"timestamp": "",
"source": "github",
"line_count": 133,
"max_line_length": 151,
"avg_line_length": 26.165413533834588,
"alnum_prop": 0.6422413793103449,
"repo_name": "fraguada/three.js",
"id": "5dd9e09e3ea85983a763830292454d633455d10d",
"size": "3480",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev",
"path": "examples/webgl_skinning_simple.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "1083"
},
{
"name": "Batchfile",
"bytes": "1131"
},
{
"name": "C",
"bytes": "80088"
},
{
"name": "C++",
"bytes": "116715"
},
{
"name": "CSS",
"bytes": "19925"
},
{
"name": "GLSL",
"bytes": "35243"
},
{
"name": "Groff",
"bytes": "75084"
},
{
"name": "HTML",
"bytes": "1710757"
},
{
"name": "JavaScript",
"bytes": "3960058"
},
{
"name": "Python",
"bytes": "447170"
},
{
"name": "Shell",
"bytes": "9967"
}
],
"symlink_target": ""
} |
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
| {
"content_hash": "65ca0ef8199f13344a8daf0d658f07ca",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 73,
"avg_line_length": 17.157894736842106,
"alnum_prop": 0.7300613496932515,
"repo_name": "sergtk/handy-timers",
"id": "932ec8c4b0de308ffcd961697a3dcc7acd5a8ca5",
"size": "487",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "HandyTimers/ViewController.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "25710"
}
],
"symlink_target": ""
} |
class AddPagesToMetatags < ActiveRecord::Migration
def up
add_column :pages, :metatag_id, :integer
add_index :pages, :metatag_id
end
def down
remove_index :pages, :metatag_id
remove_column :pages, :metatag_id
end
end
| {
"content_hash": "f956ba3478a2494a189e6ceb28e2ac19",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 50,
"avg_line_length": 22.09090909090909,
"alnum_prop": 0.691358024691358,
"repo_name": "jatap/acts_as_metatags",
"id": "04602ac6804adc8f4533a315fb48f6efe6ed783c",
"size": "243",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/dummy/db/migrate/20130907045404_add_pages_to_metatags.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1092"
},
{
"name": "JavaScript",
"bytes": "1282"
},
{
"name": "Ruby",
"bytes": "56518"
}
],
"symlink_target": ""
} |
package me.lucko.luckperms.standalone.view.popup;
import java.util.Arrays;
import com.jfoenix.controls.JFXTextField;
import me.lucko.luckperms.groups.Group;
import me.lucko.luckperms.standalone.util.form.FormBase;
import me.lucko.luckperms.standalone.util.form.FormItem;
import me.lucko.luckperms.standalone.util.form.FormResultType;
import me.lucko.luckperms.standalone.view.scene.Manager;
public class GroupDelete extends FormBase {
public GroupDelete(Manager view, Group group) {
super(view, "DELETE GROUP " + group.getName(),
Arrays.asList(new FormItem("Confirm with: '" + group.getName() + "'", new JFXTextField())),
Arrays.asList(FormResultType.OK, FormResultType.CANCEL));
}
}
| {
"content_hash": "ed6fd5c4b8b842fbdb1fddc4e0bd7f1f",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 95,
"avg_line_length": 35.05,
"alnum_prop": 0.7774607703281027,
"repo_name": "MakerTim/LuckPermsUI",
"id": "bf4c2aaa5807f40a8f016e776630375010c376ef",
"size": "701",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/me/lucko/luckperms/standalone/view/popup/GroupDelete.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2881"
},
{
"name": "Java",
"bytes": "73102"
}
],
"symlink_target": ""
} |
<!--
http://www.apache.org/licenses/LICENSE-2.0.txt
Copyright 2017 Intel Corporation
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.
-->
# Snap Ceph Perf Counters Collector Plugin
## Metric list for Ceph 11.0.2
### OSD daemon
**Metric list was generated dynamically by plugin and can be different on another setup.**
Prefix: `/intel/storage/ceph/osd/[osd_id]`
NAMESPACE | UNIT | DESCRIPTION
----------|------|-------------
AsyncMessenger::Worker-0/msgr_active_connections | uint64 | Active connection number
AsyncMessenger::Worker-0/msgr_created_connections | uint64 | Created connection number
AsyncMessenger::Worker-0/msgr_recv_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-0/msgr_recv_messages | uint64 | Network received messages
AsyncMessenger::Worker-0/msgr_send_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-0/msgr_send_messages | uint64 | Network sent messages
AsyncMessenger::Worker-0/msgr_send_messages_inline | uint64 | Network sent inline messages
AsyncMessenger::Worker-1/msgr_active_connections | uint64 | Active connection number
AsyncMessenger::Worker-1/msgr_created_connections | uint64 | Created connection number
AsyncMessenger::Worker-1/msgr_recv_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-1/msgr_recv_messages | uint64 | Network received messages
AsyncMessenger::Worker-1/msgr_send_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-1/msgr_send_messages | uint64 | Network sent messages
AsyncMessenger::Worker-1/msgr_send_messages_inline | uint64 | Network sent inline messages
AsyncMessenger::Worker-2/msgr_active_connections | uint64 | Active connection number
AsyncMessenger::Worker-2/msgr_created_connections | uint64 | Created connection number
AsyncMessenger::Worker-2/msgr_recv_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-2/msgr_recv_messages | uint64 | Network received messages
AsyncMessenger::Worker-2/msgr_send_bytes | uint64 | Network received bytes
AsyncMessenger::Worker-2/msgr_send_messages | uint64 | Network sent messages
AsyncMessenger::Worker-2/msgr_send_messages_inline | uint64 | Network sent inline messages
WBThrottle/bytes_dirtied | uint64 | Dirty data
WBThrottle/bytes_wb | uint64 | Written data
WBThrottle/inodes_dirtied | uint64 | Entries waiting for write
WBThrottle/inodes_wb | uint64 | Written entries
WBThrottle/ios_dirtied | uint64 | Dirty operations
WBThrottle/ios_wb | uint64 | Written operations
filestore/apply_latency | float | Apply latency
filestore/bytes | uint64 | Data written to store
filestore/commitcycle | uint64 | Commit cycles
filestore/commitcycle_interval | float | Average interval between commits
filestore/commitcycle_latency | float | Average latency of commit
filestore/committing | uint64 | Is currently committing
filestore/journal_bytes | uint64 | Active journal operation size to be applied
filestore/journal_full | uint64 | Journal writes while full
filestore/journal_latency | float | Average journal queue completing latency
filestore/journal_ops | uint64 | Active journal entries to be applied
filestore/journal_queue_bytes | uint64 | Size of journal queue
filestore/journal_queue_ops | uint64 | Operations in journal queue
filestore/journal_wr | uint64 | Journal write IOs
filestore/journal_wr_bytes | uint64 | Journal data written
filestore/op_queue_bytes | uint64 | Size of writing to FS queue
filestore/op_queue_max_bytes | uint64 | Max data in writing to FS queue
filestore/op_queue_max_ops | uint64 | Max operations in writing to FS queue
filestore/op_queue_ops | uint64 | Operations in writing to FS queue
filestore/ops | uint64 | Operations written to store
filestore/queue_transaction_latency_avg | float | Store operation queue latency
finisher-JournalObjectStore/complete_latency | float |
finisher-JournalObjectStore/queue_len | uint64 |
finisher-filestore-apply-0/complete_latency | float |
finisher-filestore-apply-0/queue_len | uint64 |
finisher-filestore-ondisk-0/complete_latency | float |
finisher-filestore-ondisk-0/queue_len | uint64 |
leveldb/leveldb_compact | uint64 | Compactions
leveldb/leveldb_compact_queue_len | uint64 | Length of compaction queue
leveldb/leveldb_compact_queue_merge | uint64 | Mergings of ranges in compaction queue
leveldb/leveldb_compact_range | uint64 | Compactions by range
leveldb/leveldb_get | uint64 | Gets
leveldb/leveldb_get_latency | float | Get Latency
leveldb/leveldb_submit_latency | float | Submit Latency
leveldb/leveldb_submit_sync_latency | float | Submit Sync Latency
leveldb/leveldb_transaction | uint64 | Transactions
mutex-FileJournal::completions_lock/wait | float | Average time of mutex in locked state
mutex-FileJournal::finisher_lock/wait | float | Average time of mutex in locked state
mutex-FileJournal::write_lock/wait | float | Average time of mutex in locked state
mutex-FileJournal::writeq_lock/wait | float | Average time of mutex in locked state
mutex-JOS::ApplyManager::apply_lock/wait | float | Average time of mutex in locked state
mutex-JOS::ApplyManager::com_lock/wait | float | Average time of mutex in locked state
mutex-JOS::SubmitManager::lock/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:.0/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:.1/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:.2/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:.3/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:.4/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:order:.0/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:order:.1/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:order:.2/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:order:.3/wait | float | Average time of mutex in locked state
mutex-OSD:ShardedOpWQ:order:.4/wait | float | Average time of mutex in locked state
mutex-WBThrottle::lock/wait | float | Average time of mutex in locked state
objecter/command_active | uint64 | Active commands
objecter/command_resend | uint64 | Resent commands
objecter/command_send | uint64 | Sent commands
objecter/linger_active | uint64 | Active lingering operations
objecter/linger_ping | uint64 | Sent pings to lingering operations
objecter/linger_resend | uint64 | Resent lingering operations
objecter/linger_send | uint64 | Sent lingering operations
objecter/map_epoch | uint64 | OSD map epoch
objecter/map_full | uint64 | Full OSD maps received
objecter/map_inc | uint64 | Incremental OSD maps received
objecter/omap_del | uint64 | OSD OMAP delete operations
objecter/omap_rd | uint64 | OSD OMAP read operations
objecter/omap_wr | uint64 | OSD OMAP write operations
objecter/op | uint64 | Operations
objecter/op_ack | uint64 | Commit callbacks
objecter/op_active | uint64 | Operations active
objecter/op_commit | uint64 | Operation commits
objecter/op_laggy | uint64 | Laggy operations
objecter/op_pg | uint64 | PG operation
objecter/op_r | uint64 | Read operations
objecter/op_resend | uint64 | Resent operations
objecter/op_rmw | uint64 | Read-modify-write operations
objecter/op_send | uint64 | Sent operations
objecter/op_send_bytes | uint64 | Sent data
objecter/op_w | uint64 | Write operations
objecter/osd_laggy | uint64 | Laggy OSD sessions
objecter/osd_session_close | uint64 | Sessions closed
objecter/osd_session_open | uint64 | Sessions opened
objecter/osd_sessions | uint64 | Open sessions
objecter/osdop_append | uint64 | Append operation
objecter/osdop_call | uint64 | Call (execute) operations
objecter/osdop_clonerange | uint64 | Clone range operations
objecter/osdop_cmpxattr | uint64 | Xattr comparison operations
objecter/osdop_create | uint64 | Create object operations
objecter/osdop_delete | uint64 | Delete object operations
objecter/osdop_getxattr | uint64 | Get xattr operations
objecter/osdop_mapext | uint64 | Map extent operations
objecter/osdop_notify | uint64 | Notify about object operations
objecter/osdop_other | uint64 | Other operations
objecter/osdop_pgls | uint64 |
objecter/osdop_pgls_filter | uint64 |
objecter/osdop_read | uint64 | Read operations
objecter/osdop_resetxattrs | uint64 | Reset xattr operations
objecter/osdop_rmxattr | uint64 | Remove xattr operations
objecter/osdop_setxattr | uint64 | Set xattr operations
objecter/osdop_sparse_read | uint64 | Sparse read operations
objecter/osdop_src_cmpxattr | uint64 | Extended attribute comparison in multi operations
objecter/osdop_stat | uint64 | Stat operations
objecter/osdop_tmap_get | uint64 | TMAP get operations
objecter/osdop_tmap_put | uint64 | TMAP put operations
objecter/osdop_tmap_up | uint64 | TMAP update operations
objecter/osdop_truncate | uint64 | Truncate object operations
objecter/osdop_watch | uint64 | Watch by object operations
objecter/osdop_write | uint64 | Write operations
objecter/osdop_writefull | uint64 | Write full object operations
objecter/osdop_writesame | uint64 | Write same operations
objecter/osdop_zero | uint64 | Set object to zero operations
objecter/poolop_active | uint64 | Active pool operations
objecter/poolop_resend | uint64 | Resent pool operations
objecter/poolop_send | uint64 | Sent pool operations
objecter/poolstat_active | uint64 | Active get pool stat operations
objecter/poolstat_resend | uint64 | Resent pool stats
objecter/poolstat_send | uint64 | Pool stat operations sent
objecter/statfs_active | uint64 | Statfs operations
objecter/statfs_resend | uint64 | Resent FS stats
objecter/statfs_send | uint64 | Sent FS stats
osd/agent_evict | uint64 | Tiering agent evictions
osd/agent_flush | uint64 | Tiering agent flushes
osd/agent_skip | uint64 | Objects skipped by agent
osd/agent_wake | uint64 | Tiering agent wake up
osd/buffer_bytes | uint64 | Total allocated buffer size
osd/cached_crc | uint64 | Total number getting crc from crc_cache
osd/cached_crc_adjusted | uint64 | Total number getting crc from crc_cache with adjusting
osd/copyfrom | uint64 | Rados "copy-from" operations
osd/heartbeat_to_peers | uint64 | Heartbeat (ping) peers we send to
osd/history_alloc_Mbytes | uint64 |
osd/history_alloc_num | uint64 |
osd/loadavg | uint64 | CPU load
osd/map_message_epoch_dups | uint64 | OSD map duplicates
osd/map_message_epochs | uint64 | OSD map epochs
osd/map_messages | uint64 | OSD map messages
osd/messages_delayed_for_map | uint64 | Operations waiting for OSD map
osd/numpg | uint64 | Placement groups
osd/numpg_primary | uint64 | Placement groups for which this osd is primary
osd/numpg_replica | uint64 | Placement groups for which this osd is replica
osd/numpg_stray | uint64 | Placement groups ready to be deleted from this osd
osd/object_ctx_cache_hit | uint64 | Object context cache hits
osd/object_ctx_cache_total | uint64 | Object context cache lookups
osd/op | uint64 | Client operations
osd/op_cache_hit | uint64 |
osd/op_in_bytes | uint64 | Client operations total write size
osd/op_latency | float | Latency of client operations (including queue time)
osd/op_out_bytes | uint64 | Client operations total read size
osd/op_prepare_latency | float | Latency of client operations (excluding queue time and wait for finished)
osd/op_process_latency | float | Latency of client operations (excluding queue time)
osd/op_r | uint64 | Client read operations
osd/op_r_latency | float | Latency of read operation (including queue time)
osd/op_r_out_bytes | uint64 | Client data read
osd/op_r_prepare_latency | float | Latency of read operations (excluding queue time and wait for finished)
osd/op_r_process_latency | float | Latency of read operation (excluding queue time)
osd/op_rw | uint64 | Client read-modify-write operations
osd/op_rw_in_bytes | uint64 | Client read-modify-write operations write in
osd/op_rw_latency | float | Latency of read-modify-write operation (including queue time)
osd/op_rw_out_bytes | uint64 | Client read-modify-write operations read out
osd/op_rw_prepare_latency | float | Latency of read-modify-write operations (excluding queue time and wait for finished)
osd/op_rw_process_latency | float | Latency of read-modify-write operation (excluding queue time)
osd/op_rw_rlat | float | Client read-modify-write operation readable/applied latency
osd/op_w | uint64 | Client write operations
osd/op_w_in_bytes | uint64 | Client data written
osd/op_w_latency | float | Latency of write operation (including queue time)
osd/op_w_prepare_latency | float | Latency of write operations (excluding queue time and wait for finished)
osd/op_w_process_latency | float | Latency of write operation (excluding queue time)
osd/op_w_rlat | float | Client write operation readable/applied latency
osd/op_wip | uint64 | Replication operations currently being processed (primary)
osd/osd_map_cache_hit | uint64 | osdmap cache hit
osd/osd_map_cache_miss | uint64 | osdmap cache miss
osd/osd_map_cache_miss_low | uint64 | osdmap cache miss below cache lower bound
osd/osd_map_cache_miss_low_avg | uint64 | osdmap cache miss, avg distance below cache lower bound
osd/osd_pg_biginfo | uint64 | PG updated its biginfo attr
osd/osd_pg_fastinfo | uint64 | PG updated its info using fastinfo attr
osd/osd_pg_info | uint64 | PG updated its info (using any method)
osd/osd_tier_flush_lat | float | Object flush latency
osd/osd_tier_promote_lat | float | Object promote latency
osd/osd_tier_r_lat | float | Object proxy read latency
osd/pull | uint64 | Pull requests sent
osd/push | uint64 | Push messages sent
osd/push_out_bytes | uint64 | Pushed size
osd/recovery_ops | uint64 | Started recovery operations
osd/stat_bytes | uint64 | OSD size
osd/stat_bytes_avail | uint64 | Available space
osd/stat_bytes_used | uint64 | Used space
osd/subop | uint64 | Suboperations
osd/subop_in_bytes | uint64 | Suboperations total size
osd/subop_latency | float | Suboperations latency
osd/subop_pull | uint64 | Suboperations pull requests
osd/subop_pull_latency | float | Suboperations pull latency
osd/subop_push | uint64 | Suboperations push messages
osd/subop_push_in_bytes | uint64 | Suboperations pushed size
osd/subop_push_latency | float | Suboperations push latency
osd/subop_w | uint64 | Replicated writes
osd/subop_w_in_bytes | uint64 | Replicated written data size
osd/subop_w_latency | float | Replicated writes latency
osd/tier_clean | uint64 | Dirty tier flag cleaned
osd/tier_delay | uint64 | Tier delays (agent waiting)
osd/tier_dirty | uint64 | Dirty tier flag set
osd/tier_evict | uint64 | Tier evictions
osd/tier_flush | uint64 | Tier flushes
osd/tier_flush_fail | uint64 | Failed tier flushes
osd/tier_promote | uint64 | Tier promotions
osd/tier_proxy_read | uint64 | Tier proxy reads
osd/tier_proxy_write | uint64 | Tier proxy writes
osd/tier_try_flush | uint64 | Tier flush attempts
osd/tier_try_flush_fail | uint64 | Failed tier flush attempts
osd/tier_whiteout | uint64 | Tier whiteouts
recoverystate_perf/activating_latency | float | Activating recovery state latency
recoverystate_perf/active_latency | float | Active recovery state latency
recoverystate_perf/backfilling_latency | float | Backfilling recovery state latency
recoverystate_perf/clean_latency | float | Clean recovery state latency
recoverystate_perf/getinfo_latency | float | Getinfo recovery state latency
recoverystate_perf/getlog_latency | float | Getlog recovery state latency
recoverystate_perf/getmissing_latency | float | Getmissing recovery state latency
recoverystate_perf/incomplete_latency | float | Incomplete recovery state latency
recoverystate_perf/initial_latency | float | Initial recovery state latency
recoverystate_perf/notbackfilling_latency | float | Notbackfilling recovery state latency
recoverystate_perf/peering_latency | float | Peering recovery state latency
recoverystate_perf/primary_latency | float | Primary recovery state latency
recoverystate_perf/recovered_latency | float | Recovered recovery state latency
recoverystate_perf/recovering_latency | float | Recovering recovery state latency
recoverystate_perf/replicaactive_latency | float | Replicaactive recovery state latency
recoverystate_perf/repnotrecovering_latency | float | Repnotrecovering recovery state latency
recoverystate_perf/reprecovering_latency | float | RepRecovering recovery state latency
recoverystate_perf/repwaitbackfillreserved_latency | float | Rep wait backfill reserved recovery state latency
recoverystate_perf/repwaitrecoveryreserved_latency | float | Rep wait recovery reserved recovery state latency
recoverystate_perf/reset_latency | float | Reset recovery state latency
recoverystate_perf/start_latency | float | Start recovery state latency
recoverystate_perf/started_latency | float | Started recovery state latency
recoverystate_perf/stray_latency | float | Stray recovery state latency
recoverystate_perf/waitactingchange_latency | float | Waitactingchange recovery state latency
recoverystate_perf/waitlocalbackfillreserved_latency | float | Wait local backfill reserved recovery state latency
recoverystate_perf/waitlocalrecoveryreserved_latency | float | Wait local recovery reserved recovery state latency
recoverystate_perf/waitremotebackfillreserved_latency | float | Wait remote backfill reserved recovery state latency
recoverystate_perf/waitremoterecoveryreserved_latency | float | Wait remote recovery reserved recovery state latency
recoverystate_perf/waitupthru_latency | float | Waitupthru recovery state latency
throttle-msgr_dispatch_throttler-client/get | uint64 | Gets
throttle-msgr_dispatch_throttler-client/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-client/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-client/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-client/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-client/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-client/put | uint64 | Puts
throttle-msgr_dispatch_throttler-client/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-client/take | uint64 | Takes
throttle-msgr_dispatch_throttler-client/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-client/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-client/wait | float | Waiting latency
throttle-msgr_dispatch_throttler-cluster/get | uint64 | Gets
throttle-msgr_dispatch_throttler-cluster/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-cluster/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-cluster/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-cluster/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-cluster/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-cluster/put | uint64 | Puts
throttle-msgr_dispatch_throttler-cluster/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-cluster/take | uint64 | Takes
throttle-msgr_dispatch_throttler-cluster/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-cluster/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-cluster/wait | float | Waiting latency
throttle-msgr_dispatch_throttler-hb_back_server/get | uint64 | Gets
throttle-msgr_dispatch_throttler-hb_back_server/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-hb_back_server/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-hb_back_server/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-hb_back_server/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-hb_back_server/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-hb_back_server/put | uint64 | Puts
throttle-msgr_dispatch_throttler-hb_back_server/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-hb_back_server/take | uint64 | Takes
throttle-msgr_dispatch_throttler-hb_back_server/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-hb_back_server/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-hb_back_server/wait | float | Waiting latency
throttle-msgr_dispatch_throttler-hb_front_server/get | uint64 | Gets
throttle-msgr_dispatch_throttler-hb_front_server/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-hb_front_server/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-hb_front_server/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-hb_front_server/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-hb_front_server/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-hb_front_server/put | uint64 | Puts
throttle-msgr_dispatch_throttler-hb_front_server/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-hb_front_server/take | uint64 | Takes
throttle-msgr_dispatch_throttler-hb_front_server/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-hb_front_server/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-hb_front_server/wait | float | Waiting latency
throttle-msgr_dispatch_throttler-hbclient/get | uint64 | Gets
throttle-msgr_dispatch_throttler-hbclient/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-hbclient/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-hbclient/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-hbclient/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-hbclient/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-hbclient/put | uint64 | Puts
throttle-msgr_dispatch_throttler-hbclient/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-hbclient/take | uint64 | Takes
throttle-msgr_dispatch_throttler-hbclient/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-hbclient/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-hbclient/wait | float | Waiting latency
throttle-msgr_dispatch_throttler-ms_objecter/get | uint64 | Gets
throttle-msgr_dispatch_throttler-ms_objecter/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-msgr_dispatch_throttler-ms_objecter/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-msgr_dispatch_throttler-ms_objecter/get_started | uint64 | Number of get calls, increased before wait
throttle-msgr_dispatch_throttler-ms_objecter/get_sum | uint64 | Got data
throttle-msgr_dispatch_throttler-ms_objecter/max | uint64 | Max value for throttle
throttle-msgr_dispatch_throttler-ms_objecter/put | uint64 | Puts
throttle-msgr_dispatch_throttler-ms_objecter/put_sum | uint64 | Put data
throttle-msgr_dispatch_throttler-ms_objecter/take | uint64 | Takes
throttle-msgr_dispatch_throttler-ms_objecter/take_sum | uint64 | Taken data
throttle-msgr_dispatch_throttler-ms_objecter/val | uint64 | Currently available throttle
throttle-msgr_dispatch_throttler-ms_objecter/wait | float | Waiting latency
throttle-objecter_bytes/get | uint64 | Gets
throttle-objecter_bytes/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-objecter_bytes/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-objecter_bytes/get_started | uint64 | Number of get calls, increased before wait
throttle-objecter_bytes/get_sum | uint64 | Got data
throttle-objecter_bytes/max | uint64 | Max value for throttle
throttle-objecter_bytes/put | uint64 | Puts
throttle-objecter_bytes/put_sum | uint64 | Put data
throttle-objecter_bytes/take | uint64 | Takes
throttle-objecter_bytes/take_sum | uint64 | Taken data
throttle-objecter_bytes/val | uint64 | Currently available throttle
throttle-objecter_bytes/wait | float | Waiting latency
throttle-objecter_ops/get | uint64 | Gets
throttle-objecter_ops/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-objecter_ops/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-objecter_ops/get_started | uint64 | Number of get calls, increased before wait
throttle-objecter_ops/get_sum | uint64 | Got data
throttle-objecter_ops/max | uint64 | Max value for throttle
throttle-objecter_ops/put | uint64 | Puts
throttle-objecter_ops/put_sum | uint64 | Put data
throttle-objecter_ops/take | uint64 | Takes
throttle-objecter_ops/take_sum | uint64 | Taken data
throttle-objecter_ops/val | uint64 | Currently available throttle
throttle-objecter_ops/wait | float | Waiting latency
throttle-osd_client_bytes/get | uint64 | Gets
throttle-osd_client_bytes/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-osd_client_bytes/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-osd_client_bytes/get_started | uint64 | Number of get calls, increased before wait
throttle-osd_client_bytes/get_sum | uint64 | Got data
throttle-osd_client_bytes/max | uint64 | Max value for throttle
throttle-osd_client_bytes/put | uint64 | Puts
throttle-osd_client_bytes/put_sum | uint64 | Put data
throttle-osd_client_bytes/take | uint64 | Takes
throttle-osd_client_bytes/take_sum | uint64 | Taken data
throttle-osd_client_bytes/val | uint64 | Currently available throttle
throttle-osd_client_bytes/wait | float | Waiting latency
throttle-osd_client_messages/get | uint64 | Gets
throttle-osd_client_messages/get_or_fail_fail | uint64 | Get blocked during get_or_fail
throttle-osd_client_messages/get_or_fail_success | uint64 | Successful get during get_or_fail
throttle-osd_client_messages/get_started | uint64 | Number of get calls, increased before wait
throttle-osd_client_messages/get_sum | uint64 | Got data
throttle-osd_client_messages/max | uint64 | Max value for throttle
throttle-osd_client_messages/put | uint64 | Puts
throttle-osd_client_messages/put_sum | uint64 | Put data
throttle-osd_client_messages/take | uint64 | Takes
throttle-osd_client_messages/take_sum | uint64 | Taken data
throttle-osd_client_messages/val | uint64 | Currently available throttle
throttle-osd_client_messages/wait | float | Waiting latency
| {
"content_hash": "27ef37510837acb643f45673b707ff00",
"timestamp": "",
"source": "github",
"line_count": 410,
"max_line_length": 120,
"avg_line_length": 65.3609756097561,
"alnum_prop": 0.794686170609747,
"repo_name": "intelsdi-x/snap-plugin-collector-ceph",
"id": "54eefb5e6492967288238361ed7dfac6ce073b9f",
"size": "26798",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "OSD_PERFCNT.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "42416"
},
{
"name": "Makefile",
"bytes": "1102"
},
{
"name": "Python",
"bytes": "464"
},
{
"name": "Ruby",
"bytes": "9167"
},
{
"name": "Shell",
"bytes": "13149"
}
],
"symlink_target": ""
} |
% LaTeX class specification. Any changes will not appear in the final version
\documentclass[12pt,letterpaper, reqno]{amsart}
% Only the following packages are available.
% If these are not sufficient, then you must submit a special request
% for a new package to be includade. (We apologize for any inconvenience,
% but we cannot maintain these documents indefinitely without such restrictions).
\usepackage{amssymb,latexsym, amsmath, amsxtra, xy}
\usepackage[dvips]{graphics}
% The aimpl style file is necessary in order for the latex version
% to faithfully mimic the appearance of the problem list after it is
% uploaded. The file aimpl.sty should be in same directory as this file.
\usepackage{aimpl_2}
% The problem list should be arranged like a research paper, with
% introductory material followed be one or more main sections.
% Do not divide the sections into subsections.
% Each section could have its own introductory material.
% The main part of each section is a "problem block" which has the format
% [[see elsewhere for more documentation]]
% New macros.
% If at all possible, please do not define any new macros. Each
% macro you introduce has the potential to cause problems with the
% long-term maintenance of the problem list.
\newcommand{\Cat}{{\rm Cat}}
\newcommand{\A}{\mathcal A}
\newcommand{\freestar}{ \framebox[7pt]{$\star$} }
\begin{document}
\title{Braid Groups, Clusters, and Free Probability}
\author{Drew Armstrong}
\maketitle
This document grew out of the workshop {\em Braid Groups, Clusters,
and Free Probability}, which was held at the American Institute of
Mathematics in Palo Alto, on January 10--14, 2005. The organizers of
the workshop were Jon McCammond, Alexandru Nica, and Vic Reiner.
What follows is a joint statment of the participants regarding important
open problems and promising directions for future progress in the
subject. For further information, including a list of participants and
participant abstracts, see the AIM webpage \texttt{www.aimath.org}. Jon
McCammond also maintains a webpage with resources related to these
topics \cite{mccammond:webpage}.
The goal of this workshop was to bring together mathematicians from
different backgrounds to discuss a central theme which has recently
emerged in many different contexts. Given a finite Coxeter group $W$,
define the corresponding {\sf Catalan number}
\begin{equation*}
\Cat(W):=\prod_{i=1}^n \frac{h+e_i+1}{e_i+1},
\end{equation*}
where $h$ is the Coxeter number, and $e_1,e_2,\ldots,e_n$ are the
exponents of the group $W$ (for notation related to Coxeter groups
and reflection groups, we refer to \cite{humphries}). When $W$ is
the symmetric group $A_{n-1}$, this is just the usual Catalan number
$\Cat(A_{n-1})=\frac{1}{n+1}\binom{2n}{n}$. As with the classical Catalan
numbers, these type $W$ Catalan numbers have a wealth of combinatorics
associated with them, and they have recently appeared independently in
several different fields, including Garside structures for braid groups,
cluster algebras, and free probability.
This {\em Catalan combinatorics} describes extensive and surprising
enumerative correspondences between these subjects, which in most cases
are still unexplained (the term ``numerology'' is often used). A common
goal of the workshop participants is to understand these concurrences,
and search for underlying theories which can explain the combinatorics.
This is an exciting, emerging subject with many fundamental questions
yet to be solved. We present here a collection of important and
interesting questions offered by the participants. Many problems have
attributions. These are to the person who brought the problem to my
attention, and are used for the purpose of facilitating communication. No
attempt has been made to track down the original source. A more detailed
history can likely be found by contacting the contributor of the problem.
%I would like to thank the organizers and participants of the workshop for their helpful comments in preparing this outline.
\section{Central Questions}
\label{sec:central}
There are three main families of combinatorial structures counted by
the Catalan combinatorics, which arise independently in three different
subjects.
\begin{enumerate}
\item Let $W$ be a finite Coxeter group, and let $T$ be the generating
set of {\em all} reflections ($T$ is defined as the set of conjugates of
a standard Coxeter generating set $S$). Let $\ell$ denote the word length
on $W$ with respect to $T$. This function induces a partial order on $W$
by setting $a\leq b$ whenever $\ell(b)=\ell(a)+\ell(a^{-1}b)$. The Hasse
diagram of this poset is just the Cayley graph of $(W,T)$, directed away
from the identity element $1$.
Let $c$ be a Coxeter element of $W$. The interval $[1,c]$ in
this poset is called the poset of {\sf noncrossing partitions}
$NC_W$. (This is well-defined, since Coxeter elements form a conjugacy
class.) $NC_W$ in its full generality was defined independently
by David Bessis \cite{bessis:dual} and Tom Brady and Colum Watt
\cite{brady,brady-watt:kpi1} in order to study the geometric group theory
of braid groups. However, important special cases of the generalization
had been considered earlier by Vic Reiner \cite{reiner} and Philippe Biane
\cite{biane}. In the type $A$ case, Roland Speicher showed that this poset
lies at the heart of the subject of free probability in operator algebras
\cite{speicher:survey}. The study of the type $A$ case is classical and
goes back to Kreweras \cite{kreweras}. The survey paper \cite{simion}
by Rodica Simion gives a comprehensive view of the classical noncrossing
partitions, and the survey \cite{mccammond:noncrossing} by Jon McCammond
gives a more modern overview of the subject.
\item For every finite Coxeter group $W$, Sergey Fomin and Andrei
Zelevinsky have defined a simplicial complex $\Delta_W$ called the
{\sf simplicial associahedron} of type $W$. Let $\Phi$ be the root
system corresponding to $W$, and let $\Phi^+$ and $\Pi$ be a choice
of positive roots and simple roots, respectively. Then $\Delta_W$ is
defined as a flag complex on the set of {\sf almost positive roots}
$\Phi_{\geq -1}:= \Phi^+ \cup (-\Pi)$. Their original construction
\cite{fomin-zelevinsky:ysystems} applied only to crystallographic
root systems, but the definition may be uniformly generalized to all
root systems (see the notes \cite{fomin-reading:survey}). The complex
$\Delta_W$ generalizes the well-known associahedron (or Stasheff polytope)
in type $A$, and the well-known cyclohedron (or Bott-Taubes polytope)
in type $B$. For more information, see Section \ref{sec:cluster}.
Related to this are the {\sf Cambrian lattices} of Nathan Reading
\cite{reading:cambrian}. To each orientation of the Coxeter diagram of
$W$, he associates a lattice which is a quotient of the weak order on
$W$. Conjecturally, each of these Cambrian lattices is an orientation
of the $1$-skeleton of the {\sf simple associahedron}, the dual complex
to $\Delta_W$. Cambrian lattices may be regarded as a generalization of
the classical Tamari lattices, and this idea has also been considered
by Hugh Thomas in type $B$ \cite{thomas}.
\item In the case that $W$ is a Weyl group (that is, a crystallographic
Coxeter group), Postnikov has suggested how to define a poset of {\sf
nonnesting partitions} $NN_W$ (see remarks in \cite{reiner}). Given
a crystallographic root system $\Phi$ with positive roots $\Phi^+$,
the {\sf root order} $(\Phi^+,\leq)$ is a partial order on $\Phi^+$,
where $\alpha\leq\beta$ if and only if $\beta-\alpha$ is in the positive
integer span of $\Pi$.
To each antichain $\A$ (set of pairwise-incomparable elements) in
the root order, associate the vector subspace $\cap_{\alpha\in\A}
\alpha^{\perp}$, which is the intersection of the orthogonal hyperplanes
to the corresponding roots. Then $NN_W$ is defined as the poset of
antichains under reverse inclusion of subspaces.
The antichains may also be interpreted as order ideals (or order
filters) in the root order, and Cellini and Papi have shown that these
are in bijection with nilpotent ideals of a Borel subalgebra of the
corresponding semisimple Lie algebra \cite{cellini-papi}. One may define
a {\em different} partial order on the antichains via inclusion of ideals,
and this poset describes the structure of the chambers within the dominant
cone of the Shi hyperplane arrangement \cite{shi}.
\end{enumerate}
\begin{problemblock}
\begin{problem}
\label{central:one}
Explain the numerology. The cardinality of $NC_W$, the cardinality of
$NN_W$ and the number of facets of $\Delta_W$ are all equal to the Catalan
number $\Cat(W)$. The rank numbers of $NC_W$, the height numbers of $NN_W$
(in general, $NN_W$ is not graded), and the $h$-vector of $\Delta_W$ are
all the same, given by the {\sf Narayana numbers} (for which there is no
known closed formula, in general).
\end{problem}
The enumerative coincidences are quite
extensive, and quite mysterious, as there is still no theoreretical
connection between these objects. In fact, only for $NN_W$ and its
relatives is there {\em any} proof whatsoever of the enumerative formulas
that is not case-by-case, using the finite type classification.
\end{problemblock}
\begin{problemblock}
\begin{problem}
Find bijections between these objects which preserve the numerology. Is
there some theoretical algebraic framework behind the scenes, as
yet undiscovered? David Bessis has suggested a notion of ``dual''
Coxeter systems \cite{bessis:dual}. Is there a way to formalize this
notion? The exponents of $W$ are one below the corresponding degrees of
the fundamental polynomial invariants of $W$ (see \cite{humphries}). Does
the number $\Cat(W)$ have any significance in an invariant theory context?
\end{problem}
\begin{remark}
There are two remarkable enumerative refinements of the Catalan combinatorics, each in a different direction.
\begin{enumerate}
\item Fr\'ed\'eric Chapoton has defined a two variable generating function
on each of the three main families (the $M$-triangle on noncrossing
partitions, the $F$-triangle on the associahedron, and the $H$-triangle
on nonnesting partitions), and conjectured precise algebraic relationships
between these functions \cite{chapoton:one,chapoton:two}. This gives very
refined enumerative correspondences between these objects, and is strong
evidence for the existence of hidden structural relationships. Explain
Chapoton's formulas.
\item Christos Athanasiadis and Vic Reiner have described an enumerative
correspondence between $NC_W$ and $NN_W$ that refines the Narayana numbers
\cite{athanasiadis-reiner}. Both of these posets may be injected into the
lattice of hyperplane intersections $\Pi_W$ of the corresponding Coxeter
arrangement. For $\pi$ in $NC_W$ let $f(\pi)$ be the fixed subspace
of $\pi$, and for $\A$ in $NN_W$, let $g(\A)$ be the intersection of
hyperplanes $\cap_{\alpha\in\A} \alpha^{\perp}$, as before. The result
states that the filters of $f$ and $g$ over any $W$-orbit in $\Pi_W$
are equinumerous.
The proof is case-by-case, using computer in the exceptional types. Find
a theoretical proof. Is there a natural statistic on $\Delta_W$ that
agrees with this refinement of the Narayana numbers? Is there a way to
express this statistic within the context of Chapoton's $M$-triangle,
$F$-triangle and $H$-triangle generating functions?
\end{enumerate}
\end{remark}
\begin{remark}The recent work of Nathan Reading on Coxeter-sortable elements
\cite{reading} gives an explicit bijection between $NC_W$ and the
facets of $\Delta_W$, however the proof of this bijection is currently
case-by-case (see Problem \ref{prob:c-sorted}). Also, Tom Brady and Colum
Watt have given a new definition of $\Delta_W$ in terms of noncrossing
partitions \cite{brady-watt}. This may provide some connection between
the structure of $NC_W$ and $\Delta_W$.
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem}\label{central:two} What are the largest natural domains of definition for the families $NC_W$, $NN_W$ and $\Delta_W$, and for their corresponding applications?\end{problem}
\begin{remark}
In a sense, the broadest setting possible for the numerology is {\em finite groups generated by pseudoreflections}. (A pseudoreflection is a unitary operator on an $n$-dimensional complex vector space whose eigenvalues are $0$ with multiplicity $n-1$, and $-1$ with multiplicity $1$.) It is a classical result of Shephard and Todd that the ring of invariants of a group $W$ is a polynomial ring precisely when the group is of this type. And in this case the sequence of degrees $d_1,d_2,\ldots,d_n$ of fundamental invariants is unique \cite{shephard-todd}.
In the general (complex) case, David Bessis suggests that the Catalan number should be
\begin{equation*}
\Cat(W):= \prod_{i=1}^n \frac{h+d_i}{d_i},
\end{equation*}
where we set $h$ equal to the highest degree $d_n$. This agrees with our earlier definition in the real types. However, this may apply only when $W$ is a {\sf duality group} (or a {\sf well-generated group}), since otherwise $\Cat(W)$ may fail to be an integer. See the paper \cite{bessis:complex} by David Bessis for more information.
\end{remark}
\begin{remark}
The noncrossing partitions are currently the most general of the Catalan families. The poset $NC_W$ is defined for all finite Coxeter groups, and the definition makes sense in principle for any finitely generated Coxeter group (although the definition may not be unique when $W$ is infinite \cite{mccammond-etal}). David Bessis and Ruth Corran gave a combinatorial realization of $NC_W$ for an infinite class of complex reflection groups in \cite{bessis-corran}, and Bessis has suggested a uniform definition for $NC_W$ whenever $W$ is a well-generated complex reflection group \cite{bessis:complex}.
\end{remark}
\begin{remark}
Can one generalize free probability beyond types $A$ and $B$? The combinatorics of free probability is naturally expressed in terms of the type $A$ noncrossing partitions \cite{speicher:survey}, and some work has been done on a type $B$ free probability \cite{biane-goodman-nica}. Does it make sense to generalize further? One would presumably need to express Roland Speicher's work on multiplicative functions \cite{speicher} in the completely general case. See Problem \ref{prob:freeprobability}.
\end{remark}
\begin{remark}
Explain the theory of cluster algebras in infinite types. See Problem \ref{prob:infinitetypes}.
\end{remark}
\begin{remark}
The most glaring case of this problem is the seeming dependence of $NN_W$ and its relatives on the crystallographic structure of $W$. When $W$ is a Weyl group, there are amazing enumerative correspondences with the other Catalan objects (see the remarks following Problem \ref{central:one}). But there is currently no idea how to generalize these objects to the noncrystallographic types.
To what extent can the nonnesting partitions and root order be generalized to noncrystallographic types? Presumably, there are objects which can not be generalized in their current form, such as Lie algebras and affine hyperplane arrangements. Generalize where possible, and explain where there are essential barriers to this generalization. Cathy Kriloff and Arun Ram have dealt with some of these issues in studying the representation theory of noncrystallographic types \cite{kriloff-ram}.
Fr\'ed\'eric Chapoton's conjecture gives a way to define the $H$-triangle for all finite Coxeter groups \cite{chapoton:two}. What object is it counting in the noncrystallographic types?
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem}
\label{central:three}
What are the most natural generalizations of the families $NC_W$, $NN_W$, and $\Delta_W$? Classical combinatorics is full of enumerative generalizations of the Catalan numbers. Which of these is relevant in the reflection group setting?
\end{problem}
Define the {\sf Fuss-Catalan numbers}
\begin{equation*}
\Cat^{(k)}(W):= \prod_{i=1}^n \frac{kh+e_i+1}{e_i+1},
\end{equation*}
where $k$ is a positive integer. In type $A$, these generalize the classical Fuss numbers and the Catalan numbers \cite{fomin-reading,hilton-pederson}. As seen from the formula, $\Cat^{(k)}(W)$ is a very natural generalization of the Catalan numbers in the reflection group context. Recently these numbers have shown up in all three of the Catalan families.
\begin{remark}
Drew Armstrong has defined a generalization of the noncrossing partitions $NC_W^{(k)}$, called the {\sf $k$-divisible noncrossing partitions} \cite{armstrong}. This is a graded join-semilattice which is counted by $\Cat^{(k)}(W)$. Call the rank numbers the {\sf Fuss-Narayana numbers}. In types $A$ and $B$, $NC_W^{(k)}$ is isomorphic to the poset of $k$-divisible noncrossing set partitions (partitions in which each block has size divisible by $k$).
\end{remark}
\begin{remark}
Sergey Fomin and Nathan Reading have defined a simplicial complex $\Delta^{(k)}_W$ which is a generalization of the simplicial associahedron \cite{fomin-reading}. The facets of $\Delta^{(k)}_W$ are counted by the Fuss-Catalan numbers, and the entries of the $h$-vector are given by the Fuss-Narayana numbers. In types $A$ and $B$, this complex is defined in terms of $(k+2)$-angulations of a regular polygon, and has been studied independently by Eleni Tzanaki \cite{tzanaki}.
\end{remark}
\begin{remark}
The Fuss-Catalan numbers appear in many places in the $NN_W$ family of objects. Let $W$ be a finite Weyl group. Christos Athanasiadis suggested the definition of the Fuss-Narayana numbers in this context, and proved that these numbers count several objects, including positive regions in a certain affine deformation of the Coxeter hyperplane arrangement, as well as co-filtered multichains of ideals in the root order \cite{athanasiadis:cat,athanasiadis:nar}. Mark Haiman has shown that the Fuss-Catalan numbers count orbits in the quotient $\check{Q}/(kh+1)\check{Q}$ of the coroot lattice $\check{Q}$ \cite{haiman:conjectures}, and Eric Sommers has encountered these numbers in the study of Lie algebras \cite{sommers}.
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem}
Repeat Problems \ref{central:one} and \ref{central:two} in this more general setting. Any theoretical relationships found between $NC_W$, $NN_W$, and $\Delta_W$, must generalize to explain the Fuss-Catalan combinatorics. Given that $\Cat^{(k)}(W)$ is naturally defined in terms of the exponents of $W$, is there an underlying algebraic framework that explains these numbers?
\end{problem}
\begin{remark}
Extend Fr\'ed\'eric Chapoton's $M$-triangle, $F$-triangle, and $H$-triangle to the Fuss-Catalan case. (Eleni Tzanaki has worked on this for the $H$-triangle.)
\end{remark}
\begin{remark}
What is the significance of these Fuss-Catalan objects in applications, for instance in Garside Structures, cluster algebras, or free probability? For example, the $k$-divisible noncrossing partitions may have some application to Problem \ref{prob:kdivisible}, in free probability.
\end{remark}
\begin{remark}
Is there a natural generalization of the poset of nonnesting partitions $NN^{(k)}_W$? In type $A$, one may take $k$-divisible nonnesting set partitions under refinement (mimicking $NC_{A_{n-1}}^{(k)}$). In the general case, perhaps this is isomorphic to a partial order on co-filtered multichains of ideals in the root order.
\end{remark}
\begin{remark}
Christos Athanasiadis and Stavros Garoufallidis have suggested a $q$-version of the Catalan combinatorics. See Problem \ref{prob:qcat} below.
\end{remark}
\end{problemblock}
\section{Enumerative Combinatorics}
Define the {\sf $q$-Fuss-Catalan numbers}
\begin{equation}\label{eq:qcat}
q\text{-\Cat}^{(k)}(W):= \prod_{i=1}^n \frac{[kh+e_i+1]_q}{[e_i+1]_q},
\end{equation}
where $[n]_q=q+q^2+\cdots + q^n$ is the usual $q$-analogue of the positive integer $n$.
\begin{problemblock}
\begin{problem}\label{prob:qcat} Show that $q\text{-\Cat}^{(k)}(W)$ is a polynomial in $q$ with nonnegative integer coefficients.\end{problem}
This is known in the classical $A$, $B$, and $D$ cases. In type $A$ with $k=1$, this coincides (up to a power of $q$) with the $q,t$-Catalan number of Adriano Garsia and Mark Haiman \cite{garsia-haiman}, with the specialization $t=1/q$.
\begin{remark}
\by{D. Bessis} Does the same statement hold when $W$ is a complex finite reflection group, with the fundamental degrees $d_i$ subsituted for the $e_i+1$, and the highest degree substituted for $h$?
\end{remark}
\begin{remark}
\by{V. Reiner} Conjecture: Let $c$ be a Coxeter element of $W$, and let $\zeta$ be a primitive $d$th root of unity, where $d$ divides the Coxeter number $h$. Then $\zeta\text{-\Cat}^{(1)}(W)$ is the number of elements of $NC_W=[1,c]$ that are invariant under conjugation by $c^{h/d}$.
\end{remark}
\begin{remark}
\by{S. Fomin, V. Reiner} Are there corresponding $q$-analogues of other Catalan statistics? For instance, is the expression
\begin{equation*}
q\text{-\Cat}^{(k)}_+(W):=\prod_{i=1}^n \frac{[kh+e_i-1]_q}{[e_i+1]_q}
\end{equation*}
also a polynomial in $q$ with nonnegative integer coefficients? Is there a refinement of $q\text{-\Cat}^{(k)}(W)$ as a sum of polynomials in $q$ with nonnegative integer coefficients, generalizing the $q=1$ refinement by Fuss-Narayana numbers?
\end{remark}
\begin{remark}
Can one extend Fr\'ed\'eric Chapoton's $M$-triangle, $F$-triangle, and $H$-triangle to the $q$-Fuss-Catalan case?
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem}
\by{C. Kriloff, V. Reiner} This is a possible systematic approach to Problem \ref{prob:qcat}. As mentioned, in type $A$ with $k=1$, the numbers \eqref{eq:qcat} correspond (up to a power of $q$, and specialized at $t=1/q$) with the $q,t$-Catalan numbers of Garsia and Haiman, which are given by the $q,t$-bigraded Hilbert series for the sign-isotypic component of the ring of diagonal harmonics $\C[V\oplus V]/(\C[V\oplus V]_+^W)$ \cite{haiman}. Can this situation be generalized to other $W$?
\end{problem}
When $W$ is a symmetric group $A_{n-1}$, it is known that the action of $W$ on the (ungraded) diagonal harmonics has the same irreducible decomposition as the action of $W$ on the ``finite torus'' $Q/(h+1)Q$, where $Q$ is the root lattice. Mark Haiman noted that this does not hold in type $B$ \cite{haiman}. However, Iain Gordon has shown that the problem may be feasible for general $W$, since it is possible to take a further quotient which does give the right combinatorics \cite{gordon}.
\end{problemblock}
\begin{problemblock}
The following are two elementary combinatorial facts, for which it would be nice to have elementary explanations. Both problems are unique to type $B$, and concern centrally symmetric structures on polygons (structures that are invariant under the antipodal map).
\begin{problem}
\by{S. Fomin} Among the centrally symmetric partial $(k+2)$-angulations of a regular $(2kn+2)$-gon containing $i$ orbits (under the antipodal map) of $k$-admissible chords \cite{fomin-reading,tzanaki}, the proportion that contain a diameter is $i/n$. (A $k$-admissible chord is one that may be present in a full $(k+2)$-angulation.) Give an elementary proof.
\end{problem}
\end{problemblock}
\begin{problemblock}
\begin{problem}
\by{D. Armstrong} Among the centrally symmetric $k$-divisible noncrossing partitions of a $2kn$-gon with $i$ orbits (under the antipodal map) of nonzero blocks \cite{armstrong, reiner}, the proportion that contain a zero block is $i/n$. (A zero block is a block that contains a diameter.) Give an elementary proof.
\end{problem}
\begin{remark}
These problems are strikingly similar. The first is a statement about the $f$-numbers of the complex $\Delta_{B_n}^{(k)}$ \cite{fomin-reading}, and the second is a statment about the $h$-numbers of this complex. The similarity between these problems, and the fact that they both have been resistant to elementary proofs, suggests that there may be some connection. However, no connection between $\Delta_{B_n}^{(k)}$ and $NC_{B_n}^{(k)}$ is currently known. (See Problem \ref{central:three}.)
\end{remark}
\end{problemblock}
\begin{problemblock}
\by{H.T. Hall} Suppose that a stream has $2n$ bridges across it. A classical {\sf meander} is (the homotopy class of) a closed path which crosses each bridge once without intersecting itself. On each side of the stream, the meander is given by a noncrossing pairing of the set $[2n]:=\{1,2,\ldots,2n\}$. Noncrossing pairings are naturally in bijection with type $A$ noncrossing partitions of the set $[n]$.
Every ordered pair of noncrossing partitions defines a path (with possibly multiple components) which crosses each bridge exactly once. There is a bijection which says that the meanders (the paths with only one connected component) correspond exactly to pairs of noncrossing partitions that are maximally separated in the Hasse diagram of $NC_{A_{n-1}}$ (they are diameters in the graph theoretical sense).
\begin{problem}
Does this bijection suggest a new way to count meanders?
\end{problem}
\end{problemblock}
\begin{problemblock}
\begin{problem}
One may also use this bijection to define meanders of type $W$ (they are the ordered diameters of the Hasse diagram of $NC_W$). Is there some combinatorial object that this corresponds to? Is there a type $B$ meander?
\end{problem}
\begin{remark}
\by{A. Nica, J. Scott} In type $A$, one may build a ``meander determinant'' which is known to factor as a product of Chebyshev polynomials \cite{difrancesco}. Similarly, one may define a type $W$ meander determinant. What factorization properties does it have?
Meanders are related to chromatic polynomials of graphs, and the Temperley-Lieb algebra \cite{cautis-jackson}. What is the significance of type $W$ meanders in this context?
\end{remark}
\end{problemblock}
\section{Reflection Groups}
\begin{problemblock} Let $W$ be a finite Coxeter group, and let $T$ be the generating set of all reflections, as in Section \ref{sec:central}. Again, let $\ell$ denote the word length on $W$ with respect to $T$. This is often called the {\sf absolute length} on $W$. In general, for all $u,v$ in $W$, we have the triangle inequality $\ell(uv)\leq \ell(u)+\ell(v)$.
Define the {\sf absolute length poset}, as before, by setting $a\leq b$ whenever $\ell(b)=\ell(a)+\ell(a^{-1}b)$. This is a partial order on $W$ whose Hasse diagram is the Cayley graph of $W$ with respect to $T$. The poset is graded with rank function given by $\ell$.
\begin{problem} \by{V. Reiner}
What is the topology of this poset? In types $A$ and $B$ is there an $EL$-labelling which exhibits a shelling of the order complex?
\end{problem}
It is known that the absolute length poset is not shellable in type $D$. Perhaps this can be fixed in a uniform way by considering only the subposet which is the order ideal of parabolic Coxeter elements (elements of $W$ which are a Coxeter element in some parabolic subgroup)
\begin{remark} The noncrossing partitions $NC_W$ are defined as an interval in the absolute length poset. Recent work of Brady and Watt \cite{brady-watt} seems to give an $EL$-labelling for $NC_W$. Do their methods generalize to the problem above?\end{remark}
\end{problemblock}
\begin{problemblock}Let $W$ be a finite Coxeter group. In \cite{reading}, Nathan Reading defines the notion of {\sf Coxeter-sortability} for elements of $W$, relative to some Coxeter element $c$.
There are natural maps $nc$ and $cl$ from the Coxeter-sortable elements of $W$ to the noncrossing partitions $NC_W$, and to the set of clusters of type $W$, respectively. In \cite{reading}, these maps are concretely defined, but the proof that they are bijections is case-by-case, using the fact that both objects are known to be counted by the Catalan number $\Cat(W)$.
\begin{problem}\by{N. Reading}\label{prob:c-sorted}
\begin{enumerate}
\item Give a uniform proof that the Coxeter-sorted elements are counted by $\Cat(W)$.
\item Give a uniform proof that the map $nc$ is well-defined.
\item Give a uniform proof that the maps $nc$ and $cl$ are bijections.
\item The notion of Coxeter-sortable elements, and the maps $nc$ and $cl$ can be defined for infinite type Coxeter groups. What happens in this case?
\end{enumerate}
\end{problem}
\end{problemblock}
\begin{problemblock}
\by{D. Bessis, F. Chapoton}
The Lyashko-Looijenga mapping associates to any complex-valued function on a manifold the polynomial in one variable whose roots are the critical values of the function. The main theorem in \cite{looijenga} states that this mapping is a ramified covering for some families of functions. There is a known relationship between the Lyashko-Looijenga covering of the complex sphere, and the combinatorial cacti of Ian Goulden and David Jackson \cite{goulden-jackson}.
Interpret the combinatorics of the type $A$ noncrossing partitions in terms of the Lyashko-Looijenga covering of the sphere. The degree of the covering is $n^{n-2}$, which is also the number of maximal chains in $NC_{A_{n-1}}$. This number is known to count many things, including labelled trees, and cacti.
\begin{problem}Do these combinatorics generalize to other types?\end{problem}
\end{problemblock}
%here is an example of a problem with no associated lead-in or comments.
%the \begin{problemblock} and \end{problemblock} have been omitted.
%The pre-processor needs to add that in automatically
\begin{problem}
\by{D. Bessis}
Is there a structure theory of Lie groups and algebraic groups that is analogous to the dual braid monoid \cite{bessis:dual}? Is there some dual notion of $BN$-pairs?
\end{problem}
\section{Garside Structures}
As mentioned, the lattice of noncrossing partitions $NC_W$ in its full generality was defined by David Bessis \cite{bessis:dual} and Tom Brady \cite{brady} in order to study the Artin group $\A(W)$ corresponding to the Coxeter group $W$. It turns out that the properties of the poset $NC_W$ have many consequences for the group theory, including a nice algorithmic solution to the word and conjugacy problems.
In general, every poset $P$ together with a labelling of the edges in its Hasse diagram generates a monoid $M(P)$ and a group $G(P)$. When this labelling has certain properties, $P$ is called a {\sf combinatorial Garside structure}. Having such a Garside structure gives a powerful tool for studying the monoid $M(P)$ and the group $G(P)$. This is an emerging subject with interest to combinatorics and group theory. The survey article \cite{mccammond:garside} by Jon McCammond gives a good introduction to these topics.
%missing problemblock
\begin{problem} \by{R. Charney} Questions about classification.
\begin{enumerate}
\item Given an arbitrary poset $P$, when can it be given a Garside labelling? When such a labelling exists, say that $P$ is a {\sf Garside poset}.
\item Given a Garside poset $P$, what are the relationships between its inequivalent Garside labellings? When does $P$ have a unique Garside labelling?
\item Given a poset with an edge labelling, when can this be embedded in a Garside structure? When do the corresponding monoids/groups embed? What are the minimal obstructions to doing this?
\end{enumerate}
\end{problem}
%missing problemblock
\begin{problem} \by{P. Dehornoy}
\begin{enumerate}
\item Given a cancellative, finitely-generated monoid $M$ in which lcm's exist, is $M$ necessarily a Garside monoid? That is, does there exist a Garside element $\Delta$ in $M$?
\item In the case of Artin groups, the nicest Garside structures come from the Cayley graph of the corresponding Coxeter group. Is there a way to systematize this? Is there some notion of a ``Coxeter group'' corresponding to each Garside group?
\item Let $M$ be a Garside monoid with Garside element $\Delta$, and let $\ell$ be a length on $M$ ($M$ is atomic). Is it always true that $\ell(\Delta^k)\leq Ck\left|\Delta\right| $ for some constant $C$?
\end{enumerate}
\end{problem}
\begin{problemblock}
\by{J. McCammond}
In general, the most difficult property of a Garside structure to establish is the lattice property. Call an edge-labelled poset a {\sf quasi-Garside structure} if it satisfies all properties except the lattice property.
There is a large natural source of quasi-Garside structures. Let $G$
be a group, generated by a finite, conjugate-closed generating set
$T$. Then any interval in the Cayley graph of $G$ with respect to $T$
is a quasi-Garside structure. Many of these have the lattice property,
and many do not.
%another example of a problem that requires its lead-in text in order
%to make sense
\begin{problem}
Are there natural conditions on $G$ and $T$ that imply
the lattice property? Find a natural class of these posets in which the
presence or absence of the lattice property can be explained.
\end{problem}
\begin{remark}
Tom Brady and Colum Watt \cite{brady-watt} have recently given a uniform proof that the noncrossing partitions $NC_W$ are lattices. Their proof depends on the realization of $W$ as a real reflection group. Is there a class of quasi-Garside structures in which the lattice property can be seen only to depend on the group structure?
\end{remark}
\end{problemblock}
\begin{problemblock}\by{D. Armstrong}As above, let $G$ be a group generated by $T$, where $T$ is finite and closed under conjugation. Then every interval in the Cayley graph of $(G,T)$ is a locally self-dual poset (every interval in the poset is self-dual).
In particular, to each element $g$ of $G$, associate the poset $P_g$ which is the interval $[1,g]$ in the Cayley graph of $(G,T)$. Note that $P_g$ and $P_h$ are isomorphic whenever $g$ and $h$ are conjugate. Now, associate to each $P_g$ its {\sf Ehrenborg quasisymmetric function}
\begin{equation*}
F(P_g):= \sum_k \sum_{1\leq g_0\leq g_1\leq\cdots\leq g_k\leq g} x_1^{\ell(g_0^{-1}g_1)}x_2^{\ell(g_1^{-1}g_2)}\cdots x_k^{\ell(g_{k-1}^{-1}g_k)}.
\end{equation*}
It is known that the Ehrenborg function of a self-dual poset must, in fact, be a symmetric function (see \cite{stanley}). So $F$ is a map from conjugacy classes of $G$ to the ring of symmetric functions
\begin{problem}What is the structure of this map? Does it preserve some Hopf algebra structure?\end{problem}
\end{problemblock}
\section{Free Probability}
Free probability, initiated by Dan Voiculescu, is a subject in functional analysis which has been used successfully to study von Neumann algebras. It is a noncommutative analogue of probability in which the role of random variables is played by operators in some $*$-algebra (typically a $C^*$-algebra). The theory naturally describes the asymptotics of large random matrices, as well as the asymptotics of representations of large symmetric groups.
Roland Speicher showed that the combinatorics of free probability is governed by the lattice of type $A$ noncrossing partitions, in a role which is analogous to the role played by the lattice of unrestricted set partitions in classical probability. Many of the natural transforms on free algebras of random variables can be understood in terms of M\"{o}bius inversion in the incidence algebra of $NC_{A_{n-1}}$. See the survey \cite{speicher:survey} for more information.
\begin{problemblock} \label{prob:freeprobability}\by{F. Goodman, P. Sniady} Philippe Biane, Fred Goodman, and Alexandru Nica have defined a type $B$ analogue of free probability \cite{biane-goodman-nica}. The definition has been motivated by the combinatorics, and there is currently no model of this theory (as the large random matrices are a model for type $A$ free probability).
\begin{problem}
Find a natural model for type $B$ free probability, which motivates the combinatorics. Is there a corresponding notion of free probability in other types?
\end{problem}
\begin{remark} Many of the formulas of free probability depend on the fact that there is an infinite sequence of type $A$ noncrossing partition lattices $NC_{A_{n-1}}$, including, in particular, the formulas involving multiplicative functions \cite{speicher}. Type $B$ multiplicative functions were described by Vic Reiner \cite{reiner}. Is it possible to say something about free probability for an exceptional type $W$, where there is no infinite sequence?
\end{remark}
\end{problemblock}
\begin{problemblock} \by{A. Nica}
Let $(\A,\varphi)$ be a $*$-probability space. That is, $\A$ is some $*$-algebra, and $\varphi$ is a linear functional on $\A$ which plays the role of ``expectation''. Let $\C_0\langle\langle z_1,\ldots,z_s\rangle\rangle$ denote the set of power series in $s$ noncommuting variables which have zero constant term. For each $s$-tuple of elements $a_1,,\ldots,a_s$ in $\A$, there is a function $R_{a_1,\ldots,a_s}$ called the {\sf $R$-transform}, which is an element of $\C_0\langle\langle z_1,\ldots,z_s\rangle\rangle$. See \cite{nica-speicher:ntuples} for details.
There is a unique binary operation $\freestar_s$ defined on $\C_0\langle\langle z_1,\ldots,z_s\rangle\rangle$ with the property that for any two families $\{a_1,\ldots,a_s\}$ and $\{b_1,\ldots,b_s\}$ of freely independent random variables, we have
\begin{equation*}
R_{a_1,\ldots,a_s}\,\freestar_s\, R_{b_1,\ldots,b_s} = R_{a_1b_1,\ldots,a_sb_s}.
\end{equation*}
The operation $\freestar_s$ is associative, and has a unit $\Delta_s(z_1,\ldots,z_s):= z_1+\cdots +z_s$. In \cite{nica-speicher:ntuples}, Alexandru Nica and Roland Speicher show that, in general, the coefficients of $f\,\freestar_s \,g$ can be described combinatorially, using a summation over noncrossing partitions of type $A$.
\begin{problem}
Describe the structure of the group of
invertible elements in the
semigroup
$( \C_0\langle\langle z_1,\ldots,z_s\rangle\rangle,\freestar_s )$.\end{problem}
\begin{remark}
The answer is known in the case $s=1$. This is the only value of $s$ for which $\freestar_s$ is commutative. Here, $\C_0\langle\langle z_1,\ldots,z_s\rangle\rangle$ is just $\C_0[[z]]$, the set of power series with zero constant term. In \cite{nica-speicher:fourier}, Nica and Speicher define an isomorphism $\F$ (the {\sf free Fourier transform}) between the group of invertible elements in $(\C_0[[z]], \freestar_1)$ and the group of invertible elements in $(\C_0[[z]], \cdot)$, under the usual multiplication of power series.
\end{remark}
\begin{remark}In the case $s=1$, the map $\F$ provides a connection between the $R$-transform and the {\sf $S$-transform} of Voiculescu. More precisely, we have $\F(R_a)=S_a$ for any element $a\in\A$ such that $\varphi(a)\neq 0$.
As mentioned, there is a version of the $R$-transform when $s>1$, but it is not known how to define an $S$-transform in this case. Find a multi-variable version of the $S$-transform. One way to approach this problem would be to find an analogue of the map $\F$ in this case.
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem} \label{prob:kdivisible}\by{A. Nica} Let $u$ be a unitary element of a $*$-probability space $(\A,\varphi)$. Suppose $u$ has order $k$ and that $\varphi(u^i)=0$ for $1\leq i< k$. Let $\kappa_n$ denote the multilinear cumulant functionals of $(\A,\varphi)$.
Give a combinatorial way to compute the cumulants in $u$ and $u^*$. Equivalently, give a formula for the $R$-transform of $(u,u^*)$.
\end{problem}
\begin{remark} The answer is known for $k=2$ and $k=\infty$. When $k=2$, the only nonvanishing cumulants are given by the Catalan numbers $\kappa_{2n}(u,u,\ldots,u)=(-1)^{n-1} \Cat(A_{n-1})$. When $k=\infty$, the only nonvanishing cumulants are of the form
\begin{equation*}
\kappa_{2n}(u,u^*,\ldots,u,u^*)\quad\text{or}\quad \kappa_{2n}(u^*,u,\ldots,u^*,u),
\end{equation*}
and these are both equal to $(-1)^{n-1}\Cat(A_{n-1})$.
\end{remark}
\begin{remark} The cumulants may be expressed as a sum over noncrossing set partitions
\begin{equation*}
\kappa_n = \sum_{\substack{\pi\in NC_n\\ \pi=\{A_1,A_2,\ldots,A_t\}}} \alpha(\pi) \varphi_{A_1}\varphi_{A_2}\cdots \varphi_{A_t}.
\end{equation*}
For finite $k$, and with $u$ as above, the only nonvanishing terms in this sum come from the $k$-divisible noncrossing partitions.
\end{remark}
\end{problemblock}
\section{Cluster Algebras and Associahedra}
\label{sec:cluster}
Cluster algebras were defined by Sergey Fomin and Andrei Zelevinsky to study the phenomena of total positivity and dual canonical bases in semisimple Lie groups. In \cite{fomin-zelevinsky:finitetype} they show that the finite type cluster algebras are described by the Cartan-Killing classification.
Each cluster algebra has an associated simplicial complex, called the {\sf cluster complex} $\Delta_W$. As before, let $\Phi$ be a (crsytallographic) root system with Weyl group $W$, and let $\Phi^+$ and $\Pi$ be a corresponding choice of positive roots and simple roots, respectively. In \cite{fomin-zelevinsky:ysystems}, Fomin and Zelevinsky define a binary relation on the set of almost positive roots $\Phi_{\geq -1}= \Phi^+ \cup (-\Pi)$, called {\sf compatibility}. Then $\Delta_W$ is defined as the flag complex of pairwise compatible subsets of $\Phi_{\geq -1}$. In types $A$ and $B$, they show that these complexes generalize (the duals of) the classical associahedron and cyclohedron. The number of facets of $\Delta_W$ for finite type $W$ is the Catalan number $\Cat(W)$, and the $h$-vector of the complex is given by the Narayana numbers.
When $W$ is a noncrystallographic finite Coxeter group, there is no associated cluster algebra, but the complex $\Delta_W$ can still be defined as a flag complex on the almost positive roots of the corresponding (noncrystallographic) root system, and this complex obeys the same Catalan numerology. However, the only known polytopal realization of the type $W$ associahedron (given by Chapoton, Fomin and Zelevinsky in \cite{chapoton-fomin-zelevinsky}) does not generalize to this case.
For more on the combinatorics of cluster algebras and associahedra, see the notes \cite{fomin-reading:survey}.
\begin{problemblock}
\begin{problem} \label{prob:polytopal}\by{H. Thomas, A. Zelevinsky} When $W$ is a noncrystallographic finite Coxeter group, give a geometric construction that realizes $\Delta_W$ as a convex polytope. \end{problem}There is a realization of $\Delta_W$ in all types as a complete simplicial fan, but it is not clear whether this fan is polytopal in the noncrystallographic types.
\end{problemblock}
\begin{problem} \by{A. Zelevinsky}
In the classical types ($A$, $B$, $C$, and $D$), the associahedron $\Delta_W$ has a visually transparent realization in terms of regular plane polygons and their triangulations. Find a similar interpratation in the exceptional types.
\end{problem}
\begin{problemblock}
\begin{problem} \by{S. Fomin} Conjecture: The Fomin-Reading generalization of the associahedron $\Delta_W^{(k)}$ (see Problem \ref{central:three}) is Cohen-Macaulay, and is homotopy equivalent to a wedge of
\begin{equation*}
\Cat^{(k-1)}(W)=\prod_{i=1}^n \frac{(k-1)h +e_i +1}{e_i+1}
\end{equation*}
spheres. This has been proved by Eleni Tzanaki in types $A$ and $B$ using shelling methods \cite{tzanaki}.
Moreover, $\Delta_W^{(k)}$ seems to be the skeleton of a polytopal manifold. Can this be realized geometrically? (This generalizes Problem \ref{prob:polytopal} above.)
\end{problem}
\begin{remark}\by{V. Reiner} Is the Fomin-Reading complex $k$-Cohen-Macaulay in the sense of Baclawski \cite{baclawski}?\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem} \by{D. Bessis, C. Kriloff}
There is no construction of a cluster algebra in the noncrystallographic finite types.
What happens when one applies matrix mutations to the Cartan matrix of a noncrystallographic finite Coxeter group? Are there recurrences?
\end{problem}
\begin{remark}\by {N. Reading, D. Speyer} Early calculations suggest that there are ``approximate'' recurrences, that one returns {\em close to, but bounded away from} the original matrix.
\end{remark}
\end{problemblock}
\begin{problemblock}
\begin{problem}\label{prob:infinitetypes} \by{A. Zelevinsky} Describe a classification of infinite type cluster algebras as tame or wild. This should generalize the notions of tame/wild Artin groups, tame/wild quivers, etc.
\end{problem}
\begin{remark} Affine types are certainly tame. \end{remark}
\end{problemblock}
\begin{thebibliography}{99}
\bibitem{armstrong}
D. Armstrong, \emph{$k$-Divisible noncrossing partitions for Coxeter groups}, in preparation.
\bibitem{athanasiadis:cat}
C. Athanasiadis, \emph{Generalized Catalan numbers, Weyl groups and arrangements of hyperplanes}, Bull. London Math. Soc. {\bf 36} (2004), 294--302.
\bibitem{athanasiadis:nar}
C. Athanasiadis, \emph{On a refinement of the generalized Catalan numbers for Weyl groups}, Trans. Amer. Math. Soc. {\bf 357} (2005), 179--196.
\bibitem{athanasiadis-reiner}
C. Athanasiadis and V. Reiner, \emph{Noncrossing partitions for the group $D_n$}, SIAM J. Discrete Math. {\bf 18} (2004), 397--417.
\bibitem{baclawski}
K. Baclawski, \emph{Cohen-Macaulay connectivity and geometric lattices}, Europ. J. Combin. {\bf 3} (1982), 293--305.f
\bibitem{bessis:dual}
D. Bessis, \emph{The dual braid monoid}, Ann. Sci. \'Ecole Norm. Sup. {\bf 36} (2003), 647--683.
\bibitem{bessis:complex}
D. Bessis, \emph{Topology of complex reflection groups}, \texttt{math.GT/0411645}, 2004.
\bibitem{bessis-corran}
D. Bessis and R. Corran, \emph{Non-crossing partitions of type $(e,e,r)$}, \texttt{math.GR/0403400}, 2004.
\bibitem{biane}
P. Biane, \emph{Some properties of crossings and partitions}, Discrete Math. {\bf 175} (1997), 41--53.
\bibitem{biane-goodman-nica}
P. Biane, F. Goodman and A. Nica, \emph{Non-crossing cumulants of type $B$}, Trans. Amer. Math Soc. {\bf 355} (2003), 2263--2303.
\bibitem{mccammond-etal}
N. Brady, J. Crisp, A. Kaul, and J. McCammond, \emph{Factoring isometries, poset completions and Artin groups of affine type}, in preparation.
\bibitem{brady}
T. Brady, \emph{A partial order on the symmetric group and new $K(\pi,1)$'s for the braid groups}, Advances in Math. {\bf 161} (2002), 20--40.
\bibitem{brady-watt:kpi1}
T. Brady and C. Watt, \emph{$K(\pi,1)$'s for Artin groups of finite type}, in {\emph Proceedings of the Conference on Geometric and Combinatorial group theory, part I (Haifa 2000)}, Geom. Dedicata {\bf 94} (2002), 225--250.
\bibitem{brady-watt}
T. Brady and C. Watt, \emph{Lattices in finite real reflection groups}, \texttt{math.CO/0501502}, 2005.
\bibitem{cautis-jackson}
S. Cautis, and D.M. Jackson, \emph{The matrix of chromatic joins and the Temperley-Lieb algebra}, J. Combin. Theory Ser. B {\bf 89} (2003), 109--155.
\bibitem{cellini-papi}
P. Cellini and P. Papi, \emph{ad-nilpotent ideals of a Borel subalgebra II}, J. Algebra {\bf 258} (2002), 112--121.
\bibitem{chapoton:one}
F. Chapoton, \emph{Enumerative properties of generalized associahedra}, S\'eminaire Lotharingien de Combinatoire {\bf 51} (2004), Article B51b.
\bibitem{chapoton:two}
F. Chapoton, \emph{Sur le nombre de reflexions pleines dans les groupes de Coxeter finis}, \texttt{math.RT/0405371}, 2004.
\bibitem{chapoton-fomin-zelevinsky}
F. Chapoton, S. Fomin, and A. Zelevinsky, \emph{Polytopal realizations of generalized associahedra}, Canad. Math. Bull. {\bf 45} (2002), 537--566.
\bibitem{difrancesco}
P. DiFrancesco, \emph{Folding and coloring problems in mathematics and physics}, Bull. Amer. Math. Soc. {\bf 37} (2000), 251--307.
\bibitem{fomin-reading}
S. Fomin and N. Reading, \emph{Generalized cluster complexes and Coxeter combinatorics}, in preparation.
\bibitem{fomin-reading:survey}
S. Fomin and N. Reading, \emph{Root systems and generalized associahedra}, lecture notes for the IAS/Park City Graduate Summer School in Combinatorics, 2004.
\bibitem{fomin-zelevinsky:finitetype}
S. Fomin and A. Zelevinsky, \emph{Cluster algebras II: finite type classification}, Invent. Math. {\bf 154} (2003), 63-121.
\bibitem{fomin-zelevinsky:ysystems}
S. Fomin and A. Zelevinsky, \emph{$Y$-systems and generalized associahedra}, Math. Ann. {\bf 158} (2003), 977-1018.
\bibitem{garsia-haiman}
A.M. Garsia and M. Haiman, \emph{A remarkable $q,t$-Catalan sequence and $q$-Lagrange inversion}, J. Algebraic Combin. {\bf 5} (1996), 191-244.
\bibitem{gordon}
I. Gordon, \emph{On the quotient ring by diagonal harmonics}, \texttt{math.RT/0208126}, 2002.
\bibitem{goulden-jackson}
I.P. Goulden and D.M. Jackson, \emph{The combinatorial relation between trees, cacti, and certain connection coefficients for the symmetric group}, Europ. J. Comin. {\bf 13} (1992), 357--365.
\bibitem{haiman:conjectures}
M. Haiman, \emph{Conjectures on on the quotient ring by diagonal invariants}, J. Algebraic Combin. {\bf 3} (1994), 17--76.
\bibitem{haiman}
M. Haiman, \emph{Vanishing theorems and character formulas for the Hilbert scheme of points in the plane}, Inv. Math. {\bf 149} (2002), 371--407.
\bibitem{hilton-pederson}
P. Hilton and J. Pederson, \emph{Catalan numbers, their generalization and their uses}, Math. Int. {\bf 13} (1991), 64--75.
\bibitem{humphries}
J. E. Humphreys, \emph{Reflection Groups and Coxeter Groups}, Cambridge Studies in Advanced Mathematics, vol. 29 (Cambridge Univ. Press, Cambridge, 1990).
\bibitem{kreweras}
G. Kreweras, \emph{Sur les partitions non crois\'ees d'un cycle}, Discrete Math. {\bf 1} (1972), 333--350.
\bibitem{kriloff-ram}
C. Kriloff and A. Ram, \emph{Noncrystallographic Springer correspondences}, in preparation.
\bibitem{looijenga}
E. Looijenga, \emph{The complement of the bifurcation variety of a simple singularity}, Inv. Math. {\bf 23} (1974), 105--116.
\bibitem{mccammond:garside}
J. McCammond, \emph{An introduction to Garside structures}, survey, see \cite{mccammond:webpage}.
\bibitem{mccammond:noncrossing}
J. McCammond, \emph{Noncrossing partitions in surprising locations}, survey, see \cite{mccammond:webpage}.
\bibitem{mccammond:webpage}
J. McCammond, \emph{Associahedra and noncrossing partitions}, webpage, \verb+www.math.ucsb.edu/~jon.mccammond/associahedra/+.
\bibitem{nica-speicher:fourier}
A. Nica and R. Speicher, \emph{A `Fourier transform' for multiplicative functions on non-crossing partitions}, J. Algebraic Combin. {\bf 6} (1997), 141--160.
\bibitem{nica-speicher:ntuples}
A. Nica and R. Speicher, \emph{On the multiplication of free $n$-tuples of non-commutative random variables}, with an appendix {\em Alternative proofs for the type II free Poisson variables and for the free compression results} by D. Voiculescu, Amer. J. Math. {\bf 118} (1996) 799--837.
\bibitem{reading:cambrian}
N. Reading, \emph{Cambrian lattices}, \texttt{math.CO/0402086}, 2004.
\bibitem{reading}
N. Reading, \emph{Clusters, Coxeter-sortable elements and noncrossing partitions}, in preparation.
\bibitem{reiner}
V. Reiner, \emph{Non-crossing partitions for classical reflection groups}, Discrete Math. {\bf 177} (1997), 195--222.
\bibitem{shephard-todd}
G. C. Shephard and J. A. Todd, \emph{Finite unitary reflection groups}, Canad. J. Math. {\bf 6} (1954), 274--304.
\bibitem{shi}
J.-Y. Shi, \emph{The number of $\oplus$-sign types}, Quart. J. Math. Oxford {\bf 48} (1997), 375--390.
\bibitem{simion}
R. Simion, \emph{Noncrossing partitions}, Discrete Math. {\bf 217} (2000), 397--409.
\bibitem{sommers}
E. Sommers, \emph{$B$-stable ideals in the nilradical of a Borel subalgebra}, \texttt{math.RT/0303182}, 2003.
\bibitem{speicher:survey}
R. Speicher, \emph{Free probability theory and non-crossing partitions}, S\'eminaire Lotharingien de Combinatoire, {\bf 39} (1997), Article B39c.
\bibitem{speicher}
R. Speicher, \emph{Multiplicative functions on the lattice of non-crossing partitions and free convolution}, Math. Ann. {\bf 298} (1994), 611--628.
\bibitem{stanley}
R. Stanley, \emph{Flag-symmetric and locally rank-symmetric partially ordered sets}, Elec. J. Combin. {\bf 3} (1996), R6.
\bibitem{thomas}
H. Thomas, \emph{Tamari lattices and noncrossing partitions in type $B$ and beyond}, \texttt{math.CO/0311334}, 2003.
\bibitem{tzanaki}
E. Tzanaki, \emph{Polygon dissections and some generalizations of cluster complexes for the classical reflection groups}, \texttt{math.CO/0501100}, 2005.
\end{thebibliography}
\end{document}
| {
"content_hash": "d24d393e79eeaee02602c723d29180d3",
"timestamp": "",
"source": "github",
"line_count": 796,
"max_line_length": 849,
"avg_line_length": 65.66331658291458,
"alnum_prop": 0.7570215045534553,
"repo_name": "davidfarmer/AIMProblemLists",
"id": "41cbce8f1237769630f5c8fca8457da6d4123b25",
"size": "52268",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "resources/examples/braidPL.tex",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "JavaScript",
"bytes": "418202"
},
{
"name": "Perl",
"bytes": "2918"
},
{
"name": "Python",
"bytes": "9764"
},
{
"name": "Ruby",
"bytes": "11596"
},
{
"name": "Shell",
"bytes": "102"
}
],
"symlink_target": ""
} |
/* customize bootstrap here */
/*# sourceMappingURL=variables.css.map */
| {
"content_hash": "763d8460858017e5261542d1d63c590f",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 41,
"avg_line_length": 24.666666666666668,
"alnum_prop": 0.7162162162162162,
"repo_name": "dnozay/dnozay.github.io",
"id": "7d96a706eb66d6979758453efecd0c1d0bcb1053",
"size": "74",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "css/variables.44753331.css",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4120"
}
],
"symlink_target": ""
} |
title: Airport format
---
[back to index](index.html)
# Airport format
The airport JSON file must be in `assets/airports`; the filename
should be `icao.json` where `icao` is the lowercase four-letter ICAO
airport code, such as `ksfo` or `kmsp`.
```
{
"radio": {
"twr": "controller callsign for tower",
"app": "controller callsign for approach control",
"dep": "controller callsign for departure control"
},
"icao": "KSFO", // uppercase ICAO airport code
"iata": "SFO", // uppercase IATA airport code
"magnetic_north": 13.7, // magnetic declination, in degrees EAST!
"ctr_radius": 80, // radius from 'position' that the airspace extends
"ctr_ceiling": 10000, // elevation up to which the airspace extends
"initial_alt": 5000 // alt departures climb to if given "as-filed" clearance, but no "climb-via-sid" or altitude assignment
"position", ["lat", "lon"] // the latitude/longitude of the "center" of the airport; see comments below
"rr_radius_nm": 5, // radius of range rings, nautical miles
"rr_center": ["lat", "lon"],// position where range rings are centered, nautical miles
"has_terrain": true, // true/false for if has an associated GeoJSON terrain file in assets/airports/terrain
"wind": { // wind is used for score, and can affect aircraft's ground tracks if enabled in settings
"angle": 0, // the heading, in degrees, that the wind is coming from
"speed": 3 // the speed, in knots, of the wind
},
"fixes": {
"FIXNAME", ["lat", "lon"] // the position, in GPS coordinates, of the fix
},
"runways": [
{
"name": ["36", "18"], // the name of each end of the runway
"name_offset": [[0, 0], [0, 0]], // the offset, in km, of the runway text when drawn on the map
"end": [ // the ends of the runway
["lat", "lon"],
["lat", "lon"]
],
"delay": [2, 2], // the number of seconds it takes to taxi to the end of the runway
"sepFromAdjacent": [2.5, 2.5], // Distance in nautical miles that another aircraft can come while on parallel approach paths, a violation will occur at 85% of this value
"ils": [true, false] // not used yet; indicates whether or not that end of the runway has ILS
}
],
"sids": { // contains all SIDs available at this airport
"OFFSH9": { // (req) must match ICAO identifier
"icao": "OFFSH9", // (req) ICAO identifier for SID (this is NOT the full name, always 2-6 characters)
"name": "Offshore Nine" , // (req) Name of SID as it would be said aloud (it is used by speech synthesis to pronounce "OFFSH9")
"suffix": {"1L":"", "1R":"", "28L":"", "28R":""}, // (optional) defines suffixes to SID name based on runway (eg '2C' for 'EKERN 2C').
// Common for European-style SIDs. If not needed (like in USA), leave this part out.
"rwy": { // (req) ALL runways usable on this SID must be listed below. If a runway isn't listed, aircraft departing
// that runway will need to be re-assigned a different SID or runway (this is realistic and intended).
"1L" : [["SEPDY", "A19+"], "ZUPAX"], // Each runway for which this SID is valid must be listed here. The value assigned to each runway is an array
"1R" : [["SEPDY", "A19+"], "ZUPAX"], // of fixes, entered as strings. As shown, you may also enter an array containing the fix name and restrictions
"28L": [["SENZY", "A25+"], "ZUPAX"], // at that fix, separated by a pipe symbol ('|'). For example, see the following: ["FIXNAME", "A50-|S220+"]. In
"28R": [["SENZY", "A25+"], "ZUPAX"] // that example, restrictions of Altitude 5,000' or lower, and Speed 220kts or higher would be placed on that fix.
},
"body": ["EUGEN", "SHOEY"], // (optional) If there is a very long series of fixes in a SID, it may be
// helpful to put some of it here, while all segments follow the same path.
"transitions": { // (optional) Defines transitions for a given SID. Common for FAA-style (USA) SIDs. If not needed (like in Europe), leave this part out.
"SNS": ["SNS"], // defines the "OFFSH9.SNS" transition as being a single fix, "SNS". Is often a list instead.
"BSR": ["BSR"] // Note that this connects to the end of previous sections, so an example route: SEPDY->ZUPAX->EUGEN->SHOEY->BSR
},
"draw": [["SEPDY","ZUPAX"], ["SENZY","ZUPAX","EUGEN","SHOEY*"], ["SHOEY","SNS*"], ["SHOEY","BSR*"]]
// (req) This "draw" section is what defines how the SID is to be drawn on the scope in blue.
// The array contains multiple arrays that are a series of points to draw fixes between.
// In this case, SEPDY->ZUPAX, SENZY->ZUPAX->EUGEN->SHOEY, SHOEY->SNS, SHOEY->BSR are the lines drawn.
// Additionally, you'll notice three asterisks ('*'). This is an optional flag that, if invoked for "FIXXX"
// will tell canvas.js to write "OFFSH9.FIXXX" next to FIXXX on the scope. If no such flags are present,
// then the ICAO identifier for the SID will be drawn at the last point of the "draw" array. For european-
// style SIDs, where they always end at the fix for which the SID is named, don't use the flags. But if your SID
// has transitions, like in the N/S Americas, United Kingdom, etc, be sure to flag all the transition fixes.
}
},
"stars": { // contains all STARS available at this airport
"PYE1" : {
"icao": "PYE1", // (req) ICAO identifier for SID (this is NOT the full name, always 2-6 characters)
"name": "Point Reyes One" , // (req) Name of SID as it would be said aloud (it is used by speech synthesis to pronounce "OFFSH9")
"suffix": {"1L":"", "1R":"", "28L":"", "28R":""}, // (optional) defines suffixes to STAR name based on runway (eg '7W' for 'MIKOV 7W').
// Common for European-style STARs. If not needed (like in USA), leave this part out.
"transitions": { // (optional) Defines transitions for a given SID. Common for FAA-style (USA) SIDs. If not needed (like in Europe), leave this part out.
"ENI": ["ENI"], // defines the "OFFSH9.SNS" transition as being a single fix, "SNS". Is often a list instead.
"MXW": ["MXW"] // Note that this connects to the end of previous sections, so an example route: SEPDY->ZUPAX->EUGEN->SHOEY->BSR
},
"body": ["PYE", ["STINS", "A230|S250"], "HADLY"], // (optional) This is where you store the waypoints when all segments are along the same path
"rwy": { // (optional) For runway-transitions (eg "descending via HAWKZ4, landing north")
"1L" : [["SEPDY", "A19+"], "ZUPAX"], // List fixes here that are specific to a particular runway configuration.
"1R" : [["SEPDY", "A19+"], "ZUPAX"], // In Europe, these are called the "transitions" that come after the STAR.
"28L": [["SENZY", "A25+"], "ZUPAX"], // If any runways are listed, all must be listed.
"28R": [["SENZY", "A25+"], "ZUPAX"]
},
"draw": [["ENI*","PYE"], ["MXW*","PYE"], ["PYE","STINS","HADLY","OSI"]]
// (req) This "draw" section is what defines how the SID is to be drawn on the scope.
// The array contains multiple arrays that are a series of points to draw fixes between.
// In this case, ENI->PYE, MXW->PYE, PYE->STINS->HADLY->OSI are the lines drawn.
// Additionally, you'll notice two asterisks ('*'). This is an optional flag that, if invoked for "FIXXX"
// will tell canvas.js to write "FIXXX.PYE1" next to FIXXX on the scope. If no such flags are present,
// then the ICAO identifier for the SID will be drawn at the first point of the "draw" array. For european-
// style STARs, where they always end at the fix for which the STAR is named, don't use the flags.
}
},
"departures": {
"airlines": [
["three-letter ICAO airline code/fleet", 0], // see "Aircraft/Airline selectors" below
...
],
"destinations": [
"LISST", "OF", "SIDS", "ACRFT", "WILLL", "FLYYY", "TO" // these must each be a defined SID above
],
"type": ,
"offset": ,
"frequency": [3, 4] // the frequency, in minutes, of a new departing aircraft. A random number is chosen between the two.
},
"arrivals": [
{ // Basic 1
"type": "random",
"radial": 170, // the direction, in degrees, of arriving aircraft when they spawn; these will come from the south. ONLY use 'radial' with heading-based arrivals.
"heading": 350, // the direction airplanes will be pointing when they spawn; will be opposite of "radial" if omitted
"frequency": 10,
"altitude": 10000,
"speed": 250,
"airlines": [ ... ]
},
{ // Basic 2
"type": "random",
"fixes": ["MOVDD", "RISTI", "CEDES"], // list of fixes to fly to after spawning.
"frequency": 10,
"altitude": 10000,
"speed": 250,
"airlines": [ ... ]
},
{ // Advanced, based on a route of flight (like a STAR, for example)
"type": "random", // options include 'random', 'cyclic', 'wave', and 'surge' (see below for descriptions)
"route": "QUINN.BDEGA2.KSFO", // route to follow (spawn at first point)
"frequency": 10, // spawn rate of this stream, in acph
"altitude": [20000, 24000], // altitude to spawn at (either a value, or altitude range via array)
"speed": 280, // speed to spawn at
"airlines": [ ... ] // same as in "departures"
},
...
]
}
```
For `lat, lon` fields, you can either use the standard `[x, y]`
notation or the new `["LAT", "LON"]` notation. The latter uses this
format:
["N or S followed by a latitude", "W or E followed by a longitude", "optional altitude ending in 'ft' or 'm'"]
where latitude and longitude are numbers that follow this format:
<degrees>[d|°][<minutes>m[<seconds>s]]
Examples of acceptable positions:
[ 40.94684722 , -76.61727778 ], // decimal degrees
[ "N40.94684722" , "W76.61727778" ], // decimal degrees
[ "N40d56.811" , "W076d37.037 ], // degrees, decimal minutes
[ "N40d56m48.65" , "W076d37m02.20" ] // degrees, minutes, decimal seconds
If you use a `["lat", "lon"]` combination for any `position`, you
_must_ set the `position` of the airport as well; if you use `end`,
`length` and `angle` are not needed (but can be used to override
`end`).
Aircraft scheduling
-------------------
The 'type' key in an arrival or departure block determines the algorithm
that will be used to spawn the aircraft. Each type take slightly different
parameters in order for you to shape the airport's traffic to your liking.
## Bare Minimum Elements
At the very least, an arrival stream MUST have definitions for the
following parameters. Additional may be required if the spawn method
is set to one other than 'random'.
BARE MINIMUM PARAMETERS:
PARAMETER REQ PARAMETER DESCRIPTION
+-------------+---+-------------------------------+
| 'airlines' | * | weighted array of airlines |
+-------------+---+-------------------------------+
| 'altitude' | * | altitude to spawn at |
+-------------+---+-------------------------------+
| 'frequency' | * | spawn rate, aircraft per hour |
+-------------+---+-------------------------------+
| 'heading' | * | heading to fly on spawn |
| (OR) | | |
| 'fixes' | * | array of fixes to go to |
| (OR) | | |
| 'route' | * | properly formatted route* |
+-------------+---+-------------------------------+
| 'speed' | * | speed to spawn at (knots) |
+-------------+---+-------------------------------+
*see index.md for route format (ex: 'BSR.BSR1.KSFO')
### Random (default)
If the 'type' key is omitted, this spawning method will be used. The
aircraft will be spawned at random intervals that average out to achieve
the prescribed spawn rate. Thus, you may randomly get some back-to-back,
and some massive gaps in your traffic, just as it is most likely to occur
in real life.
PARAMETERS SPECIFIC TO 'RANDOM':
+-----------------------------------------------+
| only the "bare minimum parameters" are needed |
+-----------------------------------------------+
### Cyclic
The cyclic algorithm creates a stream of varying density. This will be more
predictable than 'random', and can be shaped to your liking. Basically, you
define the 'frequency', which is the average spawn rate, and an additional
'variance' parameter that adds some swells and lulls in the traffic. During
the cycle, the spawn rate will range throughout frequency +/- variation in
a linear fashion. Spawn rate will start at 'frequency', and steadily
increase to ('frequency' + 'variation'), then steadily decrease to
('frequency' - 'variation').
PARAMETERS SPECIFIC TO 'CYCLIC':
PARAMETER REQ PARAMETER DESCRIPTION DEFAULT
+-------------+---+------------------------------------+-------+
| 'offset' | | min into the cycle to start at | 0 |
+-------------+---+------------------------------------+-------+
| 'period' | | length of each cycle, in minutes | 30 |
+-------------+---+------------------------------------+-------+
| 'variation' | * | the amount to +/- from 'frequency' | 0 |
+-------------+---+------------------------------------+-------+
| (also include "bare minimum parameters" - see above) |
+--------------------------------------------------------------+
# Wave
The wave algorithm works exactly like the cyclic algorithm, however,
instead of a linear shift between arrival rates, the arrival rate will
vary throughout ('frequency' +/- 'variation') in a sinusoidal pattern.
As a result, less time will be spent right at the average, and the flow
of traffic will have changes in arrival rates that come along slightly
sooner. Overall, very similar to cyclic though.
PARAMETERS SPECIFIC TO 'WAVE':
PARAMETER REQ PARAMETER DESCRIPTION DEFAULT
+-------------+---+------------------------------------+-------+
| 'offset' | | min into the cycle to start at | 0 |
+-------------+---+------------------------------------+-------+
| 'period' | | length of each cycle, in minutes | 30 |
+-------------+---+------------------------------------+-------+
| 'variation' | * | the amount to +/- from 'frequency' | 0 |
+-------------+---+------------------------------------+-------+
| (also include "bare minimum parameters" - see above) |
+--------------------------------------------------------------+
### Surge
The wave algorithm generates a group of aircraft back to back. For departures
the spacing is 10 seconds, for arrivals, you can specify the entrail distance
while in and out of the "surge". This way, a "surge" can be gentle, or extreme,
and at any arrival rate.
Note that if you request something that's impossible to deliver, like either...
- "frequency": 50, "entrail": [ 7, 15] <-- even if all are 7MIT, that's 35acph
- "frequency": 7, "entrail": [10, 25] <-- even if all are 25MIT, that's 10acph
- Note: The above assumes spawn speed of 250kts, for example purposes
...the game will throw a warning in the console advising you that it has
clamped the arrival rate to match the entrail and speed settings, and it tells
you what range of frequencies it is mathematically capable of delivering.
PARAMETERS SPECIFIC TO 'SURGE':
PARAMETER REQ PARAMETER DESCRIPTION DEFAULT
+-----------+---+---------------------------------------------+-------+
| 'offset' | | min into the cycle to start at | 0 |
+-----------+---+---------------------------------------------+-------+
| 'period' | | length of each cycle, in minutes | 30 |
+-----------+---+---------------------------------------------+-------+
| | | array of: | |
| 'entrail' | * | [ miles between arrivals during the surge, | [5.5, | <-- only for arrivals
| | | miles between arrivals during the lull ] | 10] |
+-----------+---+---------------------------------------------+-------+
| (also include "bare minimum parameters" - see above) |
+---------------------------------------------------------------------+
Aircraft/Airline selectors
--------------------------
Both departure and arrival blocks specify a weighted list of airlines
to use for that block. The airline code may be optionally followed by
a particular fleet for that operator.
Example:
```
"airlines": [
["BAW", 10],
["AAL/long", 2]
]
Select an aircraft from BAW's (British Airways) default fleet five
times as often as an aircraft is selected from AAL's (American
Airlines) long haul fleet.
| {
"content_hash": "9e3cf0951b7466fe5fdc93223887a72e",
"timestamp": "",
"source": "github",
"line_count": 307,
"max_line_length": 177,
"avg_line_length": 56.0586319218241,
"alnum_prop": 0.5700174317257408,
"repo_name": "tedrek/atc",
"id": "0f58b7f608af123f1b46bf6e669cdbf28b23979a",
"size": "17215",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "documentation/airport-format.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "11957"
},
{
"name": "HTML",
"bytes": "3593"
},
{
"name": "JavaScript",
"bytes": "308012"
},
{
"name": "Ruby",
"bytes": "3500"
}
],
"symlink_target": ""
} |
package com.evolveum.midpoint.wf.impl.processes.itemApproval;
import com.evolveum.midpoint.prism.util.PrismUtil;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.schema.util.WfContextUtil;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.util.exception.SystemException;
import com.evolveum.midpoint.util.logging.LoggingUtils;
import com.evolveum.midpoint.util.logging.Trace;
import com.evolveum.midpoint.util.logging.TraceManager;
import com.evolveum.midpoint.wf.impl.messages.ProcessEvent;
import com.evolveum.midpoint.wf.impl.processes.BaseProcessMidPointInterface;
import com.evolveum.midpoint.wf.impl.processes.common.ActivitiUtil;
import com.evolveum.midpoint.wf.impl.processors.primary.PcpChildWfTaskCreationInstruction;
import com.evolveum.midpoint.wf.impl.processors.primary.PcpWfTask;
import com.evolveum.midpoint.wf.impl.tasks.WfTaskCreationInstruction;
import com.evolveum.midpoint.wf.util.ApprovalUtils;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
import com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType;
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import static com.evolveum.midpoint.wf.impl.processes.common.CommonProcessVariableNames.*;
/**
* @author mederly
*/
@Component
public class ItemApprovalProcessInterface extends BaseProcessMidPointInterface {
private static final Trace LOGGER = TraceManager.getTrace(ItemApprovalProcessInterface.class);
public static final String PROCESS_DEFINITION_KEY = "ItemApproval";
public void prepareStartInstruction(WfTaskCreationInstruction instruction) {
instruction.setProcessName(PROCESS_DEFINITION_KEY);
instruction.setSimple(false);
instruction.setSendStartConfirmation(true);
instruction.setProcessInterfaceBean(this);
if (LOGGER.isDebugEnabled() && instruction instanceof PcpChildWfTaskCreationInstruction) {
PcpChildWfTaskCreationInstruction instr = (PcpChildWfTaskCreationInstruction) instruction;
LOGGER.debug("About to start approval process instance '{}'", instr.getProcessInstanceName());
if (instr.getProcessContent() instanceof ItemApprovalSpecificContent) {
ItemApprovalSpecificContent iasc = (ItemApprovalSpecificContent) instr.getProcessContent();
LOGGER.debug("Approval schema XML:\n{}", PrismUtil.serializeQuietlyLazily(prismContext, iasc.approvalSchemaType));
LOGGER.debug("Attached rules:\n{}", PrismUtil.serializeQuietlyLazily(prismContext, iasc.policyRules));
}
}
}
@Override
public WorkItemResultType extractWorkItemResult(Map<String, Object> variables) {
Boolean wasCompleted = ActivitiUtil.getVariable(variables, VARIABLE_WORK_ITEM_WAS_COMPLETED, Boolean.class, prismContext);
if (BooleanUtils.isNotTrue(wasCompleted)) {
return null;
}
WorkItemResultType result = new WorkItemResultType(prismContext);
result.setOutcome(ActivitiUtil.getVariable(variables, FORM_FIELD_OUTCOME, String.class, prismContext));
result.setComment(ActivitiUtil.getVariable(variables, FORM_FIELD_COMMENT, String.class, prismContext));
String additionalDeltaString = ActivitiUtil.getVariable(variables, FORM_FIELD_ADDITIONAL_DELTA, String.class, prismContext);
boolean isApproved = ApprovalUtils.isApproved(result);
if (isApproved && StringUtils.isNotEmpty(additionalDeltaString)) {
try {
ObjectDeltaType additionalDelta = prismContext.parserFor(additionalDeltaString).parseRealValue(ObjectDeltaType.class);
ObjectTreeDeltasType treeDeltas = new ObjectTreeDeltasType();
treeDeltas.setFocusPrimaryDelta(additionalDelta);
result.setAdditionalDeltas(treeDeltas);
} catch (SchemaException e) {
LoggingUtils.logUnexpectedException(LOGGER, "Couldn't parse delta received from the activiti form:\n{}", e, additionalDeltaString);
throw new SystemException("Couldn't parse delta received from the activiti form: " + e.getMessage(), e);
}
}
return result;
}
@Override
public WfProcessSpecificWorkItemPartType extractProcessSpecificWorkItemPart(Map<String, Object> variables) {
// nothing to do here for now
return null;
}
@Override
public List<ObjectReferenceType> prepareApprovedBy(ProcessEvent event, PcpWfTask job, OperationResult result) {
WfContextType wfc = job.getTask().getWorkflowContext();
List<ObjectReferenceType> rv = new ArrayList<>();
if (!ApprovalUtils.isApprovedFromUri(event.getOutcome())) { // wfc.approved is not filled in yet
return rv;
}
for (WorkItemCompletionEventType completionEvent : WfContextUtil.getEvents(wfc, WorkItemCompletionEventType.class)) {
if (ApprovalUtils.isApproved(completionEvent.getOutput()) && completionEvent.getInitiatorRef() != null) {
rv.add(completionEvent.getInitiatorRef().clone());
}
}
return rv;
}
}
| {
"content_hash": "21431ba6ca78509be5a7f64e3524bb87",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 135,
"avg_line_length": 47.160377358490564,
"alnum_prop": 0.794758951790358,
"repo_name": "Pardus-Engerek/engerek",
"id": "9a90f23dcc755001e4a5a7aef80a26939e2abe93",
"size": "5600",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processes/itemApproval/ItemApprovalProcessInterface.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "326114"
},
{
"name": "CSS",
"bytes": "239831"
},
{
"name": "HTML",
"bytes": "1850180"
},
{
"name": "Java",
"bytes": "27920377"
},
{
"name": "JavaScript",
"bytes": "17360"
},
{
"name": "PLSQL",
"bytes": "174615"
},
{
"name": "PLpgSQL",
"bytes": "9336"
},
{
"name": "Shell",
"bytes": "397540"
}
],
"symlink_target": ""
} |
package org.apache.batik.dom.svg;
import org.apache.batik.dom.AbstractDocument;
import org.apache.batik.dom.util.DoublyIndexedTable;
import org.apache.batik.dom.util.XLinkSupport;
import org.apache.batik.dom.util.XMLSupport;
import org.apache.batik.util.SVGTypes;
import org.w3c.dom.Node;
import org.w3c.dom.svg.SVGAnimatedBoolean;
import org.w3c.dom.svg.SVGMPathElement;
/**
* This class implements {@link SVGMPathElement}.
*
* @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
* @version $Id: SVGOMMPathElement.java 489964 2006-12-24 01:30:23Z cam $
*/
public class SVGOMMPathElement
extends SVGOMURIReferenceElement
implements SVGMPathElement {
/**
* Table mapping XML attribute names to TraitInformation objects.
*/
protected static DoublyIndexedTable xmlTraitInformation;
static {
DoublyIndexedTable t =
new DoublyIndexedTable(SVGOMURIReferenceElement.xmlTraitInformation);
t.put(null, SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE,
new TraitInformation(true, SVGTypes.TYPE_BOOLEAN));
xmlTraitInformation = t;
}
/**
* The attribute initializer.
*/
protected static final AttributeInitializer attributeInitializer;
static {
attributeInitializer = new AttributeInitializer(4);
attributeInitializer.addAttribute(XMLSupport.XMLNS_NAMESPACE_URI,
null, "xmlns:xlink",
XLinkSupport.XLINK_NAMESPACE_URI);
attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
"xlink", "type", "simple");
attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
"xlink", "show", "other");
attributeInitializer.addAttribute(XLinkSupport.XLINK_NAMESPACE_URI,
"xlink", "actuate", "onLoad");
}
/**
* The 'externalResourcesRequired' attribute value.
*/
protected SVGOMAnimatedBoolean externalResourcesRequired;
/**
* Creates a new SVGOMMPathElement object.
*/
protected SVGOMMPathElement() {
}
/**
* Creates a new SVGOMMPathElement object.
* @param prefix The namespace prefix.
* @param owner The owner document.
*/
public SVGOMMPathElement(String prefix, AbstractDocument owner) {
super(prefix, owner);
initializeLiveAttributes();
}
/**
* Initializes all live attributes for this element.
*/
protected void initializeAllLiveAttributes() {
super.initializeAllLiveAttributes();
initializeLiveAttributes();
}
/**
* Initializes the live attribute values of this element.
*/
private void initializeLiveAttributes() {
externalResourcesRequired =
createLiveAnimatedBoolean
(null, SVG_EXTERNAL_RESOURCES_REQUIRED_ATTRIBUTE, false);
}
/**
* <b>DOM</b>: Implements {@link Node#getLocalName()}.
*/
public String getLocalName() {
return SVG_MPATH_TAG;
}
// SVGExternalResourcesRequired support /////////////////////////////
/**
* <b>DOM</b>: Implements {@link
* org.w3c.dom.svg.SVGExternalResourcesRequired#getExternalResourcesRequired()}.
*/
public SVGAnimatedBoolean getExternalResourcesRequired() {
return externalResourcesRequired;
}
/**
* Returns the AttributeInitializer for this element type.
* @return null if this element has no attribute with a default value.
*/
protected AttributeInitializer getAttributeInitializer() {
return attributeInitializer;
}
/**
* Returns a new uninitialized instance of this object's class.
*/
protected Node newNode() {
return new SVGOMMPathElement();
}
/**
* Returns the table of TraitInformation objects for this element.
*/
protected DoublyIndexedTable getTraitInformationTable() {
return xmlTraitInformation;
}
}
| {
"content_hash": "b2bea81bbb1ae0715132e0ba2f73a6a6",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 84,
"avg_line_length": 31.728682170542637,
"alnum_prop": 0.6459809430735401,
"repo_name": "Groostav/CMPT880-term-project",
"id": "adcb7ded65643811ecb4bb33e0525c9c2f21879f",
"size": "4892",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/svg/SVGOMMPathElement.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "1871"
},
{
"name": "Batchfile",
"bytes": "8442"
},
{
"name": "CSS",
"bytes": "42838"
},
{
"name": "HTML",
"bytes": "162936"
},
{
"name": "Java",
"bytes": "32857006"
},
{
"name": "JavaScript",
"bytes": "289074"
},
{
"name": "Kotlin",
"bytes": "10362"
},
{
"name": "Makefile",
"bytes": "278"
},
{
"name": "PowerShell",
"bytes": "214"
},
{
"name": "Shell",
"bytes": "29826"
},
{
"name": "XSLT",
"bytes": "45376"
}
],
"symlink_target": ""
} |
FROM ubuntu:xenial-20170510
MAINTAINER https://about.me/chihchun
RUN sed -e s%http://archive.ubuntu.com/ubuntu/%mirror://mirrors.ubuntu.com/mirrors.txt% -i /etc/apt/sources.list
RUN apt-get update \
&& apt-get dist-upgrade -y
RUN apt-get install --no-install-recommends -y firefox ttf-wqy-microhei default-java-plugin
# Setup locales for input methods.
RUN apt-get install -y locales \
&& locale-gen zh_TW zh_TW.UTF-8 zh_CN zh_CN.UTF-8 en
# Setup timezone
RUN apt-get install -y tzdata \
&& ln -fs /usr/share/zoneinfo/Asia/Taipei /etc/localtime
RUN apt-get install --no-install-recommends -y pcscd pcsc-tools
# setup sudo for pcscd
RUN apt-get install -y sudo \
&& echo "firefox ALL=NOPASSWD: /etc/init.d/pcscd, /bin/su, /usr/local/src/mLNHIICC_Setup/mLNHIICC" >> /etc/sudoers.d/firefox
# vim for debug purpose.
# RUN apt-get install -y vim
RUN useradd --create-home firefox
RUN echo 'pref("browser.startup.homepage", "https://rtn.tax.nat.gov.tw/ircweb/index.jsp");' >> /etc/firefox/syspref.js \
&& echo 'pref("plugin.load_flash_only", false);' >> /etc/firefox/syspref.js \
&& echo 'pref("xpinstall.signatures.required", false);' >> /etc/firefox/syspref.js \
&& echo 'pref("extensions.enabledAddons", "hipki%40chttl.com.tw:1.5.1.2479,%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:53.0.2");' >> /etc/firefox/syspref.js \
&& echo 'pref("privacy.cpd.passwords", true);' >> /etc/firefox/syspref.js \
&& echo 'pref("dom.disable_open_during_load", false);' >> /etc/firefox/syspref.js
# Setup Firefox extensions
RUN apt-get install --no-install-recommends -y wget unzip
RUN mkdir -p /usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} \
&& wget --no-check-certificate -O \
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/hipki@chttl.com.tw.xpi https://rtn.tax.nat.gov.tw/ircweb/include/npHiPKIClient-linux-etax64.xpi
# Setup for reading Health Insurance ID Card
# Install script for plugin of Health Insurance ID Card will use killall command
RUN apt-get install --no-install-recommends -y libnss3-tools psmisc \
&& wget --no-check-certificate -P /tmp https://cloudicweb.nhi.gov.tw/cloudic/system/SMC/mLNHIICC_Setup.Ubuntu.zip \
&& unzip -d /tmp /tmp/mLNHIICC_Setup.Ubuntu.zip \
&& tar zxvf /tmp/mLNHIICC_Setup.Ubuntu16.tar.gz -C /usr/local/src \
&& cd /usr/local/src/mLNHIICC_Setup/ && ./Install \
&& sed -i '2i. /lib/lsb/init-functions' /usr/local/src/mLNHIICC_Setup/mLNHIICC \
&& rm -rf /tmp/*
# Install COMODO RSA Organization Validation Secure Server CA (SHA-2) for the NHIICC daemon.
RUN wget -O /usr/local/share/ca-certificates/comodorsaorganizationvalidationsecureserverca.crt https://support.comodo.com/index.php?/Knowledgebase/Article/GetAttachment/968/821025 \
&& wget -O /usr/local/share/ca-certificates/comodorsadomainvalidationsecureserverca.crt https://support.comodo.com/index.php?/Knowledgebase/Article/GetAttachment/970/821027 \
&& update-ca-certificates
ADD start.sh /usr/local/bin
RUN chmod 755 /usr/local/bin/start.sh
USER 1000
# Install the HiPKI plugin. But the plugin is blocked by default.
RUN mkdir -p /home/firefox/.mozilla && \
unzip -d /home/firefox/.mozilla/ /usr/share/mozilla/extensions/\{ec8030f7-c20a-464f-9b0e-13a3a9e97384\}/hipki\@chttl.com.tw.xpi plugins/*
# This approach does not work, the user still need to approve the extenstion manually.
# RUN mkdir -p /home/firefox/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384} \
# && wget --no-check-certificate -O \
# /home/firefox/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/hipki@chttl.com.tw.xpi https://rtn.tax.nat.gov.tw/ircweb/include/npHiPKIClient-linux-etax64.xpi
CMD /usr/local/bin/start.sh
| {
"content_hash": "f0cd259df89765eed10d1b648f134699",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 181,
"avg_line_length": 55.07462686567164,
"alnum_prop": 0.740650406504065,
"repo_name": "chihchun/personal-income-tax-docker",
"id": "12fa3c03fe037b65b192041a5ac9babcba0e991c",
"size": "3690",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "2017/Dockerfile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Dockerfile",
"bytes": "8619"
},
{
"name": "Shell",
"bytes": "4443"
}
],
"symlink_target": ""
} |
class Fix16 {
public:
fix16_t value;
Fix16() { value = 0; }
Fix16(const Fix16 &inValue) { value = inValue.value; }
Fix16(const fix16_t inValue) { value = inValue; }
Fix16(const float inValue) { value = fix16_from_float(inValue); }
Fix16(const double inValue) { value = fix16_from_dbl(inValue); }
Fix16(const int16_t inValue) { value = fix16_from_int(inValue); }
operator fix16_t() const { return value; }
operator double() const { return fix16_to_dbl(value); }
operator float() const { return fix16_to_float(value); }
operator int16_t() const { return fix16_to_int(value); }
operator bool() const { return bool(value); }
Fix16 & operator=(const Fix16 &rhs) { value = rhs.value; return *this; }
Fix16 & operator=(const fix16_t rhs) { value = rhs; return *this; }
Fix16 & operator=(const double rhs) { value = fix16_from_dbl(rhs); return *this; }
Fix16 & operator=(const float rhs) { value = fix16_from_float(rhs); return *this; }
Fix16 & operator=(const int16_t rhs) { value = fix16_from_int(rhs); return *this; }
Fix16 & operator+=(const Fix16 &rhs) { value = fix16_add(value, rhs.value); return *this; }
Fix16 & operator+=(const fix16_t rhs) { value = fix16_add(value, rhs); return *this; }
Fix16 & operator+=(const double rhs) { value = fix16_add(value, fix16_from_dbl(rhs)); return *this; }
Fix16 & operator+=(const float rhs) { value = fix16_add(value, fix16_from_float(rhs)); return *this; }
Fix16 & operator+=(const int16_t rhs) { value = fix16_add(value, fix16_from_int(rhs)); return *this; }
Fix16 & operator-=(const Fix16 &rhs) { value = fix16_sub(value, rhs.value); return *this; }
Fix16 & operator-=(const fix16_t rhs) { value = fix16_sub(value, rhs); return *this; }
Fix16 & operator-=(const double rhs) { value = fix16_sub(value, fix16_from_dbl(rhs)); return *this; }
Fix16 & operator-=(const float rhs) { value = fix16_sub(value, fix16_from_float(rhs)); return *this; }
Fix16 & operator-=(const int16_t rhs) { value = fix16_sub(value, fix16_from_int(rhs)); return *this; }
Fix16 & operator*=(const Fix16 &rhs) { value = fix16_mul(value, rhs.value); return *this; }
Fix16 & operator*=(const fix16_t rhs) { value = fix16_mul(value, rhs); return *this; }
Fix16 & operator*=(const double rhs) { value = fix16_mul(value, fix16_from_dbl(rhs)); return *this; }
Fix16 & operator*=(const float rhs) { value = fix16_mul(value, fix16_from_float(rhs)); return *this; }
Fix16 & operator*=(const int16_t rhs) { value = fix16_mul(value, fix16_from_int(rhs)); return *this; }
Fix16 & operator/=(const Fix16 &rhs) { value = fix16_div(value, rhs.value); return *this; }
Fix16 & operator/=(const fix16_t rhs) { value = fix16_div(value, rhs); return *this; }
Fix16 & operator/=(const double rhs) { value = fix16_div(value, fix16_from_dbl(rhs)); return *this; }
Fix16 & operator/=(const float rhs) { value = fix16_div(value, fix16_from_float(rhs)); return *this; }
Fix16 & operator/=(const int16_t rhs) { value = fix16_div(value, fix16_from_int(rhs)); return *this; }
const Fix16 operator+(const Fix16 &other) const { Fix16 ret = *this; ret += other; return ret; }
const Fix16 operator+(const fix16_t other) const { Fix16 ret = *this; ret += other; return ret; }
const Fix16 operator+(const double other) const { Fix16 ret = *this; ret += other; return ret; }
const Fix16 operator+(const float other) const { Fix16 ret = *this; ret += other; return ret; }
const Fix16 operator+(const int16_t other) const { Fix16 ret = *this; ret += other; return ret; }
#ifndef FIXMATH_NO_OVERFLOW
const Fix16 sadd(const Fix16 &other) const { Fix16 ret = fix16_sadd(value, other.value); return ret; }
const Fix16 sadd(const fix16_t other) const { Fix16 ret = fix16_sadd(value, other); return ret; }
const Fix16 sadd(const double other) const { Fix16 ret = fix16_sadd(value, fix16_from_dbl(other)); return ret; }
const Fix16 sadd(const float other) const { Fix16 ret = fix16_sadd(value, fix16_from_float(other)); return ret; }
const Fix16 sadd(const int16_t other) const { Fix16 ret = fix16_sadd(value, fix16_from_int(other)); return ret; }
#endif
const Fix16 operator-(const Fix16 &other) const { Fix16 ret = *this; ret -= other; return ret; }
const Fix16 operator-(const fix16_t other) const { Fix16 ret = *this; ret -= other; return ret; }
const Fix16 operator-(const double other) const { Fix16 ret = *this; ret -= other; return ret; }
const Fix16 operator-(const float other) const { Fix16 ret = *this; ret -= other; return ret; }
const Fix16 operator-(const int16_t other) const { Fix16 ret = *this; ret -= other; return ret; }
#ifndef FIXMATH_NO_OVERFLOW
const Fix16 ssub(const Fix16 &other) const { Fix16 ret = fix16_sadd(value, -other.value); return ret; }
const Fix16 ssub(const fix16_t other) const { Fix16 ret = fix16_sadd(value, -other); return ret; }
const Fix16 ssub(const double other) const { Fix16 ret = fix16_sadd(value, -fix16_from_dbl(other)); return ret; }
const Fix16 ssub(const float other) const { Fix16 ret = fix16_sadd(value, -fix16_from_float(other)); return ret; }
const Fix16 ssub(const int16_t other) const { Fix16 ret = fix16_sadd(value, -fix16_from_int(other)); return ret; }
#endif
const Fix16 operator*(const Fix16 &other) const { Fix16 ret = *this; ret *= other; return ret; }
const Fix16 operator*(const fix16_t other) const { Fix16 ret = *this; ret *= other; return ret; }
const Fix16 operator*(const double other) const { Fix16 ret = *this; ret *= other; return ret; }
const Fix16 operator*(const float other) const { Fix16 ret = *this; ret *= other; return ret; }
const Fix16 operator*(const int16_t other) const { Fix16 ret = *this; ret *= other; return ret; }
#ifndef FIXMATH_NO_OVERFLOW
const Fix16 smul(const Fix16 &other) const { Fix16 ret = fix16_smul(value, other.value); return ret; }
const Fix16 smul(const fix16_t other) const { Fix16 ret = fix16_smul(value, other); return ret; }
const Fix16 smul(const double other) const { Fix16 ret = fix16_smul(value, fix16_from_dbl(other)); return ret; }
const Fix16 smul(const float other) const { Fix16 ret = fix16_smul(value, fix16_from_float(other)); return ret; }
const Fix16 smul(const int16_t other) const { Fix16 ret = fix16_smul(value, fix16_from_int(other)); return ret; }
#endif
const Fix16 operator/(const Fix16 &other) const { Fix16 ret = *this; ret /= other; return ret; }
const Fix16 operator/(const fix16_t other) const { Fix16 ret = *this; ret /= other; return ret; }
const Fix16 operator/(const double other) const { Fix16 ret = *this; ret /= other; return ret; }
const Fix16 operator/(const float other) const { Fix16 ret = *this; ret /= other; return ret; }
const Fix16 operator/(const int16_t other) const { Fix16 ret = *this; ret /= other; return ret; }
#ifndef FIXMATH_NO_OVERFLOW
const Fix16 sdiv(const Fix16 &other) const { Fix16 ret = fix16_sdiv(value, other.value); return ret; }
const Fix16 sdiv(const fix16_t other) const { Fix16 ret = fix16_sdiv(value, other); return ret; }
const Fix16 sdiv(const double other) const { Fix16 ret = fix16_sdiv(value, fix16_from_dbl(other)); return ret; }
const Fix16 sdiv(const float other) const { Fix16 ret = fix16_sdiv(value, fix16_from_float(other)); return ret; }
const Fix16 sdiv(const int16_t other) const { Fix16 ret = fix16_sdiv(value, fix16_from_int(other)); return ret; }
#endif
const int operator==(const Fix16 &other) const { return (value == other.value); }
const int operator==(const fix16_t other) const { return (value == other); }
const int operator==(const double other) const { return (value == fix16_from_dbl(other)); }
const int operator==(const float other) const { return (value == fix16_from_float(other)); }
const int operator==(const int16_t other) const { return (value == fix16_from_int(other)); }
const int operator!=(const Fix16 &other) const { return (value != other.value); }
const int operator!=(const fix16_t other) const { return (value != other); }
const int operator!=(const double other) const { return (value != fix16_from_dbl(other)); }
const int operator!=(const float other) const { return (value != fix16_from_float(other)); }
const int operator!=(const int16_t other) const { return (value != fix16_from_int(other)); }
const int operator<=(const Fix16 &other) const { return (value <= other.value); }
const int operator<=(const fix16_t other) const { return (value <= other); }
const int operator<=(const double other) const { return (value <= fix16_from_dbl(other)); }
const int operator<=(const float other) const { return (value <= fix16_from_float(other)); }
const int operator<=(const int16_t other) const { return (value <= fix16_from_int(other)); }
const int operator>=(const Fix16 &other) const { return (value >= other.value); }
const int operator>=(const fix16_t other) const { return (value >= other); }
const int operator>=(const double other) const { return (value >= fix16_from_dbl(other)); }
const int operator>=(const float other) const { return (value >= fix16_from_float(other)); }
const int operator>=(const int16_t other) const { return (value >= fix16_from_int(other)); }
const int operator< (const Fix16 &other) const { return (value < other.value); }
const int operator< (const fix16_t other) const { return (value < other); }
const int operator< (const double other) const { return (value < fix16_from_dbl(other)); }
const int operator< (const float other) const { return (value < fix16_from_float(other)); }
const int operator< (const int16_t other) const { return (value < fix16_from_int(other)); }
const int operator> (const Fix16 &other) const { return (value > other.value); }
const int operator> (const fix16_t other) const { return (value > other); }
const int operator> (const double other) const { return (value > fix16_from_dbl(other)); }
const int operator> (const float other) const { return (value > fix16_from_float(other)); }
const int operator> (const int16_t other) const { return (value > fix16_from_int(other)); }
Fix16 sin() { return Fix16(fix16_sin(value)); }
Fix16 cos() { return Fix16(fix16_cos(value)); }
Fix16 tan() { return Fix16(fix16_tan(value)); }
Fix16 asin() { return Fix16(fix16_asin(value)); }
Fix16 acos() { return Fix16(fix16_acos(value)); }
Fix16 atan() { return Fix16(fix16_atan(value)); }
Fix16 atan2(const Fix16 &inY) { return Fix16(fix16_atan2(value, inY.value)); }
Fix16 sqrt() { return Fix16(fix16_sqrt(value)); }
};
#endif
| {
"content_hash": "41874a5da7ccee1c0376b6cb6c527b6e",
"timestamp": "",
"source": "github",
"line_count": 150,
"max_line_length": 118,
"avg_line_length": 73.94,
"alnum_prop": 0.6496258227391579,
"repo_name": "Yveaux/Arduino_fixpt",
"id": "8e8765cba1393da64584b79c4e8e5687e24227bf",
"size": "11178",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "fix16.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Arduino",
"bytes": "28416"
},
{
"name": "C",
"bytes": "776846"
},
{
"name": "C++",
"bytes": "37955"
}
],
"symlink_target": ""
} |
#include "CubicVR/StringUtil.h"
/* replace all occurances of needle with replacement in haystack */
void str_replace(const string &needle, const string &replacement, string &haystack)
{
int needlepos, needle_length;
needle_length = needle.length();
while ((needlepos=haystack.find(needle,0)) != string::npos)
{
haystack.replace(needlepos,needle_length,replacement);
}
}
/* split a string by 'seperator' into a vector of string pointers */
void str_explode(vector<string> &vect_out, const string &seperator, const string &in_str)
{
int i = 0, j = 0;
int seperator_len = seperator.length();
int str_len = in_str.length();
while(i < str_len)
{
j = in_str.find_first_of(seperator,i);
if (j == string::npos && i < str_len) j = str_len;
if (j == string::npos) break;
vect_out.push_back(in_str.substr(i,j-i));
i = j;
i+=seperator_len;
}
}
void str_implode(string &str_out, const string &seperator, vector<string> &str_vect)
{
vector<string>::iterator i;
vector<string>::iterator vect_begin = str_vect.begin();
vector<string>::iterator vect_end = str_vect.end();
for (i = vect_begin; i != vect_end; i++)
{
if (i != vect_begin) str_out.append(seperator);
str_out.append(*i);
}
}
void str_file_extract(string path_in, string &path_str,string &file_str,string &file_base,string &file_ext)
{
if (path_in.length() == 0) {
return;
}
vector<string> fileArray;
str_explode(fileArray,PATH_SEP,path_in);
file_str = fileArray.back();
fileArray.pop_back();
str_implode(path_str, PATH_SEP, fileArray);
vector<string> fileNameArray;
str_explode(fileNameArray,".",file_str);
file_ext = fileNameArray.back();
fileNameArray.pop_back();
str_implode(file_base,".",fileNameArray);
}
| {
"content_hash": "526ad42ea3a029bf56e92ae4aa1f5d25",
"timestamp": "",
"source": "github",
"line_count": 83,
"max_line_length": 107,
"avg_line_length": 21.216867469879517,
"alnum_prop": 0.6672345258375922,
"repo_name": "cjcliffe/CubicVR",
"id": "e2fef89c7b5cfdc2b7a8a6fc1ec5f31f0f5ba846",
"size": "1761",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cubicvr/source/StringUtil.cpp",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2657550"
},
{
"name": "C++",
"bytes": "4755472"
},
{
"name": "Coq",
"bytes": "2295"
},
{
"name": "FORTRAN",
"bytes": "42971"
},
{
"name": "Objective-C",
"bytes": "154060"
},
{
"name": "Verilog",
"bytes": "12492"
}
],
"symlink_target": ""
} |
module Mux
export mux, stack, branch
# This might be the smallest core ever.
mux(f) = f
mux(m, f) = x -> m(f, x)
mux(ms...) = foldr(mux, ms)
stack(m) = m
stack(m, n) = (f, x) -> m(mux(n, f), x)
stack(ms...) = foldl(stack, ms)
branch(p, t) = (f, x) -> (p(x) ? t : f)(x)
branch(p, t...) = branch(p, mux(t...))
# May as well provide a few conveniences, though.
using Hiccup
using Compat
include("server.jl")
include("basics.jl")
include("routing.jl")
include("websockets.jl")
include("examples/basic.jl")
include("examples/files.jl")
defaults = stack(todict, basiccatch, splitquery, toresponse)
wdefaults = stack(todict, wcatch, splitquery)
end
| {
"content_hash": "f6146ef77b6c20a7a309853ea1fcfe5c",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 60,
"avg_line_length": 18.685714285714287,
"alnum_prop": 0.6437308868501529,
"repo_name": "jiahao/Mux.jl",
"id": "737b59478c8a16163c3765d8814b316b6269c237",
"size": "655",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Mux.jl",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Julia",
"bytes": "7636"
}
],
"symlink_target": ""
} |
Terms lack a native concept to represent cross-references.
Spoofax maintains name binding information and associated data such as type information in a global environment called *the index*, which is shared by various transformations.
By collecting all this information about files in a project together, it ensures fast access to global information (in particular, to-be-referenced names). The index is updated automatically when files change (or are deleted) and is persisted as Eclipse exits.
#### URIs
All entries in the index have a *URI* which uniquely identifies the element across a project.
These URIs are the basis for name resolution, and, by default, are constructed automatically, based on the name binding rules.
As an example, consider the following entity:
module storage
entity Store {
name : String
address : Address
}
Following the name binding rules discussed so far, there are two scope levels in this fragment:
one at the module level and one at the entity level. We can assign names to these scopes (`storage` and `Store`) by using the naming rules for modules and entities.
By creating a hierarchy of these names, Spoofax creates URIs: the URI for `Store` is `Entity://storage.Store`, and the one for `name` is `Property:// storage.Store.name`. URIs are represented internally as lists of terms, that start with the namespace, followed by a reverse hierarchy of the path names. The reverse order used in the representation makes it easier to efficiently store and manipulate URIs in memory: every tail of such a list can share the same memory space. For the `name` property of the `Store` entity in the storage module, this would be:
[Property(), "name", "Store", "storage"]
#### Annotated URIs
Spoofax annotates each definition and reference with a URI to connect names with information stored in the index.
References are annotated with the same URI as their definition.
This way, information about the definition site are also available at the reference.
References that cannot be resolved are annotated with a special `Unresolved` constructor.
For example, an unresolved variable could be represented as
Var("x"{[Unresolved(Var()),"x",...]})
We can inspect URIs in Spoofax’ analyzed syntax view.
This view shows the abstract syntax with all URIs as annotations.
### Query Name Information
```
index-uri
index-namespace
```
### Lookup Names
```
index-lookup
index-lookup-all
index-get-files-of
index-get-all-in-file
index-get-current-file
```
### Associated Data
| {
"content_hash": "df4da6837c7330f561e8d7ad524683bf",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 560,
"avg_line_length": 45.642857142857146,
"alnum_prop": 0.7644757433489828,
"repo_name": "codeZeilen/metaborg.github.io",
"id": "588400022293eb1a5e72190ff01de448f86556ca",
"size": "2630",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "nabl/API.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "43976"
},
{
"name": "HTML",
"bytes": "98162"
},
{
"name": "JavaScript",
"bytes": "53321"
},
{
"name": "Makefile",
"bytes": "200"
},
{
"name": "Ruby",
"bytes": "2325"
}
],
"symlink_target": ""
} |
package visionai_poc
//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// PropertiesResults is a nested struct in visionai_poc response
type PropertiesResults struct {
PropertyId string `json:"PropertyId" xml:"PropertyId"`
PropertyName string `json:"PropertyName" xml:"PropertyName"`
Values []SubNode `json:"Values" xml:"Values"`
}
| {
"content_hash": "54ddbe28d33b49e30377cbcc84bbb8d8",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 84,
"avg_line_length": 42.869565217391305,
"alnum_prop": 0.7586206896551724,
"repo_name": "aliyun/alibaba-cloud-sdk-go",
"id": "9ff1d7b7acfb2e1ee4c35163e0f974f41e49dc5d",
"size": "986",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "services/visionai-poc/struct_properties_results.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "734307"
},
{
"name": "Makefile",
"bytes": "183"
}
],
"symlink_target": ""
} |
import ansiblelint
import os
print(os.path.dirname(ansiblelint.__file__))
| {
"content_hash": "789bad528dbeac7d424f3ff58a35496a",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 44,
"avg_line_length": 18.75,
"alnum_prop": 0.7733333333333333,
"repo_name": "wied03/ansible-ruby",
"id": "81b0fcbd851b9d71ec80f0059dbe70c85aa52bc8",
"size": "94",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "util/get_ansible_lint.py",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Python",
"bytes": "180"
},
{
"name": "Ruby",
"bytes": "5807644"
}
],
"symlink_target": ""
} |
package io.wcm.qa.glnm.hamcrest.selector;
import org.hamcrest.Matcher;
import io.wcm.qa.glnm.hamcrest.TypeSafeWrappingMatcher;
import io.wcm.qa.glnm.selectors.base.Selector;
/**
* Base class for matching based on {@link io.wcm.qa.glnm.selectors.base.Selector}.
*
* @param <T> type to match
* @since 5.0.0
*/
public abstract class SelectorMatcher<T> extends TypeSafeWrappingMatcher<Selector, T> {
private Selector selector;
protected SelectorMatcher(Matcher<T> matcher) {
super(matcher);
}
protected Selector getSelector() {
return selector;
}
protected String getSelectorName() {
Selector s = getSelector();
if (s != null) {
return s.elementName();
}
return "NULL";
}
@Override
protected boolean matchesSafely(Selector item) {
setSelector(item);
return super.matchesSafely(item);
}
protected void setSelector(Selector selector) {
this.selector = selector;
}
}
| {
"content_hash": "6be0805635f0014d50e3284f3688db10",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 87,
"avg_line_length": 20.5,
"alnum_prop": 0.6988335100742312,
"repo_name": "wcm-io-qa/wcm-io-qa-galenium",
"id": "7d0c089b2479fa0faea01f751132e10a98a048c7",
"size": "1570",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "modules/icing/src/main/java/io/wcm/qa/glnm/hamcrest/selector/SelectorMatcher.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "734422"
},
{
"name": "JavaScript",
"bytes": "690"
},
{
"name": "Shell",
"bytes": "1867"
}
],
"symlink_target": ""
} |
========
Overview
========
The library contains a derived type: :f:type:`rpe_var`.
This type can be used in place of real-valued variables to perform calculations with floating-point numbers represented with a reduced number of bits in the floating-point significand.
Basic use of the reduced-precision type
=======================================
The :f:type:`rpe_var` type is a simple container for a double precision floating point value.
Using an :f:type:`rpe_var` instance is as simple as declaring it and using it just as you would a real number:
.. code-block:: fortran
TYPE(rpe_var) :: myvar
myvar = 12
myvar = myvar * 1.287 ! reduced-precision result is stored in `myvar`
Controlling the precision
=========================
The precision used by reduced precision types can be controlled at two different levels.
Each reduced precision variable has an :f:var:`sbits` attribute which controls the number of explicit bits in its significand.
This can be set independently for different variables, and comes into effect after it is explicitly set.
.. code-block:: fortran
TYPE(rpe_var) :: myvar1
TYPE(rpe_var) :: myvar2
! Use 16 explicit bits in the significand of myvar1, but only 12 in the
! significand of myvar2.
myvar1%sbits = 16
myvar2%sbits = 12
For variables whose :f:var:`sbits` attribute has not been explicitly set, there is a default global precision level, set by :f:var:`RPE_DEFAULT_SBITS`.
This will stand-in for the number of explicit significand bits in any variable where :f:var:`sbits` has not been set.
Setting :f:var:`RPE_DEFAULT_SBITS` once to define the global default precision, and setting the precision of variables that require other precision manually using the :f:var:`sbits` attribute is generally a good strategy.
However, if you change :f:var:`RPE_DEFAULT_SBITS` during execution, the document :ref:`errors-changing-default-sbits` lists some details you should be aware of.
The emulator can also be turned off completely by setting the module variable :f:var:`RPE_ACTIVE` to ``.FALSE.``.
| {
"content_hash": "36411f016831845de1bec16cb8ab5b64",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 221,
"avg_line_length": 46,
"alnum_prop": 0.7318840579710145,
"repo_name": "aopp-pred/rpe",
"id": "b9b023c1326d5d9ac8461797dce09a162f8dab70",
"size": "2070",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/userguide/overview.rst",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Fortran",
"bytes": "107652"
},
{
"name": "Makefile",
"bytes": "15898"
},
{
"name": "Pascal",
"bytes": "1267"
},
{
"name": "Python",
"bytes": "21687"
},
{
"name": "Shell",
"bytes": "10138"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<!--
- Default SQL error codes for well-known databases.
- Can be overridden by definitions in a "sql-error-codes.xml" file
- in the root of the class path.
-
- If the Database Product Name contains characters that are invalid
- to use in the id attribute (like a space) then we need to add a property
- named "databaseProductName"/"databaseProductNames" that holds this value.
- If this property is present, then it will be used instead of the id for
- looking up the error codes based on the current database.
-->
<beans>
<bean id="DB2" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName">
<value>DB2*</value>
</property>
<property name="badSqlGrammarCodes">
<value>-007,-029,-097,-104,-109,-115,-128,-199,-204,-206,-301,-408,-441,-491</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>-904,-971</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>-407,-530,-531,-532,-543,-544,-545,-603,-667,-803</value>
</property>
<property name="deadlockLoserCodes">
<value>-911,-913</value>
</property>
</bean>
<bean id="Derby" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName">
<value>Apache Derby</value>
</property>
<property name="useSqlStateForTranslation">
<value>true</value>
</property>
<property name="badSqlGrammarCodes">
<value>42802,42821,42X01,42X02,42X03,42X04,42X05,42X06,42X07,42X08</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>04501,08004,42Y07</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>22001,22005,23502,23503,23505,23513,X0Y32</value>
</property>
<property name="cannotAcquireLockCodes">
<value>40XL1</value>
</property>
<property name="deadlockLoserCodes">
<value>40001</value>
</property>
</bean>
<bean id="H2" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes">
<value>42000,42001,42101,42102,42111,42112,42121,42122,42132</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>90046,90100,90117,90121,90126</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>22003,22012,22025,23000,23001</value>
</property>
</bean>
<bean id="HSQL" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName">
<value>HSQL Database Engine</value>
</property>
<property name="badSqlGrammarCodes">
<value>-22,-28</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>-80</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>-9</value>
</property>
</bean>
<bean id="Informix" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName">
<value>Informix Dynamic Server</value>
</property>
<property name="badSqlGrammarCodes">
<value>-201,-217,-696</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>-239,-268,-692,-11030</value>
</property>
</bean>
<bean id="MS-SQL" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductName">
<value>Microsoft SQL Server</value>
</property>
<property name="badSqlGrammarCodes">
<value>156,170,207,208</value>
</property>
<property name="permissionDeniedCodes">
<value>229</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>544,2601,2627,8114,8115</value>
</property>
<property name="deadlockLoserCodes">
<value>1205</value>
</property>
</bean>
<bean id="MySQL" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes">
<value>1054,1064,1146</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>1</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>630,839,840,893,1062,1169,1215,1216,1217,1451,1452,1557</value>
</property>
<property name="cannotAcquireLockCodes">
<value>1205</value>
</property>
<property name="deadlockLoserCodes">
<value>1213</value>
</property>
</bean>
<bean id="Oracle" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="badSqlGrammarCodes">
<value>900,903,904,917,936,942,17006</value>
</property>
<property name="invalidResultSetAccessCodes">
<value>17003</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>17002,17447</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>1,1400,1722,2291,2292</value>
</property>
<property name="cannotAcquireLockCodes">
<value>54</value>
</property>
<property name="cannotSerializeTransactionCodes">
<value>8177</value>
</property>
<property name="deadlockLoserCodes">
<value>60</value>
</property>
</bean>
<bean id="PostgreSQL" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="useSqlStateForTranslation">
<value>true</value>
</property>
<property name="badSqlGrammarCodes">
<value>03000,42000,42601,42602,42622,42804,42P01</value>
</property>
<property name="dataAccessResourceFailureCodes">
<value>53000,53100,53200,53300</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>23000,23502,23503,23505,23514</value>
</property>
<property name="cannotAcquireLockCodes">
<value>55P03</value>
</property>
<property name="cannotSerializeTransactionCodes">
<value>40001</value>
</property>
<property name="deadlockLoserCodes">
<value>40P01</value>
</property>
</bean>
<bean id="Sybase" class="org.springframework.jdbc.support.SQLErrorCodes">
<property name="databaseProductNames">
<list>
<value>Sybase SQL Server</value>
<value>Adaptive Server Enterprise</value>
<value>sql server</value> <!-- name as returned by jTDS driver -->
</list>
</property>
<property name="badSqlGrammarCodes">
<value>101,102,103,104,105,106,107,108,109,110,111,112,113,116,120,121,123,207,208,213,257,512</value>
</property>
<property name="dataIntegrityViolationCodes">
<value>423,511,515,530,547,2601,2615,2714</value>
</property>
<property name="deadlockLoserCodes">
<value>1205</value>
</property>
</bean>
</beans>
| {
"content_hash": "9cf9214fd8829b2492853f9cd78d75bd",
"timestamp": "",
"source": "github",
"line_count": 201,
"max_line_length": 111,
"avg_line_length": 32.25870646766169,
"alnum_prop": 0.7148365206662554,
"repo_name": "godoylucase/test-hibernate",
"id": "df31300a4a8257e5817d9717f0142027b1460a75",
"size": "6484",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spring/org/springframework/jdbc/support/sql-error-codes.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "53116"
},
{
"name": "Java",
"bytes": "58766"
},
{
"name": "JavaScript",
"bytes": "216973"
}
],
"symlink_target": ""
} |
#ifndef SDB_UTILS_PROTO_H
#define SDB_UTILS_PROTO_H 1
#include "core/data.h"
#include <stdint.h>
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* sdb_proto_host, sdb_proto_service, sdb_proto_metric:
* Protocol-specific representations of the basic information of stored
* objects.
*/
typedef struct {
sdb_time_t last_update;
const char *name;
} sdb_proto_host_t;
#define SDB_PROTO_HOST_INIT { 0, NULL }
typedef struct {
sdb_time_t last_update;
const char *hostname;
const char *name;
} sdb_proto_service_t;
#define SDB_PROTO_SERVICE_INIT { 0, NULL, NULL }
typedef struct {
sdb_time_t last_update;
const char *hostname;
const char *name;
const char *store_type; /* optional */
const char *store_id; /* optional */
sdb_time_t store_last_update; /* optional */
} sdb_proto_metric_t;
#define SDB_PROTO_METRIC_INIT { 0, NULL, NULL, NULL, NULL, 0 }
typedef struct {
sdb_time_t last_update;
int parent_type;
const char *hostname; /* optional */
const char *parent;
const char *key;
sdb_data_t value;
} sdb_proto_attribute_t;
#define SDB_PROTO_ATTRIBUTE_INIT { 0, 0, NULL, NULL, NULL, SDB_DATA_INIT }
/*
* sdb_proto_marshal:
* Encode the message into the wire format by adding an appropriate header.
* The encoded message is written to buf which has to be large enough to store
* the header (64 bits) and the entire message.
*
* Returns:
* - The number of bytes of the full encoded message on success. The function
* does not write more than 'buf_len' bytes. If the output was truncated
* then the return value is the number of bytes which would have been
* written if enough space had been available.
* - a negative value on error
*/
ssize_t
sdb_proto_marshal(char *buf, size_t buf_len, uint32_t code,
uint32_t msg_len, const char *msg);
/*
* sdb_proto_marshal_int32:
* Encode the 32-bit integer into the wire format and write it to buf.
*
* Returns:
* - The number of bytes of the encoded value on success. The function does
* not write more than 'buf_len' bytes. If the output was truncated then
* the return value is the number of bytes which would have been written if
* enough space had been available.
* - a negative value else
*/
ssize_t
sdb_proto_marshal_int32(char *buf, size_t buf_len, uint32_t v);
/*
* sdb_proto_marshal_data:
* Encode a datum into the wire format and write it to buf.
*
* Returns:
* - The number of bytes of the full encoded datum on success. The function
* does not write more than 'buf_len' bytes. If the output was truncated
* then the return value is the number of bytes which would have been
* written if enough space had been available.
* - a negative value else
*/
ssize_t
sdb_proto_marshal_data(char *buf, size_t buf_len, const sdb_data_t *datum);
/*
* sdb_proto_marshal_host, sdb_proto_marshal_service,
* sdb_proto_marshal_metric, sdb_proto_marshal_attribute:
* Encode the basic information of a stored object into the wire format and
* write it to buf. These functions are similar to the sdb_store_<type>
* functions. See their documentation for details about the arguments.
*
* Returns:
* - The number of bytes of the full encoded datum on success. The function
* does not write more than 'buf_len' bytes. If the output was truncated
* then the return value is the number of bytes which would have been
* written if enough space had been available.
* - a negative value else
*/
ssize_t
sdb_proto_marshal_host(char *buf, size_t buf_len,
const sdb_proto_host_t *host);
ssize_t
sdb_proto_marshal_service(char *buf, size_t buf_len,
const sdb_proto_service_t *svc);
ssize_t
sdb_proto_marshal_metric(char *buf, size_t buf_len,
const sdb_proto_metric_t *metric);
ssize_t
sdb_proto_marshal_attribute(char *buf, size_t buf_len,
const sdb_proto_attribute_t *attr);
/*
* sdb_proto_unmarshal_header:
* Read and decode a message header from the specified string.
*
* Returns:
* - the number of bytes read on success
* - a negative value else
*/
ssize_t
sdb_proto_unmarshal_header(const char *buf, size_t buf_len,
uint32_t *code, uint32_t *msg_len);
/*
* sdb_proto_unmarshal_int32:
* Read and decode a 32-bit integer from the specified string.
*
* Returns:
* - the number of bytes read on success
* - a negative value else
*/
ssize_t
sdb_proto_unmarshal_int32(const char *buf, size_t buf_len, uint32_t *v);
/*
* sdb_proto_unmarshal_data:
* Read and decode a datum from the specified string. The datum's data will be
* allocated dynamically if necessary and will have to be free'd using
* sdb_data_free_datum.
*
* Returns:
* - the number of bytes read on success
* - a negative value else
*/
ssize_t
sdb_proto_unmarshal_data(const char *buf, size_t len, sdb_data_t *datum);
/*
* sdb_proto_unmarshal_host, sdb_proto_unmarshal_service,
* sdb_proto_unmarshal_metric, sdb_proto_unmarshal_attribute:
* Read and decode a host, service, metric, or attribute object from the
* specified string.
*
* Returns:
* - the number of bytes read on success
* - a negative value else
*/
ssize_t
sdb_proto_unmarshal_host(const char *buf, size_t len,
sdb_proto_host_t *host);
ssize_t
sdb_proto_unmarshal_service(const char *buf, size_t len,
sdb_proto_service_t *svc);
ssize_t
sdb_proto_unmarshal_metric(const char *buf, size_t len,
sdb_proto_metric_t *metric);
ssize_t
sdb_proto_unmarshal_attribute(const char *buf, size_t len,
sdb_proto_attribute_t *attr);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* ! SDB_UTILS_PROTO_H */
/* vim: set tw=78 sw=4 ts=4 noexpandtab : */
| {
"content_hash": "ab10923136458fd41dc040a3d864e664",
"timestamp": "",
"source": "github",
"line_count": 191,
"max_line_length": 78,
"avg_line_length": 29.25130890052356,
"alnum_prop": 0.706461428315733,
"repo_name": "sysdb/sysdb",
"id": "a9ea1e321d4368fb61ae87fda233056e561b7cf2",
"size": "7024",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/include/utils/proto.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "1093271"
},
{
"name": "C++",
"bytes": "15197"
},
{
"name": "Lex",
"bytes": "15521"
},
{
"name": "M4",
"bytes": "27436"
},
{
"name": "Makefile",
"bytes": "17586"
},
{
"name": "Shell",
"bytes": "37042"
},
{
"name": "Yacc",
"bytes": "22809"
}
],
"symlink_target": ""
} |
local ffi = require("ffi")
local bit = require("bit")
local PtrToNum = PtrToNum
ffi.cdef[[
typedef void (__thiscall *tFrameStep) (struct FFrame*, struct UObject*, void*);
]]
local pFrameStep = ffi.cast("tFrameStep", bl2sdk.FrameStep)
local FFrameMT = {}
function FFrameMT.GetFuncCodeHex(self)
local originalCode = self.Code
local out = ""
-- TODO: Limit
while true do
local opcode = self.Code[0]
out = out .. bit.tohex(opcode, 2) .. " "
if opcode == 0x16 then break end
self.Code = self.Code + 1
end
self.Code = originalCode
return out
end
function FFrameMT.GetLocalsHex(self, length)
local out = ""
for i=1,length do
out = out .. bit.tohex(self.Locals[i - 1], 2) .. " "
end
return out
end
-- Use this function if you're reading out something that's not a struct
-- ie. an int, float, pointer, etc.
function FFrameMT.ReadBasicType(self, ptrType, size)
local result = ffi.cast(ptrType, self.Code)[0]
self.Code = self.Code + size
return result
end
function FFrameMT.ReadStructType(self, structType, ptrType, size)
local inCode = ffi.cast(ptrType, self.Code)[0]
self.Code = self.Code + size
local result = ffi.new(structType)
ffi.copy(result, inCode, size)
return result
end
function FFrameMT.ReadInt(self)
return self:ReadBasicType(ffi.typeof("int*"), 4)
end
function FFrameMT.ReadFloat(self)
return self:ReadBasicType(ffi.typeof("float*"), 4)
end
function FFrameMT.ReadName(self)
return self:ReadStructType(ffi.typeof("struct FName"), ffi.typeof("struct FName*"), ffi.sizeof("struct FName"))
end
function FFrameMT.ReadObject(self)
return self:ReadBasicType(ffi.typeof("struct UObject**"), 8) -- In C++, size = sizeof(ScriptPointerType) = sizeof(QWORD) = 8
end
function FFrameMT.ReadWord(self)
return self:ReadBasicType(ffi.typeof("unsigned short*"), 2)
end
FFrameMT.Step = pFrameStep
function FFrameMT:GetBasicType(arrayType, default)
local var = ffi.new(arrayType, default)
pFrameStep(self, self.Object, var)
return var[0]
end
function FFrameMT:GetStructType(structType, arrayType, size)
local var = ffi.new(arrayType)
pFrameStep(self, self.Object, var)
local result = ffi.new(structType)
ffi.copy(result, var[0], size)
return result
end
function FFrameMT:GetBool()
return self:GetBasicType(ffi.typeof("BOOL[1]"), false)
end
function FFrameMT:GetStruct(structType)
return self:GetStructType(structType, ffi.typeof("$[1]", structType), ffi.sizeof(structType))
end
function FFrameMT:GetInt()
return self:GetBasicType(ffi.typeof("int[1]"), 0)
end
function FFrameMT:GetFloat()
return self:GetBasicType(ffi.typeof("float[1]"), 0)
end
function FFrameMT:GetByte()
return self:GetBasicType(ffi.typeof("int[1]"), 0) -- TODO: What does Unreal do here?
end
function FFrameMT:GetName()
return self:GetStructType("struct FName", "struct FName[1]", ffi.sizeof("struct FName"))
end
function FFrameMT:GetString()
return self:GetStructType("struct FString", "struct FString[1]", ffi.sizeof("struct FString"))
end
function FFrameMT:GetTArray(innerType)
-- If you get an error here, it means that you've specified an invalid inner type,
-- or there is no pre-existing definition for a TArray of the type you specified.
local actualType = ffi.typeof("struct TArray_" .. innerType)
return self:GetStructType(actualType, ffi.typeof("$[1]", actualType), ffi.sizeof("struct TArray"))
end
-- This function expects exactType to be an ffi.typeof'd TArray type (eg. ffi.typeof("struct TArray_char"))
function FFrameMT:GetTArrayRaw(exactType)
return self:GetStructType(exactType, ffi.typeof("$[1]", exactType), ffi.sizeof("struct TArray"))
end
function FFrameMT:GetObject(className)
local class = engine.Classes[className]
if class == nil then error(string.format("Class %q not found", className)) end
return self:GetBasicType(ffi.typeof("$[1]", class.ptrType))
end
function FFrameMT.WriteOpToCode(self, opCode)
self.Code[0] = opCode -- Code is already an unsigned char*
self.Code = self.Code + 1
end
function FFrameMT.WriteToCode(self, castTo, size, value)
ffi.cast(castTo, self.Code)[0] = value
self.Code = self.Code + size
end
local CopyNatives = {}
-- execLocalVariable
CopyNatives[0x00] = function(Stack, Object, newStack)
local value = Stack:ReadObject()
newStack:WriteOpToCode(0x00)
newStack:WriteToCode("struct UObject**", 8, value)
end
-- execInstanceVariable
CopyNatives[0x01] = function(Stack, Object, newStack)
local value = Stack:ReadObject()
newStack:WriteOpToCode(0x01)
newStack:WriteToCode("struct UObject**", 8, value)
end
-- execObjectConst
CopyNatives[0x20] = function(Stack, Object, newStack)
local value = Stack:ReadObject()
newStack:WriteOpToCode(0x20)
newStack:WriteToCode("struct UObject**", 8, value)
end
-- execLocalVariableOffsetInt
CopyNatives[0x4C] = function(Stack, Object, newStack)
local value = Stack:ReadInt()
newStack:WriteOpToCode(0x4C)
newStack:WriteToCode("int*", 4, value)
end
function FFrameMT.CopyStep(self, newStack)
local native = CopyNatives[self.Code[0]]
print("Calling native " .. tostring(self.Code[0]))
self.Code = self.Code + 1
native(self, self.Object, newStack)
end
function FFrameMT.PrintStackInfo(self)
print(string.format("Stack Frame: \n\tbAllowSuppression = %d\n\tbSuppressEventTag = %d\n\tbAutoEmitLineTerminator = %d\n\tNode = 0x%X\n\tObject = 0x%X\n\tCode = 0x%X\n\tLocals = 0x%X\n\tPreviousFrame = 0x%X\n\tOutParms = 0x%X",
self.bAllowSuppression,
self.bSuppressEventTag,
self.bAutoEmitLineTerminator,
PtrToNum(self.Node),
PtrToNum(self.Object),
PtrToNum(self.Code),
PtrToNum(self.Locals),
PtrToNum(self.PreviousFrame),
PtrToNum(self.OutParms)
))
end
function FFrameMT.SkipFunction(self)
-- TODO: Limit
while true do
local opcode = self.Code[0]
self.Code = self.Code + 1
if opcode == 0x16 then break end
end
end
ffi.metatype("struct FFrame", { __index = FFrameMT })
local FFrame = {}
function FFrame.NewStack(oldStack)
local stack = ffi.new("struct FFrame")
local buffer = ffi.new("unsigned char[?]", 128)
stack.Code = buffer
stack.VfTable = oldStack.VfTable
stack.bAllowSuppression = oldStack.bAllowSuppression
stack.bSuppressEventTag = oldStack.bSuppressEventTag
stack.bAutoEmitLineTerminator = oldStack.bAutoEmitLineTerminator
stack.Node = oldStack.Node
stack.Object = oldStack.Object
stack.Locals = oldStack.Locals
stack.PreviousFrame = oldStack.PreviousFrame
stack.OutParms = oldStack.OutParms
return stack
end
return FFrame
| {
"content_hash": "2e4b6780a7e2e75eb291296cb5cd5ebf",
"timestamp": "",
"source": "github",
"line_count": 233,
"max_line_length": 229,
"avg_line_length": 27.59656652360515,
"alnum_prop": 0.7443234836702954,
"repo_name": "McSimp/Borderlands2SDK",
"id": "fedf4082a9427ec40d1cea28e2f62c6618c4edbc",
"size": "6430",
"binary": false,
"copies": "1",
"ref": "refs/heads/nogwen",
"path": "lua/includes/modules/engine/helpers/FFrame.lua",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "31999"
},
{
"name": "C#",
"bytes": "85881"
},
{
"name": "C++",
"bytes": "86018"
},
{
"name": "Lua",
"bytes": "222271"
},
{
"name": "Objective-C",
"bytes": "14517"
},
{
"name": "PowerShell",
"bytes": "2794"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "8840ac6e31390af6f145f0edc7f210b7",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "1ff153f7f51e147fa111cf72e942352fee71e8bd",
"size": "173",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Geum/Geum klattianum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.wildfly.extension.camel.parser;
import org.jboss.as.controller.Extension;
import org.jboss.as.controller.ExtensionContext;
import org.jboss.as.controller.ModelVersion;
import org.jboss.as.controller.SubsystemRegistration;
import org.jboss.as.controller.parsing.ExtensionParsingContext;
/**
* Domain extension used to initialize the Camel subsystem.
*
* @author Thomas.Diesler@jboss.com
* @since 23-Aug-2013
*/
public final class CamelExtension implements Extension {
public static final String SUBSYSTEM_NAME = "camel";
private static final int MANAGEMENT_API_MAJOR_VERSION = 1;
private static final int MANAGEMENT_API_MINOR_VERSION = 1;
private static final int MANAGEMENT_API_MICRO_VERSION = 0;
@Override
public void initializeParsers(ExtensionParsingContext context) {
context.setSubsystemXmlMapping(SUBSYSTEM_NAME, Namespace.VERSION_1_0.getUriString(), CamelSubsystemParser.INSTANCE);
}
@Override
public void initialize(ExtensionContext context) {
boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
ModelVersion modelVersion = ModelVersion.create(MANAGEMENT_API_MAJOR_VERSION, MANAGEMENT_API_MINOR_VERSION, MANAGEMENT_API_MICRO_VERSION);
SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, modelVersion);
subsystem.registerSubsystemModel(new CamelRootResource(registerRuntimeOnly));
subsystem.registerXMLElementWriter(CamelSubsystemWriter.INSTANCE);
}
}
| {
"content_hash": "4eccec6098c4654c780d3e8d894e9101",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 146,
"avg_line_length": 37.048780487804876,
"alnum_prop": 0.7774851876234364,
"repo_name": "tdiesler/wildfly-camel",
"id": "7cec28e4297ee50d730cde04f7807f6688e7ef2f",
"size": "2173",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "subsystem/core/src/main/java/org/wildfly/extension/camel/parser/CamelExtension.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1195"
},
{
"name": "Dockerfile",
"bytes": "602"
},
{
"name": "FreeMarker",
"bytes": "675"
},
{
"name": "Groovy",
"bytes": "16269"
},
{
"name": "HTML",
"bytes": "2225"
},
{
"name": "Java",
"bytes": "3184001"
},
{
"name": "JavaScript",
"bytes": "1388"
},
{
"name": "Mustache",
"bytes": "38"
},
{
"name": "Shell",
"bytes": "4796"
},
{
"name": "Tcl",
"bytes": "34"
},
{
"name": "XSLT",
"bytes": "4383"
}
],
"symlink_target": ""
} |
({
render: function(component){
$A.Perf.mark("Rendering time for performanceTest:inheritance component");
return this.superRender();
},
afterRender: function(component){
this.superAfterRender();
$A.Perf.endMark("Rendering time for performanceTest:inheritance component");
},
rerender: function(component){
$A.Perf.mark("Rerender time for performanceTest:inheritance component");
this.superRerender();
$A.Perf.endMark("Rerender time for performanceTest:inheritance component");
}
}) | {
"content_hash": "6fe32f4b3b141970e94a8c869b99971d",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 84,
"avg_line_length": 32.705882352941174,
"alnum_prop": 0.6798561151079137,
"repo_name": "lhong375/aura",
"id": "5b1845c4ea7bba410e9dd841b6ea8b83b6b5a8d8",
"size": "556",
"binary": false,
"copies": "2",
"ref": "refs/heads/load-test-without-testjar",
"path": "aura-impl/src/test/components/performanceTest/inheritance/inheritanceRenderer.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "633422"
},
{
"name": "GAP",
"bytes": "9236"
},
{
"name": "Java",
"bytes": "6205033"
},
{
"name": "JavaScript",
"bytes": "9903940"
},
{
"name": "Python",
"bytes": "7342"
},
{
"name": "Shell",
"bytes": "12892"
},
{
"name": "XSLT",
"bytes": "1140"
}
],
"symlink_target": ""
} |
package main
import "fmt"
func main() {
// Creating arrays using different techniques
//var age []int = new([]int) // - Wrong as New Returns a Pointer Zero valued object of the given Type
var age *[]int = new([]int)
fmt.Println(age)
fmt.Println(*age)
if *age == nil {
fmt.Println(" So New Creates a Zero Length ")
}
var tem []int = make([]int, 5, 20) // Size 5 all will be Zero Value and total capacity 20
fmt.Println(tem)
//fmt.Println(*tem) // Wrong as the Array is not a pointer by default like in C
// INITIALIZED data and always with Data structures = make
// ZEROED data and pointer on All TYPES = new
var md []int = make([]int, 0) // Similar to New but its an actual value not Pointer
fmt.Println(md)
if md == nil {
fmt.Println(" Make with Zero size is NIL ")
}
}
| {
"content_hash": "e1026c1ebc6a4ef435c47b557d899949",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 102,
"avg_line_length": 28.464285714285715,
"alnum_prop": 0.6700125470514429,
"repo_name": "boseji/GoPlayground",
"id": "d35bb970d9a4e5bec874f2070aa7e122c954186e",
"size": "797",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "001_LangFunda/04_Slices,Variadic,Arrays/07_make&new/main.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "178"
},
{
"name": "CSS",
"bytes": "12345"
},
{
"name": "Go",
"bytes": "441931"
},
{
"name": "HTML",
"bytes": "30265"
},
{
"name": "JavaScript",
"bytes": "760"
},
{
"name": "Shell",
"bytes": "2887"
}
],
"symlink_target": ""
} |
@interface XJMapperWithMJ : NSObject<XJModelMapper>
@end
| {
"content_hash": "6c38157245f603f7b1643dcc341a654c",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 51,
"avg_line_length": 19.333333333333332,
"alnum_prop": 0.8103448275862069,
"repo_name": "LiuXiangJing/XJNetworking",
"id": "f8566f7cce4b8ee591e12a0b32e70310884bb6d7",
"size": "263",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "XJNetworking/XJModelMapper/XJMapperWithMJ.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "28644"
},
{
"name": "Ruby",
"bytes": "787"
}
],
"symlink_target": ""
} |
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.ovm.hypervisor;
import java.net.InetAddress;
import java.net.URI;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
import org.apache.log4j.Logger;
import org.apache.xmlrpc.XmlRpcException;
import com.cloud.agent.api.StartupCommand;
import com.cloud.agent.api.StartupRoutingCommand;
import com.cloud.configuration.Config;
import com.cloud.dc.ClusterVO;
import com.cloud.dc.dao.ClusterDao;
import com.cloud.exception.DiscoveryException;
import com.cloud.host.HostInfo;
import com.cloud.host.HostVO;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.ovm.object.Connection;
import com.cloud.ovm.object.OvmHost;
import com.cloud.resource.Discoverer;
import com.cloud.resource.DiscovererBase;
import com.cloud.resource.ResourceManager;
import com.cloud.resource.ResourceStateAdapter;
import com.cloud.resource.ServerResource;
import com.cloud.resource.UnableDeleteHostException;
import com.cloud.utils.db.QueryBuilder;
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.exception.CloudRuntimeException;
import com.cloud.utils.ssh.SSHCmdHelper;
public class OvmDiscoverer extends DiscovererBase implements Discoverer, ResourceStateAdapter {
private static final Logger s_logger = Logger.getLogger(OvmDiscoverer.class);
protected String _publicNetworkDevice;
protected String _privateNetworkDevice;
protected String _guestNetworkDevice;
@Inject
ClusterDao _clusterDao;
@Inject
ResourceManager _resourceMgr;
@Override
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
super.configure(name, params);
_publicNetworkDevice = _params.get(Config.OvmPublicNetwork.key());
_privateNetworkDevice = _params.get(Config.OvmPrivateNetwork.key());
_guestNetworkDevice = _params.get(Config.OvmGuestNetwork.key());
_resourceMgr.registerResourceStateAdapter(this.getClass().getSimpleName(), this);
return true;
}
protected OvmDiscoverer() {
}
@Override
public boolean stop() {
_resourceMgr.unregisterResourceStateAdapter(this.getClass().getSimpleName());
return super.stop();
}
private boolean checkIfExisted(String guid) {
QueryBuilder<HostVO> sc = QueryBuilder.create(HostVO.class);
sc.and(sc.entity().getGuid(), SearchCriteria.Op.EQ, guid);
sc.and(sc.entity().getHypervisorType(), SearchCriteria.Op.EQ, HypervisorType.Ovm);
List<HostVO> hosts = sc.list();
return !hosts.isEmpty();
}
@Override
public Map<? extends ServerResource, Map<String, String>>
find(long dcId, Long podId, Long clusterId, URI url, String username, String password, List<String> hostTags) throws DiscoveryException {
Connection conn = null;
if (!url.getScheme().equals("http")) {
String msg = "urlString is not http so we're not taking care of the discovery for this: " + url;
s_logger.debug(msg);
return null;
}
if (clusterId == null) {
String msg = "must specify cluster Id when add host";
s_logger.debug(msg);
throw new CloudRuntimeException(msg);
}
if (podId == null) {
String msg = "must specify pod Id when add host";
s_logger.debug(msg);
throw new CloudRuntimeException(msg);
}
ClusterVO cluster = _clusterDao.findById(clusterId);
if (cluster == null || (cluster.getHypervisorType() != HypervisorType.Ovm)) {
if (s_logger.isInfoEnabled())
s_logger.info("invalid cluster id or cluster is not for Ovm hypervisors");
return null;
}
String agentUsername = _params.get("agentusername");
if (agentUsername == null) {
throw new CloudRuntimeException("Agent user name must be specified");
}
String agentPassword = _params.get("agentpassword");
if (agentPassword == null) {
throw new CloudRuntimeException("Agent password must be specified");
}
try {
String hostname = url.getHost();
InetAddress ia = InetAddress.getByName(hostname);
String hostIp = ia.getHostAddress();
String guid = UUID.nameUUIDFromBytes(hostIp.getBytes()).toString();
if (checkIfExisted(guid)) {
throw new CloudRuntimeException("The host " + hostIp + " has been added before");
}
s_logger.debug("Ovm discover is going to disover host having guid " + guid);
ClusterVO clu = _clusterDao.findById(clusterId);
if (clu.getGuid() == null) {
clu.setGuid(UUID.randomUUID().toString());
_clusterDao.update(clusterId, clu);
}
com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(hostIp, 22);
sshConnection.connect(null, 60000, 60000);
sshConnection = SSHCmdHelper.acquireAuthorizedConnection(hostIp, username, password);
if (sshConnection == null) {
throw new DiscoveryException(String.format("Cannot connect to ovm host(IP=%1$s, username=%2$s, password=%3$s, discover failed", hostIp, username,
password));
}
if (!SSHCmdHelper.sshExecuteCmd(sshConnection, "[ -f '/etc/ovs-agent/agent.ini' ]")) {
throw new DiscoveryException("Can not find /etc/ovs-agent/agent.ini " + hostIp);
}
Map<String, String> details = new HashMap<String, String>();
OvmResourceBase ovmResource = new OvmResourceBase();
details.put("ip", hostIp);
details.put("username", username);
details.put("password", password);
details.put("zone", Long.toString(dcId));
details.put("guid", guid);
details.put("pod", Long.toString(podId));
details.put("cluster", Long.toString(clusterId));
details.put("agentusername", agentUsername);
details.put("agentpassword", agentPassword);
if (_publicNetworkDevice != null) {
details.put("public.network.device", _publicNetworkDevice);
}
if (_privateNetworkDevice != null) {
details.put("private.network.device", _privateNetworkDevice);
}
if (_guestNetworkDevice != null) {
details.put("guest.network.device", _guestNetworkDevice);
}
Map<String, Object> params = new HashMap<String, Object>();
params.putAll(details);
ovmResource.configure("Ovm Server", params);
ovmResource.start();
conn = new Connection(hostIp, "oracle", agentPassword);
/* After resource start, we are able to execute our agent api */
OvmHost.Details d = OvmHost.getDetails(conn);
details.put("agentVersion", d.agentVersion);
details.put(HostInfo.HOST_OS_KERNEL_VERSION, d.dom0KernelVersion);
details.put(HostInfo.HYPERVISOR_VERSION, d.hypervisorVersion);
Map<OvmResourceBase, Map<String, String>> resources = new HashMap<OvmResourceBase, Map<String, String>>();
resources.put(ovmResource, details);
return resources;
} catch (XmlRpcException e) {
s_logger.debug("XmlRpc exception, Unable to discover OVM: " + url, e);
return null;
} catch (UnknownHostException e) {
s_logger.debug("Host name resolve failed exception, Unable to discover OVM: " + url, e);
return null;
} catch (ConfigurationException e) {
s_logger.debug("Configure resource failed, Unable to discover OVM: " + url, e);
return null;
} catch (Exception e) {
s_logger.debug("Unable to discover OVM: " + url, e);
return null;
}
}
@Override
public void postDiscovery(List<HostVO> hosts, long msId) throws DiscoveryException {
// TODO Auto-generated method stub
}
@Override
public boolean matchHypervisor(String hypervisor) {
return HypervisorType.Ovm.toString().equalsIgnoreCase(hypervisor);
}
@Override
public HypervisorType getHypervisorType() {
return HypervisorType.Ovm;
}
@Override
public HostVO createHostVOForConnectedAgent(HostVO host, StartupCommand[] cmd) {
// TODO Auto-generated method stub
return null;
}
@Override
public HostVO createHostVOForDirectConnectAgent(HostVO host, StartupCommand[] startup, ServerResource resource, Map<String, String> details, List<String> hostTags) {
StartupCommand firstCmd = startup[0];
if (!(firstCmd instanceof StartupRoutingCommand)) {
return null;
}
StartupRoutingCommand ssCmd = ((StartupRoutingCommand)firstCmd);
if (ssCmd.getHypervisorType() != HypervisorType.Ovm) {
return null;
}
return _resourceMgr.fillRoutingHostVO(host, ssCmd, HypervisorType.Ovm, details, hostTags);
}
@Override
public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForceDeleteStorage) throws UnableDeleteHostException {
if (host.getType() != com.cloud.host.Host.Type.Routing || host.getHypervisorType() != HypervisorType.Ovm) {
return null;
}
_resourceMgr.deleteRoutingHost(host, isForced, isForceDeleteStorage);
return new DeleteHostAnswer(true);
}
}
| {
"content_hash": "2e7bd72f9e2630a776ad18c42a34ebaa",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 169,
"avg_line_length": 40.573076923076925,
"alnum_prop": 0.6585458337283154,
"repo_name": "wido/cloudstack",
"id": "46e152838114c06a3e917c8dfd039b8acc925ebf",
"size": "10549",
"binary": false,
"copies": "7",
"ref": "refs/heads/master",
"path": "plugins/hypervisors/ovm/src/main/java/com/cloud/ovm/hypervisor/OvmDiscoverer.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "10890"
},
{
"name": "C#",
"bytes": "2356211"
},
{
"name": "CSS",
"bytes": "358651"
},
{
"name": "Dockerfile",
"bytes": "2374"
},
{
"name": "FreeMarker",
"bytes": "4887"
},
{
"name": "Groovy",
"bytes": "146420"
},
{
"name": "HTML",
"bytes": "149088"
},
{
"name": "Java",
"bytes": "36088724"
},
{
"name": "JavaScript",
"bytes": "7976318"
},
{
"name": "Python",
"bytes": "13363686"
},
{
"name": "Ruby",
"bytes": "37714"
},
{
"name": "Shell",
"bytes": "784058"
},
{
"name": "XSLT",
"bytes": "58008"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Arch Linux installation guide">
<meta name="author" content="Zoran Stupar">
<title>Arch install guide</title>
<link rel="icon" type="image/png" href="theme/images/favicon.png">
<!-- Bootstrap Core CSS -->
<link href="theme/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="theme/css/clean-blog.min.css" rel="stylesheet">
<!-- Code highlight color scheme -->
<link href="theme/css/code_blocks/darkly.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta property="og:locale" content="en">
<meta property="og:site_name" content="Arch install guide">
<meta property="og:type" content="article">
<meta property="article:author" content="">
<meta property="og:url" content="/arch-linux.html">
<meta property="og:title" content="Arch Linux installation guide">
<meta property="og:description" content="">
<meta property="og:image" content="/theme/images/posts/arch.jpg">
<meta property="article:published_time" content="2018-05-16 12:37:00+02:00">
</head>
<body>
<!-- Page Header -->
<header class="intro-header" style="background-image: url('theme/images/posts/arch.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading">
<h1>Arch Linux installation guide</h1>
<span class="meta">Posted by
<a>Zoran Stupar</a>
</span>
<br>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<!-- Post Content -->
<article>
<h2>Preparation</h2>
<ul>
<li><span class="caps">4GB</span> <span class="caps">USB</span> flash drive or higher</li>
<li><a href="https://www.archlinux.org/download/">Arch Linux <span class="caps">ISO</span></a></li>
<li>Creating bootable <span class="caps">USB</span> flash drive on <span class="caps">GNU</span>/Linux<ul>
<li><code>dd if=archlinux.img of=/dev/sdX bs=16M && sync</code></li>
</ul>
</li>
</ul>
<p>(sdX being your <span class="caps">USB</span> flash drive. You can find this with <code>lsblk</code> command).</p>
<p>Boot from the <span class="caps">USB</span> flash drive. If it fails to boot, make sure that secure boot is <strong>disabled</strong> in the <span class="caps">BIOS</span> configuration.</p>
<h3>Verifying internet connectivity</h3>
<p><span class="caps">GNU</span>/Linux should automatically detect wired connection. If you’re using wireless connection use <code>wifi-menu</code>.</p>
<p><code>ping -c 3 www.archlinux.org</code></p>
<h3>Veryfing if <span class="caps">EFI</span> mode is enabled</h3>
<p><code>efivar -l</code></p>
<p>If it prints out a list of <span class="caps">UEFI</span> variables then you’re using <span class="caps">UEFI</span> mode.</p>
<h2>Disk partitioning, encryption, mounting</h2>
<h3>Finding all available drives</h3>
<p><code>lsblk</code></p>
<h3>Wiping the existing partition table</h3>
<p>We need to zap the current partition table so that we can re-write it as a <strong><span class="caps">GPT</span></strong> partition table. This will wipe the entire drive.</p>
<p><code>gdisk /dev/sdX -> x -> z -> y -> y</code></p>
<h3>Creating new partition table</h3>
<p><code>cgdisk /dev/sdX</code></p>
<p>I’ll create 3 partitions:</p>
<ul>
<li>sda1 (boot partition) -> 1024MiB</li>
<li>sda2 (swap partition) -> 8GiB</li>
<li>sda3 (<span class="caps">LVM</span> partition) -> rest of the free space</li>
</ul>
<h4>/boot</h4>
<p>The <code>/boot</code> directory contains the kernel and ramdisk images as well as the bootloader configuration file and bootloader stages. It also stores data that is used before the kernel begins executing user-space programs. <code>/boot</code> is not required for normal system operation, but only during boot and kernel upgrades (when regenerating the initial ramdisk).</p>
<p>A separate <code>/boot</code> partition is needed if installing a software <span class="caps">RAID0</span> (stripe) system.</p>
<p>A suggested size for <code>/boot</code> is 200 MiB unless you are using <strong><span class="caps">EFI</span> System Partition</strong> as <code>/boot</code>, in which case at least 550 MiB is recommended.</p>
<div class="highlight"><pre><span></span>[New] Press Enter
First Sector: Leave this blank -> Press Enter
Size in sectors: 1024MiB
Hex Code: ef00
Enter new partition name: boot
</pre></div>
<p><strong>Note</strong>: 1007KiB partition that already exists cannot be removed/deleted. This is where the Protective <span class="caps">MBR</span> is and it’s present on all <span class="caps">GPT</span> partition tables.</p>
<h4>Swap</h4>
<p>To swap or not to swap, that is the question. Short answer is <strong>yes</strong>, always create swap partition.</p>
<p><strong>Explanation:</strong> Linux divides its physical <span class="caps">RAM</span> into chunks of memory called pages. Swapping is the process whereby a page of memory is copied to the preconfigured space on the hard disk, called swap space, to free up that page of memory. The combined sizes of the physical memory and the swap space is the amount of virtual memory available.</p>
<p>I always have 8GiB swap partition and that’s more than enough.
While <span class="caps">RAM</span> * 2 was the rule of thumb, this rule is outdated. These days you usually have enough <span class="caps">RAM</span> to handle your day to day stuff without the system ever swapping but it doesn’t hurt to have it.</p>
<div class="highlight"><pre><span></span>[New] Press Enter
First Sector: Leave this blank -> Press Enter
Size in sectors: 8GiB
Hex Code: 8200
Enter new partition name: swap
</pre></div>
<h4><span class="caps">LVM</span> Partition (For encryption)</h4>
<p>To use encryption on top of <span class="caps">LVM</span>, the <span class="caps">LVM</span> volumes are set up first and then used as the base for the encrypted partitions. This way, a mixture of encrypted and non-encrypted volumes/partitions is possible as well.</p>
<div class="highlight"><pre><span></span>[New] Press Enter
First Sector: Leave this blank -> Press Enter
Size in sectors: Leave this blank -> Press Enter
Hex Code: 8e00
Enter new partition name: Leave this blank -> Press Enter
</pre></div>
<p>Arrow over to <code>[Write]</code> to save your new partition table. Hit enter, type “yes”, hit enter again. Choose <code>[Quit]</code> and press enter.</p>
<h3>Setup encryption</h3>
<p><code>cryptsetup luksFormat -c aes-xts-plain64 -s 512 /dev/sda3</code></p>
<p><code>cryptsetup luksOpen /dev/sda3 luks</code></p>
<h3>Preparing the logical volumes</h3>
<p><code>pvcreate /dev/mapper/luks</code></p>
<p><code>vgcreate crypt /dev/mapper/luks</code></p>
<p>Now create the <span class="caps">LVM</span> partitions for <code>/root</code> and <code>/home</code>.</p>
<h4>/root</h4>
<p>The root directory is the <strong>top of the hierarchy</strong>, the point where the primary filesystem is mounted and from which all other filesystems stem. All files and directories appear under the root directory <code>/</code>, even if they are stored on different physical devices. The contents of the root filesystem must be adequate to boot, restore, recover, and/or repair the system. Therefore, certain directories under <code>/</code> are not candidates for separate partitions.</p>
<p>The <code>/</code> or root partition is necessary and it is <strong>the most important</strong>. The other partitions can be replaced by it.</p>
<p><code>lvcreate -L 100G crypt -n root</code></p>
<h4>/home</h4>
<p>The <code>/home</code> directory contains user-specific configuration files, caches, application data and media files.
You <strong>should not</strong> share home directories between users on different distributions, because they use incompatible software versions and patches. Instead, consider sharing a media partition or at least using different home directories on the same <code>/home</code> partition.</p>
<p><code>lvcreate -l 100%FREE crypt -n home</code></p>
<h3>Creating file systems</h3>
<p>For <span class="caps">EFI</span> with <span class="caps">GPT</span>, boot needs to be <span class="caps">FAT32</span>.</p>
<p><code>mkfs.vfat -F32 /dev/sda1</code></p>
<p><code>mkswap /dev/sda2</code></p>
<p><code>swapon /dev/sda2</code></p>
<p><code>mkfs.ext4 /dev/mapper/crypt-root</code></p>
<p><code>mkfs.ext4 /dev/mapper/crypt-home</code></p>
<h3>Mounting partitions</h3>
<p><code>mount /dev/mapper/crypt-root /mnt</code></p>
<p><code>mkdir /mnt/boot</code></p>
<p><code>mkdir /mnt/home</code></p>
<p><code>mount /dev/sda1 /mnt/boot</code></p>
<p><code>mount /dev/mapper/crypt-home /mnt/home</code></p>
<hr/>
<h2>Installing and configuring Arch</h2>
<h3>Mirrors</h3>
<p>Before we initiate the install process, let’s select the closest mirror so that we can get the best speed while downloading packages.</p>
<p>First, make a backup.</p>
<p><code>cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup</code></p>
<p>Instead of going through the list with the text editor, we’re going to run the sed line to uncomment every mirror.</p>
<p><code>sed -i 's/^#Server/Server/' /etc/pacman.d/mirrorlist.backup</code></p>
<p>Now let’s sort this backup. We will check for the top 10 mirrors and leave them uncommented while commenting out the rest.</p>
<p><code>rankmirrors -n 10 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist</code></p>
<h3>Installing Arch base files</h3>
<p>This will take some time.</p>
<p><code>pacstrap -i /mnt base base-devel</code></p>
<h3>Generating fstab file</h3>
<p><code>genfstab -U -p /mnt >> /mnt/etc/fstab</code></p>
<p>Open fstab file and if you have <span class="caps">SSD</span> change <code>relatime</code> on all non-boot partitions to <code>noatime</code></p>
<p><code>nano /mnt/etc/fstab</code></p>
<h3>Chroot</h3>
<p>Chroot into newly installed system.</p>
<p><code>arch-chroot /mnt</code></p>
<h3>Language</h3>
<p>Create local file.</p>
<p><code>nano /etc/locale.gen</code></p>
<p>Uncomment your locale. I prefer using <strong>en_US.<span class="caps">UTF</span>-8</strong> even tho I’m from Serbia.</p>
<p><img alt="locale" class="img-responsive" src="https://raw.githubusercontent.com/zstupar/zstupar.github.io/master/arch/theme/images/locale.png"/></p>
<p>Generate locale.</p>
<p><code>locale-gen</code></p>
<p>And then set it as your language.</p>
<p><code>echo LANG=en_US.UTF-8 > /etc/locale.conf</code></p>
<p><code>export LANG=en_US.UTF-8</code></p>
<h3>Time</h3>
<p>List the available time zone info.</p>
<p><code>ls /usr/share/zoneinfo/</code></p>
<p>Then set the appropriate one.</p>
<p><code>ln -s /usr/share/zoneinfo/Europe/Belgrade > /etc/localtime</code></p>
<p>Set the hardware clock mode uniformly between your operating systems. Otherwise, they may overwrite the hardware clock and cause time shifts.</p>
<p><code>hwclock --systohc --localtime</code></p>
<h3>Hostname</h3>
<p><code>echo myhostname > /etc/hostname</code></p>
<h3>Root password and user setup</h3>
<p>Set password for root.</p>
<p><code>passwd</code></p>
<p>Add default user.</p>
<p><code>useradd -m -g users -G wheel,storage,power -s /bin/bash username</code></p>
<p>Set password for that user.</p>
<p><code>passwd username</code></p>
<h3>Sudoers</h3>
<p>Edit the sudoers file to give this user sudo powers. <strong>Don’t</strong> open this file with a regular editor, it must be edited with <code>visudo</code>.</p>
<p><code>EDITOR=nano visudo</code></p>
<p>And then uncomment this line:
<code>%wheel ALL=(ALL) ALL</code></p>
<p>Make sudoers require typing the root password instead of their own password. Append this line: <code>Defaults rootpw</code></p>
<h3>Enable multilib and <span class="caps">AUR</span></h3>
<p>If you’re using 64-bit system then you need to enable the multilib repository. Open the pacman.conf file:</p>
<p><code>nano /etc/pacman.conf</code></p>
<p>Un-comment the multilib repository:</p>
<div class="highlight"><pre><span></span><span class="k">[multilib]</span>
<span class="na">Include</span> <span class="o">=</span> <span class="s">/etc/pacman.d/mirrorlist</span>
</pre></div>
<p>Let’s also add the <span class="caps">AUR</span> repo so we can install packages from <span class="caps">AUR</span>.</p>
<div class="highlight"><pre><span></span><span class="k">[archstrike]</span>
<span class="na">SigLevel</span> <span class="o">=</span> <span class="s">Never</span>
<span class="na">Server</span> <span class="o">=</span> <span class="s">https://mirror.archstrike.org/$arch/$repo</span>
</pre></div>
<h3><span class="caps">SSD</span> <span class="caps">TRIM</span></h3>
<p>For safe, weekly <span class="caps">TRIM</span> service on SSDs and all other devices that enable <span class="caps">TRIM</span> support.</p>
<p><code>systemctl enable fstrim.timer</code></p>
<h3>Bootloader</h3>
<p>Double check to see if <span class="caps">EFI</span> variables have already been mounted.</p>
<p><code>mount -t efivarfs efivarfs /sys/firmware/efi/efivars</code></p>
<p>If it says that it’s already mounted just ignore it and keep going.</p>
<p>We’re going to use gummiboot as our boot manager as we are doing <span class="caps">UEFI</span> installation of Arch. It’s already incorporated into bootctl/systemd-boot</p>
<p><code>bootctl install</code></p>
<p>Now we will manually create a configuration file to add an entry for Arch.</p>
<p><code>nano /boot/loader/entries/arch.conf</code></p>
<p>Type the following:</p>
<div class="highlight"><pre><span></span>title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
</pre></div>
<p>Next, we need to add the <span class="caps">PARTUUID</span> of the <code>/root</code> partition to the bootloader configuration. <strong>Note: sdX needs to be root partition!</strong> </p>
<p><code>blkid | grep sdX | cut -f2 -d" > /boot/loader/entries/arch.conf</code></p>
<p>Edit loader configuration file.</p>
<p><code>nano /boot/loader/loader.conf</code></p>
<div class="highlight"><pre><span></span>timeout 2
default arch
</pre></div>
<h3>Intel processors</h3>
<p>Processor manufacturers release stability and security updates to the processor microcode. While microcode can be updated through the <span class="caps">BIOS</span>, the Linux kernel is also able to apply these updates during boot. These updates provide bug fixes that can be critical to the stability of the system. Without these updates, you
may experience crashes or unexpected system halts that can be difficult to track down.</p>
<p>Users of CPUs belonging to the Intel Haswell and Broadwell processor families in particular must install these microcode updates to ensure system stability. But all Intel users should install the updates as a matter of course.</p>
<p>For <span class="caps">AMD</span> processors the microcode updates are available in linux-firmware, which is installed as part of the base system. No further action is needed for <span class="caps">AMD</span> users.</p>
<p><code>pacman -S intel-ucode</code></p>
<p>Now we have to update bootloader configuration file and add another initrd line for intel-ucode.</p>
<p><code>nano /boot/loader/entries/arch.conf</code></p>
<p>Add the intel-ucode line. <strong>It needs to be above <code>initrd /initramfs-linux.img</code> line!</strong></p>
<p><code>initrd /intel-ucode.img</code></p>
<h3>Network</h3>
<p>List available network adapters.</p>
<p><code>ip link</code></p>
<p>Ignore the one listed as <code>lo</code>, that’s loopback and it’s always listed.</p>
<p>Enable wired connection with <code>systemctl</code>.</p>
<p><code>systemctl enable dhcpcd@enpXs0.service</code></p>
<p>For the sake of having a simple graphical interface that works across desktop environments, we’ll also install and enable NetworkManager</p>
<p><code>pacman -S networkmanager</code></p>
<p><code>systemctl enable NetworkManager.service</code></p>
<h3>mkinitcpio</h3>
<p><code>nano /etc/mkinitcpio.conf</code></p>
<p>Add <code>ext4</code> to <strong><span class="caps">MODULES</span></strong>.</p>
<p><img alt="mkinitcpio-1" class="img-responsive" src="https://raw.githubusercontent.com/zstupar/zstupar.github.io/master/arch/theme/images/mkinitcpio-1.png"/></p>
<p>Add <code>encrypt</code> and <code>lvm2</code> to <strong><span class="caps">HOOKS</span></strong> before <code>filesystems</code></p>
<p><img alt="mkinitcpio-2" class="img-responsive" src="https://raw.githubusercontent.com/zstupar/zstupar.github.io/master/arch/theme/images/mkinitcpio-2.png"/></p>
<p>Regenerate initrd image.</p>
<p><code>mkinitcpio -p linux</code></p>
<h3>Finish installation and configuration</h3>
<p><code>exit</code></p>
<p><code>umount -R /mnt</code></p>
<p><code>reboot</code></p>
<p>And that’s it! You’re now free to install your favorite desktop environment or window manager.</p>
</article>
<hr>
</div>
</div>
</div>
<hr>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<li>
<a href="https://twitter.com/Hexadecag0n">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="https://github.com/zstupar">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">Zoran Stupar ©<script type="text/javascript">
document.write(new Date().getFullYear());
</script></p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="theme/js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="theme/js/bootstrap.min.js"></script>
<!-- Custom Theme JavaScript -->
<script src="theme/js/clean-blog.min.js"></script>
</body>
</html>
| {
"content_hash": "fc171ee1f89dca9371aba1c82cb30f03",
"timestamp": "",
"source": "github",
"line_count": 335,
"max_line_length": 495,
"avg_line_length": 59.82089552238806,
"alnum_prop": 0.6689121756487026,
"repo_name": "zstupar/zstupar.github.io",
"id": "1512c4d6393331595b83d2943c2861190625b0da",
"size": "20157",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "arch/arch-linux.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "657938"
},
{
"name": "HTML",
"bytes": "331640"
},
{
"name": "JavaScript",
"bytes": "261078"
},
{
"name": "PHP",
"bytes": "13656"
}
],
"symlink_target": ""
} |
require 'rspec'
require 'active_support/inflector'
require './bender/lib/bender.rb'
RSpec.configure do |c|
end
| {
"content_hash": "d9fead6ecd3e917505db7df2943c6581",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 34,
"avg_line_length": 16.142857142857142,
"alnum_prop": 0.7522123893805309,
"repo_name": "aleak/bender",
"id": "cb04d16ed13ded8f7c2b941ba67482ba822604b2",
"size": "113",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/spec_helper.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "13528"
}
],
"symlink_target": ""
} |
package org.apache.asterix.metadata.entities;
import java.util.List;
import org.apache.asterix.metadata.MetadataCache;
import org.apache.asterix.metadata.api.IMetadataEntity;
public class Function implements IMetadataEntity {
public static final String LANGUAGE_AQL = "AQL";
public static final String LANGUAGE_JAVA = "JAVA";
public static final String RETURNTYPE_VOID = "VOID";
public static final String NOT_APPLICABLE = "N/A";
private final String dataverse;
private final String name;
private final int arity;
private final List<String> params;
private final String body;
private final String returnType;
private final String language;
private final String kind;
public Function(String dataverseName, String functionName, int arity, List<String> params, String returnType,
String functionBody, String language, String functionKind) {
this.dataverse = dataverseName;
this.name = functionName;
this.params = params;
this.body = functionBody;
this.returnType = returnType == null ? RETURNTYPE_VOID : returnType;
this.language = language;
this.kind = functionKind;
this.arity = arity;
}
public String getDataverseName() {
return dataverse;
}
public String getName() {
return name;
}
public List<String> getParams() {
return params;
}
public String getFunctionBody() {
return body;
}
public String getReturnType() {
return returnType;
}
public String getLanguage() {
return language;
}
public int getArity() {
return arity;
}
public String getKind() {
return kind;
}
@Override
public Object addToCache(MetadataCache cache) {
return cache.addFunctionIfNotExists(this);
}
@Override
public Object dropFromCache(MetadataCache cache) {
return cache.dropFunction(this);
}
}
| {
"content_hash": "5b21116ddaf0d9e67cc846711761603a",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 113,
"avg_line_length": 24.825,
"alnum_prop": 0.662134944612286,
"repo_name": "amoudi87/asterixdb",
"id": "946c950fc36e725b48378496fa7aeef6fd9357b3",
"size": "2793",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "asterix-metadata/src/main/java/org/apache/asterix/metadata/entities/Function.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "6115"
},
{
"name": "CSS",
"bytes": "4763"
},
{
"name": "Crystal",
"bytes": "453"
},
{
"name": "HTML",
"bytes": "114488"
},
{
"name": "Java",
"bytes": "9375622"
},
{
"name": "JavaScript",
"bytes": "237719"
},
{
"name": "Python",
"bytes": "268336"
},
{
"name": "Ruby",
"bytes": "2666"
},
{
"name": "Scheme",
"bytes": "1105"
},
{
"name": "Shell",
"bytes": "182529"
},
{
"name": "Smarty",
"bytes": "31412"
}
],
"symlink_target": ""
} |
#region Copyright & License
// Copyright © 2012 - 2015 François Chabot, Yves Dierick
//
// 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.
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Be.Stateless.BizTalk.ClaimStore.States;
using Be.Stateless.Logging;
namespace Be.Stateless.BizTalk.ClaimStore
{
internal static class MessageBodyEnumerable
{
/// <summary>
/// Enumerates message bodies that are collectible, i.e. having either no lock or a lock that has expired/timed out.
/// </summary>
/// <param name="directories"></param>
/// <param name="fileLockTimeout"></param>
/// <returns></returns>
public static IEnumerable<MessageBody> EnumerateMessageBodies(this IEnumerable<string> directories, TimeSpan fileLockTimeout)
{
var troublesomeLockTimeout = TimeSpan.FromMinutes(fileLockTimeout.TotalMinutes * 3);
foreach (var messageBody in directories.EnumerateAllMessageBodies())
{
var lockTime = messageBody.DataFile.LockTime;
var now = DateTime.UtcNow;
var lockDuration = lockTime.HasValue ? now - lockTime.Value : TimeSpan.Zero;
if (lockDuration > troublesomeLockTimeout && _logger.IsWarnEnabled)
_logger.WarnFormat(
"Lock on message body's data file '{0}' has been acquired {1} minutes ago and ClaimStore.Agent was not able to pursue its processing since then.",
messageBody.DataFile,
lockDuration.TotalMinutes);
var availabilityDuration = now - messageBody.DataFile.CreationTime;
if (availabilityDuration.TotalHours > 12 && _logger.IsErrorEnabled)
_logger.ErrorFormat(
"Message body's data file '{0}' was captured {1} hours ago and and ClaimStore.Agent was not able to collect it since then.",
messageBody.DataFile,
availabilityDuration.TotalHours);
// if just locked or lock timed out, i.e lock not acquired in time range ]0 ; FileLockTimeout], which means
// the file might have been locked by a remote Claim Store Agent that is still busy working
if (TimeSpan.Zero == lockDuration || lockDuration > fileLockTimeout)
{
yield return messageBody;
}
else if (_logger.IsDebugEnabled)
{
_logger.DebugFormat("Skipping locked message body's data file '{0}'.", messageBody.DataFile);
}
}
}
/// <summary>
/// Gather message body data files to the central Claim Store.
/// </summary>
/// <param name="messageBodies"></param>
/// <param name="gatheringDirectory"></param>
public static void Collect(this IEnumerable<MessageBody> messageBodies, string gatheringDirectory)
{
foreach (var messageBody in messageBodies)
{
if (_logger.IsDebugEnabled) _logger.DebugFormat("Collecting message body's data file '{0}'.", messageBody.DataFile);
messageBody.Collect(gatheringDirectory);
}
}
private static IEnumerable<MessageBody> EnumerateAllMessageBodies(this IEnumerable<string> directories)
{
return directories.SelectMany(EnumerateFiles)
.Where(filePath => filePath.IsValidDataFilePath())
.Select(DataFile.Create)
.Select(MessageBody.Create);
}
private static IEnumerable<string> EnumerateFiles(string path)
{
if (_logger.IsDebugEnabled) _logger.DebugFormat("Enumerating message body's data files in folder '{0}'.", path);
return _fileEnumerator(path, "*.*");
}
internal static Func<string, string, IEnumerable<string>> _fileEnumerator = (path, searchPattern) => Directory.EnumerateFiles(path, searchPattern);
private static readonly ILogEx _logger = (ILogEx) LogManager.GetLogger(typeof(MessageBodyEnumerable));
}
}
| {
"content_hash": "3daa964f89ff8cf7a0ea7f5d1b5c923b",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 152,
"avg_line_length": 41.475247524752476,
"alnum_prop": 0.7147290522797803,
"repo_name": "icraftsoftware/BizTalk.Factory",
"id": "604cc438f701f3a78f8a8d619ec4e650c3302c18",
"size": "4193",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/BizTalk.ClaimStore.Agent/ClaimStore/MessageBodyEnumerable.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "132"
},
{
"name": "C#",
"bytes": "4313312"
},
{
"name": "CSS",
"bytes": "10963"
},
{
"name": "HTML",
"bytes": "17209"
},
{
"name": "JavaScript",
"bytes": "55621"
},
{
"name": "PLSQL",
"bytes": "15448"
},
{
"name": "PowerShell",
"bytes": "20992"
},
{
"name": "TSQL",
"bytes": "102246"
},
{
"name": "XSLT",
"bytes": "49602"
}
],
"symlink_target": ""
} |
kuzzle.memoryStorage.rpoplpush("sourceKey", "destKey", new ResponseListener<String>() {
@Override
public void onSuccess(String value) {
// callback called once the action has completed
}
@Override
public void onError(JSONObject error) {
}
});
| {
"content_hash": "ff866d75bfb26831eea0b8d8d43da79d",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 87,
"avg_line_length": 26,
"alnum_prop": 0.7153846153846154,
"repo_name": "kuzzleio/sdk-android",
"id": "f1f49aa7e1efa417b50288e128db8919075ce927",
"size": "261",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/3/core-classes/memory-storage/rpoplpush/snippets/rpoplpush-1.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1103602"
}
],
"symlink_target": ""
} |
import gym
import time
import random
import copy
class GeneticNetworkHelper:
def crossing(net1, net2):
crossing_point = random.randint(1, 3)
new_weights = []
for i in range(crossing_point):
new_weights.append(net1.weights[i])
for i in range(crossing_point, 4):
new_weights.append(net2.weights[i])
return Network(new_weights)
def mutate(net):
mutations = random.randint(1, 3)
mutated_genes = random.sample([0, 1, 2, 3], mutations)
new_weights = copy.copy(net.weights)
for idx in mutated_genes:
new_weights[idx] = random.random()*2 - 1
return Network(new_weights)
class GeneticSearcher:
def __init__(self, pop_size):
self.pop = [Network.random_network() for i in range(pop_size)]
self.nt = NetTester()
def rate_network(self, net):
return self.nt.test_n_times_and_return_min(net, 3)
def selection(self):
population_fitness = [(net, self.rate_network(net)) for net in self.pop]
population_fitness = sorted(population_fitness, reverse=True, key=lambda x: x[1])
pop_size = len(population_fitness)
old_survivors = list(map(lambda x: x[0], population_fitness[:int(pop_size/3)]))
children = []
while len(children) < pop_size/3:
parents = random.sample(set(old_survivors), 2)
children.append(GeneticNetworkHelper.crossing(parents[0], parents[1]))
new_generation = old_survivors + children
while len(new_generation) < pop_size:
new_generation.append(GeneticNetworkHelper.mutate(random.choice(old_survivors)))
self.pop = new_generation
return population_fitness[0][1]
def show_best(self):
population_fitness = [(net, self.rate_network(net)) for net in self.pop]
population_fitness = sorted(population_fitness, reverse=True, key=lambda x: x[1])
best = population_fitness[0][0]
self.nt.render(best)
class Network:
def __init__(self, weights):
self.weights = weights
def weighted_sum(self, observation):
sum = 0.0
for i in range(4):
sum += self.weights[i] * observation[i]
return sum
def output(self, observation):
if self.weighted_sum(observation) > 0:
return 1
else:
return 0
def __str__(self):
return str(self.weights)
def random_network():
return Network([random.random() * 2 - 1.0 for i in range(4)])
class NetTester:
def __init__(self):
self.env = gym.make('CartPole-v0')
def test_n_times_and_return_min(self, net, n):
results = [self.test(net) for i in range(n)]
return min(results)
def test(self, net):
observation = self.env.reset()
action = 0
for t in range(10000):
observation, reward, done, info = self.env.step(action)
action = net.output(observation)
if done:
break
return t+1
def test_with_render(self, net):
observation = self.env.reset()
action = 0
for t in range(100000):
self.env.render()
observation, reward, done, info = self.env.step(action)
action = net.output(observation)
if done:
break
return t+1
def render(self, net):
val = self.test_with_render(net)
print ('result: {}', val)
gs = GeneticSearcher(20)
for i in range(20):
print('generation {}'.format(i))
best = gs.selection()
print('best: {}'.format(best))
gs.show_best()
if best == 10000:
break
| {
"content_hash": "9baedbaee8e21be0863aa66952b9daeb",
"timestamp": "",
"source": "github",
"line_count": 135,
"max_line_length": 92,
"avg_line_length": 27.622222222222224,
"alnum_prop": 0.5805846071332798,
"repo_name": "jpodeszwik/openai",
"id": "fb2e68b3c37a63bf752e31993e6f56cc84840635",
"size": "3729",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CartPole-v0/genetic_neural_network.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "11281"
}
],
"symlink_target": ""
} |
Authors: @rphillips
## Table of Contents
1. [Overview](#overview)
2. [Known Issues](#known-issues)
3. [Proposal](#proposal)
4. [Alternate Proposals](#alternate-proposals)
1. [Custom Resource Definitions](#custom-resource-definitions)
2. [Refactor Old Reconciler](#refactor-old-reconciler)
## Overview
Proposal to fix Issue [#22609](https://github.com/kubernetes/kubernetes/issues/22609)
`kube-apiserver` currently has a command-line argument `--apiserver-count`
specifying the number of api servers. This masterCount is used in the
MasterCountEndpointReconciler on a 10 second interval to potentially cleanup
stale API Endpoints. The issue is when the number of kube-apiserver instances
gets below or above the masterCount. If the below case happens, the stale
instances within the Endpoints does not get cleaned up, or in the latter case
the endpoints start to flap.
## Known Issues
Each apiserver’s reconciler only cleans up for it's own IP. If a new
server is spun up at a new IP, then the old IP in the Endpoints list is
only reclaimed if the number of apiservers becomes greater-than or equal
to the masterCount. For example:
* If the masterCount = 3, and there are 3 API servers running (named: A, B, and C)
* ‘B’ API server is terminated for any reason
* The IP for endpoint ‘B’ is not
removed from the Endpoints list
There is logic within the
[MasterCountEndpointReconciler](https://github.com/kubernetes/kubernetes/blob/68814c0203c4b8abe59812b1093844a1f9bdac05/pkg/master/controller.go#L293)
to attempt to make the Endpoints eventually consistent, but the code relies on
the Endpoints count becoming equal to or greater than masterCount. When the
apiservers become greater than the masterCount the Endpoints tend to flap.
If the number endpoints were scaled down from automation, then the
Endpoints would never become consistent.
## Proposal
### Create New Reconciler
| Kubernetes Release | Quality | Description |
| ------------- | ------------- | ----------- |
| 1.9 | alpha | <ul><li>Add a new reconciler</li><li>Add a command-line type `--alpha-apiserver-endpoint-reconciler-type`<ul><li>storage</li><li>default</li></ul></li></ul>
| 1.10 | beta | <ul><li>Turn on the `storage` type by default</li></ul>
| 1.11 | stable | <ul><li>Remove code for old reconciler</li><li>Remove --apiserver-count</li></ul>
The MasterCountEndpointReconciler does not meet the current needs for durability
of API Endpoint creation, deletion, or failure cases.
Custom Resource Definitions were proposed, but they do not have clean layering.
Additionally, liveness and locking would be a nice to have feature for a long
term solution.
ConfigMaps were proposed, but since they are watched globally, liveliness
updates could be overly chatty.
By porting OpenShift's
[LeaseEndpointReconciler](https://github.com/openshift/origin/blob/master/pkg/cmd/server/election/lease_endpoint_reconciler.go)
to Kubernetes we can use the Storage API directly to store Endpoints
dynamically within the system.
### Alternate Proposals
#### Custom Resource Definitions and ConfigMaps
CRD's and ConfigMaps were considered for this proposal. They were not adopted
for this proposal by the community due to technical issues explained earlier.
#### Refactor Old Reconciler
| Release | Quality | Description |
| ------- | ------- | ------------------------------------------------------------ |
| 1.9 | stable | Change the logic in the current reconciler
We could potentially reuse the old reconciler by changing the reconciler to count
the endpoints and set the `masterCount` (with a RWLock) to the count.
| {
"content_hash": "a443462bfce0c475e4ce587f46e3600a",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 190,
"avg_line_length": 44.17857142857143,
"alnum_prop": 0.7291835084882781,
"repo_name": "pwittrock/community",
"id": "a2f312a6a0b4b1f6c542c6ac79a1ef255894c45d",
"size": "3753",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "contributors/design-proposals/api-machinery/apiserver-count-fix.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "13484"
},
{
"name": "Makefile",
"bytes": "1767"
},
{
"name": "Shell",
"bytes": "6049"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
public class Rectangle
{
public double Left { get; set; }
public double Top { get; set; }
public double Width { get; set; }
public double Hight { get; set; }
public double Bottom
{
get
{
return this.Top + this.Hight;
}
}
public double Right
{
get
{
return this.Left + this.Width;
}
}
}
namespace _06.RectanglePosition
{
class RectanglePosition
{
public static void Main()
{
Rectangle firstRectangle = ReadRectangle();
Rectangle secondRectangle = ReadRectangle();
bool isInside = IsInside(firstRectangle, secondRectangle);
if (isInside)
{
Console.WriteLine("Inside");
}
else
{
Console.WriteLine("Not inside");
}
}
public static Rectangle ReadRectangle()
{
double[] coordinats = Console.ReadLine().Split().Select(double.Parse).ToArray();
Rectangle rect = new Rectangle
{
Left = coordinats[0],
Top = coordinats[1],
Width = coordinats[2],
Hight = coordinats[3]
};
return rect;
}
public static bool IsInside(Rectangle firstRectangle, Rectangle secondRectangle)
{
bool isInside =
firstRectangle.Left >= secondRectangle.Left &&
firstRectangle.Right <= secondRectangle.Right &&
firstRectangle.Top <= secondRectangle.Top &&
firstRectangle.Bottom <= secondRectangle.Bottom;
return isInside;
}
}
}
| {
"content_hash": "178f9d74090880a9284ed8dc5bfdb0ac",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 92,
"avg_line_length": 23.037037037037038,
"alnum_prop": 0.5262593783494105,
"repo_name": "kalinmarkov/SoftUni",
"id": "10498ba8cc0222d836b5d448090165bc691d17eb",
"size": "1868",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Programming Fundamentals/13.ObjectsAndClassesLab/06.RectanglePosition/RectanglePosition.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "399"
},
{
"name": "Batchfile",
"bytes": "13483"
},
{
"name": "C#",
"bytes": "1616313"
},
{
"name": "CSS",
"bytes": "919718"
},
{
"name": "HTML",
"bytes": "119725"
},
{
"name": "Java",
"bytes": "59878"
},
{
"name": "JavaScript",
"bytes": "400825"
},
{
"name": "PHP",
"bytes": "9586"
},
{
"name": "PLSQL",
"bytes": "598162"
},
{
"name": "SQLPL",
"bytes": "3168"
},
{
"name": "Shell",
"bytes": "14116"
}
],
"symlink_target": ""
} |
import Ember from 'ember';
import RippleMixin from '../mixins/components/ripple';
export default Ember.Component.extend(RippleMixin, {
classNames: ['md-ripple-container'],
createRipple() {
return this.$('.md-ripple');
},
getRippleElement() {
let $parent = this.$().parent();
while(window.getComputedStyle($parent[0])['pointer-events'] === 'none') {
$parent = $parent.parent();
}
return $parent;
}
});
| {
"content_hash": "a83342a97b5611be219a8616fb129721",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 77,
"avg_line_length": 23.210526315789473,
"alnum_prop": 0.6349206349206349,
"repo_name": "klinem/ember-materials",
"id": "31ead760cbadd6d5e4c4310a302a1f5c040b80a5",
"size": "441",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "addon/components/md-ripple.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "49521"
},
{
"name": "HTML",
"bytes": "1679"
},
{
"name": "Handlebars",
"bytes": "19182"
},
{
"name": "JavaScript",
"bytes": "85878"
}
],
"symlink_target": ""
} |
package org.jhaws.common.lang;
import org.apache.commons.lang3.builder.ToStringBuilder;
public class NestedPojo {
private String nestedVeld;
@Override
public String toString() {
return new ToStringBuilder(this).appendSuper(super.toString()).append("nestedVeld", nestedVeld).toString();
}
public String getNestedVeld() {
return this.nestedVeld;
}
public void setNestedVeld(String nestedVeld) {
this.nestedVeld = nestedVeld;
}
}
| {
"content_hash": "d1bee145c6d8b98d6f3ab884f24dad12",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 115,
"avg_line_length": 24.4,
"alnum_prop": 0.6967213114754098,
"repo_name": "jurgendl/jhaws",
"id": "052f744d2be144636605f11bbf5388b44ed280ab",
"size": "488",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "jhaws/lang/src/test/java/org/jhaws/common/lang/NestedPojo.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "7324"
},
{
"name": "CSS",
"bytes": "2105836"
},
{
"name": "HTML",
"bytes": "1171287"
},
{
"name": "Java",
"bytes": "4368284"
},
{
"name": "JavaScript",
"bytes": "18562809"
},
{
"name": "Less",
"bytes": "11863"
},
{
"name": "Rich Text Format",
"bytes": "1033645"
},
{
"name": "SCSS",
"bytes": "2102"
},
{
"name": "Shell",
"bytes": "8947"
},
{
"name": "VBScript",
"bytes": "710"
}
],
"symlink_target": ""
} |
title: We went to Mexico!
layout: blog-post
summary: We spent a week in Cancún, Mexico! Why? How? What about Félip?!
tags: respite, travel
date: 2017-02-25
last_modified_at: 2017-11-25
---
# Why Mexico?
My company was planning a gathering for the engineering staff since we all work remotely. When they finalized the details, the location they picked was Cancún. They were okay with and supportive of us having our significant others come along.
The trip was amazing and we had lots of fun. It obviously met its purpose for work as we all got to meet and have fun together. We only get to do this once or twice a year so it's really nice and important for team building. It was also really nice for Robyn to meet some of the people I work with and their significant others.
# Why Now?
We'd been talking about traveling as something we could do in the future, especially since we've been introduced to the Rotary Flames House (RFH). Doctors and nurses would often ask us if we'd considered taking a trip together or getting out of town for a while.
When my company announced that our gathering would be in Cancún, we thought "wow, wouldn't it be nice if we could both go". We started thinking about how we could make it work and what we would have to do. We talked about it with Jared and Hannah, our closest friends (family, really) in Calgary. They encouraged us to go and said they would be more than happy to handle things in Calgary.
One thing that made the trip possible at this time was that Félip had been doing so well. His care was significantly easier to manage and he hadn't been sick in a long time. We felt encouraged that he would probably be fine, especially with Jared and Hannah. We also kept thinking to ourselves that an opportunity like this might not present itself again.
# What about Félip?
Félip spent the week at RFH. He enjoyed lots of cuddles and activities while he was there. Jared and Hannah went to visit him frequently and would send us pictures and videos. They attended music therapy with him and made sure the team had everything they needed.
{% include blog-images.html name="felip-at-rfh.jpg" caption="Félip at RFH" %}
Félip did give a scare on Sunday before we left (our plane left Monday morning). RFH called us at 6:00AM Sunday morning because he wasn't doing so great. He had an increased amount of secretions and was struggling with his breathing. They had to give him oxygen and he still wasn't improving. We went straight to the hospital across the street since they had called emergency medical services to transport him there. He calmed down shortly after we got there and was doing much better. He seemed to be back to his usual self, talking to us and wiggling around.
At this point we were a bit nervous. We started having second thoughts about the trip and the amount of work and stress we were putting on Jared and Hannah.
Félip was discharged from the hospital and we were able to bring him back to RFH. They assured us that everything was fine and we should feel comfortable leaving him again. In the meantime, as we were talking to Jared and Hannah, they also assured us that they would handle things, even if he needed to be admitted at the hospital or needed to come home early. They said they would handle whatever came up and we had nothing to worry about.
# Retrospective
We're glad we went on the trip. We missed Félip so much during the whole time but it gives us an appreciation of our day to day life. We also got to do things we could never do with him which is sometimes refreshing.
{% include blog-images.html name="lounging-in-mexico.jpg" caption="Enjoying the weather in Mexico" %}
That being said, I don't think we'll be going on another trip like this and leaving Félip behind. At least not for a long time. We would rather be able to take him with us, like when we go hiking in the mountains or maybe if we plan a road trip in the future.
The reality is that leaving Félip at RFH for an extended period of time involved a tremendous amount of preparation and stress. Furthermore, even with RFH being as awesome as they are, Félip's regular routine cannot be maintained 100%. We're now noticing that he benefits quite a bit from some of the daily exercises and activities we do with him at home.
We just feel like the preparation, stress and the catching up involved upon our return didn't justify our time away. We think we would benefit much more from having regular scheduled blocks of respite for a few hours once or twice a week. We could use that time to have a date night or just get out of the house for a while. We just don't feel like being away from him for several days or weeks benefits any of us.
Distance makes the heart grow fonder, right?
------
As always… **Love. Laugh.** ***Repeat.***
| {
"content_hash": "c64dee87a4e3f17d52e5a43ea4b7fe21",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 560,
"avg_line_length": 94.05882352941177,
"alnum_prop": 0.780279341254951,
"repo_name": "maximeroussy/lovelaughrepeat",
"id": "0b2722724d249dbfb7df4fc933cac73debe31571",
"size": "4817",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2017-02-25-we-went-to-mexico.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "15395"
},
{
"name": "HTML",
"bytes": "24742"
},
{
"name": "JavaScript",
"bytes": "394"
},
{
"name": "Ruby",
"bytes": "875"
}
],
"symlink_target": ""
} |
import unittest
import atlassian_jwt_auth
class TestKeyModule(unittest.TestCase):
""" tests for the key module. """
def test_key_identifier_with_invalid_keys(self):
""" test that invalid key identifiers are not permitted. """
keys = ['../aha', '/a', r'\c:a', 'lk2j34/#$', 'a../../a', 'a/;a',
' ', ' / ', ' /',
u'dir/some\0thing', 'a/#a', 'a/a?x', 'a/a;',
]
for key in keys:
with self.assertRaises(ValueError):
atlassian_jwt_auth.KeyIdentifier(identifier=key)
def test_key_identifier_with_valid_keys(self):
""" test that valid keys work as expected. """
for key in ['oa.oo/a', 'oo.sasdf.asdf/yes', 'oo/o']:
key_id = atlassian_jwt_auth.KeyIdentifier(identifier=key)
self.assertEqual(key_id.key_id, key)
| {
"content_hash": "fc0fc32dc10ea20611e18db714295aa0",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 73,
"avg_line_length": 35.791666666666664,
"alnum_prop": 0.5494761350407451,
"repo_name": "atlassian/asap-authentication-python",
"id": "487a75bf38a569a5d17705d692dbf449cd843d25",
"size": "859",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "atlassian_jwt_auth/tests/test_key.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "137854"
}
],
"symlink_target": ""
} |
using ChinaTtlWifi.Bll;
using ChinaTtlWifi.Entity;
using System;
using System.Windows.Forms;
namespace ChinaTtlWifi
{
public partial class FormChannel : FormBase
{
private XmlLoader xmlBll = XmlLoader.GetInst();
public FormChannel()
{
InitializeComponent();
this.Text = "通道管理";
}
private void FormChannel_Load(object sender, EventArgs e)
{
this.myToolStrip1.ActionClickAdd = this.ClickAdd;
this.myToolStrip1.ActionClickDelete = this.ClickDelete;
this.myToolStrip1.ActionClickModify = this.ClickModify;
this.myToolStrip1.AddEvent();
this.xmlBll.Load();
this.myGridView1.LoadData(this.xmlBll.ChannelList, base.ignoreFields);
}
private void ClickAdd(object sender, EventArgs arg)
{
new FormChannelNew().ShowDialog();
this.myGridView1.LoadData(this.xmlBll.ChannelList, base.ignoreFields);
}
private void ClickModify(object sender, EventArgs arg)
{
FormChannelNew form = new FormChannelNew();
form.Entity = this.myGridView1.FindFirstSelect<Channel>();
form.ShowDialog();
this.myGridView1.LoadData(this.xmlBll.ChannelList, base.ignoreFields);
}
private void ClickDelete(object sender, EventArgs arg)
{
Channel entity = this.myGridView1.FindFirstSelect<Channel>();
if (entity != null)
{
if (MessageBox.Show("是否删除数据?", "确认", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
xmlBll.ChannelList.Remove(entity);
xmlBll.SaveChannels();
xmlBll.Load();
this.myGridView1.LoadData(this.xmlBll.ChannelList, base.ignoreFields);
}
}
}
}
}
| {
"content_hash": "211e5f7c8c56b4e55820c09110f2ea2c",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 100,
"avg_line_length": 35.125,
"alnum_prop": 0.5719369598373157,
"repo_name": "wardensky/wardensky-demo",
"id": "8e51bc583252773c7792015651ed287d50969783",
"size": "1993",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "csharp/ChinaTtlWifi/ChinaTtlWifi/FormChannel.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "2016923"
},
{
"name": "Groovy",
"bytes": "137"
},
{
"name": "HTML",
"bytes": "573975"
},
{
"name": "Java",
"bytes": "239197"
},
{
"name": "JavaScript",
"bytes": "2343840"
},
{
"name": "PowerShell",
"bytes": "3737"
},
{
"name": "Smalltalk",
"bytes": "3"
}
],
"symlink_target": ""
} |
SmidigConference::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Print deprecation notices to the stderr
config.active_support.deprecation = :stderr
end
| {
"content_hash": "2de3714906bc97386f78e854a02240ff",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 85,
"avg_line_length": 43.42857142857143,
"alnum_prop": 0.7671052631578947,
"repo_name": "smidig/smidig-conference",
"id": "2e5fe480687c9d1feae8c382a2cb51a17d63a9b9",
"size": "1547",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config/environments/test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "32318"
},
{
"name": "JavaScript",
"bytes": "30755"
},
{
"name": "Ruby",
"bytes": "170126"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.6.0_27) on Tue Oct 15 10:27:17 IRST 2013 -->
<title>Uses of Class org.nise.ux.asl.data.RequestResponseData (Abstract Service Library)</title>
<meta name="date" content="2013-10-15">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.nise.ux.asl.data.RequestResponseData (Abstract Service Library)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV</li>
<li>NEXT</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/nise/ux/asl/data//class-useRequestResponseData.html" target="_top">FRAMES</a></li>
<li><a href="RequestResponseData.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.nise.ux.asl.data.RequestResponseData" class="title">Uses of Class<br>org.nise.ux.asl.data.RequestResponseData</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">RequestResponseData</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.nise.ux.asl.data">org.nise.ux.asl.data</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.nise.ux.asl.data">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">RequestResponseData</a> in <a href="../../../../../../org/nise/ux/asl/data/package-summary.html">org.nise.ux.asl.data</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/nise/ux/asl/data/package-summary.html">org.nise.ux.asl.data</a> that return <a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">RequestResponseData</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">RequestResponseData</a><<a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="type parameter in RequestResponseData">D</a>,<a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="type parameter in RequestResponseData">R</a>></code></td>
<td class="colLast"><span class="strong">RequestResponseData.</span><code><strong><a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html#clone()">clone</a></strong>()</code>
<div class="block">Returns a clone of this RequestPackage<D> class</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/nise/ux/asl/data/RequestResponseData.html" title="class in org.nise.ux.asl.data">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>PREV</li>
<li>NEXT</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/nise/ux/asl/data//class-useRequestResponseData.html" target="_top">FRAMES</a></li>
<li><a href="RequestResponseData.html" target="_top">NO FRAMES</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<i>This library is a work of NISE organization User-eXperience team.</i>
</small></p>
</body>
</html>
| {
"content_hash": "790c318c557f39795cf7a010476da7f5",
"timestamp": "",
"source": "github",
"line_count": 160,
"max_line_length": 433,
"avg_line_length": 41.85625,
"alnum_prop": 0.6278930864566223,
"repo_name": "yeuser/java-libs",
"id": "91b6ab562cbff02cd953f5128ca78812746d9529",
"size": "6697",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "abstract-service-library/dist/abstract-service-library-0.4.1/api/org/nise/ux/asl/data/class-use/RequestResponseData.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "330267"
},
{
"name": "HTML",
"bytes": "20997355"
},
{
"name": "Java",
"bytes": "184079"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "5eb479a9083bd2f4a5464c280e43c884",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "933cc5a42658852c2bef1f0ad003d1f32c808dbd",
"size": "197",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Caryophyllales/Cactaceae/Mediolobivia/Mediolobivia auranitida/Mediolobivia auranitida flaviflora/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<?php
namespace AixueLog\Processor;
class ServiceProcessor
{
// 服务名
private $service_name;
public function __construct($service_name='')
{
$this->setServiceName($service_name);
}
/**
* 增加service和type到日志中
*
* @param array $record
* @return array
*/
public function __invoke(array $record)
{
$record['service'] = (string)$this->service_name;
return $record;
}
/**
* @return mixed
*/
public function getServiceName()
{
return $this->service_name;
}
/**
* @param mixed $service_name
*/
public function setServiceName($service_name='')
{
$this->service_name = $service_name;
}
} | {
"content_hash": "1dfe2176c8f5f8f58819b852e8148b95",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 57,
"avg_line_length": 17.428571428571427,
"alnum_prop": 0.5491803278688525,
"repo_name": "ZhaoLion/aixue-log",
"id": "0f011afd422765b2f1e516fbdab801ab368bf210",
"size": "752",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Processor/ServiceProcessor.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "80"
},
{
"name": "PHP",
"bytes": "29901"
}
],
"symlink_target": ""
} |
PHP DateTime class library
| {
"content_hash": "62b228eb3cd78f9862174dc70acb2017",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 26,
"avg_line_length": 28,
"alnum_prop": 0.8214285714285714,
"repo_name": "guodf/PHP_DateTime",
"id": "7813a390616f10204f22e062ade5a9bc4a272e58",
"size": "44",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "20440"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "f580baf1d3692ba93f50d21ee41f0a24",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "29d7724225924e2efde0f25fff4a8b1a5be1cc5b",
"size": "176",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Myrtales/Melastomataceae/Melastoma/Melastoma klossii/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
| {
"content_hash": "557c57bed69d9dcf60378b358ae0b365",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 60,
"avg_line_length": 16.857142857142858,
"alnum_prop": 0.7796610169491526,
"repo_name": "yaslab/YLFMDBModel",
"id": "e462f21b84bfa8f9403c34b528704299651a13b4",
"size": "287",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "YLFMDBModel/AppDelegate.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "32506"
},
{
"name": "Ruby",
"bytes": "252"
}
],
"symlink_target": ""
} |
'use strict';
// --------------------------------------------------------------------
// Imports
// --------------------------------------------------------------------
var common = require('./common');
var pexprs = require('./pexprs');
// --------------------------------------------------------------------
// Helpers
// --------------------------------------------------------------------
function flatten(listOfLists) {
return Array.prototype.concat.apply([], listOfLists);
}
// --------------------------------------------------------------------
// Operations
// --------------------------------------------------------------------
pexprs.PExpr.prototype.generateExample = common.abstract('generateExample');
pexprs.any.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
return {value: String.fromCharCode(Math.floor(Math.random() * 255))};
};
function categorizeExamples(examples) {
// A list of rules that the system needs examples of, in order to generate an example
// for the current rule
var examplesNeeded = examples.filter(function(example) {
return example.hasOwnProperty('examplesNeeded');
})
.map(function(example) { return example.examplesNeeded; });
examplesNeeded = flatten(examplesNeeded);
var uniqueExamplesNeeded = {};
for (var i = 0; i < examplesNeeded.length; i++) {
var currentExampleNeeded = examplesNeeded[i];
uniqueExamplesNeeded[currentExampleNeeded] = true;
}
examplesNeeded = Object.keys(uniqueExamplesNeeded);
// A list of successfully generated examples
var successfulExamples = examples.filter(function(example) {
return example.hasOwnProperty('value');
})
.map(function(item) { return item.value; });
// This flag returns true if the system cannot generate the rule it is currently
// attempting to generate, regardless of whether or not it has the examples it needs.
// Currently, this is only used in overriding generators to prevent the system from
// generating examples for certain rules (e.g. 'ident').
var needHelp = examples.some(function(item) { return item.needHelp; });
return {
examplesNeeded: examplesNeeded,
successfulExamples: successfulExamples,
needHelp: needHelp
};
}
pexprs.Alt.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
// items -> termExamples
var termExamples = this.terms.map(function(term) {
return term.generateExample(grammar, examples, inSyntacticContext, actuals);
});
var categorizedExamples = categorizeExamples(termExamples);
var examplesNeeded = categorizedExamples.examplesNeeded;
var successfulExamples = categorizedExamples.successfulExamples;
var needHelp = categorizedExamples.needHelp;
var ans = {};
// Alt can contain both an example and a request for examples
if (successfulExamples.length > 0) {
var i = Math.floor(Math.random() * successfulExamples.length);
ans.value = successfulExamples[i];
}
if (examplesNeeded.length > 0) {
ans.examplesNeeded = examplesNeeded;
}
ans.needHelp = needHelp;
return ans;
};
pexprs.Seq.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
var factorExamples = this.factors.map(function(factor) {
return factor.generateExample(grammar, examples, inSyntacticContext, actuals);
});
var categorizedExamples = categorizeExamples(factorExamples);
var examplesNeeded = categorizedExamples.examplesNeeded;
var successfulExamples = categorizedExamples.successfulExamples;
var needHelp = categorizedExamples.needHelp;
var ans = {};
// In a Seq, all pieces must succeed in order to have a successful example.
if (examplesNeeded.length > 0 || needHelp) {
ans.examplesNeeded = examplesNeeded;
ans.needHelp = needHelp;
} else {
ans.value = successfulExamples.join(inSyntacticContext ? ' ' : '');
}
return ans;
};
pexprs.Apply.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
var ans = {};
var ruleName = this.substituteParams(actuals).toString();
if (!examples.hasOwnProperty(ruleName)) {
ans.examplesNeeded = [ruleName];
} else {
var relevantExamples = examples[ruleName];
var i = Math.floor(Math.random() * relevantExamples.length);
ans.value = relevantExamples[i];
}
return ans;
};
// Assumes that terminal's object is always a string
pexprs.Terminal.prototype.generateExample = function(grammar, examples, inSyntacticContext) {
return {value: this.obj};
};
pexprs.Range.prototype.generateExample = function(grammar, examples, inSyntacticContext) {
var rangeSize = this.to.charCodeAt(0) - this.from.charCodeAt(0);
return {value: String.fromCharCode(
this.from.charCodeAt(0) + Math.floor(rangeSize * Math.random())
)};
};
// TODO: make 'Not' and 'Lookahead' behaviour smarter
// Right now, 'Not' and 'Lookahead' generate nothing and assume that whatever follows will
// work according to the encoded constraints.
pexprs.Not.prototype.generateExample = function(grammar, examples, inSyntacticContext) {
return {value: ''};
};
pexprs.Lookahead.prototype.generateExample = function(grammar, examples, inSyntacticContext) {
return {value: ''};
};
pexprs.Param.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
return actuals[this.index].generateExample(grammar, examples, inSyntacticContext, actuals);
};
function generateNExamples(pexpr, grammar, examples, inSyntacticContext, actuals, numTimes) {
var items = [];
for (var i = 0; i < numTimes; i++) {
items.push(pexpr.expr.generateExample(grammar, examples, inSyntacticContext, actuals));
}
var categorizedExamples = categorizeExamples(items);
var examplesNeeded = categorizedExamples.examplesNeeded;
var successfulExamples = categorizedExamples.successfulExamples;
var ans = {};
// It's always either one or the other.
// TODO: instead of ' ', call 'spaces.generateExample()'
ans.value = successfulExamples.join(inSyntacticContext ? ' ' : '');
if (examplesNeeded.length > 0) {
ans.examplesNeeded = examplesNeeded;
}
return ans;
}
pexprs.Star.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
return generateNExamples(this, grammar, examples, inSyntacticContext, actuals,
Math.floor(Math.random() * 4));
};
pexprs.Plus.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
return generateNExamples(this, grammar, examples, inSyntacticContext, actuals,
Math.floor(Math.random() * 3 + 1));
};
pexprs.Opt.prototype.generateExample = function(grammar, examples, inSyntacticContext, actuals) {
return generateNExamples(this, grammar, examples, inSyntacticContext, actuals,
Math.floor(Math.random() * 2));
};
pexprs.UnicodeChar.prototype.generateExample = function(
grammar, examples, inSyntacticContext, actuals) {
var char;
switch (this.category) {
case 'Lu': char = 'Á'; break;
case 'Ll': char = 'ŏ'; break;
case 'Lt': char = 'Dž'; break;
case 'Lm': char = 'ˮ'; break;
case 'Lo': char = 'ƻ'; break;
case 'Nl': char = 'ↂ'; break;
case 'Nd': char = '½'; break;
case 'Mn': char = '\u0487'; break;
case 'Mc': char = 'ि'; break;
case 'Pc': char = '⁀'; break;
case 'Zs': char = '\u2001'; break;
case 'L': char = 'Á'; break;
case 'Ltmo': char = 'Dž'; break;
}
return {value: char}; // 💩
};
| {
"content_hash": "fbf479a93bcfbbb0c1b1e76ab08cb02a",
"timestamp": "",
"source": "github",
"line_count": 220,
"max_line_length": 99,
"avg_line_length": 34.19090909090909,
"alnum_prop": 0.671098112204201,
"repo_name": "coopsource/ohm",
"id": "01d373fe49841c8fa0660602e8cbba911a90b550",
"size": "7539",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/pexprs-generateExample.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "8999"
},
{
"name": "HTML",
"bytes": "43677"
},
{
"name": "JavaScript",
"bytes": "806982"
},
{
"name": "Shell",
"bytes": "3136"
}
],
"symlink_target": ""
} |
package com.alibaba.rocketmq.tools.command.cluster;
import com.alibaba.rocketmq.client.exception.MQBrokerException;
import com.alibaba.rocketmq.common.protocol.body.ClusterInfo;
import com.alibaba.rocketmq.common.protocol.body.KVTable;
import com.alibaba.rocketmq.common.protocol.route.BrokerData;
import com.alibaba.rocketmq.remoting.RPCHook;
import com.alibaba.rocketmq.remoting.exception.RemotingConnectException;
import com.alibaba.rocketmq.remoting.exception.RemotingSendRequestException;
import com.alibaba.rocketmq.remoting.exception.RemotingTimeoutException;
import com.alibaba.rocketmq.tools.admin.DefaultMQAdminExt;
import com.alibaba.rocketmq.tools.command.SubCommand;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
/**
* @author shijia.wxr
*/
public class ClusterListSubCommand implements SubCommand {
@Override
public String commandName() {
return "clusterList";
}
@Override
public String commandDesc() {
return "List all of clusters";
}
@Override
public Options buildCommandlineOptions(Options options) {
Option opt = new Option("m", "moreStats", false, "Print more stats");
opt.setRequired(false);
options.addOption(opt);
opt = new Option("i", "interval", true, "specify intervals numbers, it is in seconds");
opt.setRequired(false);
options.addOption(opt);
return options;
}
@Override
public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) {
DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook);
defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()));
long printInterval = 1;
boolean enableInterval = commandLine.hasOption('i');
if (enableInterval) {
printInterval = Long.parseLong(commandLine.getOptionValue('i')) * 1000;
}
try {
defaultMQAdminExt.start();
do {
if (commandLine.hasOption('m')) {
this.printClusterMoreStats(defaultMQAdminExt);
} else {
this.printClusterBaseInfo(defaultMQAdminExt);
}
Thread.sleep(printInterval);
System.out.println("");
} while (enableInterval);
} catch (Exception e) {
e.printStackTrace();
} finally {
defaultMQAdminExt.shutdown();
}
}
private void printClusterMoreStats(final DefaultMQAdminExt defaultMQAdminExt) throws RemotingConnectException,
RemotingTimeoutException, RemotingSendRequestException, InterruptedException, MQBrokerException {
ClusterInfo clusterInfoSerializeWrapper = defaultMQAdminExt.examineBrokerClusterInfo();
System.out.printf("%-16s %-32s %14s %14s %14s %14s%n",//
"#Cluster Name",//
"#Broker Name",//
"#InTotalYest",//
"#OutTotalYest",//
"#InTotalToday",//
"#OutTotalToday"//
);
Iterator<Map.Entry<String, Set<String>>> itCluster = clusterInfoSerializeWrapper.getClusterAddrTable().entrySet().iterator();
while (itCluster.hasNext()) {
Map.Entry<String, Set<String>> next = itCluster.next();
String clusterName = next.getKey();
TreeSet<String> brokerNameSet = new TreeSet<String>();
brokerNameSet.addAll(next.getValue());
for (String brokerName : brokerNameSet) {
BrokerData brokerData = clusterInfoSerializeWrapper.getBrokerAddrTable().get(brokerName);
if (brokerData != null) {
Iterator<Map.Entry<Long, String>> itAddr = brokerData.getBrokerAddrs().entrySet().iterator();
while (itAddr.hasNext()) {
Map.Entry<Long, String> next1 = itAddr.next();
long InTotalYest = 0;
long OutTotalYest = 0;
long InTotalToday = 0;
long OutTotalToday = 0;
try {
KVTable kvTable = defaultMQAdminExt.fetchBrokerRuntimeStats(next1.getValue());
String msgPutTotalYesterdayMorning = kvTable.getTable().get("msgPutTotalYesterdayMorning");
String msgPutTotalTodayMorning = kvTable.getTable().get("msgPutTotalTodayMorning");
String msgPutTotalTodayNow = kvTable.getTable().get("msgPutTotalTodayNow");
String msgGetTotalYesterdayMorning = kvTable.getTable().get("msgGetTotalYesterdayMorning");
String msgGetTotalTodayMorning = kvTable.getTable().get("msgGetTotalTodayMorning");
String msgGetTotalTodayNow = kvTable.getTable().get("msgGetTotalTodayNow");
InTotalYest = Long.parseLong(msgPutTotalTodayMorning) - Long.parseLong(msgPutTotalYesterdayMorning);
OutTotalYest = Long.parseLong(msgGetTotalTodayMorning) - Long.parseLong(msgGetTotalYesterdayMorning);
InTotalToday = Long.parseLong(msgPutTotalTodayNow) - Long.parseLong(msgPutTotalTodayMorning);
OutTotalToday = Long.parseLong(msgGetTotalTodayNow) - Long.parseLong(msgGetTotalTodayMorning);
} catch (Exception e) {
}
System.out.printf("%-16s %-32s %14d %14d %14d %14d%n",//
clusterName,//
brokerName,//
InTotalYest,//
OutTotalYest,//
InTotalToday,//
OutTotalToday//
);
}
}
}
if (itCluster.hasNext()) {
System.out.println("");
}
}
}
private void printClusterBaseInfo(final DefaultMQAdminExt defaultMQAdminExt) throws RemotingConnectException, RemotingTimeoutException,
RemotingSendRequestException, InterruptedException, MQBrokerException {
ClusterInfo clusterInfoSerializeWrapper = defaultMQAdminExt.examineBrokerClusterInfo();
System.out.printf("%-16s %-22s %-4s %-22s %-16s %19s %19s %10s %5s %6s%n",//
"#Cluster Name",//
"#Broker Name",//
"#BID",//
"#Addr",//
"#Version",//
"#InTPS(LOAD)",//
"#OutTPS(LOAD)",//
"#PCWait(ms)",//
"#Hour",//
"#SPACE"//
);
Iterator<Map.Entry<String, Set<String>>> itCluster = clusterInfoSerializeWrapper.getClusterAddrTable().entrySet().iterator();
while (itCluster.hasNext()) {
Map.Entry<String, Set<String>> next = itCluster.next();
String clusterName = next.getKey();
TreeSet<String> brokerNameSet = new TreeSet<String>();
brokerNameSet.addAll(next.getValue());
for (String brokerName : brokerNameSet) {
BrokerData brokerData = clusterInfoSerializeWrapper.getBrokerAddrTable().get(brokerName);
if (brokerData != null) {
Iterator<Map.Entry<Long, String>> itAddr = brokerData.getBrokerAddrs().entrySet().iterator();
while (itAddr.hasNext()) {
Map.Entry<Long, String> next1 = itAddr.next();
double in = 0;
double out = 0;
String version = "";
String sendThreadPoolQueueSize = "";
String pullThreadPoolQueueSize = "";
String sendThreadPoolQueueHeadWaitTimeMills = "";
String pullThreadPoolQueueHeadWaitTimeMills = "";
String pageCacheLockTimeMills = "";
String earliestMessageTimeStamp = "";
String commitLogDiskRatio = "";
try {
KVTable kvTable = defaultMQAdminExt.fetchBrokerRuntimeStats(next1.getValue());
String putTps = kvTable.getTable().get("putTps");
String getTransferedTps = kvTable.getTable().get("getTransferedTps");
sendThreadPoolQueueSize = kvTable.getTable().get("sendThreadPoolQueueSize");
pullThreadPoolQueueSize = kvTable.getTable().get("pullThreadPoolQueueSize");
sendThreadPoolQueueSize = kvTable.getTable().get("sendThreadPoolQueueSize");
pullThreadPoolQueueSize = kvTable.getTable().get("pullThreadPoolQueueSize");
sendThreadPoolQueueHeadWaitTimeMills = kvTable.getTable().get("sendThreadPoolQueueHeadWaitTimeMills");
pullThreadPoolQueueHeadWaitTimeMills = kvTable.getTable().get("pullThreadPoolQueueHeadWaitTimeMills");
pageCacheLockTimeMills = kvTable.getTable().get("pageCacheLockTimeMills");
earliestMessageTimeStamp = kvTable.getTable().get("earliestMessageTimeStamp");
commitLogDiskRatio = kvTable.getTable().get("commitLogDiskRatio");
version = kvTable.getTable().get("brokerVersionDesc");
{
String[] tpss = putTps.split(" ");
if (tpss != null && tpss.length > 0) {
in = Double.parseDouble(tpss[0]);
}
}
{
String[] tpss = getTransferedTps.split(" ");
if (tpss != null && tpss.length > 0) {
out = Double.parseDouble(tpss[0]);
}
}
} catch (Exception e) {
}
double hour = 0.0;
double space = 0.0;
if (earliestMessageTimeStamp != null && earliestMessageTimeStamp.length() > 0) {
long mills = System.currentTimeMillis() - Long.valueOf(earliestMessageTimeStamp);
hour = mills / 1000.0 / 60.0 / 60.0;
}
if (commitLogDiskRatio != null && commitLogDiskRatio.length() > 0) {
space = Double.valueOf(commitLogDiskRatio);
}
System.out.printf("%-16s %-22s %-4s %-22s %-16s %19s %19s %10s %5s %6s%n",//
clusterName,//
brokerName,//
next1.getKey().longValue(),//
next1.getValue(),//
version,//
String.format("%9.2f(%s,%sms)", in, sendThreadPoolQueueSize, sendThreadPoolQueueHeadWaitTimeMills),//
String.format("%9.2f(%s,%sms)", out, pullThreadPoolQueueSize, pullThreadPoolQueueHeadWaitTimeMills),//
pageCacheLockTimeMills,//
String.format("%2.2f", hour),//
String.format("%.4f", space)//
);
}
}
}
if (itCluster.hasNext()) {
System.out.println("");
}
}
}
}
| {
"content_hash": "2bf6e586565b9f0ba1d78e409c8a3835",
"timestamp": "",
"source": "github",
"line_count": 265,
"max_line_length": 139,
"avg_line_length": 45.449056603773585,
"alnum_prop": 0.537279973430754,
"repo_name": "chenkongshan/RocketMQ",
"id": "e29371b8a232e9636da23b91175d7144cfd211b3",
"size": "12842",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "rocketmq-tools/src/main/java/com/alibaba/rocketmq/tools/command/cluster/ClusterListSubCommand.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2632"
},
{
"name": "Java",
"bytes": "2710183"
},
{
"name": "Shell",
"bytes": "36899"
}
],
"symlink_target": ""
} |
package shared
/*
* This file contains helpers for interacting with the database
* which will check for database errors at the various steps,
* as well as re-try indefinately if the db is locked.
*/
import (
"database/sql"
"fmt"
"runtime"
"time"
"github.com/mattn/go-sqlite3"
)
func PrintStack() {
if !debug || logger == nil {
return
}
buf := make([]byte, 1<<16)
runtime.Stack(buf, true)
Debugf("%s", buf)
}
func IsDbLockedError(err error) bool {
if err == nil {
return false
}
if err == sqlite3.ErrLocked || err == sqlite3.ErrBusy {
return true
}
if err.Error() == "database is locked" {
return true
}
return false
}
func DbBegin(db *sql.DB) (*sql.Tx, error) {
for {
tx, err := db.Begin()
if err == nil {
return tx, nil
}
if !IsDbLockedError(err) {
Debugf("DbBegin: error %q\n", err)
return nil, err
}
Debugf("DbBegin: DB was locked\n")
PrintStack()
time.Sleep(1 * time.Second)
}
}
func TxCommit(tx *sql.Tx) error {
for {
err := tx.Commit()
if err == nil {
return nil
}
if !IsDbLockedError(err) {
Debugf("Txcommit: error %q\n", err)
return err
}
Debugf("Txcommit: db was locked\n")
PrintStack()
time.Sleep(1 * time.Second)
}
}
func DbQueryRowScan(db *sql.DB, q string, args []interface{}, outargs []interface{}) error {
for {
err := db.QueryRow(q, args...).Scan(outargs...)
if err == nil {
return nil
}
if !IsDbLockedError(err) {
Debugf("DbQuery: query %q error %q\n", q, err)
return err
}
Debugf("DbQueryRowScan: query %q args %q, DB was locked\n", q, args)
PrintStack()
time.Sleep(1 * time.Second)
}
}
func DbQuery(db *sql.DB, q string, args ...interface{}) (*sql.Rows, error) {
for {
result, err := db.Query(q, args...)
if err == nil {
return result, nil
}
if !IsDbLockedError(err) {
Debugf("DbQuery: query %q error %q\n", q, err)
return nil, err
}
Debugf("DbQuery: query %q args %q, DB was locked\n", q, args)
PrintStack()
time.Sleep(1 * time.Second)
}
}
func doDbQueryScan(db *sql.DB, q string, args []interface{}, outargs []interface{}) ([][]interface{}, error) {
rows, err := db.Query(q, args...)
if err != nil {
return [][]interface{}{}, err
}
defer rows.Close()
result := [][]interface{}{}
for rows.Next() {
ptrargs := make([]interface{}, len(outargs))
for i, _ := range outargs {
switch t := outargs[i].(type) {
case string:
str := ""
ptrargs[i] = &str
case int:
integer := 0
ptrargs[i] = &integer
default:
return [][]interface{}{}, fmt.Errorf("Bad interface type: %s\n", t)
}
}
err = rows.Scan(ptrargs...)
if err != nil {
return [][]interface{}{}, err
}
newargs := make([]interface{}, len(outargs))
for i, _ := range ptrargs {
switch t := outargs[i].(type) {
case string:
newargs[i] = *ptrargs[i].(*string)
case int:
newargs[i] = *ptrargs[i].(*int)
default:
return [][]interface{}{}, fmt.Errorf("Bad interface type: %s\n", t)
}
}
result = append(result, newargs)
}
err = rows.Err()
if err != nil {
return [][]interface{}{}, err
}
return result, nil
}
/*
* . q is the database query
* . inargs is an array of interfaces containing the query arguments
* . outfmt is an array of interfaces containing the right types of output
* arguments, i.e.
* var arg1 string
* var arg2 int
* outfmt := {}interface{}{arg1, arg2}
*
* The result will be an array (one per output row) of arrays (one per output argument)
* of interfaces, containing pointers to the actual output arguments.
*/
func DbQueryScan(db *sql.DB, q string, inargs []interface{}, outfmt []interface{}) ([][]interface{}, error) {
for {
result, err := doDbQueryScan(db, q, inargs, outfmt)
if err == nil {
return result, nil
}
if !IsDbLockedError(err) {
Debugf("DbQuery: query %q error %q\n", q, err)
return nil, err
}
Debugf("DbQueryscan: query %q inargs %q, DB was locked\n", q, inargs)
PrintStack()
time.Sleep(1 * time.Second)
}
}
func DbExec(db *sql.DB, q string, args ...interface{}) (sql.Result, error) {
for {
result, err := db.Exec(q, args...)
if err == nil {
return result, nil
}
if !IsDbLockedError(err) {
Debugf("DbExec: query %q error %q\n", q, err)
return nil, err
}
Debugf("DbExec: query %q args %q, DB was locked\n", q, args)
PrintStack()
time.Sleep(1 * time.Second)
}
}
| {
"content_hash": "4d7a5a9c180c5b3317a9e899deafa303",
"timestamp": "",
"source": "github",
"line_count": 192,
"max_line_length": 110,
"avg_line_length": 22.822916666666668,
"alnum_prop": 0.6125057051574624,
"repo_name": "dvbportal/osx-lxd",
"id": "3fd7e90fc35a7c6a15fe4b4a3d37a84c758a3196",
"size": "4382",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "shared/db.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "217821"
},
{
"name": "Makefile",
"bytes": "1902"
},
{
"name": "Python",
"bytes": "13771"
},
{
"name": "Shell",
"bytes": "42063"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_21) on Thu Dec 12 11:16:52 BRST 2013 -->
<title>Uses of Class jason.stdlib.length (Jason - AgentSpeak Java Interpreter)</title>
<meta name="date" content="2013-12-12">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class jason.stdlib.length (Jason - AgentSpeak Java Interpreter)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../jason/stdlib/length.html" title="class in jason.stdlib">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jason/stdlib/class-use/length.html" target="_top">Frames</a></li>
<li><a href="length.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class jason.stdlib.length" class="title">Uses of Class<br>jason.stdlib.length</h2>
</div>
<div class="classUseContainer">No usage of jason.stdlib.length</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../jason/stdlib/length.html" title="class in jason.stdlib">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?jason/stdlib/class-use/length.html" target="_top">Frames</a></li>
<li><a href="length.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "c7990cd09def45f592fafcf039758bdc",
"timestamp": "",
"source": "github",
"line_count": 115,
"max_line_length": 104,
"avg_line_length": 34.095652173913045,
"alnum_prop": 0.615404233613874,
"repo_name": "lsa-pucrs/jason-ros-releases",
"id": "bf80a3258c96b89cef78bd9b59f1a31394c1992b",
"size": "3921",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Jason-1.4.0a/doc/api/jason/stdlib/class-use/length.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "552"
},
{
"name": "C++",
"bytes": "2070"
},
{
"name": "CSS",
"bytes": "16052"
},
{
"name": "Groff",
"bytes": "2222"
},
{
"name": "HTML",
"bytes": "10409774"
},
{
"name": "Java",
"bytes": "2797033"
},
{
"name": "Perl6",
"bytes": "320"
},
{
"name": "Pure Data",
"bytes": "236280"
},
{
"name": "Shell",
"bytes": "4492"
},
{
"name": "SourcePawn",
"bytes": "756"
},
{
"name": "XSLT",
"bytes": "38136"
}
],
"symlink_target": ""
} |
namespace base {
namespace win {
ScopedBstr::ScopedBstr(const char16* non_bstr)
: bstr_(SysAllocString(non_bstr)) {
}
ScopedBstr::~ScopedBstr() {
static_assert(sizeof(ScopedBstr) == sizeof(BSTR), "ScopedBstrSize");
SysFreeString(bstr_);
}
void ScopedBstr::Reset(BSTR bstr) {
if (bstr != bstr_) {
// if |bstr_| is NULL, SysFreeString does nothing.
SysFreeString(bstr_);
bstr_ = bstr;
}
}
BSTR ScopedBstr::Release() {
BSTR bstr = bstr_;
bstr_ = NULL;
return bstr;
}
void ScopedBstr::Swap(ScopedBstr& bstr2) {
BSTR tmp = bstr_;
bstr_ = bstr2.bstr_;
bstr2.bstr_ = tmp;
}
BSTR* ScopedBstr::Receive() {
DCHECK(!bstr_) << "BSTR leak.";
return &bstr_;
}
BSTR ScopedBstr::Allocate(const char16* str) {
Reset(SysAllocString(str));
return bstr_;
}
BSTR ScopedBstr::AllocateBytes(size_t bytes) {
Reset(SysAllocStringByteLen(NULL, static_cast<UINT>(bytes)));
return bstr_;
}
void ScopedBstr::SetByteLen(size_t bytes) {
DCHECK(bstr_ != NULL) << "attempting to modify a NULL bstr";
uint32* data = reinterpret_cast<uint32*>(bstr_);
data[-1] = static_cast<uint32>(bytes);
}
size_t ScopedBstr::Length() const {
return SysStringLen(bstr_);
}
size_t ScopedBstr::ByteLength() const {
return SysStringByteLen(bstr_);
}
} // namespace win
} // namespace base
| {
"content_hash": "a15b4e86afbff3c17b16eaabe29709b7",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 70,
"avg_line_length": 20.761904761904763,
"alnum_prop": 0.6674311926605505,
"repo_name": "Workday/OpenFrame",
"id": "298318dbc03d279f79fb02695a584ce995c4043c",
"size": "1540",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "base/win/scoped_bstr.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
package org.elasticsearch.action.search;
import com.google.common.collect.Iterators;
import org.elasticsearch.action.ActionResponse;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Streamable;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentBuilderString;
import java.io.IOException;
import java.util.Iterator;
/**
* A multi search response.
*/
public class MultiSearchResponse implements ActionResponse, Iterable<MultiSearchResponse.Item>, ToXContent {
/**
* A search response item, holding the actual search response, or an error message if it failed.
*/
public static class Item implements Streamable {
private SearchResponse response;
private String failureMessage;
Item() {
}
public Item(SearchResponse response, String failureMessage) {
this.response = response;
this.failureMessage = failureMessage;
}
/**
* Is it a failed search?
*/
public boolean isFailure() {
return failureMessage != null;
}
/**
* The actual failure message, null if its not a failure.
*/
@Nullable
public String failureMessage() {
return failureMessage;
}
/**
* The actual failure message, null if its not a failure.
*/
@Nullable
public String getFailureMessage() {
return failureMessage;
}
/**
* The actual search response, null if its a failure.
*/
@Nullable
public SearchResponse response() {
return this.response;
}
/**
* The actual search response, null if its a failure.
*/
@Nullable
public SearchResponse getResponse() {
return this.response;
}
public static Item readItem(StreamInput in) throws IOException {
Item item = new Item();
item.readFrom(in);
return item;
}
@Override
public void readFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
this.response = new SearchResponse();
response.readFrom(in);
} else {
failureMessage = in.readUTF();
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
if (response != null) {
out.writeBoolean(true);
response.writeTo(out);
} else {
out.writeUTF(failureMessage);
}
}
}
private Item[] items;
MultiSearchResponse() {
}
public MultiSearchResponse(Item[] items) {
this.items = items;
}
@Override
public Iterator<Item> iterator() {
return Iterators.forArray(items);
}
/**
* The list of responses, the order is the same as the one provided in the request.
*/
public Item[] responses() {
return this.items;
}
/**
* The list of responses, the order is the same as the one provided in the request.
*/
public Item[] getResponses() {
return this.items;
}
@Override
public void readFrom(StreamInput in) throws IOException {
items = new Item[in.readVInt()];
for (int i = 0; i < items.length; i++) {
items[i] = Item.readItem(in);
}
}
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeVInt(items.length);
for (Item item : items) {
item.writeTo(out);
}
}
@Override
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
builder.startArray(Fields.RESPONSES);
for (Item item : items) {
if (item.isFailure()) {
builder.startObject();
builder.field(Fields.ERROR, item.failureMessage());
builder.endObject();
} else {
builder.startObject();
item.response().toXContent(builder, params);
builder.endObject();
}
}
builder.endArray();
return builder;
}
static final class Fields {
static final XContentBuilderString RESPONSES = new XContentBuilderString("responses");
static final XContentBuilderString ERROR = new XContentBuilderString("error");
}
}
| {
"content_hash": "33515a4d5bd9b6ad48a19ff8a1026f5c",
"timestamp": "",
"source": "github",
"line_count": 169,
"max_line_length": 108,
"avg_line_length": 27.94674556213018,
"alnum_prop": 0.5871268261698074,
"repo_name": "chanil1218/elasticsearch",
"id": "bb1abea37c042e03b9204986479f998ee0e8eb06",
"size": "4723",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/org/elasticsearch/action/search/MultiSearchResponse.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package Paws::EFS::DescribeTagsResponse;
use Moose;
has Marker => (is => 'ro', isa => 'Str');
has NextMarker => (is => 'ro', isa => 'Str');
has Tags => (is => 'ro', isa => 'ArrayRef[Paws::EFS::Tag]', required => 1);
has _request_id => (is => 'ro', isa => 'Str');
1;
### main pod documentation begin ###
=head1 NAME
Paws::EFS::DescribeTagsResponse
=head1 ATTRIBUTES
=head2 Marker => Str
If the request included a C<Marker>, the response returns that value in
this field.
=head2 NextMarker => Str
If a value is present, there are more tags to return. In a subsequent
request, you can provide the value of C<NextMarker> as the value of the
C<Marker> parameter in your next request to retrieve the next set of
tags.
=head2 B<REQUIRED> Tags => ArrayRef[L<Paws::EFS::Tag>]
Returns tags associated with the file system as an array of C<Tag>
objects.
=head2 _request_id => Str
=cut
| {
"content_hash": "dfa9a57430024e74323e3d62ae7fccfc",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 77,
"avg_line_length": 21,
"alnum_prop": 0.6733111849390919,
"repo_name": "ioanrogers/aws-sdk-perl",
"id": "7d5ac6282624d8473bbb6e56b633c98f8c741d78",
"size": "904",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "auto-lib/Paws/EFS/DescribeTagsResponse.pm",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Makefile",
"bytes": "1292"
},
{
"name": "Perl",
"bytes": "20360380"
},
{
"name": "Perl 6",
"bytes": "99393"
},
{
"name": "Shell",
"bytes": "445"
}
],
"symlink_target": ""
} |
define(["solv/date/move", "solv/date/compare"], function () {
"use strict";
describe("date.move", function () {
var birthDate;
beforeEach(function () {
var year = 1980,
month = 3, // April
day = 18,
hour = 8,
minute = 14,
second = 23,
millisecond = 234;
birthDate = new Date(year, month, day, hour, minute, second, millisecond);
});
it("moves a date in place", function () {
birthDate.move(2, "y");
expect(birthDate.getFullYear()).toBe(1982);
});
it("moves date backward", function () {
birthDate.move(-13, "m");
expect(birthDate.getMonth()).toBe(2);
expect(birthDate.getFullYear()).toBe(1979);
});
forEachDatePart(function (part) {
xit ("supports date part "+ part, function () {
var amount = plusOrMinus100(),
birthDate2 = new Date(+birthDate);
birthDate2.move(amount, part);
expect(birthDate.compare(birthDate2, part)).toBe(amount);
});
});
});
function forEachDatePart (callback) {
var parts = ["d", "w", "m", "q", "y", "h", "M", "s", "l"],
numOfParts = parts.length,
i = 0;
for (; i < numOfParts; i += 1) {
callback(parts[i]);
}
}
function plusOrMinus100 () {
return Math.floor(100 - (Math.random() * 200));
}
}); | {
"content_hash": "0541d216d20175ca29993dd580ebffb0",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 77,
"avg_line_length": 23.339622641509433,
"alnum_prop": 0.5925626515763945,
"repo_name": "bob-gray/solv",
"id": "14de44a417ad86c3466d9820504f8f44148feb6a",
"size": "1237",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/spec/date/move-test.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "414"
},
{
"name": "JavaScript",
"bytes": "313358"
}
],
"symlink_target": ""
} |
layout: page
title: Summit Music Seminar
date: 2016-05-24
author: Jeremy Houston
tags: weekly links, java
status: published
summary: Vestibulum rutrum hendrerit eros vel pulvinar. Phasellus vel risus.
banner: images/banner/wedding.jpg
booking:
startDate: 05/16/2019
endDate: 05/19/2019
ctyhocn: VENFLHX
groupCode: SMS
published: true
---
Nulla sapien turpis, luctus vel sapien quis, tempus placerat diam. Aenean non eleifend nisl. Etiam congue risus eros. Maecenas in feugiat turpis, id finibus nisl. Duis iaculis elit ut dictum molestie. In non sem dignissim, commodo sem et, dapibus ex. Fusce porta lectus vitae lorem consequat, id molestie sapien porta.
* Etiam accumsan nulla malesuada semper semper
* Maecenas gravida ipsum id dui dapibus tincidunt
* Cras vel urna maximus, tincidunt massa vitae, fermentum sapien.
Aenean cursus commodo rutrum. Aliquam eu justo non neque iaculis pretium. Nam at arcu venenatis, commodo tellus eget, fringilla nunc. In porttitor fringilla velit, a maximus odio dapibus et. Pellentesque nec faucibus lacus, vel porttitor leo. Integer a nisl eu purus lacinia elementum. Aliquam imperdiet, metus nec sodales imperdiet, nisi augue consequat urna, at tempor sapien sapien vitae diam. Aenean eget enim augue. Aliquam ac eros ac nunc tempor pellentesque eget vel nulla. Sed mi elit, pulvinar vel eleifend efficitur, maximus sed urna. Suspendisse quis condimentum nibh. In feugiat luctus felis. Aliquam nec vulputate turpis, quis viverra orci.
| {
"content_hash": "239a87dd35a3aa9bdce025d65f81ba3e",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 653,
"avg_line_length": 67.45454545454545,
"alnum_prop": 0.8012129380053908,
"repo_name": "KlishGroup/prose-pogs",
"id": "3dd5e4ffdfcc916cff8ba130241ae41dcfee1b01",
"size": "1488",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "pogs/V/VENFLHX/SMS/index.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
function [totalFuelBurn, totalFlightTime] = runFullFlight()
%% runFullFlight simulates the flight to calculate fuel consumption and time.
planeType = 1;
if (planeType == 1)
ServiceCeilingFeet = 41000.0;
OperatingEmptyWeightPounds = 91108.0;
FuelCapacityGallons = 7837.0;
MaximumTakeOffWeightPounds = 174200.0;
MaximumMachSpeed = 0.82;
MinimumAirSpeedKnots = 150.0;
TaxiFuelBurnPoundsPerHour = 1984.158;
end
| {
"content_hash": "51da18a8a8ca644ae511060e1ace8c21",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 77,
"avg_line_length": 33.92307692307692,
"alnum_prop": 0.7392290249433107,
"repo_name": "navoj/Flight_Plan_Optimization",
"id": "309e609f43ff5a4de801dcde05390c18608c6d33",
"size": "441",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "runFullFlight.m",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Matlab",
"bytes": "125328"
}
],
"symlink_target": ""
} |
package Scalisp
class CompilerError(s: String) extends Exception(s) { }
object ScalispCompiler {
var global_functions = List[String]()
var higher_order_funs = collection.mutable.Map[String,
collection.mutable.Map[Int, Int]]().withDefault(_ => collection.mutable.Map[Int, Int]())
def compile(src: String, filename: String) = {
// strip comments and replace newlines with spaces
val ast = LispParser.parse(src.replaceAll(";[^\n$]*", " ").replace("\n", " "))
val code = Preprocessor.process(ast).map(e => process(e)).filter(_.length > 0).mkString("\n\n ")
("""
object %s extends App {
import CompiledApp.CompiledBuiltins._
import CompiledApp.Helper._
// user methods
%s
// main code
%s
}
""".format(filename.split("\\.").head, global_functions.mkString("\n\n "), code))
}
def compileLine(src: String) = {
global_functions = List()
val ast = LispParser.parse(src.replaceAll(";[^\n$]*", " ").replace("\n", " "))
val code = Preprocessor.process(ast).map(e => process(e)).filter(_.length > 0).mkString("\n\n ")
global_functions.mkString("\n\n ") + code
}
def isFunction(name: String, body: Any): Int = body match {
case n :: tail if n == name => tail.length
case Nil => -1
case l: List[Any] => l.map(e => isFunction(name, e)).max
case _ => -1
}
case class UsedIn(name: String, argPos: Int)
def usedInFunction(name: String, exp: Any): Option[UsedIn] = exp match {
case Nil => None
case l: List[Any] =>
if(l.tail.contains(name))
l.head match {
case s: String => Some( UsedIn(s, l.indexOf(name) - 1) )
case _ => None
}
else
l.tail.map(e => usedInFunction(name, e)).flatten.headOption
case _ => None
}
def process(exp: Any, indent: String = " "): String = exp match {
case l: List[Any] => l.head match {
// special forms
case "if" => ("if(%s) {\n" + indent + " %s\n" + indent +"} else {\n" + indent + " %s\n" + indent + "}").format( process(l(1)), process(l(2), indent + " "), process(l(3), indent + " ") )
case "define" => l(1) match {
case name: String => "var %s = %s".format(name, process(l(2)))
case _ => throw new CompilerError("variable name has to be a string")
}
case "set!" => l(1) match {
case name: String => "%s = %s".format(name, process(l(2)))
case _ => throw new CompilerError("variable name has to be a string")
}
case "begin" => l.tail.map(e => process(e, indent + " ")).mkString("{\n " + indent, "\n " + indent, "\n" + indent + "}")
case "quote" => stringify(l(1))
case "lambda" => l(1) match {
case parms: List[Any] =>
val p = parms.map {
case n: String => n
case _ => throw new CompilerError("parm names have to be strings")
}
val args = p.map(_ + ": Any").mkString(", ")
val body = process(l(2), indent + " ")
if(body.length < 20)
"(%s) => { %s }".format(args, body)
else
("(%s) => {\n" + indent + " %s\n" + indent + "}").format(args, body)
case _ => throw new CompilerError("lambda arguments have to be a list")
}
case "let" => l(1) match {
case names: List[String] => l(2) match {
case vals: List[Any] =>
val body = l(3)
val prelude = names.zip(vals).map {
case (param: String, value: Any) => "val %s = %s".format(param, process(value, indent + " "))
}
("{\n" + indent + " %s\n" + indent + " %s\n" + indent + "}").format(prelude.mkString("\n " + indent), process(body, indent + " "))
case _ => throw new CompilerError("let values have to be a list")
}
case _ => throw new CompilerError("let names have to be a list of strings")
}
case "defun" => l(1) match {
case name: String => l(2) match {
case parms: List[Any] =>
val p = parms.map {
case n: String => n
case _ => throw new CompilerError("parm names have to be strings")
}
val args = p.map(n => isFunction(n, l(3))).zip(p).zipWithIndex.map {
case ((-1, name: String), _) =>
name + (usedInFunction(name, l(3)) match {
case Some(UsedIn(name, pos)) =>
if(higher_order_funs.contains(name))
": (%s) => Any".format(
(0 until higher_order_funs(name)(pos)).map(_ => "Any").mkString(", ") )
else
": Any"
case _ => ": Any"
})
case ((n: Int, pname: String), i: Int) =>
val m = higher_order_funs(name)
m(i) = n
higher_order_funs(name) = m
pname + ": (%s) => Any".format(
(0 until n).map(_ => "Any").mkString(", ") )
}
global_functions = ("def %s(%s): Any = {\n" + indent + " %s\n" + indent + "}").format(name,
args.mkString(", "),
process(l(3), indent + " ")) :: global_functions
""
case _ => throw new CompilerError("function arguments have to be a list")
}
case _ => throw new CompilerError("function name has to be a string")
}
// function call
// replace simple functions by operators for prettier code
case op: String if "+-*/%".contains(op) => l.tail.map(e => process(e)).mkString("(", " %s ".format(op), ")")
case "append" => l.tail.map(e => process(e)).mkString(" ++ ")
case "cons" => l.tail.map(e => process(e)).mkString(" :: ")
case "=" if l.length == 3 => l.tail.map(e => process(e)).mkString(" == ")
case comp: String if List("<", ">", "<=", ">=", "=", "!=").contains(comp) &&
l.length == 3 => l.tail.map(e => process(e)).mkString(" %s ".format(comp))
// other functions have to be called normally
case name: String => "%s(%s)".format(name, l.tail.map(e => process(e, indent + " ")).mkString(", "))
}
case op: String if "+-*/%".contains(op) => "_ %s _".format(op)
case s: String => s
// basic values
case n: Long => n.toString + "l"
case d: Double => d.toString
case Literal(l) => "\"" + l + "\""
}
def stringify(exp: Any): String = exp match {
case l: List[Any] => l.map(e => stringify(e)).mkString("List(", ", ", ")")
case s: String => "\"" + s + "\""
// basic values
case n: Long => n.toString + "l"
case d: Double => d.toString
case Literal(l) => "Literal(\"" + l + "\")"
}
}
| {
"content_hash": "1aac4f4e03d94a25776caddcadbfe2eb",
"timestamp": "",
"source": "github",
"line_count": 167,
"max_line_length": 195,
"avg_line_length": 40.07784431137725,
"alnum_prop": 0.5067981473180936,
"repo_name": "quantintel/Scalisp",
"id": "ee834d01cce72e9ff400682190da3a12ec7c200d",
"size": "6693",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/scala/compiler.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Common Lisp",
"bytes": "3479"
},
{
"name": "Scala",
"bytes": "41936"
}
],
"symlink_target": ""
} |
<?php
namespace DoctrineORMModule\Proxy\__CG__\Database\Entity;
/**
* DO NOT EDIT THIS FILE - IT WAS CREATED BY DOCTRINE'S PROXY GENERATOR
*/
class Cities extends \Database\Entity\Cities implements \Doctrine\ORM\Proxy\Proxy
{
/**
* @var \Closure the callback responsible for loading properties in the proxy object. This callback is called with
* three parameters, being respectively the proxy object to be initialized, the method that triggered the
* initialization process and an array of ordered parameters that were passed to that method.
*
* @see \Doctrine\Common\Persistence\Proxy::__setInitializer
*/
public $__initializer__;
/**
* @var \Closure the callback responsible of loading properties that need to be copied in the cloned object
*
* @see \Doctrine\Common\Persistence\Proxy::__setCloner
*/
public $__cloner__;
/**
* @var boolean flag indicating if this object was already initialized
*
* @see \Doctrine\Common\Persistence\Proxy::__isInitialized
*/
public $__isInitialized__ = false;
/**
* @var array properties to be lazy loaded, with keys being the property
* names and values being their default values
*
* @see \Doctrine\Common\Persistence\Proxy::__getLazyProperties
*/
public static $lazyPropertiesDefaults = array();
/**
* @param \Closure $initializer
* @param \Closure $cloner
*/
public function __construct($initializer = null, $cloner = null)
{
$this->__initializer__ = $initializer;
$this->__cloner__ = $cloner;
}
/**
*
* @return array
*/
public function __sleep()
{
if ($this->__isInitialized__) {
return array('__isInitialized__', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'cityId', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'cityName', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'provinceId', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'recordStatus');
}
return array('__isInitialized__', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'cityId', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'cityName', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'provinceId', '' . "\0" . 'Database\\Entity\\Cities' . "\0" . 'recordStatus');
}
/**
*
*/
public function __wakeup()
{
if ( ! $this->__isInitialized__) {
$this->__initializer__ = function (Cities $proxy) {
$proxy->__setInitializer(null);
$proxy->__setCloner(null);
$existingProperties = get_object_vars($proxy);
foreach ($proxy->__getLazyProperties() as $property => $defaultValue) {
if ( ! array_key_exists($property, $existingProperties)) {
$proxy->$property = $defaultValue;
}
}
};
}
}
/**
*
*/
public function __clone()
{
$this->__cloner__ && $this->__cloner__->__invoke($this, '__clone', array());
}
/**
* Forces initialization of the proxy
*/
public function __load()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array());
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __isInitialized()
{
return $this->__isInitialized__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitialized($initialized)
{
$this->__isInitialized__ = $initialized;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setInitializer(\Closure $initializer = null)
{
$this->__initializer__ = $initializer;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __getInitializer()
{
return $this->__initializer__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
*/
public function __setCloner(\Closure $cloner = null)
{
$this->__cloner__ = $cloner;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific cloning logic
*/
public function __getCloner()
{
return $this->__cloner__;
}
/**
* {@inheritDoc}
* @internal generated method: use only when explicitly handling proxy specific loading logic
* @static
*/
public function __getLazyProperties()
{
return self::$lazyPropertiesDefaults;
}
/**
* {@inheritDoc}
*/
public function getCityId()
{
if ($this->__isInitialized__ === false) {
return (int) parent::getCityId();
}
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCityId', array());
return parent::getCityId();
}
/**
* {@inheritDoc}
*/
public function setCityName($cityName)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setCityName', array($cityName));
return parent::setCityName($cityName);
}
/**
* {@inheritDoc}
*/
public function getCityName()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCityName', array());
return parent::getCityName();
}
/**
* {@inheritDoc}
*/
public function setProvinceId($provinceId)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setProvinceId', array($provinceId));
return parent::setProvinceId($provinceId);
}
/**
* {@inheritDoc}
*/
public function getProvinceId()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getProvinceId', array());
return parent::getProvinceId();
}
/**
* {@inheritDoc}
*/
public function setRecordStatus($recordStatus)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setRecordStatus', array($recordStatus));
return parent::setRecordStatus($recordStatus);
}
/**
* {@inheritDoc}
*/
public function getRecordStatus()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getRecordStatus', array());
return parent::getRecordStatus();
}
}
| {
"content_hash": "fb74324cf2683c2897540bc241efea83",
"timestamp": "",
"source": "github",
"line_count": 257,
"max_line_length": 290,
"avg_line_length": 26.525291828793776,
"alnum_prop": 0.5605104884846707,
"repo_name": "devhood/erp-blpi",
"id": "ca673831eca8be07811712fd9b2c58939c1bf2f5",
"size": "6817",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "data/DoctrineORMModule/Proxy/__CG__DatabaseEntityCities.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "655777"
},
{
"name": "CoffeeScript",
"bytes": "4704"
},
{
"name": "Erlang",
"bytes": "4811"
},
{
"name": "Go",
"bytes": "6808"
},
{
"name": "JavaScript",
"bytes": "4198030"
},
{
"name": "PHP",
"bytes": "468054"
},
{
"name": "Perl",
"bytes": "581388"
},
{
"name": "Python",
"bytes": "5596"
},
{
"name": "Shell",
"bytes": "62232"
}
],
"symlink_target": ""
} |
import * as is from '../is';
import * as util from '../util';
import Selector from '../selector';
import apply from './apply';
import bypass from './bypass';
import container from './container';
import getForEle from './get-for-ele';
import json from './json';
import stringSheet from './string-sheet';
import properties from './properties';
import parse from './parse';
let Style = function( cy ){
if( !(this instanceof Style) ){
return new Style( cy );
}
if( !is.core( cy ) ){
util.error( 'A style must have a core reference' );
return;
}
this._private = {
cy: cy,
coreStyle: {}
};
this.length = 0;
this.resetToDefault();
};
let styfn = Style.prototype;
styfn.instanceString = function(){
return 'style';
};
// remove all contexts
styfn.clear = function(){
let _p = this._private;
let cy = _p.cy;
let eles = cy.elements();
for( let i = 0; i < this.length; i++ ){
this[ i ] = undefined;
}
this.length = 0;
_p.contextStyles = {};
_p.propDiffs = {};
this.cleanElements( eles, true );
eles.forEach(ele => {
let ele_p = ele[0]._private;
ele_p.styleDirty = true;
ele_p.appliedInitStyle = false;
});
return this; // chaining
};
styfn.resetToDefault = function(){
this.clear();
this.addDefaultStylesheet();
return this;
};
// builds a style object for the 'core' selector
styfn.core = function( propName ){
return this._private.coreStyle[ propName ] || this.getDefaultProperty( propName );
};
// create a new context from the specified selector string and switch to that context
styfn.selector = function( selectorStr ){
// 'core' is a special case and does not need a selector
let selector = selectorStr === 'core' ? null : new Selector( selectorStr );
let i = this.length++; // new context means new index
this[ i ] = {
selector: selector,
properties: [],
mappedProperties: [],
index: i
};
return this; // chaining
};
// add one or many css rules to the current context
styfn.css = function(){
let self = this;
let args = arguments;
if( args.length === 1 ){
let map = args[0];
for( let i = 0; i < self.properties.length; i++ ){
let prop = self.properties[ i ];
let mapVal = map[ prop.name ];
if( mapVal === undefined ){
mapVal = map[ util.dash2camel( prop.name ) ];
}
if( mapVal !== undefined ){
this.cssRule( prop.name, mapVal );
}
}
} else if( args.length === 2 ){
this.cssRule( args[0], args[1] );
}
// do nothing if args are invalid
return this; // chaining
};
styfn.style = styfn.css;
// add a single css rule to the current context
styfn.cssRule = function( name, value ){
// name-value pair
let property = this.parse( name, value );
// add property to current context if valid
if( property ){
let i = this.length - 1;
this[ i ].properties.push( property );
this[ i ].properties[ property.name ] = property; // allow access by name as well
if( property.name.match( /pie-(\d+)-background-size/ ) && property.value ){
this._private.hasPie = true;
}
if( property.mapped ){
this[ i ].mappedProperties.push( property );
}
// add to core style if necessary
let currentSelectorIsCore = !this[ i ].selector;
if( currentSelectorIsCore ){
this._private.coreStyle[ property.name ] = property;
}
}
return this; // chaining
};
styfn.append = function( style ){
if( is.stylesheet( style ) ){
style.appendToStyle( this );
} else if( is.array( style ) ){
this.appendFromJson( style );
} else if( is.string( style ) ){
this.appendFromString( style );
} // you probably wouldn't want to append a Style, since you'd duplicate the default parts
return this;
};
// static function
Style.fromJson = function( cy, json ){
let style = new Style( cy );
style.fromJson( json );
return style;
};
Style.fromString = function( cy, string ){
return new Style( cy ).fromString( string );
};
[
apply,
bypass,
container,
getForEle,
json,
stringSheet,
properties,
parse
].forEach( function( props ){
util.extend( styfn, props );
} );
Style.types = styfn.types;
Style.properties = styfn.properties;
Style.propertyGroups = styfn.propertyGroups;
Style.propertyGroupNames = styfn.propertyGroupNames;
Style.propertyGroupKeys = styfn.propertyGroupKeys;
export default Style;
| {
"content_hash": "ab2cb28daee51c773fdb638b0e2bb8b8",
"timestamp": "",
"source": "github",
"line_count": 200,
"max_line_length": 92,
"avg_line_length": 22.005,
"alnum_prop": 0.6350829356964326,
"repo_name": "cytoscape/cytoscape.js",
"id": "6c483678cbf1427c824b42daa800cdbfef1dcdd8",
"size": "4401",
"binary": false,
"copies": "1",
"ref": "refs/heads/unstable",
"path": "src/style/index.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "7568"
},
{
"name": "HTML",
"bytes": "20227"
},
{
"name": "JavaScript",
"bytes": "5095698"
}
],
"symlink_target": ""
} |
/**
* Created by Serge Balykov (ua9msn@mail.ru) on 2/12/17.
*/
'use strict';
describe('empty option suite', function(){
var $input;
const format = {
hour12: true,
hour: '2-digit',
minute: '2-digit',
second: '2-digit',
weekday: 'long',
year: 'numeric',
month: 'long',
day: 'numeric'
};
// Since I've got the problem with running tests both with karma and test runner,
// due to the path and ajax loading of local files, I set the fixture as the string here.
//jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
beforeEach(function () {
setFixtures('<input id="dt" type="text" />');
$input = $('#dt');
$input.datetime();
});
it('$ should be defined', function(){
expect($).not.toBeNull();
});
it('$input should be empty without any options', function(){
expect($input.val()).toEqual('');
});
it('expect Invalid Date as result of getTime if input is empty', function(){
expect($input.datetime('getTime').getTime()).toBeNaN();
});
it('setTime(0) must be 1 jan 1970 00:00:00', function(){
$input.datetime('setTime', 0);
let timestamp = $input.datetime('getTime').getTime();
expect(timestamp).toEqual(0);
});
it('DEL should clear value and set Invalid Date', function(){
$input.trigger({type: 'keypress', which: 46, keyCode: 46});
let timestamp = $input.datetime('getTime').getTime();
expect(timestamp).toBeNaN();
expect($input.val()).toEqual('');
});
}); | {
"content_hash": "f3c370acb99e93ddd601889ece01bbca",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 93,
"avg_line_length": 24.264705882352942,
"alnum_prop": 0.5654545454545454,
"repo_name": "ua9msn/datetime",
"id": "6f67136632bbc7653070e10b3da567bc5d72cdb7",
"size": "1650",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "spec/serv.spec.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "1091"
},
{
"name": "JavaScript",
"bytes": "39850"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "0c6ca0705219426aa191b44fb194414b",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "40efef43fc72d4be778f0e636013c8c38d37cd10",
"size": "201",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Warczewiczella/Warczewiczella marginata/ Syn. Chondrorhyncha marginata/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package fr.openwide.core.wicket.more.link.descriptor.mapper;
import org.apache.wicket.model.IModel;
import org.javatuples.Quartet;
import fr.openwide.core.wicket.more.link.descriptor.ILinkDescriptor;
import fr.openwide.core.wicket.more.link.descriptor.builder.state.main.common.IMappableParameterDeclarationState;
/**
* An object that can create a {@link ILinkDescriptor} using four {@link IModel}s.
* @see ILinkDescriptorMapper
* @see IMappableParameterDeclarationState#model(Class)
*/
public interface IFourParameterLinkDescriptorMapper<L, T1, T2, T3, T4>
extends ILinkDescriptorMapper
<
L,
Quartet
<
? extends IModel<T1>,
? extends IModel<T2>,
? extends IModel<T3>,
? extends IModel<T4>
>
> {
/**
* {@inheritDoc}
* @deprecated Provided in order to implement {@link ILinkDescriptorMapper}. When you're using a
* {@link IThreeParameterLinkDescriptorMapper}, please use {@link #map(IModel, IModel, IModel)} instead.
*/
@Override
@Deprecated
L map(Quartet<? extends IModel<T1>, ? extends IModel<T2>, ? extends IModel<T3>, ? extends IModel<T4>> param);
/**
* Map the given models to a newly-created {@link ILinkDescriptor}.
* @see #map(Quartet)
*/
L map(IModel<T1> model1, IModel<T2> model2, IModel<T3> model3, IModel<T4> model4);
IThreeParameterLinkDescriptorMapper<L, T2, T3, T4> setParameter1(final IModel<T1> model1);
IThreeParameterLinkDescriptorMapper<L, T2, T3, T4> ignoreParameter1();
IThreeParameterLinkDescriptorMapper<L, T1, T3, T4> setParameter2(final IModel<T2> model2);
IThreeParameterLinkDescriptorMapper<L, T1, T3, T4> ignoreParameter2();
IThreeParameterLinkDescriptorMapper<L, T1, T2, T4> setParameter3(final IModel<T3> model3);
IThreeParameterLinkDescriptorMapper<L, T1, T2, T4> ignoreParameter3();
IThreeParameterLinkDescriptorMapper<L, T1, T2, T3> setParameter4(final IModel<T4> model4);
IThreeParameterLinkDescriptorMapper<L, T1, T2, T3> ignoreParameter4();
}
| {
"content_hash": "fa61dadd27c409b997798385f5dace1d",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 113,
"avg_line_length": 34.06896551724138,
"alnum_prop": 0.7419028340080972,
"repo_name": "openwide-java/owsi-core-parent",
"id": "6edb468e3fac46cddb4adb7bb834c9037f92e9b8",
"size": "1976",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "owsi-core/owsi-core-components/owsi-core-component-wicket-more/src/main/java/fr/openwide/core/wicket/more/link/descriptor/mapper/IFourParameterLinkDescriptorMapper.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "81112"
},
{
"name": "FreeMarker",
"bytes": "629"
},
{
"name": "HTML",
"bytes": "180345"
},
{
"name": "Java",
"bytes": "5044329"
},
{
"name": "JavaScript",
"bytes": "454470"
},
{
"name": "Shell",
"bytes": "3932"
}
],
"symlink_target": ""
} |
#ifndef CSSDefaultStyleSheets_h
#define CSSDefaultStyleSheets_h
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
namespace blink {
class Element;
class RuleSet;
class StyleSheetContents;
class CSSDefaultStyleSheets : public GarbageCollected<CSSDefaultStyleSheets> {
WTF_MAKE_NONCOPYABLE(CSSDefaultStyleSheets);
public:
static CSSDefaultStyleSheets& instance();
void ensureDefaultStyleSheetsForElement(const Element&,
bool& changedDefaultStyle);
void ensureDefaultStyleSheetForFullscreen();
RuleSet* defaultStyle() { return m_defaultStyle.get(); }
RuleSet* defaultQuirksStyle() { return m_defaultQuirksStyle.get(); }
RuleSet* defaultPrintStyle() { return m_defaultPrintStyle.get(); }
RuleSet* defaultViewSourceStyle();
StyleSheetContents* ensureMobileViewportStyleSheet();
StyleSheetContents* ensureTelevisionViewportStyleSheet();
StyleSheetContents* ensureXHTMLMobileProfileStyleSheet();
StyleSheetContents* defaultStyleSheet() { return m_defaultStyleSheet.get(); }
StyleSheetContents* quirksStyleSheet() { return m_quirksStyleSheet.get(); }
StyleSheetContents* svgStyleSheet() { return m_svgStyleSheet.get(); }
StyleSheetContents* mathmlStyleSheet() { return m_mathmlStyleSheet.get(); }
StyleSheetContents* mediaControlsStyleSheet() {
return m_mediaControlsStyleSheet.get();
}
StyleSheetContents* fullscreenStyleSheet() {
return m_fullscreenStyleSheet.get();
}
DECLARE_TRACE();
private:
CSSDefaultStyleSheets();
Member<RuleSet> m_defaultStyle;
Member<RuleSet> m_defaultQuirksStyle;
Member<RuleSet> m_defaultPrintStyle;
Member<RuleSet> m_defaultViewSourceStyle;
Member<StyleSheetContents> m_defaultStyleSheet;
Member<StyleSheetContents> m_mobileViewportStyleSheet;
Member<StyleSheetContents> m_televisionViewportStyleSheet;
Member<StyleSheetContents> m_xhtmlMobileProfileStyleSheet;
Member<StyleSheetContents> m_quirksStyleSheet;
Member<StyleSheetContents> m_svgStyleSheet;
Member<StyleSheetContents> m_mathmlStyleSheet;
Member<StyleSheetContents> m_mediaControlsStyleSheet;
Member<StyleSheetContents> m_fullscreenStyleSheet;
};
} // namespace blink
#endif // CSSDefaultStyleSheets_h
| {
"content_hash": "a5265b6edec5646824a0c35fd100bb10",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 79,
"avg_line_length": 32.86764705882353,
"alnum_prop": 0.7807606263982103,
"repo_name": "ssaroha/node-webrtc",
"id": "5b53a219871d9942e5e0633bfb52db4decd48cea",
"size": "3228",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "third_party/webrtc/include/chromium/src/third_party/WebKit/Source/core/css/CSSDefaultStyleSheets.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Batchfile",
"bytes": "6179"
},
{
"name": "C",
"bytes": "2679"
},
{
"name": "C++",
"bytes": "54327"
},
{
"name": "HTML",
"bytes": "434"
},
{
"name": "JavaScript",
"bytes": "42707"
},
{
"name": "Python",
"bytes": "3835"
}
],
"symlink_target": ""
} |
<?php
namespace Magento\Checkout\Service\V1\Data\Cart;
class CustomerMapperTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \Magento\Checkout\Service\V1\Data\Cart\CustomerMapper
*/
protected $mapper;
protected function setUp()
{
$this->mapper = new \Magento\Checkout\Service\V1\Data\Cart\CustomerMapper();
}
public function testMap()
{
$methods = ['getCustomerId', 'getCustomerEmail', 'getCustomerGroupId', 'getCustomerTaxClassId',
'getCustomerPrefix', 'getCustomerFirstname', 'getCustomerMiddlename', 'getCustomerLastname',
'getCustomerSuffix', 'getCustomerDob', 'getCustomerNote', 'getCustomerNoteNotify',
'getCustomerIsGuest', 'getCustomerGender', 'getCustomerTaxvat', '__wakeUp', ];
$quoteMock = $this->getMock('Magento\Sales\Model\Quote', $methods, [], '', false);
$expected = [
Customer::ID => 10,
Customer::EMAIL => 'customer@example.com',
Customer::GROUP_ID => '4',
Customer::TAX_CLASS_ID => 10,
Customer::PREFIX => 'prefix_',
Customer::FIRST_NAME => 'First Name',
Customer::MIDDLE_NAME => 'Middle Name',
Customer::LAST_NAME => 'Last Name',
Customer::SUFFIX => 'suffix',
Customer::DOB => '1/1/1989',
Customer::NOTE => 'customer_note',
Customer::NOTE_NOTIFY => 'note_notify',
Customer::IS_GUEST => false,
Customer::GENDER => 'male',
Customer::TAXVAT => 'taxvat',
];
$expectedMethods = [
'getCustomerId' => 10,
'getCustomerEmail' => 'customer@example.com',
'getCustomerGroupId' => 4,
'getCustomerTaxClassId' => 10,
'getCustomerPrefix' => 'prefix_',
'getCustomerFirstname' => 'First Name',
'getCustomerMiddlename' => 'Middle Name',
'getCustomerLastname' => 'Last Name',
'getCustomerSuffix' => 'suffix',
'getCustomerDob' => '1/1/1989',
'getCustomerNote' => 'customer_note',
'getCustomerNoteNotify' => 'note_notify',
'getCustomerIsGuest' => false,
'getCustomerGender' => 'male',
'getCustomerTaxvat' => 'taxvat',
];
foreach ($expectedMethods as $method => $value) {
$quoteMock->expects($this->once())->method($method)->will($this->returnValue($value));
}
$this->assertEquals($expected, $this->mapper->map($quoteMock));
}
}
| {
"content_hash": "bc55705b934598075b369dfe68ad42fb",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 104,
"avg_line_length": 40.698412698412696,
"alnum_prop": 0.5663026521060842,
"repo_name": "webadvancedservicescom/magento",
"id": "6b74334cfe636ddd4db39ed3d1466705aef877df",
"size": "2654",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dev/tests/unit/testsuite/Magento/Checkout/Service/V1/Data/Cart/CustomerMapperTest.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "16380"
},
{
"name": "CSS",
"bytes": "2592299"
},
{
"name": "HTML",
"bytes": "9192193"
},
{
"name": "JavaScript",
"bytes": "2874762"
},
{
"name": "PHP",
"bytes": "41399372"
},
{
"name": "Shell",
"bytes": "3084"
},
{
"name": "VCL",
"bytes": "3547"
},
{
"name": "XSLT",
"bytes": "19817"
}
],
"symlink_target": ""
} |
module AsposeStorageCloud
#
class FolderResponse < BaseObject
attr_accessor :files, :code, :status
# attribute mapping from ruby-style variable name to JSON key
def self.attribute_map
{
#
:'files' => :'Files',
#
:'code' => :'Code',
#
:'status' => :'Status'
}
end
# attribute type
def self.swagger_types
{
:'files' => :'Array<FileResponse>',
:'code' => :'String',
:'status' => :'String'
}
end
def initialize(attributes = {})
return if !attributes.is_a?(Hash) || attributes.empty?
# convert string to symbol for hash key
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
if attributes[:'Files']
if (value = attributes[:'Files']).is_a?(Array)
self.files = value
end
end
if attributes[:'Code']
self.code = attributes[:'Code']
end
if attributes[:'Status']
self.status = attributes[:'Status']
end
end
def status=(status)
allowed_values = ["Continue", "SwitchingProtocols", "OK", "Created", "Accepted", "NonAuthoritativeInformation", "NoContent", "ResetContent", "PartialContent", "MultipleChoices", "Ambiguous", "MovedPermanently", "Moved", "Found", "Redirect", "SeeOther", "RedirectMethod", "NotModified", "UseProxy", "Unused", "TemporaryRedirect", "RedirectKeepVerb", "BadRequest", "Unauthorized", "PaymentRequired", "Forbidden", "NotFound", "MethodNotAllowed", "NotAcceptable", "ProxyAuthenticationRequired", "RequestTimeout", "Conflict", "Gone", "LengthRequired", "PreconditionFailed", "RequestEntityTooLarge", "RequestUriTooLong", "UnsupportedMediaType", "RequestedRangeNotSatisfiable", "ExpectationFailed", "UpgradeRequired", "InternalServerError", "NotImplemented", "BadGateway", "ServiceUnavailable", "GatewayTimeout", "HttpVersionNotSupported"]
if status && !allowed_values.include?(status)
fail "invalid value for 'status', must be one of #{allowed_values}"
end
@status = status
end
end
end
| {
"content_hash": "fea5a2152012f9cb56259eef64800589",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 838,
"avg_line_length": 34.53968253968254,
"alnum_prop": 0.6075367647058824,
"repo_name": "farooqsheikhpk/Aspose_Total_Cloud",
"id": "3762851ef2e8a886a9bc44d5298eed4dd41b4fce",
"size": "2176",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SDKs/Aspose.Storage-Cloud-SDK-for-Ruby/lib/aspose_storage_cloud/models/folder_response.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "64545"
},
{
"name": "JavaScript",
"bytes": "54843"
},
{
"name": "Objective-C",
"bytes": "140682"
},
{
"name": "PHP",
"bytes": "55899"
},
{
"name": "Python",
"bytes": "76784"
},
{
"name": "Ruby",
"bytes": "1818"
}
],
"symlink_target": ""
} |
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>TestEndToEndLatency - core 0.8.3-SNAPSHOT API - kafka.tools.TestEndToEndLatency</title>
<meta name="description" content="TestEndToEndLatency - core 0.8.3 - SNAPSHOT API - kafka.tools.TestEndToEndLatency" />
<meta name="keywords" content="TestEndToEndLatency core 0.8.3 SNAPSHOT API kafka.tools.TestEndToEndLatency" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link href="../../lib/template.css" media="screen" type="text/css" rel="stylesheet" />
<link href="../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" />
<script type="text/javascript">
if(top === self) {
var url = '../../index.html';
var hash = 'kafka.tools.TestEndToEndLatency$';
var anchor = window.location.hash;
var anchor_opt = '';
if (anchor.length >= 1)
anchor_opt = '@' + anchor.substring(1);
window.location.href = url + '#' + hash + anchor_opt;
}
</script>
</head>
<body class="value">
<div id="definition">
<img src="../../lib/object_big.png" />
<p id="owner"><a href="../package.html" class="extype" name="kafka">kafka</a>.<a href="package.html" class="extype" name="kafka.tools">tools</a></p>
<h1>TestEndToEndLatency</h1>
</div>
<h4 id="signature" class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">object</span>
</span>
<span class="symbol">
<span class="name">TestEndToEndLatency</span>
</span>
</h4>
<div id="comment" class="fullcommenttop"><div class="toggleContainer block">
<span class="toggle">Linear Supertypes</span>
<div class="superTypes hiddenContent"><span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div>
</div></div>
<div id="mbrsel">
<div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div>
<div id="order">
<span class="filtertype">Ordering</span>
<ol>
<li class="alpha in"><span>Alphabetic</span></li>
<li class="inherit out"><span>By inheritance</span></li>
</ol>
</div>
<div id="ancestors">
<span class="filtertype">Inherited<br />
</span>
<ol id="linearization">
<li class="in" name="kafka.tools.TestEndToEndLatency"><span>TestEndToEndLatency</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li>
</ol>
</div><div id="ancestors">
<span class="filtertype"></span>
<ol>
<li class="hideall out"><span>Hide All</span></li>
<li class="showall in"><span>Show all</span></li>
</ol>
<a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a>
</div>
<div id="visbl">
<span class="filtertype">Visibility</span>
<ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
</div>
</div>
<div id="template">
<div id="allMembers">
<div id="values" class="values members">
<h3>Value Members</h3>
<ol><li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="!=(x$1:AnyRef):Boolean"></a>
<a id="!=(AnyRef):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.Any#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="!=(x$1:Any):Boolean"></a>
<a id="!=(Any):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div>
</li><li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="##():Int"></a>
<a id="##():Int"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span title="gt4s: $hash$hash" class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
</li><li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="==(x$1:AnyRef):Boolean"></a>
<a id="==(AnyRef):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.Any#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="==(x$1:Any):Boolean"></a>
<a id="==(Any):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div>
</li><li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="asInstanceOf[T0]:T0"></a>
<a id="asInstanceOf[T0]:T0"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div>
</li><li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="clone():Object"></a>
<a id="clone():AnyRef"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">clone</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
<span class="name">@throws</span><span class="args">(<span>
<span class="defval" name="classOf[java.lang.CloneNotSupportedException]">...</span>
</span>)</span>
</dd></dl></div>
</li><li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="eq(x$1:AnyRef):Boolean"></a>
<a id="eq(AnyRef):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">eq</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="equals(x$1:Any):Boolean"></a>
<a id="equals(Any):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
</li><li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="finalize():Unit"></a>
<a id="finalize():Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
<span class="name">@throws</span><span class="args">(<span>
<span class="symbol">classOf[java.lang.Throwable]</span>
</span>)</span>
</dd></dl></div>
</li><li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="getClass():Class[_]"></a>
<a id="getClass():Class[_]"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">getClass</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
</li><li name="scala.AnyRef#hashCode" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="hashCode():Int"></a>
<a id="hashCode():Int"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
</li><li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="isInstanceOf[T0]:Boolean"></a>
<a id="isInstanceOf[T0]:Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div>
</li><li name="kafka.tools.TestEndToEndLatency#main" visbl="pub" data-isabs="false" fullComment="no" group="Ungrouped">
<a id="main(args:Array[String]):Unit"></a>
<a id="main(Array[String]):Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">main</span><span class="params">(<span name="args">args: <span class="extype" name="scala.Array">Array</span>[<span class="extype" name="scala.Predef.String">String</span>]</span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
</li><li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="ne(x$1:AnyRef):Boolean"></a>
<a id="ne(AnyRef):Boolean"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">ne</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="notify():Unit"></a>
<a id="notify():Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="notifyAll():Unit"></a>
<a id="notifyAll():Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="synchronized[T0](x$1:=>T0):T0"></a>
<a id="synchronized[T0](⇒T0):T0"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: ⇒ <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span><span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
</li><li name="scala.AnyRef#toString" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="toString():String"></a>
<a id="toString():String"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier"></span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
</li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="wait():Unit"></a>
<a id="wait():Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
<span class="name">@throws</span><span class="args">(<span>
<span class="defval" name="classOf[java.lang.InterruptedException]">...</span>
</span>)</span>
</dd></dl></div>
</li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="wait(x$1:Long,x$2:Int):Unit"></a>
<a id="wait(Long,Int):Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
<span class="name">@throws</span><span class="args">(<span>
<span class="defval" name="classOf[java.lang.InterruptedException]">...</span>
</span>)</span>
</dd></dl></div>
</li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped">
<a id="wait(x$1:Long):Unit"></a>
<a id="wait(Long):Unit"></a>
<h4 class="signature">
<span class="modifier_kind">
<span class="modifier">final </span>
<span class="kind">def</span>
</span>
<span class="symbol">
<span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span>
</span>
</h4>
<div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
<span class="name">@throws</span><span class="args">(<span>
<span class="defval" name="classOf[java.lang.InterruptedException]">...</span>
</span>)</span>
</dd></dl></div>
</li></ol>
</div>
</div>
<div id="inheritedMembers">
<div class="parent" name="scala.AnyRef">
<h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3>
</div><div class="parent" name="scala.Any">
<h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3>
</div>
</div>
<div id="groupedMembers">
<div class="group" name="Ungrouped">
<h3>Ungrouped</h3>
</div>
</div>
</div>
<div id="tooltip"></div>
<div id="footer"> </div>
<script defer="defer" type="text/javascript" id="jquery-js" src="../../lib/jquery.js"></script><script defer="defer" type="text/javascript" id="jquery-ui-js" src="../../lib/jquery-ui.js"></script><script defer="defer" type="text/javascript" id="tools-tooltip-js" src="../../lib/tools.tooltip.js"></script><script defer="defer" type="text/javascript" id="template-js" src="../../lib/template.js"></script>
</body>
</html> | {
"content_hash": "909e5ea97cd2cafa05dd4849b76db77c",
"timestamp": "",
"source": "github",
"line_count": 435,
"max_line_length": 410,
"avg_line_length": 51.271264367816094,
"alnum_prop": 0.5804151907815092,
"repo_name": "WillCh/286proj",
"id": "73ca093f7f8fc4914c1010c2cbdc846f93f3f6eb",
"size": "22317",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "dataMover/kafka/core/build/docs/scaladoc/kafka/tools/TestEndToEndLatency$.html",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "CSS",
"bytes": "43684"
},
{
"name": "Groff",
"bytes": "202"
},
{
"name": "HTML",
"bytes": "22996620"
},
{
"name": "Java",
"bytes": "2520817"
},
{
"name": "JavaScript",
"bytes": "250136"
},
{
"name": "Python",
"bytes": "291923"
},
{
"name": "Ruby",
"bytes": "6258"
},
{
"name": "Scala",
"bytes": "2222923"
},
{
"name": "Shell",
"bytes": "114859"
}
],
"symlink_target": ""
} |
'use strict';
module.exports = function (initClass, ExtraClass) {
var typeInitClass = typeof initClass,
typeExtraClass = typeof ExtraClass;
/**
* Instead of assigning the reference of `initClass` to `classes` this for loop copies all the
* values of `initClass` to `classes` preserving the original `initClass` object.
*/
for (var key in initClass) {
classes[key] = initClass[key];
}
if (typeExtraClass !== "undefined") {
var initClasses = (typeInitClass === "object") ? initClass : initClass.split(" "),
extraClasses = (typeExtraClass === "object") ? ExtraClass : ExtraClass.split(" ");
extraClasses.map(function (s) {
initClasses[s] = true;
});
classes = initClasses;
}
return classes;
};
| {
"content_hash": "dc6389547b4fda8fe20a5ca2e8f73083",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 96,
"avg_line_length": 28.14814814814815,
"alnum_prop": 0.6526315789473685,
"repo_name": "AliciaWamsley/Essence",
"id": "2e931310f8c2388f5f36b127187083befbf47193",
"size": "760",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/js/utils/ClassNames.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "412493"
},
{
"name": "HTML",
"bytes": "665912"
},
{
"name": "JavaScript",
"bytes": "2996005"
}
],
"symlink_target": ""
} |
using namespace std;
class Attract : public IGameState
{
public:
Attract();
void SetAttractData(const vector<Uint32> &eventBuffer);
void SetRooms(vector<Room*> &rooms);
void SetPlayer(TPlayer* player);
// Inherited via IGameState
virtual void OnEnter() override;
virtual void OnExit() override;
virtual string Update(Uint32 milliSec, Event & inputEvent) override;
virtual void Draw(void) override;
virtual void Dispose(void) override;
virtual Program* GetProgram() override;
protected:
bool _hadInertia, _disposed;
TPlayer* _player;
Program* _program;
MessageLine* _messageLine;
Frame *_frameNoise, *_frameSombra;
vector<vector<Uint32>*> _eventsByRoom;
vector<Uint32> _currentRoomEvts;
vector<Uint32>::iterator _evtBufferIterator;
vector<Room*> _rooms;
Room* _currentRoom;
Uint32 _totalTicks;
char _incrFactor;
float _currentAlpha;
void _clearEvents();
}; | {
"content_hash": "c46ef8b47e86a815d6b2d86765b1d524",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 69,
"avg_line_length": 21.78048780487805,
"alnum_prop": 0.7469204927211646,
"repo_name": "AugustoRuiz/UWOL",
"id": "e9ba6f2e9bc40225f8ce5127d992325504d47110",
"size": "1005",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "PC/include/GameStates/Attract.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "3005292"
},
{
"name": "C#",
"bytes": "118543"
},
{
"name": "C++",
"bytes": "2731277"
},
{
"name": "CMake",
"bytes": "1517"
},
{
"name": "Makefile",
"bytes": "5324"
},
{
"name": "Objective-C",
"bytes": "22362"
},
{
"name": "Shell",
"bytes": "2898"
}
],
"symlink_target": ""
} |
_<sup><sup>[www.codever.land/bookmarks/t/cloud](https://www.codever.land/bookmarks/t/cloud)</sup></sup>_
---
#### [Pourquoi votre infra-as-code ne tient pas ses promesses ?](https://blog.wescale.fr/2021/06/17/pourquoi-votre-infrastructure-as-code-ne-tient-pas-ses-promesses/)
_<sup>https://blog.wescale.fr/2021/06/17/pourquoi-votre-infrastructure-as-code-ne-tient-pas-ses-promesses/</sup>_
Les promesses de l’IaC sont grandes ! Mais vous devez briser 7 murs pour les tenir et suivre 5 KPI pour les valider.
* :calendar: **published on**: 2021-06-17
* **tags**: [cloud](../tagged/cloud.md), [cloud-computing](../tagged/cloud-computing.md)
---
#### [SAP Graph Multi-Part Tutorial: Information Map | SAP Blogs](https://blogs.sap.com/2021/06/08/sap-graph-multi-part-tutorial-information-map/)
_<sup>https://blogs.sap.com/2021/06/08/sap-graph-multi-part-tutorial-information-map/</sup>_
Hello! SAP Graph is the new unified and consolidated API for SAP’s Integrated Intelligent Suite. Developers use SAP Graph to build applications that access a business data graph of SAP-managed data,
* **tags**: [sap](../tagged/sap.md), [graph](../tagged/graph.md), [api](../tagged/api.md), [cloud](../tagged/cloud.md)
---
#### [Setting Up Authelia With SWAG](https://blog.linuxserver.io/2020/08/26/setting-up-authelia/)
_<sup>https://blog.linuxserver.io/2020/08/26/setting-up-authelia/</sup>_
This article details how SSO via Authelia can be easily set up using SWAG's preset Authelia confs.
* :calendar: **published on**: 2020-08-26
* **tags**: [docker-compose](../tagged/docker-compose.md), [nginx](../tagged/nginx.md), [tls](../tagged/tls.md), [oauth2](../tagged/oauth2.md), [cloud](../tagged/cloud.md), [linux](../tagged/linux.md)
* :octocat: **[source code](https://github.com/linuxserver/docker-swag)**
---
#### [CAP@SAP Home](https://cap.cloud.sap/docs/)
_<sup>https://cap.cloud.sap/docs/</sup>_
Home of SAP cloud application programming model, aka CAP
* **tags**: [sap](../tagged/sap.md), [cloud](../tagged/cloud.md), [cap](../tagged/cap.md), [cf](../tagged/cf.md), [cloudfoundry](../tagged/cloudfoundry.md)
---
#### [Defining Cloud Native | Microsoft Docs](https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/definition)
_<sup>https://docs.microsoft.com/en-us/dotnet/architecture/cloud-native/definition</sup>_
Stop what you’re doing and text 10 of your colleagues. Ask them to define the term “Cloud Native.” Good chance you’ll get eight different answers. Interestingly, six months from now, as cloud-native t...
* **tags**: [cloud](../tagged/cloud.md), [cloud-computing](../tagged/cloud-computing.md)
---
#### [Cloudant - Overview | IBM](https://www.ibm.com/cloud/cloudant)
_<sup>https://www.ibm.com/cloud/cloudant</sup>_
A scalable distributed database for web, mobile, IoT and serverless applications.
* **tags**: [cloud](../tagged/cloud.md), [web](../tagged/web.md)
---
#### [ElephantSQL - PostgreSQL as a Service](https://www.elephantsql.com/)
_<sup>https://www.elephantsql.com/</sup>_
ElephantSQL - PostgreSQL as a Service. The most advanced open-source database, hosted in the cloud.
* **tags**: [cloud](../tagged/cloud.md), [web](../tagged/web.md), [sql](../tagged/sql.md)
---
#### [Migrating to GCP? First Things First: VPCs (Networking End to End) - 7min](https://www.youtube.com/watch?v=cNb7xKyya5c)
_<sup>https://www.youtube.com/watch?v=cNb7xKyya5c</sup>_
If you’re thinking about migrating to the cloud, setting up a virtual private cloud (VPC) lets you protect and isolate your instances. This lays the foundation to do much more complex networking inclu...
* :calendar: **published on**: 2019-02-20
* **tags**: [vpc](../tagged/vpc.md), [vpn](../tagged/vpn.md), [google-cloud-platform](../tagged/google-cloud-platform.md), [networking](../tagged/networking.md), [subnet](../tagged/subnet.md), [cloud](../tagged/cloud.md)
---
#### [rusoto/rusoto](https://github.com/rusoto/rusoto)
_<sup>https://github.com/rusoto/rusoto</sup>_
[<img src="https://api.travis-ci.org/rusoto/rusoto.svg?branch=master">](https://travis-ci.org/rusoto/rusoto)
* **tags**: [rust](../tagged/rust.md), [cloud](../tagged/cloud.md), [aws](../tagged/aws.md)
* :octocat: **[source code](https://github.com/rusoto/rusoto)**
---
#### [AWS SDK for Ruby](https://github.com/aws/aws-sdk-ruby)
_<sup>https://github.com/aws/aws-sdk-ruby</sup>_
The official AWS SDK for Ruby.
* **tags**: [ruby](../tagged/ruby.md), [cloud](../tagged/cloud.md)
* :octocat: **[source code](https://github.com/aws/aws-sdk-ruby)**
---
#### [browse-everything](https://github.com/projecthydra/browse-everything)
_<sup>https://github.com/projecthydra/browse-everything</sup>_
Multi-provider Rails engine providing access to files in cloud storage.
* **tags**: [ruby](../tagged/ruby.md), [cloud](../tagged/cloud.md)
* :octocat: **[source code](https://github.com/projecthydra/browse-everything)**
---
#### [Fog](https://github.com/fog/fog)
_<sup>https://github.com/fog/fog</sup>_
The Ruby cloud services library.
* **tags**: [ruby](../tagged/ruby.md), [cloud](../tagged/cloud.md)
* :octocat: **[source code](https://github.com/fog/fog)**
---
#### [Kubernetes best practices: Setting up health checks with readiness and liveness probes](https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-setting-up-health-checks-with-readiness-and-liveness-probes)
_<sup>https://cloud.google.com/blog/products/gcp/kubernetes-best-practices-setting-up-health-checks-with-r...</sup>_
In this episode of “Kubernetes Best Practices”, let’s learn about the subtleties of [readiness and liveness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readines...
* :calendar: **published on**: 2018-05-04
* **tags**: [kubernetes](../tagged/kubernetes.md), [monitoring](../tagged/monitoring.md), [healthcheck](../tagged/healthcheck.md), [distributed-computing](../tagged/distributed-computing.md), [cloud](../tagged/cloud.md)
---
#### [GitHub - anaibol/awesome-serverless](https://github.com/anaibol/awesome-serverless#readme)
_<sup>https://github.com/anaibol/awesome-serverless#readme</sup>_
:cloud: A curated list of awesome services, solutions and resources for serverless / nobackend applications. - anaibol/awesome-serverless
* **tags**: [serverless](../tagged/serverless.md), [cloud](../tagged/cloud.md), [awesome-list](../tagged/awesome-list.md)
* :octocat: **[source code](https://github.com/anaibol/awesome-serverless)**
---
#### [Node.js Everywhere with Environment Variables! – Node.js Collection – Medium](https://medium.com/the-node-js-collection/making-your-node-js-work-everywhere-with-environment-variables-2da8cdf6e786)
_<sup>https://medium.com/the-node-js-collection/making-your-node-js-work-everywhere-with-environment-varia...</sup>_
This post walks you through creating and using environment variables, leading to a Node.js app you can run anywhere.
* :calendar: **published on**: 2018-10-29
* **tags**: [node.js](../tagged/node.js.md), [cloud](../tagged/cloud.md)
* :octocat: **[source code](https://github.com/johnpapa/vikings)**
---
#### [Gluster ](https://www.gluster.org/)
_<sup>https://www.gluster.org/</sup>_
Gluster is a software defined distributed storage that can scale to several petabytes. It provides interfaces for object, block and file storage.
* **tags**: [filesystem](../tagged/filesystem.md), [cloud](../tagged/cloud.md), [storage](../tagged/storage.md)
* :octocat: **[source code](https://github.com/gluster/glusterfs)**
---
#### [How to Create an S2I Builder Image – OpenShift Blog](https://blog.openshift.com/create-s2i-builder-image/)
_<sup>https://blog.openshift.com/create-s2i-builder-image/</sup>_
This article is about creating a simple S2I builder image in OpenShift 3.
* :calendar: **published on**: 2015-07-21
* **tags**: [cloud](../tagged/cloud.md), [openshift](../tagged/openshift.md)
---
#### [Full guide to developing REST API’s with AWS API Gateway and AWS Lambda](https://blog.sourcerer.io/full-guide-to-developing-rest-apis-with-aws-api-gateway-and-aws-lambda-d254729d6992)
_<sup>https://blog.sourcerer.io/full-guide-to-developing-rest-apis-with-aws-api-gateway-and-aws-lambda-d25...</sup>_
In this article we’ll explore using AWS Lambda to develop a service using Node.js. Amazon recently announced an upgrade where developers using Lambda can now use an 8.10 runtime, which lets them use `...
* :calendar: **published on**: 2018-05-09
* **tags**: [cloud](../tagged/cloud.md), [serverless](../tagged/serverless.md), [node.js](../tagged/node.js.md), [aws](../tagged/aws.md)
---
#### [Data Encryption Methods to Secure Your Cloud - Agile IT](https://www.agileit.com/news/data-encryption-methods-secure-cloud/)
_<sup>https://www.agileit.com/news/data-encryption-methods-secure-cloud/</sup>_
The cloud enables you to retrieve your files from anywhere with Internet access. Discover modern data encryption methods and more data security tips.
* **tags**: [cloud](../tagged/cloud.md), [security](../tagged/security.md)
---
#### [Cloud Security Alliance Blog - Cloud Security Alliance Industry Blog](https://blog.cloudsecurityalliance.org/)
_<sup>https://blog.cloudsecurityalliance.org/</sup>_
Cloud Security Alliance Industry Blog
* **tags**: [blog](../tagged/blog.md), [cloud](../tagged/cloud.md), [security](../tagged/security.md)
---
#### [Application-level multi-tenancy: the promise and pitfalls of shared-everything architectures](https://distrinet.cs.kuleuven.be/news/2015/multitenancy.pdf)
_<sup>https://distrinet.cs.kuleuven.be/news/2015/multitenancy.pdf</sup>_
One of the key enablers to leverage economies of scale in SaaS applications is multi-tenancy [3, 5], i.e. the sharing of resources among multiple customer organisations, the so-called tenants. While i...
* **tags**: [multi-tenant](../tagged/multi-tenant.md), [architecture](../tagged/architecture.md), [saas](../tagged/saas.md), [cloud](../tagged/cloud.md)
---
#### [Multi-tenant SaaS patterns - Azure SQL Database](https://docs.microsoft.com/en-us/azure/sql-database/saas-tenancy-app-design-patterns)
_<sup>https://docs.microsoft.com/en-us/azure/sql-database/saas-tenancy-app-design-patterns</sup>_
Learn about the requirements and common data architecture patterns of multi-tenant software as a service (SaaS) database applications that run in the Azure cloud environment.
* **tags**: [architecture](../tagged/architecture.md), [azure](../tagged/azure.md), [cloud](../tagged/cloud.md), [multi-tenant](../tagged/multi-tenant.md)
---
#### [The Essential Guide to Machine Data](https://www.splunk.com/pdfs/ebooks/the-essential-guide-to-machine-data.pdf)
_<sup>https://www.splunk.com/pdfs/ebooks/the-essential-guide-to-machine-data.pdf</sup>_
Whatever you call it, machine data is one of the most underused and undervalued assets of any organization. And, unfortunately, it’s usually kept for some minimum amount of time before being tossed ou...
* **tags**: [security](../tagged/security.md), [splunk](../tagged/splunk.md), [bigdata](../tagged/bigdata.md), [cloud](../tagged/cloud.md)
---
#### [An Introduction To Securing a Cloud Environment](https://www.sans.org/reading-room/whitepapers/cloud/introduction-securing-cloud-environment-34052)
_<sup>https://www.sans.org/reading-room/whitepapers/cloud/introduction-securing-cloud-environment-34052</sup>_
While Cloud services offer flexibility, scalability and economies of scale, there have been commensurate concerns about security. As more data moves from centrally located server storage to the Cloud,...
* :calendar: **published on**: 2012-01-01
* **tags**: [cloud](../tagged/cloud.md), [security](../tagged/security.md)
---
#### [9 cloud migration mistakes — and how to avoid them -- GovCloudInsider](https://govcloudinsider.com/articles/2017/03/14/cloud-migration-mistakes.aspx)
_<sup>https://govcloudinsider.com/articles/2017/03/14/cloud-migration-mistakes.aspx</sup>_
By learning from early adopters’ missteps, agencies can make their move to the cloud as seamless and cost-effective as possible.
* :calendar: **published on**: 2017-03-14
* **tags**: [cloud](../tagged/cloud.md)
---
#### [AWS Security Best Practices](https://d1.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf)
_<sup>https://d1.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf</sup>_
This whitepaper is intended for existing and potential customers who are
designing the security infrastructure and configuration for applications running
in Amazon Web Services (AWS). It provides secu...
* :calendar: **published on**: 2016-08-01
* **tags**: [cloud](../tagged/cloud.md), [security](../tagged/security.md), [aws](../tagged/aws.md)
---
#### [Recovery point objective - Wikipedia](https://en.wikipedia.org/wiki/Recovery_point_objective)
_<sup>https://en.wikipedia.org/wiki/Recovery_point_objective</sup>_
A **recovery point objective (RPO)** is defined by business continuity planning. It is the maximum targeted period in which data might be lost from an IT service due to a major incident. The RPO gives...
* **tags**: [cloud](../tagged/cloud.md), [security](../tagged/security.md), [business-process](../tagged/business-process.md)
---
#### [Recovery time objective - Wikipedia](https://en.wikipedia.org/wiki/Recovery_time_objective)
_<sup>https://en.wikipedia.org/wiki/Recovery_time_objective</sup>_
The **recovery time objective (RTO)** is the targeted duration of time and a service level within which a business process must be restored after a disaster (or disruption) in order to avoid unaccepta...
* **tags**: [cloud](../tagged/cloud.md), [security](../tagged/security.md), [business-process](../tagged/business-process.md)
---
#### [Cloud Computing Policy Template](http://www.itmanagerdaily.com/cloud-computing-policy-template/)
_<sup>http://www.itmanagerdaily.com/cloud-computing-policy-template/</sup>_
Here is a sample cloud computing policy template that organizations can adapt to suit their needs.
* **tags**: [cloud](../tagged/cloud.md)
---
#### [Разработка мультитенантных приложений для облака, издание 3-е](http://www.microsoft.com/ru-ru/download/details.aspx?id=29263)
_<sup>http://www.microsoft.com/ru-ru/download/details.aspx?id=29263</sup>_
* **tags**: [cloud](../tagged/cloud.md), [free-programming-books](../tagged/free-programming-books.md), [free-programming-books-ru](../tagged/free-programming-books-ru.md)
---
#### [رایانش ابری](http://docs.occc.ir/books/Main%20Book-20110110_2.pdf)
_<sup>http://docs.occc.ir/books/Main%20Book-20110110_2.pdf</sup>_
(PDF)
* **tags**: [free-programming-books](../tagged/free-programming-books.md), [free-programming-books-fa_ir](../tagged/free-programming-books-fa_ir.md), [cloud](../tagged/cloud.md)
---
| {
"content_hash": "5b90654d9dd37e9a001aa067e2df25b9",
"timestamp": "",
"source": "github",
"line_count": 207,
"max_line_length": 223,
"avg_line_length": 70.84541062801932,
"alnum_prop": 0.7236958745311968,
"repo_name": "Codingpedia/bookmarks",
"id": "5bfe121b09af2fca125d94f99abf51ae5355e3ae",
"size": "14837",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tagged/cloud.md",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package com.google.cloud.dialogflow.v2beta1.samples;
// [START dialogflow_v2beta1_generated_Documents_UpdateDocument_sync]
import com.google.cloud.dialogflow.v2beta1.Document;
import com.google.cloud.dialogflow.v2beta1.DocumentsClient;
import com.google.cloud.dialogflow.v2beta1.UpdateDocumentRequest;
import com.google.protobuf.FieldMask;
public class SyncUpdateDocument {
public static void main(String[] args) throws Exception {
syncUpdateDocument();
}
public static void syncUpdateDocument() throws Exception {
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (DocumentsClient documentsClient = DocumentsClient.create()) {
UpdateDocumentRequest request =
UpdateDocumentRequest.newBuilder()
.setDocument(Document.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Document response = documentsClient.updateDocumentAsync(request).get();
}
}
}
// [END dialogflow_v2beta1_generated_Documents_UpdateDocument_sync]
| {
"content_hash": "5f2ea65e67f4990d694817bc9cbd02da",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 100,
"avg_line_length": 42.39393939393939,
"alnum_prop": 0.7483917083631165,
"repo_name": "googleapis/google-cloud-java",
"id": "f2ad5352eb36fa9ae60ae9a9535ad6bd26248941",
"size": "1994",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "java-dialogflow/samples/snippets/generated/com/google/cloud/dialogflow/v2beta1/documents/updatedocument/SyncUpdateDocument.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "2614"
},
{
"name": "HCL",
"bytes": "28592"
},
{
"name": "Java",
"bytes": "826434232"
},
{
"name": "Jinja",
"bytes": "2292"
},
{
"name": "Python",
"bytes": "200408"
},
{
"name": "Shell",
"bytes": "97954"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>RSS Title</title>
<description>This is an example of an RSS feed</description>
<link>http://www.someexamplerssdomain.com/main.html</link>
<lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
<ttl>1800</ttl>
<item>
<title>Example entry</title>
<description>Here is some text containing an interesting description.</description>
<link>http://example.com/from-rss-feed/</link>
<guid>unique string per item</guid>
<pubDate>Mon, 06 Sep 2009 16:45:00 +0000 </pubDate>
</item>
</channel>
</rss>
| {
"content_hash": "7190fd01982f3fc4041aba6ab7f67d50",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 95,
"avg_line_length": 38.1,
"alnum_prop": 0.5971128608923885,
"repo_name": "webignition/app.simplytestable.com",
"id": "5b6079033bfb43d0f90af0419d0ecd560a6c91a2",
"size": "762",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/Fixtures/Data/RssFeeds/example.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "1787"
},
{
"name": "PHP",
"bytes": "2271987"
}
],
"symlink_target": ""
} |
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.webfonts;
/**
* Service definition for Webfonts (v1).
*
* <p>
* The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.
* </p>
*
* <p>
* For more information about this service, see the
* <a href="https://developers.google.com/fonts/docs/developer_api" target="_blank">API Documentation</a>
* </p>
*
* <p>
* This service uses {@link WebfontsRequestInitializer} to initialize global parameters via its
* {@link Builder}.
* </p>
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class Webfonts extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
// Note: Leave this static initializer at the top of the file.
static {
com.google.api.client.util.Preconditions.checkState(
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 ||
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)),
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.31.1 of google-api-client to run version " +
"1.32.1 of the Web Fonts Developer API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
}
/**
* The default encoded root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_ROOT_URL = "https://webfonts.googleapis.com/";
/**
* The default encoded mTLS root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.31
*/
public static final String DEFAULT_MTLS_ROOT_URL = "https://webfonts.mtls.googleapis.com/";
/**
* The default encoded service path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_SERVICE_PATH = "";
/**
* The default encoded batch path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.23
*/
public static final String DEFAULT_BATCH_PATH = "batch";
/**
* The default encoded base URL of the service. This is determined when the library is generated
* and normally should not be changed.
*/
public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;
/**
* Constructor.
*
* <p>
* Use {@link Builder} if you need to specify any of the optional parameters.
* </p>
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Webfonts(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
this(new Builder(transport, jsonFactory, httpRequestInitializer));
}
/**
* @param builder builder
*/
Webfonts(Builder builder) {
super(builder);
}
@Override
protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
super.initialize(httpClientRequest);
}
/**
* An accessor for creating requests from the WebfontsOperations collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code Webfonts webfonts = new Webfonts(...);}
* {@code Webfonts.WebfontsOperations.List request = webfonts.webfonts().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public WebfontsOperations webfonts() {
return new WebfontsOperations();
}
/**
* The "webfonts" collection of methods.
*/
public class WebfontsOperations {
/**
* Retrieves the list of fonts currently served by the Google Fonts Developer API.
*
* Create a request for the method "webfonts.list".
*
* This request holds the parameters needed by the webfonts server. After setting any optional
* parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends WebfontsRequest<com.google.api.services.webfonts.model.WebfontList> {
private static final String REST_PATH = "v1/webfonts";
/**
* Retrieves the list of fonts currently served by the Google Fonts Developer API.
*
* Create a request for the method "webfonts.list".
*
* This request holds the parameters needed by the the webfonts server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation. <p>
* {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected List() {
super(Webfonts.this, "GET", REST_PATH, null, com.google.api.services.webfonts.model.WebfontList.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/** Enables sorting of the list. */
@com.google.api.client.util.Key
private java.lang.String sort;
/** Enables sorting of the list.
*/
public java.lang.String getSort() {
return sort;
}
/** Enables sorting of the list. */
public List setSort(java.lang.String sort) {
this.sort = sort;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link Webfonts}.
*
* <p>
* Implementation is not thread-safe.
* </p>
*
* @since 1.3.0
*/
public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {
private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) {
// If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint.
// If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS.
// Use the regular endpoint for all other cases.
String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT");
useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint;
if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) {
return DEFAULT_MTLS_ROOT_URL;
}
return DEFAULT_ROOT_URL;
}
/**
* Returns an instance of a new builder.
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
super(
transport,
jsonFactory,
Builder.chooseEndpoint(transport),
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
setBatchPath(DEFAULT_BATCH_PATH);
}
/** Builds a new instance of {@link Webfonts}. */
@Override
public Webfonts build() {
return new Webfonts(this);
}
@Override
public Builder setRootUrl(String rootUrl) {
return (Builder) super.setRootUrl(rootUrl);
}
@Override
public Builder setServicePath(String servicePath) {
return (Builder) super.setServicePath(servicePath);
}
@Override
public Builder setBatchPath(String batchPath) {
return (Builder) super.setBatchPath(batchPath);
}
@Override
public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
}
@Override
public Builder setApplicationName(String applicationName) {
return (Builder) super.setApplicationName(applicationName);
}
@Override
public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
}
@Override
public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
}
@Override
public Builder setSuppressAllChecks(boolean suppressAllChecks) {
return (Builder) super.setSuppressAllChecks(suppressAllChecks);
}
/**
* Set the {@link WebfontsRequestInitializer}.
*
* @since 1.12
*/
public Builder setWebfontsRequestInitializer(
WebfontsRequestInitializer webfontsRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(webfontsRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}
| {
"content_hash": "6b116bdee872eb3a6678abeba2922857",
"timestamp": "",
"source": "github",
"line_count": 399,
"max_line_length": 148,
"avg_line_length": 35.07518796992481,
"alnum_prop": 0.6735262593783494,
"repo_name": "googleapis/google-api-java-client-services",
"id": "7f6f05e347b69fcace3405cc412c7eb6231a833f",
"size": "13995",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "clients/google-api-services-webfonts/v1/1.31.0/com/google/api/services/webfonts/Webfonts.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
var app = app || {};
(function(){
app.TestButton = React.createClass({displayName: "TestButton",
handleClick: function() {
this.props.submitTestTask(this.props.btnType);
},
render: function() {
return ( React.createElement("button", {onClick: this.handleClick,
className: "btn btn-test"}, " ", React.createElement("span", {className: "btn-test-text"}, " ", this.props.btn_name, " ")) );
}
});
app.CodeEditor = React.createClass({displayName: "CodeEditor",
handleType:function(){
this.props.updateCode(this.editor.session.getValue());
},
componentDidMount:function(){
this.editor = ace.edit("codeeditor");
this.editor.setTheme("ace/theme/clouds_midnight");
this.editor.setOptions({
fontSize: "1.2em"
});
this.editor.session.setMode("ace/mode/"+this.props.language);
},
render:function(){
return (
React.createElement("div", {id: "codeeditor", onKeyUp: this.handleType})
);
}
});
app.TokenEditor = React.createClass({displayName: "TokenEditor",
handleChange:function(){
var new_token = this.refs.tokenInput.value;
this.props.updateToken(new_token);
},
render: function(){
return (
React.createElement("input", {className: "input-url", onChange: this.handleChange, ref: "tokenInput", placeholder: "Input Server Access Token"})
);
}
});
app.UrlEditor = React.createClass({displayName: "UrlEditor",
getInitialState: function(){
return {
url_vaild:true
}
},
handleChange:function(){
//if url valid, update state, if not, warn
var url_str = this.refs.urlInput.value;
if (app.isUrl(url_str)){
this.setState({url_vaild:true});
//this.probs.updateUrl(url_str)
}else{
this.setState({url_vaild:false});
}
this.props.updateUrl(url_str);
},
classNames:function(){
return 'input-url ' + ((this.state.url_vaild) ? 'input-right':'input-error');
},
render: function(){
return (
React.createElement("input", {className: this.classNames(), onChange: this.handleChange, ref: "urlInput", placeholder: "Type Server or App URL"})
);
}
});
app.ResultDisplay = React.createClass({displayName: "ResultDisplay",
displayResult:function(res_dict){
},
render: function(){
return (
React.createElement("div", {className: "result-container"},
React.createElement("div", {className: "result-head"}, React.createElement("span", {className: "area-title area-title-black"}, "Test Type: "), " ", React.createElement("span", null, this.props.testType)),
React.createElement("div", {className: "detail-result"},
React.createElement("div", {className: "result-sum"},
React.createElement("h3", null, "Level: 1")
),
React.createElement(StepDisplay, null)
)
)
)
}
});
var StepDisplay = app.StepDisplay = React.createClass({displayName: "StepDisplay",
getInitialState: function(){
return {
is_img_hide:true,
is_modal_show:false
}
},
handleTextClick:function(){
this.setState({is_img_hide:!this.state.is_img_hide});
},
handleShowFullImage:function(event){
event.stopPropagation();
this.setState({is_modal_show:true});
},
handleHideModal(){
this.setState({is_modal_show:false});
},
handleShowModal(){
this.setState({is_modal_show: true});
},
render:function(){
return (
React.createElement("div", {className: "step-brief step-brief-failed", onClick: this.handleTextClick},
React.createElement("div", null, React.createElement("span", {className: "step-brief-text"}, "This is a step info")),
React.createElement("div", {hidden: this.state.is_img_hide, className: "step-img-block"},
React.createElement("button", {onClick: this.handleShowFullImage, className: "btn btn-primary"}, "Full Image"),
React.createElement("img", {className: "img-responsive img-rounded step-img", src: "../img/1.png"})
),
this.state.is_modal_show ? React.createElement(Modal, {handleHideModal: this.handleHideModal, title: "Step Image", content: React.createElement(FullImageArea, {img_src: "../img/1.png"})}) : null
)
);
}
});
var FullImageArea = app.FullImageArea = React.createClass({displayName: "FullImageArea",
render:function(){
return(
React.createElement("img", {src: this.props.img_src, className: "img-responsive"})
);
}
});
var Modal = app.Modal = React.createClass({displayName: "Modal",
componentDidMount(){
$(ReactDOM.findDOMNode(this)).modal('show');
$(ReactDOM.findDOMNode(this)).on('hidden.bs.modal', this.props.handleHideModal);
},
render:function(){
return (
React.createElement("div", {className: "modal modal-wide fade"},
React.createElement("div", {className: "modal-dialog"},
React.createElement("div", {className: "modal-content"},
React.createElement("div", {className: "modal-header"},
React.createElement("button", {type: "button", className: "close", "data-dismiss": "modal", "aria-label": "Close"}, React.createElement("span", {"aria-hidden": "true"}, "×")),
React.createElement("h4", {className: "modal-title"}, this.props.title)
),
React.createElement("div", {className: "modal-body"},
this.props.content
),
React.createElement("div", {className: "modal-footer text-center"},
React.createElement("button", {className: "btn btn-primary center-block", "data-dismiss": "modal"}, "Close")
)
)
)
)
);
}
});
})();
| {
"content_hash": "a70e529655ed50417b66227ee9a3963f",
"timestamp": "",
"source": "github",
"line_count": 154,
"max_line_length": 225,
"avg_line_length": 44.62987012987013,
"alnum_prop": 0.5192783355157864,
"repo_name": "ideaworld/FHIR_Tester",
"id": "50620bd3c5cf4bee34cce0bc9705f21fc0862a37",
"size": "6874",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "FHIR_Tester_statics/js/build/.module-cache/4c201da119d59824700e617df4554ded78cfdde1.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "15051"
},
{
"name": "CSS",
"bytes": "23971"
},
{
"name": "HTML",
"bytes": "3990"
},
{
"name": "JavaScript",
"bytes": "7741514"
},
{
"name": "Monkey",
"bytes": "483"
},
{
"name": "Python",
"bytes": "376538"
}
],
"symlink_target": ""
} |
"""Python interface to GenoLogics LIMS via its REST API.
Entities and their descriptors for the LIMS interface.
Per Kraulis, Science for Life Laboratory, Stockholm, Sweden.
Copyright (C) 2012 Per Kraulis
"""
from genologics.constants import nsmap
try:
from urllib.parse import urlsplit, urlparse, parse_qs, urlunparse
except ImportError:
from urlparse import urlsplit, urlparse, parse_qs, urlunparse
import datetime
import time
from xml.etree import ElementTree
import logging
logger = logging.getLogger(__name__)
class BaseDescriptor(object):
"Abstract base descriptor for an instance attribute."
def __get__(self, instance, cls):
raise NotImplementedError
class TagDescriptor(BaseDescriptor):
"""Abstract base descriptor for an instance attribute
represented by an XML element.
"""
def __init__(self, tag):
self.tag = tag
def get_node(self, instance):
if self.tag:
return instance.root.find(self.tag)
else:
return instance.root
class StringDescriptor(TagDescriptor):
"""An instance attribute containing a string value
represented by an XML element.
"""
def __get__(self, instance, cls):
instance.get()
node = self.get_node(instance)
if node is None:
return None
else:
return node.text
def __set__(self, instance, value):
instance.get()
node = self.get_node(instance)
if node is None:
# create the new tag
node = ElementTree.Element(self.tag)
instance.root.append(node)
node.text = str(value)
class StringAttributeDescriptor(TagDescriptor):
"""An instance attribute containing a string value
represented by an XML attribute.
"""
def __get__(self, instance, cls):
instance.get()
return instance.root.attrib[self.tag]
def __set__(self, instance, value):
instance.get()
instance.root.attrib[self.tag] = value
class StringListDescriptor(TagDescriptor):
"""An instance attribute containing a list of strings
represented by multiple XML elements.
"""
def __get__(self, instance, cls):
instance.get()
result = []
for node in instance.root.findall(self.tag):
result.append(node.text)
return result
class StringDictionaryDescriptor(TagDescriptor):
"""An instance attribute containing a dictionary of string key/values
represented by a hierarchical XML element.
"""
def __get__(self, instance, cls):
instance.get()
result = dict()
node = instance.root.find(self.tag)
if node is not None:
for node2 in node.getchildren():
result[node2.tag] = node2.text
return result
class IntegerDescriptor(StringDescriptor):
"""An instance attribute containing an integer value
represented by an XMl element.
"""
def __get__(self, instance, cls):
text = super(IntegerDescriptor, self).__get__(instance, cls)
if text is not None:
return int(text)
class IntegerAttributeDescriptor(TagDescriptor):
"""An instance attribute containing a integer value
represented by an XML attribute.
"""
def __get__(self, instance, cls):
instance.get()
return int(instance.root.attrib[self.tag])
class BooleanDescriptor(StringDescriptor):
"""An instance attribute containing a boolean value
represented by an XMl element.
"""
def __get__(self, instance, cls):
text = super(BooleanDescriptor, self).__get__(instance, cls)
if text is not None:
return text.lower() == 'true'
def __set__(self, instance, value):
super(BooleanDescriptor, self).__set__(instance, str(value).lower())
class UdfDictionary(object):
"Dictionary-like container of UDFs, optionally within a UDT."
def _is_string(self, value):
try:
return isinstance(value, basestring)
except:
return isinstance(value, str)
def __init__(self, instance, *args, **kwargs):
self.instance = instance
self._udt = kwargs.pop('udt', False)
self.rootkeys = args
self._rootnode = None
self._update_elems()
self._prepare_lookup()
self.location = 0
@property
def rootnode(self):
if not self._rootnode:
self._rootnode = self.instance.root
for rootkey in self.rootkeys:
self._rootnode = self._rootnode.find(rootkey)
return self._rootnode
def get_udt(self):
if self._udt == True:
return None
else:
return self._udt
def set_udt(self, name):
assert isinstance(name, str)
if not self._udt:
raise AttributeError('cannot set name for a UDF dictionary')
self._udt = name
elem = self.rootnode.find(nsmap('udf:type'))
assert elem is not None
elem.set('name', name)
udt = property(get_udt, set_udt)
def _update_elems(self):
self._elems = []
if self._udt:
elem = self.rootnode.find(nsmap('udf:type'))
if elem is not None:
self._udt = elem.attrib['name']
self._elems = elem.findall(nsmap('udf:field'))
else:
tag = nsmap('udf:field')
for elem in self.rootnode.getchildren():
if elem.tag == tag:
self._elems.append(elem)
def _prepare_lookup(self):
self._lookup = dict()
for elem in self._elems:
type = elem.attrib['type'].lower()
value = elem.text
if not value:
value = None
elif type == 'numeric':
try:
value = int(value)
except ValueError:
value = float(value)
elif type == 'boolean':
value = value == 'true'
elif type == 'date':
value = datetime.date(*time.strptime(value, "%Y-%m-%d")[:3])
self._lookup[elem.attrib['name']] = value
def __contains__(self, key):
try:
self._lookup[key]
except KeyError:
return False
return True
def __getitem__(self, key):
return self._lookup[key]
def __setitem__(self, key, value):
self._lookup[key] = value
for node in self._elems:
if node.attrib['name'] != key: continue
vtype = node.attrib['type'].lower()
if value is None:
pass
elif vtype == 'string':
if not self._is_string(value):
raise TypeError('String UDF requires str or unicode value')
elif vtype == 'str':
if not self._is_string(value):
raise TypeError('String UDF requires str or unicode value')
elif vtype == 'text':
if not self._is_string(value):
raise TypeError('Text UDF requires str or unicode value')
elif vtype == 'numeric':
if not isinstance(value, (int, float)):
raise TypeError('Numeric UDF requires int or float value')
value = str(value)
elif vtype == 'boolean':
if not isinstance(value, bool):
raise TypeError('Boolean UDF requires bool value')
value = value and 'true' or 'false'
elif vtype == 'date':
if not isinstance(value, datetime.date): # Too restrictive?
raise TypeError('Date UDF requires datetime.date value')
value = str(value)
elif vtype == 'uri':
if not self._is_string(value):
raise TypeError('URI UDF requires str or punycode (unicode) value')
value = str(value)
else:
raise NotImplemented("UDF type '%s'" % vtype)
if not isinstance(value, str):
if not self._is_string(value):
value = str(value).encode('UTF-8')
node.text = value
break
else: # Create new entry; heuristics for type
if self._is_string(value):
vtype = '\n' in value and 'Text' or 'String'
elif isinstance(value, bool):
vtype = 'Boolean'
value = value and 'true' or 'false'
elif isinstance(value, (int, float)):
vtype = 'Numeric'
value = str(value)
elif isinstance(value, datetime.date):
vtype = 'Date'
value = str(value)
else:
raise NotImplementedError("Cannot handle value of type '%s'"
" for UDF" % type(value))
if self._udt:
root = self.rootnode.find(nsmap('udf:type'))
else:
root = self.rootnode
elem = ElementTree.SubElement(root,
nsmap('udf:field'),
type=vtype,
name=key)
if not isinstance(value, str):
if not self._is_string(value):
value = str(value)
elem.text = value
#update the internal elements and lookup with new values
self._update_elems()
self._prepare_lookup()
def __delitem__(self, key):
del self._lookup[key]
for node in self._elems:
if node.attrib['name'] == key:
self.rootnode.remove(node)
break
def items(self):
return list(self._lookup.items())
def clear(self):
for elem in self._elems:
self.rootnode.remove(elem)
self._update_elems()
def __iter__(self):
return self
def __next__(self):
try:
ret = list(self._lookup.keys())[self.location]
except IndexError:
raise StopIteration()
self.location = self.location + 1
return ret
def get(self, key, default=None):
return self._lookup.get(key, default)
class UdfDictionaryDescriptor(BaseDescriptor):
"""An instance attribute containing a dictionary of UDF values
represented by multiple XML elements.
"""
_UDT = False
def __init__(self, *args):
super(BaseDescriptor, self).__init__()
self.rootkeys = args
def __get__(self, instance, cls):
instance.get()
self.value = UdfDictionary(instance, *self.rootkeys, udt=self._UDT)
return self.value
def __set__(self, instance, dict_value):
instance.get()
udf_dict = UdfDictionary(instance, *self.rootkeys, udt=self._UDT)
udf_dict.clear()
for k in dict_value:
udf_dict[k] = dict_value[k]
class UdtDictionaryDescriptor(UdfDictionaryDescriptor):
"""An instance attribute containing a dictionary of UDF values
in a UDT represented by multiple XML elements.
"""
_UDT = True
class PlacementDictionaryDescriptor(TagDescriptor):
"""An instance attribute containing a dictionary of locations
keys and artifact values represented by multiple XML elements.
"""
def __get__(self, instance, cls):
from genologics.entities import Artifact
instance.get()
self.value = dict()
for node in instance.root.findall(self.tag):
key = node.find('value').text
self.value[key] = Artifact(instance.lims, uri=node.attrib['uri'])
return self.value
class ExternalidListDescriptor(BaseDescriptor):
"""An instance attribute yielding a list of tuples (id, uri) for
external identifiers represented by multiple XML elements.
"""
def __get__(self, instance, cls):
instance.get()
result = []
for node in instance.root.findall(nsmap('ri:externalid')):
result.append((node.attrib.get('id'), node.attrib.get('uri')))
return result
class EntityDescriptor(TagDescriptor):
"An instance attribute referencing another entity instance."
def __init__(self, tag, klass):
super(EntityDescriptor, self).__init__(tag)
self.klass = klass
def __get__(self, instance, cls):
instance.get()
node = instance.root.find(self.tag)
if node is None:
return None
else:
return self.klass(instance.lims, uri=node.attrib['uri'])
def __set__(self, instance, value):
instance.get()
node = self.get_node(instance)
if node is None:
# create the new tag
node = ElementTree.Element(self.tag)
instance.root.append(node)
node.attrib['uri'] = value.uri
class EntityListDescriptor(EntityDescriptor):
"""An instance attribute yielding a list of entity instances
represented by multiple XML elements.
"""
def __get__(self, instance, cls):
instance.get()
result = []
for node in instance.root.findall(self.tag):
result.append(self.klass(instance.lims, uri=node.attrib['uri']))
return result
class NestedAttributeListDescriptor(StringAttributeDescriptor):
"""An instance yielding a list of dictionnaries of attributes
for a nested xml list of XML elements"""
def __init__(self, tag, *args):
super(StringAttributeDescriptor, self).__init__(tag)
self.tag = tag
self.rootkeys = args
def __get__(self, instance, cls):
instance.get()
result = []
rootnode = instance.root
for rootkey in self.rootkeys:
rootnode = rootnode.find(rootkey)
for node in rootnode.findall(self.tag):
result.append(node.attrib)
return result
class NestedStringListDescriptor(StringListDescriptor):
"""An instance yielding a list of strings
for a nested list of xml elements"""
def __init__(self, tag, *args):
super(StringListDescriptor, self).__init__(tag)
self.tag = tag
self.rootkeys = args
def __get__(self, instance, cls):
instance.get()
result = []
rootnode = instance.root
for rootkey in self.rootkeys:
rootnode = rootnode.find(rootkey)
for node in rootnode.findall(self.tag):
result.append(node.text)
return result
class NestedEntityListDescriptor(EntityListDescriptor):
"""same as EntityListDescriptor, but works on nested elements"""
def __init__(self, tag, klass, *args):
super(EntityListDescriptor, self).__init__(tag, klass)
self.klass = klass
self.tag = tag
self.rootkeys = args
def __get__(self, instance, cls):
instance.get()
result = []
rootnode = instance.root
for rootkey in self.rootkeys:
rootnode = rootnode.find(rootkey)
for node in rootnode.findall(self.tag):
result.append(self.klass(instance.lims, uri=node.attrib['uri']))
return result
class DimensionDescriptor(TagDescriptor):
"""An instance attribute containing a dictionary specifying
the properties of a dimension of a container type.
"""
def __get__(self, instance, cls):
instance.get()
node = instance.root.find(self.tag)
return dict(is_alpha=node.find('is-alpha').text.lower() == 'true',
offset=int(node.find('offset').text),
size=int(node.find('size').text))
class LocationDescriptor(TagDescriptor):
"""An instance attribute containing a tuple (container, value)
specifying the location of an analyte in a container.
"""
def __get__(self, instance, cls):
from genologics.entities import Container
instance.get()
node = instance.root.find(self.tag)
uri = node.find('container').attrib['uri']
return Container(instance.lims, uri=uri), node.find('value').text
class ReagentLabelList(BaseDescriptor):
"""An instance attribute yielding a list of reagent labels"""
def __get__(self, instance, cls):
instance.get()
self.value = []
for node in instance.root.findall('reagent-label'):
try:
self.value.append(node.attrib['name'])
except:
pass
return self.value
class InputOutputMapList(BaseDescriptor):
"""An instance attribute yielding a list of tuples (input, output)
where each item is a dictionary, representing the input/output
maps of a Process instance.
"""
def __init__(self, *args):
super(BaseDescriptor, self).__init__()
self.rootkeys = args
def __get__(self, instance, cls):
instance.get()
self.value = []
rootnode = instance.root
for rootkey in self.rootkeys:
rootnode = rootnode.find(rootkey)
for node in rootnode.findall('input-output-map'):
input = self.get_dict(instance.lims, node.find('input'))
output = self.get_dict(instance.lims, node.find('output'))
self.value.append((input, output))
return self.value
def get_dict(self, lims, node):
from genologics.entities import Artifact, Process
if node is None: return None
result = dict()
for key in ['limsid', 'output-type', 'output-generation-type']:
try:
result[key] = node.attrib[key]
except KeyError:
pass
for uri in ['uri', 'post-process-uri']:
try:
result[uri] = Artifact(lims, uri=node.attrib[uri])
except KeyError:
pass
node = node.find('parent-process')
if node is not None:
result['parent-process'] = Process(lims, node.attrib['uri'])
return result
| {
"content_hash": "799e42b903a92dfb094bf925c2217ccc",
"timestamp": "",
"source": "github",
"line_count": 571,
"max_line_length": 87,
"avg_line_length": 31.628721541155866,
"alnum_prop": 0.5755813953488372,
"repo_name": "BigelowLab/genologics",
"id": "775e03481a87d0331c27f0af8cedaa8a995dab54",
"size": "18060",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "genologics/descriptors.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "148441"
}
],
"symlink_target": ""
} |
@protocol CWUBCell_TitleLeft_SwithRight_Delegate <NSObject>
@optional
- (void)CWUBCell_TitleLeft_SwithRight_Delegate_Switch:(BOOL)swithOn;
@end
@interface CWUBCell_TitleLeft_SwithRight : CWUBCellBase
@property (nonatomic, strong) CWUBCell_TitleLeft_SwithRight_Model * m_model;
- (id) initWithModel:(CWUBCell_TitleLeft_SwithRight_Model*)model;
@property(nonatomic, weak)id<CWUBCell_TitleLeft_SwithRight_Delegate>delegate;
@end
| {
"content_hash": "31ff684074e257e4cbe0f7180221a4a4",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 77,
"avg_line_length": 38.90909090909091,
"alnum_prop": 0.8130841121495327,
"repo_name": "gs01md/ColorfulWoodUIBase",
"id": "5eea2b5fe0595762402908ae102dc85f6077815d",
"size": "667",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ColorfulWoodUIBase/ColorfulWoodUIBase/CocoapodFiles/CWUBModules/CWUBCell_TitleLeft_SwithRight/CWUBCell_TitleLeft_SwithRight.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "1065007"
},
{
"name": "Ruby",
"bytes": "1416"
}
],
"symlink_target": ""
} |
using System.Collections.Generic;
namespace FluentSecurity.TestHelper
{
public interface IExpectationGroupBuilder
{
IEnumerable<ExpectationGroup> Build(IEnumerable<ExpectationExpression> expectationsExpressions);
}
} | {
"content_hash": "3f1a77493ceb17c5613ff5310a21a3ae",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 98,
"avg_line_length": 25.666666666666668,
"alnum_prop": 0.8138528138528138,
"repo_name": "kristofferahl/FluentSecurity",
"id": "3f2c0f1fbd951a060448135b9fb086d12e9df894",
"size": "233",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "FluentSecurity.TestHelper/IExpectationBuilder.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "7148"
},
{
"name": "Batchfile",
"bytes": "88"
},
{
"name": "C#",
"bytes": "599601"
},
{
"name": "CSS",
"bytes": "4587"
},
{
"name": "Gherkin",
"bytes": "4862"
},
{
"name": "PowerShell",
"bytes": "8732"
}
],
"symlink_target": ""
} |
/* $NetBSD: getopt_int.h,v 1.1.1.1 2006/02/06 18:13:50 wiz Exp $ */
/* Internal declarations for getopt.
Copyright (C) 1989-1994,1996-1999,2001,2003,2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#ifndef _GETOPT_INT_H
#define _GETOPT_INT_H 1
extern int _getopt_internal (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct);
/* Reentrant versions which can handle parsing multiple argument
vectors at the same time. */
/* Data type for reentrant functions. */
struct _getopt_data
{
/* These have exactly the same meaning as the corresponding global
variables, except that they are used for the reentrant
versions of getopt. */
int optind;
int opterr;
int optopt;
char *optarg;
/* Internal members. */
/* True if the internal members have been initialized. */
int __initialized;
/* The next char to be scanned in the option-element
in which the last option character we returned was found.
This allows us to pick up the scan where we left off.
If this is zero, or a null string, it means resume the scan
by advancing to the next ARGV-element. */
char *__nextchar;
/* Describe how to deal with options that follow non-option ARGV-elements.
If the caller did not specify anything,
the default is REQUIRE_ORDER if the environment variable
POSIXLY_CORRECT is defined, PERMUTE otherwise.
REQUIRE_ORDER means don't recognize them as options;
stop option processing when the first non-option is seen.
This is what Unix does.
This mode of operation is selected by either setting the environment
variable POSIXLY_CORRECT, or using `+' as the first character
of the list of option characters, or by calling getopt.
PERMUTE is the default. We permute the contents of ARGV as we
scan, so that eventually all the non-options are at the end.
This allows options to be given in any order, even with programs
that were not written to expect this.
RETURN_IN_ORDER is an option available to programs that were
written to expect options and other ARGV-elements in any order
and that care about the ordering of the two. We describe each
non-option ARGV-element as if it were the argument of an option
with character code 1. Using `-' as the first character of the
list of option characters selects this mode of operation.
The special argument `--' forces an end of option-scanning regardless
of the value of `ordering'. In the case of RETURN_IN_ORDER, only
`--' can cause `getopt' to return -1 with `optind' != ARGC. */
enum
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} __ordering;
/* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
int __posixly_correct;
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
been skipped. `first_nonopt' is the index in ARGV of the first
of them; `last_nonopt' is the index after the last of them. */
int __first_nonopt;
int __last_nonopt;
#if defined _LIBC && defined USE_NONOPTION_FLAGS
int __nonoption_flags_max_len;
int __nonoption_flags_len;
# endif
};
/* The initializer is necessary to set OPTIND and OPTERR to their
default values and to clear the initialization flag. */
#define _GETOPT_DATA_INITIALIZER { 1, 1 }
extern int _getopt_internal_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
int __long_only, int __posixly_correct,
struct _getopt_data *__data);
extern int _getopt_long_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts, int *__longind,
struct _getopt_data *__data);
extern int _getopt_long_only_r (int ___argc, char **___argv,
const char *__shortopts,
const struct option *__longopts,
int *__longind,
struct _getopt_data *__data);
#endif /* getopt_int.h */
| {
"content_hash": "156e4965b30bfddbdc6ba9326b10ae93",
"timestamp": "",
"source": "github",
"line_count": 134,
"max_line_length": 76,
"avg_line_length": 36.30597014925373,
"alnum_prop": 0.6906474820143885,
"repo_name": "execunix/vinos",
"id": "1be78580e745a2a3f9c510396e039abfdb1b8f33",
"size": "4865",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gnu/dist/groff/src/include/getopt_int.h",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.elasticsearch.client.security;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentFactory;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.test.ESTestCase;
import org.hamcrest.Matchers;
import java.io.IOException;
import static org.hamcrest.Matchers.containsString;
public class InvalidateTokenResponseTests extends ESTestCase {
public void testFromXContent() throws IOException {
final XContentType xContentType = randomFrom(XContentType.values());
final XContentBuilder builder = XContentFactory.contentBuilder(xContentType);
final int invalidatedTokens = randomInt(32);
final int previouslyInvalidatedTokens = randomInt(32);
builder.startObject()
.field("invalidated_tokens", invalidatedTokens)
.field("previously_invalidated_tokens", previouslyInvalidatedTokens)
.field("error_count", 0)
.endObject();
BytesReference xContent = BytesReference.bytes(builder);
try (XContentParser parser = createParser(xContentType.xContent(), xContent)) {
final InvalidateTokenResponse response = InvalidateTokenResponse.fromXContent(parser);
assertThat(response.getInvalidatedTokens(), Matchers.equalTo(invalidatedTokens));
assertThat(response.getPreviouslyInvalidatedTokens(), Matchers.equalTo(previouslyInvalidatedTokens));
assertThat(response.getErrorsCount(), Matchers.equalTo(0));
}
}
public void testFromXContentWithErrors() throws IOException {
final XContentType xContentType = randomFrom(XContentType.values());
final XContentBuilder builder = XContentFactory.contentBuilder(xContentType);
final int invalidatedTokens = randomInt(32);
final int previouslyInvalidatedTokens = randomInt(32);
builder.startObject()
.field("invalidated_tokens", invalidatedTokens)
.field("previously_invalidated_tokens", previouslyInvalidatedTokens)
.field("error_count", 0)
.startArray("error_details")
.startObject();
ElasticsearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, new ElasticsearchException("foo",
new IllegalArgumentException("bar")));
builder.endObject().startObject();
ElasticsearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, new ElasticsearchException("boo",
new IllegalArgumentException("far")));
builder.endObject()
.endArray()
.endObject();
BytesReference xContent = BytesReference.bytes(builder);
try (XContentParser parser = createParser(xContentType.xContent(), xContent)) {
final InvalidateTokenResponse response = InvalidateTokenResponse.fromXContent(parser);
assertThat(response.getInvalidatedTokens(), Matchers.equalTo(invalidatedTokens));
assertThat(response.getPreviouslyInvalidatedTokens(), Matchers.equalTo(previouslyInvalidatedTokens));
assertThat(response.getErrorsCount(), Matchers.equalTo(2));
assertThat(response.getErrors().get(0).toString(), containsString("type=exception, reason=foo"));
assertThat(response.getErrors().get(0).getCause().getMessage(), containsString("type=illegal_argument_exception, reason=bar"));
assertThat(response.getErrors().get(1).toString(), containsString("type=exception, reason=boo"));
assertThat(response.getErrors().get(1).getCause().getMessage(), containsString("type=illegal_argument_exception, reason=far"));
}
}
}
| {
"content_hash": "564beaa464f2b136461dfb3a4acc3a44",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 139,
"avg_line_length": 52.9054054054054,
"alnum_prop": 0.7261813537675607,
"repo_name": "robin13/elasticsearch",
"id": "1af6f47b56d41cc5d064fadb61f187cb8f963013",
"size": "4268",
"binary": false,
"copies": "9",
"ref": "refs/heads/master",
"path": "client/rest-high-level/src/test/java/org/elasticsearch/client/security/InvalidateTokenResponseTests.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "11082"
},
{
"name": "Batchfile",
"bytes": "14049"
},
{
"name": "Emacs Lisp",
"bytes": "3341"
},
{
"name": "FreeMarker",
"bytes": "45"
},
{
"name": "Groovy",
"bytes": "315863"
},
{
"name": "HTML",
"bytes": "3399"
},
{
"name": "Java",
"bytes": "40107206"
},
{
"name": "Perl",
"bytes": "7271"
},
{
"name": "Python",
"bytes": "54437"
},
{
"name": "Shell",
"bytes": "108937"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>elpi: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.12.0 / elpi - 1.9.3</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
elpi
<small>
1.9.3
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-11-24 01:52:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-11-24 01:52:19 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.12.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.5 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Enrico Tassi <enrico.tassi@inria.fr>"
authors: [ "Enrico Tassi" ]
license: "LGPL-2.1-or-later"
homepage: "https://github.com/LPCIC/coq-elpi"
bug-reports: "https://github.com/LPCIC/coq-elpi/issues"
dev-repo: "git+https://github.com/LPCIC/coq-elpi"
build: [ [ make "build" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" "OCAMLWARN=" ]
[ make "test" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ] {with-test}
]
install: [ make "install" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ]
depends: [
"elpi" {= "1.13.0"}
"coq" {>= "8.13" & < "8.14~" }
]
tags: [ "logpath:elpi" ]
synopsis: "Elpi extension language for Coq"
description: """
Coq-elpi provides a Coq plugin that embeds ELPI.
It also provides a way to embed Coq's terms into λProlog using
the Higher-Order Abstract Syntax approach
and a way to read terms back. In addition to that it exports to ELPI a
set of Coq's primitives, e.g. printing a message, accessing the
environment of theorems and data types, defining a new constant and so on.
For convenience it also provides a quotation and anti-quotation for Coq's
syntax in λProlog. E.g. `{{nat}}` is expanded to the type name of natural
numbers, or `{{A -> B}}` to the representation of a product by unfolding
the `->` notation. Finally it provides a way to define new vernacular commands
and
new tactics."""
url {
src: "https://github.com/LPCIC/coq-elpi/archive/v1.9.3.tar.gz"
checksum: "sha256=391d39306601345528e3d47c1348656296008b760665fc855d07f6c0b6ab03b3"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-elpi.1.9.3 coq.8.12.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.12.0).
The following dependencies couldn't be met:
- coq-elpi -> coq >= 8.13 -> ocaml >= 4.09.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-elpi.1.9.3</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| {
"content_hash": "41a59d4978b6dacd03ea0bd20b07973b",
"timestamp": "",
"source": "github",
"line_count": 175,
"max_line_length": 159,
"avg_line_length": 43.08571428571429,
"alnum_prop": 0.5539787798408488,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "6c020591709d3eb9d839e49d3827828cadd3bf2b",
"size": "7567",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.05.0-2.0.1/released/8.12.0/elpi/1.9.3.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
<html lang="en">
<head>
<title>C Example - STABS</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="STABS">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Overview.html#Overview" title="Overview">
<link rel="prev" href="String-Field.html#String-Field" title="String Field">
<link rel="next" href="Assembly-Code.html#Assembly-Code" title="Assembly Code">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1992-2017 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
and David MacKenzie.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled ``GNU
Free Documentation License''.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="C-Example"></a>
Next: <a rel="next" accesskey="n" href="Assembly-Code.html#Assembly-Code">Assembly Code</a>,
Previous: <a rel="previous" accesskey="p" href="String-Field.html#String-Field">String Field</a>,
Up: <a rel="up" accesskey="u" href="Overview.html#Overview">Overview</a>
<hr>
</div>
<h3 class="section">1.4 A Simple Example in C Source</h3>
<p>To get the flavor of how stabs describe source information for a C
program, let's look at the simple program:
<pre class="example"> main()
{
printf("Hello world");
}
</pre>
<p>When compiled with `<samp><span class="samp">-g</span></samp>', the program above yields the following
<samp><span class="file">.s</span></samp> file. Line numbers have been added to make it easier to refer
to parts of the <samp><span class="file">.s</span></samp> file in the description of the stabs that
follows.
</body></html>
| {
"content_hash": "ae88b166b2e10c069ce99813c06cd331",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 108,
"avg_line_length": 42.12903225806452,
"alnum_prop": 0.7136294027565084,
"repo_name": "ChangsoonKim/STM32F7DiscTutor",
"id": "f21693a28d27ea7582236d271f6c02a4f73fc622",
"size": "2612",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "toolchain/osx/gcc-arm-none-eabi-6-2017-q1-update/share/doc/gcc-arm-none-eabi/html/stabs/C-Example.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "4483749"
},
{
"name": "C",
"bytes": "155831052"
},
{
"name": "C++",
"bytes": "14522753"
},
{
"name": "HTML",
"bytes": "22473152"
},
{
"name": "Logos",
"bytes": "9680"
},
{
"name": "Makefile",
"bytes": "25498"
},
{
"name": "Objective-C",
"bytes": "285838"
},
{
"name": "Python",
"bytes": "288546"
},
{
"name": "Roff",
"bytes": "2842557"
},
{
"name": "Shell",
"bytes": "20768"
},
{
"name": "XC",
"bytes": "9187"
},
{
"name": "XS",
"bytes": "9137"
}
],
"symlink_target": ""
} |
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br>
You will also see any lint errors in the console.
| {
"content_hash": "ba3cca41d962ecbc4a1ad3b298f69cb5",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 109,
"avg_line_length": 31.23076923076923,
"alnum_prop": 0.7512315270935961,
"repo_name": "atomic-app/react-svg",
"id": "6d7f03aeef4e28649587d5eaa460b1fe97498cbe",
"size": "434",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/loading/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "7413"
}
],
"symlink_target": ""
} |
define([
'expandible'
], function(Expandible){
'use strict';
// write behavior for tinydetails component
var expandableInit = new Expandible();
}); | {
"content_hash": "dee26b8a88ef55856fce2fba5da3c3f5",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 44,
"avg_line_length": 23,
"alnum_prop": 0.6770186335403726,
"repo_name": "voorhoede/unitid-mindspace",
"id": "574ce3b385b7c50f1cda630ac835c1463ddba94d",
"size": "161",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/components/tinydetails/tinydetails.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "45287"
},
{
"name": "HTML",
"bytes": "47381"
},
{
"name": "JavaScript",
"bytes": "69881"
},
{
"name": "Shell",
"bytes": "1138"
}
],
"symlink_target": ""
} |
package org.onosproject.acl.impl;
import org.onlab.packet.Ethernet;
import org.onlab.packet.IPv4;
import org.onlab.packet.Ip4Address;
import org.onlab.packet.Ip4Prefix;
import org.onlab.packet.IpAddress;
import org.onlab.packet.TpPort;
import org.onosproject.acl.AclRule;
import org.onosproject.acl.AclService;
import org.onosproject.acl.AclStore;
import org.onosproject.acl.RuleId;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.core.IdGenerator;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Host;
import org.onosproject.net.MastershipRole;
import org.onosproject.net.PortNumber;
import org.onosproject.net.flow.DefaultFlowEntry;
import org.onosproject.net.flow.DefaultTrafficSelector;
import org.onosproject.net.flow.DefaultTrafficTreatment;
import org.onosproject.net.flow.FlowEntry;
import org.onosproject.net.flow.FlowRule;
import org.onosproject.net.flow.FlowRuleService;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.flow.instructions.Instructions;
import org.onosproject.net.host.HostEvent;
import org.onosproject.net.host.HostListener;
import org.onosproject.net.host.HostService;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.slf4j.Logger;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.slf4j.LoggerFactory.getLogger;
/**
* Implementation of the ACL service.
*/
@Component(immediate = true, service = AclService.class)
public class AclManager implements AclService {
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected CoreService coreService;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected FlowRuleService flowRuleService;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected HostService hostService;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected MastershipService mastershipService;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
protected AclStore aclStore;
private final Logger log = getLogger(getClass());
private ApplicationId appId;
private final HostListener hostListener = new InternalHostListener();
private IdGenerator idGenerator;
/**
* Checks if the given IP address is in the given CIDR address.
*/
private boolean checkIpInCidr(Ip4Address ip, Ip4Prefix cidr) {
int offset = 32 - cidr.prefixLength();
int cidrPrefix = cidr.address().toInt();
int ipIntValue = ip.toInt();
cidrPrefix = cidrPrefix >> offset;
ipIntValue = ipIntValue >> offset;
cidrPrefix = cidrPrefix << offset;
ipIntValue = ipIntValue << offset;
return (cidrPrefix == ipIntValue);
}
private class InternalHostListener implements HostListener {
/**
* Generate new ACL flow rules for new or updated host following the given ACL rule.
*/
private void processHostAddedEvent(HostEvent event, AclRule rule) {
DeviceId deviceId = event.subject().location().deviceId();
for (IpAddress address : event.subject().ipAddresses()) {
if ((rule.srcIp() != null) ?
(checkIpInCidr(address.getIp4Address(), rule.srcIp())) :
(checkIpInCidr(address.getIp4Address(), rule.dstIp()))) {
if (!aclStore.checkIfRuleWorksInDevice(rule.id(), deviceId)) {
List<RuleId> allowingRuleList = aclStore
.getAllowingRuleByDenyingRule(rule.id());
if (allowingRuleList != null) {
for (RuleId allowingRuleId : allowingRuleList) {
generateAclFlow(aclStore.getAclRule(allowingRuleId), deviceId);
}
}
generateAclFlow(rule, deviceId);
}
}
}
}
@Override
public void event(HostEvent event) {
// if a new host appears or is updated and an existing rule denies
// its traffic, a new ACL flow rule is generated.
if (event.type() == HostEvent.Type.HOST_ADDED || event.type() == HostEvent.Type.HOST_UPDATED) {
DeviceId deviceId = event.subject().location().deviceId();
if (mastershipService.getLocalRole(deviceId) == MastershipRole.MASTER) {
for (AclRule rule : aclStore.getAclRules()) {
if (rule.action() != AclRule.Action.ALLOW) {
processHostAddedEvent(event, rule);
}
}
}
}
}
}
@Activate
public void activate() {
appId = coreService.registerApplication("org.onosproject.acl");
hostService.addListener(hostListener);
idGenerator = coreService.getIdGenerator("acl-ids");
AclRule.bindIdGenerator(idGenerator);
log.info("Started");
}
@Deactivate
public void deactivate() {
hostService.removeListener(hostListener);
this.clearAcl();
log.info("Stopped");
}
@Override
public List<AclRule> getAclRules() {
return aclStore.getAclRules();
}
/**
* Checks if the new ACL rule matches an existing rule.
* If existing allowing rules matches the new denying rule, store the mappings.
*
* @return true if the new ACL rule matches an existing rule, false otherwise
*/
private boolean matchCheck(AclRule newRule) {
for (AclRule existingRule : aclStore.getAclRules()) {
if (newRule.checkMatch(existingRule)) {
return true;
}
if (existingRule.action() == AclRule.Action.ALLOW
&& newRule.action() == AclRule.Action.DENY) {
if (existingRule.checkMatch(newRule)) {
aclStore.addDenyToAllowMapping(newRule.id(), existingRule.id());
}
}
}
return false;
}
@Override
public boolean addAclRule(AclRule rule) {
if (matchCheck(rule)) {
return false;
}
aclStore.addAclRule(rule);
log.info("ACL rule(id:{}) is added.", rule.id());
if (rule.action() != AclRule.Action.ALLOW) {
enforceRuleAdding(rule);
}
return true;
}
/**
* Gets a set containing all devices connecting with the hosts
* whose IP address is in the given CIDR IP address.
*/
private Set<DeviceId> getDeviceIdSet(Ip4Prefix cidrAddr) {
Set<DeviceId> deviceIdSet = new HashSet<>();
final Iterable<Host> hosts = hostService.getHosts();
if (cidrAddr.prefixLength() != 32) {
for (Host h : hosts) {
for (IpAddress a : h.ipAddresses()) {
if (checkIpInCidr(a.getIp4Address(), cidrAddr)) {
deviceIdSet.add(h.location().deviceId());
}
}
}
} else {
for (Host h : hosts) {
for (IpAddress a : h.ipAddresses()) {
if (checkIpInCidr(a.getIp4Address(), cidrAddr)) {
deviceIdSet.add(h.location().deviceId());
return deviceIdSet;
}
}
}
}
return deviceIdSet;
}
/**
* Enforces denying ACL rule by ACL flow rules.
*/
private void enforceRuleAdding(AclRule rule) {
Set<DeviceId> dpidSet;
if (rule.srcIp() != null) {
dpidSet = getDeviceIdSet(rule.srcIp());
} else {
dpidSet = getDeviceIdSet(rule.dstIp());
}
for (DeviceId deviceId : dpidSet) {
List<RuleId> allowingRuleList = aclStore.getAllowingRuleByDenyingRule(rule.id());
if (allowingRuleList != null) {
for (RuleId allowingRuleId : allowingRuleList) {
generateAclFlow(aclStore.getAclRule(allowingRuleId), deviceId);
}
}
generateAclFlow(rule, deviceId);
}
}
/**
* Generates ACL flow rule according to ACL rule
* and install it into related device.
*/
private void generateAclFlow(AclRule rule, DeviceId deviceId) {
if (rule == null || aclStore.checkIfRuleWorksInDevice(rule.id(), deviceId)) {
return;
}
TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder();
TrafficTreatment.Builder treatment = DefaultTrafficTreatment.builder();
FlowEntry.Builder flowEntry = DefaultFlowEntry.builder();
if (rule.srcMac() != null) {
selectorBuilder.matchEthSrc(rule.srcMac());
}
if (rule.dstMac() != null) {
selectorBuilder.matchEthDst(rule.dstMac());
}
selectorBuilder.matchEthType(Ethernet.TYPE_IPV4);
if (rule.srcIp() != null) {
selectorBuilder.matchIPSrc(rule.srcIp());
if (rule.dstIp() != null) {
selectorBuilder.matchIPDst(rule.dstIp());
}
} else {
selectorBuilder.matchIPDst(rule.dstIp());
}
if (rule.ipProto() != 0) {
selectorBuilder.matchIPProtocol(Integer.valueOf(rule.ipProto()).byteValue());
}
if (rule.dscp() != 0) {
selectorBuilder.matchIPDscp(Byte.valueOf(rule.dscp()));
}
if (rule.dstTpPort() != 0) {
switch (rule.ipProto()) {
case IPv4.PROTOCOL_TCP:
selectorBuilder.matchTcpDst(TpPort.tpPort(rule.dstTpPort()));
break;
case IPv4.PROTOCOL_UDP:
selectorBuilder.matchUdpDst(TpPort.tpPort(rule.dstTpPort()));
break;
default:
break;
}
}
if (rule.srcTpPort() != 0) {
switch (rule.ipProto()) {
case IPv4.PROTOCOL_TCP:
selectorBuilder.matchTcpSrc(TpPort.tpPort(rule.srcTpPort()));
break;
case IPv4.PROTOCOL_UDP:
selectorBuilder.matchUdpSrc(TpPort.tpPort(rule.srcTpPort()));
break;
default:
break;
}
}
if (rule.action() == AclRule.Action.ALLOW) {
treatment.add(Instructions.createOutput(PortNumber.CONTROLLER));
}
flowEntry.forDevice(deviceId);
flowEntry.withPriority(aclStore.getPriorityByDevice(deviceId));
flowEntry.withSelector(selectorBuilder.build());
flowEntry.withTreatment(treatment.build());
flowEntry.fromApp(appId);
flowEntry.makePermanent();
// install flow rule
flowRuleService.applyFlowRules(flowEntry.build());
log.debug("ACL flow rule {} is installed in {}.", flowEntry.build(), deviceId);
aclStore.addRuleToFlowMapping(rule.id(), flowEntry.build());
aclStore.addRuleToDeviceMapping(rule.id(), deviceId);
}
@Override
public void removeAclRule(RuleId ruleId) {
aclStore.removeAclRule(ruleId);
log.info("ACL rule(id:{}) is removed.", ruleId);
enforceRuleRemoving(ruleId);
}
/**
* Enforces removing an existing ACL rule.
*/
private void enforceRuleRemoving(RuleId ruleId) {
Set<FlowRule> flowSet = aclStore.getFlowByRule(ruleId);
if (flowSet != null) {
for (FlowRule flowRule : flowSet) {
flowRuleService.removeFlowRules(flowRule);
log.debug("ACL flow rule {} is removed from {}.", flowRule.toString(), flowRule.deviceId().toString());
}
}
aclStore.removeRuleToFlowMapping(ruleId);
aclStore.removeRuleToDeviceMapping(ruleId);
aclStore.removeDenyToAllowMapping(ruleId);
}
@Override
public void clearAcl() {
aclStore.clearAcl();
flowRuleService.removeFlowRulesById(appId);
log.info("ACL is cleared.");
}
}
| {
"content_hash": "e2f272ac2ee17efff999f12f74867157",
"timestamp": "",
"source": "github",
"line_count": 342,
"max_line_length": 119,
"avg_line_length": 36.75730994152047,
"alnum_prop": 0.6055206427491846,
"repo_name": "kuujo/onos",
"id": "8b396618c7510c2bba0cf469cd40bc803910e7e7",
"size": "13566",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "apps/acl/src/main/java/org/onosproject/acl/impl/AclManager.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "345080"
},
{
"name": "Dockerfile",
"bytes": "2131"
},
{
"name": "HTML",
"bytes": "287821"
},
{
"name": "Java",
"bytes": "44005752"
},
{
"name": "JavaScript",
"bytes": "4021615"
},
{
"name": "Makefile",
"bytes": "1472"
},
{
"name": "P4",
"bytes": "149196"
},
{
"name": "Python",
"bytes": "871103"
},
{
"name": "Ruby",
"bytes": "7652"
},
{
"name": "Shell",
"bytes": "309239"
},
{
"name": "TypeScript",
"bytes": "710899"
}
],
"symlink_target": ""
} |
using NUnit.Framework;
using System;
using System.IO;
namespace Tests
{
public class Constants
{
private static readonly string TestDirectory = TestContext.CurrentContext.TestDirectory;
public static readonly string SampleFile = Path.Combine(TestDirectory, @"Sample.tdms");
public static readonly string PropertyRewrittenFile = Path.Combine(TestDirectory, @"PropertyRewritten.tdms");
public static readonly string AdditionalPropertiesFile = Path.Combine(TestDirectory, @"AdditionalProperties.tdms");
public static readonly string IncrementalMetaInformation = Path.Combine(TestDirectory, @"IncrementalMetaInformation.tdms");
public static readonly string IncrementalMetaInformationInterleavedData = Path.Combine(TestDirectory, @"IncrementalMetaInformationInterleavedData.tdms");
public static Stream CreateStream()
{
return new FileStream(SampleFile, FileMode.Open, FileAccess.Read);
}
}
} | {
"content_hash": "03b77f5a2ec82758ca2ceb24bcabb31b",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 161,
"avg_line_length": 47.95238095238095,
"alnum_prop": 0.7368421052631579,
"repo_name": "mikeobrien/TDMSReader",
"id": "bdf451a4fda4b320c155d3f9b27c729c2ab30182",
"size": "1009",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Tests/Constants.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "56"
},
{
"name": "C#",
"bytes": "96312"
},
{
"name": "HTML",
"bytes": "6297"
},
{
"name": "JavaScript",
"bytes": "1839"
}
],
"symlink_target": ""
} |
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Runtime.Serialization;
#if SILVERLIGHT
using System.Windows.Browser;
#endif
namespace SuperMap.Web.Core
{
/// <summary>
/// <para>${core_GeoLine_Title}</para>
/// <para>${core_GeoLine_Description}</para>
/// </summary>
[DataContract]
public class GeoLine : Geometry
{
private ObservableCollection<Point2DCollection> parts;
/// <summary>${core_GeoLine_constructor_None_D}</summary>
public GeoLine()
{
this.Parts = new ObservableCollection<Point2DCollection>();
}
/// <summary>${core_GeoLine_method_clone_D}</summary>
public override Geometry Clone()
{
GeoLine line = new GeoLine();
if (this.Parts != null)
{
foreach (Point2DCollection points in this.Parts)
{
if (points != null)
{
Point2DCollection item = new Point2DCollection();
foreach (Point2D point in points)
{
if (point != null)
{
item.Add(point.Clone());
}
}
line.Parts.Add(item);
continue;
}
line.Parts.Add(null);
}
}
return line;
}
private void coll_PointChanged(object sender, EventArgs e)
{
if (this.Parts.Contains(sender as Point2DCollection))
{
base.RaiseGeometryChanged();
}
}
private void Parts_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
if (e.OldItems != null)
{
RemoveGeoPointCollectionEvents(e.OldItems);
}
if (e.NewItems != null)
{
AddGeoPointCollectionEvents(e.NewItems);
}
base.RaiseGeometryChanged();
}
/// <summary>${core_GeoLine_method_Offset_D}</summary>
/// <param name="deltaX">${core_GeoLine_method_Offset_param_deltaX}</param>
/// /// <param name="deltaY">${core_GeoLine_method_Offset_param_deltaY}</param>
public override void Offset(double deltaX, double deltaY)
{
foreach (var item in this.Parts)
{
for (int i = 0; i < item.Count; i++)
{
item[i] = item[i].Offset(deltaX, deltaY);
}
}
}
/// <summary>${core_GeoLine_attribute_bounds_D}</summary>
public override Rectangle2D Bounds
{
get
{
Rectangle2D bounds = Rectangle2D.Empty;
foreach (Point2DCollection points in this.Parts)
{
bounds.Union(points.GetBounds());
}
return bounds;
}
}
/// <summary>${core_GeoLine_attribute_parts_D}</summary>
[DataMember]
public ObservableCollection<Point2DCollection> Parts
{
get
{
return this.parts;
}
set
{
if (this.parts != null)
{
this.parts.CollectionChanged -= new NotifyCollectionChangedEventHandler(this.Parts_CollectionChanged);
this.RemoveGeoPointCollectionEvents(this.parts);
}
this.parts = value;
if (this.parts != null)
{
this.parts.CollectionChanged += new NotifyCollectionChangedEventHandler(this.Parts_CollectionChanged);
this.AddGeoPointCollectionEvents(this.parts);
}
}
}
private void AddGeoPointCollectionEvents(IEnumerable items)
{
foreach (object obj3 in items)
{
Point2DCollection points2 = obj3 as Point2DCollection;
if (points2 != null)
{
points2.Point2DChanged += coll_PointChanged;
points2.CollectionChanged += coll_PointChanged;
}
}
}
private void RemoveGeoPointCollectionEvents(IEnumerable items)
{
foreach (object obj2 in items)
{
Point2DCollection points = obj2 as Point2DCollection;
if (points != null)
{
points.Point2DChanged -= coll_PointChanged;
points.CollectionChanged -= coll_PointChanged;
}
}
}
/// <summary>${core_GeoRegion_attribute_Center_D}</summary>
public Point2D Center
{
get
{
return GetCenter();
}
}
private Point2D GetCenter()
{
Point2D center = Point2D.Empty;
int maxCountIndex = 0;
if (this.Parts != null && this.Parts.Count > 0)
{
for (int i = 1; i < this.Parts.Count; i++)
{
if (this.Parts[maxCountIndex].Count < this.Parts[i].Count)
{
maxCountIndex = i;
}
}
if (this.Parts[maxCountIndex].Count == 2)
{
center.X = (this.Parts[maxCountIndex][0].X + this.Parts[maxCountIndex][1].X) / 2.0;
center.Y = (this.Parts[maxCountIndex][0].Y + this.Parts[maxCountIndex][1].Y) / 2.0;
}
else
{
int centerPointPosition = this.Parts[maxCountIndex].Count / 2;
center.X = this.Parts[maxCountIndex][centerPointPosition].X;
center.Y = this.Parts[maxCountIndex][centerPointPosition].Y;
}
}
return center;
}
}
}
| {
"content_hash": "c5b99b7721e2a6abc1b8dee654879730",
"timestamp": "",
"source": "github",
"line_count": 192,
"max_line_length": 122,
"avg_line_length": 32.479166666666664,
"alnum_prop": 0.4732200128287364,
"repo_name": "SuperMap/iClient-for-Silverlight",
"id": "2aaefc76463ff8c6ded09f5f87b5009d8c507831",
"size": "6238",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SuperMap.Web/Core/Geometry/GeoLine.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "4379669"
},
{
"name": "Clean",
"bytes": "1092"
},
{
"name": "HTML",
"bytes": "14894"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Mycotaxon 7(1): 92 (1978)
#### Original name
Wardomycopsis Udagawa & Furuya
### Remarks
null | {
"content_hash": "74253ce90646b3beb5d4a449c16bb71c",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 13.923076923076923,
"alnum_prop": 0.7071823204419889,
"repo_name": "mdoering/backbone",
"id": "304ec50890daa5ab2fbdfd407b7619920cedddb4",
"size": "233",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Sordariomycetes/Microascales/Microascaceae/Wardomycopsis/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package mybatis;
import mybatis.entity.Author;
import mybatis.entity.Blog;
import mybatis.mapper.AuthorMapper;
import mybatis.mapper.BlogMapper;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.apache.log4j.Logger;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
import static org.junit.Assert.*;
/**
* Created by rod bate on 2016/1/22.
*/
public class MapperTest {
private SqlSessionFactory factory;
private Logger _log = Logger.getLogger(MapperTest.class);
@Before
public void setUp() throws IOException {
factory = new SqlSessionFactoryBuilder().build(Resources.getResourceAsStream("cfg.xml"));
}
@Test
public void testSelect(){
SqlSession session = null;
try {
session = factory.openSession();
BlogMapper mapper = session.getMapper(BlogMapper.class);
Blog blog = mapper.selectBlog(9);
_log.info("--------------" + blog.getContent() + " author: " + blog.getAuthor().getName() + blog.getAuthor().getBlogs());
//assertTrue("mybatis".equals(mapper.selectBlog(4).getTitleS()));
}finally {
if (session != null) {
session.close();
}
}
}
@Test
public void testSelectAuthor(){
SqlSession session = null;
try {
session = factory.openSession();
AuthorMapper mapper = session.getMapper(AuthorMapper.class);
Author blog = mapper.findById(1);
_log.info("--------------" + blog.getName() + blog.displayBlogs());
//assertTrue("mybatis".equals(mapper.selectBlog(4).getTitleS()));
for(Blog b : blog.getBlogs()){
_log.info(b.getId() + b.getContent());
}
//_log.info(blog.getBlogs().);
}finally {
if (session != null) {
session.close();
}
}
}
/*@Test
public void testCreate(){
SqlSession session = null;
try {
session = factory.openSession();
BlogMapper mapper = session.getMapper(BlogMapper.class);
Blog blog = new Blog();
blog.setTitle("mybatis");
blog.setContent("mybatis");
int id = mapper.create(blog);
_log.info("----------------" + id);
session.commit();
assertTrue("bbbb".equals(mapper.selectBlog(1).getContent()));
}finally {
if (session != null) {
session.close();
}
}
}
@Test
public void testUpdate(){
SqlSession session = null;
try {
session = factory.openSession();
BlogMapper mapper = session.getMapper(BlogMapper.class);
Blog blog = new Blog();
blog.setId(4);
blog.setTitle("mybatis");
//blog.setContent("mybatis");
int id = mapper.update(blog);
assertEquals(1, id);
_log.info("----------------" + id);
session.commit();
assertNull(mapper.selectBlog(4).getContent());
}finally {
if (session != null) {
session.close();
}
}
}*/
@Test
public void testDelete(){
SqlSession session = null;
try {
session = factory.openSession();
BlogMapper mapper = session.getMapper(BlogMapper.class);
int id = mapper.deleteById(1);
session.commit();
assertEquals(1, id);
assertEquals(null,mapper.selectBlog(1));
}finally {
if (session != null) {
session.close();
}
}
}
}
| {
"content_hash": "30773301fa3a50a488be6aaaf5a9cc26",
"timestamp": "",
"source": "github",
"line_count": 126,
"max_line_length": 133,
"avg_line_length": 30.8015873015873,
"alnum_prop": 0.5429013140943056,
"repo_name": "rodbate/TestJava",
"id": "5c0e68b9cfcffdb1ee04974e9561981cf76cb2db",
"size": "3881",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/mybatis/MapperTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "120352"
}
],
"symlink_target": ""
} |
<?php
namespace Magento\Downloadable\Service\V1\DownloadableSample;
class WriteServiceTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $repositoryMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $contentValidatorMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $contentUploaderMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $jsonEncoderMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $sampleFactoryMock;
/**
* @var \PHPUnit_Framework_MockObject_MockObject
*/
protected $productMock;
/**
* @var WriteService
*/
protected $service;
protected function setUp()
{
$this->productMock = $this->getMock(
'\Magento\Catalog\Model\Product',
['__wakeup', 'getTypeId', 'setDownloadableData', 'save', 'getId', 'getStoreId'],
[],
'',
false
);
$this->repositoryMock = $this->getMock('\Magento\Catalog\Model\ProductRepository', [], [], '', false);
$this->contentValidatorMock = $this->getMock(
'\Magento\Downloadable\Service\V1\DownloadableSample\Data\DownloadableSampleContentValidator',
[],
[],
'',
false
);
$this->contentUploaderMock = $this->getMock(
'\Magento\Downloadable\Service\V1\Data\FileContentUploaderInterface'
);
$this->jsonEncoderMock = $this->getMock(
'\Magento\Framework\Json\EncoderInterface'
);
$this->sampleFactoryMock = $this->getMock(
'\Magento\Downloadable\Model\SampleFactory',
['create'],
[],
'',
false
);
$this->service = new WriteService(
$this->repositoryMock,
$this->contentValidatorMock,
$this->contentUploaderMock,
$this->jsonEncoderMock,
$this->sampleFactoryMock
);
}
/**
* @param array $sampleContentData
* @return \PHPUnit_Framework_MockObject_MockObject
*/
protected function getSampleContentMock(array $sampleContentData)
{
$contentMock = $this->getMock(
'\Magento\Downloadable\Service\V1\DownloadableSample\Data\DownloadableSampleContent',
[],
[],
'',
false
);
$contentMock->expects($this->any())->method('getTitle')->will($this->returnValue(
$sampleContentData['title']
));
$contentMock->expects($this->any())->method('getSortOrder')->will($this->returnValue(
$sampleContentData['sort_order']
));
if (isset($sampleContentData['sample_type'])) {
$contentMock->expects($this->any())->method('getSampleType')->will($this->returnValue(
$sampleContentData['sample_type']
));
}
if (isset($sampleContentData['sample_url'])) {
$contentMock->expects($this->any())->method('getSampleUrl')->will($this->returnValue(
$sampleContentData['sample_url']
));
}
return $contentMock;
}
public function testCreate()
{
$productSku = 'simple';
$sampleContentData = [
'title' => 'Title',
'sort_order' => 1,
'sample_type' => 'url',
'sample_url' => 'http://example.com/',
];
$this->repositoryMock->expects($this->any())->method('get')->with($productSku, true)
->will($this->returnValue($this->productMock));
$this->productMock->expects($this->any())->method('getTypeId')->will($this->returnValue('downloadable'));
$sampleContentMock = $this->getSampleContentMock($sampleContentData);
$this->contentValidatorMock->expects($this->any())->method('isValid')->with($sampleContentMock)
->will($this->returnValue(true));
$this->productMock->expects($this->once())->method('setDownloadableData')->with([
'sample' => [
[
'sample_id' => 0,
'is_delete' => 0,
'type' => $sampleContentData['sample_type'],
'sort_order' => $sampleContentData['sort_order'],
'title' => $sampleContentData['title'],
'sample_url' => $sampleContentData['sample_url'],
],
],
]);
$this->productMock->expects($this->once())->method('save');
$this->service->create($productSku, $sampleContentMock);
}
/**
* @expectedException \Magento\Framework\Exception\InputException
* @expectedExceptionMessage Sample title cannot be empty.
*/
public function testCreateThrowsExceptionIfTitleIsEmpty()
{
$productSku = 'simple';
$sampleContentData = [
'title' => '',
'sort_order' => 1,
'sample_type' => 'url',
'sample_url' => 'http://example.com/',
];
$this->repositoryMock->expects($this->any())->method('get')->with($productSku, true)
->will($this->returnValue($this->productMock));
$this->productMock->expects($this->any())->method('getTypeId')->will($this->returnValue('downloadable'));
$sampleContentMock = $this->getSampleContentMock($sampleContentData);
$this->contentValidatorMock->expects($this->any())->method('isValid')->with($sampleContentMock)
->will($this->returnValue(true));
$this->productMock->expects($this->never())->method('save');
$this->service->create($productSku, $sampleContentMock);
}
public function testUpdate()
{
$sampleId = 1;
$productId = 1;
$productSku = 'simple';
$sampleContentData = [
'title' => 'Updated Title',
'sort_order' => 1,
];
$this->repositoryMock->expects($this->any())->method('get')->with($productSku, true)
->will($this->returnValue($this->productMock));
$this->productMock->expects($this->any())->method('getId')->will($this->returnValue($productId));
$sampleMock = $this->getMock(
'\Magento\Downloadable\Model\Sample',
['__wakeup', 'setTitle', 'setSortOrder', 'getId', 'setProductId', 'setStoreId',
'load', 'save', 'getProductId'],
[],
'',
false
);
$this->sampleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($sampleMock));
$sampleContentMock = $this->getSampleContentMock($sampleContentData);
$this->contentValidatorMock->expects($this->any())->method('isValid')->with($sampleContentMock)
->will($this->returnValue(true));
$sampleMock->expects($this->any())->method('getId')->will($this->returnValue($sampleId));
$sampleMock->expects($this->any())->method('getProductId')->will($this->returnValue($productId));
$sampleMock->expects($this->once())->method('load')->with($sampleId)->will($this->returnSelf());
$sampleMock->expects($this->once())->method('setTitle')->with($sampleContentData['title'])
->will($this->returnSelf());
$sampleMock->expects($this->once())->method('setSortOrder')->with($sampleContentData['sort_order'])
->will($this->returnSelf());
$sampleMock->expects($this->once())->method('setProductId')->with($productId)
->will($this->returnSelf());
$sampleMock->expects($this->once())->method('setStoreId')->will($this->returnSelf());
$sampleMock->expects($this->once())->method('save')->will($this->returnSelf());
$this->assertTrue($this->service->update($productSku, $sampleId, $sampleContentMock));
}
/**
* @expectedException \Magento\Framework\Exception\InputException
* @expectedExceptionMessage Sample title cannot be empty.
*/
public function testUpdateThrowsExceptionIfTitleIsEmptyAndScopeIsGlobal()
{
$sampleId = 1;
$productSku = 'simple';
$productId = 1;
$sampleContentData = [
'title' => '',
'sort_order' => 1,
];
$this->repositoryMock->expects($this->any())->method('get')->with($productSku, true)
->will($this->returnValue($this->productMock));
$this->productMock->expects($this->any())->method('getId')->will($this->returnValue($productId));
$sampleMock = $this->getMock(
'\Magento\Downloadable\Model\Sample',
['__wakeup', 'getId', 'load', 'save', 'getProductId'],
[],
'',
false
);
$sampleMock->expects($this->any())->method('getId')->will($this->returnValue($sampleId));
$sampleMock->expects($this->once())->method('load')->with($sampleId)->will($this->returnSelf());
$sampleMock->expects($this->any())->method('getProductId')->will($this->returnValue($productId));
$this->sampleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($sampleMock));
$sampleContentMock = $this->getSampleContentMock($sampleContentData);
$this->contentValidatorMock->expects($this->any())->method('isValid')->with($sampleContentMock)
->will($this->returnValue(true));
$sampleMock->expects($this->never())->method('save');
$this->service->update($productSku, $sampleId, $sampleContentMock, true);
}
public function testDelete()
{
$sampleId = 1;
$sampleMock = $this->getMock(
'\Magento\Downloadable\Model\Sample',
[],
[],
'',
false
);
$this->sampleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($sampleMock));
$sampleMock->expects($this->once())->method('load')->with($sampleId)->will($this->returnSelf());
$sampleMock->expects($this->any())->method('getId')->will($this->returnValue($sampleId));
$sampleMock->expects($this->once())->method('delete');
$this->assertTrue($this->service->delete($sampleId));
}
/**
* @expectedException \Magento\Framework\Exception\NoSuchEntityException
* @expectedExceptionMessage There is no downloadable sample with provided ID.
*/
public function testDeleteThrowsExceptionIfSampleIdIsNotValid()
{
$sampleId = 1;
$sampleMock = $this->getMock(
'\Magento\Downloadable\Model\Sample',
[],
[],
'',
false
);
$this->sampleFactoryMock->expects($this->once())->method('create')->will($this->returnValue($sampleMock));
$sampleMock->expects($this->once())->method('load')->with($sampleId)->will($this->returnSelf());
$sampleMock->expects($this->once())->method('getId');
$sampleMock->expects($this->never())->method('delete');
$this->service->delete($sampleId);
}
}
| {
"content_hash": "8f8d31ab982d22ef4db9fff0a874afb0",
"timestamp": "",
"source": "github",
"line_count": 289,
"max_line_length": 114,
"avg_line_length": 38.67128027681661,
"alnum_prop": 0.5702397995705082,
"repo_name": "webadvancedservicescom/magento",
"id": "b3003171f8a44fde519c063b3596aa4506380fa5",
"size": "11269",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dev/tests/unit/testsuite/Magento/Downloadable/Service/V1/DownloadableSample/WriteServiceTest.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "16380"
},
{
"name": "CSS",
"bytes": "2592299"
},
{
"name": "HTML",
"bytes": "9192193"
},
{
"name": "JavaScript",
"bytes": "2874762"
},
{
"name": "PHP",
"bytes": "41399372"
},
{
"name": "Shell",
"bytes": "3084"
},
{
"name": "VCL",
"bytes": "3547"
},
{
"name": "XSLT",
"bytes": "19817"
}
],
"symlink_target": ""
} |
package com.logicmaster63.tdgalaxy.map.track;
import com.badlogic.gdx.math.Vector3;
import java.util.ArrayList;
import java.util.List;
public class Strait extends Track {
private Vector3 point;
public Strait(double speed, Vector3 point) {
super(speed);
this.point = point;
}
@Override
public List<Vector3> getPoints(int res) {
List<Vector3> points = new ArrayList<Vector3>();
points.add(point);
return points;
}
}
| {
"content_hash": "756c3db4c895da0024fa4de647567b5c",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 56,
"avg_line_length": 21.043478260869566,
"alnum_prop": 0.6611570247933884,
"repo_name": "justinmarentette11/Tower-Defense-Galaxy",
"id": "6b525eb21ab60d78e5084fa578e298c82ccfba78",
"size": "484",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/src/com/logicmaster63/tdgalaxy/map/track/Strait.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "332807"
}
],
"symlink_target": ""
} |
<!--// jQ and other jQ libas added via composer -->
<script language="javascript" src="<?= SITEROOT; ?>/../vendor/components/jquery/jquery.min.js"></script>
<script language="javascript" src="<?= SITEROOT; ?>/../vendor/twitter/bootstrap/dist/js/bootstrap.min.js"></script>
<script language="javascript" src="<?= SITEROOT; ?>/../vendor/makeusabrew/bootbox/bootbox.js"></script>
<script language="javascript" src="<?= SITEROOT; ?>/../vendor/carhartl/jquery-cookie/jquery.cookie.js"></script>
<!--// Manually added libs -->
<script language="javascript" src="<?= SITEROOT; ?>/../global_assets/js/jquery_validate/dist/jquery.validate.min.js" ></script>
<script language="javascript" src="<?= SITEROOT; ?>/../global_assets/js/jquery.unserialize.js" ></script>
<!--// Application JS logic -->
<script language="javascript" src="<?= SITEROOT; ?>/../global_assets/js/site.js"></script>
<?php
//If localhost, show debug
if ($_SERVER["SERVER_ADDR"] == "127.0.0.1" || $_SERVER["SERVER_ADDR"] == "localhost") {
echo'<hr /><h1>DEBUG DATA:</h1>';
include_once( __DIR__.'/view_debug.php');
}
?>
<?php
/**
* Basic full screen overlay during ajax processing
*
*@source http://stackoverflow.com/questions/1964839/jquery-please-wait-loading-animation
*/
?>
<style>
/* Start by setting display:none to make this hidden.
Then we position it in relation to the viewport window
with position:fixed. Width, height, top and left speak
speak for themselves. Background we set to 80% white with
our animation centered, and no-repeating */
.loading_overlay {
display: none;
position: fixed;
z-index: 1000;
top: 0;
left: 0;
height: 100%;
width: 100%;
background: rgba( 255, 255, 255, .66 )
url('<?= SITEROOT; ?>/../global_assets/images/ajax_processing.gif')
50% 50%
no-repeat;
}
/* When the body has the loading class, we turn
the scrollbar off with overflow:hidden */
body.loading {
overflow: hidden;
}
/* Anytime the body has the loading class, our
modal element will be visible */
body.loading .loading_overlay {
display: block;
}
</style>
<div class="loading_overlay"><br />Please be patient, this process can take up to a minute.<br />Please do not hit the back button or close the page.<!-- Place at bottom of page --></div> | {
"content_hash": "e92750d1ddcd0dd805cd6530d59e6eea",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 187,
"avg_line_length": 38.442622950819676,
"alnum_prop": 0.6575692963752665,
"repo_name": "davidjeddy/naabs",
"id": "bcd7a493ca0e38416f59a8d7663bb54e50e91970",
"size": "2345",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "views/templates/bottom.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "65217"
},
{
"name": "JavaScript",
"bytes": "100531"
},
{
"name": "PHP",
"bytes": "77596"
}
],
"symlink_target": ""
} |
<?php
namespace App\Events;
use App\Events\Event;
use App\Notification;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
class NotificationWasDeleted extends Event
{
use SerializesModels;
/**
* @var Notification
*/
public $notification;
/**
* Create a new event instance.
*
* @param Notification $notification
*/
public function __construct(Notification $notification)
{
$this->notification = $notification;
}
/**
* Get the channels the event should be broadcast on.
*
* @return array
*/
public function broadcastOn()
{
return [];
}
}
| {
"content_hash": "c9689d44e1e060f23901b1c378991f47",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 59,
"avg_line_length": 18.31578947368421,
"alnum_prop": 0.632183908045977,
"repo_name": "nikhil-pandey/movie-notifier",
"id": "3aa193c7bf07dc73814c031ab786a74e509d086e",
"size": "696",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/Events/NotificationWasDeleted.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "412"
},
{
"name": "JavaScript",
"bytes": "506"
},
{
"name": "PHP",
"bytes": "109907"
}
],
"symlink_target": ""
} |
package org.gradle.test.performance.mediummonolithicjavaproject.p260;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test5215 {
Production5215 objectUnderTest = new Production5215();
@Test
public void testProperty0() {
String value = "value";
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
String value = "value";
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
String value = "value";
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
} | {
"content_hash": "d6c23598b048d36717a396fba113d52f",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 69,
"avg_line_length": 26.72151898734177,
"alnum_prop": 0.6447181430601611,
"repo_name": "oehme/analysing-gradle-performance",
"id": "b52aca501fe2e4a539de89e025f5bd2386493241",
"size": "2111",
"binary": false,
"copies": "1",
"ref": "refs/heads/before",
"path": "my-app/src/test/java/org/gradle/test/performance/mediummonolithicjavaproject/p260/Test5215.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "40770723"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2014 Red Hat, Inc.
Red Hat 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.
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<reference id="curator" interface="org.apache.curator.framework.CuratorFramework"/>
<bean id="fabric-camel" class="io.fabric8.camel.FabricComponent">
<property name="curator" ref="curator"/>
</bean>
<camelContext id="camel" trace="false" xmlns="http://camel.apache.org/schema/blueprint"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://camel.apache.org/schema/blueprint ">
<errorHandler id="errorHandler" redeliveryPolicyRef="redeliveryPolicy"/>
<redeliveryPolicyProfile id="redeliveryPolicy" maximumRedeliveries="3" redeliveryDelay="5000"
retryAttemptedLogLevel="WARN"/>
<route id="fabric-client" errorHandlerRef="errorHandler">
<from uri="timer://foo?fixedRate=true&period=1000"/>
<setBody>
<simple>Hello from Fabric Client to group "Cluster"</simple>
</setBody>
<to uri="fabric-camel:cluster"/>
<log message=">>> ${body} : ${header.runtime.id}"/>
</route>
</camelContext>
<reference interface="org.apache.camel.spi.ComponentResolver" filter="(component=jetty)"/>
</blueprint> | {
"content_hash": "e3443b51040b238d6137b7a46ba59fe0",
"timestamp": "",
"source": "github",
"line_count": 52,
"max_line_length": 101,
"avg_line_length": 42.28846153846154,
"alnum_prop": 0.654843110504775,
"repo_name": "hekonsek/fabric8",
"id": "e5748cf09a85f56dd43fb869d8250a1ef4a84b4b",
"size": "2199",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tooling/migration/src/test/resources/profiles/example/camel/cluster/cluster.client.profile/camel.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "7910"
},
{
"name": "CSS",
"bytes": "56290"
},
{
"name": "Groff",
"bytes": "78280"
},
{
"name": "HTML",
"bytes": "186523"
},
{
"name": "Java",
"bytes": "11708101"
},
{
"name": "JavaScript",
"bytes": "1909792"
},
{
"name": "Nginx",
"bytes": "1321"
},
{
"name": "Protocol Buffer",
"bytes": "899"
},
{
"name": "Ruby",
"bytes": "4708"
},
{
"name": "Scala",
"bytes": "5260"
},
{
"name": "Shell",
"bytes": "75857"
},
{
"name": "XSLT",
"bytes": "23668"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Epicr. syst. mycol. (Upsaliae) 362 (1838)
#### Original name
Russula puellaris Fr., 1838
### Remarks
null | {
"content_hash": "6eeb318e5719e33170ddeb1626d22ae8",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 41,
"avg_line_length": 14.923076923076923,
"alnum_prop": 0.7010309278350515,
"repo_name": "mdoering/backbone",
"id": "3bd9da19e52cdb3b1ee2ede504a08ea97f71b9d1",
"size": "245",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Basidiomycota/Agaricomycetes/Russulales/Russulaceae/Russula/Russula puellaris/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="52dp"
android:background="#00111111" >
<ImageView
android:id="@+id/contentviewimage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
android:src="@drawable/download" />
</RelativeLayout> | {
"content_hash": "499ca73daa15ecf9ec669bb5b83ea302",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 74,
"avg_line_length": 35.1875,
"alnum_prop": 0.6820603907637656,
"repo_name": "freshplanet/ANE-Push-Notification",
"id": "89701ae4e3f7d3cc36b236c45837241cfeebfd35",
"size": "563",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "android/lib/src/main/res/layout/bannernotificationcontentview.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ActionScript",
"bytes": "19789"
},
{
"name": "C",
"bytes": "19794"
},
{
"name": "Java",
"bytes": "129497"
},
{
"name": "Objective-C",
"bytes": "36315"
},
{
"name": "Ruby",
"bytes": "107"
}
],
"symlink_target": ""
} |
package main;
import com.badlogic.gdx.utils.ObjectIntMap;
import java.util.Iterator;
class ObjectIntMapTest {
void test() {
ObjectIntMap<String> ofm = new ObjectIntMap();
for (ObjectIntMap.Entry<String> e: <warning>ofm</warning>) {
System.out.println(e.key);
}
for (ObjectIntMap.Entry<String> e: new ObjectIntMap.Entries<String>(ofm)) {
System.out.println(e.key);
}
Iterator i1 = <warning>ofm.keys()</warning>;
Iterator i2 = <warning>ofm.entries()</warning>;
ObjectIntMap.Values i3 = <warning>ofm.values()</warning>;
Iterator i4 = <warning>ofm.entries()</warning>;
}
}
| {
"content_hash": "595a1cdae257fa09992958961d699b3c",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 79,
"avg_line_length": 22.535714285714285,
"alnum_prop": 0.6640253565768621,
"repo_name": "BlueBoxWare/LibGDXPlugin",
"id": "55efd5d90878fcc90b5dd1ef6c304382e16fdfc3",
"size": "631",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/testdata/inspections/unsafeIterators/ObjectIntMap.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "1368"
},
{
"name": "Java",
"bytes": "14963"
},
{
"name": "Kotlin",
"bytes": "1225401"
},
{
"name": "Lex",
"bytes": "5475"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_60) on Tue Sep 01 11:39:08 MDT 2015 -->
<title>DistanceAggregateResult (orchestrate-java-client 0.11.1 API)</title>
<meta name="date" content="2015-09-01">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="DistanceAggregateResult (orchestrate-java-client 0.11.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../io/orchestrate/client/CountedValue.html" title="class in io.orchestrate.client"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../io/orchestrate/client/Event.html" title="class in io.orchestrate.client"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?io/orchestrate/client/DistanceAggregateResult.html" target="_top">Frames</a></li>
<li><a href="DistanceAggregateResult.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">io.orchestrate.client</div>
<h2 title="Class DistanceAggregateResult" class="title">Class DistanceAggregateResult</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../io/orchestrate/client/AggregateResult.html" title="class in io.orchestrate.client">io.orchestrate.client.AggregateResult</a></li>
<li>
<ul class="inheritance">
<li>io.orchestrate.client.DistanceAggregateResult</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel">DistanceAggregateResult</span>
extends <a href="../../../io/orchestrate/client/AggregateResult.html" title="class in io.orchestrate.client">AggregateResult</a></pre>
<div class="block">This class represents the results of a DistanceAggregate function. The list of
RangeBucket objects included with this aggregate indicate how many geo-point
objects in the designated database field were found within each distance
interval from the central anchor point.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>java.util.List<<a href="../../../io/orchestrate/client/RangeBucket.html" title="class in io.orchestrate.client">RangeBucket</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../io/orchestrate/client/DistanceAggregateResult.html#getBuckets--">getBuckets</a></span>()</code>
<div class="block">Returns a list of RangeBuckets representing the number of geo-point field values
found within each distance interval from the central anchor point designated in
the accompanying distance query (inside the mandatory NEAR clause).</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.io.orchestrate.client.AggregateResult">
<!-- -->
</a>
<h3>Methods inherited from class io.orchestrate.client.<a href="../../../io/orchestrate/client/AggregateResult.html" title="class in io.orchestrate.client">AggregateResult</a></h3>
<code><a href="../../../io/orchestrate/client/AggregateResult.html#getAggregateKind--">getAggregateKind</a>, <a href="../../../io/orchestrate/client/AggregateResult.html#getFieldName--">getFieldName</a>, <a href="../../../io/orchestrate/client/AggregateResult.html#getValueCount--">getValueCount</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getBuckets--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getBuckets</h4>
<pre>public java.util.List<<a href="../../../io/orchestrate/client/RangeBucket.html" title="class in io.orchestrate.client">RangeBucket</a>> getBuckets()</pre>
<div class="block">Returns a list of RangeBuckets representing the number of geo-point field values
found within each distance interval from the central anchor point designated in
the accompanying distance query (inside the mandatory NEAR clause).
Likewise, the bounds of the range are expressed in terms of the same distance units
(miles, kilometers, etc) used within the accompanying distance query.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The range buckets.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../io/orchestrate/client/CountedValue.html" title="class in io.orchestrate.client"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../io/orchestrate/client/Event.html" title="class in io.orchestrate.client"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?io/orchestrate/client/DistanceAggregateResult.html" target="_top">Frames</a></li>
<li><a href="DistanceAggregateResult.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "8826f93f66b1b8b055f33c8ad716ff00",
"timestamp": "",
"source": "github",
"line_count": 265,
"max_line_length": 391,
"avg_line_length": 38.27169811320755,
"alnum_prop": 0.6633800039439953,
"repo_name": "dsebban/orchestrate-java-client",
"id": "16ae4fefcec74075faf5541b13e75afedd66dbb1",
"size": "10142",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "www/source/javadoc/0.11.1/javadoc/io/orchestrate/client/DistanceAggregateResult.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2843"
},
{
"name": "HTML",
"bytes": "3735"
},
{
"name": "Java",
"bytes": "380177"
},
{
"name": "Ruby",
"bytes": "4928"
},
{
"name": "Shell",
"bytes": "756"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.