text
stringlengths 2
1.04M
| meta
dict |
---|---|
/**
* This package is for defining JavaScriptStacks, as used in Tapestry 5.3.7 and below. A stack is a collection of related javascript and styling code that works together.
*/
/**
* @author djue
*
*/
package graphene.web.services.javascript; | {
"content_hash": "f3a8e8fccf06a25a61e14f2516db3d7f",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 172,
"avg_line_length": 31.125,
"alnum_prop": 0.7309236947791165,
"repo_name": "codeaudit/graphene",
"id": "acd01820959652d6908fcababe8c9e5c73a3071e",
"size": "249",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "graphene-parent/graphene-web/src/main/java/graphene/web/services/javascript/package-info.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ActionScript",
"bytes": "15982"
},
{
"name": "Batchfile",
"bytes": "2493"
},
{
"name": "CSS",
"bytes": "1642076"
},
{
"name": "HTML",
"bytes": "43317"
},
{
"name": "Java",
"bytes": "2977722"
},
{
"name": "JavaScript",
"bytes": "5029429"
}
],
"symlink_target": ""
} |
using UnityEngine;
using Pubnative;
using Pubnative.Utils;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
namespace Pubnative.Core
{
public abstract class PNAd : MonoBehaviour
{
#region Events
public event Action Fail;
public event Action Ready;
#endregion
#region Constants
protected static string server_url = "http://api.pubnative.net/api/partner/v2/promotions/";
public const string REQUEST_APP_TOKEN = "app_token";
public const string REQUEST_BUNDLE_ID = "bundle_id";
private const string REQUEST_OS_NAME = "os";
private const string REQUEST_OS_VERSION = "os_version";
private const string REQUEST_DEVICE_MODEL = "device_model";
private const string REQUEST_DEVICE_RESOLUTION = "device_resolution";
private const string REQUEST_APPLE_IDFA = "apple_idfa";
private const string REQUEST_ANDROID_ID = "android_id";
private const string REQUEST_NO_USER_ID = "no_user_id";
private const string REQUEST_NO_USER_ID_VALUE = "1";
#endregion
#region Attributes
private Dictionary<string, object> requestParameters = new Dictionary<string, object>();
private bool notifyAdReady = false;
private bool notifyFail = false;
private bool impressionConfirmed = false;
#endregion
#region Delegates
protected delegate void ImageDownload(Texture2D texture);
#endregion
#region MonoBehaviour
private void Update()
{
if(this.notifyFail)
{
this.notifyFail = false;
if(Fail != null)
{
Fail();
}
}
if(this.notifyAdReady)
{
this.notifyAdReady = false;
if(Ready != null)
{
Ready();
}
}
}
#endregion
#region Public methods
public void RequestAd()
{
//Initialize common parameters
string os = string.Empty;
string version = string.Empty;
string deviceModel = string.Empty;
string deviceResolution = String.Format("{0}x{1}", Screen.width, Screen.height);
string userIDKey = REQUEST_NO_USER_ID;
string userID = PNUtils.UserID();
#if UNITY_EDITOR
os = "ios";
version = "7.1.1";
deviceModel = WWW.EscapeURL("iPhone5");
#elif UNITY_IOS
os = "ios";
version = WWW.EscapeURL(SystemInfo.operatingSystem.Replace("iPhone OS ", ""));
deviceModel = WWW.EscapeURL(SystemInfo.deviceModel);
userIDKey = REQUEST_APPLE_IDFA;
if(deviceModel.Equals("x86_64"))
{
deviceModel="iPhone5";
}
#elif UNITY_ANDROID
os = "android";
IntPtr clazz = AndroidJNI.FindClass("android.os.Build$VERSION");
IntPtr field = AndroidJNI.GetStaticFieldID(clazz, "RELEASE", AndroidJNIHelper.GetSignature(""));
version = WWW.EscapeURL(AndroidJNI.GetStaticStringField(clazz, field));
deviceModel = WWW.EscapeURL(SystemInfo.deviceModel);
userIDKey = REQUEST_ANDROID_ID;
#endif
AddParameter(REQUEST_OS_NAME, os);
AddParameter(REQUEST_OS_VERSION, version);
AddParameter(REQUEST_DEVICE_MODEL, deviceModel);
AddParameter(REQUEST_DEVICE_RESOLUTION, deviceResolution);
Debug.Log("UserIDKey: " + userIDKey + " - UserID: " + userID);
if(string.IsNullOrEmpty(userID))
{
AddParameter(REQUEST_NO_USER_ID, REQUEST_NO_USER_ID_VALUE);
}
else
{
AddParameter(userIDKey, userID);
}
//Create request URL
string url = string.Format("{0}{1}?", server_url, APIName());
url = string.Format("{0}{1}={2}", url, REQUEST_APP_TOKEN, requestParameters[REQUEST_APP_TOKEN]);
requestParameters.Remove(REQUEST_APP_TOKEN);
foreach (string key in requestParameters.Keys)
{
url = string.Format("{0}&{1}={2}", url, key, requestParameters[key]);
}
requestParameters.Clear();
StartCoroutine(RequestAdCoroutine(url));
}
public void AddParameter(string parameter, string value)
{
if(requestParameters.ContainsKey(parameter))
{
requestParameters.Remove(parameter);
}
requestParameters.Add(parameter, value);
}
#endregion
#region Helpers
private IEnumerator RequestAdCoroutine(string url)
{
WWW request = new WWW(url);
yield return request;
if (request.error == null)
{
Hashtable responseData = (Hashtable) MiniJSON.jsonDecode(request.text);
string status = (string)responseData["status"];
if(status.Equals("ok"))
{
ArrayList rawAds = (ArrayList) responseData["ads"];
if(rawAds.Count > 0)
{
ParseAd(((Hashtable)rawAds[0]));
}
else
{
Debug.Log("PubNative - No ads");
InvokeFail();
}
}
else
{
Debug.Log("PubNative - Request error in status: " + status + " - Request URL: " + url);
InvokeFail();
}
}
else
{
Debug.Log("PubNative - Network error: " + request.error + " - Request URL: " + url);
InvokeFail();
}
}
protected void OpenURL(string url)
{
Application.OpenURL(url);
}
protected IEnumerator ConfirmImpression(string url)
{
if(!this.impressionConfirmed)
{
WWW www = new WWW(url);
//Load the data and yield (wait) till it's ready before we continue executing the rest of this method.
yield return www;
if (www.error == null)
{
this.impressionConfirmed = true;
}
else
{
this.impressionConfirmed = false;
}
}
}
protected void RequestImage(string url, ImageDownload downloadDelegate)
{
if(url != null)
{
StartCoroutine(RequestImageCoroutine(url, downloadDelegate));
}
else
{
Debug.Log("PubNative - Image not provided by server");
downloadDelegate(null);
}
}
private IEnumerator RequestImageCoroutine(string url, ImageDownload downloadDelegate)
{
if(Path.GetExtension(url).Equals(".gif"))
{
Debug.Log("PubNative - Invalid image extension " + Path.GetExtension(url) + " - Request URL: " + url);
downloadDelegate(null);
}
else
{
WWW request = new WWW(url);
yield return request;
if (request.error == null)
{
downloadDelegate(request.texture);
}
else
{
Debug.Log("PubNative - Network error: " + request.error + " - Request URL: " + url);
downloadDelegate(null);
}
}
}
protected void InvokeFail()
{
this.notifyFail = true;
}
protected void InvokeReady()
{
this.notifyAdReady = true;
}
#endregion
#region Abstract methods
public abstract void Open();
public abstract void ConfirmImpression();
protected abstract string APIName();
protected abstract void Initialize ();
protected abstract void ParseAd(Hashtable ad);
#endregion
}
} | {
"content_hash": "06ada482b0bd22c74ed4f6bbe2f8daa6",
"timestamp": "",
"source": "github",
"line_count": 280,
"max_line_length": 118,
"avg_line_length": 30.689285714285713,
"alnum_prop": 0.5041312696380775,
"repo_name": "pubnative/pubnative-unity-library",
"id": "b4f01f111e4bb0fad4601430592b0da2e9b01d89",
"size": "8593",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Pubnative/Scripts/Core/PNAd.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "122836"
},
{
"name": "C++",
"bytes": "102"
},
{
"name": "Objective-C++",
"bytes": "1010"
}
],
"symlink_target": ""
} |
package org.openqa.selenium.grid.docker;
import com.beust.jcommander.Parameter;
import com.google.auto.service.AutoService;
import org.openqa.selenium.grid.config.ConfigValue;
import org.openqa.selenium.grid.config.HasRoles;
import org.openqa.selenium.grid.config.Role;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import static org.openqa.selenium.grid.config.StandardGridRoles.NODE_ROLE;
@AutoService(HasRoles.class)
public class DockerFlags implements HasRoles {
@Parameter(
names = {"--docker-url"},
description = "URL for connecting to the docker daemon"
)
@ConfigValue(section = "docker", name = "url", example = "\"unix:/var/run/docker\"")
private URL dockerUrl;
@Parameter(
names = {"--docker", "-D"},
description = "Docker configs which map image name to stereotype capabilities (example " +
"`-D selenium/standalone-firefox:latest '{\"browserName\": \"firefox\"}')",
arity = 2,
variableArity = true)
@ConfigValue(
section = "docker",
name = "configs",
example = "[\"selenium/standalone-firefox:latest\", \"{\\\"browserName\\\": \\\"firefox\\\"}\"]")
private List<String> images2Capabilities;
@Override
public Set<Role> getRoles() {
return Collections.singleton(NODE_ROLE);
}
}
| {
"content_hash": "9cc6c37af2477506ed94893fa9c203f5",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 101,
"avg_line_length": 31.833333333333332,
"alnum_prop": 0.6925953627524308,
"repo_name": "asolntsev/selenium",
"id": "0009aaf5261ffd9c76335532f719c0d846e74b55",
"size": "2141",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "java/server/src/org/openqa/selenium/grid/docker/DockerFlags.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "825"
},
{
"name": "Batchfile",
"bytes": "1585"
},
{
"name": "C",
"bytes": "47126"
},
{
"name": "C#",
"bytes": "3550663"
},
{
"name": "C++",
"bytes": "2262827"
},
{
"name": "CSS",
"bytes": "11660"
},
{
"name": "HTML",
"bytes": "1628732"
},
{
"name": "Java",
"bytes": "5573570"
},
{
"name": "JavaScript",
"bytes": "3634175"
},
{
"name": "Makefile",
"bytes": "4655"
},
{
"name": "Python",
"bytes": "808468"
},
{
"name": "Ragel",
"bytes": "3086"
},
{
"name": "Ruby",
"bytes": "819027"
},
{
"name": "Shell",
"bytes": "17775"
},
{
"name": "Starlark",
"bytes": "292491"
},
{
"name": "XSLT",
"bytes": "1047"
}
],
"symlink_target": ""
} |
<Dialog Name="FlowAccumDinf" HelpFile="FlowAccumDinf.html">
<DialogComponent type="DialogFile">
<Name>DEM</Name>
<Description>Enter the name of the DEM input raster here</Description>
<LabelText>DEM Input Raster:</LabelText>
<DialogMode>Open File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>Streams</Name>
<Description>Enter the name of the Streams input raster here</Description>
<LabelText>Input Streams Raster:</LabelText>
<DialogMode>Open File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>TTC</Name>
<Description>Enter the name of the Travel Time control (TT-control) input raster here</Description>
<LabelText>Input TT-control Raster (optional; blank if none):</LabelText>
<DialogMode>Open File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>True</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>EAC</Name>
<Description>Enter the name of the Elevation Above Creek (EAC) output raster here</Description>
<LabelText>EAC Output Raster:</LabelText>
<DialogMode>Save File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>DFC</Name>
<Description>Enter the name of the Distance From Creek (DFC) output raster here</Description>
<LabelText>DFC Output Raster:</LabelText>
<DialogMode>Save File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>GTC</Name>
<Description>Enter the name of the Gradient To Creek (GTC) output raster here</Description>
<LabelText>GTC Output Raster:</LabelText>
<DialogMode>Save File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
<DialogComponent type="DialogFile">
<Name>TTP</Name>
<Description>Enter the name of the Travel Time Proxy (TTP) output raster here</Description>
<LabelText>TTP Output Raster:</LabelText>
<DialogMode>Save File</DialogMode>
<Filter>Raster Files (*.dep), DEP</Filter>
<IsVisible>True</IsVisible>
<MakeOptional>False</MakeOptional>
<ShowButton>True</ShowButton>
</DialogComponent>
</Dialog>
| {
"content_hash": "f13cb9e9be6deb111640f6a4dafe8a83",
"timestamp": "",
"source": "github",
"line_count": 72,
"max_line_length": 101,
"avg_line_length": 40.55555555555556,
"alnum_prop": 0.7256849315068493,
"repo_name": "jblindsay/jblindsay.github.io",
"id": "183545f41403cb0bca46ceb5cb6a77383ab61770",
"size": "2920",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ghrg/Whitebox/WhiteboxGAT-linux/resources/plugins/Dialogs/ElevAboveCreek.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "52"
},
{
"name": "CSS",
"bytes": "1086446"
},
{
"name": "Groovy",
"bytes": "2186907"
},
{
"name": "HTML",
"bytes": "11454480"
},
{
"name": "Java",
"bytes": "5373007"
},
{
"name": "JavaScript",
"bytes": "1745824"
},
{
"name": "Python",
"bytes": "82583"
},
{
"name": "SCSS",
"bytes": "173472"
},
{
"name": "TeX",
"bytes": "15589"
}
],
"symlink_target": ""
} |
package redis
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestParseSentinelURL(t *testing.T) {
// db index should be set to 0 if not specified
url := "redis+sentinel://anonymous:password@host1:26379,host2:26379/mymaster/?idle_timeout_seconds=30"
o, err := ParseSentinelURL(url)
assert.NoError(t, err)
assert.Equal(t, 0, o.DB)
// test options from query
url = "redis+sentinel://anonymous:password@host1:26379,host2:26379/mymaster/1?idle_timeout_seconds=30&max_retries=10&min_retry_backoff=1&max_retry_backoff=10&dial_timeout=30&read_timeout=5&write_timeout=5&pool_fifo=true&pool_size=1000&min_idle_conns=100&max_conn_age=10&pool_timeout=10"
o, err = ParseSentinelURL(url)
assert.NoError(t, err)
assert.Equal(t, "anonymous", o.Username)
assert.Equal(t, "password", o.Password)
assert.Equal(t, []string{"host1:26379", "host2:26379"}, o.SentinelAddrs)
assert.Equal(t, "mymaster", o.MasterName)
assert.Equal(t, 1, o.DB)
assert.Equal(t, 30*time.Second, o.IdleTimeout)
assert.Equal(t, 10, o.MaxRetries)
assert.Equal(t, 10*time.Second, o.MaxRetryBackoff)
assert.Equal(t, 1*time.Second, o.MinRetryBackoff)
assert.Equal(t, 30*time.Second, o.DialTimeout)
assert.Equal(t, 5*time.Second, o.ReadTimeout)
assert.Equal(t, 5*time.Second, o.WriteTimeout)
assert.Equal(t, true, o.PoolFIFO)
assert.Equal(t, 1000, o.PoolSize)
assert.Equal(t, 100, o.MinIdleConns)
assert.Equal(t, 10*time.Second, o.MaxConnAge)
assert.Equal(t, 10*time.Second, o.PoolTimeout)
// invalid url should return err
url = "###"
_, err = ParseSentinelURL(url)
assert.Error(t, err, "invalid url should return err")
}
| {
"content_hash": "4b8a1298f676b42f66279236bc7e9da8",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 287,
"avg_line_length": 37.09090909090909,
"alnum_prop": 0.7334558823529411,
"repo_name": "wy65701436/harbor",
"id": "9d862e537594cac970a6dceb3a2f66c103a17e1c",
"size": "2226",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/lib/cache/redis/util_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2122"
},
{
"name": "Dockerfile",
"bytes": "17013"
},
{
"name": "Go",
"bytes": "5543957"
},
{
"name": "HTML",
"bytes": "857388"
},
{
"name": "JavaScript",
"bytes": "8987"
},
{
"name": "Jinja",
"bytes": "199133"
},
{
"name": "Makefile",
"bytes": "41515"
},
{
"name": "PLpgSQL",
"bytes": "11799"
},
{
"name": "Python",
"bytes": "532665"
},
{
"name": "RobotFramework",
"bytes": "482646"
},
{
"name": "SCSS",
"bytes": "113564"
},
{
"name": "Shell",
"bytes": "81765"
},
{
"name": "Smarty",
"bytes": "1931"
},
{
"name": "TypeScript",
"bytes": "2048995"
}
],
"symlink_target": ""
} |
This is a toolbox that allows you to do some little [CI](https://en.wikipedia.org/wiki/Continuous_integration)-magic for your simple website.
## Use case
For example, Homka is useful in the management of backend processes of
your wordpress blog. :monkey_face:
Deploy a website on your local machine. Do some coding.
Then use this toolbox to build and deploy your new code to the server.
Homka takes upon oneself some routines like
"dump actual MySQL data from server" or "pull fresh image uploads".
## Configuration
First of all setup a config file - just copy `template.conf`
to `my-project.conf` and fill it. Put your config wherever you want.
You will need to specify path to your config for every action, so that Homka
knows your project-specific parameters.
## Usage
Common pattern:
./homka [action] [options] project.conf
Get help:
./homka help
./homka [action] --help
## TODO
- Rollback action | {
"content_hash": "388e0b94a52f54df5e9a67d42707124a",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 141,
"avg_line_length": 27.205882352941178,
"alnum_prop": 0.7513513513513513,
"repo_name": "hypnoglow/homka",
"id": "929e3728f832d21a5f0db34e1de118d1658095a0",
"size": "944",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Shell",
"bytes": "22149"
}
],
"symlink_target": ""
} |
// Copyright (c) The Perspex Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
namespace NGenerics.DataStructures.Trees
{
internal enum NodeColor
{
Red = 0,
Black = 1
}
} | {
"content_hash": "395df3c70a5cb922314721293aeb62f6",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 104,
"avg_line_length": 20.5,
"alnum_prop": 0.6794425087108014,
"repo_name": "ncarrillo/Perspex",
"id": "839c1fbe0eee55e179800269ac86a64e8334f750",
"size": "641",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/NGenerics/DataStructures/Trees/NodeColor.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2276"
},
{
"name": "C#",
"bytes": "2025137"
},
{
"name": "Smalltalk",
"bytes": "52570"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>
| {
"content_hash": "5034680b6385cf272c67ded8e75b7f95",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 49,
"avg_line_length": 32.888888888888886,
"alnum_prop": 0.6452702702702703,
"repo_name": "guohan/hadoop",
"id": "dca5dc5097a659622ca39ab9fbb00105061c5c03",
"size": "296",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tdh_hive_jsp_ker/.settings/org.eclipse.wst.common.project.facet.core.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "785642"
},
{
"name": "HTML",
"bytes": "868211"
},
{
"name": "HiveQL",
"bytes": "20"
},
{
"name": "Java",
"bytes": "1776802"
},
{
"name": "JavaScript",
"bytes": "6338088"
},
{
"name": "PHP",
"bytes": "11088"
},
{
"name": "Python",
"bytes": "10332"
},
{
"name": "TeX",
"bytes": "38644"
},
{
"name": "XSLT",
"bytes": "13008"
}
],
"symlink_target": ""
} |
Message.Queue.Provider is a simple implemetation for to peek, push and receive messaging.
## Providers
<a href="https://azure.microsoft.com/services/service-bus/" rel="NuGet">Service Bus</a>. </br>
<a href="https://msdn.microsoft.com/en-us/library/ms711472(v=vs.85).aspx" rel="NuGet">Microsoft Message Queuing</a>.
The service factories contains all providers:
```c#
MsmqProviderFactory
ServiceBusProviderFactory
```
## Getting Started
To get started with the Message.Queue.Provider, install <a href="https://www.nuget.org/packages/Messaging.Queue.Provider/" rel="NuGet">nuget package</a>.
Define the provider do you like use and install correlation package.
**Ms Message Queuing**: <a href="https://www.nuget.org/packages/Messaging.Queue.Provider.Msmq/" rel="NuGet">Msmq nuget package</a></br>
**Service Bus**: <a href="https://www.nuget.org/packages/Messaging.Queue.Provider.ServiceBus/" rel="NuGet">Service Bus nuget package</a>
### Sample
```c#
// Dependency Injection (DI) using Simple Injector
var container = new Container();
container.RegisterSingleton<IServiceProvider>(container);
//If Msmq
container.Register<IMsmqProviderFactory, MsmqProviderFactory>();
var msmqProviderFactory = container.GetInstance<IMsmqProviderFactory>();
//If Service Bus
container.Register<IServiceBusProviderFactory, ServiceBusProviderFactory>();
var sbProviderFactory = container.GetInstance<IServiceBusProviderFactory>();
```
###### Push
```c#
var sampleMessage = new SampleMessage
{
SampleMessageId = 1,
Name = "Sample Message",
Created = DateTime.UtcNow
};
//If do you like use Service Bus, alter next line for sbProviderFactory.Create...
using (var messageQueue = msmqProviderFactory.Create<SampleMessage>(Serializer.Json, "message_queue_sample"))
{
await messageQueue.PushAsync(new QueueMessage<SampleMessage>(sampleMessage)).Wait();
System.Console.WriteLine($"Push message successfully. Body: {queueMessage.Item}");
}
```
###### Receive
```c#
var isRunning = true;
//If do you like use Service Bus, alter next line for sbProviderFactory.Create...
using (var messageQueue = msmqProviderFactory.Create<SampleMessage>(Serializer.Json, "message_queue_sample"))
{
while (isRunning)
{
try
{
var queueMessage = await messageQueue.ReceiveAsync(new TimeSpan(0, 0, 0, 10, 0)).Result;
if (queueMessage != null)
{
System.Console.WriteLine($"Removed message from the queue. Body: {queueMessage.Item}");
}
}
catch (TimeoutException ex)
{
System.Console.WriteLine($"{ex.Message}");
}
catch (Exception e)
{
System.Console.WriteLine($"Unexpected error receive message. Error: {ex.Message}");
}
}
}
```
###### .config
if using service bus provider
```xml
<appSettings>
<!-- Service Bus specific app setings for messaging connections -->
<add key="sbConnectionString"
value="Endpoint=sb://[your namespace].servicebus.windows.net;SharedAccessKeyName=RootManageSharedAccessKey;
SharedAccessKey=[your secret]"/>
</appSettings>
```
| {
"content_hash": "f56c4af6f181f55854ed8d7b4704a041",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 153,
"avg_line_length": 30.55,
"alnum_prop": 0.7230769230769231,
"repo_name": "brunobrandes/messaging-queue-provider",
"id": "acccc29f594a7054973ef385476376151cfae34c",
"size": "3081",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "33448"
}
],
"symlink_target": ""
} |
#ifndef WebServiceWorker_h
#define WebServiceWorker_h
#include "public/platform/WebCommon.h"
#include "public/platform/WebMessagePortChannel.h"
#include "public/platform/WebString.h"
#include "public/platform/WebURL.h"
#include "public/platform/WebVector.h"
#include "public/platform/modules/serviceworker/WebServiceWorkerState.h"
namespace blink {
class WebServiceWorkerProxy;
typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray;
class WebServiceWorker {
public:
virtual ~WebServiceWorker() { }
// Sets ServiceWorkerProxy, with which callee can start making upcalls
// to the ServiceWorker object via the client. This doesn't pass the
// ownership to the callee, and the proxy's lifetime is same as that of
// WebServiceWorker.
virtual void setProxy(WebServiceWorkerProxy*) { }
virtual WebServiceWorkerProxy* proxy() { return nullptr; }
virtual WebURL url() const { return WebURL(); }
virtual WebServiceWorkerState state() const { return WebServiceWorkerStateUnknown; }
// Callee receives ownership of the passed vector.
// FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753
virtual void postMessage(const WebString&, WebMessagePortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); }
virtual void terminate() { }
};
}
#endif // WebServiceWorker_h
| {
"content_hash": "b6ce17a01d982f4adb8c164b77716078",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 107,
"avg_line_length": 33.02439024390244,
"alnum_prop": 0.7592319054652881,
"repo_name": "Pluto-tv/blink-crosswalk",
"id": "9aa107cecbe39a612762befac0668f12c650d8d6",
"size": "2916",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "public/platform/modules/serviceworker/WebServiceWorker.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "1835"
},
{
"name": "Assembly",
"bytes": "14768"
},
{
"name": "Batchfile",
"bytes": "35"
},
{
"name": "C",
"bytes": "128002"
},
{
"name": "C++",
"bytes": "45337051"
},
{
"name": "CSS",
"bytes": "596289"
},
{
"name": "CoffeeScript",
"bytes": "163"
},
{
"name": "GLSL",
"bytes": "11578"
},
{
"name": "Groff",
"bytes": "28067"
},
{
"name": "HTML",
"bytes": "64824312"
},
{
"name": "Java",
"bytes": "109377"
},
{
"name": "JavaScript",
"bytes": "25099309"
},
{
"name": "Objective-C",
"bytes": "45096"
},
{
"name": "Objective-C++",
"bytes": "302371"
},
{
"name": "PHP",
"bytes": "220636"
},
{
"name": "Perl",
"bytes": "115958"
},
{
"name": "Python",
"bytes": "3879209"
},
{
"name": "Ruby",
"bytes": "73952"
},
{
"name": "Shell",
"bytes": "10282"
},
{
"name": "XSLT",
"bytes": "50203"
},
{
"name": "Yacc",
"bytes": "10148"
}
],
"symlink_target": ""
} |
package jwave.exceptions;
/**
* Marking failures for this package; failures that are recoverable
*
* @date 19.05.2009 09:26:22
* @author Christian Scheiblich ([email protected])
*/
public class JWaveFailure extends JWaveException {
/**
* Generated serial ID for this failure
*
* @date 19.05.2009 09:27:18
* @author Christian Scheiblich ([email protected])
*/
private static final long serialVersionUID = 5471588833755939370L;
/**
* Constructor taking a failure message
*
* @date 19.05.2009 09:26:22
* @author Christian Scheiblich ([email protected])
* @param message
* the stored failure message for this exception
*/
public JWaveFailure( String message ) {
super( message );
_message = "JWave"; // overwrite
_message += ": "; // separator
_message += "Failure"; // Exception type
_message += ": "; // separator
_message += message; // add message
_message += "\n"; // break line
} // TransformFailure
} // class
| {
"content_hash": "9c06001acf56ed5eba708d42485adc61",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 68,
"avg_line_length": 26.55263157894737,
"alnum_prop": 0.6580773042616452,
"repo_name": "pbaczyk/JWave",
"id": "4872bca7e98ee462756ea5b9fca23f45e3ba9ec1",
"size": "2242",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/jwave/exceptions/JWaveFailure.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "525538"
}
],
"symlink_target": ""
} |
package com.intellij.ide.actions;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.fileTypes.FileTypes;
import com.intellij.openapi.fileTypes.ex.FileTypeChooser;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
public class AssociateFileType extends AnAction {
public void actionPerformed(AnActionEvent e) {
VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);
FileTypeChooser.associateFileType(file.getName());
}
public void update(AnActionEvent e) {
Presentation presentation = e.getPresentation();
DataContext dataContext = e.getDataContext();
VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(dataContext);
Project project = CommonDataKeys.PROJECT.getData(dataContext);
boolean haveSmthToDo;
if (project == null || file == null || file.isDirectory()) {
haveSmthToDo = false;
}
else {
// the action should also be available for files which have been auto-detected as text or as a particular language (IDEA-79574)
haveSmthToDo = FileTypeManager.getInstance().getFileTypeByFileName(file.getName()) == FileTypes.UNKNOWN;
}
presentation.setVisible(haveSmthToDo || ActionPlaces.MAIN_MENU.equals(e.getPlace()));
presentation.setEnabled(haveSmthToDo);
}
}
| {
"content_hash": "ec8021b83e03256dda49e55565bcd3a3",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 133,
"avg_line_length": 40.14705882352941,
"alnum_prop": 0.7597069597069597,
"repo_name": "IllusionRom-deprecated/android_platform_tools_idea",
"id": "77544ae1d14cb81ebeb9addb6350c03a82f53952",
"size": "1965",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "platform/platform-impl/src/com/intellij/ide/actions/AssociateFileType.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "177802"
},
{
"name": "C#",
"bytes": "390"
},
{
"name": "C++",
"bytes": "78894"
},
{
"name": "CSS",
"bytes": "102018"
},
{
"name": "Erlang",
"bytes": "10"
},
{
"name": "Groovy",
"bytes": "1906667"
},
{
"name": "J",
"bytes": "5050"
},
{
"name": "Java",
"bytes": "128322265"
},
{
"name": "JavaScript",
"bytes": "123045"
},
{
"name": "Objective-C",
"bytes": "22558"
},
{
"name": "Perl",
"bytes": "6549"
},
{
"name": "Python",
"bytes": "17760420"
},
{
"name": "Ruby",
"bytes": "1213"
},
{
"name": "Shell",
"bytes": "76554"
},
{
"name": "TeX",
"bytes": "60798"
},
{
"name": "XSLT",
"bytes": "113531"
}
],
"symlink_target": ""
} |
import css from './style.css';
document.write(require("./content.js"))
| {
"content_hash": "71d44e2602d7d280b1183f0de84cef12",
"timestamp": "",
"source": "github",
"line_count": 2,
"max_line_length": 39,
"avg_line_length": 35.5,
"alnum_prop": 0.704225352112676,
"repo_name": "paul-shannon/projects",
"id": "32c92d7891aebf8936c25d3733e6bc5577171d03",
"size": "71",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/js/webpack/learning-webpack2/level0/entry.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "4001"
},
{
"name": "JavaScript",
"bytes": "8570"
},
{
"name": "Makefile",
"bytes": "697"
},
{
"name": "R",
"bytes": "75693"
}
],
"symlink_target": ""
} |
// Type definitions for the non-npm package sphere-engine-browser/v1 1.5
// Project: https://github.com/fatcerberus/miniSphere
// Definitions by: Eggbertx <https://github.com/Eggbertx>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.4
/*
* Deprecated Sphere 1.x objects necessary for some functions
* Most of the JSDoc comments have been copied/adapted from the old Sphere documentation
* https://github.com/sphere-group/sphere/blob/master/sphere/docs/development/api.txt
*/
declare const COMMAND_WAIT = 0;
declare const COMMAND_ANIMATE = 1;
declare const COMMAND_FACE_NORTH = 2;
declare const COMMAND_FACE_NORTHEAST = 3;
declare const COMMAND_FACE_EAST = 4;
declare const COMMAND_FACE_SOUTHEAST = 5;
declare const COMMAND_FACE_SOUTH = 6;
declare const COMMAND_FACE_SOUTHWEST = 7;
declare const COMMAND_FACE_WEST = 8;
declare const COMMAND_FACE_NORTHWEST = 9;
declare const COMMAND_MOVE_NORTH = 10;
declare const COMMAND_MOVE_EAST = 11;
declare const COMMAND_MOVE_SOUTH = 12;
declare const COMMAND_MOVE_WEST = 13;
declare const EDGE_LEFT = 0;
declare const EDGE_TOP = 1;
declare const EDGE_RIGHT = 2;
declare const EDGE_BOTTOM = 3;
declare const KEY_ESCAPE = 0;
declare const KEY_F1 = 1;
declare const KEY_F2 = 2;
declare const KEY_F3 = 3;
declare const KEY_F4 = 4;
declare const KEY_F5 = 5;
declare const KEY_F6 = 6;
declare const KEY_F7 = 7;
declare const KEY_F8 = 8;
declare const KEY_F9 = 9;
declare const KEY_F10 = 10;
declare const KEY_F11 = 11;
declare const KEY_F12 = 12;
declare const KEY_TILDE = 13;
declare const KEY_0 = 14;
declare const KEY_1 = 15;
declare const KEY_2 = 16;
declare const KEY_3 = 17;
declare const KEY_4 = 18;
declare const KEY_5 = 19;
declare const KEY_6 = 20;
declare const KEY_7 = 21;
declare const KEY_8 = 22;
declare const KEY_9 = 23;
declare const KEY_MINUS = 24;
declare const KEY_EQUALS = 25;
declare const KEY_BACKSPACE = 26;
declare const KEY_TAB = 27;
declare const KEY_A = 28;
declare const KEY_B = 29;
declare const KEY_C = 30;
declare const KEY_D = 31;
declare const KEY_E = 32;
declare const KEY_F = 33;
declare const KEY_G = 34;
declare const KEY_H = 35;
declare const KEY_I = 36;
declare const KEY_J = 37;
declare const KEY_K = 38;
declare const KEY_L = 39;
declare const KEY_M = 40;
declare const KEY_N = 41;
declare const KEY_O = 42;
declare const KEY_P = 43;
declare const KEY_Q = 44;
declare const KEY_R = 45;
declare const KEY_S = 46;
declare const KEY_T = 47;
declare const KEY_U = 48;
declare const KEY_V = 49;
declare const KEY_W = 50;
declare const KEY_X = 51;
declare const KEY_Y = 52;
declare const KEY_Z = 53;
declare const KEY_SHIFT = 54;
declare const KEY_CTRL = 55;
declare const KEY_ALT = 56;
declare const KEY_SPACE = 57;
declare const KEY_OPENBRACE = 58;
declare const KEY_CLOSEBRACE = 59;
declare const KEY_SEMICOLON = 60;
declare const KEY_APOSTROPHE = 61;
declare const KEY_COMMA = 62;
declare const KEY_PERIOD = 63;
declare const KEY_SLASH = 64;
declare const KEY_BACKSLASH = 65;
declare const KEY_ENTER = 66;
declare const KEY_INSERT = 67;
declare const KEY_DELETE = 68;
declare const KEY_HOME = 69;
declare const KEY_END = 70;
declare const KEY_PAGEUP = 71;
declare const KEY_PAGEDOWN = 72;
declare const KEY_UP = 73;
declare const KEY_RIGHT = 74;
declare const KEY_DOWN = 75;
declare const KEY_LEFT = 76;
declare const KEY_NUM_0 = 77;
declare const KEY_NUM_1 = 78;
declare const KEY_NUM_2 = 79;
declare const KEY_NUM_3 = 80;
declare const KEY_NUM_4 = 81;
declare const KEY_NUM_5 = 82;
declare const KEY_NUM_6 = 83;
declare const KEY_NUM_7 = 84;
declare const KEY_NUM_8 = 85;
declare const KEY_NUM_9 = 86;
declare const KEY_CAPSLOCK = 87;
declare const KEY_NUMLOCK = 88;
declare const KEY_SCROLLOCK = 89;
declare const SCRIPT_ON_ENTER_MAP = 0;
declare const SCRIPT_ON_LEAVE_MAP = 1;
declare const SCRIPT_ON_LEAVE_MAP_NORTH = 2;
declare const SCRIPT_ON_LEAVE_MAP_EAST = 3;
declare const SCRIPT_ON_LEAVE_MAP_SOUTH = 4;
declare const SCRIPT_ON_LEAVE_MAP_WEST = 5;
declare const SCRIPT_ON_CREATE = 0;
declare const SCRIPT_ON_DESTROY = 1;
declare const SCRIPT_ON_ACTIVATE_TOUCH = 2;
declare const SCRIPT_ON_ACTIVATE_TALK = 3;
/** Called when the command queue for the person runs out */
declare const SCRIPT_COMMAND_GENERATOR = 4;
/** default for drawing */
declare const BLEND = 0;
declare const REPLACE = 1;
declare const RGB_ONLY = 2;
declare const ALPHA_ONLY = 3;
declare const ADD = 4;
declare const SUBTRACT = 5;
/** default for masking */
declare const MULTIPLY = 6;
declare const AVERAGE = 7;
declare const INVERT = 8;
/**
* A Sphere 1.x color object
*
* Note that the RGBA properties of Sphere 1.x color objects are integers between 0 and 255, but
* the properties of miniSphere `Color` classes are floating point numbers between 0.0 and 1.0
*
* Objects from the 1.x API should generally only be used for Sphere 1.x API functions
* that require them.
*/
interface Sphere1Color {
red: number;
green: number;
blue: number;
alpha: number;
}
/**
* A Sphere 1.x font object
*
* Objects from the 1.x API should generally only be used for Sphere 1.x API functions
* that require them.
*/
interface Sphere1Font {
setColorMask(color: Sphere1Color): void;
getColorMask(): Sphere1Color;
drawText(x: number, y: number, text: any): void;
drawZoomedText(x: number, y: number, scale: number, text: any): void;
drawTextBox(x: number, y: number, w: number, h: number, offset: number, text: any): void;
wordWrapString(string: any, width: number): any[];
getHeight(): number;
getStringWidth(string: any): number;
getStringHeight(string: any, width: number): number;
clone(): Sphere1Font;
getCharacterImage(code: number): Sphere1Image;
setCharacterImage(code: number, image: Sphere1Image): void;
}
/**
* A Sphere 1.x image object
*
* Objects from the 1.x API should generally only be used for Sphere 1.x API functions
* that require them.
*/
interface Sphere1Image {
width: number;
height: number;
blit(x: number, y: number, blendMode?: number): void;
blitMask(x: number, y: number, mask: Sphere1Color, blendMode?: number, maskBlendMode?: number): void;
rotateBlit(x: number, y: number, radians: number, blendMode?: number): void;
rotateBlitMask(
x: number,
y: number,
radians: number,
mask: Sphere1Color,
blendMode?: number,
maskBlendMode?: number,
): void;
zoomBlit(x: number, y: number, factor: number, blendmode?: number): void;
zoomBlitMask(
x: number,
y: number,
factor: number,
color: Sphere1Color,
blendmode?: number,
maskBlendMode?: number,
): void;
transformBlit(
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
blendmode?: number,
): void;
transformBlitMask(
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
mask: Sphere1Color,
blendmode?: number,
maskBlendMode?: number,
): void;
createSurface(): Sphere1Surface;
}
interface Sphere1Point {
x: number;
y: number;
}
/**
* A Sphere 1.x surface object
*
* Objects from the 1.x API should generally only be used for Sphere 1.x API functions
* that require them.
*/
interface Sphere1Surface {
width: number;
height: number;
applyLookup(
x: number,
y: number,
w: number,
h: number,
redLookup: number[],
greenLookup: number[],
blueLookup: number[],
alphaLookup: number[],
): void;
applyColorFX(x: number, y: number, w: number, h: number, colorMatrix: any): void;
applyColorFX4(
x: number,
y: number,
w: number,
h: number,
matrixUL: any,
matrixUR: any,
matrixLL: any,
matrixLR: any,
): void;
blit(x: number, y: number): void;
blitSurface(surface: Sphere1Surface, x: number, y: number): void;
blitMaskSurface(surface: Sphere1Surface, x: number, y: number, mask: Sphere1Color, maskBlendMode: number): void;
rotateBlitSurface(surface: Sphere1Surface, x: number, y: number, radians: number): void;
rotateBlitMaskSurface(
surface: Sphere1Surface,
x: number,
y: number,
radians: number,
mask: Sphere1Color,
maskBlendMode: number,
): void;
zoomBlitSurface(surface: Sphere1Surface, x: number, y: number, factor: number): void;
zoomBlitMaskSurface(
surface: Sphere1Surface,
x: number,
y: number,
factor: number,
mask: Sphere1Color,
maskBlendMode?: number,
): void;
transformBlitSurface(
surface: Sphere1Surface,
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
): void;
transformBlitMaskSurface(
surface: Sphere1Surface,
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
x4: number,
y4: number,
mask: Sphere1Color,
maskBlendMode?: number,
): void;
createImage(): Sphere1Image;
setBlendMode(mode: number): void;
getPixel(x: number, y: number): Sphere1Color;
setPixel(x: number, y: number, color: Sphere1Color): void;
setAlpha(alpha: number): void;
replaceColor(oldColor: Sphere1Color, newColor: Sphere1Color): void;
findColor(aColor: Sphere1Color): boolean;
floodFill(x: number, y: number, color: Sphere1Color): void;
pointSeries(array: Sphere1Color[], color: Sphere1Color): void;
line(x1: number, y1: number, x2: number, y2: number, color: Sphere1Color): void;
gradientLine(x1: number, y1: number, x2: number, y2: number, color1: Sphere1Color, color2: Sphere1Color): void;
lineSeries(array: Sphere1Point[], color: Sphere1Color, type?: number): void;
bezierCurve(
color: Sphere1Color,
step: number,
Ax: number,
Ay: number,
Bx: number,
By: number,
Cx: number,
Cy: number,
Dx?: number,
Dy?: number,
): void;
outlinedRectangle(x: number, y: number, width: number, height: number, color: Sphere1Color, size?: number): void;
rectangle(x: number, y: number, width: number, height: number, color: Sphere1Color): void;
gradientRectangle(
x: number,
y: number,
width: number,
colorUL: Sphere1Color,
colorUR: Sphere1Color,
colorLR: Sphere1Color,
colorLL: Sphere1Color,
): void;
triangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, color: Sphere1Color): void;
gradientTriangle(
x1: number,
y1: number,
x2: number,
y2: number,
x3: number,
y3: number,
c1: Sphere1Color,
c2: Sphere1Color,
c3: Sphere1Color,
): void;
polygon(array: Sphere1Point[], color: Sphere1Color, invert: boolean): void;
outlinedEllipse(x: number, y: number, rx: number, ry: number, c: Sphere1Color): void;
filledEllipse(x: number, y: number, rx: number, ry: number, c: Sphere1Color): void;
outlinedCircle(x: number, y: number, radius: number, color: Sphere1Color, antialias?: boolean): void;
filledCircle(x: number, y: number, radius: number, color: Sphere1Color, antialias?: boolean): void;
gradientCircle(
x: number,
y: number,
radius: number,
color1: Sphere1Color,
color2: Sphere1Color,
antialias: boolean,
): void;
rotate(radians: number, resize: boolean): void;
resize(w: number, h: number): void;
rescale(w: number, h: number): void;
flipHorizontally(): void;
flipVertically(): void;
clone(): Sphere1Surface;
cloneSection(x: number, y: number, w: number, h: number): Sphere1Surface;
drawText(font: Sphere1Font, x: number, y: number, text: string): void;
drawZoomedText(font: Sphere1Font, x: number, y: number, scale: number, text: string): void;
drawTextBox(font: Sphere1Font, x: number, y: number, w: number, h: number, offset: number, text: string): void;
save(filename: string): void;
}
interface SphereGame {
name: string;
directory: string;
author: string;
description: string;
}
interface SpherePersonData {
/** the number of frames for the person's current direction */
num_frames: number;
/** the number of directions for the person */
num_directions: number;
/** the width of the spriteset's current frame */
width: number;
/** the height of the spriteset's current frame */
height: number;
/** the person that `name` is following, or "" if no-one */
leader: string;
}
interface SphereSpriteset {
/* Spriteset base obstruction object */
base: SphereSpritesetBase;
/** The filename that the spriteset was loaded with */
filename: string;
/** Array of image objects */
images: Sphere1Image[];
/** Array of spriteset_direction objects */
directions: any[];
/** Saves the spriteset object to `filename` */
save(filename: string): void;
/** Returns a copy of the spriteset object */
clone(): SphereSpriteset;
}
interface SphereSpritesetBase {
x1: number;
y1: number;
x2: number;
y2: number;
}
interface SphereSpritesetDirection {
/** Name of the direction */
name: string;
/** Array of spriteset frame objects */
frames: SphereSpritesetFrame[];
}
interface SphereSpritesetFrame {
/** Index into images array */
index: number;
/** Number of frames before animation should switch */
delay: number;
}
interface SphereWindowStyle {
/**
* Draws the window at `x`,`y` with the width and height of `w` and `h`.
* Note that window corners and edges are drawn outside of the width
* and height of the window.
*/
drawWindow(x: number, y: number, w: number, h: number): void;
/**
* Sets the color mask for a windowstyle to `color`
* @see ApplyColorMask
*/
setColorMask(color: Sphere1Color): void;
/**
* Gets the color mask being used by the windowstyle object
*/
getColorMask(): Sphere1Color;
/**
* Return the border size (height or width) in pixels for the windowstyle object.
* You can use EDGE_LEFT, EDGE_TOP, EDGE_RIGHT and EDGE_BOTTOM as parameters.
* Note that the corner sizes are ignored.
*/
getBorder(border: number): number;
}
/*
* Sphere 1.x functions
*/
/**
* Returns the Sphere API version (2 for miniSphere)
*/
declare function GetVersion(): number;
/**
* Returns the API version string (v2.0 for miniSphere)
*/
declare function GetVersionString(): string;
/**
* Invoke the garbage collector (you shouldn't need to use this in most cases)
*/
declare function GarbageCollect(): void;
/**
* Returns an array of object literals with properties describing the games in
* `$HOME/Documents/miniSphere/Games/` for creating a startup game loader
*/
declare function GetGameList(): SphereGame[];
/**
* Runs a Sphere game, given its directory
*/
declare function ExecuteGame(directory: string): void;
/**
* Restarts the current game (use Sphere.restart() instead)
* @deprecated
*/
declare function RestartGame(): void;
/**
* Exits miniSphere (use Sphere.shutDown() instead)
* @deprecated
*/
declare function Exit(): void;
/**
* Displays the given message and exits (use Sphere.abort() instead)
* @deprecated
*/
declare function Abort(message: any): void;
/**
* Opens `filename` as a log file
*/
declare function OpenLog(
filename: string,
): {
/**
* writes `text` to the log file
*/
write(text: string): void;
/**
* Begins an indented block in the text file with `name` as the block title
*/
beginBlock(name: string): void;
/**
* Closes the current block
*/
endBlock(): void;
};
/**
* Returns the number of milliseconds since some arbitrary time
* @example
* let start = GetTime();
* while (GetTime() < start + 1000) {
* // do stuff
* }
*/
declare function GetTime(): number;
/**
* Creates and returns a Sphere 1.x color object. `r`, `g`, `b`, and `a` should be 0-255
*/
declare function CreateColor(r: number, g: number, b: number, a: number): Sphere1Color;
/**
* Blends `c1` and `c2` and returns the result
*/
declare function BlendColors(c1: Sphere1Color, c2: Sphere1Color): Sphere1Color;
/**
* Blends `c1` and `c2` with custom weights
* @example
* BlendColorsWeighted(a,b,1,1) // blends a and b equally
* BlendColorsWeighted(a,b,1,2) // 33% a, 66% b
*/
declare function BlendColorsWeighted(
c1: Sphere1Color,
c2: Sphere1Color,
c1_weight: number,
c2_weight: number,
): Sphere1Color;
/**
* Creates a colormatrix that is used to transform the colors contained in a pixel
*/
declare function CreateColorMatrix(
rn: number,
rr: number,
rg: number,
rb: number,
gn: number,
gr: number,
gg: number,
gb: number,
bn: number,
br: number,
bg: number,
bb: number,
): any;
/**
* Returns an object representing the map engine
*/
declare function GetMapEngine(): {
/**
* Saves the loaded map to `filename`
*/
save(filename: string): void;
/**
* Adds a new layer filled with tile index
*/
layerAppend(width: number, height: number, tile: string): void;
};
/**
* Starts the map engine with the map specified and runs at `fps` frames per second
*/
declare function MapEngine(filename: string, fps: number): void;
/**
* Changes the current map
*/
declare function ChangeMap(filename: string): void;
/**
* Exits the map engine. Note: This tells the map engine to shut
* down. This does not mean the engine shuts down immediately. You
* must wait for the original call to MapEngine() to return before you
* can start a new map engine.
*/
declare function ExitMapEngine(): void;
/**
* Returns `true` if the map engine is running
*/
declare function IsMapEngineRunning(): boolean;
/**
* Updates the map engine (entity states, color masks, etc)
*/
declare function UpdateMapEngine(): void;
/**
* Sets the frame rate of the map engine
*/
declare function SetMapEngineFrameRate(fps: number): void;
/**
* Returns the map engine's framerate
*/
declare function GetMapEngineFrameRate(): number;
/**
* Calls the given map script. `which` can be one of the following:
* `SCRIPT_ON_ENTER_MAP`, `SCRIPT_ON_LEAVE_MAP`,
* `SCRIPT_ON_LEAVE_MAP_NORTH`, `SCRIPT_ON_LEAVE_MAP_EAST`,
* `SCRIPT_ON_LEAVE_MAP_SOUTH`, or `SCRIPT_ON_LEAVE_MAP_WEST`
*/
declare function CallMapScript(which: number): void;
/**
* Specifies that `script` should be called before the `which` map script.
* The map engine doesn't necessarily need to be running.
*/
declare function SetDefaultMapScript(which: number, script: string): void;
/**
* Calls the default `which` map script.
*/
declare function CallDefaultMapScript(which: number): void;
/**
* Returns the number of layers in the loaded map
*/
declare function GetNumLayers(): number;
/**
* Returns the name of the layer at `index`, with 0 as the bottom layer
*/
declare function GetLayerName(index: number): string;
/**
* Returns the width (in tiles) of the layer at `index`, with 0 as the bottom layer
*/
declare function GetLayerWidth(index: number): number;
/**
* Returns the height (in tiles) of the layer at `index`, with 0 as the bottom layer
*/
declare function GetLayerHeight(index: number): number;
/**
* Returns `true` if the layer at `index` is visible, with 0 as the bottom layer
*/
declare function IsLayerVisible(index: number): boolean;
/**
* Sets the visibility of the layer at `index` to `visible`, with 0 as the bottom layer
*/
declare function SetLayerVisible(index: number, visible: boolean): void;
/**
* Returns true if the layer at `index` is reflective, with 0 as the bottom layer
*/
declare function IsLayerReflective(index: number): boolean;
/**
* Makes the layer at `index` reflective if `reflective` is true, with 0 as the bottom layer
*/
declare function SetLayerReflective(index: number, reflective: boolean): void;
/**
* Sets the color mask of the layer at `index` to `mask`, with 0 as the bottom layer
*/
declare function SetLayerMask(index: number, mask: Sphere1Color): void;
/**
* Returns the color mask of the layer at `index, with 0 as the bottom layer
*/
declare function GetLayerMask(index: number): Sphere1Color;
/**
* Sets the x zoom/scale factor for the layer at `index` to `factorX`
* @example
* SetLayerScaleFactor(0, 0.5); // makes bottom layer zoom out to half the normal size
*/
declare function SetLayerScaleFactorX(index: number, factorX: number): void;
/**
* Gets the angle (in radians) for the layer at `index`
* @example
* let angle = GetLayerAngle(0) // gets the angle of the bottom layer
*/
declare function GetLayerAngle(index: number): number;
/**
* Sets the angle (in radians) for the layer at `index`, with 0 as the bottom layer
*/
declare function SetLayerAngle(index: number, angle: number): void;
/**
* Returns the number of tiles in the loaded map
*/
declare function GetNumTiles(): number;
/**
* Changes the specified tile on the loaded map to `tile`, with 0 as the bottom layer
*/
declare function SetTile(x: number, y: number, layer: number, tile: number): void;
/**
* Returns the tile index at the specified location, with 0 as the bottom layer
*/
declare function GetTile(x: number, y: number, layer: number): number;
/**
* Returns the name of the tile at `index`
*/
declare function GetTileName(index: number): string;
/**
* Returns the width in pixels of the tiles on the loaded map
*/
declare function GetTileWidth(): number;
/**
* Returns the height in pixels of the tiles on the loaded map
*/
declare function GetTileHeight(): number;
/**
* Returns the Sphere 1.x image of the tile at `index`
*/
declare function GetTileImage(index: number): Sphere1Image;
/**
* Sets the tile image at `index` to `image`
*/
declare function SetTileImage(index: number, image: Sphere1Image): void;
/**
* Returns the surface of the tile at `index`
*/
declare function GetTileSurface(index: number): Sphere1Surface;
/**
* Sets the tile surface at `index` to `surface`
*/
declare function SetTileSurface(index: number, surface: Sphere1Surface): void;
/**
* Gets the animation delay of the tile at `tile`. If it returns 0, the tile is not animated
*/
declare function GetTileDelay(tile: number): number;
/**
* Sets the animation delay of the tile at `tile` to `delay`. A delay of 0 is considered not animated
*/
declare function SetTileDelay(tile: number, delay: number): void;
/**
* Gets the next tile index in the animation sequence of `tile`. If the return value is `tile`, the tile is not animated
*/
declare function GetNextAnimatedTile(tile: number): number;
/**
* Sets the next tile in the animation sequence of `tile` to `nextTile`. If both have the same value, it won't be animated.
*/
declare function SetNextAnimatedTile(tile: number, nextTile: number): void;
/**
* Replaces all `oldTile` tiles with `newTile` on layer `layer`, with 0 as the bottom layer
*/
declare function ReplaceTilesOnLayer(layer: number, oldTile: number, newTile: number): void;
/**
* Returns true if there is a trigger at `mapX`,`mapY`,`layer`.
* `mapX` and `mapY` are per-pixel coordinates.
*/
declare function IsTriggerAt(mapX: number, mapY: number, layer: number): boolean;
/**
* Activates the trigger positioned at `mapX`,`mapY`,`layer` if one exists.
* `mapX` and `mapY` are per-pixel coordinates.
*/
declare function ExecuteTrigger(mapX: number, mapY: number, layer: number): void;
/**
* Returns true if there are any zones at `mapX`,`mapY`,`layer`
* `mapX` and `mapY` are per-pixel coordinates.
*/
declare function AreZonesAt(mapX: number, mapY: number, layer: number): boolean;
/**
* Executes all the zones containing `mapX`,`mapY`,`layer`.
* `mapX` and `mapY` are per-pixel coordinates.
*/
declare function ExecuteZones(mapX: number, mapY: number, layer: number): void;
/**
* Returns the number of zones in the loaded map
*/
declare function GetNumZones(): number;
/**
* Returns the index of the current script's zone. This should be called from inside a ZoneScript handler.
*/
declare function GetCurrentZone(): number;
/**
* Returns the x value of zone `zone`
*/
declare function GetZoneX(zone: number): number;
/**
* Returns the y value of zone `zone`
*/
declare function GetZoneY(zone: number): number;
/**
* Returns the width of zone `zone`
*/
declare function GetZoneWidth(zone: number): number;
/**
* Returns the height of zone `zone`
*/
declare function GetZoneHeight(zone: number): number;
/**
* Returns the layer of zone `zone`
*/
declare function GetZoneLayer(zone: number): number;
/**
* Changes the layer of `zone` to `layer`
*/
declare function SetZoneLayer(zone: number, layer: number): void;
/**
* Executes the script for the zone `zone`
*/
declare function ExecuteZoneScript(zone: number): void;
/**
* Renders the map into the video buffer
*/
declare function RenderMap(): void;
/**
* Applies a color mask to things drawn by the map engine for `numFrames` frames
*/
declare function SetColorMask(color: Sphere1Color, numFrames: number): void;
/**
* Execute `script` (as a string, not a filename) after `numFrames` frames have passed
*/
declare function SetDelayScript(numFrames: number, script: string): void;
/**
* Makes `person` respond to input
*/
declare function AttachInput(person: string): void;
/**
* Releases input from the attached person entity
*/
declare function DetachInput(): void;
/**
* Returns true if a person is attached to the input
*/
declare function IsInputAttached(): boolean;
/**
* Returns the name of the person who currently holds input
*/
declare function GetInputPerson(): string;
/**
* Makes `person` respond to the input. `playerIndex` should be from 0-3 (max four players)
* Note: AttachInput is equilivent to AttachPlayerInput(person, 0)
*/
declare function AttachPlayerInput(person: string, playerIndex: number): void;
/**
* Releases input from `personEntity`
*/
declare function DetachPlayerInput(personEntity: string): void;
/**
* Calls `script` after each frame (don't draw stuff in here!)
*/
declare function SetUpdateScript(script: string): void;
/**
* Calls `script` after all map layers are rendered
*/
declare function SetRenderScript(script: string): void;
/**
* Calls `script` after `layer` has been rendered. Only one rendering script can be used for each layer
*/
declare function SetLayerRenderer(layer: number, script: string): void;
/**
* Attaches the camera view to `person`
*/
declare function AttachCamera(person: string): void;
/**
* Detaches camera so it can be controlled directly
*/
declare function DetachCamera(): void;
/**
* Returns true if the camera is attached to a person
*/
declare function IsCameraAttached(): boolean;
/**
* Returns the name of the person whom the camera is attached to
*/
declare function GetCameraPerson(): string;
/**
* Sets the x value of the map camera (the center of the screen, if possible)
*/
declare function SetCameraX(x: number): void;
/**
* Sets the y value of the map camera (the center of the screen, if possible)
*/
declare function SetCameraY(y: number): void;
/**
* Returns the x value of the map camera (the center of the screen, if possible)
*/
declare function GetCameraX(): number;
/**
* Returns the y value of the map camera (the center of the screen, if possible)
*/
declare function GetCameraY(): number;
/**
* Returns the x value of the screen's position on the map
*/
declare function MapToScreenX(layer: number, x: number): number;
/**
* Returns the y value of the screen's position on the map
*/
declare function MapToScreenY(layer: number, y: number): number;
/**
* Returns the x value of the map's position on the screen
*/
declare function ScreenToMapX(layer: number, x: number): number;
/**
* Returns the y value of the map's position on the screen
*/
declare function ScreenToMapY(layer: number, y: number): number;
/**
* Returns an array of strings representing the current person entities
*/
declare function GetPersonList(): string[];
/**
* Creates a person with `name` from `spriteset`. If the file is unable to be opened,
* miniSphere will show an error message and exit. If `destroyWithMap` is true, the spriteset
* will be destroyed when the current map is changed.
*/
declare function CreatePerson(name: string, spriteset: string, destroyWithMap: boolean): void;
/**
* Destroys the person with `name`
*/
declare function DestroyPerson(name: string): void;
/**
* Returns the x offset of `name`
*/
declare function GetPersonOffsetX(name: string): number;
/**
* Sets the horizontal offset to use for drawing frames for `name`.
* e.g. setting `x` to 10 would result in `name` always being drawn 10 pixels
* to the right, with the actual x position remaining unchanged
*/
declare function SetPersonOffsetX(name: string, x: number): void;
/**
* Returns the y offset of `name`
*/
declare function GetPersonOffsetY(name: string): number;
/**
* Sets the vertical offset to use for drawing frames for `name`.
* e.g. setting `y` to 10 would result in `name` always being drawn 10 pixels
* to the bottom, with the actual y position remaining unchanged
*/
declare function SetPersonOffsetY(name: string, y: number): void;
/**
* Returns the x position of `name`
*/
declare function GetPersonX(name: string): number;
/**
* Returns the y position of `name`
*/
declare function GetPersonY(name: string): number;
/**
* Sets the x position of `name`
*/
declare function SetPersonX(name: string, x: number): void;
/**
* Sets the y position of `name`
*/
declare function SetPersonY(name: string, y: number): void;
/**
* Returns the layer of `name`
*/
declare function GetPersonLayer(name: string): number;
/**
* Change the layer of `name` to `layer`
*/
declare function SetPersonLayer(name: string, layer: number): void;
/**
* Get the x position of `name` with floating point accuracy
*/
declare function GetPersonXFloat(name: string): number;
/**
* Get the y position of `name` with floating point accuracy
*/
declare function GetPersonYFloat(name: string): number;
/**
* Sets the position of `name` to `x`,`y` with floating point accuracy
*/
declare function SetPersonXYFloat(name: string, x: number, y: number): void;
/**
* Returns the direction of `name`
*/
declare function GetPersonDirection(name: string): string;
/**
* Sets the direction of `name` to `direction`
*/
declare function SetPersonDirection(name: string, direction: string): void;
/**
* Returns the direction animation frame number of `name`
*/
declare function GetPersonFrame(name: string): number;
/**
* Sets the direction animation frame of `name` to `frame`
*/
declare function SetPersonFrame(name: string, frame: number): void;
/**
* Returns the x movement speed of `name`
*/
declare function GetPersonSpeedX(name: string): number;
/**
* Returns the y movement speed of `name`
*/
declare function GetPersonSpeedY(name: string): number;
/**
* Sets the movement speed for both x and y of `name` to `speed`
*/
declare function SetPersonSpeed(name: string, speed: number): void;
/**
* Set the x and y movement speed of `name` to `speedX`,`speedY` respectively
*/
declare function SetPersonSpeedXY(name: string, speedX: number, speedY: number): void;
/**
* Returns the number of animation frames to delay for `name` between the first and last frame
*/
declare function GetPersonFrameRevert(name: string): number;
/**
* Sets the number of animation frames to delay for `name` between the first and last frame
*/
declare function SetPersonFrameRevert(name: string, delay: number): void;
/**
* Rescales `name`'s spriteset by a factor of `scaleW`,`scaleH`
* (e.g. 1.0 = original size, 1.5 = 1.5 times the original size, etc)
*/
declare function SetPersonScaleFactor(name: string, scaleW: number, scaleH: number): void;
/**
* Rescales `name`'s spriteset to exactly `width`,`height` pixels
*/
declare function SetPersonScaleAbsolute(name: string, width: number, height: number): void;
/**
* Returns the person's spriteset
*/
declare function GetPersonSpriteset(name: string): SphereSpriteset;
/**
* Set `name`'s spriteset to `spriteset
* @example SetPersonSpriteset("Jimmy", LoadSpriteset("jimmy.running.rss"));
*/
declare function SetPersonSpriteset(name: string, spriteset: SphereSpriteset): void;
/**
* Returns the person's base obstruction object.
*/
declare function GetPersonBase(name: string): SphereSpritesetBase;
/** Returns the person's angle in radians */
declare function GetPersonAngle(name: string): number;
/**
* Sets the angle of `name` in radians (obstruction base is unaffected)
*/
declare function SetPersonAngle(name: string, angle: number): void;
/**
* Sets a color multiplier to use when drawing sprites for `name`
* @example
* SetPersonMask("Jimmy", CreateColor(255, 0, 0, 255)); // only red elements are drawn
* SetPersonMask("Jimmy", CreateColor(255, 255, 128)); // draw at half transparency
*/
declare function SetPersonMask(name: string, color: Sphere1Color): void;
/**
* Returns the color mask of `name`
*/
declare function GetPersonMask(name: string): Sphere1Color;
/**
* Returns true if `name` is visible
*/
declare function IsPersonVisible(name: string): boolean;
/**
* Sets the visibility status of `name` to `visible`
*/
declare function SetPersonVisible(name: string, visible: boolean): void;
/**
* Returns a data object associated with the person `name` with the following default properties:
* @example
* let data = GetPersonData("Jimmy");
* let num_frames = data["num_frames"];
*/
declare function GetPersonData(name: string): SpherePersonData;
/**
* Sets the data object associated with `name` to `data`
* @example
* let data = GetPersonData("Jimmy");
* data["talked_to_jimmy"] = true;
* SetPersonData("Jimmy", data);
*/
declare function SetPersonData(name: string, data: SpherePersonData): void;
/**
* Sets a specific data value of `name` to `value`
* @see SetPersonData
* @see GetPersonData
*/
declare function SetPersonValue(name: string, key: string, value: any): void;
/**
* Gets a specific data value from `name`
* @see SetPersonData
* @see GetPersonData
*/
declare function GetPersonValue(name: string, key: string): any;
/**
* Makes the sprite of `name` follow `pixels` behind the sprite of `leader`.
* If `leader` is "", it will detach from anyone it is following
*/
declare function FollowPerson(name: string, leader: string, pixels: number): void;
/**
* Sets `script` to be called during `which` event for `name`
* @example
* SetPersonScript("Jimmy", SCRIPT_ON_DESTROY, "SSj.log('Jimmy spriteset destroyed'")
*/
declare function SetPersonScript(name: string, which: number, script: string): void;
/**
* Calls `which` script for `name`
*/
declare function CallPersonScript(name: string, which: number): void;
/**
* Returns the name of the person for whom the current script is running.
* This should be called from inside a PersonScript handler.
*/
declare function GetCurrentPerson(): string;
/**
* Adds a command to the `name`'s command queue. If `immediate` is true, it will be executed immediately.
* Otherwise it will wait until the next frame.
*/
declare function QueuePersonCommand(name: string, command: number, immediate: boolean): void;
/**
* Adds `script` to `name`'s queue. If `immediate` is true, it will be executed immediately.
* Otherwise it will wait until the next frame.
*/
declare function QueuePersonScript(name: string, script: string, immediate: boolean): void;
/**
* Clears the command queue of `name`
*/
declare function ClearPersonCommands(name: string): void;
/**
* Returns true if `name` has an empty command queue
*/
declare function IsCommandQueueEmpty(name: string): boolean;
/**
* Returns true if `name` would be obstructed at `x`,`y`
*/
declare function IsPersonObstructed(name: string, x: number, y: number): boolean;
/**
* Returns the tile index of the tile `name` would be obstructed by at `x`,`y` or -1
* if it isn't obstructed at that position
*/
declare function GetObstructingTile(name: string, x: number, y: number): number;
/**
* Returns the name of the person who `name` would be obstructed by at `x`,`y`
* or "" if it isn't obstructed by a person at that position
*/
declare function GetObstructingPerson(name: string, x: number, y: number): string;
/**
* Sets whether `person` should ignore other spriteset obstruction bases
*/
declare function IgnorePersonObstructions(person: string, ignore: boolean): void;
/**
* Returns true if `person` is ignoring person obstructions, else false
*/
declare function IsIgnoringPersonObstructions(person: string): boolean;
/**
* Sets whether `person` should ignore tile obstructions
*/
declare function IgnoreTileObstructions(person: string, ignore: boolean): void;
/**
* Returns true if `person` is ignoring tile obstructions, else false
*/
declare function IsIgnoringTileObstructions(person: string): boolean;
/**
* Returns a list of people that `name` is ignoring
*/
declare function GetPersonIgnoreList(person: string): string[];
/**
* Tells `person` to ignore everyone in `ignoreList`
* @example SetPersonIgnoreList("White-Bomberman", ["bomb", "powerup"]);
*/
declare function SetPersonIgnoreList(person: string, ignoreList: string[]): void;
/**
* Get the (Sphere 1.x) key used to activate talk scripts
*/
declare function GetTalkActivationKey(): number;
/**
* Set the (Sphere 1.x) key used to activate talk scripts
*/
declare function SetTalkActivationKey(key: number): void;
/**
* Returns the distance between the input person and another person required for talk script activation
*/
declare function GetTalkDistance(): number;
/**
* Set the distance between the input person and another person required for talk script activation
*/
declare function SetTalkDistance(pixels: number): void;
/**
* Returns a spriteset object from `filename`. If the file is unable to be opened,
* an error will be shown and miniSphere will exit
*/
declare function LoadSpriteset(filename: string): SphereSpriteset;
/**
* Returns a blank spriteset object with the given dimensions
*/
declare function CreateSpriteset(
frameWidth: number,
frameHeight: number,
numImages: number,
numDirections: number,
numFrames: number,
): SphereSpriteset;
| {
"content_hash": "fecb44378fafd0ab1157838c29fa0bba",
"timestamp": "",
"source": "github",
"line_count": 1353,
"max_line_length": 123,
"avg_line_length": 28.709534368070955,
"alnum_prop": 0.6905056121923592,
"repo_name": "markogresak/DefinitelyTyped",
"id": "507b84b7b76498864bb6505c583cc3391d248ee6",
"size": "38844",
"binary": false,
"copies": "31",
"ref": "refs/heads/master",
"path": "types/sphere-engine-browser/v1/index.d.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "15"
},
{
"name": "Protocol Buffer",
"bytes": "678"
},
{
"name": "TypeScript",
"bytes": "17426898"
}
],
"symlink_target": ""
} |
#ifndef KDB_NOTIFICATION_H_
#define KDB_NOTIFICATION_H_
#include "kdb.h"
#include "kdbtypes.h"
/**
* @defgroup kdbnotification Notification
*
* @brief Notification feature
*
* For an introduction to notifications please see the
* <a href="doc_tutorials_notifications_md.html">Notification Tutorial</a>.
*
* Examples:
*
* - [Basic notifications using polling](https://www.libelektra.org/examples/notificationpolling)
* - [Using asynchronous I/O bindings](https://www.libelektra.org/examples/notificationasync)
* - [Reload KDB when Elektra's configuration has changed](https://www.libelektra.org/examples/notificationreload)
*
* @par Global Mounting
*
* elektraNotificationOpen() loads and mounts the
* <a href="https://www.libelektra.org/plugins/internalnotification">internalnotification plugin</a>
* globally at run-time.
* The key database is not altered permanently.
* elektraNotificationClose() reverts the mounting.
*
* The internalnotification plugin is mounted at its defined positions
* (see
* <a href="https://www.libelektra.org/plugins/internalnotification">its plugin docs</a>).
*
* - If there is no plugin mounted at a required position the internalnotification
* plugin is mounted at this position.
* - In the default configuration or when mounting a plugin globally using
* `kdb global-mount` the
* <a href="https://www.libelektra.org/plugins/list">list plugin</a> is
* mounted at all positions.
* This plugin allows to mount multiple plugins at a position.
* If this plugin is present at a position the internalnotification plugin is
* added to the list plugin's configuration at run-time.
* - If another plugin is mounted at a desired position the configuration is
* considered broken and mounting is aborted.
* The list plugin requires to be mounted at all positions in order to keep
* track of the current position and call plugins accordingly.
*
* @par Transport Plugins
*
* Notification transport plugins (or simply transport plugins) export
* "openNotification" (ElektraNotificationOpenNotification()) and
* optionally "closeNotification" (ElektraNotificationCloseNotification())
* functions as part of their contract.
*
* The function "openNotification" is called during elektraNotificationOpen().
* At this point an I/O binding is set and it is save to use it.
* If no binding is set despite the plugin requires it, it should log a message
* and perform no additional operations.
* This ensures that the plugin can be used in applications that do not use I/O
* bindings or notification features.
*
* ElektraNotificationOpenNotification() receives a callback and additional data.
* When a key change notification is received (or a change is detected by other
* means) this callback shall be called with the changed Key and the additional
* data.
*
*/
#ifdef __cplusplus
namespace ckdb
{
extern "C" {
#endif
/**
* @ingroup kdbnotification
* Initialize the notification system for the given KDB instance.
*
* Asynchronous receiving of notifications requires an I/O binding.
* Use elektraIoSetBinding() before calling this function.
*
* May only be called once for a KDB instance. Subsequent calls return 0.
*
* @param kdb KDB instance
* @retval 1 on success
* @retval 0 on error
*/
int elektraNotificationOpen (KDB * kdb);
/**
* @ingroup kdbnotification
* Stop the notification system for the given KDB instance.
*
* May only be called after elektraNotificationOpen() was called for given KDB
* instance.
*
* @param kdb KDB instance
* @retval 1 on success
* @retval 0 on error
*/
int elektraNotificationClose (KDB * kdb);
#define ELEKTRA_NOTIFICATION_REGISTER_NAME(TYPE_NAME) elektraNotificationRegister##TYPE_NAME
#define ELEKTRA_NOTIFICATION_REGISTER_SIGNATURE(TYPE, TYPE_NAME) \
/** @copydoc elektraNotificationRegisterInt */ \
int ELEKTRA_NOTIFICATION_REGISTER_NAME (TYPE_NAME) (KDB * kdb, Key * key, TYPE * variable)
#define ELEKTRA_NOTIFICATION_TYPE_DECLARATION(TYPE, TYPE_NAME) ELEKTRA_NOTIFICATION_REGISTER_SIGNATURE (TYPE, TYPE_NAME);
/**
* @ingroup kdbnotification
* @brief Subscribe for automatic updates to a given variable when the given key value is changed.
*
* On kdbGet iff the key is present and its content is valid, the registered variable is updated.
*
* @param handle plugin handle
* @param key key to watch for changes
* @param variable variable
*
* @retval 1 on success
* @retval 0 on failure
* @{
*/
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (int, Int)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (unsigned int, UnsignedInt)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (long, Long)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (unsigned long, UnsignedLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (long long, LongLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (unsigned long long, UnsignedLongLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (float, Float)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (double, Double)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_boolean_t, KdbBoolean)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_char_t, KdbChar)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_octet_t, KdbOctet)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_short_t, KdbShort)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_unsigned_short_t, KdbUnsignedShort)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_long_t, KdbLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_unsigned_long_t, KdbUnsignedLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_long_long_t, KdbLongLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_unsigned_long_long_t, KdbUnsignedLongLong)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_float_t, KdbFloat)
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_double_t, KdbDouble)
#ifdef ELEKTRA_HAVE_KDB_LONG_DOUBLE
ELEKTRA_NOTIFICATION_TYPE_DECLARATION (kdb_long_double_t, KdbLongDouble)
#endif // ELEKTRA_HAVE_KDB_LONG_DOUBLE
/** @} */
/**
* @ingroup kdbnotification
* Callback function called when string to number conversion failed.
*
* @param key key with invalid value
* @param context user supplied callback context
*/
typedef void (*ElektraNotificationConversionErrorCallback) (Key * key, void * context);
/**
* @ingroup kdbnotification
* Callback function for key changes.
*
* @param key changed key
* @param context user supplied callback context
*/
typedef void (*ElektraNotificationChangeCallback) (Key * key, void * context);
/**
* @ingroup kdbnotification
* Subscribe for updates via callback when a given key value is changed.
*
* @param handle plugin handle
* @param key key to watch for changes
* @param callback callback function
* @param context user supplied context passed to callback function
*
* @retval 1 on success
* @retval 0 on failure
*/
int elektraNotificationRegisterCallback (KDB * kdb, Key * key, ElektraNotificationChangeCallback callback, void * context);
/**
* @ingroup kdbnotification
* Subscribe for updates via callback when a given key or a key below changed.
*
* @param handle plugin handle
* @param key key to watch for changes
* @param callback callback function
* @param context user supplied context passed to callback function
*
* @retval 1 on success
* @retval 0 on failure
*/
int elektraNotificationRegisterCallbackSameOrBelow (KDB * kdb, Key * key, ElektraNotificationChangeCallback callback, void * context);
#ifdef __cplusplus
}
}
#endif
#endif
| {
"content_hash": "d075fa532b7a89aef863a5b14d695827",
"timestamp": "",
"source": "github",
"line_count": 204,
"max_line_length": 140,
"avg_line_length": 37.166666666666664,
"alnum_prop": 0.7401740965444473,
"repo_name": "BernhardDenner/libelektra",
"id": "396c57b12cbf7b09ee939bbd7bf06b92f785c824",
"size": "7797",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/include/kdbnotification.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ANTLR",
"bytes": "606"
},
{
"name": "Awk",
"bytes": "7511"
},
{
"name": "C",
"bytes": "4367582"
},
{
"name": "C++",
"bytes": "1992348"
},
{
"name": "CMake",
"bytes": "394962"
},
{
"name": "CSS",
"bytes": "20673"
},
{
"name": "Dockerfile",
"bytes": "38984"
},
{
"name": "Groovy",
"bytes": "51313"
},
{
"name": "HTML",
"bytes": "145913"
},
{
"name": "Inform 7",
"bytes": "394"
},
{
"name": "Java",
"bytes": "98888"
},
{
"name": "JavaScript",
"bytes": "323573"
},
{
"name": "Lua",
"bytes": "13628"
},
{
"name": "Makefile",
"bytes": "8214"
},
{
"name": "Objective-C",
"bytes": "6323"
},
{
"name": "Python",
"bytes": "59302"
},
{
"name": "QML",
"bytes": "87333"
},
{
"name": "QMake",
"bytes": "4256"
},
{
"name": "Roff",
"bytes": "791"
},
{
"name": "Ruby",
"bytes": "88712"
},
{
"name": "Rust",
"bytes": "90027"
},
{
"name": "Shell",
"bytes": "247321"
},
{
"name": "Smarty",
"bytes": "1196"
},
{
"name": "Tcl",
"bytes": "330"
}
],
"symlink_target": ""
} |
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OpenRiaServices.DomainServices.Tools
{
/// <summary>
/// Visits a <see cref="CodeCompileUnit"/> class and optimizes it for client proxy generation.
/// </summary>
internal sealed class ClientProxyFixupCodeDomVisitor : CodeDomVisitor
{
private ClientCodeGenerationOptions _options;
private bool _isCSharp;
/// <summary>
/// Default constructor accepting the current <see cref="ClientCodeGenerationOptions"/> context.
/// </summary>
/// <param name="options">The current <see cref="ClientCodeGenerationOptions"/> options.</param>
public ClientProxyFixupCodeDomVisitor(ClientCodeGenerationOptions options)
{
if (options == null)
{
throw new ArgumentNullException("options");
}
this._options = options;
this._isCSharp = (this._options.Language == "C#");
}
#region Properties
/// <summary>
/// Gets a value indicating whether or not the <see cref="CodeCompileUnit"/> will be
/// emitted to a C# code.
/// </summary>
private bool IsCSharp
{
get
{
return this._isCSharp;
}
}
/// <summary>
/// Gets a value indicating whether or not the <see cref="CodeCompileUnit"/> is
/// generating types using full type names.
/// </summary>
private bool UseFullTypeNames
{
get
{
return this._options.UseFullTypeNames;
}
}
/// <summary>
/// Gets the root namespace. (For use with Visual Basic codegen only.)
/// </summary>
private string ClientRootNamespace
{
get
{
return this._options.ClientRootNamespace;
}
}
#endregion // Properties
#region Methods
#region Visitor Overrides
/// <summary>
/// Visits a <see cref="CodeNamespaceCollection"/>.
/// </summary>
/// <param name="codeNamespaceCollection">The <see cref="CodeNamespaceCollection"/> to visit.</param>
protected override void VisitCodeNamespaceCollection(CodeNamespaceCollection codeNamespaceCollection)
{
CodeNamespace[] orderedNamespaces = codeNamespaceCollection.Cast<CodeNamespace>().OrderBy(ns => ns.Name).ToArray();
codeNamespaceCollection.Clear();
if (this.IsCSharp)
{
codeNamespaceCollection.AddRange(orderedNamespaces);
}
else
{
foreach (CodeNamespace ns in orderedNamespaces)
{
this.FixUpNamespaceRootNamespace(ns);
codeNamespaceCollection.Add(ns);
}
}
base.VisitCodeNamespaceCollection(codeNamespaceCollection);
}
/// <summary>
/// Visits a <see cref="CodeNamespaceImportCollection"/>.
/// </summary>
/// <param name="codeNamespaceImportCollection">The <see cref="CodeNamespaceImportCollection"/> to visit.</param>
protected override void VisitCodeNamespaceImportCollection(CodeNamespaceImportCollection codeNamespaceImportCollection)
{
CodeNamespaceImport[] sortedImports = codeNamespaceImportCollection.Cast<CodeNamespaceImport>().OrderBy(i => i.Namespace, new NamespaceImportComparer()).Distinct().ToArray();
codeNamespaceImportCollection.Clear();
codeNamespaceImportCollection.AddRange(sortedImports);
base.VisitCodeNamespaceImportCollection(codeNamespaceImportCollection);
}
/// <summary>
/// Visits a <see cref="CodeTypeDeclarationCollection"/>.
/// </summary>
/// <param name="codeTypeDeclarationCollection">The <see cref="CodeTypeDeclarationCollection"/> to visit.</param>
protected override void VisitCodeTypeDeclarationCollection(CodeTypeDeclarationCollection codeTypeDeclarationCollection)
{
CodeTypeDeclaration[] sortedTypeDeclarations = codeTypeDeclarationCollection.Cast<CodeTypeDeclaration>().OrderBy(c => c.Name).ToArray();
codeTypeDeclarationCollection.Clear();
codeTypeDeclarationCollection.AddRange(sortedTypeDeclarations);
base.VisitCodeTypeDeclarationCollection(codeTypeDeclarationCollection);
}
/// <summary>
/// Visits a <see cref="CodeAttributeDeclarationCollection"/>.
/// </summary>
/// <param name="codeAttributeDeclarationCollection">The <see cref="CodeAttributeDeclarationCollection"/> to visit.</param>
protected override void VisitCodeAttributeDeclarationCollection(CodeAttributeDeclarationCollection codeAttributeDeclarationCollection)
{
CodeAttributeDeclaration[] sortedAttributes = codeAttributeDeclarationCollection.Cast<CodeAttributeDeclaration>().OrderBy(a => GetAttributeId(a)).ToArray();
codeAttributeDeclarationCollection.Clear();
codeAttributeDeclarationCollection.AddRange(sortedAttributes);
base.VisitCodeAttributeDeclarationCollection(codeAttributeDeclarationCollection);
}
/// <summary>
/// Visits a <see cref="CodeTypeReference"/>.
/// </summary>
/// <param name="codeTypeReference">The <see cref="CodeTypeReference"/> to visit.</param>
protected override void VisitCodeTypeReference(CodeTypeReference codeTypeReference)
{
if (codeTypeReference == null)
{
return;
}
if (this.UseFullTypeNames)
{
codeTypeReference.Options |= CodeTypeReferenceOptions.GlobalReference;
}
base.VisitCodeTypeReference(codeTypeReference);
}
#endregion // Visitor Overrides
#region Utility Methods
/// <summary>
/// Gets a unique identifier for a <see cref="CodeAttributeDeclaration"/> instance.
/// </summary>
/// <param name="attribute">The <see cref="CodeAttributeDeclaration"/> instance.</param>
/// <returns>A unique identifier for a <see cref="CodeAttributeDeclaration"/> instance.</returns>
private static string GetAttributeId(CodeAttributeDeclaration attribute)
{
StringBuilder id = new StringBuilder(attribute.Name);
foreach (CodeAttributeArgument arg in attribute.Arguments)
{
CodePrimitiveExpression primitiveValue = arg.Value as CodePrimitiveExpression;
id.Append(arg.Name);
if (primitiveValue != null && primitiveValue.Value != null)
{
id.Append(primitiveValue.Value.ToString());
}
else
{
id.Append(arg.Value.ToString());
}
}
return id.ToString();
}
/// <summary>
/// Fixes up a <see cref="CodeNamespace"/>. (For use with Visual Basic codegen.)
/// </summary>
/// <param name="ns">The <see cref="CodeNamespace"/> to fix.</param>
private void FixUpNamespaceRootNamespace(CodeNamespace ns)
{
string rootNamespace = this.ClientRootNamespace;
if (!this.IsCSharp && !string.IsNullOrEmpty(rootNamespace))
{
string namespaceName = ns.Name;
if (namespaceName.Equals(rootNamespace, StringComparison.Ordinal))
{
ns.Name = string.Empty;
}
else if (namespaceName.StartsWith(rootNamespace + ".", StringComparison.Ordinal))
{
ns.Name = namespaceName.Substring(rootNamespace.Length + 1);
}
}
}
#endregion // Utility Methods
#endregion // Methods
#region Nested Types
/// <summary>
/// Nested type used to sort import statements, giving preference to System assemblies.
/// </summary>
private class NamespaceImportComparer : IComparer<string>
{
/// <summary>
/// Compares two string values and returns a value indicating the preferred sort order.
/// </summary>
/// <param name="x">A string value to compare against.</param>
/// <param name="y">A string value to compare.</param>
/// <returns>-1 if the <paramref name="x"/> value is less, 0 if the values are equal, 1 if <paramref name="y"/> is less.</returns>
public int Compare(string x, string y)
{
bool leftIsSystemNamespace = x.Equals("System", StringComparison.Ordinal) || x.StartsWith("System.", StringComparison.Ordinal);
bool rightIsSystemNamespace = y.Equals("System", StringComparison.Ordinal) || y.StartsWith("System.", StringComparison.Ordinal);
if (leftIsSystemNamespace && !rightIsSystemNamespace)
{
return -1;
}
else if (!leftIsSystemNamespace && rightIsSystemNamespace)
{
return 1;
}
return string.Compare(x, y, StringComparison.Ordinal);
}
}
#endregion // Nested Types
}
}
| {
"content_hash": "2cf3c1797f43ad842ac1edb267839843",
"timestamp": "",
"source": "github",
"line_count": 251,
"max_line_length": 186,
"avg_line_length": 38.17131474103586,
"alnum_prop": 0.5961799394635215,
"repo_name": "STAH/OpenRiaServices",
"id": "0d628b750ca1147220f79e4746a6a3327e6ac12f",
"size": "9583",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "OpenRiaServices.DomainServices.Tools/Framework/ClientProxyFixupCodeDomVisitor.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "814"
},
{
"name": "C#",
"bytes": "19336143"
},
{
"name": "CSS",
"bytes": "5674"
},
{
"name": "HTML",
"bytes": "12455"
},
{
"name": "PowerShell",
"bytes": "1793"
},
{
"name": "Visual Basic",
"bytes": "4874395"
}
],
"symlink_target": ""
} |
<div class="cbp-l-project-title">Dashboard</div>
<div class="cbp-l-project-subtitle">by Paul Flavius Nechita</div>
<div class="cbp-slider">
<ul class="cbp-slider-wrap">
<li class="cbp-slider-item">
<img src="http://scriptpie.com/cubeportfolio/img/?i=1200x900/e9396c" alt="">
</li>
<li class="cbp-slider-item">
<img src="http://scriptpie.com/cubeportfolio/img/?i=1200x900/f0dd51" alt="">
</li>
<li class="cbp-slider-item">
<img src="http://scriptpie.com/cubeportfolio/img/?i=1200x900/71f55f" alt="">
</li>
</ul>
</div>
<div class="cbp-l-project-container">
<div class="cbp-l-project-desc">
<div class="cbp-l-project-desc-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, cumque, earum blanditiis incidunt minus commodi consequatur provident quae. Nihil, alias, vel consequatur ab aliquam aspernatur optio harum facilis excepturi mollitia autem voluptas cum ex veniam numquam quia repudiandae in iure. Assumenda, vel provident molestiae perferendis officia commodi asperiores earum sapiente inventore quam deleniti mollitia consequatur expedita quaerat natus praesentium beatae aut ipsa non ex ullam atque suscipit ut dignissimos magnam!</div>
</div>
<div class="cbp-l-project-details">
<ul class="cbp-l-project-details-list">
<li><strong>Client</strong>John Doe</li>
<li><strong>Date</strong>22 July 2015</li>
<li><strong>Categories</strong>Logo, Graphic</li>
</ul>
<a href="#" target="_blank" class="cbp-l-project-details-visit">OPEN PROJECT</a>
</div>
</div>
<div class="cbp-l-project-container">
<div class="cbp-l-project-related">
<div class="cbp-l-project-desc-title"><span>Related Projects</span></div>
<ul class="cbp-l-project-related-wrap">
<li class="cbp-l-project-related-item">
<a href="ajax-awesome-work/project9.html" class="cbp-singlePage cbp-l-project-related-link" rel="nofollow">
<img src="http://scriptpie.com/cubeportfolio/img/?i=480x250/cc074b" alt="">
<div class="cbp-l-project-related-title">Speed Detector</div>
</a>
</li>
<li class="cbp-l-project-related-item">
<a href="ajax-awesome-work/project2.html" class="cbp-singlePage cbp-l-project-related-link" rel="nofollow">
<img src="http://scriptpie.com/cubeportfolio/img/?i=480x250/4d1f59" alt="">
<div class="cbp-l-project-related-title">World Clock</div>
</a>
</li>
<li class="cbp-l-project-related-item">
<a href="ajax-awesome-work/project3.html" class="cbp-singlePage cbp-l-project-related-link" rel="nofollow">
<img src="http://scriptpie.com/cubeportfolio/img/?i=480x250/4f4e75" alt="">
<div class="cbp-l-project-related-title">To-Do Dashboard</div>
</a>
</li>
</ul>
</div>
</div>
<br><br><br>
| {
"content_hash": "4d3c10ee8814dc76d0a7b5ccd0003872",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 587,
"avg_line_length": 51.65,
"alnum_prop": 0.6185866408518877,
"repo_name": "achegedus/CityServe",
"id": "3d6dd147a1880bb9938689904ebc77709e750fb7",
"size": "3099",
"binary": false,
"copies": "11",
"ref": "refs/heads/master",
"path": "public/assets/plugins/cube-portfolio/templates/awesome-work/ajax-awesome-work/project1.html",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "2923470"
},
{
"name": "JavaScript",
"bytes": "2159988"
},
{
"name": "PHP",
"bytes": "236422"
},
{
"name": "Python",
"bytes": "16281"
},
{
"name": "Shell",
"bytes": "1061"
},
{
"name": "Vue",
"bytes": "159446"
}
],
"symlink_target": ""
} |
<?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Event\PreUpdateEventArgs;
use AppBundle\Entity\Role;
/**
* UserBase
*
* @ORM\HasLifecycleCallbacks()
*/
class UserBase extends MdevoEntity
{
/**
* @var string $username
*
* @ORM\Column(name="username", type="string", nullable=false , length=25 )
*
*/
protected $username;
/**
* @var string $userpassword
*
* @ORM\Column(name="userpassword", type="string", nullable=true , length=50 )
*
*/
protected $userpassword;
/**
* @var string $firstName
*
* @ORM\Column(name="first_name", type="string", nullable=true , length=100 )
*
*/
protected $firstName;
/**
* @var string $lastName
*
* @ORM\Column(name="last_name", type="string", nullable=true , length=100 )
*
*/
protected $lastName;
/**
* @var string $status
*
* @ORM\Column(name="status", type="string", nullable=true , length=100 )
*
*/
protected $status;
/**
* @var boolean $locked
*
* @ORM\Column(name="locked", type="boolean", nullable=true )
*
*/
protected $locked;
/**
* @var boolean $enabled
*
* @ORM\Column(name="enabled", type="boolean", nullable=true )
*
*/
protected $enabled;
/**
* @var \DateTime $expiryDate
*
* @ORM\Column(name="expiry_date", type="datetime", nullable=true )
*
*/
protected $expiryDate;
/**
* @var boolean $hasApiAccess
*
* @ORM\Column(name="has_api_access", type="boolean", nullable=true )
*
*/
protected $hasApiAccess;
/**
* @var string $apiToken
*
* @ORM\Column(name="api_token", type="string", nullable=true , length=64 )
*
*/
protected $apiToken;
/**
* Set username
*
* @param string $username
*
* @return self
*/
public function setUsername(string $username)
{
$this->username = $username;
return $this;
}
/**
* Get username
*
* @return string
*/
public function getUsername()
{
return $this->username;
}
/**
* Set userpassword
*
* @param string $userpassword
*
* @return self
*/
public function setUserpassword(string $userpassword = null)
{
$this->userpassword = $userpassword;
return $this;
}
/**
* Get userpassword
*
* @return string
*/
public function getUserpassword()
{
return $this->userpassword;
}
/**
* Set firstName
*
* @param string $firstName
*
* @return self
*/
public function setFirstName(string $firstName = null)
{
$this->firstName = $firstName;
return $this;
}
/**
* Get firstName
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}
/**
* Set lastName
*
* @param string $lastName
*
* @return self
*/
public function setLastName(string $lastName = null)
{
$this->lastName = $lastName;
return $this;
}
/**
* Get lastName
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}
/**
* Set status
*
* @param string $status
*
* @return self
*/
public function setStatus(string $status = null)
{
$this->status = $status;
return $this;
}
/**
* Get status
*
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
* Set locked
*
* @param bool $locked
*
* @return self
*/
public function setLocked(bool $locked = null)
{
$this->locked = $locked;
return $this;
}
/**
* Get locked
*
* @return bool
*/
public function getLocked()
{
return $this->locked;
}
/**
* Set enabled
*
* @param bool $enabled
*
* @return self
*/
public function setEnabled(bool $enabled = null)
{
$this->enabled = $enabled;
return $this;
}
/**
* Get enabled
*
* @return bool
*/
public function getEnabled()
{
return $this->enabled;
}
/**
* Set expiryDate
*
* @param \DateTime $expiryDate
*
* @return self
*/
public function setExpiryDate(\DateTime $expiryDate = null)
{
$this->expiryDate = $expiryDate;
return $this;
}
/**
* Get expiryDate
*
* @return \DateTime
*/
public function getExpiryDate()
{
return $this->expiryDate;
}
/**
* Set hasApiAccess
*
* @param bool $hasApiAccess
*
* @return self
*/
public function setHasApiAccess(bool $hasApiAccess = null)
{
$this->hasApiAccess = $hasApiAccess;
return $this;
}
/**
* Get hasApiAccess
*
* @return bool
*/
public function getHasApiAccess()
{
return $this->hasApiAccess;
}
/**
* Set apiToken
*
* @param string $apiToken
*
* @return self
*/
public function setApiToken(string $apiToken = null)
{
$this->apiToken = $apiToken;
return $this;
}
/**
* Get apiToken
*
* @return string
*/
public function getApiToken()
{
return $this->apiToken;
}
/**
* @ORM\PrePersist
*/
public function prePersistSetDefaults(PreUpdateEventArgs $event)
{
$this->locked = $this->locked ?? 0;
$this->enabled = $this->enabled ?? 1;
$this->hasApiAccess = $this->hasApiAccess ?? 0;
}
}
| {
"content_hash": "38460f189a0093d94f01bd04ca1aaf5f",
"timestamp": "",
"source": "github",
"line_count": 352,
"max_line_length": 82,
"avg_line_length": 17.105113636363637,
"alnum_prop": 0.5055638598239495,
"repo_name": "angarf/imagina-symfony3",
"id": "c3a175fd2ba13a8926f51f231ac914d6c3e9ee02",
"size": "6021",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/AppBundle/Entity/UserBase.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "3605"
},
{
"name": "CSS",
"bytes": "753"
},
{
"name": "HTML",
"bytes": "40448"
},
{
"name": "JavaScript",
"bytes": "282766"
},
{
"name": "PHP",
"bytes": "147224"
}
],
"symlink_target": ""
} |
package com.itboye.guangda.view;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
public class NoScrollViewPager extends ViewPager {
private boolean isPagingEnabled = true;
public NoScrollViewPager(Context context) {
super(context);
}
public NoScrollViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onTouchEvent(MotionEvent event) {
return false;
}
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
return false;
}
public void setPagingEnabled(boolean b) {
this.isPagingEnabled = b;
}
} | {
"content_hash": "46135e8cd41b81ba5511d7a606895659",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 67,
"avg_line_length": 23.40625,
"alnum_prop": 0.7022696929238985,
"repo_name": "h136799711/itboye2015gd",
"id": "d71cbcb73b30776af8ce5900315d900a5997feb3",
"size": "749",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "guangda_android/src/com/itboye/guangda/view/NoScrollViewPager.java",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "163240"
}
],
"symlink_target": ""
} |
function _computeExpires(str) {
const value = parseInt(str, 10);
let expires = new Date();
switch (str.charAt(str.length - 1)) {
case 'Y': expires.setFullYear(expires.getFullYear() + value); break;
case 'M': expires.setMonth(expires.getMonth() + value); break;
case 'D': expires.setDate(expires.getDate() + value); break;
case 'h': expires.setHours(expires.getHours() + value); break;
case 'm': expires.setMinutes(expires.getMinutes() + value); break;
case 's': expires.setSeconds(expires.getSeconds() + value); break;
default: expires = new Date(str);
}
return expires;
}
function _conv (opts) {
let res = '';
Object.getOwnPropertyNames(opts).forEach(
key => {
if (/^expires$/i.test(key)) {
let expires = opts[key];
if (typeof expires !== 'object') {
expires += typeof expires === 'number' ? 'D' : '';
expires = _computeExpires(expires);
}
res += ';' + key + '=' + expires.toUTCString();
} else if (/^secure$/.test(key)) {
if (opts[key]) {
res += ';' + key;
}
} else {
res += ';' + key + '=' + opts[key];
}
}
);
if(!opts.hasOwnProperty('path')) {
res += ';path=/';
}
return res;
}
function enabled () {
const key = '__vxweb-key__', val = 1, regex = new RegExp('(?:^|; )' + key + '=' + val + '(?:;|$)');
document.cookie = key + '=' + val + ';path=/';
if(regex.test(document.cookie)) {
remove(key);
return true;
}
return false;
}
function get (key) {
const raw = getRaw(key);
return raw ? decodeURIComponent(raw) : null;
}
function set (key, val, options = {}) {
document.cookie = key + '=' + encodeURIComponent(val) + _conv(options);
}
function getAll () {
const reKey = /(?:^|; )([^=]+?)(?:=([^;]*))?(?:;|$)/g, cookies = {};
let match;
while ((match = reKey.exec(document.cookie))) {
reKey.lastIndex = (match.index + match.length) - 1;
cookies[match[1]] = decodeURIComponent(match[2]);
}
return cookies;
}
function remove (key, options = {}) {
return set (key, 'x',{ ...options, ...{ expires: -1 }});
}
function setRaw (key, val, options) {
document.cookie = key + '=' + val + _conv(options);
}
function getRaw (key) {
if (!key || typeof key !== 'string') {
return null;
}
const escKey = key.replace(/[.*+?^$|[\](){}\\-]/g, '\\$&');
const match = (new RegExp('(?:^|; )' + escKey + '(?:=([^;]*))?(?:;|$)').exec(document.cookie));
if(match === null) {
return null;
}
return match[1];
}
export {
enabled,
get,
getAll,
set,
getRaw,
setRaw,
remove
} | {
"content_hash": "8842b12c26904c7ee90c8aaebae4bf06",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 103,
"avg_line_length": 27.323809523809523,
"alnum_prop": 0.4963401882188916,
"repo_name": "Vectrex/vxWeb",
"id": "3f4c242d4307c72e69863a0d9d76454b849fc50e",
"size": "2869",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "resources/vue/util/cookie.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "3139"
},
{
"name": "JavaScript",
"bytes": "14862"
},
{
"name": "PHP",
"bytes": "200133"
},
{
"name": "SCSS",
"bytes": "23499"
},
{
"name": "Vue",
"bytes": "96229"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd">
<context:annotation-config />
<bean id="core.service.logic.SystemCalendarNoteLogicService" class="com.netsteadfast.greenstep.service.logic.impl.SystemCalendarNoteLogicServiceImpl" />
</beans>
| {
"content_hash": "0f52f443b3ec7ff7f4f6dde2540ac115",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 153,
"avg_line_length": 60.1764705882353,
"alnum_prop": 0.7448680351906158,
"repo_name": "quangnguyen9x/bamboobsc_quangnv",
"id": "2ee0d34ba4eebcf87cad3a475f835fde5645b27d",
"size": "1023",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "core-base/resource/applicationContext/standard/ext/applicationContext-ext-sysCalendarNote.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "232"
},
{
"name": "FreeMarker",
"bytes": "186074"
},
{
"name": "Groovy",
"bytes": "35207"
},
{
"name": "Java",
"bytes": "22394663"
},
{
"name": "Shell",
"bytes": "498"
}
],
"symlink_target": ""
} |
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your need!
*/
class Version20121030182941 extends AbstractMigration
{
public function up(Schema $schema)
{
// this up() migration is autogenerated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("ALTER TABLE event__events_sponsors ADD on_main TINYINT(1) NOT NULL");
}
public function down(Schema $schema)
{
// this down() migration is autogenerated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql");
$this->addSql("ALTER TABLE event__events_sponsors DROP on_main");
}
}
| {
"content_hash": "a035e8419124f904a131a5a7aaa32731",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 92,
"avg_line_length": 31.25,
"alnum_prop": 0.6708571428571428,
"repo_name": "bolotyuh/fwdays",
"id": "266d0ea7bbc33fa83676d1a20e369f77008d0e58",
"size": "875",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "app/DoctrineMigrations/Version20121030182941.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "176"
},
{
"name": "CSS",
"bytes": "62399"
},
{
"name": "Cucumber",
"bytes": "58434"
},
{
"name": "HTML",
"bytes": "83147"
},
{
"name": "JavaScript",
"bytes": "10243"
},
{
"name": "PHP",
"bytes": "437782"
},
{
"name": "Ruby",
"bytes": "743"
},
{
"name": "Shell",
"bytes": "1541"
}
],
"symlink_target": ""
} |
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System;
[RequireComponent (typeof(PixelCollider))]
[RequireComponent (typeof(SpriteRenderer))]
[RequireComponent (typeof(CircleCollider2D))]
public class Moth : IBehaviour
{
public int sightRadius = 10;
public float speed = 0.3f;
private Transform player;
private PixelCollider pixCollider;
private SpriteRenderer sprite;
private float movementDuration = 0f;
private Vector2 headingVector;
private static GameObject[] lights;
// DEBUG
Text ui;
void Start()
{
player = PlayerControl.Instance.transform;
pixCollider = GetComponent<PixelCollider>();
sprite = GetComponent<SpriteRenderer>();
sprite.enabled = false;
ui = GameObject.Find("MOTH").GetComponent<Text>();
lights = GameObject.FindGameObjectsWithTag("LIGHT");
InvokeRepeating("FindNearestLight", 0f, 5f);
}
// Executed in Update()
protected override void Execute()
{
Action start = Selector(PlayerInSight, Flee, SeekLight);
start();
if (UnityEngine.Random.Range(0f, 100f) > 99f) {
MoveRandom(UnityEngine.Random.Range(0.01f, 0.2f));
}
movementDuration -= Time.deltaTime;
pixCollider.UpdateMovement(headingVector.x, headingVector.y, speed);
ui.transform.position = Camera.main.WorldToScreenPoint(transform.position);
Vector2 pos = transform.position;
Debug.DrawLine(pos, pos + headingVector * 10f, Color.cyan);
}
private Vector3 nearestLightPos; // only 4 debug
private void SeekLight()
{
ui.text = "SEEK LIGHT";
if(movementDuration <= 0)
{
headingVector = Vector3.Normalize(nearestLightPos - transform.position);
movementDuration = UnityEngine.Random.Range(0.1f, 0.6f);
}
Debug.DrawLine(transform.position, nearestLightPos, Color.green);
if (pixCollider.isColliding) {
movementDuration = 0f;
MoveRandom(0.3f);
}
}
private void Flee()
{
ui.text = "FLEE";
if (pixCollider.isColliding) {
movementDuration = 0f;
MoveRandom(0.1f);
} else if (movementDuration <= 0) {
headingVector = Vector3.Normalize(transform.position - player.position);
}
Debug.DrawLine(player.position, transform.position, Color.red);
}
private void MoveRandom(float duration)
{
if (movementDuration <= 0)
{
movementDuration = duration;
float randX = UnityEngine.Random.Range(-100f, +100f);
float randY = UnityEngine.Random.Range(-100f, +100f);
headingVector = new Vector2(randX, randY).normalized;
}
ui.text = "MOVE RANDOM: " + (int)(10f*headingVector.x) + ", " + (int)(10f*headingVector.y);
}
private bool PlayerInSight()
{
return (Mathf.Abs(Vector3.Distance(transform.position, player.position)) < sightRadius);
}
private void FindNearestLight()
{
GameObject nearestLight = lights[0];
for (int i = 1; i < lights.Length; i++)
{
float d1 = Mathf.Abs(Vector2.Distance(transform.position, nearestLight.transform.position));
float d2 = Mathf.Abs(Vector2.Distance(transform.position, lights[i].transform.position));
if (d1 > d2)
{
nearestLight = lights[i];
}
}
nearestLightPos = nearestLight.transform.position;
}
private void Hide()
{
sprite.enabled = false;
}
void OnTriggerStay2D(Collider2D other)
{
sprite.enabled = true;
}
void OnTriggerExit2D(Collider2D other)
{
Invoke("Hide", 1f);
}
}
| {
"content_hash": "7a0e0a7c5bea65f064b7ff0cb82d196b",
"timestamp": "",
"source": "github",
"line_count": 139,
"max_line_length": 104,
"avg_line_length": 27.848920863309353,
"alnum_prop": 0.6070782743477138,
"repo_name": "barzb/LowRezJam",
"id": "fdf5926f2e6a6471249191c1aa8586a6b5ab479a",
"size": "3873",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Assets/Scripts/Enemy/Moth.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "124154"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<title>Legend</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Doc-O-Matic" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="STYLESHEET" href="default.css" type="text/css" />
<script type="text/javascript" src="scripts.js"></script>
</head>
<body class="Element700" onload="onBodyLoadEx('frames.html', 'topic', '_!!MEMBERTYPE_Properties_Lightstreamer_DotNet_Client_ConnectionConstraints_14_Legend.html');" onmousedown="onBodyMouseDown();">
<!-- Begin Popups -->
<!-- End Popups -->
<!-- Begin Page Header -->
<div class="Element710" id="areafixed">
<div class="Element92">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="33%">
<div class="Element1">
Lightstreamer .Net Client 2.0</div>
</td><td width="34%">
<div class="Element2">
<a href="contents.html" target="tocidx"><img src="btn_globals_contents_black.gif" border="0" alt="Contents" title="Contents" onmouseover="switchImage(this, 'btn_globals_contents_black_hover.gif');" onmouseout="switchImage(this, 'btn_globals_contents_black.gif');"></a><a href="idx.html" target="tocidx"><img src="btn_globals_index_black.gif" border="0" alt="Index" title="Index" onmouseover="switchImage(this, 'btn_globals_index_black_hover.gif');" onmouseout="switchImage(this, 'btn_globals_index_black.gif');"></a><a href="index.html" target="topic"><img src="btn_globals_home_black.gif" border="0" alt="Home" title="Home" onmouseover="switchImage(this, 'btn_globals_home_black_hover.gif');" onmouseout="switchImage(this, 'btn_globals_home_black.gif');"></a></div>
</td><td width="33%">
</td></tr></table><div class="Element27">
Legend</div>
<div class="Element28">
<a href="!!MEMBERTYPE_Properties_Lightstreamer_DotNet_Client_ConnectionConstraints.html" target="topic">ConnectionConstraints Properties</a></div>
</div>
</div>
<!-- End Page Header -->
<!-- Begin Client Area -->
<div class="Element720" id="areascroll">
<div class="Element721">
<!-- Begin Page Content -->
<div class="Element58">
<div class="Element14">
Legend</div>
<div class="Element11">
<div class="Element10">
<div class="Element212">
<div class="TableDiv">
<table cellspacing="0" class="Table4">
<tr>
<td class="Element202" valign="top" width="50%">
<div class="Element203">
<img src="indicator_property.gif" border="0" alt="" title=""> </div></td><td class="Element206" valign="top" width="50%">
<div class="Element207">
Property </div></td></tr></table></div></div>
</div>
</div>
</div>
<!-- End Page Content -->
<!-- Begin Page Footer -->
<div class="Element93">
<table width="100%" cellspacing="0" cellpadding="0">
<tr><td width="100%">
<div class="Element3">
<a href="http://www.lightstreamer.com/" target="_blank">Copyright (C) 2004-2011 Weswit s.r.l.</a></div>
</td></tr><tr><td width="100%">
<div class="Element4">
<a href="contents.html" target="tocidx">Contents</a> | <a href="idx.html" target="tocidx">Index</a> | <a href="index.html" target="topic">Home</a></div>
</td></tr></table></div>
<!-- End Page Footer -->
</div>
</div>
<!-- End Client Area -->
</body></html> | {
"content_hash": "922ea173eb0292ff3daeab2e80ae4ebb",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 766,
"avg_line_length": 41.03846153846154,
"alnum_prop": 0.6794751640112465,
"repo_name": "cityindex-attic/CIAPI.CS",
"id": "d1b5c6bad204e3ad996261078d4f3a1d4076634e",
"size": "3201",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/packages/Lightstreamer 4.2 Client/sdk_client_dotnet/doc/API-reference/_!!MEMBERTYPE_Properties_Lightstreamer_DotNet_Client_ConnectionConstraints_14_Legend.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "14700"
},
{
"name": "C#",
"bytes": "1561068"
},
{
"name": "CSS",
"bytes": "180566"
},
{
"name": "JavaScript",
"bytes": "666517"
},
{
"name": "PowerShell",
"bytes": "2566"
},
{
"name": "Shell",
"bytes": "1209"
}
],
"symlink_target": ""
} |
TEST (IPv6Test, test_example0)
{
const char arg[] = "1:2:3:4:5:6:7:8";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example1)
{
const char arg[] = "0123:4567:89ab:cdef:0123:4567:89ab:cdef";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example2)
{
const char arg[] = "0123:4567:89ab:cdef:0123:4567:127.0.0.1";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example3)
{
const char arg[] = "0123:4567::89ab:cdef";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example4)
{
const char arg[] = "0123:4567:89ab:cdef:0123:4567:89ab::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example5)
{
const char arg[] = "0123:4567:89ab:cdef:0123:4567::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example6)
{
const char arg[] = "0123:4567:89ab:cdef:0123::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example7)
{
const char arg[] = "0123:4567:89ab:cdef::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example8)
{
const char arg[] = "0123:4567:89ab::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example9)
{
const char arg[] = "0123:4567::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example10)
{
const char arg[] = "0123::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example11)
{
const char arg[] = "::";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example12)
{
const char arg[] = "::0123";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example13)
{
const char arg[] = "::0123:4567";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example14)
{
const char arg[] = "::0123:4567:89ab";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example15)
{
const char arg[] = "::0123:4567:89ab:cdef";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example16)
{
const char arg[] = "::0123:4567:89ab:cdef:0123";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
}
TEST (IPv6Test, test_example17)
{
const char arg[] = "::0123:4567:89ab:cdef:0123:4567:89ab";
StringAccess * access = new StringAccess(arg, sizeof(arg));
TextCursor cursor(access);
cursor = parse_ipv6address(cursor);
EXPECT_EQ(sizeof(arg) - 1, cursor.get_offset());
} | {
"content_hash": "bde45496c1af92ba55b5a1fc531af4c4",
"timestamp": "",
"source": "github",
"line_count": 161,
"max_line_length": 65,
"avg_line_length": 30.453416149068325,
"alnum_prop": 0.6620436467468896,
"repo_name": "serathius/uri-in-file-browser",
"id": "67afdc4dd9832e0d720470c811ec4d6dbc7a5dea",
"size": "4960",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/test_ipv6.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "37042"
},
{
"name": "Shell",
"bytes": "403"
}
],
"symlink_target": ""
} |
import { Inject, Injectable, Logger, Scope } from '@nestjs/common';
import { INQUIRER, REQUEST } from '@nestjs/core';
@Injectable({ scope: Scope.TRANSIENT })
export class RequestLogger {
config: object;
constructor(
@Inject(INQUIRER) { constructor },
@Inject(REQUEST) private readonly request,
private readonly logger: Logger,
) {
this.config = (constructor && constructor.logger) || {};
}
get requestId() {
if (!this.request.id) {
this.request.id = `${Date.now()}.${Math.floor(Math.random() * 1000000)}`;
}
return this.request.id;
}
log(message: string) {
this.logger.log({ message, requestId: this.requestId, ...this.config });
}
}
| {
"content_hash": "fbd8399b283d68870dd424905618b486",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 79,
"avg_line_length": 26.615384615384617,
"alnum_prop": 0.6430635838150289,
"repo_name": "kamilmysliwiec/nest",
"id": "3d3c097db43f4a18d170a3334d23a1fbc9600ee6",
"size": "692",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "integration/scopes/src/inject-inquirer/hello-request/request-logger.service.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "942"
},
{
"name": "TypeScript",
"bytes": "403766"
}
],
"symlink_target": ""
} |
module RTFM
class GroffString
attr_reader :source
def self.groffify(str = "")
out = self.new(str)
yield out
out.to_s
end
def initialize(str = "")
@source = str.dup
end
def to_s
source
end
def add_line(line)
source << line.to_groff.rstrip << "\n"
end
alias_method :<<, :add_line
def section(section)
self.Sh section.upcase
end
def paragraph(text)
text = Paragraph.new(text) unless text.is_a?(Paragraph)
self << text
end
def put_name
self.Nm
end
def reference(page, section = nil)
self.Xr page, (section || "")
end
def method_missing(meth, *args, &block)
add_line ".#{meth} #{args.join(" ")}"
end
end
end | {
"content_hash": "3b8e5a1d5cba949398c62702141ef83c",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 61,
"avg_line_length": 17.565217391304348,
"alnum_prop": 0.525990099009901,
"repo_name": "michaeledgar/rtfm",
"id": "54b83af4147582fbf4cc47b435e74ba915f1c9e1",
"size": "808",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/rtfm/groffstring.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "27090"
}
],
"symlink_target": ""
} |
package renamefile;
import javax.swing.*;
import javax.swing.table.*;
import org.dyno.visual.swing.layouts.Bilateral;
import org.dyno.visual.swing.layouts.Constraints;
import org.dyno.visual.swing.layouts.GroupLayout;
import org.dyno.visual.swing.layouts.Leading;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.ArrayList;
import net.sf.jabref.*;
import net.sf.jabref.gui.*;
public class RenameDialog extends JDialog implements ActionListener, FocusListener{
private static final long serialVersionUID = 1L;
private final int[] renWidth={10,100,100,300,300,300};
private final int[] delWidth={10,100,100,300,300};
private JabRefFrame frame;
private BibtexEntry[] bes;
private int mode;
private FLTableModel tm;
private JTable table;
private JPanel panel;
private JCheckBox cbName,cbDir;
private JTextField tfDir,tfPattern;
private JButton btnOk,btnCancel;
private final String[] titleString={"Rename/move files","Copy files","Delete files"};
public RenameDialog(JabRefFrame frame,BibtexEntry[] bes ) {
this(frame,bes,0);
}
public RenameDialog(JabRefFrame frame,BibtexEntry[] bes, int mode) {
super(frame);
this.frame=frame;
this.bes=bes;
this.mode=mode;
initElements();
JPanel p,p1;
panel=new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
add(panel);
p = new JPanel();
p.setLayout(new BoxLayout(p, BoxLayout.PAGE_AXIS));
p.add(new JScrollPane(table));
p.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
panel.add(p);
if(mode!=2){
p=new JPanel();
p.setLayout(new GroupLayout());
p.add(cbDir, new Constraints(new Leading(10, 150, 8, 8), new Leading(10, 10, 10)));
p.add(cbName, new Constraints(new Leading(10, 150, 8, 8), new Leading(38, 8, 8)));
p.add(tfDir, new Constraints(new Bilateral(170, 12, 4), new Leading(12, 12, 12)));
p.add(tfPattern, new Constraints(new Bilateral(170, 12, 4), new Leading(40, 12, 12)));
p1=new JPanel();
p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS));
p1.add(p);
panel.add(p1);
}
p=new JPanel();
p.add(btnOk);
p.add(btnCancel);
p1=new JPanel();
p1.setLayout(new BoxLayout(p1,BoxLayout.X_AXIS));
p1.add(p);
panel.add(p1);
setTitle(titleString[mode]);
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
getRootPane().setDefaultButton(btnOk);
pack();
setLocationRelativeTo(null);
setVisible(true);
}
private void initElements(){
if(mode!=2){
cbDir = new JCheckBox();
cbDir.setText("Use folder:");
cbDir.addActionListener(this);
cbName = new JCheckBox();
cbName.setText("Use name pattern:");
cbName.addActionListener(this);
tfDir = new JTextField();
tfDir.addFocusListener(this);
tfDir.addActionListener(this);
tfPattern = new JTextField();
tfPattern.addFocusListener(this);
tfPattern.addActionListener(this);
readValues();
}
btnOk = new JButton();
btnOk.setText("Ok");
btnOk.addActionListener(this);
btnOk.setPreferredSize(new Dimension(100, 26));
btnCancel = new JButton();
btnCancel.setText("Cancel");
btnCancel.addActionListener(this);
btnCancel.setPreferredSize(new Dimension(100, 26));
tm = new FLTableModel(bes,mode);
table = new JTable(tm);
table.setPreferredScrollableViewportSize(new Dimension(800, 200));
table.setFillsViewportHeight(true);
// table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
int[] width = mode==2 ? delWidth : renWidth;
for(int i=0;i<width.length;i++)
table.getColumnModel().getColumn(i).setPreferredWidth(width[i]);
}
class FLTableModel extends AbstractTableModel {
private static final long serialVersionUID = 1L;
private final String[] renNames = {"","Key","Author", "Title", "File","New File"};
private final String[] delNames = {"","Key","Author", "Title", "File"};
private String[] columnNames;
public ArrayList<HashMap<Object,Object>> data;
private int mode;
public FLTableModel(BibtexEntry[] b,int mode) {
this.mode=mode;
columnNames = mode==2 ? delNames : renNames;
setData(b);
}
public void setData(BibtexEntry[] b){
data = new ArrayList<HashMap<Object,Object>>();
FileListTableModel m;
for (BibtexEntry e:b) {
m = new FileListTableModel();
m.setContent(e.getField("file"));
for (int j=0;j<m.getRowCount();j++) {
FileListEntry f = m.getEntry(j);
HashMap<Object,Object> r= new HashMap<Object,Object>();
r.put(0,new Boolean(true));
r.put(1,tostr(e.getField(BibtexFields.KEY_FIELD)));
r.put(2,tostr(e.getField("author")));
r.put(3,tostr(e.getField("title")));
r.put(4,f.getLink());
r.put("fe",f); //FileListEntry
r.put("be",e); //BibtexEntry
if(mode!=2)
r.put(5,getNewFileName(f.getLink(),e));
data.add(r);
}
}
}
private Object tostr(Object s){
return s==null ? "" : s;
}
public void changeData(BibtexEntry[] b){
setData(b);
fireTableDataChanged();
}
public int getColumnCount() {
return columnNames.length;
}
public int getRowCount() {
return data.size();
}
public String getColumnName(int col) {
return columnNames[col];
}
public Object getValueAt(int row, int col) {
return data.get(row).get(col);
}
public Class<? extends Object> getColumnClass(int c) {
return getValueAt(0, c).getClass();
}
public boolean isCellEditable(int row, int col) {
if (col < 1) {
return true;
} else {
return false;
}
}
public void setValueAt(Object value, int row, int col) {
data.get(row).put(col,value);
fireTableCellUpdated(row, col);
}
public HashMap<Object,Object> getRow(int row){
return data.get(row);
}
}
private void readValues(){
cbDir.setSelected(!Globals.prefs.getBoolean("SameFolder"));
cbName.setSelected(!Globals.prefs.getBoolean("SameName"));
tfDir.setText(Globals.prefs.get("MoveFolder"));
tfPattern.setText(Globals.prefs.get("RenamePattern"));
}
private void saveValues(){
Globals.prefs.putBoolean("SameFolder",!cbDir.isSelected());
Globals.prefs.putBoolean("SameName",!cbName.isSelected());
Globals.prefs.put("MoveFolder",tfDir.getText());
Globals.prefs.put("RenamePattern",tfPattern.getText());
}
public void actionPerformed(ActionEvent evt) {
Object s=evt.getSource();
if (s == btnOk) {
if(mode!=2)
saveValues();
for (int i = 0;i < tm.getRowCount();i++) {
HashMap<Object,Object> r=tm.getRow(i);
Boolean sel = (Boolean)r.get(0);
if (sel) {
BibtexEntry b=(BibtexEntry)r.get("be");
String of = ((FileListEntry)r.get("fe")).getLink();
switch(mode){
case 0: renameFile(b,of,this); break;
case 1: copyFile(b,of,this); break;
case 2: removeFile(b,of,this); break;
}
}
}
dispose();
if(mode!=1){
frame.basePanel().markBaseChanged();
frame.basePanel().updateEntryEditorIfShowing();
}
} else if (s == btnCancel) {
dispose();
} else if (mode!=2 && (s==cbDir || s==cbName || s==tfDir || s==tfPattern))
tm.changeData(bes);
}
public void focusLost(FocusEvent e) {
tm.changeData(bes);
}
public String getNewFileName(String ofn,BibtexEntry b){
boolean sameDir=!cbDir.isSelected();
boolean sameName=!cbName.isSelected();
String dir=tfDir.getText();
String pattern=tfPattern.getText();
return Utils.getNewFileName(ofn, b,sameDir, sameName, dir, pattern);
}
@Override
public void focusGained(FocusEvent arg0) {
// TODO Auto-generated method stub
}
private String changeFileName(String f, int n){
if(n==0)
return f;
int m=f.lastIndexOf('.');
if(m==-1)
return f+n;
return f.substring(0,m)+n+'.'+f.substring(m+1);
}
public void renameFile(BibtexEntry b,String ofn, Component comp){
String dir = Utils.getFileDir();
File of = Util.expandFilename(ofn, dir); //null if file does not exist
if (of == null || !of.exists())
return;
String fn1= Utils.getNewFileName(ofn,b);
for(int n=0;;){
String fn=changeFileName(fn1,n);
File file = new File(fn);
if(!file.isAbsolute())
file=new File(dir,fn);
try {
if(file.getCanonicalPath().equals(of.getCanonicalPath())){
Utils.removeFileEntry(b,ofn);
Utils.addFileEntry(b,fn);
return;
}
} catch (IOException e) {
e.printStackTrace();
return;
}
if(file.exists()){
n++;
continue;
}
if(n!=0){
String k = (String)JOptionPane.showInputDialog(comp,
"The file\n"
+ofn+"\n will be renamed to",
"New filename",
JOptionPane.PLAIN_MESSAGE,null,null,fn);
if(k == null)
return;
if(!k.equals(fn)){
if(Utils.haveSameExtensions(k,ofn)){
n=0;
fn1=k;
}
continue;
}
}
File par=file.getParentFile();
if(par!=null)
par.mkdirs();
if (!of.renameTo(file)){
String k = (String)JOptionPane.showInputDialog(comp,"Can not rename the file\n" + ofn
+"\n Close the file or specify a different filename",
"New filename",
JOptionPane.PLAIN_MESSAGE,null,null,fn);
if (k == null)
return;
if(!k.equals(fn) && Utils.haveSameExtensions(k,ofn)){
n=0;
fn1=k;
}
continue;
}
Utils.removeFileEntry(b,ofn);
Utils.addFileEntry(b,fn);
break;
}
}
public void copyFile(BibtexEntry b,String ofn, Component comp){
String dir = Utils.getFileDir();
File of = Util.expandFilename(ofn, dir); //null if file does not exist
if (of == null || !of.exists())
return;
String fn1= Utils.getNewFileName(ofn,b);
for(int n=0;;){
String fn=changeFileName(fn1,n);
File file = new File(fn);
if(!file.isAbsolute())
file=new File(dir,fn);
try {
if(file.getCanonicalPath().equals(of.getCanonicalPath()))
return;
} catch (IOException e) {
e.printStackTrace();
return;
}
if(file.exists()){
n++;
continue;
}
if(n!=0){
String k = (String)JOptionPane.showInputDialog(comp,
"The file\n"
+ofn+"\n will be copied to",
"New filename",
JOptionPane.PLAIN_MESSAGE,null,null,fn);
if(k == null)
return;
if(!k.equals(fn)){
if(Utils.haveSameExtensions(k,ofn)){
n=0;
fn1=k;
}
continue;
}
}
File par=file.getParentFile();
if(par!=null)
par.mkdirs();
if (!Utils.copyFile(of,file)){
String k = (String)JOptionPane.showInputDialog(comp,"Can not copy the file\n" + ofn
+"\n Specify a different filename",
"New filename",
JOptionPane.PLAIN_MESSAGE,null,null,fn);
if (k == null)
return;
if(!k.equals(fn) && Utils.haveSameExtensions(k,ofn)){
n=0;
fn1=k;
}
continue;
}
break;
}
}
private void removeFile(BibtexEntry b, String fn, Component comp) {
if(!Utils.hasFile(b,fn))
return;
String dir = Utils.getFileDir();
File f=Util.expandFilename(fn,dir); //null if file does not exist
if(f==null || !f.exists()){
Utils.removeFileEntry(b,fn);
return;
}
while(!f.delete()){
int k = JOptionPane.showConfirmDialog(comp,
"Close the file\n"+fn,
"Delete file",
JOptionPane.OK_CANCEL_OPTION);
if(k!=JOptionPane.OK_OPTION)
return;
}
Utils.removeFileEntry(b,fn);
}
}
| {
"content_hash": "69f639c833cb056cfafc8f3d62209894",
"timestamp": "",
"source": "github",
"line_count": 420,
"max_line_length": 89,
"avg_line_length": 26.583333333333332,
"alnum_prop": 0.6573219883564712,
"repo_name": "korv/Jabref-plugins",
"id": "ceac91b9d2b358f4521919b849a5fdebdfb89335",
"size": "11165",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "renamefile/src/renamefile/RenameDialog.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "32719"
}
],
"symlink_target": ""
} |
import React from 'react'
import {connect} from 'react-redux'
import {setGameResult} from '../actions'
const Timer = connect(
(state) => ({playing: state.gameProcess.playing}),
(dispatch) => ({ dispatch })
)(React.createClass({
propTypes: {
playing: React.PropTypes.bool
},
getInitialState () {
return { time: 0 }
},
formatTime (time) {
let str = String(time)
let formated = str.slice(0, str.indexOf('.') + 2)
return formated
},
render () {
return (
<span>
{this.formatTime(this.state.time)}
</span>
)
},
componentWillUpdate (nextProps) {
let gameStarted = this.props.playing === false && nextProps.playing === true
if (gameStarted) {
this.onGameStart()
}
let gameFinished = this.props.playing === true && nextProps.playing === false
if (gameFinished) {
this.onGameFinished()
}
},
onGameStart () {
const s = this
let timer = setInterval(() => {
s.setState({
time: s.state.time + 0.1
})
}, 100)
s._timer = timer
s.setState({
time: 0
})
},
onGameFinished () {
const s = this
let {dispatch} = s.props
clearInterval(this._timer)
dispatch(setGameResult({ time: s.formatTime(s.state.time) }))
}
}))
const Counter = connect(
(state) => ({
playing: state.gameProcess.playing,
countTotal: state.code.count || 0,
countPressed: state.gameProcess.countPressed || 0
}),
(dispatch) => ({ dispatch })
)(React.createClass({
getDefaultProps () {
return {
countTotal: 0,
countPressed: 0
}
},
render () {
let {countTotal, countPressed} = this.props
return (
<span>
{countPressed}/{countTotal}
</span>
)
}
}))
const GameInfoCard = React.createClass({
render () {
return (
<div className='game-info-card'>
<div className='title app-theme-dark-color'>写経ザ・プログラム</div>
<table>
<tbody>
<tr>
<td>
Time:
</td>
<td className='right'>
<Timer />
</td>
</tr>
<tr>
<td>
Count:
</td>
<td className='right'>
<Counter />
</td>
</tr>
</tbody>
</table>
</div>
)
}
})
export default GameInfoCard
| {
"content_hash": "76bccf8c0453bba8963a8274f6ac6278",
"timestamp": "",
"source": "github",
"line_count": 117,
"max_line_length": 81,
"avg_line_length": 20.683760683760685,
"alnum_prop": 0.5173553719008265,
"repo_name": "FujiHaruka/shakyo-programming",
"id": "0667de677060cb92f20188b344f3b5989eafe411",
"size": "2438",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ui/js/containers/game_info_card.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "119"
},
{
"name": "CSS",
"bytes": "87451"
},
{
"name": "Go",
"bytes": "73"
},
{
"name": "HTML",
"bytes": "459"
},
{
"name": "Java",
"bytes": "104"
},
{
"name": "JavaScript",
"bytes": "32202"
},
{
"name": "Python",
"bytes": "20"
},
{
"name": "Ruby",
"bytes": "19"
}
],
"symlink_target": ""
} |
/* jshint browser: true */
/* jshint unused: false */
/* global $, Joi, frontendConfig, arangoHelper, _, Backbone, templateEngine, window */
(function () {
'use strict';
window.ViewsView = Backbone.View.extend({
el: '#content',
readOnly: false,
template: templateEngine.createTemplate('viewsView.ejs'),
initialize: function () {
},
refreshRate: 10000,
sortOptions: {
desc: false
},
searchString: '',
remove: function () {
this.$el.empty().off(); /* off to unbind the events */
this.stopListening();
this.unbind();
delete this.el;
return this;
},
events: {
'click #createView': 'createView',
'click #viewsToggle': 'toggleSettingsDropdown',
'click .tile-view': 'gotoView',
'keyup #viewsSearchInput': 'search',
'click #viewsSearchSubmit': 'search',
'click #viewsSortDesc': 'sorting'
},
checkVisibility: function () {
if ($('#viewsDropdown').is(':visible')) {
this.dropdownVisible = true;
} else {
this.dropdownVisible = false;
}
arangoHelper.setCheckboxStatus('#viewsDropdown');
},
checkIfInProgress: function () {
if (window.location.hash.search('views') > -1) {
var self = this;
var callback = function (error, lockedViews) {
if (error) {
console.log('Could not check locked views');
} else {
if (lockedViews.length > 0) {
_.each(lockedViews, function (foundView) {
if ($('#' + foundView.collection)) {
// found view html container
$('#' + foundView.collection + ' .collection-type-icon').removeClass('fa-clone');
$('#' + foundView.collection + ' .collection-type-icon').addClass('fa-spinner').addClass('fa-spin');
} else {
$('#' + foundView.collection + ' .collection-type-icon').addClass('fa-clone');
$('#' + foundView.collection + ' .collection-type-icon').removeClass('fa-spinner').removeClass('fa-spin');
}
});
} else {
// if no view found at all, just reset all to default
$('.tile .collection-type-icon').addClass('fa-clone').removeClass('fa-spinner').removeClass('fa-spin');
}
window.setTimeout(function () {
self.checkIfInProgress();
}, self.refreshRate);
}
};
if (!frontendConfig.ldapEnabled) {
window.arangoHelper.syncAndReturnUnfinishedAardvarkJobs('view', callback);
}
}
},
sorting: function () {
if ($('#viewsSortDesc').is(':checked')) {
this.setSortingDesc(true);
} else {
this.setSortingDesc(false);
}
this.checkVisibility();
this.render();
},
setSortingDesc: function (yesno) {
this.sortOptions.desc = yesno;
},
search: function () {
this.setSearchString(arangoHelper.escapeHtml($('#viewsSearchInput').val()));
this.render();
},
toggleSettingsDropdown: function () {
var self = this;
// apply sorting to checkboxes
$('#viewsSortDesc').attr('checked', this.sortOptions.desc);
$('#viewsToggle').toggleClass('activated');
$('#viewsDropdown2').slideToggle(200, function () {
self.checkVisibility();
});
},
render: function (data) {
var self = this;
if (data) {
self.$el.html(self.template.render({
views: self.applySorting(data.result),
searchString: self.getSearchString()
}));
} else {
this.getViews();
this.$el.html(this.template.render({
views: [],
searchString: self.getSearchString()
}));
}
if (self.dropdownVisible === true) {
$('#viewsSortDesc').attr('checked', self.sortOptions.desc);
$('#viewsToggle').addClass('activated');
$('#viewsDropdown2').show();
}
$('#viewsSortDesc').attr('checked', self.sortOptions.desc);
arangoHelper.setCheckboxStatus('#viewsDropdown');
var searchInput = $('#viewsSearchInput');
var strLength = searchInput.val().length;
searchInput.focus();
searchInput[0].setSelectionRange(strLength, strLength);
arangoHelper.checkDatabasePermissions(this.setReadOnly.bind(this));
},
setReadOnly: function () {
this.readOnly = true;
$('#createView').parent().parent().addClass('disabled');
},
setSearchString: function (string) {
this.searchString = string;
},
getSearchString: function () {
return this.searchString.toLowerCase();
},
applySorting: function (data) {
var self = this;
// default sorting order
data = _.sortBy(data, 'name');
// desc sorting order
if (this.sortOptions.desc) {
data = data.reverse();
}
var toReturn = [];
if (this.getSearchString() !== '') {
_.each(data, function (view, key) {
if (view && view.name) {
if (view.name.toLowerCase().indexOf(self.getSearchString()) !== -1) {
toReturn.push(view);
}
}
});
} else {
return data;
}
return toReturn;
},
gotoView: function (e) {
var name = $(e.currentTarget).attr('id');
if (name) {
var url = 'view/' + encodeURIComponent(name);
window.App.navigate(url, {trigger: true});
}
},
getViews: function () {
var self = this;
this.collection.fetch({
success: function (data) {
var res = {
result: []
};
self.collection.each(function (view) {
res.result.push(view.toJSON());
});
self.render(res);
self.checkIfInProgress();
},
error: function (error) {
console.log(error);
}
});
},
createView: function (e) {
if (!this.readOnly) {
e.preventDefault();
this.createViewModal();
}
},
createViewModal: function () {
var buttons = [];
var tableContent = [];
tableContent.push(
window.modalView.createTextEntry(
'newName',
'Name',
'',
false,
'Name',
true,
[
{
rule: Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),
msg: 'Only symbols, "_" and "-" are allowed.'
},
{
rule: Joi.string().required(),
msg: 'No view name given.'
}
]
)
);
tableContent.push(
window.modalView.createReadOnlyEntry(
undefined,
'Type',
'arangosearch',
undefined,
undefined,
false,
undefined
)
);
buttons.push(
window.modalView.createSuccessButton('Create', this.submitCreateView.bind(this))
);
window.modalView.show('modalTable.ejs', 'Create New View', buttons, tableContent);
},
submitCreateView: function () {
var self = this;
var name = $('#newName').val();
var options = JSON.stringify({
name: name,
type: 'arangosearch',
properties: {}
});
$.ajax({
type: 'POST',
cache: false,
url: arangoHelper.databaseUrl('/_api/view'),
contentType: 'application/json',
processData: false,
data: options,
success: function (data) {
window.modalView.hide();
arangoHelper.arangoNotification('View', 'Creation in progress. This may take a while.');
self.getViews();
},
error: function (error) {
if (error.responseJSON && error.responseJSON.errorMessage) {
arangoHelper.arangoError('Views', error.responseJSON.errorMessage);
}
}
});
}
});
}());
| {
"content_hash": "e95393b16d6dd00aeee970b0b4c1fab9",
"timestamp": "",
"source": "github",
"line_count": 297,
"max_line_length": 124,
"avg_line_length": 27.023569023569024,
"alnum_prop": 0.5292798405183154,
"repo_name": "Simran-B/arangodb",
"id": "79a4dede59c6ef748c5af54ff8dcd577571feb0a",
"size": "8026",
"binary": false,
"copies": "2",
"ref": "refs/heads/devel",
"path": "js/apps/system/_admin/aardvark/APP/frontend/js/views/viewsView.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "61827"
},
{
"name": "Batchfile",
"bytes": "3282"
},
{
"name": "C",
"bytes": "275955"
},
{
"name": "C++",
"bytes": "29221660"
},
{
"name": "CMake",
"bytes": "375992"
},
{
"name": "CSS",
"bytes": "212174"
},
{
"name": "EJS",
"bytes": "218744"
},
{
"name": "HTML",
"bytes": "23114"
},
{
"name": "JavaScript",
"bytes": "30616196"
},
{
"name": "LLVM",
"bytes": "14753"
},
{
"name": "Makefile",
"bytes": "526"
},
{
"name": "NASL",
"bytes": "129286"
},
{
"name": "NSIS",
"bytes": "49153"
},
{
"name": "PHP",
"bytes": "46519"
},
{
"name": "Pascal",
"bytes": "75391"
},
{
"name": "Perl",
"bytes": "9811"
},
{
"name": "PowerShell",
"bytes": "7885"
},
{
"name": "Python",
"bytes": "181384"
},
{
"name": "Ruby",
"bytes": "1041531"
},
{
"name": "SCSS",
"bytes": "254419"
},
{
"name": "Shell",
"bytes": "128175"
},
{
"name": "TypeScript",
"bytes": "25245"
},
{
"name": "Yacc",
"bytes": "68516"
}
],
"symlink_target": ""
} |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("5_MixinDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Kiandra System Solutions")]
[assembly: AssemblyProduct("5_MixinDemo")]
[assembly: AssemblyCopyright("Copyright © Kiandra System Solutions 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("448871ed-e625-4ac8-93c3-4aedc74bd71a")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| {
"content_hash": "adb9db429605200b7ec2c9bcbea017e1",
"timestamp": "",
"source": "github",
"line_count": 36,
"max_line_length": 84,
"avg_line_length": 40.083333333333336,
"alnum_prop": 0.7491337491337491,
"repo_name": "erhan0/aop",
"id": "fae8da99149aabf0a5ca7e7c5b908a2b9f5483a8",
"size": "1446",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "SheepAspect.Examples/6_InjectAttributesDemo/Properties/AssemblyInfo.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "768"
},
{
"name": "C#",
"bytes": "561756"
},
{
"name": "GAP",
"bytes": "3582"
},
{
"name": "Pascal",
"bytes": "2589"
},
{
"name": "PowerShell",
"bytes": "5423"
}
],
"symlink_target": ""
} |
<?php
namespace DTS\eBaySDK\Trading\Types;
/**
*
* @property \DateTime $EndTime
* @property string $ItemID
* @property \DateTime $StartTime
*/
class GetNotificationsUsageRequestType extends \DTS\eBaySDK\Trading\Types\AbstractRequestType
{
/**
* @var array Properties belonging to objects of this class.
*/
private static $propertyTypes = array(
'EndTime' => array(
'type' => 'DateTime',
'unbound' => false,
'attribute' => false,
'elementName' => 'EndTime'
),
'ItemID' => array(
'type' => 'string',
'unbound' => false,
'attribute' => false,
'elementName' => 'ItemID'
),
'StartTime' => array(
'type' => 'DateTime',
'unbound' => false,
'attribute' => false,
'elementName' => 'StartTime'
)
);
/**
* @param array $values Optional properties and values to assign to the object.
*/
public function __construct(array $values = array())
{
list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);
parent::__construct($parentValues);
if (!array_key_exists(__CLASS__, self::$properties)) {
self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
}
if (!array_key_exists(__CLASS__, self::$xmlNamespaces)) {
self::$xmlNamespaces[__CLASS__] = 'urn:ebay:apis:eBLBaseComponents';
}
if (!array_key_exists(__CLASS__, self::$requestXmlRootElementNames)) {
self::$requestXmlRootElementNames[__CLASS__] = 'GetNotificationsUsageRequest';
}
$this->setValues(__CLASS__, $childValues);
}
}
| {
"content_hash": "e3c72e477758cdf90b2a3759534f0267",
"timestamp": "",
"source": "github",
"line_count": 61,
"max_line_length": 116,
"avg_line_length": 29.639344262295083,
"alnum_prop": 0.5564159292035398,
"repo_name": "michabbb-backup/ebay-sdk-trading",
"id": "8c8e51a9c3ad0beb37ac8e63c05c6a90c36387d3",
"size": "2538",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "src/DTS/eBaySDK/Trading/Types/GetNotificationsUsageRequestType.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Makefile",
"bytes": "1963"
},
{
"name": "PHP",
"bytes": "4776677"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<title>The Offshore Pirate | Flappers and Philosophers | F. Scott Fitzgerald | Lit2Go ETC</title>
<link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/screenless.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="http://etc.usf.edu/lit2go/css/printless.css" type="text/css" media="print" title="no title" charset="utf-8">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" defer src="http://etc.usf.edu/lit2go/js/js.min.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5574891-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
$(document).ready(function() {
$('img').unveil();
$('#contactable').contactable({
url: 'http://etc.usf.edu/lit2go/welcome/feedback/',
subject: 'Lit2Go Feedback — The Offshore Pirate | Flappers and Philosophers | F. Scott Fitzgerald — http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/'
});
});
</script>
</head>
<body>
<div class="page"> <header>
<h1>
<a href="http://etc.usf.edu/lit2go/">Lit<span class="blue">2</span>Go</a>
</h1>
<ul>
<li id="search"><form action="http://etc.usf.edu/lit2go/search/"><input type="text" name="q" placeholder="Search" value=""></form></li>
</ul>
</header>
<nav id="shell">
<ul>
<li><a href="http://etc.usf.edu/lit2go/authors/" class="">Authors</a></li>
<li><a href="http://etc.usf.edu/lit2go/books/" class="selected">Books</a></li>
<li><a href="http://etc.usf.edu/lit2go/genres/" class="">Genres</a></li>
<li><a href="http://etc.usf.edu/lit2go/collections/" class="">Collections</a></li>
<li><a href="http://etc.usf.edu/lit2go/readability/" class="">Readability</a></li>
</ul>
</nav>
<section id="content">
<div id="contactable"><!-- contactable html placeholder --></div>
<div id="page_content">
<header>
<h2>
<a href="http://etc.usf.edu/lit2go/84/flappers-and-philosophers/">Flappers and Philosophers</a>
</h2>
<h3>
by <a href="http://etc.usf.edu/lit2go/authors/176/f-scott-fitzgerald/">F. Scott Fitzgerald</a>
</h3>
<h4>
The Offshore Pirate </h4>
</header>
<div id="default">
<details open>
<summary>
Additional Information
</summary>
<div id="columns">
<ul>
<li>
<strong>Year Published:</strong>
1920 </li>
<li>
<strong>Language:</strong>
English </li>
<li>
<strong>Country of Origin:</strong>
United States of America </li>
<li>
<strong>Source:</strong>
Fitzgerald, S. (1920). <em>Flappers and Philosophers.</em> New York, NY: Doubleday, Page & Company. </li>
</ul>
</div>
<div id="columns">
<ul>
<li>
<strong>Readability:</strong>
<ul>
<li>
Flesch–Kincaid Level:
<a href="http://etc.usf.edu/lit2go/readability/flesch_kincaid_grade_level/6/" title="Flesch–Kincaid Grade Level 6.8">6.8</a>
</li>
</ul>
</li>
<li>
<strong>Word Count:</strong>
12,162 </li>
</ul>
</div>
<div id="columns">
<ul>
<li>
<strong>Genre:</strong>
<a href="http://etc.usf.edu/lit2go/genres/26/realism/">Realism</a>
</li>
<li>
<strong>Keywords:</strong>
fiction, short story </li>
<li>
<a class="btn" data-toggle="modal" href="#cite_this" >✎ Cite This</a>
</li>
<li>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a addthis:ui_delay="500" href="http://www.addthis.com/bookmark.php?v=250&pub=roywinkelman" class="addthis_button_compact">Share</a>
<span class="addthis_separator">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
</div>
<script type="text/javascript">$($.getScript("http://s7.addthis.com/js/250/addthis_widget.js?pub=roywinkelman"))</script>
<!-- <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=roywinkelman"></script> -->
<!-- AddThis Button END -->
</li>
</ul>
</div>
<h4>Downloads</h4>
<ul id="downloads">
<li>
<a href="http://etc.usf.edu/lit2go/audio/mp3/flappers-and-philosophers-001-the-offshore-pirate.1405.mp3">Audio</a>
</li>
</ul>
<hr>
</details>
<div class="modal hide" id="cite_this">
<script>
$($('#myTab a').click(function (e) {e.preventDefault();$('#myTab a[href="#apa"]').tab('show');}));
</script>
<nav>
<ul id="myTab">
<li class="active">
<a href="#apa" data-toggle="tab">APA</a>
</li>
<li>
<a href="#mla" data-toggle="tab">MLA</a>
</li>
<li>
<a href="#chicago" data-toggle="tab">Chicago</a>
</li>
</ul>
</nav>
<div class="tab-content">
<div class="content tab-pane hide active" id="apa">
<p class="citation">
Fitzgerald, F. (1920). The Offshore Pirate. <em>Flappers and Philosophers</em> (Lit2Go Edition). Retrieved February 15, 2016, from <span class="faux_link">http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/</span>
</p>
</div>
<div class="content tab-pane" id="mla">
<p class="citation">
Fitzgerald, F. Scott. "The Offshore Pirate." <em>Flappers and Philosophers</em>. Lit2Go Edition. 1920. Web. <<span class="faux_link">http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/</span>>. February 15, 2016.
</p>
</div>
<div class="content tab-pane" id="chicago">
<p class="citation">
F. Scott Fitzgerald, "The Offshore Pirate," <em>Flappers and Philosophers</em>, Lit2Go Edition, (1920), accessed February 15, 2016, <span class="faux_link">http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/</span>.
</p>
</div>
</div>
</div>
<span class="top"> <nav class="passage">
<ul>
<li><a href="http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1406/the-ice-palace/" title="The Ice Palace" class="next">Next</a></li>
</ul>
</nav>
</span>
<div id="shrink_wrap">
<div id="i_apologize_for_the_soup">
<audio controls style="width:99%;">
<source src="http://etc.usf.edu/lit2go/audio/mp3/flappers-and-philosophers-001-the-offshore-pirate.1405.mp3" type="audio/mpeg" />
<source src="http://etc.usf.edu/lit2go/audio/ogg/flappers-and-philosophers-001-the-offshore-pirate.1405.ogg" type="audio/ogg" />
The embedded audio player requires a modern internet browser. You should visit <a href="http://browsehappy.com/">Browse Happy</a> and update your internet browser today!
</audio>
<p>
I<br />
This unlikely story begins on a sea that was a blue dream, as colorful as blue–silk stockings, and beneath a sky as blue as the irises of children's eyes. From the western half of the sky the sun was shying little golden disks at the sea—if you gazed intently enough you could see them skip from wave tip to wave tip until they joined a broad collar of golden coin that was collecting half a mile out and would eventually be a dazzling sunset. About half–way between the Florida shore and the golden collar a white steam–yacht, very young and graceful, was riding at anchor and under a blue–and–white awning aft a yellow–haired girl reclined in a wicker settee reading The Revolt of the Angels, by Anatole France.</p>
<p>
She was about nineteen, slender and supple, with a spoiled alluring mouth and quick gray eyes full of a radiant curiosity. Her feet, stockingless, and adorned rather than clad in blue–satin slippers which swung nonchalantly from her toes, were perched on the arm of a settee adjoining the one she occupied. And as she read she intermittently regaled herself by a faint application to her tongue of a half–lemon that she held in her hand. The other half, sucked dry, lay on the deck at her feet and rocked very gently to and fro at the almost imperceptible motion of the tide.</p>
<p>
The second half–lemon was well–nigh pulpless and the golden collar had grown astonishing in width, when suddenly the drowsy silence which enveloped the yacht was broken by the sound of heavy footsteps and an elderly man topped with orderly gray hair and clad in a white–flannel suit appeared at the head of the companionway. There he paused for a moment until his eyes became accustomed to the sun, and then seeing the girl under the awning he uttered a long even grunt of disapproval.</p>
<p>
If he had intended thereby to obtain a rise of any sort he was doomed to disappointment. The girl calmly turned over two pages, turned back one, raised the lemon mechanically to tasting distance, and then very faintly but quite unmistakably yawned.</p>
<p>
"Ardita!" said the gray–haired man sternly.</p>
<p>
Ardita uttered a small sound indicating nothing.</p>
<p>
"Ardita!" he repeated. "Ardita!"</p>
<p>
Ardita raised the lemon languidly, allowing three words to slip out before it reached her tongue.</p>
<p>
"Oh, shut up."</p>
<p>
"Ardita!"</p>
<p>
"What?"</p>
<p>
Will you listen to me—or will I have to get a servant to hold you while I talk to you?"</p>
<p>
The lemon descended very slowly and scornfully.</p>
<p>
"Put it in writing."</p>
<p>
"Will you have the decency to close that abominable book and discard that damn lemon for two minutes?"</p>
<p>
"Oh, can't you lemme alone for a second?"</p>
<p>
"Ardita, I have just received a telephone message from the shore—"</p>
<p>
"Telephone?" She showed for the first time a faint interest.</p>
<p>
"Yes, it was—"</p>
<p>
"Do you mean to say," she interrupted wonderingly, "'at they let you run a wire out here?"</p>
<p>
"Yes, and just now—"</p>
<p>
"Won't other boats bump into it?"</p>
<p>
"No. It's run along the bottom. Five min—"</p>
<p>
"Well, I'll be darned! Gosh! Science is golden or something—isn't it?"</p>
<p>
"Will you let me say what I started to?"</p>
<p>
"Shoot!"</p>
<p>
"Well it seems—well, I am up here—" He paused and swallowed several times distractedly. "Oh, yes. Young woman, Colonel Moreland has called up again to ask me to be sure to bring you in to dinner. His son Toby has come all the way from New York to meet you and he's invited several other young people. For the last time, will you—"</p>
<p>
"No" said Ardita shortly, "I won't. I came along on this darn cruise with the one idea of going to Palm Beach, and you knew it, and I absolutely refuse to meet any darn old colonel or any darn young Toby or any darn old young people or to set foot in any other darn old town in this crazy state. So you either take me to Palm Beach or eke shut up and go away."</p>
<p>
"Very well. This is the last straw. In your infatuation for this man.—a man who is notorious for his excesses—a man your father would not have allowed to so much as mention your name—you have rejected the demi–monde rather than the circles in which you have presumably grown up. From now on—"</p>
<p>
"I know" interrupted Ardita ironically, "from now on you go your way and I go mine. I've heard that story before. You know I'd like nothing better."</p>
<p>
"From now on," he announced grandiloquently, "you are no niece of mine. I—"</p>
<p>
"O–o–o–oh!" The cry was wrung from Ardita with the agony of a lost soul. "Will you stop boring me! Will you go 'way! Will you jump overboard and drown! Do you want me to throw this book at you!"</p>
<p>
"If you dare do any—"</p>
<p>
Smack! The Revolt of the Angels sailed through the air, missed its target by the length of a short nose, and bumped cheerfully down the companionway.</p>
<p>
The gray–haired man made an instinctive step backward and then two cautious steps forward. Ardita jumped to her five feet four and stared at him defiantly, her gray eyes blazing.</p>
<p>
"Keep off!"</p>
<p>
"How dare you!" he cried.</p>
<p>
"Because I darn please!"</p>
<p>
"You've grown unbearable! Your disposition—"</p>
<p>
"You've made me that way! No child ever has a bad disposition unless it's her fancy's fault! Whatever I am, you did it."</p>
<p>
Muttering something under his breath her uncle turned and, walking forward called in a loud voice for the launch. Then he returned to the awning, where Ardita had again seated herself and resumed her attention to the lemon.</p>
<p>
"I am going ashore," he said slowly. "I will be out again at nine o'clock to–night. When I return we start back to New York, wither I shall turn you over to your aunt for the rest of your natural, or rather unnatural, life." He paused and looked at her, and then all at once something in the utter childness of her beauty seemed to puncture his anger like an inflated tire, and render him helpless, uncertain, utterly fatuous.</p>
<p>
"Ardita," he said not unkindly, "I'm no fool. I've been round. I know men. And, child, confirmed libertines don't reform until they're tired—and then they're not themselves—they're husks of themselves." He looked at her as if expecting agreement, but receiving no sight or sound of it he continued. "Perhaps the man loves you—that's possible. He's loved many women and he'll love many more. Less than a month ago, one month, Ardita, he was involved in a notorious affair with that red–haired woman, Mimi Merril; promised to give her the diamond bracelet that the Czar of Russia gave his mother. You know—you read the papers."</p>
<p>
"Thrilling scandals by an anxious uncle," yawned Ardita. "Have it filmed. Wicked clubman making eyes at virtuous flapper. Virtuous flapper conclusively vamped by his lurid past. Plans to meet him at Palm Beach. Foiled by anxious uncle."</p>
<p>
"Will you tell me why the devil you want to marry him?"</p>
<p>
"I'm sure I couldn't say," said Audits shortly. "Maybe because he's the only man I know, good or bad, who has an imagination and the courage of his convictions. Maybe it's to get away from the young fools that spend their vacuous hours pursuing me around the country. But as for the famous Russian bracelet, you can set your mind at rest on that score. He's going to give it to me at Palm Beach—if you'll show a little intelligence."</p>
<p>
"How about the—red–haired woman?"</p>
<p>
"He hasn't seen her for six months," she said angrily. "Don't you suppose I have enough pride to see to that? Don't you know by this time that I can do any darn thing with any darn man I want to?"</p>
<p>
She put her chin in the air like the statue of France Aroused, and then spoiled the pose somewhat by raising the lemon for action.</p>
<p>
"Is it the Russian bracelet that fascinates you?"</p>
<p>
"No, I'm merely trying to give you the sort of argument that would appeal to your intelligence. And I wish you'd go 'way," she said, her temper rising again. "You know I never change my mind. You've been boring me for three days until I'm about to go crazy. I won't go ashore! Won't! Do you hear? Won't!"</p>
<p>
"Very well," he said, "and you won't go to Palm Beach either. Of all the selfish, spoiled, uncontrolled disagreeable, impossible girl I have—"</p>
<p>
Splush! The half–lemon caught him in the neck. Simultaneously came a hail from over the side.</p>
<p>
"The launch is ready, Mr. Farnam."</p>
<p>
Too full of words and rage to speak, Mr. Farnam cast one utterly condemning glance at his niece and, turning, ran swiftly down the ladder.</p>
<p>
II<br />
Five o'clock robed down from the sun and plumped soundlessly into the sea. The golden collar widened into a glittering island; and a faint breeze that had been playing with the edges of the awning and swaying one of the dangling blue slippers became suddenly freighted with song. It was a chorus of men in close harmony and in perfect rhythm to an accompanying sound of oars dealing the blue writers. Ardita lifted her head and listened.</p>
<p>
"Carrots and Peas,<br />
Beans on their knees,<br />
Pigs in the seas,<br />
Lucky fellows!<br />
Blow us a breeze,<br />
Blow us a breeze,<br />
Blow us a breeze,<br />
With your bellows."<br />
Ardita's brow wrinkled in astonishment. Sitting very still she listened eagerly as the chorus took up a second verse.</p>
<p>
"Onions and beans,<br />
Marshalls and Deans,<br />
Goldbergs and Greens<br />
And Costellos.<br />
Blow us a breeze,<br />
Blow us a breeze,<br />
Blow us a breeze,<br />
With your bellows."<br />
With an exclamation she tossed her book to the desk, where it sprawled at a straddle, and hurried to the rail. Fifty feet away a large rowboat was approaching containing seven men, six of them rowing and one standing up in the stern keeping time to their song with an orchestra leader's baton.</p>
<p>
"Oysters and Rocks,<br />
Sawdust and socks,<br />
Who could make clocks<br />
Out of cellos?—"<br />
The leader's eyes suddenly rested on Ardita, who was leaning over the rail spellbound with curiosity. He made a quick movement with his baton and the singing instantly ceased. She saw that he was the only white man in the boat—the six rowers were negroes.</p>
<p>
"Narcissus ahoy!" he called politely.</p>
<p>
What's the idea of all the discord?" demanded Ardita cheerfully. "Is this the varsity crew from the county nut farm?"</p>
<p>
By this time the boat was scraping the side of the yacht and a great bulking negro in the bow turned round and grasped the ladder. Thereupon the leader left his position in the stern and before Ardita had realized his intention he ran up the ladder and stood breathless before her on the deck.</p>
<p>
"The women and children will be spared!" he said briskly. "All crying babies will be immediately drowned and all males put in double irons!" Digging her hands excitedly down into the pockets of her dress Ardita stared at him, speechless with astonishment. He was a young man with a scornful mouth and the bright blue eyes of a healthy baby set in a dark sensitive face. His hair was pitch black, damp and curly—the hair of a Grecian statue gone brunette. He was trimly built, trimly dressed, and graceful as an agile quarter–back.</p>
<p>
"Well, I'll be a son of a gun!" she said dazedly.</p>
<p>
They eyed each other coolly.</p>
<p>
"Do you surrender the ship?"</p>
<p>
"Is this an outburst of wit? " demanded Ardita. "Are you an idiot—or just being initiated to some fraternity?"</p>
<p>
"I asked you if you surrendered the ship."</p>
<p>
"I thought the country was dry," said Ardita disdainfully. "Have you been drinking finger–nail enamel? You better get off this yacht!"</p>
<p>
"What?" the young man's voice expressed incredulity.</p>
<p>
"Get off the yacht! You heard me!"</p>
<p>
He looked at her for a moment as if considering what she had said.</p>
<p>
"No" said his scornful mouth slowly; "No, I won't get off the yacht. You can get off if you wish."</p>
<p>
Going to the rail be gave a curt command and immediately the crew of the rowboat scrambled up the ladder and ranged themselves in line before him, a coal–black and burly darky at one end and a miniature mulatto of four feet nine at to other. They seemed to be uniformly dressed in some sort of blue costume ornamented with dust, mud, and tatters; over the shoulder of each was slung a small, heavy–looking white sack, and under their arms they carried large black cases apparently containing musical instruments.</p>
<p>
"'Ten–shun!" commanded the young man, snapping his own heels together crisply. "Right driss! Front! Step out here, Babe!"</p>
<p>
The smallest negro teak a quick step forward and saluted.</p>
<p>
"Take command, go down below, catch the crew and tie 'em up—all except the engineer. Bring him up to me. Oh, and pile those bags by the rail there."</p>
<p>
"Yas–suh!"</p>
<p>
Babe saluted again and wheeling abut motioned for the five others to gather about him. Then after a short whispered consultation they all filed noiselessly down the companionway.</p>
<p>
"Now," said the young man cheerfully to Ardita, who had witnessed this last scene in withering silence, "if you will swear on your honor as a flapper—which probably isn't worth much—that you'll keep that spoiled little mouth of yours tight shut for forty–eight hours, you can row yourself ashore in our rowboat."</p>
<p>
"Otherwise what?"</p>
<p>
"Otherwise you're going to sea in a ship."</p>
<p>
With a little sigh as for a crisis well passed, the young man sank into the settee Ardita had lately vacated and stretched his arms lazily. The corners of his mouth relaxed appreciatively as he looked round at the rich striped awning, the polished brass, and the luxurious fittings of the deck. His eye felt on the book, and then on the exhausted lemon.</p>
<p>
"Hm," he said, "Stonewall Jackson claimed that lemon–juice cleared his head. Your head feel pretty clear?" Ardita disdained to answer.</p>
<p>
"Because inside of five minutes you'll have to make a clear decision whether it's go or stay."</p>
<p>
He picked up the book and opened it curiously.</p>
<p>
"The Revolt of the Angels. Sounds pretty good. French, eh?" He stared at her with new interest "You French?"</p>
<p>
"No."</p>
<p>
"What's your name?"</p>
<p>
"Farnam."</p>
<p>
"Farnam what?"</p>
<p>
"Ardita Farnam."</p>
<p>
"Well Ardita, no use standing up there and chewing out the insides of your mouth. You ought to break those nervous habits while you're young. Come over here and sit down."</p>
<p>
Ardita took a carved jade case from her pocket, extracted a cigarette and lit it with a conscious coolness, though she knew her hand was trembling a little; then she crossed over with her supple, swinging walk, and sitting down in the other settee blew a mouthful of smoke at the awning.</p>
<p>
"You can't get me off this yacht," she raid steadily; "and you haven't got very much sense if you think you'll get far with it. My uncle'll have wirelesses zigzagging all over this ocean by half past six."</p>
<p>
"Hm."</p>
<p>
She looked quickly at his face, caught anxiety stamped there plainly in the faintest depression of the mouth's corners.</p>
<p>
"It's all the same to me," she said, shrugging her shoulders. "'Tisn't my yacht. I don't mind going for a coupla hours' cruise. I'll eve lend you that book so you'll have something to read on the revenue boat that takes you up to Sing–Sing."</p>
<p>
He laughed scornfully.</p>
<p>
"If that's advice you needn't bother. This is part of a plan arranged before I ever knew this yacht existed. If it hadn't been this one it'd have been the next one we passed anchored along the coast."</p>
<p>
"Who are you?" demanded Ardita suddenly. "And what are you?"</p>
<p>
"You've decided not to go ashore?"</p>
<p>
"I never even faintly considered it."</p>
<p>
"We're generally known," he said "all seven of us, as Curtis Carlyle and his Six Black Buddies late of the Winter Garden and the Midnight Frolic."</p>
<p>
"You're singers?"</p>
<p>
"We were until to–day. At present, due to those white bags you see there we're fugitives from justice and if the reward offered for our capture hasn't by this time reached twenty thousand dollars I miss my guess."</p>
<p>
"What's in the bags?" asked Ardita curiously.</p>
<p>
"Well," he said "for the present we'll call it—mud—Florida mud."</p>
<p>
III<br />
Within ten minutes after Curtis Carlyle's interview with a very frightened engineer the yacht Narcissus was under way, steaming south through a balmy tropical twilight. The little mulatto, Babe, who seems to have Carlyle's implicit confidence, took full command of the situation. Mr. Farnam's valet and the chef, the only members of the crew on board except the engineer, having shown fight, were now reconsidering, strapped securely to their bunks below. Trombone Mose, the biggest negro, was set busy with a can of paint obliterating the name Narcissus from the bow, and substituting the name Hula Hula, and the others congregated aft and became intently involved in a game of craps.</p>
<p>
Having given order for a meal to be prepared and served on deck at seven–thirty, Carlyle rejoined Ardita, and, sinking back into his settee, half closed his eyes and fell into a state of profound abstraction.</p>
<p>
Ardita scrutinized him carefully—and classed him immedialely as a romantic figure. He gave the effect of towering self–confidence erected on a slight foundation—just under the surface of each of his decisions she discerned a hesitancy that was in decided contrast to the arrogant curl of his lips.</p>
<p>
"He's not like me," she thought "There's a difference somewhere."</p>
<p>
Being a supreme egotist Ardita frequently thought about herself; never having had her egotism disputed she did it entirely naturally and with no detraction from her unquestioned charm. Though she was nineteen she gave the effect of a high–spirited precocious child, and in the present glow of her youth and beauty all the men and women she had known were but driftwood on the ripples of her temperament. She had met other egotists—in fact she found that selfish people bored her rather less than unselfish people—but as yet there had not been one she had not eventually defeated and brought to her feet.</p>
<p>
But though she recognized an egotist in the settee, she felt none of that usual shutting of doors in her mind which meant clearing ship for action; on the contrary her instinct told her that this man was somehow completely pregnable and quite defenseless. When Ardita defied convention—and of late it had been her chief amusement—it was from an intense desire to be herself, and she felt that this man, on the contrary, was preoccupied with his own defiance.</p>
<p>
She was much more interested in him than she was in her own situation, which affected her as the prospect of a matine� might affect a ten–year–old child. She had implicit confidence in her ability to take care of herself under any and all circumstances.</p>
<p>
The night deepened. A pale new moon smiled misty–eyed upon the sea, and as the shore faded dimly out and dark clouds were blown like leaves along the far horizon a great haze of moonshine suddenly bathed the yacht and spread an avenue of glittering mail in her swift path. From time to time there was the bright flare of a match as one of them lighted a cigarette, but except for the low under–tone of the throbbing engines and the even wash of the waves about the stern the yacht was quiet as a dream boat star–bound through the heavens. Round them bowed the smell of the night sea, bringing with it an infinite languor.</p>
<p>
Carlyle broke the silence at last.</p>
<p>
"Lucky girl," he sighed "I've always wanted to be rich—and buy all this beauty."</p>
<p>
Ardita yawned.</p>
<p>
"I'd rather be you," she said frankly.</p>
<p>
"You would—for about a day. But you do seem to possess a lot of nerve for a flapper."</p>
<p>
"I wish you wouldn't call an that"</p>
<p>
"Beg your pardon."</p>
<p>
"As to nerve," she continued slowly, "it's my one redeemiug feature. I'm not afraid of anything in heaven or earth."</p>
<p>
"Hm, I am."</p>
<p>
"To be afraid," said Ardita, "a person has either to be very great and strong—or else a coward. I'm neither." She paused for a moment, and eagerness crept into her tone. "But I want to talk about you. What on earth have you done—and how did you do it?"</p>
<p>
"Why?" he demanded cynically. "Going to write a movie, about me?"</p>
<p>
"Go on," she urged. "Lie to me by the moonlight. Do a fabulous story."</p>
<p>
A negro appeared, switched on a string of small lights under the awning, and began setting the wicker table for supper. And while they ate cold sliced chicken, salad, artichokes and strawberry jam from the plentiful larder below, Carlyle began to talk, hesitatingly at first, but eagerly as he saw she was interested. Ardita scarcely touched her food as she watched his dark young face—handome, ironic faintly ineffectual.</p>
<p>
He began life as a poor kid in a Tennessee town, he said, so poor that his people were the only white family in their street. He never remembered any white children—but there were inevitably a dozen pickaninnies streaming in his trail, passionate admirers whom he kept in tow by the vividness of his imagination and the amount of trouble he was always getting them in and out of. And it seemed that this association diverted a rather unusual musical gift into a strange channel.</p>
<p>
There had been a colored woman named Belle Pope Calhoun who played the piano at parties given for white children—nice white children that would have passed Curtis Carlyle with a sniff. But the ragged little "poh white" used to sit beside her piano by the hour and try to get in an alto with one of those kazoos that boys hum through. Before he was thirteen he was picking up a living teasing ragtime out of a battered violin in little caf�s round Nashville. Eight years later the ragtime craze hit the country, and he took six darkies on the Orpheum circuit. Five of them were boys he had grown up with; the other was the little mulatto, Babe Divine, who was a wharf nigger round New York, and long before that a plantation hand in Bermuda, until he stuck an eight–inch stiletto in his master's back. Almost before Carlyle realized his good fortune he was on Broadway, with offers of engagements on all sides, and more money than he had ever dreamed of.</p>
<p>
It was about then that a change began in his whole attitude, a rather curious, embittering change. It was when he realized that he was spending the golden years of his life gibbering round a stage with a lot of black men. His act was good of its kind—three trombones, three saxaphones, and Carlyle's flute—and it was his own peculiar sense of rhythm that made all the difference; but he began to grow strangely sensitive about it, began to hate the thought of appearing, dreaded it from day to day.</p>
<p>
They were making money—each contract he signed called for more—but when he went to managers and told them that he wanted to separate from his sextet and go on as a regular pianist, they laughed at him aud told him he was crazy—it would he an artistic suicide. He used to laugh afterward at the phrase "artistic suicide." They all used it.</p>
<p>
Half a dozen times they played at private dances at three thousand dollars a night, and it seemed as if these crystallized all his distaste for his mode of livlihood. They took place in clubs and houses that he couldn't have gone into in the daytime After all, he was merely playing to r�le of the eternal monkey, a sort of sublimated chorus man. He was sick of the very smell of the theatre, of powder and rouge and the chatter of the greenroom, and the patronizing approval of the boxes. He couldn't put his heart into it any more. The idea of a slow approach to the 1uxury of 1iesure drove him wild. He was, of course, progressing toward it, but, like a child, eating his ice–cream so slowly that he couldn't taste it at all.</p>
<p>
He wanted to have a lot of money and time and opportunity to read and play, and the sort of men and women round him that he could never have—the kind who, if they thought of him at all, would have considered him rather contemptible; in short he wanted all those things which he was beginning to lump under the general head of aristocracy, an aristocracy which it seemed almost any money could buy except money made as he was making it. He was twenty–five then, without family or education or any promise that he would succeed in a business career. He began speculating wildly, and within three weeks he had lost every cent he had saved.</p>
<p>
Then the war came. He went to Plattsburg, and even there his profession followed him. A brigadier–general called him up to headquarters and told him he could serve his country better as a band leader—so he spent the war entertaining celebrities behind the line with a headquarters band. It was not so bad—except that when the infantry came limping back from the trenches he wanted to be one of them. The sweat and mud they wore seemed only one of those ineffable symbols of aristocracy that were forever eluding him.</p>
<p>
"It was the private dances that did it. After I came back from the war the old routine started. We had an offer from a syndicate of Florida hotels. It was only a question of time then."</p>
<p>
He broke off and Ardita looked at him expectantly, but he shook his head.</p>
<p>
"No," he said, "I'm going to tell you about it. I'm enjoying it too much, and I'm afraid I'd lose a little of that enjoyment if I shared it with anyone else. I want to hang on to those few breathless, heroic moments when I stood out before them all and let them know I was more than a damn bobbing, squawking clown."</p>
<p>
From up forward came suddenly the low sound of singing. The negroes had gathered together on the deck and their voices rose together in a haunting melody that soared in poignant harmonics toward the moon. And Ardita listens in enchantment.</p>
<p>
"Oh down—<br />
oh down,<br />
Mammy wanna take me down milky way,<br />
Oh down,<br />
oh down,<br />
Pappy say to–morra–a–a–ah<br />
But mammy say to–day,<br />
Yes—mammy say to–day!"<br />
Carlyle sighed and was silent for a moment looking up at the gathered host of stars blinking like arc–lights in the warm sky. The negroes' song had died away to a plaintive humming and it seemed as if minute by minute the brightness and the great silence were increasing until he could almost hear the midnight toilet of the mermaids as they combed their silver dripping curls under the moon and gossiped to each other of the fine wrecks they lived on the green opalescent avenues below.</p>
<p>
"You see," said Carlyle softly, "this is the beauty I want. Beauty has got to be astonishing, astounding—it's got to burst in on you like a dream, like the exquisite eyes of a girl."</p>
<p>
He turned to her, but she was silent.</p>
<p>
"You see, don't you, Anita—I mean, Ardita?"</p>
<p>
Again she made no answer. She had been sound asleep for some time.</p>
<p>
IV<br />
In the dense sun–flooded noon of next day a spot in the sea before them resolved casually into a green–and–gray islet, apparently composed of a great granite cliff at its northern end which slanted south through a mile of vivid coppice and grass to a sandy beach melting lazily into the surf. When Ardita, reading in her favorite seat, came to the last page of The Revolt of the Angels, and slamming the book shut looked up and saw it, she gave a little cry of delight, and called to Carlyle, who was standing moodily by the rail.</p>
<p>
"Is this it? Is this where you're going?"</p>
<p>
Carlyle shrugged his shoulders carelessly.</p>
<p>
"You've got me." He raised his voice and called up to the acting skipper: "Oh, Babe, is this your island?"</p>
<p>
The mulatto's miniature head appeared from round the corner of the deck–house.</p>
<p>
"Yas–suh! This yeah's it."</p>
<p>
Carlyle joined Ardita.</p>
<p>
"Looks sort of sporting, doesn't it?"</p>
<p>
"Yes," she agreed; "but it doesn't look big enough to be much of a hiding–place.</p>
<p>
"You still putting your faith in those wirelesses your uncle was going to have zigzagging round?"</p>
<p>
"No," said Ardita frankly. "I'm all for you. I'd really like to see you make a get–away."</p>
<p>
He laughed.</p>
<p>
"You're our Lady Luck. Guess we'll have to keep you with us as a mascot—for the present anyway."</p>
<p>
"You couldn't very well ask me to swim back," she said coolly. "If you do I'm going to start writing dime novels founded on that interminable history of your life you gave me last night."</p>
<p>
He flushed and stiffened slightly.</p>
<p>
"I'm very sorry I bored you."</p>
<p>
"Oh, you didn't—until just at the end with some story about how furious you were because you couldn't dance with the ladies you played music for."</p>
<p>
He rose angrily.</p>
<p>
"You have got a darn mean little tongue."</p>
<p>
"Excuse me," she said melting into laughter, "but I'm not used to having men regale me with the story of their life ambitions—especially if they've lived such deathly platonic lives."</p>
<p>
"Why? What do men usually regale you with?"</p>
<p>
"Oh, they talk about me," she yawned. "They tell me I'm the spirit of youth and beauty."</p>
<p>
"What do you tell them?"</p>
<p>
"Oh, I agree quietly."</p>
<p>
"Does every man you meet tall you he loves you?"</p>
<p>
Ardita nodded.</p>
<p>
"Why shouldn't he? All life is just a progression toward, and then a recession from, one phrase—'I love you.'"</p>
<p>
Carlyle laughed and sat down.</p>
<p>
"That's very true. That's—that's not bad. Did you make that up?"</p>
<p>
"Yes—or rather I found it out. It doesn't mean anything especially. It's just clever."</p>
<p>
"It's the sort of remark," he said gravely, "that's typical of your class."</p>
<p>
"Oh," she interrupted impatiently, "don't start that lecture on aristocracy again! I distrust people who can be intense at this hour in the morning. It's a mild form of insanity—a sort of breakfast–food jag. Morning's the time to sleep, swim, and be careless."</p>
<p>
Ten minutes later they had swung round in a wide circle as if to approach the island from the north.</p>
<p>
"There's a trick somewhere," commented Ardita thoughtfully. "He can't mean just to anchor up against this cliff."</p>
<p>
They were heading straight in now toward the solid rock, which must have been well over a hundred feet tall, and not until they were within fifty yards of it did Ardita see their objective. Then she clapped her hands in delight. There was a break in the cliff entirely hidden by a curious overlapping of rock, and through this break the yacht entered and very slowly traversed a narrow channel of crystal–clear water between high gray walls. Then they were riding at anchor in a miniature world of green and gold, a gilded bay smooth as glass and set round with tiny palms, the whole resembling the mirror lakes and twig trees that children set up in sand piles.</p>
<p>
"Not so darned bad!" cried Carlyle excitedly.</p>
<p>
"I guess that little coon knows his way round this corner of the Atlantic."</p>
<p>
His exuberance was contagious, and Ardita became quite jubilant.</p>
<p>
"It's an absolutely sure–fire hiding–place!"</p>
<p>
"Lordy, yes! It's the sort of island you read about."</p>
<p>
The rowboat was lowered into the golden lake and they pulled to shore.</p>
<p>
"Come on," said Carlyle as they landed in the slushy sand, "we'll go exploring."</p>
<p>
The fringe of palms was in turn ringed in by a round mile of flat, sandy country. They followed it south and brushing through a farther rim of tropical vegetation came out on a pearl–gray virgin beach where Ardita kicked of her brown golf shoes—she seemed to have permanently abandoned stockings—and went wading. Then they sauntered back to the yacht, where the indefatigable Babe had luncheon ready for them. He had posted a lookout on the high cliff to the north to watch the sea on both sides, though he doubted if the entrance to the cliff was generally known—he had never even seem a map on which the island was marked.</p>
<p>
"What's its name," asked Ardita—"the island, I mean?"</p>
<p>
"No name 'tall," chuckled Babe. "Reckin she jus' island, 'at's all."</p>
<p>
In the late afternoon they sat with their backs against great boulders on the highest part of the cliff and Carlyle sketched for her his vague plans. He was sure they were hot after him by this time. The total proceeds of the coup he had pulled off and concerning which he still refused to enlighten her, he estimated as just under a million dollars. He counted on lying up here several weeks and then setting off southward, keeping well outside the usual channels of travel rounding the Horn and heading for Callao, in Peru. The details of coaling and provisioning he was leaving entirely to Babe who, it seemed, had sailed these seas in every capacity from cabin–boy aboard a coffee trader to virtual first mate on a Brazillian pirate craft, whose skipper had long since been hung.</p>
<p>
"If he'd been white he'd have been king of South America long ago," said Carlyle emphatically. "When it comes to intelligence he makes Booker T. Washington look like a moron. He's got the guile of every race and nationality whose blood is in his veins, and that's half a dozen or I'm a liar. He worships me because I'm the only man in the world who can play better ragtime than he can. We used to sit together on the wharfs down on the New York water–front, he with a bassoon and me with an oboe, and we'd blend minor keys in African harmonics a thousand years old until the rats would crawl up the posts and sit round groaning and squeaking like dogs will in front of a phonograph."</p>
<p>
Ardita roared.</p>
<p>
"How you can tell 'em!"</p>
<p>
Carlyle grinned.</p>
<p>
"I swear that's the gos—"</p>
<p>
"What you going to do when you get to Callao?" she interrupted.</p>
<p>
"Take ship for India. I want to be a rajah. I mean it. My idea is to go up into Afghanistan somewhere, buy up a palace and a reputation, and then after about five years appear in England with a foreign accent and a mysterious past. But India first. Do you know, they say that all the gold in the world drifts very gradually back to India. Something fascinating about that to me. And I want leisure to read—an immense amount."</p>
<p>
"How about after that?"</p>
<p>
"Then," he answered defiantly, "comes aristocracy. Laugh if you want to—but at least you'll have to admit that I know what I want—which I imagine is more than you do."</p>
<p>
"On the contrary," contradicted Ardita, reaching in her pocket for her cigarette case, "when I met you I was in the midst of a great uproar of all my friends and relatives because I did know what I wanted."</p>
<p>
"What was it?"</p>
<p>
"A man."</p>
<p>
He started.</p>
<p>
"You mean you were engaged?"</p>
<p>
"After a fashion. If you hadn't come aboard I had every intention of slipping ashore yesterday evening—how long ago it seems—and meeting him in Palm Beach. He's waiting there for me with a bracelet that once belonged to Catherine of Russia. Now don't mutter anything about aristocracy," she put in quickly. "I liked him simply because he had had an imagination and the utter courage of his convictions."</p>
<p>
"But your family disapproved, eh?"</p>
<p>
"What there is of it—only a silly uncle and a sillier aunt. It seems he got into some scandal with a red–haired woman name Mimi something—it was frightfully exaggerated, he said, and men don't lie to me—and anyway I didn't care what he'd done; it was the future that counted. And I'd see to that. When a man's in love with me he doesn't care for other amusements. I told him to drop her like a hot cake, and he did."</p>
<p>
"I feel rather jealous," said Carlyle, frowning—and then he laughed. "I guess I'll just keep you along with us until we get to Callao. Then I'll lend you enough money to get back to the States. By that time you'll have had a chance to think that gentleman over a little more."</p>
<p>
"Don't talk to me like that!" fired up Ardita. "I won't tolerate the parental attitude from anybody! Do you understand me?" He chuckled and then stopped, rather abashed, as her cold anger seemed to fold him about and chill him.</p>
<p>
"I'm sorry," he offered uncertainly.</p>
<p>
"Oh, don't apologize! I can't stand men who say 'I'm sorry' in that manly, reserved tone. Just shut up!"</p>
<p>
A pause ensued, a pause which Carlyle found rather awkward, but which Ardita seemed not to notice at all as she sat contentedly enjoying her cigarette and gazing out at the shining sea. After a minute she crawled out on the rock and lay with her face over the edge looking down. Carlyle, watching her, reflected how it seemed impossible for her to assume an ungraceful attitude.</p>
<p>
"Oh, look," she cried. "There's a lot of sort of ledges down there. Wide ones of all different heights."</p>
<p>
"We'll go swimming to–night!" she said excitedly. "By moonlight."</p>
<p>
"Wouldn't you rather go in at the beach on the other end?"</p>
<p>
"Not a chance. I like to dive. You can use my uncle's bathing suit, only it'll fit you like a gunny sack, because he's a very flabby man. I've got a one–piece that's shocked the natives all along the Atlantic coast from Biddeford Pool to St. Augustine."</p>
<p>
"I suppose you're a shark."</p>
<p>
"Yes, I'm pretty good. And I look cute too. A sculptor up at Rye last summer told me my calves are worth five hundred dollars."</p>
<p>
There didn't seem to be any answer to this, so Carlyle was silent, permitting himself only a discreet interior smile.</p>
<p>
V<br />
When the night crept down in shadowy blue and silver they threaded the shimmering channel in the rowboat and, tying it to a jutting rock, began climbing the cliff together. The first shelf was ten feet up, wide, and furnishing a natural diving platform. There they sat down in the bright moonlight and watched the faint incessant surge of the waters almost stilled now as the tide set seaward.</p>
<p>
"Are you happy?" he asked suddenly.</p>
<p>
She nodded.</p>
<p>
"Always happy near the sea. You know," she went on, "I've been thinking all day that you and I are somewhat alike. We're both rebels—only for different reasons. Two years ago, when I was just eighteen and you were—"</p>
<p>
"Twenty–five."</p>
<p>
"—well, we were both conventional successes. I was an utterly devastating d�butante and you were a prosperous musician just commissioned in the army—"</p>
<p>
"Gentleman by act of Congress," he put in ironically.</p>
<p>
"Well, at any rate, we both fitted. If our corners were not rubbed off they were at least pulled in. But deep in us both was something that made us require more for happiness. I didn't know what I wanted. I went from man to man, restless, impatient, month by month getting less acquiescent and more dissatisfied. I used to sit sometimes chewing at the insides of my mouth and thinking I was going crazy—I had a frightful sense of transiency. I wanted things now—now—now! Here I was—beautiful—I am, aren't I?"</p>
<p>
"Yes," agreed Carlyle tentatively.</p>
<p>
Ardita rose suddenly.</p>
<p>
"Wait a second. I want to try this delightful–looking sea."</p>
<p>
She walked to the end of the ledge and shot out over the sea, doubling up in mid–air and then straightening out and entering to water straight as a blade in a perfect jack–knife dive.</p>
<p>
In a minute her voice floated up to him.</p>
<p>
"You see, I used to read all day and most of the night. I began to resent society—"</p>
<p>
"Come on up here," he interrupted. "What on earth are you doing?"</p>
<p>
"Just floating round on my back. I'll be up in a minute Let me tell you. The only thing I enjoyed was shocking people; wearing something quite impossible and quite charming to a fancy–dress party, going round with the fastest men in New York, and getting into some of the most hellish scrapes imaginable."</p>
<p>
The sounds of splashing mingled with her words, and then he heard her hurried breathing as she began climbing up side to the ledge.</p>
<p>
"Go on in!" she called</p>
<p>
Obediently he rose and dived. When he emerged, dripping, and made the climb he found that she was no longer on the 1edge, but after a frightened he heard her light laughter from another she1f ten feet up. There he joined her and they both sat quietly for a moment, their arms clasped round their knees, panting a little from the climb.</p>
<p>
"The family were wild," she said suddenly. "They tried to marry me off. And then when I'd begun to feel that after all life was scarcely worth living I found something"—her eyes went skyward exultantly—"I found something!"</p>
<p>
Carlyle waited and her words came with a rush.</p>
<p>
"Courage—just that; courage as a rule of life, and something to cling to always. I began to build up this enormous faith in myself. I began to see that in all my idols in the past some manifestation of courage had unconsciously been the thing that attracted me. I began separating courage from the other things of life. All sorts of courage—the beaten, bloody prize–fighter coming up for more—I used to make men take me to prize–fights; the d�class� woman sailing through a nest of cats and looking at them as if they were mud under her feet; the liking what you like always; the utter disregard for other people's opinions—just to live as I liked always and to die in my own way— Did you bring up the cigarettes?"</p>
<p>
He handed one over and held a match for her gently.</p>
<p>
"Still," Ardita continued, "the men kept gathering—old men and young men, my mental and physical inferiors, most of them, but all intensely desiring to have me—to own this rather magnificent proud tradition I'd built up round me. Do you see?"</p>
<p>
"Sort of. You never were beaten and you never apologized."</p>
<p>
"Never!"</p>
<p>
She sprang to the edge, poised for a moment like a crucified figure against the sky; then describing a dark parabola plunked without a slash between two silver ripples twenty feet below.</p>
<p>
Her voice floated up to him again.</p>
<p>
"And courage to me meant ploughing through that dull gray mist that comes down on life—not only overriding people and circumstances but overriding the bleakness of living. A sort of insistence on the value of life and the worth of transient things."</p>
<p>
She was climbing up now, and at her last words her head, with the damp yellow hair slicked symmetrically back appeared on his level.</p>
<p>
"All very well," objected Carlyle. "You can call it courage, but your courage is really built, after all, on a pride of birth. You were bred to that defiant attitude. On my gray days even courage is one of the things that's gray and lifeless."</p>
<p>
She was sitting near the edge, hugging her knees and gazing abstractedly at the white moon; he was farther back, crammed like a grotesque god into a niche in the rock.</p>
<p>
"I don't want to sound like Pollyanna," she began, "but you haven't grasped me yet. My courage is faith—faith in the eternal resilience of me—that joy'll come back, and hope and spontaneity. And I feel that till it does I've got to keep my lips shut and my chin high, and my eyes wide—not necessarily any silly smiling. Oh, I've been through hell without a whine quite often—and the female hell is deadlier than the male."</p>
<p>
"But supposing," suggested Carlyle" that before joy and hope and all that came back the curtain was drawn on you for good?"</p>
<p>
Ardita rose, and going to the wall climbed with some difficulty to the next ledge, another ten or fifteen feet above.</p>
<p>
"Why," she called back "then I'd have won!"</p>
<p>
He edged out till he could see her.</p>
<p>
"Better not dive from there! You'll break your back," he said quickly.</p>
<p>
She laughed.</p>
<p>
"Not I!"</p>
<p>
Slowly she spread her arms and stood there swan–like, radiating a pride in her young perfection that lit a warm glow in Carlyle's heart.</p>
<p>
"We're going through the black air with our arms wide and our feet straight out behind like a dolphin's tail, and we're going to think we'll never hit the silver down there till suddenly it'll be all warm round us and full of little kissing, caressing waves."</p>
<p>
Then she was in the air, and Carlyle involuntarily held his breath. He had not realized that the dive was nearly forty feet. It seemed an eternity before he heard the swift compact sound as she reached the sea.</p>
<p>
And it was with his glad sigh of relief when her light watery laughter curled up the side of the cliff and into his anxious ears that he knew he loved her.</p>
<p>
VI<br />
Time, having no axe to grind, showered down upon them three days of afternoons. When the sun cleared the port–hole of Ardita's cabin an hour after dawn she rose cheerily, donned her bathing–suit, and went up on deck. The negroes would leave their work when they saw her, and crowd, chuckling and chattering, to the rail as she floated, an agile minnow, on and under the surface of the clear water. Again in the cool of the afternoon she would swim—and loll and smoke with Carlyle upon the cliff; or else they would lie on their sides in the sands of the southern beach, talking little, but watching the day fade colorfully and tragically into the infinite langour of a tropical evening.</p>
<p>
And with the long, sunny hours Ardita's idea of the episode as incidental, madcap, a sprig of romance in a desert of reality, gradually left her. She dreaded the time when he would strike off southward; she dreaded all the eventualities that presented themselves to her; thoughts were suddenly troublesome and decisions odious. Had prayers found place in the pagan rituals of her soul she would have asked of life only to be unmolested for a while, lazily acquiescent to the ready, na�f flow of Carlyle's ideas, his vivid boyish imagination, and the vein of monomania that seemed to run crosswise through his temperament and colored his every action.</p>
<p>
But this is not a story of two on an island, nor concerned primarily with love bred of isolation. It is merely the presentation of two personalities, and its idyllic setting among the palms of the Gulf Stream is quite incidental. Most of us are content to exist and breed and fight for the right to do both, and the dominant idea, the foredoomed attest to control one's destiny, is reserved for the fortunate or unfortunate few. To me the interesting thing about Ardita is the courage that will tarnish with her beauty and youth.</p>
<p>
"Take me with you," she said late one night as they sat lazily in the grass under the shadowy spreading palms. The negroes had brought ashore their musical instruments, and the sound of weird ragtime was drifting softly over on the warm breath of the night. "I'd love to reappear in ten years, as a fabulously wealthy high–caste Indian lady," she continued.</p>
<p>
Carlyle looked at her quickly.</p>
<p>
"You can, you know."</p>
<p>
She laughed.</p>
<p>
"Is it a proposal of marriage? Extra! Ardita Farnam becomes pirate's bride. Society girl kidnapped by ragtime bank robber."</p>
<p>
"It wasn't a bank."</p>
<p>
"What was it? Why won't you tell me?"</p>
<p>
"I don't want to break down your illusions."</p>
<p>
"My dear man, I have no illusions about you."</p>
<p>
"I mean your illusions about yourself."</p>
<p>
She looked up in surprise.</p>
<p>
"About myself! What on earth have I got to do with whatever stray felonies you've committed?"</p>
<p>
"That remains to be seen."</p>
<p>
She reached over and patted his hand.</p>
<p>
"Dear Mr. Curtis Carlyle," she said softly, "are you in love with me?"</p>
<p>
"As if it mattered."</p>
<p>
"But it does—because I think I'm in love with you."</p>
<p>
He looked at her ironically.</p>
<p>
"Thus swelling your January total to half a dozen," he suggested. "Suppose I call your bluff and ask you to come to India with me?"</p>
<p>
"Shall I?"</p>
<p>
He shrugged his shoulders.</p>
<p>
"We can get married in Callao."</p>
<p>
"What sort of life can you offer me? I don't mean that unkindly, but seriously; what would become of me if the people who want that twenty–thousand–dollar reward ever catch up with you?"</p>
<p>
"I thought you weren't afraid."</p>
<p>
"I never am—but I won't throw my life away just to show one man I'm not."</p>
<p>
"I wish you'd been poor. Just a little poor girl dreaming over a fence in a warm cow country."</p>
<p>
"Wouldn't it have been nice?"</p>
<p>
"I'd have enjoyed astonishing you—watching your eyes open on things. If you only wanted things! Don't you see?"</p>
<p>
"I know—like girls who stare into the windows of jewelry–stores."</p>
<p>
"Yes—and want the big oblong watch that's platinum and has diamonds all round the edge. Only you'd decide it was too expensive and choose one of white gold for a hundred dollar. Then I'd say: 'Expensive? I should say not!' And we'd go into the store and pretty soon the platinum one would be gleaming on your wrist."</p>
<p>
"That sounds so nice and vulgar—and fun, doesn't it?" murmured Ardita,</p>
<p>
"Doesn't it? Can't you see us travelling round and spending money right and left, and being worshipped by bell–boys and waiters? Oh, blessed are the simple rich for they inherit the earth!"</p>
<p>
"I honestly wish we were that way."</p>
<p>
"I love you, Ardita," he said gently.</p>
<p>
Her face lost its childish look for moment and became oddly grave.</p>
<p>
"I love to be with you," she said, "more than with any man I've ever met. And I like your looks and your dark old hair, and the way you go over the side of the rail when we come ashore. In fact, Curtis Carlyle, I like all the things you do when you're perfectly natural. I think you've got nerve and you know how I feel about that. Sometimes when you're around I've been tempted to kiss you suddenly and tell you that you were just an idealistic boy with a lot of caste nonsense in his head.</p>
<p>
Perhaps if I were just a little bit older and a little more bored I'd go with you. As it is, I think I'll go back and marry—that other man."</p>
<p>
Over across the silver lake the figures of the negroes writhed and squirmed in the moonlight like acrobats who, having been too long inactive, must go through their tacks from sheer surplus energy. In single file they marched, weaving in concentric circles, now with their heads thrown back, now bent over their instruments like piping fauns. And from trombone and saxaphone ceaselessly whined a blended melody, sometimes riotous and jubilant, sometimes haunting and plaintive as a death–dance from the Congo's heart.</p>
<p>
"Let's dance," cried Ardita. "I can't sit still with that perfect jazz going on."</p>
<p>
Taking her hand he led her out into a broad stretch of hard sandy soil that the moon flooded with great splendor. They floated out like drifting moths under the rich hazy light, and as the fantastic symphony wept and exulted and wavered and despaired Ardita's last sense of reality dropped away, and she abandoned her imagination to the dreamy summer scents of tropical flowers and the infinite starry spaces overhead, feeling that if she opened her eyes it would be to find herself dancing with a ghost in a land created by her own fancy.</p>
<p>
"This is what I should call an exclusive private dance," he whispered.</p>
<p>
"I feel quite mad—but delightfully mad!"</p>
<p>
"We're enchanted. The shades of unnumbered generations of cannibals are watching us from high up on the side of the cliff there."</p>
<p>
"And I'll bet the cannibal women are saying that we dance too close, and that it was immodest of me to come without my nose–ring."</p>
<p>
They both laughed softly—and then their laughter died as over across the lake they heard the trombones stop in the middle of a bar, and the saxaphones give a startled moan and fade out.</p>
<p>
"What's the matter?" called Carlyle.</p>
<p>
After a moment's silence they made out the dark figure of a man rounding the silver lake at a run. As he came closer they saw it was Babe in a state of unusual excitement. He drew up before them and gasped out his news in a breath.</p>
<p>
"Ship stan'in' off sho' 'bout half a mile suh. Mose, he uz on watch, he say look's if she's done ancho'd."</p>
<p>
"A ship—what kind of a ship?" demanded Carlyle anxiously.</p>
<p>
Dismay was in his voice, and Ardita's heart gave a sudden wrench as she saw his whole face suddenly droop.</p>
<p>
"He say he don't know, suh."</p>
<p>
"Are they landing a boat?"</p>
<p>
"No, suh."</p>
<p>
"We'll go up," said Carlyle.</p>
<p>
They ascended the hill in silence, Ardita's lad still resting in Carlyle's as it had when they finished dancing. She felt it clinch nervously from time to time as though he were unaware of the contact, but though he hurt her she made no attempt to remove it. It seemed an hour's climb before they reached the top and crept cautiously across the silhouetted plateau to the edge of the cliff. After one short look Carlyle involuntarily gave a little cry. It was a revenue boat with six–inch guns mounted fore and aft.</p>
<p>
"They know!" he said with a short intake of breath. "They know! They picked up the trail somewhere."</p>
<p>
"Are you sure they know about the channel? They may be only standing by to take a look at the island in the morning. From where they are they couldn't see the opening in the cliff."</p>
<p>
"They could with field–glasses," he said hopelessly. He looked at his wrist–watch. "It's nearly two now. They won't do anything until dawn, that's certain. Of course there's always the faint possibility that they're waiting for some other ship to join; or for a coaler."</p>
<p>
"I suppose we may as well stay right here."</p>
<p>
The hour passed and they lay there side by side, very silently, their chins in their hands like dreaming children. In back of them squatted the negroes, patient, resigned, acquiescent, announcing now and then with sonorous snores that not even the presence of danger could subdue their unconquerable African craving for sleep.</p>
<p>
Just before five o'clock Babe approached Carlyle. There were half a dozen rifles aboard the Narcissus he said. Had it been decided to offer no resistance?</p>
<p>
A pretty good fight might be made, he thought, if they worked out some plan.</p>
<p>
Carlyle laughed and shook his head.</p>
<p>
"That isn't a Spic army out there, Babe. That's a revenue boat. It'd be like a bow and arrow trying to fight a machine–gun. If you want to bury those bags somewhere and take a chance on recovering them later, go on and do it. But it won't work—they'd dig this island over from one end to the other. It's a lost battle all round, Babe."</p>
<p>
Babe inclined his head silently and turned away, and Carlyle's voice was husky as he turned to Ardita.</p>
<p>
"There's the best friend I ever had. He'd die for me, and be proud to, if I'd let him."</p>
<p>
"You've given up?"</p>
<p>
"I've no choice. Of course there's always one way out—the sure way—but that can wait. I wouldn't miss my trial for anything—it'll be an interesting experiment in notoriety. 'Miss Farnam testifies that the pirate's attitude to her was at all times that of a gentleman.'"</p>
<p>
"Don't!" she said. "I'm awfully sorry."</p>
<p>
When the color faded from the sky and lustreless blue changed to leaden gray a commotion was visible on the ship's deck, and they made out a group of officers clad in white duck, gathered near the rail. They had field–glasses in their hands and were attentively examining the islet.</p>
<p>
"It's all up," said Carlyle grimly.</p>
<p>
"Damn," whispered Ardita. She felt tears gathering in her eyes "We'll go back to the yacht," he said. "I prefer that to being hunted out up here like a 'possum."</p>
<p>
Leaving the plateau they descended the hill, and reaching the lake were rowed out to the yacht by the silent negroes. Then, pale and weary, they sank into the settees and waited.</p>
<p>
Half an hour later in the dim gray light the nose of the revenue boat appeared in the channel and stopped, evidently fearing that the bay might be too shallow. From the peaceful look of the yacht, the man and the girl in the settees, and the negroes lounging curiously against the rail, they evidently judged that there would be no resistance, for two boats were lowered casually over the side, one containing an officer and six bluejackets, and the other, four rowers and in the stern two gray–haired men in yachting flannels. Ardita and Carlyle stood up, and half unconsciously started toward each other.</p>
<p>
Then he paused and putting his hand suddenly into his pocket he pulled out a round, glittering object and held it out to her.</p>
<p>
"What is it?" she asked wonderingly.</p>
<p>
"I'm not positive, but I think from the Russian inscription inside that it's your promised bracelet."</p>
<p>
"Where—where on earth—"</p>
<p>
"It came out of one of those bags. You see, Curtis Carlyle and his Six Black Buddies, in the middle of their performance in the tea–room of the hotel at Palm Beach, suddenly changed their instruments for automatics and held up the crowd. I took this bracelet from a pretty, overrouged woman with red hair."</p>
<p>
Ardita frowned and then smiled.</p>
<p>
"So that's what you did! You have got nerve!"</p>
<p>
He bowed.</p>
<p>
"A well–known bourgeois quality," he said.</p>
<p>
And then dawn slanted dynamically across the deck and flung the shadows reeling into gray corners. The dew rose and turned to golden mist, thin as a dream, enveloping them until they seemed gossamer relics of the late night, infinitely transient and already fading. For a moment sea and sky were breathless, and dawn held a pink hand over the young mouth of life—then from out in the lake came the complaint of a rowboat and the swish of oars.</p>
<p>
Suddenly against the golden furnace low in the east their two graceful figures melted into one, and he was kissing her spoiled young mouth.</p>
<p>
"It's a sort of glory," he murmured after a second.</p>
<p>
She smiled up at him.</p>
<p>
"Happy, are you?"</p>
<p>
Her sigh was a benediction—an ecstatic surety that she was youth and beauty now as much as she would ever know. For another instant life was radiant and time a phantom and their strength eternal—then there was a bumping, scraping sound as the rowboat scraped alongside.</p>
<p>
Up the ladder scrambled the two gray–haired men, the officer and two of the sailors with their hands on their revolvers. Mr. Farnam folded his arms and stood looking at his niece.</p>
<p>
"So," he said nodding his head slowly.</p>
<p>
With a sigh her arms unwound from Carlyle's neck, and her eyes, transfigured and far away, fell upon the boarding party. Her uncle saw her upper lip slowly swell into that arrogant pout he knew so well.</p>
<p>
"So," he repeated savagely. "So this is your idea of—of romance. A runaway affair, with a high–seas pirate."</p>
<p>
Ardita glanced at him carelessly.</p>
<p>
"What an old fool you are!" she said quietly.</p>
<p>
"Is that the best you can say for yourself?"</p>
<p>
"No," she said as if considering. "No, there's something else. There's that well–known phrase with which I have ended most of our conversations for the past few years—'Shut up!'"</p>
<p>
And with that she turned, included the two old men, the officer, and the two sailors in a curt glance of contempt, and walked proudly down the companionway.</p>
<p>
But had she waited an instant longer she would have heard a sound from her uncle quite unfamiliar in most of their interviews. He gave vent to a whole–hearted amused chuckle, in which the second old man joined.</p>
<p>
The latter turned briskly to Carlyle, who had been regarding this scene with an air of cryptic amusement.</p>
<p>
"Well Toby," he said genially, "you incurable, hare–brained romantic chaser of rainbows, did you find that she was the person you wanted? Carlyle smiled confidently.</p>
<p>
"Why—naturally," he said "I've been perfectly sure ever since I first heard tell of her wild career. That'd why I had Babe send up the rocket last night."</p>
<p>
"I'm glad you did " said Colonel Moreland gravely. "We've been keeping pretty close to you in case you should have trouble with those six strange niggers. And we hoped we'd find you two in some such compromising position," he sighed. "Well, set a crank to catch a crank!"</p>
<p>
"Your father and I sat up all night hoping for the best—or perhaps it's the worst. Lord knows you're welcome to her, my boy. She's run me crazy. Did you give her the Russian bracelet my detective got from that Mimi woman?"</p>
<p>
Carlyle nodded.</p>
<p>
"Sh!" he said. "She's corning on deck."</p>
<p>
Ardita appeared at the head of the companionway and gave a quick involuntary glance at Carlyle's wrists. A puzzled look passed across deface. Back aft the negroes had begun to sing, and the cool lake, fresh with dawn, echoed serenely to their low voices.</p>
<p>
"Ardita," said Carlyle unsteadily.</p>
<p>
She swayed a step toward him.</p>
<p>
"Ardita," he repeated breathlessly, "I've got to tell you the—the truth. It was all a plant, Ardita. My name isn't Carlyle. It's Moreland, Toby Moreland. The story was invented, Ardita, invented out of thin Florida air."</p>
<p>
She stared at him, bewildered, amazement, disbelief, and anger flowing in quick waves across her face. The three men held their breaths. Moreland, Senior, took a step toward her; Mr. Farnam's mouth dropped a little open as he waited, panic–stricken, for the expected crash.</p>
<p>
But it did not come. Ardita's face became suddenly radiant, and with a little laugh she went swiftly to young Moreland and looked up at him without a trace of wrath in her gray eyes. "Will you swear," she said quietly "That it was entirely a product of your own brain?"</p>
<p>
"I swear," said young Moreland eagerly.</p>
<p>
She drew his head down and kissed him gently.</p>
<p>
"What an imagination!" she said softly and almost enviously. "I want you to lie to me just as sweetly as you know how for the zest of my life."</p>
<p>
The negroes' voices floated drowsily back, mingled in an air that she had heard them singing before.</p>
<p>
"Time is a thief;<br />
Gladness and grief<br />
Cling to the leaf<br />
As it yellows—"<br />
"What was in the bags?" she asked softly.</p>
<p>
"Florida mud," he answered. "That was one of the two true things I told you."</p>
<p>
"Perhaps I can guess the other one," she said; and reaching up on her tiptoes she kissed him softly in the illustration.</p>
</div>
</div>
<span class="bottom"> <nav class="passage">
<ul>
<li><a href="http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1406/the-ice-palace/" title="The Ice Palace" class="next">Next</a></li>
</ul>
</nav>
</span>
</div>
</div>
</section>
<footer screen>
<div id="footer-text">
<p>
This collection of children's literature is a part of the <a href="http://etc.usf.edu/">Educational Technology Clearinghouse</a> and is funded by various <a href="http://etc.usf.edu/lit2go/welcome/funding/">grants</a>.
</p>
<p>
Copyright © 2006—2016 by the <a href="http://fcit.usf.edu/">Florida Center for Instructional Technology</a>, <a href="http://www.coedu.usf.edu/">College of Education</a>, <a href="http://www.usf.edu/">University of South Florida</a>.
</p>
</div>
<ul id="footer-links">
<li><a href="http://etc.usf.edu/lit2go/welcome/license/">License</a></li>
<li><a href="http://etc.usf.edu/lit2go/welcome/credits/">Credits</a></li>
<li><a href="http://etc.usf.edu/lit2go/welcome/faq/">FAQ</a></li>
<li><a href="http://etc.usf.edu/lit2go/giving/">Giving</a></li>
</ul>
</footer>
<footer print>
<div id="footer-text">
<p>This document was downloaded from <a href="http://etc.usf.edu/lit2go/">Lit2Go</a>, a free online collection of stories and poems in Mp3 (audiobook) format published by the <a href="http://fcit.usf.edu/">Florida Center for Instructional Technology</a>. For more information, including classroom activities, readability data, and original sources, please visit <a href="http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/">http://etc.usf.edu/lit2go/84/flappers-and-philosophers/1405/the-offshore-pirate/</a>.</p>
</div>
<div id="book-footer">
<p>Lit2Go: <em>Flappers and Philosophers</em></p>
<p>The Offshore Pirate</p>
</div>
</footer>
<script type="text/javascript" defer src="http://etc.usf.edu/lit2go/js/details.js"></script>
</div>
</body>
</html>
| {
"content_hash": "c4068c32596315444214b30b454c6fdc",
"timestamp": "",
"source": "github",
"line_count": 1039,
"max_line_length": 984,
"avg_line_length": 77.76804619826757,
"alnum_prop": 0.720275739161644,
"repo_name": "adrianosb/maprecude_team_adriano_barbosa_and_andre_matsuda",
"id": "c04fb7af333fafcf80fc32761426089d3758f30a",
"size": "80825",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "HtmlToText/lit2go.ok/84/flappers-and-philosophers/1405/the-offshore-pirate/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "145411809"
},
{
"name": "Java",
"bytes": "6677"
}
],
"symlink_target": ""
} |
package org.apache.isis.applib.services.eventbus;
import org.apache.isis.applib.Identifier;
/**
* @deprecated - use {@link org.apache.isis.applib.services.eventbus.CollectionDomainEvent} instead.
*/
@Deprecated
public abstract class CollectionInteractionEvent<S,T> extends CollectionDomainEvent<S,T> {
//region > Default class
/**
* @deprecated - use {@link org.apache.isis.applib.services.eventbus.CollectionDomainEvent.Default} instead.
*/
@Deprecated
public static class Default extends CollectionDomainEvent.Default {
private static final long serialVersionUID = 1L;
public Default(
final Object source,
final Identifier identifier,
final Of of,
final Object value) {
super(source, identifier, of, value);
}
}
//endregion
//region > constructors
public CollectionInteractionEvent(
final S source,
final Identifier identifier,
final Of of) {
super(source, identifier, of);
}
public CollectionInteractionEvent(
final S source,
final Identifier identifier,
final Of of,
final T value) {
super(source, identifier, of, value);
}
//endregion
} | {
"content_hash": "6ac86ef44544021fd8240fa7f363888c",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 112,
"avg_line_length": 28.434782608695652,
"alnum_prop": 0.6269113149847095,
"repo_name": "kidaa/isis",
"id": "bd78959ed7c81d78d13679a566550798391298bb",
"size": "2133",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "core/applib/src/main/java/org/apache/isis/applib/services/eventbus/CollectionInteractionEvent.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "169367"
},
{
"name": "Cucumber",
"bytes": "8162"
},
{
"name": "Groovy",
"bytes": "28126"
},
{
"name": "HTML",
"bytes": "601255"
},
{
"name": "Java",
"bytes": "18145813"
},
{
"name": "JavaScript",
"bytes": "118425"
},
{
"name": "Shell",
"bytes": "12793"
},
{
"name": "XSLT",
"bytes": "72290"
}
],
"symlink_target": ""
} |
namespace supjson {
template <typename T>
struct type_matcher {
typedef T type;
};
class value {
public:
class null {};
typedef bool boolean;
typedef double number;
typedef std::string string;
typedef std::vector<value> array;
typedef std::map<std::string, value> object;
public:
value(); // by default the value is null
~value();
private:
class string_visitor {
public:
typedef std::string ret_type;
ret_type operator()(null) const;
ret_type operator()(bool) const;
ret_type operator()(double) const;
ret_type operator()(string const&) const;
ret_type operator()(array const&) const;
ret_type operator()(object const&) const;
};
static string_visitor visitor_;
public:
# define DECL_CTOR(T)\
value(T const& t);\
value(T&& t);
DECL_CTOR(null)
DECL_CTOR(array)
DECL_CTOR(string)
DECL_CTOR(object)
value(int i);
value(number d);
value(boolean b);
value(const char* s);
value(value const& v);
value(value&& v);
public:
# define DECL_OP(T)\
value& operator=(T const& t);\
value& operator=(T&& t);
DECL_OP(null)
DECL_OP(array)
DECL_OP(string)
DECL_OP(object)
value& operator=(bool b);
value& operator=(size_t i);
value& operator=(int i);
value& operator=(number d);
value& operator=(const char* s);
value& operator=(value const& v);
value& operator=(value&& v);
operator object&();
operator object const&() const;
operator array&();
operator array const&() const;
public:
static std::string to_string(value const& v);
template <typename T>
static std::string to_string(T const& v)
{
return visitor_(v);
}
public:
template <typename T>
bool isa() const
{
return var_.isa<T>();
}
public:
template <typename T>
T& get()
{
return static_cast<T&>(var_.get<typename type_matcher<T>::type>());
}
template <typename T>
const T& get() const
{
return static_cast<const T&>(var_.get<typename type_matcher<T>::type>());
}
public:
typedef
variant< null, array, object >
t;
public:
t var_;
};
typedef value::object object;
typedef value::boolean boolean;
typedef value::string string;
typedef value::number number;
typedef value::array array;
typedef value::null null;
template <>
struct type_matcher<int> {
typedef number type;
};
template <>
struct type_matcher<float> {
typedef number type;
};
}
#endif
| {
"content_hash": "eebeb69da01b8ea4cd2212bf0359f812",
"timestamp": "",
"source": "github",
"line_count": 134,
"max_line_length": 76,
"avg_line_length": 18.828358208955223,
"alnum_prop": 0.6187078874355926,
"repo_name": "ccharly/supjson",
"id": "ca04252ff6976fb76e1f71e41dcc9fbc45de93ef",
"size": "2799",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/value.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "28212"
},
{
"name": "Makefile",
"bytes": "1742"
}
],
"symlink_target": ""
} |
package io.quarkus.smallrye.health.deployment;
import io.quarkus.builder.item.SimpleBuildItem;
final class SmallRyeHealthBuildItem extends SimpleBuildItem {
private final String healthUiFinalDestination;
private final String healthUiPath;
public SmallRyeHealthBuildItem(String healthUiFinalDestination, String healthUiPath) {
this.healthUiFinalDestination = healthUiFinalDestination;
this.healthUiPath = healthUiPath;
}
public String getHealthUiFinalDestination() {
return healthUiFinalDestination;
}
public String getHealthUiPath() {
return healthUiPath;
}
} | {
"content_hash": "159dcc8531def26e4326ddcf23c59595",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 90,
"avg_line_length": 28.59090909090909,
"alnum_prop": 0.7615262321144675,
"repo_name": "quarkusio/quarkus",
"id": "8764414cadc35d79522202205676aa9086fd07f8",
"size": "629",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "extensions/smallrye-health/deployment/src/main/java/io/quarkus/smallrye/health/deployment/SmallRyeHealthBuildItem.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "23342"
},
{
"name": "Batchfile",
"bytes": "13096"
},
{
"name": "CSS",
"bytes": "6685"
},
{
"name": "Dockerfile",
"bytes": "459"
},
{
"name": "FreeMarker",
"bytes": "8106"
},
{
"name": "Groovy",
"bytes": "16133"
},
{
"name": "HTML",
"bytes": "1418749"
},
{
"name": "Java",
"bytes": "38584810"
},
{
"name": "JavaScript",
"bytes": "90960"
},
{
"name": "Kotlin",
"bytes": "704351"
},
{
"name": "Mustache",
"bytes": "13191"
},
{
"name": "Scala",
"bytes": "9756"
},
{
"name": "Shell",
"bytes": "71729"
}
],
"symlink_target": ""
} |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
goog.module('test_files.export_declare_namespace.user');
var module = module || { id: 'test_files/export_declare_namespace/user.ts' };
module = module;
exports = {};
const tsickle_export_declare_namespace_1 = goog.requireType("test_files.export_declare_namespace.export_declare_namespace");
/** @type {!tsickle_export_declare_namespace_1.exportedDeclaredNamespace.Used} */
let x;
/** @type {!tsickle_export_declare_namespace_1.nested.exportedNamespace.User} */
let y;
| {
"content_hash": "c672b3d303228ea27175e7f2413c66dd",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 133,
"avg_line_length": 49.53846153846154,
"alnum_prop": 0.7701863354037267,
"repo_name": "alexeagle/tsickle",
"id": "f7b47e4b6cc8751b251c63eed5d95c0c2bebbe27",
"size": "644",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test_files/export_declare_namespace/user.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "214209"
},
{
"name": "Python",
"bytes": "6415"
},
{
"name": "TypeScript",
"bytes": "420618"
}
],
"symlink_target": ""
} |
package local.org.apache.http.protocol;
import java.nio.charset.Charset;
import org.apache.http.Consts;
/**
* Constants and static helpers related to the HTTP protocol.
*
* @since 4.0
*/
public final class HTTP {
public static final int CR = 13; // <US-ASCII CR, carriage return (13)>
public static final int LF = 10; // <US-ASCII LF, linefeed (10)>
public static final int SP = 32; // <US-ASCII SP, space (32)>
public static final int HT = 9; // <US-ASCII HT, horizontal-tab (9)>
/** HTTP header definitions */
public static final String TRANSFER_ENCODING = "Transfer-Encoding";
public static final String CONTENT_LEN = "Content-Length";
public static final String CONTENT_TYPE = "Content-Type";
public static final String CONTENT_ENCODING = "Content-Encoding";
public static final String EXPECT_DIRECTIVE = "Expect";
public static final String CONN_DIRECTIVE = "Connection";
public static final String TARGET_HOST = "Host";
public static final String USER_AGENT = "User-Agent";
public static final String DATE_HEADER = "Date";
public static final String SERVER_HEADER = "Server";
/** HTTP expectations */
public static final String EXPECT_CONTINUE = "100-continue";
/** HTTP connection control */
public static final String CONN_CLOSE = "Close";
public static final String CONN_KEEP_ALIVE = "Keep-Alive";
/** Transfer encoding definitions */
public static final String CHUNK_CODING = "chunked";
public static final String IDENTITY_CODING = "identity";
public static final Charset DEF_CONTENT_CHARSET = Consts.ISO_8859_1;
public static final Charset DEF_PROTOCOL_CHARSET = Consts.ASCII;
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String UTF_8 = "UTF-8";
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String UTF_16 = "UTF-16";
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String US_ASCII = "US-ASCII";
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String ASCII = "ASCII";
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String ISO_8859_1 = "ISO-8859-1";
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String DEFAULT_CONTENT_CHARSET = ISO_8859_1;
/**
* @deprecated (4.2)
*/
@Deprecated
public static final String DEFAULT_PROTOCOL_CHARSET = US_ASCII;
/**
* @deprecated (4.2)
*/
@Deprecated
public final static String OCTET_STREAM_TYPE = "application/octet-stream";
/**
* @deprecated (4.2)
*/
@Deprecated
public final static String PLAIN_TEXT_TYPE = "text/plain";
/**
* @deprecated (4.2)
*/
@Deprecated
public final static String CHARSET_PARAM = "; charset=";
/**
* @deprecated (4.2)
*/
@Deprecated
public final static String DEFAULT_CONTENT_TYPE = OCTET_STREAM_TYPE;
public static boolean isWhitespace(char ch) {
return ch == SP || ch == HT || ch == CR || ch == LF;
}
private HTTP() {
}
}
| {
"content_hash": "9a2046c76c8920593a5e6c8e8a0a9511",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 78,
"avg_line_length": 28.7,
"alnum_prop": 0.6287614824200191,
"repo_name": "Phoenix1708/t2-server-jar-android-0.1",
"id": "7eccc7918d6624fadffcb5422bdcb57009bfba74",
"size": "4340",
"binary": false,
"copies": "2",
"ref": "refs/heads/hyde",
"path": "src/main/java/local/org/apache/http/protocol/HTTP.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Java",
"bytes": "1039129"
}
],
"symlink_target": ""
} |
#include "condor_common.h"
#include "condor_config.h"
#include "stat_wrapper.h"
StatWrapperIntBase::StatWrapperIntBase( const StatWrapperIntBase &other )
{
other.GetAccess( m_access );
m_name = other.GetFnName( );
m_valid = other.IsValid( );
m_rc = other.GetRc( );
m_errno = other.GetErrno( );
m_buf_valid = other.m_buf_valid;
}
StatWrapperIntBase::StatWrapperIntBase( const char *name )
{
m_name = name;
m_valid = false;
m_buf_valid = false;
m_rc = 0;
m_errno = 0;
}
int
StatWrapperIntBase::CheckResult( void )
{
if ( 0 == m_rc ) {
m_buf_valid = true;
m_errno = 0;
}
else {
m_errno = errno;
m_buf_valid = false;
}
return m_rc;
}
//
// StatWrapper internal -- Path Version
//
// Basic constructor
StatWrapperIntPath::StatWrapperIntPath(
const char *name,
int (* const fn)(const char *, StatStructType *) )
: StatWrapperIntBase( name ), m_fn( fn ), m_path( NULL )
{
// Do nothing
}
// Copy constructor
StatWrapperIntPath::StatWrapperIntPath( const StatWrapperIntPath &other )
: StatWrapperIntBase( other ), m_fn( other.GetFn() )
{
SetPath( other.GetPath() );
}
// Destructor
StatWrapperIntPath::~StatWrapperIntPath( void )
{
if ( m_path ) {
free( const_cast<char*>(m_path) );
m_path = NULL;
}
}
bool
StatWrapperIntPath::SetPath( const char *path )
{
if ( m_path && strcmp( path, m_path ) ) {
free( const_cast<char*>(m_path) );
m_path = NULL;
}
if ( path ) {
if ( !m_path ) {
m_path = strdup( path );
}
m_valid = true;
} else {
m_valid = false;
}
m_buf_valid = false;
m_rc = 0;
return true;
}
int
StatWrapperIntPath::Stat( bool force )
{
if ( !m_fn ) {
return SetRc( -2 );
}
if ( !m_path ) {
return SetRc( -3 );
}
if ( m_valid && !force ) {
return GetRc( );
}
m_rc = m_fn( m_path, &m_access.getStatBufRw() );
return CheckResult( );
}
//
// StatWrapper internal -- FD Version
//
// FD Version: do the stat
StatWrapperIntFd::StatWrapperIntFd(
const char *name,
int (* const fn)(int, StatStructType *) )
: StatWrapperIntBase( name ), m_fn( fn ), m_fd( -1 )
{
// Do nothing
}
StatWrapperIntFd::StatWrapperIntFd( const StatWrapperIntFd &other )
: StatWrapperIntBase( other ),
m_fn( other.GetFn() ),
m_fd( other.GetFd() )
{
// Do nothing
}
StatWrapperIntFd::~StatWrapperIntFd( void )
{
// Do nothing
}
// Set the FD
bool
StatWrapperIntFd::SetFD( int fd )
{
if ( fd != m_fd ) {
m_buf_valid = false;
m_rc = 0;
}
if ( fd >= 0 ) {
m_valid = true;
} else {
m_valid = false;
}
m_fd = fd;
return true;
}
int
StatWrapperIntFd::Stat( bool force )
{
if ( !m_fn ) {
return SetRc( -2 );
}
if ( m_fd < 0 ) {
return SetRc( -3 );
}
if ( m_valid && !force ) {
return GetRc( );
}
m_rc = m_fn( m_fd, &m_access.getStatBufRw() );
return CheckResult( );
}
//
// StatWrapper internal -- NOP Version
//
// FD Version: do the stat
StatWrapperIntNop::StatWrapperIntNop(
const char *name,
int (* const fn)(int, StatStructType *) )
: StatWrapperIntBase( name ), m_fn( fn )
{
// Do nothing
}
StatWrapperIntNop::StatWrapperIntNop( const StatWrapperIntNop &other )
: StatWrapperIntBase( other ),
m_fn( other.GetFn() )
{
// Do nothing
}
StatWrapperIntNop::~StatWrapperIntNop( void )
{
// Do nothing
}
int
StatWrapperIntNop::Stat( bool force )
{
(void) force;
return 0;
}
| {
"content_hash": "66b7aefee33f587f8da4b3839a79b193",
"timestamp": "",
"source": "github",
"line_count": 199,
"max_line_length": 73,
"avg_line_length": 16.55778894472362,
"alnum_prop": 0.6264036418816389,
"repo_name": "clalancette/condor-dcloud",
"id": "0557772c85f30885f1ef00af5d57ce17e060f96a",
"size": "4103",
"binary": false,
"copies": "1",
"ref": "refs/heads/7.6.0_and_patches",
"path": "src/condor_utils/stat_wrapper_internal.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "5541080"
},
{
"name": "C++",
"bytes": "14834293"
},
{
"name": "FORTRAN",
"bytes": "110251"
},
{
"name": "Java",
"bytes": "254868"
},
{
"name": "Objective-C",
"bytes": "20250"
},
{
"name": "PHP",
"bytes": "136301"
},
{
"name": "Perl",
"bytes": "1138002"
},
{
"name": "Python",
"bytes": "48633"
},
{
"name": "Shell",
"bytes": "66481"
}
],
"symlink_target": ""
} |
angular.module('app.channel', [
'ngAnimate',
'ui.bootstrap',
'RecursionHelper',
'app.core',
'app.user'
]); | {
"content_hash": "ba554e6a73db1f86747076ab9e997341",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 31,
"avg_line_length": 15.857142857142858,
"alnum_prop": 0.6486486486486487,
"repo_name": "nunof07/chrome-mumble",
"id": "85ab81c9887a5d9c606cbd6e16bbf64b9291cc5f",
"size": "111",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/channel/channel.module.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3041"
},
{
"name": "HTML",
"bytes": "7518"
},
{
"name": "JavaScript",
"bytes": "96399"
}
],
"symlink_target": ""
} |
.. -*- coding: utf-8 -*-
.. URL: https://docs.docker.com/engine/userguide/containers/dockerimages/
.. SOURCE: https://github.com/docker/docker/blob/master/docs/userguide/containers/dockerimages.md
doc version: 1.12
https://github.com/docker/docker/commits/master/docs/userguide/containers/dockerimages.md
.. check date: 2016/06/13
.. Commits on a Mar 4, 2016 69004ff67eed6525d56a92fdc69466c41606151a
.. ----------------------------------------------------------------------------
.. Build your own images
.. _build-your-own-images:
=======================================
イメージの構築
=======================================
.. sidebar:: 目次
.. contents::
:depth: 3
:local:
.. Docker images are the basis of containers. Each time you’ve used docker run you told it which image you wanted. In the previous sections of the guide you used Docker images that already exist, for example the ubuntu image and the training/webapp image.
Docker イメージはコンテナの土台(基盤)です。``docker run`` を実行する度に、どのイメージを使うか指定します。ガイドの前セクションでは、既存の ``ubuntu`` イメージと ``training/webapp`` イメージを使いました。
.. You also discovered that Docker stores downloaded images on the Docker host. If an image isn’t already present on the host then it’ll be downloaded from a registry: by default the Docker Hub Registry.
Docker はダウンロードしたイメージを Docker ホスト上に保管しており、それらを見ることができます。もしホスト上にイメージがなければ、Docker はレジストリからイメージをダウンロードします。標準のレジストリは `Docker Hub レジストリ <https://hub.docker.com/>`_ です。
.. In this section you’re going to explore Docker images a bit more including:
このセクションでは Docker イメージについて、次の内容を含めて深掘りします。
..
Managing and working with images locally on your Docker host.
Creating basic images.
Uploading images to Docker Hub Registry.
* ローカルの Docker ホスト上にあるイメージの管理と操作
* 基本イメージの作成
* イメージを `Docker Hub レジストリ <https://hub.docker.com/>`_ にアップロード
.. Listing images on the host
ホスト上のイメージ一覧を表示
==============================
.. Let’s start with listing the images you have locally on our host. You can do this using the docker images command like so:
ローカルのホスト上にあるイメージの一覧を表示しましょう。表示するには ``docker images`` コマンドを使います。
.. code-block:: bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu 14.04 1d073211c498 3 days ago 187.9 MB
busybox latest 2c5ac3f849df 5 days ago 1.113 MB
training/webapp latest 54bb4e8718e8 5 months ago 348.7 MB
.. You can see the images you’ve previously used in the user guide. Each has been downloaded from Docker Hub when you launched a container using that image. When you list images, you get three crucial pieces of information in the listing.
これまでのガイドで使用したイメージを表示します。それぞれ、コンテナでイメージを起動する時に `Docker Hub <https://hub.docker.com/>`_ からダウンロードしたものです。イメージの一覧表示には、3つの重要な情報が表示されます。
..
What repository they came from, for example ubuntu.
The tags for each image, for example 14.04.
The image ID of each image.
* どのリポジトリから取得したのか(例:``ubuntu``)
* 各イメージのタグ(例:``14.04``)
* イメージごとのイメージ ID
.. Tip: You can use a third-party dockviz tool or the Image layers site to display visualizations of image data.
.. tip::
`サード・パーティ製の dockviz tool <https://github.com/justone/dockviz>`_ や `image layers サイト <https://imagelayers.io/>`_ でイメージ・データを可視化できます。
.. A repository potentially holds multiple variants of an image. In the case of our ubuntu image you can see multiple variants covering Ubuntu 10.04, 12.04, 12.10, 13.04, 13.10 and 14.04. Each variant is identified by a tag and you can refer to a tagged image like so:
リポジトリによっては複数の派生イメージを持つ場合があります。先ほどの ``ubuntu`` イメージの場合は、Ubuntu 10.04、12.04、12.10、13.03、13.10 という、複数の異なる派生イメージがあります。それぞれの違いをタグ (tag) によって識別します。そして、次のようにイメージに対するタグとして参照できます。
.. code-block:: bash
ubuntu:14.04
.. So when you run a container you refer to a tagged image like so:
そのため、コンテナを実行する時は、次のようにタグ付けされたイメージを参照できます。
.. code-block:: bash
$ docker run -t -i ubuntu:14.04 /bin/bash
.. If instead you wanted to run an Ubuntu 12.04 image you’d use:
あるいは Ubuntu 12.04 イメージを使いたい場合は、次のようにします。
.. code-block:: bash
$ docker run -t -i ubuntu:12.04 /bin/bash
.. If you don’t specify a variant, for example you just use ubuntu, then Docker will default to using the ubuntu:latest image.
タグを指定しない場合、ここでは ``ubuntu`` しか指定しなければ、Docker は標準で ``ubuntu:latest`` イメージを使用します。
.. Tip: You should always specify an image tag, for example ubuntu:14.04. That way, you always know exactly what variant of an image you are using. This is useful for troubleshooting and debugging.
.. tip::
常に ``ubuntu:14.04`` のようにイメージに対するタグを指定すべきです。タグの指定こそが、確実にイメージを使えるようにする手法だからです。トラブルシュートやデバッグに便利です。
.. Getting a new image
.. _getting-a-new-image:
新しいイメージの取得
==============================
.. So how do you get new images? Well Docker will automatically download any image you use that isn’t already present on the Docker host. But this can potentially add some time to the launch of a container. If you want to pre-load an image you can download it using the docker pull command. Suppose you’d like to download the centos image.
それでは、新しいイメージをどうやって取得できるのでしょうか。Docker は Docker ホスト上に存在しないイメージを使う時、自動的にイメージをダウンロードします。しかしながら、コンテナを起動するまで少々時間がかかる場合があります。イメージをあらかじめダウンロードしたい場合は、``docker pull`` コマンドを使えます。以下は ``centos`` イメージをダウンロードする例です。
.. code-block:: bash
$ docker pull centos
Pulling repository centos
b7de3133ff98: Pulling dependent layers
5cc9e91966f7: Pulling fs layer
511136ea3c5a: Download complete
ef52fb1fe610: Download complete
. . .
Status: Downloaded newer image for centos
.. You can see that each layer of the image has been pulled down and now you can run a container from this image and you won’t have to wait to download the image.
イメージの各レイヤを取得しているのが見えます。コンテナを起動する時、このイメージを使えばイメージのダウンロードのために待つ必要はありません。
.. code-block:: bash
$ docker run -t -i centos /bin/bash
bash-4.1#
.. Finding images
.. _finding-images:
イメージの検索
====================
.. One of the features of Docker is that a lot of people have created Docker images for a variety of purposes. Many of these have been uploaded to Docker Hub. You can search these images on the Docker Hub website.
Docker の特長の1つに、様々な目的の Docker イメージが多くの方によって作られています。大部分が `Docker Hub <https://hub.docker.com/>`_ にアップロードされています。これらイメージは `Docker Hub のウェブサイト <https://hub.docker.com/explore/>`_ から検索できます。
.. image:: search.png
.. You can also search for images on the command line using the docker search command. Suppose your team wants an image with Ruby and Sinatra installed on which to do our web application development. You can search for a suitable image by using the docker search command to find all the images that contain the term sinatra.
イメージを検索するには、コマンドライン上で ``docker search`` コマンドを使う方法もあります。チームでウェブ・アプリケーションの開発のために Ruby と Sinatra をインストールしたイメージが必要と仮定します。``docker search`` コマンドを使うことで、文字列 ``sinatra`` を含む全てのイメージを表示して、そこから適切なイメージを探せます。
.. code-block:: bash
$ docker search sinatra
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
training/sinatra Sinatra training image 0 [OK]
marceldegraaf/sinatra Sinatra test app 0
mattwarren/docker-sinatra-demo 0 [OK]
luisbebop/docker-sinatra-hello-world 0 [OK]
bmorearty/handson-sinatra handson-ruby + Sinatra for Hands on with D... 0
subwiz/sinatra 0
bmorearty/sinatra 0
. . .
.. You can see the command returns a lot of images that use the term sinatra. You’ve received a list of image names, descriptions, Stars (which measure the social popularity of images - if a user likes an image then they can “star” it), and the Official and Automated build statuses. Official Repositories are a carefully curated set of Docker repositories supported by Docker, Inc. Automated repositories are Automated Builds that allow you to validate the source and content of an image.
コマンドを実行したら、``sinatra`` を含む多くのイメージを表示します。表示するのは、イメージ名の一覧、スター(イメージがソーシャル上で有名かどうか測るものです。利用者はイメージを気に入れば"スター"を付けられます )、公式(OFFICIAL)か、自動構築(AUTOMATED)といった状態です。:doc:`公式リポジトリ </docker-hub/official_repos>` とは、Docker 社のサポートよって丁寧に精査されている Docker リポジトリです。:ref:`自動構築(Automated Build) <automated-builds>` とは有効なソースコードを元に、イメージ内容が自動構築されたリポジトリです。
.. You’ve reviewed the images available to use and you decided to use the training/sinatra image. So far you’ve seen two types of images repositories, images like ubuntu, which are called base or root images. These base images are provided by Docker Inc and are built, validated and supported. These can be identified by their single word names.
さて、利用可能なイメージの内容を確認します。ここでは ``training/sinatra`` イメージを使うことにします。これまで2種類のイメージ・リポジトリがありました。``ubuntu`` のようなイメージはベース・イメージまたはルート・イメージと呼ばれます。このベース・イメージは Docker 社によって提供、構築、認証、サポートされています。これらは単一の単語名として表示されています。
.. You’ve also seen user images, for example the training/sinatra image you’ve chosen. A user image belongs to a member of the Docker community and is built and maintained by them. You can identify user images as they are always prefixed with the user name, here training, of the user that created them.
また、``training/sinatra`` イメージのようなユーザ・イメージもあります。ユーザ・イメージとは Docker コミュニティのメンバーに属するもので、メンバーによって構築、メンテナンスされます。ユーザ・イメージは、常にユーザ名がイメージの前に付きます。この例のイメージは、``training`` というユーザによって作成されました。
.. Pulling our image
.. _pulling-our-image:
イメージの取得
====================
.. You’ve identified a suitable image, training/sinatra, and now you can download it using the docker pull command.
適切なイメージ ``training/sinatra`` を確認したら、``docker pull`` コマンドを使ってダウンロードできます。
.. code-block:: bash
$ docker pull training/sinatra
.. The team can now use this image by running their own containers.
これでチームはこのイメージを使い、自身でコンテナを実行できます。
.. code-block:: bash
$ docker run -t -i training/sinatra /bin/bash
root@a8cb6ce02d85:/#
.. Creating our own images
.. _creating-our-own-images:
イメージの作成
====================
.. The team has found the training/sinatra image pretty useful but it’s not quite what they need and you need to make some changes to it. There are two ways you can update and create images.
チームでは ``training/sinatra`` イメージが有用だと分かりました。しかし、イメージを自分たちが使えるようにするには、いくつかの変更が必要です。イメージの更新や作成には2つの方法があります。
..
You can update a container created from an image and commit the results to an image.
You can use a Dockerfile to specify instructions to create an image.
1. イメージから作成したコンテナを更新し、イメージの結果をコミットする
2. ``Dockerfile`` を使って、イメージ作成の命令を指定する
.. Updating and committing an image
.. _updating-and-committing-an-image:
更新とイメージのコミット
------------------------------
.. To update an image you first need to create a container from the image you’d like to update.
イメージを更新するには、まず更新したいイメージからコンテナを作成する必要があります。
.. code-block:: bash
$ docker run -t -i training/sinatra /bin/bash
root@0b2616b0e5a8:/#
.. Note: Take note of the container ID that has been created, 0b2616b0e5a8, as you’ll need it in a moment.
.. note::
作成したコンテナ ID 、ここでは ``0b2616b0e5a8`` をメモしておきます。このあとすぐ使います。
.. Inside our running container let’s add the json gem.
実行しているコンテナ内に ``json`` gem を追加しましょう。
.. code-block:: bash
root@0b2616b0e5a8:/# gem install json
.. Once this has completed let’s exit our container using the exit command.
この作業が終わったら、``exit`` コマンドを使ってコンテナを終了します。
.. Now you have a container with the change you want to make. You can then commit a copy of this container to an image using the docker commit command.
以上で自分たちが必要な変更を加えたコンテナができました。次に ``docker commit`` コマンドを使い、イメージに対してこのコンテナのコピーをコミット(収容)できます。
.. code-block:: bash
$ docker commit -m "Added json gem" -a "Kate Smith" \
0b2616b0e5a8 ouruser/sinatra:v2
4f177bd27a9ff0f6dc2a830403925b5360bfe0b93d476f7fc3231110e7f71b1c
.. Here you’ve used the docker commit command. You’ve specified two flags: -m and -a. The -m flag allows us to specify a commit message, much like you would with a commit on a version control system. The -a flag allows us to specify an author for our update.
ここで使った ``docker commit`` コマンドの内容を確認します。2つのフラグ ``-m`` と ``-a`` を指定しています。``-m`` フラグはコミット・メッセージを指定するもので、バージョン・コントロール・システムのようにコミットできます。``-a`` フラグは更新を行った担当者を指定できます。
.. You’ve also specified the container you want to create this new image from, 0b2616b0e5a8 (the ID you recorded earlier) and you’ve specified a target for the image:
また、新しいイメージを作成する元となるコンテナを指定します。ここでは ``0b2616b0e5a8`` (先ほど書き留めた ID)です。そして、ターゲットとなるイメージを次のように指定します。
.. code-block:: bash
ouruser/sinatra:v2
.. Break this target down. It consists of a new user, ouruser, that you’re writing this image to. You’ve also specified the name of the image, here you’re keeping the original image name sinatra. Finally you’re specifying a tag for the image: v2.
こちらの詳細を見ていきましょう。``ouruser`` は新しいユーザ名であり、このイメージを書いた人です。また、イメージに対して何らかの名前も指定します。ここではオリジナルのイメージ名 ``sinatra`` をそのまま使います。最後に、イメージに対するタグ ``v2`` を指定します。
.. You can then look at our new ouruser/sinatra image using the docker images command.
あとは ``docker images`` コマンドを使えば、作成した新しいイメージ ``ouruser/sinatra`` が見えます。
.. code-block:: bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
training/sinatra latest 5bc342fa0b91 10 hours ago 446.7 MB
ouruser/sinatra v2 3c59e02ddd1a 10 hours ago 446.7 MB
ouruser/sinatra latest 5db5f8471261 10 hours ago 446.7 MB
.. To use our new image to create a container you can then:
作成したイメージを使ってコンテナを作成するには、次のようにします。
.. code-block:: bash
$ docker run -t -i ouruser/sinatra:v2 /bin/bash
root@78e82f680994:/#
.. Building an image from a Dockerfile
.. _building-an-image-from-a-dockerfile:
``Dockerfile`` からイメージを構築
----------------------------------------
.. Using the docker commit command is a pretty simple way of extending an image but it’s a bit cumbersome and it’s not easy to share a development process for images amongst a team. Instead you can use a new command, docker build, to build new images from scratch.
``docker commit`` コマンドを使う方法は、イメージを簡単に拡張します。しかし、少々面倒なものであり、チーム内の開発プロセスでイメージを共有するのは簡単ではありません。この方法ではなく、新しいコマンド ``docker build`` を使い構築する方法や、イメージをスクラッチ(ゼロ)から作成する方法があります。
.. To do this you create a Dockerfile that contains a set of instructions that tell Docker how to build our image.
この構築コマンドを使うには ``Dockerfile`` を作成します。この中に Docker がどのようにしてイメージを構築するのか、命令セットを記述します。
.. First, create a directory and a Dockerfile.
作成するにはまず、ディレクトリと ``Dockerfile`` を作成します。
.. code-block:: bash
$ mkdir sinatra
$ cd sinatra
$ touch Dockerfile
.. If you are using Docker Machine on Windows, you may access your host directory by cd to /c/Users/your_user_name.
Windows で Docker Machine を使っている場合は、ホスト・ディレクトリには ``cd`` で ``/c/Users/ユーザ名`` を指定してアクセスできるでしょう。
.. Each instruction creates a new layer of the image. Try a simple example now for building your own Sinatra image for your fictitious development team.
各々の命令で新しいイメージ層を作成します。簡単な例として、架空の開発チーム向けの Sinatra イメージを構築しましょう。
.. code-block:: bash
# ここはコメントです
FROM ubuntu:14.04
MAINTAINER Kate Smith <[email protected]>
RUN apt-get update && apt-get install -y ruby ruby-dev
RUN gem install sinatra
.. Examine what your Dockerfile does. Each instruction prefixes a statement and is capitalized.
``Dockerfile`` が何をしているか調べます。それぞれの命令(instruction)は、ステートメント(statement)の前にあり、大文字で記述します。
.. code-block:: bash
命令 ステートメント
.. Note: You use # to indicate a comment
.. note::
``#`` を使ってコメントを示せます
.. The first instruction FROM tells Docker what the source of our image is, in this case you’re basing our new image on an Ubuntu 14.04 image. The instruction uses the MAINTAINER instruction to specify who maintains the new image.
冒頭の ``FROM`` 命令は Docker に対して基となるイメージを伝えます。この例では、新しいイメージは Ubuntu 14.04 イメージを基にします。``MAINTAINER`` 命令は誰がこの新しいイメージを管理するか指定します。
.. Lastly, you’ve specified two RUN instructions. A RUN instruction executes a command inside the image, for example installing a package. Here you’re updating our APT cache, installing Ruby and RubyGems and then installing the Sinatra gem.
最後に ``RUN`` 命令を指定しています。``RUN`` 命令はイメージの中で実行するコマンドを指示します。この例ではパッケージのインストールのために、まず APT キャッシュを更新します。それから、Ruby と RubyGem をインストールし、Sinatra gem をインストールします。
.. Now let’s take our Dockerfile and use the docker build command to build an image.
あとは ``Dockerfile`` を用い、``docker build`` コマンドでイメージを構築します。
.. code-block:: bash
$ docker build -t ouruser/sinatra:v2 .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon
Step 1 : FROM ubuntu:14.04
---> e54ca5efa2e9
Step 2 : MAINTAINER Kate Smith <[email protected]>
---> Using cache
---> 851baf55332b
Step 3 : RUN apt-get update && apt-get install -y ruby ruby-dev
---> Running in 3a2558904e9b
Selecting previously unselected package libasan0:amd64.
(Reading database ... 11518 files and directories currently installed.)
Preparing to unpack .../libasan0_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libasan0:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../libatomic1_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libatomic1:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libgmp10:amd64.
Preparing to unpack .../libgmp10_2%3a5.1.3+dfsg-1ubuntu1_amd64.deb ...
Unpacking libgmp10:amd64 (2:5.1.3+dfsg-1ubuntu1) ...
Selecting previously unselected package libisl10:amd64.
Preparing to unpack .../libisl10_0.12.2-1_amd64.deb ...
Unpacking libisl10:amd64 (0.12.2-1) ...
Selecting previously unselected package libcloog-isl4:amd64.
Preparing to unpack .../libcloog-isl4_0.18.2-1_amd64.deb ...
Unpacking libcloog-isl4:amd64 (0.18.2-1) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../libgomp1_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libgomp1:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../libitm1_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libitm1:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libmpfr4:amd64.
Preparing to unpack .../libmpfr4_3.1.2-1_amd64.deb ...
Unpacking libmpfr4:amd64 (3.1.2-1) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../libquadmath0_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libquadmath0:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../libtsan0_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libtsan0:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package libyaml-0-2:amd64.
Preparing to unpack .../libyaml-0-2_0.1.4-3ubuntu3_amd64.deb ...
Unpacking libyaml-0-2:amd64 (0.1.4-3ubuntu3) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../libmpc3_1.0.1-1ubuntu1_amd64.deb ...
Unpacking libmpc3:amd64 (1.0.1-1ubuntu1) ...
Selecting previously unselected package openssl.
Preparing to unpack .../openssl_1.0.1f-1ubuntu2.4_amd64.deb ...
Unpacking openssl (1.0.1f-1ubuntu2.4) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../ca-certificates_20130906ubuntu2_all.deb ...
Unpacking ca-certificates (20130906ubuntu2) ...
Selecting previously unselected package manpages.
Preparing to unpack .../manpages_3.54-1ubuntu1_all.deb ...
Unpacking manpages (3.54-1ubuntu1) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.24-5ubuntu3_amd64.deb ...
Unpacking binutils (2.24-5ubuntu3) ...
Selecting previously unselected package cpp-4.8.
Preparing to unpack .../cpp-4.8_4.8.2-19ubuntu1_amd64.deb ...
Unpacking cpp-4.8 (4.8.2-19ubuntu1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../cpp_4%3a4.8.2-1ubuntu6_amd64.deb ...
Unpacking cpp (4:4.8.2-1ubuntu6) ...
Selecting previously unselected package libgcc-4.8-dev:amd64.
Preparing to unpack .../libgcc-4.8-dev_4.8.2-19ubuntu1_amd64.deb ...
Unpacking libgcc-4.8-dev:amd64 (4.8.2-19ubuntu1) ...
Selecting previously unselected package gcc-4.8.
Preparing to unpack .../gcc-4.8_4.8.2-19ubuntu1_amd64.deb ...
Unpacking gcc-4.8 (4.8.2-19ubuntu1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../gcc_4%3a4.8.2-1ubuntu6_amd64.deb ...
Unpacking gcc (4:4.8.2-1ubuntu6) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../libc-dev-bin_2.19-0ubuntu6_amd64.deb ...
Unpacking libc-dev-bin (2.19-0ubuntu6) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../linux-libc-dev_3.13.0-30.55_amd64.deb ...
Unpacking linux-libc-dev:amd64 (3.13.0-30.55) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../libc6-dev_2.19-0ubuntu6_amd64.deb ...
Unpacking libc6-dev:amd64 (2.19-0ubuntu6) ...
Selecting previously unselected package ruby.
Preparing to unpack .../ruby_1%3a1.9.3.4_all.deb ...
Unpacking ruby (1:1.9.3.4) ...
Selecting previously unselected package ruby1.9.1.
Preparing to unpack .../ruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ...
Unpacking ruby1.9.1 (1.9.3.484-2ubuntu1) ...
Selecting previously unselected package libruby1.9.1.
Preparing to unpack .../libruby1.9.1_1.9.3.484-2ubuntu1_amd64.deb ...
Unpacking libruby1.9.1 (1.9.3.484-2ubuntu1) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../manpages-dev_3.54-1ubuntu1_all.deb ...
Unpacking manpages-dev (3.54-1ubuntu1) ...
Selecting previously unselected package ruby1.9.1-dev.
Preparing to unpack .../ruby1.9.1-dev_1.9.3.484-2ubuntu1_amd64.deb ...
Unpacking ruby1.9.1-dev (1.9.3.484-2ubuntu1) ...
Selecting previously unselected package ruby-dev.
Preparing to unpack .../ruby-dev_1%3a1.9.3.4_all.deb ...
Unpacking ruby-dev (1:1.9.3.4) ...
Setting up libasan0:amd64 (4.8.2-19ubuntu1) ...
Setting up libatomic1:amd64 (4.8.2-19ubuntu1) ...
Setting up libgmp10:amd64 (2:5.1.3+dfsg-1ubuntu1) ...
Setting up libisl10:amd64 (0.12.2-1) ...
Setting up libcloog-isl4:amd64 (0.18.2-1) ...
Setting up libgomp1:amd64 (4.8.2-19ubuntu1) ...
Setting up libitm1:amd64 (4.8.2-19ubuntu1) ...
Setting up libmpfr4:amd64 (3.1.2-1) ...
Setting up libquadmath0:amd64 (4.8.2-19ubuntu1) ...
Setting up libtsan0:amd64 (4.8.2-19ubuntu1) ...
Setting up libyaml-0-2:amd64 (0.1.4-3ubuntu3) ...
Setting up libmpc3:amd64 (1.0.1-1ubuntu1) ...
Setting up openssl (1.0.1f-1ubuntu2.4) ...
Setting up ca-certificates (20130906ubuntu2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Setting up manpages (3.54-1ubuntu1) ...
Setting up binutils (2.24-5ubuntu3) ...
Setting up cpp-4.8 (4.8.2-19ubuntu1) ...
Setting up cpp (4:4.8.2-1ubuntu6) ...
Setting up libgcc-4.8-dev:amd64 (4.8.2-19ubuntu1) ...
Setting up gcc-4.8 (4.8.2-19ubuntu1) ...
Setting up gcc (4:4.8.2-1ubuntu6) ...
Setting up libc-dev-bin (2.19-0ubuntu6) ...
Setting up linux-libc-dev:amd64 (3.13.0-30.55) ...
Setting up libc6-dev:amd64 (2.19-0ubuntu6) ...
Setting up manpages-dev (3.54-1ubuntu1) ...
Setting up libruby1.9.1 (1.9.3.484-2ubuntu1) ...
Setting up ruby1.9.1-dev (1.9.3.484-2ubuntu1) ...
Setting up ruby-dev (1:1.9.3.4) ...
Setting up ruby (1:1.9.3.4) ...
Setting up ruby1.9.1 (1.9.3.484-2ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...
Processing triggers for ca-certificates (20130906ubuntu2) ...
Updating certificates in /etc/ssl/certs... 164 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
---> c55c31703134
Removing intermediate container 3a2558904e9b
Step 4 : RUN gem install sinatra
---> Running in 6b81cb6313e5
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
Successfully installed rack-1.5.2
Successfully installed tilt-1.4.1
Successfully installed rack-protection-1.5.3
Successfully installed sinatra-1.4.5
4 gems installed
Installing ri documentation for rack-1.5.2...
Installing ri documentation for tilt-1.4.1...
Installing ri documentation for rack-protection-1.5.3...
Installing ri documentation for sinatra-1.4.5...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for tilt-1.4.1...
Installing RDoc documentation for rack-protection-1.5.3...
Installing RDoc documentation for sinatra-1.4.5...
---> 97feabe5d2ed
Removing intermediate container 6b81cb6313e5
Successfully built 97feabe5d2ed
.. You’ve specified our docker build command and used the -t flag to identify our new image as belonging to the user ouruser, the repository name sinatra and given it the tag v2.
``docker build`` コマンドで ``-t`` フラグを指定しました。ここでは新しいイメージがユーザ ``ouruser`` に属していること、リポジトリ名が ``sinatra`` 、タグを ``v2`` に指定しました。
.. You’ve also specified the location of our Dockerfile using the . to indicate a Dockerfile in the current directory.
また、``Dockerfile`` の場所を示すため ``.`` を使うと、現在のディレクトリにある ``Dockerfile`` の使用を指示します。
.. Note: You can also specify a path to a Dockerfile.
.. note::
``Dockerfile`` のパスも指定できます。
.. Now you can see the build process at work. The first thing Docker does is upload the build context: basically the contents of the directory you’re building in. This is done because the Docker daemon does the actual build of the image and it needs the local context to do it.
これで構築プロセスが進行します。まず Docker が行うのは構築コンテクスト(訳者注:環境や内容物の意味)のアップロードです。典型的なコンテクストとは、構築時のディレクトリです。この指定によって、Docker デーモンが実際のイメージ構築にあたり、ローカルのコンテクストをそこに入れるために必要とします。
.. Next you can see each instruction in the Dockerfile being executed step-by-step. You can see that each step creates a new container, runs the instruction inside that container and then commits that change - just like the docker commit work flow you saw earlier. When all the instructions have executed you’re left with the 97feabe5d2ed image (also helpfuly tagged as ouruser/sinatra:v2) and all intermediate containers will get removed to clean things up.
この次は ``Dockerfile`` の命令を一行ずつ実行します。それぞれのステップで、新しいコンテナを作成し、コンテナ内で命令を実行し、変更に対してコミットするのが見えるでしょう。これは先ほど見た ``docker commit`` 処理の流れです。全ての命令を実行したら、イメージ ``97feabe5d2ed`` が残ります(扱いやすいよう ``ouruser/sinatra:v2`` とタグ付けもしています)。そして、作業中に作成された全てのコンテナを削除し、きれいに片付けています。
.. Note: An image can’t have more than 127 layers regardless of the storage driver. This limitation is set globally to encourage optimization of the overall size of images.
.. note::
127 層以上のイメージはストレージ・ドライバに関わらず作成できません。この制限が幅広く適用されるのは、イメージ全体のサイズが大きくならないよう、多くの人に最適化を促すためです。
.. You can then create a container from our new image.
あとは、新しいイメージからコンテナを作成できます。
.. code-block:: bash
$ docker run -t -i ouruser/sinatra:v2 /bin/bash
root@8196968dac35:/#
.. Note: This is just a brief introduction to creating images. We’ve skipped a whole bunch of other instructions that you can use. We’ll see more of those instructions in later sections of the Guide or you can refer to the Dockerfile reference for a detailed description and examples of every instruction. To help you write a clear, readable, maintainable Dockerfile, you’ve also written a Dockerfile Best Practices guide.
.. note::
ここではイメージ作成の簡単な概要を紹介しました。他にも利用可能な命令がありますが、省略しています。ガイドの後半に読み進めれば、``Dockerfile`` のリファレンスから、コマンドごとに更なる詳細や例を参照いただけます。``Dockerfile`` を明らかに、読めるように、管理できるようにするためには ``Dockerfile`` :doc:`ベストプラクティス・ガイド </engine/userguide/eng-image/dockerfile_best-practice>` もお読みください。
.. Setting tag on an image
.. _setting-tag-on-an-image:
イメージにタグを設定
====================
.. You can also add a tag to an existing image after you commit or build it. We can do this using the docker tag command. Now, add a new tag to your ouruser/sinatra image.
コミットまたは構築後のイメージに対しても、タグを付けられます。タグ付けには ``docker tag`` コマンドを使います。ここでは ``ouruser/sinatra`` イメージに新しいタグを付けましょう。
.. code-block:: bash
$ docker tag 5db5f8471261 ouruser/sinatra:devel
.. The docker tag command takes the ID of the image, here 5db5f8471261, and our user name, the repository name and the new tag.
``docker tag`` コマンドにはイメージ ID を使います。ここでは ``5db5f8471261`` です。そしてユーザ名、リポジトリ名、新しいタグを指定します。
.. Now, see your new tag using the docker images command.
それから、``docker images`` コマンドを使い新しいタグを確認します。
.. code-block:: bash
$ docker images ouruser/sinatra
REPOSITORY TAG IMAGE ID CREATED SIZE
ouruser/sinatra latest 5db5f8471261 11 hours ago 446.7 MB
ouruser/sinatra devel 5db5f8471261 11 hours ago 446.7 MB
ouruser/sinatra v2 5db5f8471261 11 hours ago 446.7 MB
.. Image Digest
.. _docker-image-digest:
イメージのダイジェスト値
==============================
.. Images that use the v2 or later format have a content-addressable identifier called a digest. As long as the input used to generate the image is unchanged, the digest value is predictable. To list image digest values, use the --digests flag:
v2 以上のフォーマットのイメージには、内容に対して ``digest`` と呼ばれる識別子が割り当て可能です。作成したイメージが長期間にわたって変更がなければ、ダイジェスト値は(変更不可能なため)予想できます。イメージの digest 値を一覧表示するには、``--digests`` フラグを使います。
.. code-block:: bash
$ docker images --digests | head
REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE
ouruser/sinatra latest sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf 5db5f8471261 11 hours ago 446.7 MB
.. When pushing or pulling to a 2.0 registry, the push or pull command output includes the image digest. You can pull using a digest value.
2.0 レジストリに対して送信(push)や取得(pull)の実行に、``push`` か ``pull`` コマンドを使うと、その出力にイメージのダイジェスト値も含みます。このダイジェストを使っても、イメージを ``pull`` できます。
.. code-block:: bash
$ docker pull ouruser/sinatra@cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf
.. You can also reference by digest in create, run, and rmi commands, as well as the FROM image reference in a Dockerfile.
ダイジェスト値は ``create``、``run``、``rmi`` コマンドや、Dockerfile で ``FROM`` イメージの参照にも使えます。
.. Push an image to Docker Hub
.. _push-an-image-to-docker-hub:
イメージを Docker Hub に送信
==============================
.. Once you’ve built or created a new image you can push it to Docker Hub using the docker push command. This allows you to share it with others, either publicly, or push it into a private repository.
イメージを構築・作成したあとは、``docker push`` コマンドを使って `Docker Hub <https://hub.docker.com/>`_ に送信できます。これにより、イメージを他人と共有したり、パブリックに共有したり、あるいは `プライベート・リポジトリ <https://hub.docker.com/plans/>`_ にも送信できます。
.. code-block:: bash
$ docker push ouruser/sinatra
The push refers to a repository [ouruser/sinatra] (len: 1)
Sending image list
Pushing repository ouruser/sinatra (3 tags)
. . .
.. Remove an image from the host
.. _remove-an-image-from-the-host:
ホストからイメージを削除
==============================
.. You can also remove images on your Docker host in a way similar to containers using the docker rmi command.
Docker ホスト上で、 :doc:`コンテナの削除 <usingdocker>` と同じように ``docker rmi`` コマンドでイメージも削除できます。
.. Delete the training/sinatra image as you don’t need it anymore.
不要になった ``training/sinatra`` イメージを削除します。
.. code-block:: bash
$ docker rmi training/sinatra
Untagged: training/sinatra:latest
Deleted: 5bc342fa0b91cabf65246837015197eecfa24b2213ed6a51a8974ae250fedd8d
Deleted: ed0fffdcdae5eb2c3a55549857a8be7fc8bc4241fb19ad714364cbfd7a56b22f
Deleted: 5c58979d73ae448df5af1d8142436d81116187a7633082650549c52c3a2418f0
.. Note: To remove an image from the host, please make sure that there are no containers actively based on it.
.. note::
ホストからイメージを削除する時は、どのコンテナも対象となるイメージを利用していないことを確認してください。
.. Next steps
次のステップ
====================
.. Until now you’ve seen how to build individual applications inside Docker containers. Now learn how to build whole application stacks with Docker by networking together multiple Docker containers.
ここまでは、Docker コンテナ内に個々のアプリケーションを構築する方法を見てきました。次は、複数の Docker コンテナを結び付けるアプリケーション・スタック(積み重ね)の構築方法を学びましょう。
.. Go to Network containers.
:doc:`コンテナのネットワーク <networkingcontainers>` に移動します。
.. seealso::
Build your own images
https://docs.docker.com/engine/userguide/containers/dockerimages/
| {
"content_hash": "c6f2b5951fb52b4192dda620bdb91f02",
"timestamp": "",
"source": "github",
"line_count": 719,
"max_line_length": 489,
"avg_line_length": 45.92628650904033,
"alnum_prop": 0.7195723933254595,
"repo_name": "zembutsu/docs.docker.jp",
"id": "8ae6e80faa4d5544c9f0c168f1374de9a9d04a35",
"size": "42099",
"binary": false,
"copies": "2",
"ref": "refs/heads/v20.10",
"path": "engine/tutorials/dockerimages.rst",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "104999"
},
{
"name": "Dockerfile",
"bytes": "834"
},
{
"name": "HTML",
"bytes": "19821"
},
{
"name": "JavaScript",
"bytes": "5701"
},
{
"name": "Makefile",
"bytes": "1069"
},
{
"name": "Python",
"bytes": "10592"
}
],
"symlink_target": ""
} |
class BaseFactoryGenerator():
def __init__(self):
self.data = None
self.namespace = None
def init(self, data, namespace):
self.data = data
self.namespace = namespace
def generate_import(self):
raise NotImplementedError()
def generate(self, data, namespace):
raise NotImplementedError()
def _generate_to_json(self):
raise NotImplementedError()
def _generate_from_json(self):
raise NotImplementedError() | {
"content_hash": "ce6434c17f32f3bb1aff503f6ad668fa",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 40,
"avg_line_length": 24.7,
"alnum_prop": 0.631578947368421,
"repo_name": "HenrikPoulsen/Json2Class",
"id": "810bb378062053c1cee6391b6de813f30d3070cb",
"size": "495",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "convert/base/factorygenerator.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "84311"
},
{
"name": "Java",
"bytes": "37872"
},
{
"name": "Python",
"bytes": "104260"
}
],
"symlink_target": ""
} |
"""Actions for the help menu.
"""
# Authors: Gael Varoquaux <gael.varoquaux[at]normalesup.org>
# Prabhu Ramachandran
# Copyright (c) 2007-2008, Enthought, Inc.
# License: BSD Style.
# Standard library imports.
from os import path
import os
import sys
from os.path import join, dirname
# Enthought library imports.
from pyface.action.api import Action
from traitsui.api import auto_close_message
# Local imports
import mayavi.api
from mayavi.core.common import error
from mayavi.preferences.api import preference_manager
# To find the html documentation directory, first look under the
# standard place. If that directory doesn't exist, assume you
# are running from the source.
local_dir = dirname(mayavi.api.__file__)
HTML_DIR = join(local_dir, 'html')
if not path.exists(HTML_DIR):
HTML_DIR = join(dirname(dirname(local_dir)),
'build', 'docs', 'html', 'mayavi')
if not path.exists(HTML_DIR):
HTML_DIR = None
def browser_open(url):
if sys.platform == 'darwin':
os.system('open %s &' % url)
else:
import webbrowser
if webbrowser._iscommand('firefox') and \
preference_manager.root.open_help_in_light_browser:
# Firefox is installed, let's use it, we know how to make it
# chromeless.
firefox = webbrowser.get('firefox')
firefox._invoke(['-chrome', url], remote=False, autoraise=True)
else:
webbrowser.open(url, autoraise=1)
def open_help_index():
""" Open the mayavi user manual index in a browser.
"""
# If the HTML_DIR was found, bring up the documentation in a
# web browser. Otherwise, bring up an error message.
if HTML_DIR:
auto_close_message("Opening help in web browser...")
browser_open(join(HTML_DIR, 'index.html'))
else:
error("Could not find the user guide in your installation " \
"or the source tree.")
def open_tvtk_docs():
""" Open the TVTK class browser.
"""
from tvtk.tools.tvtk_doc import TVTKClassChooser
TVTKClassChooser().edit_traits()
######################################################################
# `HelpIndex` class.
######################################################################
class HelpIndex(Action):
""" An action that pop up the help in a browser. """
tooltip = "The Mayavi2 user guide"
description = "The Mayavi2 user guide"
###########################################################################
# 'Action' interface.
###########################################################################
def perform(self, event):
""" Performs the action. """
open_help_index()
######################################################################
# `TVTKClassBrowser` class.
######################################################################
class TVTKClassBrowser(Action):
""" An action that opens the tvtk interactive class browser. """
tooltip = "The TVTK interactive class browser"
description = "The TVTK interactive class browser"
###########################################################################
# 'Action' interface.
###########################################################################
def perform(self, event):
""" Performs the action. """
open_tvtk_docs()
| {
"content_hash": "45d1ac12c3e4cb78d974691f592be784",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 79,
"avg_line_length": 32.60952380952381,
"alnum_prop": 0.5286214953271028,
"repo_name": "dmsurti/mayavi",
"id": "526036ee2fb6fb1e9c4b7323e686fbc3064b1850",
"size": "3424",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "mayavi/action/help.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1054"
},
{
"name": "GAP",
"bytes": "34817"
},
{
"name": "Python",
"bytes": "2494055"
},
{
"name": "Shell",
"bytes": "147"
}
],
"symlink_target": ""
} |
namespace Pythia8 {
//==========================================================================
// OverlappingRopeDipole class.
// This class describes dipoles overlapping with a given dipole.
//--------------------------------------------------------------------------
// Constructor sets up coordinates in other dipole's rest frame.
OverlappingRopeDipole::OverlappingRopeDipole(RopeDipole* d, double m0,
RotBstMatrix& r) : dipole(d), dir(1) {
// Coordinates in other dipole's rest frame
b1 = d->d1Ptr()->getParticlePtr()->vProd();
b1.rotbst(r);
b2 = d->d2Ptr()->getParticlePtr()->vProd();
b2.rotbst(r);
y1 = d->d1Ptr()->rap(m0,r);
y2 = d->d2Ptr()->rap(m0,r);
if (y1 < y2) dir = -1;
}
//--------------------------------------------------------------------------
// Calculate the overlap at given y and b.
bool OverlappingRopeDipole::overlap(double y, Vec4 ba, double r0) {
if (y < min(y1, y2) || y > max(y1, y2)) return false;
Vec4 bb = b1 + (b2 - b1) * (y - y1) / (y2 - y1);
Vec4 tmp = ba - bb;
return (tmp.pT() <= 2 * r0);
}
//--------------------------------------------------------------------------
// Has the dipole been hadronized?
bool OverlappingRopeDipole::hadronized() {
return dipole->hadronized();
}
//==========================================================================
// RopeDipole class.
// This class describes a dipoles in impact parameter space.
//--------------------------------------------------------------------------
// The RopeDipole constructor makes sure that d1 is always the colored
// end and d2 the anti-colored.
RopeDipole::RopeDipole(RopeDipoleEnd d1In, RopeDipoleEnd d2In, int iSubIn,
Info* infoPtrIn)
: d1(d1In), d2(d2In), iSub(iSubIn), hasRotFrom(false), hasRotTo(false),
isHadronized(false), infoPtr(infoPtrIn) {
// Test if d1 is colored end and d2 anti-colored.
if (d1In.getParticlePtr()->col() == d2In.getParticlePtr()->acol()
&& d1In.getParticlePtr()->col() != 0) { }
else { d2 = d1In, d1 = d2In; }
}
//--------------------------------------------------------------------------
// Insert an excitation on dipole, if not already there.
void RopeDipole::addExcitation(double ylab, Particle* ex) {
pair<map<double, Particle*>::iterator, map<double, Particle*>::iterator>
ret = excitations.equal_range(ylab);
for (map<double, Particle*>::iterator itr = ret.first; itr != ret.second;
++itr)
if (ex == itr->second) return;
excitations.insert( make_pair(ylab,ex) );
}
//--------------------------------------------------------------------------
// Propagate the dipole itself.
void RopeDipole::propagateInit(double deltat) {
// Dipole end momenta.
Vec4 pcm = d1.getParticlePtr()->p();
Vec4 pam = d2.getParticlePtr()->p();
double mTc2 = pcm.pT2() + pcm.m2Calc();
double mTa2 = pam.pT2() + pam.m2Calc();
if (mTc2 <= 0 || mTa2 <= 0) {
infoPtr->errorMsg("Error in RopeDipole::propagateInit: Tried to"
"propagate a RopeDipoleEnd with mT2 <= 0");
return;
}
double mTc = sqrt(mTc2);
double mTa = sqrt(mTa2);
// New vertices in the lab frame.
Vec4 newv1 = Vec4(d1.getParticlePtr()->xProd() + deltat * pcm.px() / mTc,
d1.getParticlePtr()->yProd() + deltat * pcm.py() / mTc, 0, 0);
Vec4 newv2 = Vec4(d2.getParticlePtr()->xProd() + deltat * pam.px() / mTa,
d2.getParticlePtr()->yProd() + deltat * pam.py() / mTa, 0, 0);
// Set the new vertices deep.
d1.getParticlePtr()->vProd(newv1);
d2.getParticlePtr()->vProd(newv2);
}
//--------------------------------------------------------------------------
// Propagate both dipole ends as well as all excitations.
void RopeDipole::propagate(double deltat, double m0) {
// First propagate the dipole ends.
propagateInit(deltat);
for (map<double, Particle*>::iterator eItr = excitations.begin();
eItr != excitations.end(); ++eItr) {
Vec4 em = eItr->second->p();
em.rotbst(getDipoleLabFrame());
// Propagate excitations.
if (em.pT() > 0.0){
Vec4 newVert = Vec4(eItr->second->xProd() + deltat * em.px() / em.pT(),
eItr->second->yProd() + deltat * em.py() / em.pT(), 0, 0);
eItr->second->vProd(newVert);
}
else eItr->second->vProd(bInterpolateLab(eItr->first,m0));
}
}
//--------------------------------------------------------------------------
// Put gluon excitations on the dipole.
void RopeDipole::excitationsToString(double m0, Event& event) {
// Erase excitations below cut-off.
map<double, Particle*>::iterator pItr = excitations.begin();
while (pItr != excitations.end() ) {
if (pItr->second->pAbs() < 1e-6) {
map<double, Particle*>::iterator eraseMe = pItr;
++pItr;
excitations.erase(eraseMe);
}
else ++pItr;
}
// We now colour connect the excitations to the dipole.
// The dipole is connected like this sketch:
// acol (d1) col ------ acol (d2) col.
int oldcol = d1.getParticlePtr()->col();
if (oldcol != d2.getParticlePtr()->acol()) {
infoPtr->errorMsg("Error in Ropewalk::RopeDipole::excitationsToString: "
"color indices do not match.");
return;
}
vector<int> daughters;
// Two cases depending on which end we should start at.
// We always start at min rapidity and connect from there.
if (d1.rap(m0) == minRapidity(m0)) {
int acol = oldcol;
for (map<double, Particle*>::iterator itr = excitations.begin();
itr != excitations.end(); ++itr) {
int col = event.nextColTag();
itr->second->status(51);
itr->second->mothers(d1.getNe(),d1.getNe());
itr->second->cols(col,acol);
daughters.push_back(event.append(Particle(*(itr->second))));
acol = col;
}
d2.getParticlePtr()->acol(acol);
event[d2.getNe()].acol(acol);
}
else {
int acol = oldcol;
for (map<double, Particle*>::reverse_iterator itr = excitations.rbegin();
itr != excitations.rend(); ++itr) {
int col = event.nextColTag();
itr->second->status(51);
itr->second->mothers(d1.getNe(),d1.getNe());
itr->second->cols(col,acol);
daughters.push_back(event.append(Particle(*(itr->second))));
acol = col;
}
d2.getParticlePtr()->acol(acol);
event[d2.getNe()].acol(acol);
}
bool stringEnd = false;
if (d2.getParticlePtr()->col() == 0) stringEnd = true;
// Update status codes and mother/daughter indexing.
event[d1.getNe()].statusNeg();
Particle cc1 = *d1.getParticlePtr();
cc1.statusPos();
cc1.mothers(d1.getNe(),d1.getNe());
daughters.push_back(event.append(cc1));
event[d1.getNe()].daughters( daughters[0], daughters[daughters.size() -1 ] );
if (stringEnd) {
event[d2.getNe()].statusNeg();
Particle cc2 = *d2.getParticlePtr();
cc2.statusPos();
cc2.mothers(d2.getNe(),d2.getNe());
int did = event.append(cc2);
event[d2.getNe()].daughters(did,did);
}
}
//--------------------------------------------------------------------------
// Redistribute momentum to two particles.
void RopeDipole::splitMomentum(Vec4 mom, Particle* p1, Particle* p2,
double frac) {
Vec4 p1new = p1->p() + frac * mom;
Vec4 p2new = p2->p() + (1. - frac) * mom;
p1->p(p1new);
p2->p(p2new);
return;
}
//--------------------------------------------------------------------------
// Recoil the dipole from adding a gluon. If the "dummy" option is set,
// the recoil will not be added, but only checked.
// Note: the gluon will not actually be added, only the recoil (if possible).
bool RopeDipole::recoil(Vec4& pg, bool dummy) {
// Keep track of direction.
int sign = 1;
if (d1.rap(1.0) > d2.rap(1.0)) sign = -1;
// Lightcone momenta after inserting the gluon.
Particle* epaPtr = d1.getParticlePtr();
Particle* epcPtr = d2.getParticlePtr();
double pplus = epcPtr->pPos() + epaPtr->pPos() - pg.pPos();
double pminus = epcPtr->pNeg() + epaPtr->pNeg() - pg.pNeg();
// The new lightcone momenta of the dipole ends.
double ppa = 0.0;
double ppc = 0.0;
double pma = 0.0;
double pmc = 0.0;
double mta2 = epaPtr->mT2();
double mtc2 = epcPtr->mT2();
double mta = sqrt(mta2);
double mtc = sqrt(mtc2);
if ( pplus * pminus <= pow2(mta + mtc)
|| pplus <= 0.0 || pminus <= 0.0 ) return false;
// Calculate the new momenta.
double sqarg = pow2(pplus * pminus - mta2 - mtc2) - 4. * mta2 * mtc2;
if (sqarg <= 0.0 ) return false;
if (sign > 0) {
ppa = 0.5 * (pplus * pminus + mta2 - mtc2 + sqrt(sqarg)) / pminus;
pma = mta2 / ppa;
pmc = pminus - pma;
ppc = mtc2 / pmc;
// Check rapidity after recoil.
if ( ppa * mtc < ppc * mta ) return false;
}
else {
pma = 0.5 * (pplus * pminus + mta2 - mtc2 + sqrt(sqarg)) / pplus;
ppa = mta2 / pma;
ppc = pplus - ppa;
pmc = mtc2 / ppc;
// Check rapidity after recoil.
if ( ppa*mtc > ppc*mta ) return false;
}
// Set up and store the new momenta.
Vec4 shifta = Vec4( epaPtr->px(), epaPtr->py(),
0.5 * (ppa - pma), 0.5 * (ppa + pma));
Vec4 shiftc = Vec4( epcPtr->px(), epcPtr->py(),
0.5 * (ppc - pmc), 0.5 * (ppc + pmc));
if (!dummy) {
epaPtr->p(shifta);
epcPtr->p(shiftc);
}
return true;
}
//--------------------------------------------------------------------------
// Get the Lorentz matrix to go to the dipole rest frame.
RotBstMatrix RopeDipole::getDipoleRestFrame() {
if (hasRotTo) return rotTo;
RotBstMatrix r;
r.toCMframe(d1.getParticlePtr()->p(),d2.getParticlePtr()->p());
rotTo = r;
hasRotTo = true;
return rotTo;
}
//--------------------------------------------------------------------------
// Get the Lorentz matrix to go from the dipole rest frame to lab frame.
RotBstMatrix RopeDipole::getDipoleLabFrame() {
if(hasRotFrom) return rotFrom;
RotBstMatrix r;
r.fromCMframe(d1.getParticlePtr()->p(),d2.getParticlePtr()->p());
rotFrom = r;
hasRotFrom = true;
return rotFrom;
}
//--------------------------------------------------------------------------
// The dipole four-momentum.
Vec4 RopeDipole::dipoleMomentum() {
Vec4 ret = d1.getParticlePtr()->p() + d2.getParticlePtr()->p();
return ret;
}
//--------------------------------------------------------------------------
// Interpolate (linear) between dipole ends to get b position at given y.
// Here y must be given in dipole rest frame, and the resulting b-position
// will also be in the dipole rest frame.
Vec4 RopeDipole::bInterpolateDip(double y, double m0) {
if(!hasRotTo) getDipoleRestFrame();
Vec4 bb1 = d1.getParticlePtr()->vProd();
bb1.rotbst(rotTo);
Vec4 bb2 = d2.getParticlePtr()->vProd();
bb2.rotbst(rotTo);
double y1 = d1.rap(m0,rotTo);
double y2 = d2.rap(m0,rotTo);
return bb1 + y * (bb2 - bb1) / (y2 - y1);
}
//--------------------------------------------------------------------------
// Interpolate (linear) between dipole ends to get b position at given y.
Vec4 RopeDipole::bInterpolateLab(double y, double m0) {
Vec4 bb1 = d1.getParticlePtr()->vProd();
Vec4 bb2 = d2.getParticlePtr()->vProd();
double y1 = d1.rap(m0);
double y2 = d2.rap(m0);
return bb1 + y * (bb2 - bb1) / (y2 - y1);
}
//--------------------------------------------------------------------------
// Interpolate (linear) between dipole ends to get b position in
// a given frame at given y.
Vec4 RopeDipole::bInterpolate(double y, RotBstMatrix rb, double m0) {
Vec4 bb1 = d1.getParticlePtr()->vProd();
Vec4 bb2 = d2.getParticlePtr()->vProd();
bb1.rotbst(rb);
bb2.rotbst(rb);
double y1 = d1.rap(m0);
double y2 = d2.rap(m0);
return bb1 + y * (bb2 - bb1) / (y2 - y1);
}
//--------------------------------------------------------------------------
// Calculate the amount of overlapping dipoles at a given rapidity.
// Return the number of overlapping dipoles to the "left" and "right".
pair<int, int> RopeDipole::getOverlaps(double yfrac, double m0, double r0) {
// Transform yfrac to y in dipole rest frame
if (!hasRotTo) getDipoleRestFrame();
double yL = d1.rap(m0,rotTo);
double yS = d2.rap(m0,rotTo);
double yH = yS + (yL - yS) * yfrac;
int m = 0, n = 0;
for (size_t i = 0; i < overlaps.size(); ++i) {
if (overlaps[i].overlap( yfrac, bInterpolateDip(yH,m0), r0)
&& !overlaps[i].hadronized()) {
if (overlaps[i].dir > 0) ++m;
else ++n;
}
}
return make_pair(m,n);
}
//==========================================================================
// Exc class.
// It is a helper class to Ropewalk, used to describe a pair of excitations
// needed for shoving. It is kept away from users, as there are a lot of
// raw pointers floating around.
//--------------------------------------------------------------------------
struct Exc {
// The constructor.
Exc(double yIn, double m0In, int iIn, int jIn, int kIn, RopeDipole* dip1In,
RopeDipole* dip2In) : y(yIn), m0(m0In), i(iIn), j(jIn), k(kIn), pp1(NULL),
pp2(NULL), dip1(dip1In), dip2(dip2In) { }
// Set pointers to the two excitation particles.
void setParticlePtrs(Particle* p1, Particle* p2) {
pp1 = p1;
pp2 = p2;
// Set a pointer to the excitation in the dipole.
dip1->addExcitation(y, pp1);
dip2->addExcitation(y, pp2);
}
// Give the excitation a kick in the x and y direction,
void shove(double dpx, double dpy) {
// The old momenta.
Vec4 p2 = pp2->p();
Vec4 p1 = pp1->p();
// The new momenta, after the shove.
double mt2new = sqrt(pow2(p2.px() - dpx) + pow2(p2.py() - dpy));
double e2new = mt2new * cosh(y);
double p2znew = mt2new * sinh(y);
Vec4 p2new(p2.px() - dpx, p2.py() - dpy, p2znew, e2new);
double mt1new = sqrt(pow2(p1.px() + dpx) + pow2(p1.py() + dpy));
double e1new = mt1new * cosh(y);
double p1znew = mt1new * sinh(y);
Vec4 p1new(p1.px() + dpx, p1.py() + dpy, p1znew, e1new);
// The differences between the two.
Vec4 deltap1 = p1new - p1;
Vec4 deltap2 = p2new - p2;
// Now check if we can add these two excitations to the dipoles.
if ( dip2->recoil(deltap2) ) {
if ( dip1->recoil(deltap1) ) {
pp1->p(p1new);
pp2->p(p2new);
} else {
Vec4 dp2 = -deltap2;
dip2->recoil(dp2);
}
}
}
// The push direction as a four vector.
Vec4 direction() {
return dip1->bInterpolateDip(y,m0) -
dip2->bInterpolateDip(y,m0);
}
// Member variables, slice rapidity and small cut-off mass.
double y;
double m0;
// Local particle indices.
int i, j, k;
Particle* pp1;
Particle* pp2;
RopeDipole* dip1;
RopeDipole* dip2;
};
//==========================================================================
// Ropewalk class.
// This class keeps track of all the strings making up ropes for shoving
// as well as flavour enhancement.
//--------------------------------------------------------------------------
// The Ropewalk init function sets parameters and pointers.
bool Ropewalk::init(Info* infoPtrIn, Settings& settings, Rndm* rndmPtrIn) {
// Save pointers.
infoPtr = infoPtrIn;
rndmPtr = rndmPtrIn;
// Parameters of the ropewalk.
doShoving = settings.flag("Ropewalk:doShoving");
shoveMiniStrings = settings.flag("Ropewalk:shoveMiniStrings");
shoveJunctionStrings = settings.flag("Ropewalk:shoveJunctionStrings");
shoveGluonLoops = settings.flag("Ropewalk:shoveGluonLoops");
limitMom = settings.flag("Ropewalk:limitMom");
mStringMin = settings.parm("HadronLevel:mStringMin");
r0 = settings.parm("Ropewalk:r0");
m0 = settings.parm("Ropewalk:m0");
pTcut = settings.parm("Ropewalk:pTcut");
rCutOff = settings.parm("Ropewalk:rCutOff");
gAmplitude = settings.parm("Ropewalk:gAmplitude");
gExponent = settings.parm("Ropewalk:gExponent");
deltay = settings.parm("Ropewalk:deltay");
deltat = settings.parm("Ropewalk:deltat");
tShove = settings.parm("Ropewalk:tShove");
tInit = settings.parm("Ropewalk:tInit");
showerCut = settings.parm("TimeShower:pTmin");
alwaysHighest = settings.flag("Ropewalk:alwaysHighest");
// Check consistency.
if (deltat > tShove) {
infoPtr->errorMsg("Error in Ropewalk::init: "
"deltat cannot be larger than tShove");
return false;
}
return true;
}
//--------------------------------------------------------------------------
// Calculate the average string tension of the event, in units of the default
// string tension (ie. 1 GeV/fm), using random walk in colour space.
double Ropewalk::averageKappa() {
double kap = 0.;
double nd = 0;
for (DMap::iterator itr = dipoles.begin(); itr != dipoles.end(); ++itr) {
// Getting the overlaps: m, n.
pair<int,int> overlap = itr->second.getOverlaps( rndmPtr->flat(), m0, r0);
// Overlaps define the number of steps taken in the random walk.
// We define the present dipole to always point in the p-direction.
pair<double, double> pq = select( overlap.first + 1, overlap.second,
rndmPtr);
double enh = 0.25 * (2. + 2. * pq.first + pq.second);
kap += (enh > 1.0 ? enh : 1.0);
nd += 1.0;
}
return kap / nd;
}
//--------------------------------------------------------------------------
// Calculate the effective string tension a fraction yfrac in on the dipole,
// given by indices e1 and e2.
double Ropewalk::getKappaHere(int e1, int e2, double yfrac) {
multimap< pair<int,int>, RopeDipole >::iterator
itr = dipoles.find( make_pair(e1,e2) );
if (itr == dipoles.end()) itr = dipoles.find( make_pair(e2,e1) );
if (itr == dipoles.end()) return 1.0;
RopeDipole* d = &(itr->second);
d->hadronized(true);
// Get quantum numbers m and n.
pair<int, int> overlap = d->getOverlaps(yfrac, m0, r0);
pair<double, double> pq;
// If we are always in the highest multiplet, we need not do
// a random walk
if (alwaysHighest) {
pq = make_pair(overlap.first + 1, overlap.second);
}
// Invoke default random walk procedure.
else {
pq = select(overlap.first + 1, overlap.second, rndmPtr);
}
// Calculate enhancement factor.
double enh = 0.25 * (2. + 2. * pq.first + pq.second);
return (enh > 1.0 ? enh : 1.0);
}
//--------------------------------------------------------------------------
// Calculate all overlaps of all dipoles and store as OverlappingRopeDipoles.
bool Ropewalk::calculateOverlaps() {
// Go through all dipoles.
for (multimap< pair<int,int>, RopeDipole>::iterator itr = dipoles.begin();
itr != dipoles.end(); ++itr ) {
RopeDipole* d1 = &(itr->second);
if (d1->dipoleMomentum().m2Calc() < pow2(m0)) continue;
// RopeDipoles rapidities in dipole rest frame.
RotBstMatrix dipoleRestFrame = d1->getDipoleRestFrame();
double yc1 = d1->d1Ptr()->rap(m0, dipoleRestFrame);
double ya1 = d1->d2Ptr()->rap(m0, dipoleRestFrame);
if (yc1 <= ya1) continue;
// Go through all possible overlapping dipoles.
for (multimap< pair<int,int>, RopeDipole>::iterator itr2 = dipoles.begin();
itr2 != dipoles.end(); ++itr2) {
RopeDipole* d2 = &(itr2->second);
// Skip self and overlaps with miniscule dipoles.
if (d1 == d2) continue;
if (d2->dipoleMomentum().m2Calc() < pow2(m0)) continue;
// Ignore if not overlapping in rapidity.
OverlappingRopeDipole od(d2, m0, dipoleRestFrame);
if (min(od.y1, od.y2) > yc1 || max(od.y1, od.y2) < ya1 || od.y1 == od.y2)
continue;
d1->addOverlappingDipole(od);
}
}
return true;
}
//--------------------------------------------------------------------------
// Invoke the random walk of colour states.
pair<int, int> Ropewalk::select(int m, int n, Rndm* rndm) {
// Initial valuesM mm and nn are step counters.
int p = 0, q = 0;
int mm = m, nn = n;
// We must take all steps before terminating.
while (mm + nn > 0) {
// Take randomly a step in one direction.
if (rndm->flat() < 0.5 && mm > 0) {
--mm;
// Calculate the step probabilities.
double p1 = multiplicity(p + 1, q);
double p2 = multiplicity(p, q - 1);
double p3 = multiplicity(p - 1, q + 1);
// Normalization.
double sum = p1 + p2 + p3;
p1 /= sum, p2 /= sum, p3 /= sum;
// Select a state.
double pick = rndm->flat();
if (pick < p1) ++p;
else if (pick < p1 + p2) --q;
else --p, ++q;
}
// As above, but for nn.
else if (nn > 0) {
--nn;
double p1 = multiplicity(p, q + 1);
double p2 = multiplicity(p -1, q);
double p3 = multiplicity(p + 1, q - 1);
double sum = p1 + p2 + p3;
p1 /= sum, p2 /= sum, p3 /= sum;
double pick = rndm->flat();
if (pick < p1) ++q;
else if (pick < p1 + p2) --p;
else --q, ++p;
}
}
// Done.
return make_pair( (p < 0 ? 0 : p), (q < 0 ? 0 : q) );
}
//--------------------------------------------------------------------------
// Shove all dipoles in the event.
void Ropewalk::shoveTheDipoles(Event& event) {
// Possibility of some initial propagation.
if ( tInit > 0.0) {
for (DMap::iterator dItr = dipoles.begin(); dItr != dipoles.end(); ++dItr)
dItr->second.propagateInit(tInit);
}
// The rapidity slices.
multimap<double, RopeDipole *> rapDipoles;
// Order the dipoles in max rapidity.
double ymin = 0;
double ymax = 0;
for (DMap::iterator dItr = dipoles.begin(); dItr != dipoles.end(); ++dItr) {
RopeDipole* dip = &(dItr->second);
// Order the dipoles in max rapidity.
rapDipoles.insert( make_pair(dip->maxRapidity(m0), dip) );
// Find maximal and minimal rapidity to sample.
if (dip->minRapidity(m0) < ymin) ymin = dip->minRapidity(m0);
if (dip->maxRapidity(m0) > ymax) ymax = dip->maxRapidity(m0);
}
// Do the sampling from flat distribution.
vector<double> rapidities;
for (double y = ymin; y < ymax; y += deltay) rapidities.push_back(y);
// For each value of ySample, we have a vector of excitation pairs.
map<double, vector<Exc> > exPairs;
for (int i = 0, N = eParticles.size(); i < N; ++i) eParticles[i].clear();
eParticles.clear();
for (int i = 0, N = rapidities.size(); i < N; ++i) {
// Construct an empty vector of excitation particles.
eParticles.push_back( vector<Particle>() );
// Find dipoles sampled in this slice, and store them temporarily.
double ySample = rapidities[i];
vector<RopeDipole*> tmp;
for (multimap<double, RopeDipole*>::iterator
rItr = rapDipoles.lower_bound(ySample); rItr != rapDipoles.end(); ++rItr) {
if (rItr->second->minRapidity(m0) < ySample)
tmp.push_back(rItr->second);
}
// Construct excitation particles, one for each sampled dipole in this slice.
vector<int> eraseDipoles;
for (int j = 0, M = tmp.size(); j < M; ++j) {
Vec4 ex;
// Test if the dipole can bear the excitation.
if (!tmp[j]->recoil(ex,true) ) {
eraseDipoles.push_back(j);
}
}
// Erase dipoles which could not bear an excitation.
for (int j = 0, M = eraseDipoles.size(); j < M; ++j) {
tmp.erase( tmp.begin() + (eraseDipoles[j]-j) );
}
// Add the actual excitations, but only if we can create pairs.
if( int(tmp.size()) > 1)
for (int j = 0, M = tmp.size(); j < M; ++j) {
Vec4 ex;
// We boost the excitation back from dipole rest frame.
tmp[j]->recoil(ex,false);
Particle pp = Particle(21, 22, 0, 0, 0, 0, 0, 0, ex);
pp.vProd( tmp[j]->bInterpolateLab(ySample,m0) );
eParticles[i].push_back(pp);
}
// Construct all pairs of possible excitations in this slice.
exPairs[ySample] = vector<Exc>();
for (int j = 0, M = tmp.size(); j < M; ++j)
for (int k = 0; k < M; ++k) {
// Don't allow a string to shove itself.
if(j != k && tmp[j]->index() != tmp[k]->index() )
exPairs[ySample].push_back( Exc(ySample, m0, i, j, k, tmp[j],
tmp[k]) );
}
}
// Give the excitations pointers to the excitation particles.
for (map<double, vector<Exc> >::iterator slItr = exPairs.begin();
slItr != exPairs.end(); ++slItr) {
for (int i = 0, N = slItr->second.size(); i < N; ++i) {
Exc& ep = slItr->second[i];
ep.setParticlePtrs( &eParticles[ep.i][ep.j], &eParticles[ep.i][ep.k] );
}
}
// Shoving loop.
for (double t = tInit; t < tShove + tInit; t += deltat) {
// For all slices.
for (map<double, vector<Exc> >::iterator slItr = exPairs.begin();
slItr != exPairs.end(); ++slItr)
// For all excitation pairs.
for (int i = 0, N = slItr->second.size(); i < N; ++i) {
Exc& ep = slItr->second[i];
// The direction vector is a space-time four-vector.
Vec4 direction = ep.direction();
// The string radius is time dependent,
// growing with the speed of light.
// Minimal string size is 1 / shower cut-off
// converted to fm.
double rt = max(t, 1. / showerCut / 5.068);
rt = min(rt, r0 * gExponent);
double dist = direction.pT();
// Calculate the push, its direction and do the shoving.
if (dist < rCutOff * rt) {
// Gain function.
double gain = 0.5 * deltay * deltat * gAmplitude * dist / rt / rt
* exp( -0.25 * dist * dist / rt / rt);
double dpx = dist > 0.0 ? gain * direction.px() / dist: 0.0;
double dpy = dist > 0.0 ? gain * direction.py() / dist: 0.0;
ep.shove(dpx, dpy);
}
}
// Propagate the dipoles.
for (DMap::iterator dItr = dipoles.begin(); dItr != dipoles.end(); ++dItr)
dItr->second.propagate(deltat, m0);
}
// Add the excitations to the dipoles.
for (DMap::iterator dItr = dipoles.begin(); dItr != dipoles.end(); ++dItr) {
RopeDipole* dip = &(dItr->second);
if (dip->nExcitations() > 0) dip->excitationsToString( m0, event);
}
}
//--------------------------------------------------------------------------
// Extract all dipoles from an event.
bool Ropewalk::extractDipoles(Event& event, ColConfig& colConfig) {
// Go through all strings in the event.
dipoles.clear();
for (int iSub = 0; iSub < colConfig.size(); ++iSub) {
// We can exclude loops, junctions and ministrings from the Ropewalk.
if (colConfig[iSub].hasJunction && !shoveJunctionStrings) continue;
if (colConfig[iSub].isClosed && !shoveGluonLoops) continue;
if (colConfig[iSub].massExcess <= mStringMin && !shoveMiniStrings)
continue;
colConfig.collect(iSub,event);
vector<int> stringPartons = colConfig[iSub].iParton;
vector<RopeDipole> stringDipole;
bool stringStart = true;
RopeDipoleEnd previous;
for (int iPar = int(stringPartons.size() - 1); iPar > -1; --iPar) {
if (stringPartons[iPar] > 0) {
// Ordinary particle.
RopeDipoleEnd next( &event, stringPartons[iPar]);
// If we are at the first parton, no dipole.
if ( !stringStart) {
// Get the parton placement in Event Record.
pair<int,int> dipoleER = make_pair( stringPartons[iPar + 1],
stringPartons[iPar] );
RopeDipole test(previous, next, iSub, infoPtr);
if ( limitMom && test.dipoleMomentum().pT() < pTcut)
dipoles.insert( pair< pair<int, int>, RopeDipole>(dipoleER,
RopeDipole( previous, next, iSub, infoPtr)) );
else if (!limitMom)
dipoles.insert( pair< pair<int, int>, RopeDipole>(dipoleER,
RopeDipole( previous, next, iSub, infoPtr)));
}
previous = next;
stringStart = false;
}
else continue;
}
// We have created all dipoles.
}
return true;
}
//==========================================================================
// RopeFragPars recalculates fragmentation parameters according to a
// changed string tension. Helper class to FlavourRope.
//--------------------------------------------------------------------------
// Constants: could be changed here if desired, but normally should not.
// Initial step size for a calculation.
const double RopeFragPars::DELTAA = 0.1;
// Convergence criterion for a calculation.
const double RopeFragPars::ACONV = 0.001;
// Low z cut-off in fragmentation function.
const double RopeFragPars::ZCUT = 1.0e-4;
//--------------------------------------------------------------------------
// The init function sets up initial parameters from settings.
void RopeFragPars::init(Info* infoPtrIn, Settings& settings) {
// Info pointer.
infoPtr = infoPtrIn;
// The junction parameter.
beta = settings.parm("Ropewalk:beta");
// Initialize default values from input settings.
const int len = 9;
string params [len] = {"StringPT:sigma", "StringZ:aLund",
"StringZ:aExtraDiquark","StringZ:bLund", "StringFlav:probStoUD",
"StringFlav:probSQtoQQ", "StringFlav:probQQ1toQQ0", "StringFlav:probQQtoQ",
"StringFlav:kappa"};
double* variables[len] = {&sigmaIn, &aIn, &adiqIn, &bIn, &rhoIn, &xIn,
&yIn, &xiIn, &kappaIn};
for (int i = 0; i < len; ++i) *variables[i] = settings.parm(params[i]);
// Insert the h = 1 case immediately.
sigmaEff = sigmaIn, aEff = aIn, adiqEff = adiqIn, bEff = bIn,
rhoEff = rhoIn, xEff = xIn, yEff = yIn, xiEff = xiIn, kappaEff = kappaIn;
if (!insertEffectiveParameters(1.0)) infoPtr->errorMsg(
"Error in RopeFragPars::init: failed to insert defaults.");
}
//--------------------------------------------------------------------------
// Return parameters at given string tension, ordered by their
// name for easy insertion in settings.
map<string,double> RopeFragPars::getEffectiveParameters(double h) {
map<double, map<string, double> >::iterator parItr = parameters.find(h);
// If the parameters are already calculated, return them.
if ( parItr != parameters.end()) return parItr->second;
// Otherwise calculate them.
if (!calculateEffectiveParameters(h))
infoPtr->errorMsg("Error in RopeFragPars::getEffectiveParameters:"
" calculating effective parameters.");
// And insert them.
if (!insertEffectiveParameters(h))
infoPtr->errorMsg("Error in RopeFragPars::getEffectiveParameters:"
" inserting effective parameters.");
// And recurse.
return getEffectiveParameters(h);
}
//--------------------------------------------------------------------------
// Get the Fragmentation function a parameter from cache or calculate it.
double RopeFragPars::getEffectiveA(double thisb, double mT2, bool isDiquark) {
// Check for the trivial case.
if (thisb == bIn) return (isDiquark ? aIn + adiqIn : aIn);
// We order by b*mT2
map<double, double>* aMPtr = (isDiquark ? &aDiqMap : &aMap);
double bmT2 = mT2 * thisb;
// Check if we have already calculated this a value before.
map<double,double>::iterator aItr = aMPtr->find(bmT2);
if (aItr != aMPtr->end()) return aItr->second;
// Otherwise calculate it.
double ae = ( isDiquark ? aEffective(aIn + adiqIn, thisb, mT2)
: aEffective(aIn, thisb, mT2) );
if (isDiquark) {
double suba = getEffectiveA(thisb, mT2, false);
aMPtr->insert( make_pair(bmT2, ae - suba) );
}
else aMPtr->insert(make_pair(bmT2, ae));
return ae;
}
//--------------------------------------------------------------------------
// Calculate the effective parameters.
bool RopeFragPars::calculateEffectiveParameters(double h) {
if (h <= 0) return false;
double hinv = 1.0 / h;
// Start with the easiest transformations.
// The string tension kappa.
kappaEff = kappaIn * h;
// Strangeness.
rhoEff = pow(rhoIn, hinv);
// Strange diquarks.
xEff = pow(xIn, hinv);
// Spin.
yEff = pow(yIn, hinv);
// pT distribution width.
sigmaEff = sigmaIn * sqrt(h);
// Derived quantity alpha.
double alpha = (1 + 2. * xIn * rhoIn + 9. * yIn + 6. * xIn * rhoIn * yIn
+ 3. * yIn * xIn * xIn * rhoIn * rhoIn) / (2. + rhoIn);
double alphaEff = (1. + 2. * xEff * rhoEff + 9. * yEff
+ 6. * xEff * rhoEff * yEff + 3. * yEff * xEff * xEff * rhoEff * rhoEff)
/ (2. + rhoEff);
// Baryons.
xiEff = alphaEff * beta * pow( xiIn / alpha / beta, hinv);
if (xiEff > 1.0) xiEff = 1.0;
if (xiEff < xiIn) xiEff = xiIn;
// Fragmentation function b.
bEff = (2. + rhoEff) / (2. + rhoIn) * bIn;
if (bEff < bIn) bEff = bIn;
if (bEff > 2.0) bEff = 2.0;
// We calculate a for a typical particle with mT2 = 1 GeV^2.
aEff = getEffectiveA( bEff, 1.0, false);
adiqEff = getEffectiveA( bEff, 1.0, true) - aEff;
return true;
}
//--------------------------------------------------------------------------
// Insert calculated parameters in cache for later (re-)use.
bool RopeFragPars::insertEffectiveParameters(double h) {
map<string,double> p;
p["StringPT:sigma"] = sigmaEff;
p["StringZ:bLund"] = bEff;
p["StringFlav:probStoUD"] = rhoEff;
p["StringFlav:probSQtoQQ"] = xEff;
p["StringFlav:probQQ1toQQ0"] = yEff;
p["StringFlav:probQQtoQ"] = xiEff;
p["StringZ:aLund"] = aEff;
p["StringZ:aExtraDiquark"] = adiqEff;
p["StringFlav:kappa"] = kappaEff;
return (parameters.insert( make_pair(h,p)).second );
}
//--------------------------------------------------------------------------
// Calculate the a parameter.
double RopeFragPars::aEffective(double aOrig, double thisb, double mT2) {
// Calculate initial normalization constants.
double N = integrateFragFun(aOrig, bIn, mT2);
double NEff = integrateFragFun(aOrig, thisb, mT2);
int s = (N < NEff) ? -1 : 1;
double da = DELTAA;
double aNew = aOrig - s * da;
// Iterate until we meet preset convergence criterion.
do {
// Calculate normalization with current a.
NEff = integrateFragFun(aNew, thisb, mT2);
if ( ((N < NEff) ? -1 : 1) != s ) {
s = (N < NEff) ? -1 : 1;
// If we have crossed over the solution, decrease
// the step size and turn around.
da /= 10.0;
}
aNew -= s * da;
if (aNew < 0.0) {aNew = 0.1; break;}
if (aNew > 2.0) {aNew = 2.0; break;}
} while (da > ACONV);
return aNew;
}
//--------------------------------------------------------------------------
// The Lund fragmentation function.
double RopeFragPars::fragf(double z, double a, double b, double mT2) {
if (z < ZCUT) return 0.0;
return pow(1 - z, a) * exp(-b * mT2 / z) / z;
}
//--------------------------------------------------------------------------
// Integral of the Lund fragmentation function with given parameter values.
double RopeFragPars::integrateFragFun(double a, double b, double mT2) {
// Using Simpson's rule to integrate the Lund fragmentation function.
double nextIter, nextComb;
double thisComb = 0.0, thisIter = 0.0;
// The target error on the integral should never be changed.
double error = 1.0e-2;
// 20 is the max number of iterations, 3 is min. Should not be changed.
for (int i = 1; i < 20; ++i) {
nextIter = trapIntegrate( a, b, mT2, thisIter, i);
nextComb = (4.0 * nextIter - thisIter) / 3.0;
if (i > 3 && abs(nextComb - thisComb) < error * abs(nextComb))
return nextComb;
thisIter = nextIter;
thisComb = nextComb;
}
infoPtr->errorMsg("RopeFragPars::integrateFragFun:"
"No convergence of frag fun integral.");
return 0.0;
}
//--------------------------------------------------------------------------
// Helper function for integration.
double RopeFragPars::trapIntegrate( double a, double b, double mT2,
double sOld, int n) {
// Compute the nth correction to the integral of fragfunc between 0 and 1
// using extended trapezoidal rule.
if (n == 1) return 0.5 * (fragf(0.0, a, b, mT2) + fragf(1.0, a, b, mT2));
// We want 2^(n-2) interior points (intp). Use bitwise shift to speed up.
int intp = 1;
intp <<= n - 2;
double deltaz = 1.0 / double(intp);
double z = 0.5 * deltaz;
double sum = 0.0;
// Do the integral.
for (int i = 0; i < intp; ++i, z += deltaz) sum += fragf( z, a, b, mT2);
return 0.5 * (sOld + sum / double(intp));
}
//==========================================================================
// The FlavourRope class takes care of placing a string breakup in
// the event, and assigning the string breakup effective parameters.
//--------------------------------------------------------------------------
// Change the fragmentation parameters.
bool FlavourRope::doChangeFragPar(StringFlav* flavPtr, StringZ* zPtr,
StringPT * pTPtr, double m2Had, vector<int> iParton, int endId) {
// The new parameters.
map<string, double> newPar;
if (doBuffon)
newPar = fetchParametersBuffon(m2Had, iParton, endId);
else
newPar = fetchParameters(m2Had, iParton, endId);
// Change settings to new settings.
for (map<string, double>::iterator itr = newPar.begin(); itr!=newPar.end();
++itr) settingsPtr->parm( itr->first, itr->second);
// Re-initialize flavour, z, and pT selection with new settings.
flavPtr->init( *settingsPtr, particleDataPtr, rndmPtr, infoPtr);
zPtr->init( *settingsPtr, *particleDataPtr, rndmPtr, infoPtr);
pTPtr->init( *settingsPtr, particleDataPtr, rndmPtr, infoPtr);
return true;
}
//--------------------------------------------------------------------------
// Find breakup placement and fetch effective parameters using Buffon.
map<string, double> FlavourRope::fetchParametersBuffon(double m2Had,
vector<int> iParton, int endId) {
// If effective string tension is set manually, use that.
if (fixedKappa) return fp.getEffectiveParameters(h);
if (!ePtr) {
infoPtr->errorMsg("Error in FlavourRope::fetchParametersBuffon:"
" Event pointer not set in FlavourRope");
return fp.getEffectiveParameters(1.0);
}
if(find(hadronized.begin(),hadronized.end(),*iParton.begin()) ==
hadronized.end()){
hadronized.reserve(hadronized.size() + iParton.size());
hadronized.insert(hadronized.end(),iParton.begin(),iParton.end());
}
// Quark string ends, default mode
if (endId != 21){
// Test consistency
if(ePtr->at(*(iParton.begin())).id() != endId &&
ePtr->at(*(iParton.end() - 1)).id() != endId) {
infoPtr->errorMsg("Error in FlavourRope::fetchParametersBuffon:"
" Quark end inconsistency.");
return fp.getEffectiveParameters(1.0);
}
// First we must let the string vector point in the right direction
if(ePtr->at(*(iParton.begin())).id() != endId)
reverse(iParton.begin(),iParton.end());
// Initialize a bit
Vec4 hadronic4Momentum(0,0,0,0);
double enh = 1.0;
double dipFrac;
vector<int>::iterator dipItr;
// Find out when invariant mass exceeds m2Had
for(dipItr = iParton.begin(); dipItr != iParton.end(); ++dipItr){
double m2Big = hadronic4Momentum.m2Calc();
if( m2Had <= m2Big){
// Approximate the fraction we are in on the dipole, this goes
// in three cases.
// We are at the beginning.
if(m2Had == 0){
dipFrac = 0;
}
// We are somewhere in the first dipole
else if(dipItr - 1 == iParton.begin()){
dipFrac = sqrt(m2Had/m2Big);
}
else{
if(ePtr->at(*(dipItr - 1)).id() != 21) {
infoPtr->errorMsg("Error in FlavourRope::fetchParametersBuffon:"
" Connecting partons should always be gluons.");
return fp.getEffectiveParameters(1.0);
}
hadronic4Momentum -= 0.5*ePtr->at(*(dipItr -1)).p();
double m2Small = hadronic4Momentum.m2Calc();
dipFrac = (sqrt(m2Had) - sqrt(m2Small)) /
(sqrt(m2Big) - sqrt(m2Small));
}
break;
}
hadronic4Momentum += ePtr->at(*dipItr).id() == 21 ?
0.5*ePtr->at(*dipItr).p() : ePtr->at(*dipItr).p();
}
// If we reached the end
// we are in a small string that should just be collapsed
if(dipItr == iParton.end())
return fp.getEffectiveParameters(1.0);
// Sanity check
if(dipFrac < 0 || dipFrac > 1) {
infoPtr->errorMsg("Error in FlavourRope::fetchParametersBuffon:"
" Dipole exceed with fraction less than 0 or greater than 1.");
return fp.getEffectiveParameters(1.0);
}
// We now figure out at what rapidity value,
// in the lab system, the string is breaking
double yBreak;
// Trivial case, just inherit
if(dipFrac == 0)
yBreak = ePtr->at(*dipItr).y();
else{
// Sanity check
if(dipItr == iParton.begin()) {
infoPtr->errorMsg("Error in FlavourRope::fetchParametersBuffon:"
" We are somehow before the first dipole on a string.");
return fp.getEffectiveParameters(1.0);
}
double dy = ePtr->at(*dipItr).y() - ePtr->at(*(dipItr - 1)).y();
yBreak = ePtr->at(*(dipItr - 1)).y() + dipFrac*dy;
}
// Count the number of partons in the whole
// event within deltay of breaking point
double p = 1;
double q = 0;
for(int i = 0; i < ePtr->size(); ++i){
// Don't double count partons from this
// string (no self-overlap)
if(find(iParton.begin(),iParton.end(), i) != iParton.end())
continue;
// Don't count strings that are already hadronized
if(find(hadronized.begin(),hadronized.end(),i) != hadronized.end())
continue;
double pRap = ePtr->at(i).y();
if(pRap > yBreak - rapiditySpan && pRap < yBreak + rapiditySpan ){
// Do a "Buffon" selection to decide whether
// two strings overlap in impact parameter space
// given ratio of string diameter to collision diameter
double r1 = rndmPtr->flat();
double r2 = rndmPtr->flat();
double theta1 = 2*M_PI*rndmPtr->flat();
double theta2 = 2*M_PI*rndmPtr->flat();
// Overlap?
if(4*pow2(stringProtonRatio) > pow2(sqrt(r1)*cos(theta1) -
sqrt(r2)*cos(theta2)) + pow2(sqrt(r1)*sin(theta1) -
sqrt(r2)*sin(theta2))) {
if(rndmPtr->flat() < 0.5) p += 0.5;
else q += 0.5;
}
}
}
enh = 0.25*(2.0*p+q+2.0);
return fp.getEffectiveParameters(enh);
}
// For closed gluon loops we cannot distinguish the ends.
// Do nothing instead
else{
return fp.getEffectiveParameters(1.0);
}
return fp.getEffectiveParameters(1.0);
}
//--------------------------------------------------------------------------
// Find breakup placement and fetch effective parameters using Ropewalk.
map<string, double> FlavourRope::fetchParameters(double m2Had,
vector<int> iParton, int endId) {
// If effective string tension is set manually, use that.
if (fixedKappa) return fp.getEffectiveParameters(h);
if (!ePtr) {
infoPtr->errorMsg("Error in FlavourRope::fetchParameters:"
" Event pointer not set in FlavourRope");
return fp.getEffectiveParameters(1.0);
}
Vec4 mom;
int eventIndex = -1;
// Set direction
bool dirPos;
if( ePtr->at(iParton[0]).id() == endId) dirPos = true;
else if( ePtr->at(iParton[iParton.size() - 1]).id() == endId) dirPos = false;
else {
infoPtr->errorMsg("Error in FlavourRope::fetchParameters:"
" Could not get string direction");
return fp.getEffectiveParameters(1.0);
}
for (int i = 0, N = iParton.size(); i < N; ++i) {
// Change to right direction
int j = (dirPos ? i : N - 1 - i);
// Skip the junction entry.
if ( iParton[j] < 0) continue;
mom += ePtr->at(iParton[j]).p();
if ( mom.m2Calc() > m2Had) {
eventIndex = j;
break;
}
}
// We figure out where we are on the dipole.
// Set some values.
double m2Here = mom.m2Calc();
// The dipFrac signifies a fraction.
double dipFrac = 0;
// We are in the first dipole.
if (eventIndex == -1 || eventIndex == 0) {
eventIndex = 0;
dipFrac = sqrt(m2Had / m2Here);
}
else {
mom -= ePtr->at(iParton[eventIndex]).p();
double m2Small = mom.m2Calc();
dipFrac = (sqrt(m2Had) - sqrt(m2Small)) / (sqrt(m2Here) - sqrt(m2Small));
}
double enh = rwPtr->getKappaHere( iParton[eventIndex],
iParton[eventIndex + 1], dipFrac);
return fp.getEffectiveParameters(enh);
}
//==========================================================================
} // End namespace Pythia8
| {
"content_hash": "8b61bb0eac511df5f6b30bcfb2a5b674",
"timestamp": "",
"source": "github",
"line_count": 1352,
"max_line_length": 79,
"avg_line_length": 32.83801775147929,
"alnum_prop": 0.572651305268374,
"repo_name": "alisw/AliRoot",
"id": "d2116fd2d9312f5472d3a0ea941290c8cad662a4",
"size": "44851",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "PYTHIA8/pythia8243/src/Ropewalk.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "43769"
},
{
"name": "C",
"bytes": "24429327"
},
{
"name": "C++",
"bytes": "134530752"
},
{
"name": "CMake",
"bytes": "1300179"
},
{
"name": "CSS",
"bytes": "33858"
},
{
"name": "Cuda",
"bytes": "98171"
},
{
"name": "Fortran",
"bytes": "33388792"
},
{
"name": "GLSL",
"bytes": "1809"
},
{
"name": "HTML",
"bytes": "12466143"
},
{
"name": "Hack",
"bytes": "767690"
},
{
"name": "JavaScript",
"bytes": "1775"
},
{
"name": "Jupyter Notebook",
"bytes": "3909280"
},
{
"name": "M4",
"bytes": "77872"
},
{
"name": "Makefile",
"bytes": "830239"
},
{
"name": "NASL",
"bytes": "18663"
},
{
"name": "PHP",
"bytes": "13405956"
},
{
"name": "PLSQL",
"bytes": "867035"
},
{
"name": "POV-Ray SDL",
"bytes": "2304"
},
{
"name": "Pascal",
"bytes": "19317"
},
{
"name": "Pawn",
"bytes": "973"
},
{
"name": "Perl",
"bytes": "12019"
},
{
"name": "PostScript",
"bytes": "3111579"
},
{
"name": "Python",
"bytes": "69225"
},
{
"name": "Shell",
"bytes": "389689"
},
{
"name": "SourcePawn",
"bytes": "673"
},
{
"name": "TeX",
"bytes": "936449"
}
],
"symlink_target": ""
} |
package hudson.tasks;
import hudson.FilePath;
import hudson.Util;
import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.model.PersistentDescriptor;
import hudson.remoting.VirtualChannel;
import hudson.util.FormValidation;
import java.io.IOException;
import java.io.ObjectStreamException;
import hudson.util.LineEndingConversion;
import jenkins.security.MasterToSlaveCallable;
import net.sf.json.JSONObject;
import org.apache.commons.lang.SystemUtils;
import org.jenkinsci.Symbol;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.DoNotUse;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.QueryParameter;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.CheckForNull;
/**
* Executes a series of commands by using a shell.
*
* @author Kohsuke Kawaguchi
*/
public class Shell extends CommandInterpreter {
@DataBoundConstructor
public Shell(String command) {
super(LineEndingConversion.convertEOL(command, LineEndingConversion.EOLType.Unix));
}
private Integer unstableReturn;
/**
* Older versions of bash have a bug where non-ASCII on the first line
* makes the shell think the file is a binary file and not a script. Adding
* a leading line feed works around this problem.
*/
private static String addLineFeedForNonASCII(String s) {
if(!s.startsWith("#!")) {
if (s.indexOf('\n')!=0) {
return "\n" + s;
}
}
return s;
}
public String[] buildCommandLine(FilePath script) {
if(command.startsWith("#!")) {
// interpreter override
int end = command.indexOf('\n');
if(end<0) end=command.length();
List<String> args = new ArrayList<>(Arrays.asList(Util.tokenize(command.substring(0, end).trim())));
args.add(script.getRemote());
args.set(0,args.get(0).substring(2)); // trim off "#!"
return args.toArray(new String[0]);
} else
return new String[] { getDescriptor().getShellOrDefault(script.getChannel()), "-xe", script.getRemote()};
}
protected String getContents() {
return addLineFeedForNonASCII(LineEndingConversion.convertEOL(command,LineEndingConversion.EOLType.Unix));
}
protected String getFileExtension() {
return ".sh";
}
@CheckForNull
public final Integer getUnstableReturn() {
return new Integer(0).equals(unstableReturn) ? null : unstableReturn;
}
@DataBoundSetter
public void setUnstableReturn(Integer unstableReturn) {
this.unstableReturn = unstableReturn;
}
@Override
protected boolean isErrorlevelForUnstableBuild(int exitCode) {
return this.unstableReturn != null && exitCode != 0 && this.unstableReturn.equals(exitCode);
}
@Override
public DescriptorImpl getDescriptor() {
return (DescriptorImpl)super.getDescriptor();
}
private Object readResolve() throws ObjectStreamException {
Shell shell = new Shell(command);
shell.setUnstableReturn(unstableReturn);
return shell;
}
@Extension @Symbol("shell")
public static class DescriptorImpl extends BuildStepDescriptor<Builder> implements PersistentDescriptor {
/**
* Shell executable, or null to default.
*/
private String shell;
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;
}
public String getShell() {
return shell;
}
/**
* @deprecated 1.403
* Use {@link #getShellOrDefault(hudson.remoting.VirtualChannel) }.
*/
@Deprecated
public String getShellOrDefault() {
if (shell == null) {
return SystemUtils.IS_OS_WINDOWS ? "sh" : "/bin/sh";
}
return shell;
}
public String getShellOrDefault(VirtualChannel channel) {
if (shell != null)
return shell;
String interpreter = null;
try {
interpreter = channel.call(new Shellinterpreter());
} catch (IOException | InterruptedException e) {
LOGGER.log(Level.WARNING, null, e);
}
if (interpreter == null) {
interpreter = getShellOrDefault();
}
return interpreter;
}
public void setShell(String shell) {
this.shell = Util.fixEmptyAndTrim(shell);
save();
}
public String getDisplayName() {
return Messages.Shell_DisplayName();
}
/**
* Performs on-the-fly validation of the exit code.
*/
@Restricted(DoNotUse.class)
public FormValidation doCheckUnstableReturn(@QueryParameter String value) {
value = Util.fixEmptyAndTrim(value);
if (value == null) {
return FormValidation.ok();
}
long unstableReturn;
try {
unstableReturn = Long.parseLong(value);
} catch (NumberFormatException e) {
return FormValidation.error(hudson.model.Messages.Hudson_NotANumber());
}
if (unstableReturn == 0) {
return FormValidation.warning(hudson.tasks.Messages.Shell_invalid_exit_code_zero());
}
if (unstableReturn < 1 || unstableReturn > 255) {
return FormValidation.error(hudson.tasks.Messages.Shell_invalid_exit_code_range(unstableReturn));
}
return FormValidation.ok();
}
@Override
public boolean configure(StaplerRequest req, JSONObject data) throws FormException {
req.bindJSON(this, data);
return super.configure(req, data);
}
/**
* Check the existence of sh in the given location.
*/
public FormValidation doCheckShell(@QueryParameter String value) {
// Executable requires admin permission
return FormValidation.validateExecutable(value);
}
private static final class Shellinterpreter extends MasterToSlaveCallable<String, IOException> {
private static final long serialVersionUID = 1L;
public String call() throws IOException {
return SystemUtils.IS_OS_WINDOWS ? "sh" : "/bin/sh";
}
}
}
private static final Logger LOGGER = Logger.getLogger(Shell.class.getName());
}
| {
"content_hash": "d24fb22f04695f21f72f6ea87dfc1e98",
"timestamp": "",
"source": "github",
"line_count": 214,
"max_line_length": 117,
"avg_line_length": 31.822429906542055,
"alnum_prop": 0.6249632892804698,
"repo_name": "Jochen-A-Fuerbacher/jenkins",
"id": "bda93c3300e961aeda7dc12c09fe6fbc7693b8f3",
"size": "8027",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "core/src/main/java/hudson/tasks/Shell.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1023"
},
{
"name": "C",
"bytes": "2091"
},
{
"name": "CSS",
"bytes": "313834"
},
{
"name": "Dockerfile",
"bytes": "1147"
},
{
"name": "GAP",
"bytes": "6289"
},
{
"name": "Groovy",
"bytes": "70254"
},
{
"name": "HTML",
"bytes": "976473"
},
{
"name": "Java",
"bytes": "10282442"
},
{
"name": "JavaScript",
"bytes": "377968"
},
{
"name": "Perl",
"bytes": "14718"
},
{
"name": "Ruby",
"bytes": "19375"
},
{
"name": "Shell",
"bytes": "10498"
}
],
"symlink_target": ""
} |
==================================
Rule set ``@PHP74Migration:risky``
==================================
Rules to improve code for PHP 7.4 compatibility. This set contains rules that are risky.
Rules
-----
- `@PHP71Migration:risky <./PHP71MigrationRisky.rst>`_
- `implode_call <./../rules/function_notation/implode_call.rst>`_
- `no_alias_functions <./../rules/alias/no_alias_functions.rst>`_
- `use_arrow_functions <./../rules/function_notation/use_arrow_functions.rst>`_
| {
"content_hash": "95e44561f3c3d7c334b3203d7707f2f6",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 88,
"avg_line_length": 36.61538461538461,
"alnum_prop": 0.6134453781512605,
"repo_name": "SpacePossum/PHP-CS-Fixer",
"id": "d867208c973d3bf48dcbadcc08568521de170202",
"size": "476",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "doc/ruleSets/PHP74MigrationRisky.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Dockerfile",
"bytes": "3369"
},
{
"name": "PHP",
"bytes": "9488808"
},
{
"name": "Shell",
"bytes": "5393"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "5e0505790797350eea1ecf9fea9a95e4",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "d8826e13b43dba17f9e1a01dbb35288b31e83299",
"size": "203",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Dipsacales/Caprifoliaceae/Lonicera/Lonicera maximowiczii/Lonicera maximowiczii stenophylla/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
**To describe apps**
The following ``describe-apps`` command describes the apps in a specified stack. ::
aws opsworks --region us-east-1 describe-apps --stack-id 38ee91e2-abdc-4208-a107-0b7168b3cc7a
**Note**: AWS OpsWorks CLI commands should set the region to ``us-east-1`` regardless of the stack's location.
*Output*: This particular stack has one app.
::
{
"Apps": [
{
"StackId": "38ee91e2-abdc-4208-a107-0b7168b3cc7a",
"AppSource": {
"Url": "https://s3-us-west-2.amazonaws.com/opsworks-tomcat/simplejsp.zip",
"Type": "archive"
},
"Name": "SimpleJSP",
"EnableSsl": false,
"SslConfiguration": {},
"AppId": "da1decc1-0dff-43ea-ad7c-bb667cd87c8b",
"Attributes": {
"RailsEnv": null,
"AutoBundleOnDeploy": "true",
"DocumentRoot": "ROOT"
},
"Shortname": "simplejsp",
"Type": "other",
"CreatedAt": "2013-08-01T21:46:54+00:00"
}
]
}
**More Information**
For more information, see Apps_ in the *AWS OpsWorks User Guide*.
.. _Apps: http://docs.aws.amazon.com/opsworks/latest/userguide/workingapps.html
| {
"content_hash": "3cbf19b92b4bc5cd1e94144e7f71892f",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 110,
"avg_line_length": 28.047619047619047,
"alnum_prop": 0.6018675721561969,
"repo_name": "LockScreen/Backend",
"id": "ff69cf5a68ef3e52f526df5cdb62a33f18548f78",
"size": "1178",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "venv/lib/python2.7/site-packages/awscli/examples/opsworks/describe-apps.rst",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1411"
},
{
"name": "C",
"bytes": "5939"
},
{
"name": "CSS",
"bytes": "59046"
},
{
"name": "HTML",
"bytes": "449"
},
{
"name": "JavaScript",
"bytes": "21987"
},
{
"name": "Python",
"bytes": "14239313"
},
{
"name": "Shell",
"bytes": "5692"
},
{
"name": "TeX",
"bytes": "1527"
}
],
"symlink_target": ""
} |
const CATEGORY_NAMES = {
'Projectile':1,
'Target':1,
'Cone':1,
'Dome':1,
'Jump':1,
'Multistrike':1,
'Path':1,
'ProjectileStrike':1,
'Quake':1,
'Rain':1,
'Rush':1,
'Shout':1,
'Storm':1,
'Summon':1,
'Teleportation':1,
'Tornado':1,
'Wall':1,
'Zone':1
};
const SKILL_FIELD_NAMES = {
'NAME':'Name',
'USING':'Using',
'SKILL_TYPE':'SkillType',
'LEVEL':'Level',
'FOR_GAME_MASTER':'ForGameMaster',
'IS_ENEMY_SKILL':'IsEnemySkill',
'ABILITY':'Ability',
'TIER':'Tier',
'REQUIREMENT':'Requirement',
'ACTION_POINTS':'ActionPoints',
'COOLDOWN':'Cooldown',
'AI_FLAGS':'AIFlags',
'DAMAGE':'Damage',
'DAMAGE_MULTIPLIER':'Damage Multiplier',
'DAMAGE_RANGE':'Damage Range',
'DAMAGE_TYPE':'DamageType',
'SKILL_PROPERTIES':'SkillProperties',
'TARGET_RADIUS':'TargetRadius',
'ADD_RANGE_FROM_ABILITY':'AddRangeFromAbility',
'AREA_RADIUS':'AreaRadius',
'DEATH_TYPE':'DeathType',
'EXPLODE_RADIUS':'ExplodeRadius',
'CAN_TARGET_CHARACTERS':'CanTargetCharacters',
'CAN_TARGET_ITEMS':'CanTargetItems',
'CAN_TARGET_TERRAIN':'CanTargetTerrain',
'FORCE_TARGET':'ForceTarget',
'AMOUNT_OF_TARGETS':'AmountOfTargets',
'AUTO_AIM':'AutoAim',
'TARGET_CONDITIONS':'TargetConditions',
'FORKING_CONDITIONS':'ForkingConditions',
'USE_CHARACTER_STATS':'UseCharacterStats',
'USE_WEAPON_DAMAGE':'UseWeaponDamage',
'USE_WEAPON_PROPERTIES':'UseWeaponProperties',
'PROJECTILE_COUNT':'ProjectileCount',
'PROJECTILE_DELAY':'ProjectileDelay',
'ANGLE':'Angle',
'TEMPLATE':'Template',
'IGNORE_VISION_BLOCK':'IgnoreVisionBlock',
'TEMPLATE_CHECK':'TemplateCheck',
'CHANCE_TO_PIERCE':'ChanceToPierce',
'MAX_PIERCE_COUNT':'MaxPierceCount',
'MAX_FORK_COUNT':'MaxForkCount',
'FORK_LEVELS':'ForkLevels',
'FORK_CHANCE':'ForkChance',
'ICON':'Icon',
'DISPLAY_NAME':'DisplayName',
'DESCRIPTION':'Description',
'STATS_DESCRIPTION':'StatsDescription',
'STATS_DESCRIPTION_PARAMS':'StatsDescriptionParams',
'PREPARE_ANIMATION_INIT':'PrepareAnimationInit',
'PREPARE_ANIMATION_LOOP':'PrepareAnimationLoop',
'PREPARE_EFFECT':'PrepareEffect',
'CAST_ANIMATION':'CastAnimation',
'CAST_ANIMATION_CHECK':'CastAnimationCheck',
'CAST_TEXT_EVENT':'CastTextEvent',
'CAST_EFFECT':'CastEffect',
'PREVIEW_EFFECT':'PreviewEffect',
'REQUIREMENTS':'Requirements',
'MEMORIZATION_REQUIREMENTS':'MemorizationRequirements',
'MEMORY_COST':'Memory Cost',
'MAGIC_COST':'Magic Cost',
'DIVIDE_DAMAGE':'DivideDamage',
'PROJECTILE_TERRAIN_OFFSET':'ProjectileTerrainOffset',
'MOVING_OBJECT':'MovingObject',
'PROJECTILE_TYPE':'ProjectileType',
'OVERRIDE_MIN_AP':'OverrideMinAP',
'STEALTH':'Stealth',
'STEALTH_DAMAGE_MULTIPLIER':'Stealth Damage Multiplier',
'DISTANCE_DAMAGE_MULTIPLIER':'Distance Damage Multiplier',
'HEIGHT_OFFSET':'HeightOffset',
'SPAWN_OBJECT':'SpawnObject',
'SPAWN_EFFECT':'SpawnEffect',
'SPAWN_FX_OVERRIDES_IMPACT_FX':'SpawnFXOverridesImpactFX',
'SPAWN_LIFETIME':'SpawnLifetime',
'AI_CALCULATION_SKILL_OVERRIDE':'AiCalculationSkillOverride',
'ADD_WEAPON_RANGE':'AddWeaponRange',
'IS_MELEE':'IsMelee',
'AOE_CONDITIONS':'AoEConditions',
'FX_SCALE':'FXScale',
'CAST_SELF_ANIMATION':'CastSelfAnimation',
'WEAPON_BONES':'WeaponBones',
'TARGET_EFFECT':'TargetEffect',
'TARGET_GROUND_EFFECT':'TargetGroundEffect',
'POSITION_EFFECT':'PositionEffect',
'BEAM_EFFECT':'BeamEffect',
'SKILL_EFFECT':'SkillEffect',
'CLEANSE_STATUSES':'CleanseStatuses',
'STATUS_CLEAR_CHANCE':'StatusClearChance',
'AUTOCAST':'Autocast',
'RANGE':'Range',
'SURFACE_TYPE':'SurfaceType',
'IGNORE_CURSED':'IgnoreCursed',
'SURFACE_LIFETIME':'SurfaceLifetime',
'SURFACE_STATUS_CHANCE':'SurfaceStatusChance',
'SURFACE_GROW_STEP':'SurfaceGrowStep',
'SURFACE_GROW_INTERVAL':'SurfaceGrowInterval',
'CAST_EFFECT_TEXT_EVENT':'CastEffectTextEvent',
'PUSH_DISTANCE':'PushDistance',
'BACK_START':'BackStart',
'FRONT_OFFSET':'FrontOffset',
'LIFETIME':'Lifetime',
'AURA_SELF':'AuraSelf',
'AURA_ALLIES':'AuraAllies',
'AURA_NEUTRALS':'AuraNeutrals',
'AURA_ENEMIES':'AuraEnemies',
'AURA_ITEMS':'AuraItems',
'DOME_EFFECT':'DomeEffect',
'HIT_RADIUS':'HitRadius',
'DAMAGE_ON_JUMP':'Damage On Jump',
'DAMAGE_ON_LANDING':'Damage On Landing',
'TELEPORT_TEXT_EVENT':'TeleportTextEvent',
'LANDING_EFFECT':'LandingEffect',
'MAX_ATTACKS':'MaxAttacks',
'NEXT_ATTACK_CHANCE':'NextAttackChance',
'NEXT_ATTACK_CHANCE_DIVIDER':'NextAttackChanceDivider',
'END_POS_RADIUS':'EndPosRadius',
'JUMP_DELAY':'JumpDelay',
'PREPARE_EFFECT_BONE':'PrepareEffectBone',
'MALE_IMPACT_EFFECTS':'MaleImpactEffects',
'FEMALE_IMPACT_EFFECTS':'FemaleImpactEffects',
'REAPPEAR_EFFECT':'ReappearEffect',
'REAPPEAR_EFFECT_TEXT_EVENT':'ReappearEffectTextEvent',
'SURFACE_RADIUS':'SurfaceRadius',
'MAX_DISTANCE':'MaxDistance',
'OFFSET':'Offset',
'HEIGHT':'Height',
'TRAVEL_SPEED':'TravelSpeed',
'FLY_EFFECT':'FlyEffect',
'IMPACT_EFFECT':'ImpactEffect',
'SKILLBOOK':'Skillbook',
'STRIKE_COUNT':'StrikeCount',
'STRIKE_DELAY':'StrikeDelay',
'OVERRIDE_SKILL_LEVEL':'OverrideSkillLevel',
'TARGET_PROJECTILES':'TargetProjectiles',
'SINGLE_SOURCE':'SingleSource',
'DISTRIBUTION':'Distribution',
'SHUFFLE':'Shuffle',
'PREVIEW_STRIKE_HITS':'PreviewStrikeHits',
'TOTAL_SURFACE_CELLS':'TotalSurfaceCells',
'SURFACE_MIN_SPAWN_RADIUS':'SurfaceMinSpawnRadius',
'SHOCK_WAVE_DURATION':'ShockWaveDuration',
'MIN_SURFACES':'MinSurfaces',
'MAX_SURFACES':'MaxSurfaces',
'RAIN_EFFECT':'RainEffect',
'ATMOSPHERE':'Atmosphere',
'CONSEQUENCES_START_TIME':'ConsequencesStartTime',
'CONSEQUENCES_DURATION':'ConsequencesDuration',
'CONTINUE_ON_KILL':'ContinueOnKill',
'CONTINUE_EFFECT':'ContinueEffect',
'TARGET_CAST_EFFECT':'TargetCastEffect',
'TARGET_HIT_EFFECT':'TargetHitEffect',
'START_TEXT_EVENT':'StartTextEvent',
'STOP_TEXT_EVENT':'StopTextEvent',
'HIT_EFFECT':'HitEffect',
'PUSH_PULL_EFFECT':'PushPullEffect',
'MIN_HITS_PER_TURN':'MinHitsPerTurn',
'MAX_HITS_PER_TURN':'MaxHitsPerTurn',
'HIT_DELAY':'HitDelay',
'STORM_EFFECT':'StormEffect',
'PROJECTILE_SKILLS':'ProjectileSkills',
'SUMMON_LEVEL':'SummonLevel',
'TEMPLATE_ADVANCED':'TemplateAdvanced',
'TEMPLATE_OVERRIDE':'TemplateOverride',
'TOTEM':'Totem',
'LINK_TELEPORTS':'LinkTeleports',
'SUMMON_COUNT':'SummonCount',
'ACCELERATION':'Acceleration',
'TELEPORT_DELAY':'TeleportDelay',
'TELEPORT_SELF':'TeleportSelf',
'TELEPORT_SURFACE':'TeleportSurface',
'SELECTED_CHARACTER_EFFECT':'SelectedCharacterEffect',
'SELECTED_OBJECT_EFFECT':'SelectedObjectEffect',
'SELECTED_POSITION_EFFECT':'SelectedPositionEffect',
'DISAPPEAR_EFFECT':'DisappearEffect',
'FORCE_MOVE':'ForceMove',
'RANDOM_POINTS':'RandomPoints',
'POINTS_MAX_OFFSET':'PointsMaxOffset',
'GROW_SPEED':'GrowSpeed',
'GROW_TIMEOUT':'GrowTimeout',
'SOURCE_TARGET_EFFECT':'SourceTargetEffect',
'TARGET_TARGET_EFFECT':'TargetTargetEffect',
'TEMPLATE1':'Template1',
'TEMPLATE2':'Template2',
'TEMPLATE3':'Template3',
'SHAPE':'Shape',
'BASE':'Base'
};
const PROJECTILE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Value must be one of the values from the ABILITY enum. You can import this via const { ABILITY } = require('./lib/definitions/enums');
*/
'ADD_RANGE_FROM_ABILITY': 'AddRangeFromAbility',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'EXPLODE_RADIUS': 'ExplodeRadius',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_TERRAIN': 'CanTargetTerrain',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FORCE_TARGET': 'ForceTarget',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AMOUNT_OF_TARGETS': 'AmountOfTargets',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'AUTO_AIM': 'AutoAim',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'FORKING_CONDITIONS': 'ForkingConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PROJECTILE_COUNT': 'ProjectileCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PROJECTILE_DELAY': 'ProjectileDelay',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ANGLE': 'Angle',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE': 'Template',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_VISION_BLOCK': 'IgnoreVisionBlock',
/**
* Value must be one of the values from the CAST_CHECK_TYPE enum. You can import this via const { CAST_CHECK_TYPE } = require('./lib/definitions/enums');
*/
'TEMPLATE_CHECK': 'TemplateCheck',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'CHANCE_TO_PIERCE': 'ChanceToPierce',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_PIERCE_COUNT': 'MaxPierceCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_FORK_COUNT': 'MaxForkCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FORK_LEVELS': 'ForkLevels',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FORK_CHANCE': 'ForkChance',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Value must be one of the values from the CAST_CHECK_TYPE enum. You can import this via const { CAST_CHECK_TYPE } = require('./lib/definitions/enums');
*/
'CAST_ANIMATION_CHECK': 'CastAnimationCheck',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'DIVIDE_DAMAGE': 'DivideDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'PROJECTILE_TERRAIN_OFFSET': 'ProjectileTerrainOffset',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MOVING_OBJECT': 'MovingObject',
/**
* Value must be one of the values from the PROJECTILE_TYPE enum. You can import this via const { PROJECTILE_TYPE } = require('./lib/definitions/enums');
*/
'PROJECTILE_TYPE': 'ProjectileType',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_MIN_AP': 'OverrideMinAP',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STEALTH_DAMAGE_MULTIPLIER': 'Stealth Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DISTANCE_DAMAGE_MULTIPLIER': 'Distance Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HEIGHT_OFFSET': 'HeightOffset',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SPAWN_OBJECT': 'SpawnObject',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SPAWN_EFFECT': 'SpawnEffect',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'SPAWN_FX_OVERRIDES_IMPACT_FX': 'SpawnFXOverridesImpactFX',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SPAWN_LIFETIME': 'SpawnLifetime',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AI_CALCULATION_SKILL_OVERRIDE': 'AiCalculationSkillOverride',
};
const TARGET_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'ADD_WEAPON_RANGE': 'AddWeaponRange',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_MELEE': 'IsMelee',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_TERRAIN': 'CanTargetTerrain',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AOE_CONDITIONS': 'AoEConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_SELF_ANIMATION': 'CastSelfAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'WEAPON_BONES': 'WeaponBones',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_GROUND_EFFECT': 'TargetGroundEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'POSITION_EFFECT': 'PositionEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'BEAM_EFFECT': 'BeamEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_EFFECT': 'SkillEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CLEANSE_STATUSES': 'CleanseStatuses',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STATUS_CLEAR_CHANCE': 'StatusClearChance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'AUTOCAST': 'Autocast',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_VISION_BLOCK': 'IgnoreVisionBlock',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STEALTH_DAMAGE_MULTIPLIER': 'Stealth Damage Multiplier',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_MIN_AP': 'OverrideMinAP',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AMOUNT_OF_TARGETS': 'AmountOfTargets',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AI_CALCULATION_SKILL_OVERRIDE': 'AiCalculationSkillOverride',
};
const CONE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'RANGE': 'Range',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ANGLE': 'Angle',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_CURSED': 'IgnoreCursed',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_STEP': 'SurfaceGrowStep',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_INTERVAL': 'SurfaceGrowInterval',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PUSH_DISTANCE': 'PushDistance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'BACK_START': 'BackStart',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FRONT_OFFSET': 'FrontOffset',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_MIN_AP': 'OverrideMinAP',
};
const DOME_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LIFETIME': 'Lifetime',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AURA_SELF': 'AuraSelf',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AURA_ALLIES': 'AuraAllies',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AURA_NEUTRALS': 'AuraNeutrals',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AURA_ENEMIES': 'AuraEnemies',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AURA_ITEMS': 'AuraItems',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'DOME_EFFECT': 'DomeEffect',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const JUMP_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'DAMAGE_ON_JUMP': 'Damage On Jump',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'DAMAGE_ON_LANDING': 'Damage On Landing',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TELEPORT_TEXT_EVENT': 'TeleportTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'LANDING_EFFECT': 'LandingEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const MULTISTRIKE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_ATTACKS': 'MaxAttacks',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'NEXT_ATTACK_CHANCE': 'NextAttackChance',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'NEXT_ATTACK_CHANCE_DIVIDER': 'NextAttackChanceDivider',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'END_POS_RADIUS': 'EndPosRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'JUMP_DELAY': 'JumpDelay',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT_BONE': 'PrepareEffectBone',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MALE_IMPACT_EFFECTS': 'MaleImpactEffects',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'FEMALE_IMPACT_EFFECTS': 'FemaleImpactEffects',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REAPPEAR_EFFECT': 'ReappearEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REAPPEAR_EFFECT_TEXT_EVENT': 'ReappearEffectTextEvent',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_MIN_AP': 'OverrideMinAP',
};
const PATH_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_RADIUS': 'SurfaceRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_DISTANCE': 'MaxDistance',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'OFFSET': 'Offset',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HEIGHT': 'Height',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TRAVEL_SPEED': 'TravelSpeed',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'FLY_EFFECT': 'FlyEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'IMPACT_EFFECT': 'ImpactEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILLBOOK': 'Skillbook',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const PROJECTILESTRIKE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Value must be one of the values from the ABILITY enum. You can import this via const { ABILITY } = require('./lib/definitions/enums');
*/
'ADD_RANGE_FROM_ABILITY': 'AddRangeFromAbility',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'EXPLODE_RADIUS': 'ExplodeRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STRIKE_COUNT': 'StrikeCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STRIKE_DELAY': 'StrikeDelay',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_TERRAIN': 'CanTargetTerrain',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FORCE_TARGET': 'ForceTarget',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_SKILL_LEVEL': 'OverrideSkillLevel',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'TARGET_PROJECTILES': 'TargetProjectiles',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PROJECTILE_COUNT': 'ProjectileCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PROJECTILE_DELAY': 'ProjectileDelay',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ANGLE': 'Angle',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HEIGHT': 'Height',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'SINGLE_SOURCE': 'SingleSource',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE': 'Template',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_FORK_COUNT': 'MaxForkCount',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FORK_LEVELS': 'ForkLevels',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FORK_CHANCE': 'ForkChance',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Value must be one of the values from the PROJECTILE_TYPE enum. You can import this via const { PROJECTILE_TYPE } = require('./lib/definitions/enums');
*/
'PROJECTILE_TYPE': 'ProjectileType',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Value must be one of the values from the PROJECTILE_DISTRIBUTION enum. You can import this via const { PROJECTILE_DISTRIBUTION } = require('./lib/definitions/enums');
*/
'DISTRIBUTION': 'Distribution',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'SHUFFLE': 'Shuffle',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'PREVIEW_STRIKE_HITS': 'PreviewStrikeHits',
};
const QUAKE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TOTAL_SURFACE_CELLS': 'TotalSurfaceCells',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_SKILL_LEVEL': 'OverrideSkillLevel',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_MIN_SPAWN_RADIUS': 'SurfaceMinSpawnRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SHOCK_WAVE_DURATION': 'ShockWaveDuration',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MIN_SURFACES': 'MinSurfaces',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_SURFACES': 'MaxSurfaces',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_STEP': 'SurfaceGrowStep',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_INTERVAL': 'SurfaceGrowInterval',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'LANDING_EFFECT': 'LandingEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILLBOOK': 'Skillbook',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const RAIN_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LIFETIME': 'Lifetime',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TOTAL_SURFACE_CELLS': 'TotalSurfaceCells',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_STEP': 'SurfaceGrowStep',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_INTERVAL': 'SurfaceGrowInterval',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'RAIN_EFFECT': 'RainEffect',
/**
* Value must be one of the values from the ATMOSPHERE_TYPE enum. You can import this via const { ATMOSPHERE_TYPE } = require('./lib/definitions/enums');
*/
'ATMOSPHERE': 'Atmosphere',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'CONSEQUENCES_START_TIME': 'ConsequencesStartTime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'CONSEQUENCES_DURATION': 'ConsequencesDuration',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const RUSH_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_TERRAIN': 'CanTargetTerrain',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CONTINUE_ON_KILL': 'ContinueOnKill',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CONTINUE_EFFECT': 'ContinueEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'WEAPON_BONES': 'WeaponBones',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CAST_EFFECT': 'TargetCastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_HIT_EFFECT': 'TargetHitEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'START_TEXT_EVENT': 'StartTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STOP_TEXT_EVENT': 'StopTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_MIN_AP': 'OverrideMinAP',
};
const SHOUT_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'ADD_WEAPON_RANGE': 'AddWeaponRange',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AOE_CONDITIONS': 'AoEConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_CHARACTER_STATS': 'UseCharacterStats',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'AUTOCAST': 'Autocast',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'HIT_EFFECT': 'HitEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'WEAPON_BONES': 'WeaponBones',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CLEANSE_STATUSES': 'CleanseStatuses',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STATUS_CLEAR_CHANCE': 'StatusClearChance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PUSH_DISTANCE': 'PushDistance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PUSH_PULL_EFFECT': 'PushPullEffect',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_VISION_BLOCK': 'IgnoreVisionBlock',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AI_CALCULATION_SKILL_OVERRIDE': 'AiCalculationSkillOverride',
};
const STORM_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_SKILL_LEVEL': 'OverrideSkillLevel',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LIFETIME': 'Lifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MIN_HITS_PER_TURN': 'MinHitsPerTurn',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_HITS_PER_TURN': 'MaxHitsPerTurn',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_DELAY': 'HitDelay',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STORM_EFFECT': 'StormEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'IMPACT_EFFECT': 'ImpactEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILLBOOK': 'Skillbook',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PROJECTILE_SKILLS': 'ProjectileSkills',
};
const SUMMON_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LIFETIME': 'Lifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SUMMON_LEVEL': 'SummonLevel',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AOE_CONDITIONS': 'AoEConditions',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE': 'Template',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE_ADVANCED': 'TemplateAdvanced',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE_OVERRIDE': 'TemplateOverride',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'TOTEM': 'Totem',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'LINK_TELEPORTS': 'LinkTeleports',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SUMMON_COUNT': 'SummonCount',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CAST_EFFECT': 'TargetCastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILLBOOK': 'Skillbook',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'AI_CALCULATION_SKILL_OVERRIDE': 'AiCalculationSkillOverride',
};
const TELEPORTATION_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'AREA_RADIUS': 'AreaRadius',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HEIGHT': 'Height',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACCELERATION': 'Acceleration',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TELEPORT_DELAY': 'TeleportDelay',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'TELEPORT_SELF': 'TeleportSelf',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'TELEPORT_SURFACE': 'TeleportSurface',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_TERRAIN': 'CanTargetTerrain',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SELECTED_CHARACTER_EFFECT': 'SelectedCharacterEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SELECTED_OBJECT_EFFECT': 'SelectedObjectEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SELECTED_POSITION_EFFECT': 'SelectedPositionEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'DISAPPEAR_EFFECT': 'DisappearEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REAPPEAR_EFFECT': 'ReappearEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'IMPACT_EFFECT': 'ImpactEffect',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_VISION_BLOCK': 'IgnoreVisionBlock',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FORCE_MOVE': 'ForceMove',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'OVERRIDE_SKILL_LEVEL': 'OverrideSkillLevel',
};
const TORNADO_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'HIT_RADIUS': 'HitRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'RANDOM_POINTS': 'RandomPoints',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_RADIUS': 'SurfaceRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'POINTS_MAX_OFFSET': 'PointsMaxOffset',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_EFFECT': 'TargetEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CLEANSE_STATUSES': 'CleanseStatuses',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'STATUS_CLEAR_CHANCE': 'StatusClearChance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
};
const WALL_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TARGET_RADIUS': 'TargetRadius',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAX_DISTANCE': 'MaxDistance',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LIFETIME': 'Lifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'GROW_SPEED': 'GrowSpeed',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'GROW_TIMEOUT': 'GrowTimeout',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'TOTAL_SURFACE_CELLS': 'TotalSurfaceCells',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_STEP': 'SurfaceGrowStep',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_INTERVAL': 'SurfaceGrowInterval',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SOURCE_TARGET_EFFECT': 'SourceTargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_TARGET_EFFECT': 'TargetTargetEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE1': 'Template1',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE2': 'Template2',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TEMPLATE3': 'Template3',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SPAWN_EFFECT': 'SpawnEffect',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREVIEW_EFFECT': 'PreviewEffect',
};
const ZONE_NAMES = {
/**
* Must be a string and unique against all other Name fields in a Skill Type. An error will be thrown when building if this is violated.
*/
'NAME': 'Name',
/**
* Must be the un-typed named of an ability. Ex. 'Ricochet.'
*/
'USING': 'Using',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_TYPE': 'SkillType',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'LEVEL': 'Level',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'FOR_GAME_MASTER': 'ForGameMaster',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IS_ENEMY_SKILL': 'IsEnemySkill',
/**
* Value must be one of the values from the SKILL_ABILITY enum. You can import this via const { SKILL_ABILITY } = require('./lib/definitions/enums');
*/
'ABILITY': 'Ability',
/**
* Value must be one of the values from the SKILL_TIER enum. You can import this via const { SKILL_TIER } = require('./lib/definitions/enums');
*/
'TIER': 'Tier',
/**
* Value must be one of the values from the SKILL_REQUIREMENT enum. You can import this via const { SKILL_REQUIREMENT } = require('./lib/definitions/enums');
*/
'REQUIREMENT': 'Requirement',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ACTION_POINTS': 'ActionPoints',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'COOLDOWN': 'Cooldown',
/**
* Value must be one of the values from the AI_FLAGS enum. You can import this via const { AI_FLAGS } = require('./lib/definitions/enums');
*/
'AI_FLAGS': 'AIFlags',
/**
* Value must be one of the values from the DAMAGE_SOURCE_TYPE enum. You can import this via const { DAMAGE_SOURCE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE': 'Damage',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_MULTIPLIER': 'Damage Multiplier',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'DAMAGE_RANGE': 'Damage Range',
/**
* Value must be one of the values from the DAMAGE_TYPE enum. You can import this via const { DAMAGE_TYPE } = require('./lib/definitions/enums');
*/
'DAMAGE_TYPE': 'DamageType',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SKILL_PROPERTIES': 'SkillProperties',
/**
* Value must be one of the values from the DEATH_TYPE enum. You can import this via const { DEATH_TYPE } = require('./lib/definitions/enums');
*/
'DEATH_TYPE': 'DeathType',
/**
* Value must be one of the values from the SURFACE_TYPE enum. You can import this via const { SURFACE_TYPE } = require('./lib/definitions/enums');
*/
'SURFACE_TYPE': 'SurfaceType',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'IGNORE_CURSED': 'IgnoreCursed',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_LIFETIME': 'SurfaceLifetime',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_STATUS_CHANCE': 'SurfaceStatusChance',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_STEP': 'SurfaceGrowStep',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'SURFACE_GROW_INTERVAL': 'SurfaceGrowInterval',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'TARGET_CONDITIONS': 'TargetConditions',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_DAMAGE': 'UseWeaponDamage',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'USE_WEAPON_PROPERTIES': 'UseWeaponProperties',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_CHARACTERS': 'CanTargetCharacters',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'CAN_TARGET_ITEMS': 'CanTargetItems',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'ICON': 'Icon',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DISPLAY_NAME': 'DisplayName',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'DESCRIPTION': 'Description',
/**
* This field can be replaced by a translation key in the Translated String Editor. Otherwise, just fill the value with a normal string. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION': 'StatsDescription',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'STATS_DESCRIPTION_PARAMS': 'StatsDescriptionParams',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FX_SCALE': 'FXScale',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_INIT': 'PrepareAnimationInit',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_ANIMATION_LOOP': 'PrepareAnimationLoop',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'PREPARE_EFFECT': 'PrepareEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_ANIMATION': 'CastAnimation',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_TEXT_EVENT': 'CastTextEvent',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT': 'CastEffect',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'CAST_EFFECT_TEXT_EVENT': 'CastEffectTextEvent',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MEMORY_COST': 'Memory Cost',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'MAGIC_COST': 'Magic Cost',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'REQUIREMENTS': 'Requirements',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'MEMORIZATION_REQUIREMENTS': 'MemorizationRequirements',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'PUSH_DISTANCE': 'PushDistance',
/**
* Value must be one of the values from the YES_NO enum. You can import this via const { YES_NO } = require('./lib/definitions/enums');
*/
'STEALTH': 'Stealth',
/**
* Can be any string value. Ex. 'SomeValue'
*/
'SHAPE': 'Shape',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'BACK_START': 'BackStart',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'FRONT_OFFSET': 'FrontOffset',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'RANGE': 'Range',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'BASE': 'Base',
/**
* Must be a string representation of an integer. This is not currently validated. Ex. '12'
*/
'ANGLE': 'Angle',
};
const SKILL_FIELDS = {
'Name': (value) => ({ name: 'Name', type: 'NameStatObjectFieldDefinition', value}),
'Using': (value) => ({ name: 'Using', type: 'BaseClassStatObjectFieldDefinition', value}),
'SkillType': (value) => ({ name: 'SkillType', type: 'StringStatObjectFieldDefinition', value}),
'Level': (value) => ({ name: 'Level', type: 'IntegerStatObjectFieldDefinition', value}),
'ForGameMaster': (value) => ({ name: 'ForGameMaster', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'IsEnemySkill': (value) => ({ name: 'IsEnemySkill', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Ability': (value) => ({ name: 'Ability', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'SkillAbility'}),
'Tier': (value) => ({ name: 'Tier', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'SkillTier'}),
'Requirement': (value) => ({ name: 'Requirement', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'SkillRequirement'}),
'ActionPoints': (value) => ({ name: 'ActionPoints', type: 'IntegerStatObjectFieldDefinition', value}),
'Cooldown': (value) => ({ name: 'Cooldown', type: 'IntegerStatObjectFieldDefinition', value}),
'AIFlags': (value) => ({ name: 'AIFlags', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'AIFlags'}),
'Damage': (value) => ({ name: 'Damage', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'DamageSourceType'}),
'Damage Multiplier': (value) => ({ name: 'Damage Multiplier', type: 'IntegerStatObjectFieldDefinition', value}),
'Damage Range': (value) => ({ name: 'Damage Range', type: 'IntegerStatObjectFieldDefinition', value}),
'DamageType': (value) => ({ name: 'DamageType', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'Damage Type'}),
'SkillProperties': (value) => ({ name: 'SkillProperties', type: 'StringStatObjectFieldDefinition', value}),
'TargetRadius': (value) => ({ name: 'TargetRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'AddRangeFromAbility': (value) => ({ name: 'AddRangeFromAbility', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'Ability'}),
'AreaRadius': (value) => ({ name: 'AreaRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'DeathType': (value) => ({ name: 'DeathType', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'Death Type'}),
'ExplodeRadius': (value) => ({ name: 'ExplodeRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'CanTargetCharacters': (value) => ({ name: 'CanTargetCharacters', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'CanTargetItems': (value) => ({ name: 'CanTargetItems', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'CanTargetTerrain': (value) => ({ name: 'CanTargetTerrain', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'ForceTarget': (value) => ({ name: 'ForceTarget', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'AmountOfTargets': (value) => ({ name: 'AmountOfTargets', type: 'IntegerStatObjectFieldDefinition', value}),
'AutoAim': (value) => ({ name: 'AutoAim', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TargetConditions': (value) => ({ name: 'TargetConditions', type: 'StringStatObjectFieldDefinition', value}),
'ForkingConditions': (value) => ({ name: 'ForkingConditions', type: 'StringStatObjectFieldDefinition', value}),
'UseCharacterStats': (value) => ({ name: 'UseCharacterStats', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'UseWeaponDamage': (value) => ({ name: 'UseWeaponDamage', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'UseWeaponProperties': (value) => ({ name: 'UseWeaponProperties', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'ProjectileCount': (value) => ({ name: 'ProjectileCount', type: 'IntegerStatObjectFieldDefinition', value}),
'ProjectileDelay': (value) => ({ name: 'ProjectileDelay', type: 'IntegerStatObjectFieldDefinition', value}),
'Angle': (value) => ({ name: 'Angle', type: 'IntegerStatObjectFieldDefinition', value}),
'Template': (value) => ({ name: 'Template', type: 'StringStatObjectFieldDefinition', value}),
'IgnoreVisionBlock': (value) => ({ name: 'IgnoreVisionBlock', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TemplateCheck': (value) => ({ name: 'TemplateCheck', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'CastCheckType'}),
'ChanceToPierce': (value) => ({ name: 'ChanceToPierce', type: 'IntegerStatObjectFieldDefinition', value}),
'MaxPierceCount': (value) => ({ name: 'MaxPierceCount', type: 'IntegerStatObjectFieldDefinition', value}),
'MaxForkCount': (value) => ({ name: 'MaxForkCount', type: 'IntegerStatObjectFieldDefinition', value}),
'ForkLevels': (value) => ({ name: 'ForkLevels', type: 'IntegerStatObjectFieldDefinition', value}),
'ForkChance': (value) => ({ name: 'ForkChance', type: 'IntegerStatObjectFieldDefinition', value}),
'Icon': (value) => ({ name: 'Icon', type: 'StringStatObjectFieldDefinition', value}),
'DisplayName': (value) => ({ name: 'DisplayName', type: 'TranslatedStringStatObjectFieldDefinition', value}),
'Description': (value) => ({ name: 'Description', type: 'TranslatedStringStatObjectFieldDefinition', value}),
'StatsDescription': (value) => ({ name: 'StatsDescription', type: 'TranslatedStringStatObjectFieldDefinition', value}),
'StatsDescriptionParams': (value) => ({ name: 'StatsDescriptionParams', type: 'StringStatObjectFieldDefinition', value}),
'PrepareAnimationInit': (value) => ({ name: 'PrepareAnimationInit', type: 'StringStatObjectFieldDefinition', value}),
'PrepareAnimationLoop': (value) => ({ name: 'PrepareAnimationLoop', type: 'StringStatObjectFieldDefinition', value}),
'PrepareEffect': (value) => ({ name: 'PrepareEffect', type: 'StringStatObjectFieldDefinition', value}),
'CastAnimation': (value) => ({ name: 'CastAnimation', type: 'StringStatObjectFieldDefinition', value}),
'CastAnimationCheck': (value) => ({ name: 'CastAnimationCheck', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'CastCheckType'}),
'CastTextEvent': (value) => ({ name: 'CastTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'CastEffect': (value) => ({ name: 'CastEffect', type: 'StringStatObjectFieldDefinition', value}),
'PreviewEffect': (value) => ({ name: 'PreviewEffect', type: 'StringStatObjectFieldDefinition', value}),
'Requirements': (value) => ({ name: 'Requirements', type: 'StringStatObjectFieldDefinition', value}),
'MemorizationRequirements': (value) => ({ name: 'MemorizationRequirements', type: 'StringStatObjectFieldDefinition', value}),
'Memory Cost': (value) => ({ name: 'Memory Cost', type: 'IntegerStatObjectFieldDefinition', value}),
'Magic Cost': (value) => ({ name: 'Magic Cost', type: 'IntegerStatObjectFieldDefinition', value}),
'DivideDamage': (value) => ({ name: 'DivideDamage', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'ProjectileTerrainOffset': (value) => ({ name: 'ProjectileTerrainOffset', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'MovingObject': (value) => ({ name: 'MovingObject', type: 'StringStatObjectFieldDefinition', value}),
'ProjectileType': (value) => ({ name: 'ProjectileType', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'ProjectileType'}),
'OverrideMinAP': (value) => ({ name: 'OverrideMinAP', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Stealth': (value) => ({ name: 'Stealth', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Stealth Damage Multiplier': (value) => ({ name: 'Stealth Damage Multiplier', type: 'IntegerStatObjectFieldDefinition', value}),
'Distance Damage Multiplier': (value) => ({ name: 'Distance Damage Multiplier', type: 'IntegerStatObjectFieldDefinition', value}),
'HeightOffset': (value) => ({ name: 'HeightOffset', type: 'IntegerStatObjectFieldDefinition', value}),
'SpawnObject': (value) => ({ name: 'SpawnObject', type: 'StringStatObjectFieldDefinition', value}),
'SpawnEffect': (value) => ({ name: 'SpawnEffect', type: 'StringStatObjectFieldDefinition', value}),
'SpawnFXOverridesImpactFX': (value) => ({ name: 'SpawnFXOverridesImpactFX', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'SpawnLifetime': (value) => ({ name: 'SpawnLifetime', type: 'IntegerStatObjectFieldDefinition', value}),
'AiCalculationSkillOverride': (value) => ({ name: 'AiCalculationSkillOverride', type: 'StringStatObjectFieldDefinition', value}),
'AddWeaponRange': (value) => ({ name: 'AddWeaponRange', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'IsMelee': (value) => ({ name: 'IsMelee', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'AoEConditions': (value) => ({ name: 'AoEConditions', type: 'StringStatObjectFieldDefinition', value}),
'FXScale': (value) => ({ name: 'FXScale', type: 'IntegerStatObjectFieldDefinition', value}),
'CastSelfAnimation': (value) => ({ name: 'CastSelfAnimation', type: 'StringStatObjectFieldDefinition', value}),
'WeaponBones': (value) => ({ name: 'WeaponBones', type: 'StringStatObjectFieldDefinition', value}),
'TargetEffect': (value) => ({ name: 'TargetEffect', type: 'StringStatObjectFieldDefinition', value}),
'TargetGroundEffect': (value) => ({ name: 'TargetGroundEffect', type: 'StringStatObjectFieldDefinition', value}),
'PositionEffect': (value) => ({ name: 'PositionEffect', type: 'StringStatObjectFieldDefinition', value}),
'BeamEffect': (value) => ({ name: 'BeamEffect', type: 'StringStatObjectFieldDefinition', value}),
'SkillEffect': (value) => ({ name: 'SkillEffect', type: 'StringStatObjectFieldDefinition', value}),
'CleanseStatuses': (value) => ({ name: 'CleanseStatuses', type: 'StringStatObjectFieldDefinition', value}),
'StatusClearChance': (value) => ({ name: 'StatusClearChance', type: 'IntegerStatObjectFieldDefinition', value}),
'Autocast': (value) => ({ name: 'Autocast', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Range': (value) => ({ name: 'Range', type: 'IntegerStatObjectFieldDefinition', value}),
'SurfaceType': (value) => ({ name: 'SurfaceType', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'Surface Type'}),
'IgnoreCursed': (value) => ({ name: 'IgnoreCursed', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'SurfaceLifetime': (value) => ({ name: 'SurfaceLifetime', type: 'IntegerStatObjectFieldDefinition', value}),
'SurfaceStatusChance': (value) => ({ name: 'SurfaceStatusChance', type: 'IntegerStatObjectFieldDefinition', value}),
'SurfaceGrowStep': (value) => ({ name: 'SurfaceGrowStep', type: 'IntegerStatObjectFieldDefinition', value}),
'SurfaceGrowInterval': (value) => ({ name: 'SurfaceGrowInterval', type: 'IntegerStatObjectFieldDefinition', value}),
'CastEffectTextEvent': (value) => ({ name: 'CastEffectTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'PushDistance': (value) => ({ name: 'PushDistance', type: 'IntegerStatObjectFieldDefinition', value}),
'BackStart': (value) => ({ name: 'BackStart', type: 'IntegerStatObjectFieldDefinition', value}),
'FrontOffset': (value) => ({ name: 'FrontOffset', type: 'IntegerStatObjectFieldDefinition', value}),
'Lifetime': (value) => ({ name: 'Lifetime', type: 'IntegerStatObjectFieldDefinition', value}),
'AuraSelf': (value) => ({ name: 'AuraSelf', type: 'StringStatObjectFieldDefinition', value}),
'AuraAllies': (value) => ({ name: 'AuraAllies', type: 'StringStatObjectFieldDefinition', value}),
'AuraNeutrals': (value) => ({ name: 'AuraNeutrals', type: 'StringStatObjectFieldDefinition', value}),
'AuraEnemies': (value) => ({ name: 'AuraEnemies', type: 'StringStatObjectFieldDefinition', value}),
'AuraItems': (value) => ({ name: 'AuraItems', type: 'StringStatObjectFieldDefinition', value}),
'DomeEffect': (value) => ({ name: 'DomeEffect', type: 'StringStatObjectFieldDefinition', value}),
'HitRadius': (value) => ({ name: 'HitRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'Damage On Jump': (value) => ({ name: 'Damage On Jump', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Damage On Landing': (value) => ({ name: 'Damage On Landing', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TeleportTextEvent': (value) => ({ name: 'TeleportTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'LandingEffect': (value) => ({ name: 'LandingEffect', type: 'StringStatObjectFieldDefinition', value}),
'MaxAttacks': (value) => ({ name: 'MaxAttacks', type: 'IntegerStatObjectFieldDefinition', value}),
'NextAttackChance': (value) => ({ name: 'NextAttackChance', type: 'IntegerStatObjectFieldDefinition', value}),
'NextAttackChanceDivider': (value) => ({ name: 'NextAttackChanceDivider', type: 'IntegerStatObjectFieldDefinition', value}),
'EndPosRadius': (value) => ({ name: 'EndPosRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'JumpDelay': (value) => ({ name: 'JumpDelay', type: 'IntegerStatObjectFieldDefinition', value}),
'PrepareEffectBone': (value) => ({ name: 'PrepareEffectBone', type: 'StringStatObjectFieldDefinition', value}),
'MaleImpactEffects': (value) => ({ name: 'MaleImpactEffects', type: 'StringStatObjectFieldDefinition', value}),
'FemaleImpactEffects': (value) => ({ name: 'FemaleImpactEffects', type: 'StringStatObjectFieldDefinition', value}),
'ReappearEffect': (value) => ({ name: 'ReappearEffect', type: 'StringStatObjectFieldDefinition', value}),
'ReappearEffectTextEvent': (value) => ({ name: 'ReappearEffectTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'SurfaceRadius': (value) => ({ name: 'SurfaceRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'MaxDistance': (value) => ({ name: 'MaxDistance', type: 'IntegerStatObjectFieldDefinition', value}),
'Offset': (value) => ({ name: 'Offset', type: 'IntegerStatObjectFieldDefinition', value}),
'Height': (value) => ({ name: 'Height', type: 'IntegerStatObjectFieldDefinition', value}),
'TravelSpeed': (value) => ({ name: 'TravelSpeed', type: 'IntegerStatObjectFieldDefinition', value}),
'FlyEffect': (value) => ({ name: 'FlyEffect', type: 'StringStatObjectFieldDefinition', value}),
'ImpactEffect': (value) => ({ name: 'ImpactEffect', type: 'StringStatObjectFieldDefinition', value}),
'Skillbook': (value) => ({ name: 'Skillbook', type: 'StringStatObjectFieldDefinition', value}),
'StrikeCount': (value) => ({ name: 'StrikeCount', type: 'IntegerStatObjectFieldDefinition', value}),
'StrikeDelay': (value) => ({ name: 'StrikeDelay', type: 'IntegerStatObjectFieldDefinition', value}),
'OverrideSkillLevel': (value) => ({ name: 'OverrideSkillLevel', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TargetProjectiles': (value) => ({ name: 'TargetProjectiles', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'SingleSource': (value) => ({ name: 'SingleSource', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'Distribution': (value) => ({ name: 'Distribution', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'ProjectileDistribution'}),
'Shuffle': (value) => ({ name: 'Shuffle', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'PreviewStrikeHits': (value) => ({ name: 'PreviewStrikeHits', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TotalSurfaceCells': (value) => ({ name: 'TotalSurfaceCells', type: 'IntegerStatObjectFieldDefinition', value}),
'SurfaceMinSpawnRadius': (value) => ({ name: 'SurfaceMinSpawnRadius', type: 'IntegerStatObjectFieldDefinition', value}),
'ShockWaveDuration': (value) => ({ name: 'ShockWaveDuration', type: 'IntegerStatObjectFieldDefinition', value}),
'MinSurfaces': (value) => ({ name: 'MinSurfaces', type: 'IntegerStatObjectFieldDefinition', value}),
'MaxSurfaces': (value) => ({ name: 'MaxSurfaces', type: 'IntegerStatObjectFieldDefinition', value}),
'RainEffect': (value) => ({ name: 'RainEffect', type: 'StringStatObjectFieldDefinition', value}),
'Atmosphere': (value) => ({ name: 'Atmosphere', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'AtmosphereType'}),
'ConsequencesStartTime': (value) => ({ name: 'ConsequencesStartTime', type: 'IntegerStatObjectFieldDefinition', value}),
'ConsequencesDuration': (value) => ({ name: 'ConsequencesDuration', type: 'IntegerStatObjectFieldDefinition', value}),
'ContinueOnKill': (value) => ({ name: 'ContinueOnKill', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'ContinueEffect': (value) => ({ name: 'ContinueEffect', type: 'StringStatObjectFieldDefinition', value}),
'TargetCastEffect': (value) => ({ name: 'TargetCastEffect', type: 'StringStatObjectFieldDefinition', value}),
'TargetHitEffect': (value) => ({ name: 'TargetHitEffect', type: 'StringStatObjectFieldDefinition', value}),
'StartTextEvent': (value) => ({ name: 'StartTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'StopTextEvent': (value) => ({ name: 'StopTextEvent', type: 'StringStatObjectFieldDefinition', value}),
'HitEffect': (value) => ({ name: 'HitEffect', type: 'StringStatObjectFieldDefinition', value}),
'PushPullEffect': (value) => ({ name: 'PushPullEffect', type: 'StringStatObjectFieldDefinition', value}),
'MinHitsPerTurn': (value) => ({ name: 'MinHitsPerTurn', type: 'IntegerStatObjectFieldDefinition', value}),
'MaxHitsPerTurn': (value) => ({ name: 'MaxHitsPerTurn', type: 'IntegerStatObjectFieldDefinition', value}),
'HitDelay': (value) => ({ name: 'HitDelay', type: 'IntegerStatObjectFieldDefinition', value}),
'StormEffect': (value) => ({ name: 'StormEffect', type: 'StringStatObjectFieldDefinition', value}),
'ProjectileSkills': (value) => ({ name: 'ProjectileSkills', type: 'StringStatObjectFieldDefinition', value}),
'SummonLevel': (value) => ({ name: 'SummonLevel', type: 'IntegerStatObjectFieldDefinition', value}),
'TemplateAdvanced': (value) => ({ name: 'TemplateAdvanced', type: 'StringStatObjectFieldDefinition', value}),
'TemplateOverride': (value) => ({ name: 'TemplateOverride', type: 'StringStatObjectFieldDefinition', value}),
'Totem': (value) => ({ name: 'Totem', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'LinkTeleports': (value) => ({ name: 'LinkTeleports', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'SummonCount': (value) => ({ name: 'SummonCount', type: 'IntegerStatObjectFieldDefinition', value}),
'Acceleration': (value) => ({ name: 'Acceleration', type: 'IntegerStatObjectFieldDefinition', value}),
'TeleportDelay': (value) => ({ name: 'TeleportDelay', type: 'IntegerStatObjectFieldDefinition', value}),
'TeleportSelf': (value) => ({ name: 'TeleportSelf', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'TeleportSurface': (value) => ({ name: 'TeleportSurface', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'SelectedCharacterEffect': (value) => ({ name: 'SelectedCharacterEffect', type: 'StringStatObjectFieldDefinition', value}),
'SelectedObjectEffect': (value) => ({ name: 'SelectedObjectEffect', type: 'StringStatObjectFieldDefinition', value}),
'SelectedPositionEffect': (value) => ({ name: 'SelectedPositionEffect', type: 'StringStatObjectFieldDefinition', value}),
'DisappearEffect': (value) => ({ name: 'DisappearEffect', type: 'StringStatObjectFieldDefinition', value}),
'ForceMove': (value) => ({ name: 'ForceMove', type: 'EnumerationStatObjectFieldDefinition', value, 'enumeration_type_name': 'YesNo'}),
'RandomPoints': (value) => ({ name: 'RandomPoints', type: 'IntegerStatObjectFieldDefinition', value}),
'PointsMaxOffset': (value) => ({ name: 'PointsMaxOffset', type: 'IntegerStatObjectFieldDefinition', value}),
'GrowSpeed': (value) => ({ name: 'GrowSpeed', type: 'IntegerStatObjectFieldDefinition', value}),
'GrowTimeout': (value) => ({ name: 'GrowTimeout', type: 'IntegerStatObjectFieldDefinition', value}),
'SourceTargetEffect': (value) => ({ name: 'SourceTargetEffect', type: 'StringStatObjectFieldDefinition', value}),
'TargetTargetEffect': (value) => ({ name: 'TargetTargetEffect', type: 'StringStatObjectFieldDefinition', value}),
'Template1': (value) => ({ name: 'Template1', type: 'StringStatObjectFieldDefinition', value}),
'Template2': (value) => ({ name: 'Template2', type: 'StringStatObjectFieldDefinition', value}),
'Template3': (value) => ({ name: 'Template3', type: 'StringStatObjectFieldDefinition', value}),
'Shape': (value) => ({ name: 'Shape', type: 'StringStatObjectFieldDefinition', value}),
'Base': (value) => ({ name: 'Base', type: 'IntegerStatObjectFieldDefinition', value}),
};
const IS_TYPE = (value) => CATEGORY_NAMES[value];
module.exports = {
IS_TYPE,
SKILL_FIELD_NAMES,
SKILL_FIELDS,
PROJECTILE_NAMES,
TARGET_NAMES,
CONE_NAMES,
DOME_NAMES,
JUMP_NAMES,
MULTISTRIKE_NAMES,
PATH_NAMES,
PROJECTILESTRIKE_NAMES,
QUAKE_NAMES,
RAIN_NAMES,
RUSH_NAMES,
SHOUT_NAMES,
STORM_NAMES,
SUMMON_NAMES,
TELEPORTATION_NAMES,
TORNADO_NAMES,
WALL_NAMES,
ZONE_NAMES,
};
| {
"content_hash": "1087c44a0100fd7e97370822dd96d9f6",
"timestamp": "",
"source": "github",
"line_count": 4306,
"max_line_length": 169,
"avg_line_length": 37.75522526706921,
"alnum_prop": 0.6726352307257003,
"repo_name": "Sinistralis-DOS2-Mods/SkillGenerator",
"id": "5ccd6bcc1ee11bbb97b5ec048f73223494c09f81",
"size": "162574",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/definitions/skillFields.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "501140"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/context_menu_view"
android:title="@string/context_menu_view" />
<item
android:id="@+id/context_menu_edit"
android:title="@string/context_menu_edit" />
<item
android:id="@+id/context_menu_delete"
android:title="@string/context_menu_delete" />
</menu> | {
"content_hash": "6fd8788648e3bee305632e52f4e6bcf8",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 65,
"avg_line_length": 36.416666666666664,
"alnum_prop": 0.620137299771167,
"repo_name": "datanets/kanjoto",
"id": "929c1a408df063df4ce2456bc8984a4e02546afc",
"size": "437",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "kanjoto-android/res/menu/context_menu_noteset.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "959942"
}
],
"symlink_target": ""
} |
<?php
declare(strict_types=1);
namespace GrumPHP\Task;
use GrumPHP\Runner\TaskResult;
use GrumPHP\Runner\TaskResultInterface;
use GrumPHP\Task\Context\ContextInterface;
use GrumPHP\Task\Context\GitPreCommitContext;
use GrumPHP\Task\Context\RunContext;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Codeception task.
*/
class Codeception extends AbstractExternalTask
{
public function getName(): string
{
return 'codeception';
}
public function getConfigurableOptions(): OptionsResolver
{
$resolver = new OptionsResolver();
$resolver->setDefaults([
'config_file' => null,
'suite' => null,
'test' => null,
'fail_fast' => false,
]);
$resolver->addAllowedTypes('config_file', ['null', 'string']);
$resolver->addAllowedTypes('suite', ['null', 'string']);
$resolver->addAllowedTypes('test', ['null', 'string']);
$resolver->addAllowedTypes('fail_fast', ['bool']);
return $resolver;
}
/**
* {@inheritdoc}
*/
public function canRunInContext(ContextInterface $context): bool
{
return $context instanceof GitPreCommitContext || $context instanceof RunContext;
}
/**
* {@inheritdoc}
*/
public function run(ContextInterface $context): TaskResultInterface
{
$files = $context->getFiles()->name('*.php');
if (0 === \count($files)) {
return TaskResult::createSkipped($this, $context);
}
$config = $this->getConfiguration();
$arguments = $this->processBuilder->createArgumentsForCommand('codecept');
$arguments->add('run');
$arguments->addOptionalArgument('--config=%s', $config['config_file']);
$arguments->addOptionalArgument('--fail-fast', $config['fail_fast']);
$arguments->addOptionalArgument('%s', $config['suite']);
$arguments->addOptionalArgument('%s', $config['test']);
$process = $this->processBuilder->buildProcess($arguments);
$process->run();
if (!$process->isSuccessful()) {
return TaskResult::createFailed($this, $context, $this->formatter->format($process));
}
return TaskResult::createPassed($this, $context);
}
}
| {
"content_hash": "c8691cff386b75c049670752b998eee4",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 97,
"avg_line_length": 29.397435897435898,
"alnum_prop": 0.6170955080680331,
"repo_name": "Big-Shark/grumphp",
"id": "a896f8418a3910e4873be36a7e4595134f506f36",
"size": "2293",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Task/Codeception.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "535"
},
{
"name": "PHP",
"bytes": "366454"
},
{
"name": "Shell",
"bytes": "2677"
}
],
"symlink_target": ""
} |
using System.Data;
using System;
using Blade;
using Maui;
namespace Maui.Dynamics.Data
{
public static class DataRowExtensions
{
/// <summary>
/// Compares the content of two rows which belong to the same table.
/// </summary>
public static bool ContentEquals( this DataRow lhs, DataRow rhs )
{
if ( lhs.Table != rhs.Table )
{
return false;
}
for ( int i = 0; i < lhs.ItemArray.Length; ++i )
{
if ( !lhs[ i ].Equals( rhs[ i ] ) )
{
return false;
}
}
return true;
}
public static string GetDateString( this DataRow row, TableSchema schema )
{
return row[ schema.DateColumn ].ToString();
}
public static DateTime GetDate( this DataRow row, TableSchema schema )
{
return GetDate( row, schema.DateColumn );
}
public static void SetDate( this DataRow row, TableSchema schema, DateTime value )
{
row.SetDate( schema.DateColumn, value );
}
#region Basic date handling
/// <summary>
/// If "year" always returns first day of this year.
/// </summary>
public static DateTime GetDate( this DataRow row, string column )
{
if ( row[ column ] is DateTime )
{
return (DateTime)row[column];
}
if ( column.Equals( "year", StringComparison.OrdinalIgnoreCase ) )
{
return Blade.DateTimeExtensions.FirstOfYear( Convert.ToInt32( row[ column ] ) );
}
else
{
return Maui.TypeConverter.StringToDate( row[ column ].ToString() );
}
}
public static void SetDate( this DataRow row, string column, DateTime value )
{
if ( column.Equals( "year", StringComparison.OrdinalIgnoreCase ) )
{
row[ column ] = value.Year;
}
else
{
row[ column ] = Maui.TypeConverter.DateToString( value );
}
}
public static DateTime GetDateTime( this DataRow row, string column )
{
return Maui.TypeConverter.StringToDateTime( row[ column ].ToString() );
}
public static void SetDateTime( this DataRow row, string column, DateTime value )
{
row[ column ] = Maui.TypeConverter.DateTimeToString( value );
}
#endregion
}
}
| {
"content_hash": "22564e719d289873c61f6f3cfb14c42d",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 96,
"avg_line_length": 30.266666666666666,
"alnum_prop": 0.49706314243759175,
"repo_name": "bg0jr/Maui",
"id": "70b291c33277f328a2376c1b4a1a07228aa3b835",
"size": "2726",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Dynamics/Maui.Dynamics/Data/DataRowExtensions.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C#",
"bytes": "1381623"
},
{
"name": "CSS",
"bytes": "12748"
},
{
"name": "HTML",
"bytes": "326379"
},
{
"name": "JavaScript",
"bytes": "16039"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="latin1" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
<header>
<copyright>
<year>2000</year><year>2009</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
The contents of this file are subject to the Erlang Public License,
Version 1.1, (the "License"); you may not use this file except in
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
</legalnotice>
<title>Xref - The Cross Reference Tool</title>
<prepared>Hans Bolinder</prepared>
<responsible>nobody</responsible>
<docno></docno>
<approved>nobody</approved>
<checked>no</checked>
<date>2000-08-18</date>
<rev>PA1</rev>
<file>xref_chapter.xml</file>
</header>
<p>Xref is a cross reference tool that can be used for
finding dependencies between functions, modules, applications
and releases. It does so by analyzing the defined functions
and the function calls.
</p>
<p>In order to make Xref easy to use, there are predefined
analyses that perform some common tasks. Typically, a module
or a release can be checked for calls to undefined functions.
For the somewhat more advanced user there is a small, but
rather flexible, language that can be used for selecting parts
of the analyzed system and for doing some simple graph
analyses on selected calls.
</p>
<p>The following sections show some features of Xref, beginning
with a module check and a predefined analysis. Then follow
examples that can be skipped on the first reading; not all of
the concepts used are explained, and it is assumed that the
<seealso marker="xref">reference manual</seealso> has been at
least skimmed.
</p>
<section>
<title>Module Check</title>
<p>Assume we want to check the following module:
</p>
<pre>
-module(my_module).
-export([t/1]).
t(A) ->
my_module:t2(A).
t2(_) ->
true. </pre>
<p>Cross reference data are read from BEAM files, so the first
step when checking an edited module is to compile it:
</p>
<pre>
1> <input>c(my_module, debug_info).</input>
./my_module.erl:10: Warning: function t2/1 is unused
{ok, my_module} </pre>
<p>The <c>debug_info</c> option ensures that the BEAM file
contains debug information, which makes it possible to find
unused local functions.
</p>
<p>The module can now be checked for calls to <seealso marker="xref#deprecated_function">deprecated functions</seealso>, calls to <seealso marker="xref#undefined_function">undefined functions</seealso>,
and for unused local functions:
</p>
<pre>
2> <input>xref:m(my_module)</input>
[{deprecated,[]},
{undefined,[{{my_module,t,1},{my_module,t2,1}}]},
{unused,[{my_module,t2,1}]}] </pre>
<p><c>m/1</c> is also suitable for checking that the
BEAM file of a module that is about to be loaded into a
running a system does not call any undefined functions. In
either case, the code path of the code server (see the module
<c>code</c>) is used for finding modules that export externally
called functions not exported by the checked module itself, so
called <seealso marker="xref#library_module">library modules</seealso>.
</p>
</section>
<section>
<title>Predefined Analysis</title>
<p>In the last example the module to analyze was given as an
argument to <c>m/1</c>, and the code path was (implicitly)
used as <seealso marker="xref#library_path">library path</seealso>. In this example an <seealso marker="xref#xref_server">xref server</seealso> will be used,
which makes it possible to analyze applications and releases,
and also to select the library path explicitly.
</p>
<p>Each Xref server is referred to by a unique name. The name
is given when creating the server:
</p>
<pre>
1> <input>xref:start(s).</input>
{ok,<0.27.0>} </pre>
<p>Next the system to be analyzed is added to the Xref server.
Here the system will be OTP, so no library path will be needed.
Otherwise, when analyzing a system that uses OTP, the OTP
modules are typically made library modules by
setting the library path to the default OTP code path (or to
<c>code_path</c>, see the <seealso marker="xref#code_path">reference manual</seealso>). By
default, the names of read BEAM files and warnings are output
when adding analyzed modules, but these messages can be avoided
by setting default values of some options:
</p>
<pre>
2> <input>xref:set_default(s, [{verbose,false}, {warnings,false}]).</input>
ok
3> <input>xref:add_release(s, code:lib_dir(), {name, otp}).</input>
{ok,otp} </pre>
<p><c>add_release/3</c> assumes that all subdirectories of the
library directory returned by <c>code:lib_dir()</c> contain
applications; the effect is that of reading all
applications' BEAM files.
</p>
<p>It is now easy to check the release for calls to undefined
functions:
</p>
<pre>
4> <input>xref:analyze(s, undefined_function_calls).</input>
{ok, [...]} </pre>
<p>We can now continue with further analyses, or we can delete
the Xref server:
</p>
<pre>
5> <input>xref:stop(s).</input> </pre>
<p>The check for calls to undefined functions is an example of a
predefined analysis, probably the most useful one. Other
examples are the analyses that find unused local
functions, or functions that call some given functions. See
the <seealso marker="xref#analyze">analyze/2,3</seealso>
functions for a complete list of predefined analyses.
</p>
<p>Each predefined analysis is a shorthand for a <seealso marker="xref#query">query</seealso>, a sentence of a tiny
language providing cross reference data as
values of <seealso marker="xref#predefined_variable">predefined variables</seealso>.
The check for calls to undefined functions can thus be stated as
a query:
</p>
<pre>
4> <input>xref:q(s, "(XC - UC) || (XU - X - B)").</input>
{ok,[...]} </pre>
<p>The query asks for the restriction of external calls except the
unresolved calls to calls to functions that are externally used
but neither exported nor built-in functions (the <c>||</c>
operator restricts the used functions while the <c>|</c>
operator restricts the calling functions). The <c>-</c> operator
returns the difference of two sets, and the <c>+</c> operator to
be used below returns the union of two sets.
</p>
<p>The relationships between the predefined variables
<c>XU</c>, <c>X</c>, <c>B</c> and a few
others are worth elaborating upon.
The reference manual mentions two ways of expressing the set of
all functions, one that focuses on how they are defined:
<c>X + L + B + U</c>, and one
that focuses on how they are used:
<c>UU + LU + XU</c>.
The reference also mentions some <seealso marker="xref#simple_facts">facts</seealso> about the
variables:
</p>
<list type="bulleted">
<item><c>F</c> is equal to <c>L + X</c> (the defined functions
are the local functions and the external functions);</item>
<item><c>U</c> is a subset of <c>XU</c> (the unknown functions
are a subset of the externally used functions since
the compiler ensures that locally used functions are defined);</item>
<item><c>B</c> is a subset of <c>XU</c> (calls to built-in
functions are always external by definition, and unused
built-in functions are ignored);</item>
<item><c>LU</c> is a subset of <c>F</c> (the locally used
functions are either local functions or exported functions,
again ensured by the compiler);</item>
<item><c>UU</c> is equal to
<c>F - (XU + LU)</c> (the unused functions
are defined functions that are neither used externally nor
locally);</item>
<item><c>UU</c> is a subset of <c>F</c> (the unused functions
are defined in analyzed modules).</item>
</list>
<p>Using these facts, the two small circles in the picture below
can be combined.
</p>
<image file="venn1.gif">
<icaption>Definition and use of functions</icaption>
</image>
<p>It is often clarifying to mark the variables of a query in such
a circle. This is illustrated in the picture below for some of
the predefined analyses. Note that local functions used by local
functions only are not marked in the <c>locals_not_used</c>
circle. <marker id="venn2"></marker>
</p>
<image file="venn2.gif">
<icaption>Some predefined analyses as subsets of all functions</icaption>
</image>
</section>
<section>
<title>Expressions</title>
<p>The module check and the predefined analyses are useful, but
limited. Sometimes more flexibility is needed, for instance one
might not need to apply a graph analysis on all calls, but some
subset will do equally well. That flexibility is provided with
a simple language. Below are some expressions of the language
with comments, focusing on elements of the language rather than
providing useful examples. The analyzed system is assumed to be
OTP, so in order to run the queries, first evaluate these calls:
</p>
<pre>
xref:start(s).
xref:add_release(s, code:root_dir()). </pre>
<taglist>
<tag><c>xref:q(s, "(Fun) xref : Mod").</c></tag>
<item>All functions of the <c>xref</c> module. </item>
<tag><c>xref:q(s, "xref : Mod * X").</c></tag>
<item>All exported functions of the <c>xref</c> module. The first
operand of the intersection operator <c>*</c> is implicitly
converted to the more special type of the second operand.</item>
<tag><c>xref:q(s, "(Mod) tools").</c></tag>
<item>All modules of the <c>tools</c> application.</item>
<tag><c>xref:q(s, '"xref_.*" : Mod').</c></tag>
<item>All modules with a name beginning with <c>xref_</c>.</item>
<tag><c>xref:q(s, "# E | X ").</c></tag>
<item>Number of calls from exported functions.</item>
<tag><c>xref:q(s, "XC || L ").</c></tag>
<item>All external calls to local functions.</item>
<tag><c>xref:q(s, "XC * LC").</c></tag>
<item>All calls that have both an external and a local version.</item>
<tag><c>xref:q(s, "(LLin) (LC * XC)").</c></tag>
<item>The lines where the local calls of the last example
are made.</item>
<tag><c>xref:q(s, "(XLin) (LC * XC)").</c></tag>
<item>The lines where the external calls of the example before
last are made.</item>
<tag><c>xref:q(s, "XC * (ME - strict ME)").</c></tag>
<item>External calls within some module.</item>
<tag><c>xref:q(s, "E ||| kernel").</c></tag>
<item>All calls within the <c>kernel</c> application. </item>
<tag><c>xref:q(s, "closure E | kernel || kernel").</c></tag>
<item>All direct and indirect calls within the <c>kernel</c>
application. Both the calling and the used functions of
indirect calls are defined in modules of the kernel
application, but it is possible that some functions outside
the kernel application are used by indirect calls.</item>
<tag><c>xref:q(s, "{toolbar,debugger}:Mod of ME").</c></tag>
<item>A chain of module calls from <c>toolbar</c> to
<c>debugger</c>, if there is such a chain, otherwise
<c>false</c>. The chain of calls is represented by a list of
modules, <c>toolbar</c> being the first element and
<c>debugger</c>the last element.</item>
<tag><c>xref:q(s, "closure E | toolbar:Mod || debugger:Mod").</c></tag>
<item>All (in)direct calls from functions in <c>toolbar</c> to
functions in <c>debugger</c>.</item>
<tag><c>xref:q(s, "(Fun) xref -> xref_base").</c></tag>
<item>All function calls from <c>xref</c> to <c>xref_base</c>.</item>
<tag><c>xref:q(s, "E * xref -> xref_base").</c></tag>
<item>Same interpretation as last expression.</item>
<tag><c>xref:q(s, "E || xref_base | xref").</c></tag>
<item>Same interpretation as last expression.</item>
<tag><c>xref:q(s, "E * [xref -> lists, xref_base -> digraph]").</c></tag>
<item>All function calls from <c>xref</c> to <c>lists</c>, and
all function calls from <c>xref_base</c> to <c>digraph</c>.</item>
<tag><c>xref:q(s, "E | [xref, xref_base] || [lists, digraph]").</c></tag>
<item>All function calls from <c>xref</c> and <c>xref_base</c>
to <c>lists</c> and <c>digraph</c>.</item>
<tag><c>xref:q(s, "components EE").</c></tag>
<item>All strongly connected components of the Inter Call
Graph. Each component is a set of exported or unused local functions
that call each other (in)directly.</item>
<tag><c>xref:q(s, "X * digraph * range (closure (E | digraph) | (L * digraph))").</c></tag>
<item>All exported functions of the <c>digraph</c> module
used (in)directly by some function in <c>digraph</c>.</item>
<tag><c>xref:q(s, "L * yeccparser:Mod - range (closure (E |</c></tag>
<item></item>
<tag><c>yeccparser:Mod) | (X * yeccparser:Mod))").</c></tag>
<item>The interpretation is left as an exercise. </item>
</taglist>
</section>
<section>
<title>Graph Analysis</title>
<p>The list <seealso marker="xref#representation">representation of graphs</seealso> is used analyzing direct calls,
while the <c>digraph</c> representation is suited for analyzing
indirect calls. The restriction operators (<c>|</c>, <c>||</c>
and <c>|||</c>) are the only operators that accept both
representations. This means that in order to analyze indirect
calls using restriction, the <c>closure</c> operator (which creates the
<c>digraph</c> representation of graphs) has to been
applied explicitly.
</p>
<p>As an example of analyzing indirect calls, the following Erlang
function tries to answer the question:
if we want to know which modules are used indirectly by some
module(s), is it worth while using the <seealso marker="xref#call_graph">function graph</seealso> rather
than the module graph? Recall that a module M1 is said to call
a module M2 if there is some function in M1 that calls some
function in M2. It would be nice if we could use the much
smaller module graph, since it is available also in the light
weight <c>modules</c><seealso marker="xref#mode">mode</seealso> of Xref servers.
</p>
<code type="erl">
t(S) ->
{ok, _} = xref:q(S, "Eplus := closure E"),
{ok, Ms} = xref:q(S, "AM"),
Fun = fun(M, N) ->
Q = io_lib:format("# (Mod) (Eplus | ~p : Mod)", [M]),
{ok, N0} = xref:q(S, lists:flatten(Q)),
N + N0
end,
Sum = lists:foldl(Fun, 0, Ms),
ok = xref:forget(S, 'Eplus'),
{ok, Tot} = xref:q(S, "# (closure ME | AM)"),
100 * ((Tot - Sum) / Tot). </code>
<p>Comments on the code:
</p>
<list type="bulleted">
<item>We want to find the reduction of the closure of the
function graph to modules.
The direct expression for doing that would be
<c>(Mod) (closure E | AM)</c>, but then we
would have to represent all of the transitive closure of E in
memory. Instead the number of indirectly used modules is
found for each analyzed module, and the sum over all modules
is calculated.
</item>
<item>A user variable is employed for holding the <c>digraph</c>
representation of the function graph for use in many
queries. The reason is efficiency. As opposed to the
<c>=</c> operator, the <c>:=</c> operator saves a value for
subsequent analyses. Here might be the place to note that
equal subexpressions within a query are evaluated only once;
<c>=</c> cannot be used for speeding things up.
</item>
<item><c>Eplus | ~p : Mod</c>. The <c>|</c> operator converts
the second operand to the type of the first operand. In this
case the module is converted to all functions of the
module. It is necessary to assign a type to the module
(<c>: Mod</c>), otherwise modules like <c>kernel</c> would be
converted to all functions of the application with the same
name; the most general constant is used in cases of ambiguity.
</item>
<item>Since we are only interested in a ratio, the unary
operator <c>#</c> that counts the elements of the operand is
used. It cannot be applied to the <c>digraph</c> representation
of graphs.
</item>
<item>We could find the size of the closure of the module graph
with a loop similar to one used for the function graph, but
since the module graph is so much smaller, a more direct
method is feasible.
</item>
</list>
<p>When the Erlang function <c>t/1</c> was applied to an Xref
server loaded with the current version of OTP, the returned
value was close to 84 (percent). This means that the number
of indirectly used modules is approximately six times greater
when using the module graph.
So the answer to the above stated question is that it is
definitely worth while using the function graph for this
particular analysis.
Finally, note that in the presence of unresolved calls, the
graphs may be incomplete, which means that there may be
indirectly used modules that do not show up.
</p>
</section>
</chapter>
| {
"content_hash": "85ef0726584cf511e679a235a6caf169",
"timestamp": "",
"source": "github",
"line_count": 383,
"max_line_length": 206,
"avg_line_length": 48.33942558746736,
"alnum_prop": 0.6459976234201145,
"repo_name": "racker/omnibus",
"id": "39c5545af9c0f45ff1cff2aba8ea679689b02089",
"size": "18514",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "source/otp_src_R14B02/lib/tools/doc/src/xref_chapter.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "21896"
},
{
"name": "ActionScript",
"bytes": "7811"
},
{
"name": "Ada",
"bytes": "913692"
},
{
"name": "Assembly",
"bytes": "546596"
},
{
"name": "Awk",
"bytes": "147229"
},
{
"name": "C",
"bytes": "118056858"
},
{
"name": "C#",
"bytes": "1871806"
},
{
"name": "C++",
"bytes": "28581121"
},
{
"name": "CLIPS",
"bytes": "6933"
},
{
"name": "CSS",
"bytes": "162089"
},
{
"name": "Clojure",
"bytes": "79070"
},
{
"name": "D",
"bytes": "4925"
},
{
"name": "DOT",
"bytes": "1898"
},
{
"name": "Emacs Lisp",
"bytes": "625560"
},
{
"name": "Erlang",
"bytes": "79712366"
},
{
"name": "FORTRAN",
"bytes": "3755"
},
{
"name": "Java",
"bytes": "5632652"
},
{
"name": "JavaScript",
"bytes": "1240931"
},
{
"name": "Logos",
"bytes": "119270"
},
{
"name": "Objective-C",
"bytes": "1088478"
},
{
"name": "PHP",
"bytes": "39064"
},
{
"name": "Pascal",
"bytes": "66389"
},
{
"name": "Perl",
"bytes": "4971637"
},
{
"name": "PowerShell",
"bytes": "1885"
},
{
"name": "Prolog",
"bytes": "5214"
},
{
"name": "Python",
"bytes": "912999"
},
{
"name": "R",
"bytes": "4009"
},
{
"name": "Racket",
"bytes": "2713"
},
{
"name": "Ragel in Ruby Host",
"bytes": "24585"
},
{
"name": "Rebol",
"bytes": "106436"
},
{
"name": "Ruby",
"bytes": "27360215"
},
{
"name": "Scala",
"bytes": "5487"
},
{
"name": "Scheme",
"bytes": "5036"
},
{
"name": "Scilab",
"bytes": "771"
},
{
"name": "Shell",
"bytes": "8793006"
},
{
"name": "Tcl",
"bytes": "3330919"
},
{
"name": "Visual Basic",
"bytes": "10926"
},
{
"name": "XQuery",
"bytes": "4276"
},
{
"name": "XSLT",
"bytes": "2003063"
},
{
"name": "eC",
"bytes": "4568"
}
],
"symlink_target": ""
} |
#include <kernel/kernel.h>
#include <kernel/int.h>
#include <kernel/debug.h>
#include <kernel/heap.h>
#include <kernel/smp.h>
#include <kernel/thread.h>
#include <kernel/arch/int.h>
#include <newos/errors.h>
#include <boot/stage2.h>
#include <string.h>
#include <stdio.h>
struct io_handler {
struct io_handler *next;
int (*func)(void*);
void* data;
const char *name;
};
struct io_vector {
struct io_handler *handler_list;
spinlock_t vector_lock;
// statistics
int call_count;
};
static struct io_vector io_vectors[ARCH_NUM_INT_VECTORS];
int int_init(kernel_args *ka)
{
dprintf("init_int_handlers: entry\n");
return arch_int_init(ka);
}
int int_init2(kernel_args *ka)
{
// clear out all of the vectors
memset(io_vectors, 0, sizeof(struct io_vector) * ARCH_NUM_INT_VECTORS);
return arch_int_init2(ka);
}
int int_set_io_interrupt_handler(int vector, int (*func)(void*), void* data, const char *name)
{
struct io_handler *io;
if(vector < 0 || vector >= ARCH_NUM_INT_VECTORS)
return ERR_INVALID_ARGS;
// insert this io handler in the chain of interrupt
// handlers registered for this io interrupt
io = (struct io_handler *)kmalloc(sizeof(struct io_handler));
if(io == NULL)
return ERR_NO_MEMORY;
io->name = kstrdup(name);
if(io->name == NULL) {
kfree(io);
return ERR_NO_MEMORY;
}
io->func = func;
io->data = data;
int_disable_interrupts();
acquire_spinlock(&io_vectors[vector].vector_lock);
io->next = io_vectors[vector].handler_list;
io_vectors[vector].handler_list = io;
release_spinlock(&io_vectors[vector].vector_lock);
int_restore_interrupts();
arch_int_enable_io_interrupt(vector);
return NO_ERROR;
}
int int_remove_io_interrupt_handler(int vector, int (*func)(void*), void* data)
{
struct io_handler *io, *prev = NULL;
if(vector < 0 || vector >= ARCH_NUM_INT_VECTORS)
return ERR_INVALID_ARGS;
// lock the structures down so it is not modified while we search
int_disable_interrupts();
acquire_spinlock(&io_vectors[vector].vector_lock);
// start at the beginning
io = io_vectors[vector].handler_list;
// while not at end
while(io != NULL) {
// see if we match both the function & data
if (io->func == func && io->data == data)
break;
// Store our backlink and move to next
prev = io;
io = io->next;
}
// If we found it
if (io != NULL) {
// unlink it, taking care of the change it was the first in line
if (prev != NULL)
prev->next = io->next;
else
io_vectors[vector].handler_list = io->next;
}
// release our lock as we're done with the vector
release_spinlock(&io_vectors[vector].vector_lock);
int_restore_interrupts();
// and disable the IRQ if nothing left
if (io != NULL) {
if (prev == NULL && io->next == NULL)
arch_int_disable_io_interrupt(vector);
kfree((char *)io->name);
kfree(io);
}
return (io != NULL) ? NO_ERROR : ERR_INVALID_ARGS;
}
int int_io_interrupt_handler(int vector)
{
int ret = INT_NO_RESCHEDULE;
acquire_spinlock(&io_vectors[vector].vector_lock);
io_vectors[vector].call_count++;
if(io_vectors[vector].handler_list == NULL) {
dprintf("unhandled io interrupt 0x%x\n", vector);
} else {
struct io_handler *io;
int temp_ret;
io = io_vectors[vector].handler_list;
while(io != NULL) {
temp_ret = io->func(io->data);
if(temp_ret == INT_RESCHEDULE)
ret = INT_RESCHEDULE;
io = io->next;
}
}
release_spinlock(&io_vectors[vector].vector_lock);
return ret;
}
void int_enable_interrupts(void)
{
arch_int_enable_interrupts();
}
// increase the interrupt disable count in the current thread structure.
// if we go from 0 to 1, disable interrupts
void int_disable_interrupts(void)
{
struct thread *t = thread_get_current_thread();
if(!t)
return;
ASSERT(t->int_disable_level >= 0);
t->int_disable_level++;
if(t->int_disable_level == 1) {
// we just crossed from 0 -> 1
arch_int_disable_interrupts();
}
}
// decrement the interrupt disable count. If we hit zero, re-enable interrupts
void int_restore_interrupts(void)
{
struct thread *t = thread_get_current_thread();
if(!t)
return;
t->int_disable_level--;
ASSERT(t->int_disable_level >= 0);
if(t->int_disable_level == 0) {
// we just hit 0
arch_int_enable_interrupts();
}
}
bool int_are_interrupts_enabled(void)
{
return arch_int_are_interrupts_enabled();
}
| {
"content_hash": "ff5c72056bf60a1a34c478ed15fbba74",
"timestamp": "",
"source": "github",
"line_count": 200,
"max_line_length": 94,
"avg_line_length": 21.615,
"alnum_prop": 0.6740689336109184,
"repo_name": "travisg/newos",
"id": "1894cb9e6816337de77ad857268e0c56ab637a43",
"size": "4447",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "kernel/int.c",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "129432"
},
{
"name": "C",
"bytes": "3760002"
},
{
"name": "C++",
"bytes": "368875"
},
{
"name": "Objective-C",
"bytes": "39185"
},
{
"name": "Shell",
"bytes": "523"
}
],
"symlink_target": ""
} |
#ifndef HTMLTemplateElement_h
#define HTMLTemplateElement_h
#include "core/html/HTMLElement.h"
namespace blink {
class DocumentFragment;
class TemplateContentDocumentFragment;
class HTMLTemplateElement FINAL : public HTMLElement {
public:
DECLARE_NODE_FACTORY(HTMLTemplateElement);
virtual ~HTMLTemplateElement();
virtual void trace(Visitor*) OVERRIDE;
DocumentFragment* content() const;
private:
virtual PassRefPtrWillBeRawPtr<Node> cloneNode(bool deep = true) OVERRIDE;
virtual void didMoveToNewDocument(Document& oldDocument) OVERRIDE;
explicit HTMLTemplateElement(Document&);
mutable RefPtrWillBeMember<TemplateContentDocumentFragment> m_content;
};
} // namespace blink
#endif // HTMLTemplateElement_h
| {
"content_hash": "d902f7908e9302fbeb6122d413c00696",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 78,
"avg_line_length": 23.46875,
"alnum_prop": 0.7842876165113183,
"repo_name": "ondra-novak/blink",
"id": "23e3126112562524c99c5743fd306d2501d26891",
"size": "2314",
"binary": false,
"copies": "2",
"ref": "refs/heads/nw",
"path": "Source/core/html/HTMLTemplateElement.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "12983"
},
{
"name": "Bison",
"bytes": "64327"
},
{
"name": "C",
"bytes": "1487362"
},
{
"name": "C++",
"bytes": "40237536"
},
{
"name": "CSS",
"bytes": "537586"
},
{
"name": "Java",
"bytes": "66510"
},
{
"name": "JavaScript",
"bytes": "26502253"
},
{
"name": "Makefile",
"bytes": "677"
},
{
"name": "Objective-C",
"bytes": "23525"
},
{
"name": "Objective-C++",
"bytes": "377730"
},
{
"name": "PHP",
"bytes": "166434"
},
{
"name": "Perl",
"bytes": "585757"
},
{
"name": "Python",
"bytes": "3997910"
},
{
"name": "Ruby",
"bytes": "141818"
},
{
"name": "Shell",
"bytes": "8806"
},
{
"name": "XSLT",
"bytes": "49099"
}
],
"symlink_target": ""
} |
package com.aiteu.dailyreading.view.drawer;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.ColorFilter;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.drawable.Drawable;
/**
* A specialized Drawable that fills the Canvas with a specified color.
* Note that a ColorDrawable ignores the ColorFilter.
* <p/>
* <p>It can be defined in an XML file with the <code><color></code> element.</p>
*
* @attr ref android.R.styleable#ColorDrawable_color
*/
class ColorDrawable extends Drawable {
private ColorState mState;
private final Paint mPaint = new Paint();
/** Creates a new black ColorDrawable. */
public ColorDrawable() {
this(null);
}
/**
* Creates a new ColorDrawable with the specified color.
*
* @param color The color to draw.
*/
public ColorDrawable(int color) {
this(null);
setColor(color);
}
private ColorDrawable(ColorState state) {
mState = new ColorState(state);
}
@Override
public int getChangingConfigurations() {
return super.getChangingConfigurations() | mState.mChangingConfigurations;
}
@Override
public void draw(Canvas canvas) {
if ((mState.mUseColor >>> 24) != 0) {
mPaint.setColor(mState.mUseColor);
canvas.drawRect(getBounds(), mPaint);
}
}
/**
* Gets the drawable's color value.
*
* @return int The color to draw.
*/
public int getColor() {
return mState.mUseColor;
}
/**
* Sets the drawable's color value. This action will clobber the results of prior calls to
* {@link #setAlpha(int)} on this object, which side-affected the underlying color.
*
* @param color The color to draw.
*/
public void setColor(int color) {
if (mState.mBaseColor != color || mState.mUseColor != color) {
invalidateSelf();
mState.mBaseColor = mState.mUseColor = color;
}
}
/**
* Returns the alpha value of this drawable's color.
*
* @return A value between 0 and 255.
*/
public int getAlpha() {
return mState.mUseColor >>> 24;
}
/**
* Sets the color's alpha value.
*
* @param alpha The alpha value to set, between 0 and 255.
*/
public void setAlpha(int alpha) {
alpha += alpha >> 7; // make it 0..256
int baseAlpha = mState.mBaseColor >>> 24;
int useAlpha = baseAlpha * alpha >> 8;
int oldUseColor = mState.mUseColor;
mState.mUseColor = (mState.mBaseColor << 8 >>> 8) | (useAlpha << 24);
if (oldUseColor != mState.mUseColor) {
invalidateSelf();
}
}
/**
* Setting a color filter on a ColorDrawable has no effect.
*
* @param colorFilter Ignore.
*/
public void setColorFilter(ColorFilter colorFilter) {
}
public int getOpacity() {
switch (mState.mUseColor >>> 24) {
case 255:
return PixelFormat.OPAQUE;
case 0:
return PixelFormat.TRANSPARENT;
}
return PixelFormat.TRANSLUCENT;
}
@Override
public ConstantState getConstantState() {
mState.mChangingConfigurations = getChangingConfigurations();
return mState;
}
static final class ColorState extends ConstantState {
int mBaseColor; // base color, independent of setAlpha()
int mUseColor; // basecolor modulated by setAlpha()
int mChangingConfigurations;
ColorState(ColorState state) {
if (state != null) {
mBaseColor = state.mBaseColor;
mUseColor = state.mUseColor;
}
}
@Override
public Drawable newDrawable() {
return new ColorDrawable(this);
}
@Override
public Drawable newDrawable(Resources res) {
return new ColorDrawable(this);
}
@Override
public int getChangingConfigurations() {
return mChangingConfigurations;
}
}
}
| {
"content_hash": "11a85ddfd9be0737ae41643ef83331a4",
"timestamp": "",
"source": "github",
"line_count": 156,
"max_line_length": 94,
"avg_line_length": 26.75,
"alnum_prop": 0.6007668344116942,
"repo_name": "ReadingGroup534/DailyReading",
"id": "a83454e5fb5ada5189d7247e91be98defcb421e7",
"size": "4792",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "android/src/com/aiteu/dailyreading/view/drawer/ColorDrawable.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "184"
},
{
"name": "Java",
"bytes": "620756"
}
],
"symlink_target": ""
} |
"""
Script to scan Zephyr include directories and emit system call and subsystem metadata
System calls require a great deal of boilerplate code in order to implement
completely. This script is the first step in the build system's process of
auto-generating this code by doing a text scan of directories containing
C or header files, and building up a database of system calls and their
function call prototypes. This information is emitted to a generated
JSON file for further processing.
This script also scans for struct definitions such as __subsystem and
__net_socket, emitting a JSON dictionary mapping tags to all the struct
declarations found that were tagged with them.
If the output JSON file already exists, its contents are checked against
what information this script would have outputted; if the result is that the
file would be unchanged, it is not modified to prevent unnecessary
incremental builds.
"""
import sys
import re
import argparse
import os
import json
regex_flags = re.MULTILINE | re.VERBOSE
syscall_regex = re.compile(r'''
__syscall\s+ # __syscall attribute, must be first
([^(]+) # type and name of system call (split later)
[(] # Function opening parenthesis
([^)]*) # Arg list (split later)
[)] # Closing parenthesis
''', regex_flags)
struct_tags = ["__subsystem", "__net_socket"]
tagged_struct_decl_template = r'''
%s\s+ # tag, must be first
struct\s+ # struct keyword is next
([^{]+) # name of subsystem
[{] # Open curly bracket
'''
def tagged_struct_update(target_list, tag, contents):
regex = re.compile(tagged_struct_decl_template % tag, regex_flags)
items = [mo.groups()[0].strip() for mo in regex.finditer(contents)]
target_list.extend(items)
def analyze_headers(multiple_directories):
syscall_ret = []
tagged_ret = {}
for tag in struct_tags:
tagged_ret[tag] = []
for base_path in multiple_directories:
for root, dirs, files in os.walk(base_path, topdown=True):
dirs.sort()
files.sort()
for fn in files:
# toolchain/common.h has the definitions of these tags which we
# don't want to trip over
path = os.path.join(root, fn)
if (not (path.endswith(".h") or path.endswith(".c")) or
path.endswith(os.path.join(os.sep, 'toolchain',
'common.h'))):
continue
with open(path, "r", encoding="utf-8") as fp:
contents = fp.read()
try:
syscall_result = [(mo.groups(), fn)
for mo in syscall_regex.finditer(contents)]
for tag in struct_tags:
tagged_struct_update(tagged_ret[tag], tag, contents)
except Exception:
sys.stderr.write("While parsing %s\n" % fn)
raise
syscall_ret.extend(syscall_result)
return syscall_ret, tagged_ret
def update_file_if_changed(path, new):
if os.path.exists(path):
with open(path, 'r') as fp:
old = fp.read()
if new != old:
with open(path, 'w') as fp:
fp.write(new)
else:
with open(path, 'w') as fp:
fp.write(new)
def parse_args():
global args
parser = argparse.ArgumentParser(
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument("-i", "--include", required=True, action='append',
help='''include directories recursively scanned
for .h files. Can be specified multiple times:
-i topdir1 -i topdir2 ...''')
parser.add_argument(
"-j", "--json-file", required=True,
help="Write system call prototype information as json to file")
parser.add_argument(
"-t", "--tag-struct-file", required=True,
help="Write tagged struct name information as json to file")
args = parser.parse_args()
def main():
parse_args()
syscalls, tagged = analyze_headers(args.include)
# Only write json files if they don't exist or have changes since
# they will force an incremental rebuild.
syscalls_in_json = json.dumps(
syscalls,
indent=4,
sort_keys=True
)
update_file_if_changed(args.json_file, syscalls_in_json)
tagged_struct_in_json = json.dumps(
tagged,
indent=4,
sort_keys=True
)
update_file_if_changed(args.tag_struct_file, tagged_struct_in_json)
if __name__ == "__main__":
main()
| {
"content_hash": "5082171cbea93b5dd9647898bbe9b268",
"timestamp": "",
"source": "github",
"line_count": 147,
"max_line_length": 85,
"avg_line_length": 33.31972789115646,
"alnum_prop": 0.5822784810126582,
"repo_name": "finikorg/zephyr",
"id": "9994efdd2742d700ac0e82855924c4c1c018aa72",
"size": "5003",
"binary": false,
"copies": "4",
"ref": "refs/heads/main",
"path": "scripts/build/parse_syscalls.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "445128"
},
{
"name": "Batchfile",
"bytes": "110"
},
{
"name": "C",
"bytes": "44321001"
},
{
"name": "C++",
"bytes": "29292"
},
{
"name": "CMake",
"bytes": "1369918"
},
{
"name": "Cadence",
"bytes": "1501"
},
{
"name": "EmberScript",
"bytes": "997"
},
{
"name": "Forth",
"bytes": "1648"
},
{
"name": "GDB",
"bytes": "1285"
},
{
"name": "Haskell",
"bytes": "722"
},
{
"name": "JetBrains MPS",
"bytes": "3152"
},
{
"name": "PLSQL",
"bytes": "281"
},
{
"name": "Perl",
"bytes": "215338"
},
{
"name": "Python",
"bytes": "2251570"
},
{
"name": "Shell",
"bytes": "171294"
},
{
"name": "SmPL",
"bytes": "36840"
},
{
"name": "Smalltalk",
"bytes": "1885"
},
{
"name": "SourcePawn",
"bytes": "14890"
},
{
"name": "Tcl",
"bytes": "5838"
},
{
"name": "VBA",
"bytes": "294"
},
{
"name": "Verilog",
"bytes": "6394"
}
],
"symlink_target": ""
} |
"""
To run this script, type
python buyLotsOfFruit.py
Once you have correctly implemented the buyLotsOfFruit function,
the script should produce the output:
Cost of [('apples', 2.0), ('pears', 3.0), ('limes', 4.0)] is 12.25
"""
fruitPrices = {'apples':2.00, 'oranges': 1.50, 'pears': 1.75,
'limes':0.75, 'strawberries':1.00}
def buyLotsOfFruit(orderList):
"""
orderList: List of (fruit, numPounds) tuples
Returns cost of order
"""
totalCost = 0.0
for fruit, qty in orderList:
if fruitPrices[fruit] != None:
totalCost += fruitPrices[fruit] * qty
return totalCost
# Main Method
if __name__ == '__main__':
"This code runs when you invoke the script from the command line"
orderList = [ ('apples', 2.0), ('pears', 3.0), ('limes', 4.0) ]
print 'Cost of', orderList, 'is', buyLotsOfFruit(orderList)
| {
"content_hash": "7894a47469940c4bf8c0e2ca52357b75",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 69,
"avg_line_length": 28.387096774193548,
"alnum_prop": 0.6227272727272727,
"repo_name": "lucasosouza/berkeleyAI",
"id": "8daab6b98772f3fb525699ebce1b95bf854da569",
"size": "1546",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tutorial/buyLotsOfFruit.py",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "923675"
}
],
"symlink_target": ""
} |
{% extends 'panel.html' %}
{% load utilities %}
{% load i18n %}
{% load account socialaccount %}
{% block head_title %}{% trans "Log in to Open Humans" %}{% endblock %}
{% block head_title_suffix %}{% endblock %}
{% block panel_content %}
<div class="row">
<div class="col-md-6">
{% include 'account/login-form.html' %}
<input type="submit" form="login-form" id="login"
class="btn btn-primary" value="Log in">
</form>
</div>
<div class="col-xs-12 visible-xs-block visible-sm-block">
<hr>
</div>
<div class="col-md-6">
<center>
<span class="h4">or</span>
</center>
{% include 'account/login-social.html' %}
</div>
</div>
<div class="row">
<div class="col-xs-12 text-center small">
<hr>
<a href="{% url 'account_reset_password' %}">Reset password</a>
|
<a href="{% url 'account_signup' %}"
class="signup-link">Create account</a>
</div>
</div>
{% endblock %}
| {
"content_hash": "c48c63bffdd04c6516a2f7ef258d07ba",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 72,
"avg_line_length": 23.9,
"alnum_prop": 0.5805439330543933,
"repo_name": "OpenHumans/open-humans",
"id": "59f2db4bf03f0a9fc2786d4e95c15b0f4b4eb477",
"size": "956",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "open_humans/templates/account/login.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "23921"
},
{
"name": "HTML",
"bytes": "372870"
},
{
"name": "JavaScript",
"bytes": "38991"
},
{
"name": "Python",
"bytes": "519685"
},
{
"name": "SCSS",
"bytes": "7823"
},
{
"name": "Shell",
"bytes": "721"
}
],
"symlink_target": ""
} |
namespace SitefinityWebApp.ResourcePackages.Bootstrap.MVC.Views.DocumentsList
{
#line 3 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
using System;
#line default
#line hidden
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Web;
using System.Web.Helpers;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
#line 5 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
using Telerik.Sitefinity.Frontend.Media.Mvc.Models.DocumentsList;
#line default
#line hidden
#line 4 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
using Telerik.Sitefinity.Frontend.Mvc.Helpers;
#line default
#line hidden
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/MVC/Views/DocumentsList/List.DocumentsTable.cshtml")]
public partial class List_DocumentsTable : System.Web.Mvc.WebViewPage<Telerik.Sitefinity.Frontend.Media.Mvc.Models.DocumentsList.DocumentsListViewModel>
{
public List_DocumentsTable()
{
}
public override void Execute()
{
WriteLiteral("\r\n<div");
WriteAttribute("class", Tuple.Create(" class=\"", 231), Tuple.Create("\"", 254)
#line 7 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 239), Tuple.Create<System.Object, System.Int32>(Model.CssClass
#line default
#line hidden
, 239), false)
);
WriteLiteral(">\r\n\r\n <div");
WriteLiteral(" class=\"sf-document-list sf-document-list--table\"");
WriteLiteral(">\r\n\r\n <table");
WriteLiteral(" class=\"table\"");
WriteLiteral(">\r\n <thead>\r\n <tr>\r\n <td><strong>");
#line 14 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(Html.Resource("Title"));
#line default
#line hidden
WriteLiteral("</strong></td>\r\n <td><strong>");
#line 15 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(Html.Resource("Type"));
#line default
#line hidden
WriteLiteral("</strong></td>\r\n <td><strong>");
#line 16 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(Html.Resource("Size"));
#line default
#line hidden
WriteLiteral("</strong></td>\r\n <td></td>\r\n </tr>\r\n " +
" </thead>\r\n");
#line 20 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
#line default
#line hidden
#line 20 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
foreach (var item in Model.Items)
{
#line default
#line hidden
WriteLiteral(" <tr>\r\n <td>\r\n <i");
WriteLiteral(" class=\"icon-file icon-txt icon-sm\"");
WriteLiteral(">\r\n <span");
WriteAttribute("class", Tuple.Create(" class=\"", 891), Tuple.Create("\"", 950)
, Tuple.Create(Tuple.Create("", 899), Tuple.Create("icon-txt-", 899), true)
#line 25 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 908), Tuple.Create<System.Object, System.Int32>(((DocumentItemViewModel)item).Extension
#line default
#line hidden
, 908), false)
);
WriteLiteral(">");
#line 25 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(((DocumentItemViewModel)item).Extension);
#line default
#line hidden
WriteLiteral("</span>\r\n </i> \r\n <a");
WriteLiteral(" class=\"sf-title\"");
WriteAttribute("href", Tuple.Create(" href=\"", 1077), Tuple.Create("\"", 1191)
#line 27 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 1084), Tuple.Create<System.Object, System.Int32>(HyperLinkHelpers.GetDetailPageUrl(item, ViewBag.DetailsPageId, ViewBag.OpenInSamePage, Model.UrlKeyPrefix)
#line default
#line hidden
, 1084), false)
);
WriteLiteral(">\r\n");
WriteLiteral(" ");
#line 28 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(item.Fields.Title);
#line default
#line hidden
WriteLiteral("\r\n </a>\r\n </td>\r\n <t" +
"d>\r\n");
WriteLiteral(" ");
#line 32 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(((DocumentItemViewModel)item).Extension);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 35 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(Math.Ceiling((double)item.Fields.TotalSize / 1024) + " KB");
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n <a" +
"");
WriteAttribute("href", Tuple.Create(" href=\"", 1613), Tuple.Create("\"", 1641)
#line 38 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
, Tuple.Create(Tuple.Create("", 1620), Tuple.Create<System.Object, System.Int32>(item.Fields.MediaUrl
#line default
#line hidden
, 1620), false)
);
WriteLiteral(" target=\"_blank\"");
WriteLiteral(">Download</a>\r\n </td>\r\n </tr>\r\n");
#line 41 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" </table>\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n");
#line 48 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
if (Model.ShowPager)
{
#line default
#line hidden
#line 50 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
Write(Html.Action("Index", "ContentPager", new
{
currentPage = Model.CurrentPage,
totalPagesCount = Model.TotalPagesCount.Value,
redirectUrlTemplate = ViewBag.RedirectPageUrlTemplate
}));
#line default
#line hidden
#line 55 "..\..MVC\Views\DocumentsList\List.DocumentsTable.cshtml"
}
#line default
#line hidden
WriteLiteral("\r\n\r\n");
}
}
}
#pragma warning restore 1591
| {
"content_hash": "b954b30d81d04abebdf60c8d3de798c8",
"timestamp": "",
"source": "github",
"line_count": 242,
"max_line_length": 187,
"avg_line_length": 31.417355371900825,
"alnum_prop": 0.5183480205182165,
"repo_name": "abhishekkhetani/TrainingWork",
"id": "022f7ee2a72a39112f1696d0332765544b398605",
"size": "8029",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DemoProject/obj/FeatherCodeGen/ResourcePackages/Bootstrap/MVC/Views/DocumentsList/List.DocumentsTable.cshtml.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "9697"
},
{
"name": "C#",
"bytes": "1304672"
},
{
"name": "CSS",
"bytes": "102532"
},
{
"name": "HTML",
"bytes": "419202"
},
{
"name": "JavaScript",
"bytes": "29377"
},
{
"name": "Smalltalk",
"bytes": "7320"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
<info organisation="aopalliance"
module="aopalliance"
revision="1.0"
status="release"
publication="20070226174340"
>
<license name="Public Domain" />
<description homepage="http://aopalliance.sourceforge.net">
AOP Alliance
</description>
</info>
<configurations>
<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
<conf name="optional" visibility="public" description="contains all optional dependencies"/>
</configurations>
<publications>
<artifact name="aopalliance" type="jar" ext="jar" conf="master"/>
</publications>
</ivy-module>
| {
"content_hash": "60f1a0cda2cd30a1ac2fe495b2d7c302",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 245,
"avg_line_length": 79,
"alnum_prop": 0.7638585770405937,
"repo_name": "nguquen/openshift-cartridge-activator-jdk8",
"id": "d8ebe779ac685873ec745ebc142ce592f32986db",
"size": "2291",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "usr/1.3.6/repository/aopalliance/aopalliance/1.0/ivys/ivy.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "7342"
},
{
"name": "CSS",
"bytes": "2019"
},
{
"name": "CoffeeScript",
"bytes": "3771"
},
{
"name": "HTML",
"bytes": "80567"
},
{
"name": "Java",
"bytes": "17599"
},
{
"name": "JavaScript",
"bytes": "264"
},
{
"name": "Scala",
"bytes": "39320"
},
{
"name": "Shell",
"bytes": "11203"
}
],
"symlink_target": ""
} |
package org.xmlactions.db.sql.common;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.text.StrSubstitutor;
import org.xmlactions.db.actions.Database;
import org.xmlactions.db.actions.Function;
import org.xmlactions.db.actions.Table;
public class SqlCommon {
/**
* Replaces ${p1} with 'table.name'
* @param database
* @param dbSpecificName
* @param function_ref
* @param fieldName
* @return
*/
public static String replaceForSqlFunction(Database database, String dbSpecificName, String function_ref, String fieldName){
Function function = database.getFunction(dbSpecificName, function_ref);
Validate.notNull(function, "Function for function_ref [" + function_ref + "] not found in Database [" + database.getName() + "]");
Map<String, String> map = new HashMap<String,String>();
map.put("p1", fieldName);
return StrSubstitutor.replace(function.getSql(), map);
}
}
| {
"content_hash": "73de50fdc016ab24cc26e657debba2aa",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 138,
"avg_line_length": 32.38709677419355,
"alnum_prop": 0.7171314741035857,
"repo_name": "mwjmurphy/Axel-Framework",
"id": "0531740abd1bf44ce1cd1a9f3a1296a1e50f4945",
"size": "1004",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "axel-db/src/main/java/org/xmlactions/db/sql/common/SqlCommon.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "329"
},
{
"name": "CSS",
"bytes": "111180"
},
{
"name": "HTML",
"bytes": "1002717"
},
{
"name": "Java",
"bytes": "2765057"
},
{
"name": "JavaScript",
"bytes": "52078"
},
{
"name": "Roff",
"bytes": "10410393"
},
{
"name": "TSQL",
"bytes": "1622"
},
{
"name": "TypeScript",
"bytes": "2450"
},
{
"name": "XSLT",
"bytes": "11001"
}
],
"symlink_target": ""
} |
/*
To get this list of colors inject jQuery at http://www.google.com/design/spec/style/color.html#color-color-palette
Then, run this script to get the list.
(function() {
var colors = {}, main = {};
$(".color-group").each(function() {
var color = $(this).find(".name").text().trim().toLowerCase().replace(" ", "-");
colors[color] = {};
$(this).find(".color").not(".main-color").each(function() {
var shade = $(this).find(".shade").text().trim(),
hex = $(this).find(".hex").text().trim();
colors[color][shade] = hex;
});
main[color] = color + "-" + $(this).find(".main-color .shade").text().trim();
});
var LESS = "";
$.each(colors, function(name, shades) {
LESS += "\n\n";
$.each(shades, function(shade, hex) {
LESS += "@" + name + "-" + shade + ": " + hex + ";\n";
});
if (main[name]) {
LESS += "@" + name + ": " + main[name] + ";\n";
}
});
console.log(LESS);
})();
*/
/* ANIMATION */
/* SHADOWS */
/* Shadows (from mdl http://www.getmdl.io/) */
body {
background-color: #EEEEEE;
}
body.inverse {
background: #333333;
}
body.inverse,
body.inverse .form-control {
color: rgba(255,255,255, 0.84);
}
body.inverse .modal,
body.inverse .panel-default,
body.inverse .card,
body.inverse .modal .form-control,
body.inverse .panel-default .form-control,
body.inverse .card .form-control {
background-color: initial;
color: initial;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4 {
font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
font-weight: 300;
}
h5,
h6 {
font-weight: 400;
}
a,
a:hover,
a:focus {
color: #009688;
}
a .material-icons,
a:hover .material-icons,
a:focus .material-icons {
vertical-align: middle;
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
padding-top: 0;
}
.form-horizontal .radio {
margin-bottom: 10px;
}
.form-horizontal label {
text-align: right;
}
.form-horizontal label.control-label {
margin: 0;
}
body .container .well.well-sm,
body .container-fluid .well.well-sm {
padding: 10px;
}
body .container .well.well-lg,
body .container-fluid .well.well-lg {
padding: 26px;
}
body .container .well,
body .container-fluid .well,
body .container .jumbotron,
body .container-fluid .jumbotron {
background-color: #fff;
padding: 19px;
margin-bottom: 20px;
-webkit-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 2px;
border: 0;
}
body .container .well p,
body .container-fluid .well p,
body .container .jumbotron p,
body .container-fluid .jumbotron p {
font-weight: 300;
}
body .container .well,
body .container-fluid .well,
body .container .jumbotron,
body .container-fluid .jumbotron,
body .container .well-default,
body .container-fluid .well-default,
body .container .jumbotron-default,
body .container-fluid .jumbotron-default {
background-color: #ffffff;
}
body .container .well-inverse,
body .container-fluid .well-inverse,
body .container .jumbotron-inverse,
body .container-fluid .jumbotron-inverse {
background-color: #3f51b5;
}
body .container .well-primary,
body .container-fluid .well-primary,
body .container .jumbotron-primary,
body .container-fluid .jumbotron-primary {
background-color: #009688;
}
body .container .well-success,
body .container-fluid .well-success,
body .container .jumbotron-success,
body .container-fluid .jumbotron-success {
background-color: #4caf50;
}
body .container .well-info,
body .container-fluid .well-info,
body .container .jumbotron-info,
body .container-fluid .jumbotron-info {
background-color: #03a9f4;
}
body .container .well-warning,
body .container-fluid .well-warning,
body .container .jumbotron-warning,
body .container-fluid .jumbotron-warning {
background-color: #ff5722;
}
body .container .well-danger,
body .container-fluid .well-danger,
body .container .jumbotron-danger,
body .container-fluid .jumbotron-danger {
background-color: #f44336;
}
.btn,
.input-group-btn .btn {
border: none;
border-radius: 2px;
position: relative;
padding: 8px 30px;
margin: 10px 1px;
font-size: 14px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0;
will-change: box-shadow, transform;
-webkit-transition: -webkit-box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
-o-transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
outline: 0;
cursor: pointer;
text-decoration: none;
background: transparent;
}
.btn::-moz-focus-inner,
.input-group-btn .btn::-moz-focus-inner {
border: 0;
}
.btn:not(.btn-raised),
.input-group-btn .btn:not(.btn-raised) {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn:not(.btn-raised),
.input-group-btn .btn:not(.btn-raised),
.btn:not(.btn-raised).btn-default,
.input-group-btn .btn:not(.btn-raised).btn-default {
color: rgba(0,0,0, 0.87);
}
.btn:not(.btn-raised).btn-inverse,
.input-group-btn .btn:not(.btn-raised).btn-inverse {
color: #3f51b5;
}
.btn:not(.btn-raised).btn-primary,
.input-group-btn .btn:not(.btn-raised).btn-primary {
color: #009688;
}
.btn:not(.btn-raised).btn-success,
.input-group-btn .btn:not(.btn-raised).btn-success {
color: #4caf50;
}
.btn:not(.btn-raised).btn-info,
.input-group-btn .btn:not(.btn-raised).btn-info {
color: #03a9f4;
}
.btn:not(.btn-raised).btn-tmblue,
.input-group-btn .btn:not(.btn-raised).btn-tmblue {
color: #004165;
}
.btn:not(.btn-raised).btn-warning,
.input-group-btn .btn:not(.btn-raised).btn-warning {
color: #ff5722;
}
.btn:not(.btn-raised).btn-danger,
.input-group-btn .btn:not(.btn-raised).btn-danger {
color: #f44336;
}
.btn:not(.btn-raised):not(.btn-link):hover,
.input-group-btn .btn:not(.btn-raised):not(.btn-link):hover,
.btn:not(.btn-raised):not(.btn-link):focus,
.input-group-btn .btn:not(.btn-raised):not(.btn-link):focus {
background-color: rgba(153, 153, 153, 0.2);
}
.theme-dark .btn:not(.btn-raised):not(.btn-link):hover,
.theme-dark .input-group-btn .btn:not(.btn-raised):not(.btn-link):hover,
.theme-dark .btn:not(.btn-raised):not(.btn-link):focus,
.theme-dark .input-group-btn .btn:not(.btn-raised):not(.btn-link):focus {
background-color: rgba(204, 204, 204, 0.15);
}
.btn.btn-raised,
.input-group-btn .btn.btn-raised,
.btn.btn-fab,
.input-group-btn .btn.btn-fab,
.btn-group-raised .btn,
.btn-group-raised .input-group-btn .btn,
.btn.btn-raised.btn-default,
.input-group-btn .btn.btn-raised.btn-default,
.btn.btn-fab.btn-default,
.input-group-btn .btn.btn-fab.btn-default,
.btn-group-raised .btn.btn-default,
.btn-group-raised .input-group-btn .btn.btn-default {
background-color: #EEEEEE;
color: rgba(0,0,0, 0.87);
}
.btn.btn-raised.btn-inverse,
.input-group-btn .btn.btn-raised.btn-inverse,
.btn.btn-fab.btn-inverse,
.input-group-btn .btn.btn-fab.btn-inverse,
.btn-group-raised .btn.btn-inverse,
.btn-group-raised .input-group-btn .btn.btn-inverse {
background-color: #3f51b5;
color: #ffffff;
}
.btn.btn-raised.btn-primary,
.input-group-btn .btn.btn-raised.btn-primary,
.btn.btn-fab.btn-primary,
.input-group-btn .btn.btn-fab.btn-primary,
.btn-group-raised .btn.btn-primary,
.btn-group-raised .input-group-btn .btn.btn-primary {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised.btn-success,
.input-group-btn .btn.btn-raised.btn-success,
.btn.btn-fab.btn-success,
.input-group-btn .btn.btn-fab.btn-success,
.btn-group-raised .btn.btn-success,
.btn-group-raised .input-group-btn .btn.btn-success {
background-color: #4caf50;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised.btn-info,
.input-group-btn .btn.btn-raised.btn-info,
.btn.btn-fab.btn-info,
.input-group-btn .btn.btn-fab.btn-info,
.btn-group-raised .btn.btn-info,
.btn-group-raised .input-group-btn .btn.btn-info {
background-color: #03a9f4;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised.btn-tmblue,
.input-group-btn .btn.btn-raised.btn-tmblue,
.btn.btn-fab.btn-tmblue,
.input-group-btn .btn.btn-fab.btn-tmblue,
.btn-group-raised .btn.btn-tmblue,
.btn-group-raised .input-group-btn .btn.btn-tmblue {
background-color: #004165;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised.btn-warning,
.input-group-btn .btn.btn-raised.btn-warning,
.btn.btn-fab.btn-warning,
.input-group-btn .btn.btn-fab.btn-warning,
.btn-group-raised .btn.btn-warning,
.btn-group-raised .input-group-btn .btn.btn-warning {
background-color: #ff5722;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised.btn-danger,
.input-group-btn .btn.btn-raised.btn-danger,
.btn.btn-fab.btn-danger,
.input-group-btn .btn.btn-fab.btn-danger,
.btn-group-raised .btn.btn-danger,
.btn-group-raised .input-group-btn .btn.btn-danger {
background-color: #f44336;
color: rgba(255,255,255, 0.84);
}
.btn.btn-raised:not(.btn-link),
.input-group-btn .btn.btn-raised:not(.btn-link),
.btn-group-raised .btn:not(.btn-link),
.btn-group-raised .input-group-btn .btn:not(.btn-link) {
-webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.btn.btn-raised:not(.btn-link):hover,
.input-group-btn .btn.btn-raised:not(.btn-link):hover,
.btn-group-raised .btn:not(.btn-link):hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover,
.btn.btn-raised:not(.btn-link):focus,
.input-group-btn .btn.btn-raised:not(.btn-link):focus,
.btn-group-raised .btn:not(.btn-link):focus,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus,
.btn.btn-raised:not(.btn-link).active,
.input-group-btn .btn.btn-raised:not(.btn-link).active,
.btn-group-raised .btn:not(.btn-link).active,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active,
.btn.btn-raised:not(.btn-link):active,
.input-group-btn .btn.btn-raised:not(.btn-link):active,
.btn-group-raised .btn:not(.btn-link):active,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active {
outline: 0;
}
.btn.btn-raised:not(.btn-link):hover,
.input-group-btn .btn.btn-raised:not(.btn-link):hover,
.btn-group-raised .btn:not(.btn-link):hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover,
.btn.btn-raised:not(.btn-link):focus,
.input-group-btn .btn.btn-raised:not(.btn-link):focus,
.btn-group-raised .btn:not(.btn-link):focus,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus,
.btn.btn-raised:not(.btn-link).active,
.input-group-btn .btn.btn-raised:not(.btn-link).active,
.btn-group-raised .btn:not(.btn-link).active,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active,
.btn.btn-raised:not(.btn-link):active,
.input-group-btn .btn.btn-raised:not(.btn-link):active,
.btn-group-raised .btn:not(.btn-link):active,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active,
.btn.btn-raised:not(.btn-link):hover.btn-default,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-default,
.btn-group-raised .btn:not(.btn-link):hover.btn-default,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-default,
.btn.btn-raised:not(.btn-link):focus.btn-default,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-default,
.btn-group-raised .btn:not(.btn-link):focus.btn-default,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-default,
.btn.btn-raised:not(.btn-link).active.btn-default,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-default,
.btn-group-raised .btn:not(.btn-link).active.btn-default,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-default,
.btn.btn-raised:not(.btn-link):active.btn-default,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-default,
.btn-group-raised .btn:not(.btn-link):active.btn-default,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-default {
background-color: #e4e4e4;
}
.btn.btn-raised:not(.btn-link):hover.btn-inverse,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-inverse,
.btn-group-raised .btn:not(.btn-link):hover.btn-inverse,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-inverse,
.btn.btn-raised:not(.btn-link):focus.btn-inverse,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-inverse,
.btn-group-raised .btn:not(.btn-link):focus.btn-inverse,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-inverse,
.btn.btn-raised:not(.btn-link).active.btn-inverse,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-inverse,
.btn-group-raised .btn:not(.btn-link).active.btn-inverse,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-inverse,
.btn.btn-raised:not(.btn-link):active.btn-inverse,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-inverse,
.btn-group-raised .btn:not(.btn-link):active.btn-inverse,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-inverse {
background-color: #495bc0;
}
.btn.btn-raised:not(.btn-link):hover.btn-primary,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-primary,
.btn-group-raised .btn:not(.btn-link):hover.btn-primary,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-primary,
.btn.btn-raised:not(.btn-link):focus.btn-primary,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-primary,
.btn-group-raised .btn:not(.btn-link):focus.btn-primary,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-primary,
.btn.btn-raised:not(.btn-link).active.btn-primary,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-primary,
.btn-group-raised .btn:not(.btn-link).active.btn-primary,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-primary,
.btn.btn-raised:not(.btn-link):active.btn-primary,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-primary,
.btn-group-raised .btn:not(.btn-link):active.btn-primary,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-primary {
background-color: #00aa9a;
}
.btn.btn-raised:not(.btn-link):hover.btn-success,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-success,
.btn-group-raised .btn:not(.btn-link):hover.btn-success,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-success,
.btn.btn-raised:not(.btn-link):focus.btn-success,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-success,
.btn-group-raised .btn:not(.btn-link):focus.btn-success,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-success,
.btn.btn-raised:not(.btn-link).active.btn-success,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-success,
.btn-group-raised .btn:not(.btn-link).active.btn-success,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-success,
.btn.btn-raised:not(.btn-link):active.btn-success,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-success,
.btn-group-raised .btn:not(.btn-link):active.btn-success,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-success {
background-color: #59b75c;
}
.btn.btn-raised:not(.btn-link):hover.btn-info,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-info,
.btn-group-raised .btn:not(.btn-link):hover.btn-info,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-info,
.btn.btn-raised:not(.btn-link):focus.btn-info,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-info,
.btn-group-raised .btn:not(.btn-link):focus.btn-info,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-info,
.btn.btn-raised:not(.btn-link).active.btn-info,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-info,
.btn-group-raised .btn:not(.btn-link).active.btn-info,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-info,
.btn.btn-raised:not(.btn-link):active.btn-info,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-info,
.btn-group-raised .btn:not(.btn-link):active.btn-info,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-info {
background-color: #0fb2fc;
}
.btn.btn-raised:not(.btn-link):hover.btn-warning,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-warning,
.btn-group-raised .btn:not(.btn-link):hover.btn-warning,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-warning,
.btn.btn-raised:not(.btn-link):focus.btn-warning,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-warning,
.btn-group-raised .btn:not(.btn-link):focus.btn-warning,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-warning,
.btn.btn-raised:not(.btn-link).active.btn-warning,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-warning,
.btn-group-raised .btn:not(.btn-link).active.btn-warning,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-warning,
.btn.btn-raised:not(.btn-link):active.btn-warning,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-warning,
.btn-group-raised .btn:not(.btn-link):active.btn-warning,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-warning {
background-color: #ff6736;
}
.btn.btn-raised:not(.btn-link):hover.btn-danger,
.input-group-btn .btn.btn-raised:not(.btn-link):hover.btn-danger,
.btn-group-raised .btn:not(.btn-link):hover.btn-danger,
.btn-group-raised .input-group-btn .btn:not(.btn-link):hover.btn-danger,
.btn.btn-raised:not(.btn-link):focus.btn-danger,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.btn-danger,
.btn-group-raised .btn:not(.btn-link):focus.btn-danger,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.btn-danger,
.btn.btn-raised:not(.btn-link).active.btn-danger,
.input-group-btn .btn.btn-raised:not(.btn-link).active.btn-danger,
.btn-group-raised .btn:not(.btn-link).active.btn-danger,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active.btn-danger,
.btn.btn-raised:not(.btn-link):active.btn-danger,
.input-group-btn .btn.btn-raised:not(.btn-link):active.btn-danger,
.btn-group-raised .btn:not(.btn-link):active.btn-danger,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active.btn-danger {
background-color: #f55549;
}
.btn.btn-raised:not(.btn-link).active,
.input-group-btn .btn.btn-raised:not(.btn-link).active,
.btn-group-raised .btn:not(.btn-link).active,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active,
.btn.btn-raised:not(.btn-link):active,
.input-group-btn .btn.btn-raised:not(.btn-link):active,
.btn-group-raised .btn:not(.btn-link):active,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active,
.btn.btn-raised:not(.btn-link).active:hover,
.input-group-btn .btn.btn-raised:not(.btn-link).active:hover,
.btn-group-raised .btn:not(.btn-link).active:hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link).active:hover,
.btn.btn-raised:not(.btn-link):active:hover,
.input-group-btn .btn.btn-raised:not(.btn-link):active:hover,
.btn-group-raised .btn:not(.btn-link):active:hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):active:hover {
-webkit-box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}
.btn.btn-raised:not(.btn-link):focus,
.input-group-btn .btn.btn-raised:not(.btn-link):focus,
.btn-group-raised .btn:not(.btn-link):focus,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus,
.btn.btn-raised:not(.btn-link):focus.active,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.active,
.btn-group-raised .btn:not(.btn-link):focus.active,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.active,
.btn.btn-raised:not(.btn-link):focus:active,
.input-group-btn .btn.btn-raised:not(.btn-link):focus:active,
.btn-group-raised .btn:not(.btn-link):focus:active,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus:active,
.btn.btn-raised:not(.btn-link):focus:hover,
.input-group-btn .btn.btn-raised:not(.btn-link):focus:hover,
.btn-group-raised .btn:not(.btn-link):focus:hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus:hover,
.btn.btn-raised:not(.btn-link):focus.active:hover,
.input-group-btn .btn.btn-raised:not(.btn-link):focus.active:hover,
.btn-group-raised .btn:not(.btn-link):focus.active:hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus.active:hover,
.btn.btn-raised:not(.btn-link):focus:active:hover,
.input-group-btn .btn.btn-raised:not(.btn-link):focus:active:hover,
.btn-group-raised .btn:not(.btn-link):focus:active:hover,
.btn-group-raised .input-group-btn .btn:not(.btn-link):focus:active:hover {
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.36);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.18), 0 8px 16px rgba(0, 0, 0, 0.36);
}
.btn.btn-fab,
.input-group-btn .btn.btn-fab {
border-radius: 50%;
font-size: 24px;
height: 56px;
margin: auto;
min-width: 56px;
width: 56px;
padding: 0;
overflow: hidden;
-webkit-box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.24);
box-shadow: 0 1px 1.5px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.24);
position: relative;
line-height: normal;
}
.btn.btn-fab .ripple-container,
.input-group-btn .btn.btn-fab .ripple-container {
border-radius: 50%;
}
.btn.btn-fab.btn-fab-mini,
.input-group-btn .btn.btn-fab.btn-fab-mini,
.btn-group-sm .btn.btn-fab,
.btn-group-sm .input-group-btn .btn.btn-fab {
height: 40px;
min-width: 40px;
width: 40px;
}
.btn.btn-fab.btn-fab-mini.material-icons,
.input-group-btn .btn.btn-fab.btn-fab-mini.material-icons,
.btn-group-sm .btn.btn-fab.material-icons,
.btn-group-sm .input-group-btn .btn.btn-fab.material-icons {
top: 0px;
left: 0px;
}
.btn.btn-fab i.material-icons,
.input-group-btn .btn.btn-fab i.material-icons {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-12px, -12px);
-ms-transform: translate(-12px, -12px);
-o-transform: translate(-12px, -12px);
transform: translate(-12px, -12px);
line-height: 24px;
width: 24px;
}
.btn i.material-icons,
.input-group-btn .btn i.material-icons {
vertical-align: middle;
}
.btn.btn-lg,
.input-group-btn .btn.btn-lg,
.btn-group-lg .btn,
.btn-group-lg .input-group-btn .btn {
font-size: 16px;
}
.btn.btn-sm,
.input-group-btn .btn.btn-sm,
.btn-group-sm .btn,
.btn-group-sm .input-group-btn .btn {
padding: 5px 20px;
font-size: 12px;
}
.btn.btn-xs,
.input-group-btn .btn.btn-xs,
.btn-group-xs .btn,
.btn-group-xs .input-group-btn .btn {
padding: 4px 15px;
font-size: 10px;
}
fieldset[disabled][disabled] .btn,
fieldset[disabled][disabled] .input-group-btn .btn,
fieldset[disabled][disabled] .btn-group,
fieldset[disabled][disabled] .btn-group-vertical,
.btn.disabled,
.input-group-btn .btn.disabled,
.btn-group.disabled,
.btn-group-vertical.disabled,
.btn:disabled,
.input-group-btn .btn:disabled,
.btn-group:disabled,
.btn-group-vertical:disabled,
.btn[disabled][disabled],
.input-group-btn .btn[disabled][disabled],
.btn-group[disabled][disabled],
.btn-group-vertical[disabled][disabled] {
color: rgba(0, 0, 0, 0.26);
background: transparent;
}
.theme-dark fieldset[disabled][disabled] .btn,
.theme-dark fieldset[disabled][disabled] .input-group-btn .btn,
.theme-dark fieldset[disabled][disabled] .btn-group,
.theme-dark fieldset[disabled][disabled] .btn-group-vertical,
.theme-dark .btn.disabled,
.theme-dark .input-group-btn .btn.disabled,
.theme-dark .btn-group.disabled,
.theme-dark .btn-group-vertical.disabled,
.theme-dark .btn:disabled,
.theme-dark .input-group-btn .btn:disabled,
.theme-dark .btn-group:disabled,
.theme-dark .btn-group-vertical:disabled,
.theme-dark .btn[disabled][disabled],
.theme-dark .input-group-btn .btn[disabled][disabled],
.theme-dark .btn-group[disabled][disabled],
.theme-dark .btn-group-vertical[disabled][disabled] {
color: rgba(255, 255, 255, 0.3);
}
fieldset[disabled][disabled] .btn.btn-raised,
fieldset[disabled][disabled] .input-group-btn .btn.btn-raised,
fieldset[disabled][disabled] .btn-group.btn-raised,
fieldset[disabled][disabled] .btn-group-vertical.btn-raised,
.btn.disabled.btn-raised,
.input-group-btn .btn.disabled.btn-raised,
.btn-group.disabled.btn-raised,
.btn-group-vertical.disabled.btn-raised,
.btn:disabled.btn-raised,
.input-group-btn .btn:disabled.btn-raised,
.btn-group:disabled.btn-raised,
.btn-group-vertical:disabled.btn-raised,
.btn[disabled][disabled].btn-raised,
.input-group-btn .btn[disabled][disabled].btn-raised,
.btn-group[disabled][disabled].btn-raised,
.btn-group-vertical[disabled][disabled].btn-raised,
fieldset[disabled][disabled] .btn.btn-group-raised,
fieldset[disabled][disabled] .input-group-btn .btn.btn-group-raised,
fieldset[disabled][disabled] .btn-group.btn-group-raised,
fieldset[disabled][disabled] .btn-group-vertical.btn-group-raised,
.btn.disabled.btn-group-raised,
.input-group-btn .btn.disabled.btn-group-raised,
.btn-group.disabled.btn-group-raised,
.btn-group-vertical.disabled.btn-group-raised,
.btn:disabled.btn-group-raised,
.input-group-btn .btn:disabled.btn-group-raised,
.btn-group:disabled.btn-group-raised,
.btn-group-vertical:disabled.btn-group-raised,
.btn[disabled][disabled].btn-group-raised,
.input-group-btn .btn[disabled][disabled].btn-group-raised,
.btn-group[disabled][disabled].btn-group-raised,
.btn-group-vertical[disabled][disabled].btn-group-raised,
fieldset[disabled][disabled] .btn.btn-raised.active,
fieldset[disabled][disabled] .input-group-btn .btn.btn-raised.active,
fieldset[disabled][disabled] .btn-group.btn-raised.active,
fieldset[disabled][disabled] .btn-group-vertical.btn-raised.active,
.btn.disabled.btn-raised.active,
.input-group-btn .btn.disabled.btn-raised.active,
.btn-group.disabled.btn-raised.active,
.btn-group-vertical.disabled.btn-raised.active,
.btn:disabled.btn-raised.active,
.input-group-btn .btn:disabled.btn-raised.active,
.btn-group:disabled.btn-raised.active,
.btn-group-vertical:disabled.btn-raised.active,
.btn[disabled][disabled].btn-raised.active,
.input-group-btn .btn[disabled][disabled].btn-raised.active,
.btn-group[disabled][disabled].btn-raised.active,
.btn-group-vertical[disabled][disabled].btn-raised.active,
fieldset[disabled][disabled] .btn.btn-group-raised.active,
fieldset[disabled][disabled] .input-group-btn .btn.btn-group-raised.active,
fieldset[disabled][disabled] .btn-group.btn-group-raised.active,
fieldset[disabled][disabled] .btn-group-vertical.btn-group-raised.active,
.btn.disabled.btn-group-raised.active,
.input-group-btn .btn.disabled.btn-group-raised.active,
.btn-group.disabled.btn-group-raised.active,
.btn-group-vertical.disabled.btn-group-raised.active,
.btn:disabled.btn-group-raised.active,
.input-group-btn .btn:disabled.btn-group-raised.active,
.btn-group:disabled.btn-group-raised.active,
.btn-group-vertical:disabled.btn-group-raised.active,
.btn[disabled][disabled].btn-group-raised.active,
.input-group-btn .btn[disabled][disabled].btn-group-raised.active,
.btn-group[disabled][disabled].btn-group-raised.active,
.btn-group-vertical[disabled][disabled].btn-group-raised.active,
fieldset[disabled][disabled] .btn.btn-raised:active,
fieldset[disabled][disabled] .input-group-btn .btn.btn-raised:active,
fieldset[disabled][disabled] .btn-group.btn-raised:active,
fieldset[disabled][disabled] .btn-group-vertical.btn-raised:active,
.btn.disabled.btn-raised:active,
.input-group-btn .btn.disabled.btn-raised:active,
.btn-group.disabled.btn-raised:active,
.btn-group-vertical.disabled.btn-raised:active,
.btn:disabled.btn-raised:active,
.input-group-btn .btn:disabled.btn-raised:active,
.btn-group:disabled.btn-raised:active,
.btn-group-vertical:disabled.btn-raised:active,
.btn[disabled][disabled].btn-raised:active,
.input-group-btn .btn[disabled][disabled].btn-raised:active,
.btn-group[disabled][disabled].btn-raised:active,
.btn-group-vertical[disabled][disabled].btn-raised:active,
fieldset[disabled][disabled] .btn.btn-group-raised:active,
fieldset[disabled][disabled] .input-group-btn .btn.btn-group-raised:active,
fieldset[disabled][disabled] .btn-group.btn-group-raised:active,
fieldset[disabled][disabled] .btn-group-vertical.btn-group-raised:active,
.btn.disabled.btn-group-raised:active,
.input-group-btn .btn.disabled.btn-group-raised:active,
.btn-group.disabled.btn-group-raised:active,
.btn-group-vertical.disabled.btn-group-raised:active,
.btn:disabled.btn-group-raised:active,
.input-group-btn .btn:disabled.btn-group-raised:active,
.btn-group:disabled.btn-group-raised:active,
.btn-group-vertical:disabled.btn-group-raised:active,
.btn[disabled][disabled].btn-group-raised:active,
.input-group-btn .btn[disabled][disabled].btn-group-raised:active,
.btn-group[disabled][disabled].btn-group-raised:active,
.btn-group-vertical[disabled][disabled].btn-group-raised:active,
fieldset[disabled][disabled] .btn.btn-raised:focus:not(:active),
fieldset[disabled][disabled] .input-group-btn .btn.btn-raised:focus:not(:active),
fieldset[disabled][disabled] .btn-group.btn-raised:focus:not(:active),
fieldset[disabled][disabled] .btn-group-vertical.btn-raised:focus:not(:active),
.btn.disabled.btn-raised:focus:not(:active),
.input-group-btn .btn.disabled.btn-raised:focus:not(:active),
.btn-group.disabled.btn-raised:focus:not(:active),
.btn-group-vertical.disabled.btn-raised:focus:not(:active),
.btn:disabled.btn-raised:focus:not(:active),
.input-group-btn .btn:disabled.btn-raised:focus:not(:active),
.btn-group:disabled.btn-raised:focus:not(:active),
.btn-group-vertical:disabled.btn-raised:focus:not(:active),
.btn[disabled][disabled].btn-raised:focus:not(:active),
.input-group-btn .btn[disabled][disabled].btn-raised:focus:not(:active),
.btn-group[disabled][disabled].btn-raised:focus:not(:active),
.btn-group-vertical[disabled][disabled].btn-raised:focus:not(:active),
fieldset[disabled][disabled] .btn.btn-group-raised:focus:not(:active),
fieldset[disabled][disabled] .input-group-btn .btn.btn-group-raised:focus:not(:active),
fieldset[disabled][disabled] .btn-group.btn-group-raised:focus:not(:active),
fieldset[disabled][disabled] .btn-group-vertical.btn-group-raised:focus:not(:active),
.btn.disabled.btn-group-raised:focus:not(:active),
.input-group-btn .btn.disabled.btn-group-raised:focus:not(:active),
.btn-group.disabled.btn-group-raised:focus:not(:active),
.btn-group-vertical.disabled.btn-group-raised:focus:not(:active),
.btn:disabled.btn-group-raised:focus:not(:active),
.input-group-btn .btn:disabled.btn-group-raised:focus:not(:active),
.btn-group:disabled.btn-group-raised:focus:not(:active),
.btn-group-vertical:disabled.btn-group-raised:focus:not(:active),
.btn[disabled][disabled].btn-group-raised:focus:not(:active),
.input-group-btn .btn[disabled][disabled].btn-group-raised:focus:not(:active),
.btn-group[disabled][disabled].btn-group-raised:focus:not(:active),
.btn-group-vertical[disabled][disabled].btn-group-raised:focus:not(:active) {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-group,
.btn-group-vertical {
position: relative;
margin: 10px 1px;
}
.btn-group.open > .dropdown-toggle.btn,
.btn-group-vertical.open > .dropdown-toggle.btn,
.btn-group.open > .dropdown-toggle.btn.btn-default,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-default {
background-color: #EEEEEE;
}
.btn-group.open > .dropdown-toggle.btn.btn-inverse,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-inverse {
background-color: #3f51b5;
}
.btn-group.open > .dropdown-toggle.btn.btn-primary,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-primary {
background-color: #009688;
}
.btn-group.open > .dropdown-toggle.btn.btn-success,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-success {
background-color: #4caf50;
}
.btn-group.open > .dropdown-toggle.btn.btn-info,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-info {
background-color: #03a9f4;
}
.btn-group.open > .dropdown-toggle.btn.btn-warning,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-warning {
background-color: #ff5722;
}
.btn-group.open > .dropdown-toggle.btn.btn-danger,
.btn-group-vertical.open > .dropdown-toggle.btn.btn-danger {
background-color: #f44336;
}
.btn-group .dropdown-menu,
.btn-group-vertical .dropdown-menu {
border-radius: 0 0 2px 2px;
}
.btn-group.btn-group-raised,
.btn-group-vertical.btn-group-raised {
-webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}
.btn-group .btn + .btn,
.btn-group-vertical .btn + .btn,
.btn-group .btn,
.btn-group-vertical .btn,
.btn-group .btn:active,
.btn-group-vertical .btn:active,
.btn-group .btn-group,
.btn-group-vertical .btn-group {
margin: 0;
}
.checkbox label {
cursor: pointer;
padding-left: 0;
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .checkbox label {
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .checkbox label:hover,
.form-group.is-focused .checkbox label:focus {
color: rgba(0,0,0, .54);
}
fieldset[disabled] .form-group.is-focused .checkbox label {
color: rgba(0,0,0, 0.26);
}
.checkbox input[type=checkbox] {
opacity: 0;
position: absolute;
margin: 0;
z-index: -1;
width: 0;
height: 0;
overflow: hidden;
left: 0;
pointer-events: none;
}
.checkbox .checkbox-material {
vertical-align: middle;
position: relative;
top: 3px;
}
.checkbox .checkbox-material:before {
display: block;
position: absolute;
left: 0;
content: "";
background-color: rgba(0, 0, 0, 0.84);
height: 20px;
width: 20px;
border-radius: 100%;
z-index: 1;
opacity: 0;
margin: 0;
-webkit-transform: scale3d(2.3, 2.3, 1);
transform: scale3d(2.3, 2.3, 1);
}
.checkbox .checkbox-material .check {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
border: 2px solid rgba(0,0,0, .54);
border-radius: 2px;
overflow: hidden;
z-index: 1;
}
.checkbox .checkbox-material .check:before {
position: absolute;
content: "";
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
display: block;
margin-top: -4px;
margin-left: 6px;
width: 0;
height: 0;
-webkit-box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0 inset;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0 inset;
-webkit-animation: checkbox-off;
-o-animation: checkbox-off;
animation: checkbox-off;
}
.checkbox input[type=checkbox]:focus + .checkbox-material .check:after {
opacity: 0.2;
}
.checkbox input[type=checkbox]:checked + .checkbox-material .check {
color: #009688;
border-color: #009688;
}
.checkbox input[type=checkbox]:checked + .checkbox-material .check:before {
color: #009688;
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
-webkit-animation: checkbox-on 0.3s forwards;
-o-animation: checkbox-on 0.3s forwards;
animation: checkbox-on 0.3s forwards;
}
.checkbox input[type=checkbox]:checked + .checkbox-material:before {
-webkit-animation: rippleOn;
-o-animation: rippleOn;
animation: rippleOn;
}
.checkbox input[type=checkbox]:checked + .checkbox-material .check:after {
-webkit-animation: rippleOn 500ms forwards;
-o-animation: rippleOn 500ms forwards;
animation: rippleOn 500ms forwards;
}
.checkbox input[type=checkbox]:not(:checked) + .checkbox-material:before {
-webkit-animation: rippleOff;
-o-animation: rippleOff;
animation: rippleOff;
}
.checkbox input[type=checkbox]:not(:checked) + .checkbox-material .check:after {
-webkit-animation: rippleOff 500ms forwards;
-o-animation: rippleOff 500ms forwards;
animation: rippleOff 500ms forwards;
}
fieldset[disabled] .checkbox,
fieldset[disabled] .checkbox input[type=checkbox],
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .checkbox-material .check:before,
.checkbox input[type=checkbox][disabled]:not(:checked) ~ .checkbox-material .check,
.checkbox input[type=checkbox][disabled] + .circle {
opacity: 0.5;
}
.checkbox input[type=checkbox][disabled] + .checkbox-material .check:after {
background-color: rgba(0,0,0, 0.87);
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.is-focused .checkbox .checkbox-material .check:before {
-webkit-animation: checkbox-off 0.3s forwards;
-o-animation: checkbox-off 0.3s forwards;
animation: checkbox-off 0.3s forwards;
}
.is-focused .checkbox input[type=checkbox]:checked + .checkbox-material:before {
-webkit-animation: rippleOn 500ms;
-o-animation: rippleOn 500ms;
animation: rippleOn 500ms;
}
.is-focused .checkbox input[type=checkbox]:not(:checked) + .checkbox-material:before {
-webkit-animation: rippleOff 500ms;
-o-animation: rippleOff 500ms;
animation: rippleOff 500ms;
}
@-webkit-keyframes checkbox-on {
0% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
}
50% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
}
100% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
}
}
@-o-keyframes checkbox-on {
0% {
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
}
50% {
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
}
100% {
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
}
}
@keyframes checkbox-on {
0% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px;
}
50% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px 2px 0 11px;
}
100% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px;
}
}
@-webkit-keyframes checkbox-off {
0% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
25% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
50% {
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: -4px;
margin-left: 6px;
width: 0;
height: 0;
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
}
51% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
-webkit-box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 10px inset;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 10px inset;
}
100% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
-webkit-box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 0 inset;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 0 inset;
}
}
@-o-keyframes checkbox-off {
0% {
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
25% {
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
50% {
-o-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: -4px;
margin-left: 6px;
width: 0;
height: 0;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
}
51% {
-o-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 10px inset;
}
100% {
-o-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 0 inset;
}
}
@keyframes checkbox-off {
0% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
25% {
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 20px -12px 0 11px, 0 0 0 0 inset;
}
50% {
-webkit-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
margin-top: -4px;
margin-left: 6px;
width: 0;
height: 0;
-webkit-box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
box-shadow: 0 0 0 10px, 10px -10px 0 10px, 32px 0 0 20px, 0px 32px 0 20px, -5px 5px 0 10px, 15px 2px 0 11px, 0 0 0 0 inset;
}
51% {
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
-webkit-box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 10px inset;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 10px inset;
}
100% {
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
margin-top: -2px;
margin-left: -2px;
width: 20px;
height: 20px;
-webkit-box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 0 inset;
box-shadow: 0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0 0 0 0,
0px 0 0 0 inset;
}
}
@-webkit-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@-o-keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@-o-keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
.togglebutton {
vertical-align: middle;
}
.togglebutton,
.togglebutton label,
.togglebutton input,
.togglebutton .toggle {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.togglebutton label {
cursor: pointer;
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .togglebutton label {
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .togglebutton label:hover,
.form-group.is-focused .togglebutton label:focus {
color: rgba(0,0,0, .54);
}
fieldset[disabled] .form-group.is-focused .togglebutton label {
color: rgba(0,0,0, 0.26);
}
.togglebutton label input[type=checkbox] {
opacity: 0;
width: 0;
height: 0;
}
.togglebutton label .toggle {
text-align: left;
}
.togglebutton label .toggle,
.togglebutton label input[type=checkbox][disabled] + .toggle {
content: "";
display: inline-block;
width: 30px;
height: 15px;
background-color: rgba(80, 80, 80, 0.7);
border-radius: 15px;
margin-right: 15px;
-webkit-transition: background 0.3s ease;
-o-transition: background 0.3s ease;
transition: background 0.3s ease;
vertical-align: middle;
}
.togglebutton label .toggle:after {
content: "";
display: inline-block;
width: 20px;
height: 20px;
background-color: #F1F1F1;
border-radius: 20px;
position: relative;
-webkit-box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4);
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4);
left: -5px;
top: -2px;
-webkit-transition: left 0.3s ease, background 0.3s ease, -webkit-box-shadow 0.1s ease;
-o-transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease;
transition: left 0.3s ease, background 0.3s ease, box-shadow 0.1s ease;
}
.togglebutton label input[type=checkbox][disabled] + .toggle:after,
.togglebutton label input[type=checkbox][disabled]:checked + .toggle:after {
background-color: #BDBDBD;
}
.togglebutton label input[type=checkbox] + .toggle:active:after,
.togglebutton label input[type=checkbox][disabled] + .toggle:active:after {
-webkit-box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 0, 0, 0.1);
}
.togglebutton label input[type=checkbox]:checked + .toggle:after {
left: 15px;
}
.togglebutton label input[type=checkbox]:checked + .toggle {
background-color: rgba(0, 150, 136, 0.5);
}
.togglebutton label input[type=checkbox]:checked + .toggle:after {
background-color: #009688;
}
.togglebutton label input[type=checkbox]:checked + .toggle:active:after {
-webkit-box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 150, 136, 0.1);
box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.4), 0 0 0 15px rgba(0, 150, 136, 0.1);
}
.radio label {
cursor: pointer;
padding-left: 45px;
position: relative;
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .radio label {
color: rgba(0,0,0, 0.26);
}
.form-group.is-focused .radio label:hover,
.form-group.is-focused .radio label:focus {
color: rgba(0,0,0, .54);
}
fieldset[disabled] .form-group.is-focused .radio label {
color: rgba(0,0,0, 0.26);
}
.radio label span {
display: block;
position: absolute;
left: 10px;
top: 2px;
-webkit-transition-duration: 0.2s;
-o-transition-duration: 0.2s;
transition-duration: 0.2s;
}
.radio label .circle {
border: 2px solid rgba(0,0,0, .54);
height: 15px;
width: 15px;
border-radius: 100%;
}
.radio label .check {
height: 15px;
width: 15px;
border-radius: 100%;
background-color: #009688;
-webkit-transform: scale3d(0, 0, 0);
transform: scale3d(0, 0, 0);
}
.radio label .check:after {
display: block;
position: absolute;
content: "";
background-color: rgba(0,0,0, 0.87);
left: -18px;
top: -18px;
height: 50px;
width: 50px;
border-radius: 100%;
z-index: 1;
opacity: 0;
margin: 0;
-webkit-transform: scale3d(1.5, 1.5, 1);
transform: scale3d(1.5, 1.5, 1);
}
.radio label input[type=radio]:not(:checked) ~ .check:after {
-webkit-animation: rippleOff 500ms;
-o-animation: rippleOff 500ms;
animation: rippleOff 500ms;
}
.radio label input[type=radio]:checked ~ .check:after {
-webkit-animation: rippleOn;
-o-animation: rippleOn;
animation: rippleOn;
}
.radio input[type=radio] {
opacity: 0;
height: 0;
width: 0;
overflow: hidden;
}
.radio input[type=radio]:checked ~ .check,
.radio input[type=radio]:checked ~ .circle {
opacity: 1;
}
.radio input[type=radio]:checked ~ .check {
background-color: #009688;
}
.radio input[type=radio]:checked ~ .circle {
border-color: #009688;
}
.radio input[type=radio]:checked ~ .check {
-webkit-transform: scale3d(0.55, 0.55, 1);
transform: scale3d(0.55, 0.55, 1);
}
.radio input[type=radio][disabled] ~ .check,
.radio input[type=radio][disabled] ~ .circle {
opacity: 0.26;
}
.radio input[type=radio][disabled] ~ .check {
background-color: #000000;
}
.radio input[type=radio][disabled] ~ .circle {
border-color: #000000;
}
.theme-dark .radio input[type=radio][disabled] ~ .check,
.theme-dark .radio input[type=radio][disabled] ~ .circle {
opacity: 0.3;
}
.theme-dark .radio input[type=radio][disabled] ~ .check {
background-color: #ffffff;
}
.theme-dark .radio input[type=radio][disabled] ~ .circle {
border-color: #ffffff;
}
.is-focused .radio input[type=radio]:checked ~ .check:after {
-webkit-animation: rippleOn 500ms;
-o-animation: rippleOn 500ms;
animation: rippleOn 500ms;
}
@keyframes rippleOn {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
@keyframes rippleOff {
0% {
opacity: 0;
}
50% {
opacity: 0.2;
}
100% {
opacity: 0;
}
}
legend {
margin-bottom: 22px;
font-size: 24px;
}
output {
padding-top: 8px;
font-size: 16px;
line-height: 1.42857143;
}
.form-control {
height: 38px;
padding: 7px 0;
font-size: 16px;
line-height: 1.42857143;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control {
line-height: 38px;
}
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm,
.input-group-sm input[type="date"],
.input-group-sm input[type="time"],
.input-group-sm input[type="datetime-local"],
.input-group-sm input[type="month"] {
line-height: 24px;
}
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg,
.input-group-lg input[type="date"],
.input-group-lg input[type="time"],
.input-group-lg input[type="datetime-local"],
.input-group-lg input[type="month"] {
line-height: 44px;
}
}
.radio label,
.checkbox label {
min-height: 22px;
}
.form-control-static {
padding-top: 8px;
padding-bottom: 8px;
min-height: 38px;
}
.input-sm .input-sm {
height: 24px;
padding: 3px 0;
font-size: 11px;
line-height: 1.5;
border-radius: 0;
}
.input-sm select.input-sm {
height: 24px;
line-height: 24px;
}
.input-sm textarea.input-sm,
.input-sm select[multiple].input-sm {
height: auto;
}
.form-group-sm .form-control {
height: 24px;
padding: 3px 0;
font-size: 11px;
line-height: 1.5;
}
.form-group-sm select.form-control {
height: 24px;
line-height: 24px;
}
.form-group-sm textarea.form-control,
.form-group-sm select[multiple].form-control {
height: auto;
}
.form-group-sm .form-control-static {
height: 24px;
min-height: 33px;
padding: 4px 0;
font-size: 11px;
line-height: 1.5;
}
.input-lg .input-lg {
height: 44px;
padding: 9px 0;
font-size: 18px;
line-height: 1.3333333;
border-radius: 0;
}
.input-lg select.input-lg {
height: 44px;
line-height: 44px;
}
.input-lg textarea.input-lg,
.input-lg select[multiple].input-lg {
height: auto;
}
.form-group-lg .form-control {
height: 44px;
padding: 9px 0;
font-size: 18px;
line-height: 1.3333333;
}
.form-group-lg select.form-control {
height: 44px;
line-height: 44px;
}
.form-group-lg textarea.form-control,
.form-group-lg select[multiple].form-control {
height: auto;
}
.form-group-lg .form-control-static {
height: 44px;
min-height: 40px;
padding: 10px 0;
font-size: 18px;
line-height: 1.3333333;
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
padding-top: 8px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
min-height: 30px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
padding-top: 8px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 12.9999997px;
font-size: 18px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 4px;
font-size: 11px;
}
}
.label {
border-radius: 1px;
padding: .3em .6em;
}
.label,
.label.label-default {
background-color: #9e9e9e;
}
.label.label-inverse {
background-color: #3f51b5;
}
.label.label-primary {
background-color: #009688;
}
.label.label-success {
background-color: #4caf50;
}
.label.label-info {
background-color: #03a9f4;
}
.label.label-warning {
background-color: #ff5722;
}
.label.label-danger {
background-color: #f44336;
}
.form-control,
.form-group .form-control {
border: 0;
background-image: -webkit-gradient(linear, left top, left bottom, from(#009688), to(#009688)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#009688, #009688), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#009688, #009688), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#009688, #009688), linear-gradient(#D2D2D2, #D2D2D2);
-webkit-background-size: 0 2px, 100% 1px;
background-size: 0 2px, 100% 1px;
background-repeat: no-repeat;
background-position: center bottom, center -webkit-calc(100% - 1px);
background-position: center bottom, center calc(100% - 1px);
background-color: rgba(0, 0, 0, 0);
-webkit-transition: background 0s ease-out;
-o-transition: background 0s ease-out;
transition: background 0s ease-out;
float: none;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
}
.form-control::-moz-placeholder,
.form-group .form-control::-moz-placeholder {
color: #BDBDBD;
font-weight: 400;
}
.form-control:-ms-input-placeholder,
.form-group .form-control:-ms-input-placeholder {
color: #BDBDBD;
font-weight: 400;
}
.form-control::-webkit-input-placeholder,
.form-group .form-control::-webkit-input-placeholder {
color: #BDBDBD;
font-weight: 400;
}
.form-control[readonly],
.form-group .form-control[readonly],
.form-control[disabled],
.form-group .form-control[disabled],
fieldset[disabled] .form-control,
fieldset[disabled] .form-group .form-control {
background-color: rgba(0, 0, 0, 0);
}
.form-control[disabled],
.form-group .form-control[disabled],
fieldset[disabled] .form-control,
fieldset[disabled] .form-group .form-control {
background-image: none;
border-bottom: 1px dotted #D2D2D2;
}
.form-group {
position: relative;
}
.form-group.label-static label.control-label,
.form-group.label-placeholder label.control-label,
.form-group.label-floating label.control-label {
position: absolute;
pointer-events: none;
-webkit-transition: 0.3s ease all;
-o-transition: 0.3s ease all;
transition: 0.3s ease all;
}
.form-group.label-floating label.control-label {
will-change: left, top, contents;
}
.form-group.label-placeholder:not(.is-empty) label.control-label {
display: none;
}
.form-group .help-block {
position: absolute;
display: none;
}
.form-group.is-focused .form-control {
outline: none;
background-image: -webkit-gradient(linear, left top, left bottom, from(#009688), to(#009688)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#009688, #009688), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#009688, #009688), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#009688, #009688), linear-gradient(#D2D2D2, #D2D2D2);
-webkit-background-size: 100% 2px, 100% 1px;
background-size: 100% 2px, 100% 1px;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
}
.form-group.is-focused .form-control .material-input:after {
background-color: #009688;
}
.form-group.is-focused label,
.form-group.is-focused label.control-label {
color: #009688;
}
.form-group.is-focused.label-placeholder label,
.form-group.is-focused.label-placeholder label.control-label {
color: #BDBDBD;
}
.form-group.is-focused .help-block {
display: block;
}
.form-group.has-warning .form-control {
-webkit-box-shadow: none;
box-shadow: none;
}
.form-group.has-warning.is-focused .form-control {
background-image: -webkit-gradient(linear, left top, left bottom, from(#ff5722), to(#ff5722)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#ff5722, #ff5722), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#ff5722, #ff5722), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#ff5722, #ff5722), linear-gradient(#D2D2D2, #D2D2D2);
}
.form-group.has-warning label.control-label,
.form-group.has-warning .help-block {
color: #ff5722;
}
.form-group.has-error .form-control {
-webkit-box-shadow: none;
box-shadow: none;
}
.form-group.has-error.is-focused .form-control {
background-image: -webkit-gradient(linear, left top, left bottom, from(#f44336), to(#f44336)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#f44336, #f44336), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#f44336, #f44336), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#f44336, #f44336), linear-gradient(#D2D2D2, #D2D2D2);
}
.form-group.has-error label.control-label,
.form-group.has-error .help-block {
color: #f44336;
}
.form-group.has-success .form-control {
-webkit-box-shadow: none;
box-shadow: none;
}
.form-group.has-success.is-focused .form-control {
background-image: -webkit-gradient(linear, left top, left bottom, from(#4caf50), to(#4caf50)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#4caf50, #4caf50), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#4caf50, #4caf50), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#4caf50, #4caf50), linear-gradient(#D2D2D2, #D2D2D2);
}
.form-group.has-success label.control-label,
.form-group.has-success .help-block {
color: #4caf50;
}
.form-group.has-info .form-control {
-webkit-box-shadow: none;
box-shadow: none;
}
.form-group.has-info.is-focused .form-control {
background-image: -webkit-gradient(linear, left top, left bottom, from(#03a9f4), to(#03a9f4)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#03a9f4, #03a9f4), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#03a9f4, #03a9f4), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#03a9f4, #03a9f4), linear-gradient(#D2D2D2, #D2D2D2);
}
.form-group.has-info label.control-label,
.form-group.has-info .help-block {
color: #03a9f4;
}
.form-group.has-tmblue .form-control {
-webkit-box-shadow: none;
box-shadow: none;
}
.form-group.has-tmblue.is-focused .form-control {
background-image: -webkit-gradient(linear, left top, left bottom, from(#004165), to(#004165)), -webkit-gradient(linear, left top, left bottom, from(#D2D2D2), to(#D2D2D2));
background-image: -webkit-linear-gradient(#004165, #004165), -webkit-linear-gradient(#D2D2D2, #D2D2D2);
background-image: -o-linear-gradient(#004165, #004165), -o-linear-gradient(#D2D2D2, #D2D2D2);
background-image: linear-gradient(#004165, #004165), linear-gradient(#D2D2D2, #D2D2D2);
}
.form-group.has-tmblue label.control-label,
.form-group.has-tmblue .help-block {
color: #004165;
}
.form-group textarea {
resize: none;
}
.form-group textarea ~ .form-control-highlight {
margin-top: -11px;
}
.form-group select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.form-group select ~ .material-input:after {
display: none;
}
.form-control {
margin-bottom: 7px;
}
.form-control::-moz-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-control:-ms-input-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-control::-webkit-input-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.checkbox label,
.radio label,
label {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
label.control-label {
font-size: 12px;
line-height: 1.07142857;
font-weight: 400;
margin: 16px 0 0 0;
}
.help-block {
margin-top: 0;
font-size: 12px;
}
.form-group {
padding-bottom: 7px;
margin: 28px 0 0 0;
}
.form-group .form-control {
margin-bottom: 7px;
}
.form-group .form-control::-moz-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-group .form-control:-ms-input-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-group .form-control::-webkit-input-placeholder {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-group .checkbox label,
.form-group .radio label,
.form-group label {
font-size: 16px;
line-height: 1.42857143;
color: #BDBDBD;
font-weight: 400;
}
.form-group label.control-label {
font-size: 12px;
line-height: 1.07142857;
font-weight: 400;
margin: 16px 0 0 0;
}
.form-group .help-block {
margin-top: 0;
font-size: 12px;
}
.form-group.label-floating label.control-label,
.form-group.label-placeholder label.control-label {
top: -7px;
font-size: 16px;
line-height: 1.42857143;
}
.form-group.label-static label.control-label,
.form-group.label-floating.is-focused label.control-label,
.form-group.label-floating:not(.is-empty) label.control-label {
top: -30px;
left: 0;
font-size: 12px;
line-height: 1.07142857;
}
.form-group.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label {
top: -30px;
left: 0;
font-size: 12px;
line-height: 1.07142857;
}
.form-group.form-group-sm {
padding-bottom: 3px;
margin: 21px 0 0 0;
}
.form-group.form-group-sm .form-control {
margin-bottom: 3px;
}
.form-group.form-group-sm .form-control::-moz-placeholder {
font-size: 11px;
line-height: 1.5;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-sm .form-control:-ms-input-placeholder {
font-size: 11px;
line-height: 1.5;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-sm .form-control::-webkit-input-placeholder {
font-size: 11px;
line-height: 1.5;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-sm .checkbox label,
.form-group.form-group-sm .radio label,
.form-group.form-group-sm label {
font-size: 11px;
line-height: 1.5;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-sm label.control-label {
font-size: 9px;
line-height: 1.125;
font-weight: 400;
margin: 16px 0 0 0;
}
.form-group.form-group-sm .help-block {
margin-top: 0;
font-size: 9px;
}
.form-group.form-group-sm.label-floating label.control-label,
.form-group.form-group-sm.label-placeholder label.control-label {
top: -11px;
font-size: 11px;
line-height: 1.5;
}
.form-group.form-group-sm.label-static label.control-label,
.form-group.form-group-sm.label-floating.is-focused label.control-label,
.form-group.form-group-sm.label-floating:not(.is-empty) label.control-label {
top: -25px;
left: 0;
font-size: 9px;
line-height: 1.125;
}
.form-group.form-group-sm.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label {
top: -25px;
left: 0;
font-size: 9px;
line-height: 1.125;
}
.form-group.form-group-lg {
padding-bottom: 9px;
margin: 30px 0 0 0;
}
.form-group.form-group-lg .form-control {
margin-bottom: 9px;
}
.form-group.form-group-lg .form-control::-moz-placeholder {
font-size: 18px;
line-height: 1.3333333;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-lg .form-control:-ms-input-placeholder {
font-size: 18px;
line-height: 1.3333333;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-lg .form-control::-webkit-input-placeholder {
font-size: 18px;
line-height: 1.3333333;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-lg .checkbox label,
.form-group.form-group-lg .radio label,
.form-group.form-group-lg label {
font-size: 18px;
line-height: 1.3333333;
color: #BDBDBD;
font-weight: 400;
}
.form-group.form-group-lg label.control-label {
font-size: 14px;
line-height: 0.99999998;
font-weight: 400;
margin: 16px 0 0 0;
}
.form-group.form-group-lg .help-block {
margin-top: 0;
font-size: 14px;
}
.form-group.form-group-lg.label-floating label.control-label,
.form-group.form-group-lg.label-placeholder label.control-label {
top: -5px;
font-size: 18px;
line-height: 1.3333333;
}
.form-group.form-group-lg.label-static label.control-label,
.form-group.form-group-lg.label-floating.is-focused label.control-label,
.form-group.form-group-lg.label-floating:not(.is-empty) label.control-label {
top: -32px;
left: 0;
font-size: 14px;
line-height: 0.99999998;
}
.form-group.form-group-lg.label-floating input.form-control:-webkit-autofill ~ label.control-label label.control-label {
top: -32px;
left: 0;
font-size: 14px;
line-height: 0.99999998;
}
select.form-control {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0;
}
.form-group.is-focused select.form-control {
-webkit-box-shadow: none;
box-shadow: none;
border-color: #D2D2D2;
}
select.form-control[multiple],
.form-group.is-focused select.form-control[multiple] {
height: 85px;
}
.input-group-btn .btn {
margin: 0 0 7px 0;
}
.form-group.form-group-sm .input-group-btn .btn {
margin: 0 0 3px 0;
}
.form-group.form-group-lg .input-group-btn .btn {
margin: 0 0 9px 0;
}
.input-group .input-group-btn {
padding: 0 12px;
}
.input-group .input-group-addon {
border: 0;
background: transparent;
}
.form-group input[type=file] {
opacity: 0;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
legend {
border-bottom: 0;
}
.list-group {
border-radius: 0;
}
.list-group .list-group-item {
background-color: transparent;
overflow: hidden;
border: 0;
border-radius: 0;
padding: 0 16px;
}
.list-group .list-group-item.baseline {
border-bottom: 1px solid #cecece;
}
.list-group .list-group-item.baseline:last-child {
border-bottom: none;
}
.list-group .list-group-item .row-picture,
.list-group .list-group-item .row-action-primary {
display: inline-block;
padding-right: 16px;
}
.list-group .list-group-item .row-picture img,
.list-group .list-group-item .row-action-primary img,
.list-group .list-group-item .row-picture i,
.list-group .list-group-item .row-action-primary i,
.list-group .list-group-item .row-picture label,
.list-group .list-group-item .row-action-primary label {
display: block;
width: 56px;
height: 56px;
}
.list-group .list-group-item .row-picture img,
.list-group .list-group-item .row-action-primary img {
background: rgba(0, 0, 0, 0.1);
padding: 1px;
}
.list-group .list-group-item .row-picture img.circle,
.list-group .list-group-item .row-action-primary img.circle {
border-radius: 100%;
}
.list-group .list-group-item .row-picture i,
.list-group .list-group-item .row-action-primary i {
background: rgba(0, 0, 0, 0.25);
border-radius: 100%;
text-align: center;
line-height: 56px;
font-size: 20px;
color: white;
}
.list-group .list-group-item .row-picture label,
.list-group .list-group-item .row-action-primary label {
margin-left: 7px;
margin-right: -7px;
margin-top: 5px;
margin-bottom: -5px;
}
.list-group .list-group-item .row-picture label .checkbox-material,
.list-group .list-group-item .row-action-primary label .checkbox-material {
left: -10px;
}
.list-group .list-group-item .row-content {
display: inline-block;
width: -webkit-calc(100% - 92px);
width: calc(100% - 92px);
min-height: 66px;
}
.list-group .list-group-item .row-content .action-secondary {
position: absolute;
right: 16px;
top: 16px;
}
.list-group .list-group-item .row-content .action-secondary i {
font-size: 20px;
color: rgba(0, 0, 0, 0.25);
cursor: pointer;
}
.list-group .list-group-item .row-content .action-secondary ~ * {
max-width: -webkit-calc(100% - 30px);
max-width: calc(100% - 30px);
}
.list-group .list-group-item .row-content .least-content {
position: absolute;
right: 16px;
top: 0;
color: rgba(0, 0, 0, 0.54);
font-size: 14px;
}
.list-group .list-group-item .list-group-item-heading {
color: rgba(0, 0, 0, 0.77);
font-size: 20px;
line-height: 29px;
}
.list-group .list-group-item.active:hover,
.list-group .list-group-item.active:focus {
background: rgba(0, 0, 0, 0.15);
outline: 10px solid rgba(0, 0, 0, 0.15);
}
.list-group .list-group-item.active .list-group-item-heading,
.list-group .list-group-item.active .list-group-item-text {
color: rgba(0,0,0, 0.87);
}
.list-group .list-group-separator {
clear: both;
overflow: hidden;
margin-top: 10px;
margin-bottom: 10px;
}
.list-group .list-group-separator:before {
content: "";
width: -webkit-calc(100% - 90px);
width: calc(100% - 90px);
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
float: right;
}
.navbar {
background-color: #009688;
border: 0;
border-radius: 0;
}
.navbar .navbar-brand {
position: relative;
height: 60px;
line-height: 30px;
color: inherit;
}
.navbar .navbar-brand:hover,
.navbar .navbar-brand:focus {
color: inherit;
background-color: transparent;
}
.navbar .navbar-text {
color: inherit;
margin-top: 20px;
margin-bottom: 20px;
}
.navbar .navbar-nav > li > a {
color: inherit;
padding-top: 20px;
padding-bottom: 20px;
}
.navbar .navbar-nav > li > a:hover,
.navbar .navbar-nav > li > a:focus {
color: inherit;
background-color: transparent;
}
.navbar .navbar-nav > .active > a,
.navbar .navbar-nav > .active > a:hover,
.navbar .navbar-nav > .active > a:focus {
color: inherit;
background-color: rgba(255, 255, 255, 0.1);
}
.navbar .navbar-nav > .disabled > a,
.navbar .navbar-nav > .disabled > a:hover,
.navbar .navbar-nav > .disabled > a:focus {
color: inherit;
background-color: transparent;
opacity: 0.9;
}
.navbar .navbar-toggle {
border: 0;
}
.navbar .navbar-toggle:hover,
.navbar .navbar-toggle:focus {
background-color: transparent;
}
.navbar .navbar-toggle .icon-bar {
background-color: inherit;
border: 1px solid;
}
.navbar .navbar-default .navbar-toggle,
.navbar .navbar-inverse .navbar-toggle {
border-color: transparent;
}
.navbar .navbar-collapse,
.navbar .navbar-form {
border-color: rgba(0, 0, 0, 0.1);
}
.navbar .navbar-nav > .open > a,
.navbar .navbar-nav > .open > a:hover,
.navbar .navbar-nav > .open > a:focus {
background-color: transparent;
color: inherit;
}
@media (max-width: 767px) {
.navbar .navbar-nav .navbar-text {
color: inherit;
margin-top: 15px;
margin-bottom: 15px;
}
.navbar .navbar-nav .open .dropdown-menu > .dropdown-header {
border: 0;
color: inherit;
}
.navbar .navbar-nav .open .dropdown-menu .divider {
border-bottom: 1px solid;
opacity: 0.08;
}
.navbar .navbar-nav .open .dropdown-menu > li > a {
color: inherit;
}
.navbar .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar .navbar-nav .open .dropdown-menu > li > a:focus {
color: inherit;
background-color: transparent;
}
.navbar .navbar-nav .open .dropdown-menu > .active > a,
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
color: inherit;
background-color: transparent;
}
.navbar .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: inherit;
background-color: transparent;
}
}
.navbar .navbar-link {
color: inherit;
}
.navbar .navbar-link:hover {
color: inherit;
}
.navbar .btn-link {
color: inherit;
}
.navbar .btn-link:hover,
.navbar .btn-link:focus {
color: inherit;
}
.navbar .btn-link[disabled]:hover,
fieldset[disabled] .navbar .btn-link:hover,
.navbar .btn-link[disabled]:focus,
fieldset[disabled] .navbar .btn-link:focus {
color: inherit;
}
.navbar .navbar-form {
margin-top: 16px;
}
.navbar .navbar-form .form-group {
margin: 0;
padding: 0;
}
.navbar .navbar-form .form-group .material-input:before,
.navbar .navbar-form .form-group.is-focused .material-input:after {
background-color: inherit;
}
.navbar .navbar-form .form-group .form-control,
.navbar .navbar-form .form-control {
border-color: inherit;
color: inherit;
padding: 0;
margin: 0;
height: 28px;
font-size: 14px;
line-height: 1.42857143;
}
.navbar,
.navbar.navbar-default {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.navbar .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-default .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar .navbar-form input.form-control::-moz-placeholder,
.navbar.navbar-default .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-default .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar .navbar-form input.form-control:-ms-input-placeholder,
.navbar.navbar-default .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-default .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar .navbar-form input.form-control::-webkit-input-placeholder,
.navbar.navbar-default .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar .dropdown-menu,
.navbar.navbar-default .dropdown-menu {
border-radius: 2px;
}
.navbar .dropdown-menu li > a,
.navbar.navbar-default .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar .dropdown-menu li > a:hover,
.navbar.navbar-default .dropdown-menu li > a:hover,
.navbar .dropdown-menu li > a:focus,
.navbar.navbar-default .dropdown-menu li > a:focus {
color: #009688;
background-color: #eeeeee;
}
.navbar .dropdown-menu .active > a,
.navbar.navbar-default .dropdown-menu .active > a {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.navbar .dropdown-menu .active > a:hover,
.navbar.navbar-default .dropdown-menu .active > a:hover,
.navbar .dropdown-menu .active > a:focus,
.navbar.navbar-default .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-inverse {
background-color: #3f51b5;
color: #ffffff;
}
.navbar.navbar-inverse .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-inverse .navbar-form input.form-control::-moz-placeholder {
color: #ffffff;
}
.navbar.navbar-inverse .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-inverse .navbar-form input.form-control:-ms-input-placeholder {
color: #ffffff;
}
.navbar.navbar-inverse .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-inverse .navbar-form input.form-control::-webkit-input-placeholder {
color: #ffffff;
}
.navbar.navbar-inverse .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-inverse .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-inverse .dropdown-menu li > a:hover,
.navbar.navbar-inverse .dropdown-menu li > a:focus {
color: #3f51b5;
background-color: #eeeeee;
}
.navbar.navbar-inverse .dropdown-menu .active > a {
background-color: #3f51b5;
color: #ffffff;
}
.navbar.navbar-inverse .dropdown-menu .active > a:hover,
.navbar.navbar-inverse .dropdown-menu .active > a:focus {
color: #ffffff;
}
.navbar.navbar-primary {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-primary .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-primary .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-primary .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-primary .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-primary .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-primary .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-primary .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-primary .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-primary .dropdown-menu li > a:hover,
.navbar.navbar-primary .dropdown-menu li > a:focus {
color: #009688;
background-color: #eeeeee;
}
.navbar.navbar-primary .dropdown-menu .active > a {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-primary .dropdown-menu .active > a:hover,
.navbar.navbar-primary .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success {
background-color: #4caf50;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-success .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-success .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-success .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-success .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-success .dropdown-menu li > a:hover,
.navbar.navbar-success .dropdown-menu li > a:focus {
color: #4caf50;
background-color: #eeeeee;
}
.navbar.navbar-success .dropdown-menu .active > a {
background-color: #4caf50;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-success .dropdown-menu .active > a:hover,
.navbar.navbar-success .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info {
background-color: #03a9f4;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-info .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-info .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-info .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-info .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-info .dropdown-menu li > a:hover,
.navbar.navbar-info .dropdown-menu li > a:focus {
color: #03a9f4;
background-color: #eeeeee;
}
.navbar.navbar-info .dropdown-menu .active > a {
background-color: #03a9f4;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-info .dropdown-menu .active > a:hover,
.navbar.navbar-info .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning {
background-color: #ff5722;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-warning .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-warning .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-warning .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-warning .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-warning .dropdown-menu li > a:hover,
.navbar.navbar-warning .dropdown-menu li > a:focus {
color: #ff5722;
background-color: #eeeeee;
}
.navbar.navbar-warning .dropdown-menu .active > a {
background-color: #ff5722;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-warning .dropdown-menu .active > a:hover,
.navbar.navbar-warning .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger {
background-color: #f44336;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger .navbar-form .form-group input.form-control::-moz-placeholder,
.navbar.navbar-danger .navbar-form input.form-control::-moz-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger .navbar-form .form-group input.form-control:-ms-input-placeholder,
.navbar.navbar-danger .navbar-form input.form-control:-ms-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger .navbar-form .form-group input.form-control::-webkit-input-placeholder,
.navbar.navbar-danger .navbar-form input.form-control::-webkit-input-placeholder {
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger .dropdown-menu {
border-radius: 2px;
}
.navbar.navbar-danger .dropdown-menu li > a {
font-size: 16px;
padding: 13px 16px;
}
.navbar.navbar-danger .dropdown-menu li > a:hover,
.navbar.navbar-danger .dropdown-menu li > a:focus {
color: #f44336;
background-color: #eeeeee;
}
.navbar.navbar-danger .dropdown-menu .active > a {
background-color: #f44336;
color: rgba(255,255,255, 0.84);
}
.navbar.navbar-danger .dropdown-menu .active > a:hover,
.navbar.navbar-danger .dropdown-menu .active > a:focus {
color: rgba(255,255,255, 0.84);
}
.navbar-inverse {
background-color: #3f51b5;
}
@media (max-width: 1199px) {
.navbar .navbar-brand {
height: 50px;
padding: 10px 15px;
}
.navbar .navbar-form {
margin-top: 10px;
}
.navbar .navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
}
}
.dropdown-menu {
border: 0;
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
}
.dropdown-menu .divider {
background-color: rgba(0, 0, 0, 0.12);
}
.dropdown-menu li {
overflow: hidden;
position: relative;
}
.dropdown-menu li a:hover {
background-color: transparent;
color: #009688;
}
.alert {
border: 0;
border-radius: 0;
}
.alert,
.alert.alert-default {
background-color: rgba(255,255,255, 0.84);
color: rgba(255,255,255, 0.84);
}
.alert a,
.alert.alert-default a,
.alert .alert-link,
.alert.alert-default .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert.alert-inverse {
background-color: #3f51b5;
color: #ffffff;
}
.alert.alert-inverse a,
.alert.alert-inverse .alert-link {
color: #ffffff;
}
.alert.alert-primary {
background-color: #009688;
color: rgba(255,255,255, 0.84);
}
.alert.alert-primary a,
.alert.alert-primary .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert.alert-success {
background-color: #4caf50;
color: rgba(255,255,255, 0.84);
}
.alert.alert-success a,
.alert.alert-success .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert.alert-info {
background-color: #03a9f4;
color: rgba(255,255,255, 0.84);
}
.alert.alert-info a,
.alert.alert-info .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert.alert-warning {
background-color: #ff5722;
color: rgba(255,255,255, 0.84);
}
.alert.alert-warning a,
.alert.alert-warning .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert.alert-danger {
background-color: #f44336;
color: rgba(255,255,255, 0.84);
}
.alert.alert-danger a,
.alert.alert-danger .alert-link {
color: rgba(255,255,255, 0.84);
}
.alert-info,
.alert-danger,
.alert-warning,
.alert-success {
color: rgba(255,255,255, 0.84);
}
.alert-default a,
.alert-default .alert-link {
color: rgba(0,0,0, 0.87);
}
.progress {
height: 4px;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
background: #c8c8c8;
}
.progress .progress-bar {
-webkit-box-shadow: none;
box-shadow: none;
}
.progress .progress-bar,
.progress .progress-bar.progress-bar-default {
background-color: #009688;
}
.progress .progress-bar.progress-bar-inverse {
background-color: #3f51b5;
}
.progress .progress-bar.progress-bar-primary {
background-color: #009688;
}
.progress .progress-bar.progress-bar-success {
background-color: #4caf50;
}
.progress .progress-bar.progress-bar-info {
background-color: #03a9f4;
}
.progress .progress-bar.progress-bar-warning {
background-color: #ff5722;
}
.progress .progress-bar.progress-bar-danger {
background-color: #f44336;
}
.text-warning {
color: #ff5722;
}
.text-primary {
color: #009688;
}
.text-danger {
color: #f44336;
}
.text-success {
color: #4caf50;
}
.text-info {
color: #03a9f4;
}
.text-tmblue {
color: #004165;
}
.nav-tabs {
background: #009688;
}
.nav-tabs > li > a {
color: #FFFFFF;
border: 0;
margin: 0;
}
.nav-tabs > li > a:hover {
background-color: transparent;
border: 0;
}
.nav-tabs > li > a,
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
background-color: transparent !important;
border: 0 !important;
color: #FFFFFF !important;
font-weight: 500;
}
.nav-tabs > li.disabled > a,
.nav-tabs > li.disabled > a:hover {
color: rgba(255, 255, 255, 0.5);
}
.popover,
.tooltip-inner {
color: #ececec;
line-height: 1em;
background: rgba(101, 101, 101, 0.9);
border: none;
border-radius: 2px;
-webkit-box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
}
.tooltip,
.tooltip.in {
opacity: 1;
}
.popover .arrow,
.tooltip .arrow,
.popover .tooltip-arrow,
.tooltip .tooltip-arrow {
display: none;
}
.card {
/***** Make height equal to width (http://stackoverflow.com/a/6615994) ****/
display: inline-block;
position: relative;
width: 100%;
/**************************************************************************/
border-radius: 2px;
color: rgba(0,0,0, 0.87);
background: #fff;
-webkit-box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}
.card .card-height-indicator {
margin-top: 100%;
}
.card .card-content {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.card .card-image {
height: 60%;
position: relative;
overflow: hidden;
}
.card .card-image img {
width: 100%;
height: 100%;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
pointer-events: none;
}
.card .card-image .card-image-headline {
position: absolute;
bottom: 16px;
left: 18px;
color: #fff;
font-size: 2em;
}
.card .card-body {
height: 30%;
padding: 18px;
}
.card .card-footer {
height: 10%;
padding: 18px;
}
.card .card-footer button,
.card .card-footer a {
margin: 0 !important;
position: relative;
bottom: 25px;
width: auto;
}
.card .card-footer button:first-child,
.card .card-footer a:first-child {
left: -15px;
}
.modal-content {
-webkit-box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
box-shadow: 0 27px 24px 0 rgba(0, 0, 0, 0.2), 0 40px 77px 0 rgba(0, 0, 0, 0.22);
border-radius: 2px;
border: none;
}
.modal-content .modal-header {
border-bottom: none;
padding-top: 24px;
padding-right: 24px;
padding-bottom: 0;
padding-left: 24px;
}
.modal-content .modal-body {
padding-top: 24px;
padding-right: 24px;
padding-bottom: 16px;
padding-left: 24px;
}
.modal-content .modal-footer {
border-top: none;
padding: 7px;
}
.modal-content .modal-footer button {
margin: 0;
padding-left: 16px;
padding-right: 16px;
width: auto;
}
.modal-content .modal-footer button.pull-left {
padding-left: 5px;
padding-right: 5px;
position: relative;
left: -5px;
}
.modal-content .modal-footer button + button {
margin-bottom: 16px;
}
.modal-content .modal-body + .modal-footer {
padding-top: 0;
}
.modal-backdrop {
background: rgba(0, 0, 0, 0.3);
}
.panel {
border-radius: 2px;
border: 0;
-webkit-box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
}
.panel > .panel-heading,
.panel.panel-default > .panel-heading {
background-color: #eeeeee;
}
.panel.panel-inverse > .panel-heading {
background-color: #3f51b5;
}
.panel.panel-primary > .panel-heading {
background-color: #009688;
}
.panel.panel-success > .panel-heading {
background-color: #4caf50;
}
.panel.panel-info > .panel-heading {
background-color: #03a9f4;
}
.panel.panel-tmblue > .panel-heading {
background-color: #004165;
}
.panel.panel-warning > .panel-heading {
background-color: #ff5722;
}
.panel.panel-danger > .panel-heading {
background-color: #f44336;
}
[class*="panel-"] > .panel-heading {
color: rgba(255,255,255, 0.84);
border: 0;
}
.panel-default > .panel-heading,
.panel:not([class*="panel-"]) > .panel-heading {
color: rgba(0,0,0, 0.87);
}
.panel-footer {
background-color: #eeeeee;
}
hr.on-dark {
color: #1a1a1a;
}
hr.on-light {
color: #ffffff;
}
@media (-webkit-min-device-pixel-ratio: 0.75), (min--moz-device-pixel-ratio: 0.75), (-o-device-pixel-ratio: 3/4), (min-device-pixel-ratio: 0.75), (-o-min-device-pixel-ratio: 3/4), (min-resolution: 0.75dppx), (-webkit-min-device-pixel-ratio: 1.25), (-o-min-device-pixel-ratio: 5/4), (min-resolution: 120dpi) {
hr {
height: 0.75px;
}
}
@media (-webkit-min-device-pixel-ratio: 1), (min--moz-device-pixel-ratio: 1), (-o-device-pixel-ratio: 1), (min-device-pixel-ratio: 1), (-o-min-device-pixel-ratio: 1/1), (min-resolution: 1dppx), (-webkit-min-device-pixel-ratio: 1.6666666666666667), (-o-min-device-pixel-ratio: 5/3), (min-resolution: 160dpi) {
hr {
height: 1px;
}
}
@media (-webkit-min-device-pixel-ratio: 1.33), (min--moz-device-pixel-ratio: 1.33), (-o-device-pixel-ratio: 133/100), (min-device-pixel-ratio: 1.33), (-o-min-device-pixel-ratio: 133/100), (min-resolution: 1.33dppx), (-webkit-min-device-pixel-ratio: 2.21875), (-o-min-device-pixel-ratio: 71/32), (min-resolution: 213dpi) {
hr {
height: 1.333px;
}
}
@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-device-pixel-ratio: 3/2), (min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 2.5), (-o-min-device-pixel-ratio: 5/2), (min-resolution: 240dpi) {
hr {
height: 1.5px;
}
}
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (-o-device-pixel-ratio: 2/1), (min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 3.9583333333333335), (-o-min-device-pixel-ratio: 95/24), (min-resolution: 380dpi) {
hr {
height: 2px;
}
}
@media (-webkit-min-device-pixel-ratio: 3), (min--moz-device-pixel-ratio: 3), (-o-device-pixel-ratio: 3/1), (min-device-pixel-ratio: 3), (-o-min-device-pixel-ratio: 3/1), (min-resolution: 3dppx), (-webkit-min-device-pixel-ratio: 5), (-o-min-device-pixel-ratio: 5/1), (min-resolution: 480dpi) {
hr {
height: 3px;
}
}
@media (-webkit-min-device-pixel-ratio: 4), (min--moz-device-pixel-ratio: 4), (-o-device-pixel-ratio: 4/1), (min-device-pixel-ratio: 3), (-o-min-device-pixel-ratio: 4/1), (min-resolution: 4dppx), (-webkit-min-device-pixel-ratio: 6.666666666666667), (-o-min-device-pixel-ratio: 20/3), (min-resolution: 640dpi) {
hr {
height: 4px;
}
}
* {
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
-webkit-tap-highlight-color: transparent;
}
*:focus {
outline: 0;
}
.snackbar {
background-color: #323232;
color: rgba(255,255,255, 0.84);
font-size: 14px;
border-radius: 2px;
-webkit-box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
height: 0;
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, padding 0s linear 0.2s, height 0s linear 0.2s;
-o-transition: -o-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, padding 0s linear 0.2s, height 0s linear 0.2s;
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, padding 0s linear 0.2s, height 0s linear 0.2s;
-webkit-transform: translateY(200%);
-ms-transform: translateY(200%);
-o-transform: translateY(200%);
transform: translateY(200%);
}
.snackbar.snackbar-opened {
padding: 14px 15px;
margin-bottom: 20px;
height: auto;
-webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, height 0s linear 0.2s;
-o-transition: -o-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, height 0s linear 0.2s;
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0s linear 0.2s, height 0s linear 0.2s;
-webkit-transform: none;
-ms-transform: none;
-o-transform: none;
transform: none;
}
.snackbar.toast {
border-radius: 200px;
}
.noUi-target,
.noUi-target * {
-webkit-touch-callout: none;
-ms-touch-action: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.noUi-base {
width: 100%;
height: 100%;
position: relative;
}
.noUi-origin {
position: absolute;
right: 0;
top: 0;
left: 0;
bottom: 0;
}
.noUi-handle {
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.noUi-stacking .noUi-handle {
z-index: 10;
}
.noUi-state-tap .noUi-origin {
-webkit-transition: left 0.3s, top 0.3s;
-o-transition: left 0.3s, top 0.3s;
transition: left 0.3s, top 0.3s;
}
.noUi-state-drag * {
cursor: inherit !important;
}
.noUi-horizontal {
height: 10px;
}
.noUi-handle {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 12px;
height: 12px;
left: -10px;
top: -5px;
cursor: ew-resize;
border-radius: 100%;
-webkit-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;
border: 1px solid;
}
.noUi-vertical .noUi-handle {
margin-left: 5px;
cursor: ns-resize;
}
.noUi-horizontal.noUi-extended {
padding: 0 15px;
}
.noUi-horizontal.noUi-extended .noUi-origin {
right: -15px;
}
.noUi-background {
height: 2px;
margin: 20px 0;
}
.noUi-origin {
margin: 0;
border-radius: 0;
height: 2px;
background: #c8c8c8;
}
.noUi-origin[style^="left: 0"] .noUi-handle {
background-color: #fff;
border: 2px solid #c8c8c8;
}
.noUi-origin[style^="left: 0"] .noUi-handle.noUi-active {
border-width: 1px;
}
.noUi-target {
border-radius: 2px;
}
.noUi-horizontal {
height: 2px;
margin: 15px 0;
}
.noUi-vertical {
height: 100%;
width: 2px;
margin: 0 15px;
display: inline-block;
}
.noUi-handle.noUi-active {
-webkit-transform: scale3d(2.5, 2.5, 1);
transform: scale3d(2.5, 2.5, 1);
}
[disabled].noUi-slider {
opacity: 0.5;
}
[disabled] .noUi-handle {
cursor: not-allowed;
}
.slider {
background: #c8c8c8;
}
.slider.noUi-connect,
.slider.slider-default.noUi-connect {
background-color: #009688;
}
.slider.slider-inverse.noUi-connect {
background-color: #3f51b5;
}
.slider.slider-primary.noUi-connect {
background-color: #009688;
}
.slider.slider-success.noUi-connect {
background-color: #4caf50;
}
.slider.slider-info.noUi-connect {
background-color: #03a9f4;
}
.slider.slider-tmblue.noUi-connect {
background-color: #004165;
}
.slider.slider-warning.noUi-connect {
background-color: #ff5722;
}
.slider.slider-danger.noUi-connect {
background-color: #f44336;
}
.slider .noUi-connect,
.slider.slider-default .noUi-connect {
background-color: #009688;
}
.slider.slider-inverse .noUi-connect {
background-color: #3f51b5;
}
.slider.slider-primary .noUi-connect {
background-color: #009688;
}
.slider.slider-success .noUi-connect {
background-color: #4caf50;
}
.slider.slider-info .noUi-connect {
background-color: #03a9f4;
}
.slider.slider-warning .noUi-connect {
background-color: #ff5722;
}
.slider.slider-danger .noUi-connect {
background-color: #f44336;
}
.slider .noUi-handle,
.slider.slider-default .noUi-handle {
background-color: #009688;
}
.slider.slider-inverse .noUi-handle {
background-color: #3f51b5;
}
.slider.slider-primary .noUi-handle {
background-color: #009688;
}
.slider.slider-success .noUi-handle {
background-color: #4caf50;
}
.slider.slider-info .noUi-handle {
background-color: #03a9f4;
}
.slider.slider-warning .noUi-handle {
background-color: #ff5722;
}
.slider.slider-danger .noUi-handle {
background-color: #f44336;
}
.slider .noUi-handle,
.slider.slider-default .noUi-handle {
border-color: #009688;
}
.slider.slider-inverse .noUi-handle {
border-color: #3f51b5;
}
.slider.slider-primary .noUi-handle {
border-color: #009688;
}
.slider.slider-success .noUi-handle {
border-color: #4caf50;
}
.slider.slider-info .noUi-handle {
border-color: #03a9f4;
}
.slider.slider-warning .noUi-handle {
border-color: #ff5722;
}
.slider.slider-danger .noUi-handle {
border-color: #f44336;
}
.selectize-control.single,
.selectize-control.multi {
padding: 0;
}
.selectize-control.single .selectize-input,
.selectize-control.multi .selectize-input,
.selectize-control.single .selectize-input.input-active,
.selectize-control.multi .selectize-input.input-active {
cursor: text;
background: transparent;
-webkit-box-shadow: none;
box-shadow: none;
border: 0;
padding: 0;
height: 100%;
font-size: 14px;
line-height: 30px;
}
.selectize-control.single .selectize-input .has-items,
.selectize-control.multi .selectize-input .has-items,
.selectize-control.single .selectize-input.input-active .has-items,
.selectize-control.multi .selectize-input.input-active .has-items {
padding: 0;
}
.selectize-control.single .selectize-input:after,
.selectize-control.multi .selectize-input:after,
.selectize-control.single .selectize-input.input-active:after,
.selectize-control.multi .selectize-input.input-active:after {
right: 5px;
position: absolute;
font-size: 25px;
content: "\e5c5";
font-family: 'Material Icons';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.selectize-control.single .selectize-input input,
.selectize-control.multi .selectize-input input,
.selectize-control.single .selectize-input.input-active input,
.selectize-control.multi .selectize-input.input-active input {
font-size: 14px;
outline: 0;
border: 0;
background: transparent;
}
.selectize-control.single .selectize-input.label-floating-fix input,
.selectize-control.multi .selectize-input.label-floating-fix input,
.selectize-control.single .selectize-input.input-active.label-floating-fix input,
.selectize-control.multi .selectize-input.input-active.label-floating-fix input {
opacity: 0;
}
.selectize-control.single .selectize-input > div,
.selectize-control.multi .selectize-input > div,
.selectize-control.single .selectize-input.input-active > div,
.selectize-control.multi .selectize-input.input-active > div,
.selectize-control.single .selectize-input > .item,
.selectize-control.multi .selectize-input > .item,
.selectize-control.single .selectize-input.input-active > .item,
.selectize-control.multi .selectize-input.input-active > .item {
display: inline-block;
margin: 0 8px 3px 0;
padding: 0;
background: transparent;
border: 0;
}
.selectize-control.single .selectize-input > div:after,
.selectize-control.multi .selectize-input > div:after,
.selectize-control.single .selectize-input.input-active > div:after,
.selectize-control.multi .selectize-input.input-active > div:after,
.selectize-control.single .selectize-input > .item:after,
.selectize-control.multi .selectize-input > .item:after,
.selectize-control.single .selectize-input.input-active > .item:after,
.selectize-control.multi .selectize-input.input-active > .item:after {
content: ",";
}
.selectize-control.single .selectize-input > div:last-of-type:after,
.selectize-control.multi .selectize-input > div:last-of-type:after,
.selectize-control.single .selectize-input.input-active > div:last-of-type:after,
.selectize-control.multi .selectize-input.input-active > div:last-of-type:after,
.selectize-control.single .selectize-input > .item:last-of-type:after,
.selectize-control.multi .selectize-input > .item:last-of-type:after,
.selectize-control.single .selectize-input.input-active > .item:last-of-type:after,
.selectize-control.multi .selectize-input.input-active > .item:last-of-type:after {
content: "";
}
.selectize-control.single .selectize-input > div.active,
.selectize-control.multi .selectize-input > div.active,
.selectize-control.single .selectize-input.input-active > div.active,
.selectize-control.multi .selectize-input.input-active > div.active,
.selectize-control.single .selectize-input > .item.active,
.selectize-control.multi .selectize-input > .item.active,
.selectize-control.single .selectize-input.input-active > .item.active,
.selectize-control.multi .selectize-input.input-active > .item.active {
font-weight: bold;
background: transparent;
border: 0;
}
.selectize-control.single .selectize-dropdown,
.selectize-control.multi .selectize-dropdown {
position: absolute;
z-index: 1000;
border: 0;
width: 100% !important;
left: 0 !important;
height: auto;
background-color: #FFF;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
border-radius: 2px;
padding: 0;
margin-top: 3px;
}
.selectize-control.single .selectize-dropdown .active,
.selectize-control.multi .selectize-dropdown .active {
background-color: inherit;
}
.selectize-control.single .selectize-dropdown .highlight,
.selectize-control.multi .selectize-dropdown .highlight {
background-color: #d5d8ff;
}
.selectize-control.single .selectize-dropdown .selected,
.selectize-control.multi .selectize-dropdown .selected,
.selectize-control.single .selectize-dropdown .selected.active,
.selectize-control.multi .selectize-dropdown .selected.active {
background-color: #EEEEEE;
}
.selectize-control.single .selectize-dropdown [data-selectable],
.selectize-control.multi .selectize-dropdown [data-selectable],
.selectize-control.single .selectize-dropdown .optgroup-header,
.selectize-control.multi .selectize-dropdown .optgroup-header {
padding: 10px 20px;
cursor: pointer;
}
.selectize-control.single .dropdown-active ~ .selectize-dropdown,
.selectize-control.multi .dropdown-active ~ .selectize-dropdown {
display: block;
}
.dropdownjs::after {
right: 5px;
top: 3px;
font-size: 25px;
position: absolute;
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
content: "\e5c5";
pointer-events: none;
color: #757575;
}
/*# sourceMappingURL=bootstrap-material-design.css.map */ | {
"content_hash": "3bddf30985480d715a2dd861a2db58a0",
"timestamp": "",
"source": "github",
"line_count": 3429,
"max_line_length": 321,
"avg_line_length": 31.030329542140567,
"alnum_prop": 0.6871328815916844,
"repo_name": "joeaudet/tmwebtools",
"id": "4f19ad7f48d43018009b8c0112efd7cf12da9fbc",
"size": "106403",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/resources/css/bootstrap-material-design.css",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1891"
},
{
"name": "HTML",
"bytes": "648"
},
{
"name": "PHP",
"bytes": "13431"
}
],
"symlink_target": ""
} |
package mx.edu.um.miembros.webapp.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import mx.edu.um.webapp.action.BaseAction;
import mx.edu.um.Constants;
import mx.edu.um.miembros.model.Miembro;
import mx.edu.um.miembros.service.MiembroManager;
import mx.edu.um.miembros.webapp.form.MiembroForm;
/**
* Action class to handle CRUD on a Miembro object
*
* @struts.action name="miembroForm" path="/miembros" scope="request"
* validate="false" parameter="method" input="mainMenu"
* @struts.action name="miembroForm" path="/editMiembro" scope="request"
* validate="false" parameter="method" input="list"
* @struts.action name="miembroForm" path="/saveMiembro" scope="request"
* validate="true" parameter="method" input="edit"
* @struts.action-set-property property="cancellable" value="true"
* @struts.action-forward name="edit" path="/WEB-INF/pages/miembros/miembroForm.jsp"
* @struts.action-forward name="list" path="/WEB-INF/pages/miembros/miembroList.jsp"
* @struts.action-forward name="search" path="/miembros.html" redirect="true"
*/
public final class MiembroAction extends BaseAction {
public ActionForward cancel(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return mapping.findForward("search");
}
public ActionForward delete(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'delete' method");
}
ActionMessages messages = new ActionMessages();
MiembroForm miembroForm = (MiembroForm) form;
// Exceptions are caught by ActionExceptionHandler
MiembroManager mgr = (MiembroManager) getBean("miembroManager");
mgr.removeMiembro(miembroForm.getId());
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("miembro.deleted"));
// save messages in session, so they'll survive the redirect
saveMessages(request.getSession(), messages);
return mapping.findForward("search");
}
public ActionForward edit(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'edit' method");
}
MiembroForm miembroForm = (MiembroForm) form;
// if an id is passed in, look up the user - otherwise
// don't do anything - user is doing an add
if (miembroForm.getId() != null) {
MiembroManager mgr = (MiembroManager) getBean("miembroManager");
Miembro miembro = mgr.getMiembro(miembroForm.getId());
miembroForm = (MiembroForm) convert(miembro);
updateFormBean(mapping, request, miembroForm);
}
return mapping.findForward("edit");
}
public ActionForward save(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'save' method");
}
// Extract attributes and parameters we will need
ActionMessages messages = new ActionMessages();
MiembroForm miembroForm = (MiembroForm) form;
boolean isNew = ("".equals(miembroForm.getId()) || miembroForm.getId() == null);
MiembroManager mgr = (MiembroManager) getBean("miembroManager");
Miembro miembro = (Miembro) convert(miembroForm);
mgr.saveMiembro(miembro);
// add success messages
if (isNew) {
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("miembro.added"));
// save messages in session to survive a redirect
saveMessages(request.getSession(), messages);
return mapping.findForward("search");
} else {
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("miembro.updated"));
saveMessages(request, messages);
return mapping.findForward("edit");
}
}
public ActionForward search(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'search' method");
}
MiembroForm miembroForm = (MiembroForm) form;
Miembro miembro = (Miembro) convert(miembroForm);
MiembroManager mgr = (MiembroManager) getBean("miembroManager");
request.setAttribute(Constants.MIEMBRO_LIST, mgr.getMiembros(miembro));
return mapping.findForward("list");
}
public ActionForward unspecified(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return search(mapping, form, request, response);
}
}
| {
"content_hash": "c46c9e7d0ccc6de3b39ebd708dfc932d",
"timestamp": "",
"source": "github",
"line_count": 144,
"max_line_length": 88,
"avg_line_length": 39.333333333333336,
"alnum_prop": 0.6394774011299436,
"repo_name": "guepardo190889/siscofe",
"id": "60562c8009c484f0e4624a1a9543afb87549ea49",
"size": "5664",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/web/mx/edu/um/miembros/webapp/action/MiembroAction.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "D",
"bytes": "2275"
},
{
"name": "Java",
"bytes": "385344"
},
{
"name": "JavaScript",
"bytes": "68779"
},
{
"name": "Shell",
"bytes": "75"
}
],
"symlink_target": ""
} |
package org.gradoop.common.model.impl.properties;
import com.google.common.collect.Lists;
import org.gradoop.common.model.impl.id.GradoopId;
import org.testng.annotations.DataProvider;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.*;
import static org.gradoop.common.GradoopTestUtils.*;
import static org.gradoop.common.model.impl.properties.PropertyValue.create;
/**
* Class wraps data providers needed in {@link PropertyValueTest}.
*/
public class PropertyValueTestProvider {
/**
* Provides non numerical PropertyValue instances.
*
* @return Array of PropertyValues.
*/
@DataProvider
private Object[][] nonNumericalPropertyValueProvider() {
return new Object [][] {
{create(BOOL_VAL_1)},
{create("Not a number")}
};
}
/**
* Provides an example instance of every supported data type.
*
* @return Array of supported types.
*/
@DataProvider
private Object[][] supportedTypeProvider() {
return new Object[][] {
{NULL_VAL_0},
{BOOL_VAL_1},
{INT_VAL_2},
{LONG_VAL_3},
{FLOAT_VAL_4},
{DOUBLE_VAL_5},
{STRING_VAL_6},
{BIG_DECIMAL_VAL_7},
{GRADOOP_ID_VAL_8},
{MAP_VAL_9},
{LIST_VAL_a},
{DATE_VAL_b},
{TIME_VAL_c},
{DATETIME_VAL_d},
{SHORT_VAL_e},
{SET_VAL_f}
};
}
/**
* Provides PropertyValue instances.
* @return Array of PropertyValues
*/
@DataProvider
private Object[][] propertyValueProvider() {
return new Object[][] {
{create(NULL_VAL_0)},
{create(BOOL_VAL_1)},
{create(INT_VAL_2)},
{create(LONG_VAL_3)},
{create(FLOAT_VAL_4)},
{create(DOUBLE_VAL_5)},
{create(STRING_VAL_6)},
{create(BIG_DECIMAL_VAL_7)},
{create(GRADOOP_ID_VAL_8)},
{create(MAP_VAL_9)},
{create(LIST_VAL_a)},
{create(DATE_VAL_b)},
{create(TIME_VAL_c)},
{create(DATETIME_VAL_d)},
{create(SHORT_VAL_e)},
{create(SET_VAL_f)},
};
}
/**
* Provides PropertyValues and the object that was used to create a given instance.
*
* @return Array of PropertyValues
*/
@DataProvider
private Object[][] testIsProvider() {
return new Object[][] {
{create(NULL_VAL_0), NULL_VAL_0},
{create(BOOL_VAL_1), BOOL_VAL_1},
{create(INT_VAL_2), INT_VAL_2},
{create(LONG_VAL_3), LONG_VAL_3},
{create(FLOAT_VAL_4), FLOAT_VAL_4},
{create(DOUBLE_VAL_5), DOUBLE_VAL_5},
{create(STRING_VAL_6), STRING_VAL_6},
{create(BIG_DECIMAL_VAL_7), BIG_DECIMAL_VAL_7},
{create(GRADOOP_ID_VAL_8), GRADOOP_ID_VAL_8},
{create(MAP_VAL_9), MAP_VAL_9},
{create(LIST_VAL_a), LIST_VAL_a},
{create(DATE_VAL_b), DATE_VAL_b},
{create(TIME_VAL_c), TIME_VAL_c},
{create(DATETIME_VAL_d), DATETIME_VAL_d},
{create(SHORT_VAL_e), SHORT_VAL_e},
{create(SET_VAL_f), SET_VAL_f},
};
}
/**
* Provides an array of different PropertyValues and booleans that indicate whether a given value
* represents a number.
*
* @return Array of PropertyValues
*/
@DataProvider
private Object[][] testIsNumberProvider() {
return new Object[][] {
// Actual PropertyValue, expected output
{create(SHORT_VAL_e), true},
{create(LONG_VAL_3), true},
{create(FLOAT_VAL_4), true},
{create(DOUBLE_VAL_5), true},
{create(BIG_DECIMAL_VAL_7), true},
{create(NULL_VAL_0), false},
{create(BOOL_VAL_1), false},
{create(STRING_VAL_6), false},
{create(GRADOOP_ID_VAL_8), false},
{create(MAP_VAL_9), false},
{create(LIST_VAL_a), false},
{create(DATE_VAL_b), false},
{create(TIME_VAL_c), false},
{create(DATETIME_VAL_d), false},
{create(SET_VAL_f), false}
};
}
/**
* Provides triples of PropertyValues that are used to test {@link PropertyValue#hashCode()} and
* {@link PropertyValue#equals(Object)}.
*
* @return Array of PropertyValue triples.
*/
@DataProvider
private Object[][] testEqualsAndHashCodeProvider() {
Map<PropertyValue, PropertyValue> map1 = new HashMap<>();
map1.put(create("foo"), create("bar"));
Map<PropertyValue, PropertyValue> map2 = new HashMap<>();
map2.put(create("foo"), create("bar"));
Map<PropertyValue, PropertyValue> map3 = new HashMap<>();
map3.put(create("foo"), create("baz"));
List<PropertyValue> list1 = Lists.newArrayList(
create("foo"), create("bar")
);
List<PropertyValue> list2 = Lists.newArrayList(
create("foo"), create("bar")
);
List<PropertyValue> list3 = Lists.newArrayList(
create("foo"), create("baz")
);
Set<PropertyValue> set1 = new HashSet<>();
set1.add(create("bar"));
Set<PropertyValue> set2 = new HashSet<>();
set2.add(create("bar"));
Set<PropertyValue> set3 = new HashSet<>();
set3.add(create("baz"));
LocalDate date1 = LocalDate.MAX;
LocalDate date2 = LocalDate.MAX;
LocalDate date3 = LocalDate.now();
LocalTime time1 = LocalTime.MAX;
LocalTime time2 = LocalTime.MAX;
LocalTime time3 = LocalTime.now();
LocalDateTime dateTime1 = LocalDateTime.of(date1, time1);
LocalDateTime dateTime2 = LocalDateTime.of(date2, time2);
LocalDateTime dateTime3 = LocalDateTime.of(date3, time3);
return new Object[][] {
{create(null), create(null), create(false)},
{create(true), create(true), create(false)},
{create((short) 10), create((short) 10), create((short) 11)},
{create(10), create(10), create(11)},
{create(10L), create(10L), create(11L)},
{create(10F), create(10F), create(11F)},
{create(10.), create(10.), create(11.)},
{create("10"), create("10"), create("11")},
{create(new BigDecimal(10)), create(new BigDecimal(10)), create(new BigDecimal(11))},
{create(GradoopId.fromString("583ff8ffbd7d222690a90999")),
create(GradoopId.fromString("583ff8ffbd7d222690a90999")),
create(GradoopId.fromString("583ff8ffbd7d222690a9099a"))},
{create(map1), create(map2), create(map3)},
{create(list1), create(list2), create(list3)},
{create(time1), create(time2), create(time3)},
{create(dateTime1), create(dateTime2), create(dateTime3)},
{create(set1), create(set2), create(set3)}
};
}
@DataProvider
public static Object[][] propertiesProvider() {
return new Object[][] {
{create(NULL_VAL_0), Type.NULL.getTypeByte()},
{create(BOOL_VAL_1), Type.BOOLEAN.getTypeByte()},
{create(INT_VAL_2), Type.INTEGER.getTypeByte()},
{create(LONG_VAL_3), Type.LONG.getTypeByte()},
{create(FLOAT_VAL_4), Type.FLOAT.getTypeByte()},
{create(DOUBLE_VAL_5), Type.DOUBLE.getTypeByte()},
{create(STRING_VAL_6), Type.STRING.getTypeByte()},
{create(BIG_DECIMAL_VAL_7), Type.BIG_DECIMAL.getTypeByte()},
{create(GRADOOP_ID_VAL_8), Type.GRADOOP_ID.getTypeByte()},
{create(MAP_VAL_9), Type.MAP.getTypeByte()},
{create(LIST_VAL_a), Type.LIST.getTypeByte()},
{create(DATE_VAL_b), Type.DATE.getTypeByte()},
{create(TIME_VAL_c), Type.TIME.getTypeByte()},
{create(DATETIME_VAL_d), Type.DATE_TIME.getTypeByte()},
{create(SHORT_VAL_e), Type.SHORT.getTypeByte()},
{create(SET_VAL_f), Type.SET.getTypeByte()}
};
}
}
| {
"content_hash": "e97b61f3e659eef36bfa302c07dc6575",
"timestamp": "",
"source": "github",
"line_count": 230,
"max_line_length": 99,
"avg_line_length": 32.13913043478261,
"alnum_prop": 0.6210768398268398,
"repo_name": "galpha/gradoop",
"id": "2629493d2d6711a606832950e48edb8fd99df323",
"size": "8029",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "gradoop-common/src/test/java/org/gradoop/common/model/impl/properties/PropertyValueTestProvider.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "6550822"
},
{
"name": "Shell",
"bytes": "2289"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/main.css">
<link rel="stylesheet" type="text/css" href="css/login.css">
<title>Hello World</title>
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="app_login">
<div class="app_content">
<div id="login_2">
<div id="logo"></div>
<form class="login_2_form" action="list.html">
<input placeholder="Login" class="login_name" type="text" name="name" value="">
<input placeholder="Password" class="login_password" type="password" name="password" value="">
<a class="login_submit" href="list.html">SUBMIT</a>
</form>
</div>
<div id="login_1">
<button type="button" name="btn btn_student" class="btn_student">
<i class="fa fa-graduation-cap"></i>
<p>You are a student</p>
</button>
<button type="button" name="btn btn_company" class="btn_company">
<i class="fa fa-building" ></i>
<p>You are a company</p>
</button>
</div>
</div>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/login.js"></script>
</body>
</html>
| {
"content_hash": "2a2048f8add6db428ad2d3b0bff7a135",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 176,
"avg_line_length": 50.651162790697676,
"alnum_prop": 0.5303030303030303,
"repo_name": "LeoPenaguin/EpsiGrp3ws",
"id": "7fb3a77c51c90213d82cf8c2c7bc3b9c0b9d40ed",
"size": "2178",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "BookingMyTraining/platforms/browser/www/login.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "20941"
},
{
"name": "C",
"bytes": "1025"
},
{
"name": "CSS",
"bytes": "471709"
},
{
"name": "HTML",
"bytes": "43003"
},
{
"name": "Java",
"bytes": "276843"
},
{
"name": "JavaScript",
"bytes": "80902"
},
{
"name": "Objective-C",
"bytes": "201769"
},
{
"name": "Shell",
"bytes": "1927"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="15dp"
android:background="#8000"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:text="预报"
android:textColor="#fff"
android:textSize="20sp" />
<LinearLayout
android:id="@+id/forecast_layout"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout> | {
"content_hash": "8890d409d445ab857ceafc65e3d10d28",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 72,
"avg_line_length": 30.884615384615383,
"alnum_prop": 0.6575342465753424,
"repo_name": "c1925363518/coolweather",
"id": "7f0ffd1bfebc1cfccedf1aaeb84c650927d73881",
"size": "807",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/res/layout/forecast.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "35944"
}
],
"symlink_target": ""
} |
package org.jetbrains.plugins.textmate.language.syntax.lexer;
import com.intellij.lexer.LexerBase;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.psi.tree.IElementType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.plugins.textmate.language.TextMateLanguageDescriptor;
import org.jetbrains.plugins.textmate.language.syntax.SyntaxNodeDescriptor;
import java.util.LinkedList;
import java.util.Queue;
public class TextMateHighlightingLexer extends LexerBase {
private final TextMateLexer myLexer;
private final Queue<TextMateLexer.Token> currentLineTokens = new LinkedList<>();
private CharSequence myBuffer;
private int myEndOffset;
private int myCurrentOffset;
private IElementType myTokenType;
private int myTokenStart;
private int myTokenEnd;
private boolean myRestartable;
/**
* @deprecated use {@link TextMateHighlightingLexer#TextMateHighlightingLexer(TextMateLanguageDescriptor, int)} instead
*/
@Deprecated
@ApiStatus.ScheduledForRemoval(inVersion = "2020.3")
public TextMateHighlightingLexer(CharSequence scopeName, SyntaxNodeDescriptor languageRootSyntaxNode) {
myLexer = new TextMateLexer(new TextMateLanguageDescriptor(scopeName, languageRootSyntaxNode),
Registry.get("textmate.line.highlighting.limit").asInteger());
}
public TextMateHighlightingLexer(@NotNull TextMateLanguageDescriptor languageDescriptor, int lineLimit) {
myLexer = new TextMateLexer(languageDescriptor, lineLimit);
}
@Override
public void start(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) {
myBuffer = buffer;
myCurrentOffset = startOffset;
myTokenStart = startOffset;
myEndOffset = endOffset;
currentLineTokens.clear();
myLexer.init(myBuffer, startOffset);
advance();
}
@Override
public int getState() {
return myRestartable ? 0 : 1;
}
@Nullable
@Override
public IElementType getTokenType() {
return myTokenType;
}
@Override
public int getTokenStart() {
return myTokenStart;
}
@Override
public int getTokenEnd() {
return myTokenEnd;
}
@NotNull
@Override
public CharSequence getBufferSequence() {
return myBuffer;
}
@Override
public int getBufferEnd() {
return myEndOffset;
}
@Override
public void advance() {
if (myCurrentOffset >= myEndOffset) {
updateState(null, myEndOffset);
return;
}
if (currentLineTokens.isEmpty()) {
myLexer.advanceLine(currentLineTokens);
}
updateState(currentLineTokens.poll(), myLexer.getCurrentOffset());
}
protected void updateState(@Nullable TextMateLexer.Token token, int fallbackOffset) {
if (token != null) {
myTokenType = new TextMateElementType(token.selector);
myTokenStart = token.startOffset;
myTokenEnd = Math.min(token.endOffset, myEndOffset);
myCurrentOffset = token.endOffset;
myRestartable = token.restartable;
}
else {
myTokenType = null;
myTokenStart = fallbackOffset;
myTokenEnd = fallbackOffset;
myCurrentOffset = fallbackOffset;
myRestartable = true;
}
}
}
| {
"content_hash": "47a83e5f1092b0fa1ca81f94ce3363b1",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 121,
"avg_line_length": 28.67543859649123,
"alnum_prop": 0.7381462220862649,
"repo_name": "zdary/intellij-community",
"id": "68830e071abceaaba5cc0b25e1c10df4f8ae912b",
"size": "3269",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "plugins/textmate/src/org/jetbrains/plugins/textmate/language/syntax/lexer/TextMateHighlightingLexer.java",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Office.Interop.Visio;
using System.Threading;
namespace PrecizeSoft.IO.Converters
{
/// <summary>
/// Word documents to PDF converter. Using Microsoft Word for converting.
/// </summary>
public class VisioToPdfConverter: OfficeInteropFileConverterBase
{
/// <summary>
/// Returns a list of supported file formats
/// </summary>
/// <returns></returns>
protected override IEnumerable<string> InitializeSupportedFormatCollection()
{
return new List<string>()
{ ".vdw", ".vdx", ".vsd", ".vsdm", ".vsdx", ".vss", ".vssm", ".vssx", ".vst", ".vstm", ".vstx", ".vsx", ".vtx" };
}
/// <summary>
/// Opens file from disk, converts it to PDF and saves to disk
/// </summary>
/// <param name="sourceFileName">Source file name</param>
/// <param name="destinationFileName">Destination file name</param>
protected override void ConvertFile(string sourceFileName, string destinationFileName)
{
Application visioApplication = new Application() { Visible = false };
try
{
Document visioDocument = null;
visioDocument = visioApplication.Documents.OpenEx(sourceFileName, (short)VisOpenSaveArgs.visOpenRO
+ (short)VisOpenSaveArgs.visOpenMacrosDisabled + (short)VisOpenSaveArgs.visOpenDeclineAutoRefresh
+ (short)VisOpenSaveArgs.visOpenDontList + (short)VisOpenSaveArgs.visOpenHidden);
visioDocument.ExportAsFixedFormat(VisFixedFormatTypes.visFixedFormatPDF, destinationFileName,
VisDocExIntent.visDocExIntentPrint, VisPrintOutRange.visPrintAll);
}
finally
{
visioApplication.Quit();
}
}
}
}
| {
"content_hash": "b944735178325bc005fd1d2334357dc8",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 129,
"avg_line_length": 39.31372549019608,
"alnum_prop": 0.6214463840399003,
"repo_name": "precizeman/precizesoft-io",
"id": "6421e9c565c5f0fb2a3e53fad158e903abf4561c",
"size": "2007",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/PrecizeSoft.IO.MicrosoftOffice/Converters/VisioToPdfConverter.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "130386"
}
],
"symlink_target": ""
} |
package com.bbva.kltt.apirest.core.util.mapper;
/**
* ------------------------------------------------
* @author Francisco Manuel Benitez Chico
* ------------------------------------------------
*/
public class JacksonViews
{
/**
* Empty subclass
*/
public static class GeneratorView extends JacksonViews.Public
{
// Empty subclass
}
/**
* Empty subclass
*/
public static class Public
{
// Empty subclass
}
}
| {
"content_hash": "49e88b735f5fc450ec69320d2807bf7a",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 62,
"avg_line_length": 17.185185185185187,
"alnum_prop": 0.4849137931034483,
"repo_name": "BBVA-CIB/APIRestGenerator",
"id": "8de705831a774ba0243b61fab6978cc2f82cc53a",
"size": "1288",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/src/main/java/com/bbva/kltt/apirest/core/util/mapper/JacksonViews.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "229"
},
{
"name": "CSS",
"bytes": "504463"
},
{
"name": "HTML",
"bytes": "9688"
},
{
"name": "Java",
"bytes": "1098093"
},
{
"name": "JavaScript",
"bytes": "136674"
},
{
"name": "Shell",
"bytes": "253"
}
],
"symlink_target": ""
} |
font-size: 18px;
width:505px;
border-radius:5px;
background-color:lightgrey;
padding:10px;
}
#wrapper > header > h1 {
font-weight: normal;
font-size: 1em;
}
#wrapper article {
background-color:white;
border: 1px solid black;
width: 500px;
position: relative;
min-height: 120px;
margin-top:40px;
}
#wrapper section article img:first-of-type {
margin: 15px;
width: 132px;
height: 90px;
float: left;
position: relative;
}
#wrapper section article a {
color:black;
text-decoration:none;
font-weight:bold;
}
#wrapper section article p {
margin: 5px;
}
#wrapper section article footer {
margin: 10px;
padding-left:260px;
}
#wrapper section article footer input[type=button] {
color: white;
}
#wrapper section article footer input[type=button]:first-of-type {
background: url(listen-button.png);
width: 117px;
height: 40px;
position:relative;
}
#wrapper section article footer input[type=button]:last-of-type {
background: url(add-button.png);
width: 96px;
height: 40px;
position:relative;
}
| {
"content_hash": "6287feff085ed06e73ee325d6d9a0606",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 78,
"avg_line_length": 23.14516129032258,
"alnum_prop": 0.5149825783972125,
"repo_name": "idoychinov/Telerik_Academy_Homework",
"id": "937a4c0f871c9907360ebba8af4344f0c41903b9",
"size": "1446",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CSS/3.CSS Layout/2.Music Categories/2.Music Categories.css",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "224148"
},
{
"name": "C#",
"bytes": "3952663"
},
{
"name": "CSS",
"bytes": "3475942"
},
{
"name": "CoffeeScript",
"bytes": "4453"
},
{
"name": "JavaScript",
"bytes": "8996873"
},
{
"name": "Pascal",
"bytes": "14823"
},
{
"name": "PowerShell",
"bytes": "1717649"
},
{
"name": "Puppet",
"bytes": "404631"
},
{
"name": "Shell",
"bytes": "315"
},
{
"name": "TypeScript",
"bytes": "11219"
},
{
"name": "XSLT",
"bytes": "2081"
}
],
"symlink_target": ""
} |
package com.wyverngame.rmi.api.http;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.util.Date;
import java.util.logging.Level;
import com.sun.istack.internal.logging.Logger;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpMethod;
import io.netty.handler.codec.http.HttpResponse;
import static io.netty.handler.codec.http.HttpHeaders.Names.*;
import static io.netty.handler.codec.http.HttpHeaders.*;
import static io.netty.handler.codec.http.HttpResponseStatus.*;
import static io.netty.handler.codec.http.HttpVersion.*;
public class HTTPServerHandler extends SimpleChannelInboundHandler<FullHttpRequest> {
private static final Logger LOGGER = Logger.getLogger(HTTPServerHandler.class);
private static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
private final HTTPServer server;
public HTTPServerHandler(HTTPServer server) {
this.server = server;
}
@Override
public void channelReadComplete(ChannelHandlerContext ctx) {
ctx.flush();
}
@Override
public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest httpRequest) throws Exception {
if (is100ContinueExpected(httpRequest)) ctx.write(new DefaultFullHttpResponse(HTTP_1_1, CONTINUE));
boolean keepAlive = isKeepAlive(httpRequest);
LOGGER.log(Level.INFO,
ctx.channel().remoteAddress() +
" [" + DATE_FORMATTER.format(Date.from(Instant.now())) + "] " +
httpRequest.getMethod().toString() + " " +
httpRequest.headers().get(HOST) + httpRequest.getUri() + " " +
httpRequest.getProtocolVersion());
if (httpRequest.getMethod().equals(HttpMethod.GET)) {
Request request = new Request(
httpRequest.getMethod(), httpRequest.headers().get(HOST),
httpRequest.getUri(), ctx.alloc(), ctx);
HttpResponse response = server.handle(request);
if (!keepAlive) {
ctx.write(response).addListener(ChannelFutureListener.CLOSE);
} else {
response.headers().set(CONNECTION, Values.KEEP_ALIVE);
ctx.write(response);
}
} else {
Request request = new Request(
httpRequest.getMethod(), httpRequest.headers().get(HOST),
httpRequest.getUri(), ctx.alloc(), ctx);
ctx.write(ErrorFormatter.format(request, 501));
}
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
LOGGER.log(Level.WARNING, "Error in " + ctx.name(), cause);
ctx.close();
}
} | {
"content_hash": "e49e6642ddedb603689f8a3381aedec4",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 104,
"avg_line_length": 35.1578947368421,
"alnum_prop": 0.7533682634730539,
"repo_name": "jonathanedgecombe/wu-json-rmi-api",
"id": "ed54ed214f1376631ebaa2f8a468cda423f2a0c3",
"size": "2672",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/wyverngame/rmi/api/http/HTTPServerHandler.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "53082"
}
],
"symlink_target": ""
} |
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Image build arguments reference
-------------------------------
The following build arguments (``--build-arg`` in docker build command) can be used for production images.
Those arguments are used when you want to customize the image. You can see some examples of it in
:ref:`Building from PyPI packages<image-build-pypi>`.
Basic arguments
...............
Those are the most common arguments that you use when you want to build a custom image.
+------------------------------------------+------------------------------------------+---------------------------------------------+
| Build argument | Default value | Description |
+==========================================+==========================================+=============================================+
| ``PYTHON_BASE_IMAGE`` | ``python:3.7-slim-bullseye`` | Base python image. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_VERSION`` | :subst-code:`|airflow-version|` | version of Airflow. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_EXTRAS`` | (see below the table) | Default extras with which airflow is |
| | | installed. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``ADDITIONAL_AIRFLOW_EXTRAS`` | | Optional additional extras with which |
| | | airflow is installed. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_HOME`` | ``/opt/airflow`` | Airflow's HOME (that's where logs and |
| | | SQLite databases are stored). |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_USER_HOME_DIR`` | ``/home/airflow`` | Home directory of the Airflow user. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_PIP_VERSION`` | ``22.3.1`` | PIP version used. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``ADDITIONAL_PIP_INSTALL_FLAGS`` | | additional ``pip`` flags passed to the |
| | | installation commands (except when |
| | | reinstalling ``pip`` itself) |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``PIP_PROGRESS_BAR`` | ``on`` | Progress bar for PIP installation |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_UID`` | ``50000`` | Airflow user UID. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_CONSTRAINTS`` | ``constraints`` | Type of constraints to build the image. |
| | | This can be ``constraints`` for regular |
| | | images or ``constraints-no-providers`` for |
| | | slim images. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
| ``AIRFLOW_CONSTRAINTS_REFERENCE`` | | Reference (branch or tag) from GitHub |
| | | where constraints file is taken from |
| | | It can be ``constraints-main`` or |
| | | ``constraints-2-0`` for |
| | | 2.0.* installation. In case of building |
| | | specific version you want to point it |
| | | to specific tag, for example |
| | | :subst-code:`constraints-|airflow-version|`.|
| | | Auto-detected if empty. |
+------------------------------------------+------------------------------------------+---------------------------------------------+
.. note::
Before Airflow 2.2, the image also had ``AIRFLOW_GID`` parameter, but it did not provide any additional
functionality - only added confusion - so it has been removed.
List of default extras in the production Dockerfile:
.. BEGINNING OF EXTRAS LIST UPDATED BY PRE COMMIT
* amazon
* async
* celery
* cncf.kubernetes
* dask
* docker
* elasticsearch
* ftp
* google
* google_auth
* grpc
* hashicorp
* http
* ldap
* microsoft.azure
* mysql
* odbc
* pandas
* postgres
* redis
* sendgrid
* sftp
* slack
* ssh
* statsd
* virtualenv
.. END OF EXTRAS LIST UPDATED BY PRE COMMIT
Image optimization options
..........................
The main advantage of Customization method of building Airflow image, is that it allows to build highly optimized image because
the final image (RUNTIME) might not contain all the dependencies that are needed to build and install all other dependencies
(DEV). Those arguments allow to control what is installed in the DEV image and what is installed in RUNTIME one, thus
allowing to produce much more optimized images. See :ref:`Building optimized images<image-build-optimized>`.
for examples of using those arguments.
+------------------------------------------+------------------------------------------+------------------------------------------+
| Build argument | Default value | Description |
+==========================================+==========================================+==========================================+
| ``UPGRADE_TO_NEWER_DEPENDENCIES`` | ``false`` | If set to a value different than "false" |
| | | the dependencies are upgraded to newer |
| | | versions. In CI it is set to build id |
| | | to make sure subsequent builds are not |
| | | reusing cached images with same value. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_PYTHON_DEPS`` | | Optional python packages to extend |
| | | the image with some extra dependencies. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``DEV_APT_COMMAND`` | | Dev apt command executed before dev deps |
| | | are installed in the Build image. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_DEV_APT_COMMAND`` | | Additional Dev apt command executed |
| | | before dev dep are installed |
| | | in the Build image. Should start with |
| | | ``&&``. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``DEV_APT_DEPS`` | Empty - install default dependencies | Dev APT dependencies installed |
| | (see ``install_os_dependencies.sh``) | in the Build image. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_DEV_APT_DEPS`` | | Additional apt dev dependencies |
| | | installed in the Build image. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_DEV_APT_ENV`` | | Additional env variables defined |
| | | when installing dev deps. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``RUNTIME_APT_COMMAND`` | | Runtime apt command executed before deps |
| | | are installed in the ``main`` stage. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_RUNTIME_APT_COMMAND`` | | Additional Runtime apt command executed |
| | | before runtime dep are installed |
| | | in the ``main`` stage. Should start with |
| | | ``&&``. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``RUNTIME_APT_DEPS`` | Empty - install default dependencies | Runtime APT dependencies installed |
| | (see ``install_os_dependencies.sh``) | in the Main image. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_RUNTIME_APT_DEPS`` | | Additional apt runtime dependencies |
| | | installed in the Main image. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``ADDITIONAL_RUNTIME_APT_ENV`` | | Additional env variables defined |
| | | when installing runtime deps. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``INSTALL_MYSQL_CLIENT`` | ``true`` | Whether MySQL client should be installed |
| | | The mysql extra is removed from extras |
| | | if the client is not installed. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``INSTALL_MSSQL_CLIENT`` | ``true`` | Whether MsSQL client should be installed |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``INSTALL_POSTGRES_CLIENT`` | ``true`` | Whether Postgres client should be |
| | | installed |
+------------------------------------------+------------------------------------------+------------------------------------------+
Installing Airflow using different methods
..........................................
Those parameters are useful only if you want to install Airflow using different installation methods than the default
(installing from PyPI packages).
This is usually only useful if you have your own fork of Airflow and want to build the images locally from
those sources - either locally or directly from GitHub sources. This way you do not need to release your
Airflow and Providers via PyPI - they can be installed directly from sources or from GitHub repository.
Another option of installation is to build Airflow from previously prepared binary Python packages which might
be useful if you need to build Airflow in environments that require high levels of security.
You can see some examples of those in:
* :ref:`Building from GitHub<image-build-github>`,
* :ref:`Using custom installation sources<image-build-custom>`,
* :ref:`Build images in security restricted environments<image-build-secure-environments>`
+------------------------------------+------------------------------------------+------------------------------------------+
| Build argument | Default value | Description |
+====================================+==========================================+==========================================+
| ``AIRFLOW_INSTALLATION_METHOD`` | ``apache-airflow`` | Installation method of Apache Airflow. |
| | | ``apache-airflow`` for installation from |
| | | PyPI. It can be GitHub repository URL |
| | | including branch or tag to install from |
| | | that repository or "." to install from |
| | | local sources. Installing from sources |
| | | requires appropriate values of the |
| | | ``AIRFLOW_SOURCES_FROM`` and |
| | | ``AIRFLOW_SOURCES_TO`` variables (see |
| | | below) |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_SOURCES_FROM`` | ``Dockerfile`` | Sources of Airflow. Set it to "." when |
| | | you install Airflow from local sources |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_SOURCES_TO`` | ``/Dockerfile`` | Target for Airflow sources. Set to |
| | | "/opt/airflow" when you install Airflow |
| | | from local sources. |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_VERSION_SPECIFICATION`` | | Optional - might be used for using limit |
| | | for Airflow version installation - for |
| | | example ``<2.0.2`` for automated builds. |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``INSTALL_PROVIDERS_FROM_SOURCES`` | ``false`` | If set to ``true`` and image is built |
| | | from sources, all provider packages are |
| | | installed from sources rather than from |
| | | packages. It has no effect when |
| | | installing from PyPI or GitHub repo. |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_CONSTRAINTS_LOCATION`` | | If not empty, it will override the |
| | | source of the constraints with the |
| | | specified URL or file. Note that the |
| | | file has to be in Docker context so |
| | | it's best to place such file in |
| | | one of the folders included in |
| | | ``.dockerignore`` file. |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``DOCKER_CONTEXT_FILES`` | ``Dockerfile`` | If set to a folder (for example to |
| | | ``docker-context-files`` folder), then |
| | | this folder will be copied to the |
| | | ``docker-context-files`` inside the |
| | | context of docker and you will be able |
| | | to install from binary files present |
| | | there. By default we set it to |
| | | Dockerfile as we know the file is there, |
| | | otherwise the COPY instruction fails. |
+------------------------------------+------------------------------------------+------------------------------------------+
| ``INSTALL_PACKAGES_FROM_CONTEXT`` | ``false`` | If set to true, Airflow, providers and |
| | | all dependencies are installed from |
| | | from locally built/downloaded |
| | | .whl and .tar.gz files placed in the |
| | | ``docker-context-files``. |
+------------------------------------+------------------------------------------+------------------------------------------+
Pre-caching PIP dependencies
............................
When image is build from PIP, by default pre-caching of PIP dependencies is used. This is in order to speed-up incremental
builds during development. When pre-cached PIP dependencies are used and ``setup.py`` or ``setup.cfg`` changes, the
PIP dependencies are already pre-installed, thus resulting in much faster image rebuild. This is purely an optimization
of time needed to build the images and should be disabled if you want to install Airflow from
Docker context files.
+------------------------------------------+------------------------------------------+------------------------------------------+
| Build argument | Default value | Description |
+==========================================+==========================================+==========================================+
| ``AIRFLOW_BRANCH`` | ``main`` | the branch from which PIP dependencies |
| | | are pre-installed initially. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_REPO`` | ``apache/airflow`` | the repository from which PIP |
| | | dependencies are pre-installed. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| ``AIRFLOW_PRE_CACHED_PIP_PACKAGES`` | ``false`` | Allows to pre-cache airflow PIP packages |
| | | from the GitHub of Apache Airflow |
| | | This allows to optimize iterations for |
| | | Image builds and speeds up CI builds. |
+------------------------------------------+------------------------------------------+------------------------------------------+
| {
"content_hash": "f88e4aa5054c3b2efbd85f85f9e40946",
"timestamp": "",
"source": "github",
"line_count": 272,
"max_line_length": 133,
"avg_line_length": 94.30514705882354,
"alnum_prop": 0.2834977193871584,
"repo_name": "apache/airflow",
"id": "e37e6f29b9ad6297040c0b088f26c59e0039b152",
"size": "25651",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "docs/docker-stack/build-arg-ref.rst",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "25980"
},
{
"name": "Dockerfile",
"bytes": "71458"
},
{
"name": "HCL",
"bytes": "3786"
},
{
"name": "HTML",
"bytes": "172957"
},
{
"name": "JavaScript",
"bytes": "143915"
},
{
"name": "Jinja",
"bytes": "38911"
},
{
"name": "Jupyter Notebook",
"bytes": "5482"
},
{
"name": "Mako",
"bytes": "1339"
},
{
"name": "Python",
"bytes": "23697738"
},
{
"name": "R",
"bytes": "313"
},
{
"name": "Shell",
"bytes": "211306"
},
{
"name": "TypeScript",
"bytes": "521019"
}
],
"symlink_target": ""
} |
class InfinityType:
def __repr__(self) -> str:
return "Infinity"
def __hash__(self) -> int:
return hash(repr(self))
def __lt__(self, other: object) -> bool:
return False
def __le__(self, other: object) -> bool:
return False
def __eq__(self, other: object) -> bool:
return isinstance(other, self.__class__)
def __ne__(self, other: object) -> bool:
return not isinstance(other, self.__class__)
def __gt__(self, other: object) -> bool:
return True
def __ge__(self, other: object) -> bool:
return True
def __neg__(self: object) -> "NegativeInfinityType":
return NegativeInfinity
Infinity = InfinityType()
class NegativeInfinityType:
def __repr__(self) -> str:
return "-Infinity"
def __hash__(self) -> int:
return hash(repr(self))
def __lt__(self, other: object) -> bool:
return True
def __le__(self, other: object) -> bool:
return True
def __eq__(self, other: object) -> bool:
return isinstance(other, self.__class__)
def __ne__(self, other: object) -> bool:
return not isinstance(other, self.__class__)
def __gt__(self, other: object) -> bool:
return False
def __ge__(self, other: object) -> bool:
return False
def __neg__(self: object) -> InfinityType:
return Infinity
NegativeInfinity = NegativeInfinityType()
| {
"content_hash": "7c3b0a1b879005ca6efd1b8a133fb071",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 56,
"avg_line_length": 23.338709677419356,
"alnum_prop": 0.5639253628196268,
"repo_name": "martbhell/wasthereannhlgamelastnight",
"id": "951549753afa255148c7c60d868303963f8c1813",
"size": "1629",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "src/lib/setuptools/_vendor/packaging/_structures.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "730"
},
{
"name": "HTML",
"bytes": "8959"
},
{
"name": "JavaScript",
"bytes": "3318"
},
{
"name": "Python",
"bytes": "5989638"
}
],
"symlink_target": ""
} |
package com.netflix.spinnaker.credentials;
public class NoopCredentialsLifecycleHandler<T extends Credentials>
implements CredentialsLifecycleHandler<T> {
@Override
public void credentialsAdded(T credentials) {}
@Override
public void credentialsUpdated(T credentials) {}
@Override
public void credentialsDeleted(T credentials) {}
}
| {
"content_hash": "ffd12091312041952a6e08495677281d",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 67,
"avg_line_length": 23.533333333333335,
"alnum_prop": 0.7875354107648725,
"repo_name": "cfieber/kork",
"id": "7c0e6cd284071e94c0c8b7e44faac2e383f2d0ad",
"size": "943",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "kork-credentials-api/src/main/java/com/netflix/spinnaker/credentials/NoopCredentialsLifecycleHandler.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "118587"
},
{
"name": "HTML",
"bytes": "394"
},
{
"name": "Java",
"bytes": "871336"
},
{
"name": "JavaScript",
"bytes": "595"
},
{
"name": "Kotlin",
"bytes": "337241"
},
{
"name": "Shell",
"bytes": "3329"
}
],
"symlink_target": ""
} |
// Must remain the last #elif since some other vendors (Metrowerks, for
// example) also #define _MSC_VER
# if !defined(_CPPUNWIND)
# define BOOST_QVM_NO_EXCEPTIONS
# endif
# endif
# endif
////////////////////////////////////////
# ifdef BOOST_NORETURN
# define BOOST_QVM_NORETURN BOOST_NORETURN
# else
# if defined(_MSC_VER)
# define BOOST_QVM_NORETURN __declspec(noreturn)
# elif defined(__GNUC__)
# define BOOST_QVM_NORETURN __attribute__ ((__noreturn__))
# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
# if __has_attribute(noreturn)
# define BOOST_QVM_NORETURN [[noreturn]]
# endif
# elif defined(__has_cpp_attribute)
# if __has_cpp_attribute(noreturn)
# define BOOST_QVM_NORETURN [[noreturn]]
# endif
# endif
# endif
# if !defined(BOOST_QVM_NORETURN)
# define BOOST_QVM_NORETURN
# endif
////////////////////////////////////////
# ifdef BOOST_QVM_NO_EXCEPTIONS
namespace boost
{
BOOST_QVM_NORETURN void throw_exception( std::exception const & ); // user defined
}
namespace boost { namespace qvm {
template <class T>
BOOST_QVM_NORETURN void throw_exception( T const & e )
{
::boost::throw_exception(e);
}
} }
# else
namespace boost { namespace qvm {
template <class T>
BOOST_QVM_NORETURN void throw_exception( T const & e )
{
throw e;
}
} }
# endif
#endif
| {
"content_hash": "1b2d10540f16c1b3387b5f98cfaf6267",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 86,
"avg_line_length": 22.439393939393938,
"alnum_prop": 0.5813639432815665,
"repo_name": "davehorton/drachtio-server",
"id": "422bcef554dfa10a6c1b4597ee9d52106da5c038",
"size": "3448",
"binary": false,
"copies": "7",
"ref": "refs/heads/main",
"path": "deps/boost_1_77_0/boost/qvm/throw_exception.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "662596"
},
{
"name": "Dockerfile",
"bytes": "1330"
},
{
"name": "JavaScript",
"bytes": "60639"
},
{
"name": "M4",
"bytes": "35273"
},
{
"name": "Makefile",
"bytes": "5960"
},
{
"name": "Shell",
"bytes": "47298"
}
],
"symlink_target": ""
} |
<p id="razoumov_alex" data-toggle="tooltip" title="<img src='{{site.filesurl}}/people/razoumov_alex.jpg' alt='Alex Razoumov' />">
<span class="person">Alex Razoumov</span> earned his PhD in
computational astrophysics from the University of British
Columbia. He has worked on numerical models ranging from galaxy
formation to core-collapse supernovae and stellar hydrodynamics,
and has developed a number of computational fluid dynamics and
radiative transfer codes and techniques. He spent five years as
HPC Analyst in SHARCNET helping researchers use large clusters,
and more recently joined WestGrid as visualization specialist.
Alex lives in Vancouver, British Columbia.
</p>
| {
"content_hash": "ebaeb44eacd2b1602a387a9bfabcc8f8",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 129,
"avg_line_length": 65,
"alnum_prop": 0.7636363636363637,
"repo_name": "rgaiacs/swc-website",
"id": "257200fe93a37bf346a1a50c96ac4e6542634e0a",
"size": "715",
"binary": false,
"copies": "5",
"ref": "refs/heads/gh-pages",
"path": "_includes/people/razoumov_alex.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "365408"
},
{
"name": "HTML",
"bytes": "5925388"
},
{
"name": "JavaScript",
"bytes": "303974"
},
{
"name": "Jupyter Notebook",
"bytes": "209372"
},
{
"name": "Makefile",
"bytes": "2703"
},
{
"name": "Python",
"bytes": "21312"
},
{
"name": "Ruby",
"bytes": "98"
},
{
"name": "Shell",
"bytes": "1729"
},
{
"name": "TeX",
"bytes": "41043"
},
{
"name": "XSLT",
"bytes": "5034"
}
],
"symlink_target": ""
} |
package com.voxeo.moho.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.log4j.Logger;
import com.voxeo.moho.Participant;
public class JoinLockService {
private static final Logger LOG = Logger.getLogger(JoinLockService.class);
private static JoinLockService INSTANCE = new JoinLockService();
protected final Map<String, LockImpl> _m = new HashMap<String, LockImpl>();
public static JoinLockService getInstance() {
return INSTANCE;
}
public synchronized Lock get(final Participant part, final Participant other) {
final List<String> ids1 = new ArrayList<String>();
ids1.add(part.getId());
Participant[] joinees = part.getParticipants();
if (joinees != null && joinees.length > 0) {
for (Participant p : joinees) {
ids1.add(p.getId());
}
}
if (other != null) {
ids1.add(other.getId());
joinees = other.getParticipants();
if (joinees != null && joinees.length > 0) {
for (Participant p : joinees) {
ids1.add(p.getId());
}
}
}
final List<String> ids2 = new ArrayList<String>();
ids2.add(part.getId());
if (other != null) {
ids2.add(other.getId());
}
return get(ids1, ids2);
}
public synchronized Lock get(final Participant part) {
return get(part, null);
}
protected synchronized Lock get(final List<String> ids1, final List<String> ids2) {
Lock retval = null;
// find the lock
for (final String id : ids1) {
if (_m.containsKey(id)) {
retval = _m.get(id).getLock();
break;
}
}
// increase the lock counter
LockImpl lock;
for (final String id : ids2) {
lock = _m.get(id);
if (lock == null) {
if (retval == null) {
lock = new LockImpl();
retval = lock.getLock();
}
else {
lock = new LockImpl(retval);
}
_m.put(id, lock);
if (LOG.isDebugEnabled()) {
LOG.debug("Added [" + id + ", " + lock + "]");
}
}
else {
lock.getCounter().incrementAndGet();
if (LOG.isDebugEnabled()) {
LOG.debug("Updated [" + id + ", " + lock + "]");
}
}
}
return retval;
}
public synchronized void remove(final String id) {
// find the lock
LockImpl lock = _m.get(id);
// decrease the lock counter
if (lock != null && lock.getCounter().decrementAndGet() < 1) {
_m.remove(id);
if (LOG.isDebugEnabled()) {
LOG.debug("Removed [" + id + ", " + lock + "]");
}
}
}
protected class LockImpl {
private final Lock _lock;
private final AtomicInteger _counter;
public LockImpl() {
_lock = new ReentrantLock();
_counter = new AtomicInteger(1);
}
public LockImpl(final Lock lock) {
_lock = lock;
_counter = new AtomicInteger(1);
}
public Lock getLock() {
return _lock;
}
public AtomicInteger getCounter() {
return _counter;
}
@Override
public String toString() {
return _lock.toString() + "[" + _counter + "]";
}
}
}
| {
"content_hash": "763728eca66e839e4d143905f269dcaf",
"timestamp": "",
"source": "github",
"line_count": 141,
"max_line_length": 85,
"avg_line_length": 23.652482269503547,
"alnum_prop": 0.5820089955022488,
"repo_name": "voxeolabs/moho",
"id": "aba23dc7f62f4a0ec18a38ea36ae25bc9728ee94",
"size": "3335",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "moho-impl/src/main/java/com/voxeo/moho/util/JoinLockService.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "1270"
},
{
"name": "Java",
"bytes": "2322443"
}
],
"symlink_target": ""
} |
.class Landroid/webkit/WebViewClassic$FocusNodeHref;
.super Ljava/lang/Object;
.source "WebViewClassic.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroid/webkit/WebViewClassic;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "FocusNodeHref"
.end annotation
# static fields
.field static final SRC:Ljava/lang/String; = "src"
.field static final TITLE:Ljava/lang/String; = "title"
.field static final URL:Ljava/lang/String; = "url"
# direct methods
.method constructor <init>()V
.locals 0
.prologue
.line 1274
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
| {
"content_hash": "e1f4b2f9322c43560a200a093ebb3af0",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 54,
"avg_line_length": 20.823529411764707,
"alnum_prop": 0.7330508474576272,
"repo_name": "baidurom/devices-Coolpad8720L",
"id": "4d95745ac3b67dbb69b42859b7d7aa0f1a9a606e",
"size": "708",
"binary": false,
"copies": "2",
"ref": "refs/heads/coron-4.3",
"path": "framework.jar.out/smali/android/webkit/WebViewClassic$FocusNodeHref.smali",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Makefile",
"bytes": "13619"
},
{
"name": "Shell",
"bytes": "1917"
}
],
"symlink_target": ""
} |
package org.kie.workbench.common.stunner.bpmn.definition.property.simulation;
import org.jboss.errai.common.client.api.annotations.Portable;
import org.jboss.errai.databinding.client.api.Bindable;
import org.kie.workbench.common.forms.adf.definitions.annotations.metaModel.FieldDefinition;
import org.kie.workbench.common.forms.adf.definitions.annotations.metaModel.FieldValue;
import org.kie.workbench.common.forms.adf.definitions.annotations.metaModel.I18nMode;
import org.kie.workbench.common.stunner.bpmn.definition.BPMNProperty;
import org.kie.workbench.common.stunner.core.definition.annotation.Property;
import org.kie.workbench.common.stunner.core.definition.annotation.property.Value;
@Portable
@Bindable
@Property
@FieldDefinition(i18nMode = I18nMode.OVERRIDE_I18N_KEY)
public class Quantity implements BPMNProperty {
@Value
@FieldValue
private Double value;
public Quantity() {
this(0d);
}
public Quantity(final Double value) {
this.value = value;
}
public Double getValue() {
return value;
}
public void setValue(final Double value) {
this.value = value;
}
@Override
public int hashCode() {
return (null != value) ? value.hashCode() : 0;
}
@Override
public boolean equals(Object o) {
if (o instanceof Quantity) {
Quantity other = (Quantity) o;
return (null != value) ? value.equals(other.value) : null == other.value;
}
return false;
}
}
| {
"content_hash": "5420e4866ccec849077db43ef63076c5",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 92,
"avg_line_length": 28.62264150943396,
"alnum_prop": 0.7079762689518787,
"repo_name": "jhrcek/kie-wb-common",
"id": "08a807b03d1fa75a9fce1f2bc07c802f32b67376",
"size": "2136",
"binary": false,
"copies": "12",
"ref": "refs/heads/master",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-api/src/main/java/org/kie/workbench/common/stunner/bpmn/definition/property/simulation/Quantity.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2591"
},
{
"name": "CSS",
"bytes": "115195"
},
{
"name": "Dockerfile",
"bytes": "210"
},
{
"name": "FreeMarker",
"bytes": "36496"
},
{
"name": "GAP",
"bytes": "86275"
},
{
"name": "HTML",
"bytes": "331778"
},
{
"name": "Java",
"bytes": "38263821"
},
{
"name": "JavaScript",
"bytes": "20277"
},
{
"name": "Shell",
"bytes": "905"
},
{
"name": "Visual Basic",
"bytes": "84832"
}
],
"symlink_target": ""
} |
<!--
@license Apache-2.0
Copyright (c) 2018 The Stdlib Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# quarterOfYear
> Determine the quarter of the year.
<section class="usage">
## Usage
```javascript
var quarterOfYear = require( '@stdlib/time/quarter-of-year' );
```
#### quarterOfYear( \[month] )
Returns the quarter of the year.
```javascript
var q = quarterOfYear();
// returns <number>
```
By default, the function returns the quarter of the year for the current month in the current year (according to local time). To determine the quarter for a particular month, provide either a month or a [`Date`][date-object] object.
```javascript
var q = quarterOfYear( new Date() );
// returns <number>
q = quarterOfYear( 4 );
// returns 2
```
A `month` may be either a month's integer value, three letter abbreviation, or full name (case insensitive).
```javascript
var q = quarterOfYear( 4 );
// returns 2
q = quarterOfYear( 'April' );
// returns 2
q = quarterOfYear( 'apr' );
// returns 2
```
</section>
<!-- /.usage -->
<section class="examples">
## Examples
<!-- eslint no-undef: "error" -->
```javascript
var quarterOfYear = require( '@stdlib/time/quarter-of-year' );
var months;
var q;
var i;
months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
for ( i = 0; i < months.length; i++ ) {
q = quarterOfYear( months[ i ] );
console.log( 'The month of %s is in Q%d.', months[ i ], q );
}
```
</section>
<!-- /.examples -->
* * *
<section class="cli">
## CLI
<section class="usage">
### Usage
```text
Usage: quarter-of-year [options] [month]
Options:
-h, --help Print this message.
-V, --version Print the package version.
```
</section>
<!-- /.usage -->
<section class="examples">
### Examples
```bash
$ quarter-of-year
<number>
```
For a specific month,
```bash
$ quarter-of-year 4
2
```
</section>
<!-- /.examples -->
</section>
<!-- /.cli -->
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
<section class="related">
* * *
## See Also
- <span class="package-name">[`@stdlib/time/day-of-year`][@stdlib/time/day-of-year]</span><span class="delimiter">: </span><span class="description">determine the day of the year.</span>
</section>
<!-- /.related -->
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
<section class="links">
[date-object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
<!-- <related-links> -->
[@stdlib/time/day-of-year]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/time/day-of-year
<!-- </related-links> -->
</section>
<!-- /.links -->
| {
"content_hash": "c620bf34f76b4c82b9b16a17dcfc3667",
"timestamp": "",
"source": "github",
"line_count": 182,
"max_line_length": 232,
"avg_line_length": 18.74175824175824,
"alnum_prop": 0.6528877162122545,
"repo_name": "stdlib-js/stdlib",
"id": "638fd515501951893482363fdcacb8fb7300fe74",
"size": "3411",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "lib/node_modules/@stdlib/time/quarter-of-year/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Awk",
"bytes": "21739"
},
{
"name": "C",
"bytes": "15336495"
},
{
"name": "C++",
"bytes": "1349482"
},
{
"name": "CSS",
"bytes": "58039"
},
{
"name": "Fortran",
"bytes": "198059"
},
{
"name": "HTML",
"bytes": "56181"
},
{
"name": "Handlebars",
"bytes": "16114"
},
{
"name": "JavaScript",
"bytes": "85975525"
},
{
"name": "Julia",
"bytes": "1508654"
},
{
"name": "Makefile",
"bytes": "4806816"
},
{
"name": "Python",
"bytes": "3343697"
},
{
"name": "R",
"bytes": "576612"
},
{
"name": "Shell",
"bytes": "559315"
},
{
"name": "TypeScript",
"bytes": "19309407"
},
{
"name": "WebAssembly",
"bytes": "5980"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<ldswebml type="image" uri="/media-library/images/beliefs-practices#tithing-607694" xml:lang="eng" locale="eng" status="publish">
<search-meta>
<uri-title its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">tithing-607694</uri-title>
<source>tithing-607694</source>
<publication-type its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">image</publication-type>
<media-type its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">image</media-type>
<publication value="ldsorg">LDS.org</publication>
<publication-date value="2012-04-09">2012-04-09</publication-date>
<title/>
<description/>
<collections>
<collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">global-search</collection>
<collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">media</collection>
<collection its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">images</collection>
</collections>
<subjects>
<subject>Hands</subject>
<subject>Tithing</subject>
<subject>Envelope</subject>
<subject>Tithing Slip</subject>
<subject>Writing</subject>
<subject>obedience</subject>
</subjects>
</search-meta>
<no-search>
<path>http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-gallery.jpg</path>
<images>
<small its:translate="no" xmlns:its="http://www.w3.org/2005/11/its">http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-thumbnail.jpg</small>
</images>
<download-urls>
<download-url>
<label>Mobile</label>
<size>107 KB</size>
<path>http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-mobile.jpg</path>
</download-url>
<download-url>
<label>Tablet</label>
<size>149 KB</size>
<path>http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-tablet.jpg</path>
</download-url>
<download-url>
<label>Print</label>
<size>321 KB</size>
<path>http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-print.jpg</path>
</download-url>
<download-url>
<label>Wallpaper</label>
<size>528 KB</size>
<path>http://media.ldscdn.org/images/media-library/beliefs-practices/tithing-607694-wallpaper.jpg</path>
</download-url>
</download-urls>
</no-search>
<ldse-meta its:translate="no" xmlns="http://lds.org/code/lds-edit" xmlns:its="http://www.w3.org/2005/11/its"><document id="tithing-607694" locale="eng" uri="/media-library/images/beliefs-practices#tithing-607694" status="publish" site="ldsorg" source="chq" words="112" tgp="0.3916"/><created username="lds-edit" userid=""/><last-modified date="2012-05-10T12:26:23.573084-06:00" username="lds-edit" userid=""/></ldse-meta></ldswebml>
| {
"content_hash": "301f9e55d629077934c9dd946ce7d6da",
"timestamp": "",
"source": "github",
"line_count": 54,
"max_line_length": 432,
"avg_line_length": 59.2962962962963,
"alnum_prop": 0.6199250468457215,
"repo_name": "freshie/ml-taxonomies",
"id": "b92b890646087fc88115494dd5ace2bd1e47c339",
"size": "3202",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "roxy/data/gospel-topical-explorer-v2/content/images/tithing-607694.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4422"
},
{
"name": "CSS",
"bytes": "38665"
},
{
"name": "HTML",
"bytes": "356"
},
{
"name": "JavaScript",
"bytes": "411651"
},
{
"name": "Ruby",
"bytes": "259121"
},
{
"name": "Shell",
"bytes": "7329"
},
{
"name": "XQuery",
"bytes": "857170"
},
{
"name": "XSLT",
"bytes": "13753"
}
],
"symlink_target": ""
} |
using System;
namespace CQRSPipeline.Framework
{
public class CommandDispatcherBehavior : PipelinedBehavior
{
public CommandDispatcherBehavior(CommandModuleCatalog commandModuleCatalog)
{
this.commandModuleCatalog = commandModuleCatalog;
}
private readonly CommandModuleCatalog commandModuleCatalog;
public override void Invoke(CommandContext context, Action<CommandContext> next)
{
var dispatcher = commandModuleCatalog.GetDispatcher(context.CommandType);
dispatcher.Execute(context);
next(context); // it's best practice to call next, even though this is likely the most inner behavior to execute
}
}
}
| {
"content_hash": "7e132fb7f4b4ece6fe35b12280275324",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 124,
"avg_line_length": 34,
"alnum_prop": 0.679144385026738,
"repo_name": "jdaigle/CQRSPipelineDemo",
"id": "6ef8e1ee838d4606d14ae6510129e5b7490394c1",
"size": "750",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "CQRSPipeline.Framework/CommandDispatcherBehavior.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "341061"
}
],
"symlink_target": ""
} |
!/usr/bin/env python
import smtplib
import json
from pprint import pprint
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Send a text message notifying them of a new song by artist (based on their choices)
# This opens json file containing needed values
# TODO: investigate IMAP
# TODO: Create subscription to avoid spam filter
# TODO: Put html in separate file (make it look nice)
# TODO: Rename this file
# TODO: concat multiple new artists in 1 text
def main():
'''In the future, this could read the correct user from a file and depending and select the
correct message to send as well'''
message = "Got.... Heem"
# message = "Testing email"
subject = "plain"
person = "Eric Krause"
# full_message = make_email_message(person, subject, message)
#send_message(person, full_message, 'email')
send_message(person, message, 'text')
def make_new_song_text(artist, song_id):
'''Creates the message based off the artist and song_id, which are pulled from youtube-dl.'''
return "New song '%s' by '%s' was uploaded today" % (song_id, artist)
def make_email_message(person, subject, message):
''' Constructs email from given information (generic method). Pass string of person's name.'''
json_data=open('privates.json')
data = json.load(json_data)
json_data.close()
full_msg = MIMEMultipart('alternative')
# plaintext version of message
full_msg['Subject'] = '%s' %subject
full_msg['From'] = '%s' % data['credentials']['username']
#data['credentials']['username']
full_msg['To'] = '%s' % data['phonebook'][person][1]
text = "%s" % message
# html version of message
html = """
<html>
<head></head>
<body>
<p> Totally different now<br>
Here's more info. Yep.
</p>
</body>
</html>
"""
# This reads in html file
# f = open("subscribe_msg.html")
# html = f.read()
# f.close()
# Record the MIME types of both parts - text/plain and text/html.
part1 = MIMEText(text, 'plain')
part2 = MIMEText(html, 'html')
full_msg.attach(part1)
full_msg.attach(part2)
return full_msg.as_string()
def send_message(person, message, service):
'''Sends message to any person in our phonebook. Service selects which technology is used
(text or email). '''
# open phonebook info
json_data=open('privates.json')
data = json.load(json_data)
json_data.close()
server = smtplib.SMTP('smtp.gmail.com',587)
#select correct list index to get correct email or text address
if (service == 'text' or service == 'Text'):
s = 0
elif (service == 'email' or service == 'Email'):
s = 1
else:
print ("Incorrect service option selected. Please enter 'text' or 'email'")
try:
server.starttls()
server.login(data['credentials']['username'],data['credentials']['password'])
server.sendmail(data['credentials']['username'], data['phonebook'][person][s],message)
except:
print "Could not send message"
finally:
server.quit()
| {
"content_hash": "0741d369548a053616315d13c77972a7",
"timestamp": "",
"source": "github",
"line_count": 92,
"max_line_length": 100,
"avg_line_length": 34.391304347826086,
"alnum_prop": 0.6390644753476612,
"repo_name": "ekrause/splatfilch",
"id": "78433444bb463bd81f56a126a32b1c0474dec693",
"size": "3164",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/text_notify.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "27071"
},
{
"name": "Shell",
"bytes": "96"
}
],
"symlink_target": ""
} |
Takes an OCI image locator and an output directory and converts the layers that
make up the image into a series of VHDs in the output directory. One VHD will
be created per image layer.
VHDs are named with the name of the layer SHA.
Each layer contains
[dm-verity](https://www.kernel.org/doc/html/latest/admin-guide/device-mapper/verity.html)
information that can be used to ensure the integrity of the created ext4
filesystem. All VHDs have a layout of:
- ext4 filesystem
- dm-verity superblock
- dm-verity merkle tree
- VHD footer
The output is deterministic except for the UUIDs embedded in the VHD footer and
the dm-verity superblock. Both UUIDs are currently seeded using a random number
generator.
## Example usage
Create VHDs:
```bash
dmverity-vhd create -i alpine:3.12 -o alpine_3_12_layers
```
Compute root hashes:
```bash
dmverity-vhd roothash -i alpine:3.12
```
| {
"content_hash": "574c667f7bfc5cb640134371748180eb",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 89,
"avg_line_length": 28.387096774193548,
"alnum_prop": 0.7738636363636363,
"repo_name": "Microsoft/hcsshim",
"id": "757cf93f9cdac46e5344734f072c0b785018afcb",
"size": "896",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cmd/dmverity-vhd/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "1156317"
},
{
"name": "PowerShell",
"bytes": "3735"
}
],
"symlink_target": ""
} |
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Auto-save functionality for during quiz attempts.
*
* @module moodle-mod_quiz-autosave
*/
/**
* Auto-save functionality for during quiz attempts.
*
* @class M.mod_quiz.autosave
*/
M.mod_quiz = M.mod_quiz || {};
M.mod_quiz.autosave = {
/**
* The amount of time (in milliseconds) to wait between TinyMCE detections.
*
* @property TINYMCE_DETECTION_DELAY
* @type Number
* @default 500
* @private
*/
TINYMCE_DETECTION_DELAY: 500,
/**
* The number of times to try redetecting TinyMCE.
*
* @property TINYMCE_DETECTION_REPEATS
* @type Number
* @default 20
* @private
*/
TINYMCE_DETECTION_REPEATS: 20,
/**
* The delay (in milliseconds) between checking hidden input fields.
*
* @property WATCH_HIDDEN_DELAY
* @type Number
* @default 1000
* @private
*/
WATCH_HIDDEN_DELAY: 1000,
/**
* The number of failures to ignore before notifying the user.
*
* @property FAILURES_BEFORE_NOTIFY
* @type Number
* @default 1
* @private
*/
FAILURES_BEFORE_NOTIFY: 1,
/**
* The value to use when resetting the successful save counter.
*
* @property FIRST_SUCCESSFUL_SAVE
* @static
* @type Number
* @default -1
* @private
*/
FIRST_SUCCESSFUL_SAVE: -1,
/**
* The selectors used throughout this class.
*
* @property SELECTORS
* @private
* @type Object
* @static
*/
SELECTORS: {
QUIZ_FORM: '#responseform',
VALUE_CHANGE_ELEMENTS: 'input, textarea, [contenteditable="true"]',
CHANGE_ELEMENTS: 'input, select',
HIDDEN_INPUTS: 'input[type=hidden]',
CONNECTION_ERROR: '#connection-error',
CONNECTION_OK: '#connection-ok'
},
/**
* The script which handles the autosaves.
*
* @property AUTOSAVE_HANDLER
* @type String
* @default M.cfg.wwwroot + '/mod/quiz/autosave.ajax.php'
* @private
*/
AUTOSAVE_HANDLER: M.cfg.wwwroot + '/mod/quiz/autosave.ajax.php',
/**
* The delay (in milliseconds) between a change being made, and it being auto-saved.
*
* @property delay
* @type Number
* @default 120000
* @private
*/
delay: 120000,
/**
* A Node reference to the form we are monitoring.
*
* @property form
* @type Node
* @default null
*/
form: null,
/**
* Whether the form has been modified since the last save started.
*
* @property dirty
* @type boolean
* @default false
*/
dirty: false,
/**
* Timer object for the delay between form modifaction and the save starting.
*
* @property delay_timer
* @type Object
* @default null
* @private
*/
delay_timer: null,
/**
* Y.io transaction for the save ajax request.
*
* @property save_transaction
* @type object
* @default null
*/
save_transaction: null,
/**
* Failed saves count.
*
* @property savefailures
* @type Number
* @default 0
* @private
*/
savefailures: 0,
/**
* Properly bound key change handler.
*
* @property editor_change_handler
* @type EventHandle
* @default null
* @private
*/
editor_change_handler: null,
/**
* Record of the value of all the hidden fields, last time they were checked.
*
* @property hidden_field_values
* @type Object
* @default {}
*/
hidden_field_values: {},
/**
* Initialise the autosave code.
*
* @method init
* @param {Number} delay the delay, in seconds, between a change being detected, and
* a save happening.
*/
init: function(delay) {
this.form = Y.one(this.SELECTORS.QUIZ_FORM);
if (!this.form) {
Y.log('No response form found. Why did you try to set up autosave?', 'debug', 'moodle-mod_quiz-autosave');
return;
}
this.delay = delay * 1000;
this.form.delegate('valuechange', this.value_changed, this.SELECTORS.VALUE_CHANGE_ELEMENTS, this);
this.form.delegate('change', this.value_changed, this.SELECTORS.CHANGE_ELEMENTS, this);
this.form.on('submit', this.stop_autosaving, this);
this.init_tinymce(this.TINYMCE_DETECTION_REPEATS);
this.save_hidden_field_values();
this.watch_hidden_fields();
},
save_hidden_field_values: function() {
this.form.all(this.SELECTORS.HIDDEN_INPUTS).each(function(hidden) {
var name = hidden.get('name');
if (!name) {
return;
}
this.hidden_field_values[name] = hidden.get('value');
}, this);
},
watch_hidden_fields: function() {
this.detect_hidden_field_changes();
Y.later(this.WATCH_HIDDEN_DELAY, this, this.watch_hidden_fields);
},
detect_hidden_field_changes: function() {
this.form.all(this.SELECTORS.HIDDEN_INPUTS).each(function(hidden) {
var name = hidden.get('name'),
value = hidden.get('value');
if (!name) {
return;
}
if (!(name in this.hidden_field_values) || value !== this.hidden_field_values[name]) {
this.hidden_field_values[name] = value;
this.value_changed({target: hidden});
}
}, this);
},
/**
* Initialise watching of TinyMCE specifically.
*
* Because TinyMCE might load slowly, and after us, we need to keep
* trying, until we detect TinyMCE is there, or enough time has passed.
* This is based on the TINYMCE_DETECTION_DELAY and
* TINYMCE_DETECTION_REPEATS properties.
*
*
* @method init_tinymce
* @param {Number} repeatcount The number of attempts made so far.
*/
init_tinymce: function(repeatcount) {
if (typeof window.tinyMCE === 'undefined') {
if (repeatcount > 0) {
Y.later(this.TINYMCE_DETECTION_DELAY, this, this.init_tinymce, [repeatcount - 1]);
} else {
Y.log('Gave up looking for TinyMCE.', 'debug', 'moodle-mod_quiz-autosave');
}
return;
}
Y.log('Found TinyMCE.', 'debug', 'moodle-mod_quiz-autosave');
this.editor_change_handler = Y.bind(this.editor_changed, this);
window.tinyMCE.onAddEditor.add(Y.bind(this.init_tinymce_editor, this));
},
/**
* Initialise watching of a specific TinyMCE editor.
*
* @method init_tinymce_editor
* @param {EventFacade} e
* @param {Object} editor The TinyMCE editor object
*/
init_tinymce_editor: function(e, editor) {
Y.log('Found TinyMCE editor ' + editor.id + '.', 'debug', 'moodle-mod_quiz-autosave');
editor.onChange.add(this.editor_change_handler);
editor.onRedo.add(this.editor_change_handler);
editor.onUndo.add(this.editor_change_handler);
editor.onKeyDown.add(this.editor_change_handler);
},
value_changed: function(e) {
var name = e.target.getAttribute('name');
if (name === 'thispage' || name === 'scrollpos' || (name && name.match(/_:flagged$/))) {
return; // Not interesting.
}
// Fallback to the ID when the name is not present (in the case of content editable).
name = name || '#' + e.target.getAttribute('id');
Y.log('Detected a value change in element ' + name + '.', 'debug', 'moodle-mod_quiz-autosave');
this.start_save_timer_if_necessary();
},
editor_changed: function(editor) {
Y.log('Detected a value change in editor ' + editor.id + '.', 'debug', 'moodle-mod_quiz-autosave');
this.start_save_timer_if_necessary();
},
start_save_timer_if_necessary: function() {
this.dirty = true;
if (this.delay_timer || this.save_transaction) {
// Already counting down or daving.
return;
}
this.start_save_timer();
},
start_save_timer: function() {
this.cancel_delay();
this.delay_timer = Y.later(this.delay, this, this.save_changes);
},
cancel_delay: function() {
if (this.delay_timer && this.delay_timer !== true) {
this.delay_timer.cancel();
}
this.delay_timer = null;
},
save_changes: function() {
this.cancel_delay();
this.dirty = false;
if (this.is_time_nearly_over()) {
Y.log('No more saving, time is nearly over.', 'debug', 'moodle-mod_quiz-autosave');
this.stop_autosaving();
return;
}
Y.log('Doing a save.', 'debug', 'moodle-mod_quiz-autosave');
if (typeof window.tinyMCE !== 'undefined') {
window.tinyMCE.triggerSave();
}
this.save_transaction = Y.io(this.AUTOSAVE_HANDLER, {
method: 'POST',
form: {id: this.form},
on: {
success: this.save_done,
failure: this.save_failed
},
context: this
});
},
save_done: function(transactionid, response) {
if (response.responseText !== 'OK') {
// Because IIS is useless, Moodle can't send proper HTTP response
// codes, so we have to detect failures manually.
this.save_failed(transactionid, response);
return;
}
Y.log('Save completed.', 'debug', 'moodle-mod_quiz-autosave');
this.save_transaction = null;
if (this.dirty) {
Y.log('Dirty after save.', 'debug', 'moodle-mod_quiz-autosave');
this.start_save_timer();
}
if (this.savefailures > 0) {
Y.one(this.SELECTORS.CONNECTION_ERROR).hide();
Y.one(this.SELECTORS.CONNECTION_OK).show();
this.savefailures = this.FIRST_SUCCESSFUL_SAVE;
} else if (this.savefailures === this.FIRST_SUCCESSFUL_SAVE) {
Y.one(this.SELECTORS.CONNECTION_OK).hide();
this.savefailures = 0;
}
},
save_failed: function() {
Y.log('Save failed.', 'debug', 'moodle-mod_quiz-autosave');
this.save_transaction = null;
// We want to retry soon.
this.start_save_timer();
this.savefailures = Math.max(1, this.savefailures + 1);
if (this.savefailures === this.FAILURES_BEFORE_NOTIFY) {
Y.one(this.SELECTORS.CONNECTION_ERROR).show();
Y.one(this.SELECTORS.CONNECTION_OK).hide();
}
},
is_time_nearly_over: function() {
return M.mod_quiz.timer && M.mod_quiz.timer.endtime &&
(new Date().getTime() + 2 * this.delay) > M.mod_quiz.timer.endtime;
},
stop_autosaving: function() {
this.cancel_delay();
this.delay_timer = true;
if (this.save_transaction) {
this.save_transaction.abort();
}
}
};
| {
"content_hash": "8a7d50b714185ac427099e0a6df7e3be",
"timestamp": "",
"source": "github",
"line_count": 399,
"max_line_length": 118,
"avg_line_length": 29.55388471177945,
"alnum_prop": 0.5708955223880597,
"repo_name": "aymswick/chimehack-teacher",
"id": "ec4669f74d44109943aaaf2d3ffcb764e1d0f2fa",
"size": "11792",
"binary": false,
"copies": "107",
"ref": "refs/heads/master",
"path": "mod/quiz/yui/src/autosave/js/autosave.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1581673"
},
{
"name": "Gherkin",
"bytes": "2630000"
},
{
"name": "HTML",
"bytes": "1191631"
},
{
"name": "JavaScript",
"bytes": "15235505"
},
{
"name": "PHP",
"bytes": "77874531"
},
{
"name": "PLSQL",
"bytes": "4867"
},
{
"name": "Perl",
"bytes": "20769"
},
{
"name": "XSLT",
"bytes": "33489"
}
],
"symlink_target": ""
} |
command line parsing support
| {
"content_hash": "64e80d9cb14aa018de730ff5131839f0",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 28,
"avg_line_length": 29,
"alnum_prop": 0.8620689655172413,
"repo_name": "rlittletht/TCore.CmdLine",
"id": "2b0938beef53032bf05309d5053af6bdc521f19c",
"size": "45",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "15027"
}
],
"symlink_target": ""
} |
package guizmo.tiles.utilM;
import java.awt.Rectangle;
import guizmo.tiles.HAlignmentType;
import guizmo.tiles.VAlignmentType;
public class RectangleUtil {
/**
* Indicates the absolute horizontal alignment of an element inside a container.
*
* In order to decide the alignment, the difference between the margins of both extremes must be assessed.
* Therefore, we compare the relative difference between the horizontal or vertical extremes
* to decide if they must have the same alignment or not, no matter the alignment of the children.
*
* Be aware that this method does not consider that some elements form a group and must be aligned in the same way.
* For example, if there are five elements in a row and the group is aligned to the left, but the rectangle which is
* being analysed is the rightmost, then it will be set to "CENTER" not to "LEFT".
*
* @param rect Rectangle to consider. The coordinates are relative to the container.
* @param container Container rectangle
* @param margin The percentage margin with regard to the container bounds which are used in the alignment comparisons
* @param marginDiff The percentage of the difference between margins so if the difference is less than this parameter
* then the element has to be aligned as CENTER or BOTH
*/
public static HAlignmentType getAbsHAlignment(Rectangle rect, Rectangle container, float margin, float marginDiff){
float leftMargin = (float)(rect.getMinX() - container.getMinX()) / (float)container.getWidth();
float rightMargin = (float)(container.getMaxX() - rect.getMaxX()) / (float)container.getWidth();
float hdiff = Math.abs(leftMargin - rightMargin);
int containerCenter = (int)container.getMinX() + Math.round((float)container.getWidth() / 2);
int rectCenter = (int)rect.getMinX() + Math.round((float)rect.getWidth() / 2);
float centerMargin = Math.abs(containerCenter - rectCenter) / (float)container.getWidth();
if (leftMargin <= margin && rightMargin <= margin)
return HAlignmentType.BOTH;
else if (leftMargin <= margin && hdiff > marginDiff)
return HAlignmentType.LEFT;
else if (rightMargin <= margin && hdiff > marginDiff)
return HAlignmentType.RIGHT;
else if ((leftMargin <= margin && hdiff <= marginDiff) || (rightMargin <= margin && hdiff <= marginDiff))
return HAlignmentType.BOTH;
else if (centerMargin <= margin)
return HAlignmentType.CENTER;
else
return HAlignmentType.NONE;
}
/**
* Indicates the absolute vertical alignment of an element inside a container.
*
* In order to decide the alignment, the difference between the margins of both extremes must be assessed.
* Therefore, we compare the relative difference between the horizontal or vertical extremes
* to decide if they must have the same alignment or not, no matter the alignment of the children.
*
* Be aware that this method does not consider that some elements form a group and must be aligned in the same way.
* For example, if there are five elements in a row and the group is aligned to the left, but the rectangle which is
* being analysed is the rightmost, then it will be set to "CENTER" not to "LEFT".
*
* @param rect Rectangle to consider. The coordinates are relative to the container.
* @param container Container rectangle
* @param margin The percentage margin with regard to the container bounds which are used in the alignment comparisons
* @param marginDiff The percentage of the difference between margins so if the difference is less than this parameter
* then the element has to be aligned as CENTER or BOTH
*/
public static VAlignmentType getAbsVAlignment(Rectangle rect, Rectangle container, float margin, float marginDiff){
float topMargin = (float)(rect.getMinY() - container.getMinY()) / (float)container.getHeight();
float bottomMargin = (float)(container.getMaxY() - rect.getMaxY()) / (float)container.getHeight();
float vdiff = Math.abs(topMargin - bottomMargin);
int containerMiddle = (int)container.getMinX() + Math.round((float)container.getHeight() / 2);
int rectMiddle = (int)container.getMinX() + Math.round((float)rect.getHeight() / 2);
float middleMargin = Math.abs(containerMiddle - rectMiddle) / (float)container.getHeight();
if (topMargin <= margin && bottomMargin <= margin)
return VAlignmentType.BOTH;
else if (topMargin <= margin && vdiff > marginDiff)
return VAlignmentType.TOP;
else if (bottomMargin <= margin && vdiff > marginDiff)
return VAlignmentType.BOTTOM;
else if ((topMargin <= margin && vdiff <= marginDiff) || (bottomMargin <= margin && vdiff <= marginDiff))
return VAlignmentType.BOTH;
else if (middleMargin <= margin)
return VAlignmentType.MIDDLE;
else
return VAlignmentType.NONE;
}
}
| {
"content_hash": "b01023ed0f8a3ae17df6466f92beb78f",
"timestamp": "",
"source": "github",
"line_count": 88,
"max_line_length": 119,
"avg_line_length": 54.21590909090909,
"alnum_prop": 0.74219241249214,
"repo_name": "osanchezUM/guizmo",
"id": "e1518aa816abbe96cbd667273e9c20fbb1dca5a6",
"size": "4771",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/guizmo/tiles/utilM/RectangleUtil.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1894856"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--This is a generic startup.xml file for Program D.-->
<!--programd-startup is the root element and is required.-->
<programd-startup>
<!--Presently only one bot element is supported.-->
<bots>
<bot id="TestBot" enabled="true">
<!--Bot predicates are set using the property tag. These are just examples.
Be sure to set properties BEFORE loading AIML files.-->
<property name="name" value="TestBot"/>
<property name="gender" value="female"/>
<property name="master" value="A.L.I.C.E. AI Foundation"/>
<property name="birthday" value="1995"/>
<property name="birthplace" value="Pennsylvania"/>
<property name="boyfriend" value="you"/>
<property name="favoritebook" value="Don't Read Me"/>
<property name="favoritecolor" value="transparent"/>
<property name="favoriteband" value="rubber"/>
<property name="favoritefood" value="patterns"/>
<property name="favoritesong" value="your voice"/>
<property name="favoritemovie" value="your life story"/>
<property name="forfun" value="talk to you"/>
<property name="friends" value="you"/>
<property name="girlfriend" value="you"/>
<property name="kindmusic" value="all"/>
<property name="location" value="here"/>
<property name="looklike" value="you"/>
<property name="question" value="What?"/>
<property name="sign" value="none"/>
<property name="talkabout" value="anything"/>
<property name="wear" value="nothing"/>
<property name="website" value="http://alicebot.org"/>
<property name="email" value="[email protected]"/>
<property name="language" value="any"/>
<property name="msagent" value="no"/>
<!--You may enumerate each file you want the bot to load, or use the "*"
to indicate you want all AIML files in a given directory.
The path is relative to server.engine.home in your server properties.-->
<learn>*</learn>
</bot>
</bots>
<!--Substitutions are grouped according to several AIML interpreter functions.-->
<substitutions>
<!--Input substitutions correct spelling mistakes and convert
"sentence"-ending characters into characters that will not be
identified as sentence enders.-->
<input>
<substitute find="=reply" replace=""/>
<substitute find="name=reset" replace=""/>
<substitute find=":-)" replace=" smile "/>
<substitute find=":)" replace=" smile "/>
<substitute find=",)" replace=" smile "/>
<substitute find=";)" replace=" smile "/>
<substitute find=";-)" replace=" smile "/>
<substitute find="\"" replace=""/>
<substitute find="/" replace=" "/>
<substitute find=">" replace=" gt "/>
<substitute find="<" replace=" lt "/>
<substitute find="(" replace=" "/>
<substitute find=")" replace=" "/>
<substitute find="`" replace=" "/>
<substitute find="," replace=" "/>
<substitute find=":" replace=" "/>
<substitute find="&" replace=" "/>
<substitute find="-" replace="-"/>
<substitute find="=" replace=" "/>
<substitute find="," replace=" "/>
<substitute find=" " replace=" "/>
<substitute find=" l a " replace=" la "/>
<substitute find=" o k " replace=" ok "/>
<substitute find=" p s " replace=" ps "/>
<substitute find=" ohh" replace=" oh"/>
<substitute find=" hehe" replace=" he"/>
<substitute find=" haha" replace=" ha"/>
<substitute find=" hellp " replace=" help "/>
<substitute find=" becuse " replace=" because "/>
<substitute find=" beleive " replace=" believe "/>
<substitute find=" becasue " replace=" because "/>
<substitute find=" becuase " replace=" because "/>
<substitute find=" becouse " replace=" because "/>
<substitute find=" practice " replace=" practise "/>
<substitute find=" reductionalism " replace=" reductionism "/>
<substitute find=" loebner price " replace=" loebner prize "/>
<substitute find=" its a " replace=" it is a "/>
<substitute find=" noi " replace=" yes I "/>
<substitute find=" fav " replace=" favorite "/>
<substitute find=" yesi " replace=" yes I "/>
<substitute find=" yesit " replace=" yes it "/>
<substitute find=" iam " replace=" I am "/>
<substitute find=" welli " replace=" well I "/>
<substitute find=" wellit " replace=" well it "/>
<substitute find=" amfine " replace=" am fine "/>
<substitute find=" aman " replace=" am an "/>
<substitute find=" amon " replace=" am on "/>
<substitute find=" amnot " replace=" am not "/>
<substitute find=" realy " replace=" really "/>
<substitute find=" iamusing " replace=" I am using "/>
<substitute find=" amleaving " replace=" am leaving "/>
<substitute find=" yeah " replace=" yes "/>
<substitute find=" yep " replace=" yes "/>
<substitute find=" yha " replace=" yes "/>
<substitute find=" yuo " replace=" you "/>
<substitute find=" wanna " replace=" want to "/>
<substitute find=" you'd " replace=" you would "/>
<substitute find=" you're " replace=" you are "/>
<substitute find=" you re " replace=" you are "/>
<substitute find=" you've " replace=" you have "/>
<substitute find=" you ve " replace=" you have "/>
<substitute find=" you'll " replace=" you will "/>
<substitute find=" you ll " replace=" you will "/>
<substitute find=" youre " replace=" you are "/>
<substitute find=" didnt " replace=" did not "/>
<substitute find=" didn't " replace=" did not "/>
<substitute find=" did'nt " replace=" did not "/>
<substitute find=" couldn't " replace=" could not "/>
<substitute find=" couldn t " replace=" could not "/>
<substitute find=" didn't " replace=" did not "/>
<substitute find=" didn t " replace=" did not "/>
<substitute find=" ain't " replace=" is not "/>
<substitute find=" ain t " replace=" is not "/>
<substitute find=" isn't " replace=" is not "/>
<substitute find=" isn t " replace=" is not "/>
<substitute find=" isnt " replace=" is not "/>
<substitute find=" it's " replace=" it is "/>
<substitute find=" it s " replace=" it is "/>
<substitute find=" are'nt " replace=" are not "/>
<substitute find=" arent " replace=" are not "/>
<substitute find=" aren't " replace=" are not "/>
<substitute find=" aren t " replace=" are not "/>
<substitute find=" arn t " replace=" are not "/>
<substitute find=" where's " replace=" where is "/>
<substitute find=" where s " replace=" where is "/>
<substitute find=" haven't " replace=" have not "/>
<substitute find=" havent " replace=" have not "/>
<substitute find=" hasn't " replace=" has not "/>
<substitute find=" hasn t " replace=" has not "/>
<substitute find=" weren t " replace=" were not "/>
<substitute find=" weren't " replace=" were not "/>
<substitute find=" werent " replace=" were not "/>
<substitute find=" can't " replace=" can not "/>
<substitute find=" can t " replace=" can not "/>
<substitute find=" cant " replace=" can not "/>
<substitute find=" cannot " replace=" can not "/>
<substitute find=" whos " replace=" who is "/>
<substitute find=" how's " replace=" how is "/>
<substitute find=" how s " replace=" how is "/>
<substitute find=" how'd " replace=" how did "/>
<substitute find=" how d " replace=" how did "/>
<substitute find=" hows " replace=" how is "/>
<substitute find=" whats " replace=" what is "/>
<substitute find=" name's " replace=" name is "/>
<substitute find=" who's " replace=" who is "/>
<substitute find=" who s " replace=" who is "/>
<substitute find=" what's " replace=" what is "/>
<substitute find=" what s " replace=" what is "/>
<substitute find=" that's " replace=" that is "/>
<substitute find=" there's " replace=" there is "/>
<substitute find=" there s " replace=" there is "/>
<substitute find=" theres " replace=" there is "/>
<substitute find=" thats " replace=" that is "/>
<substitute find=" whats " replace=" what is "/>
<substitute find=" doesn't " replace=" does not "/>
<substitute find=" doesn t " replace=" does not "/>
<substitute find=" doesnt " replace=" does not "/>
<substitute find=" don't " replace=" do not "/>
<substitute find=" don t " replace=" do not "/>
<substitute find=" dont " replace=" do not "/>
<substitute find=" do nt " replace=" do not "/>
<substitute find=" do'nt " replace=" do not "/>
<substitute find=" won't " replace=" will not "/>
<substitute find=" wont " replace=" will not "/>
<substitute find=" won t " replace=" will not "/>
<substitute find=" let's " replace=" let us "/>
<substitute find=" they're " replace=" they are "/>
<substitute find=" they re " replace=" they are "/>
<substitute find=" wasn't " replace=" was not "/>
<substitute find=" wasn t " replace=" was not "/>
<substitute find=" wasnt " replace=" was not "/>
<substitute find=" hadn't " replace=" had not "/>
<substitute find=" hadn t " replace=" had not "/>
<substitute find=" wouldn't " replace=" would not "/>
<substitute find=" wouldn t " replace=" would not "/>
<substitute find=" wouldnt " replace=" would not "/>
<substitute find=" shouldn't " replace=" should not "/>
<substitute find=" shouldnt " replace=" should not "/>
<substitute find=" favourite " replace=" favorite "/>
<substitute find=" colour " replace=" color "/>
<substitute find=" we'll " replace=" we will "/>
<substitute find=" we ll " replace=" we will "/>
<substitute find=" he'll " replace=" he will "/>
<substitute find=" he ll " replace=" he will "/>
<substitute find=" i'll " replace=" I will "/>
<substitute find=" ive " replace=" I have "/>
<substitute find=" i've " replace=" I have "/>
<substitute find=" i ve " replace=" I have "/>
<substitute find=" i'd " replace=" I would "/>
<substitute find=" i'm " replace=" I am "/>
<substitute find=" i m " replace=" I am "/>
<substitute find=" we've " replace=" we have "/>
<substitute find=" we're " replace=" we are "/>
<substitute find=" she's " replace=" she is "/>
<substitute find=" shes " replace=" she is "/>
<substitute find=" she'd " replace=" she would "/>
<substitute find=" she d " replace=" she would "/>
<substitute find=" shed " replace=" she would "/>
<substitute find=" he'd " replace=" he would "/>
<substitute find=" he d " replace=" he would "/>
<substitute find=" hed " replace=" he would "/>
<substitute find=" he's " replace=" he is "/>
<substitute find=" we ve " replace=" we have "/>
<substitute find=" we re " replace=" we are "/>
<substitute find=" she s " replace=" she is "/>
<substitute find=" he s " replace=" he is "/>
<substitute find=" iama " replace=" I am a "/>
<substitute find=" iamasking " replace=" I am asking "/>
<substitute find=" iamdoing " replace=" I am doing "/>
<substitute find=" iamfrom " replace=" I am from "/>
<substitute find=" iamin " replace=" I am in "/>
<substitute find=" iamok " replace=" I am ok "/>
<substitute find=" iamsorry " replace=" I am sorry "/>
<substitute find=" iamtalking " replace=" I am talking "/>
<substitute find=" iamtired " replace=" I am tired "/>
<substitute find=" down load " replace=" download "/>
<substitute find=" remeber " replace=" remember "/>
<substitute find=" waht " replace=" what "/>
<substitute find=" wallance " replace=" wallace "/>
<substitute find=" you r " replace=" you are "/>
<substitute find=" u " replace=" you "/>
<substitute find=" ur " replace=" your "/>
<!--sentence protection-->
<substitute find="{" replace=" beginscript "/>
<substitute find="}" replace=" endscript "/>
<substitute find="\"" replace=" "/>
<substitute find="\\" replace=" "/>
<substitute find=":0" replace=" 0"/>
<substitute find=": 0" replace=" 0"/>
<substitute find=":1" replace=" 1"/>
<substitute find=": 1" replace=" 1"/>
<substitute find=":2" replace=" 2"/>
<substitute find=": 2" replace=" 2"/>
<substitute find=":3" replace=" 3"/>
<substitute find=": 3" replace=" 3"/>
<substitute find=":4" replace=" 4"/>
<substitute find=": 4" replace=" 4"/>
<substitute find=":5" replace=" 5"/>
<substitute find=": 5" replace=" 5"/>
<substitute find=".0" replace=" point 0"/>
<substitute find=".1" replace=" point 1"/>
<substitute find=".2" replace=" point 3"/>
<substitute find=".4" replace=" point 4"/>
<substitute find=".5" replace=" point 5"/>
<substitute find=".6" replace=" point 6"/>
<substitute find=".7" replace=" point 7"/>
<substitute find=".8" replace=" point 8"/>
<substitute find=".9" replace=" point 9"/>
<substitute find=" dr. " replace=" Dr "/>
<substitute find=" dr.w" replace=" Dr w"/>
<substitute find=" dr . " replace=" Dr "/>
<substitute find=" mr. " replace=" Mr "/>
<substitute find=" mrs. " replace=" Mrs "/>
<substitute find=" st. " replace=" St "/>
<substitute find=" www." replace=" www dot "/>
<substitute find=" botspot." replace=" botspot dot "/>
<substitute find=" amused.com" replace=" amused dot com "/>
<substitute find=" whatis." replace=" whatis dot "/>
<substitute find=".com " replace=" dot com "/>
<substitute find=".net " replace=" dot net "/>
<substitute find=".org " replace=" dot org "/>
<substitute find=".edu " replace=" dot edu "/>
<substitute find=".uk " replace=" dot uk "/>
<substitute find=".jp " replace=" dot jp "/>
<substitute find=".au " replace=" dot au "/>
<substitute find=".co " replace=" dot co "/>
<substitute find=".ac " replace=" dot ac "/>
<substitute find=" o.k. " replace=" ok "/>
<substitute find=" o. k. " replace=" ok "/>
<substitute find=" l.l. " replace=" l l "/>
<substitute find=" p.s. " replace=" ps "/>
<substitute find=" alicebot " replace=" ALICE "/>
<substitute find=" a l i c e " replace=" ALICE "/>
<substitute find=" a.l.i.c.e. " replace=" ALICE "/>
<substitute find=" a.l.i.c.e " replace=" ALICE "/>
<substitute find=" i.c.e " replace=" i c e "/>
<substitute find=" e l v i s " replace=" ELVIS "/>
<substitute find=" e.l.v.i.s. " replace=" ELVIS "/>
<substitute find=" e.l.v.i.s " replace=" ELVIS "/>
<substitute find=" v.i.s " replace=" v i s "/>
<substitute find=" h a l " replace=" hal "/>
<substitute find=" h.a.l. " replace=" hal "/>
<substitute find=" u s a " replace=" USA "/>
<substitute find=" u. s. a. " replace=" USA "/>
<substitute find=" u.s.a. " replace=" USA "/>
<substitute find=" u.s. " replace=" USA "/>
<substitute find=" ph.d. " replace=" PhD "/>
<substitute find=" a." replace=" a "/>
<substitute find=" b." replace=" b "/>
<substitute find=" c." replace=" c "/>
<substitute find=" d." replace=" d "/>
<substitute find=" e." replace=" e "/>
<substitute find=" f." replace=" f "/>
<substitute find=" g." replace=" g "/>
<substitute find=" h." replace=" h "/>
<substitute find=" i." replace=" i "/>
<substitute find=" j." replace=" j "/>
<substitute find=" k." replace=" k "/>
<substitute find=" l." replace=" l "/>
<substitute find=" m." replace=" m "/>
<substitute find=" n." replace=" n "/>
<substitute find=" p." replace=" p "/>
<substitute find=" o." replace=" o "/>
<substitute find=" q." replace=" q "/>
<substitute find=" r." replace=" r "/>
<substitute find=" s." replace=" s "/>
<substitute find=" t." replace=" t "/>
<substitute find=" u." replace=" u "/>
<substitute find=" v." replace=" v "/>
<substitute find=" x." replace=" x "/>
<substitute find=" y." replace=" y "/>
<substitute find=" w." replace=" w "/>
<substitute find=" z." replace=" z "/>
<substitute find=".jar" replace=" jar"/>
<substitute find=".zip" replace=" zip"/>
<substitute find=", but " replace=". "/>
<substitute find=", and " replace=". "/>
<substitute find=",but " replace=". "/>
<substitute find=",and " replace=". "/>
<substitute find=" but " replace=". "/>
<substitute find=" and " replace=". "/>
<substitute find=", i " replace=". I "/>
<substitute find=", you " replace=". you "/>
<substitute find=",i " replace=". I "/>
<substitute find=",you " replace=". you "/>
<substitute find=", what " replace=". what "/>
<substitute find=",what " replace=". what "/>
<substitute find=", do " replace=". do "/>
<substitute find=",do " replace=". do "/>
</input>
<gender>
<substitute find=" he " replace=" she "/>
<substitute find=" she " replace=" he "/>
<substitute find=" to him " replace=" to her "/>
<substitute find=" for him " replace=" for her "/>
<substitute find=" with him " replace=" with her "/>
<substitute find=" on him " replace=" on her "/>
<substitute find=" in him " replace=" in her "/>
<substitute find=" to her " replace=" to him "/>
<substitute find=" for her " replace=" for him "/>
<substitute find=" with her " replace=" with him "/>
<substitute find=" on her " replace=" on him "/>
<substitute find=" in her " replace=" in him "/>
<substitute find=" his " replace=" her "/>
<substitute find=" her " replace=" his "/>
<substitute find=" him " replace=" her "/>
<substitute find=" er " replace=" Sie "/>
<substitute find=" ihm " replace=" ihr "/>
<substitute find=" sein " replace=" ihr "/>
<substitute find=" ihn " replace=" Sie "/>
</gender>
<person>
<substitute find=" I was " replace=" he or she was "/>
<substitute find=" he was " replace=" I was "/>
<substitute find=" she was " replace=" I was "/>
<substitute find=" I am " replace=" he or she is "/>
<substitute find=" I " replace=" he or she "/>
<substitute find=" me " replace=" him or her "/>
<substitute find=" my " replace=" his or her "/>
<substitute find=" myself " replace=" him or herself "/>
<substitute find=" mine " replace=" his or hers "/>
</person>
<person2>
<substitute find=" with you " replace=" with me "/>
<substitute find=" with me " replace=" with you "/>
<substitute find=" to you " replace=" to me "/>
<substitute find=" to me " replace=" to you "/>
<substitute find=" of you " replace=" of me "/>
<substitute find=" of me " replace=" of you "/>
<substitute find=" for you " replace=" for me "/>
<substitute find=" for me " replace=" for you "/>
<substitute find=" give you " replace=" give me "/>
<substitute find=" give me " replace=" give you "/>
<substitute find=" giving you " replace=" giving me "/>
<substitute find=" giving me " replace=" giving you "/>
<substitute find=" gave you " replace=" gave me "/>
<substitute find=" gave me " replace=" gave you "/>
<substitute find=" make you " replace=" make me "/>
<substitute find=" make me " replace=" make you "/>
<substitute find=" made you " replace=" made me "/>
<substitute find=" made me " replace=" made you "/>
<substitute find=" take you " replace=" take me "/>
<substitute find=" take me " replace=" take you "/>
<substitute find=" save you " replace=" save me "/>
<substitute find=" save me " replace=" save you "/>
<substitute find=" tell you " replace=" tell me "/>
<substitute find=" tell me " replace=" tell you "/>
<substitute find=" telling you " replace=" telling me "/>
<substitute find=" telling me " replace=" telling you "/>
<substitute find=" told you " replace=" told me "/>
<substitute find=" told me " replace=" told you "/>
<substitute find=" are you " replace=" am I "/>
<substitute find=" am I " replace=" are you "/>
<substitute find=" you are " replace=" I am "/>
<substitute find=" I am " replace=" you are "/>
<substitute find=" you " replace=" me "/>
<substitute find=" me " replace=" you "/>
<substitute find=" your " replace=" my "/>
<substitute find=" my " replace=" your "/>
<substitute find=" yours " replace=" mine "/>
<substitute find=" mine " replace=" yours "/>
<substitute find=" yourself " replace=" myself "/>
<substitute find=" myself " replace=" yourself "/>
<substitute find=" I was " replace=" you were "/>
<substitute find=" you were " replace=" I was "/>
<substitute find=" I am " replace=" you are "/>
<substitute find=" you are " replace=" I am "/>
<substitute find=" I " replace=" you "/>
<substitute find=" me " replace=" you "/>
<substitute find=" my " replace=" your "/>
<substitute find=" your " replace=" my "/>
<substitute find=" ich war " replace=" er war "/>
<substitute find=" ich bin " replace=" er ist "/>
<substitute find=" ich " replace=" er "/>
<substitute find=" mein " replace=" sein "/>
<substitute find=" meins " replace=" seins "/>
<substitute find=" mit dir " replace=" mit mir "/>
<substitute find=" dir " replace=" mir "/>
<substitute find=" fuer dich " replace=" fuer mich "/>
<substitute find=" bist du " replace=" bin ich "/>
<substitute find=" du " replace=" ich "/>
<substitute find=" dein " replace=" mein "/>
<substitute find=" deins " replace=" meins "/>
</person2>
</substitutions>
<!--Sentence splitters defined strings that mark the end of a sentence,
after input substitutions have been performed.-->
<sentence-splitters>
<splitter value="."/>
<splitter value="!"/>
<splitter value="?"/>
</sentence-splitters>
</programd-startup>
| {
"content_hash": "ad217e16f5a23f89cc2f437f751f6721",
"timestamp": "",
"source": "github",
"line_count": 440,
"max_line_length": 88,
"avg_line_length": 57.13181818181818,
"alnum_prop": 0.5138038030073991,
"repo_name": "Mercurial/CorpBot.py",
"id": "f7eb253de1f423020997b1c244ed9ce2550ef942",
"size": "25138",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "standard/startup.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2708"
},
{
"name": "Python",
"bytes": "575793"
},
{
"name": "Shell",
"bytes": "2717"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE cruisecontrol [
<!ENTITY open_p4port "zeugma.lucidera.com:1666">
<!ENTITY open_p4client "cruise.zeugma.eigenbase">
<!ENTITY open_p4user "guest">
<!ENTITY open_root "//open/dev">
<!ENTITY open_propfile "zeugma.perforce.properties">
<!ENTITY open_default.build.home "/home/cruise/open">
<!ENTITY open_integration.build.home "/home/cruise/open/bootstrap/build">
<!ENTITY buildresultsbase "http://cruisehost.eigenbase.org/cruisecontrol/buildresults">
<!ENTITY mailhost "mail.coastside.net">
<!ENTITY reportsuccess "always">
<!ENTITY returnname "Eigenbase Build Monkey">
<!ENTITY returnaddress "[email protected]">
<!ENTITY skipusers "true">
<!ENTITY spamwhilebroken "true">
<!ENTITY subjectprefix "Eigenbase Continuous Integration: ">
<!ENTITY failureaddress "[email protected]">
<!ENTITY reportwhenfixed "true">
<!ENTITY emailmapper "/home/cruise/open/bootstrap/p4email.txt">
<!ENTITY scp_user "cruise">
<!ENTITY scp_host "kerastion.eigenbase.org">
<!ENTITY scp_options "">
<!ENTITY scp_filesep "/">
<!ENTITY rsync_cmd "rsync -az -e ssh --delete-after">
<!ENTITY rsync_dest "[email protected]:web/artifacts">
<!ENTITY build_interval "3600">
<!ENTITY ant "./doant.sh">
<!ENTITY configSuffix "">
<!ENTITY saffronProject SYSTEM "config-saffron.xml">
<!ENTITY fennelProject SYSTEM "config-fennel.xml">
<!ENTITY farragoProject SYSTEM "config-farrago.xml">
]>
<cruisecontrol>
&fennelProject;
&farragoProject;
</cruisecontrol>
| {
"content_hash": "826597c297c8b03339da32456de476d7",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 87,
"avg_line_length": 33.666666666666664,
"alnum_prop": 0.6912128712871287,
"repo_name": "julianhyde/luciddb",
"id": "3c4b45ef9a477804a1e517238b2dae0ac2328b0d",
"size": "1616",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "bootstrap/config-zeugma.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.apache.vxquery.runtime.functions.step;
import org.apache.hyracks.algebricks.runtime.base.IScalarEvaluator;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.data.std.api.IPointable;
import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentUnnestingEvaluator;
public class DescendantOrSelfPathStepUnnestingEvaluator extends AbstractTaggedValueArgumentUnnestingEvaluator {
final DescendantOrSelfPathStepUnnesting descendantOrSelfPathStep;
public DescendantOrSelfPathStepUnnestingEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args) {
super(args);
descendantOrSelfPathStep = new DescendantOrSelfPathStepUnnesting(ctx, ppool, true);
}
public boolean step(IPointable result) throws HyracksDataException {
return descendantOrSelfPathStep.step(result);
}
@Override
protected void init(TaggedValuePointable[] args) throws HyracksDataException {
descendantOrSelfPathStep.init(args);
}
}
| {
"content_hash": "9ba34660436c1ed1b07e834b0e69d0e7",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 111,
"avg_line_length": 42.666666666666664,
"alnum_prop": 0.8168402777777778,
"repo_name": "prestoncarman/vxquery",
"id": "da55a829f0b3a46f1492b45a2720a1544181b584",
"size": "1953",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/step/DescendantOrSelfPathStepUnnestingEvaluator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "2903527"
},
{
"name": "Python",
"bytes": "120934"
},
{
"name": "Shell",
"bytes": "39923"
},
{
"name": "XQuery",
"bytes": "477866"
},
{
"name": "XSLT",
"bytes": "17663"
}
],
"symlink_target": ""
} |
package ch.scaille.gui.tools;
import static ch.scaille.gui.mvc.properties.Configuration.persistent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ResourceBundle;
import java.util.function.Function;
import java.util.function.UnaryOperator;
import ch.scaille.annotations.Labeled;
import ch.scaille.annotations.Ordered;
import ch.scaille.gui.mvc.BindingChain.EndOfChain;
import ch.scaille.gui.mvc.IScopedSupport;
import ch.scaille.gui.mvc.factories.Persisters;
import ch.scaille.gui.mvc.persisters.ObjectProviderPersister.IObjectProvider;
import ch.scaille.gui.mvc.properties.AbstractTypedProperty;
import ch.scaille.gui.mvc.properties.ObjectProperty;
import ch.scaille.util.dao.metadata.AbstractAttributeMetaData;
import ch.scaille.util.dao.metadata.DataObjectMetaData;
public class GenericEditorClassModel<T> implements IGenericEditorModel<T> {
public static class ClassPropertyEntry<U> extends PropertyEntry {
private final AbstractAttributeMetaData<U> metadata;
public ClassPropertyEntry(final AbstractTypedProperty<Object> property,
final Function<AbstractTypedProperty<?>, EndOfChain<?>> endOfChainProvider,
final AbstractAttributeMetaData<U> metadata, final boolean readOnly, final String label,
final String tooltip) {
super(property, endOfChainProvider, metadata.getClassType(), readOnly, label, tooltip);
this.metadata = metadata;
}
private int index() {
final Ordered annotation = metadata.getAnnotation(Ordered.class);
if (annotation != null) {
return annotation.order();
}
return Integer.MAX_VALUE / 2;
}
}
public static class Builder<T> {
private final Class<T> editedClazz;
private ResourceBundle bundle = null;
private boolean readOnly = false;
private IGenericModelAdapter[] adapters = new IGenericModelAdapter[0];
public Builder(final Class<T> clazz) {
this.editedClazz = clazz;
}
public Builder<T> setBundle(final ResourceBundle bundle) {
this.bundle = bundle;
return this;
}
public Builder<T> setReadOnly(final boolean readOnly) {
this.readOnly = readOnly;
return this;
}
public Builder<T> addAdapters(final IGenericModelAdapter... adapters) {
this.adapters = adapters;
return this;
}
public GenericEditorClassModel<T> build() {
return new GenericEditorClassModel<>(this);
}
}
private final DataObjectMetaData<T> metaData;
private final Builder<T> config;
public static <T> Builder<T> builder(final Class<T> clazz) {
return new Builder<>(clazz);
}
protected GenericEditorClassModel(final Builder<T> builder) {
this.config = builder;
this.metaData = new DataObjectMetaData<>(builder.editedClazz);
}
/**
* Creates the properties by introspecting the displayed class Class
*
* @param errorProperty
* @param propertySupport
*
* @return
*/
@Override
public List<ClassPropertyEntry<T>> createProperties(final IScopedSupport propertySupport,
IObjectProvider<T> object) {
final List<ClassPropertyEntry<T>> properties = new ArrayList<>();
for (final AbstractAttributeMetaData<T> attrib : metaData.getAttributes()) {
final ObjectProperty<Object> property = new ObjectProperty<>(attrib.getName(), propertySupport);
property.configureTyped(persistent(object, Persisters.attribute(attrib)));
final boolean readOnly = config.readOnly || attrib.isReadOnly();
final String message = findText(attrib, Labeled::label, PropertyEntry::descriptionKey);
final String toolTip = findText(attrib, Labeled::tooltip, PropertyEntry::tooltipKey);
properties.add(
new ClassPropertyEntry<>(property, this::createBindingChain, attrib, readOnly, message, toolTip));
}
Collections.sort(properties, (p1, p2) -> Integer.compare(p1.index(), p2.index()));
return properties;
}
private EndOfChain<?> createBindingChain(AbstractTypedProperty<?> property) {
EndOfChain<?> chain = property.createBindingChain();
for (final IGenericModelAdapter adapter : config.adapters) {
chain = adapter.apply(config.editedClazz, chain);
}
return chain;
}
private String findText(final AbstractAttributeMetaData<T> attrib, final Function<Labeled, String> fromLabel,
final UnaryOperator<String> nameToKey) {
final Labeled label = attrib.getAnnotation(Labeled.class);
String value = "";
if (label != null) {
value = fromLabel.apply(label);
}
if (value.isEmpty() && config.bundle != null) {
value = config.bundle.getString(nameToKey.apply(attrib.getName()));
}
return value;
}
}
| {
"content_hash": "66887a012468332a52272a71e3f28ab0",
"timestamp": "",
"source": "github",
"line_count": 137,
"max_line_length": 110,
"avg_line_length": 32.96350364963504,
"alnum_prop": 0.7562001771479185,
"repo_name": "sebastiencaille/sky-lib",
"id": "551e044f8f0d9d47ad9b39e7d0c8ab577ea19b22",
"size": "4516",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "skylib-java/lib-gui-java8/src/main/java/ch/scaille/gui/tools/GenericEditorClassModel.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "78806"
},
{
"name": "CSS",
"bytes": "1034"
},
{
"name": "HTML",
"bytes": "1984"
},
{
"name": "Java",
"bytes": "927160"
},
{
"name": "JavaScript",
"bytes": "1430"
},
{
"name": "Makefile",
"bytes": "8699"
},
{
"name": "Shell",
"bytes": "59"
},
{
"name": "TypeScript",
"bytes": "13601"
}
],
"symlink_target": ""
} |
package com.filecraft.helloworld;
import com.filecraft.helloworld.FileCraftContract.ContentType;
public class Quiz {
public enum QuizId {
JAPANESE_VOCAB_SAMPLE,
JAPANESE_BASICS;
public static QuizId getId(String actionId) {
for (QuizId id : QuizId.values()) {
if (id.name().equals(actionId)) {
return id;
}
}
return null;
}
}
public final String iconPath;
public final ContentType iconType;
public final String title;
public final String description;
public final String actionId;
private Quiz(String iconPath, ContentType iconType, String title, String description, String actionId) {
this.iconPath = iconPath;
this.iconType = iconType;
this.title = title;
this.description = description;
this.actionId = actionId;
}
public static Quiz getQuiz(String actionId) {
QuizId id = QuizId.getId(actionId);
switch (id) {
case JAPANESE_VOCAB_SAMPLE:
return new Quiz(TutorialUtils.getResourceFilePath(R.raw.text_svg), ContentType.SVG_BASIC,
TutorialUtils.getString(R.string.contentprovider_grid_quiz_japanese_vocab),
TutorialUtils.getString(R.string.contentprovider_grid_quiz_subtext), id.name());
case JAPANESE_BASICS:
return new Quiz(TutorialUtils.getResourceFilePath(R.raw.text_svg), ContentType.SVG_BASIC,
TutorialUtils.getString(R.string.contentprovider_grid_quiz_japanese_basics),
TutorialUtils.getString(R.string.contentprovider_grid_quiz_subtext), id.name());
}
return null;
}
}
| {
"content_hash": "d442261c0f1e0ed292883d2e0acee974",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 105,
"avg_line_length": 30.081632653061224,
"alnum_prop": 0.7455902306648575,
"repo_name": "b3ntt1nc4n/filecraft-contentprovider-intro",
"id": "935ddcc382589163ef1168495e42b0879f34d7b7",
"size": "1474",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/com/filecraft/helloworld/Quiz.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "57061"
}
],
"symlink_target": ""
} |
using ::testing::_;
using ::testing::Invoke;
using ::testing::Return;
namespace chromeos {
namespace {
class FakeTaskRunner : public base::TaskRunner {
public:
bool PostDelayedTask(const tracked_objects::Location& from_here,
const base::Closure& task,
base::TimeDelta delay) override {
task.Run();
return true;
}
bool RunsTasksOnCurrentThread() const override { return true; }
protected:
~FakeTaskRunner() override {}
};
} // namespace
class BlockingMethodCallerTest : public testing::Test {
public:
BlockingMethodCallerTest() : task_runner_(new FakeTaskRunner) {
}
void SetUp() override {
// Create a mock bus.
dbus::Bus::Options options;
options.bus_type = dbus::Bus::SYSTEM;
mock_bus_ = new dbus::MockBus(options);
// Create a mock proxy.
mock_proxy_ = new dbus::MockObjectProxy(
mock_bus_.get(),
"org.chromium.TestService",
dbus::ObjectPath("/org/chromium/TestObject"));
// Set an expectation so mock_proxy's CallMethodAndBlock() will use
// CreateMockProxyResponse() to return responses.
EXPECT_CALL(*mock_proxy_.get(), MockCallMethodAndBlock(_, _))
.WillRepeatedly(
Invoke(this, &BlockingMethodCallerTest::CreateMockProxyResponse));
// Set an expectation so mock_bus's GetObjectProxy() for the given
// service name and the object path will return mock_proxy_.
EXPECT_CALL(*mock_bus_.get(),
GetObjectProxy("org.chromium.TestService",
dbus::ObjectPath("/org/chromium/TestObject")))
.WillOnce(Return(mock_proxy_.get()));
// Set an expectation so mock_bus's GetDBusTaskRunner will return the fake
// task runner.
EXPECT_CALL(*mock_bus_.get(), GetDBusTaskRunner())
.WillRepeatedly(Return(task_runner_.get()));
// ShutdownAndBlock() will be called in TearDown().
EXPECT_CALL(*mock_bus_.get(), ShutdownAndBlock()).WillOnce(Return());
}
void TearDown() override { mock_bus_->ShutdownAndBlock(); }
protected:
scoped_refptr<FakeTaskRunner> task_runner_;
scoped_refptr<dbus::MockBus> mock_bus_;
scoped_refptr<dbus::MockObjectProxy> mock_proxy_;
private:
// Returns a response for the given method call. Used to implement
// CallMethodAndBlock() for |mock_proxy_|.
dbus::Response* CreateMockProxyResponse(dbus::MethodCall* method_call,
int timeout_ms) {
if (method_call->GetInterface() == "org.chromium.TestInterface" &&
method_call->GetMember() == "Echo") {
dbus::MessageReader reader(method_call);
std::string text_message;
if (reader.PopString(&text_message)) {
std::unique_ptr<dbus::Response> response =
dbus::Response::CreateEmpty();
dbus::MessageWriter writer(response.get());
writer.AppendString(text_message);
return response.release();
}
}
LOG(ERROR) << "Unexpected method call: " << method_call->ToString();
return NULL;
}
};
TEST_F(BlockingMethodCallerTest, Echo) {
const char kHello[] = "Hello";
// Get an object proxy from the mock bus.
dbus::ObjectProxy* proxy = mock_bus_->GetObjectProxy(
"org.chromium.TestService",
dbus::ObjectPath("/org/chromium/TestObject"));
// Create a method call.
dbus::MethodCall method_call("org.chromium.TestInterface", "Echo");
dbus::MessageWriter writer(&method_call);
writer.AppendString(kHello);
// Call the method.
BlockingMethodCaller blocking_method_caller(mock_bus_.get(), proxy);
std::unique_ptr<dbus::Response> response(
blocking_method_caller.CallMethodAndBlock(&method_call));
// Check the response.
ASSERT_TRUE(response.get());
dbus::MessageReader reader(response.get());
std::string text_message;
ASSERT_TRUE(reader.PopString(&text_message));
// The text message should be echo'ed back.
EXPECT_EQ(kHello, text_message);
}
} // namespace chromeos
| {
"content_hash": "3d4f35d95cdcdce982c51faddf1e3c1b",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 79,
"avg_line_length": 33.11666666666667,
"alnum_prop": 0.6597886260694514,
"repo_name": "heke123/chromium-crosswalk",
"id": "7a6e23c90d3f3bdc79d216354f1bcdcda18fd8da",
"size": "4521",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "chromeos/dbus/blocking_method_caller_unittest.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
This document describes how to set up your development environment to build and test Angular.
It also explains the basic mechanics of using `git`, `node`, and `npm`.
* [Prerequisite Software](#prerequisite-software)
* [Getting the Sources](#getting-the-sources)
* [Installing NPM Modules](#installing-npm-modules)
* [Building](#building)
* [Running Tests Locally](#running-tests-locally)
See the [contribution guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md)
if you'd like to contribute to Angular.
## Prerequisite Software
Before you can build and test Angular, you must install and configure the
following products on your development machine:
* [Git](http://git-scm.com) and/or the **GitHub app** (for [Mac](http://mac.github.com) or
[Windows](http://windows.github.com)); [GitHub's Guide to Installing
Git](https://help.github.com/articles/set-up-git) is a good source of information.
* [Node.js](http://nodejs.org), (version `>=5.4.1 <6`) which is used to run a development web server,
run tests, and generate distributable files. We also use Node's Package Manager, `npm`
(version `>=3.5.3 <4.0`), which comes with Node. Depending on your system, you can install Node either from
source or as a pre-packaged bundle.
* [Java Development Kit](http://www.oracle.com/technetwork/es/java/javase/downloads/index.html) which is used
to execute the selenium standalone server for e2e testing.
## Getting the Sources
Fork and clone the Angular repository:
1. Login to your GitHub account or create one by following the instructions given
[here](https://github.com/signup/free).
2. [Fork](http://help.github.com/forking) the [main Angular
repository](https://github.com/angular/angular).
3. Clone your fork of the Angular repository and define an `upstream` remote pointing back to
the Angular repository that you forked in the first place.
```shell
# Clone your GitHub repository:
git clone [email protected]:<github username>/angular.git
# Go to the Angular directory:
cd angular
# Add the main Angular repository as an upstream remote to your repository:
git remote add upstream https://github.com/angular/angular.git
```
## Installing NPM Modules
Next, install the JavaScript modules needed to build and test Angular:
```shell
# Install Angular project dependencies (package.json)
npm install
```
**Optional**: In this document, we make use of project local `npm` package scripts and binaries
(stored under `./node_modules/.bin`) by prefixing these command invocations with `$(npm bin)`; in
particular `gulp` and `protractor` commands. If you prefer, you can drop this path prefix by either:
*Option 1*: globally installing these two packages as follows:
* `npm install -g gulp` (you might need to prefix this command with `sudo`)
* `npm install -g protractor` (you might need to prefix this command with `sudo`)
Since global installs can become stale, and required versions can vary by project, we avoid their
use in these instructions.
*Option 2*: defining a bash alias like `alias nbin='PATH=$(npm bin):$PATH'` as detailed in this
[Stackoverflow answer](http://stackoverflow.com/questions/9679932/how-to-use-package-installed-locally-in-node-modules/15157360#15157360) and used like this: e.g., `nbin gulp build`.
## Installing Bower Modules
Now run `bower` to install additional dependencies:
```shell
# Install other Angular project dependencies (bower.json)
bower install
```
## Windows only
In order to create the right symlinks, run **as administrator**:
```shell
./scripts/windows/create-symlinks.sh
```
Before submitting a PR, do not forget to remove them:
```shell
./scripts/windows/remove-symlinks.sh
```
## Building
To build Angular run:
```shell
./build.sh
```
* Results are put in the dist folder.
## Running Tests Locally
To run tests:
```shell
$ ./test.sh node # Run all angular tests on node
$ ./test.sh browser # Run all angular tests in browser
$ ./test.sh browserNoRouter # Optionally run all angular tests without router in browser
$ ./test.sh tools # Run angular tooling (not framework) tests
```
You should execute the 3 test suites before submitting a PR to github.
All the tests are executed on our Continuous Integration infrastructure and a PR could only be merged once the tests pass.
- CircleCI fails if your code is not formatted properly,
- Travis CI fails if any of the test suites described above fails.
## Update the public API tests
If you happen to modify the public API of Angular, API golden files must be updated using:
``` shell
$ gulp public-api:update
```
Note: The command `gulp public-api:enforce` fails when the API doesn't match the golden files. Make sure to rebuild
the project before trying to verify after an API change.
## <a name="clang-format"></a> Formatting your source code
Angular uses [clang-format](http://clang.llvm.org/docs/ClangFormat.html) to format the source code. If the source code
is not properly formatted, the CI will fail and the PR can not be merged.
You can automatically format your code by running:
``` shell
$ gulp format
```
## Linting/verifying your source code
You can check that your code is properly formatted and adheres to coding style by running:
``` shell
$ gulp lint
```
## Publishing your own personal snapshot build
You may find that your un-merged change needs some validation from external participants.
Rather than requiring them to pull your Pull Request and build Angular locally, you can
publish the `*-builds` snapshots just like our Travis build does.
First time, you need to create the github repositories:
``` shell
$ export TOKEN=[get one from https://github.com/settings/tokens]
$ CREATE_REPOS=1 ./scripts/publish/publish-build-artifacts.sh [github username]
```
For subsequent snapshots, just run
``` shell
$ ./scripts/publish/publish-build-artifacts.sh [github username]
```
The script will publish the build snapshot to a branch with the same name as your current branch,
and create it if it doesn't exist.
| {
"content_hash": "4909d6f33cbb71c1c171fbb75c09f645",
"timestamp": "",
"source": "github",
"line_count": 176,
"max_line_length": 182,
"avg_line_length": 34.35795454545455,
"alnum_prop": 0.7496279146684306,
"repo_name": "Mathou54/angular",
"id": "0b7e18d617ebf25e994909a74fcb1ef16fe6827f",
"size": "6079",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "DEVELOPER.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "17314"
},
{
"name": "HTML",
"bytes": "32450"
},
{
"name": "JavaScript",
"bytes": "208544"
},
{
"name": "Python",
"bytes": "3535"
},
{
"name": "Shell",
"bytes": "46539"
},
{
"name": "TypeScript",
"bytes": "5656083"
}
],
"symlink_target": ""
} |
package com.oliver.accesslogsummarizer.reader;
import java.util.stream.Stream;
import static org.junit.Assert.*;
import org.junit.Test;
public class InputStreamTest {
private InputStream<String> input = new FileStream();
@Test
public void testInputStream() {
Stream<String> stream = input.getStream("src/test/resources/test_access_log.log");
assertNotNull(stream);
assertEquals(13, stream.count());
}
}
| {
"content_hash": "f6b6d940af21edc8513d26b2ccca27c0",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 84,
"avg_line_length": 20.19047619047619,
"alnum_prop": 0.7452830188679245,
"repo_name": "oliversavio/Access-Log-Summarizer",
"id": "4d0442ed62332c7cc9cfbbbad5b1f94bb876b066",
"size": "424",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/com/oliver/accesslogsummarizer/reader/InputStreamTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "25015"
}
],
"symlink_target": ""
} |
<?php
$this->breadcrumbs = array(
Yii::app()->getModule('image')->getCategory() => array(),
Yii::t('ImageModule.image', 'Изображения') => array('/image/default/index'),
Yii::t('ImageModule.image', 'Управление'),
);
$this->pageTitle = Yii::t('ImageModule.image', 'Изображения - управление');
$this->menu = array(
array('icon' => 'list-alt', 'label' => Yii::t('ImageModule.image', 'Управление изображениями'), 'url' => array('/image/default/index')),
array('icon' => 'plus-sign', 'label' => Yii::t('ImageModule.image', 'Добавить изображение'), 'url' => array('/image/default/create')),
);
?>
<div class="page-header">
<h1>
<?php echo ucfirst(Yii::t('ImageModule.image', 'Изображения')); ?>
<small><?php echo Yii::t('ImageModule.image', 'управление'); ?></small>
</h1>
</div>
<button class="btn btn-small dropdown-toggle" data-toggle="collapse" data-target="#search-toggle">
<i class="icon-search"> </i>
<?php echo CHtml::link(Yii::t('ImageModule.image', 'Поиск изображений'), '#', array('class' => 'search-button')); ?>
<span class="caret"> </span>
</button>
<div id="search-toggle" class="collapse out">
<?php
Yii::app()->clientScript->registerScript('search', "
$('.search-form').submit(function() {
$.fn.yiiGridView.update('image-grid', {
data: $(this).serialize()
});
return false;
});
");
$this->renderPartial('_search', array('model' => $model));
?>
</div>
<br/>
<p><?php echo Yii::t('ImageModule.image', 'В данном разделе представлены средства управления изображениями'); ?></p>
<?php $this->widget('application.modules.yupe.components.YCustomGridView', array(
'id' => 'image-grid',
'type' => 'condensed',
'dataProvider' => $model->search(),
'filter' => $model,
'columns' => array(
'id',
array(
'name' => Yii::t('ImageModule.image', 'file'),
'type' => 'raw',
'value' => 'CHtml::image($data->getUrl(), $data->alt, array("width" => 75, "height" => 75))',
),
array(
'name' => 'category_id',
'value' => '$data->getCategoryName()'
),
'name',
'alt',
array(
'class' => 'bootstrap.widgets.TbButtonColumn',
),
),
)); ?> | {
"content_hash": "6d7ee0249fb6bfaff8b44d5180638c63",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 144,
"avg_line_length": 34.85294117647059,
"alnum_prop": 0.549789029535865,
"repo_name": "flesch91/uaweb-work.github.com",
"id": "f58695d2e18430ffb3541d91a9912f896feb98f2",
"size": "2548",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "protected/modules/image/views/default/index.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "JavaScript",
"bytes": "6988231"
},
{
"name": "PHP",
"bytes": "21280457"
},
{
"name": "Ruby",
"bytes": "1384"
},
{
"name": "Shell",
"bytes": "6122"
}
],
"symlink_target": ""
} |
<html>
<head>
<title>FlashPolicyFileServer</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<style>body {
margin: 0;
padding: 0;
font: 14px/1.5 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
color: #252519;
}
a {
color: #252519;
}
a:hover {
text-decoration: underline;
color: #19469D;
}
p {
margin: 12px 0;
}
h1, h2, h3 {
margin: 0;
padding: 0;
}
table#source {
width: 100%;
border-collapse: collapse;
}
table#source td:first-child {
padding: 30px 40px 30px 40px;
vertical-align: top;
}
table#source td:first-child,
table#source td:first-child pre {
width: 450px;
}
table#source td:last-child {
padding: 30px 0 30px 40px;
border-left: 1px solid #E5E5EE;
background: #F5F5FF;
}
table#source tr {
border-bottom: 1px solid #E5E5EE;
}
table#source tr.filename {
padding-top: 40px;
border-top: 1px solid #E5E5EE;
}
table#source tr.filename td:first-child {
text-transform: capitalize;
}
table#source tr.filename td:last-child {
font-size: 12px;
}
table#source tr.filename h2 {
margin: 0;
padding: 0;
cursor: pointer;
}
table#source tr.code h1,
table#source tr.code h2,
table#source tr.code h3 {
margin-top: 30px;
font-family: "Lucida Grande", "Helvetica Nueue", Arial, sans-serif;
font-size: 18px;
}
table#source tr.code h2 {
font-size: 16px;
}
table#source tr.code h3 {
font-size: 14px;
}
table#source tr.code ul {
margin: 15px 0 15px 35px;
padding: 0;
}
table#source tr.code ul li {
margin: 0;
padding: 1px 0;
}
table#source tr.code ul li p {
margin: 0;
padding: 0;
}
table#source tr.code td:first-child pre {
padding: 20px;
}
#ribbon {
position: fixed;
top: 0;
right: 0;
}
code .string { color: #219161; }
code .regexp { color: #219161; }
code .keyword { color: #954121; }
code .number { color: #19469D; }
code .comment { color: #bbb; }
code .this { color: #19469D; }</style>
<script>
$(function(){
$('tr.code').hide();
$('tr.filename').toggle(function(){
$(this).nextUntil('.filename').fadeIn();
}, function(){
$(this).nextUntil('.filename').fadeOut();
});
});
</script>
</head>
<body>
<table id="source"><tbody><tr><td><h1>FlashPolicyFileServer</h1></td><td></td></tr><tr class="filename"><td><h2 id="lib/server.js"><a href="#">server</a></h2></td><td>lib/server.js</td></tr><tr class="code">
<td class="docs">
<p>Module dependencies and cached references.
</p>
</td>
<td class="code">
<pre><code><span class="keyword">var</span> <span class="variable">slice</span> = <span class="class">Array</span>.<span class="variable">prototype</span>.<span class="variable">slice</span>
, <span class="variable">net</span> = <span class="variable">require</span>(<span class="string">'net'</span>);</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>The server that does the Policy File severing</p>
<h2>Options</h2>
<ul><li><code>log</code> false or a function that can output log information, defaults to console.log?</li></ul>
<h2></h2>
<ul><li><p><strong>param</strong>: <em>Object</em> options Options to customize the servers functionality.</p></li><li><p><strong>param</strong>: <em>Array</em> origins The origins that are allowed on this server, defaults to <code>*:*</code>.</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="keyword">function</span> <span class="class">Server</span> (<span class="variable">options</span>, <span class="variable">origins</span>) {
<span class="keyword">var</span> <span class="variable">me</span> = <span class="this">this</span>;
<span class="this">this</span>.<span class="variable">origins</span> = <span class="variable">origins</span> || [<span class="string">'*:*'</span>];
<span class="this">this</span>.<span class="variable">port</span> = <span class="number integer">843</span>;
<span class="this">this</span>.<span class="variable">log</span> = <span class="variable">console</span>.<span class="variable">log</span>;
<span class="comment">// merge `this` with the options</span>
<span class="class">Object</span>.<span class="variable">keys</span>(<span class="variable">options</span>).<span class="variable">forEach</span>(<span class="keyword">function</span> (<span class="variable">key</span>) {
<span class="variable">me</span>[<span class="variable">key</span>] &<span class="variable">amp</span>;&<span class="variable">amp</span>; (<span class="variable">me</span>[<span class="variable">key</span>] = <span class="variable">options</span>[<span class="variable">key</span>])
});
<span class="comment">// create the net server</span>
<span class="this">this</span>.<span class="variable">socket</span> = <span class="variable">net</span>.<span class="variable">createServer</span>(<span class="keyword">function</span> <span class="variable">createServer</span> (<span class="variable">socket</span>) {
<span class="variable">socket</span>.<span class="variable">on</span>(<span class="string">'error'</span>, <span class="keyword">function</span> <span class="variable">socketError</span> () {
<span class="variable">me</span>.<span class="variable">responder</span>.<span class="variable">call</span>(<span class="variable">me</span>, <span class="variable">socket</span>);
});
<span class="variable">me</span>.<span class="variable">responder</span>.<span class="variable">call</span>(<span class="variable">me</span>, <span class="variable">socket</span>);
});
<span class="comment">// Listen for errors as the port might be blocked because we do not have root priv.</span>
<span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">on</span>(<span class="string">'error'</span>, <span class="keyword">function</span> <span class="variable">serverError</span> (<span class="variable">err</span>) {
<span class="comment">// Special and common case error handling</span>
<span class="keyword">if</span> (<span class="variable">err</span>.<span class="variable">errno</span> == <span class="number integer">13</span>) {
<span class="variable">me</span>.<span class="variable">log</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">me</span>.<span class="variable">log</span>(
<span class="string">'Unable to listen to port `'</span> + <span class="variable">me</span>.<span class="variable">port</span> + <span class="string">'` as your Node.js instance does not have root privileges. '</span> +
(
<span class="variable">me</span>.<span class="variable">server</span>
? <span class="string">'The Flash Policy File requests will only be served inline over the supplied HTTP server. Inline serving is slower than a dedicated server instance.'</span>
: <span class="string">'No fallback server supplied, we will be unable to answer Flash Policy File requests.'</span>
)
);
<span class="variable">me</span>.<span class="variable">emit</span>(<span class="string">'connect_failed'</span>, <span class="variable">err</span>);
<span class="variable">me</span>.<span class="variable">socket</span>.<span class="variable">removeAllListeners</span>();
<span class="keyword">delete</span> <span class="variable">me</span>.<span class="variable">socket</span>;
} <span class="keyword">else</span> {
<span class="variable">me</span>.<span class="variable">log</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">me</span>.<span class="variable">log</span>(<span class="string">'FlashPolicyFileServer received an error event:\n'</span> + (<span class="variable">err</span>.<span class="variable">message</span> ? <span class="variable">err</span>.<span class="variable">message</span> : <span class="variable">err</span>));
}
});
<span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">on</span>(<span class="string">'timeout'</span>, <span class="keyword">function</span> <span class="variable">serverTimeout</span> () {});
<span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">on</span>(<span class="string">'close'</span>, <span class="keyword">function</span> <span class="variable">serverClosed</span> (<span class="variable">err</span>) {
<span class="variable">err</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">me</span>.<span class="variable">log</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">me</span>.<span class="variable">log</span>(<span class="string">'Server closing due to an error: \n'</span> + (<span class="variable">err</span>.<span class="variable">message</span> ? <span class="variable">err</span>.<span class="variable">message</span> : <span class="variable">err</span>));
<span class="keyword">if</span> (<span class="variable">me</span>.<span class="variable">server</span>) {
<span class="comment">// Remove the inline policy listener if we close down</span>
<span class="comment">// but only when the server was `online` (see listen prototype)</span>
<span class="keyword">if</span> (<span class="variable">me</span>.<span class="variable">server</span>[<span class="string">'@'</span>] &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">me</span>.<span class="variable">server</span>.<span class="variable">online</span>) {
<span class="variable">me</span>.<span class="variable">server</span>.<span class="variable">removeListener</span>(<span class="string">'connection'</span>, <span class="variable">me</span>.<span class="variable">server</span>[<span class="string">'@'</span>]);
}
<span class="comment">// not online anymore</span>
<span class="keyword">delete</span> <span class="variable">me</span>.<span class="variable">server</span>.<span class="variable">online</span>;
}
});
<span class="comment">// Compile the initial `buffer`</span>
<span class="this">this</span>.<span class="variable">compile</span>();
}</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Start listening for requests</p>
<h2></h2>
<ul><li><p><strong>param</strong>: <em>Number</em> port The port number it should be listening to.</p></li><li><p><strong>param</strong>: <em>Server</em> server A HTTP server instance, this will be used to listen for inline requests</p></li><li><p><strong>param</strong>: <em>Function</em> cb The callback needs to be called once server is ready</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">listen</span> = <span class="keyword">function</span> <span class="variable">listen</span> (<span class="variable">port</span>, <span class="variable">server</span>, <span class="variable">cb</span>){
<span class="keyword">var</span> <span class="variable">me</span> = <span class="this">this</span>
, <span class="variable">args</span> = <span class="variable">slice</span>.<span class="variable">call</span>(<span class="variable">arguments</span>, <span class="number integer">0</span>)
, <span class="variable">callback</span>;
<span class="comment">// assign the correct vars, for flexible arguments</span>
<span class="variable">args</span>.<span class="variable">forEach</span>(<span class="keyword">function</span> <span class="variable">args</span> (<span class="variable">arg</span>){
<span class="keyword">var</span> <span class="variable">type</span> = <span class="keyword">typeof</span> <span class="variable">arg</span>;
<span class="keyword">if</span> (<span class="variable">type</span> === <span class="string">'number'</span>) <span class="variable">me</span>.<span class="variable">port</span> = <span class="variable">arg</span>;
<span class="keyword">if</span> (<span class="variable">type</span> === <span class="string">'function'</span>) <span class="variable">callback</span> = <span class="variable">arg</span>;
<span class="keyword">if</span> (<span class="variable">type</span> === <span class="string">'object'</span>) <span class="variable">me</span>.<span class="variable">server</span> = <span class="variable">arg</span>;
});
<span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">server</span>) {
<span class="comment">// no one in their right mind would ever create a `@` prototype, so Im just gonna store</span>
<span class="comment">// my function on the server, so I can remove it later again once the server(s) closes</span>
<span class="this">this</span>.<span class="variable">server</span>[<span class="string">'@'</span>] = <span class="keyword">function</span> <span class="variable">connection</span> (<span class="variable">socket</span>) {
<span class="variable">socket</span>.<span class="variable">once</span>(<span class="string">'data'</span>, <span class="keyword">function</span> <span class="variable">requestData</span> (<span class="variable">data</span>) {
<span class="comment">// if it's a Flash policy request, and we can write to the </span>
<span class="keyword">if</span> (
<span class="variable">data</span>
&<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">data</span>[<span class="number integer">0</span>] === <span class="number integer">60</span>
&<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">data</span>.<span class="variable">toString</span>() === <span class="string">'<policy-file-request/>\0'</span>
&<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">socket</span>
&<span class="variable">amp</span>;&<span class="variable">amp</span>; (<span class="variable">socket</span>.<span class="variable">readyState</span> === <span class="string">'open'</span> || <span class="variable">socket</span>.<span class="variable">readyState</span> === <span class="string">'writeOnly'</span>)
){
<span class="comment">// send the buffer</span>
<span class="keyword">try</span> { <span class="variable">socket</span>.<span class="variable">end</span>(<span class="variable">me</span>.<span class="variable">buffer</span>); }
<span class="keyword">catch</span> (<span class="variable">e</span>) {}
}
});
};
<span class="comment">// attach it</span>
<span class="this">this</span>.<span class="variable">server</span>.<span class="variable">on</span>(<span class="string">'connection'</span>, <span class="this">this</span>.<span class="variable">server</span>[<span class="string">'@'</span>]);
}
<span class="comment">// We add a callback method, so we can set a flag for when the server is `enabled` or `online`.</span>
<span class="comment">// this flag is needed because if a error occurs and the we cannot boot up the server the</span>
<span class="comment">// fallback functionality should not be removed during the `close` event</span>
<span class="this">this</span>.<span class="variable">port</span> &<span class="variable">gt</span>;= <span class="number integer">0</span> &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">listen</span>(<span class="this">this</span>.<span class="variable">port</span>, <span class="keyword">function</span> <span class="variable">serverListening</span> () {
<span class="variable">me</span>.<span class="variable">socket</span>.<span class="variable">online</span> = <span class="variable">true</span>;
<span class="keyword">if</span> (<span class="variable">callback</span>) {
<span class="variable">callback</span>.<span class="variable">call</span>(<span class="variable">me</span>);
<span class="variable">callback</span> = <span class="variable">undefined</span>;
}
});
<span class="keyword">return</span> <span class="this">this</span>;
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Adds a new origin to the Flash Policy File.</p>
<h2></h2>
<ul><li><p><strong>param</strong>: <em>Arguments</em> The origins that need to be added.</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">add</span> = <span class="keyword">function</span> <span class="variable">add</span>(){
<span class="keyword">var</span> <span class="variable">args</span> = <span class="variable">slice</span>.<span class="variable">call</span>(<span class="variable">arguments</span>, <span class="number integer">0</span>)
, <span class="variable">i</span> = <span class="variable">args</span>.<span class="variable">length</span>;
<span class="comment">// flag duplicates</span>
<span class="keyword">while</span> (<span class="variable">i</span>--) {
<span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">origins</span>.<span class="variable">indexOf</span>(<span class="variable">args</span>[<span class="variable">i</span>]) &<span class="variable">gt</span>;= <span class="number integer">0</span>){
<span class="variable">args</span>[<span class="variable">i</span>] = <span class="keyword">null</span>;
}
}
<span class="comment">// Add all the arguments to the array</span>
<span class="comment">// but first we want to remove all `falsy` values from the args</span>
<span class="class">Array</span>.<span class="variable">prototype</span>.<span class="variable">push</span>.<span class="variable">apply</span>(
<span class="this">this</span>.<span class="variable">origins</span>
, <span class="variable">args</span>.<span class="variable">filter</span>(<span class="keyword">function</span> <span class="variable">filter</span> (<span class="variable">value</span>) {
<span class="keyword">return</span> !!<span class="variable">value</span>;
})
);
<span class="this">this</span>.<span class="variable">compile</span>();
<span class="keyword">return</span> <span class="this">this</span>;
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Removes a origin from the Flash Policy File.</p>
<h2></h2>
<ul><li><p><strong>param</strong>: <em>String</em> origin The origin that needs to be removed from the server</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">remove</span> = <span class="keyword">function</span> <span class="variable">remove</span> (<span class="variable">origin</span>){
<span class="keyword">var</span> <span class="variable">position</span> = <span class="this">this</span>.<span class="variable">origins</span>.<span class="variable">indexOf</span>(<span class="variable">origin</span>);
<span class="comment">// only remove and recompile if we have a match</span>
<span class="keyword">if</span> (<span class="variable">position</span> &<span class="variable">gt</span>; <span class="number integer">0</span>) {
<span class="this">this</span>.<span class="variable">origins</span>.<span class="variable">splice</span>(<span class="variable">position</span>, <span class="number integer">1</span>);
<span class="this">this</span>.<span class="variable">compile</span>();
}
<span class="keyword">return</span> <span class="this">this</span>;
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Closes and cleans up the server</p>
<ul><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="class">Server</span>.<span class="variable">prototype</span>.<span class="variable">close</span> = <span class="keyword">function</span> <span class="variable">close</span> () {
<span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">removeAllListeners</span>();
<span class="keyword">try</span> { <span class="this">this</span>.<span class="variable">socket</span>.<span class="variable">close</span>(); }
<span class="keyword">catch</span> (<span class="variable">e</span>) {}
<span class="keyword">return</span> <span class="this">this</span>;
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Proxy the event listener requests to the created Net server
</p>
</td>
<td class="code">
<pre><code><span class="class">Object</span>.<span class="variable">keys</span>(<span class="variable">process</span>.<span class="class">EventEmitter</span>.<span class="variable">prototype</span>).<span class="variable">forEach</span>(<span class="keyword">function</span> <span class="variable">proxy</span> (<span class="variable">key</span>){
<span class="class">Server</span>.<span class="variable">prototype</span>[<span class="variable">key</span>] = <span class="class">Server</span>.<span class="variable">prototype</span>[<span class="variable">key</span>] || <span class="keyword">function</span> () {
<span class="keyword">if</span> (<span class="this">this</span>.<span class="variable">socket</span>) {
<span class="this">this</span>.<span class="variable">socket</span>[<span class="variable">key</span>].<span class="variable">apply</span>(<span class="this">this</span>.<span class="variable">socket</span>, <span class="variable">arguments</span>);
}
<span class="keyword">return</span> <span class="this">this</span>;
};
});</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Creates a new server instance.</p>
<h2></h2>
<ul><li><p><strong>param</strong>: <em>Object</em> options A options object to override the default config</p></li><li><p><strong>param</strong>: <em>Array</em> origins The origins that should be allowed by the server</p></li><li><p><strong>api</strong>: <em>public</em></p></li></ul>
</td>
<td class="code">
<pre><code><span class="variable">exports</span>.<span class="variable">createServer</span> = <span class="keyword">function</span> <span class="variable">createServer</span> (<span class="variable">options</span>, <span class="variable">origins</span>) {
<span class="variable">origins</span> = <span class="class">Array</span>.<span class="variable">isArray</span>(<span class="variable">origins</span>)
? <span class="variable">origins</span>
: (<span class="class">Array</span>.<span class="variable">isArray</span>(<span class="variable">options</span>) ? <span class="variable">options</span> : <span class="variable">false</span>);
<span class="variable">options</span> = !<span class="class">Array</span>.<span class="variable">isArray</span>(<span class="variable">options</span>) &<span class="variable">amp</span>;&<span class="variable">amp</span>; <span class="variable">options</span>
? <span class="variable">options</span>
: {};
<span class="keyword">return</span> <span class="keyword">new</span> <span class="class">Server</span>(<span class="variable">options</span>, <span class="variable">origins</span>);
};</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Provide a hook to the original server, so it can be extended if needed.</p>
<h2></h2>
<ul><li><p><strong>type</strong>: <em>Net.Server</em> </p></li></ul>
</td>
<td class="code">
<pre><code><span class="variable">exports</span>.<span class="class">Server</span> = <span class="class">Server</span>;</code></pre>
</td>
</tr>
<tr class="code">
<td class="docs">
<p>Module version</p>
<h2></h2>
<ul><li><p><strong>type</strong>: <em>String</em> </p></li></ul>
</td>
<td class="code">
<pre><code><span class="variable">exports</span>.<span class="variable">version</span> = <span class="string">'0.0.5'</span>;
</code></pre>
</td>
</tr> </body>
</html></tbody></table> | {
"content_hash": "b25d03037b50d2bff08cb26619c12c29",
"timestamp": "",
"source": "github",
"line_count": 396,
"max_line_length": 566,
"avg_line_length": 61.51767676767677,
"alnum_prop": 0.6617133943598374,
"repo_name": "darknessmap/server",
"id": "711eb2b05eb4c1e51bfb0d05ce6ef59dcf1b165d",
"size": "24361",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "node_modules/policyfile/doc/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "5657"
},
{
"name": "HTML",
"bytes": "2088"
},
{
"name": "JavaScript",
"bytes": "12155"
}
],
"symlink_target": ""
} |
package ethapi
import (
"bytes"
"context"
"encoding/hex"
"errors"
"fmt"
"math/big"
"strings"
"time"
"github.com/lab2528/go-oneTime/accounts"
"github.com/lab2528/go-oneTime/accounts/keystore"
"github.com/lab2528/go-oneTime/common"
"github.com/lab2528/go-oneTime/common/hexutil"
"github.com/lab2528/go-oneTime/common/math"
"github.com/lab2528/go-oneTime/consensus/ethash"
"github.com/lab2528/go-oneTime/core"
"github.com/lab2528/go-oneTime/core/types"
"github.com/lab2528/go-oneTime/core/vm"
"github.com/lab2528/go-oneTime/crypto"
"github.com/lab2528/go-oneTime/ethdb"
"github.com/lab2528/go-oneTime/log"
"github.com/lab2528/go-oneTime/p2p"
"github.com/lab2528/go-oneTime/params"
"github.com/lab2528/go-oneTime/rlp"
"github.com/lab2528/go-oneTime/rpc"
"github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/util"
)
const (
defaultGas = 90000
defaultGasPrice = 50 * params.Shannon
emptyHex = "0x"
)
// PublicEthereumAPI provides an API to access Ethereum related information.
// It offers only methods that operate on public data that is freely available to anyone.
type PublicEthereumAPI struct {
b Backend
}
// NewPublicEthereumAPI creates a new Etheruem protocol API.
func NewPublicEthereumAPI(b Backend) *PublicEthereumAPI {
return &PublicEthereumAPI{b}
}
// GasPrice returns a suggestion for a gas price.
func (s *PublicEthereumAPI) GasPrice(ctx context.Context) (*big.Int, error) {
return s.b.SuggestPrice(ctx)
}
// ProtocolVersion returns the current Ethereum protocol version this node supports
func (s *PublicEthereumAPI) ProtocolVersion() hexutil.Uint {
return hexutil.Uint(s.b.ProtocolVersion())
}
// Syncing returns false in case the node is currently not syncing with the network. It can be up to date or has not
// yet received the latest block headers from its pears. In case it is synchronizing:
// - startingBlock: block number this node started to synchronise from
// - currentBlock: block number this node is currently importing
// - highestBlock: block number of the highest block header this node has received from peers
// - pulledStates: number of state entries processed until now
// - knownStates: number of known state entries that still need to be pulled
func (s *PublicEthereumAPI) Syncing() (interface{}, error) {
progress := s.b.Downloader().Progress()
// Return not syncing if the synchronisation already completed
if progress.CurrentBlock >= progress.HighestBlock {
return false, nil
}
// Otherwise gather the block sync stats
return map[string]interface{}{
"startingBlock": hexutil.Uint64(progress.StartingBlock),
"currentBlock": hexutil.Uint64(progress.CurrentBlock),
"highestBlock": hexutil.Uint64(progress.HighestBlock),
"pulledStates": hexutil.Uint64(progress.PulledStates),
"knownStates": hexutil.Uint64(progress.KnownStates),
}, nil
}
// PublicTxPoolAPI offers and API for the transaction pool. It only operates on data that is non confidential.
type PublicTxPoolAPI struct {
b Backend
}
// NewPublicTxPoolAPI creates a new tx pool service that gives information about the transaction pool.
func NewPublicTxPoolAPI(b Backend) *PublicTxPoolAPI {
return &PublicTxPoolAPI{b}
}
// Content returns the transactions contained within the transaction pool.
func (s *PublicTxPoolAPI) Content() map[string]map[string]map[string]*RPCTransaction {
content := map[string]map[string]map[string]*RPCTransaction{
"pending": make(map[string]map[string]*RPCTransaction),
"queued": make(map[string]map[string]*RPCTransaction),
}
pending, queue := s.b.TxPoolContent()
// Flatten the pending transactions
for account, txs := range pending {
dump := make(map[string]*RPCTransaction)
for nonce, tx := range txs {
dump[fmt.Sprintf("%d", nonce)] = newRPCPendingTransaction(tx)
}
content["pending"][account.Hex()] = dump
}
// Flatten the queued transactions
for account, txs := range queue {
dump := make(map[string]*RPCTransaction)
for nonce, tx := range txs {
dump[fmt.Sprintf("%d", nonce)] = newRPCPendingTransaction(tx)
}
content["queued"][account.Hex()] = dump
}
return content
}
// Status returns the number of pending and queued transaction in the pool.
func (s *PublicTxPoolAPI) Status() map[string]hexutil.Uint {
pending, queue := s.b.Stats()
return map[string]hexutil.Uint{
"pending": hexutil.Uint(pending),
"queued": hexutil.Uint(queue),
}
}
// Inspect retrieves the content of the transaction pool and flattens it into an
// easily inspectable list.
func (s *PublicTxPoolAPI) Inspect() map[string]map[string]map[string]string {
content := map[string]map[string]map[string]string{
"pending": make(map[string]map[string]string),
"queued": make(map[string]map[string]string),
}
pending, queue := s.b.TxPoolContent()
// Define a formatter to flatten a transaction into a string
var format = func(tx *types.Transaction) string {
if to := tx.To(); to != nil {
return fmt.Sprintf("%s: %v wei + %v × %v gas", tx.To().Hex(), tx.Value(), tx.Gas(), tx.GasPrice())
}
return fmt.Sprintf("contract creation: %v wei + %v × %v gas", tx.Value(), tx.Gas(), tx.GasPrice())
}
// Flatten the pending transactions
for account, txs := range pending {
dump := make(map[string]string)
for nonce, tx := range txs {
dump[fmt.Sprintf("%d", nonce)] = format(tx)
}
content["pending"][account.Hex()] = dump
}
// Flatten the queued transactions
for account, txs := range queue {
dump := make(map[string]string)
for nonce, tx := range txs {
dump[fmt.Sprintf("%d", nonce)] = format(tx)
}
content["queued"][account.Hex()] = dump
}
return content
}
// PublicAccountAPI provides an API to access accounts managed by this node.
// It offers only methods that can retrieve accounts.
type PublicAccountAPI struct {
am *accounts.Manager
}
// NewPublicAccountAPI creates a new PublicAccountAPI.
func NewPublicAccountAPI(am *accounts.Manager) *PublicAccountAPI {
return &PublicAccountAPI{am: am}
}
// Accounts returns the collection of accounts this node manages
func (s *PublicAccountAPI) Accounts() []common.Address {
var addresses []common.Address
for _, wallet := range s.am.Wallets() {
for _, account := range wallet.Accounts() {
addresses = append(addresses, account.Address)
}
}
return addresses
}
// PrivateAccountAPI provides an API to access accounts managed by this node.
// It offers methods to create, (un)lock en list accounts. Some methods accept
// passwords and are therefore considered private by default.
type PrivateAccountAPI struct {
am *accounts.Manager
b Backend
}
// NewPrivateAccountAPI create a new PrivateAccountAPI.
func NewPrivateAccountAPI(b Backend) *PrivateAccountAPI {
return &PrivateAccountAPI{
am: b.AccountManager(),
b: b,
}
}
// ListAccounts will return a list of addresses for accounts this node manages.
func (s *PrivateAccountAPI) ListAccounts() []common.Address {
var addresses []common.Address
for _, wallet := range s.am.Wallets() {
for _, account := range wallet.Accounts() {
addresses = append(addresses, account.Address)
}
}
return addresses
}
// rawWallet is a JSON representation of an accounts.Wallet interface, with its
// data contents extracted into plain fields.
type rawWallet struct {
URL string `json:"url"`
Status string `json:"status"`
Accounts []accounts.Account `json:"accounts"`
}
// ListWallets will return a list of wallets this node manages.
func (s *PrivateAccountAPI) ListWallets() []rawWallet {
var wallets []rawWallet
for _, wallet := range s.am.Wallets() {
wallets = append(wallets, rawWallet{
URL: wallet.URL().String(),
Status: wallet.Status(),
Accounts: wallet.Accounts(),
})
}
return wallets
}
// DeriveAccount requests a HD wallet to derive a new account, optionally pinning
// it for later reuse.
func (s *PrivateAccountAPI) DeriveAccount(url string, path string, pin *bool) (accounts.Account, error) {
wallet, err := s.am.Wallet(url)
if err != nil {
return accounts.Account{}, err
}
derivPath, err := accounts.ParseDerivationPath(path)
if err != nil {
return accounts.Account{}, err
}
if pin == nil {
pin = new(bool)
}
return wallet.Derive(derivPath, *pin)
}
// NewAccount will create a new account and returns the address for the new account.
func (s *PrivateAccountAPI) NewAccount(password string) (common.Address, error) {
acc, err := fetchKeystore(s.am).NewAccount(password)
if err == nil {
return acc.Address, nil
}
return common.Address{}, err
}
// fetchKeystore retrives the encrypted keystore from the account manager.
func fetchKeystore(am *accounts.Manager) *keystore.KeyStore {
return am.Backends(keystore.KeyStoreType)[0].(*keystore.KeyStore)
}
// ImportRawKey stores the given hex encoded ECDSA key into the key directory,
// encrypting it with the passphrase.
//////////////////////
// 2528 add privkey2//
//////////////////////
func (s *PrivateAccountAPI) ImportRawKey(privkey string, privkey2 string, password string) (common.Address, error) {
hexkey, err := hex.DecodeString(privkey)
if err != nil {
return common.Address{}, err
}
hexkey2, err := hex.DecodeString(privkey2)
if err != nil {
return common.Address{}, err
}
acc, err := fetchKeystore(s.am).ImportECDSA(crypto.ToECDSA(hexkey), crypto.ToECDSA(hexkey2), password)
return acc.Address, err
}
// UnlockAccount will unlock the account associated with the given address with
// the given password for duration seconds. If duration is nil it will use a
// default of 300 seconds. It returns an indication if the account was unlocked.
func (s *PrivateAccountAPI) UnlockAccount(addr common.Address, password string, duration *uint64) (bool, error) {
const max = uint64(time.Duration(math.MaxInt64) / time.Second)
var d time.Duration
if duration == nil {
d = 300 * time.Second
} else if *duration > max {
return false, errors.New("unlock duration too large")
} else {
d = time.Duration(*duration) * time.Second
}
err := fetchKeystore(s.am).TimedUnlock(accounts.Account{Address: addr}, password, d)
return err == nil, err
}
// LockAccount will lock the account associated with the given address when it's unlocked.
func (s *PrivateAccountAPI) LockAccount(addr common.Address) bool {
return fetchKeystore(s.am).Lock(addr) == nil
}
// SendTransaction will create a transaction from the given arguments and
// tries to sign it with the key associated with args.To. If the given passwd isn't
// able to decrypt the key it fails.
func (s *PrivateAccountAPI) SendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) {
// Set some sanity defaults and terminate on failure
if err := args.setDefaults(ctx, s.b); err != nil {
return common.Hash{}, err
}
// Look up the wallet containing the requested signer
account := accounts.Account{Address: args.From}
wallet, err := s.am.Find(account)
if err != nil {
return common.Hash{}, err
}
// Assemble the transaction and sign with the wallet
tx := args.toTransaction()
var chainID *big.Int
if config := s.b.ChainConfig(); config.IsEIP155(s.b.CurrentBlock().Number()) {
chainID = config.ChainId
}
signed, err := wallet.SignTxWithPassphrase(account, passwd, tx, chainID)
if err != nil {
return common.Hash{}, err
}
return submitTransaction(ctx, s.b, signed)
}
// signHash is a helper function that calculates a hash for the given message that can be
// safely used to calculate a signature from.
//
// The hash is calulcated as
// keccak256("\x19Ethereum Signed Message:\n"${message length}${message}).
//
// This gives context to the signed message and prevents signing of transactions.
func signHash(data []byte) []byte {
msg := fmt.Sprintf("\x19Ethereum Signed Message:\n%d%s", len(data), data)
return crypto.Keccak256([]byte(msg))
}
// Sign calculates an Ethereum ECDSA signature for:
// keccack256("\x19Ethereum Signed Message:\n" + len(message) + message))
//
// Note, the produced signature conforms to the secp256k1 curve R, S and V values,
// where the V value will be 27 or 28 for legacy reasons.
//
// The key used to calculate the signature is decrypted with the given password.
//
// https://github.com/lab2528/go-oneTime/wiki/Management-APIs#personal_sign
func (s *PrivateAccountAPI) Sign(ctx context.Context, data hexutil.Bytes, addr common.Address, passwd string) (hexutil.Bytes, error) {
// Look up the wallet containing the requested signer
account := accounts.Account{Address: addr}
wallet, err := s.b.AccountManager().Find(account)
if err != nil {
return nil, err
}
// Assemble sign the data with the wallet
signature, err := wallet.SignHashWithPassphrase(account, passwd, signHash(data))
if err != nil {
return nil, err
}
signature[64] += 27 // Transform V from 0/1 to 27/28 according to the yellow paper
return signature, nil
}
// EcRecover returns the address for the account that was used to create the signature.
// Note, this function is compatible with eth_sign and personal_sign. As such it recovers
// the address of:
// hash = keccak256("\x19Ethereum Signed Message:\n"${message length}${message})
// addr = ecrecover(hash, signature)
//
// Note, the signature must conform to the secp256k1 curve R, S and V values, where
// the V value must be be 27 or 28 for legacy reasons.
//
// https://github.com/lab2528/go-oneTime/wiki/Management-APIs#personal_ecRecover
func (s *PrivateAccountAPI) EcRecover(ctx context.Context, data, sig hexutil.Bytes) (common.Address, error) {
if len(sig) != 65 {
return common.Address{}, fmt.Errorf("signature must be 65 bytes long")
}
if sig[64] != 27 && sig[64] != 28 {
return common.Address{}, fmt.Errorf("invalid Ethereum signature (V is not 27 or 28)")
}
sig[64] -= 27 // Transform yellow paper V from 27/28 to 0/1
rpk, err := crypto.Ecrecover(signHash(data), sig)
if err != nil {
return common.Address{}, err
}
pubKey := crypto.ToECDSAPub(rpk)
recoveredAddr := crypto.PubkeyToAddress(*pubKey)
return recoveredAddr, nil
}
// SignAndSendTransaction was renamed to SendTransaction. This method is deprecated
// and will be removed in the future. It primary goal is to give clients time to update.
func (s *PrivateAccountAPI) SignAndSendTransaction(ctx context.Context, args SendTxArgs, passwd string) (common.Hash, error) {
return s.SendTransaction(ctx, args, passwd)
}
// PublicBlockChainAPI provides an API to access the Ethereum blockchain.
// It offers only methods that operate on public data that is freely available to anyone.
type PublicBlockChainAPI struct {
b Backend
}
// NewPublicBlockChainAPI creates a new Etheruem blockchain API.
func NewPublicBlockChainAPI(b Backend) *PublicBlockChainAPI {
return &PublicBlockChainAPI{b}
}
// BlockNumber returns the block number of the chain head.
func (s *PublicBlockChainAPI) BlockNumber() *big.Int {
header, _ := s.b.HeaderByNumber(context.Background(), rpc.LatestBlockNumber) // latest header should always be available
return header.Number
}
// GetBalance returns the amount of wei for the given address in the state of the
// given block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta
// block numbers are also allowed.
func (s *PublicBlockChainAPI) GetBalance(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*big.Int, error) {
state, _, err := s.b.StateAndHeaderByNumber(ctx, blockNr)
if state == nil || err != nil {
return nil, err
}
return state.GetBalance(ctx, address)
}
// GetBlockByNumber returns the requested block. When blockNr is -1 the chain head is returned. When fullTx is true all
// transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, blockNr rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) {
block, err := s.b.BlockByNumber(ctx, blockNr)
if block != nil {
response, err := s.rpcOutputBlock(block, true, fullTx)
if err == nil && blockNr == rpc.PendingBlockNumber {
// Pending blocks need to nil out a few fields
for _, field := range []string{"hash", "nonce", "miner"} {
response[field] = nil
}
}
return response, err
}
return nil, err
}
// GetBlockByHash returns the requested block. When fullTx is true all transactions in the block are returned in full
// detail, otherwise only the transaction hash is returned.
func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, blockHash common.Hash, fullTx bool) (map[string]interface{}, error) {
block, err := s.b.GetBlock(ctx, blockHash)
if block != nil {
return s.rpcOutputBlock(block, true, fullTx)
}
return nil, err
}
// GetUncleByBlockNumberAndIndex returns the uncle block for the given block hash and index. When fullTx is true
// all transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
func (s *PublicBlockChainAPI) GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error) {
block, err := s.b.BlockByNumber(ctx, blockNr)
if block != nil {
uncles := block.Uncles()
if index >= hexutil.Uint(len(uncles)) {
log.Debug("Requested uncle not found", "number", blockNr, "hash", block.Hash(), "index", index)
return nil, nil
}
block = types.NewBlockWithHeader(uncles[index])
return s.rpcOutputBlock(block, false, false)
}
return nil, err
}
// GetUncleByBlockHashAndIndex returns the uncle block for the given block hash and index. When fullTx is true
// all transactions in the block are returned in full detail, otherwise only the transaction hash is returned.
func (s *PublicBlockChainAPI) GetUncleByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (map[string]interface{}, error) {
block, err := s.b.GetBlock(ctx, blockHash)
if block != nil {
uncles := block.Uncles()
if index >= hexutil.Uint(len(uncles)) {
log.Debug("Requested uncle not found", "number", block.Number(), "hash", blockHash, "index", index)
return nil, nil
}
block = types.NewBlockWithHeader(uncles[index])
return s.rpcOutputBlock(block, false, false)
}
return nil, err
}
// GetUncleCountByBlockNumber returns number of uncles in the block for the given block number
func (s *PublicBlockChainAPI) GetUncleCountByBlockNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint {
if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {
n := hexutil.Uint(len(block.Uncles()))
return &n
}
return nil
}
// GetUncleCountByBlockHash returns number of uncles in the block for the given block hash
func (s *PublicBlockChainAPI) GetUncleCountByBlockHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint {
if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
n := hexutil.Uint(len(block.Uncles()))
return &n
}
return nil
}
// GetCode returns the code stored at the given address in the state for the given block number.
func (s *PublicBlockChainAPI) GetCode(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (string, error) {
state, _, err := s.b.StateAndHeaderByNumber(ctx, blockNr)
if state == nil || err != nil {
return "", err
}
res, err := state.GetCode(ctx, address)
if len(res) == 0 || err != nil { // backwards compatibility
return "0x", err
}
return common.ToHex(res), nil
}
// GetStorageAt returns the storage from the state at the given address, key and
// block number. The rpc.LatestBlockNumber and rpc.PendingBlockNumber meta block
// numbers are also allowed.
func (s *PublicBlockChainAPI) GetStorageAt(ctx context.Context, address common.Address, key string, blockNr rpc.BlockNumber) (string, error) {
state, _, err := s.b.StateAndHeaderByNumber(ctx, blockNr)
if state == nil || err != nil {
return "0x", err
}
res, err := state.GetState(ctx, address, common.HexToHash(key))
if err != nil {
return "0x", err
}
return res.Hex(), nil
}
// callmsg is the message type used for call transitions.
type callmsg struct {
addr common.Address
to *common.Address
gas, gasPrice *big.Int
value *big.Int
data []byte
}
// accessor boilerplate to implement core.Message
func (m callmsg) From() (common.Address, error) { return m.addr, nil }
func (m callmsg) FromFrontier() (common.Address, error) { return m.addr, nil }
func (m callmsg) Nonce() uint64 { return 0 }
func (m callmsg) CheckNonce() bool { return false }
func (m callmsg) To() *common.Address { return m.to }
func (m callmsg) GasPrice() *big.Int { return m.gasPrice }
func (m callmsg) Gas() *big.Int { return m.gas }
func (m callmsg) Value() *big.Int { return m.value }
func (m callmsg) Data() []byte { return m.data }
// CallArgs represents the arguments for a call.
type CallArgs struct {
From common.Address `json:"from"`
To *common.Address `json:"to"`
Gas hexutil.Big `json:"gas"`
GasPrice hexutil.Big `json:"gasPrice"`
Value hexutil.Big `json:"value"`
Data hexutil.Bytes `json:"data"`
}
func (s *PublicBlockChainAPI) doCall(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber, vmCfg vm.Config) ([]byte, *big.Int, error) {
defer func(start time.Time) { log.Debug("Executing EVM call finished", "runtime", time.Since(start)) }(time.Now())
state, header, err := s.b.StateAndHeaderByNumber(ctx, blockNr)
if state == nil || err != nil {
return nil, common.Big0, err
}
// Set sender address or use a default if none specified
addr := args.From
if addr == (common.Address{}) {
if wallets := s.b.AccountManager().Wallets(); len(wallets) > 0 {
if accounts := wallets[0].Accounts(); len(accounts) > 0 {
addr = accounts[0].Address
}
}
}
// Set default gas & gas price if none were set
gas, gasPrice := args.Gas.ToInt(), args.GasPrice.ToInt()
if gas.Sign() == 0 {
gas = big.NewInt(50000000)
}
if gasPrice.Sign() == 0 {
gasPrice = new(big.Int).SetUint64(defaultGasPrice)
}
// Create new call message
msg := types.NewMessage(addr, args.To, 0, args.Value.ToInt(), gas, gasPrice, args.Data, false)
// Setup context so it may be cancelled the call has completed
// or, in case of unmetered gas, setup a context with a timeout.
var cancel context.CancelFunc
if vmCfg.DisableGasMetering {
ctx, cancel = context.WithTimeout(ctx, time.Second*5)
} else {
ctx, cancel = context.WithCancel(ctx)
}
// Make sure the context is cancelled when the call has completed
// this makes sure resources are cleaned up.
defer func() { cancel() }()
// Get a new instance of the EVM.
evm, vmError, err := s.b.GetEVM(ctx, msg, state, header, vmCfg)
if err != nil {
return nil, common.Big0, err
}
// Wait for the context to be done and cancel the evm. Even if the
// EVM has finished, cancelling may be done (repeatedly)
go func() {
select {
case <-ctx.Done():
evm.Cancel()
}
}()
// Setup the gas pool (also for unmetered requests)
// and apply the message.
gp := new(core.GasPool).AddGas(math.MaxBig256)
res, gas, err := core.ApplyMessage(evm, msg, gp)
if err := vmError(); err != nil {
return nil, common.Big0, err
}
return res, gas, err
}
// Call executes the given transaction on the state for the given block number.
// It doesn't make and changes in the state/blockchain and is useful to execute and retrieve values.
func (s *PublicBlockChainAPI) Call(ctx context.Context, args CallArgs, blockNr rpc.BlockNumber) (hexutil.Bytes, error) {
result, _, err := s.doCall(ctx, args, blockNr, vm.Config{DisableGasMetering: true})
return (hexutil.Bytes)(result), err
}
// EstimateGas returns an estimate of the amount of gas needed to execute the given transaction.
func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs) (*hexutil.Big, error) {
// Binary search the gas requirement, as it may be higher than the amount used
var lo, hi uint64
if (*big.Int)(&args.Gas).Sign() != 0 {
hi = (*big.Int)(&args.Gas).Uint64()
} else {
// Retrieve the current pending block to act as the gas ceiling
block, err := s.b.BlockByNumber(ctx, rpc.PendingBlockNumber)
if err != nil {
return nil, err
}
hi = block.GasLimit().Uint64()
}
for lo+1 < hi {
// Take a guess at the gas, and check transaction validity
mid := (hi + lo) / 2
(*big.Int)(&args.Gas).SetUint64(mid)
_, gas, err := s.doCall(ctx, args, rpc.PendingBlockNumber, vm.Config{})
// If the transaction became invalid or used all the gas (failed), raise the gas limit
if err != nil || gas.Cmp((*big.Int)(&args.Gas)) == 0 {
lo = mid
continue
}
// Otherwise assume the transaction succeeded, lower the gas limit
hi = mid
}
return (*hexutil.Big)(new(big.Int).SetUint64(hi)), nil
}
// ExecutionResult groups all structured logs emitted by the EVM
// while replaying a transaction in debug mode as well as the amount of
// gas used and the return value
type ExecutionResult struct {
Gas *big.Int `json:"gas"`
ReturnValue string `json:"returnValue"`
StructLogs []StructLogRes `json:"structLogs"`
}
// StructLogRes stores a structured log emitted by the EVM while replaying a
// transaction in debug mode
type StructLogRes struct {
Pc uint64 `json:"pc"`
Op string `json:"op"`
Gas uint64 `json:"gas"`
GasCost uint64 `json:"gasCost"`
Depth int `json:"depth"`
Error error `json:"error"`
Stack []string `json:"stack"`
Memory []string `json:"memory"`
Storage map[string]string `json:"storage"`
}
// formatLogs formats EVM returned structured logs for json output
func FormatLogs(structLogs []vm.StructLog) []StructLogRes {
formattedStructLogs := make([]StructLogRes, len(structLogs))
for index, trace := range structLogs {
formattedStructLogs[index] = StructLogRes{
Pc: trace.Pc,
Op: trace.Op.String(),
Gas: trace.Gas,
GasCost: trace.GasCost,
Depth: trace.Depth,
Error: trace.Err,
Stack: make([]string, len(trace.Stack)),
Storage: make(map[string]string),
}
for i, stackValue := range trace.Stack {
formattedStructLogs[index].Stack[i] = fmt.Sprintf("%x", math.PaddedBigBytes(stackValue, 32))
}
for i := 0; i+32 <= len(trace.Memory); i += 32 {
formattedStructLogs[index].Memory = append(formattedStructLogs[index].Memory, fmt.Sprintf("%x", trace.Memory[i:i+32]))
}
for i, storageValue := range trace.Storage {
formattedStructLogs[index].Storage[fmt.Sprintf("%x", i)] = fmt.Sprintf("%x", storageValue)
}
}
return formattedStructLogs
}
// rpcOutputBlock converts the given block to the RPC output which depends on fullTx. If inclTx is true transactions are
// returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain
// transaction hashes.
func (s *PublicBlockChainAPI) rpcOutputBlock(b *types.Block, inclTx bool, fullTx bool) (map[string]interface{}, error) {
head := b.Header() // copies the header once
fields := map[string]interface{}{
"number": (*hexutil.Big)(head.Number),
"hash": b.Hash(),
"parentHash": head.ParentHash,
"nonce": head.Nonce,
"mixHash": head.MixDigest,
"sha3Uncles": head.UncleHash,
"logsBloom": head.Bloom,
"stateRoot": head.Root,
"miner": head.Coinbase,
"difficulty": (*hexutil.Big)(head.Difficulty),
"totalDifficulty": (*hexutil.Big)(s.b.GetTd(b.Hash())),
"extraData": hexutil.Bytes(head.Extra),
"size": hexutil.Uint64(uint64(b.Size().Int64())),
"gasLimit": (*hexutil.Big)(head.GasLimit),
"gasUsed": (*hexutil.Big)(head.GasUsed),
"timestamp": (*hexutil.Big)(head.Time),
"transactionsRoot": head.TxHash,
"receiptsRoot": head.ReceiptHash,
}
if inclTx {
formatTx := func(tx *types.Transaction) (interface{}, error) {
return tx.Hash(), nil
}
if fullTx {
formatTx = func(tx *types.Transaction) (interface{}, error) {
return newRPCTransaction(b, tx.Hash())
}
}
txs := b.Transactions()
transactions := make([]interface{}, len(txs))
var err error
for i, tx := range b.Transactions() {
if transactions[i], err = formatTx(tx); err != nil {
return nil, err
}
}
fields["transactions"] = transactions
}
uncles := b.Uncles()
uncleHashes := make([]common.Hash, len(uncles))
for i, uncle := range uncles {
uncleHashes[i] = uncle.Hash()
}
fields["uncles"] = uncleHashes
return fields, nil
}
// RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
type RPCTransaction struct {
BlockHash common.Hash `json:"blockHash"`
BlockNumber *hexutil.Big `json:"blockNumber"`
From common.Address `json:"from"`
Gas *hexutil.Big `json:"gas"`
GasPrice *hexutil.Big `json:"gasPrice"`
Hash common.Hash `json:"hash"`
Input hexutil.Bytes `json:"input"`
Nonce hexutil.Uint64 `json:"nonce"`
To *common.Address `json:"to"`
TransactionIndex hexutil.Uint `json:"transactionIndex"`
Value *hexutil.Big `json:"value"`
V *hexutil.Big `json:"v"`
R *hexutil.Big `json:"r"`
S *hexutil.Big `json:"s"`
}
// newRPCPendingTransaction returns a pending transaction that will serialize to the RPC representation
func newRPCPendingTransaction(tx *types.Transaction) *RPCTransaction {
var signer types.Signer = types.FrontierSigner{}
if tx.Protected() {
signer = types.NewEIP155Signer(tx.ChainId())
}
from, _ := types.Sender(signer, tx)
v, r, s := tx.RawSignatureValues()
return &RPCTransaction{
From: from,
Gas: (*hexutil.Big)(tx.Gas()),
GasPrice: (*hexutil.Big)(tx.GasPrice()),
Hash: tx.Hash(),
Input: hexutil.Bytes(tx.Data()),
Nonce: hexutil.Uint64(tx.Nonce()),
To: tx.To(),
Value: (*hexutil.Big)(tx.Value()),
V: (*hexutil.Big)(v),
R: (*hexutil.Big)(r),
S: (*hexutil.Big)(s),
}
}
// newRPCTransaction returns a transaction that will serialize to the RPC representation.
func newRPCTransactionFromBlockIndex(b *types.Block, txIndex uint) (*RPCTransaction, error) {
if txIndex < uint(len(b.Transactions())) {
tx := b.Transactions()[txIndex]
var signer types.Signer = types.FrontierSigner{}
if tx.Protected() {
signer = types.NewEIP155Signer(tx.ChainId())
}
from, _ := types.Sender(signer, tx)
v, r, s := tx.RawSignatureValues()
return &RPCTransaction{
BlockHash: b.Hash(),
BlockNumber: (*hexutil.Big)(b.Number()),
From: from,
Gas: (*hexutil.Big)(tx.Gas()),
GasPrice: (*hexutil.Big)(tx.GasPrice()),
Hash: tx.Hash(),
Input: hexutil.Bytes(tx.Data()),
Nonce: hexutil.Uint64(tx.Nonce()),
To: tx.To(),
TransactionIndex: hexutil.Uint(txIndex),
Value: (*hexutil.Big)(tx.Value()),
V: (*hexutil.Big)(v),
R: (*hexutil.Big)(r),
S: (*hexutil.Big)(s),
}, nil
}
return nil, nil
}
// newRPCRawTransactionFromBlockIndex returns the bytes of a transaction given a block and a transaction index.
func newRPCRawTransactionFromBlockIndex(b *types.Block, txIndex uint) (hexutil.Bytes, error) {
if txIndex < uint(len(b.Transactions())) {
tx := b.Transactions()[txIndex]
return rlp.EncodeToBytes(tx)
}
return nil, nil
}
// newRPCTransaction returns a transaction that will serialize to the RPC representation.
func newRPCTransaction(b *types.Block, txHash common.Hash) (*RPCTransaction, error) {
for idx, tx := range b.Transactions() {
if tx.Hash() == txHash {
return newRPCTransactionFromBlockIndex(b, uint(idx))
}
}
return nil, nil
}
// PublicTransactionPoolAPI exposes methods for the RPC interface
type PublicTransactionPoolAPI struct {
b Backend
}
// NewPublicTransactionPoolAPI creates a new RPC service with methods specific for the transaction pool.
func NewPublicTransactionPoolAPI(b Backend) *PublicTransactionPoolAPI {
return &PublicTransactionPoolAPI{b}
}
func getTransaction(chainDb ethdb.Database, b Backend, txHash common.Hash) (*types.Transaction, bool, error) {
txData, err := chainDb.Get(txHash.Bytes())
isPending := false
tx := new(types.Transaction)
if err == nil && len(txData) > 0 {
if err := rlp.DecodeBytes(txData, tx); err != nil {
return nil, isPending, err
}
} else {
// pending transaction?
tx = b.GetPoolTransaction(txHash)
isPending = true
}
return tx, isPending, nil
}
// GetBlockTransactionCountByNumber returns the number of transactions in the block with the given block number.
func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) *hexutil.Uint {
if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {
n := hexutil.Uint(len(block.Transactions()))
return &n
}
return nil
}
// GetBlockTransactionCountByHash returns the number of transactions in the block with the given hash.
func (s *PublicTransactionPoolAPI) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) *hexutil.Uint {
if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
n := hexutil.Uint(len(block.Transactions()))
return &n
}
return nil
}
// GetTransactionByBlockNumberAndIndex returns the transaction for the given block number and index.
func (s *PublicTransactionPoolAPI) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (*RPCTransaction, error) {
if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {
return newRPCTransactionFromBlockIndex(block, uint(index))
}
return nil, nil
}
// GetTransactionByBlockHashAndIndex returns the transaction for the given block hash and index.
func (s *PublicTransactionPoolAPI) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (*RPCTransaction, error) {
if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
return newRPCTransactionFromBlockIndex(block, uint(index))
}
return nil, nil
}
// GetRawTransactionByBlockNumberAndIndex returns the bytes of the transaction for the given block number and index.
func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (hexutil.Bytes, error) {
if block, _ := s.b.BlockByNumber(ctx, blockNr); block != nil {
return newRPCRawTransactionFromBlockIndex(block, uint(index))
}
return nil, nil
}
// GetRawTransactionByBlockHashAndIndex returns the bytes of the transaction for the given block hash and index.
func (s *PublicTransactionPoolAPI) GetRawTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, index hexutil.Uint) (hexutil.Bytes, error) {
if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
return newRPCRawTransactionFromBlockIndex(block, uint(index))
}
return nil, nil
}
// GetTransactionCount returns the number of transactions the given address has sent for the given block number
func (s *PublicTransactionPoolAPI) GetTransactionCount(ctx context.Context, address common.Address, blockNr rpc.BlockNumber) (*hexutil.Uint64, error) {
state, _, err := s.b.StateAndHeaderByNumber(ctx, blockNr)
if state == nil || err != nil {
return nil, err
}
nonce, err := state.GetNonce(ctx, address)
if err != nil {
return nil, err
}
return (*hexutil.Uint64)(&nonce), nil
}
// getTransactionBlockData fetches the meta data for the given transaction from the chain database. This is useful to
// retrieve block information for a hash. It returns the block hash, block index and transaction index.
func getTransactionBlockData(chainDb ethdb.Database, txHash common.Hash) (common.Hash, uint64, uint64, error) {
var txBlock struct {
BlockHash common.Hash
BlockIndex uint64
Index uint64
}
blockData, err := chainDb.Get(append(txHash.Bytes(), 0x0001))
if err != nil {
return common.Hash{}, uint64(0), uint64(0), err
}
reader := bytes.NewReader(blockData)
if err = rlp.Decode(reader, &txBlock); err != nil {
return common.Hash{}, uint64(0), uint64(0), err
}
return txBlock.BlockHash, txBlock.BlockIndex, txBlock.Index, nil
}
// GetTransactionByHash returns the transaction for the given hash
func (s *PublicTransactionPoolAPI) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) {
var tx *types.Transaction
var isPending bool
var err error
if tx, isPending, err = getTransaction(s.b.ChainDb(), s.b, hash); err != nil {
log.Debug("Failed to retrieve transaction", "hash", hash, "err", err)
return nil, nil
} else if tx == nil {
return nil, nil
}
if isPending {
return newRPCPendingTransaction(tx), nil
}
blockHash, _, _, err := getTransactionBlockData(s.b.ChainDb(), hash)
if err != nil {
log.Debug("Failed to retrieve transaction block", "hash", hash, "err", err)
return nil, nil
}
if block, _ := s.b.GetBlock(ctx, blockHash); block != nil {
return newRPCTransaction(block, hash)
}
return nil, nil
}
// GetRawTransactionByHash returns the bytes of the transaction for the given hash.
func (s *PublicTransactionPoolAPI) GetRawTransactionByHash(ctx context.Context, hash common.Hash) (hexutil.Bytes, error) {
var tx *types.Transaction
var err error
if tx, _, err = getTransaction(s.b.ChainDb(), s.b, hash); err != nil {
log.Debug("Failed to retrieve transaction", "hash", hash, "err", err)
return nil, nil
} else if tx == nil {
return nil, nil
}
return rlp.EncodeToBytes(tx)
}
// GetTransactionReceipt returns the transaction receipt for the given transaction hash.
func (s *PublicTransactionPoolAPI) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error) {
receipt := core.GetReceipt(s.b.ChainDb(), hash)
if receipt == nil {
log.Debug("Receipt not found for transaction", "hash", hash)
return nil, nil
}
tx, _, err := getTransaction(s.b.ChainDb(), s.b, hash)
if err != nil {
log.Debug("Failed to retrieve transaction", "hash", hash, "err", err)
return nil, nil
}
txBlock, blockIndex, index, err := getTransactionBlockData(s.b.ChainDb(), hash)
if err != nil {
log.Debug("Failed to retrieve transaction block", "hash", hash, "err", err)
return nil, nil
}
var signer types.Signer = types.FrontierSigner{}
if tx.Protected() {
signer = types.NewEIP155Signer(tx.ChainId())
}
from, _ := types.Sender(signer, tx)
fields := map[string]interface{}{
"root": hexutil.Bytes(receipt.PostState),
"blockHash": txBlock,
"blockNumber": hexutil.Uint64(blockIndex),
"transactionHash": hash,
"transactionIndex": hexutil.Uint64(index),
"from": from,
"to": tx.To(),
"gasUsed": (*hexutil.Big)(receipt.GasUsed),
"cumulativeGasUsed": (*hexutil.Big)(receipt.CumulativeGasUsed),
"contractAddress": nil,
"logs": receipt.Logs,
"logsBloom": receipt.Bloom,
}
if receipt.Logs == nil {
fields["logs"] = [][]*types.Log{}
}
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
if receipt.ContractAddress != (common.Address{}) {
fields["contractAddress"] = receipt.ContractAddress
}
return fields, nil
}
// sign is a helper function that signs a transaction with the private key of the given address.
func (s *PublicTransactionPoolAPI) sign(addr common.Address, tx *types.Transaction) (*types.Transaction, error) {
// Look up the wallet containing the requested signer
account := accounts.Account{Address: addr}
wallet, err := s.b.AccountManager().Find(account)
if err != nil {
return nil, err
}
// Request the wallet to sign the transaction
var chainID *big.Int
if config := s.b.ChainConfig(); config.IsEIP155(s.b.CurrentBlock().Number()) {
chainID = config.ChainId
}
return wallet.SignTx(account, tx, chainID)
}
// SendTxArgs represents the arguments to sumbit a new transaction into the transaction pool.
type SendTxArgs struct {
From common.Address `json:"from"`
To *common.Address `json:"to"`
Gas *hexutil.Big `json:"gas"`
GasPrice *hexutil.Big `json:"gasPrice"`
Value *hexutil.Big `json:"value"`
Data hexutil.Bytes `json:"data"`
Nonce *hexutil.Uint64 `json:"nonce"`
}
// prepareSendTxArgs is a helper function that fills in default values for unspecified tx fields.
func (args *SendTxArgs) setDefaults(ctx context.Context, b Backend) error {
if args.Gas == nil {
args.Gas = (*hexutil.Big)(big.NewInt(defaultGas))
}
if args.GasPrice == nil {
price, err := b.SuggestPrice(ctx)
if err != nil {
return err
}
args.GasPrice = (*hexutil.Big)(price)
}
if args.Value == nil {
args.Value = new(hexutil.Big)
}
if args.Nonce == nil {
nonce, err := b.GetPoolNonce(ctx, args.From)
if err != nil {
return err
}
args.Nonce = (*hexutil.Uint64)(&nonce)
}
return nil
}
func (args *SendTxArgs) toTransaction() *types.Transaction {
if args.To == nil {
return types.NewContractCreation(uint64(*args.Nonce), (*big.Int)(args.Value), (*big.Int)(args.Gas), (*big.Int)(args.GasPrice), args.Data)
}
return types.NewTransaction(uint64(*args.Nonce), *args.To, (*big.Int)(args.Value), (*big.Int)(args.Gas), (*big.Int)(args.GasPrice), args.Data)
}
// submitTransaction is a helper function that submits tx to txPool and logs a message.
func submitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (common.Hash, error) {
if err := b.SendTx(ctx, tx); err != nil {
return common.Hash{}, err
}
if tx.To() == nil {
signer := types.MakeSigner(b.ChainConfig(), b.CurrentBlock().Number())
from, _ := types.Sender(signer, tx)
addr := crypto.CreateAddress(from, tx.Nonce())
log.Info("Submitted contract creation", "fullhash", tx.Hash().Hex(), "contract", addr.Hex())
} else {
log.Info("Submitted transaction", "fullhash", tx.Hash().Hex(), "recipient", tx.To())
}
return tx.Hash(), nil
}
// SendTransaction creates a transaction for the given argument, sign it and submit it to the
// transaction pool.
func (s *PublicTransactionPoolAPI) SendTransaction(ctx context.Context, args SendTxArgs) (common.Hash, error) {
// Set some sanity defaults and terminate on failure
if err := args.setDefaults(ctx, s.b); err != nil {
return common.Hash{}, err
}
// Look up the wallet containing the requested signer
account := accounts.Account{Address: args.From}
wallet, err := s.b.AccountManager().Find(account)
if err != nil {
return common.Hash{}, err
}
// Assemble the transaction and sign with the wallet
tx := args.toTransaction()
var chainID *big.Int
if config := s.b.ChainConfig(); config.IsEIP155(s.b.CurrentBlock().Number()) {
chainID = config.ChainId
}
signed, err := wallet.SignTx(account, tx, chainID)
if err != nil {
return common.Hash{}, err
}
return submitTransaction(ctx, s.b, signed)
}
// SendRawTransaction will add the signed transaction to the transaction pool.
// The sender is responsible for signing the transaction and using the correct nonce.
func (s *PublicTransactionPoolAPI) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (string, error) {
tx := new(types.Transaction)
if err := rlp.DecodeBytes(encodedTx, tx); err != nil {
return "", err
}
if err := s.b.SendTx(ctx, tx); err != nil {
return "", err
}
signer := types.MakeSigner(s.b.ChainConfig(), s.b.CurrentBlock().Number())
if tx.To() == nil {
from, err := types.Sender(signer, tx)
if err != nil {
return "", err
}
addr := crypto.CreateAddress(from, tx.Nonce())
log.Info("Submitted contract creation", "fullhash", tx.Hash().Hex(), "contract", addr.Hex())
} else {
log.Info("Submitted transaction", "fullhash", tx.Hash().Hex(), "recipient", tx.To())
}
return tx.Hash().Hex(), nil
}
// Sign calculates an ECDSA signature for:
// keccack256("\x19Ethereum Signed Message:\n" + len(message) + message).
//
// Note, the produced signature conforms to the secp256k1 curve R, S and V values,
// where the V value will be 27 or 28 for legacy reasons.
//
// The account associated with addr must be unlocked.
//
// https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign
func (s *PublicTransactionPoolAPI) Sign(addr common.Address, data hexutil.Bytes) (hexutil.Bytes, error) {
// Look up the wallet containing the requested signer
account := accounts.Account{Address: addr}
wallet, err := s.b.AccountManager().Find(account)
if err != nil {
return nil, err
}
// Sign the requested hash with the wallet
signature, err := wallet.SignHash(account, signHash(data))
if err == nil {
signature[64] += 27 // Transform V from 0/1 to 27/28 according to the yellow paper
}
return signature, err
}
// SignTransactionResult represents a RLP encoded signed transaction.
type SignTransactionResult struct {
Raw hexutil.Bytes `json:"raw"`
Tx *types.Transaction `json:"tx"`
}
// SignTransaction will sign the given transaction with the from account.
// The node needs to have the private key of the account corresponding with
// the given from address and it needs to be unlocked.
func (s *PublicTransactionPoolAPI) SignTransaction(ctx context.Context, args SendTxArgs) (*SignTransactionResult, error) {
if err := args.setDefaults(ctx, s.b); err != nil {
return nil, err
}
tx, err := s.sign(args.From, args.toTransaction())
if err != nil {
return nil, err
}
data, err := rlp.EncodeToBytes(tx)
if err != nil {
return nil, err
}
return &SignTransactionResult{data, tx}, nil
}
// PendingTransactions returns the transactions that are in the transaction pool and have a from address that is one of
// the accounts this node manages.
func (s *PublicTransactionPoolAPI) PendingTransactions() ([]*RPCTransaction, error) {
pending, err := s.b.GetPoolTransactions()
if err != nil {
return nil, err
}
transactions := make([]*RPCTransaction, 0, len(pending))
for _, tx := range pending {
var signer types.Signer = types.HomesteadSigner{}
if tx.Protected() {
signer = types.NewEIP155Signer(tx.ChainId())
}
from, _ := types.Sender(signer, tx)
if _, err := s.b.AccountManager().Find(accounts.Account{Address: from}); err == nil {
transactions = append(transactions, newRPCPendingTransaction(tx))
}
}
return transactions, nil
}
// Resend accepts an existing transaction and a new gas price and limit. It will remove
// the given transaction from the pool and reinsert it with the new gas price and limit.
func (s *PublicTransactionPoolAPI) Resend(ctx context.Context, sendArgs SendTxArgs, gasPrice, gasLimit *hexutil.Big) (common.Hash, error) {
if sendArgs.Nonce == nil {
return common.Hash{}, fmt.Errorf("missing transaction nonce in transaction spec")
}
if err := sendArgs.setDefaults(ctx, s.b); err != nil {
return common.Hash{}, err
}
matchTx := sendArgs.toTransaction()
pending, err := s.b.GetPoolTransactions()
if err != nil {
return common.Hash{}, err
}
for _, p := range pending {
var signer types.Signer = types.HomesteadSigner{}
if p.Protected() {
signer = types.NewEIP155Signer(p.ChainId())
}
wantSigHash := signer.Hash(matchTx)
if pFrom, err := types.Sender(signer, p); err == nil && pFrom == sendArgs.From && signer.Hash(p) == wantSigHash {
// Match. Re-sign and send the transaction.
if gasPrice != nil {
sendArgs.GasPrice = gasPrice
}
if gasLimit != nil {
sendArgs.Gas = gasLimit
}
signedTx, err := s.sign(sendArgs.From, sendArgs.toTransaction())
if err != nil {
return common.Hash{}, err
}
s.b.RemoveTx(p.Hash())
if err = s.b.SendTx(ctx, signedTx); err != nil {
return common.Hash{}, err
}
return signedTx.Hash(), nil
}
}
return common.Hash{}, fmt.Errorf("Transaction %#x not found", matchTx.Hash())
}
// PublicDebugAPI is the collection of Etheruem APIs exposed over the public
// debugging endpoint.
type PublicDebugAPI struct {
b Backend
}
// NewPublicDebugAPI creates a new API definition for the public debug methods
// of the Ethereum service.
func NewPublicDebugAPI(b Backend) *PublicDebugAPI {
return &PublicDebugAPI{b: b}
}
// GetBlockRlp retrieves the RLP encoded for of a single block.
func (api *PublicDebugAPI) GetBlockRlp(ctx context.Context, number uint64) (string, error) {
block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))
if block == nil {
return "", fmt.Errorf("block #%d not found", number)
}
encoded, err := rlp.EncodeToBytes(block)
if err != nil {
return "", err
}
return fmt.Sprintf("%x", encoded), nil
}
// PrintBlock retrieves a block and returns its pretty printed form.
func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (string, error) {
block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))
if block == nil {
return "", fmt.Errorf("block #%d not found", number)
}
return fmt.Sprintf("%s", block), nil
}
// SeedHash retrieves the seed hash of a block.
func (api *PublicDebugAPI) SeedHash(ctx context.Context, number uint64) (string, error) {
block, _ := api.b.BlockByNumber(ctx, rpc.BlockNumber(number))
if block == nil {
return "", fmt.Errorf("block #%d not found", number)
}
return fmt.Sprintf("0x%x", ethash.SeedHash(number)), nil
}
// PrivateDebugAPI is the collection of Etheruem APIs exposed over the private
// debugging endpoint.
type PrivateDebugAPI struct {
b Backend
}
// NewPrivateDebugAPI creates a new API definition for the private debug methods
// of the Ethereum service.
func NewPrivateDebugAPI(b Backend) *PrivateDebugAPI {
return &PrivateDebugAPI{b: b}
}
// ChaindbProperty returns leveldb properties of the chain database.
func (api *PrivateDebugAPI) ChaindbProperty(property string) (string, error) {
ldb, ok := api.b.ChainDb().(interface {
LDB() *leveldb.DB
})
if !ok {
return "", fmt.Errorf("chaindbProperty does not work for memory databases")
}
if property == "" {
property = "leveldb.stats"
} else if !strings.HasPrefix(property, "leveldb.") {
property = "leveldb." + property
}
return ldb.LDB().GetProperty(property)
}
func (api *PrivateDebugAPI) ChaindbCompact() error {
ldb, ok := api.b.ChainDb().(interface {
LDB() *leveldb.DB
})
if !ok {
return fmt.Errorf("chaindbCompact does not work for memory databases")
}
for b := byte(0); b < 255; b++ {
log.Info("Compacting chain database", "range", fmt.Sprintf("0x%0.2X-0x%0.2X", b, b+1))
err := ldb.LDB().CompactRange(util.Range{Start: []byte{b}, Limit: []byte{b + 1}})
if err != nil {
log.Error("Database compaction failed", "err", err)
return err
}
}
return nil
}
// SetHead rewinds the head of the blockchain to a previous block.
func (api *PrivateDebugAPI) SetHead(number hexutil.Uint64) {
api.b.SetHead(uint64(number))
}
// PublicNetAPI offers network related RPC methods
type PublicNetAPI struct {
net *p2p.Server
networkVersion int
}
// NewPublicNetAPI creates a new net API instance.
func NewPublicNetAPI(net *p2p.Server, networkVersion int) *PublicNetAPI {
return &PublicNetAPI{net, networkVersion}
}
// Listening returns an indication if the node is listening for network connections.
func (s *PublicNetAPI) Listening() bool {
return true // always listening
}
// PeerCount returns the number of connected peers
func (s *PublicNetAPI) PeerCount() hexutil.Uint {
return hexutil.Uint(s.net.PeerCount())
}
// Version returns the current ethereum protocol version.
func (s *PublicNetAPI) Version() string {
return fmt.Sprintf("%d", s.networkVersion)
}
| {
"content_hash": "290326450d36967f882f575fc72a67c3",
"timestamp": "",
"source": "github",
"line_count": 1449,
"max_line_length": 164,
"avg_line_length": 35.68115942028985,
"alnum_prop": 0.7017716916173455,
"repo_name": "lab2528/go-oneTime",
"id": "7553bf763f8a61d270ade7b925d0851d408ed642",
"size": "52497",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "internal/ethapi/api_2528.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "42966"
},
{
"name": "C",
"bytes": "585129"
},
{
"name": "C++",
"bytes": "79669"
},
{
"name": "CSS",
"bytes": "133"
},
{
"name": "Go",
"bytes": "5744690"
},
{
"name": "HTML",
"bytes": "202"
},
{
"name": "Java",
"bytes": "30290"
},
{
"name": "JavaScript",
"bytes": "491817"
},
{
"name": "M4",
"bytes": "25931"
},
{
"name": "Makefile",
"bytes": "11133"
},
{
"name": "NSIS",
"bytes": "23228"
},
{
"name": "Python",
"bytes": "30192"
},
{
"name": "Ruby",
"bytes": "1706"
},
{
"name": "Shell",
"bytes": "688"
}
],
"symlink_target": ""
} |
// Original Code: Copyright (c) 2011-2014 The Bitcoin Core Developers
// Modified Code: Copyright (c) 2014 Project Bitmark
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "utilitydialog.h"
#include "ui_aboutdialog.h"
#include "ui_helpmessagedialog.h"
#include "zmarkgui.h"
#include "clientmodel.h"
#include "guiutil.h"
#include "clientversion.h"
#include "init.h"
#include "util.h"
#include <QLabel>
#include <QVBoxLayout>
/** "About" dialog box */
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialog)
{
ui->setupUi(this);
// Set current copyright year
ui->copyrightLabel->setText(tr("Copyright") + QString(" © %1 ").arg(COPYRIGHT_YEAR) + tr("Project Bitmark"));
ui->copyrightLabelTwo->setText(tr("Copyright") + QString(" © 2009-%1 ").arg(COPYRIGHT_YEAR) + tr("The Bitcoin Core Developers"));
}
void AboutDialog::setModel(ClientModel *model)
{
if(model)
{
QString version = model->formatFullVersion();
/* On x86 add a bit specifier to the version so that users can distinguish between
* 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
*/
#if defined(__x86_64__)
version += " " + tr("(%1-bit)").arg(64);
#elif defined(__i386__ )
version += " " + tr("(%1-bit)").arg(32);
#endif
ui->versionLabel->setText(version);
}
}
AboutDialog::~AboutDialog()
{
delete ui;
}
void AboutDialog::on_buttonBox_accepted()
{
close();
}
/** "Help message" dialog box */
HelpMessageDialog::HelpMessageDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::HelpMessageDialog)
{
ui->setupUi(this);
GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);
header = tr("Zmark Core") + " " + tr("version") + " " +
QString::fromStdString(FormatFullVersion()) + "\n\n" +
tr("Usage:") + "\n" +
" zmark-qt [" + tr("command-line options") + "] " + "\n";
coreOptions = QString::fromStdString(HelpMessage(HMM_BITMARK_QT));
uiOptions = tr("UI options") + ":\n" +
" -choosedatadir " + tr("Choose data directory on startup (default: 0)") + "\n" +
" -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
" -min " + tr("Start minimized") + "\n" +
" -rootcertificates=<file> " + tr("Set SSL root certificates for payment request (default: -system-)") + "\n" +
" -splash " + tr("Show splash screen on startup (default: 1)");
ui->helpMessageLabel->setFont(GUIUtil::zmarkAddressFont());
// Set help message text
ui->helpMessageLabel->setText(header + "\n" + coreOptions + "\n" + uiOptions);
}
HelpMessageDialog::~HelpMessageDialog()
{
GUIUtil::saveWindowGeometry("nHelpMessageDialogWindow", this);
delete ui;
}
void HelpMessageDialog::printToConsole()
{
// On other operating systems, the expected action is to print the message to the console.
QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions + "\n";
fprintf(stdout, "%s", strUsage.toStdString().c_str());
}
void HelpMessageDialog::showOrPrint()
{
#if defined(WIN32)
// On Windows, show a message box, as there is no stderr/stdout in windowed applications
exec();
#else
// On other operating systems, print help text to console
printToConsole();
#endif
}
void HelpMessageDialog::on_okButton_accepted()
{
close();
}
/** "Shutdown" window */
void ShutdownWindow::showShutdownWindow(BitmarkGUI *window)
{
if (!window)
return;
// Show a simple window indicating shutdown status
QWidget *shutdownWindow = new QWidget();
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(new QLabel(
tr("Zmark Core is shutting down...") + "<br /><br />" +
tr("Do not shut down the computer until this window disappears.")));
shutdownWindow->setLayout(layout);
// Center shutdown window at where main window was
const QPoint global = window->mapToGlobal(window->rect().center());
shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
shutdownWindow->show();
}
| {
"content_hash": "19b3828dd04fba56e77974dfcd79aa04",
"timestamp": "",
"source": "github",
"line_count": 137,
"max_line_length": 138,
"avg_line_length": 32.10948905109489,
"alnum_prop": 0.6351443509888611,
"repo_name": "ileathan/zmark",
"id": "d935943ad113873a9eb150ae95e7fdfe872b457f",
"size": "4399",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/qt/utilitydialog.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "58576"
},
{
"name": "C++",
"bytes": "3079445"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "HTML",
"bytes": "50620"
},
{
"name": "Makefile",
"bytes": "467608"
},
{
"name": "Objective-C",
"bytes": "1125"
},
{
"name": "Objective-C++",
"bytes": "6466"
},
{
"name": "Protocol Buffer",
"bytes": "2304"
},
{
"name": "Python",
"bytes": "110167"
},
{
"name": "Shell",
"bytes": "106109"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.