text
stringlengths 2
1.04M
| meta
dict |
|---|---|
namespace WordOccurances
{
using System;
using System.Collections.Generic;
using System.Linq;
/// <summary>
/// 3. Write a program that counts how many times each word from given text file words.txt appears in it.
/// The character casing differences should be ignored. The result words should be ordered by their number of
/// occurrences in the text. Example:
/// This is the TEXT. Text, text, text – THIS TEXT! Is this the text?
/// is > 2
/// the > 2
/// this > 3
/// text > 6
/// </summary>
public class WordOccurancesCount
{
public static void Main()
{
string text = "This is the TEXT. Text, text, text – THIS TEXT! Is this the text?";
IDictionary<string, int> occurances = CountWordsOccurances(text);
IDictionary<string, int> sorted = SortWordOccurances(occurances);
PrintWordOccurances(sorted);
}
public static IDictionary<string, int> CountWordsOccurances(string text)
{
string[] words =
text.Split(' ', '.', ',', '-', '?', '!', '–');
IDictionary<string, int> occurances = new Dictionary<string, int>();
foreach (string word in words)
{
if (occurances.ContainsKey(word.ToLower()))
{
occurances[word.ToLower()]++;
}
else
{
occurances.Add(word.ToLower(), 1);
}
}
return occurances;
}
public static IDictionary<string, int> SortWordOccurances(IDictionary<string, int> occurances)
{
IDictionary<string, int> sorted = new Dictionary<string, int>();
var sortedEntries =
(from entry in occurances
orderby entry.Value ascending
select entry);
foreach (var entry in sortedEntries)
{
sorted.Add(entry);
}
return sorted;
}
public static void PrintWordOccurances(IDictionary<string, int> pairs)
{
foreach (KeyValuePair<string, int> pair in pairs)
{
Console.WriteLine("{0}: {1} times", pair.Key, pair.Value);
}
Console.WriteLine();
}
}
}
|
{
"content_hash": "b07e42ad77d9d6d158582f69cb3cacbc",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 114,
"avg_line_length": 31.30263157894737,
"alnum_prop": 0.5292139554434636,
"repo_name": "svetlai/TelerikAcademy",
"id": "779602940558a63b80a66731247870ef15b82c7c",
"size": "2387",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Programming-with-C#/Data-Structures-and-Algorithms/04-Dictionaries-and-HashTables/03-CountWordOccurances/WordOccurancesCount.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "251046"
},
{
"name": "Batchfile",
"bytes": "37"
},
{
"name": "C#",
"bytes": "5866409"
},
{
"name": "CSS",
"bytes": "128738"
},
{
"name": "CoffeeScript",
"bytes": "70"
},
{
"name": "HTML",
"bytes": "337095"
},
{
"name": "JavaScript",
"bytes": "2326558"
},
{
"name": "Objective-C",
"bytes": "14987"
},
{
"name": "PLSQL",
"bytes": "13508"
},
{
"name": "Shell",
"bytes": "37"
},
{
"name": "XSLT",
"bytes": "3316"
}
],
"symlink_target": ""
}
|
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
/* List Structure Definition */
typedef int DataType;
struct _list_node_t {
DataType data;
struct _list_node_t *next;
};
typedef struct _list_node_t list_node_t;
typedef list_node_t *List;
typedef list_node_t *Position;
/* Methods for List */
void make_empty(List *list);
bool is_empty(const List list);
bool is_last(List list, Position pos);
Position find(List list, const DataType data);
void delete(List list, const DataType data);
Position find_previous(List list, const DataType data);
void insert(List list, const Position pos, const DataType data);
void destroy_list(List *list);
Position header(const List list);
Position footer(const List list);
Position next(Position pos);
DataType retrieve(Position pos);
void print_list(const List list);
/* Main Entry */
int main(void) {
List list = NULL;
// create list
make_empty(&list);
// insert to header
insert(list, header(list), 1);
insert(list, header(list), 2);
insert(list, header(list), 3);
// print list
print_list(list);
// insert to footer
insert(list, footer(list), 4);
insert(list, footer(list), 5);
insert(list, footer(list), 6);
// print list
print_list(list);
// find 5
Position pos_5 = find(list, 5);
printf("%d\n", retrieve(pos_5));
// find 5 prev
Position pos_5_prev = find_previous(list, 5);
printf("%d\n", retrieve(pos_5_prev));
// insert to pos_5_prev
insert(list, pos_5_prev, 7);
insert(list, pos_5_prev, 8);
insert(list, pos_5_prev, 9);
// print list
print_list(list);
// delete first
delete(list, 3);
print_list(list);
// delete end
delete(list, 6);
print_list(list);
// check is end
printf("%d\n", is_last(list, pos_5));
Position next_5 = next(pos_5);
printf("%d\n", next_5 == NULL);
// destroy list
destroy_list(&list);
printf("%#p\n", list);
return 0;
}
/* Methods Definition */
void make_empty(List *list) {
*list = (List)malloc(sizeof(list_node_t));
(*list)->data = -1;
(*list)->next = NULL;
}
bool is_empty(const List list) {
if (list == NULL || list->next == NULL) {
return true;
}
return false;
}
bool is_last(List list, Position pos) {
if (footer(list) == pos && pos->next == NULL) {
return true;
}
return false;
}
Position find(List list, const DataType data) {
if (is_empty(list)) {
return NULL;
}
for (Position curr = list->next; curr != NULL; curr = curr->next) {
if (curr->data == data) {
return curr;
}
}
return NULL;
}
void delete(List list, const DataType data) {
Position prev_item = find_previous(list, data);
if (prev_item == NULL) {
return;
}
Position del_item = prev_item->next;
prev_item->next = del_item->next;
free(del_item);
}
Position find_previous(List list, const DataType data) {
if (is_empty(list)) {
return NULL;
}
for (Position prev = list; prev->next != NULL; prev = prev->next) {
if (prev->next->data == data) {
return prev;
}
}
return NULL;
}
void insert(List list, const Position pos, const DataType data) {
list_node_t *node = (list_node_t *)malloc(sizeof(list_node_t));
node->data = data;
if (header(list) == pos) {
node->next = pos;
list->next = node;
return;
}
if (footer(list) == pos) {
node->next = NULL;
pos->next = node;
return;
}
for (Position prev = list->next; prev->next != NULL; prev = prev->next) {
if (prev->next == pos) {
node->next = prev->next;
prev->next = node;
return;
}
}
fprintf(stderr, "insert to list error occurs");
exit(1);
}
void destroy_list(List *list) {
Position tmp;
for (Position curr = (*list)->next; curr != NULL; ) {
tmp = curr->next;
free(curr);
curr = tmp;
}
*list = NULL;
}
Position header(const List list) {
return list->next;
}
Position footer(const List list) {
Position prev = list;
while (prev->next != NULL) {
prev = prev->next;
}
return prev;
}
Position next(Position pos) {
return pos->next;
}
DataType retrieve(Position pos) {
return pos->data;
}
void print_list(const List list) {
for (Position curr = list->next; curr != NULL; curr = curr->next) {
printf("%d ", curr->data);
}
printf("\n");
}
|
{
"content_hash": "fd8047444d528e6eadce949b8db5ff00",
"timestamp": "",
"source": "github",
"line_count": 221,
"max_line_length": 77,
"avg_line_length": 21.669683257918553,
"alnum_prop": 0.5518897473376487,
"repo_name": "JShadowMan/data-structures-and-algorithm-analysis",
"id": "130a1b0981bab20f36aa754158acd9890047bd60",
"size": "4789",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ch03/3.2.2 list/list.c",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "94010"
},
{
"name": "C++",
"bytes": "26240"
},
{
"name": "Python",
"bytes": "11970"
}
],
"symlink_target": ""
}
|
/**
* Generated from variabletest.treo by Reo 1.0.
*/
import nl.cwi.reo.runtime.*;
public class variabletest {
public static void main(String[] args) {
Port<String> $1 = new PortWaitNotify<String>();
Port<String> $2 = new PortWaitNotify<String>();
PortWindow1 PortWindow1 = new PortWindow1();
$1.setProducer(PortWindow1);
PortWindow1.$1 = $1;
Thread thread_PortWindow1 = new Thread(PortWindow1);
PortWindow2 PortWindow2 = new PortWindow2();
$2.setConsumer(PortWindow2);
PortWindow2.$2 = $2;
Thread thread_PortWindow2 = new Thread(PortWindow2);
Protocol1 Protocol1 = new Protocol1();
$1.setConsumer(Protocol1);
$2.setProducer(Protocol1);
Protocol1.$1 = $1;
Protocol1.$2 = $2;
Thread thread_Protocol1 = new Thread(Protocol1);
thread_PortWindow1.start();
thread_PortWindow2.start();
thread_Protocol1.start();
try {
thread_PortWindow1.join();
thread_PortWindow2.join();
thread_Protocol1.join();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
private static class PortWindow1 implements Component {
public volatile Port<String> $1;
public void activate() {
synchronized (this) {
notify();
}
}
public void run() {
Windows.producer("in", $1);
}
}
private static class PortWindow2 implements Component {
public volatile Port<String> $2;
public void activate() {
synchronized (this) {
notify();
}
}
public void run() {
Windows.consumer("out", $2);
}
}
private static class Protocol1 implements Component {
public volatile Port<String> $1;
public volatile Port<String> $2;
public void activate() {
synchronized (this) {
notify();
}
}
interface Rule {
void fire();
}
private Rule[] rules = new Rule[] {
new Rule() {
public void fire() {
if ($2.hasGet() && !($1.peek() == null) && !($1.peek() == null)) {
$2.put($1.peek());
$1.get();
}
}
},
};
public void run() {
int i = 0;
int j = 0;
int s = rules.length;
while (true) {
rules[(i+j) % s].fire();
i = (i+1) % s;
if (i == 0)
j = (j+1) % s;
synchronized (this) {
while(true) {
if ($2.hasGet() && !($1.peek() == null) && !($1.peek() == null)) break;
try {
wait();
} catch (InterruptedException e) { }
}
}
}
}
}
}
|
{
"content_hash": "27d1e3839125b6d1eb96800159a2997a",
"timestamp": "",
"source": "github",
"line_count": 126,
"max_line_length": 77,
"avg_line_length": 19.174603174603174,
"alnum_prop": 0.5802980132450332,
"repo_name": "kasperdokter/Reo",
"id": "739c475f472e4b06f3fe301f38af176f780672e8",
"size": "2416",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "reo-compiler/sandbox/switch/variabletest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ANTLR",
"bytes": "11728"
},
{
"name": "Batchfile",
"bytes": "1854"
},
{
"name": "C",
"bytes": "49627"
},
{
"name": "HTML",
"bytes": "5672"
},
{
"name": "Java",
"bytes": "874850"
},
{
"name": "Shell",
"bytes": "1539"
}
],
"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_45) on Wed Apr 05 10:49:54 BST 2017 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Index (Airline - Help - Bash 2.3.0 API)</title>
<meta name="date" content="2017-04-05">
<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="Index (Airline - Help - Bash 2.3.0 API)";
}
//-->
</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>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</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?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.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="contentContainer"><a href="#_B_">B</a> <a href="#_C_">C</a> <a href="#_G_">G</a> <a href="#_U_">U</a> <a href="#_V_">V</a> <a name="_B_">
<!-- -->
</a>
<h2 class="title">B</h2>
<dl>
<dt><a href="./com/github/rvesse/airline/annotations/help/BashCompletion.html" title="annotation in com.github.rvesse.airline.annotations.help"><span class="strong">BashCompletion</span></a> - Annotation Type in <a href="./com/github/rvesse/airline/annotations/help/package-summary.html">com.github.rvesse.airline.annotations.help</a></dt>
<dd>
<div class="block">Annotates a field with Bash completion information</div>
</dd>
<dt><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash"><span class="strong">BashCompletionGenerator</span></a><<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="type parameter in BashCompletionGenerator">T</a>> - Class in <a href="./com/github/rvesse/airline/help/cli/bash/package-summary.html">com.github.rvesse.airline.help.cli.bash</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#BashCompletionGenerator()">BashCompletionGenerator()</a></span> - Constructor for class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#BashCompletionGenerator(boolean, boolean)">BashCompletionGenerator(boolean, boolean)</a></span> - Constructor for class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd>
<div class="block">Creates a new completion generator</div>
</dd>
</dl>
<a name="_C_">
<!-- -->
</a>
<h2 class="title">C</h2>
<dl>
<dt><a href="./com/github/rvesse/airline/annotations/help/package-summary.html">com.github.rvesse.airline.annotations.help</a> - package com.github.rvesse.airline.annotations.help</dt>
<dd> </dd>
<dt><a href="./com/github/rvesse/airline/help/cli/bash/package-summary.html">com.github.rvesse.airline.help.cli.bash</a> - package com.github.rvesse.airline.help.cli.bash</dt>
<dd> </dd>
<dt><a href="./com/github/rvesse/airline/help/cli/bash/CompletionBehaviour.html" title="enum in com.github.rvesse.airline.help.cli.bash"><span class="strong">CompletionBehaviour</span></a> - Enum in <a href="./com/github/rvesse/airline/help/cli/bash/package-summary.html">com.github.rvesse.airline.help.cli.bash</a></dt>
<dd>
<div class="block">Possible completion behaviour for options/arguments</div>
</dd>
</dl>
<a name="_G_">
<!-- -->
</a>
<h2 class="title">G</h2>
<dl>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#getCompletionData(com.github.rvesse.airline.model.OptionMetadata)">getCompletionData(OptionMetadata)</a></span> - Method in class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd>
<div class="block">Gets the completion info for an option</div>
</dd>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#getCompletionData(com.github.rvesse.airline.model.ArgumentsMetadata)">getCompletionData(ArgumentsMetadata)</a></span> - Method in class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd>
<div class="block">Gets the completion info for arguments</div>
</dd>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#getCompletionData(java.util.Collection)">getCompletionData(Collection<Accessor>)</a></span> - Method in class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd> </dd>
</dl>
<a name="_U_">
<!-- -->
</a>
<h2 class="title">U</h2>
<dl>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html#usage(com.github.rvesse.airline.model.GlobalMetadata, java.io.OutputStream)">usage(GlobalMetadata<T>, OutputStream)</a></span> - Method in class com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/BashCompletionGenerator.html" title="class in com.github.rvesse.airline.help.cli.bash">BashCompletionGenerator</a></dt>
<dd> </dd>
</dl>
<a name="_V_">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/CompletionBehaviour.html#valueOf(java.lang.String)">valueOf(String)</a></span> - Static method in enum com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/CompletionBehaviour.html" title="enum in com.github.rvesse.airline.help.cli.bash">CompletionBehaviour</a></dt>
<dd>
<div class="block">Returns the enum constant of this type with the specified name.</div>
</dd>
<dt><span class="strong"><a href="./com/github/rvesse/airline/help/cli/bash/CompletionBehaviour.html#values()">values()</a></span> - Static method in enum com.github.rvesse.airline.help.cli.bash.<a href="./com/github/rvesse/airline/help/cli/bash/CompletionBehaviour.html" title="enum in com.github.rvesse.airline.help.cli.bash">CompletionBehaviour</a></dt>
<dd>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</dd>
</dl>
<a href="#_B_">B</a> <a href="#_C_">C</a> <a href="#_G_">G</a> <a href="#_U_">U</a> <a href="#_V_">V</a> </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>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</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?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.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>Copyright © 2012–2017. All rights reserved.</small></p>
</body>
</html>
|
{
"content_hash": "868978521b2423243bece72322632b45",
"timestamp": "",
"source": "github",
"line_count": 185,
"max_line_length": 474,
"avg_line_length": 52.043243243243246,
"alnum_prop": 0.6972372247611134,
"repo_name": "rvesse/airline",
"id": "c399cf52f3031baf687598fe39dab3187c27c922",
"size": "9628",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "docs/javadoc/2.3.0/airline-help-bash/index-all.html",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "91"
},
{
"name": "Java",
"bytes": "2176058"
},
{
"name": "Shell",
"bytes": "4550"
}
],
"symlink_target": ""
}
|
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Xml.Linq;
namespace XamlStyler.Core.DocumentManipulation
{
public class NameSelector
{
private string _name;
private Regex _nameRegex;
private string _namespace;
private Regex _namespaceRegex;
[DisplayName("Name")]
[Description("Match name by name. null/empty = all. 'DOS' Wildcards permitted.")]
public string Name
{
get { return _name; }
set
{
_name = value;
_nameRegex = _name != null ? new Wildcard(_name) : null;
}
}
[DisplayName("Namespace")]
[Description("Match name by namespace. null/empty = all. 'DOS' Wildcards permitted.")]
public string Namespace
{
get { return _namespace; }
set
{
_namespace = value;
_namespaceRegex = _namespace != null ? new Wildcard(_namespace) : null;
}
}
public NameSelector()
{
}
public NameSelector(string name)
{
Name = name;
}
public NameSelector(string name, string @namespace)
{
Name = name;
Namespace = @namespace;
}
public bool IsMatch(XName name)
{
if (_nameRegex != null && !_nameRegex.IsMatch(name.LocalName)) return false;
if (_namespaceRegex != null && !_namespaceRegex.IsMatch(name.Namespace.NamespaceName)) return false;
return true;
}
public override string ToString()
{
return
(Namespace != null ? Namespace + ":" : null) + Name;
}
}
}
|
{
"content_hash": "40735bc3341835aa0ab65cf293a94e1b",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 112,
"avg_line_length": 27.03030303030303,
"alnum_prop": 0.5190582959641256,
"repo_name": "NicoVermeir/XamlStyler",
"id": "01489eaf61d073c3362865394aec045009795074",
"size": "1784",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "XamlStyler.Service/DocumentManipulation/NameSelector.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "140181"
},
{
"name": "HTML",
"bytes": "47070"
}
],
"symlink_target": ""
}
|
package io.vertx.ext.web.codec;
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.AsyncResult;
import io.vertx.core.Handler;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.core.streams.WriteStream;
import io.vertx.ext.web.codec.impl.BodyCodecImpl;
import io.vertx.ext.web.codec.impl.StreamingBodyCodec;
import io.vertx.ext.web.codec.spi.BodyStream;
import java.util.function.Function;
/**
* A codec for encoding and decoding HTTP bodies.
*
* @author <a href="mailto:julien@julienviet.com">Julien Viet</a>
*/
@VertxGen
public interface BodyCodec<T> {
/**
* @return the UTF-8 string codec
*/
static BodyCodec<String> string() {
return BodyCodecImpl.STRING;
}
/**
* A codec for strings using a specific {@code encoding}.
*
* @param encoding the encoding
* @return the codec
*/
static BodyCodec<String> string(String encoding) {
return BodyCodecImpl.string(encoding);
}
/**
* @return the {@link Buffer} codec
*/
static BodyCodec<Buffer> buffer() {
return BodyCodecImpl.BUFFER;
}
/**
* @return the {@link JsonObject} codec
*/
static BodyCodec<JsonObject> jsonObject() {
return BodyCodecImpl.JSON_OBJECT;
}
/**
* @return the {@link JsonArray} codec
*/
static BodyCodec<JsonArray> jsonArray() {
return BodyCodecImpl.JSON_ARRAY;
}
/**
* Create and return a codec for Java objects encoded using Jackson mapper.
*
* @return a codec for mapping POJO to Json
*/
static <U> BodyCodec<U> json(Class<U> type) {
return BodyCodecImpl.json(type);
}
/**
* @return a codec that simply discards the response
*/
static BodyCodec<Void> none() {
return BodyCodecImpl.NONE;
}
/**
* Create a codec that buffers the entire body and then apply the {@code decode} function and returns the result.
*
* @param decode the decode function
* @return the created codec
*/
static <T> BodyCodec<T> create(Function<Buffer, T> decode) {
return new BodyCodecImpl<>(decode);
}
/**
* A body codec that pipes the body to a write stream.
*
* @param stream the destination tream
* @return the body codec for a write stream
*/
static BodyCodec<Void> pipe(WriteStream<Buffer> stream) {
return new StreamingBodyCodec(stream);
}
/**
* Create the {@link BodyStream}.
* <p>
* This method is usually called for creating the pump for the HTTP response and should not be called directly.
*/
@GenIgnore
void create(Handler<AsyncResult<BodyStream<T>>> handler);
}
|
{
"content_hash": "c11aa7535d4a143d91dad44e9b317d7c",
"timestamp": "",
"source": "github",
"line_count": 108,
"max_line_length": 115,
"avg_line_length": 24.685185185185187,
"alnum_prop": 0.6882970742685671,
"repo_name": "mystdeim/vertx-web",
"id": "bd7c6e65896defb1be19c44f6f6f5e6954653606",
"size": "3279",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "vertx-web-common/src/main/java/io/vertx/ext/web/codec/BodyCodec.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CoffeeScript",
"bytes": "5450"
},
{
"name": "FreeMarker",
"bytes": "479"
},
{
"name": "Groovy",
"bytes": "1727"
},
{
"name": "HTML",
"bytes": "7807"
},
{
"name": "Java",
"bytes": "1211704"
},
{
"name": "JavaScript",
"bytes": "74244"
},
{
"name": "Kotlin",
"bytes": "15242"
},
{
"name": "Makefile",
"bytes": "1420"
},
{
"name": "Python",
"bytes": "1029979"
},
{
"name": "Ruby",
"bytes": "3197"
}
],
"symlink_target": ""
}
|
package com.graphhopper.jackson;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.graphhopper.util.shapes.BBox;
import java.io.IOException;
class BBoxSerializer extends JsonSerializer<BBox> {
@Override
public void serialize(BBox bBox, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {
jsonGenerator.writeStartArray();
for (Double number : bBox.toGeoJson()) {
jsonGenerator.writeNumber(number);
}
jsonGenerator.writeEndArray();
}
}
|
{
"content_hash": "6e790b07ccdd9e92c3f90807e2d41133",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 150,
"avg_line_length": 36.8,
"alnum_prop": 0.7744565217391305,
"repo_name": "komoot/graphhopper",
"id": "3a6e1a604610ed91b2f9efdf62b72737fa14af02",
"size": "736",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "web-api/src/main/java/com/graphhopper/jackson/BBoxSerializer.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "23787"
},
{
"name": "Dockerfile",
"bytes": "451"
},
{
"name": "HTML",
"bytes": "6516"
},
{
"name": "Java",
"bytes": "4060162"
},
{
"name": "JavaScript",
"bytes": "4295045"
},
{
"name": "Shell",
"bytes": "12710"
}
],
"symlink_target": ""
}
|
from django.db import models
from django.urls import reverse
from django.utils import timezone
class Category(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(unique=True)
class Meta:
ordering = ["title"]
verbose_name_plural = "categories"
def __str__(self):
return "%s" % self.title
def get_absolute_url(self):
return reverse("category_detail", args=[self.slug])
class Tag(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(unique=True)
class Meta:
ordering = ["title"]
def __str__(self):
return "%s" % self.title
def get_absolute_url(self):
return reverse("tag_detail", args=[self.slug])
class Post(models.Model):
title = models.CharField(max_length=255)
slug = models.SlugField(unique=True)
body = models.TextField()
pub_date = models.DateTimeField()
category = models.ForeignKey(Category, on_delete=models.CASCADE, blank=True, null=True)
tags = models.ManyToManyField(Tag, blank=True)
class Meta:
ordering = ["-pub_date"]
def __str__(self):
return "%s" % self.title
def save(self, *args, **kwargs):
self.pub_date = timezone.now() if not self.pub_date else self.pub_date
super(Post, self).save(*args, **kwargs)
def get_absolute_url(self):
return reverse("post_date_detail", args=[
self.pub_date.year,
self.pub_date.strftime("%b").lower(),
self.pub_date.day,
self.slug
])
|
{
"content_hash": "c50995b4af737b9533f64e313b16d187",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 91,
"avg_line_length": 26.8135593220339,
"alnum_prop": 0.6201011378002529,
"repo_name": "richardcornish/richardcornish",
"id": "76958e719ba8673ba64f216369ad890978b1a36d",
"size": "1582",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "richardcornish/blog/models.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "194488"
},
{
"name": "HTML",
"bytes": "71437"
},
{
"name": "JavaScript",
"bytes": "495426"
},
{
"name": "Python",
"bytes": "46473"
}
],
"symlink_target": ""
}
|
class TokyoMetro::Factory::Generate::Api::PassengerSurvey::List < TokyoMetro::Factory::Generate::Api::MetaClass::List::Normal
include ::TokyoMetro::ClassNameLibrary::Api::PassengerSurvey
end
|
{
"content_hash": "b94a24145c67608e6a13be30e51a8c95",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 125,
"avg_line_length": 64,
"alnum_prop": 0.796875,
"repo_name": "osorubeki-fujita/odpt_tokyo_metro",
"id": "21756fa3b9b7db75c9c9363039c15bcb5638634e",
"size": "303",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/tokyo_metro/factory/generate/api/passenger_survey/list.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "1712210"
},
{
"name": "Shell",
"bytes": "115"
}
],
"symlink_target": ""
}
|
using System;
namespace Discord
{
/// <summary> Represents a Discord snowflake entity. </summary>
public interface ISnowflakeEntity : IEntity<ulong>
{
/// <summary>
/// Gets when the snowflake was created.
/// </summary>
/// <returns>
/// A <see cref="DateTimeOffset"/> representing when the entity was first created.
/// </returns>
DateTimeOffset CreatedAt { get; }
}
}
|
{
"content_hash": "1952417dfe06be949a5a1af830d29650",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 94,
"avg_line_length": 28.25,
"alnum_prop": 0.581858407079646,
"repo_name": "RogueException/Discord.Net",
"id": "6f2c7512b5c01af6bd1bf4d597b824090da2d58f",
"size": "452",
"binary": false,
"copies": "2",
"ref": "refs/heads/dev",
"path": "src/Discord.Net.Core/Entities/ISnowflakeEntity.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "2097979"
},
{
"name": "Smalltalk",
"bytes": "276"
}
],
"symlink_target": ""
}
|
<?php
class ViewDatabaseFileField extends ViewControl
{
public function showDBValue(&$data, $keylink)
{
$value = "";
$fileNameF = $this->container->pSet->getFilenameField($this->field);
if($fileNameF)
{
$fileName = $data[$fileNameF];
if(! $fileName)
$fileName = "file.bin";
}
else
$fileName = "file.bin";
if( strlen($data[$this->field]) )
{
$value = "<a href='".GetTableLink("getfile", "", "table=".GetTableURL($this->container->pSet->_table)."&filename=".rawurlencode($fileName)."&field=".rawurlencode($this->field).$keylink)."'>";
$value.= runner_htmlspecialchars($fileName);
$value.= "</a>";
}
return $value;
}
/**
* Get the field's content that will be exported
* @prarm &Array data
* @prarm String keylink
* @return String
*/
public function getExportValue(&$data, $keylink = "")
{
return "LONG BINARY DATA - CANNOT BE DISPLAYED";
}
}
?>
|
{
"content_hash": "aff4ec91e84dd09f05127424ed8a6a83",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 194,
"avg_line_length": 24.64864864864865,
"alnum_prop": 0.6282894736842105,
"repo_name": "tony19760619/PHPRunnerProjects",
"id": "f5a87ad1a04eedf028a800e04a19608dbf611b4e",
"size": "912",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Tbs/output/classes/controls/ViewDatabaseFileField.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "22122868"
},
{
"name": "HTML",
"bytes": "10141141"
},
{
"name": "JavaScript",
"bytes": "1149595"
},
{
"name": "LilyPond",
"bytes": "1161"
},
{
"name": "PHP",
"bytes": "45213301"
}
],
"symlink_target": ""
}
|
[](http://godoc.org/github.com/deadmanssnitch/sarama-heroku)
## Overview
sarama-heroku is a Go library that makes it easy to connect to [Apache Kafka on
Heroku](https://www.heroku.com/kafka). We handle all the certificate
management and configuration so that you can start up your Kafka consumers and
producers with minimal effort.
## Installation
```console
go get -u github.com/deadmanssnitch/sarama-heroku
```
### Heroku
Make sure you have the Heroku CLI plugin installed:
```console
heroku plugins:install heroku-kafka
```
Next, you'll need to provision a new Kafka add-on or attach an existing one to
your app. To provision run:
```console
heroku addons:create heroku-kafka:basic-0 -a [app]
heroku kafka:wait -a [app]
```
## Consumers
Now you are ready to start using the library.
Create a cluster consumer config like the following:
```go
kfkCfg, err := heroku.NewConfig()
config := cluster.NewConfig()
config.ClientID = "app-name." + os.Getenv("DYNO")
config.Net.TLS.Enable = kfkCfg.TLS()
config.Net.TLS.Config = kfkCfg.TLSConfig()
groupID := kfkCfg.Prefix("group-id")
topics := []string{kfkCfg.Prefix("topic")}
consumer, err := cluster.NewClusterConsumer(groupID, topics, config)
```
:heavy_exclamation_mark: Multi-tenant plans require creating the consumer
groups before you can use them.
```console
heroku kafka:consumer-groups:create 'group-id' -a [app]
```
## Producers
Furthermore, a producer can be either Sync or Async. Read up on the differences
[here](https://godoc.org/github.com/Shopify/sarama).
Creating an async producer from a custom config:
```go
kfkCfg, err := heroku.NewConfig()
config := sarama.NewConfig()
config.Producer.Return.Errors = true
config.Producer.RequiredAcks = sarama.WaitForAll
config.Net.TLS.Enable = kfkCfg.TLS()
config.Net.TLS.Config = kfkCfg.TLSConfig()
producer, err := sarama.NewAsyncProducer(kfkCfg.Brokers(), config)
```
:heavy_exclamation_mark: Multi-tenant plans require adding the KAFKA_PREFIX
when sending messages. You should use heroku.AppendPrefixTo("topic") to ensure
it's set.
```go
producer <- &sarama.ProducerMessage{
Topic: heroku.AppendPrefixTo("events"),
Key: sarama.StringEncoder(key),
Value: []byte("Message"),
}
```
For more information about how to set up a config see the
[sarama documentation](http://godoc.org/github.com/Shopify/sarama#Config).
## Multiple Kafka Instances
Use `heroku.NewConfigWithName` to build a config for a named Kafka instance.
```go
kfkCfg, err := heroku.NewConfigWithName("ONYX")
```
## Environment
Sarama Heroku depends on the following environment variables that are set by
the Heroku Kafka add-on:
- KAFKA\_CLIENT\_CERT
- KAFKA\_CLIENT\_CERT\_KEY
- KAFKA\_TRUSTED\_CERT
- KAFKA\_PREFIX (only multi-tenant plans)
- KAFKA\_URL
## Contributing
Thank you so much for your interest in contributing to this repository. We
appreciate you and the work you're doing on this SO much.
For details [see CONTRIBUTING.md](CONTRIBUTING.md)
## Thanks
This package was extracted from [Dead Man's Snitch](https://deadmanssnitch.com),
a dead simple monitoring service for Cron jobs and system liveness.
|
{
"content_hash": "ca5f36046258b06174bfe6c25da5d9bb",
"timestamp": "",
"source": "github",
"line_count": 118,
"max_line_length": 138,
"avg_line_length": 27.220338983050848,
"alnum_prop": 0.7493773349937733,
"repo_name": "meredithlind/goheroku",
"id": "483265406ea3904364c5a80484c51c9b9ddf4929",
"size": "3229",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "5488"
}
],
"symlink_target": ""
}
|
package org.projectomakase.omakase.worker.tool.manifest.assertions;
import org.projectomakase.omakase.task.providers.manifest.ManifestFile;
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.Assertions;
import java.net.URI;
/**
* @author Richard Lucas
*/
public class ManifestFileAssert extends AbstractAssert<ManifestFileAssert, ManifestFile> {
public ManifestFileAssert(ManifestFile actual) {
super(actual, ManifestFileAssert.class);
}
public ManifestFileAssert hasURI(URI uri) {
isNotNull();
Assertions.assertThat(actual.getUri()).isEqualTo(uri);
return this;
}
public ManifestFileAssert hasSize(long size) {
isNotNull();
Assertions.assertThat(actual.getSize()).contains(size);
return this;
}
}
|
{
"content_hash": "8412b319f7d46cfb155de1c5fec8995d",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 90,
"avg_line_length": 26.933333333333334,
"alnum_prop": 0.7227722772277227,
"repo_name": "projectomakase/omakase",
"id": "c28d0e91cc710b35751e055f093e55cf81d7ee67",
"size": "1465",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "omakase-tool/omakase-tool-manifest/src/test/java/org/projectomakase/omakase/worker/tool/manifest/assertions/ManifestFileAssert.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "93079"
},
{
"name": "HTML",
"bytes": "5001"
},
{
"name": "Java",
"bytes": "2537765"
},
{
"name": "JavaScript",
"bytes": "52899"
},
{
"name": "Shell",
"bytes": "3965"
}
],
"symlink_target": ""
}
|
<?php
/*
Safe sample
input : get the field userData from the variable $_GET via an object, which store it in a array
sanitize : cast into int
construction : interpretation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this software and its documentation for
any purpose, provided that the above copyright notice and the following
three paragraphs appear in all copies of this software.
IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT
LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.*/
class Input{
private $input;
public function getInput(){
return $this->input['realOne'];
}
public function __construct(){
$this->input = array();
$this->input['test']= 'safe' ;
$this->input['realOne']= $_GET['UserData'] ;
$this->input['trap']= 'safe' ;
}
}
$temp = new Input();
$tainted = $temp->getInput();
$tainted = (int) $tainted ;
$query = "SELECT * FROM student where id=' $tainted '";
$conn = mysql_connect('localhost', 'mysql_user', 'mysql_password'); // Connection to the database (address, user, password)
mysql_select_db('dbname') ;
echo "query : ". $query ."<br /><br />" ;
$res = mysql_query($query); //execution
while($data =mysql_fetch_array($res)){
print_r($data) ;
echo "<br />" ;
}
mysql_close($conn);
?>
|
{
"content_hash": "f84c27679d5874ee467a56a382eba70c",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 123,
"avg_line_length": 23.94871794871795,
"alnum_prop": 0.7125267665952891,
"repo_name": "stivalet/PHP-Vulnerability-test-suite",
"id": "7b1c665b41cc36107f30a047b6759e0db0429fa4",
"size": "1868",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Injection/CWE_89/safe/CWE_89__object-indexArray__CAST-cast_int__select_from_where-interpretation_simple_quote.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "64184004"
}
],
"symlink_target": ""
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module app.tasks</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="app.html"><font color="#ffffff">app</font></a>.tasks</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/plenk/SubSite/app/tasks.pyc">/home/plenk/SubSite/app/tasks.pyc</a></font></td></tr></table>
<p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-make_celery"><strong>make_celery</strong></a>(app)</dt></dl>
</td></tr></table>
</body></html>
|
{
"content_hash": "6d7f7a63a62ae0850caa0933774a3549",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 183,
"avg_line_length": 52.86363636363637,
"alnum_prop": 0.6612209802235598,
"repo_name": "noellekimiko/HMC-Grader",
"id": "9fb89ef05d1a186e24664cf803724731e5391918",
"size": "1164",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Documentation/PyDoc/app.tasks.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "99385"
},
{
"name": "HTML",
"bytes": "679813"
},
{
"name": "Java",
"bytes": "688247"
},
{
"name": "JavaScript",
"bytes": "163008"
},
{
"name": "Makefile",
"bytes": "4561"
},
{
"name": "Perl",
"bytes": "60"
},
{
"name": "Prolog",
"bytes": "23764"
},
{
"name": "Python",
"bytes": "506076"
},
{
"name": "Racket",
"bytes": "42672"
},
{
"name": "Shell",
"bytes": "1029"
}
],
"symlink_target": ""
}
|
namespace SimShift.Dialogs
{
partial class dlGearboxShifterTable
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lGearCount = new System.Windows.Forms.Label();
this.shifterTable = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.shifterTable)).BeginInit();
this.SuspendLayout();
//
// lGearCount
//
this.lGearCount.AutoSize = true;
this.lGearCount.Location = new System.Drawing.Point(12, 9);
this.lGearCount.Name = "lGearCount";
this.lGearCount.Size = new System.Drawing.Size(90, 13);
this.lGearCount.TabIndex = 0;
this.lGearCount.Text = "Number of Gears:";
//
// shifterTable
//
this.shifterTable.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.shifterTable.Location = new System.Drawing.Point(15, 25);
this.shifterTable.Name = "shifterTable";
this.shifterTable.Size = new System.Drawing.Size(851, 252);
this.shifterTable.TabIndex = 1;
//
// dlGearboxShifterTable
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(878, 519);
this.Controls.Add(this.shifterTable);
this.Controls.Add(this.lGearCount);
this.Name = "dlGearboxShifterTable";
this.Text = "dlGearboxShifterTable";
((System.ComponentModel.ISupportInitialize)(this.shifterTable)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lGearCount;
private System.Windows.Forms.DataGridView shifterTable;
private ucGearboxShifterGraph sim;
}
}
|
{
"content_hash": "904e92653305f0094a4a87f714334c66",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 130,
"avg_line_length": 38.67567567567568,
"alnum_prop": 0.589098532494759,
"repo_name": "nlhans/SimShift",
"id": "143d0df60ba4888435b60286474c17f5c6d2c29e",
"size": "2864",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "SimShift/SimShift/Dialogs/dlGearboxShifterTable.Designer.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "618809"
}
],
"symlink_target": ""
}
|
@class SFODataObject;
@implementation SFEnsSubscriptionRequest
@end
|
{
"content_hash": "4c664c9f98838959e4a6766696ea58d6",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 40,
"avg_line_length": 14,
"alnum_prop": 0.8428571428571429,
"repo_name": "citrix/ShareFile-ObjectiveC",
"id": "3e69108fc340d4a032c61aed6ee2f5784ad9a941",
"size": "274",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ShareFileSDK/ShareFileSDK/Generated Code/Models/SFEnsSubscriptionRequest.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "45"
},
{
"name": "Objective-C",
"bytes": "1261492"
}
],
"symlink_target": ""
}
|
using System;
using System.Collections.Generic;
using System.Text;
using DBlog.TransitData;
using DBlog.Data;
using System.Xml;
using System.Configuration;
using System.Web;
using NHibernate;
using NHibernate.Criterion;
using System.Collections;
using DBlog.Tools.Web;
using System.Net;
using System.IO;
using System.Xml.Xsl;
using System.Xml.XPath;
namespace DBlog.TransitData
{
public class ManagedRssFeed : ManagedFeed
{
public ManagedRssFeed(Feed feed)
: base(feed)
{
}
protected override int UpdateFeedItems(ISession session)
{
int result = 0;
if (! string.IsNullOrEmpty(mFeed.Xsl))
{
StringBuilder TransformedString = new StringBuilder();
XslCompiledTransform FeedXsl = new XslCompiledTransform();
FeedXsl.Load(new XmlTextReader(new StringReader(mFeed.Xsl)), null, null);
StringWriter StringWriter = new StringWriter(TransformedString);
XmlTextWriter TextWriter = new XmlTextWriter(StringWriter);
FeedXsl.Transform(new XmlNodeReader(XmlFeed.DocumentElement), TextWriter);
XmlFeed.LoadXml(TransformedString.ToString());
}
XmlNodeList FeedXmlItems = XmlFeed.SelectNodes("descendant::channel/item");
List<FeedItem> updated = new List<FeedItem>();
foreach (XmlNode XmlNodeItem in FeedXmlItems)
{
XmlNode xmlLink = XmlNodeItem.SelectSingleNode("link");
string link = (xmlLink != null) ? xmlLink.InnerText : null;
FeedItem current = null;
if (!string.IsNullOrEmpty(link))
{
for (int i = 0; i < mFeed.FeedItems.Count; i++)
{
FeedItem item = (FeedItem)mFeed.FeedItems[i];
if (item.Link == link)
{
current = item;
updated.Add(item);
mFeed.FeedItems.RemoveAt(i);
break;
}
}
}
if (current == null)
{
result++;
current = new FeedItem();
current.Feed = mFeed;
current.Link = link;
}
XmlNode xmlDescription = XmlNodeItem.SelectSingleNode("description");
current.Description = (xmlDescription != null) ? xmlDescription.InnerText : null;
XmlNode xmlTitle = XmlNodeItem.SelectSingleNode("title");
current.Title = (xmlTitle != null) ? xmlTitle.InnerText : null;
session.Save(current);
}
foreach (FeedItem item in mFeed.FeedItems)
{
session.Delete(item);
}
mFeed.FeedItems = updated;
return result;
}
public override void DeleteFeedItems(ISession session)
{
session.Delete(string.Format(
"FeedItem WHERE Feed.Id = {0}", mFeed.Id));
}
}
}
|
{
"content_hash": "f4116d952eaf051476469dec96f03e31",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 97,
"avg_line_length": 33.12871287128713,
"alnum_prop": 0.5125523012552301,
"repo_name": "dblock/dblog",
"id": "f0ff3e67bf82de15309d4e649d7ef3b5d016f67a",
"size": "3346",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "TransitData/ManagedRssFeed.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "106017"
},
{
"name": "C#",
"bytes": "1692264"
},
{
"name": "JavaScript",
"bytes": "1701"
}
],
"symlink_target": ""
}
|
cp -R docs/html/. ../../blog/public/documentation/
|
{
"content_hash": "581944835c1e00604c139d6f80700cb1",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 50,
"avg_line_length": 51,
"alnum_prop": 0.6666666666666666,
"repo_name": "Brotcrunsher/BrotboxEngine",
"id": "acc6ddea9d6c03c0ba3a3d31f2c5c056dd8221f4",
"size": "103",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Third-Party/box2d-master/deploy_docs.sh",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "871"
},
{
"name": "C++",
"bytes": "731417"
},
{
"name": "CMake",
"bytes": "1853"
},
{
"name": "GLSL",
"bytes": "18266"
}
],
"symlink_target": ""
}
|
using System;
using System.Dynamic;
using System.Threading.Tasks;
using System.Windows.Input;
using Facebook;
using Facebook.Client;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using Microsoft.Practices.ServiceLocation;
using WinRTFaceBookTest.Model;
using Windows.UI.Popups;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;
namespace WinRTFaceBookTest.ViewModel
{
/// <summary>
/// This class contains properties that a View can data bind to.
/// <para>
/// See http://www.galasoft.ch/mvvm
/// </para>
/// </summary>
public class HomeViewModel : ViewModelBase
{
public ICommand LoginClickCommand { get; set; }
private FacebookSession session;
private readonly INavigationService navigationService;
/// <summary>
/// Initializes a new instance of the HomeViewModel class.
/// </summary>
public HomeViewModel()
{
InitlizeCommand();
navigationService = ServiceLocator.Current.GetInstance<NavigationService>();
}
private void InitlizeCommand()
{
LoginClickCommand = new RelayCommand(LogingClickCommandHandler);
}
private async void LogingClickCommandHandler()
{
if (!App.IsAuthenticated)
{
App.IsAuthenticated = true;
await Authenticate();
}
}
private async Task Authenticate()
{
string message = String.Empty;
try
{
session = await App.FacebookSessionClient.LoginAsync("user_about_me,read_stream");
App.AccessToken = session.AccessToken;
App.FacebookId = session.FacebookId;
//Frame.Navigate(typeof(LandingPage));
navigationService.Navigate(typeof(LandingPage));
}
catch (InvalidOperationException e)
{
message = "Login failed! Exception details: " + e.Message;
var dialog = new MessageDialog(message);
dialog.ShowAsync();
}
}
}
}
|
{
"content_hash": "016f45334506a9e8a3cfe8de0585caa6",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 98,
"avg_line_length": 27.858974358974358,
"alnum_prop": 0.5996318453750575,
"repo_name": "codeno47/efc",
"id": "26f04d71e6cb076b0331fda31092b36c9363263b",
"size": "2175",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "trunk/dev/samples/EFC.Samples.WinRTApp/WinRTFaceBookTest/ViewModel/HomeViewModel.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "45214"
},
{
"name": "Batchfile",
"bytes": "26328"
},
{
"name": "C",
"bytes": "17793"
},
{
"name": "C#",
"bytes": "1091892"
},
{
"name": "C++",
"bytes": "28426"
},
{
"name": "CSS",
"bytes": "61199"
},
{
"name": "HTML",
"bytes": "9062629"
},
{
"name": "JavaScript",
"bytes": "146974"
},
{
"name": "PHP",
"bytes": "26406"
},
{
"name": "PowerShell",
"bytes": "711"
},
{
"name": "Visual Basic",
"bytes": "48110"
},
{
"name": "XSLT",
"bytes": "521278"
}
],
"symlink_target": ""
}
|
'use strict';
var msx = require('msx'),
through = require('through');
function hasMithrilExtension(file) {
return /\.(js|msx)$/.test(file);
}
function mithrilify(file, opts) {
opts = opts || {};
if (!hasMithrilExtension(file)) {
return through();
}
var data = '';
function write(buf) {
data += buf;
}
function end() {
try {
var src = msx.transform(data, opts.msx_opts);
this.queue(src);
} catch (error) {
this.emit('error', error);
}
this.queue(null);
}
return through(write, end);
}
mithrilify.hasMithrilExtension = hasMithrilExtension;
module.exports = mithrilify;
|
{
"content_hash": "18f0803eca83adb8c57d6c9e8a84a0eb",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 53,
"avg_line_length": 16.075,
"alnum_prop": 0.6065318818040435,
"repo_name": "mkautzmann/mithrilify",
"id": "29b6f70f02184695a8b7a698e00bad64f5d29da0",
"size": "776",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/mithrilify.js",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "5388"
}
],
"symlink_target": ""
}
|
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace HTTPlease.Security.MessageHandlers
{
using Abstractions;
/// <summary>
/// A HTTP message handler that adds authentication to outgoing request messages.
/// </summary>
public sealed class AuthenticationMessageHandler
: DelegatingHandler
{
/// <summary>
/// The authentication provider for outgoing requests.
/// </summary>
readonly IHttpRequestAuthenticationProvider _authenticationProvider;
/// <summary>
/// Create a new <see cref="AuthenticationMessageHandler"/> that uses the specified provider for authentication.
/// </summary>
/// <param name="authenticationProvider">
/// The <see cref="IHttpRequestAuthenticationProvider">authentication provider</see> for outgoing requests.
/// </param>
public AuthenticationMessageHandler(IHttpRequestAuthenticationProvider authenticationProvider)
{
if (authenticationProvider == null)
throw new ArgumentNullException(nameof(authenticationProvider));
_authenticationProvider = authenticationProvider;
}
/// <summary>
/// Dispose of resources being used by the <see cref="AuthenticationMessageHandler"/>.
/// </summary>
/// <param name="disposing">
/// Explicit disposal?
/// </param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
IDisposable providerDisposal = _authenticationProvider as IDisposable;
if (providerDisposal != null)
providerDisposal.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Asynchronously process an HTTP request message and its response.
/// </summary>
/// <param name="request">
/// The outgoing <see cref="HttpRequestMessage"/>.
/// </param>
/// <param name="cancellationToken">
/// A <see cref="CancellationToken"/> that can be used to cancel the asynchronous operation.
/// </param>
/// <returns>
/// The incoming HTTP response message.
/// </returns>
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
if (cancellationToken == null)
throw new ArgumentNullException(nameof(cancellationToken));
await _authenticationProvider.AddAuthenticationAsync(request, cancellationToken);
return await base.SendAsync(request, cancellationToken);
}
}
}
|
{
"content_hash": "59b534f64d1e153fa1c49898606b3821",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 127,
"avg_line_length": 31.64,
"alnum_prop": 0.7256637168141593,
"repo_name": "tintoy/HTTPlease",
"id": "82eebf802118dec2fa4e333fcbe10797e3f7360c",
"size": "2375",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/HTTPlease.Security/MessageHandlers/AuthenticationMessageHandler.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "525983"
},
{
"name": "PowerShell",
"bytes": "2142"
},
{
"name": "Shell",
"bytes": "2234"
}
],
"symlink_target": ""
}
|
<html>
<head>
<title>Angela Voss's panel show appearances</title>
<script type="text/javascript" src="../common.js"></script>
<link rel="stylesheet" media="all" href="../style.css" type="text/css"/>
<script type="text/javascript" src="../people.js"></script>
<!--#include virtual="head.txt" -->
</head>
<body>
<!--#include virtual="nav.txt" -->
<div class="page">
<h1>Angela Voss's panel show appearances</h1>
<p>Angela Voss has appeared in <span class="total">1</span> episodes between 2008-2008. Note that these appearances may be for more than one person if multiple people have the same name.</p>
<div class="performerholder">
<table class="performer">
<tr style="vertical-align:bottom;">
<td><div style="height:100px;" class="performances female" title="1"></div><span class="year">2008</span></td>
</tr>
</table>
</div>
<ol class="episodes">
<li><strong>2008-06-19</strong> / <a href="../shows/iot.html">In Our Time</a></li>
</ol>
</div>
</body>
</html>
|
{
"content_hash": "ff10f196339054137fcf603f2fd645f9",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 191,
"avg_line_length": 32.833333333333336,
"alnum_prop": 0.6649746192893401,
"repo_name": "slowe/panelshows",
"id": "4ca3b5362a5183267da1b1d8b9d8950731d7c01a",
"size": "985",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "people/tenxd3el.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "8431"
},
{
"name": "HTML",
"bytes": "25483901"
},
{
"name": "JavaScript",
"bytes": "95028"
},
{
"name": "Perl",
"bytes": "19899"
}
],
"symlink_target": ""
}
|
<?php namespace Congredi\NotificationSystem\Exceptions;
class InvalidNotificationTypeException extends GenericException
{
}
|
{
"content_hash": "3a6e6cb8b2f5d2e87d1569b31e302b18",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 63,
"avg_line_length": 18,
"alnum_prop": 0.8571428571428571,
"repo_name": "andreikun/congredi-notification-system",
"id": "89bdf98fac1d9d82e95ce8381b19ab5dadc1c223",
"size": "126",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Exceptions/InvalidNotificationTypeException.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "39815"
}
],
"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_144) on Wed Jan 24 19:09:05 CST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ArgPosition (Core API 1.1.1 API)</title>
<meta name="date" content="2018-01-24">
<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="ArgPosition (Core API 1.1.1 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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="class-use/ArgPosition.html">Use</a></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 class="aboutLanguage"><a href="http://dev.cyc.com/api/core" target="_top">Cyc Core API<a></div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../com/cyc/kb/ArgUpdate.html" title="interface in com.cyc.kb"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/cyc/kb/ArgPosition.html" target="_top">Frames</a></li>
<li><a href="ArgPosition.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">com.cyc.kb</div>
<h2 title="Interface ArgPosition" class="title">Interface ArgPosition</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">ArgPosition</span></pre>
</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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#deepCopy--">deepCopy</a></span>()</code> </td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#depth--">depth</a></span>()</code>
<div class="block">Get the nesting depth of this arg position.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#extend-com.cyc.kb.ArgPosition-">extend</a></span>(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> otherArgPos)</code>
<div class="block">Destructively extend this arg position by another arg position.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#extend-java.lang.Integer-">extend</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> argnum)</code>
<div class="block">Destructively extend this arg position by one argnum.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#first--">first</a></span>()</code>
<div class="block">Get the first element in this arg position's path.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#getPath--">getPath</a></span>()</code>
<div class="block">Get the list of argnums for this arg position, from top level to deepest level.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#isPrefixOf-com.cyc.kb.ArgPosition-">isPrefixOf</a></span>(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> otherArgPositionI)</code>
<div class="block">Check if this arg position is for an ancestor of another arg position.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#last--">last</a></span>()</code>
<div class="block">Get the argnum of the designated argument in its immediate context.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#matchingArgPosition-com.cyc.kb.ArgPosition-boolean-">matchingArgPosition</a></span>(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> candidate,
boolean matchEmpty)</code>
<div class="block">Does this arg position match candidate?</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#stringApiValue--">stringApiValue</a></span>()</code> </td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/cyc/kb/ArgPosition.html#toParent--">toParent</a></span>()</code>
<div class="block">Destructively modify this ArgPosition to be its parent arg position.</div>
</td>
</tr>
</table>
</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="deepCopy--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deepCopy</h4>
<pre><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> deepCopy()</pre>
</li>
</ul>
<a name="depth--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>depth</h4>
<pre>int depth()</pre>
<div class="block">Get the nesting depth of this arg position. Top-level argument positions have depth 1.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the nesting depth of this arg position</dd>
</dl>
</li>
</ul>
<a name="extend-com.cyc.kb.ArgPosition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>extend</h4>
<pre><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> extend(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> otherArgPos)</pre>
<div class="block">Destructively extend this arg position by another arg position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ArgPosition.</dd>
</dl>
</li>
</ul>
<a name="extend-java.lang.Integer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>extend</h4>
<pre><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> extend(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> argnum)</pre>
<div class="block">Destructively extend this arg position by one argnum.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ArgPosition.</dd>
</dl>
</li>
</ul>
<a name="first--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>first</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> first()</pre>
<div class="block">Get the first element in this arg position's path. This is the argument number of the argument
of the top-level formula that contains this position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the argument number.</dd>
</dl>
</li>
</ul>
<a name="getPath--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPath</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> getPath()</pre>
<div class="block">Get the list of argnums for this arg position, from top level to deepest level.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the list of argnums for this arg position,</dd>
</dl>
</li>
</ul>
<a name="isPrefixOf-com.cyc.kb.ArgPosition-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isPrefixOf</h4>
<pre>boolean isPrefixOf(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> otherArgPositionI)</pre>
<div class="block">Check if this arg position is for an ancestor of another arg position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true iff his arg position is for an ancestor of otherArgPosition</dd>
</dl>
</li>
</ul>
<a name="last--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>last</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a> last()</pre>
<div class="block">Get the argnum of the designated argument in its immediate context.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the argnum of the designated argument</dd>
</dl>
</li>
</ul>
<a name="matchingArgPosition-com.cyc.kb.ArgPosition-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>matchingArgPosition</h4>
<pre>boolean matchingArgPosition(<a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> candidate,
boolean matchEmpty)</pre>
<div class="block">Does this arg position match candidate?</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>matchEmpty</code> - Should we match the null arg position?</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true iff this arg position matches candidate</dd>
</dl>
</li>
</ul>
<a name="toParent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toParent</h4>
<pre><a href="../../../com/cyc/kb/ArgPosition.html" title="interface in com.cyc.kb">ArgPosition</a> toParent()</pre>
<div class="block">Destructively modify this ArgPosition to be its parent arg position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this ArgPosition.</dd>
</dl>
</li>
</ul>
<a name="stringApiValue--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>stringApiValue</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> stringApiValue()</pre>
</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="class-use/ArgPosition.html">Use</a></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 class="aboutLanguage"><a href="http://dev.cyc.com/api/core" target="_top">Cyc Core API<a></div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../com/cyc/kb/ArgUpdate.html" title="interface in com.cyc.kb"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?com/cyc/kb/ArgPosition.html" target="_top">Frames</a></li>
<li><a href="ArgPosition.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 ======= -->
<p class="legalCopy"><small>Copyright © 2015–2018 <a href="http://www.cyc.com">Cycorp, Inc</a>. All rights reserved.</small></p>
</body>
</html>
|
{
"content_hash": "74c67d66bd7f6a6cd2014cb752374f4c",
"timestamp": "",
"source": "github",
"line_count": 423,
"max_line_length": 391,
"avg_line_length": 41.11583924349882,
"alnum_prop": 0.6577736890524379,
"repo_name": "cycorp/cycorp.github.io",
"id": "a6927153bd9758ed8925e147f948e6308667fff5",
"size": "17392",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "api/core/apidocs/com/cyc/kb/ArgPosition.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "47394"
},
{
"name": "HTML",
"bytes": "35513494"
},
{
"name": "XSLT",
"bytes": "7812"
}
],
"symlink_target": ""
}
|
.. _gallery:
Gallery
========
Here are a few projects using MoviePy. The gallery will fill up as more people start using MoviePy (which is currently one year old). If you have a nice project using MoviePy let us know!
Videos edited with Moviepy
---------------------------
The Cup Song Covers Mix
~~~~~~~~~~~~~~~~~~~~~~~~
This mix of 60 covers of the Cup Song demonstrates the non-linear video editing capabilities of MoviePy. Here is `the (undocumented) MoviePy code <https://nbviewer.ipython.org/github/Zulko/--video-editing---Cup-Song-Covers-Mix/blob/master/CupSongsCovers.ipynb>`_ that generated the video.
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;
margin-left: 5%;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/rIehsqqYFEM" frameborder="0" allowfullscreen></iframe>
</div>
The (old) MoviePy reel video.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Made when MoviePy was a few weeks old and not as good as now. The code for most scenes can be found
in the :ref:`examples`.
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/zGhoZ4UBxEQ" frameborder="0" allowfullscreen>
</iframe>
</div>
Animations edited with MoviePy
------------------------------
GIFs made from videos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This `gifs tutorial
<https://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/>`_ gives you the basics to make gifs from video files (cutting, croping, adding text...). The last example shows how to remove a (still) background to keep only the animated part of a video.
.. raw:: html
<a href="https://imgur.com/Fo2BxBK"><img src="https://i.imgur.com/Fo2BxBK.gif" title="Hosted by imgur.com"
style="max-width:50%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>
Vector Animations
~~~~~~~~~~~~~~~~~~~
This `vector animations tutorial <https://zulko.github.io/blog/2014/09/20/vector-animations-with-python/>`_ shows how to combine MoviePy with Gizeh to create animations:
.. raw:: html
<a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/2YdW9yf.gif"
style="max-width:50%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>
It is also possible to combine MoviePy with other graphic librairies like matplotlib, etc.
3D animations
~~~~~~~~~~~~~~~~~~~
This `3d animation tutorial <https://zulko.github.io/blog/2014/11/13/things-you-can-do-with-python-and-pov-ray/>`_ shows how to combine MoviePy with Vapory, a library to render 3D scenes using the free ray-tracer POV-Ray
.. raw:: html
<a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/XN7e2IP.gif"
style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>
With Vapory and MoviePy you can for instance embed a movie in a 3D scene:
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
<iframe type="text/html" src="https://youtube.com/embed/M9R21SquDSk?rel=0" frameborder="0"
style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
</iframe>
</div>
Or render the result of this physics simulation made with PyODE (`script <https://gist.github.com/Zulko/f828b38421dfbee59daf>`_):
.. raw:: html
<a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/TdhxwGz.gif"
style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>
Or use `this script <https://gist.github.com/Zulko/b910c8b22e8e1c01fae6>`_ to make piano animations from MIDI files (which are some sort of electronic sheet music):
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
<iframe type="text/html" src="https://youtube.com/embed/tCqQhmuwgMg?rel=0" frameborder="0"
style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
</iframe>
</div>
Data animations
----------------
This `data animation tutorial <https://zulko.github.io/blog/2014/11/13/things-you-can-do-with-python-and-pov-ray/>`_ shows how to use MoviePy to animate the different Python vizualization libraries: Mayavi, Vispy, Scikit-image, Matplotlib, etc.
Scientific or technological projects
-------------------------------------
Piano rolls transcription to sheet music
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This `transcribing piano rolls blog post <https://zulko.github.io/blog/2014/02/12/transcribing-piano-rolls/>`_ explains how to transform a video of a piano roll performance into playable sheet music. MoviePy is used for the frame-by-frame analysis of the piano roll video. The last video is also edited with MoviePy:
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/V2XCJNZjm4w" frameborder="0" allowfullscreen>
</iframe>
</div>
Misc. Programs and Scripts using MoviePy
------------------------------------------
Kapwing
----------
`Kapwing <https://www.kapwing.com/>`_ is an online video meme generator. Content creators use Kapwing to add text around their videos, which results in higher engagement / views on social media sites like Facebook. Kapwing's creation process is powered by MoviePy! MoviePy is used to add the text, borders, and attribution directly to the uploaded videos.
.. raw:: html
<video src="https://cdn.kapwing.com/video_5e681ac49187d40016ee123e_579130.mp4?" controls style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;"></video>
Rinconcam
----------
`Rincomcam <http://www.rinconcam.com/month/2014-03>`_ is a camera which films surfers on the Californian beach of Point Rincon. At the end of each day it cuts together a video, puts it online, and tweets it. Everything is entirely automatized with Python.
MoviePy is used to add transitions, titles and music to the videos.
.. raw:: html
<a href="https://imgur.com/2YdW9yf"><img src="https://pbs.twimg.com/media/B2_NlnwCMAAingW.jpg"
style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>
Videogrep
----------
Videogrep is a python script written by Sam Lavigne, that goes through the subtitle tracks of movies and makes supercuts based on what it finds. For instance, here is an automatic supercut of every time the White House press secretary tells us what he can tell us:
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
<iframe width="560" height="315" src="https://www.youtube.com/embed/D7pymdCU5NQ" frameborder="0" allowfullscreen>
</iframe>
</div>
Here are `Videogrep's introductory blog post
<http://lav.io/2014/06/videogrep-automatic-supercuts-with-python/>`_ and the Github `Videogrep page <https://github.com/antiboredom/videogrep/>`_.
If you liked it, also have a look at these Videogrep-inspired projects:
This `Videogrep blog post <https://zulko.github.io/blog/2014/06/21/some-more-videogreping-with-python/>`_ attempts to cut a video precisely at the beginning and end of sentences or words: ::
words = ["Americans", "must", "develop", "open ", "source",
" software", "for the", " rest ", "of the world",
"instead of", " soldiers"]
numbers = [3,0,4,3,4,0,1,2,0,1,0] # take clip number 'n'
cuts = [find_word(word)[n] for (word,n) in zip(words, numbers)]
assemble_cuts(cuts, "fake_speech.mp4")
.. raw:: html
<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
<iframe type="text/html" src="https://youtube.com/embed/iWRYGULFd_c?rel=0" frameborder="0"
style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
</iframe>
</div>
This `other post <https://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/>`_ uses MoviePy to automatically cut together `all the highlights of a soccer game <http://youtu.be/zJtWPFX2bA0>`_, based on the fact that the crowd cheers louder when something interesting happens. All in under 30 lines of Python:
|
{
"content_hash": "4b0b7a9e9b08087d7a2d845eafeca4a5",
"timestamp": "",
"source": "github",
"line_count": 197,
"max_line_length": 355,
"avg_line_length": 46.025380710659896,
"alnum_prop": 0.6772912760560273,
"repo_name": "kerstin/moviepy",
"id": "53473705c5f261dd870f4a778f2299b0617330e4",
"size": "9067",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/gallery.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "265264"
}
],
"symlink_target": ""
}
|
<p>This access drivers use php imap functions to browse a mailbox and retrieve the emails and attachments contained in it. Warning, the php_imap extension must be installed and loaded. And for your info, it's not because it's "imap" that i's limited to imap mailbox, POP3 is also supported.</p>
<p>Here are some test samples for connecting well-known mailboxes :
<ul>
<li>Yahoo IMAP :
<ul>
<li>Host : imap.mail.yahoo.com</li>
<li>Port : 993</li>
<li>Ssl : true</li>
<li>Type : imap</li>
</ul>
</li>
<li>Hotmail via POP3 :
<ul>
<li>Host : pop3.live.com</li>
<li>Port : 995</li>
<li>Ssl : true</li>
<li>Type : pop3</li>
</ul>
</li>
<li>Gmail via Imap :
<ul>
<li>Host : imap.gmail.com</li>
<li>Port : 993</li>
<li>Ssl : true</li>
<li>Type : imap</li>
</ul>
</li>
</ul>
These are only some examples, you have to check your mail provider to get the right configuration.
</p>
|
{
"content_hash": "ad872308d087c5f8e9ae6b17ee9a7334",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 294,
"avg_line_length": 40.733333333333334,
"alnum_prop": 0.48527004909983634,
"repo_name": "Tlapi/Noodle",
"id": "f1d27f5b21a807e51e05a3610635e315ddbf5cf9",
"size": "1222",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "public/ajaxplorer/plugins/access.imap/plugin_doc.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "JavaScript",
"bytes": "1981261"
},
{
"name": "PHP",
"bytes": "5086651"
},
{
"name": "Perl",
"bytes": "3966"
}
],
"symlink_target": ""
}
|
<?xml version="1.0" encoding="UTF-8"?>
<result>H<out>e</out>re's some text. The content doesn't matter, as it is
only used for testing purposes. We have miserable weather
today. Michael's ficus doesn't look too well, I don't
think it likes standing on top of the radiator in winter.
If I need more text, I'll come up with more useless nonsense.
</result>
|
{
"content_hash": "abd192bae4ecf1dd7de3165cf1164af6",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 84,
"avg_line_length": 48.5,
"alnum_prop": 0.7422680412371134,
"repo_name": "apache/uima-addons",
"id": "d176f182cd1bab9aaec7e86f2da639155e62dc05",
"size": "388",
"binary": false,
"copies": "3",
"ref": "refs/heads/trunk",
"path": "SimpleServer/src/test/resources/expected/inline03.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "1055"
},
{
"name": "HTML",
"bytes": "50061"
},
{
"name": "Java",
"bytes": "3229349"
},
{
"name": "JavaScript",
"bytes": "4196"
}
],
"symlink_target": ""
}
|
title: Der Herr des Herzens und des Verhaltens
date: 04/08/2021
---
#### imBlick
Für wahre Authentizität müssen unser Herz und unser Verhalten miteinander verbunden werden. Das Herz sollte das Verhalten des geistlichen Lebens bestimmen und nähren. Ungeachtet aller menschlicher Erfindungen, die im Laufe der Jahrhunderte getätigt wurden, ist dies etwas, das keine noch so große Errungenschaft leisten kann.
Paulus schreibt, dass wahre Authentizität und Heiligkeit nur durch Gottes Kraft übereinstimmen können. „Daher kennen wir von nun an niemand nach dem Fleisch; wenn wir Christus auch nach dem Fleisch gekannt haben, so kennen wir ihn doch jetzt nicht mehr so. Daher, wenn jemand in Christus ist, so ist er eine neue Schöpfung; das Alte ist vergangen, siehe, Neues ist geworden. Alles aber von Gott, der uns mit sich selbst versöhnt hat durch Christus und uns den Dienst der Versöhnung gegeben hat, nämlich, dass Gott in Christus war und die Welt mit sich selbst versöhnte, ihnen ihre Übertretungen nicht zurechnete und in uns das Wort von der Versöhnung gelegt hat.“ (2. Korinther 5,16-19)
Die Schlussfolgerung von Paulus lautet: „So sind wir nun Gesandte an Christi statt, indem Gott gleichsam durch uns ermahnt; wir bitten für Christus: Lasst euch versöhnen mit Gott!“ (V. 20). Da Christus gestorben und in unseren Herzen auferstanden ist, sollen wir Christen nun als Botschafter für Christus nach außen hin leben, um ihn darzustellen.
Nimm dir etwas Zeit, um darüber nachzudenken, wie wir in den folgenden Bereichen Botschafter für den Herrn Jesus Christus sind. Sind die unten aufgeführten Themen in unserem Herzen mit Gott verbunden? Wie zeigen sie sich in unserem Verhalten? In welchem Bereich brauchst du eine Neuschöpfung und Gottes Kraft?
- Zeitmanagement/Sabbat halten
- Ehrfurcht/Anbetung
- Finanzen/Zehnter
- Gesundheit/Ernährung
- Körperertüchtigung/Entspannung
- Bescheidenheit/Kleidung
- Medien/Internet
- Beziehungen/Familie
- Ehe/Sexualität
`Anmerkungen`
|
{
"content_hash": "29863a2051cfa967627502d7e7f720cf",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 686,
"avg_line_length": 79.4,
"alnum_prop": 0.8075566750629722,
"repo_name": "Adventech/sabbath-school-lessons",
"id": "980f82babc572056cb79e0a2adf7d55fdaa7b4a4",
"size": "2025",
"binary": false,
"copies": "2",
"ref": "refs/heads/stage",
"path": "src/de/2021-03-cq/06/05.md",
"mode": "33261",
"license": "mit",
"language": [],
"symlink_target": ""
}
|
DEFINE_string(open_browser, "", "URL");
DEFINE_string(spawn_process, "", "path");
int main(int argc, char **argv) {
InitGoogle(argv[0], &argc, &argv, false);
if (!FLAGS_open_browser.empty()) {
if (!mozc::Process::OpenBrowser(FLAGS_open_browser)) {
LOG(INFO) << "Failed to open: " << FLAGS_open_browser;
}
}
if (!FLAGS_spawn_process.empty()) {
if (!mozc::Process::SpawnProcess(FLAGS_spawn_process, "")) {
LOG(INFO) << "Failed to spawn: " << FLAGS_spawn_process;
}
}
return 0;
}
|
{
"content_hash": "f3d6709c7e84f52075b036612770f7ed",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 64,
"avg_line_length": 30.470588235294116,
"alnum_prop": 0.6023166023166023,
"repo_name": "takahashikenichi/mozc",
"id": "2b80465204e322fb56182b69de9e7e86d856d3cb",
"size": "2177",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/base/process_main.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "200335"
},
{
"name": "C++",
"bytes": "10808666"
},
{
"name": "CSS",
"bytes": "26088"
},
{
"name": "Emacs Lisp",
"bytes": "80074"
},
{
"name": "HTML",
"bytes": "266980"
},
{
"name": "Java",
"bytes": "2751856"
},
{
"name": "JavaScript",
"bytes": "919906"
},
{
"name": "Makefile",
"bytes": "3754"
},
{
"name": "Objective-C",
"bytes": "34833"
},
{
"name": "Objective-C++",
"bytes": "227200"
},
{
"name": "Protocol Buffer",
"bytes": "112300"
},
{
"name": "Python",
"bytes": "1056960"
},
{
"name": "QMake",
"bytes": "861"
},
{
"name": "Shell",
"bytes": "9928"
},
{
"name": "Yacc",
"bytes": "2104"
}
],
"symlink_target": ""
}
|
package org.eclipse.collections.impl.block.predicate;
import org.eclipse.collections.impl.tuple.Tuples;
import org.junit.Assert;
import org.junit.Test;
public class PairPredicateTest
{
@Test
public void accept()
{
PairPredicate<String, Integer> pairPredicate = new PairPredicate<String, Integer>()
{
@Override
public boolean accept(String argument1, Integer argument2)
{
return String.valueOf(argument2).equals(argument1);
}
};
Assert.assertTrue(pairPredicate.accept(Tuples.pair("1", 1)));
Assert.assertFalse(pairPredicate.accept(Tuples.pair("2", 1)));
}
@Test
public void negate()
{
PairPredicate<String, String> pairPredicate = new PairPredicate<String, String>()
{
@Override
public boolean accept(String argument1, String argument2)
{
return argument2.equals(argument1);
}
};
PairPredicate<String, String> negatedPredicate = pairPredicate.negate();
Assert.assertFalse(negatedPredicate.accept(Tuples.pair("1", new String("1"))));
Assert.assertFalse(negatedPredicate.accept("1", new String("1")));
Assert.assertTrue(negatedPredicate.accept(Tuples.pair("2", "1")));
Assert.assertTrue(negatedPredicate.accept("2", "1"));
}
}
|
{
"content_hash": "e7274284bded72f8a2f0d2325c353779",
"timestamp": "",
"source": "github",
"line_count": 45,
"max_line_length": 91,
"avg_line_length": 31,
"alnum_prop": 0.6243727598566309,
"repo_name": "bhav0904/eclipse-collections",
"id": "7eefbc2e831adc15ae1bcfef8c360e3d614a813a",
"size": "1855",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "unit-tests/src/test/java/org/eclipse/collections/impl/block/predicate/PairPredicateTest.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "14227"
},
{
"name": "Java",
"bytes": "13221126"
},
{
"name": "Scala",
"bytes": "154482"
},
{
"name": "Shell",
"bytes": "1062"
}
],
"symlink_target": ""
}
|
define([], function () {
return {
WeeksOnLabel: "vecka på",
PaternLabel: "Schema",
OcurrencesLabel: "Tillfällen",
dateRangeLabel: "Datumintervall",
weekEndDay: "Helgdag",
weekDayLabel: "Arbetsdag",
lastLabel: "sista",
fourthLabel: "fjärde",
thirdLabel: "tredje",
secondLabel: "andra",
firstLabel: "första",
theLabel: "",
MonthsLabel: "månad(er)",
ofEveryLabel: "för varje ",
AllowedValues1to12Label: "Tillåtna värder 1 till 12",
noEndDate: "inget slutdatum",
everyweekdays: "alla arbetsdagar",
days: "dag",
every: "var",
EndByLabel: "slutar den",
EndAfterLabel: "slutar efter",
HttpErrorMessage: "Fel vid inläsning av kalenderhändelser:",
CategoryPlaceHolder: "Välj en kategori",
CategoryLabel: "Kategori",
EnDateValidationMessage: "startdatum är senare än slutdatum",
SartDateValidationMessage: "startdatum är senare än slutdatum",
eventSelectDatesLabel: "Visa endast händelser mellan följande datum",
ConfirmeDeleteMessage: "Bekräfta borttag av händelse ? Om händelsen är en återkommande händelse kommer alla tillfällen att raderas ",
DialogConfirmDeleteTitle: "Ta bort händelse",
SpinnerDeletingLabel: "Tar bort...",
DialogCloseButtonLabel: "Avbryt",
DialogConfirmDeleteLabel: "Ta bort",
SaveButtonLabel: "Spara",
DeleteButtonLabel: "Ta bort",
CancelButtonLabel: "Avbryt",
LoadingEventsLabel: "Laddar händelser...",
WebPartConfigButtonLabel: "Inställningar",
WebpartConfigDescription: "Ställ in kalender lista ",
WebpartConfigIconText: "Ställ in Kalenderwebbdelen",
EventOwnerLabel: "ägare",
InvalidDateFormat: "Ogiltigt datumformat.",
IsRequired: "Fältet är obligatoriskt.",
CloseDate: "Stäng datumväljaren",
NextYear: "Gå till nästa år",
PrevYear: "Gå till föregående år",
NextMonth: "Gå till nästa månad",
PrevMonth: "Gå till föregående månad",
GoToDay: "Gå till idag",
ShortDay_Saunday: "S",
ShortDay_Friday: "F",
ShortDay_Tursday: "To",
ShortDay_W: "O",
ShortDay_T: "Ti",
ShortDay_M: "M",
ShortDay_S: "L",
Saturday: "Lördag",
Friday: "Fredag",
Thursday: "Torsdag",
Wednesday: "Onsdag",
Tuesday: "Tisdag",
Monday: "Måndag",
Sunday: "Söndag",
Jan:"Jan",
Feb:"Feb",
Mar:"Mar",
Apr:"Apr",
May:"Maj",
Jun:"Jun",
Jul:"Jul",
Aug:"Aug",
Sep:"Sep",
Oct:"Okt",
Nov:"Nov",
Dez:"Dec",
December: "December",
November: "November",
October: "Oktober",
September: "September",
August: "Augusti",
July: "Juli",
June: "Juni",
May: "Maj",
April: "April",
March: "Mars",
February: "Februari",
January: "Januari",
LocationLabel: "Platssökning och Karta",
LocationTextLabel: "Plats",
AttendeesLabel: "Deltagare",
EndMinLabel: "Min",
EndHourLabel: "Timme",
EndDateLabel: "Slutdatum",
EndDatePlaceHolder: "Välj ett datum...",
StartMinLabel: "Min",
StartHourLabel: "Timme",
StartDateLabel: "Startdatum",
StartDatePlaceHolder: "Välj ett datum...",
EventTitleErrorMessage: "Titel på händelsen är obligatoriskt.",
EventTitleLabel: "Titel",
EventPanelTitle: "Redigera/Lägg till händelse",
PropertyPaneDescription: "Kalender",
BasicGroupName: "Egenskaper",
SiteUrlFieldLabel: "Site Url",
ListFieldLabel: "Kalenderlista",
weekLabel: "Vecka",
dayLable: "Dag",
agenda: "Agenda",
monthLabel: "Månad",
todayLabel: "Idag",
previousLabel: "Föregående",
nextLabel: "Nästa",
showMore: "mer",
recurrenceEventLabel: "Återkommande händelse",
editRecurrenceSeries: "Redigera serie",
ifRecurrenceLabel: "Återkommande ?",
onLabel: "På",
offLabel: "Av",
eventDescriptionLabel: "Beskrivning",
recurrenceInformationLabel: "Intervall",
dailyLabel: "Dagligen",
weeklyLabel: "Veckovis",
monthlyLabel: "Månatligen",
yearlyLabel: "Årligen",
patternLabel: "Schema",
dateRangeLabel: "Datumintervall",
occurrencesLabel: "tillfällen",
ofMonthLabel: "i",
everyFormat: "Varje ",
everySecondFormat: "Varannan ",
everyNthFormat: "Var {0}:e ",
onTheDayFormat: "den {0}:e dagen",
onTheLabel: "på den",
theSuffix: "en",
theNthOfMonthFormat: "den {1} {0}",
onTheDayTypeFormat: "på den {0} {1}{2}"
}
});
|
{
"content_hash": "0ac3b1f9b9816b4f71054dd8ac61b3b8",
"timestamp": "",
"source": "github",
"line_count": 140,
"max_line_length": 139,
"avg_line_length": 34.33571428571429,
"alnum_prop": 0.5993343041397962,
"repo_name": "rgarita/sp-dev-fx-webparts",
"id": "a005be723a7b04225ffbbc4704a43b9f3c5861bb",
"size": "4880",
"binary": false,
"copies": "2",
"ref": "refs/heads/dev",
"path": "samples/react-calendar/src/webparts/calendar/loc/sv-se.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "14320"
},
{
"name": "JavaScript",
"bytes": "11377"
},
{
"name": "TypeScript",
"bytes": "48118"
}
],
"symlink_target": ""
}
|
using System;
namespace MoodPicker.ApiHelper
{
public class ApiException : Exception
{
private int error;
public int Error { get { return error; } }
public ApiException(string message, int error) : base(error + ": " + message)
{
this.error = error;
}
public ApiException() { }
public ApiException(string message) : base(message) { }
public ApiException(string message, Exception inner) : base(message, inner) { }
protected ApiException(
System.Runtime.Serialization.SerializationInfo info,
System.Runtime.Serialization.StreamingContext context)
: base(info, context) { }
}
}
|
{
"content_hash": "09916d8d1ab2535e81f073cad745fb09",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 87,
"avg_line_length": 28.52,
"alnum_prop": 0.6115007012622721,
"repo_name": "nicolabricot/MoodPicker-Windows",
"id": "0ffeb14037b86a184987e11b61f6fb07394fcd83",
"size": "715",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "MoodPicker/ApiHelper/ApiException.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "43218"
}
],
"symlink_target": ""
}
|
import asyncio
import copy
import getpass
import logging
import random
import threading
import time
import uuid
from typing import Collection
from typing import Dict
from typing import List
from typing import Mapping
from typing import Optional
from typing import Tuple
import a_sync
import service_configuration_lib
from pymesos import MesosSchedulerDriver
from pymesos.interface import Scheduler
from paasta_tools import bounce_lib
from paasta_tools import drain_lib
from paasta_tools import mesos_tools
from paasta_tools.frameworks.constraints import check_offer_constraints
from paasta_tools.frameworks.constraints import ConstraintState
from paasta_tools.frameworks.constraints import update_constraint_state
from paasta_tools.frameworks.native_service_config import load_paasta_native_job_config
from paasta_tools.frameworks.native_service_config import NativeServiceConfig
from paasta_tools.frameworks.native_service_config import NativeServiceConfigDict
from paasta_tools.frameworks.native_service_config import TaskInfo
from paasta_tools.frameworks.task_store import MesosTaskParameters
from paasta_tools.frameworks.task_store import TaskStore
from paasta_tools.frameworks.task_store import ZKTaskStore
from paasta_tools.utils import _log
from paasta_tools.utils import DEFAULT_LOGLEVEL
from paasta_tools.utils import DEFAULT_SOA_DIR
from paasta_tools.utils import get_services_for_cluster
from paasta_tools.utils import SystemPaastaConfig
log = logging.getLogger(__name__)
MESOS_TASK_SPACER = "."
# Bring these into local scope for shorter lines of code.
TASK_STAGING = "TASK_STAGING"
TASK_STARTING = "TASK_STARTING"
TASK_RUNNING = "TASK_RUNNING"
TASK_KILLING = "TASK_KILLING"
TASK_FINISHED = "TASK_FINISHED"
TASK_FAILED = "TASK_FAILED"
TASK_KILLED = "TASK_KILLED"
TASK_LOST = "TASK_LOST"
TASK_ERROR = "TASK_ERROR"
LIVE_TASK_STATES = (TASK_STAGING, TASK_STARTING, TASK_RUNNING)
class ConstraintFailAllTasksError(Exception):
pass
class NativeScheduler(Scheduler):
task_store: TaskStore
def __init__(
self,
service_name: str,
instance_name: str,
cluster: str,
system_paasta_config: SystemPaastaConfig,
staging_timeout: float,
soa_dir: str = DEFAULT_SOA_DIR,
service_config: Optional[NativeServiceConfig] = None,
reconcile_backoff: float = 30,
instance_type: str = "paasta_native",
service_config_overrides: Optional[NativeServiceConfigDict] = None,
reconcile_start_time: float = float("inf"),
task_store_type=ZKTaskStore,
) -> None:
self.service_name = service_name
self.instance_name = instance_name
self.instance_type = instance_type
self.cluster = cluster
self.system_paasta_config = system_paasta_config
self.soa_dir = soa_dir
# This will be initialized in registered().
self.task_store = None
self.task_store_type = task_store_type
self.service_config_overrides = service_config_overrides or {}
self.constraint_state: ConstraintState = {}
self.constraint_state_lock = threading.Lock()
self.frozen = False
# don't accept resources until we reconcile.
self.reconcile_start_time = reconcile_start_time
# wait this long after starting a reconcile before accepting offers.
self.reconcile_backoff = reconcile_backoff
# wait this long for a task to launch.
self.staging_timeout = staging_timeout
# Gets set when registered() is called
self.framework_id = None
# agent_id -> unix timestamp of when we blacklisted it
self.blacklisted_slaves: Dict[str, float] = {}
self.blacklist_timeout = 3600
if service_config is not None:
self.service_config = service_config
self.service_config.config_dict.update( # type: ignore
self.service_config_overrides
)
self.recreate_drain_method()
self.reload_constraints()
self.validate_config()
else:
self.load_config()
def log(self, line, level=DEFAULT_LOGLEVEL):
_log(
service=self.service_name,
instance=self.instance_name,
component="deploy",
line=line,
level=level,
)
def shutdown(self, driver: MesosSchedulerDriver):
# TODO: this is naive, as it does nothing to stop on-going calls
# to statusUpdate or resourceOffers.
self.log(
"Freezing the scheduler. Further status updates and resource offers are ignored."
)
self.frozen = True
self.log("Killing any remaining live tasks.")
for task, parameters in self.task_store.get_all_tasks().items():
if parameters.mesos_task_state in LIVE_TASK_STATES:
self.kill_task(driver, task)
self.task_store.close()
def registered(self, driver: MesosSchedulerDriver, frameworkId, masterInfo):
self.framework_id = frameworkId["value"]
self.log("Registered with framework ID %s" % frameworkId["value"])
self.task_store = self.task_store_type(
service_name=self.service_name,
instance_name=self.instance_name,
framework_id=self.framework_id,
system_paasta_config=self.system_paasta_config,
)
self.reconcile_start_time = time.time()
driver.reconcileTasks([])
def reregistered(self, driver: MesosSchedulerDriver, masterInfo):
self.registered(driver, {"value": driver.framework_id}, masterInfo)
def resourceOffers(self, driver: MesosSchedulerDriver, offers):
if self.frozen:
return
if self.within_reconcile_backoff():
self.log(
"Declining all offers since we started reconciliation too recently"
)
for offer in offers:
driver.declineOffer(offer.id)
else:
for idx, offer in enumerate(offers):
if offer.agent_id.value in self.blacklisted_slaves:
log.critical(
"Ignoring offer %s from blacklisted slave %s"
% (offer.id.value, offer.agent_id.value)
)
filters = {"refuse_seconds": self.blacklist_timeout}
driver.declineOffer(offer.id, filters)
del offers[idx]
self.launch_tasks_for_offers(driver, offers)
def launch_tasks_for_offers(
self, driver: MesosSchedulerDriver, offers
) -> List[TaskInfo]:
"""For each offer tries to launch all tasks that can fit in there.
Declines offer if no fitting tasks found."""
launched_tasks: List[TaskInfo] = []
for offer in offers:
with self.constraint_state_lock:
try:
tasks, new_state = self.tasks_and_state_for_offer(
driver, offer, self.constraint_state
)
if tasks is not None and len(tasks) > 0:
driver.launchTasks([offer.id], tasks)
for task in tasks:
self.task_store.add_task_if_doesnt_exist(
task["task_id"]["value"],
health=None,
mesos_task_state=TASK_STAGING,
offer=offer,
resources=task["resources"],
)
launched_tasks.extend(tasks)
self.constraint_state = new_state
else:
driver.declineOffer(offer.id)
except ConstraintFailAllTasksError:
self.log("Offer failed constraints for every task, rejecting 60s")
filters = {"refuse_seconds": 60}
driver.declineOffer(offer.id, filters)
return launched_tasks
def task_fits(self, offer):
"""Checks whether the offer is big enough to fit the tasks"""
needed_resources = {
"cpus": self.service_config.get_cpus(),
"mem": self.service_config.get_mem(),
"disk": self.service_config.get_disk(),
}
for resource in offer.resources:
try:
if resource.scalar.value < needed_resources[resource.name]:
return False
except KeyError:
pass
return True
def need_more_tasks(self, name, existingTasks, scheduledTasks):
"""Returns whether we need to start more tasks."""
num_have = 0
for task, parameters in existingTasks.items():
if self.is_task_new(name, task) and (
parameters.mesos_task_state in LIVE_TASK_STATES
):
num_have += 1
for task in scheduledTasks:
if task["name"] == name:
num_have += 1
return num_have < self.service_config.get_desired_instances()
def get_new_tasks(self, name, tasks_with_params: Dict[str, MesosTaskParameters]):
return {
tid: params
for tid, params in tasks_with_params.items()
if (
self.is_task_new(name, tid)
and (params.mesos_task_state in LIVE_TASK_STATES)
)
}
def get_old_tasks(self, name, tasks_with_params: Dict[str, MesosTaskParameters]):
return {
tid: params
for tid, params in tasks_with_params.items()
if (
(not self.is_task_new(name, tid))
and (params.mesos_task_state in LIVE_TASK_STATES)
)
}
def is_task_new(self, name, tid):
return tid.startswith("%s." % name)
def log_and_kill(self, driver: MesosSchedulerDriver, task_id):
log.critical(
"Task stuck launching for %ss, assuming to have failed. Killing task."
% self.staging_timeout
)
self.blacklist_slave(self.task_store.get_task(task_id).offer.agent_id.value)
self.kill_task(driver, task_id)
def tasks_and_state_for_offer(
self, driver: MesosSchedulerDriver, offer, state: ConstraintState
) -> Tuple[List[TaskInfo], ConstraintState]:
"""Returns collection of tasks that can fit inside an offer."""
tasks: List[TaskInfo] = []
offerCpus = 0.0
offerMem = 0.0
offerPorts: List[int] = []
for resource in offer.resources:
if resource.name == "cpus":
offerCpus += resource.scalar.value
elif resource.name == "mem":
offerMem += resource.scalar.value
elif resource.name == "ports":
for rg in resource.ranges.range:
# I believe mesos protobuf ranges are inclusive, but range() is exclusive
offerPorts += range(rg.begin, rg.end + 1)
remainingCpus = offerCpus
remainingMem = offerMem
remainingPorts = set(offerPorts)
base_task = self.service_config.base_task(self.system_paasta_config)
base_task["agent_id"]["value"] = offer["agent_id"]["value"]
task_mem = self.service_config.get_mem()
task_cpus = self.service_config.get_cpus()
# don't mutate existing state
new_constraint_state = copy.deepcopy(state)
total = 0
failed_constraints = 0
while self.need_more_tasks(
base_task["name"], self.task_store.get_all_tasks(), tasks
):
total += 1
if not (
remainingCpus >= task_cpus
and remainingMem >= task_mem
and self.offer_matches_pool(offer)
and len(remainingPorts) >= 1
):
break
if not (
check_offer_constraints(offer, self.constraints, new_constraint_state)
):
failed_constraints += 1
break
task_port = random.choice(list(remainingPorts))
task = copy.deepcopy(base_task)
task["task_id"] = {"value": "{}.{}".format(task["name"], uuid.uuid4().hex)}
task["container"]["docker"]["port_mappings"][0]["host_port"] = task_port
for resource in task["resources"]:
if resource["name"] == "ports":
resource["ranges"]["range"][0]["begin"] = task_port
resource["ranges"]["range"][0]["end"] = task_port
tasks.append(task)
remainingCpus -= task_cpus
remainingMem -= task_mem
remainingPorts -= {task_port}
update_constraint_state(offer, self.constraints, new_constraint_state)
# raise constraint error but only if no other tasks fit/fail the offer
if total > 0 and failed_constraints == total:
raise ConstraintFailAllTasksError
return tasks, new_constraint_state
def offer_matches_pool(self, offer):
for attribute in offer.attributes:
if attribute.name == "pool":
return attribute.text.value == self.service_config.get_pool()
# we didn't find a pool attribute on this slave, so assume it's not in our pool.
return False
def within_reconcile_backoff(self):
return time.time() - self.reconcile_backoff < self.reconcile_start_time
def periodic(self, driver: MesosSchedulerDriver):
if self.frozen:
return
self.periodic_was_called = True # Used for testing.
if not self.within_reconcile_backoff():
driver.reviveOffers()
self.load_config()
self.kill_tasks_if_necessary(driver)
self.check_blacklisted_slaves_for_timeout()
def statusUpdate(self, driver: MesosSchedulerDriver, update: Dict):
if self.frozen:
return
# update tasks
task_id = update["task_id"]["value"]
self.log("Task {} is in state {}".format(task_id, update["state"]))
task_params = self.task_store.update_task(
task_id, mesos_task_state=update["state"]
)
if task_params.mesos_task_state not in LIVE_TASK_STATES:
with self.constraint_state_lock:
update_constraint_state(
task_params.offer, self.constraints, self.constraint_state, step=-1
)
driver.acknowledgeStatusUpdate(update)
self.kill_tasks_if_necessary(driver)
def make_healthiness_sorter(
self, base_task_name: str, all_tasks_with_params: Dict[str, MesosTaskParameters]
):
def healthiness_score(task_id):
"""Return a tuple that can be used as a key for sorting, that expresses our desire to keep this task around.
Higher values (things that sort later) are more desirable."""
params = all_tasks_with_params[task_id]
state_score = {
TASK_KILLING: 0,
TASK_FINISHED: 0,
TASK_FAILED: 0,
TASK_KILLED: 0,
TASK_LOST: 0,
TASK_ERROR: 0,
TASK_STAGING: 1,
TASK_STARTING: 2,
TASK_RUNNING: 3,
}[params.mesos_task_state]
# unhealthy tasks < healthy
# staging < starting < running
# old < new
return (
params.is_healthy,
state_score,
self.is_task_new(base_task_name, task_id),
)
return healthiness_score
def kill_tasks_if_necessary(self, driver: MesosSchedulerDriver):
base_task = self.service_config.base_task(self.system_paasta_config)
all_tasks_with_params = self.task_store.get_all_tasks()
new_tasks_with_params = self.get_new_tasks(
base_task["name"], all_tasks_with_params
)
happy_new_tasks_with_params = self.get_happy_tasks(new_tasks_with_params)
desired_instances = self.service_config.get_desired_instances()
# this puts the most-desired tasks first. I would have left them in order of bad->good and used
# new_tasks_by_desirability[:-desired_instances] instead, but list[:-0] is an empty list, rather than the full
# list.
new_task_ids_by_desirability = sorted(
list(new_tasks_with_params.keys()),
key=self.make_healthiness_sorter(base_task["name"], all_tasks_with_params),
reverse=True,
)
new_task_ids_to_kill = new_task_ids_by_desirability[desired_instances:]
old_tasks_with_params = self.get_old_tasks(
base_task["name"], all_tasks_with_params
)
old_draining_tasks_with_params = self.get_draining_tasks(old_tasks_with_params)
old_non_draining_tasks = sorted(
list(
set(old_tasks_with_params.keys()) - set(old_draining_tasks_with_params)
),
key=self.make_healthiness_sorter(base_task["name"], all_tasks_with_params),
reverse=True,
)
actions = bounce_lib.crossover_bounce(
new_config={"instances": desired_instances},
new_app_running=True,
happy_new_tasks=happy_new_tasks_with_params.keys(),
old_non_draining_tasks=new_task_ids_to_kill + old_non_draining_tasks,
)
with a_sync.idle_event_loop():
futures = []
for task in set(new_tasks_with_params.keys()) - set(
actions["tasks_to_drain"]
):
futures.append(asyncio.ensure_future(self.undrain_task(task)))
for task in actions["tasks_to_drain"]:
futures.append(asyncio.ensure_future(self.drain_task(task)))
if futures:
a_sync.block(asyncio.wait, futures)
async def kill_if_safe_to_kill(task_id: str):
if await self.drain_method.is_safe_to_kill(
self.make_drain_task(task_id)
):
self.kill_task(driver, task_id)
futures = []
for task, parameters in all_tasks_with_params.items():
if (
parameters.is_draining
and parameters.mesos_task_state in LIVE_TASK_STATES
):
futures.append(asyncio.ensure_future(kill_if_safe_to_kill(task)))
if futures:
a_sync.block(asyncio.wait, futures)
def get_happy_tasks(self, tasks_with_params: Dict[str, MesosTaskParameters]):
"""Filter a dictionary of tasks->params to those that are running and not draining."""
happy_tasks = {}
for tid, params in tasks_with_params.items():
if params.mesos_task_state == TASK_RUNNING and not params.is_draining:
happy_tasks[tid] = params
return happy_tasks
def get_draining_tasks(self, tasks_with_params: Dict[str, MesosTaskParameters]):
"""Filter a dictionary of tasks->params to those that are draining."""
return {t: p for t, p in tasks_with_params.items() if p.is_draining}
def make_drain_task(self, task_id: str):
"""Return a DrainTask object, which is suitable for passing to drain methods."""
ports = []
params = self.task_store.get_task(task_id)
for resource in params.resources:
if resource["name"] == "ports":
for rg in resource["ranges"]["range"]:
for port in range(rg["begin"], rg["end"] + 1):
ports.append(port)
return DrainTask(
id=task_id, host=params.offer["agent_id"]["value"], ports=ports
)
async def undrain_task(self, task_id: str):
self.log("Undraining task %s" % task_id)
await self.drain_method.stop_draining(self.make_drain_task(task_id))
self.task_store.update_task(task_id, is_draining=False)
async def drain_task(self, task_id: str):
self.log("Draining task %s" % task_id)
await self.drain_method.drain(self.make_drain_task(task_id))
self.task_store.update_task(task_id, is_draining=True)
def kill_task(self, driver: MesosSchedulerDriver, task_id: str):
self.log("Killing task %s" % task_id)
driver.killTask({"value": task_id})
self.task_store.update_task(task_id, mesos_task_state=TASK_KILLING)
def group_tasks_by_version(
self, task_ids: Collection[str]
) -> Mapping[str, Collection[str]]:
d: Dict[str, List[str]] = {}
for task_id in task_ids:
version = task_id.rsplit(".", 1)[0]
d.setdefault(version, []).append(task_id)
return d
def load_config(self) -> None:
service_configuration_lib._yaml_cache = {}
self.service_config = load_paasta_native_job_config(
service=self.service_name,
instance=self.instance_name,
instance_type=self.instance_type,
cluster=self.cluster,
soa_dir=self.soa_dir,
config_overrides=self.service_config_overrides,
)
self.recreate_drain_method()
self.reload_constraints()
self.validate_config()
def validate_config(self) -> None:
pass
def recreate_drain_method(self) -> None:
"""Re-instantiate self.drain_method. Should be called after self.service_config changes."""
self.drain_method = drain_lib.get_drain_method(
name=self.service_config.get_drain_method(
self.service_config.service_namespace_config
),
service=self.service_name,
instance=self.instance_name,
registrations=self.service_config.get_registrations(),
**self.service_config.get_drain_method_params(
self.service_config.service_namespace_config
),
)
def reload_constraints(self):
self.constraints = self.service_config.get_constraints() or []
def blacklist_slave(self, agent_id: str):
log.debug("Blacklisting slave: %s" % agent_id)
self.blacklisted_slaves.setdefault(agent_id, time.time())
def unblacklist_slave(self, agent_id: str):
if agent_id not in self.blacklisted_slaves:
return
log.debug("Unblacklisting slave: %s" % agent_id)
with self.blacklisted_slaves_lock:
del self.blacklisted_slaves[agent_id]
def check_blacklisted_slaves_for_timeout(self):
for agent_id, blacklist_time in self.blacklisted_slaves.items():
if (blacklist_time + self.blacklist_timeout) < time.time():
self.unblacklist_slave(agent_id)
class DrainTask:
def __init__(self, id, host, ports):
self.id = id
self.host = host
self.ports = ports
def find_existing_id_if_exists_or_gen_new(name):
for framework in mesos_tools.get_all_frameworks(active_only=True):
if framework.name == name:
return framework.id
else:
return uuid.uuid4().hex
def create_driver(framework_name, scheduler, system_paasta_config, implicit_acks=False):
master_uri = "{}:{}".format(
mesos_tools.get_mesos_leader(), mesos_tools.MESOS_MASTER_PORT
)
framework = {
"user": getpass.getuser(),
"name": framework_name,
"failover_timeout": 604800,
"id": {"value": find_existing_id_if_exists_or_gen_new(framework_name)},
"checkpoint": True,
"principal": system_paasta_config.get_paasta_native_config()["principal"],
}
driver = MesosSchedulerDriver(
sched=scheduler,
framework=framework,
master_uri=master_uri,
use_addict=True,
implicit_acknowledgements=implicit_acks,
principal=system_paasta_config.get_paasta_native_config()["principal"],
secret=system_paasta_config.get_paasta_native_config()["secret"],
)
return driver
def get_paasta_native_jobs_for_cluster(cluster=None, soa_dir=DEFAULT_SOA_DIR):
"""A paasta_native-specific wrapper around utils.get_services_for_cluster
:param cluster: The cluster to read the configuration for
:param soa_dir: The SOA config directory to read from
:returns: A list of tuples of (service, job_name)"""
return get_services_for_cluster(cluster, "paasta_native", soa_dir)
|
{
"content_hash": "70cf076f4c237771538ef45cba6946e8",
"timestamp": "",
"source": "github",
"line_count": 651,
"max_line_length": 120,
"avg_line_length": 37.654377880184335,
"alnum_prop": 0.597805246195896,
"repo_name": "Yelp/paasta",
"id": "e128cea800e20d131ea431345f2bb7afa9ab1ed1",
"size": "24535",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "paasta_tools/frameworks/native_scheduler.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "19456"
},
{
"name": "Gherkin",
"bytes": "4399"
},
{
"name": "Makefile",
"bytes": "12710"
},
{
"name": "Python",
"bytes": "4745271"
},
{
"name": "Shell",
"bytes": "98025"
}
],
"symlink_target": ""
}
|
from django.core.cache.backends.locmem import LocMemCache
from base_classes import CacheBase
from hydro.common.configurator import Configurator
__author__ = 'moshebasanchig'
class InMemoryCache(CacheBase):
def __init__(self, params=None):
self.cache = LocMemCache(name='Hydro', params={})
def get(self, key):
try:
value = self.cache.get(key)
except Exception, err:
value = None
return value
def put(self, key, value, ttl=Configurator.CACHE_IN_MEMORY_KEY_EXPIRE):
# just in case the default was changed during the running
if ttl > Configurator.CACHE_IN_MEMORY_KEY_EXPIRE:
ttl = Configurator.CACHE_IN_MEMORY_KEY_EXPIRE
self.cache.set(key, value, ttl)
if __name__ == '__main__':
from time import sleep
key = 'a'
val = {1: 1}
cache = InMemoryCache()
cache.put(key, val, None)
sleep(5)
print cache.get(key)
|
{
"content_hash": "59de29ff2b46b4e1cea5e51828130173",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 75,
"avg_line_length": 26.194444444444443,
"alnum_prop": 0.6341463414634146,
"repo_name": "Convertro/Hydro",
"id": "420e14b086504cee94929883cdca942154669de2",
"size": "943",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/hydro/cache/in_memory.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "67247"
},
{
"name": "Shell",
"bytes": "233"
}
],
"symlink_target": ""
}
|
<?php
namespace XeroPHP\Models\Accounting;
use XeroPHP\Remote;
use XeroPHP\Models\Accounting\Organisation\ExternalLink;
class Employee extends Remote\Model
{
/**
* Xero identifier.
*
* @property string EmployeeID
*/
/**
* Current status of an employee – see contact status types.
*
* @property string Status
*/
/**
* First name of an employee (max length = 255).
*
* @property string FirstName
*/
/**
* Last name of an employee (max length = 255).
*
* @property string LastName
*/
/**
* Link to an external resource, for example, an employee record in an external system. You can specify
* the URL element.
* The description of the link is auto-generated in the form “Go to <App name>”.
* <App name> refers to the Xero application name that is making the API call.
*
* @property ExternalLink ExternalLink
*/
/**
* Get the resource uri of the class (Contacts) etc.
*
* @return string
*/
public static function getResourceURI()
{
return 'Employees';
}
/**
* Get the root node name. Just the unqualified classname.
*
* @return string
*/
public static function getRootNodeName()
{
return 'Employee';
}
/**
* Get the guid property.
*
* @return string
*/
public static function getGUIDProperty()
{
return 'EmployeeID';
}
/**
* Get the stem of the API (core.xro) etc.
*
* @return string
*/
public static function getAPIStem()
{
return Remote\URL::API_CORE;
}
/**
* Get the supported methods.
*/
public static function getSupportedMethods()
{
return [
Remote\Request::METHOD_POST,
Remote\Request::METHOD_PUT,
Remote\Request::METHOD_GET,
];
}
/**
* Get the properties of the object. Indexed by constants
* [0] - Mandatory
* [1] - Type
* [2] - PHP type
* [3] - Is an Array
* [4] - Saves directly.
*
* @return array
*/
public static function getProperties()
{
return [
'EmployeeID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'Status' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'FirstName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'LastName' => [false, self::PROPERTY_TYPE_STRING, null, false, false],
'ExternalLink' => [false, self::PROPERTY_TYPE_OBJECT, 'Accounting\\Organisation\\ExternalLink', false, false],
];
}
public static function isPageable()
{
return false;
}
/**
* @return string
*/
public function getEmployeeID()
{
return $this->_data['EmployeeID'];
}
/**
* @param string $value
*
* @return Employee
*/
public function setEmployeeID($value)
{
$this->propertyUpdated('EmployeeID', $value);
$this->_data['EmployeeID'] = $value;
return $this;
}
/**
* @return string
*/
public function getStatus()
{
return $this->_data['Status'];
}
/**
* @param string $value
*
* @return Employee
*/
public function setStatus($value)
{
$this->propertyUpdated('Status', $value);
$this->_data['Status'] = $value;
return $this;
}
/**
* @return string
*/
public function getFirstName()
{
return $this->_data['FirstName'];
}
/**
* @param string $value
*
* @return Employee
*/
public function setFirstName($value)
{
$this->propertyUpdated('FirstName', $value);
$this->_data['FirstName'] = $value;
return $this;
}
/**
* @return string
*/
public function getLastName()
{
return $this->_data['LastName'];
}
/**
* @param string $value
*
* @return Employee
*/
public function setLastName($value)
{
$this->propertyUpdated('LastName', $value);
$this->_data['LastName'] = $value;
return $this;
}
/**
* @return ExternalLink
*/
public function getExternalLink()
{
return $this->_data['ExternalLink'];
}
/**
* @param ExternalLink $value
*
* @return Employee
*/
public function setExternalLink(ExternalLink $value)
{
$this->propertyUpdated('ExternalLink', $value);
$this->_data['ExternalLink'] = $value;
return $this;
}
}
|
{
"content_hash": "071d651b89228fde278f2611cf06a781",
"timestamp": "",
"source": "github",
"line_count": 225,
"max_line_length": 122,
"avg_line_length": 20.85333333333333,
"alnum_prop": 0.5377237851662404,
"repo_name": "calcinai/xero-php",
"id": "f03ae908926cfb90b5c582710614b7a51666e68c",
"size": "4698",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/XeroPHP/Models/Accounting/Employee.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "1176101"
}
],
"symlink_target": ""
}
|
class BrowserActionSetIconFunction : public ExtensionActionSetIconFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setIcon")
protected:
virtual ~BrowserActionSetIconFunction() {}
};
class BrowserActionSetTitleFunction : public ExtensionActionSetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setTitle")
protected:
virtual ~BrowserActionSetTitleFunction() {}
};
class BrowserActionSetPopupFunction : public ExtensionActionSetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setPopup")
protected:
virtual ~BrowserActionSetPopupFunction() {}
};
class BrowserActionGetTitleFunction : public ExtensionActionGetTitleFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getTitle")
protected:
virtual ~BrowserActionGetTitleFunction() {}
};
class BrowserActionGetPopupFunction : public ExtensionActionGetPopupFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getPopup")
protected:
virtual ~BrowserActionGetPopupFunction() {}
};
class BrowserActionSetBadgeTextFunction
: public ExtensionActionSetBadgeTextFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeText")
protected:
virtual ~BrowserActionSetBadgeTextFunction() {}
};
class BrowserActionSetBadgeBackgroundColorFunction
: public ExtensionActionSetBadgeBackgroundColorFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.setBadgeBackgroundColor")
protected:
virtual ~BrowserActionSetBadgeBackgroundColorFunction() {}
};
class BrowserActionGetBadgeTextFunction
: public ExtensionActionGetBadgeTextFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getBadgeText")
protected:
virtual ~BrowserActionGetBadgeTextFunction() {}
};
class BrowserActionGetBadgeBackgroundColorFunction
: public ExtensionActionGetBadgeBackgroundColorFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.getBadgeBackgroundColor")
protected:
virtual ~BrowserActionGetBadgeBackgroundColorFunction() {}
};
class BrowserActionEnableFunction : public ExtensionActionShowFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.enable")
protected:
virtual ~BrowserActionEnableFunction() {}
};
class BrowserActionDisableFunction : public ExtensionActionHideFunction {
public:
DECLARE_EXTENSION_FUNCTION_NAME("browserAction.disable")
protected:
virtual ~BrowserActionDisableFunction() {}
};
#endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_ACTION_EXTENSION_BROWSER_ACTIONS_API_H_
|
{
"content_hash": "952a97aa4529dbd98721389d056c27dd",
"timestamp": "",
"source": "github",
"line_count": 93,
"max_line_length": 90,
"avg_line_length": 27.516129032258064,
"alnum_prop": 0.8147713950762017,
"repo_name": "Crystalnix/BitPop",
"id": "e99fd4dcc896c88395fa5864c345f001e956cad8",
"size": "3171",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "chrome/browser/extensions/api/extension_action/extension_browser_actions_api.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "AppleScript",
"bytes": "6973"
},
{
"name": "Arduino",
"bytes": "464"
},
{
"name": "Assembly",
"bytes": "1871"
},
{
"name": "C",
"bytes": "1472539"
},
{
"name": "C++",
"bytes": "68615409"
},
{
"name": "Java",
"bytes": "465810"
},
{
"name": "JavaScript",
"bytes": "17052804"
},
{
"name": "Objective-C",
"bytes": "5073580"
},
{
"name": "PHP",
"bytes": "97817"
},
{
"name": "Perl",
"bytes": "64450"
},
{
"name": "Python",
"bytes": "2794547"
},
{
"name": "Ruby",
"bytes": "650"
},
{
"name": "Shell",
"bytes": "262004"
},
{
"name": "XSLT",
"bytes": "418"
}
],
"symlink_target": ""
}
|
/// <reference path="../kg.ts"/>
/* Basic concepts */
/// <reference path="basic_concepts/elasticity/elasticity.ts"/>
/// <reference path="basic_concepts/elasticity/midpoint.ts"/>
/// <reference path="basic_concepts/elasticity/point.ts"/>
/// <reference path="basic_concepts/elasticity/constant.ts"/>
/* MICRO */
/* Supply and Demand */
/// <reference path="micro/supply_and_demand/priceQuantityRelationship.ts"/>
/// <reference path="micro/supply_and_demand/constantElasticityPriceQuantityRelationship.ts"/>
/// <reference path="micro/supply_and_demand/linearPriceQuantityRelationship.ts"/>
/// <reference path="micro/supply_and_demand/constantPriceQuantityRelationship.ts"/>
/// <reference path="micro/supply_and_demand/individual_and_market_supply_and_demand.ts"/>
/* Consumer Theory */
/// <reference path="micro/consumer_theory/constraints/budgetConstraint.ts"/>
/// <reference path="micro/consumer_theory/constraints/budgetSegment.ts"/>
/// <reference path="micro/consumer_theory/constraints/simpleBudgetConstraint.ts"/>
/// <reference path="micro/consumer_theory/constraints/endowmentBudgetConstraint.ts"/>
/// <reference path="micro/consumer_theory/constraints/intertemporalBudgetConstraint.ts"/>
/// <reference path="micro/consumer_theory/constraints/utilityConstraint.ts"/>
/// <reference path="micro/consumer_theory/utility/utility.ts"/>
/// <reference path="micro/consumer_theory/utility/oneGoodUtility.ts"/>
/// <reference path="micro/consumer_theory/utility/crra.ts"/>
/// <reference path="micro/consumer_theory/utility/riskAversion.ts"/>
/// <reference path="micro/consumer_theory/utility/utilityRedistribution.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/twoGoodUtility.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/cobbDouglasUtility.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/complementsUtility.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/substitutesUtility.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/cesUtility.ts"/>
/// <reference path="micro/consumer_theory/two_good_utility/quasilinearUtility.ts"/>
/// <reference path="micro/consumer_theory/demand/utilityDemand.ts"/>
/// <reference path="micro/consumer_theory/demand/marshallianDemand.ts"/>
/// <reference path="micro/consumer_theory/demand/hicksianDemand.ts"/>
/// <reference path="micro/consumer_theory/demand/slutsky.ts"/>
/* Producer Theory */
/// <reference path="micro/producer_theory/costs/productionCost.ts"/>
/// <reference path="micro/producer_theory/costs/linearMarginalCost.ts"/>
/// <reference path="micro/producer_theory/costs/constantMarginalCost.ts"/>
/// <reference path="micro/producer_theory/costs/quadraticMarginalCost.ts"/>
/// <reference path="micro/producer_theory/production/productionTechnology.ts"/>
/// <reference path="micro/producer_theory/production/cobbDouglasProduction.ts"/>
/// <reference path="micro/producer_theory/profit/profitMax.ts"/>
/* Market Structures */
/// <reference path="micro/market_structures/competition/competitiveEquilibrium.ts"/>
/// <reference path="micro/market_structures/oligopoly/quantityDuopoly.ts"/>
/// <reference path="micro/market_structures/oligopoly/cournotDuopoly.ts"/>
/* Edgeworth Box */
/// <reference path="micro/edgeworth/edgeworth.ts"/>
/* Macro */
/// <reference path="macro/growth/ramseyCassKoopmans.ts"/>
|
{
"content_hash": "c0aac7a81a0de52d2da351f2c5467692",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 94,
"avg_line_length": 49,
"alnum_prop": 0.7577639751552795,
"repo_name": "cmakler/econgraphs",
"id": "1fdc6cfa837934b4750f57ac8da3a880d48558bb",
"size": "3381",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/ts/econ/eg.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "133781"
},
{
"name": "HTML",
"bytes": "1908056"
},
{
"name": "JavaScript",
"bytes": "2390543"
},
{
"name": "Python",
"bytes": "997174"
},
{
"name": "TypeScript",
"bytes": "385961"
}
],
"symlink_target": ""
}
|
set -x
set -e
set -o pipefail
echo $ANDROID_SERIAL
cleanup() {
rm -rf ~/.m2 ~/.gradle/caches
rm -rf */build/
rm -rf examples/one/build/
}
cleanup
./gradlew :plugin:install
./gradlew :core:install
cd examples/app-example
gradle connectedAndroidTest
gradle screenshotTests
cleanup
|
{
"content_hash": "f6ff65bb2abe4828ceeff89eb2e5ba20",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 33,
"avg_line_length": 13.5,
"alnum_prop": 0.7070707070707071,
"repo_name": "fangzhzh/screenshot-tests-for-android",
"id": "9102012ecd3c1f586fa5fb1b1152b5a212b1b1b6",
"size": "310",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "integration_test.sh",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "304"
},
{
"name": "Groovy",
"bytes": "5986"
},
{
"name": "Java",
"bytes": "102435"
},
{
"name": "JavaScript",
"bytes": "1056"
},
{
"name": "Python",
"bytes": "34012"
},
{
"name": "Shell",
"bytes": "428"
}
],
"symlink_target": ""
}
|
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "451e27086857d738577f536b58fb1266",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "9bc1a7b08759bd1caeb1d39ff0e5a700d318353c",
"size": "195",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Gesneriaceae/Besleria/Besleria aristeguitae/ Syn. Pterobesleria aristeguitae/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<title>Example Project</title>
<script src="engine/misc/JumpStart.js"></script>
<script>
loadJumpStart({
"multiuserOnly": true,
"debug": {"showCursorPlanes": true}
});
function spin()
{
this.rotateY(1.0 * jumpStart.deltaTime);
}
function extraRemove()
{
console.log("Object removed listener.");
}
jumpStart.addEventListener("precache", function()
{
// Async
jumpStart.loadModels(["models/block"]).then( function()
{
jumpStart.doneCaching();
});
// true : SYNCHRONOUS
// false: ASYNCHRONOUS (must call JumpStart.doneCaching)
return false;
});
jumpStart.addEventListener("initialize", function()
{
console.log("initing");
// This listener only gets called when initializing the room of a multiuser app.
var extraBlock = jumpStart.spawnInstance("models/block");
extraBlock.name = "globalBlock";
extraBlock.scale.set(2, 2, 2);
//extraBlock.position.y += 250.0;
//extraBlock.applyBehavior("physics");
//extraBlock.addEventListener("spawn", testerSpawn);
// extraBlock.translateY(200);
// extraBlock.addEventListener("tick", spin);
// extraBlock.addEventListener("remove", extraRemove);
// extraBlock.syncData.myVar = "5150";
extraBlock.sync();
// true : SYNCHRONOUS
// false: ASYNCHRONOUS (must call JumpStart.doneInitializing)
return true;
});
jumpStart.addEventListener("ready", function()
{
var floorBoundary = jumpStart.enclosureBoundary("floor");
floorBoundary.addEventListener("cursordown", function()
{
var extraBlock = jumpStart.scene.getObjectByName("globalBlock");
extraBlock.applyBehavior("physics");
extraBlock.sync();
});
var cursor = jumpStart.spawnInstance("models/block");
cursor.addEventListener("tick", function()
{
if( !jumpStart.localUser.cursorHit )
return;
var pos = jumpStart.localUser.cursorHit.scaledPoint.clone();
pos.y += 100.0;
this.position.copy(pos);
});
cursor.translateY(100);
var myObject = jumpStart.spawnInstance("models/block");
myObject.blocksLOS = true;
myObject.addEventListener("tick", function()
{
this.rotateY(2.0 * jumpStart.deltaTime);
});
myObject.addEventListener("cursorenter", function()
{
console.log("Object is being highlighted (and then scaled)! " + this);
this.scale.set(2, 2, 2);
});
myObject.addEventListener("cursorexit", function()
{
console.log("Object is being un-highlighted (then scaled)! " + this);
this.scale.set(1, 1, 1);
});
myObject.addEventListener("cursordown", function()
{
console.log("Object is being clicked down (then shifted on x-axis)! " + this);
myObject.translateX(20.0);
jumpStart.world.translateX(100.0);
});
myObject.addEventListener("cursorup", function()
{
console.log("Object is being clicked up (then removing globalBlock)! " + this);
// var extraBlock = jumpStart.scene.getObjectByName("globalBlock");
// jumpStart.removeInstance(extraBlock);
});
myObject.addEventListener("spawn", function()
{
console.log("Object is being spawned! " + this);
});
myObject.addEventListener("remove", function()
{
console.log("Object is being removed! " + this);
});
// true : SYNCHRONOUS
// false: ASYNCHRONOUS (must call JumpStart.run)
return true;
});
</script>
</head>
<body>
</body>
</html>
|
{
"content_hash": "ff23ff35d0a53181d92cd7c269b6ca98",
"timestamp": "",
"source": "github",
"line_count": 136,
"max_line_length": 84,
"avg_line_length": 26.014705882352942,
"alnum_prop": 0.6464104013566987,
"repo_name": "smsithlord/JumpStart",
"id": "3827197a16ae85fb84e486948d04d2ae02859e58",
"size": "3538",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "example.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3709"
},
{
"name": "HTML",
"bytes": "643274"
},
{
"name": "JavaScript",
"bytes": "636742"
}
],
"symlink_target": ""
}
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<!DOCTYPE html>
<html>
<head>
<title>Login / Registration </title>
<style type="text/css">
label{
display:block;
}
</style>
</head>
<body>
<div id="login">
<?php if($this->session->flashdata("registration_errors"))
{
echo $this->session->flashdata("registration_errors");
}
if($this->session->flashdata("success"))
{
echo $this->session->flashdata("success");
}
if($this->session->flashdata("login_errors"))
{
echo $this->session->flashdata("login_errors");
}
?>
<form action="/Students/log_in" method="POST">
<fieldset>
<legend> Log In </legend>
<input type="hidden" name="hide">
<label>Email:
<input type="text" name="email">
</label>
<label>Password:
<input type="text" name="password">
</label>
<button>Log In</button>
</fieldset>
</form>
</div>
<div id="register">
<form action="/Students/add" method="post">
<fieldset>
<legend> OR Register </legend>
<input type="hidden" name="hide">
<label>First Name:
<input type="text" name="first_name">
</label>
<label>Last Name:
<input type="text" name="last_name">
</label>
<label>Email Address:
<input type="text" name="email">
</label>
<label>Password:
<input type="password" name="password">
</label>
<label>Confirm Password:
<input type="password" name="confirm_password">
</label>
<button>Register</button>
</fieldset>
</form>
</div>
</body>
</html>
|
{
"content_hash": "7c78e5dc4037038870ca97dd0c8428c8",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 63,
"avg_line_length": 21.18421052631579,
"alnum_prop": 0.5832298136645963,
"repo_name": "scott-langdon/php-belt2",
"id": "c0729cbb8601dcafd40eb4c9db978ae665245bc0",
"size": "1610",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/views/login.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "2756"
},
{
"name": "CSS",
"bytes": "14680"
},
{
"name": "HTML",
"bytes": "8227026"
},
{
"name": "JavaScript",
"bytes": "56182"
},
{
"name": "PHP",
"bytes": "1747413"
}
],
"symlink_target": ""
}
|
package com.petalmd.armor.transport;
import org.elasticsearch.Version;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.network.NetworkService;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.BigArrays;
import org.elasticsearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.threadpool.ThreadPool;
public class SSLClientNettyTransport extends SSLNettyTransport {
@Inject
public SSLClientNettyTransport(final Settings settings, final ThreadPool threadPool, final NetworkService networkService,
final BigArrays bigArrays, final Version version, final CircuitBreakerService circuitBreakerService) {
super(settings, threadPool, networkService, bigArrays, version, circuitBreakerService);
}
@Override
protected boolean isClient() {
return true;
}
}
|
{
"content_hash": "47bc59989b15f817ec7487a4d6e31587",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 125,
"avg_line_length": 34.23076923076923,
"alnum_prop": 0.797752808988764,
"repo_name": "petaldevelopment/armor",
"id": "68033592f6f9db1a8c8e2cbe395df40dfa691e86",
"size": "1539",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/main/java/com/petalmd/armor/transport/SSLClientNettyTransport.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "468058"
},
{
"name": "Shell",
"bytes": "5087"
}
],
"symlink_target": ""
}
|
int BG_COLOR;
void colors_init();
#endif
|
{
"content_hash": "82c78cf9bde2687be12eb8f19e1b0e25",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 19,
"avg_line_length": 8.6,
"alnum_prop": 0.6744186046511628,
"repo_name": "drbig/snb",
"id": "018cf68039d544f209495420426ba3c1a5b90d1a",
"size": "453",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/colors.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "65168"
},
{
"name": "Makefile",
"bytes": "2092"
},
{
"name": "Roff",
"bytes": "1746"
}
],
"symlink_target": ""
}
|
using System;
using System.Linq;
using Nirvana.TestFramework;
using Nirvana.TestFramework.FluentAssertions;
using Xunit;
namespace Nirvana.JsonSerializer.Tests
{
public abstract class NullValueTests : BddTestBase<Serializer, object, string>
{
public override Action Inject => ()=>{};
public override Action Because=> ()=> { Result = Sut.Serialize(Input, IncludeNulls); };
protected bool IncludeNulls;
public class SubClass
{
public string test { get; set; }
}
public class TestInput {
public string test { get; set; }
public SubClass Sub { get; set; }
}
public class when_disabled:NullValueTests
{
public override Action Establish=> () =>
{
Input = new TestInput();
};
[Fact]
public void should_serialize() => Assert.Equal("{}", Result);
}
public class when_enabled:NullValueTests
{
public override Action Establish=> () =>
{
Input = new TestInput();
IncludeNulls = true;
};
[Fact]
public void should_serialize() => Result.ShouldEqual("{\"test\":null,\"Sub\":null}");
}
}
public class EnumSerializerTests : BddTestBase<Serializer, object, string>
{
[Fact]
public void should_serialize()=> Result.ShouldEqual( "[{\"DisplayName\":\"One\",\"Value\":1},{\"DisplayName\":\"Two\",\"Value\":2}]");
[Fact]
public void should_deserialize()
{
var value = Sut.Deserialize<TestEnum[]>(Result);
value.Length.ShouldEqual(2);
value.First().InnerValue.ShouldEqual(TestEnumValue.One);
value.Last().InnerValue.ShouldEqual(TestEnumValue.Two);
}
[Fact]
public void should_deserialize_bad()
{
var value = Sut.Deserialize<TestEnum[]>("[{\"DisplayName\":\"One\",\"Value\":\"\"}]");
value.Length.ShouldEqual(1);
value[0].ShouldBeNull();
}
public override Action Inject => ()=>{};
public override Action Because => () =>
{
Result = Sut.Serialize(TestEnum.GetAll());
};
}
}
|
{
"content_hash": "b46a49861408f9e8b8e2f4baa4084aab",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 142,
"avg_line_length": 30.773333333333333,
"alnum_prop": 0.5420277296360485,
"repo_name": "jasoncavaliere/Nirvana",
"id": "bea20a9f33dc4c3def2fa75e354f9c21f5ad1de2",
"size": "2310",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Nirvana.JsonSerializer.Tests/EnumSerializerTests.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "122"
},
{
"name": "Batchfile",
"bytes": "2114"
},
{
"name": "C#",
"bytes": "378520"
},
{
"name": "CSS",
"bytes": "195583"
},
{
"name": "HTML",
"bytes": "13551"
},
{
"name": "JavaScript",
"bytes": "2311"
},
{
"name": "PowerShell",
"bytes": "23119"
},
{
"name": "Smalltalk",
"bytes": "3"
},
{
"name": "TypeScript",
"bytes": "43722"
}
],
"symlink_target": ""
}
|
package gnu.java.security.jce.prng;
import gnu.java.security.Registry;
/**
* The implementation of the SHA-256 based SecureRandom <i>Service Provider
* Interface</i> (<b>SPI</b>) adapter.
*/
public class Sha256RandomSpi
extends SecureRandomAdapter
{
public Sha256RandomSpi()
{
super(Registry.SHA256_HASH);
}
}
|
{
"content_hash": "2703ac6e7ded63ea161365ed27b5dcc5",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 75,
"avg_line_length": 17.473684210526315,
"alnum_prop": 0.713855421686747,
"repo_name": "the-linix-project/linix-kernel-source",
"id": "a6ddb70afc0f548d71ae067e7ff52127be744789",
"size": "2063",
"binary": false,
"copies": "153",
"ref": "refs/heads/master",
"path": "gccsrc/gcc-4.7.2/libjava/classpath/gnu/java/security/jce/prng/Sha256RandomSpi.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Ada",
"bytes": "38139979"
},
{
"name": "Assembly",
"bytes": "3723477"
},
{
"name": "Awk",
"bytes": "83739"
},
{
"name": "C",
"bytes": "103607293"
},
{
"name": "C#",
"bytes": "55726"
},
{
"name": "C++",
"bytes": "38577421"
},
{
"name": "CLIPS",
"bytes": "6933"
},
{
"name": "CSS",
"bytes": "32588"
},
{
"name": "Emacs Lisp",
"bytes": "13451"
},
{
"name": "FORTRAN",
"bytes": "4294984"
},
{
"name": "GAP",
"bytes": "13089"
},
{
"name": "Go",
"bytes": "11277335"
},
{
"name": "Haskell",
"bytes": "2415"
},
{
"name": "Java",
"bytes": "45298678"
},
{
"name": "JavaScript",
"bytes": "6265"
},
{
"name": "Matlab",
"bytes": "56"
},
{
"name": "OCaml",
"bytes": "148372"
},
{
"name": "Objective-C",
"bytes": "995127"
},
{
"name": "Objective-C++",
"bytes": "436045"
},
{
"name": "PHP",
"bytes": "12361"
},
{
"name": "Pascal",
"bytes": "40318"
},
{
"name": "Perl",
"bytes": "358808"
},
{
"name": "Python",
"bytes": "60178"
},
{
"name": "SAS",
"bytes": "1711"
},
{
"name": "Scilab",
"bytes": "258457"
},
{
"name": "Shell",
"bytes": "2610907"
},
{
"name": "Tcl",
"bytes": "17983"
},
{
"name": "TeX",
"bytes": "1455571"
},
{
"name": "XSLT",
"bytes": "156419"
}
],
"symlink_target": ""
}
|
namespace {
class TestResults {
public:
TestResults()
: status_code(0),
sub_status_code(0),
delay(0) {
}
void reset() {
url.clear();
html.clear();
status_code = 0;
redirect_url.clear();
sub_url.clear();
sub_html.clear();
sub_status_code = 0;
sub_allow_origin.clear();
exit_url.clear();
delay = 0;
got_request.reset();
got_read.reset();
got_output.reset();
got_redirect.reset();
got_error.reset();
got_sub_request.reset();
got_sub_read.reset();
got_sub_success.reset();
}
std::string url;
std::string html;
int status_code;
// Used for testing redirects
std::string redirect_url;
// Used for testing XHR requests
std::string sub_url;
std::string sub_html;
int sub_status_code;
std::string sub_allow_origin;
std::string sub_redirect_url;
std::string exit_url;
// Delay for returning scheme handler results.
int delay;
TrackCallback
got_request,
got_read,
got_output,
got_redirect,
got_error,
got_sub_redirect,
got_sub_request,
got_sub_read,
got_sub_success;
};
// Current scheme handler object. Used when destroying the test from
// ClientSchemeHandler::ProcessRequest().
class TestSchemeHandler;
TestSchemeHandler* g_current_handler = NULL;
class TestSchemeHandler : public TestHandler {
public:
explicit TestSchemeHandler(TestResults* tr)
: test_results_(tr) {
g_current_handler = this;
}
virtual void RunTest() OVERRIDE {
CreateBrowser(test_results_->url);
}
// Necessary to make the method public in order to destroy the test from
// ClientSchemeHandler::ProcessRequest().
void DestroyTest() {
TestHandler::DestroyTest();
}
virtual bool OnBeforeResourceLoad(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefRequest> request) OVERRIDE {
std::string newUrl = request->GetURL();
if (!test_results_->exit_url.empty() &&
newUrl.find(test_results_->exit_url) != std::string::npos) {
// XHR tests use an exit URL to destroy the test.
if (newUrl.find("SUCCESS") != std::string::npos)
test_results_->got_sub_success.yes();
DestroyTest();
return true;
}
if (!test_results_->sub_redirect_url.empty() &&
newUrl == test_results_->sub_redirect_url) {
test_results_->got_sub_redirect.yes();
// Redirect to the sub URL.
request->SetURL(test_results_->sub_url);
} else if (newUrl == test_results_->redirect_url) {
test_results_->got_redirect.yes();
// No read should have occurred for the redirect.
EXPECT_TRUE(test_results_->got_request);
EXPECT_FALSE(test_results_->got_read);
// Now loading the redirect URL.
test_results_->url = test_results_->redirect_url;
test_results_->redirect_url.clear();
}
return false;
}
virtual void OnLoadEnd(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
int httpStatusCode) OVERRIDE {
std::string url = frame->GetURL();
if (url == test_results_->url || test_results_->status_code != 200) {
test_results_->got_output.yes();
// Test that the status code is correct.
EXPECT_EQ(httpStatusCode, test_results_->status_code);
if (test_results_->sub_url.empty())
DestroyTest();
}
}
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) OVERRIDE {
test_results_->got_error.yes();
DestroyTest();
}
protected:
TestResults* test_results_;
};
class ClientSchemeHandler : public CefResourceHandler {
public:
explicit ClientSchemeHandler(TestResults* tr)
: test_results_(tr),
offset_(0),
is_sub_(false),
has_delayed_(false) {
}
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
CefRefPtr<CefCallback> callback) OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_IO));
bool handled = false;
std::string url = request->GetURL();
is_sub_ = (!test_results_->sub_url.empty() &&
test_results_->sub_url == url);
if (is_sub_) {
test_results_->got_sub_request.yes();
if (!test_results_->sub_html.empty())
handled = true;
} else {
EXPECT_EQ(url, test_results_->url);
test_results_->got_request.yes();
if (!test_results_->html.empty())
handled = true;
}
if (handled) {
if (test_results_->delay > 0) {
// Continue after the delay.
CefPostDelayedTask(TID_IO,
base::Bind(&CefCallback::Continue, callback),
test_results_->delay);
} else {
// Continue immediately.
callback->Continue();
}
return true;
}
// Response was canceled.
if (g_current_handler)
g_current_handler->DestroyTest();
return false;
}
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
int64& response_length,
CefString& redirectUrl) OVERRIDE {
if (is_sub_) {
response->SetStatus(test_results_->sub_status_code);
if (!test_results_->sub_allow_origin.empty()) {
// Set the Access-Control-Allow-Origin header to allow cross-domain
// scripting.
CefResponse::HeaderMap headers;
headers.insert(std::make_pair("Access-Control-Allow-Origin",
test_results_->sub_allow_origin));
response->SetHeaderMap(headers);
}
if (!test_results_->sub_html.empty()) {
response->SetMimeType("text/html");
response_length = test_results_->sub_html.size();
}
} else if (!test_results_->redirect_url.empty()) {
redirectUrl = test_results_->redirect_url;
} else {
response->SetStatus(test_results_->status_code);
if (!test_results_->html.empty()) {
response->SetMimeType("text/html");
response_length = test_results_->html.size();
}
}
}
virtual void Cancel() OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_IO));
}
virtual bool ReadResponse(void* data_out,
int bytes_to_read,
int& bytes_read,
CefRefPtr<CefCallback> callback) OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_IO));
if (test_results_->delay > 0) {
if (!has_delayed_) {
// Continue after a delay.
CefPostDelayedTask(TID_IO,
base::Bind(&ClientSchemeHandler::ContinueAfterDelay,
this, callback),
test_results_->delay);
bytes_read = 0;
return true;
}
has_delayed_ = false;
}
std::string* data;
if (is_sub_) {
test_results_->got_sub_read.yes();
data = &test_results_->sub_html;
} else {
test_results_->got_read.yes();
data = &test_results_->html;
}
bool has_data = false;
bytes_read = 0;
size_t size = data->size();
if (offset_ < size) {
int transfer_size =
std::min(bytes_to_read, static_cast<int>(size - offset_));
memcpy(data_out, data->c_str() + offset_, transfer_size);
offset_ += transfer_size;
bytes_read = transfer_size;
has_data = true;
}
return has_data;
}
private:
void ContinueAfterDelay(CefRefPtr<CefCallback> callback) {
has_delayed_ = true;
callback->Continue();
}
TestResults* test_results_;
size_t offset_;
bool is_sub_;
bool has_delayed_;
IMPLEMENT_REFCOUNTING(ClientSchemeHandler);
};
class ClientSchemeHandlerFactory : public CefSchemeHandlerFactory {
public:
explicit ClientSchemeHandlerFactory(TestResults* tr)
: test_results_(tr) {
}
virtual CefRefPtr<CefResourceHandler> Create(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& scheme_name,
CefRefPtr<CefRequest> request)
OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_IO));
return new ClientSchemeHandler(test_results_);
}
TestResults* test_results_;
IMPLEMENT_REFCOUNTING(ClientSchemeHandlerFactory);
};
// Global test results object.
TestResults g_TestResults;
// If |domain| is empty the scheme will be registered as non-standard.
void RegisterTestScheme(const std::string& scheme, const std::string& domain) {
g_TestResults.reset();
EXPECT_TRUE(CefRegisterSchemeHandlerFactory(scheme, domain,
new ClientSchemeHandlerFactory(&g_TestResults)));
WaitForIOThread();
}
void ClearTestSchemes() {
EXPECT_TRUE(CefClearSchemeHandlerFactories());
WaitForIOThread();
}
struct XHRTestSettings {
XHRTestSettings()
: synchronous(true) {}
std::string url;
std::string sub_url;
std::string sub_allow_origin;
std::string sub_redirect_url;
bool synchronous;
};
void SetUpXHR(const XHRTestSettings& settings) {
g_TestResults.sub_url = settings.sub_url;
g_TestResults.sub_html = "SUCCESS";
g_TestResults.sub_status_code = 200;
g_TestResults.sub_allow_origin = settings.sub_allow_origin;
g_TestResults.sub_redirect_url = settings.sub_redirect_url;
std::string request_url;
if (!settings.sub_redirect_url.empty())
request_url = settings.sub_redirect_url;
else
request_url = settings.sub_url;
g_TestResults.url = settings.url;
std::stringstream ss;
ss << "<html><head>"
"<script language=\"JavaScript\">"
"function onResult(val) {"
" document.location = \"http://tests/exit?result=\"+val;"
"}"
"function execXMLHttpRequest() {";
if (settings.synchronous) {
ss << "var result = 'FAILURE';"
"try {"
" xhr = new XMLHttpRequest();"
" xhr.open(\"GET\", \"" << request_url.c_str() << "\", false);"
" xhr.send();"
" result = xhr.responseText;"
"} catch(e) {}"
"onResult(result)";
} else {
ss << "xhr = new XMLHttpRequest();"
"xhr.open(\"GET\", \"" << request_url.c_str() << "\", true);"
"xhr.onload = function(e) {"
" if (xhr.readyState === 4) {"
" if (xhr.status === 200) {"
" onResult(xhr.responseText);"
" } else {"
" console.log('XMLHttpRequest failed with status ' + xhr.status);"
" onResult('FAILURE');"
" }"
" }"
"};"
"xhr.onerror = function(e) {"
" console.log('XMLHttpRequest failed with error ' + e);"
" onResult('FAILURE');"
"};"
"xhr.send()";
}
ss << "}"
"</script>"
"</head><body onload=\"execXMLHttpRequest();\">"
"Running execXMLHttpRequest..."
"</body></html>";
g_TestResults.html = ss.str();
g_TestResults.status_code = 200;
g_TestResults.exit_url = "http://tests/exit";
}
void SetUpXSS(const std::string& url, const std::string& sub_url,
const std::string& domain = std::string()) {
// 1. Load |url| which contains an iframe.
// 2. The iframe loads |xss_url|.
// 3. |xss_url| tries to call a JS function in |url|.
// 4. |url| tries to call a JS function in |xss_url|.
std::stringstream ss;
std::string domain_line;
if (!domain.empty())
domain_line = "document.domain = '" + domain + "';";
g_TestResults.sub_url = sub_url;
ss << "<html><head>"
"<script language=\"JavaScript\">" << domain_line <<
"function getResult() {"
" return 'SUCCESS';"
"}"
"function execXSSRequest() {"
" var result = 'FAILURE';"
" try {"
" result = parent.getResult();"
" } catch(e) {}"
" document.location = \"http://tests/exit?result=\"+result;"
"}"
"</script>"
"</head><body onload=\"execXSSRequest();\">"
"Running execXSSRequest..."
"</body></html>";
g_TestResults.sub_html = ss.str();
g_TestResults.sub_status_code = 200;
g_TestResults.url = url;
ss.str("");
ss << "<html><head>"
"<script language=\"JavaScript\">" << domain_line << ""
"function getResult() {"
" try {"
" return document.getElementById('s').contentWindow.getResult();"
" } catch(e) {}"
" return 'FAILURE';"
"}"
"</script>"
"</head><body>"
"<iframe src=\"" << sub_url.c_str() << "\" id=\"s\">"
"</body></html>";
g_TestResults.html = ss.str();
g_TestResults.status_code = 200;
g_TestResults.exit_url = "http://tests/exit";
}
} // namespace
// Test that scheme registration/unregistration works as expected.
TEST(SchemeHandlerTest, Registration) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
g_TestResults.html =
"<html><head></head><body><h1>Success!</h1></body></html>";
g_TestResults.status_code = 200;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
// Unregister the handler.
EXPECT_TRUE(CefRegisterSchemeHandlerFactory("customstd", "test", NULL));
WaitForIOThread();
g_TestResults.got_request.reset();
g_TestResults.got_read.reset();
g_TestResults.got_output.reset();
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_error);
EXPECT_FALSE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
// Re-register the handler.
EXPECT_TRUE(CefRegisterSchemeHandlerFactory("customstd", "test",
new ClientSchemeHandlerFactory(&g_TestResults)));
WaitForIOThread();
g_TestResults.got_error.reset();
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom standard scheme can return normal results.
TEST(SchemeHandlerTest, CustomStandardNormalResponse) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
g_TestResults.html =
"<html><head></head><body><h1>Success!</h1></body></html>";
g_TestResults.status_code = 200;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom standard scheme can return normal results with delayed
// responses.
TEST(SchemeHandlerTest, CustomStandardNormalResponseDelayed) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
g_TestResults.html =
"<html><head></head><body><h1>Success!</h1></body></html>";
g_TestResults.status_code = 200;
g_TestResults.delay = 100;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can return normal results.
TEST(SchemeHandlerTest, CustomNonStandardNormalResponse) {
RegisterTestScheme("customnonstd", std::string());
g_TestResults.url = "customnonstd:some%20value";
g_TestResults.html =
"<html><head></head><body><h1>Success!</h1></body></html>";
g_TestResults.status_code = 200;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom standard scheme can return an error code.
TEST(SchemeHandlerTest, CustomStandardErrorResponse) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
g_TestResults.html =
"<html><head></head><body><h1>404</h1></body></html>";
g_TestResults.status_code = 404;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can return an error code.
TEST(SchemeHandlerTest, CustomNonStandardErrorResponse) {
RegisterTestScheme("customnonstd", std::string());
g_TestResults.url = "customnonstd:some%20value";
g_TestResults.html =
"<html><head></head><body><h1>404</h1></body></html>";
g_TestResults.status_code = 404;
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that custom standard scheme handling fails when the scheme name is
// incorrect.
TEST(SchemeHandlerTest, CustomStandardNameNotHandled) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd2://test/run.html";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_FALSE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that custom nonstandard scheme handling fails when the scheme name is
// incorrect.
TEST(SchemeHandlerTest, CustomNonStandardNameNotHandled) {
RegisterTestScheme("customnonstd", std::string());
g_TestResults.url = "customnonstd2:some%20value";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_FALSE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that custom standard scheme handling fails when the domain name is
// incorrect.
TEST(SchemeHandlerTest, CustomStandardDomainNotHandled) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://noexist/run.html";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_FALSE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom standard scheme can return no response.
TEST(SchemeHandlerTest, CustomStandardNoResponse) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can return no response.
TEST(SchemeHandlerTest, CustomNonStandardNoResponse) {
RegisterTestScheme("customnonstd", std::string());
g_TestResults.url = "customnonstd:some%20value";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_FALSE(g_TestResults.got_read);
EXPECT_FALSE(g_TestResults.got_output);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate redirects.
TEST(SchemeHandlerTest, CustomStandardRedirect) {
RegisterTestScheme("customstd", "test");
g_TestResults.url = "customstd://test/run.html";
g_TestResults.redirect_url = "customstd://test/redirect.html";
g_TestResults.html =
"<html><head></head><body><h1>Redirected</h1></body></html>";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_redirect);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can generate redirects.
TEST(SchemeHandlerTest, CustomNonStandardRedirect) {
RegisterTestScheme("customnonstd", std::string());
g_TestResults.url = "customnonstd:some%20value";
g_TestResults.redirect_url = "customnonstd:some%20other%20value";
g_TestResults.html =
"<html><head></head><body><h1>Redirected</h1></body></html>";
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_redirect);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate same origin XHR requests.
TEST(SchemeHandlerTest, CustomStandardXHRSameOriginSync) {
RegisterTestScheme("customstd", "test");
XHRTestSettings settings;
settings.url = "customstd://test/run.html";
settings.sub_url = "customstd://test/xhr.html";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate same origin XHR requests.
TEST(SchemeHandlerTest, CustomStandardXHRSameOriginAsync) {
RegisterTestScheme("customstd", "test");
XHRTestSettings settings;
settings.url = "customstd://test/run.html";
settings.sub_url = "customstd://test/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can generate same origin XHR requests.
TEST(SchemeHandlerTest, CustomNonStandardXHRSameOriginSync) {
RegisterTestScheme("customnonstd", std::string());
XHRTestSettings settings;
settings.url = "customnonstd:some%20value";
settings.sub_url = "customnonstd:xhr%20value";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can generate same origin XHR requests.
TEST(SchemeHandlerTest, CustomNonStandardXHRSameOriginAsync) {
RegisterTestScheme("customnonstd", std::string());
XHRTestSettings settings;
settings.url = "customnonstd:some%20value";
settings.sub_url = "customnonstd:xhr%20value";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate same origin XSS requests.
TEST(SchemeHandlerTest, CustomStandardXSSSameOrigin) {
RegisterTestScheme("customstd", "test");
SetUpXSS("customstd://test/run.html",
"customstd://test/iframe.html");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom nonstandard scheme can generate same origin XSS requests.
TEST(SchemeHandlerTest, CustomNonStandardXSSSameOrigin) {
RegisterTestScheme("customnonstd", std::string());
SetUpXSS("customnonstd:some%20value",
"customnonstd:xhr%20value");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XHR requests
// by default. Behavior should be the same as with HTTP.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginSync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XHR requests
// by default. Behavior should be the same as with HTTP.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginAsync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XSS requests
// by default.
TEST(SchemeHandlerTest, CustomStandardXSSDifferentOrigin) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
SetUpXSS("customstd://test1/run.html",
"customstd://test2/iframe.html");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that an HTTP scheme cannot generate cross-domain XHR requests by
// default.
TEST(SchemeHandlerTest, HttpXHRDifferentOriginSync) {
RegisterTestScheme("http", "test1");
RegisterTestScheme("http", "test2");
XHRTestSettings settings;
settings.url = "http://test1/run.html";
settings.sub_url = "http://test2/xhr.html";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that an HTTP scheme cannot generate cross-domain XHR requests by
// default.
TEST(SchemeHandlerTest, HttpXHRDifferentOriginAsync) {
RegisterTestScheme("http", "test1");
RegisterTestScheme("http", "test2");
XHRTestSettings settings;
settings.url = "http://test1/run.html";
settings.sub_url = "http://test2/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that an HTTP scheme cannot generate cross-domain XSS requests by
// default.
TEST(SchemeHandlerTest, HttpXSSDifferentOrigin) {
RegisterTestScheme("http", "test1");
RegisterTestScheme("http", "test2");
SetUpXSS("http://test1/run.html",
"http://test2/xss.html");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XHR requests
// when setting the Access-Control-Allow-Origin header. Should behave the same
// as HTTP.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithHeaderSync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_allow_origin = "customstd://test1";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XHR requests
// when setting the Access-Control-Allow-Origin header. Should behave the same
// as HTTP.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithHeaderAsync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_allow_origin = "customstd://test1";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XHR requests
// when using the cross-origin whitelist.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistSync1) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2", false));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches any domain.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistSync2) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
CefString(), true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches sub-domains.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistSync3) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "a.test2.foo");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://a.test2.foo/xhr.html";
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2.foo", true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XHR requests
// when using the cross-origin whitelist.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistAsync1) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2", false));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches any domain.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistAsync2) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
CefString(), true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches sub-domains.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginWithWhitelistAsync3) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "a.test2.foo");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://a.test2.foo/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2.foo", true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Test that an HTTP scheme can generate cross-domain XHR requests when setting
// the Access-Control-Allow-Origin header.
TEST(SchemeHandlerTest, HttpXHRDifferentOriginWithHeaderSync) {
RegisterTestScheme("http", "test1");
RegisterTestScheme("http", "test2");
XHRTestSettings settings;
settings.url = "http://test1/run.html";
settings.sub_url = "http://test2/xhr.html";
settings.sub_allow_origin = "http://test1";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that an HTTP scheme can generate cross-domain XHR requests when setting
// the Access-Control-Allow-Origin header.
TEST(SchemeHandlerTest, HttpXHRDifferentOriginWithHeaderAsync) {
RegisterTestScheme("http", "test1");
RegisterTestScheme("http", "test2");
XHRTestSettings settings;
settings.url = "http://test1/run.html";
settings.sub_url = "http://test2/xhr.html";
settings.sub_allow_origin = "http://test1";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XSS requests
// when using document.domain.
TEST(SchemeHandlerTest, CustomStandardXSSDifferentOriginWithDomain) {
RegisterTestScheme("customstd", "a.test.com");
RegisterTestScheme("customstd", "b.test.com");
SetUpXSS("customstd://a.test.com/run.html",
"customstd://b.test.com/iframe.html",
"test.com");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that an HTTP scheme can generate cross-domain XSS requests when using
// document.domain.
TEST(SchemeHandlerTest, HttpXSSDifferentOriginWithDomain) {
RegisterTestScheme("http", "a.test.com");
RegisterTestScheme("http", "b.test.com");
SetUpXSS("http://a.test.com/run.html",
"http://b.test.com/iframe.html",
"test.com");
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XHR requests
// that perform redirects.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginRedirectSync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_FALSE(g_TestResults.got_sub_request);
EXPECT_FALSE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XHR requests
// that perform redirects.
TEST(SchemeHandlerTest, CustomStandardXHRDifferentOriginRedirectAsync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
ClearTestSchemes();
}
// Test that a custom standard scheme cannot generate cross-domain XHR requests
// that perform redirects when using the cross-origin whitelist. This is due to
// an explicit check in SyncResourceHandler::OnRequestRedirected() and does not
// represent ideal behavior.
TEST(SchemeHandlerTest,
CustomStandardXHRDifferentOriginRedirectWithWhitelistSync) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2", false));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_FALSE(g_TestResults.got_sub_request);
EXPECT_FALSE(g_TestResults.got_sub_read);
EXPECT_FALSE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Test that a custom standard scheme can generate cross-domain XHR requests
// that perform redirects when using the cross-origin whitelist. This is
// because we add an "Access-Control-Allow-Origin" header internally in
// CefResourceDispatcherHostDelegate::OnRequestRedirected() for the redirect
// request.
TEST(SchemeHandlerTest,
CustomStandardXHRDifferentOriginRedirectWithWhitelistAsync1) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2", false));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches any domain.
TEST(SchemeHandlerTest,
CustomStandardXHRDifferentOriginRedirectWithWhitelistAsync2) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "test2");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://test2/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
CefString(), true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Same as above but origin whitelist matches sub-domains.
TEST(SchemeHandlerTest,
CustomStandardXHRDifferentOriginRedirectWithWhitelistAsync3) {
RegisterTestScheme("customstd", "test1");
RegisterTestScheme("customstd", "a.test2.foo");
XHRTestSettings settings;
settings.url = "customstd://test1/run.html";
settings.sub_url = "customstd://a.test2.foo/xhr.html";
settings.sub_redirect_url = "customstd://test1/xhr.html";
settings.synchronous = false;
SetUpXHR(settings);
EXPECT_TRUE(CefAddCrossOriginWhitelistEntry("customstd://test1", "customstd",
"test2.foo", true));
WaitForUIThread();
CefRefPtr<TestSchemeHandler> handler = new TestSchemeHandler(&g_TestResults);
handler->ExecuteTest();
EXPECT_TRUE(g_TestResults.got_request);
EXPECT_TRUE(g_TestResults.got_read);
EXPECT_TRUE(g_TestResults.got_output);
EXPECT_TRUE(g_TestResults.got_sub_redirect);
EXPECT_TRUE(g_TestResults.got_sub_request);
EXPECT_TRUE(g_TestResults.got_sub_read);
EXPECT_TRUE(g_TestResults.got_sub_success);
EXPECT_TRUE(CefClearCrossOriginWhitelist());
WaitForUIThread();
ClearTestSchemes();
}
// Entry point for registering custom schemes.
// Called from client_app_delegates.cc.
void RegisterSchemeHandlerCustomSchemes(
CefRefPtr<CefSchemeRegistrar> registrar,
std::vector<CefString>& cookiable_schemes) {
// Add a custom standard scheme.
registrar->AddCustomScheme("customstd", true, false, false);
// Ad a custom non-standard scheme.
registrar->AddCustomScheme("customnonstd", false, false, false);
}
|
{
"content_hash": "16ecd5fa35fff70f48436e3c23cfbad6",
"timestamp": "",
"source": "github",
"line_count": 1514,
"max_line_length": 81,
"avg_line_length": 31.89233817701453,
"alnum_prop": 0.7044630837734286,
"repo_name": "kuscsik/chromiumembedded",
"id": "c471ba21b7c23e15e8d16ff4af886a3f96554541",
"size": "48840",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/unittests/scheme_handler_unittest.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "236657"
},
{
"name": "C++",
"bytes": "4737091"
},
{
"name": "Objective-C",
"bytes": "10778"
},
{
"name": "Objective-C++",
"bytes": "127420"
},
{
"name": "Python",
"bytes": "66551"
},
{
"name": "Shell",
"bytes": "87"
}
],
"symlink_target": ""
}
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About WorldAidCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>WorldAidCoin</b> version</source>
<translation>Fersiwn <b>WorldAidCoin</b></translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The WorldAidCoin developers</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Llyfr Cyfeiriadau</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Clicio dwywaith i olygu cyfeiriad neu label</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Creu cyfeiriad newydd</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your WorldAidCoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a WorldAidCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified WorldAidCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Dileu</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your WorldAidCoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Allforio Data Llyfr Cyfeiriad</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Gwall allforio</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Ni ellir ysgrifennu i ffeil %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(heb label)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Teipiwch gyfrinymadrodd</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Cyfrinymadrodd newydd</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Ailadroddwch gyfrinymadrodd newydd</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Dewiswch gyfrinymadrodd newydd ar gyfer y waled. <br/> Defnyddiwch cyfrinymadrodd o <b>10 neu fwy o lythyrennau hapgyrch</b>, neu <b> wyth neu fwy o eiriau.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Amgryptio'r waled</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn datgloi'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Datgloi'r waled</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn dadgryptio'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Dadgryptio'r waled</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Newid cyfrinymadrodd</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Teipiwch yr hen cyfrinymadrodd a chyfrinymadrodd newydd i mewn i'r waled.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Cadarnau amgryptiad y waled</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR WorldAidCoinS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Waled wedi'i amgryptio</translation>
</message>
<message>
<location line="-56"/>
<source>WorldAidCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your WorldAidCoins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Amgryptiad waled wedi methu</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Methodd amgryptiad y waled oherwydd gwall mewnol. Ni amgryptwyd eich waled.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>Dydy'r cyfrinymadroddion a ddarparwyd ddim yn cyd-fynd â'u gilydd.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Methodd ddatgloi'r waled</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Methodd dadgryptiad y waled</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Cysoni â'r rhwydwaith...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Trosolwg</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Dangos trosolwg cyffredinol y waled</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Trafodion</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Pori hanes trafodion</translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Golygu'r rhestr o cyfeiriadau a labeli ar gadw</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Dangos rhestr o gyfeiriadau ar gyfer derbyn taliadau</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Gadael rhaglen</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about WorldAidCoin</source>
<translation>Dangos gwybodaeth am WorldAidCoin</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opsiynau</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-347"/>
<source>Send coins to a WorldAidCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for WorldAidCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio'r waled</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>WorldAidCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About WorldAidCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your WorldAidCoin addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified WorldAidCoin addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Ffeil</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Gosodiadau</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Cymorth</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Bar offer tabiau</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>WorldAidCoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to WorldAidCoin network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Cyfamserol</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Dal i fyny</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Trafodiad a anfonwyd</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Trafodiad sy'n cyrraedd</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid WorldAidCoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Mae'r waled <b>wedi'i amgryptio</b> ac <b>heb ei gloi</b> ar hyn o bryd</translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Mae'r waled <b>wedi'i amgryptio</b> ac <b>ar glo</b> ar hyn o bryd</translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. WorldAidCoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Golygu'r cyfeiriad</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Label</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Mae'r label hon yn cysylltiedig gyda'r cofnod llyfr cyfeiriad hon</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Cyfeiriad</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Mae'r cyfeiriad hon yn cysylltiedig gyda'r cofnod llyfr cyfeiriad hon. Gall hyn gael ei olygu dim ond ar gyfer y pwrpas o anfon cyfeiriadau.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Cyfeiriad derbyn newydd</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Cyfeiriad anfon newydd</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Golygu'r cyfeiriad derbyn</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Golygu'r cyfeiriad anfon</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Mae'r cyfeiriad "%1" sydd newydd gael ei geisio gennych yn y llyfr cyfeiriad yn barod.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid WorldAidCoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Methodd ddatgloi'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Methodd gynhyrchu allwedd newydd.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>WorldAidCoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opsiynau</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start WorldAidCoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start WorldAidCoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the WorldAidCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the WorldAidCoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting WorldAidCoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show WorldAidCoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting WorldAidCoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Ffurflen</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the WorldAidCoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Gweddill:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Nas cadarnheir:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Trafodion diweddar</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Eich gweddill presennol</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Cyfanswm o drafodion sydd heb eu cadarnhau a heb eu cyfri tuag at y gweddill presennol</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start WorldAidCoin: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the WorldAidCoin-Qt help message to get a list with possible WorldAidCoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>WorldAidCoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>WorldAidCoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the WorldAidCoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the WorldAidCoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Anfon arian</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Anfon at pobl lluosog ar yr un pryd</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Gweddill:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123.456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Cadarnhau'r gweithrediad anfon</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> to %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Ydych chi'n siwr eich bod chi eisiau anfon %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>a</translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Ffurflen</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Maint</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Label:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Gludo cyfeiriad o'r glipfwrdd</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a WorldAidCoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Gludo cyfeiriad o'r glipfwrdd</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this WorldAidCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified WorldAidCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a WorldAidCoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter WorldAidCoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The WorldAidCoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Agor tan %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+225"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Agor tan %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Gwall allforio</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Ni ellir ysgrifennu i ffeil %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>WorldAidCoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or WorldAidCoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: WorldAidCoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: WorldAidCoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 9333 or testnet: 19333)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 9332 or testnet: 19332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=WorldAidCoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "WorldAidCoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. WorldAidCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong WorldAidCoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the WorldAidCoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of WorldAidCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart WorldAidCoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. WorldAidCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
|
{
"content_hash": "0684e643a599c472d68b7785b863f052",
"timestamp": "",
"source": "github",
"line_count": 2917,
"max_line_length": 395,
"avg_line_length": 34.176208433321904,
"alnum_prop": 0.5942703526862737,
"repo_name": "kolin182/WorldAidCoin",
"id": "527959114157458bb099e6e805524d4e87adb6a6",
"size": "99694",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/qt/locale/bitcoin_cy.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "31413"
},
{
"name": "C++",
"bytes": "2967018"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "Makefile",
"bytes": "32874"
},
{
"name": "Objective-C",
"bytes": "858"
},
{
"name": "Objective-C++",
"bytes": "5864"
},
{
"name": "Python",
"bytes": "69710"
},
{
"name": "Shell",
"bytes": "9755"
}
],
"symlink_target": ""
}
|
package com.synergy.jdbc.dao;
import java.util.List;
import com.synergy.jdbc.model.Employee;
//CRUD operations
public interface EmployeeDAO {
//Create
public int insertRecord(Employee emp);
//Update
public int updateRecord(Employee emp);
//Delete
public int deleteRecord(int empId);
//search
public Employee retrieveRecord(int empid);
//List
public List<Employee> retrieveAllRecord();
}
|
{
"content_hash": "85e1960953b83ac26f7c561b9386c978",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 43,
"avg_line_length": 19.19047619047619,
"alnum_prop": 0.7617866004962779,
"repo_name": "brijeshsmita/commons-spring",
"id": "c1a2c7d17e5b73cd50f4c8506471008c02540a99",
"size": "403",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "09JdbcTemplateMaven/src/main/java/com/synergy/jdbc/dao/EmployeeDAO.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "14677"
},
{
"name": "HTML",
"bytes": "75358"
},
{
"name": "Java",
"bytes": "352758"
},
{
"name": "JavaScript",
"bytes": "12060"
},
{
"name": "PLSQL",
"bytes": "3754"
}
],
"symlink_target": ""
}
|
<!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>[TED] We, the connected generation: David Shing at TEDxAthens – YU KAI'S BLOG</title>
<meta name="description" content="yu kai's blog">
<meta name="keywords" content="TED">
<!-- Open Graph -->
<meta property="og:locale" content="zh_TW">
<meta property="og:type" content="article">
<meta property="og:title" content="[TED] We, the connected generation: David Shing at TEDxAthens">
<meta property="og:description" content="yu kai's blog">
<meta property="og:url" content="//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html">
<meta property="og:site_name" content="YU KAI'S BLOG">
<link rel="canonical" href="//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html">
<link href="//joyhuang9473.github.io/feed.xml" type="application/atom+xml" rel="alternate" title="YU KAI'S BLOG Feed">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- For all browsers -->
<link rel="stylesheet" href="//joyhuang9473.github.io/assets/css/main.css">
<link rel="stylesheet" href="//joyhuang9473.github.io/assets/css/icard_resume.css">
<!-- Webfonts -->
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">
<meta http-equiv="cleartype" content="on">
<!-- Load Modernizr -->
<script src="//joyhuang9473.github.io/assets/js/vendor/modernizr-2.6.2.custom.min.js"></script>
<!-- Icons -->
<!-- 16x16 -->
<link rel="shortcut icon" href="//joyhuang9473.github.io/favicon.ico">
<!-- 32x32 -->
<link rel="shortcut icon" href="//joyhuang9473.github.io/favicon.png">
<!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices -->
<link rel="apple-touch-icon-precomposed" href="//joyhuang9473.github.io/images/apple-touch-icon-precomposed.png">
<!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="//joyhuang9473.github.io/images/apple-touch-icon-72x72-precomposed.png">
<!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch -->
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="//joyhuang9473.github.io/images/apple-touch-icon-114x114-precomposed.png">
<!-- 144x144 (precomposed) for iPad 3rd and 4th generation -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="//joyhuang9473.github.io/images/apple-touch-icon-144x144-precomposed.png">
</head>
<body id="post" >
<!--[if lt IE 9]><div class="upgrade"><strong><a href="http://whatbrowser.org/">Your browser is quite old!</strong> Why not upgrade to a different browser to better enjoy this site?</a></div><![endif]-->
<nav id="dl-menu" class="dl-menuwrapper" role="navigation">
<button class="dl-trigger">Open Menu</button>
<ul class="dl-menu">
<li><a href="//joyhuang9473.github.io/">Home</a></li>
<li>
<a href="#">About</a>
<ul class="dl-submenu">
<li>
<img src="http://i.imgur.com/IM68HzY.jpg" alt="YU-KAI HUANG photo" class="author-photo">
<h4>YU-KAI HUANG</h4>
<p>Hi! I'm a coder, interested in web, machine leaning, computer security and games.</p>
</li>
<li><a href="//joyhuang9473.github.io/about/"><span class="btn btn-inverse">Learn More</span></a></li>
<li>
<a href="mailto:joyhuang@ags.tw"><i class="fa fa-fw fa-envelope"></i> Email</a>
</li>
<li>
<a href="http://github.com/joyhuang9473"><i class="fa fa-fw fa-github"></i> GitHub</a>
</li>
</ul><!-- /.dl-submenu -->
</li>
<li>
<a href="#">Posts</a>
<ul class="dl-submenu">
<li><a href="//joyhuang9473.github.io/posts/">All Posts</a></li>
<li><a href="//joyhuang9473.github.io/tags/">All Tags</a></li>
<li><a href="//joyhuang9473.github.io/posts/ctf">CTF</a></li>
<li><a href="//joyhuang9473.github.io/posts/ted">TED</a></li>
<li><a href="//joyhuang9473.github.io/posts/gw2">GW2</a></li>
</ul>
</li>
<li>
<a href="#">Projects</a>
<ul class="dl-submenu">
<li><a href="//joyhuang9473.github.io/projects/">All Projects</a></li>
<li><a href="//joyhuang9473.github.io/projects/game">Game</a></li>
<li><a href="//joyhuang9473.github.io/projects/web">Web</a></li>
</ul>
</li>
</ul><!-- /.dl-menu -->
</nav><!-- /.dl-menuwrapper -->
<div id="main" role="main">
<article class="hentry">
<header class="header-title">
<div class="header-title-wrap">
<h1 class="entry-title"><a href="//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html" rel="bookmark" title="[TED] We, the connected generation: David Shing at TEDxAthens">[TED] We, the connected generation: David Shing at TEDxAthens</a></h1>
<h2><span class="entry-date date published"><time datetime="2014-04-25T15:25:00+08:00">April 25, 2014</time></span></h2>
</div><!-- /.header-title-wrap -->
</header>
<div class="entry-content">
<p>講者口才流利且有精美的簡報</p>
<hr />
<p>我們,一個連結的世代 (We, the connected generation: David Shing at TEDxAthens)</p>
<p><a href="https://www.youtube.com/watch?v=AQ8cpjEdpmI#t=823" title="We, the connected generation: David Shing at TEDxAthens">We, the connected generation: David Shing at TEDxAthens</a></p>
<footer class="entry-meta">
<span class="entry-tags"><a href="//joyhuang9473.github.io/tags/#TED" title="Pages tagged TED" class="tag"><span class="term">TED</span></a></span>
<div class="social-share">
<ul class="socialcount socialcount-small inline-list">
<li class="facebook"><a href="https://www.facebook.com/sharer/sharer.php?u=//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html" title="Share on Facebook"><span class="count"><i class="fa fa-facebook-square"></i> Like</span></a></li>
<li class="twitter"><a href="https://twitter.com/intent/tweet?text=//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html" title="Share on Twitter"><span class="count"><i class="fa fa-twitter-square"></i> Tweet</span></a></li>
<li class="googleplus"><a href="https://plus.google.com/share?url=//joyhuang9473.github.io/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html" title="Share on Google Plus"><span class="count"><i class="fa fa-google-plus-square"></i> +1</span></a></li>
</ul>
</div><!-- /.social-share -->
</footer>
</div><!-- /.entry-content -->
<section id="disqus_thread"></section><!-- /#disqus_thread -->
<div class="read-more">
<div class="read-more-header">
<a href="//joyhuang9473.github.io/2014/04/24/talent-and-choice.html" class="read-more-btn">Read More</a>
</div><!-- /.read-more-header -->
<div class="read-more-content">
<h3><a href="//joyhuang9473.github.io/post-machine-learning/2015/11/22/coursera-stanford-machine-learning-class-week7-assignment.html" title="Standord Machine Learning Class: Week7 Assignment">Standord Machine Learning Class: Week7 Assignment</a></h3>
<p>## ex6.m> you will be using support vector machines (SVMs) with various example 2D datasets.- Plot Data (in ex6data1.mat)![ex6_plotting_e...… <a href="//joyhuang9473.github.io/post-machine-learning/2015/11/22/coursera-stanford-machine-learning-class-week7-assignment.html">Continue reading</a></p>
</div><!-- /.read-more-content -->
<div class="read-more-list">
<div class="list-item">
<h4><a href="//joyhuang9473.github.io/post-machine-learning/2015/11/15/coursera-stanford-machine-learning-class-week6-assignment.html" title="Standord Machine Learning Class: Week6 Assignment">Standord Machine Learning Class: Week6 Assignment</a></h4>
<span>Published on November 15, 2015</span>
</div><!-- /.list-item -->
<div class="list-item">
<h4><a href="//joyhuang9473.github.io/post-machine-learning/2015/11/08/coursera-stanford-machine-learning-class-week5-assignment.html" title="Standord Machine Learning Class: Week5 Assignment">Standord Machine Learning Class: Week5 Assignment</a></h4>
<span>Published on November 08, 2015</span>
</div><!-- /.list-item -->
</div><!-- /.read-more-list -->
</div><!-- /.read-more -->
</article>
</div><!-- /#main -->
<div style="margin-top:0px;padding:0px;background:none;box-shadow:none" class="entry-content">
<!-- general advertisement -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-4665795394568321"
data-ad-slot="2959368090"
data-ad-format="auto"></ins>
</div>
<div class="footer-wrapper">
<footer role="contentinfo">
<span>© 2015 YU-KAI HUANG. Powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> using the <a href="https://mademistakes.com/work/hpstr-jekyll-theme/" rel="nofollow">HPSTR Theme</a>.</span>
<p><img src="https://ga-beacon.appspot.com/UA-65353378-3/joyhuang9473.github.io/[TED] We, the connected generation: David Shing at TEDxAthens" alt="Analytics"></p>
</footer>
</div><!-- /.footer-wrapper -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="//joyhuang9473.github.io/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="//joyhuang9473.github.io/assets/js/scripts.min.js"></script>
<!-- Asynchronous Google Analytics snippet -->
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
// Required: on line below, replace text in quotes with your forum shortname
var disqus_shortname = 'joyhuang9473';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
<!-- Google Adsense -->
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</body>
</html>
|
{
"content_hash": "0daa7a04a1709ea8c5ffeb5d38da703e",
"timestamp": "",
"source": "github",
"line_count": 233,
"max_line_length": 313,
"avg_line_length": 47.23175965665236,
"alnum_prop": 0.6682417083144025,
"repo_name": "joyhuang9473/joyhuang9473.github.io",
"id": "e8580375ece93b6479bc576763226cf4c977dad0",
"size": "11051",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_site/2014/04/25/ted-we-the-connected-generation-david-shing-at-tedxathens.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "57344"
},
{
"name": "HTML",
"bytes": "3534256"
},
{
"name": "JavaScript",
"bytes": "132884"
},
{
"name": "Ruby",
"bytes": "4916"
}
],
"symlink_target": ""
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-tap-highlight" content="no">
<meta name="description" content="Materialize is a modern responsive CSS framework based on Material Design by Google. ">
<title>Experience</title>
<!-- Favicons-->
<link rel="apple-touch-icon-precomposed" href="images/favicon/apple-touch-icon-152x152.png">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="images/favicon/mstile-144x144.png">
<link rel="icon" href="images/favicon/favicon-32x32.png" sizes="32x32">
<!-- Android 5 Chrome Color-->
<meta name="theme-color" content="#EE6E73">
<!-- CSS-->
<link href="css/prism.css" rel="stylesheet">
<link href="css/ghpages-materialize.css" type="text/css" rel="stylesheet" media="screen,projection">
<link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
<script src="//cdn.transifex.com/live.js"></script>
</head>
<body>
<header>
<div class="container"><a href="#" data-activates="nav-mobile" class="button-collapse top-nav"><i class="mdi-navigation-menu"></i></a></div>
<ul id="nav-mobile" class="side-nav fixed">
<li class="logo"><a id="logo-container" href="http://edwardzhu.me/google-material-design" class="brand-logo">
<img src="//material-design.storage.googleapis.com/images/Google_Logo.svg" alt="Google logo"></a></li>
<li class="bold"><a href="about.html" class="waves-effect waves-teal">About</a></li>
<li class="bold"><a href="reason.html" class="waves-effect waves-teal">Why?</a></li>
<li class="no-padding">
<ul class="collapsible collapsible-accordion">
<li class="bold"><a class="collapsible-header waves-effect waves-teal">Environment</a>
<div class="collapsible-body">
<ul>
<li><a href="3dworld.html">3D World</a></li>
<li><a href="properties.html">Properties</a></li>
</ul>
</div>
</li>
<li class="bold"><a class="collapsible-header waves-effect waves-teal">Animations</a>
<div class="collapsible-body">
<ul>
<li><a href="interactions.html">Interactions</a></li>
<li><a href="transitions.html">Transitions</a></li>
<li><a href="details.html">Details</a></li>
</ul>
</div>
</li>
</ul>
</li>
<li class="bold active"><a href="experience.html" class="waves-effect waves-teal">Experience</a></li>
</ul>
</header>
<main><div class="section" id="index-banner">
<div class="container">
<div class="row">
<div class="col s12 m9">
<h1 class="header center-on-small-only">Experience</h1>
<h4 class ="light red-text text-lighten-4 center-on-small-only">Checkout Material Design in Action.</h4>
</div>
</div>
</div>
</div>
<div class="container">
<!-- Outer row -->
<div class="row">
<div class="col s12 m9 l10">
<!-- Material Design -->
<div id="showcase" class="section scrollspy">
<video width="100%" height="100%" autoplay loop>
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B2wX4iIvu8L6aHVOOGxBOW5jZlE/animation-meaningfultransitions-visualcontinuity_music-tablet-01_xhdpi.webm" type="video/webm">
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B2wX4iIvu8L6WlhSSjR4LTZULUk/animation-meaningfultransitions-visualcontinuity_music-tablet-01_xhdpi.mp4" type="video/mp4">
</video>
<div class="row">
<div class="col s12 m6">
<div class="center promo">
<img src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7TGVDMFY1NkRZaEk/style_color_uiapplication_accent1.png" width="100%" height="100%">
</div>
</div>
<div class="col s12 m6">
<div class="center promo">
<img src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7SWg0OXBvdGNDdEk/style_color_uiapplication_accent2.png" width="100%" height="100%">
</div>
</div>
</div>
<div class="row">
<div class="col s12 m6">
<div class="center promo">
<video width="100%" height="100%" autoplay loop>
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B0NGgBg38lWWdjdXZUtDc2szc2c/animation-responsiveinteraction-surfacereaction-030202_TouchRipple_PressRelease_xhdpi_002.webm" type="video/webm">
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B0NGgBg38lWWMndwZm1ScmlEY1U/animation-responsiveinteraction-surfacereaction-030202_TouchRipple_PressRelease_xhdpi_002.mp4" type="video/mp4">
</video>
</div>
</div>
<div class="col s12 m6">
<div class="center promo">
<video width="100%" height="100%" autoplay loop>
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B0NGgBg38lWWZGIxcG5melFNSVE/animation-responsiveinteraction-surfacereaction-030202_TouchRipple_DragRelease_xhdpi_002.webm" type="video/webm">
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B0NGgBg38lWWZmNTSmxsdXd5SGM/animation-responsiveinteraction-surfacereaction-030202_TouchRipple_DragRelease_xhdpi_002.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
<div class="row">
<div class="col s12 m6">
<div class="center promo">
<video width="100%" height="100%" autoplay loop>
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B08MbvYZK1iNWG5ldFpTU3VDd1E/animation-DelightfulDetails-DelightfulDetails-WellCrafted_v01_large_xhdpi.webm" type="video/webm">
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B08MbvYZK1iNZk1zbFZfSXI2Snc/animation-DelightfulDetails-DelightfulDetails-WellCrafted_v01_large_xhdpi.mp4" type="video/mp4">
</video>
</div>
</div>
<div class="col s12 m6">
<div class="center promo">
<video width="100%" height="100%" autoplay loop>
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B2wX4iIvu8L6ZHZfV1NfRHdCZHM/animation-delightfuldetails-030401_Status_Change_xhdpi_003.webm" type="video/webm">
<source src="//material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B2wX4iIvu8L6eVd5SmhJUTZxWVk/animation-delightfuldetails-030401_Status_Change_xhdpi_003.mp4" type="video/mp4">
</video>
</div>
</div>
</div>
<!-- END -->
</div>
</div>
<!-- Table of Contents -->
<div class="col hide-on-small-only m3 l2">
<div class="toc-wrapper">
<div style="height: 1px;">
<ul class="section table-of-contents">
<li><a href="#showcase">Showcase</a></li>
</ul>
</div>
</div>
</div>
</div>
</div> <!-- End Container -->
</main>
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col l4 s12">
<h5 class="white-text">About the Writer</h5>
<p class="grey-text text-lighten-4">My name is Edward Zhu, and I am currently a student at University of Colorado, Boulder. This is a writing project on analyzing the "design" of something for WRTG 3035 Technical Communication and Design taught by Petger Schaberg during Spring 2015.</p>
</div>
<div class="col l4 s12">
<h5 class="white-text">How I Made this Site.</h5>
<p class="grey-text text-lighten-4">I am very thankful for an open source project created by a group of students that have compiled material design into css formatting so creating this site was a smooth and easy process Check out the GitHub Repo to the open sourced project below!</p>
<iframe src="http://ghbtns.com/github-btn.html?user=dogfalo&repo=materialize&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
</div>
<div class="col l4 s12" style="overflow: hidden;">
<h5 class="white-text">Connect with Me</h5>
<a href="https://twitter.com/edwardisasian" class="twitter-follow-button" data-show-count="true" data-size="large" data-dnt="true">Follow @edwardisasian</a>
<br>
<a class="btn waves-effect waves-light red lighten-3" target="_blank" href="http://www.edwardzhu.me">My Personal Site</a>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
© 2015 Edward Zhu, All rights reserved.
<a class="grey-text text-lighten-4 right" href="https://github.com/Dogfalo/materialize/blob/master/LICENSE">MIT License</a>
</div>
</div>
</footer>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>if (!window.jQuery) { document.write('<script src="bin/jquery-2.1.1.min.js"><\/script>'); }
</script>
<script src="js/jquery.timeago.min.js"></script>
<script src="js/prism.js"></script>
<script src="bin/materialize.js"></script>
<script src="js/init.js"></script>
<!-- Twitter Button -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
<!-- Google Plus Button-->
<script src="https://apis.google.com/js/platform.js" async defer></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56218128-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
</body>
</html>
|
{
"content_hash": "410160b52e331addd21ab74cce196dcb",
"timestamp": "",
"source": "github",
"line_count": 292,
"max_line_length": 299,
"avg_line_length": 38.53767123287671,
"alnum_prop": 0.6162801030836221,
"repo_name": "zhued/google-material-design",
"id": "d11d08db7891f7e3c083cf9402ccff2c6d6dab75",
"size": "11254",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "experience.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "720776"
},
{
"name": "HTML",
"bytes": "509279"
},
{
"name": "JavaScript",
"bytes": "450340"
}
],
"symlink_target": ""
}
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">ViewPager</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="title_template_step">Step %1$d Lorem
Ipsum</string>
</resources>
|
{
"content_hash": "fb97efea0ec0ae5b30fd72882392a7d4",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 54,
"avg_line_length": 30.1,
"alnum_prop": 0.654485049833887,
"repo_name": "jiahaoliuliu/ViewPager",
"id": "4e0f695bc9d07cfce0237775f2f2b26a8047398b",
"size": "301",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "res/values/strings.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "9033"
}
],
"symlink_target": ""
}
|
/****************************************************************************/
/**
* @file XMLElement.h
* @author Naohisa Sakamoto
*/
/****************************************************************************/
#ifndef KVS__XML_ELEMENT_H_INCLUDE
#define KVS__XML_ELEMENT_H_INCLUDE
#include "TinyXML.h"
#include <string>
#include <kvs/String>
namespace kvs
{
/*==========================================================================*/
/**
* XML element class.
*/
/*==========================================================================*/
class XMLElement : public TiXmlElement
{
public:
typedef TiXmlElement SuperClass;
public:
XMLElement( const std::string& value );
virtual ~XMLElement();
public:
TiXmlNode* insert( const TiXmlNode& node );
template <typename T>
void setAttribute( const std::string& name, const T& value )
{
SuperClass::SetAttribute( name, kvs::String::From( value ) );
}
public:
static const std::string AttributeValue( const TiXmlElement* element, const std::string& name );
};
} // end of namespace kvs
#endif // KVS__XML_ELEMENT_H_INCLUDE
|
{
"content_hash": "94b93cb6637361519c9b48cfd01a1b9d",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 100,
"avg_line_length": 22.333333333333332,
"alnum_prop": 0.48375768217734855,
"repo_name": "naohisas/KVS",
"id": "16ccf85ef92914c3fa6fec7c58c4c2ba94360a10",
"size": "1139",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "Source/Core/FileFormat/XML/XMLElement.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "1226831"
},
{
"name": "C++",
"bytes": "7219103"
},
{
"name": "CMake",
"bytes": "16176"
},
{
"name": "GLSL",
"bytes": "169334"
},
{
"name": "Makefile",
"bytes": "145951"
},
{
"name": "Python",
"bytes": "14182"
},
{
"name": "QMake",
"bytes": "5029"
},
{
"name": "Shell",
"bytes": "3023"
}
],
"symlink_target": ""
}
|
using System;
using System.Collections.Generic;
using System.Text;
using static System.String;
public class Robot
{
private static readonly HashSet<string> Registry = new HashSet<string>();
private static readonly Random Generator = new Random();
private string _name = Empty;
public string Name
{
get
{
if (this._name.Length != 0)
{
return this._name;
}
Name = generateId();
// we need to make sure that the name is unique using the registry
while (Registry.Contains(this._name))
{
Name = generateId();
}
Registry.Add(this._name);
return this._name;
}
private set => this._name = value;
}
public void Reset()
{
Registry.Remove(Name);
Name = Empty;
}
private string generateId()
{
const int offset = 26;
// 1st uppercase letter
char c1 = (char)Robot.Generator.Next('A', 'A' + offset);
// 2nd uppercase letter
char c2 = (char)Robot.Generator.Next('A', 'A' + offset);
// 3 random digits
int digits3 = Robot.Generator.Next(100, 999);
var id = new StringBuilder();
return id.Append(c1).Append(c2).Append(digits3).ToString();
}
}
|
{
"content_hash": "1c0468a124e7bec954151c227caed75b",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 78,
"avg_line_length": 25.49056603773585,
"alnum_prop": 0.5440414507772021,
"repo_name": "stanciua/exercism",
"id": "49d67cffbb8a4cf232ad71a166e5087f5660c315",
"size": "1351",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "csharp/robot-name/RobotName.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "90652"
},
{
"name": "JavaScript",
"bytes": "37485"
},
{
"name": "Rust",
"bytes": "189791"
},
{
"name": "Scala",
"bytes": "52938"
},
{
"name": "Shell",
"bytes": "79076"
}
],
"symlink_target": ""
}
|
namespace Mediator
{
public class Fokker : Aircraft
{
public Fokker(string callSign, IAirTrafficControl atc) : base(callSign, atc)
{
}
public override int Ceiling
{
get { return 40000; }
}
}
}
|
{
"content_hash": "336c0a8bf12d4483aa2dbda03f134e49",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 84,
"avg_line_length": 19,
"alnum_prop": 0.5338345864661654,
"repo_name": "jplopes/Patterns",
"id": "e97b0bfdc969b07086e75e29da3130adae3a3dd6",
"size": "268",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Patterns/Mediator/Fokker.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "78262"
}
],
"symlink_target": ""
}
|
<div class="modal-header">
<h3 class="modal-title">警告</h3>
</div>
<div class="modal-body">
<form name="confirmForm" novalidate>
<div class="form-group">
<input name="boardName" ng-model="boardName" type="text" class="form-control"
ng-keydown="keyPress($event)" focus="displayForm" placeholder="输入看板名称以确认删除" autocomplete="off"
required/>
<div class="validation-error-message"
ng-show="confirmForm.boardName.$error.required && confirmForm.boardName.$dirty">
请输入看板名称
</div>
<div class="validation-error-message"
ng-show="confirmForm.boardName.$modelValue!=board.name && confirmForm.boardName.$dirty">
看板名称与待删除的不一致
</div>
</div>
</form>
</div>
<div class="modal-footer" ng-keydown="keyPress($event)">
<button class="btn btn-danger" type="button" ng-click="ok()"
ng-disabled="confirmForm.$invalid||confirmForm.boardName.$modelValue!=board.name">删除
</button>
<button class="btn thiki-secondary-button" type="button" ng-click="cancel()">放弃</button>
</div>
|
{
"content_hash": "04c512889ad50bad261d5377cfa60623",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 113,
"avg_line_length": 43.18518518518518,
"alnum_prop": 0.6020583190394511,
"repo_name": "thiki-org/thiki-kanban-web",
"id": "e50692cc27e64826bc7d7d784aa0b6914aa71fe7",
"size": "1238",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "kanban/component/board/partials/delete-board-confirm.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "87074"
},
{
"name": "HTML",
"bytes": "134085"
},
{
"name": "JavaScript",
"bytes": "277832"
},
{
"name": "Shell",
"bytes": "181"
}
],
"symlink_target": ""
}
|
package brap.form;
import static brap.form.FormConstants.*;
import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
import brap.tool.Utils;
public class FormElement {
private WebElement parent = null;
private WebElement element = null;
private Form form;
// Four information about a form field
private String type;
private String name;
private String id;
private String tagName;
private boolean isDisplayed;
private Point location;
private String position;
private String text;
private String label = "";
private String help = "";
private List<String> values;
private String selectedValue = "";
public FormElement() {
initialize(null);
}
public FormElement(WebElement e) {
initialize(e);
}
private void initialize(WebElement we) {
element = we;
values = new ArrayList<String>();
label = "";
help = "";
selectedValue = "";
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTagName() {
return tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public Point getLocation() {
return location;
}
public void setLocation(Point location) {
this.location = location;
}
public String getPosition() {
return position;
}
public void setPosition(String position) {
this.position = position;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public void setDisplayed(boolean isDisplayed) {
this.isDisplayed = isDisplayed;
}
public String getHelp() {
return help;
}
public void setHelp(String help) {
this.help = help;
}
public List<String> getValues() {
return values;
}
public void setValues(List<String> values) {
this.values = values;
}
public void setType(String type) {
this.type = type;
}
public String getLabel() {
return label;
}
public void setLabel(String predictedLabel) {
this.label = predictedLabel;
}
public void setElement(WebElement element) {
this.element = element;
this.type= computeType(element);
}
public void setSelectedValue(String val) {
selectedValue = val;
selectedValue = selectedValue.replaceAll("-.*$", "");
}
public String getSelectedValue() {
return selectedValue;
}
public void addValue(String val) {
this.values.add(val);
}
public String getValAt(int index) {
return this.values.get(index);
}
public Form getForm() {
return form;
}
public void setForm(Form form) {
this.form = form;
}
public WebElement getParent() {
return parent;
}
public void setParent(WebElement parent) {
this.parent = parent;
}
public WebElement getElement() {
return element;
}
public String getType() {
return type;
}
/**
* Computes the type of the given element
* @param elmt
* @return
*/
public static String computeType(WebElement elmt){
String type="";
type = "UNKNOWN";
String tagName = "";
try {
type = elmt.getAttribute("type");
tagName = elmt.getTagName();
} catch (Exception e) {
}
return getElementType(tagName,type);
}
public void computeType(){
this.type=getElementType(this.tagName,this.type);
}
public static String getElementType(String tagName,String type){
String elType = "UNKNOWN";
if (type.equalsIgnoreCase(TEXT)) {
elType = TEXT;
} else if (type.equalsIgnoreCase(TEXTAREA)) {
elType = TEXTAREA;
} else if (type.equalsIgnoreCase(RADIO)) {
elType = RADIO;
} else if (type.equalsIgnoreCase(CHECKBOX)) {
elType = CHECKBOX;
} else if (tagName.equalsIgnoreCase(A)) {
elType = A;
} else if (tagName.equalsIgnoreCase(SELECT) || tagName.equalsIgnoreCase(SELECT_ONE)) {
elType = SELECT;
} else if (type.equalsIgnoreCase(HIDDEN)) {
elType = HIDDEN;
}
return elType;
}
/**
* Element is visible if it is displayed or has x or y coordinate greater
* than 0.
*
* @return
*/
public boolean isDisplayed() {
boolean result = this.isDisplayed;
if (this.getTagName().equalsIgnoreCase("select")) {
result = this.isDisplayed || this.getLocation().x > 0
|| this.getLocation().y > 0;
}
return result;
}
public String getCSDescription() {
String elementText = this.getText().trim().replaceAll("\\s+", " ");
if (elementText != null && elementText.length() > 0) {
int len = elementText.length() > 15 ? 15 : elementText.length();
elementText = elementText.substring(0, len) + "...";
}
StringBuffer valS = new StringBuffer();
for(String val: values) {
valS.append("; " + val);
}
String vals = new String(valS);
vals = vals.replaceAll("^\\s*;\\s*", "");
vals = vals.replaceAll("\\s+", " ");
StringBuffer sb = new StringBuffer();
sb.append(this.getTagName());
sb.append("\t" + this.getType());
sb.append("\t" + this.getName());
sb.append("\t" + this.getId());
sb.append("\t" + this.isDisplayed() );
sb.append("\t" + this.getLocation().toString());
sb.append("\t" + elementText);
sb.append("\t" + vals);
sb.append("\t" + selectedValue.replaceAll("\\s+", " "));
return sb.toString();
}
public String getMySignature(){
StringBuffer bw = new StringBuffer();
bw.append(getElement().getTagName()+"_");
bw.append(Utils.getAttribute(getElement(), "type")+"_");
bw.append(Utils.getAttribute(getElement(), "id")+"_");
String elementText = element.getText().trim().replaceAll("\\s+", " ");
if (elementText != null && elementText.length() > 0) {
int len = elementText.length() > 15 ? 15 : elementText.length();
elementText = elementText.substring(0, len) + "...";
bw.append(Utils.getAttribute(getElement(), elementText));
}
return bw.toString();
}
}
|
{
"content_hash": "692e1ff74693270c0cac6aca5ef906be",
"timestamp": "",
"source": "github",
"line_count": 281,
"max_line_length": 88,
"avg_line_length": 20.80782918149466,
"alnum_prop": 0.6652984436463143,
"repo_name": "nobal/BRAP",
"id": "eb5b4d98a2039d6874b3c9d086d75060cb358f2a",
"size": "5847",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/brap/form/FormElement.java",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "Java",
"bytes": "83258"
},
{
"name": "JavaScript",
"bytes": "9668"
}
],
"symlink_target": ""
}
|
{% extends "govuk_template_unbranded.html" %}
{% block head %}
<link href="/public/stylesheets/vouch_v1.css" media="screen" rel="stylesheet" type="text/css" />
{% endblock %}
{% block content %}
<main id="content" role="main">
<div class="phase-banner"><p>
<strong class="phase-tag">PROTOTYPE</strong>
<span>This is a test site - if you've arrived at this page by mistake, go to <a href="/feedback">GOV.UK</a></span>
</p></div>
<div class="grid-row">
<div class="column-two-thirds">
{% block left_col %}{% endblock %}
</div><!-- column -->
<div class="column-third">
</div><!-- column -->
</div><!-- row -->
</main>
{% endblock %}
|
{
"content_hash": "b572a47e618fd698a872cadf987a53a4",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 118,
"avg_line_length": 30.636363636363637,
"alnum_prop": 0.5979228486646885,
"repo_name": "dwpdigitaltech/healthanddisability",
"id": "9a46bda3e02239c19fc24c5553f0d1fa02cb701b",
"size": "674",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/views/vouch/inc/layout_blank.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "58296"
},
{
"name": "HTML",
"bytes": "934977"
},
{
"name": "JavaScript",
"bytes": "66322"
},
{
"name": "Shell",
"bytes": "1495"
}
],
"symlink_target": ""
}
|
require "test_helper"
module API
class HealthCareTest < Minitest::Test
def setup
@health_care_json = {
"id": "28e6cd77715c",
"distritoVinculo": "DISTRITO NOROESTE",
"municipio": "CAMPINAS",
"uf": "SAO PAULO",
"localAtendimento": "CENTRO DE SAUDE JARDIM FLORENCE",
"distritoAtendimento": "DISTRITO NOROESTE",
"dataAtendimento": "2012-12-20T03:00:00.000Z",
"codigoTipoAtendimento": "00",
"descricaoTipoAtendimento": "SEM RESTRICAO DE TIPO DE ATENDIMENTO",
"descricaoGrupoAtendimento": "OUTROS GRUPOS",
"codigoGrupoAtendimentoSUS": "99",
"ocupacaoProfissional": "TERAPEUTA OCUPACIONAL - ESPECIALISTA EM ORIENTAÇÃO E MOBILIDADE DE DEFICIENTES VISUAIS , PERIPATOLOGISTA , PROFESSOR EM ORIENTAÇÃO E MOBILIDADE DE DEFICIENTES VISUAIS.",
"descricaoTipoVinculoSMS": "NÃO INFORMADO",
"codigoProcedimentoSUS": "030104004",
"descricaoProcedimento": "TERAPIA INDIVIDUAL",
"codigoAtividadeProfissionalSUS": "57",
"descricaoAtividadeProfissional": "TERAPEUTA OCUPACIONAL",
"sexo": "FEMININO",
"idade": " 11 anos ",
"hora": "09H",
"periodo": "MANHA",
"dataNascimento": "2001-07-28T03:00:00.000Z",
"quantidadeRealizada": 1
}
end
def test_parse_hora_atendimento
data_hora = DateTime.parse "2012-12-20 09:00"
assert_equal data_hora, API::HealthCare.send(:parse_hora_atendimento ,@health_care_json)
end
def test_parse_locale
locale = API::HealthCare.send(:parse_locale, @health_care_json)
assert_equal @health_care_json[:distritoAtendimento], locale.distrito_atendimento
end
def test_dont_duplicate_locale
locale = API::HealthCare.send(:parse_locale, @health_care_json)
locale = API::HealthCare.send(:parse_locale, @health_care_json)
assert_equal 1, Locale.count
end
def test_parse_health_care
health_care = API::HealthCare.send(:parse_health_care, @health_care_json)
assert_equal @health_care_json[:id], health_care.origin_id
end
def test_parse_health_care_correct_locale
health_care = API::HealthCare.send(:parse_health_care, @health_care_json)
assert_equal @health_care_json[:distritoAtendimento], health_care.locale.distrito_atendimento
end
end
end
|
{
"content_hash": "414b187853efe0b01cf9fa52c8845107",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 202,
"avg_line_length": 40.6551724137931,
"alnum_prop": 0.6675148430873622,
"repo_name": "IMA-Hackathon-Boots/smsc-api",
"id": "28422830834ba410587bf375f1a67077142342de",
"size": "2363",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/models/api/health_care_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "38088"
}
],
"symlink_target": ""
}
|
"use strict";
var
message = process.env.MESSAGE,
eventStream = require("event-stream"),
glob = require("tsconfig-glob"),
gulp = require("gulp"),
replace = require("gulp-replace"),
runSequence = require("run-sequence"),
shell = require("gulp-shell"),
sourcemaps = require("gulp-sourcemaps"),
tscconfigDev = require("./tsconfig.json"),
tslint = require('gulp-tslint'),
typescript = require("gulp-typescript");
// Entry point into the gulp build tasks.
// gulp.task("build-all", ['install-typings', 'glob', 'tslint', 'tsc']);
// sequence for build.
gulp.task("build-all", function(callback) {
runSequence("glob", "tslint", "tsc", callback);
return;
});
// update the tsconfig files based on the glob pattern
gulp.task('glob', function () {
return glob({
configPath: '.',
configFileName: "tsconfig.json",
indent: 2
});
});
// linting
gulp.task('tslint', function() {
return gulp.src('src/**/*.ts')
.pipe(tslint())
.pipe(tslint.report('verbose', {
emitError: true
}));
});
// Compile typescript sources
gulp.task('tsc', function() {
var result = gulp
.src(tscconfigDev.files)
.pipe(typescript(tscconfigDev.compilerOptions));
return eventStream.merge(
result.dts.pipe(gulp.dest("lib")),
result.js.pipe(gulp.dest("lib"))
);
});
gulp.task("install-typings",function(){
return gulp.src("./typings.json", {read: false})
.pipe(shell([
"npm run typings install"
]));
});
// tokenise the pointer to the API from the client.
gulp.task("tokenize", function(){
if (!message) {
return;
}
gulp.src(["lib/routes.js"])
.pipe(replace("Heroku World", message))
.pipe(gulp.dest("./lib"));
});
|
{
"content_hash": "f749222a45341e4346de529502f3392d",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 72,
"avg_line_length": 24.175675675675677,
"alnum_prop": 0.6042481833426495,
"repo_name": "345andrew/heroku-world",
"id": "e254d6f48c72cfc3cff6aaa715826ea82db61816",
"size": "1789",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gulpfile.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "1789"
},
{
"name": "TypeScript",
"bytes": "1984"
}
],
"symlink_target": ""
}
|
export const ADD_POINT = 'ADD_POINT';
export const LOAD_POINTS = 'LOAD_POINTS';
export const RECALCULATE_POINTS = 'RECALCULATE_POINTS';
|
{
"content_hash": "a9f3e3192d6ebc4494e7435bc148973d",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 55,
"avg_line_length": 23.166666666666668,
"alnum_prop": 0.7410071942446043,
"repo_name": "jarick/didji",
"id": "437ec78dde08e7c147c1adf75026663b68f7c22d",
"size": "140",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client/src/contracts/points.contracts.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1455"
},
{
"name": "HTML",
"bytes": "1137"
},
{
"name": "JavaScript",
"bytes": "28332"
}
],
"symlink_target": ""
}
|
<!DOCTYPE html>
<html>
<head lang="zh">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" />
<title>kopi/logging</title>
<link href="/css/qunit.css" media="screen" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/js/sea.js"></script>
<script type="text/javascript">
seajs.use(["kopi/tests/logging"]);
</script>
</head>
<body>
<h1 id="qunit-header">kopi/logging</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="main"></div>
<div id="container"></div>
</body>
</html>
|
{
"content_hash": "c3b0445095886e8a0ae6dcbb4eb83344",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 113,
"avg_line_length": 32.80952380952381,
"alnum_prop": 0.602322206095791,
"repo_name": "wuyuntao/kopi",
"id": "c39c70420e38e42bcf82a5d33c21633672aeb80d",
"size": "689",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/kopi/logging.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "321798"
},
{
"name": "JavaScript",
"bytes": "199146"
},
{
"name": "Python",
"bytes": "9910"
},
{
"name": "Ruby",
"bytes": "1260"
},
{
"name": "Shell",
"bytes": "192"
}
],
"symlink_target": ""
}
|
describe("NinjsApplication", function() {
var app;
beforeEach(function() {
app = new NinjsApplication('myapp');
});
afterEach(function() {
app = undefined;
});
it("should create a ninjs application object", function() {
expect(is_defined(app)).toBeTruthy();
expect(is_typeof(NinjsApplication, app)).toBeTruthy();
});
it("should create a NinjsModule", function() {
app.add_module('mymod');
expect(is_typeof(NinjsModule, app.mymod)).toBeTruthy();
});
});
|
{
"content_hash": "dc7e0c4464cd80ef184e44813f9b804d",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 61,
"avg_line_length": 22.818181818181817,
"alnum_prop": 0.6414342629482072,
"repo_name": "daytonn/ninjs-framework",
"id": "8b11da756d21bb9960aae1919032f02770342fd7",
"size": "502",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "spec/javascripts/application_spec.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4240"
},
{
"name": "HTML",
"bytes": "6351"
},
{
"name": "JavaScript",
"bytes": "190905"
},
{
"name": "Ruby",
"bytes": "26456"
}
],
"symlink_target": ""
}
|
/**
** @file tcDamageModel.h
*/
/*
** Copyright (c) 2014, GCBLUE PROJECT
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
**
** 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
**
** 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
** documentation and/or other materials provided with the distribution.
**
** 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from
** this software without specific prior written permission.
**
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
** NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
** HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
** IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _TCDAMAGEMODEL_H_
#define _TCDAMAGEMODEL_H_
#ifdef WIN32
#pragma once
#endif
class tcGameObject;
class tcWeaponObject;
class tcBallisticWeapon;
namespace database
{
class tcDatabase;
class tcWeaponDamage;
}
struct Damage
{
bool isPenetration; // weap can penetrate, if false ignore explosive dmg
float kinetic_J; // kin energy impact damage
float explosive_kg; // damage from internal explosion when weap penetrates
float blast_psi;
float waterBlast_psi; // underwater blast
float thermal_J_cm2;
float fragHits;
float fragEnergy_J;
void Clear();
};
/**
* Singleton class for advanced damage modeling
*/
class tcDamageModel
{
public:
/// details of fragmenting weapon
struct FragWeapon
{
float charge_kg; ///< equivalent kg TNT
float metal_kg; ///< total mass of fragmenting metal
float fragment_kg; ///< mass of single fragment
float spread_factor; ///< 1 = isotropic, 0.5 hemisphere, etc
};
struct FragHits
{
float hits; ///< number of hits (poisson actual, not average)
float ke_J; ///< fragment impact kinetic energy [J]
float v_mps; ///< fragment impact speed
};
void CalculateTotalDamage(tcWeaponObject* weapon, tcGameObject* target, Damage& damage);
void CalculateTotalDamageCluster(tcBallisticWeapon* ballistic, tcGameObject* target, Damage& damage);
float CalculateBlastOverpressure(float range_m, float w_kg) const;
float CalculateWaterBlastOverpressure(float range_m, float w_kg) const;
FragHits CalculateFragmentImpact(float range_m, float altitude_m, const FragWeapon& weap, float targetArea_m2) const;
float CalculateRadiationIntensity(float range_m, float w_kg) const;
const database::tcWeaponDamage* GetWeaponDamageModel(tcWeaponObject* weapon) const;
static tcDamageModel* Get();
private:
database::tcDatabase* database;
tcDamageModel();
virtual ~tcDamageModel();
};
#endif
|
{
"content_hash": "52c41274c40291624e3af52692bfea67",
"timestamp": "",
"source": "github",
"line_count": 103,
"max_line_length": 146,
"avg_line_length": 34.90291262135922,
"alnum_prop": 0.733240611961057,
"repo_name": "gcblue/gcblue",
"id": "05219cb58461cd54279acedf32ae52a620efe59d",
"size": "3595",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "include/sim/tcDamageModel.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "173"
},
{
"name": "C",
"bytes": "18820"
},
{
"name": "C++",
"bytes": "6366459"
},
{
"name": "GLSL",
"bytes": "13139"
},
{
"name": "Groff",
"bytes": "21"
},
{
"name": "HTML",
"bytes": "111577"
},
{
"name": "NSIS",
"bytes": "13115"
},
{
"name": "Python",
"bytes": "10484037"
},
{
"name": "R",
"bytes": "2528"
},
{
"name": "Visual Basic",
"bytes": "481"
}
],
"symlink_target": ""
}
|
title: "Chattanooga Coffee Shops"
layout: post
date: 2019-03-09 12:00
headerImage: false
tag:
- coffee
- chattanooga
category: blog
author: trentonshell
---
I've been living in the Chattanooga area to go to school for nearly four years, now, and I'm intending on staying for much longer to start working full-time doing software development and help out at my [church][1]. One of the my favorite parts of living in this city has been trying out the many local coffee shops. They serve many purposes in my life: for studying, for dates, for meetings, and even for local events. Some locations excel in one specific area, which makes for a great diversity. Here are some of my top shops, in no particular order.
# Favorites
## [Goodman Coffee Roasters][2]
This is a newer location, but headed up by a master roaster Ian Goodman, founder of Greyfriar’s Coffee and Tea back in 1995 (which I sadly still have not been to). It's located in the Warehouse Row district, close to the downtown area. I love that they always have a selection of different roasts to try if you get a normal drip coffee (with a free refill, so you can try two different kinds). My wife loved their caramel sauce she put in her cappuccino (even though she typically prefers it without anything added). I highly recommend Goodman's for its cozy atmosphere and excellent coffee.
## [Mean Mug][3]
Mean Mug has never once disappointed me. They are a local favorite and the place that I've met others most frequently. It's far away enough from downtown that it's almost never been too busy for me to find a seat, and the atmosphere is perfect for casual conversations or getting stuff done. It used to get its coffee from Velo Roasters, but recently has moved to roasting their own. I really enjoy the decor in the place as well. They recently opened a second location in North Shore, which captures a very similar vibe. Mean Mug is the platonic ideal of a locally-owned coffee shop.
## [Velo Coffee Roasters][4]
Velo is probably my favorite location on this list, if for nothing else it literally provides that "hole-in-the-wall" experience. Walking into the roaster takes you through a brick-wall archway to a nice little garden area, through which you can enter through a side door. Without the sign pointing to the roaster you'd never know it was here, which I think really adds to the charm. This place is a coffee nerd's dream. They have cuppings (coffee tastings), brewing gear for sale, and some of the most unique drink combinations in town. One of my favorites is a cold-brew drink that has hops and a scoop of ice cream (order the Bunny Hop). Velo is truly unique and delicious.
## [Rembrandt’s][5]
This is probably my top recommendation for a coffee-house date. The location resembles a European style café and is in line with the rest of the art-district's vibes. Sophie and I went here the night after I proposed for a late-night tea. Their outdoor seating especially provides a lovely experience. The only problem with Rembrandt's is the busyness you'll probably encounter since it's in the heart of the tourist territory, but if you come on a weekday or less packed time you're sure to have a pleasant time.
## [The Mad Priest][6]
I've only been here once, but I'm glad to see the recent opening of Mad Priest's full location, since their [roaster's location][7] has almost no seating. Mad Priest is really emphasizing the role that coffee shops have in connecting people and impacting the community. Their roaster location has hired displaced refugees from Chattanooga, and is still working to educate those in the local community in the art of coffee roasting, brewing, and tasting. Their new location has scheduled community events that I'm hoping to check out, including live music, and chess nights. I haven't even talked about their coffee, but I can see The Mad Priest becoming a Chattanooga favorite for years to come.
## [Niedlov's][8]
Niedlov's focus is on its baked goods and cafe more than coffee, but it's one of our go-to places for studying together. They use Velo's coffee and have such a good amount of seating that it's a safe bet for any time of the day. Free parking, as well, which is a plus that no one ever talks about but really is nice. The atmosphere is fantastic, the service is always great, and the food is delicious. I definitely recommend Niedlov's to anyone as a purely Chattanoogan location.
# More Good Spots
Here's a fly-by list of other places to check out that I haven't visited quite as much:
* [Plus Coffee][9]: Nice little place in St. Elmo. Good for studying, but can be a hard to have a conversation sometimes.
* [Frothy Monkey][10]: Neat location next to the historic Chattanooga Choo Choo. I like their balcony setup a lot.
* [Cadence Coffee Co.][11]: Casual and comfortable hangout spot with lots of couches.
* [The Camp House][12]: Really neat vibe at the place, and a lot of community events happening regularly. Plenty of good-sized tables and seating.
* [The Hot Chocolatier][13]: Chocolate shop with a cute setup and some delicious drinks.
* [Milk & Honey][14]: This place is known for their homemade gelato, but they have a good coffee assortment as well.
One might ask why I would go to the trouble to visit so many various coffee shops. Each place has it's own unique atmosphere, emphases, and strengths. I think Chattanooga is great partly because it brings in such a diverse and vibrant community, and the coffeeshop scene is representative of that.
I'll try to keep this post updated as I try new places and have more to say about them. Thanks for reading!
[1]: https://crbchattanooga.org
[2]: https://www.goodmancoffeeroasters.com
[3]: http://meanmugcoffee.com
[4]: https://www.velocoffee.com
[5]: https://bluffviewartdistrictchattanooga.com/rembrandtscoffeehouse
[6]: https://www.madpriestcha.com
[7]: https://madpriestcoffee.com
[8]: http://www.niedlovs.com
[9]: http://www.pluscoffee.co/stelmo
[10]: https://frothymonkey.com/locations/southside-chattanooga/
[11]: https://www.cadencecoffeeco.com
[12]: https://thecamphouse.com
[13]: https://thehotchocolatier.com
[14]: https://milkandhoneychattanooga.com
|
{
"content_hash": "546bb2d1d4705789ab746236f1057f25",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 695,
"avg_line_length": 90.69117647058823,
"alnum_prop": 0.7763904653802497,
"repo_name": "trentonshell/trentonshell.github.io",
"id": "c336822b25d97c831d99023004ac6c292375f3e0",
"size": "6176",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "_posts/2019-03-09-chattanooga-coffee-shops.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "19506"
},
{
"name": "HTML",
"bytes": "42725"
},
{
"name": "Ruby",
"bytes": "299"
},
{
"name": "Shell",
"bytes": "144"
}
],
"symlink_target": ""
}
|
<pre>
post.html - quickie just to POST stuff instead of GET.
<hr />
<form method='post' action='index.php'>
url <input name='url' type='text' style='padding: 3px; width: 450px' value=''></input><br />
sel <input name='sel' type='text' style='padding: 3px; width: 450px' value=''></input><br />
<input name='debug' type="checkbox" value='debug'> DEBUG</input><br/>
<input type='submit' />
</form>
</pre>
|
{
"content_hash": "c8065381811b36f83592345b1c9105bf",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 93,
"avg_line_length": 34.083333333333336,
"alnum_prop": 0.6479217603911981,
"repo_name": "keyle/json-anything",
"id": "cb2fac1d4fcd72ff6b755ea7c7d9652ecbf4c94f",
"size": "409",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "post.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "171795"
}
],
"symlink_target": ""
}
|
''' Goal of this script is to resume ThermoFisher Ion Torrent™ Coverage Analysis
output (*.stats.cov.txt files) in a CSV table. Those files are usually
stored in:
/results/analysis/output/Home/<run>/plugin_out/<coverageAnalysis_out>/*
'''
import pandas as pd
import argparse, sys
COL2FLOAT = [
"Amplicons reading end-to-end",
"Amplicons with at least 1 read",
"Amplicons with at least 100 reads",
"Amplicons with at least 20 reads",
"Amplicons with at least 500 reads",
"Amplicons with no strand bias",
"Average base coverage depth",
"Average reads per amplicon",
"Percent assigned amplicon reads",
"Percent base reads on target",
"Percent end-to-end reads",
"Percent reads on target",
"Target base coverage at 100x",
"Target base coverage at 1x",
"Target base coverage at 20x",
"Target base coverage at 500x",
"Target bases with no strand bias",
"Uniformity of amplicon coverage",
"Uniformity of base coverage"
]
COL2INT = [
"Bases in target regions",
"Number of amplicons",
"Number of mapped reads",
"Total aligned base reads",
"Total assigned amplicon reads",
"Total base reads on target"
]
def txt2series(f):
f = open(f)
rows = f.readlines()[2:]
rows_as_kv = [r.strip().split(":") for r in rows]
d = {k_v[0].strip():k_v[1].strip().strip("%") for k_v in rows_as_kv if len(k_v)>1}
# Separate barcode_run
d['Barcode'] = d['Alignments'][:13]
d['Run'] = d['Alignments'][14:]
del d['Alignments']
s = pd.Series(d)
return s
if __name__ == '__main__':
# Read input
parser = argparse.ArgumentParser()
parser.add_argument("files", nargs='+', help="List of stats.cov.txt")
args = parser.parse_args()
files = args.files
out = sys.stdout
# Assert input only files ending with ".stats.cov.txt"
txts = sorted([t for t in files if t[-14:] == ".stats.cov.txt"])
df = pd.DataFrame()
for t in txts:
df = df.append(txt2series(t), ignore_index=True)
# Ordering
ordered_index = list(df.columns.difference(COL2FLOAT+COL2INT)) \
+ COL2INT \
+ COL2FLOAT
df = df[ordered_index]
# Fix type
df[COL2FLOAT] = df[COL2FLOAT].astype(float)
df[COL2INT] = df[COL2INT].astype(int)
# Write to output
df.to_csv(out, index=False)
|
{
"content_hash": "a25d955c8ba0762296cb933c34f3ae4a",
"timestamp": "",
"source": "github",
"line_count": 79,
"max_line_length": 86,
"avg_line_length": 30.379746835443036,
"alnum_prop": 0.62,
"repo_name": "lum4chi/ionpy",
"id": "784675b2b04ce399221122a37ca7f2f54e0047a5",
"size": "2520",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "resume_stats_cov.py",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "15407"
}
],
"symlink_target": ""
}
|
//
// OrderTypePage.cs
//
// Author:
// Seyed Razavi <monkeyx@gmail.com>
//
// Copyright (c) 2015 Seyed Razavi
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using Phoenix.BL.Entities;
using Phoenix.BL.Managers;
namespace PhoenixImperator.Pages.Entities
{
/// <summary>
/// Order type page builder.
/// </summary>
public class OrderTypePageBuilder : BaseEntityPageBuilder<OrderType>
{
/// <summary>
/// Displaies the entity.
/// </summary>
/// <param name="item">Item.</param>
protected override void DisplayEntity(OrderType item)
{
AddContentTab ("General", "icon_general.png");
currentTab.AddPropertyDoubleLine ("Type", item.TypeDescription);
currentTab.AddPropertyDoubleLine ("Position(s)", item.PositionType);
currentTab.AddProperty ("TU Cost", item.TUCost.ToString ());
AddContentTab ("Description", "icon_techmanual.png");
currentTab.AddLabel (item.Description);
if (item.Parameters.Count > 0) {
AddContentTab ("Parameters", "icon_positions.png");
currentTab.AddListView (typeof(TextCell), item.Parameters, (sender, e) => {
});
}
}
}
}
|
{
"content_hash": "f2dc2625e332646348849772544f672f",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 80,
"avg_line_length": 34.515625,
"alnum_prop": 0.7301946582163875,
"repo_name": "monkeyx/phoenix-imperator",
"id": "f9e6af46ab8650e7bb3f216fe05e9f72962d6d7e",
"size": "2211",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "PhoenixImperator/Pages/Entities/OrderTypePageBuilder.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "170860"
}
],
"symlink_target": ""
}
|
require "test/unit"
require "mime"
class TestMailbox < Test::Unit::TestCase #:nodoc:
include Mime
def test_mailbox
# nil
mailbox = Mailbox.new(nil)
assert_equal(mailbox.to_s, "")
# empty string
mailbox = Mailbox.new("")
assert_equal(mailbox.to_s, "")
# addr spec
mailbox = Mailbox.new("a.smith@foo.bar")
assert_equal(mailbox.to_s, "a.smith@foo.bar")
# addr spec enclosed in angle brackets
mailbox = Mailbox.new("<a.smith@foo.bar>")
assert_equal(mailbox.to_s, "<a.smith@foo.bar>")
# display name
mailbox = Mailbox.new("a.smith@foo.bar", "Allison Smith")
assert_equal(mailbox.to_s, "Allison Smith <a.smith@foo.bar>")
assert_equal(mailbox.to_s(true), "Allison Smith <a.smith@foo.bar>")
# non-ascii characters
mailbox = Mailbox.new("t.mueller@foo.bar", "Thomas Müller")
assert_equal(mailbox.to_s, "Thomas Müller <t.mueller@foo.bar>")
assert_equal(mailbox.to_s(true), "=?utf-8?Q?Thomas=20M=C3=BCller?= <t.mueller@foo.bar>")
end
end
|
{
"content_hash": "7dc4f3d27be7a41a01e1464a7f60efd4",
"timestamp": "",
"source": "github",
"line_count": 35,
"max_line_length": 92,
"avg_line_length": 29.17142857142857,
"alnum_prop": 0.6513222331047992,
"repo_name": "dmgoeller/mime",
"id": "69fc924415e0c7bffee04a43e9baca454171acc9",
"size": "1023",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/tc_mailbox.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "28156"
}
],
"symlink_target": ""
}
|
<span ng-controller="InstructionsCtrl" class="col-md-offset-2 col-md-8">
<div class="instructions" ng-show="instructionsOn" id="instructionsBox">
<button class="btn btn-success pull-right" style="margin-bottom: 10px;" ng-click="toggleInstructions()">
Got It
<i class="glyphicon glyphicon-ok"></i>
</button>
<h2>Instructions</h2>
<ul>
<li>Regex allows you to search by type of character on the page. So you can select only numbers by entering \d<br>
Select all of the test scores by typing the expression given in the box<br>
\d selects one digit (0-9) from the text on the page.<br>
+ means that you'll select 1 or more of the previous character. </p></li>
<li>So \d+ selects one or more digits in a row. </li>
</ul>
</div>
<div class="content">
<button id="showInstructions" ng-show="!instructionsOn" class="btn btn-warning pull-right" ng-click="toggleInstructions()">
Instructions
<i class="glyphicon glyphicon-list-alt"></i>
</button>
<p class="directions">Type the expression in the box to select all of the test scores</p>
<ra-regex elm-id="level1" template-name="level1.html" textbox-placeholder="\d+"></ra-regex>
</div>
</span>
|
{
"content_hash": "6345e7477f2b891fa9d244db3dc0238c",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 131,
"avg_line_length": 54.583333333333336,
"alnum_prop": 0.632824427480916,
"repo_name": "akowalz/regex-adventures",
"id": "0d9272f0cc6ee68cdc1556645f34842af60e4772",
"size": "1310",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "app/templates/landingPage.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "202772"
},
{
"name": "JavaScript",
"bytes": "90717"
}
],
"symlink_target": ""
}
|
#region LGPL License
#endregion
#region SVN Version Information
// <file>
// <license see="http://axiom3d.net/wiki/index.php/license.txt"/>
// <id value="$Id: Vector4.cs 2940 2012-01-05 12:25:58Z borrillis $"/>
// </file>
#endregion SVN Version Information
#region Namespace Declarations
using System;
//using System.Diagnostics;
using System.Runtime.InteropServices;
#endregion Namespace Declarations
namespace UnityEngine
{
/// <summary>
/// 4D homogeneous vector.
/// </summary>
[StructLayout( LayoutKind.Sequential )]
public struct Vector4
{
#region Member variables
public float x, y, z, w;
private static readonly Vector4 zeroVector = new Vector4( 0.0f, 0.0f, 0.0f, 0.0f );
#endregion
#region Constructors
/// <summary>
/// Creates a new 4 dimensional Vector.
/// </summary>
public Vector4( float x, float y, float z, float w )
{
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
#endregion
#region Properties
/// <summary>
/// Gets a Vector4 with all components set to 0.
/// </summary>
public static Vector4 Zero { get { return zeroVector; } }
#endregion Properties
#region Methods
/// <summary>
/// Calculates the dot (scalar) product of this vector with another.
/// </summary>
/// <param name="vec">
/// Vector with which to calculate the dot product (together with this one).
/// </param>
/// <returns>A float representing the dot product value.</returns>
public float Dot( Vector4 vec )
{
return x * vec.x + y * vec.y + z * vec.z + w * vec.w;
}
#endregion Methods
#region Operator overloads + CLS compliant method equivalents
/// <summary>
///
/// </summary>
/// <param name="vector"></param>
/// <param name="matrix"></param>
/// <returns></returns>
public static Vector4 Multiply( Vector4 vector, Matrix4x4 matrix )
{
return vector * matrix;
}
/// <summary>
///
/// </summary>
/// <param name="vector"></param>
/// <param name="matrix"></param>
/// <returns></returns>
public static Vector4 operator *( Matrix4x4 matrix, Vector4 vector )
{
Vector4 result = new Vector4();
result.x = vector.x * matrix.m00 + vector.y * matrix.m01 + vector.z * matrix.m02 + vector.w * matrix.m03;
result.y = vector.x * matrix.m10 + vector.y * matrix.m11 + vector.z * matrix.m12 + vector.w * matrix.m13;
result.z = vector.x * matrix.m20 + vector.y * matrix.m21 + vector.z * matrix.m22 + vector.w * matrix.m23;
result.w = vector.x * matrix.m30 + vector.y * matrix.m31 + vector.z * matrix.m32 + vector.w * matrix.m33;
return result;
}
// TODO: Find the signifance of having 2 overloads with opposite param lists that do transposed operations
public static Vector4 operator *( Vector4 vector, Matrix4x4 matrix )
{
Vector4 result = new Vector4();
result.x = vector.x * matrix.m00 + vector.y * matrix.m10 + vector.z * matrix.m20 + vector.w * matrix.m30;
result.y = vector.x * matrix.m01 + vector.y * matrix.m11 + vector.z * matrix.m21 + vector.w * matrix.m31;
result.z = vector.x * matrix.m02 + vector.y * matrix.m12 + vector.z * matrix.m22 + vector.w * matrix.m32;
result.w = vector.x * matrix.m03 + vector.y * matrix.m13 + vector.z * matrix.m23 + vector.w * matrix.m33;
return result;
}
/// <summary>
/// Multiplies a Vector4 by a scalar value.
/// </summary>
/// <param name="vector"></param>
/// <param name="scalar"></param>
/// <returns></returns>
public static Vector4 operator *( Vector4 vector, float scalar )
{
Vector4 result = new Vector4();
result.x = vector.x * scalar;
result.y = vector.y * scalar;
result.z = vector.z * scalar;
result.w = vector.w * scalar;
return result;
}
/// <summary>
/// User to compare two Vector4 instances for equality.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns>true or false</returns>
public static bool operator ==( Vector4 left, Vector4 right )
{
return ( left.x == right.x &&
left.y == right.y &&
left.z == right.z &&
left.w == right.w );
}
/// <summary>
/// Used to add a Vector4 to another Vector4.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
public static Vector4 operator +( Vector4 left, Vector4 right )
{
return new Vector4( left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w );
}
/// <summary>
/// Used to subtract a Vector4 from another Vector4.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns></returns>
public static Vector4 operator -( Vector4 left, Vector4 right )
{
return new Vector4( left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w );
}
/// <summary>
/// Used to negate the elements of a vector.
/// </summary>
/// <param name="left"></param>
/// <returns></returns>
public static Vector4 operator -( Vector4 left )
{
return new Vector4( -left.x, -left.y, -left.z, -left.w );
}
/// <summary>
/// User to compare two Vector4 instances for inequality.
/// </summary>
/// <param name="left"></param>
/// <param name="right"></param>
/// <returns>true or false</returns>
public static bool operator !=( Vector4 left, Vector4 right )
{
return ( left.x != right.x ||
left.y != right.y ||
left.z != right.z ||
left.w != right.w );
}
/// <summary>
/// Used to access a Vector by index 0 = this.x, 1 = this.y, 2 = this.z, 3 = this.w.
/// </summary>
/// <remarks>
/// Uses unsafe pointer arithmetic to reduce the code required.
/// </remarks>
public float this[ int index ]
{
get
{
Debug.Assert( index >= 0 && index < 4, "Indexer boundaries overrun in Vector4." );
// using pointer arithmetic here for less code. Otherwise, we'd have a big switch statement.
unsafe
{
fixed( float* pX = &x )
{
return *( pX + index );
}
}
}
set
{
Debug.Assert( index >= 0 && index < 4, "Indexer boundaries overrun in Vector4." );
// using pointer arithmetic here for less code. Otherwise, we'd have a big switch statement.
unsafe
{
fixed( float* pX = &x )
{
*( pX + index ) = value;
}
}
}
}
#endregion
#region Object overloads
/// <summary>
/// Overrides the Object.ToString() method to provide a text representation of
/// a Vector4.
/// </summary>
/// <returns>A string representation of a Vector4.</returns>
public override string ToString()
{
return string.Format( "<{0},{1},{2},{3}>", this.x, this.y, this.z, this.w );
}
/// <summary>
/// Provides a unique hash code based on the member variables of this
/// class. This should be done because the equality operators (==, !=)
/// have been overriden by this class.
/// <p/>
/// The standard implementation is a simple XOR operation between all local
/// member variables.
/// </summary>
/// <returns></returns>
public override int GetHashCode()
{
return this.x.GetHashCode() ^ this.y.GetHashCode() ^ this.z.GetHashCode() ^ this.w.GetHashCode();
}
/// <summary>
/// Compares this Vector to another object. This should be done because the
/// equality operators (==, !=) have been overriden by this class.
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public override bool Equals( object obj )
{
return obj is Vector4 && this == (Vector4)obj;
}
public static explicit operator Vector3(Vector4 vec4)
{
return new Vector3(vec4.x, vec4.y, vec4.z);
}
#endregion
#region Parse method, implemented for factories
/// <summary>
/// Parses a string and returns Vector4.
/// </summary>
/// <param name="vector">
/// A string representation of a Vector4. ( as its returned from Vector4.ToString() )
/// </param>
/// <returns>
/// A new Vector4.
/// </returns>
public static Vector4 Parse( string vector )
{
string[] vals = vector.TrimStart( '<' ).TrimEnd( '>' ).Split( ',' );
return new Vector4( float.Parse( vals[ 0 ].Trim() ), float.Parse( vals[ 1 ].Trim() ), float.Parse( vals[ 2 ].Trim() ), float.Parse( vals[ 3 ].Trim() ) );
}
#endregion
}
}
|
{
"content_hash": "c9a4f4e8b25861aa3436ae9fa165b375",
"timestamp": "",
"source": "github",
"line_count": 304,
"max_line_length": 156,
"avg_line_length": 27.56907894736842,
"alnum_prop": 0.6105476673427992,
"repo_name": "objuan/picodex",
"id": "0a1f96560a0319cdc93f15dc601a024648de4158",
"size": "9743",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Picodex.Unity/UnityEngine/Math/Vector4.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "333"
},
{
"name": "C#",
"bytes": "29855742"
},
{
"name": "GLSL",
"bytes": "564499"
},
{
"name": "JavaScript",
"bytes": "91583"
},
{
"name": "Lua",
"bytes": "344"
},
{
"name": "M4",
"bytes": "20907"
},
{
"name": "Makefile",
"bytes": "17987"
},
{
"name": "NSIS",
"bytes": "11974"
},
{
"name": "Shell",
"bytes": "5204"
},
{
"name": "Tcl",
"bytes": "15956"
}
],
"symlink_target": ""
}
|
<?php
class Mmx_Fsascii_Model_File_GoodsReceivedNote extends Mmx_Fsascii_Model_File {
public function _getRunControlRecord() {
$line = new Mmx_Fsascii_Model_Format_RunControlRecord();
$line->setCode('25')
->setSalesOrderNumber('')
->setHeader('Goods Received Note');
return $line;
}
public function _getGoodsReceivedNote() {
// Get custom order attrs for this order
$amorderattr = Mage::getModel('amorderattr/attribute')->load($this->order->getId(), 'order_id');
$date = date('d/m/y', strtotime($this->order->getCreatedAt()));
$schemeref = $amorderattr->getSchemeref();
$line = new Mmx_Fsascii_Model_Format_GoodsReceivedNote();
$line->setWarehouse(11)
->setProduct('INBTRESERVATION')
->setQty('1.00')
->setReceiptDate($date)
->setComment('BT Scheme Reservation')
->setBin('INDIGO')
->setSerial($schemeref);
return $line;
}
/**
* Generates a filename based on order create date
*
* @return string
*/
public function generateFilename() {
$datetime = date('dmyHi', strtotime($this->order->getCreatedAt())); // e.g. 2016-11-02 18:24:23 -> 0211161824
$filename = sprintf('GRN %s.txt', $datetime);
return $filename;
}
public function generateAscii() {
$lines = array();
$lines[] = $this->_getRunControlRecord();
$lines[] = $this->_getGoodsReceivedNote();
$ascii = implode(self::MMX_FSASCII_MODEL_FILE_EOL, $lines);
return $ascii;
}
public function isValid() {
$is_bt_store = false;
if ($this->order->getStoreId() == 2) { // BT
$is_bt_store = true;
}
return $is_bt_store;
}
}
|
{
"content_hash": "6aab3d773b1e568809045484cb74ecc9",
"timestamp": "",
"source": "github",
"line_count": 69,
"max_line_length": 117,
"avg_line_length": 27.52173913043478,
"alnum_prop": 0.5471300684570827,
"repo_name": "krocus/mmx-fsascii",
"id": "3ce290da0bf56aab9d4366304da8acb7b1724823",
"size": "1899",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/code/local/Mmx/Fsascii/Model/File/GoodsReceivedNote.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "73586"
}
],
"symlink_target": ""
}
|
module SpreeSearchkick
module Generators
class InstallGenerator < Rails::Generators::Base
class_option :auto_run_migrations, type: :boolean, default: false
def add_javascripts
append_file 'vendor/assets/javascripts/spree/frontend/all.js', "//= require spree/frontend/spree_searchkick\n"
append_file 'vendor/assets/javascripts/spree/backend/all.js', "//= require spree/backend/spree_searchkick\n"
end
def add_stylesheets
inject_into_file 'vendor/assets/stylesheets/spree/frontend/all.css', " *= require spree/frontend/spree_searchkick\n", before: /\*\//, verbose: true
inject_into_file 'vendor/assets/stylesheets/spree/backend/all.css', " *= require spree/backend/spree_searchkick\n", before: /\*\//, verbose: true
end
def add_migrations
run 'bundle exec rake railties:install:migrations FROM=spree_searchkick'
end
def run_migrations
run_migrations = options[:auto_run_migrations] || ['', 'y', 'Y'].include?(ask('Would you like to run the migrations now? [Y/n]'))
if run_migrations
run 'bundle exec rake db:migrate'
else
puts 'Skipping rake db:migrate, don\'t forget to run it!'
end
end
end
end
end
|
{
"content_hash": "e3279af9bc328a104a7575f4938fe3b0",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 155,
"avg_line_length": 42,
"alnum_prop": 0.665079365079365,
"repo_name": "ronzalo/spree_searchkick",
"id": "d63976b0be1658831f334af46f83b2c2b37f88f5",
"size": "1260",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/generators/spree_searchkick/install/install_generator.rb",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "1132"
},
{
"name": "HTML",
"bytes": "1869"
},
{
"name": "JavaScript",
"bytes": "105296"
},
{
"name": "Ruby",
"bytes": "21375"
}
],
"symlink_target": ""
}
|
test: phpunit phpcs
phpunit:
./vendor/bin/phpunit --configuration tests/phpunit.xml
phpcs:
./vendor/bin/phpcs --standard=PSR2 --extensions=php src tests
build:
cd ../asana-api-meta && gulp build-php
|
{
"content_hash": "300dc91ac5954d8f23133aaea454498f",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 62,
"avg_line_length": 20.5,
"alnum_prop": 0.7317073170731707,
"repo_name": "Asana/php-asana",
"id": "4658184de30967f06a47819d7966a20c083c8f70",
"size": "206",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Makefile",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "EJS",
"bytes": "1662"
},
{
"name": "JavaScript",
"bytes": "190"
},
{
"name": "Makefile",
"bytes": "206"
},
{
"name": "Mustache",
"bytes": "1789"
},
{
"name": "PHP",
"bytes": "225556"
}
],
"symlink_target": ""
}
|
<?php
namespace App\Command\Maintenance;
use App\Services\ApplicationStateService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Output\OutputInterface;
abstract class AbstractApplicationStateChangeCommand extends Command
{
const RETURN_CODE_OK = 0;
const RETURN_CODE_FAILURE = 1;
const STATE_ACTIVE = 'active';
const STATE_MAINTENANCE_READ_ONLY = 'maintenance-read-only';
const STATE_MAINTENANCE_BACKUP_READ_ONLY = 'maintenance-backup-read-only';
/**
* @var ApplicationStateService
*/
private $applicationStateService;
/**
* @param ApplicationStateService $applicationStateService
* @param string|null $name
*/
public function __construct(ApplicationStateService $applicationStateService, $name = null)
{
parent::__construct($name);
$this->applicationStateService = $applicationStateService;
}
/**
* @param OutputInterface $output
* @param string $state
*
* @return bool
*/
protected function setState(OutputInterface $output, $state)
{
if ($this->applicationStateService->setState($state)) {
$output->writeln('Set application state to "'.$state.'"');
return true;
}
$output->writeln('Failed to set application state to "'.$state.'"');
return false;
}
}
|
{
"content_hash": "ae6a793174b8cbdf4c4a4241f173b772",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 95,
"avg_line_length": 27.54,
"alnum_prop": 0.6652142338416849,
"repo_name": "webignition/app.simplytestable.com",
"id": "66e56614fc3821004d19faef8af3891d9a21fe77",
"size": "1377",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Command/Maintenance/AbstractApplicationStateChangeCommand.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "1787"
},
{
"name": "PHP",
"bytes": "2271987"
}
],
"symlink_target": ""
}
|
ACCEPTED
#### According to
World Register of Marine Species
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "583fcb47b3ca640348eb00f1feddd352",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 32,
"avg_line_length": 9.76923076923077,
"alnum_prop": 0.7007874015748031,
"repo_name": "mdoering/backbone",
"id": "f23e5b702e279a0a981521a63c142199cc01745f",
"size": "199",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Protozoa/Ciliophora/Oligotrichea/Oligotrichida/Metacylididae/Metacylis/Metacylis mereschkowskii/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
}
|
ACCEPTED
#### According to
Index Fungorum
#### Published in
Proceedings of the Estonian Academy of Sciences, Biology. Ecology 46(1/2): 95 (1997)
#### Original name
Podophacidium pulvinatum Raitv. & Järv
### Remarks
null
|
{
"content_hash": "305a41396922421eca60fc44298b7cd7",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 84,
"avg_line_length": 17.153846153846153,
"alnum_prop": 0.7309417040358744,
"repo_name": "mdoering/backbone",
"id": "054e7b863689ea1d93a733eb526a906081e90342",
"size": "287",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Leotiomycetes/Helotiales/Podophacidium/Podophacidium pulvinatum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
}
|
FOUNDATION_EXPORT double PlayerVersionNumber;
FOUNDATION_EXPORT const unsigned char PlayerVersionString[];
|
{
"content_hash": "dc193a97740c5b2c03ef39108558a426",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 60,
"avg_line_length": 36,
"alnum_prop": 0.8611111111111112,
"repo_name": "WilliamHester/Breadit-iOS",
"id": "2e49dd2e899ed1810955d2483440111ef16ef05d",
"size": "134",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Pods/Target Support Files/Player/Player-umbrella.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Ruby",
"bytes": "462"
},
{
"name": "Swift",
"bytes": "151127"
}
],
"symlink_target": ""
}
|
@rem Licensed to the Apache Software Foundation (ASF) under one *
@rem or more contributor license agreements. See the NOTICE file *
@rem distributed with this work for additional information *
@rem regarding copyright ownership. The ASF licenses this file *
@rem to you under the Apache License, Version 2.0 (the *
@rem "License"); you may not use this file except in compliance *
@rem with the License. You may obtain a copy of the License at *
@rem *
@rem http://www.apache.org/licenses/LICENSE-2.0 *
@rem *
@rem Unless required by applicable law or agreed to in writing, *
@rem software distributed under the License is distributed on an *
@rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
@rem KIND, either express or implied. See the License for the *
@rem specific language governing permissions and limitations *
@rem under the License. *
@set q=-q
@set b=-b xml
@set d=-d ../../../target/generated-sources/main/etch/xml
@set i=-I .
@set n=-n
@set walf=-w all,force
@set testsdir=tests\src\main\etch
@set examplesdir=examples
@set x=%CD%\
@pushd %testsdir%
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Async.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Bar.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Baz.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% BigIdl.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Closing.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Cuae.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Foo.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Inheritance.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% %walf% Test1.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Test2.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Test3.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Test4.etch
@rem *** Test5.etch is a negative test ***
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Test6.etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% %walf% TestIncludes.etch
@rem *** TestReservedWords.etch is a negative test ***
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Types.etch
@popd
@pushd %examplesdir%
@pushd chat\src\main\etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Chat.etch
@popd
@pushd distmap\src\main\etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% DistributedHashTable.etch
@popd
@pushd example\src\main\etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Example.etch
@popd
@pushd perf\src\main\etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% Perf.etch
@popd
@popd
@pushd interoptester\example\src\main\etch
@call "%x%scripts\etch-eclipse.bat" %q% %b% %n% %d% %i% IOT.etch
@popd
|
{
"content_hash": "a70faeb6f249b73f0d03b15ae71566ef",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 88,
"avg_line_length": 43.736111111111114,
"alnum_prop": 0.591298825023817,
"repo_name": "OBIGOGIT/etch",
"id": "9291b7ecb5dc961747ea248e1640edd642c735b3",
"size": "3149",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "scripts/compEtchFilesForXml.bat",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "2513090"
},
{
"name": "C#",
"bytes": "1514713"
},
{
"name": "C++",
"bytes": "1109601"
},
{
"name": "CSS",
"bytes": "143"
},
{
"name": "Go",
"bytes": "158833"
},
{
"name": "Java",
"bytes": "2451144"
},
{
"name": "Perl",
"bytes": "290"
},
{
"name": "Python",
"bytes": "444086"
},
{
"name": "Shell",
"bytes": "62900"
},
{
"name": "VimL",
"bytes": "13679"
},
{
"name": "XSLT",
"bytes": "12890"
}
],
"symlink_target": ""
}
|
using BudgetAnalyser.Engine.BankAccount;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace BudgetAnalyser.Engine.UnitTest.Account
{
[TestClass]
public class MastercardAccountTest
{
[TestMethod]
public void CloneShouldGiveUseNameGiven()
{
MastercardAccount subject = CreateSubject();
Engine.BankAccount.Account clone = subject.Clone("CloneMastercard");
Assert.AreEqual("CloneMastercard", clone.Name);
Assert.AreNotEqual("CloneMastercard", subject.Name);
}
[TestMethod]
public void CloneShouldNotJustCopyReference()
{
MastercardAccount subject = CreateSubject();
Engine.BankAccount.Account clone = subject.Clone("CloneMastercard");
Assert.IsFalse(ReferenceEquals(subject, clone));
}
[TestMethod]
public void KeywordsShouldContainElements()
{
MastercardAccount subject = CreateSubject();
Assert.IsTrue(subject.KeyWords.Length > 0);
}
[TestMethod]
public void KeywordsShouldNotBeNull()
{
MastercardAccount subject = CreateSubject();
Assert.IsNotNull(subject.KeyWords);
}
[TestMethod]
public void NameShouldBeSomething()
{
MastercardAccount subject = CreateSubject();
Assert.IsFalse(string.IsNullOrWhiteSpace(subject.Name));
}
private MastercardAccount CreateSubject()
{
return new MastercardAccount("MastercardTest");
}
}
}
|
{
"content_hash": "2e8c9e997a74db9c04255a3181613fe6",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 80,
"avg_line_length": 28.75,
"alnum_prop": 0.6242236024844721,
"repo_name": "Benrnz/BudgetAnalyser",
"id": "f87f7f35ff1597fb552d4f9cdc10a1abcef8d84f",
"size": "1612",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "BudgetAnalyser.Engine.UnitTest/Account/MastercardAccountTest.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "2339968"
},
{
"name": "Smalltalk",
"bytes": "4656"
}
],
"symlink_target": ""
}
|
Ti=Article 1175
1.0.sec=Il est fait exception aux dispositions de l'article précédent pour :
1.1.sec=1° Les actes sous signature privée relatifs au droit de la famille et des successions ;
1.2.sec=2° Les actes sous signature privée relatifs à des sûretés personnelles ou réelles, de nature civile ou commerciale, sauf s'ils sont passés par une personne pour les besoins de sa profession.
1.=[Z/ol-none/s2]
=[Z/paras/s1]
|
{
"content_hash": "59d3003ae840ed303daf5adff6c6afa2",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 204,
"avg_line_length": 39.36363636363637,
"alnum_prop": 0.7551963048498845,
"repo_name": "antoinekraska/Cmacc-Paris2",
"id": "0a67196f95c51beebf9b80172142c58b935add07",
"size": "444",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Doc/GH/Paris2/Law/CodeCivil/Article/2-Formation/3-Forme/2-Electronique/Sec/1175.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2498"
},
{
"name": "JavaScript",
"bytes": "1276"
},
{
"name": "PHP",
"bytes": "2440"
}
],
"symlink_target": ""
}
|
import React from 'react';
import LinkIcon from '@material-ui/icons/Link';
import ArrowRightIcon from '@material-ui/icons/ArrowRight';
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
import ShortTextIcon from '@material-ui/icons/ShortText';
import { ContentItem } from './path_helper';
interface TocProps {
item: ContentItem;
selected: { id: string, parentIds: Set<string> };
getIsOpen: (id: string) => boolean,
setIsOpen: (id: string, value: boolean) => void,
onClickItem: (item: ContentItem) => void,
}
const TocItem = ({ item, selected, getIsOpen, setIsOpen, onClickItem }: TocProps) => {
const { label, items } = item;
const isOpenable = items.length > 0;
const isOpen = getIsOpen(item.id);
const subItemProps = {
selected, getIsOpen, setIsOpen, onClickItem
};
const onClickedItem = () => onClickItem(item);
const toggleOpen = () => setIsOpen(item.id, !isOpen);
const onClickedTitle = isOpenable ? toggleOpen : onClickedItem;
return (
<li className={`toc-item ${item.id === selected.id ? 'selected' : ''}`}>
<span className="item">
<span className={isOpenable ? 'group' : 'link'} onClick={onClickedTitle}>
{
isOpenable ? (
isOpen ? (<ArrowDropDownIcon />) : (<ArrowRightIcon />)
) : (
<ShortTextIcon />
)
}
{
isOpenable && !isOpen ? (
<span className="count">{items.length}</span>
) : null
}
<span className={`title ${selected.parentIds.has(item.id) ? 'selected' : ''}`} title={label}>{label}</span>
</span>
<span className="link" onClick={onClickedItem}>
{
isOpenable ? (<LinkIcon />) : null
}
</span>
</span>
{
isOpen ? (
<ul>
{
items.map((subItem) => (
<TocItem key={subItem.id} item={subItem} {...subItemProps} />
))
}
</ul>
) : null
}
</li>
);
}
export default TocItem;
|
{
"content_hash": "5311fb278bb5754f1e45ca1e9d75f4cc",
"timestamp": "",
"source": "github",
"line_count": 71,
"max_line_length": 117,
"avg_line_length": 29.464788732394368,
"alnum_prop": 0.5573613766730402,
"repo_name": "eGust/epub-reader",
"id": "8a0f4d7d00b4b9125f60c4e9faa191f50b86e9cf",
"size": "2092",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/web/app/TocItem.tsx",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4572"
},
{
"name": "HTML",
"bytes": "235"
},
{
"name": "JavaScript",
"bytes": "2557"
},
{
"name": "Rust",
"bytes": "330"
},
{
"name": "TypeScript",
"bytes": "54849"
}
],
"symlink_target": ""
}
|
ACCEPTED
#### According to
Index Fungorum
#### Published in
null
#### Original name
Taphrina oreoselini C. Massal.
### Remarks
null
|
{
"content_hash": "2d9bc56e1eb9087cb2e0c3542a7795dc",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 30,
"avg_line_length": 10.384615384615385,
"alnum_prop": 0.7037037037037037,
"repo_name": "mdoering/backbone",
"id": "d82b8f1fed1abc2d0327ad2fb76c4737453b6890",
"size": "189",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Taphrinomycetes/Taphrinales/Taphrinaceae/Taphrina/Taphrina oreoselini/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
}
|
<?php
/**
* Created by PhpStorm.
* User: gseidel
* Date: 26.08.17
* Time: 20:52
*/
namespace Enhavo\Bundle\MediaBundle\Provider;
use Enhavo\Bundle\MediaBundle\Model\FileInterface;
use Enhavo\Bundle\MediaBundle\Model\FormatInterface;
interface ProviderInterface
{
/**
* @param FileInterface $file
* @return void
*/
public function updateFile(FileInterface $file);
/**
* @param FormatInterface $format
* @return void
*/
public function updateFormat(FormatInterface $format);
/**
* @param $object
* @return bool
*/
public function supportsClass($object);
}
|
{
"content_hash": "f7a77c67699db21b688ab834a65b4edc",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 58,
"avg_line_length": 19.151515151515152,
"alnum_prop": 0.6566455696202531,
"repo_name": "npakai/enhavo",
"id": "13343bebac05e4759105ca122860ad5849078b46",
"size": "632",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "src/Enhavo/Bundle/MediaBundle/Provider/ProviderInterface.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "81970"
},
{
"name": "Dockerfile",
"bytes": "2165"
},
{
"name": "Gherkin",
"bytes": "11978"
},
{
"name": "HTML",
"bytes": "195018"
},
{
"name": "JavaScript",
"bytes": "3103"
},
{
"name": "Makefile",
"bytes": "233"
},
{
"name": "PHP",
"bytes": "2118492"
},
{
"name": "Ruby",
"bytes": "1164"
},
{
"name": "Shell",
"bytes": "579"
},
{
"name": "TypeScript",
"bytes": "14563"
}
],
"symlink_target": ""
}
|
<?php
namespace PHPExiftool\Driver\Tag\MOI;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class AudioBitrate extends AbstractTag
{
protected $Id = 134;
protected $Name = 'AudioBitrate';
protected $FullName = 'MOI::Main';
protected $GroupName = 'MOI';
protected $g0 = 'MOI';
protected $g1 = 'MOI';
protected $g2 = 'Video';
protected $Type = 'int8u';
protected $Writable = false;
protected $Description = 'Audio Bitrate';
protected $local_g2 = 'Audio';
}
|
{
"content_hash": "c0924ef9948c3f072e863bef7337917b",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 46,
"avg_line_length": 15.81081081081081,
"alnum_prop": 0.6512820512820513,
"repo_name": "romainneutron/PHPExiftool",
"id": "5ea3566ebe1d3f3b05d9e15a29f91694998c8a04",
"size": "807",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/PHPExiftool/Driver/Tag/MOI/AudioBitrate.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "22042446"
}
],
"symlink_target": ""
}
|
namespace datavis {
class DataInfoView : public QWidget
{
Q_OBJECT
public:
DataInfoView(QWidget * parent = nullptr);
void setInfo(const DataSetInfo & info);
private:
QLabel * m_dimensions;
QLabel * m_attributes;
};
}
|
{
"content_hash": "14d834aa0b4cecf53e01ea7bd860ed82",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 45,
"avg_line_length": 17.071428571428573,
"alnum_prop": 0.6820083682008368,
"repo_name": "jleben/datavis",
"id": "4bb7e3fa59790a5e85f5a094e0d744c3e4f7f921",
"size": "327",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/data_info_view.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "801243"
},
{
"name": "CMake",
"bytes": "1931"
},
{
"name": "Python",
"bytes": "1720"
}
],
"symlink_target": ""
}
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package edu.harvard.iq.dataverse.worldmapauth;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.logging.Logger;
import javax.ejb.Stateless;
import javax.inject.Named;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;
/**
*
* @author raprasad
*/
@Stateless
@Named
public class TokenApplicationTypeServiceBean {
private static final Logger logger = Logger.getLogger(TokenApplicationTypeServiceBean.class.getCanonicalName());
@PersistenceContext(unitName = "VDCNet-ejbPU")
private EntityManager em;
public TokenApplicationType getGeoConnectApplication(){
logger.info("--getGeoConnectApplication--");
TokenApplicationType tat = this.findByName(TokenApplicationType.DEFAULT_GEOCONNECT_APPLICATION_NAME);
if (tat != null){
logger.info("-- Got it!!");
return tat;
}
// Make a default application for GeoConnect
tat = new TokenApplicationType();
tat.setName(TokenApplicationType.DEFAULT_GEOCONNECT_APPLICATION_NAME);
tat.setContactEmail("info@iq.harvard.edu");
tat.setHostname("geoconnect.datascience.iq.harvard.edu");
tat.setIpAddress("140.247.115.127");
tat.setTimeLimitMinutes(TokenApplicationType.DEFAULT_TOKEN_TIME_LIMIT_MINUTES);
//tat.setMapitLink(TokenApplicationType.LOCAL_DEV_MAPIT_LINK);
tat.setMapitLink(TokenApplicationType.DEV_MAPIT_LINK);
return this.save(tat);
//return null;
}
public TokenApplicationType find(Object pk) {
if (pk==null){
return null;
}
return em.find(TokenApplicationType.class, pk);
}
/**
*
* Convert string to md5 hash
*
import hashlib
m = hashlib.md5()
m.update("Give me python or give me...more time, more time -- c.mena")
m.hexdigest() #'266cf94160a22fe1ef118c907379cd60'
* @param stringToHash
* @return
*/
public String getMD5Hash(String stringToHash){
if (stringToHash==null){
return null;
}
MessageDigest md;
try {
md = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException ex) {
logger.severe("Failed to set TokenApplicationType for 'Map It' request!!!");
return null;
}
md.update(stringToHash.getBytes());
byte[] mdbytes = md.digest();
StringBuilder sb = new StringBuilder("");
for (int i = 0; i < mdbytes.length; i++) {
sb.append(Integer.toString((mdbytes[i] & 0xff) + 0x100, 16).substring(1));
}
return sb.toString();
}
public TokenApplicationType save( TokenApplicationType tokenApp ) {
if (tokenApp==null){
return null;
}
if (tokenApp.getName()==null){
tokenApp.setName(TokenApplicationType.DEFAULT_GEOCONNECT_APPLICATION_NAME);
}
if (tokenApp.getMapitLink()==null){
logger.warning("mapitLink is missing for tokenApp");
return null;
}
// Set time limit minutes
Integer time_limit_minutes = tokenApp.getTimeLimitMinutes();
if (time_limit_minutes == null){
tokenApp.setTimeLimitMinutes(TokenApplicationType.DEFAULT_TOKEN_TIME_LIMIT_MINUTES);
// (also sets the time limit seconds)
}
// set md5
tokenApp.setMd5(this.getMD5Hash(tokenApp.getName()));
if ( tokenApp.getId() == null ) {
tokenApp.setCreated();
em.persist(tokenApp);
logger.fine("New tokenApp saved");
return tokenApp;
} else {
tokenApp.setModified();
logger.fine("Existing tokenApp saved");
return em.merge( tokenApp );
}
}
public TokenApplicationType findByName(String name){
if (name == null){
return null;
}
try{
return em.createQuery("select m from TokenApplicationType m WHERE m.name=:name", TokenApplicationType.class)
.setParameter("name", name)
.getSingleResult();
} catch ( NoResultException nre ) {
return null;
}
}
public List<TokenApplicationType> getAllTokenApplicationTypes(){
String qr = "select object(o) from TokenApplicationType order by o.modified desc";
TypedQuery<TokenApplicationType> query = em.createQuery(qr, TokenApplicationType.class);
return query.getResultList();
}
}
|
{
"content_hash": "973083e0c84f250f39cbc28156f70489",
"timestamp": "",
"source": "github",
"line_count": 153,
"max_line_length": 120,
"avg_line_length": 32.849673202614376,
"alnum_prop": 0.6152009550338241,
"repo_name": "JayanthyChengan/dataverse",
"id": "24c2f0c1c1e71c17d6c912f3a8f59c0190df82ef",
"size": "5026",
"binary": false,
"copies": "5",
"ref": "refs/heads/dataverse-contactform-afflist",
"path": "src/main/java/edu/harvard/iq/dataverse/worldmapauth/TokenApplicationTypeServiceBean.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "48137"
},
{
"name": "HTML",
"bytes": "781240"
},
{
"name": "Java",
"bytes": "4153477"
},
{
"name": "JavaScript",
"bytes": "390936"
},
{
"name": "Makefile",
"bytes": "3299"
},
{
"name": "Perl",
"bytes": "58151"
},
{
"name": "Python",
"bytes": "58198"
},
{
"name": "R",
"bytes": "36411"
},
{
"name": "Ruby",
"bytes": "1670"
},
{
"name": "Shell",
"bytes": "96276"
},
{
"name": "XSLT",
"bytes": "455"
}
],
"symlink_target": ""
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=struct.ReplicationRuleWriter.html">
</head>
<body>
<p>Redirecting to <a href="struct.ReplicationRuleWriter.html">struct.ReplicationRuleWriter.html</a>...</p>
<script>location.replace("struct.ReplicationRuleWriter.html" + location.search + location.hash);</script>
</body>
</html>
|
{
"content_hash": "19363d152e39e26d387a0f583a6662b7",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 110,
"avg_line_length": 37.3,
"alnum_prop": 0.7238605898123325,
"repo_name": "lambdastackio/aws-sdk-rust",
"id": "6686f6003b5b46c4f99e11309e038caae1ccc710",
"size": "373",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/aws_sdk_rust/aws/s3/writeparse/ReplicationRuleWriter.t.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Rust",
"bytes": "688000"
},
{
"name": "Shell",
"bytes": "674"
}
],
"symlink_target": ""
}
|
package schemamanager
import (
"errors"
"fmt"
"strings"
"testing"
"golang.org/x/net/context"
"vitess.io/vitess/go/vt/logutil"
"vitess.io/vitess/go/vt/mysqlctl/tmutils"
"vitess.io/vitess/go/vt/topo"
"vitess.io/vitess/go/vt/topo/memorytopo"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/vttablet/faketmclient"
"vitess.io/vitess/go/vt/vttablet/tmclient"
"vitess.io/vitess/go/vt/wrangler"
querypb "vitess.io/vitess/go/vt/proto/query"
tabletmanagerdatapb "vitess.io/vitess/go/vt/proto/tabletmanagerdata"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
// import the gRPC client implementation for tablet manager
_ "vitess.io/vitess/go/vt/vttablet/grpctmclient"
)
var (
errControllerOpen = errors.New("Open Fail")
errControllerRead = errors.New("Read Fail")
)
func init() {
// enforce we will use the right protocol (gRPC) (note the
// client is unused, but it is initialized, so it needs to exist)
*tmclient.TabletManagerProtocol = "grpc"
}
func TestSchemaManagerControllerOpenFail(t *testing.T) {
controller := newFakeController(
[]string{"select * from test_db"}, true, false, false)
ctx := context.Background()
err := Run(ctx, controller, newFakeExecutor(t))
if err != errControllerOpen {
t.Fatalf("controller.Open fail, shoud get error: %v, but get error: %v",
errControllerOpen, err)
}
}
func TestSchemaManagerControllerReadFail(t *testing.T) {
controller := newFakeController(
[]string{"select * from test_db"}, false, true, false)
ctx := context.Background()
err := Run(ctx, controller, newFakeExecutor(t))
if err != errControllerRead {
t.Fatalf("controller.Read fail, shoud get error: %v, but get error: %v",
errControllerRead, err)
}
if !controller.onReadFailTriggered {
t.Fatalf("OnReadFail should be called")
}
}
func TestSchemaManagerValidationFail(t *testing.T) {
controller := newFakeController(
[]string{"invalid sql"}, false, false, false)
ctx := context.Background()
err := Run(ctx, controller, newFakeExecutor(t))
if err == nil || !strings.Contains(err.Error(), "failed to parse sql") {
t.Fatalf("run schema change should fail due to executor.Validate fail, but got: %v", err)
}
}
func TestSchemaManagerExecutorOpenFail(t *testing.T) {
controller := newFakeController(
[]string{"create table test_table (pk int);"}, false, false, false)
controller.SetKeyspace("unknown_keyspace")
wr := wrangler.New(logutil.NewConsoleLogger(), newFakeTopo(t), newFakeTabletManagerClient())
executor := NewTabletExecutor(wr, testWaitSlaveTimeout)
ctx := context.Background()
err := Run(ctx, controller, executor)
if err == nil || !strings.Contains(err.Error(), "unknown_keyspace") {
t.Fatalf("run schema change should fail due to executor.Open fail, but got: %v", err)
}
}
func TestSchemaManagerExecutorExecuteFail(t *testing.T) {
controller := newFakeController(
[]string{"create table test_table (pk int);"}, false, false, false)
wr := wrangler.New(logutil.NewConsoleLogger(), newFakeTopo(t), newFakeTabletManagerClient())
executor := NewTabletExecutor(wr, testWaitSlaveTimeout)
ctx := context.Background()
err := Run(ctx, controller, executor)
if err == nil || !strings.Contains(err.Error(), "unknown database: vt_test_keyspace") {
t.Fatalf("run schema change should fail due to executor.Execute fail, but got: %v", err)
}
}
func TestSchemaManagerRun(t *testing.T) {
sql := "create table test_table (pk int)"
controller := newFakeController(
[]string{sql}, false, false, false)
fakeTmc := newFakeTabletManagerClient()
fakeTmc.AddSchemaChange(sql, &tabletmanagerdatapb.SchemaChangeResult{
BeforeSchema: &tabletmanagerdatapb.SchemaDefinition{},
AfterSchema: &tabletmanagerdatapb.SchemaDefinition{
DatabaseSchema: "CREATE DATABASE `{{.DatabaseName}}` /*!40100 DEFAULT CHARACTER SET utf8 */",
TableDefinitions: []*tabletmanagerdatapb.TableDefinition{
{
Name: "test_table",
Schema: sql,
Type: tmutils.TableBaseTable,
},
},
},
})
fakeTmc.AddSchemaDefinition("vt_test_keyspace", &tabletmanagerdatapb.SchemaDefinition{})
wr := wrangler.New(logutil.NewConsoleLogger(), newFakeTopo(t), fakeTmc)
executor := NewTabletExecutor(wr, testWaitSlaveTimeout)
ctx := context.Background()
err := Run(ctx, controller, executor)
if err != nil {
t.Fatalf("schema change should success but get error: %v", err)
}
if !controller.onReadSuccessTriggered {
t.Fatalf("OnReadSuccess should be called")
}
if controller.onReadFailTriggered {
t.Fatalf("OnReadFail should not be called")
}
if !controller.onValidationSuccessTriggered {
t.Fatalf("OnValidateSuccess should be called")
}
if controller.onValidationFailTriggered {
t.Fatalf("OnValidationFail should not be called")
}
if !controller.onExecutorCompleteTriggered {
t.Fatalf("OnExecutorComplete should be called")
}
}
func TestSchemaManagerExecutorFail(t *testing.T) {
sql := "create table test_table (pk int)"
controller := newFakeController([]string{sql}, false, false, false)
fakeTmc := newFakeTabletManagerClient()
fakeTmc.AddSchemaChange(sql, &tabletmanagerdatapb.SchemaChangeResult{
BeforeSchema: &tabletmanagerdatapb.SchemaDefinition{},
AfterSchema: &tabletmanagerdatapb.SchemaDefinition{
DatabaseSchema: "CREATE DATABASE `{{.DatabaseName}}` /*!40100 DEFAULT CHARACTER SET utf8 */",
TableDefinitions: []*tabletmanagerdatapb.TableDefinition{
{
Name: "test_table",
Schema: sql,
Type: tmutils.TableBaseTable,
},
},
},
})
fakeTmc.AddSchemaDefinition("vt_test_keyspace", &tabletmanagerdatapb.SchemaDefinition{})
fakeTmc.EnableExecuteFetchAsDbaError = true
wr := wrangler.New(logutil.NewConsoleLogger(), newFakeTopo(t), fakeTmc)
executor := NewTabletExecutor(wr, testWaitSlaveTimeout)
ctx := context.Background()
err := Run(ctx, controller, executor)
if err == nil || !strings.Contains(err.Error(), "Schema change failed") {
t.Fatalf("schema change should fail, but got err: %v", err)
}
}
func TestSchemaManagerRegisterControllerFactory(t *testing.T) {
sql := "create table test_table (pk int)"
RegisterControllerFactory(
"test_controller",
func(params map[string]string) (Controller, error) {
return newFakeController([]string{sql}, false, false, false), nil
})
_, err := GetControllerFactory("unknown")
if err == nil || !strings.Contains(err.Error(), "there is no data sourcer factory") {
t.Fatalf("controller factory is not registered, GetControllerFactory should return an error, but got: %v", err)
}
_, err = GetControllerFactory("test_controller")
if err != nil {
t.Fatalf("GetControllerFactory should succeed, but get an error: %v", err)
}
func() {
defer func() {
err := recover()
if err == nil {
t.Fatalf("RegisterControllerFactory should fail, it registers a registered ControllerFactory")
}
}()
RegisterControllerFactory(
"test_controller",
func(params map[string]string) (Controller, error) {
return newFakeController([]string{sql}, false, false, false), nil
})
}()
}
func newFakeExecutor(t *testing.T) *TabletExecutor {
wr := wrangler.New(logutil.NewConsoleLogger(), newFakeTopo(t), newFakeTabletManagerClient())
return NewTabletExecutor(wr, testWaitSlaveTimeout)
}
func newFakeTabletManagerClient() *fakeTabletManagerClient {
return &fakeTabletManagerClient{
TabletManagerClient: faketmclient.NewFakeTabletManagerClient(),
preflightSchemas: make(map[string]*tabletmanagerdatapb.SchemaChangeResult),
schemaDefinitions: make(map[string]*tabletmanagerdatapb.SchemaDefinition),
}
}
type fakeTabletManagerClient struct {
tmclient.TabletManagerClient
EnableExecuteFetchAsDbaError bool
preflightSchemas map[string]*tabletmanagerdatapb.SchemaChangeResult
schemaDefinitions map[string]*tabletmanagerdatapb.SchemaDefinition
}
func (client *fakeTabletManagerClient) AddSchemaChange(sql string, schemaResult *tabletmanagerdatapb.SchemaChangeResult) {
client.preflightSchemas[sql] = schemaResult
}
func (client *fakeTabletManagerClient) AddSchemaDefinition(
dbName string, schemaDefinition *tabletmanagerdatapb.SchemaDefinition) {
client.schemaDefinitions[dbName] = schemaDefinition
}
func (client *fakeTabletManagerClient) PreflightSchema(ctx context.Context, tablet *topodatapb.Tablet, changes []string) ([]*tabletmanagerdatapb.SchemaChangeResult, error) {
var result []*tabletmanagerdatapb.SchemaChangeResult
for _, change := range changes {
scr, ok := client.preflightSchemas[change]
if ok {
result = append(result, scr)
} else {
result = append(result, &tabletmanagerdatapb.SchemaChangeResult{})
}
}
return result, nil
}
func (client *fakeTabletManagerClient) GetSchema(ctx context.Context, tablet *topodatapb.Tablet, tables, excludeTables []string, includeViews bool) (*tabletmanagerdatapb.SchemaDefinition, error) {
result, ok := client.schemaDefinitions[topoproto.TabletDbName(tablet)]
if !ok {
return nil, fmt.Errorf("unknown database: %s", topoproto.TabletDbName(tablet))
}
return result, nil
}
func (client *fakeTabletManagerClient) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.Tablet, usePool bool, query []byte, maxRows int, disableBinlogs, reloadSchema bool) (*querypb.QueryResult, error) {
if client.EnableExecuteFetchAsDbaError {
return nil, fmt.Errorf("ExecuteFetchAsDba occur an unknown error")
}
return client.TabletManagerClient.ExecuteFetchAsDba(ctx, tablet, usePool, query, maxRows, disableBinlogs, reloadSchema)
}
// newFakeTopo returns a topo with:
// - a keyspace named 'test_keyspace'.
// - 3 shards named '1', '2', '3'.
// - A master tablet for each shard.
func newFakeTopo(t *testing.T) *topo.Server {
ts := memorytopo.NewServer("test_cell")
ctx := context.Background()
if err := ts.CreateKeyspace(ctx, "test_keyspace", &topodatapb.Keyspace{}); err != nil {
t.Fatalf("CreateKeyspace failed: %v", err)
}
for i, shard := range []string{"0", "1", "2"} {
if err := ts.CreateShard(ctx, "test_keyspace", shard); err != nil {
t.Fatalf("CreateShard(%v) failed: %v", shard, err)
}
tablet := &topodatapb.Tablet{
Alias: &topodatapb.TabletAlias{
Cell: "test_cell",
Uid: uint32(i + 1),
},
Keyspace: "test_keyspace",
Shard: shard,
}
if err := ts.CreateTablet(ctx, tablet); err != nil {
t.Fatalf("CreateTablet failed: %v", err)
}
if _, err := ts.UpdateShardFields(ctx, "test_keyspace", shard, func(si *topo.ShardInfo) error {
si.Shard.MasterAlias = tablet.Alias
return nil
}); err != nil {
t.Fatalf("UpdateShardFields failed: %v", err)
}
}
return ts
}
type fakeController struct {
sqls []string
keyspace string
openFail bool
readFail bool
closeFail bool
onReadSuccessTriggered bool
onReadFailTriggered bool
onValidationSuccessTriggered bool
onValidationFailTriggered bool
onExecutorCompleteTriggered bool
}
func newFakeController(
sqls []string, openFail bool, readFail bool, closeFail bool) *fakeController {
return &fakeController{
sqls: sqls,
keyspace: "test_keyspace",
openFail: openFail,
readFail: readFail,
closeFail: closeFail,
}
}
func (controller *fakeController) SetKeyspace(keyspace string) {
controller.keyspace = keyspace
}
func (controller *fakeController) Open(ctx context.Context) error {
if controller.openFail {
return errControllerOpen
}
return nil
}
func (controller *fakeController) Read(ctx context.Context) ([]string, error) {
if controller.readFail {
return nil, errControllerRead
}
return controller.sqls, nil
}
func (controller *fakeController) Close() {
}
func (controller *fakeController) Keyspace() string {
return controller.keyspace
}
func (controller *fakeController) OnReadSuccess(ctx context.Context) error {
controller.onReadSuccessTriggered = true
return nil
}
func (controller *fakeController) OnReadFail(ctx context.Context, err error) error {
controller.onReadFailTriggered = true
return err
}
func (controller *fakeController) OnValidationSuccess(ctx context.Context) error {
controller.onValidationSuccessTriggered = true
return nil
}
func (controller *fakeController) OnValidationFail(ctx context.Context, err error) error {
controller.onValidationFailTriggered = true
return err
}
func (controller *fakeController) OnExecutorComplete(ctx context.Context, result *ExecuteResult) error {
controller.onExecutorCompleteTriggered = true
return nil
}
var _ Controller = (*fakeController)(nil)
|
{
"content_hash": "f86f80a7956273b036200a599d5aa6a2",
"timestamp": "",
"source": "github",
"line_count": 382,
"max_line_length": 212,
"avg_line_length": 32.82984293193717,
"alnum_prop": 0.7327166892592297,
"repo_name": "tirsen/vitess",
"id": "c67b2bc2f60d10660f27acbf31cf5e2d889a8a85",
"size": "13098",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "go/vt/schemamanager/schemamanager_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "79101"
},
{
"name": "Go",
"bytes": "8026623"
},
{
"name": "HTML",
"bytes": "60555"
},
{
"name": "Java",
"bytes": "1161884"
},
{
"name": "JavaScript",
"bytes": "42815"
},
{
"name": "Liquid",
"bytes": "7030"
},
{
"name": "Makefile",
"bytes": "9620"
},
{
"name": "PHP",
"bytes": "1571"
},
{
"name": "Python",
"bytes": "1119151"
},
{
"name": "Ruby",
"bytes": "3580"
},
{
"name": "Shell",
"bytes": "74199"
},
{
"name": "Smarty",
"bytes": "51059"
},
{
"name": "TypeScript",
"bytes": "152741"
},
{
"name": "Yacc",
"bytes": "50918"
}
],
"symlink_target": ""
}
|
package gentle
import (
"context"
"errors"
"github.com/benbjohnson/clock"
"github.com/rs/xid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"math/rand"
"sync"
"testing"
"testing/quick"
"time"
)
func TestRateLimitedStream_Get(t *testing.T) {
// Get() is rate limited.
requestsInterval := 100 * time.Millisecond
src, done := createInfiniteMessageChan()
defer func() { done <- struct{}{} }()
var chanStream SimpleStream = func(ctx2 context.Context) (Message, error) {
return <-src, nil
}
stream := NewRateLimitedStream(
NewRateLimitedStreamOpts("", "test",
NewTokenBucketRateLimit(requestsInterval, 1)),
chanStream)
count := 4
minimum := time.Duration(count-1) * requestsInterval
var wg sync.WaitGroup
wg.Add(count)
begin := time.Now()
for i := 0; i < count; i++ {
go func() {
_, err := stream.Get(context.Background())
assert.NoError(t, err)
wg.Done()
}()
}
wg.Wait()
dura := time.Since(begin)
log.Info("[Test] spent >= minimum?", "spent", dura, "minimum", minimum)
assert.True(t, dura >= minimum, "dura", dura, "minimum", minimum)
}
func TestRateLimitedStream_Get_Timeout(t *testing.T) {
// Context timeout while Get() is waiting for rate-limiter or upstream.
timeout := 100 * time.Millisecond
run := func(intervalMs int) bool {
requestsInterval := time.Duration(intervalMs) * time.Millisecond
block := make(chan struct{}, 1)
_, done := createInfiniteMessageChan()
defer func() { done <- struct{}{} }()
mstream := &MockStream{}
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil),
func(ctx2 context.Context) error {
select {
case <-ctx2.Done():
log.Debug("[test] Context.Done()", "err", ctx2.Err())
return ctx2.Err()
case <-block:
panic("never here")
}
})
stream := NewRateLimitedStream(
NewRateLimitedStreamOpts("", "test",
NewTokenBucketRateLimit(requestsInterval, 1)),
mstream)
count := 4
var wg sync.WaitGroup
wg.Add(count)
begin := time.Now()
for i := 0; i < count; i++ {
go func() {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
_, err := stream.Get(ctx)
if err == context.DeadlineExceeded {
// It's interrupted when waiting either for the permission
// from the rate-limiter or for mstream.Get()
wg.Done()
return
}
panic("never here")
}()
}
wg.Wait()
log.Info("[Test] time spent", "timespan", time.Since(begin).Seconds())
return true
}
config := &quick.Config{
// [1ms, 200ms)
Values: genBoundInt(1, 200),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_MockBackOff(t *testing.T) {
// Get() retries with mocked BackOff
run := func(backOffCount int) bool {
mfactory := &MockBackOffFactory{}
mback := &MockBackOff{}
mfactory.On("NewBackOff").Return(mback)
// mock clock so that we don't need to wait for the real timer to move forward.
mclock := clock.NewMock()
opts := NewRetryStreamOpts("", "test", mfactory)
opts.Clock = mclock
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil), fakeErr)
// create a backoff that fires 1 second for $backOffCount times
timespanMinimum := time.Duration(backOffCount) * time.Second
mback.On("Next").Return(func() time.Duration {
if backOffCount == 0 {
return BackOffStop
}
backOffCount--
return 1 * time.Second
})
ctx := context.Background()
timespan := make(chan time.Duration, 1)
go func() {
begin := mclock.Now()
_, err := stream.Get(ctx)
// back-offs exhausted
if err != fakeErr {
panic("never here")
}
timespan <- mclock.Now().Sub(begin)
}()
for {
select {
case dura := <-timespan:
log.Info("[Test] spent >= minmum?", "spent", dura, "timespanMinimum", timespanMinimum)
return dura >= timespanMinimum
default:
// advance an arbitrary time to pass all backoffs
mclock.Add(1 * time.Second)
}
}
}
config := &quick.Config{
Values: genBoundInt(1, 50),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_ConstBackOff(t *testing.T) {
// Get() retries with ConstBackOff
run := func(maxElapsedSec int) bool {
mclock := clock.NewMock()
maxElapsedTime := time.Duration(maxElapsedSec) * time.Second
backOffOpts := NewConstBackOffFactoryOpts(time.Second, maxElapsedTime)
backOffOpts.Clock = mclock
backOffFactory := NewConstBackOffFactory(backOffOpts)
opts := NewRetryStreamOpts("", "test", backOffFactory)
opts.Clock = mclock
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil), fakeErr)
ctx := context.Background()
timespan := make(chan time.Duration, 1)
go func() {
begin := mclock.Now()
_, err := stream.Get(ctx)
// back-offs exhausted
if err != fakeErr {
panic("never here")
}
timespan <- mclock.Now().Sub(begin)
}()
for {
select {
case dura := <-timespan:
log.Info("[Test] spent >= minmum?", "spent", dura, "maxElapsedTime", maxElapsedTime)
return dura >= maxElapsedTime
default:
// advance an arbitrary time to pass all backoffs
mclock.Add(1 * time.Second)
}
}
}
config := &quick.Config{
Values: genBoundInt(1, 50),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_ExpBackOff(t *testing.T) {
// Get() retries with ExpBackOff
run := func(maxElapsedSec int) bool {
mclock := clock.NewMock()
maxElapsedTime := time.Duration(maxElapsedSec) * time.Second
backOffOpts := NewExpBackOffFactoryOpts(time.Second, 2,
128*time.Second, maxElapsedTime)
// No randomization to make the backoff time really exponential. Easier
// to examine log.
backOffOpts.RandomizationFactor = 0
backOffOpts.Clock = mclock
backOffFactory := NewExpBackOffFactory(backOffOpts)
opts := NewRetryStreamOpts("", "test", backOffFactory)
opts.Clock = mclock
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil), fakeErr)
ctx := context.Background()
timespan := make(chan time.Duration, 1)
go func() {
begin := mclock.Now()
_, err := stream.Get(ctx)
// back-offs exhausted
if err != fakeErr {
panic("never here")
}
timespan <- mclock.Now().Sub(begin)
}()
for {
select {
case dura := <-timespan:
log.Info("[Test] spent >= minmum?", "spent", dura, "maxElapsedTime", maxElapsedTime)
return dura >= maxElapsedTime
default:
// advance an arbitrary time to pass all backoffs
mclock.Add(1 * time.Second)
}
}
}
config := &quick.Config{
MaxCount: 10,
// [1s, 20m)
Values: genBoundInt(1, 1200),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_MockBackOff_Timeout(t *testing.T) {
// Context timeout interrupts Get() with mocked BackOff
suspend := 10 * time.Millisecond
run := func(timeoutMs int) bool {
mfactory := &MockBackOffFactory{}
mback := &MockBackOff{}
timeout := time.Duration(timeoutMs) * time.Millisecond
mfactory.On("NewBackOff").Return(func() BackOff {
// 1/10 chances that NewBackOff() would sleep over timeout
if rand.Intn(timeoutMs)%10 == 1 {
time.Sleep(timeout + 10*time.Second)
}
return mback
})
opts := NewRetryStreamOpts("", "test", mfactory)
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil),
func(ctx2 context.Context) error {
log.Debug("[test] Get()...")
tm := time.NewTimer(suspend)
select {
case <-ctx2.Done():
tm.Stop()
err := ctx2.Err()
log.Debug("[test] interrupted", "err", err)
return err
case <-tm.C:
}
return fakeErr
})
// Never run out of back-offs
mback.On("Next").Return(func() time.Duration {
log.Debug("[test] Next() sleep")
time.Sleep(suspend)
return suspend
})
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
_, err := stream.Get(ctx)
return err == context.DeadlineExceeded
}
config := &quick.Config{
MaxCount: 10,
// [1ms, 2000ms)
Values: genBoundInt(1, 2000),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_ConstBackOff_Timeout(t *testing.T) {
// Context timeout interrupts Get() with ConstBackOff
suspend := 10 * time.Millisecond
run := func(timeoutMs int) bool {
backOffOpts := NewConstBackOffFactoryOpts(suspend, 0)
backOffFactory := NewConstBackOffFactory(backOffOpts)
timeout := time.Duration(timeoutMs) * time.Millisecond
opts := NewRetryStreamOpts("", "test", backOffFactory)
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil),
func(ctx2 context.Context) error {
log.Debug("[test] Get()...")
tm := time.NewTimer(suspend)
select {
case <-ctx2.Done():
tm.Stop()
err := ctx2.Err()
log.Debug("[test] interrupted", "err", err)
return err
case <-tm.C:
}
return fakeErr
})
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
_, err := stream.Get(ctx)
return err == context.DeadlineExceeded
}
config := &quick.Config{
MaxCount: 10,
// [1ms, 2000ms)
Values: genBoundInt(1, 2000),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestRetryStream_Get_ExpBackOff_Timeout(t *testing.T) {
// Context timeout interrupts Get() with ExpBackOff
suspend := 10 * time.Millisecond
run := func(timeoutMs int) bool {
backOffOpts := NewExpBackOffFactoryOpts(suspend, 2,
128*time.Second, 0)
// No randomization to make the backoff time really exponential. Easier
// to examine log.
backOffOpts.RandomizationFactor = 0
backOffFactory := NewExpBackOffFactory(backOffOpts)
timeout := time.Duration(timeoutMs) * time.Millisecond
opts := NewRetryStreamOpts("", "test", backOffFactory)
mstream := &MockStream{}
stream := NewRetryStream(opts, mstream)
fakeErr := errors.New("A fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil),
func(ctx2 context.Context) error {
log.Debug("[test] Get()...")
tm := time.NewTimer(suspend)
select {
case <-ctx2.Done():
tm.Stop()
err := ctx2.Err()
log.Debug("[test] interrupted", "err", err)
return err
case <-tm.C:
}
return fakeErr
})
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
_, err := stream.Get(ctx)
return err == context.DeadlineExceeded
}
config := &quick.Config{
MaxCount: 10,
// [1ms, 2000ms)
Values: genBoundInt(1, 2000),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestBulkheadStream_Get_MaxConcurrency(t *testing.T) {
// BulkheadStream returns ErrMaxConcurrency when passing the threshold
run := func(maxConcurrency int) bool {
mstream := &MockStream{}
stream := NewBulkheadStream(
NewBulkheadStreamOpts("", "test", maxConcurrency),
mstream)
mm := SimpleMessage("123")
wg := &sync.WaitGroup{}
wg.Add(maxConcurrency)
block := make(chan struct{}, 1)
defer close(block)
mstream.On("Get", mock.Anything).Return(
func(ctx2 context.Context) Message {
wg.Done()
// every Get() would be blocked here
<-block
return mm
}, nil)
ctx := context.Background()
for i := 0; i < maxConcurrency; i++ {
go stream.Get(ctx)
}
// Wait() until $maxConcurrency of Get() are blocked
wg.Wait()
// one more Get() would cause ErrMaxConcurrency
msg, err := stream.Get(ctx)
return msg == nil && err == ErrMaxConcurrency
}
config := &quick.Config{
Values: genBoundInt(1, 100),
}
if err := quick.Check(run, config); err != nil {
t.Error(err)
}
}
func TestCircuitStream_Get_MaxConcurrency(t *testing.T) {
// CircuitStream returns ErrCbMaxConcurrency when
// CircuitConf.MaxConcurrent is reached.
// It then returns ErrCbOpen when error threshold is reached.
CircuitReset()
circuit := xid.New().String()
mstream := &MockStream{}
opts := NewCircuitStreamOpts("", "test", circuit)
opts.CircuitConf.MaxConcurrent = 4
// Set properly to not affect this test:
opts.CircuitConf.Timeout = time.Minute
opts.CircuitConf.SleepWindow = time.Minute
// Set to quickly open the circuit
opts.CircuitConf.VolumeThreshold = 3
opts.CircuitConf.ErrorPercentThreshold = 20
stream := NewCircuitStream(opts, mstream)
mm := SimpleMessage("123")
var wg sync.WaitGroup
wg.Add(opts.CircuitConf.MaxConcurrent)
block := make(chan struct{}, 1)
defer close(block)
mstream.On("Get", mock.Anything).Return(
func(ctx2 context.Context) Message {
wg.Done()
// block to saturate concurrent requests
<-block
return mm
}, nil)
ctx := context.Background()
for i := 0; i < opts.CircuitConf.MaxConcurrent; i++ {
go func() {
stream.Get(ctx)
}()
}
// Make sure previous Get() are all running
wg.Wait()
for {
_, err := stream.Get(ctx)
if err == ErrCbOpen {
log.Debug("[Test] circuit opened")
break
}
assert.EqualError(t, err, ErrCbMaxConcurrency.Error())
}
}
func TestCircuitStream_Get_Timeout(t *testing.T) {
// CircuitStream returns ErrCbTimeout when
// CircuitConf.Timeout is reached.
// It then returns ErrCbOpen when error threshold is reached.
CircuitReset()
circuit := xid.New().String()
mstream := &MockStream{}
opts := NewCircuitStreamOpts("", "test", circuit)
opts.CircuitConf.Timeout = time.Millisecond
// Set properly to not affect this test:
opts.CircuitConf.MaxConcurrent = 4096
opts.CircuitConf.SleepWindow = time.Minute
// Set to quickly open the circuit
opts.CircuitConf.VolumeThreshold = 3
opts.CircuitConf.ErrorPercentThreshold = 20
stream := NewCircuitStream(opts, mstream)
mm := SimpleMessage("123")
// Suspend longer than Timeout
block := make(chan struct{}, 1)
defer close(block)
mstream.On("Get", mock.Anything).Return(
func(ctx2 context.Context) Message {
// block to hit timeout
<-block
return mm
}, nil)
ctx := context.Background()
for {
_, err := stream.Get(ctx)
if err == ErrCbOpen {
break
}
assert.EqualError(t, err, ErrCbTimeout.Error())
}
}
func TestCircuitStream_Get_Error(t *testing.T) {
// CircuitStream returns the designated error.
// It then returns ErrCbOpen when error threshold is reached.
CircuitReset()
circuit := xid.New().String()
mstream := &MockStream{}
opts := NewCircuitStreamOpts("", "test", circuit)
// Set properly to not affect this test:
opts.CircuitConf.MaxConcurrent = 4096
opts.CircuitConf.Timeout = time.Minute
opts.CircuitConf.SleepWindow = time.Minute
// Set to quickly open the circuit
opts.CircuitConf.VolumeThreshold = 3
opts.CircuitConf.ErrorPercentThreshold = 20
stream := NewCircuitStream(opts, mstream)
fakeErr := errors.New("fake error")
mstream.On("Get", mock.Anything).Return((*SimpleMessage)(nil), fakeErr)
ctx := context.Background()
for {
_, err := stream.Get(ctx)
if err == ErrCbOpen {
break
}
assert.EqualError(t, err, fakeErr.Error())
}
}
func TestStream_MsgIntact(t *testing.T) {
// Resilient Streams don't modify msg from upstreams.
msgOut := SimpleMessage("123")
mstream := &MockStream{}
mstream.On("Get", mock.Anything).Return(msgOut, nil)
streams := []Stream{
func() Stream {
return NewRateLimitedStream(
NewRateLimitedStreamOpts("", "test",
NewTokenBucketRateLimit(time.Millisecond, 1)),
mstream)
}(),
func() Stream {
backOffOpts := NewConstBackOffFactoryOpts(200*time.Millisecond, time.Second)
backOffFactory := NewConstBackOffFactory(backOffOpts)
opts := NewRetryStreamOpts("", "test", backOffFactory)
return NewRetryStream(opts, mstream)
}(),
func() Stream {
backOffOpts := NewExpBackOffFactoryOpts(
200*time.Millisecond, 2, time.Second, time.Second)
backOffFactory := NewExpBackOffFactory(backOffOpts)
opts := NewRetryStreamOpts("", "test", backOffFactory)
return NewRetryStream(opts, mstream)
}(),
func() Stream {
return NewBulkheadStream(
NewBulkheadStreamOpts("", "test", 1024),
mstream)
}(),
func() Stream {
return NewCircuitStream(
NewCircuitStreamOpts("", "test", xid.New().String()),
mstream)
}(),
}
for _, stream := range streams {
msg, _ := stream.Get(context.Background())
assert.Equal(t, msgOut.ID(), msg.ID())
}
}
|
{
"content_hash": "802e4b5cb54d6dfffac3e5d824604bc0",
"timestamp": "",
"source": "github",
"line_count": 610,
"max_line_length": 90,
"avg_line_length": 27.421311475409837,
"alnum_prop": 0.6701141866443474,
"repo_name": "cfchou/go-gentle",
"id": "8172080a3186072c771527d719de6ccbff6a103d",
"size": "16727",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gentle/stream_test.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "169433"
},
{
"name": "Makefile",
"bytes": "894"
}
],
"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="">
<meta name="author" content="">
<title>Modern Business - Start Bootstrap Template</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" 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]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="about.html">About</a>
</li>
<li>
<a href="services.html">Services</a>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Portfolio <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="portfolio-1-col.html">1 Column Portfolio</a>
</li>
<li>
<a href="portfolio-2-col.html">2 Column Portfolio</a>
</li>
<li>
<a href="portfolio-3-col.html">3 Column Portfolio</a>
</li>
<li>
<a href="portfolio-4-col.html">4 Column Portfolio</a>
</li>
<li>
<a href="portfolio-item.html">Single Portfolio Item</a>
</li>
</ul>
</li>
<li class="dropdown active">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Blog <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="blog-home-1.html">Blog Home 1</a>
</li>
<li>
<a href="blog-home-2.html">Blog Home 2</a>
</li>
<li class="active">
<a href="blog-post.html">Blog Post</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Other Pages <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="full-width.html">Full Width Page</a>
</li>
<li>
<a href="sidebar.html">Sidebar Page</a>
</li>
<li>
<a href="faq.html">FAQ</a>
</li>
<li>
<a href="404.html">404</a>
</li>
<li>
<a href="pricing.html">Pricing Table</a>
</li>
</ul>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<!-- Page Heading/Breadcrumbs -->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header"> Changing your Oil
<small>by <a href="#">Start Bootstrap</a>
</small>
</h1>
<ol class="breadcrumb">
<li><a href="index.html">Home</a>
</li>
<li class="active">Blog Post</li>
</ol>
</div>
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<!-- Blog Post Content Column -->
<div class="col-lg-8">
<!-- Blog Post -->
<hr>
<!-- Date/Time -->
<p><i class="fa fa-clock-o"></i> Posted on April 24, 2016 at 9:00 PM</p>
<hr>
<!-- Preview Image -->
<img class="img-responsive" src="http://placehold.it/900x300" alt="">
<hr>
<!-- Post Content -->
<p class="lead"> making some changes to test </p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ut, tenetur natus doloremque laborum quos iste ipsum rerum obcaecati impedit odit illo dolorum ab tempora nihil dicta earum fugiat. Temporibus, voluptatibus.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eos, doloribus, dolorem iusto blanditiis unde eius illum consequuntur neque dicta incidunt ullam ea hic porro optio ratione repellat perspiciatis. Enim, iure!</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Error, nostrum, aliquid, animi, ut quas placeat totam sunt tempora commodi nihil ullam alias modi dicta saepe minima ab quo voluptatem obcaecati?</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Harum, dolor quis. Sunt, ut, explicabo, aliquam tenetur ratione tempore quidem voluptates cupiditate voluptas illo saepe quaerat numquam recusandae? Qui, necessitatibus, est!</p>
<hr>
<!-- Blog Comments -->
<!-- Comments Form -->
<div class="well">
<h4>Leave a Comment:</h4>
<form role="form">
<div class="form-group">
<textarea class="form-control" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<hr>
<!-- Posted Comments -->
<!-- Comment -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="http://placehold.it/64x64" alt="">
</a>
<div class="media-body">
<h4 class="media-heading">Start Bootstrap
<small>August 25, 2014 at 9:30 PM</small>
</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<!-- Comment -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="http://placehold.it/64x64" alt="">
</a>
<div class="media-body">
<h4 class="media-heading">Start Bootstrap
<small>August 25, 2014 at 9:30 PM</small>
</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
<!-- Nested Comment -->
<div class="media">
<a class="pull-left" href="#">
<img class="media-object" src="http://placehold.it/64x64" alt="">
</a>
<div class="media-body">
<h4 class="media-heading">Nested Start Bootstrap
<small>August 25, 2014 at 9:30 PM</small>
</h4>
Cras sit amet nibh libero, in gravida nulla. Nulla vel metus scelerisque ante sollicitudin commodo. Cras purus odio, vestibulum in vulputate at, tempus viverra turpis. Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in faucibus.
</div>
</div>
<!-- End Nested Comment -->
</div>
</div>
</div>
<!-- Blog Sidebar Widgets Column -->
<div class="col-md-4">
<!-- Blog Search Well -->
<div class="well">
<h4>Blog Search</h4>
<div class="input-group">
<input type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
</span>
</div>
<!-- /.input-group -->
</div>
<!-- Blog Categories Well -->
<div class="well">
<h4>Blog Categories</h4>
<div class="row">
<div class="col-lg-6">
<ul class="list-unstyled">
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
</ul>
</div>
<div class="col-lg-6">
<ul class="list-unstyled">
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
<li><a href="#">Category Name</a>
</li>
</ul>
</div>
</div>
<!-- /.row -->
</div>
<!-- Side Widget Well -->
<div class="well">
<h4>Side Widget Well</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Inventore, perspiciatis adipisci accusamus laudantium odit aliquam repellat tempore quos aspernatur vero.</p>
</div>
</div>
</div>
<!-- /.row -->
<hr>
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<p>Copyright © Your Website 2015</p>
</div>
</div>
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
|
{
"content_hash": "35a2a0a5b5f2cb7e3b66216b4df5d942",
"timestamp": "",
"source": "github",
"line_count": 306,
"max_line_length": 291,
"avg_line_length": 43.30392156862745,
"alnum_prop": 0.4178552562070787,
"repo_name": "GrapefruitSpoon/Test",
"id": "a2c412bc445c2b487990fda0ba5aae000f39c13e",
"size": "13251",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "blog-post.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "111814"
},
{
"name": "HTML",
"bytes": "196770"
},
{
"name": "JavaScript",
"bytes": "39436"
},
{
"name": "PHP",
"bytes": "1242"
}
],
"symlink_target": ""
}
|
<?xml version="1.0" encoding="utf-8"?><helpItems schema="maml">
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsLinkTargets</command:name>
<maml:description>
<maml:para>Lists existing accounts that are not associated with an Azure subscription.</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsLinkTargets</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsLinkTargets cmdlet lists existing accounts that are not associated with an Azure subscription. To link a new workspace to an existing account, use a customer id returned by this operation in the customer id property of a new workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsLinkTargets</maml:name>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsStorageInsight</command:name>
<maml:description>
<maml:para>Gets information about an existing storage insight</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsStorageInsight</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsStorageInsight cmdlet gets information about an existing storage insight. If a storage insight name is specified, this cmdlet gets information about that Storage Insight. If you do not specify a name, this cmdlet gets information about all storage insights in a workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace that contains the storage insight(s)</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight(s)</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace that contains the storage insight(s)</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight(s)</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
<dev:type>
<maml:name>PSWorkspace</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsWorkspace</command:name>
<maml:description>
<maml:para>Gets information about an existing workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsWorkspace</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsWorkspace cmdlet gets information about an existing workspace. If a workspace name is specified, this cmdlet gets information about that workspace. If you do not specify a name, this cmdlet gets information about all workspaces in a resource group. If you do not specify a name and resource group, this cmdlet gets information about all workspaces in a subscription.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsWorkspace</maml:name>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsWorkspaceManagementGroups</command:name>
<maml:description>
<maml:para>Gets information about the management groups connected to a workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsWorkspaceManagementGroups</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsWorkspaceManagementGroups cmdlet lists the management groups that are connected to a workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsWorkspaceManagementGroups</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsWorkspaceSharedKeys</command:name>
<maml:description>
<maml:para>Gets the shared keys for a workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsWorkspaceSharedKeys</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsWorkspaceSharedKeys cmdlet lists the shared keys for a workspace. The keys are used to connect Operational Insights agents to the workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsWorkspaceSharedKeys</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmOperationalInsightsWorkspaceUsage</command:name>
<maml:description>
<maml:para>Gets the usage data for a workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Get</command:verb>
<command:noun>AzureOperationalInsightsWorkspaceUsage</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Get-AzureRmOperationalInsightsWorkspaceUsage cmdlet retrieves the usage data for a workspace. This exposes how much data has been analyzed by the workspace over a certain period.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Get-AzureRmOperationalInsightsWorkspaceUsage</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>New-AzureRmOperationalInsightsStorageInsight</command:name>
<maml:description>
<maml:para>Creates a new storage insight inside a workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>New</command:verb>
<command:noun>AzureOperationalInsightsStorageInsight</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The New-AzureRmOperationalInsightsStorageInsight cmdlet creates a new storage insight in an existing workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>New-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group that contains a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of an existing workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the desired name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountResourceId</maml:name>
<maml:description>
<maml:para>Specifies the Azure resource if of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="7">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses overwrite confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>New-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that will contain the new storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the desired name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountResourceId</maml:name>
<maml:description>
<maml:para>Specifies the Azure resource if of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="7">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses overwrite confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group that contains a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of an existing workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the desired name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountResourceId</maml:name>
<maml:description>
<maml:para>Specifies the Azure resource if of a storage account. This can be retrieved by executing the Get-AzureRmStorageAccount cmdlet and accessing the Id parameter of the result.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
<dev:type>
<maml:name>String[]</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="7">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
<dev:type>
<maml:name>String[]</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses overwrite confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that will contain the new storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
<dev:type>
<maml:name>PSWorkspace</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>New-AzureRmOperationalInsightsWorkspace</command:name>
<maml:description>
<maml:para>Creates a new workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>New</command:verb>
<command:noun>AzureOperationalInsightsWorkspace</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The New-AzureRmOperationalInsightsWorkspace cmdlet creates a new workspace in the specifies resource group and location.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>New-AzureRmOperationalInsightsWorkspace</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group. The workspace will be created in this resource group.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the desired name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>Location</maml:name>
<maml:description>
<maml:para>Specifies the location that the workspace will be created in (i.e. "East US" or "West Europe")</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Sku</maml:name>
<maml:description>
<maml:para>Specifies the service tier of the workspace. Valid values are "free", "standard", or "premium".</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>CustomerId</maml:name>
<maml:description>
<maml:para>Specifies an existing account that this workspace will be linked to. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can be used to list the potential accounts.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">Nullable`1[Guid]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>Tags</maml:name>
<maml:description>
<maml:para>Specifies the resource tags for the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses overwrite confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group. The workspace will be created in this resource group.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the desired name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>Location</maml:name>
<maml:description>
<maml:para>Specifies the location that the workspace will be created in (i.e. "East US" or "West Europe")</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Sku</maml:name>
<maml:description>
<maml:para>Specifies the service tier of the workspace. Valid values are "free", "standard", or "premium".</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>CustomerId</maml:name>
<maml:description>
<maml:para>Specifies an existing account that this workspace will be linked to. The Get-AzureRmOperationalInsightsLinkTargets cmdlet can be used to list the potential accounts.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">Nullable`1[Guid]</command:parameterValue>
<dev:type>
<maml:name>Nullable`1[Guid]</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>Tags</maml:name>
<maml:description>
<maml:para>Specifies the resource tags for the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
<dev:type>
<maml:name>Hashtable</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses overwrite confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Remove-AzureRmOperationalInsightsStorageInsight</command:name>
<maml:description>
<maml:para>Deletes an existing storage insight</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Remove</command:verb>
<command:noun>AzureOperationalInsightsStorageInsight</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Remove-AzureRmOperationalInsightsStorageInsight cmdlet deletes an existing storage insight from a workspace.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Remove-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>Remove-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
<dev:type>
<maml:name>PSWorkspace</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Remove-AzureRmOperationalInsightsWorkspace</command:name>
<maml:description>
<maml:para>Deletes an existing workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Remove</command:verb>
<command:noun>AzureOperationalInsightsWorkspace</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Remove-AzureRmOperationalInsightsWorkspace cmdlet deletes an existing workspace. If this workspace was linked to an existing account via the CustomerId parameter at creation time the original account will not be deleted in the Operational Insights portal.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Remove-AzureRmOperationalInsightsWorkspace</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Force</maml:name>
<maml:description>
<maml:para>Suppresses confirmation if present</maml:para>
</maml:description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type>
<maml:name>SwitchParameter</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Set-AzureRmOperationalInsightsStorageInsight</command:name>
<maml:description>
<maml:para>Updates an existing storage insight</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Set</command:verb>
<command:noun>AzureOperationalInsightsStorageInsight</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Set-AzureRmOperationalInsightsStorageInsight cmdlet allows the configuration of an existing storage insight to be changed.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Set-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group that contains a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of an existing workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of a storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>Set-AzureRmOperationalInsightsStorageInsight</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of a storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group that contains a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>WorkspaceName</maml:name>
<maml:description>
<maml:para>Specifies the name of an existing workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of a storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>StorageAccountKey</maml:name>
<maml:description>
<maml:para>Specifies the access key for the storage account</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="5">
<maml:name>Tables</maml:name>
<maml:description>
<maml:para>Specifies the list of tables that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
<dev:type>
<maml:name>String[]</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="6">
<maml:name>Containers</maml:name>
<maml:description>
<maml:para>Specifies the list of containers that data will be consumed from</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="true">String[]</command:parameterValue>
<dev:type>
<maml:name>String[]</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that contains the storage insight</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
<dev:type>
<maml:name>PSWorkspace</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Set-AzureRmOperationalInsightsWorkspace</command:name>
<maml:description>
<maml:para>Updates an existing workspace</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Set</command:verb>
<command:noun>AzureOperationalInsightsWorkspace</command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para>The Set-AzureRmOperationalInsightsWorkspace cmdlet allows the configuration of an existing workspace to be changed.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Set-AzureRmOperationalInsightsWorkspace</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Sku</maml:name>
<maml:description>
<maml:para>Specifies the service tier of the workspace. Valid values are "free", "standard", or "premium".</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>Tags</maml:name>
<maml:description>
<maml:para>Specifies the resource tags for the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
<command:syntaxItem>
<maml:name>Set-AzureRmOperationalInsightsWorkspace</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that will be updated</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Sku</maml:name>
<maml:description>
<maml:para>Specifies the service tier of the workspace. Valid values are "free", "standard", or "premium".</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>Tags</maml:name>
<maml:description>
<maml:para>Specifies the resource tags for the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1">
<maml:name>ResourceGroupName</maml:name>
<maml:description>
<maml:para>Specifies the name of an Azure resource group</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2">
<maml:name>Name</maml:name>
<maml:description>
<maml:para>Specifies the name of a workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>Sku</maml:name>
<maml:description>
<maml:para>Specifies the service tier of the workspace. Valid values are "free", "standard", or "premium".</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>Tags</maml:name>
<maml:description>
<maml:para>Specifies the resource tags for the workspace</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">Hashtable</command:parameterValue>
<dev:type>
<maml:name>Hashtable</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">AzureProfile</command:parameterValue>
<dev:type>
<maml:name>AzureProfile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue)" position="0">
<maml:name>Workspace</maml:name>
<maml:description>
<maml:para>Specifies the workspace that will be updated</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">PSWorkspace</command:parameterValue>
<dev:type>
<maml:name>PSWorkspace</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Get-AzureRmResourceProvider</command:name>
<maml:description>
<maml:para />
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb></command:verb>
<command:noun></command:noun>
<dev:version />
</command:details>
<maml:description>
<maml:para />
</maml:description>
<command:syntax>
</command:syntax>
<command:parameters>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>ListAvailable</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="false" variableLength="false">switchparameter</command:parameterValue>
<dev:type>
<maml:name>switchparameter</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>Profile</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">azureprofile</command:parameterValue>
<dev:type>
<maml:name>azureprofile</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="named">
<maml:name>ProviderNamespace</maml:name>
<maml:description>
<maml:para />
</maml:description>
<command:parameterValue required="true" variableLength="false">string</command:parameterValue>
<dev:type>
<maml:name>string</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri></maml:uri>
<maml:description/>
</dev:type>
<maml:description>
<maml:para>
</maml:para>
</maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para />
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
</helpItems>
|
{
"content_hash": "8e73ece7b02a52a21918cd1cee1ff07a",
"timestamp": "",
"source": "github",
"line_count": 2149,
"max_line_length": 427,
"avg_line_length": 43.07817589576547,
"alnum_prop": 0.7295274102079395,
"repo_name": "mayurid/azure-powershell",
"id": "d6bf0c879e66255d8d9886b964ce550be5ca9ccb",
"size": "92577",
"binary": false,
"copies": "1",
"ref": "refs/heads/dev",
"path": "src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "15822"
},
{
"name": "C#",
"bytes": "22945450"
},
{
"name": "HTML",
"bytes": "209"
},
{
"name": "JavaScript",
"bytes": "4979"
},
{
"name": "PHP",
"bytes": "41"
},
{
"name": "PowerShell",
"bytes": "1926265"
},
{
"name": "Shell",
"bytes": "50"
}
],
"symlink_target": ""
}
|
layout: post
title: Why Recessions Happen
tags: [money, old blog]
keywords: [recessions, recession, economy]
---
The sky is falling. Everyone's losing their job. The dollar isn't worth what it used to be. Everything's doom and gloom. Yet economists and politicians seem to insist that this is all part of a cycle, which includes recessions, booms, depressions, bull markets, bear markets, and other mumbo jumbo.
So why does the economy collapse every now and then? What makes it rise and fall? Why can't we just have a booming economy forever? It all has to do with the inherent flaw in capitalism. Consider the following picture:
// There used to be a picture called: The Business Cycle
Assume there are two groups of people: business people, depicted by the Monopoly guy on the left, and customers, depicted by the Monopoly guy on the right. These people play multiple roles, too: business people are also employers, and customers are also employees.
In order to make a profit, a business person has to make more money than his expenses. One of his expenses is employees, so that means he needs to make more money than he pays his employees.
In order for employees/customers to save money, they have spend less than they earn.
Thus a business person has to make more money than he pays employees, and employees have to earn more than they spend. Since employees are customers, the money they spend is the revenue for the business person. So for an economy to be stable, business people and employees must make more money than one another, and the economy collapses.
Almost done for today. Economies are much more complex than a single business person and employee, so the relationships are not as apparent. Other things factor in as well.
Until next time
Joe
|
{
"content_hash": "58b544b45f9863e6952319656f6b8652",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 338,
"avg_line_length": 70.84,
"alnum_prop": 0.7882552230378317,
"repo_name": "hendrixjoseph/hendrixjoseph.github.io",
"id": "b558e3ef2b3896811320fb33bd186ea8c5b4e063",
"size": "1775",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_posts/2009-02-25-why-recessions-happen.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4040"
},
{
"name": "HTML",
"bytes": "72815"
},
{
"name": "JavaScript",
"bytes": "51751"
},
{
"name": "SCSS",
"bytes": "18864"
}
],
"symlink_target": ""
}
|
'''A library that provides a Python interface to the Twitter API'''
__author__ = 'python-twitter@googlegroups.com'
__version__ = '2.0'
try:
# Python >= 2.6
import json as simplejson
except ImportError:
try:
# Python < 2.6
import simplejson
except ImportError:
try:
# Google App Engine
from django.utils import simplejson
except ImportError:
raise ImportError, "Unable to load a json library"
# parse_qsl moved to urlparse module in v2.6
try:
from urlparse import parse_qsl, parse_qs
except ImportError:
from cgi import parse_qsl, parse_qs
try:
from hashlib import md5
except ImportError:
from md5 import md5
from _file_cache import _FileCache
from error import TwitterError
from direct_message import DirectMessage
from hashtag import Hashtag
from parse_tweet import ParseTweet
from trend import Trend
from url import Url
from status import Status
from user import User, UserStatus
from list import List
from api import Api
|
{
"content_hash": "8538baf734859f16b1e0f1ae7fff52e4",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 67,
"avg_line_length": 24.45,
"alnum_prop": 0.7464212678936605,
"repo_name": "dtkelch/Tagger",
"id": "22bf869baa73f5d65e06fda723b2baad296403a8",
"size": "1621",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "python-twitter/twitter/__init__.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "75169"
},
{
"name": "CSS",
"bytes": "16424"
},
{
"name": "JavaScript",
"bytes": "54587"
},
{
"name": "Python",
"bytes": "526050"
},
{
"name": "Ruby",
"bytes": "2679"
},
{
"name": "Shell",
"bytes": "15003"
}
],
"symlink_target": ""
}
|
package com.ibm.watson.discovery.v1.model;
import static org.testng.Assert.*;
import com.ibm.cloud.sdk.core.service.model.FileWithMetadata;
import com.ibm.watson.discovery.v1.utils.TestUtilities;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import org.testng.annotations.Test;
/** Unit test class for the QueryTermAggregationResult model. */
public class QueryTermAggregationResultTest {
final HashMap<String, InputStream> mockStreamMap = TestUtilities.createMockStreamMap();
final List<FileWithMetadata> mockListFileWithMetadata =
TestUtilities.creatMockListFileWithMetadata();
@Test
public void testQueryTermAggregationResult() throws Throwable {
QueryTermAggregationResult queryTermAggregationResultModel = new QueryTermAggregationResult();
assertNull(queryTermAggregationResultModel.getKey());
assertNull(queryTermAggregationResultModel.getMatchingResults());
assertNull(queryTermAggregationResultModel.getRelevancy());
assertNull(queryTermAggregationResultModel.getTotalMatchingDocuments());
assertNull(queryTermAggregationResultModel.getEstimatedMatchingDocuments());
assertNull(queryTermAggregationResultModel.getAggregations());
}
}
|
{
"content_hash": "8d1968ab4881c553dd6c4e5d726a4d0e",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 98,
"avg_line_length": 40.766666666666666,
"alnum_prop": 0.821749795584628,
"repo_name": "watson-developer-cloud/java-sdk",
"id": "d0e9c3f5d8357e5171c7292aeec4d31968d091c6",
"size": "1807",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "discovery/src/test/java/com/ibm/watson/discovery/v1/model/QueryTermAggregationResultTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "350"
},
{
"name": "HTML",
"bytes": "50951"
},
{
"name": "Java",
"bytes": "7270071"
},
{
"name": "Makefile",
"bytes": "3123"
},
{
"name": "Python",
"bytes": "381"
},
{
"name": "Shell",
"bytes": "7894"
}
],
"symlink_target": ""
}
|
package sakuracloudapi.url;
/**
* サーバ関連APIのURLを生成する。
*
* @author djyugg
*/
public class ServerAPIURL extends SakuraCloudAPIURL {
private static final String SERVER_URI = "server";
private static final String POWER = "power";
private static final String CDROM = "cdrom";
private static final String INTERFACE = "interface";
private static final String KEYBOARD = "keyboard";
private static final String MONITOR = "monitor";
private static final String MOUSE = "mouse";
private static final String RESET = "reset";
private static final String TAG = "tag";
private static final String VNC = "vnc";
private static final String PROXY = "proxy";
private static final String SIZE = "size";
private static final String SNAPSHOT = "snapshot";
private static final String PLAN = "to/plan/";
public ServerAPIURL(APITarget target) {
super(target);
}
/**
* URIが"/server"となるURLを生成
*
* @return {ZONE_URL}/server
*/
public String createURL() {
return super.createURL(SERVER_URI);
}
/**
* URIが"/server/:serverID"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID
*/
public String createURL(String id) {
return super.createURL(super.createURIBuilder(SERVER_URI, id));
}
/**
* URIが"/server/:serverID/power"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/power
*/
public String createURLForPower(String id) {
return super.createURL(createServerURIBuilder(id, POWER));
}
/**
* URIが"/server/:serverID/cdrom"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/cdrom
*/
public String createURLForCdrom(String id) {
return super.createURL(createServerURIBuilder(id, CDROM));
}
/**
* URIが"/server/:serverID/interface"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/interface
*/
public String createURLForInterface(String id) {
return super.createURL(createServerURIBuilder(id, INTERFACE));
}
/**
* URIが"/server/:serverID/keyboard"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/keyboard
*/
public String createURLForKeyboard(String id) {
return super.createURL(createServerURIBuilder(id, KEYBOARD));
}
/**
* URIが"/server/:serverID/monitor"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/monitor
*/
public String createURLForMonitor(String id) {
return super.createURL(createServerURIBuilder(id, MONITOR));
}
/**
* URIが"/server/:serverID/mouse/:mouseIndex"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/mouse/:mouseIndex
*/
public String createURLForMouse(String id, String mouseIndex) {
return super.createURL(createServerURIBuilder(id, MOUSE).append("/").append(mouseIndex));
}
/**
* URIが"/server/:serverID/reset"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/reset
*/
public String createURLForReset(String id) {
return super.createURL(createServerURIBuilder(id, RESET));
}
/**
* URIが"/server/:serverID/tag"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/tag
*/
public String createURLForTag(String id) {
return super.createURL(createServerURIBuilder(id, TAG));
}
/**
* URIが"/server/tag"となるURLを生成
*
* @return {ZONE_URL}/server/tag
*/
public String createURLForTagList() {
return super.createURL(super.createURIBuilder(SERVER_URI, TAG));
}
/**
* URIが"/server/:serverID/vnc/proxy"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/vnc/proxy
*/
public String createURLForVncProxy(String id) {
return super.createURL(createServerVncURIBuilder(id, PROXY));
}
/**
* URIが"/server/:serverID/vnc/size"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/vnc/size
*/
public String createURLForVncSize(String id) {
return super.createURL(createServerVncURIBuilder(id, SIZE));
}
/**
* URIが"/server/:serverID/vnc/snapshot"となるURLを生成
*
* @param id サーバインスタンスID
* @return {ZONE_URL}/server/:serverID/vnc/snapshot
*/
public String createURLForVncSnapshot(String id) {
return super.createURL(createServerVncURIBuilder(id, SNAPSHOT));
}
/**
* URIが"/server/:serverID/to/plan/:planid"となるURLを生成
*
* @param id サーバインスタンスID
* @param planID プランID
* @return {ZONE_URL}/server/:serverID/to/plan/:planid
*/
public String createURLForPlan(String id, String planID) {
return super.createURL(createServerURIBuilder(id, PLAN).append(planID));
}
/**
* サーバAPIのURIを生成する。
*
* @param serverID サーバインスタンスID
* @param subFunctionName サーバAPIの機能
* @return サーバAPIのURI
*/
private StringBuilder createServerURIBuilder(String serverID, String subFunctionName) {
return super.createURIBuilder(SERVER_URI, serverID, subFunctionName);
}
/**
* サーバAPIのVNC機能に関するURIを生成する。
*
* @param serverID
* @param vncFunctionName VNCの機能名
* @return サーバAPI(VNC)のURL
*/
private StringBuilder createServerVncURIBuilder(String serverID, String vncFunctionName) {
return super.createURIBuilder(SERVER_URI, serverID, VNC).append("/").append(vncFunctionName);
}
}
|
{
"content_hash": "c627d7f85515c3f73b3cf5e4849a7a36",
"timestamp": "",
"source": "github",
"line_count": 200,
"max_line_length": 101,
"avg_line_length": 28.575,
"alnum_prop": 0.6409448818897637,
"repo_name": "djyugg/SakuraCloudAPI",
"id": "38e55d63b4b466259976e3de160782d53caf9d8b",
"size": "6295",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/sakuracloudapi/url/ServerAPIURL.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "260112"
}
],
"symlink_target": ""
}
|
<div class="step-pane" data-step="3">
<div class="row">
<h3 class="row header smaller lighter blue">
<span class="col-xs-6"> Header </span><!-- /.col -->
</h3>
<div>
<form class="form-horizontal" id="config-form">
<div class="form-group">
<label for="header_target" class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right">Title links to</label>
<div class="col-xs-12 col-sm-5">
<span class="block input-icon input-icon-right">
<select class="form-control" id="header_target" name="header_target">
<option value="0" class="nolink"></option>
</select>
</span>
</div>
</div>
<div class="form-group">
<label for="header_text" class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right">Title text</label>
<div class="col-xs-12 col-sm-5">
<span class="block input-icon input-icon-right">
<input type="text" id="header_text" name="header_text" class="width-100" />
</span>
</div>
</div>
<div class="form-group">
<label for="sub_text" class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right">Subtitle text</label>
<div class="col-xs-12 col-sm-5">
<span class="block input-icon input-icon-right">
<input type="text" id="sub_text" name="sub_text" class="width-100" />
</span>
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h3 class="row header smaller lighter blue">
<span class="col-xs-6"> Indicators </span><!-- /.col -->
</h3>
<div>
<table id="indicator-table" class="table table-bordered table-hover">
<thead>
<tr>
<th>Nama</th>
<th>Satuan</th>
<th>Frekuensi</th>
<th>Nilai akhir</th>
<th>
<i class="ace-icon fa fa-clock-o bigger-110 hidden-480"></i>
Tanggal terakhir
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div><!-- /.col -->
<div class="col-sm-6">
<h3 class="row header smaller lighter blue">
<span class="col-xs-6"> Drop here </span><!-- /.col -->
</h3>
<div id="cart" class="well well-sm">
<ol>
<li class="placeholder">Add your items here</li>
</ol>
</div>
</div>
</div>
</div>
<?php
echo js_asset('jquery.dataTables.js', 'ace');
echo js_asset('jquery.dataTables.bootstrap.js', 'ace');
?>
<script>
$(function () {
var $wizard = $('#fuelux-wizard-container')
.on('actionclicked.fu.wizard', function (e, info) {
if (info.step == 3) {
if ($('#selection-form').valid()) {
//submit form using ajax
//put return data (array of array) to a global variable
//after done, jump to next step
$.ajax({
type: "POST",
url: 'upload/get_sheet_data',
data: $('#selection-form').serialize(),
dataType: 'json',
success: function (data) {
//return value berupa array of [row,col,val]
preview_data = data;
//jump
var wizard = $wizard.data('fu.wizard');
//move to step 4
wizard.currentStep = 4;
wizard.setState();
//create dummy form
$dummy_form = $('<form/>', {
action: "upload/submit",
method: "POST"
});
//add serialized data from #selection-form
$.each($('#selection-form').serializeArray(), function (a, b) {
$dummy_form.append('<input type="hidden" name="' + b.name + '" value="' + b.value + '">');
});
}
});
}
e.preventDefault();
}
})
.on('changed.fu.wizard', function () {
if ($(this).data('fu.wizard').selectedItem().step === 3) {
//initiate dataTable after all data is populated (from the 1st step of wizard)
//and after this step is loaded
if (!$.fn.dataTable.isDataTable('#indicator-table')) {
$('#indicator-table').dataTable({
paging: false,
scrollCollapse: true,
scrollY: '200px',
aaSorting: []//disable initial sorting
});
} else {
$('#indicator-table').DataTable().draw();
}
//make it draggable
$("#indicator-table tbody tr").draggable({
appendTo: "body",
cursorAt: {left: 5, top: 20},
helper: "clone",
start: function (e, ui) {
var name = $(this).find('.in-name').text();
$(ui.helper).data('iid', $(this).data('iid')).html(name)
}
});
}
});
$("#cart ol").droppable({
activeClass: "ui-state-default",
hoverClass: "ui-state-hover",
accept: ":not(.ui-sortable-helper)",
drop: function (event, ui) {
var $ol = $(this);
$ol.find(".placeholder").remove();
var $li = $("<li/>", {
class: 'action-buttons'
});
var $delButton = $('<a/>', {
class: 'pull-right red'
}).click(function () {
//remove $li from ol
$li.remove();
//check apakah list kosong, jika ya kasih placeholder
if ($ol.children('li').length < 1)
$('<li class="placeholder">Add your items here</li>').appendTo($ol);
}).append($('<i/>', {
class: 'ace-icon fa fa-trash-o bigger-130'
}));
$li
.data('iid', ui.helper.data('iid'))
.append(ui.helper.text(), $delButton)
.appendTo($ol);
}
}).sortable({
items: "li:not(.placeholder)",
sort: function () {
// gets added unintentionally by droppable interacting with sortable
// using connectWithSortable fixes this, but doesn't allow you to customize active/hoverClass options
$(this).removeClass("ui-state-default");
}
});
});
</script>
|
{
"content_hash": "793a923de5159f165fdf5236284b137f",
"timestamp": "",
"source": "github",
"line_count": 186,
"max_line_length": 136,
"avg_line_length": 44.47849462365591,
"alnum_prop": 0.3738667956001451,
"repo_name": "danurwenda/xeroxampah",
"id": "98995f2076ef6592c962749408b31105d0a59344",
"size": "8273",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/views/admin/chart/config_step.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1527839"
},
{
"name": "HTML",
"bytes": "82481"
},
{
"name": "JavaScript",
"bytes": "5221462"
},
{
"name": "PHP",
"bytes": "2531724"
}
],
"symlink_target": ""
}
|
@class IOSClass;
@class IOSObjectArray;
@class JavaLangInteger;
@protocol AnAdapter;
@protocol AnAttrib;
@protocol AnObject;
@protocol JavaUtilList;
@protocol JavaUtilSet;
@interface AnSqlImpl : AnObjectImpl < AnSql > {
@public
NSString *tableName_;
}
#pragma mark Public
- (instancetype)initWithNSString:(NSString *)tableName
withAnObject:(id<AnObject>)anAllDefinedObject;
- (instancetype)initWithNSString:(NSString *)tableName
withIOSClass:(IOSClass *)anObjClass
withAnAttribArray:(IOSObjectArray *)attribList
withAnObject:(id<AnObject>)parentAnObject;
- (instancetype)initWithNSString:(NSString *)tableName
withIOSClass:(IOSClass *)anObjClass
withNSStringArray:(IOSObjectArray *)attribColumnList
withAnObject:(id<AnObject>)parentAnObject;
- (void)addInclAttribsWithNSStringArray:(IOSObjectArray *)names;
- (void)addLimitOffsetWithJavaLangInteger:(JavaLangInteger *)limit
withJavaLangInteger:(JavaLangInteger *)offset;
- (void)addSkipAttribsWithNSStringArray:(IOSObjectArray *)names;
- (void)addSqlWithNSString:(NSString *)sql;
- (void)addWhereWithNSString:(NSString *)condition;
- (void)addWhereWithNSString:(NSString *)condition
withId:(id)param;
- (NSString *)getAliasedColumnWithNSString:(NSString *)columnName;
- (id<JavaUtilList>)getAttribNameList;
- (id<AnAdapter>)getDbGetAdapter;
- (id<AnAdapter>)getDbSetAdapter;
- (id<JavaUtilList>)getParameters;
- (NSString *)getQueryString;
- (id<JavaUtilSet>)getSkipAttrNameList;
- (NSString *)getTableName;
- (jint)getType;
- (void)resetSkipInclAttrNameList;
- (void)setDbGetAdapterWithAnAdapter:(id<AnAdapter>)dbGetAdapter;
- (void)setDbSetAdapterWithAnAdapter:(id<AnAdapter>)dbSetAdapter;
- (void)setTableNameWithNSString:(NSString *)tableName;
- (void)setTypeWithInt:(jint)type;
- (id<AnSql>)startSqlCreate;
- (void)startSqlDelete;
- (void)startSqlInsertWithId:(id)objectToInsert;
- (void)startSqlSelect;
- (void)startSqlUpdateWithId:(id)objectToUpdate;
#pragma mark Protected
- (instancetype)init;
- (NSString *)getSqlColumnDefinitionWithAnAttrib:(id<AnAttrib>)attr;
- (jboolean)isSkipAttrWithNSString:(NSString *)propertyName;
// Disallowed inherited constructors, do not use.
- (instancetype)initWithIOSClass:(IOSClass *)arg0
withAnAttribArray:(IOSObjectArray *)arg1 NS_UNAVAILABLE;
- (instancetype)initWithIOSClass:(IOSClass *)arg0
withAnAttribArray:(IOSObjectArray *)arg1
withAnObject:(id<AnObject>)arg2 NS_UNAVAILABLE;
- (instancetype)initWithIOSClass:(IOSClass *)arg0
withAnObject:(id<AnObject>)arg1 NS_UNAVAILABLE;
- (instancetype)initWithIOSClass:(IOSClass *)arg0
withNSStringArray:(IOSObjectArray *)arg1 NS_UNAVAILABLE;
- (instancetype)initWithIOSClass:(IOSClass *)arg0
withNSStringArray:(IOSObjectArray *)arg1
withAnObject:(id<AnObject>)arg2 NS_UNAVAILABLE;
@end
J2OBJC_EMPTY_STATIC_INIT(AnSqlImpl)
J2OBJC_FIELD_SETTER(AnSqlImpl, tableName_, NSString *)
inline jint AnSqlImpl_get_TYPE_SELECT();
#define AnSqlImpl_TYPE_SELECT 1
J2OBJC_STATIC_FIELD_CONSTANT(AnSqlImpl, TYPE_SELECT, jint)
inline jint AnSqlImpl_get_TYPE_UPDATE();
#define AnSqlImpl_TYPE_UPDATE 2
J2OBJC_STATIC_FIELD_CONSTANT(AnSqlImpl, TYPE_UPDATE, jint)
inline jint AnSqlImpl_get_TYPE_INSERT();
#define AnSqlImpl_TYPE_INSERT 3
J2OBJC_STATIC_FIELD_CONSTANT(AnSqlImpl, TYPE_INSERT, jint)
inline jint AnSqlImpl_get_TYPE_CREATE();
#define AnSqlImpl_TYPE_CREATE 4
J2OBJC_STATIC_FIELD_CONSTANT(AnSqlImpl, TYPE_CREATE, jint)
inline jint AnSqlImpl_get_TYPE_DELETE();
#define AnSqlImpl_TYPE_DELETE 5
J2OBJC_STATIC_FIELD_CONSTANT(AnSqlImpl, TYPE_DELETE, jint)
FOUNDATION_EXPORT void AnSqlImpl_initWithNSString_withIOSClass_withAnAttribArray_withAnObject_(AnSqlImpl *self, NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribList, id<AnObject> parentAnObject);
FOUNDATION_EXPORT AnSqlImpl *new_AnSqlImpl_initWithNSString_withIOSClass_withAnAttribArray_withAnObject_(NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribList, id<AnObject> parentAnObject) NS_RETURNS_RETAINED;
FOUNDATION_EXPORT AnSqlImpl *create_AnSqlImpl_initWithNSString_withIOSClass_withAnAttribArray_withAnObject_(NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribList, id<AnObject> parentAnObject);
FOUNDATION_EXPORT void AnSqlImpl_initWithNSString_withIOSClass_withNSStringArray_withAnObject_(AnSqlImpl *self, NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribColumnList, id<AnObject> parentAnObject);
FOUNDATION_EXPORT AnSqlImpl *new_AnSqlImpl_initWithNSString_withIOSClass_withNSStringArray_withAnObject_(NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribColumnList, id<AnObject> parentAnObject) NS_RETURNS_RETAINED;
FOUNDATION_EXPORT AnSqlImpl *create_AnSqlImpl_initWithNSString_withIOSClass_withNSStringArray_withAnObject_(NSString *tableName, IOSClass *anObjClass, IOSObjectArray *attribColumnList, id<AnObject> parentAnObject);
FOUNDATION_EXPORT void AnSqlImpl_initWithNSString_withAnObject_(AnSqlImpl *self, NSString *tableName, id<AnObject> anAllDefinedObject);
FOUNDATION_EXPORT AnSqlImpl *new_AnSqlImpl_initWithNSString_withAnObject_(NSString *tableName, id<AnObject> anAllDefinedObject) NS_RETURNS_RETAINED;
FOUNDATION_EXPORT AnSqlImpl *create_AnSqlImpl_initWithNSString_withAnObject_(NSString *tableName, id<AnObject> anAllDefinedObject);
FOUNDATION_EXPORT void AnSqlImpl_init(AnSqlImpl *self);
FOUNDATION_EXPORT AnSqlImpl *new_AnSqlImpl_init() NS_RETURNS_RETAINED;
FOUNDATION_EXPORT AnSqlImpl *create_AnSqlImpl_init();
J2OBJC_TYPE_LITERAL_HEADER(AnSqlImpl)
@compatibility_alias ComValsA2iosAmfibianImplAnSqlImpl AnSqlImpl;
#endif
#pragma pop_macro("INCLUDE_ALL_ComValsA2iosAmfibianImplAnSqlImpl")
|
{
"content_hash": "7b43d6f3e735e4e5b71a6ccac5a99164",
"timestamp": "",
"source": "github",
"line_count": 165,
"max_line_length": 231,
"avg_line_length": 35.93939393939394,
"alnum_prop": 0.7747048903878584,
"repo_name": "vals-productions/sqlighter",
"id": "b209c8c65fae93a6d8d62ed14a9698b76a10a79a",
"size": "6782",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ios/j2objc/com/vals/a2ios/amfibian/impl/AnSqlImpl.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "244420"
},
{
"name": "Objective-C",
"bytes": "370872"
}
],
"symlink_target": ""
}
|
* Dependency the toolkit, such as using maven or gradle
```xml
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-toolkit-log4j-2.x</artifactId>
<version>{project.release.version}</version>
</dependency>
```
[  ](https://bintray.com/wu-sheng/skywalking/org.skywalking.apm-toolkit-log4j-2.x/_latestVersion)
* Config the `[%traceId]` pattern in your log4j2.xml
```xml
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%traceId] %-5p %c{1}:%L - %m%n"/>
</Console>
</Appenders>
```
* When you use `-javaagent` to active the sky-waking tracer, log4j2 will output **traceId**, if it existed. If the tracer is inactive, the output will be `TID: N/A`.
|
{
"content_hash": "3a57c1723a0363d83bdf8bd409d2eba7",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 237,
"avg_line_length": 46.421052631578945,
"alnum_prop": 0.6859410430839002,
"repo_name": "zhangkewei/sky-walking",
"id": "b021c7140c91afda9fc86b0b33b59fdb6b33cd5e",
"size": "882",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/en/Application-toolkit-log4j-2.x.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "630"
},
{
"name": "Java",
"bytes": "3147618"
},
{
"name": "Shell",
"bytes": "4454"
}
],
"symlink_target": ""
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ipfs.Http
{
public static class TestFixture
{
/// <summary>
/// Fiddler cannot see localhost traffic because .Net bypasses the network stack for localhost/127.0.0.1.
/// By using "127.0.0.1." (note trailing dot) fiddler will receive the traffic and if its not running
/// the localhost will get it!
/// </summary>
//IpfsClient.DefaultApiUri = new Uri("http://127.0.0.1.:5001");
public static IpfsClient Ipfs = new IpfsClient();
}
}
|
{
"content_hash": "5817f52191acc6703a072acdd31eaaf5",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 116,
"avg_line_length": 31.8,
"alnum_prop": 0.6509433962264151,
"repo_name": "richardschneider/net-ipfs-api",
"id": "5e08cf906ec077436b0a5254ca3655760aa57ce6",
"size": "638",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/TestFixture.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "154018"
}
],
"symlink_target": ""
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.