code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
/**
/// ScrimpNet.Core Library
/// Copyright © 2005-2011
///
/// This module is Copyright © 2005-2011 Steve Powell
/// All rights reserved.
///
/// This library is free software; you can redistribute it and/or
/// modify it under the terms of the Microsoft Public License (Ms-PL)
///
/// This library 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 theMicrosoft Public License (Ms-PL) License for more
/// details.
///
/// You should have received a copy of the Microsoft Public License (Ms-PL)
/// License along with this library; if not you may
/// find it here: http://www.opensource.org/licenses/ms-pl.html
///
/// Steve Powell, spowell@scrimpnet.com
**/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Security;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Configuration;
using HashTag.ApplicationServices.Wcf;
using System.ServiceModel;
using HashTag.ApplicationServices;
namespace HashTag.Membership.Providers.Tests_Project
{
internal static class TestUtils
{
/// <summary>
/// This class is used to represent a single user that is going to be tested
/// </summary>
public class UserCreateStub
{
public UserCreateStub(
string userName,
string email,
string password,
string question,
string answer,
bool isActive,
Guid providerKey,
string providerName
)
{
Username = userName;
EMail = email;
Password = password;
PasswordQuestion = question;
PasswordAnswer = answer;
IsActive = isActive;
ProviderKey = providerKey;
ProviderName = providerName;
}
//-------------------------------------------------------
// header fields
//-------------------------------------------------------
public string Username { get; set; }
public string EMail { get; set; }
public string PasswordQuestion { get; set; }
public string PasswordAnswer { get; set; }
public string Password { get; set; }
public bool IsActive { get; set; }
public Guid ProviderKey { get; set; }
public string ProviderName { get; set; }
public void ValidateHeaderFields(MembershipUser user)
{
Assert.AreEqual(Username, user.UserName);
Assert.AreEqual(EMail, user.Email);
Assert.AreEqual(PasswordQuestion, user.PasswordQuestion);
Assert.AreEqual(IsActive, user.IsApproved);
Assert.AreEqual(ProviderKey, user.ProviderUserKey);
//Assert.AreEqual(ProviderName, user.ProviderName);
}
}
public static List<UserCreateStub> Users = new List<UserCreateStub>();
internal static void CreateUserRecords(MembershipProvider provider)
{
Users = new List<UserCreateStub>();
int totalRecords;
MembershipUserCollection users = provider.GetAllUsers(0,int.MaxValue-1,out totalRecords);
foreach (MembershipUser user in users)
{
if (
(user.UserName != null && user.UserName.ToLower().Contains("test_"))
|| (user.Email != null && user.Email.ToLower().Contains("test_"))
|| (user.PasswordQuestion != null && user.PasswordQuestion.ToLower().Contains("test_")))
{
provider.DeleteUser(user.UserName, true);
}
}
for (int x = 0; x < 50; x++)
{
string username = "TEST_USER:" + x.ToString("000");
string email = "TEST_EMAIL_" + x.ToString("000")+"@test.com";
string question = "TEST_QUESTION:" + x.ToString("000");
string answer = "TEST_ANSWER:" + x.ToString("000");
string password = "TEST_PASSWORD:" + x.ToString("000");
bool isActive = (x % 2) == 0; //only even numbers are active
Guid providerKey = Guid.NewGuid();
MembershipCreateStatus status;
var response = provider.CreateUser(username, password, email, question, answer, isActive, providerKey, out status);
response.IsApproved = x!=19;
response.Comment = "";
provider.UpdateUser(response);
if (x != 19)
{
provider.UnlockUser(username); //record 19 is in 'Locked' status
}
Assert.AreEqual<MembershipCreateStatus>(MembershipCreateStatus.Success, status);
Users.Add(new UserCreateStub(username, email, password, question, answer, response.IsApproved, providerKey, provider.Name));
}
}
internal static List<string> ProviderRoles = new List<string>();
internal static void CreateRoles(RoleProvider provider)
{
ProviderRoles = provider.GetAllRoles().ToList<string>().FindAll(roleName => roleName.ToLower().Contains("test_"));
foreach (string role in ProviderRoles)
{
if (provider.RoleExists(role))
{
string[] usersInRoles = provider.GetUsersInRole(role);
if (usersInRoles.Length != 0)
{
provider.RemoveUsersFromRoles(usersInRoles, new string[] { role }); //remove users from role
}
provider.DeleteRole(role, false); //remove role
}
}
ProviderRoles.Clear();
for (int x = 0; x < 20; x++)
{
string roleName = string.Format("TEST_ROLE:{0:000}",x);
ProviderRoles.Add(roleName);
provider.CreateRole(roleName);
}
//NOTE: roles 0-9 are reserved for query type operations and should be considered read only
// roles 10-19 may be used for C-U-D operations
addUserToRole(Users[0], ProviderRoles[0], provider); // several users in one role
addUserToRole(Users[2], ProviderRoles[0], provider);
addUserToRole(Users[4], ProviderRoles[0], provider);
addUserToRole(Users[6], ProviderRoles[1], provider); // same user in multiple roles
addUserToRole(Users[6], ProviderRoles[2], provider);
addUserToRole(Users[6], ProviderRoles[3], provider);
addUserToRole(Users[10], ProviderRoles[1], provider); // same user in multiple roles
addUserToRole(Users[10], ProviderRoles[2], provider);
addUserToRole(Users[10], ProviderRoles[3], provider);
addUserToRole(Users[8], ProviderRoles[1], provider);
addUserToRole(Users[8], ProviderRoles[2], provider);
/*
TEST_ROLE:000
Users[0]
Users[2]
Users[4]
TEST_ROLE:001
Users[6]
Users[8]
TEST_ROLE:002
Users[6]
Users[8]
TEST_ROLE:003
Users[6]
TEST_ROLE:004
-- no users
*/
}
private static void addUserToRole(UserCreateStub user, string roleName, RoleProvider provider)
{
provider.AddUsersToRoles(new string[] { user.Username }, new string[]{roleName});
}
internal static void VerifyUserHeaderFields(MembershipUser target)
{
if (target.UserName.StartsWith("TEST") == true)
{
UserCreateStub stub = Users.Find(master => string.Compare(master.Username, target.UserName) == 0);
if (stub == null)
{
Assert.Fail("Unable to find user '{0}' in list of pre configured test users", target.UserName);
}
stub.ValidateHeaderFields(target); //perform assertions on 'header' properties
}
}
internal static void VerifyUserHeaderFields(MembershipUserCollection targetList)
{
foreach (MembershipUser target in targetList)
{
VerifyUserHeaderFields(target);
}
}
private static MembershipProvider _provider;
internal static MembershipProvider ActiveMembershipProvider
{
get
{
if (_provider != null) return _provider;
_provider = System.Web.Security.Membership.Provider;
return _provider;
}
}
private static RoleProvider _roleProvider;
internal static RoleProvider ActiveRoleProvider
{
get
{
if (_roleProvider != null) return _roleProvider;
_roleProvider = Roles.Provider;
//string providerName = ConfigurationManager.AppSettings["Testing.ActiveRoleProviderName"];
//if (string.IsNullOrEmpty(providerName))
//{
// Console.WriteLine("An explicit Role Provider is not specified on .config key: Testing.ActiveRoleProviderName. Using default provider: {0}",
// _roleProvider.Name);
//}
//else //provider specified
//{
// _roleProvider = Roles.Providers[providerName];
// if (_roleProvider == null)
// {
// throw new ConfigurationErrorsException(string.Format("Unable to find role provider {0} specified in key: ActiveRoleProviderName", providerName));
// }
//}
return _roleProvider;
}
}
}
}
|
HashTagDotNet/WCF-Membership-Provider
|
__TestProjects/HashTag.ApplicationServices.Tests Project/TestUtils.cs
|
C#
|
mit
| 10,070
|
package gunfish_test
import (
"bytes"
"errors"
"testing"
gunfish "github.com/kayac/Gunfish"
"github.com/sirupsen/logrus"
)
func TestQuoting(t *testing.T) {
tf := &gunfish.LtsvFormatter{}
checkQuoting := func(q bool, value interface{}) {
b, _ := tf.Format(logrus.WithField("test", value))
idx := bytes.Index(b, ([]byte)("test:"))
cont := bytes.Equal(b[idx+5:idx+6], []byte{'"'})
if cont != q {
if q {
t.Errorf("quoting expected for: %#v", value)
} else {
t.Errorf("quoting not expected for: %#v", value)
}
}
}
checkQuoting(false, "abcd")
checkQuoting(false, "v1.0")
checkQuoting(false, "1234567890")
checkQuoting(true, "/foobar")
checkQuoting(true, "x y")
checkQuoting(true, "x,y")
checkQuoting(false, errors.New("invalid"))
checkQuoting(true, errors.New("invalid argument"))
}
|
kayac/Gunfish
|
ltsv_formatter_test.go
|
GO
|
mit
| 825
|
//
// Generated by the J2ObjC translator. DO NOT EDIT!
// source: ./core/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.java
//
#include "J2ObjC_header.h"
#pragma push_macro("INCLUDE_ALL_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute")
#ifdef RESTRICT_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute
#define INCLUDE_ALL_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute 0
#else
#define INCLUDE_ALL_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute 1
#endif
#undef RESTRICT_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute
#if __has_feature(nullability)
#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wnullability"
#pragma GCC diagnostic ignored "-Wnullability-completeness"
#endif
#if !defined (OrgApacheLuceneAnalysisTokenattributesOffsetAttribute_) && (INCLUDE_ALL_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute || defined(INCLUDE_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute))
#define OrgApacheLuceneAnalysisTokenattributesOffsetAttribute_
#define RESTRICT_OrgApacheLuceneUtilAttribute 1
#define INCLUDE_OrgApacheLuceneUtilAttribute 1
#include "org/apache/lucene/util/Attribute.h"
/*!
@brief The start and end character offset of a Token.
*/
@protocol OrgApacheLuceneAnalysisTokenattributesOffsetAttribute < OrgApacheLuceneUtilAttribute, JavaObject >
/*!
@brief Returns this Token's starting offset, the position of the first character
corresponding to this token in the source text.
<p>
Note that the difference between <code>endOffset()</code> and <code>startOffset()</code>
may not be equal to termText.length(), as the term text may have been altered by a
stemmer or some other filter.
- seealso: #setOffset(int, int)
*/
- (jint)startOffset;
/*!
@brief Set the starting and ending offset.
@throw IllegalArgumentExceptionIf <code>startOffset</code> or <code>endOffset</code>
are negative, or if <code>startOffset</code> is greater than
<code>endOffset</code>
- seealso: #startOffset()
- seealso: #endOffset()
*/
- (void)setOffsetWithInt:(jint)startOffset
withInt:(jint)endOffset;
/*!
@brief Returns this Token's ending offset, one greater than the position of the
last character corresponding to this token in the source text.The length
of the token in the source text is (<code>endOffset()</code> - <code>startOffset()</code>).
- seealso: #setOffset(int, int)
*/
- (jint)endOffset;
@end
J2OBJC_EMPTY_STATIC_INIT(OrgApacheLuceneAnalysisTokenattributesOffsetAttribute)
J2OBJC_TYPE_LITERAL_HEADER(OrgApacheLuceneAnalysisTokenattributesOffsetAttribute)
#endif
#if __has_feature(nullability)
#pragma clang diagnostic pop
#endif
#pragma pop_macro("INCLUDE_ALL_OrgApacheLuceneAnalysisTokenattributesOffsetAttribute")
|
lukhnos/objclucene
|
include/org/apache/lucene/analysis/tokenattributes/OffsetAttribute.h
|
C
|
mit
| 2,779
|
#include <gxx/inet/dgramm.h>
#include <gxx/print.h>
int main() {
gxx::inet::udp_socket udp_sock(gxx::inet::localhost, 11001);
//gxx::inet::rdm_socket rdm_sock(gxx::inet::localhost, 11002);
char buf[128];
gxx::inet::netaddr inaddr;
size_t ret;
while(1) {
ret = udp_sock.recvfrom(buf, 128, &inaddr);
gxx::fprintln("udp: {}: {}", inaddr, gxx::buffer(buf, ret));
// ret = rdm_sock.recvfrom(buf, 128, &inaddr);
// gxx::println(ret);
//gxx::fprintln("rdm: {}: {}", inaddr, gxx::buffer(buf, ret));
}
}
|
Mirmik/gxx
|
tests/HIDE/datagramm_receiver/main.cpp
|
C++
|
mit
| 515
|
package net.nitrado.api;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import net.nitrado.api.common.Value;
import net.nitrado.api.common.exceptions.NitrapiErrorException;
import net.nitrado.api.common.exceptions.NitrapiException;
import net.nitrado.api.common.http.HttpClient;
import net.nitrado.api.common.http.Parameter;
import net.nitrado.api.common.http.ProductionHttpClient;
import net.nitrado.api.customer.Customer;
import net.nitrado.api.customer.SSHKeys;
import net.nitrado.api.order.Dimension;
import net.nitrado.api.payment.Country;
import net.nitrado.api.payment.PaymentMethod;
import net.nitrado.api.services.Service;
import net.nitrado.api.services.ServiceFactory;
import net.nitrado.api.services.cloudservers.CloudServer;
import net.nitrado.api.services.gameservers.GlobalGameList;
import net.nitrado.api.services.gameservers.minecraft.Minecraft;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Type;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Main class to interact with the Nitrapi.
* <p>
* You create it by passing it the access token of the user.
* The next step is to get a list of services and then operate further using the service-specific classes.
* <p>
* Every call on this api can throw a NitrapiHttpException when there is a problem connection to the api (e.g. the pc
* has no internet connection)
* and a NitrapiErrorException if there is a problem using the api (e.g. not enough permissions)
*/
public class Nitrapi {
/**
* Base url of the api.
*/
public static final String NITRAPI_LIVE_URL = "https://api.nitrado.net/";
private HttpClient client;
private String accessToken;
private String nitrapiUrl;
/**
* Gson object to convert the json-data
*/
private Gson gson;
private String applicationName = "nitrapi";
/**
* Creates a new Nitrapi with the given access token.
*
* @param accessToken access token for the user
*/
public Nitrapi(String accessToken) {
this(accessToken, NITRAPI_LIVE_URL);
}
/**
* Creates a new Nitrapi with the given access token and url.
*
* @param accessToken access token for the user
* @param nitrapiUrl url at which nitrapi is listening
*/
public Nitrapi(String accessToken, String nitrapiUrl) {
this.accessToken = accessToken;
this.client = new ProductionHttpClient();
this.nitrapiUrl = nitrapiUrl;
TypeAdapter<Boolean> booleanAsIntAdapter = new TypeAdapter<Boolean>() {
@Override
public void write(JsonWriter out, Boolean value) throws IOException {
if (value == null) {
out.nullValue();
} else {
out.value(value);
}
}
@Override
public Boolean read(JsonReader in) throws IOException {
JsonToken peek = in.peek();
switch (peek) {
case BOOLEAN:
return in.nextBoolean();
case NULL:
in.nextNull();
return null;
case NUMBER:
return in.nextInt() != 0;
case STRING:
return Boolean.parseBoolean(in.nextString());
default:
throw new IllegalStateException("Expected BOOLEAN or NUMBER but was " + peek);
}
}
};
this.gson = new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ss")
.registerTypeAdapter(GregorianCalendar.class, new JsonDeserializer<GregorianCalendar>() {
public GregorianCalendar deserialize(JsonElement json, Type type, JsonDeserializationContext context) throws JsonParseException {
GregorianCalendar calendar = (GregorianCalendar) (GregorianCalendar.getInstance());
try {
String value = json.getAsString();
DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
format.setLenient(false);
Date date = format.parse(value);
calendar.setTime(date);
return calendar;
} catch (JsonParseException e) {
throw new IllegalStateException("Invalid Json format to convert Calendar: " + e.getMessage());
} catch (ParseException e) {
throw new IllegalStateException("Error to convert Calendar: " + e.getMessage());
}
}
})
.registerTypeAdapter(Dimension.DimensionValues.class, new Dimension.DimensionValuesDeserializer())
.registerTypeAdapter(boolean.class, booleanAsIntAdapter)
.registerTypeAdapter(Boolean.class, booleanAsIntAdapter)
.registerTypeHierarchyAdapter(Value.class, new JsonDeserializer<Value>() {
public Value deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
if (jsonElement == null) {
return null;
}
String value = jsonElement.getAsString();
if (type instanceof Class) {
try {
return (Value) ((Class) type).getConstructor(String.class).newInstance(value);
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
}
return null;
}
})
.create();
}
/**
* Returns the current customer.
*
* @return the current customer
*/
public Customer getCustomer() throws NitrapiException {
JsonObject data = dataGet("user", null);
Customer customer = fromJson(data.get("user"), Customer.class);
customer.init(this);
return customer;
}
/**
* Returns a specific service.
*
* @param id id of the service
* @return the service specified by the id
*/
public Service getService(int id) throws NitrapiException {
JsonObject data = this.dataGet("services/" + id, null);
return ServiceFactory.factory(this, data.get("service"));
}
/**
* Returns a list of all services.
*
* @return a list of all services for the current user
*/
public Service[] getServices() throws NitrapiException {
JsonObject data = this.dataGet("services", null);
JsonArray serviceArray = data.get("services").getAsJsonArray();
ArrayList<Service> services = new ArrayList<Service>();
for (int i = 0; i < serviceArray.size(); i++) {
try {
services.add(ServiceFactory.factory(this, serviceArray.get(i)));
} catch (NitrapiErrorException exception) {
exception.printStackTrace();
}
}
return services.toArray(new Service[services.size()]);
}
/**
* Returns true if the api is operating as expected.
*
* @return true if the api is working. otherwise an exception is thrown
*/
public boolean ping() throws NitrapiException {
this.dataGet("ping", null);
return true;
}
/**
* Returns the full list of games.
* <p>
* Contains all available games.
*
* @return a GlobalGameList object
*/
public GlobalGameList getGames() throws NitrapiException {
return GlobalGameList.newInstance(this);
}
/**
* Returns the full list of available images.
*
* @return
*/
public CloudServer.Image[] getImages() throws NitrapiException {
JsonObject data = dataGet("information/cloud_servers/images", null);
CloudServer.Image[] images = fromJson(data.get("images"), CloudServer.Image[].class);
return images;
}
// PAYMENT
public Country[] getPaymentCountries() throws NitrapiException {
JsonObject data = this.dataGet("order/payment/countries", null);
return gson.fromJson(data.get("countries"), Country[].class);
}
public PaymentMethod[] getPaymentMethods() throws NitrapiException {
JsonObject data = this.dataGet("order/payment/payment_methods", null);
data = data.get("payment_methods").getAsJsonObject();
ArrayList<PaymentMethod> methods = new ArrayList<PaymentMethod>(data.entrySet().size());
for (Map.Entry<String, JsonElement> entry : data.entrySet()) {
PaymentMethod method = fromJson(entry.getValue(), PaymentMethod.class);
method.setId(entry.getKey());
methods.add(method);
}
return methods.toArray(new PaymentMethod[0]);
}
public SSHKeys getSSHKeys() throws NitrapiException {
JsonObject data = dataGet("user/ssh_keys", null);
SSHKeys keys = fromJson(data, SSHKeys.class);
keys.init(this);
return keys;
}
public AccessToken getAccessTokenInfo() throws NitrapiException {
JsonObject data = this.dataGet("token", null);
return gson.fromJson(data.get("token"), AccessToken.class);
}
public Map<String, String> getCountries() throws NitrapiException {
JsonObject data = this.dataGet("countries", null);
return gson.fromJson(data.get("countries"), new TypeToken<Map<String, String>>(){}.getType());
}
public Map<String, String> getStates() throws NitrapiException {
JsonObject data = this.dataGet("countries/states", null);
return gson.fromJson(data.get("states"), new TypeToken<Map<String, String>>(){}.getType());
}
public Map<String, String[]> getTimezones() throws NitrapiException {
JsonObject data = this.dataGet("timezones", null);
return gson.fromJson(data.get("timezones"), new TypeToken<Map<String, String[]>>(){}.getType());
}
/**
* Returns the current limit of requests per hour for each user.
*
* @return the current limit of requests
*/
public int getRateLimit() {
return client.getRateLimit();
}
/**
* Returns the remaining requests for this hour and the current user.
*
* @return the remaining requests
*/
public int getRateLimitRemaining() {
return client.getRateLimitRemaining();
}
/**
* Returns the date when the limit resets for the current user.
*
* @return the date when the limit resets
*/
public long getRateLimitReset() {
return client.getRateLimitReset();
}
/**
* Changes the language of error messages
*
* @param lang two char language code
*/
public void setLanguage(String lang) {
client.setLanguage(lang);
}
public String getLanguage() {
return client.getLanguage();
}
// http client stuff
/**
* Used internally.
* <p>
* Creates a GET-Request.
*
* @param url URL to call
* @param parameters parameters
* @return the result as a JsonObject
*/
public JsonObject dataGet(String url, Parameter[] parameters) throws NitrapiException {
return client.dataGet(nitrapiUrl + url, accessToken, parameters);
}
/**
* Used internally.
* <p>
* Creates a POST-Request.
*
* @param url URL to call
* @param parameters parameters
* @return the result as a JsonObject
*/
public JsonObject dataPost(String url, Parameter[] parameters) throws NitrapiException {
return client.dataPost(nitrapiUrl + url, accessToken, parameters);
}
/**
* Used internally.
* <p>
* Creates a PUT-Request.
*
* @param url URL to call
* @param parameters parameters
* @return the result as a JsonObject
*/
public JsonObject dataPut(String url, Parameter[] parameters) throws NitrapiException {
return client.dataPut(nitrapiUrl + url, accessToken, parameters);
}
/**
* Used internally.
* <p>
* Creates a DELETE-Request.
*
* @param url URL to call
* @param parameters parameters
* @return the result as a JsonObject
*/
public JsonObject dataDelete(String url, Parameter[] parameters) throws NitrapiException {
return client.dataDelete(nitrapiUrl + url, accessToken, parameters);
}
/**
* Used internally.
* <p>
* Creates a GET-Request and returns the raw InputStream.
*
* @param url URL to call
* @return the InputStream of the response
*/
public InputStream rawGet(String url) throws NitrapiException {
return client.rawGet(url);
}
/**
* Used internally.
* <p>
* Creates a POST-Request and returns the raw InputStream.
*
* @param url URL to call
* @param token access token of the current user
* @param body body of the POST-REQUEST
*/
public void rawPost(String url, String token, byte[] body) throws NitrapiException {
client.rawPost(url, token, body);
}
/**
* This method deserializes the Json read from the specified parse tree into an object of the specified type.
*
* @param json the root of the parse tree of JsonElements from which the object is to be deserialized
* @param tClass The class of T
* @param <T> the type of the desired object
* @return an object of type T from the json. Returns null if json is null.
*/
public <T> T fromJson(JsonElement json, Class<T> tClass) {
return gson.fromJson(json, tClass);
}
/**
* Changes the HttpClient.
*
* @param httpClient new http client to use
*/
public void setHttpClient(HttpClient httpClient) {
this.client = httpClient;
}
/**
* Changes the url at which the Nitrapi is.
*
* @param url nitrapi url
*/
public void changeNitrapiUrl(String url) {
this.nitrapiUrl = url;
}
/**
* Changes the name of the application displayed in logs.
*
* @param name name of this application
*/
public void setApplicationName(String name) {
this.applicationName = name;
}
/**
* Returns the name of the application displayed in logs.
*
* @return the name of this application
*/
public String getApplicationName() {
return applicationName;
}
public String getAccessToken() {
return accessToken;
}
}
|
nitrado/Nitrapi-Java
|
src/main/java/net/nitrado/api/Nitrapi.java
|
Java
|
mit
| 15,532
|
//
// This source file is part of appleseed.
// Visit https://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2017-2018 Francois Beaune, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#pragma once
// appleseed.renderer headers.
#include "renderer/modeling/object/object.h"
// appleseed.foundation headers.
#include "foundation/math/vector.h"
#include "foundation/platform/types.h"
// appleseed.main headers.
#include "main/dllsymbol.h"
// Forward declarations.
namespace renderer { class ParamArray; }
namespace renderer { class ShadingRay; }
namespace renderer
{
//
// An object whose surface is defined procedurally.
//
class APPLESEED_DLLSYMBOL ProceduralObject
: public Object
{
public:
struct IntersectionResult
{
bool m_hit;
double m_distance;
foundation::Vector3d m_geometric_normal;
foundation::Vector3d m_shading_normal;
foundation::Vector2f m_uv;
foundation::uint32 m_material_slot;
};
// Compute the intersection between a ray expressed in object space and
// the surface of this object and return detailed intersection results.
virtual void intersect(
const ShadingRay& ray,
IntersectionResult& result) const = 0;
// Compute the intersection between a ray expressed in object space and
// the surface of this object and simply return whether there was a hit.
virtual bool intersect(
const ShadingRay& ray) const = 0;
protected:
// Constructor.
ProceduralObject(
const char* name,
const ParamArray& params);
};
} // namespace renderer
|
Biart95/appleseed
|
src/appleseed/renderer/modeling/object/proceduralobject.h
|
C
|
mit
| 2,831
|
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "WXPBGeneratedMessage.h"
@class HardDevice, NSString;
@interface GetHardDeviceOperTicketResult : WXPBGeneratedMessage
{
}
+ (void)initialize;
// Remaining properties
@property(retain, nonatomic) HardDevice *device; // @dynamic device;
@property(nonatomic) unsigned int oper; // @dynamic oper;
@property(nonatomic) int ret; // @dynamic ret;
@property(retain, nonatomic) NSString *ticket; // @dynamic ticket;
@end
|
walkdianzi/DashengHook
|
WeChat-Headers/GetHardDeviceOperTicketResult.h
|
C
|
mit
| 565
|
(function() {
/**
@const
@type {boolean}
*/
var WEB = true;
;
var SubDoc, clone, depath, exports, isArray, json, pathEquals, text, traverse;
var __slice = Array.prototype.slice;
exports = window['sharejs'];
if (typeof WEB !== "undefined" && WEB !== null) {
text = exports.types.text;
} else {
text = require('./text');
}
json = {};
json.name = 'json';
json.create = function() {
return null;
};
json.invertComponent = function(c) {
var c_;
c_ = {
p: c.p
};
if (c.si !== void 0) {
c_.sd = c.si;
}
if (c.sd !== void 0) {
c_.si = c.sd;
}
if (c.oi !== void 0) {
c_.od = c.oi;
}
if (c.od !== void 0) {
c_.oi = c.od;
}
if (c.li !== void 0) {
c_.ld = c.li;
}
if (c.ld !== void 0) {
c_.li = c.ld;
}
if (c.na !== void 0) {
c_.na = -c.na;
}
if (c.lm !== void 0) {
c_.lm = c.p[c.p.length - 1];
c_.p = c.p.slice(0, c.p.length - 1).concat([c.lm]);
}
return c_;
};
json.invert = function(op) {
var c, _i, _len, _ref, _results;
_ref = op.slice().reverse();
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
c = _ref[_i];
_results.push(json.invertComponent(c));
}
return _results;
};
json.checkValidOp = function(op) {};
isArray = function(o) {
return Object.prototype.toString.call(o) === '[object Array]';
};
json.checkList = function(elem) {
if (!isArray(elem)) {
throw new Error('Referenced element not a list');
}
};
json.checkObj = function(elem) {
if (elem.constructor !== Object) {
throw new Error("Referenced element not an object (it was " + (JSON.stringify(elem)) + ")");
}
};
json.apply = function(snapshot, op) {
var c, container, e, elem, i, key, p, parent, parentkey, _i, _len, _len2, _ref;
json.checkValidOp(op);
op = clone(op);
container = {
data: clone(snapshot)
};
try {
for (i = 0, _len = op.length; i < _len; i++) {
c = op[i];
parent = null;
parentkey = null;
elem = container;
key = 'data';
_ref = c.p;
for (_i = 0, _len2 = _ref.length; _i < _len2; _i++) {
p = _ref[_i];
parent = elem;
parentkey = key;
elem = elem[key];
key = p;
if (parent == null) {
throw new Error('Path invalid');
}
}
if (c.na !== void 0) {
if (typeof elem[key] !== 'number') {
throw new Error('Referenced element not a number');
}
elem[key] += c.na;
} else if (c.si !== void 0) {
if (typeof elem !== 'string') {
throw new Error("Referenced element not a string (it was " + (JSON.stringify(elem)) + ")");
}
parent[parentkey] = elem.slice(0, key) + c.si + elem.slice(key);
} else if (c.sd !== void 0) {
if (typeof elem !== 'string') {
throw new Error('Referenced element not a string');
}
if (elem.slice(key, key + c.sd.length) !== c.sd) {
throw new Error('Deleted string does not match');
}
parent[parentkey] = elem.slice(0, key) + elem.slice(key + c.sd.length);
} else if (c.li !== void 0 && c.ld !== void 0) {
json.checkList(elem);
elem[key] = c.li;
} else if (c.li !== void 0) {
json.checkList(elem);
elem.splice(key, 0, c.li);
} else if (c.ld !== void 0) {
json.checkList(elem);
elem.splice(key, 1);
} else if (c.lm !== void 0) {
json.checkList(elem);
if (c.lm !== key) {
e = elem[key];
elem.splice(key, 1);
elem.splice(c.lm, 0, e);
}
} else if (c.oi !== void 0) {
json.checkObj(elem);
elem[key] = c.oi;
} else if (c.od !== void 0) {
json.checkObj(elem);
delete elem[key];
} else {
throw new Error('invalid / missing instruction in op');
}
}
} catch (error) {
throw error;
}
return container.data;
};
json.pathMatches = function(p1, p2, ignoreLast) {
var i, p, _len;
if (p1.length !== p2.length) {
return false;
}
for (i = 0, _len = p1.length; i < _len; i++) {
p = p1[i];
if (p !== p2[i] && (!ignoreLast || i !== p1.length - 1)) {
return false;
}
}
return true;
};
json.append = function(dest, c) {
var last;
c = clone(c);
if (dest.length !== 0 && json.pathMatches(c.p, (last = dest[dest.length - 1]).p)) {
if (last.na !== void 0 && c.na !== void 0) {
return dest[dest.length - 1] = {
p: last.p,
na: last.na + c.na
};
} else if (last.li !== void 0 && c.li === void 0 && c.ld === last.li) {
if (last.ld !== void 0) {
return delete last.li;
} else {
return dest.pop();
}
} else if (last.od !== void 0 && last.oi === void 0 && c.oi !== void 0 && c.od === void 0) {
return last.oi = c.oi;
} else if (c.lm !== void 0 && c.p[c.p.length - 1] === c.lm) {
return null;
} else {
return dest.push(c);
}
} else {
return dest.push(c);
}
};
json.compose = function(op1, op2) {
var c, newOp, _i, _len;
json.checkValidOp(op1);
json.checkValidOp(op2);
newOp = clone(op1);
for (_i = 0, _len = op2.length; _i < _len; _i++) {
c = op2[_i];
json.append(newOp, c);
}
return newOp;
};
json.normalize = function(op) {
var c, newOp, _i, _len, _ref;
newOp = [];
if (!isArray(op)) {
op = [op];
}
for (_i = 0, _len = op.length; _i < _len; _i++) {
c = op[_i];
if ((_ref = c.p) == null) {
c.p = [];
}
json.append(newOp, c);
}
return newOp;
};
clone = function(o) {
return JSON.parse(JSON.stringify(o));
};
json.commonPath = function(p1, p2) {
var i;
p1 = p1.slice();
p2 = p2.slice();
p1.unshift('data');
p2.unshift('data');
p1 = p1.slice(0, p1.length - 1);
p2 = p2.slice(0, p2.length - 1);
if (p2.length === 0) {
return -1;
}
i = 0;
while (p1[i] === p2[i] && i < p1.length) {
i++;
if (i === p2.length) {
return i - 1;
}
}
};
json.transformComponent = function(dest, c, otherC, type) {
var common, common2, commonOperand, convert, cplength, from, jc, oc, otherCplength, otherFrom, otherTo, p, res, tc, tc1, tc2, to, _i, _len;
c = clone(c);
if (c.na !== void 0) {
c.p.push(0);
}
if (otherC.na !== void 0) {
otherC.p.push(0);
}
common = json.commonPath(c.p, otherC.p);
common2 = json.commonPath(otherC.p, c.p);
cplength = c.p.length;
otherCplength = otherC.p.length;
if (c.na !== void 0) {
c.p.pop();
}
if (otherC.na !== void 0) {
otherC.p.pop();
}
if (otherC.na) {
if ((common2 != null) && otherCplength >= cplength && otherC.p[common2] === c.p[common2]) {
if (c.ld !== void 0) {
oc = clone(otherC);
oc.p = oc.p.slice(cplength);
c.ld = json.apply(clone(c.ld), [oc]);
} else if (c.od !== void 0) {
oc = clone(otherC);
oc.p = oc.p.slice(cplength);
c.od = json.apply(clone(c.od), [oc]);
}
}
json.append(dest, c);
return dest;
}
if ((common2 != null) && otherCplength > cplength && c.p[common2] === otherC.p[common2]) {
if (c.ld !== void 0) {
oc = clone(otherC);
oc.p = oc.p.slice(cplength);
c.ld = json.apply(clone(c.ld), [oc]);
} else if (c.od !== void 0) {
oc = clone(otherC);
oc.p = oc.p.slice(cplength);
c.od = json.apply(clone(c.od), [oc]);
}
}
if (common != null) {
commonOperand = cplength === otherCplength;
if (otherC.na !== void 0) {} else if (otherC.si !== void 0 || otherC.sd !== void 0) {
if (c.si !== void 0 || c.sd !== void 0) {
if (!commonOperand) {
throw new Error("must be a string?");
}
convert = function(component) {
var newC;
newC = {
p: component.p[component.p.length - 1]
};
if (component.si) {
newC.i = component.si;
} else {
newC.d = component.sd;
}
return newC;
};
tc1 = convert(c);
tc2 = convert(otherC);
res = [];
text._tc(res, tc1, tc2, type);
for (_i = 0, _len = res.length; _i < _len; _i++) {
tc = res[_i];
jc = {
p: c.p.slice(0, common)
};
jc.p.push(tc.p);
if (tc.i != null) {
jc.si = tc.i;
}
if (tc.d != null) {
jc.sd = tc.d;
}
json.append(dest, jc);
}
return dest;
}
} else if (otherC.li !== void 0 && otherC.ld !== void 0) {
if (otherC.p[common] === c.p[common]) {
if (!commonOperand) {
return dest;
} else if (c.ld !== void 0) {
if (c.li !== void 0 && type === 'left') {
c.ld = clone(otherC.li);
} else {
return dest;
}
}
}
} else if (otherC.li !== void 0) {
if (c.li !== void 0 && c.ld === void 0 && commonOperand && c.p[common] === otherC.p[common]) {
if (type === 'right') {
c.p[common]++;
}
} else if (otherC.p[common] <= c.p[common]) {
c.p[common]++;
}
if (c.lm !== void 0) {
if (commonOperand) {
if (otherC.p[common] <= c.lm) {
c.lm++;
}
}
}
} else if (otherC.ld !== void 0) {
if (c.lm !== void 0) {
if (commonOperand) {
if (otherC.p[common] === c.p[common]) {
return dest;
}
p = otherC.p[common];
from = c.p[common];
to = c.lm;
if (p < to || (p === to && from < to)) {
c.lm--;
}
}
}
if (otherC.p[common] < c.p[common]) {
c.p[common]--;
} else if (otherC.p[common] === c.p[common]) {
if (otherCplength < cplength) {
return dest;
} else if (c.ld !== void 0) {
if (c.li !== void 0) {
delete c.ld;
} else {
return dest;
}
}
}
} else if (otherC.lm !== void 0) {
if (c.lm !== void 0 && cplength === otherCplength) {
from = c.p[common];
to = c.lm;
otherFrom = otherC.p[common];
otherTo = otherC.lm;
if (otherFrom !== otherTo) {
if (from === otherFrom) {
if (type === 'left') {
c.p[common] = otherTo;
if (from === to) {
c.lm = otherTo;
}
} else {
return dest;
}
} else {
if (from > otherFrom) {
c.p[common]--;
}
if (from > otherTo) {
c.p[common]++;
} else if (from === otherTo) {
if (otherFrom > otherTo) {
c.p[common]++;
if (from === to) {
c.lm++;
}
}
}
if (to > otherFrom) {
c.lm--;
} else if (to === otherFrom) {
if (to > from) {
c.lm--;
}
}
if (to > otherTo) {
c.lm++;
} else if (to === otherTo) {
if ((otherTo > otherFrom && to > from) || (otherTo < otherFrom && to < from)) {
if (type === 'right') {
c.lm++;
}
} else {
if (to > from) {
c.lm++;
} else if (to === otherFrom) {
c.lm--;
}
}
}
}
}
} else if (c.li !== void 0 && c.ld === void 0 && commonOperand) {
from = otherC.p[common];
to = otherC.lm;
p = c.p[common];
if (p > from) {
c.p[common]--;
}
if (p > to) {
c.p[common]++;
}
} else {
from = otherC.p[common];
to = otherC.lm;
p = c.p[common];
if (p === from) {
c.p[common] = to;
} else {
if (p > from) {
c.p[common]--;
}
if (p > to) {
c.p[common]++;
} else if (p === to) {
if (from > to) {
c.p[common]++;
}
}
}
}
} else if (otherC.oi !== void 0 && otherC.od !== void 0) {
if (c.p[common] === otherC.p[common]) {
if (c.oi !== void 0 && commonOperand) {
if (type === 'right') {
return dest;
} else {
c.od = otherC.oi;
}
} else {
return dest;
}
}
} else if (otherC.oi !== void 0) {
if (c.oi !== void 0 && c.p[common] === otherC.p[common]) {
if (type === 'left') {
json.append(dest, {
p: c.p,
od: otherC.oi
});
} else {
return dest;
}
}
} else if (otherC.od !== void 0) {
if (c.p[common] === otherC.p[common]) {
if (!commonOperand) {
return dest;
}
if (c.oi !== void 0) {
delete c.od;
} else {
return dest;
}
}
}
}
json.append(dest, c);
return dest;
};
if (typeof WEB !== "undefined" && WEB !== null) {
exports.types || (exports.types = {});
exports._bt(json, json.transformComponent, json.checkValidOp, json.append);
exports.types.json = json;
} else {
module.exports = json;
require('./helpers').bootstrapTransform(json, json.transformComponent, json.checkValidOp, json.append);
}
if (typeof WEB === 'undefined') {
json = require('./json');
}
depath = function(path) {
if (path.length === 1 && path[0].constructor === Array) {
return path[0];
} else {
return path;
}
};
SubDoc = (function() {
function SubDoc(doc, path) {
this.doc = doc;
this.path = path;
}
SubDoc.prototype.at = function() {
var path;
path = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return this.doc.at(this.path.concat(depath(path)));
};
SubDoc.prototype.get = function() {
return this.doc.getAt(this.path);
};
SubDoc.prototype.set = function(value, cb) {
return this.doc.setAt(this.path, value, cb);
};
SubDoc.prototype.insert = function(pos, value, cb) {
return this.doc.insertAt(this.path, pos, value, cb);
};
SubDoc.prototype.del = function(pos, length, cb) {
return this.doc.deleteTextAt(this.path, length, pos, cb);
};
SubDoc.prototype.remove = function(cb) {
return this.doc.removeAt(this.path, cb);
};
SubDoc.prototype.push = function(value, cb) {
return this.insert(this.get().length, value, cb);
};
SubDoc.prototype.move = function(from, to, cb) {
return this.doc.moveAt(this.path, from, to, cb);
};
SubDoc.prototype.add = function(amount, cb) {
return this.doc.addAt(this.path, amount, cb);
};
SubDoc.prototype.on = function(event, cb) {
return this.doc.addListener(this.path, event, cb);
};
SubDoc.prototype.removeListener = function(l) {
return this.doc.removeListener(l);
};
SubDoc.prototype.getLength = function() {
return this.get().length;
};
SubDoc.prototype.getText = function() {
return this.get();
};
return SubDoc;
})();
traverse = function(snapshot, path) {
var container, elem, key, p, _i, _len;
container = {
data: snapshot
};
key = 'data';
elem = container;
for (_i = 0, _len = path.length; _i < _len; _i++) {
p = path[_i];
elem = elem[key];
key = p;
if (typeof elem === 'undefined') {
throw 'bad path';
}
}
return {
elem: elem,
key: key
};
};
pathEquals = function(p1, p2) {
var e, i, _len;
if (p1.length !== p2.length) {
return false;
}
for (i = 0, _len = p1.length; i < _len; i++) {
e = p1[i];
if (e !== p2[i]) {
return false;
}
}
return true;
};
json['api'] = {
'provides': {
'json': true
},
'get': function() {
return this.snapshot;
},
'at': function() {
var path;
path = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
return new SubDoc(this, depath(path));
},
'getAt': function(path) {
var elem, key, _ref;
_ref = traverse(this.snapshot, path), elem = _ref.elem, key = _ref.key;
return elem[key];
},
'setAt': function(path, value, cb) {
var elem, key, op, _ref;
_ref = traverse(this.snapshot, path), elem = _ref.elem, key = _ref.key;
op = {
p: path
};
if (elem.constructor === Array) {
op.li = value;
if (typeof elem[key] !== 'undefined') {
op.ld = elem[key];
}
} else if (typeof elem === 'object') {
op.oi = value;
if (typeof elem[key] !== 'undefined') {
op.od = elem[key];
}
} else {
throw 'bad path';
}
return this.submitOp([op], cb);
},
'removeAt': function(path, cb) {
var elem, key, op, _ref;
_ref = traverse(this.snapshot, path), elem = _ref.elem, key = _ref.key;
if (typeof elem[key] === 'undefined') {
throw 'no element at that path';
}
op = {
p: path
};
if (elem.constructor === Array) {
op.ld = elem[key];
} else if (typeof elem === 'object') {
op.od = elem[key];
} else {
throw 'bad path';
}
return this.submitOp([op], cb);
},
'insertAt': function(path, pos, value, cb) {
var elem, key, op, _ref;
_ref = traverse(this.snapshot, path), elem = _ref.elem, key = _ref.key;
op = {
p: path.concat(pos)
};
if (elem[key].constructor === Array) {
op.li = value;
} else if (typeof elem[key] === 'string') {
op.si = value;
}
return this.submitOp([op], cb);
},
'moveAt': function(path, from, to, cb) {
var op;
op = [
{
p: path.concat(from),
lm: to
}
];
return this.submitOp(op, cb);
},
'addAt': function(path, amount, cb) {
var op;
op = [
{
p: path,
na: amount
}
];
return this.submitOp(op, cb);
},
'deleteTextAt': function(path, length, pos, cb) {
var elem, key, op, _ref;
_ref = traverse(this.snapshot, path), elem = _ref.elem, key = _ref.key;
op = [
{
'p': path.concat(pos),
'sd': elem[key].slice(pos, pos + length)
}
];
return this.submitOp(op, cb);
},
'addListener': function(path, event, cb) {
var l;
l = {
path: path,
event: event,
cb: cb
};
this._listeners.push(l);
return l;
},
'removeListener': function(l) {
var i;
i = this._listeners.indexOf(l);
if (i < 0) {
return false;
}
this._listeners.splice(i, 1);
return true;
},
'_register': function() {
this._listeners = [];
this.on('change', function(op) {
var c, dummy, i, l, to_remove, xformed, _i, _len, _len2, _ref, _results;
_results = [];
for (_i = 0, _len = op.length; _i < _len; _i++) {
c = op[_i];
if (c.na !== void 0 || c.si !== void 0 || c.sd !== void 0) {
continue;
}
to_remove = [];
_ref = this._listeners;
for (i = 0, _len2 = _ref.length; i < _len2; i++) {
l = _ref[i];
dummy = {
p: l.path,
na: 0
};
xformed = this.type.transformComponent([], dummy, c, 'left');
if (xformed.length === 0) {
to_remove.push(i);
} else if (xformed.length === 1) {
l.path = xformed[0].p;
} else {
throw "Bad assumption in json-api: xforming an 'si' op will always result in 0 or 1 components.";
}
}
to_remove.sort(function(a, b) {
return b - a;
});
_results.push((function() {
var _j, _len3, _results2;
_results2 = [];
for (_j = 0, _len3 = to_remove.length; _j < _len3; _j++) {
i = to_remove[_j];
_results2.push(this._listeners.splice(i, 1));
}
return _results2;
}).call(this));
}
return _results;
});
return this.on('remoteop', function(op) {
var c, cb, child_path, common, event, match_path, path, _i, _len, _results;
_results = [];
for (_i = 0, _len = op.length; _i < _len; _i++) {
c = op[_i];
match_path = c.na === void 0 ? c.p.slice(0, c.p.length - 1) : c.p;
_results.push((function() {
var _j, _len2, _ref, _ref2, _results2;
_ref = this._listeners;
_results2 = [];
for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) {
_ref2 = _ref[_j], path = _ref2.path, event = _ref2.event, cb = _ref2.cb;
_results2.push((function() {
if (pathEquals(path, match_path)) {
switch (event) {
case 'insert':
if (c.li !== void 0 && c.ld === void 0) {
return cb(c.p[c.p.length - 1], c.li);
} else if (c.oi !== void 0 && c.od === void 0) {
return cb(c.p[c.p.length - 1], c.oi);
} else if (c.si !== void 0) {
return cb(c.p[c.p.length - 1], c.si);
}
break;
case 'delete':
if (c.li === void 0 && c.ld !== void 0) {
return cb(c.p[c.p.length - 1], c.ld);
} else if (c.oi === void 0 && c.od !== void 0) {
return cb(c.p[c.p.length - 1], c.od);
} else if (c.sd !== void 0) {
return cb(c.p[c.p.length - 1], c.sd);
}
break;
case 'replace':
if (c.li !== void 0 && c.ld !== void 0) {
return cb(c.p[c.p.length - 1], c.ld, c.li);
} else if (c.oi !== void 0 && c.od !== void 0) {
return cb(c.p[c.p.length - 1], c.od, c.oi);
}
break;
case 'move':
if (c.lm !== void 0) {
return cb(c.p[c.p.length - 1], c.lm);
}
break;
case 'add':
if (c.na !== void 0) {
return cb(c.na);
}
}
} else if ((common = this.type.commonPath(match_path, path)) != null) {
if (event === 'child op') {
if (match_path.length === path.length) {
throw "paths match length and have commonality, but aren't equal?";
}
child_path = c.p.slice(common + 1);
return cb(child_path, c);
}
}
}).call(this));
}
return _results2;
}).call(this));
}
return _results;
});
}
};
}).call(this);
|
devjones/sharenow
|
webclient/json.uncompressed.js
|
JavaScript
|
mit
| 24,532
|
---
title: A Wrinkle in Time
written_by: "Madeleine L'Engle"
available: 'May 1st, 2007'
isbn: '9780312367541'
binding: Paperback
link_to_buy_page:
image_path: 'https://images.booksense.com/images/541/367/9780312367541.jpg'
link:
---
|
Frontmatter/brooklinebooksmith
|
_books/a-wrinkle-in-time.md
|
Markdown
|
mit
| 235
|
{-# LANGUAGE ViewPatterns #-}
module Day05 where
import Data.Map as M
-- Part 1
contains3Vowels :: String -> Bool
contains3Vowels = go 0
where go :: Int -> String -> Bool
go 3 _ = True
go _ [] = False
go n (x:xs)
| x `elem` vowels = go (n+1) xs
| otherwise = go n xs
vowels = "aeiou"
doubleLetters :: String -> Bool
doubleLetters [] = False
doubleLetters [x] = False
doubleLetters (x:y:xs)
| x == y = True
| otherwise = doubleLetters (y:xs)
noPairs :: String -> Bool
noPairs [] = True
noPairs [x] = True
noPairs (x:y:xs)
| [x,y] `elem` badPairs = False
| otherwise = noPairs (y:xs)
where badPairs = ["ab", "cd", "pq", "xy"]
part1 = do
text <- readFile "day05-input.txt"
let input = lines text
len = length [x | x <- input, noPairs x, doubleLetters x, contains3Vowels x]
print len
-- Part 2
oneLetterBetween :: String -> Bool
oneLetterBetween (x:y:z:xs)
| x == z = True
| otherwise = oneLetterBetween (y:z:xs)
oneLetterBetween _ = False
complexPairs :: String -> Bool
complexPairs = go empty
where go :: Map String Int -> String -> Bool
go m [x,y]
| (Just _) <- val = True
where (val, m') = insertLookupWithKey (\_ a _ -> a) [x,y] 1 m
go m (x:y:z:xs)
| (Just _) <- val = True
| x == y && x == z = go m' ( z:xs)
| otherwise = go m' (y:z:xs)
where (val, m') = insertLookupWithKey (\_ a _ -> a) [x,y] 1 m
go m _ = False
part2 = do
text <- readFile "day05-input.txt"
let input = lines text
len = length [x | x <- input, oneLetterBetween x, complexPairs x]
print len
|
cirquit/Personal-Repository
|
Haskell/Playground/AdventOfCode/advent-coding/src/Day05.hs
|
Haskell
|
mit
| 1,709
|
var mod = require('mod').init({name: 'Cros'});
console.log(mod.getName());
|
cros79/nodesperiments
|
app.js
|
JavaScript
|
mit
| 77
|
/* eslint-env node */
'use strict';
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
bootstrap: {
// This is used in our own tests to show that only selected plugins are present.
plugins: ['collapse', 'transition']
}
});
/*
This build file specifies the options for the dummy test app of this
addon, located in `/tests/dummy`
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
return app.toTree();
};
|
ef4/ember-sass-bootstrap
|
ember-cli-build.js
|
JavaScript
|
mit
| 644
|
package com.lhjz.portal.util;
import java.io.StringWriter;
import java.util.Map;
import freemarker.template.Configuration;
import freemarker.template.Template;
public final class FormatUtil {
private static final String EMPTY_STRING = "";
private FormatUtil() {
}
public static String format(String tpl, Map<String, Object> dataModelMap) {
try {
Configuration configuration = new Configuration(Configuration.VERSION_2_3_22);
configuration.setClassicCompatible(true);
configuration.setClassForTemplateLoading(FormatUtil.class, EMPTY_STRING);
configuration.setDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
configuration.setNumberFormat("");
configuration.setDefaultEncoding("utf-8");
Template template = Template.getPlainTextTemplate("", tpl, configuration);
StringWriter sw = new StringWriter();
template.process(dataModelMap, sw);
return sw.toString();
} catch (Exception ex) {
ex.printStackTrace();
}
return EMPTY_STRING;
}
}
|
xiweicheng/tms
|
src/main/java/com/lhjz/portal/util/FormatUtil.java
|
Java
|
mit
| 980
|
///<reference path="../../../scripts/typings/q/Q.d.ts"/>
import moment = require('moment');
import Q = require('q');
import ArticleSource = require('../../models/article-source');
import ArticlesIndexDocument = require('./articles-index-document');
import Article = require('../article');
module ArticlesIndex {
export interface Interval {
start: moment.Moment;
end: moment.Moment;
status: string;
articleSourceId: string;
archiveBucket: string;
indexId: string;
indexedCount?: number;
totalCount?:number;
}
export var Status = {
None: 'None',
SourcePartial: 'SourcePartial',
SourceReady: 'SourceReady'
}
}
interface ArticlesIndex {
fetchIntervalsAsync(articleSource: ArticleSource,
offset: moment.Moment /*offset inclusive*/, limit: number): Q.Promise<ArticlesIndex.Interval[]>;
markSourceStatusAsync(doc: ArticlesIndexDocument): Q.Promise<ArticlesIndex.Interval>;
syncArticlesIndexDocumentAsync(articleSource: ArticleSource, doc: ArticlesIndexDocument, offset: number): Q.Promise<number>;
getIntervalAsync(articleSource: ArticleSource, indexId: string): Q.Promise<ArticlesIndex.Interval>;
updateIntervalIndexedCountAsync(articleSource: ArticleSource, interval: ArticlesIndex.Interval, newCount: number): Q.Promise<ArticlesIndex.Interval>;
fetchArticlesByStatusAsync(articleSource:ArticleSource, status:string, limit:number): Q.Promise<Article[]>;
getArticleAsync(articleSource:ArticleSource, articleId:string): Q.Promise<Article>;
updateArticleStatus(article:Article, status:string):Q.Promise<Article>;
}
export = ArticlesIndex;
|
stephenzsy/octopus
|
dolphin/app/document/index/articles-index.ts
|
TypeScript
|
mit
| 1,683
|
using Jiguang.JMessage.User;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Net;
namespace Test
{
[TestClass]
public class UserTest
{
// Admin Test Start
public static UserInfo Admin = new UserInfo
{
Username = "TestAdmin1",
Password = "1234",
Nickname = "TestAdminNickName1",
Gender = 2,
Birthday = DateTime.Now.ToString("yyyy-MM-dd"),
Region = "Guangdong",
Address = "Shenzhenxxx",
Signature = "Hello world",
Extras = new Dictionary<string, string>
{
{ "key1", "value1" }
}
};
[TestMethod]
public void TestRegisterAsAdmin()
{
var result = JMessageTest.Client.User.RegisterAsAdmin(Admin);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.Created);
}
[TestMethod]
public void TestGetAdminList()
{
var result = JMessageTest.Client.User.GetAdminList(0, 1);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
}
// Admin Test End
// User Test Start
public static UserInfo User1 = new UserInfo
{
Username = "TestUser1",
Password = "1234",
Nickname = "TestNickName1",
Gender = 1,
Birthday = DateTime.Now.ToString("yyyy-MM-dd"),
Region = "Guangdong",
Address = "Shenzhenxxx",
Signature = "Still waters run deep",
Extras = new Dictionary<string, string>
{
{ "key1", "value1" }
}
};
UserInfo user2 = new UserInfo
{
Username = "TestUser2",
Password = "1234",
};
UserInfo user3 = new UserInfo
{
Username = "TestUser3",
Password = "1234",
};
UserInfo user4 = new UserInfo
{
Username = "TestUser4",
Password = "1234",
};
[TestMethod]
public void TestRegister()
{
var result = JMessageTest.Client.User.Register(new List<UserInfo>() { User1, user2, user3, user4 });
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.Created);
}
[TestMethod]
public void TestGetUserInfo()
{
var result = JMessageTest.Client.User.GetUserInfo(User1.Username);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
}
[TestMethod]
public void TestUpdateUserInfo()
{
User1.Nickname = "TestNickname11";
var result = JMessageTest.Client.User.UpdateUserInfo(User1);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestUpdatePassword()
{
var newPassword = "4321";
var result = JMessageTest.Client.User.UpdatePassword(User1.Username, newPassword);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
if (result.StatusCode == HttpStatusCode.NoContent)
{
User1.Password = newPassword;
}
}
[TestMethod]
public void TestCheckStatus()
{
var result = JMessageTest.Client.User.CheckStatus(User1.Username);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
}
[TestMethod]
public void TestAddToBlackList()
{
var result = JMessageTest.Client.User.AddToBlackList(User1.Username, new List<string> { user2.Username });
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestRemoveFromBlackList()
{
var result = JMessageTest.Client.User.RemoveFromBlackList(User1.Username, new List<string> { user2.Username });
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestGetBlackList()
{
var result = JMessageTest.Client.User.GetBlackList(User1.Username);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
}
[TestMethod]
public void TestSetUserNoDisturb()
{
var result = JMessageTest.Client.User.SetUserNoDisturb(User1.Username,
new List<string> { user3.Username }, true);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestSetGlobalNoDisturb()
{
var result = JMessageTest.Client.User.SetGlobalNoDisturb(User1.Username, false);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestAddFriends()
{
var result = JMessageTest.Client.User.AddFriends(User1.Username, new List<string> { user3.Username });
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.Created);
}
[TestMethod]
public void TestGetFriendList()
{
var result = JMessageTest.Client.User.GetFriendList(User1.Username);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.OK);
}
[TestMethod]
public void UpdateFriendsNoteInfo()
{
JArray friends = new JArray();
JObject json = new JObject
{
{ "username", user3.Username },
{ "note_name", "TestFriendsNotename" },
{ "others", "hello :)" }
};
friends.Add(json);
var result = JMessageTest.Client.User.UpdateFriendNoteInfo(User1.Username, json.ToString());
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestRemoveFriends()
{
var result = JMessageTest.Client.User.RemoveFriends(User1.Username, new List<string> { user3.Username });
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
[TestMethod]
public void TestDisable()
{
var result = JMessageTest.Client.User.Disable(user4.Username, true);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
JMessageTest.Client.User.Disable(user4.Username, false);
}
[TestMethod]
public void TestDelete()
{
var result = JMessageTest.Client.User.Delete(user4.Username);
Console.WriteLine(result.ToString());
Assert.AreEqual(result.StatusCode, HttpStatusCode.NoContent);
}
// User Test End
}
}
|
jpush/jmessage-api-csharp-client
|
Test/UserTest.cs
|
C#
|
mit
| 7,941
|
package network
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// RouteFilterRulesClient is the network Client
type RouteFilterRulesClient struct {
BaseClient
}
// NewRouteFilterRulesClient creates an instance of the RouteFilterRulesClient client.
func NewRouteFilterRulesClient(subscriptionID string) RouteFilterRulesClient {
return NewRouteFilterRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewRouteFilterRulesClientWithBaseURI creates an instance of the RouteFilterRulesClient client using a custom
// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure
// stack).
func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string) RouteFilterRulesClient {
return RouteFilterRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates a route in the specified route filter.
// Parameters:
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
// ruleName - the name of the route filter rule.
// routeFilterRuleParameters - parameters supplied to the create or update route filter rule operation.
func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (result RouteFilterRulesCreateOrUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.CreateOrUpdate")
defer func() {
sc := -1
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
if err := validation.Validate([]validation.Validation{
{TargetValue: routeFilterRuleParameters,
Constraints: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.RouteFilterRuleType", Name: validation.Null, Rule: true, Chain: nil},
{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat.Communities", Name: validation.Null, Rule: true, Chain: nil},
}}}}}); err != nil {
return result, validation.NewError("network.RouteFilterRulesClient", "CreateOrUpdate", err.Error())
}
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
return
}
result, err = client.CreateOrUpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
return
}
return
}
// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client RouteFilterRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"routeFilterName": autorest.Encode("path", routeFilterName),
"ruleName": autorest.Encode("path", ruleName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2018-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
routeFilterRuleParameters.Etag = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
autorest.WithJSON(routeFilterRuleParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) CreateOrUpdateSender(req *http.Request) (future RouteFilterRulesCreateOrUpdateFuture, err error) {
var resp *http.Response
future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
// closes the http.Response Body.
func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response) (result RouteFilterRule, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// Delete deletes the specified rule from a route filter.
// Parameters:
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
// ruleName - the name of the rule.
func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRulesDeleteFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Delete")
defer func() {
sc := -1
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure preparing request")
return
}
result, err = client.DeleteSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", result.Response(), "Failure sending request")
return
}
return
}
// DeletePreparer prepares the Delete request.
func (client RouteFilterRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"routeFilterName": autorest.Encode("path", routeFilterName),
"ruleName": autorest.Encode("path", ruleName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2018-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// DeleteSender sends the Delete request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) DeleteSender(req *http.Request) (future RouteFilterRulesDeleteFuture, err error) {
var resp *http.Response
future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
// DeleteResponder handles the response to the Delete request. The method always
// closes the http.Response Body.
func (client RouteFilterRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
autorest.ByClosing())
result.Response = resp
return
}
// Get gets the specified rule from a route filter.
// Parameters:
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
// ruleName - the name of the rule.
func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Get")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.GetPreparer(ctx, resourceGroupName, routeFilterName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", nil, "Failure preparing request")
return
}
resp, err := client.GetSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure sending request")
return
}
result, err = client.GetResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", resp, "Failure responding to request")
return
}
return
}
// GetPreparer prepares the Get request.
func (client RouteFilterRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"routeFilterName": autorest.Encode("path", routeFilterName),
"ruleName": autorest.Encode("path", ruleName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2018-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// GetSender sends the Get request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) GetSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// GetResponder handles the response to the Get request. The method always
// closes the http.Response Body.
func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result RouteFilterRule, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// ListByRouteFilter gets all RouteFilterRules in a route filter.
// Parameters:
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultPage, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter")
defer func() {
sc := -1
if result.rfrlr.Response.Response != nil {
sc = result.rfrlr.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.fn = client.listByRouteFilterNextResults
req, err := client.ListByRouteFilterPreparer(ctx, resourceGroupName, routeFilterName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", nil, "Failure preparing request")
return
}
resp, err := client.ListByRouteFilterSender(req)
if err != nil {
result.rfrlr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure sending request")
return
}
result.rfrlr, err = client.ListByRouteFilterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "ListByRouteFilter", resp, "Failure responding to request")
return
}
if result.rfrlr.hasNextLink() && result.rfrlr.IsEmpty() {
err = result.NextWithContext(ctx)
return
}
return
}
// ListByRouteFilterPreparer prepares the ListByRouteFilter request.
func (client RouteFilterRulesClient) ListByRouteFilterPreparer(ctx context.Context, resourceGroupName string, routeFilterName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"routeFilterName": autorest.Encode("path", routeFilterName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2018-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// ListByRouteFilterSender sends the ListByRouteFilter request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) ListByRouteFilterSender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// ListByRouteFilterResponder handles the response to the ListByRouteFilter request. The method always
// closes the http.Response Body.
func (client RouteFilterRulesClient) ListByRouteFilterResponder(resp *http.Response) (result RouteFilterRuleListResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// listByRouteFilterNextResults retrieves the next set of results, if any.
func (client RouteFilterRulesClient) listByRouteFilterNextResults(ctx context.Context, lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) {
req, err := lastResults.routeFilterRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", nil, "Failure preparing next results request")
}
if req == nil {
return
}
resp, err := client.ListByRouteFilterSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure sending next results request")
}
result, err = client.ListByRouteFilterResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", resp, "Failure responding to next results request")
}
return
}
// ListByRouteFilterComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultIterator, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter")
defer func() {
sc := -1
if result.Response().Response.Response != nil {
sc = result.page.Response().Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
result.page, err = client.ListByRouteFilter(ctx, resourceGroupName, routeFilterName)
return
}
// Update updates a route in the specified route filter.
// Parameters:
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
// ruleName - the name of the route filter rule.
// routeFilterRuleParameters - parameters supplied to the update route filter rule operation.
func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (result RouteFilterRulesUpdateFuture, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Update")
defer func() {
sc := -1
if result.FutureAPI != nil && result.FutureAPI.Response() != nil {
sc = result.FutureAPI.Response().StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure preparing request")
return
}
result, err = client.UpdateSender(req)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", result.Response(), "Failure sending request")
return
}
return
}
// UpdatePreparer prepares the Update request.
func (client RouteFilterRulesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"routeFilterName": autorest.Encode("path", routeFilterName),
"ruleName": autorest.Encode("path", ruleName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2018-01-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
routeFilterRuleParameters.Name = nil
routeFilterRuleParameters.Etag = nil
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPatch(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}", pathParameters),
autorest.WithJSON(routeFilterRuleParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// UpdateSender sends the Update request. The method will close the
// http.Response Body if it receives an error.
func (client RouteFilterRulesClient) UpdateSender(req *http.Request) (future RouteFilterRulesUpdateFuture, err error) {
var resp *http.Response
future.FutureAPI = &azure.Future{}
resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
var azf azure.Future
azf, err = azure.NewFutureFromResponse(resp)
future.FutureAPI = &azf
future.Result = future.result
return
}
// UpdateResponder handles the response to the Update request. The method always
// closes the http.Response Body.
func (client RouteFilterRulesClient) UpdateResponder(resp *http.Response) (result RouteFilterRule, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
|
Azure/azure-sdk-for-go
|
services/network/mgmt/2018-01-01/network/routefilterrules.go
|
GO
|
mit
| 20,510
|
/*
* Legal Notice
*
* This document and associated source code (the "Work") is a part of a
* benchmark specification maintained by the TPC.
*
* The TPC reserves all right, title, and interest to the Work as provided
* under U.S. and international laws, including without limitation all patent
* and trademark rights therein.
*
* No Warranty
*
* 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
* CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
* AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
* WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
* DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
* PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
* WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
* ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
* QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
* WITH REGARD TO THE WORK.
* 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
* ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
* COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
* OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
* INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
* OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
* RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
* ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
*
* Contributors
* - Sergey Vasilevskiy
*/
#include "EGenTables_stdafx.h"
using namespace TPCE;
const UINT iUSACtryCode = 1; //must be the same as the code in country tax rates file
const UINT iCanadaCtryCode = 2; //must be the same as the code in country tax rates file
// Minimum and maximum to use when generating address street numbers.
const int iStreetNumberMin = 100;
const int iStreetNumberMax = 25000;
//Some customers have an AD_LINE_2, some are NULL.
const int iPctCustomersWithNullAD_LINE_2 = 60;
// Of the customers that have an AD_LINE_2, some are
// an apartment, others are a suite.
const int iPctCustomersWithAptAD_LINE_2 = 75;
// Minimum and maximum to use when generating apartment numbers.
const int iApartmentNumberMin = 1;
const int iApartmentNumberMax = 1000;
// Minimum and maximum to use when generating suite numbers.
const int iSuiteNumberMin = 1;
const int iSuiteNumberMax = 500;
// Number of RNG calls to skip for one row in order
// to not use any of the random values from the previous row.
const int iRNGSkipOneRowAddress = 10; // real number in 3.5: 7
/*
* Constructor for the ADDRESS table class.
*
* PARAMETERS:
* IN inputFiles - input flat files loaded in memory
* IN iCustomerCount - number of customers to generate
* IN iStartFromCustomer - ordinal position of the first customer in the sequence (Note: 1-based)
* for whom to generate the addresses.
* Used if generating customer addresses only.
* IN bCustomerAddressesOnly - if true, generate only customer addresses
* if false, generate exchange, company, and customer addresses
* (always start from the first customer in this case)
*/
CAddressTable::CAddressTable(CInputFiles inputFiles,
TIdent iCustomerCount,
TIdent iStartFromCustomer,
bool bCustomerAddressesOnly,
bool bCacheEnabled
)
: TableTemplate<ADDRESS_ROW>()
, m_companies(inputFiles.Company)
, m_Street(inputFiles.Street)
, m_StreetSuffix(inputFiles.StreetSuffix)
, m_ZipCode(inputFiles.ZipCode)
, m_iStartFromCustomer(iStartFromCustomer)
, m_iCustomerCount(iCustomerCount)
, m_bCustomerAddressesOnly(bCustomerAddressesOnly)
, m_bCustomerAddress(bCustomerAddressesOnly)
, m_bCacheEnabled(bCacheEnabled)
{
m_iExchangeCount = inputFiles.Exchange->GetSize(); // number of rows in Exchange
m_iCompanyCount = m_companies->GetConfiguredCompanyCount(); // number of configured companies
// Generate customer addresses only (used for CUSTOMER_TAXRATE)
if (bCustomerAddressesOnly)
{
// skip exchanges and companies
m_iLastRowNumber = m_iExchangeCount + m_iCompanyCount + iStartFromCustomer - 1;
// This is not really a count, but the last address row to generate.
//
m_iTotalAddressCount = m_iLastRowNumber + m_iCustomerCount;
}
else
{ // Generating not only customer, but also exchange and company addresses
m_iLastRowNumber = iStartFromCustomer - 1;
// This is not really a count, but the last address row to generate.
//
m_iTotalAddressCount = m_iLastRowNumber + m_iCustomerCount + m_iExchangeCount + m_iCompanyCount;
}
m_row.AD_ID = m_iLastRowNumber + iTIdentShift; // extend to 64 bits for address id
if (m_bCacheEnabled)
{
m_iCacheSize = (int)iDefaultLoadUnitSize;
m_iCacheOffset = iTIdentShift + m_iExchangeCount + m_iCompanyCount + m_iStartFromCustomer;
m_CacheZipCode = new const TZipCodeInputRow* [m_iCacheSize];
for (int i=0; i<m_iCacheSize; i++)
{
m_CacheZipCode[i] = NULL;
}
}
}
CAddressTable::~CAddressTable()
{
if (m_bCacheEnabled)
{
delete[] m_CacheZipCode;
}
}
/*
* Reset the state for the next load unit.
*
* PARAMETERS:
* none.
*
* RETURNS:
* none.
*/
void CAddressTable::InitNextLoadUnit()
{
m_rnd.SetSeed(m_rnd.RndNthElement(RNGSeedTableDefault,
(RNGSEED)m_iLastRowNumber *
iRNGSkipOneRowAddress));
ClearRecord(); // this is needed for EGenTest to work
if (m_bCacheEnabled)
{
m_iCacheOffset += iDefaultLoadUnitSize;
for (int i=0; i<m_iCacheSize; i++)
{
m_CacheZipCode[i] = NULL;
}
}
}
/*
* Generates the next A_ID value.
* It is stored in the internal record structure and also returned.
* The number of rows generated is incremented. This is why
* this function cannot be called more than once for a record.
*
* PARAMETERS:
* none.
*
* RETURNS:
* next address id.
*/
TIdent CAddressTable::GenerateNextAD_ID()
{
// Reset RNG at Load Unit boundary, so that all data is repeatable.
//
if ( m_iLastRowNumber > (m_iExchangeCount + m_iCompanyCount)
&& ( (m_iLastRowNumber - (m_iExchangeCount + m_iCompanyCount) ) % iDefaultLoadUnitSize == 0))
{
InitNextLoadUnit();
}
++m_iLastRowNumber;
// Find out whether this next row is for a customer (so as to generate AD_LINE_2).
// Exchange and Company addresses are before Customer ones.
//
m_bCustomerAddress = m_iLastRowNumber >= m_iExchangeCount + m_iCompanyCount;
// update state info
m_bMoreRecords = m_iLastRowNumber < m_iTotalAddressCount;
m_row.AD_ID = m_iLastRowNumber + iTIdentShift;
return m_row.AD_ID;
}
/*
* Returns the address id of the customer specified by the customer id.
*
* PARAMETERS:
* IN C_ID - customer id (1-based)
*
* RETURNS:
* address id.
*/
TIdent CAddressTable::GetAD_IDForCustomer(TIdent C_ID)
{
return m_iExchangeCount + m_iCompanyCount + C_ID;
}
/*
* Generate AD_LINE_1 and store it in the record structure.
* Does not increment the number of rows generated.
*
* PARAMETERS:
* none.
*
* RETURNS:
* none.
*/
void CAddressTable::GenerateAD_LINE_1()
{
int iStreetNum = m_rnd.RndIntRange(iStreetNumberMin, iStreetNumberMax);
int iStreetThreshold = m_rnd.RndIntRange(0, m_Street->GetGreatestKey()-2);
int iStreetSuffixThreshold = m_rnd.RndIntRange(0, m_StreetSuffix->GetGreatestKey()-1);
snprintf(m_row.AD_LINE1, sizeof(m_row.AD_LINE1), "%d %s %s",
iStreetNum,
(m_Street->GetRecord(iStreetThreshold))->STREET,
(m_StreetSuffix->GetRecord(iStreetSuffixThreshold))->SUFFIX);
}
/*
* Generate AD_LINE_2 and store it in the record structure.
* Does not increment the number of rows generated.
*
* PARAMETERS:
* none.
*
* RETURNS:
* none.
*/
void CAddressTable::GenerateAD_LINE_2()
{
if (!m_bCustomerAddress || m_rnd.RndPercent(iPctCustomersWithNullAD_LINE_2))
{ //Generate second address line only for customers (not companies)
m_row.AD_LINE2[0] = '\0';
}
else
{
if (m_rnd.RndPercent(iPctCustomersWithAptAD_LINE_2))
{
snprintf(m_row.AD_LINE2, sizeof(m_row.AD_LINE2),
"Apt. %d", m_rnd.RndIntRange(iApartmentNumberMin, iApartmentNumberMax));
}
else
{
snprintf(m_row.AD_LINE2, sizeof(m_row.AD_LINE2),
"Suite %d", m_rnd.RndIntRange(iSuiteNumberMin, iSuiteNumberMax));
}
}
}
/*
* For a given address id returns the same Threshold used to
* select the town, division, zip, and country.
* Needed to return a specific division/country for a given address id (for customer tax rates).
*
* PARAMETERS:
* IN ADID - address id
*
* RETURNS:
* none.
*/
int CAddressTable::GetTownDivisionZipCodeThreshold(TIdent ADID)
{
RNGSEED OldSeed;
int iThreshold;
OldSeed = m_rnd.GetSeed();
m_rnd.SetSeed( m_rnd.RndNthElement( RNGSeedBaseTownDivZip, (RNGSEED)ADID ));
iThreshold = m_rnd.RndIntRange(0, m_ZipCode->GetGreatestKey()-1);
m_rnd.SetSeed( OldSeed );
return( iThreshold );
}
/*
* Return the country code code for a given zip code.
*
* PARAMETERS:
* IN szZipCode - string with a US or Canada zip code
*
* RETURNS:
* country code.
*/
UINT CAddressTable::GetCountryCode( const char *szZipCode )
{
if(( '0' <= szZipCode[0] )&&( szZipCode[0] <= '9' ))
{
// If the zip code starts with a number, then it's a USA code.
return( iUSACtryCode );
}
else
{
// If the zip code does NOT start with a number, than it's a Canadian code.
return( iCanadaCtryCode );
}
}
/*
* Return a certain division/country code (from the input file) for a given address id.
* Used in the loader to properly calculate tax on a trade.
*
* PARAMETERS:
* IN AD_ID - address id
* OUT iDivCode - division (state/province) code
* OUT iCtryCode - country (USA/CANADA) code
*
* RETURNS:
* none.
*/
void CAddressTable::GetDivisionAndCountryCodesForAddress(TIdent AD_ID, UINT &iDivCode, UINT &iCtryCode)
{
const TZipCodeInputRow* pZipCodeInputRow = NULL;
// We will sometimes get AD_ID values that are outside the current
// load unit (cached range). We need to check for this case
// and avoid the lookup (as we will segfault or get bogus data.)
TIdent index = AD_ID - m_iCacheOffset;
bool bCheckCache = (index >= 0 && index <= m_iCacheSize);
if (m_bCacheEnabled && bCheckCache)
{
pZipCodeInputRow = m_CacheZipCode[index];
}
if (pZipCodeInputRow == NULL)
{
int iThreshold = GetTownDivisionZipCodeThreshold(AD_ID);
// Select the row in the input file
pZipCodeInputRow = m_ZipCode->GetRecord(iThreshold);
if (m_bCacheEnabled && bCheckCache)
{
m_CacheZipCode[index] = pZipCodeInputRow;
}
}
// Return division code and country code
iDivCode = pZipCodeInputRow->iDivisionTaxKey;
iCtryCode = GetCountryCode( pZipCodeInputRow->ZC_CODE );
}
/*
* Generate zip code and country for the current address id
* and store them in the record structure.
* Does not increment the number of rows generated.
*
* PARAMETERS:
* none.
*
* RETURNS:
* none.
*/
void CAddressTable::GenerateAD_ZC_CODE_CTRY()
{
int iThreshold;
const TZipCodeInputRow* pZipCodeInputRow;
iThreshold = GetTownDivisionZipCodeThreshold(m_row.AD_ID);
pZipCodeInputRow = m_ZipCode->GetRecord(iThreshold);
strncpy( m_row.AD_ZC_CODE, pZipCodeInputRow->ZC_CODE, sizeof( m_row.AD_ZC_CODE ) );
if( iUSACtryCode == GetCountryCode( pZipCodeInputRow->ZC_CODE ))
{ //US state
strncpy(m_row.AD_CTRY, "USA", sizeof(m_row.AD_CTRY));
}
else
{ //Canadian province
strncpy(m_row.AD_CTRY, "CANADA", sizeof(m_row.AD_CTRY));
}
}
/*
* Generate all column values for the next row
* and store them in the record structure.
* Increment the number of rows generated.
*
* PARAMETERS:
* none.
*
* RETURNS:
* TRUE, if there are more records in the ADDRESS table; FALSE othewise.
*/
bool CAddressTable::GenerateNextRecord()
{
GenerateNextAD_ID();
GenerateAD_LINE_1();
GenerateAD_LINE_2();
GenerateAD_ZC_CODE_CTRY();
//Return false if all the rows have been generated
return (MoreRecords());
}
|
ermia-db/ermia
|
benchmarks/egen/AddressTable.cpp
|
C++
|
mit
| 13,288
|
import React from 'react';
import Icon from '../Icon';
export default class PermIdentityIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 11.8c2.32 0 4.2 1.88 4.2 4.2s-1.88 4.2-4.2 4.2-4.2-1.88-4.2-4.2 1.88-4.2 4.2-4.2m0 18c5.95 0 12.2 2.91 12.2 4.2v2.2H11.8V34c0-1.29 6.25-4.2 12.2-4.2M24 8c-4.42 0-8 3.58-8 8 0 4.41 3.58 8 8 8s8-3.59 8-8c0-4.42-3.58-8-8-8zm0 18c-5.33 0-16 2.67-16 8v6h32v-6c0-5.33-10.67-8-16-8z"/></svg>;}
};
|
kiloe/ui
|
src/icons/PermIdentityIcon.js
|
JavaScript
|
mit
| 512
|
<?php
namespace ROH\Jobs\Provider;
use \ROH\Jobs\Jobs;
class JobProvider extends \Bono\Provider\Provider
{
public function initialize()
{
$app = $this->app;
if (empty($this->options)) {
$this->options = array();
}
Jobs::init($this->options);
// do something here
}
}
|
reekoheek/bono-jobs
|
src/ROH/Jobs/Provider/JobProvider.php
|
PHP
|
mit
| 337
|
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
// return view('Web.index');
return view('P.A.Insert');
});
// Route untuk hak akses SuperAdmin
Route::group(['middleware' => 'auth'], function () {
// Route Mahasiswa
Route::Resource('Akademik/Mahasiswa','Akademik\Mahasiswa\MahasiswaController');
Route::post('Akademik/Mahasiswa/mahasiswaInsert',['uses'=>'Akademik\Mahasiswa\MahasiswaController@store','as' =>'Mahasiswa.store']);
Route::post('Akademik/Mahasiswa',['uses'=>'Akademik\Mahasiswa\MahasiswaController@search','as' =>'Mahasiswa.search']);
// Routing Dosen
Route::Resource('Akademik/Dosen','Akademik\Dosen\DosenController');
Route::post('Akademik/Dosen/dosenInsert',['uses' => 'Akademik\Dosen\DosenController@store','as' => 'Dosen.store']);
Route::post('Akademik/Dosen',['uses' => 'Akademik\Dosen\DosenController@search','as' => 'Dosen.search']);
// Routing Mata Kuliah
Route::Resource('Akademik/Makul','Akademik\Makul\MakulController');
Route::post('Akademik/Makul/makulInsert',['uses' => 'Akademik\Makul\MakulController@store','as' => 'Makul.store']);
Route::post('Akademik/Makul',['uses' => 'Akademik\Makul\MakulController@search','as' => 'Makul.search']);
// Routing KRS
Route::Resource('Akademik/Krs','Akademik\Krs\KrsController');
Route::post('Akademik/Krs/krsInsert',['uses' => 'Akademik\Krs\KrsController@store','as' => 'Krs.store']);
Route::post('Akademik/Krs',['uses' => 'Akademik\Krs\KrsController@search','as' => 'Krs.search']);
// Routing Fakultas
Route::Resource('Akademik/Fakultas','Akademik\Fakultas\FakultasController');
Route::post('Akademik/Fakultas/fakultasInsert',['uses' => 'Akademik\Fakultas\FakultasController@store','as' => 'Fakultas.store']);
Route::post('Akademik/Fakultas',['uses' => 'Akademik\Fakultas\FakultasController@search','as' => 'Fakultas.search']);
// Routing Jurusan
Route::Resource('Akademik/Jurusan','Akademik\Jurusan\JurusanController');
Route::post('Akademik/Jurusan/jurusanInsert',['uses' => 'Akademik\Jurusan\JurusanController@store','as' => 'Jurusan.store']);
Route::post('Akademik/Jurusan',['uses' => 'Akademik\Jurusan\JurusanController@search','as' => 'Jurusan.search']);
// Routing Ruang
Route::Resource('Akademik/Ruang','Akademik\Ruang\RuangController');
Route::post('Akademik/Ruang/ruangInsert',['uses' => 'Akademik\Ruang\RuangController@store','as' => 'Ruang.store']);
Route::post('Akademik/Ruang',['uses' => 'Akademik\Ruang\RuangController@search','as' => 'Ruang.search']);
// Routing kelas
Route::Resource('Akademik/Kelas','Akademik\Kelas\KelasController');
Route::post('Akademik/Kelas/kelasInsert',['uses' => 'Akademik\Kelas\KelasController@store','as' => 'Kelas.store']);
Route::post('Akademik/Kelas',['uses' => 'Akademik\Kelas\KelasController@search','as' => 'Kelas.search']);
//Routing Jadwal
Route::Resource('Akademik/Jadwal','Akademik\Jadwal\JadwalController');
Route::post('Akademik/Jadwal/jadwalInsert',['uses' => 'Akademik\Jadwal\JadwalController@store','as' => 'Jadwal.store']);
Route::post('Akademik/Jadwal',['uses' => 'Akademik\Jadwal\JadwalController@search','as' => 'Jadwal.search']);
Route::get('Akademik/Jadwal/{Jadwal}/pdf',['uses' => 'Akademik\Jadwal\JadwalController@pdf','as' => 'Jadwal.pdf']);
// Routing Jam
Route::Resource('Akademik/Jam','Akademik\Jam\JamController');
Route::post('Akademik/Jam/jamInsert',['uses' => 'Akademik\Jam\JamController@store','as' => 'Jam.store']);
Route::post('Akademik/Jam',['uses' => 'Akademik\Jam\JamController@search','as' => 'Jam.search']);
// Routing Hari
Route::resource('Akademik/Hari','Akademik\Hari\HariController');
Route::post('Akademik/Hari/hariInsert',['uses' => 'Akademik\Hari\HariController@store','as' => 'Hari.store']);
Route::post('Akademik/Hari',['uses' => 'Akademik\Hari\HariController@search','as' => 'Hari.search']);
// Routing Akademik
Route::get('Akademik','Akademik\AkademikController@index');
// Routing Admin Web
Route::get('Web/createGallery','W\ProfController@createGallery')->name('Web.Gallery');
Route::resource('Web','W\ProfController');
Route::post('Web/GalleryInsert',['uses' => 'W\ProfController@storeGallery', 'as' => 'Gallery.store']);
});
Route::get('P/kategori','P\PerpusController@indexKat');
Route::get('P/kategori/Insert','P\PerpusController@Insert');
Route::post('P/kategori','P\PerpusController@tambahKat')->name('tambah.kategori');
Route::get('P/{id}/editKat','P\PerpusController@editKat');
Route::patch('P/kategori/{id}','P\PerpusController@updateKat');
Route::delete('P/kategori/{id}','P\PerpusController@hapusKat')->name('hapus.kategori');
Auth::routes();
Route::get('/home', 'HomeController@index')->name('home');
|
dekiakbar/siakad
|
routes/web.php
|
PHP
|
mit
| 5,031
|
package com.normalexception.app.rx8club.fragment.pm;
/************************************************************************
* NormalException.net Software, and other contributors
* http://www.normalexception.net
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
************************************************************************/
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.TextView;
import com.normalexception.app.rx8club.Log;
import com.normalexception.app.rx8club.MainApplication;
import com.normalexception.app.rx8club.R;
import com.normalexception.app.rx8club.TimeoutFactory;
import com.normalexception.app.rx8club.html.HtmlFormUtils;
import com.normalexception.app.rx8club.html.LoginFactory;
import com.normalexception.app.rx8club.html.VBForumFactory;
import com.normalexception.app.rx8club.state.AppState;
import com.normalexception.app.rx8club.task.DeletePmTask;
import com.normalexception.app.rx8club.task.PmTask;
import com.normalexception.app.rx8club.user.UserProfile;
import com.normalexception.app.rx8club.utils.Utils;
import com.normalexception.app.rx8club.view.pmpost.PMPostModel;
import com.normalexception.app.rx8club.view.pmpost.PMPostViewArrayAdapter;
public class PrivateMessageViewFragment extends Fragment {
private Logger TAG = LogManager.getLogger(this.getClass());
private String postUser = null;
private String securityToken = null;
private String pmid = null;
private String title = null;
private ArrayList<PMPostModel> pmlist;
private PMPostViewArrayAdapter pmva;
private ListView lv;
private ProgressDialog loadingDialog;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_content, container, false);
return rootView;
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MainApplication.setState(AppState.State.PMVIEW, this);
//setContentView(R.layout.activity_basiclist);
Log.v(TAG, "PM View Activity Started");
if(TimeoutFactory.getInstance().checkTimeout(this)) {
pmlist = new ArrayList<PMPostModel>();
lv = (ListView)getView().findViewById(R.id.mainlistview);
View v = getActivity().getLayoutInflater().inflate(R.layout.view_pmitem_footer, null);
v.setOnClickListener(new PrivateMessageViewListener(this));
lv.addFooterView(v);
if(savedInstanceState == null ||
(pmva == null || pmva.getCount() == 0))
constructView();
else {
updateList();
}
}
}
private void updateList() {
final Fragment _frag = this;
getActivity().runOnUiThread(new Runnable() {
public void run() {
pmva = new PMPostViewArrayAdapter(_frag, R.layout.view_newreply, pmlist);
lv.setAdapter(pmva);
}
});
}
/**
* Construct the view elements
*/
private void constructView() {
AsyncTask<Void,String,Void> updaterTask = new AsyncTask<Void,String,Void>() {
@Override
protected void onPreExecute() {
loadingDialog =
ProgressDialog.show(getActivity(),
getString(R.string.loading),
getString(R.string.pleaseWait), true);
}
@Override
protected Void doInBackground(Void... params) {
String link =
getArguments().getString("link");
Document doc =
VBForumFactory.getInstance().get(getActivity(),
VBForumFactory.getRootAddress() + "/" + link);
if(doc != null) {
securityToken =
HtmlFormUtils.getInputElementValueByName(doc, "securitytoken");
pmid =
HtmlFormUtils.getInputElementValueByName(doc, "pmid");
title =
HtmlFormUtils.getInputElementValueByName(doc, "title");
Elements userPm = doc.select("table[id^=post]");
publishProgress(getString(R.string.asyncDialogLoadingPM));
// User Control Panel
Elements userCp = userPm.select("td[class=alt2]");
Elements userDetail = userCp.select("div[class=smallfont]");
Elements userSubDetail = userDetail.last().select("div");
Elements userAvatar = userDetail.select("img[alt$=Avatar]");
Elements postMessage = doc.select("div[id=post_message_]");
PMPostModel pv = new PMPostModel();
pv.setUserName(userCp.select("div[id^=postmenu]").text());
pv.setIsLoggedInUser(
LoginFactory.getInstance().isLoggedIn()?
UserProfile.getInstance().getUsername().equals(
pv.getUserName()) : false);
pv.setUserTitle(userDetail.first().text());
pv.setUserImageUrl(Utils.resolveUrl(userAvatar.attr("src")));
pv.setPostDate(userPm.select("td[class=thead]").first().text());
// userSubDetail
// 0 - full container , full container
// 1 - Trader Score , Trader Score
// 2 - Join Date , Join Date
// 3 - Post Count , Location
// 4 - Blank , Post Count
// 5 - , Blank || Social
//
Iterator<Element> itr = userSubDetail.listIterator();
while(itr.hasNext()) {
String txt = itr.next().text();
if(txt.contains("Location:"))
pv.setUserLocation(txt);
else if (txt.contains("Posts:"))
pv.setUserPostCount(txt);
else if (txt.contains("Join Date:"))
pv.setJoinDate(txt);
}
// User Post Content
pv.setUserPost(formatUserPost(postMessage));
pmlist.add(pv);
TextView comment = (TextView)getView().findViewById(R.id.pmitem_comment);
Elements textarea = doc.select("textarea[id=vB_Editor_QR_textarea]");
if(textarea != null) {
comment.setText(textarea.first().text());
}
updateList();
}
return null;
}
@Override
protected void onProgressUpdate(String...progress) {
if(loadingDialog != null)
loadingDialog.setMessage(progress[0]);
}
@Override
protected void onPostExecute(Void result) {
try {
loadingDialog.dismiss();
loadingDialog = null;
} catch (Exception e) {
Log.w(TAG, e.getMessage());
}
}
};
updaterTask.execute();
}
/**
* Format the user post by removing the vb style quotes and the
* duplicate youtube links
* @param innerPost The element that contains the inner post
* @return The formatted string
*/
private String formatUserPost(Elements innerPost) {
// Remove the duplicate youtube links (this is caused by a plugin on
// the forum that embeds youtube videos automatically)
for(Element embedded : innerPost.select("div[id^=ame_doshow_post_]"))
embedded.remove();
// Remove the vbulletin quotes
String upost = Utils.reformatQuotes(innerPost.html());
return upost;
}
class PrivateMessageViewListener implements OnClickListener {
private Fragment _src = null;
public PrivateMessageViewListener(Fragment src) {
this._src = src;
}
/*
* (non-Javadoc)
* @see android.view.View.OnClickListener#onClick(android.view.View)
*/
@Override
public void onClick(View arg0) {
switch(arg0.getId()) {
case R.id.pmitem_submit:
Log.v(TAG, "PM Submit Clicked");
String toPost =
((TextView)getView().findViewById(R.id.pmitem_comment)).getText().toString();
PmTask sTask =
new PmTask(_src, securityToken, "Re: " + title,
toPost, postUser, pmid);
sTask.execute();
break;
case R.id.pmitem_delete:
// Lets make sure the user didn't accidentally click this
DialogInterface.OnClickListener dialogClickListener =
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
switch (which){
case DialogInterface.BUTTON_POSITIVE:
DeletePmTask dpm = new DeletePmTask(_src, securityToken, pmid, false);
dpm.execute();
break;
}
}
};
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder
.setMessage(R.string.dialogPmDeleteConfirm)
.setPositiveButton(R.string.Yes, dialogClickListener)
.setNegativeButton(R.string.No, dialogClickListener)
.show();
break;
}
}
}
}
|
paimonsoror/RX8Club.com-Forum-Application
|
src/com/normalexception/app/rx8club/fragment/pm/PrivateMessageViewFragment.java
|
Java
|
mit
| 10,076
|
module QbwcRequests
module ItemNonInventory
module V07
class Add < QbwcRequests::Base
field :name
field :is_active
field :pricetype
ref_to :parent, 1000
validates :name, presence: true
end
end
end
end
|
apotema/qbwc_requests
|
lib/qbwc_requests/item_non_inventory/v07/add.rb
|
Ruby
|
mit
| 280
|
module Language.Jass.Semantic.Callable(
-- | Utilities to operate with function and natives
Callable(..),
getCallableName,
getCallablePos,
getCallableConstness,
getCallableParameters,
getCallableReturnType,
isNativeFunction
) where
import Language.Jass.Parser.AST
-- | Holds function or native
data Callable = CallableNative NativeDecl | CallableFunc Function
deriving (Eq, Show)
-- | Returns function or native name
getCallableName :: Callable -> String
getCallableName (CallableNative (NativeDecl _ _ funcDecl)) = getFuncDeclName funcDecl
getCallableName (CallableFunc (Function _ _ funcDecl _ _)) = getFuncDeclName funcDecl
-- | Returns source position of native or function declaration
getCallablePos :: Callable -> SrcPos
getCallablePos (CallableNative (NativeDecl pos _ _)) = pos
getCallablePos (CallableFunc (Function pos _ _ _ _)) = pos
-- | Returns constness flag of native or function
getCallableConstness :: Callable -> Bool
getCallableConstness (CallableNative (NativeDecl _ constness _)) = constness
getCallableConstness (CallableFunc (Function _ constness _ _ _)) = constness
-- | Returns formal parameters of native or function
getCallableParameters :: Callable -> [Parameter]
getCallableParameters (CallableNative (NativeDecl _ _ decl)) = getFuncDeclParameters decl
getCallableParameters (CallableFunc (Function _ _ decl _ _)) = getFuncDeclParameters decl
-- | Returns function or native return type
getCallableReturnType :: Callable -> Maybe JassType
getCallableReturnType (CallableNative (NativeDecl _ _ decl)) = getFuncDeclReturnType decl
getCallableReturnType (CallableFunc (Function _ _ decl _ _)) = getFuncDeclReturnType decl
-- | Returns true for stored natives
isNativeFunction :: Callable -> Bool
isNativeFunction (CallableNative _) = True
isNativeFunction _ = False
|
NCrashed/hjass
|
src/library/Language/Jass/Semantic/Callable.hs
|
Haskell
|
mit
| 1,822
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Struct smessage</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../../../expressions.html#header.boost.log.expressions.message_hpp" title="Header <boost/log/expressions/message.hpp>">
<link rel="prev" href="message.html" title="Struct message">
<link rel="next" href="wmessage.html" title="Struct wmessage">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="message.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../expressions.html#header.boost.log.expressions.message_hpp"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wmessage.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.expressions.tag.smessage"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct smessage</span></h2>
<p>boost::log::expressions::tag::smessage</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../../expressions.html#header.boost.log.expressions.message_hpp" title="Header <boost/log/expressions/message.hpp>">boost/log/expressions/message.hpp</a>>
</span>
<span class="keyword">struct</span> <a class="link" href="smessage.html" title="Struct smessage">smessage</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">keyword_descriptor</span> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <span class="keyword">void</span> <a name="boost.log.expressions.tag.smessage.attribute_type"></a><span class="identifier">attribute_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <a name="boost.log.expressions.tag.smessage.value_type"></a><span class="identifier">value_type</span><span class="special">;</span>
<span class="comment">// <a class="link" href="smessage.html#idp21025072-bb">public static functions</a></span>
<span class="keyword">static</span> <span class="identifier">attribute_name</span> <a class="link" href="smessage.html#idp21025632-bb"><span class="identifier">get_name</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idp88651648"></a><h2>Description</h2>
<p>Narrow character log message attribute descriptor. </p>
<div class="refsect2">
<a name="idp88652384"></a><h3>
<a name="idp21025072-bb"></a><code class="computeroutput">smessage</code> public static functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="keyword">static</span> <span class="identifier">attribute_name</span> <a name="idp21025632-bb"></a><span class="identifier">get_name</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2007-2016 Andrey Semashev<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="message.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../../expressions.html#header.boost.log.expressions.message_hpp"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="wmessage.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|
calvinfarias/IC2015-2
|
BOOST/boost_1_61_0/libs/log/doc/html/boost/log/expressions/tag/smessage.html
|
HTML
|
mit
| 5,135
|
/**
* @fileoverview Tests for IgnoredPaths object.
* @author Jonathan Rajavuori
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const assert = require("chai").assert,
path = require("path"),
os = require("os"),
IgnoredPaths = require("../../lib/ignored-paths.js"),
sinon = require("sinon"),
fs = require("fs"),
includes = require("lodash").includes;
require("shelljs/global");
/* global mkdir, rm, cp */
//------------------------------------------------------------------------------
// Helper
//------------------------------------------------------------------------------
let fixtureDir;
/**
* get raw rules from IgnorePaths instance
* @param {IgnoredPaths} ignoredPaths, instance of IgnoredPaths
* @returns {string[]} raw ignore rules
*/
function getIgnoreRules(ignoredPaths) {
const ignoreRulesProperty = "_rules";
let ignoreRules = [];
Object.keys(ignoredPaths.ig).forEach(key => {
const rules = ignoredPaths.ig[key][ignoreRulesProperty];
rules.forEach(rule => {
const ruleOrigins = ignoreRules.map(ruleObj => ruleObj.origin);
/*
* Don't include duplicate ignore rules.
* (Duplicates occur because we add custom ignore patterns to the
* defaults as well, to allow unignoring default ignores)
*/
if (!includes(ruleOrigins, rule.origin)) {
ignoreRules = ignoreRules.concat(rule);
}
});
});
return ignoreRules;
}
/**
* Get a list of paths of loaded ignore files (e.g. .eslintignore) from IgnorePaths instance
* @param {IgnoredPaths} ignoredPaths Instance of IgnoredPaths
* @returns {string[]} loaded ignore files
*/
function getIgnoreFiles(ignoredPaths) {
return ignoredPaths.ig.custom.ignoreFiles;
}
/**
* Get a list of ignore patterns that are loaded
* @param {Object[]} ignoredPaths Instance of IgnoredPaths
* @returns {string[]} Ignore patterns
*/
function getIgnorePatterns(ignoredPaths) {
const ignoreRules = getIgnoreRules(ignoredPaths);
return ignoreRules.map(rule => rule.origin);
}
/**
* count the number of default patterns applied to IgnoredPaths instance
* @param {IgnoredPaths} ignoredPaths, instance of IgnoredPaths
* @returns {integer} count of default patterns
*/
function countDefaultPatterns(ignoredPaths) {
let count = ignoredPaths.defaultPatterns.length;
if (!ignoredPaths.options || (ignoredPaths.options.dotfiles !== true)) {
count += 2; // Two patterns for ignoring dotfiles
}
return count;
}
/**
* Returns the path inside of the fixture directory.
* @returns {string} The path inside the fixture directory.
* @private
*/
function getFixturePath() {
const args = Array.prototype.slice.call(arguments);
args.unshift(fs.realpathSync(fixtureDir));
return path.join.apply(path, args);
}
//------------------------------------------------------------------------------
// Tests
//------------------------------------------------------------------------------
describe("IgnoredPaths", () => {
// copy into clean area so as not to get "infected" by this project's .eslintrc files
before(() => {
fixtureDir = path.join(os.tmpdir(), "/eslint/fixtures/ignored-paths/");
mkdir("-p", fixtureDir);
cp("-r", "./tests/fixtures/ignored-paths/.", fixtureDir);
});
after(() => {
rm("-r", fixtureDir);
});
describe("initialization", () => {
it("should load .eslintignore from cwd when explicitly passed", () => {
const expectedIgnoreFile = getFixturePath(".eslintignore");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
const ignorePatterns = getIgnorePatterns(ignoredPaths);
assert.isNotNull(ignoredPaths.baseDir);
assert.equal(getIgnoreFiles(ignoredPaths), expectedIgnoreFile);
assert.include(ignorePatterns, "sampleignorepattern");
});
it("should set baseDir to cwd when no ignore file was loaded", () => {
const ignoredPaths = new IgnoredPaths({ cwd: getFixturePath("no-ignore-file") });
assert.equal(ignoredPaths.baseDir, getFixturePath("no-ignore-file"));
});
it("should not travel to parent directories to find .eslintignore when it's missing and cwd is provided", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("configurations") });
assert.lengthOf(getIgnoreRules(ignoredPaths), 4);
assert.lengthOf(getIgnoreFiles(ignoredPaths), 0);
});
it("should load empty array with ignorePath set to false", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: false, cwd: getFixturePath("no-ignore-file") });
assert.isArray(getIgnoreRules(ignoredPaths));
assert.lengthOf(getIgnoreRules(ignoredPaths), countDefaultPatterns(ignoredPaths));
});
it("should accept an array for options.ignorePattern", () => {
const ignorePattern = ["a", "b"];
const ignoredPaths = new IgnoredPaths({
ignorePattern
});
assert.ok(
ignorePattern.every(pattern =>
getIgnoreRules(ignoredPaths).some(rule => rule.pattern === pattern)
)
);
});
it("should use package.json's eslintIgnore files if no specified .eslintignore file", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("package-json-ignore") });
assert.isTrue(ignoredPaths.contains("hello.js"));
assert.isTrue(ignoredPaths.contains("world.js"));
});
it("should not use package.json's eslintIgnore files if specified .eslintignore file", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains("hello.js"));
assert.isFalse(ignoredPaths.contains("world.js"));
assert.isTrue(ignoredPaths.contains("sampleignorepattern"));
});
it("should error if package.json's eslintIgnore is not an array of file paths", () => {
assert.throws(() => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("bad-package-json-ignore") });
assert.ok(ignoredPaths);
}, "Package.json eslintIgnore property requires an array of paths");
});
});
describe("caching file reads", () => {
let readFileSyncCount;
before(() => {
readFileSyncCount = sinon.spy(fs, "readFileSync");
});
after(() => {
readFileSyncCount.restore();
});
it("should cache readFileSync on same file paths", () => {
const ignoreFilePath = getFixturePath(".eslintignore");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
ignoredPaths.readIgnoreFile(ignoreFilePath);
assert.isTrue(ignoredPaths.contains(ignoreFilePath));
sinon.assert.calledOnce(readFileSyncCount);
});
});
describe("initialization with ignorePattern", () => {
it("should ignore a normal pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "ignore-me.txt", cwd: getFixturePath("ignore-pattern") });
assert.isTrue(ignoredPaths.contains(getFixturePath("ignore-pattern", "ignore-me.txt")));
});
});
describe("initialization with ignorePath", () => {
let ignoreFilePath;
before(() => {
ignoreFilePath = getFixturePath(".eslintignore");
});
it("should set baseDir to directory containing ignorePath if provided", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath() });
assert.equal(ignoredPaths.baseDir, path.dirname(ignoreFilePath));
});
});
describe("initialization with ignorePath file not named .eslintignore", () => {
let ignoreFilePath;
before(() => {
ignoreFilePath = getFixturePath("custom-name", "ignore-file");
});
it("should work when cwd is a parent directory", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath() });
assert.notEqual(getIgnoreRules(ignoredPaths).length, countDefaultPatterns(ignoredPaths));
});
it("should work when the file is in the cwd", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath("custom-name") });
assert.notEqual(getIgnoreRules(ignoredPaths).length, countDefaultPatterns(ignoredPaths));
});
it("should work when cwd is a subdirectory", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath("custom-name", "subdirectory") });
assert.notEqual(getIgnoreRules(ignoredPaths).length, countDefaultPatterns(ignoredPaths));
});
});
describe("initialization without ignorePath", () => {
it("should not load an ignore file if none is in cwd", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("no-ignore-file") });
assert.lengthOf(getIgnoreFiles(ignoredPaths), 0);
assert.lengthOf(getIgnoreRules(ignoredPaths), countDefaultPatterns(ignoredPaths));
});
});
describe("initialization with invalid file", () => {
let invalidFilepath;
before(() => {
invalidFilepath = getFixturePath("not-a-directory", ".foobaz");
});
it("should throw error", () => {
assert.throws(() => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: invalidFilepath, cwd: getFixturePath() });
assert.ok(ignoredPaths);
}, "Cannot read ignore file");
});
});
describe("contains", () => {
it("should throw if initialized with invalid options", () => {
const ignoredPaths = new IgnoredPaths(null);
assert.throw(ignoredPaths.contains, Error);
});
it("should not throw if given a relative filename", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "undef.js", cwd: getFixturePath() });
assert.doesNotThrow(() => {
ignoredPaths.contains("undef.js");
});
});
it("should return true for files which match an ignorePattern even if they do not exist on the filesystem", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "not-a-file", cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("not-a-file")));
});
it("should return false for files outside of the cwd (with no ignore file provided)", () => {
// Default ignore patterns should not inadvertantly ignore files in parent directories
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("no-ignore-file") });
assert.isFalse(ignoredPaths.contains(getFixturePath("undef.js")));
});
it("should return false for files outside of ignorePath's directory", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath("custom-name", "ignore-file"), cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("undef.js")));
});
it("should return true for file matching an ignore pattern exactly", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "undef.js", cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("undef.js")));
});
it("should return false for file matching an invalid ignore pattern with leading './'", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "./undef.js", cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("undef.js")));
});
it("should return false for file in subfolder of cwd matching an ignore pattern with leading '/'", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "/undef.js", cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("subdir", "undef.js")));
});
it("should return true for file matching a child of an ignore pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "ignore-pattern", cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("ignore-pattern", "ignore-me.txt")));
});
it("should return true for file matching a grandchild of an ignore pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "ignore-pattern", cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("ignore-pattern", "subdir", "ignore-me.txt")));
});
it("should return true for file matching a child of an ignore pattern with windows line termination", () => {
sinon.stub(fs, "readFileSync")
.withArgs(".eslintignore")
.returns("subdir\r\n");
sinon.stub(fs, "statSync")
.withArgs("subdir")
.returns();
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ".eslintignore", cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("subdir/undef.js")));
fs.readFileSync.restore();
fs.statSync.restore();
});
it("should return false for file not matching any ignore pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "failing.js", cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("unignored.js")));
});
it("should return false for ignored file when unignored with ignore pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath(".eslintignore"), ignorePattern: "!sampleignorepattern", cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("sampleignorepattern")));
});
it("should resolve relative paths from the ignorePath, not cwd", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath(".eslintignoreForDifferentCwd"), cwd: getFixturePath("subdir") });
assert.isFalse(ignoredPaths.contains(getFixturePath("subdir/undef.js")));
assert.isTrue(ignoredPaths.contains(getFixturePath("undef.js")));
});
});
describe("initialization with ignorePath containing commented lines", () => {
let ignoreFilePath;
before(() => {
ignoreFilePath = getFixturePath(".eslintignoreWithComments");
});
it("should not include comments in ignore rules", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath() });
const ignorePatterns = getIgnorePatterns(ignoredPaths);
assert.equal(getIgnoreRules(ignoredPaths).length, countDefaultPatterns(ignoredPaths) + 1);
assert.include(ignorePatterns, "this_one_not");
});
});
describe("initialization with ignorePath containing negations", () => {
let ignoreFilePath;
before(() => {
ignoreFilePath = getFixturePath(".eslintignoreWithNegation");
});
it("should ignore a non-negated pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("negation", "ignore.js")));
});
it("should not ignore a negated pattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: ignoreFilePath, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("negation", "unignore.js")));
});
});
describe("default ignores", () => {
it("should contain /bower_components/*", () => {
const ignoredPaths = new IgnoredPaths();
assert.include(ignoredPaths.defaultPatterns, "/bower_components/*");
});
it("should contain /node_modules/*", () => {
const ignoredPaths = new IgnoredPaths();
assert.include(ignoredPaths.defaultPatterns, "/node_modules/*");
});
it("should always apply defaultPatterns if ignore option is true", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("bower_components/package/file.js")));
assert.isTrue(ignoredPaths.contains(getFixturePath("node_modules/package/file.js")));
});
it("should still apply defaultPatterns if ignore option is is false", () => {
const ignoredPaths = new IgnoredPaths({ ignore: false, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("bower_components/package/file.js")));
assert.isTrue(ignoredPaths.contains(getFixturePath("node_modules/package/file.js")));
});
it("should not ignore files in defaultPatterns within a subdirectory", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath("subdir/bower_components/package/file.js")));
assert.isFalse(ignoredPaths.contains(getFixturePath("subdir/node_modules/package/file.js")));
});
it("should allow subfolders of defaultPatterns to be unignored by ignorePattern", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath(), ignorePattern: "!/node_modules/package" });
assert.isFalse(ignoredPaths.contains(getFixturePath("node_modules", "package", "file.js")));
});
it("should allow subfolders of defaultPatterns to be unignored by ignorePath", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath(), ignorePath: getFixturePath(".eslintignoreWithUnignoredDefaults") });
assert.isFalse(ignoredPaths.contains(getFixturePath("node_modules", "package", "file.js")));
});
it("should ignore dotfiles", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath(".foo")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/.bar")));
});
it("should ignore directories beginning with a dot", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath(".foo/bar")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/.bar/baz")));
});
it("should still ignore dotfiles when ignore option disabled", () => {
const ignoredPaths = new IgnoredPaths({ ignore: false, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath(".foo")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/.bar")));
});
it("should still ignore directories beginning with a dot when ignore option disabled", () => {
const ignoredPaths = new IgnoredPaths({ ignore: false, cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath(".foo/bar")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/.bar/baz")));
});
it("should not ignore absolute paths containing '..'", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(`${getFixturePath("foo")}/../unignored.js`));
});
it("should ignore /node_modules/ at top level relative to .eslintignore when loaded", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath(".eslintignore"), cwd: getFixturePath() });
assert.isTrue(ignoredPaths.contains(getFixturePath("node_modules", "existing.js")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo", "node_modules", "existing.js")));
});
it("should ignore /node_modules/ at top level relative to cwd without an .eslintignore", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd: getFixturePath("no-ignore-file") });
assert.isTrue(ignoredPaths.contains(getFixturePath("no-ignore-file", "node_modules", "existing.js")));
assert.isFalse(ignoredPaths.contains(getFixturePath("no-ignore-file", "foo", "node_modules", "existing.js")));
});
});
describe("two globstar '**' ignore pattern", () => {
it("should ignore files in nested directories", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePattern: "**/*.js", cwd: getFixturePath() });
assert.isTrue(ignoredPaths instanceof IgnoredPaths);
assert.isTrue(ignoredPaths.contains(getFixturePath("foo.js")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/bar.js")));
assert.isTrue(ignoredPaths.contains(getFixturePath("foo/bar/baz.js")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo.j2")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo/bar.j2")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo/bar/baz.j2")));
});
});
describe("dotfiles option", () => {
it("should add at least one pattern when false", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, dotfiles: false, cwd: getFixturePath("no-ignore-file") });
assert(getIgnoreRules(ignoredPaths).length > ignoredPaths.defaultPatterns.length);
});
it("should add no patterns when true", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, dotfiles: true, cwd: getFixturePath("no-ignore-file") });
assert.lengthOf(getIgnoreRules(ignoredPaths), ignoredPaths.defaultPatterns.length);
});
it("should not ignore dotfiles when true", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, dotfiles: true, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath(".foo")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo/.bar")));
});
it("should not ignore directories beginning with a dot when true", () => {
const ignoredPaths = new IgnoredPaths({ ignore: true, dotfiles: true, cwd: getFixturePath() });
assert.isFalse(ignoredPaths.contains(getFixturePath(".foo/bar")));
assert.isFalse(ignoredPaths.contains(getFixturePath("foo/.bar/baz")));
});
});
describe("getIgnoredFoldersGlobChecker", () => {
/**
* Creates a function to resolve the given relative path according to the `cwd`
* @param {path} cwd The cwd of `ignorePaths`
* @returns {function()} the function described above.
*/
function createResolve(cwd) {
return function(relative) {
return path.join(cwd, relative);
};
}
it("should ignore default folders when there is no eslintignore file", () => {
const cwd = getFixturePath("no-ignore-file");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isTrue(shouldIgnore(resolve("node_modules/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/a/b")));
assert.isTrue(shouldIgnore(resolve("bower_components/a")));
assert.isTrue(shouldIgnore(resolve("bower_components/a/b")));
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isTrue(shouldIgnore(resolve(".hidden/a")));
});
it("should ignore default folders when there is an ignore file without unignored defaults", () => {
const cwd = getFixturePath();
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath(".eslintignore"), cwd });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isTrue(shouldIgnore(resolve("node_modules/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/a/b")));
assert.isTrue(shouldIgnore(resolve("bower_components/a")));
assert.isTrue(shouldIgnore(resolve("bower_components/a/b")));
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isTrue(shouldIgnore(resolve(".hidden/a")));
});
it("should not ignore things which are re-included in ignore file", () => {
const cwd = getFixturePath();
const ignoredPaths = new IgnoredPaths({ ignore: true, ignorePath: getFixturePath(".eslintignoreWithUnignoredDefaults"), cwd });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isTrue(shouldIgnore(resolve("node_modules/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/a/b")));
assert.isTrue(shouldIgnore(resolve("bower_components/a")));
assert.isTrue(shouldIgnore(resolve("bower_components/a/b")));
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isTrue(shouldIgnore(resolve(".hidden/a")));
assert.isFalse(shouldIgnore(resolve("node_modules/package")));
assert.isFalse(shouldIgnore(resolve("bower_components/package")));
assert.isFalse(shouldIgnore(resolve(".hidden/package")));
});
it("should ignore files which we try to re-include in ignore file when ignore option is disabled", () => {
const cwd = getFixturePath();
const ignoredPaths = new IgnoredPaths({ ignore: false, ignorePath: getFixturePath(".eslintignoreWithUnignoredDefaults"), cwd });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isTrue(shouldIgnore(resolve("node_modules/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/a/b")));
assert.isTrue(shouldIgnore(resolve("bower_components/a")));
assert.isTrue(shouldIgnore(resolve("bower_components/a/b")));
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isTrue(shouldIgnore(resolve(".hidden/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/package")));
assert.isTrue(shouldIgnore(resolve("bower_components/package")));
assert.isTrue(shouldIgnore(resolve(".hidden/package")));
});
it("should not ignore dirs which are re-included by ignorePattern", () => {
const cwd = getFixturePath("no-ignore-file");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd, ignorePattern: "!/node_modules/package" });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isTrue(shouldIgnore(resolve("node_modules/a")));
assert.isTrue(shouldIgnore(resolve("node_modules/a/b")));
assert.isTrue(shouldIgnore(resolve("bower_components/a")));
assert.isTrue(shouldIgnore(resolve("bower_components/a/b")));
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isTrue(shouldIgnore(resolve(".hidden/a")));
assert.isFalse(shouldIgnore(resolve("node_modules/package")));
assert.isTrue(shouldIgnore(resolve("bower_components/package")));
});
it("should not ignore hidden dirs when dotfiles is enabled", () => {
const cwd = getFixturePath("no-ignore-file");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd, dotfiles: true });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isFalse(shouldIgnore(resolve(".hidden")));
assert.isFalse(shouldIgnore(resolve(".hidden/a")));
});
it("should use the ignorePath's directory as the base to resolve relative paths, not cwd", () => {
const cwd = getFixturePath("subdir");
const ignoredPaths = new IgnoredPaths({ ignore: true, cwd, ignorePath: getFixturePath(".eslintignoreForDifferentCwd") });
const shouldIgnore = ignoredPaths.getIgnoredFoldersGlobChecker();
const resolve = createResolve(cwd);
assert.isFalse(shouldIgnore(resolve("undef.js")));
assert.isTrue(shouldIgnore(resolve("../undef.js")));
});
});
});
|
Gillespie59/eslint
|
tests/lib/ignored-paths.js
|
JavaScript
|
mit
| 30,040
|
<%= assets("js", "helper") %>
|
olav/pacbot
|
spec/cases/assets/js_helper.html
|
HTML
|
mit
| 30
|
<?php
/* 401.php
* application HTTP 401 page
*/
defined('HEADER') || include_once('header.php');
?>
<div class="cleft left error">
You must login to access this URL
</div>
<div class="cleft left info">
If you just installed a new SSL certificate, try <a target="_blank" href="http://code.google.com/p/chromium/issues/detail?id=29784">restarting your browser</a> to trigger its selection
</div>
<div class="cleft">
<a target="_blank" href="http://getfirefox.org/">Firefox</a> 3.5+, currently shipping Safari, IE, and Chrome builds are known to work
</div>
<?php
TAG(__FILE__, __LINE__, '$Id$');
defined('FOOTER') || include_once('footer.php');
|
linkeddata/ldphp
|
www/inc/401.php
|
PHP
|
mit
| 649
|
//! Set callbacks necessary to the hypervisor to perform upcalls
use hal::xen::defs::Ulong;
use hal::xen::hypercall::HypercallKind;
pub type CallbackType = unsafe extern "C" fn() -> ();
#[cfg(target_arch = "x86")]
pub unsafe fn set_callbacks(hypervisor_callback_cs: u16,
hypervisor_callback: CallbackType,
failsafe_callback_cs: u16,
failsafe_callback: CallbackType) {
use hal::xen::hypercall::hypercall4;
let hypervisor_callback = hypervisor_callback as *const u8 as Ulong;
let failsafe_callback = failsafe_callback as *const u8 as Ulong;
hypercall4(HypercallKind::SetCallbacks,
hypervisor_callback_cs as Ulong, hypervisor_callback,
failsafe_callback_cs as Ulong, failsafe_callback);
}
#[cfg(target_arch = "x86_64")]
pub unsafe fn set_callbacks(hypervisor_callback: CallbackType,
failsafe_callback: CallbackType,
syscall_callback_opt: Option<CallbackType>) {
use hal::xen::hypercall::hypercall3;
let hypervisor_callback = hypervisor_callback as *const u8 as Ulong;
let failsafe_callback = failsafe_callback as *const u8 as Ulong;
let mut syscall_callback = 0;
if let Some(callback) = syscall_callback_opt {
syscall_callback = callback as *const u8 as Ulong;
}
hypercall3(HypercallKind::SetCallbacks, hypervisor_callback,
failsafe_callback, syscall_callback);
}
|
uni-rs/uni.rs
|
src/hal/xen/arch/x86/callbacks.rs
|
Rust
|
mit
| 1,507
|
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package azure_file
import (
"fmt"
"os"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/types"
"k8s.io/kubernetes/pkg/util/mount"
kstrings "k8s.io/kubernetes/pkg/util/strings"
"k8s.io/kubernetes/pkg/volume"
"github.com/golang/glog"
)
// This is the primary entrypoint for volume plugins.
func ProbeVolumePlugins() []volume.VolumePlugin {
return []volume.VolumePlugin{&azureFilePlugin{nil}}
}
type azureFilePlugin struct {
host volume.VolumeHost
}
var _ volume.VolumePlugin = &azureFilePlugin{}
var _ volume.PersistentVolumePlugin = &azureFilePlugin{}
const (
azureFilePluginName = "kubernetes.io/azure-file"
)
func getPath(uid types.UID, volName string, host volume.VolumeHost) string {
return host.GetPodVolumeDir(uid, kstrings.EscapeQualifiedNameForDisk(azureFilePluginName), volName)
}
func (plugin *azureFilePlugin) Init(host volume.VolumeHost) error {
plugin.host = host
return nil
}
func (plugin *azureFilePlugin) GetPluginName() string {
return azureFilePluginName
}
func (plugin *azureFilePlugin) GetVolumeName(spec *volume.Spec) (string, error) {
volumeSource, _, err := getVolumeSource(spec)
if err != nil {
return "", err
}
return volumeSource.ShareName, nil
}
func (plugin *azureFilePlugin) CanSupport(spec *volume.Spec) bool {
//TODO: check if mount.cifs is there
return (spec.PersistentVolume != nil && spec.PersistentVolume.Spec.AzureFile != nil) ||
(spec.Volume != nil && spec.Volume.AzureFile != nil)
}
func (plugin *azureFilePlugin) RequiresRemount() bool {
return false
}
func (plugin *azureFilePlugin) GetAccessModes() []api.PersistentVolumeAccessMode {
return []api.PersistentVolumeAccessMode{
api.ReadWriteOnce,
api.ReadOnlyMany,
api.ReadWriteMany,
}
}
func (plugin *azureFilePlugin) NewMounter(spec *volume.Spec, pod *api.Pod, _ volume.VolumeOptions) (volume.Mounter, error) {
return plugin.newMounterInternal(spec, pod, &azureSvc{}, plugin.host.GetMounter())
}
func (plugin *azureFilePlugin) newMounterInternal(spec *volume.Spec, pod *api.Pod, util azureUtil, mounter mount.Interface) (volume.Mounter, error) {
source, readOnly, err := getVolumeSource(spec)
if err != nil {
return nil, err
}
return &azureFileMounter{
azureFile: &azureFile{
volName: spec.Name(),
mounter: mounter,
pod: pod,
plugin: plugin,
MetricsProvider: volume.NewMetricsStatFS(getPath(pod.UID, spec.Name(), plugin.host)),
},
util: util,
secretName: source.SecretName,
shareName: source.ShareName,
readOnly: readOnly,
}, nil
}
func (plugin *azureFilePlugin) NewUnmounter(volName string, podUID types.UID) (volume.Unmounter, error) {
return plugin.newUnmounterInternal(volName, podUID, plugin.host.GetMounter())
}
func (plugin *azureFilePlugin) newUnmounterInternal(volName string, podUID types.UID, mounter mount.Interface) (volume.Unmounter, error) {
return &azureFileUnmounter{&azureFile{
volName: volName,
mounter: mounter,
pod: &api.Pod{ObjectMeta: api.ObjectMeta{UID: podUID}},
plugin: plugin,
MetricsProvider: volume.NewMetricsStatFS(getPath(podUID, volName, plugin.host)),
}}, nil
}
func (plugin *azureFilePlugin) ConstructVolumeSpec(volName, mountPath string) (*volume.Spec, error) {
azureVolume := &api.Volume{
Name: volName,
VolumeSource: api.VolumeSource{
AzureFile: &api.AzureFileVolumeSource{
SecretName: volName,
ShareName: volName,
},
},
}
return volume.NewSpecFromVolume(azureVolume), nil
}
// azureFile volumes represent mount of an AzureFile share.
type azureFile struct {
volName string
pod *api.Pod
mounter mount.Interface
plugin *azureFilePlugin
volume.MetricsProvider
}
func (azureFileVolume *azureFile) GetPath() string {
return getPath(azureFileVolume.pod.UID, azureFileVolume.volName, azureFileVolume.plugin.host)
}
type azureFileMounter struct {
*azureFile
util azureUtil
secretName string
shareName string
readOnly bool
}
var _ volume.Mounter = &azureFileMounter{}
func (b *azureFileMounter) GetAttributes() volume.Attributes {
return volume.Attributes{
ReadOnly: b.readOnly,
Managed: !b.readOnly,
SupportsSELinux: false,
}
}
// SetUp attaches the disk and bind mounts to the volume path.
func (b *azureFileMounter) SetUp(fsGroup *int64) error {
return b.SetUpAt(b.GetPath(), fsGroup)
}
func (b *azureFileMounter) SetUpAt(dir string, fsGroup *int64) error {
notMnt, err := b.mounter.IsLikelyNotMountPoint(dir)
glog.V(4).Infof("AzureFile mount set up: %s %v %v", dir, !notMnt, err)
if err != nil && !os.IsNotExist(err) {
return err
}
if !notMnt {
return nil
}
var accountKey, accountName string
if accountName, accountKey, err = b.util.GetAzureCredentials(b.plugin.host, b.pod.Namespace, b.secretName, b.shareName); err != nil {
return err
}
os.MkdirAll(dir, 0750)
source := fmt.Sprintf("//%s.file.core.windows.net/%s", accountName, b.shareName)
// parameters suggested by https://azure.microsoft.com/en-us/documentation/articles/storage-how-to-use-files-linux/
options := []string{fmt.Sprintf("vers=3.0,username=%s,password=%s,dir_mode=0777,file_mode=0777", accountName, accountKey)}
if b.readOnly {
options = append(options, "ro")
}
err = b.mounter.Mount(source, dir, "cifs", options)
if err != nil {
notMnt, mntErr := b.mounter.IsLikelyNotMountPoint(dir)
if mntErr != nil {
glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
return err
}
if !notMnt {
if mntErr = b.mounter.Unmount(dir); mntErr != nil {
glog.Errorf("Failed to unmount: %v", mntErr)
return err
}
notMnt, mntErr := b.mounter.IsLikelyNotMountPoint(dir)
if mntErr != nil {
glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
return err
}
if !notMnt {
// This is very odd, we don't expect it. We'll try again next sync loop.
glog.Errorf("%s is still mounted, despite call to unmount(). Will try again next sync loop.", dir)
return err
}
}
os.Remove(dir)
return err
}
return nil
}
var _ volume.Unmounter = &azureFileUnmounter{}
type azureFileUnmounter struct {
*azureFile
}
func (c *azureFileUnmounter) TearDown() error {
return c.TearDownAt(c.GetPath())
}
func (c *azureFileUnmounter) TearDownAt(dir string) error {
notMnt, err := c.mounter.IsLikelyNotMountPoint(dir)
if err != nil {
glog.Errorf("Error checking IsLikelyNotMountPoint: %v", err)
return err
}
if notMnt {
return os.Remove(dir)
}
if err := c.mounter.Unmount(dir); err != nil {
glog.Errorf("Unmounting failed: %v", err)
return err
}
notMnt, mntErr := c.mounter.IsLikelyNotMountPoint(dir)
if mntErr != nil {
glog.Errorf("IsLikelyNotMountPoint check failed: %v", mntErr)
return mntErr
}
if notMnt {
if err := os.Remove(dir); err != nil {
return err
}
}
return nil
}
func getVolumeSource(
spec *volume.Spec) (*api.AzureFileVolumeSource, bool, error) {
if spec.Volume != nil && spec.Volume.AzureFile != nil {
return spec.Volume.AzureFile, spec.Volume.AzureFile.ReadOnly, nil
} else if spec.PersistentVolume != nil &&
spec.PersistentVolume.Spec.AzureFile != nil {
return spec.PersistentVolume.Spec.AzureFile, spec.ReadOnly, nil
}
return nil, false, fmt.Errorf("Spec does not reference an AzureFile volume type")
}
|
huangliangjun/vessel
|
vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go
|
GO
|
mit
| 7,889
|
#!/usr/bin/env python3
#Copyright (C) 2013 by Ngan Nguyen
# Copyright (C) 2012-2019 by UCSC Computational Genomics Lab
#
#Released under the MIT license, see LICENSE.txt
"""Snake tracks
"""
from optparse import OptionGroup
import re
def addSnakeOptions(parser):
group = parser.add_argument_group("SNAKE TRACKS", "Snake track options")
group.add_argument('--selfAlignmentSnakes', dest="selfAlignmentTrack",
help="Produce a self-alignment snake track for every genome",
action="store_true", default=False)
group = parser.add_argument_group(group)
def writeTrackDb_snakes(f, halfile, genomes, subgenomes, currgenome, properName, snpwidth=None, doSelfAlignment=False):
for i, genome in enumerate(genomes):
if not doSelfAlignment and genome == currgenome: #current genome
continue
#SNAKE TRACKS
genomeProperName = genome
if genome in properName:
genomeProperName = properName[genome]
if genome == currgenome:
genomeProperName += " (self)"
f.write("\t\ttrack snake%s\n" %genome)
f.write("\t\tlongLabel %s\n" %genomeProperName)
f.write("\t\tshortLabel %s\n" %genomeProperName)
f.write("\t\totherSpecies %s\n" %genome)
if genome in subgenomes:
f.write("\t\tvisibility full\n")
f.write("\t\tparent hubCentralAlignments\n")
else:
f.write("\t\tvisibility hide\n")
f.write("\t\tparent hubCentralAlignments off\n")
if snpwidth:
f.write("\t\tshowSnpWidth %d\n" % snpwidth)
f.write("\t\tpriority %d\n" %(i + 2))
f.write("\t\tbigDataUrl %s\n" % halfile)
f.write("\t\ttype halSnake\n")
f.write("\t\tgroup snake\n")
f.write("\t\tsubGroups view=Snake orgs=%s\n" %genome)
f.write("\n")
|
glennhickey/hal
|
assemblyHub/snakeTrack.py
|
Python
|
mit
| 1,869
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bird migration flow visualization</title>
<meta name="author" content="LifeWatch INBO">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../styles/favicon.ico">
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../styles/main.css">
</head>
<body>
<div id="intro">
<div class="container">
<div class="page-header">
<p><a href="../../index.html"><span class="glyphicon glyphicon-chevron-left"></span> Other versions and case studies</a></p>
<h1>Bird migration flow visualization <small>version 2</small></h1>
</div>
<p class="lead">This visualization shows one week of bird migration over the Northeastern United States.</p>
<p>The data are recorded in xxx 2010 by 13 weather radars (indicated as gray circles). We aggregate the data over time and altitude, and interpolate those over a larger area. We then release particles (indicated in blue) in the interpolated grid, which represent the speed and direction of the bird migration at that moment. The grid is updated every second with data from the next 60 minute interval, which updates the speed and direction of the particles.</p>
<p>The visualization was developed by <a href="https://twitter.com/LifeWatchINBO">LifeWatch INBO</a> for <a href="http://enram.eu">ENRAM</a>, the European Network for the Radar Surveillance of Animal Movement. The long-term goal of ENRAM is to retrieve and visualize this kind of data at a European scale. Documentation and source code are available on <a href="https://github.com/enram/bird-migration-flow-visualization">GitHub</a>.</p>
</div>
</div>
<nav id="controls">
<div class="container">
<div class="form-inline clearfix">
<div class="form-group pull-left">
<label class="sr-only" for="time-int">Date/time</label>
<input type="datetime" id="time-int" class="form-control">
<button type="button" id="play-pause" class="btn btn-default"><span class="glyphicon glyphicon-pause"></span></button>
<button type="button" id="previous" class="btn btn-default"><span class="glyphicon glyphicon-step-backward"></span></button>
<button type="button" id="next" class="btn btn-default"><span class="glyphicon glyphicon-step-forward"></span></button>
</div>
<div class="form-group pull-right">
<label>Altitude band </label>
<select id="alt-band" class="form-control">
<option value="1">200-1600m</option>
<option value="2">above 1600m</option>
</select>
</div>
</div>
</div>
</nav>
<div id="display">
<div class="container">
<div id="canvas">
<div id="map">
<svg id="map-svg"></svg>
</div>
<div id="animation">
<canvas id="animation-canvas"></canvas>
</div>
</div>
</div>
</div>
<div id="comments">
<div class="container">
<h2>Comments</h2>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'lifewatchinbo';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
</div>
</div>
<footer id="footer">
<div class="container clearfix">
<p class="pull-left">Created by <a href="http://lifewatch.inbo.be">LifeWatch INBO</a> for <a href="http://enram.eu">ENRAM</a> | Funded by <a href="http://cost.eu">COST</a></p>
<p class="pull-right"><a href="https://github.com/enram/bird-migration-flow-visualization">Source code</a></p>
</div>
</footer>
<!-- JS libraries -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/topojson/1.1.0/topojson.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/sprintf/0.0.7/sprintf.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.6.0/moment.min.js"></script>
<!-- Own scripts -->
<script type="text/javascript">
var settings = {
"datafile": "birds.csv",
"radardatafile": "radars.json",
"basemapfile": "basemap.topojson",
"baselayer_object": "countries",
"bbox": [-79.74,36.0,-66.76,48.05],
"date_format": "YY-MM-DD HH:mm",
"time_step_minutes": 60
};
</script>
<script type="text/javascript" src="../js/mvi.js"></script>
<script type="text/javascript" src="../js/app.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-42312007-2', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>
|
evz/bird-migration-flow-visualization
|
viz/2/ne-us/index.html
|
HTML
|
mit
| 6,483
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('editorial', '0064_auto_20171202_2016'),
]
operations = [
migrations.RenameField(
model_name='assignment',
old_name='contributor',
new_name='contractor',
),
]
|
ProjectFacet/facet
|
project/editorial/migrations/0065_auto_20171202_2022.py
|
Python
|
mit
| 402
|
// Config.h
// PaintDream (paintdream@paintdream.com)
// 2016-1-1
//
#pragma once
#include "../../Core/PaintsNow.h"
#include "../../Core/Interface/IType.h"
#include "../../Core/Interface/IDevice.h"
#include "../../Core/Template/TProxy.h"
#include <string>
#include <map>
#include <list>
namespace PaintsNow {
class Config {
public:
~Config();
void RegisterFactory(const String& factoryEntry, const String& name, const TWrapper<IDevice*>& factoryBase);
void UnregisterFactory(const String& factoryEntry, const String& name);
class Entry {
public:
String name;
TWrapper<IDevice*> factoryBase;
};
const std::list<Entry>& GetEntry(const String& factoryEntry) const;
private:
std::map<String, std::list<Entry> > mapFactories;
};
}
|
paintdream/PaintsNow
|
Source/Utility/LeavesFlute/Config.h
|
C
|
mit
| 757
|
{% extends '_base.html' %}
{% block title %}Twitter Clone. It's what's happening.{% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="static/stylesheets/components/forms.css">
<link rel="stylesheet" href="static/stylesheets/pages/landing.css">
{% endblock %}
{% block contents %}
{% include 'partials/header.html' %}
<main class="wrapper">
<div class="welcome-text">
<h1>Welcome to Twitter Clone.</h1>
<p>
Connect with your friends - and other fascinating people. Get in-the-moment
updates on the things that interest you. And watch events unfold, in real time,
from every angle.
</p>
</div>
<div class="auth-forms">
<form class="auth-form login-form" action="/login" method="post">
<main class="form-body">
{% if flash.error %}
<p class="form-error">{{ flash.error }}</p>
{% endif %}
<div class="field">
<input type="text" name="identifier" placeholder="Email or username" required>
</div>
<div class="field">
<input type="password" name="password" placeholder="Password" required>
<button class="btn btn-outline btn-primary">Log in</button>
</div>
<footer class="actions">
<label class="checkbox-label">
<input type="checkbox" name="remember">
Remember me
</label>
<span class="separator">·</span>
<a href="#">Forgot password?</a>
</footer>
</main>
</form>
<form class="auth-form signup-form" action="/signup" method="post">
<header class="form-header">
<h3 class="form-title">New to Twitter Clone? <span>Sign up</span></h3>
</header>
<main class="form-body">
{% if flash.signupError %}
<p class="form-error">{{ flash.signupError }}</p>
{% endif %}
<div class="field">
<input type="text" name="fullname" placeholder="Full name" required>
</div>
<div class="field">
<input type="email" name="email" placeholder="Email" required>
</div>
<div class="field">
<input type="password" name="password" placeholder="Password" required>
</div>
<footer class="actions">
<button class="btn btn-primary">Sign up for Twitter Clone</button>
</footer>
</main>
</form>
</div>
</main>
{% endblock %}
|
cmsc127-2017/twitter-clone
|
views/landing.html
|
HTML
|
mit
| 3,038
|
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Annotation\Relay;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Overblog\GraphQLBundle\Annotation\Annotation;
use Overblog\GraphQLBundle\Annotation\Type;
/**
* Annotation for GraphQL connection edge.
*
* @Annotation
* @NamedArgumentConstructor
* @Target("CLASS")
*/
#[Attribute(Attribute::TARGET_CLASS)]
final class Edge extends Type
{
/**
* Edge Node type.
*/
public string $node;
public function __construct(string $node)
{
$this->node = $node;
}
}
|
overblog/GraphQLBundle
|
src/Annotation/Relay/Edge.php
|
PHP
|
mit
| 606
|
using System;
using System.Collections.Generic;
namespace GtkSharpExtensions.Automotive
{
/// <summary>
/// Stores information about an Automobile Type
/// </summary>
public class Automobile
{
public Manufacturer Make { get; set; }
public AutoModel Model { get; set; }
public int Year { get; set; }
public Automobile ()
{
}
}
public class AutomobileCollection : System.Collections.ObjectModel.Collection<Automobile>
{
public void AddRange (IEnumerable<Automobile> items)
{
foreach (var item in items) {
Add (item);
}
}
}
}
|
TDubClark/GtkSharpExtensions
|
GtkSharpExtensions/Automotive/Automobile.cs
|
C#
|
mit
| 571
|
using System;
using System.IO;
using System.Net;
namespace Dongle.System.IO.Ftp
{
public class FtpFileInfo
{
private readonly string _fileName;
private readonly NetworkCredential _networkCredential;
public FtpFileInfo(string fileName, NetworkCredential networkCredential)
{
_fileName = fileName;
_networkCredential = networkCredential;
}
public string FullName
{
get
{
return _fileName;
}
}
public string Name
{
get
{
return _fileName.LastIndexOf("/") > 0 ? _fileName.Substring(_fileName.LastIndexOf("/") + 1) : _fileName;
}
}
public FileInfo CopyTo(string destFilename)
{
var request = (FtpWebRequest)WebRequest.Create(new Uri(_fileName));
request.Method = WebRequestMethods.Ftp.DownloadFile;
request.Credentials = _networkCredential;
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = false;
using (var response = (FtpWebResponse)request.GetResponse())
{
if (response != null)
{
using (var reader = response.GetResponseStream())
{
if (reader != null)
{
using (var memoryStream = new MemoryStream())
{
var buffer = new byte[1024];
while (true)
{
var bytesRead = reader.Read(buffer, 0, buffer.Length);
if (bytesRead == 0)
{
break;
}
memoryStream.Write(buffer, 0, bytesRead);
}
var downloadedData = memoryStream.ToArray();
using (var newFile = new FileStream(destFilename, FileMode.Create))
{
newFile.Write(downloadedData, 0, downloadedData.Length);
}
}
}
}
}
}
return new FileInfo(destFilename);
}
public FileInfo MoveTo(string destFilename)
{
var fileInfo = CopyTo(destFilename);
Delete();
return fileInfo;
}
public void Delete()
{
var request = (FtpWebRequest)WebRequest.Create(new Uri(_fileName));
request.Method = WebRequestMethods.Ftp.DeleteFile;
request.Credentials = _networkCredential;
request.UsePassive = true;
request.UseBinary = true;
request.KeepAlive = false;
var response = (FtpWebResponse)request.GetResponse();
if (response != null)
{
response.Close();
}
}
}
}
|
webbers/dongle.net
|
src/Dongle/System/IO/Ftp/FtpFileInfo.cs
|
C#
|
mit
| 3,281
|
// Chapter 19, exercise 03: template class Pair to hold pair of values of any
// type; use to implement symbol table like the one used in calculator (§7.8)
#include "../lib_files/std_lib_facilities.h"
// -----------------------------------------------------------------------------
template<class T, class U> struct Pair {
Pair(T vt, U vu) : val1(vt), val2(vu) { }
T val1;
U val2;
};
// -----------------------------------------------------------------------------
class Symbol_table {
vector< Pair<string,double> > var_table;
public:
double get(string s); // return the value of the Variable named s
void set(string s, double d); // set the Variable named s to d
bool is_declared(string var); // is var already in var_table?
double declare(string var, double val); // add (var,val) to var_table
void print(); // print table
};
// -----------------------------------------------------------------------------
double Symbol_table::get(string s)
{
for (int i = 0; i<var_table.size(); ++i)
if (var_table[i].val1==s) return var_table[i].val2;
error("Variable not found: ",s);
}
// -----------------------------------------------------------------------------
void Symbol_table::set(string s, double d)
{
for (int i = 0; i<var_table.size(); ++i)
if (var_table[i].val1==s) {
var_table[i].val2 = d;
return;
}
error("Variable not found: ",s);
}
// -----------------------------------------------------------------------------
bool Symbol_table::is_declared(string s)
{
for (int i = 0; i<var_table.size(); ++i)
if (var_table[i].val1==s) return true;
return false;
}
// -----------------------------------------------------------------------------
double Symbol_table::declare(string s, double d)
{
if (is_declared(s)) error("Variable exists already: ",s);
var_table.push_back(Pair<string,double>(s,d));
return d;
}
// -----------------------------------------------------------------------------
void Symbol_table::print()
{
for (int i = 0; i<var_table.size(); ++i)
cout << var_table[i].val1 << ": " << var_table[i].val2 << "\n";
}
// -----------------------------------------------------------------------------
int main()
try {
Symbol_table st;
st.declare("Pi",3.14);
st.declare("e",2.72);
st.print();
cout << "Pi is " << st.get("Pi") << "\n";
if (st.is_declared("Pi"))
cout << "Pi is declared\n";
else
cout << "Pi is not declared\n";
if (st.is_declared("nd"))
cout << "nd is declared\n";
else
cout << "nd is not declared\n";
st.set("Pi",4.14);
cout << "Pi is now " << st.get("Pi") << "\n";
// provoke errors
// cout << st.get("nd") << "\n";
// st.set("nd",99);
// st.declare("Pi",99);
}
catch (exception& e) {
cerr << "Exception: " << e.what() << "\n";
}
catch (...) {
cerr << "Exception\n";
}
|
bewuethr/stroustrup_ppp
|
chapter19/chapter19_ex03.cpp
|
C++
|
mit
| 3,000
|
# phabulo.github.io
blog.phabulo.us
|
mcnamarabrian/phabulo.github.io
|
README.md
|
Markdown
|
mit
| 36
|
const Helpers = require('../../../../common/databaseHelpers.js');
const Assert = require('chai').assert;
module.exports = function() {
it('return default query part with no parameter', function() {
Assert.equal(Helpers.getOrderByQuery(), ' ORDER BY id ASC');
});
it('return correct query part with single ascending parameter', function() {
const parameter = 'username';
Assert.equal(Helpers.getOrderByQuery(parameter), ' ORDER BY username ASC');
});
it('return correct query part with single descending parameter', function() {
const parameter = '-email';
Assert.equal(Helpers.getOrderByQuery(parameter), ' ORDER BY email DESC');
});
it('return correct query part with multiple ascending parameters', function() {
const parameter = 'id,email,user,password';
Assert.equal(Helpers.getOrderByQuery(parameter), ' ORDER BY id ASC, email ASC, user ASC, password ASC');
});
it('return correct query part with multiple descending parameters', function() {
const parameter = '-order,-user,-login';
Assert.equal(Helpers.getOrderByQuery(parameter), ' ORDER BY order DESC, user DESC, login DESC');
});
it('return correct query part with multiple mixed parameters', function() {
const parameter = 'user,-price,-size,date';
Assert.equal(Helpers.getOrderByQuery(parameter), ' ORDER BY user ASC, price DESC, size DESC, date ASC');
});
};
|
waiterio/api
|
test/unit/common/databaseHelpers/testGetOrderByQuery.js
|
JavaScript
|
mit
| 1,362
|
<?php
namespace App\Controllers\Api\Admin;
use Slim\Http\Request;
use Slim\Http\Response;
use App\Models\Node;
use App\Models\TrafficLog;
use App\Controllers\BaseController;
class NodeController extends BaseController
{
public function index(Request $req, Response $res, $args)
{
$pageNum = 1;
if (isset($req->getQueryParams()['page'])) {
$pageNum = $req->getQueryParams()['page'];
}
$traffic = Node::paginate(15, [
'*',
], 'page', $pageNum);
$traffic->setPath('/api/admin/nodes');
//return $this->echoJsonWithData($res,$traffic);
return $this->echoJson($res, $traffic);
}
private function saveModel(Response $response, Node $node, $arr)
{
foreach ($arr as $k => $v) {
$node->$k = $v;
}
$node->save();
return $this->echoJsonWithData($response, $node);
}
public function store(Request $req, Response $res, $args)
{
$input = file_get_contents("php://input");
$arr = json_decode($input, true);
return $this->saveModel($res, new Node(), $arr);
}
public function update(Request $req, Response $res, $args)
{
$input = file_get_contents("php://input");
$arr = json_decode($input, true);
return $this->saveModel($res, Node::find($args['id']), $arr);
}
public function delete(Request $req, Response $res, $args)
{
$node = Node::find($args['id']);
$node->delete();
return $this->echoJsonWithData($res, []);
}
public function trafficLogs(Request $req, Response $res, $args)
{
$pageNum = 1;
if (isset($req->getQueryParams()['page'])) {
$pageNum = $req->getQueryParams()['page'];
}
$traffic = TrafficLog::where('user_traffic_log.node_id', $args['id'])
->join('ss_node', 'user_traffic_log.node_id', '=', 'ss_node.id')
->orderBy('user_traffic_log.id', 'desc')
->paginate(15, [
'user_traffic_log.*',
'ss_node.name as name'
], 'page', $pageNum);
$traffic->setPath('/api/admin/trafficLogs');
//return $this->echoJsonWithData($res,$traffic);
return $this->echoJson($res, $traffic);
}
}
|
ma321c/SS-panel_V4
|
app/Controllers/Api/Admin/NodeController.php
|
PHP
|
mit
| 2,300
|
class RevisionsController < ApplicationController
before_filter :load_article
def new
@revision = @article.revisions.new
@revision.body = @article.current_revision.body
end
def create
@revision = @article.revisions.create(revision_params)
if @revision.persisted?
redirect_to article_path(@article), notice: "Article edited!"
else
render "new"
end
end
private
def load_article
@article = Article.find(params[:article_id])
end
def revision_params
params[:article_revision].permit(:body, :edit_summary)
end
end
|
locriani/magmawiki
|
app/controllers/revisions_controller.rb
|
Ruby
|
mit
| 574
|
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/asset_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// Enum describing possible types of asset.
type AssetTypeEnum_AssetType int32
const (
// Not specified.
AssetTypeEnum_UNSPECIFIED AssetTypeEnum_AssetType = 0
// Used for return value only. Represents value unknown in this version.
AssetTypeEnum_UNKNOWN AssetTypeEnum_AssetType = 1
// YouTube video asset.
AssetTypeEnum_YOUTUBE_VIDEO AssetTypeEnum_AssetType = 2
// Media bundle asset.
AssetTypeEnum_MEDIA_BUNDLE AssetTypeEnum_AssetType = 3
// Image asset.
AssetTypeEnum_IMAGE AssetTypeEnum_AssetType = 4
// Text asset.
AssetTypeEnum_TEXT AssetTypeEnum_AssetType = 5
)
var AssetTypeEnum_AssetType_name = map[int32]string{
0: "UNSPECIFIED",
1: "UNKNOWN",
2: "YOUTUBE_VIDEO",
3: "MEDIA_BUNDLE",
4: "IMAGE",
5: "TEXT",
}
var AssetTypeEnum_AssetType_value = map[string]int32{
"UNSPECIFIED": 0,
"UNKNOWN": 1,
"YOUTUBE_VIDEO": 2,
"MEDIA_BUNDLE": 3,
"IMAGE": 4,
"TEXT": 5,
}
func (x AssetTypeEnum_AssetType) String() string {
return proto.EnumName(AssetTypeEnum_AssetType_name, int32(x))
}
func (AssetTypeEnum_AssetType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_491e1f3963d1cbfd, []int{0, 0}
}
// Container for enum describing the types of asset.
type AssetTypeEnum struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AssetTypeEnum) Reset() { *m = AssetTypeEnum{} }
func (m *AssetTypeEnum) String() string { return proto.CompactTextString(m) }
func (*AssetTypeEnum) ProtoMessage() {}
func (*AssetTypeEnum) Descriptor() ([]byte, []int) {
return fileDescriptor_491e1f3963d1cbfd, []int{0}
}
func (m *AssetTypeEnum) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AssetTypeEnum.Unmarshal(m, b)
}
func (m *AssetTypeEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AssetTypeEnum.Marshal(b, m, deterministic)
}
func (m *AssetTypeEnum) XXX_Merge(src proto.Message) {
xxx_messageInfo_AssetTypeEnum.Merge(m, src)
}
func (m *AssetTypeEnum) XXX_Size() int {
return xxx_messageInfo_AssetTypeEnum.Size(m)
}
func (m *AssetTypeEnum) XXX_DiscardUnknown() {
xxx_messageInfo_AssetTypeEnum.DiscardUnknown(m)
}
var xxx_messageInfo_AssetTypeEnum proto.InternalMessageInfo
func init() {
proto.RegisterEnum("google.ads.googleads.v1.enums.AssetTypeEnum_AssetType", AssetTypeEnum_AssetType_name, AssetTypeEnum_AssetType_value)
proto.RegisterType((*AssetTypeEnum)(nil), "google.ads.googleads.v1.enums.AssetTypeEnum")
}
func init() {
proto.RegisterFile("google/ads/googleads/v1/enums/asset_type.proto", fileDescriptor_491e1f3963d1cbfd)
}
var fileDescriptor_491e1f3963d1cbfd = []byte{
// 326 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x4f, 0x4e, 0xf3, 0x30,
0x14, 0xc4, 0xbf, 0xa6, 0xed, 0x07, 0x75, 0x29, 0x18, 0x2f, 0x11, 0x5d, 0xb4, 0x07, 0x70, 0x14,
0xb1, 0x33, 0x2b, 0x87, 0x98, 0x2a, 0x82, 0xa6, 0x95, 0x48, 0xc2, 0x1f, 0x45, 0xaa, 0x42, 0x13,
0x45, 0x95, 0x5a, 0x3b, 0xaa, 0xdd, 0x4a, 0xbd, 0x0e, 0x4b, 0x8e, 0xc2, 0x35, 0xd8, 0x71, 0x0a,
0x14, 0x9b, 0x64, 0x07, 0x1b, 0x6b, 0xf4, 0xde, 0xef, 0x8d, 0xc6, 0x03, 0x70, 0x21, 0x44, 0xb1,
0xce, 0xed, 0x34, 0x93, 0xb6, 0x91, 0x95, 0xda, 0x3b, 0x76, 0xce, 0x77, 0x1b, 0x69, 0xa7, 0x52,
0xe6, 0x6a, 0xa1, 0x0e, 0x65, 0x8e, 0xcb, 0xad, 0x50, 0x02, 0x0d, 0x0d, 0x84, 0xd3, 0x4c, 0xe2,
0x86, 0xc7, 0x7b, 0x07, 0x6b, 0xfe, 0xe2, 0xb2, 0xb6, 0x2b, 0x57, 0x76, 0xca, 0xb9, 0x50, 0xa9,
0x5a, 0x09, 0x2e, 0xcd, 0xf1, 0x58, 0x81, 0x01, 0xad, 0x0c, 0xc3, 0x43, 0x99, 0x33, 0xbe, 0xdb,
0x8c, 0x97, 0xa0, 0xd7, 0x0c, 0xd0, 0x19, 0xe8, 0x47, 0xc1, 0xc3, 0x9c, 0xdd, 0xf8, 0xb7, 0x3e,
0xf3, 0xe0, 0x3f, 0xd4, 0x07, 0x47, 0x51, 0x70, 0x17, 0xcc, 0x1e, 0x03, 0xd8, 0x42, 0xe7, 0x60,
0xf0, 0x3c, 0x8b, 0xc2, 0xc8, 0x65, 0x8b, 0xd8, 0xf7, 0xd8, 0x0c, 0x5a, 0x08, 0x82, 0x93, 0x29,
0xf3, 0x7c, 0xba, 0x70, 0xa3, 0xc0, 0xbb, 0x67, 0xb0, 0x8d, 0x7a, 0xa0, 0xeb, 0x4f, 0xe9, 0x84,
0xc1, 0x0e, 0x3a, 0x06, 0x9d, 0x90, 0x3d, 0x85, 0xb0, 0xeb, 0x7e, 0xb6, 0xc0, 0x68, 0x29, 0x36,
0xf8, 0xcf, 0xe4, 0xee, 0x69, 0x13, 0x64, 0x5e, 0x65, 0x9d, 0xb7, 0x5e, 0xdc, 0x9f, 0x83, 0x42,
0xac, 0x53, 0x5e, 0x60, 0xb1, 0x2d, 0xec, 0x22, 0xe7, 0xfa, 0x27, 0x75, 0x55, 0xe5, 0x4a, 0xfe,
0xd2, 0xdc, 0xb5, 0x7e, 0xdf, 0xac, 0xf6, 0x84, 0xd2, 0x77, 0x6b, 0x38, 0x31, 0x56, 0x34, 0x93,
0xd8, 0xc8, 0x4a, 0xc5, 0x0e, 0xae, 0x5a, 0x90, 0x1f, 0xf5, 0x3e, 0xa1, 0x99, 0x4c, 0x9a, 0x7d,
0x12, 0x3b, 0x89, 0xde, 0x7f, 0x59, 0x23, 0x33, 0x24, 0x84, 0x66, 0x92, 0x90, 0x86, 0x20, 0x24,
0x76, 0x08, 0xd1, 0xcc, 0xeb, 0x7f, 0x1d, 0xec, 0xea, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x60, 0xe7,
0xfb, 0x60, 0xd1, 0x01, 0x00, 0x00,
}
|
pushbullet/engineer
|
vendor/google.golang.org/genproto/googleapis/ads/googleads/v1/enums/asset_type.pb.go
|
GO
|
mit
| 5,428
|
<div class="apostilleMessage">
<div class="container-fluid main">
<div class="row">
<div class="col-sm-8">
<h2>{{ 'APOSTILLE_MESSAGE_TITLE' | translate }}</h2>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-md-12">
<div class="panel-heading">
<div class="tabDescription">
<!-- Title of panel -->
<span ng-show="!$ctrl.formData.isMultisig && !$ctrl.invoice">{{ 'TRANSFER_TRANSACTION_NAME' | translate }}</span>
<span ng-show="$ctrl.formData.isMultisig">{{ 'TRANSFER_TRANSACTION_MULTISIG_NAME' | translate }}</span>
<span ng-show="$ctrl.invoice">{{ 'APOSTILLE_CREATE_MESSAGE_REQUEST' | translate }}</span>
</div>
<!-- Tabbed modes -->
<ul class="nav nav-tabs">
<!-- Normal mode -->
<!-- On click it set multisig to false, invoice to false and update mosaics of account -->
<li ng-class="$ctrl.formData.isMultisig || $ctrl.invoice ? '' : 'active'"><a ng-click="$ctrl.formData.isMultisig = false;$ctrl.invoice = false;$ctrl.updateCurrentAccountMosaics();$ctrl.updateCurrentAccountNS();$ctrl.setMessage();$ctrl.setMosaicTransfer();">{{ 'GENERAL_TAB_NORMAL' | translate }}</a></li>
<!-- Multisig mode -->
<!-- On click it set multisig to true, invoice to false update mosaics of account -->
<li ng-show="$ctrl._DataBridge.accountData.meta.cosignatoryOf.length" ng-class="$ctrl.formData.isMultisig ? 'active' : ''"><a ng-click="$ctrl.formData.isMultisig = true;$ctrl.invoice = false;$ctrl.formData.encryptMessage = false;$ctrl.updateCurrentAccountMosaics();$ctrl.updateCurrentAccountNS();$ctrl.setMessage();$ctrl.setMosaicTransfer();">{{ 'GENERAL_TAB_MULTISIG' | translate }}</a></li>
<!-- Invoice mode -->
<!-- On click it set multisig to false, set invoice to true, isMosaicTransfer to false and reset form data -->
<li ng-class="$ctrl.invoice ? 'active' : ''"><a ng-click="$ctrl.formData.isMultisig = false;$ctrl.invoice = true;$ctrl.formData.isMosaicTransfer = false;">{{ 'APOSTILLE_REQUEST_MESSAGE' | translate }}</a></li>
</ul>
</div>
<!-- Transaction form -->
<div class="panel-body" ng-show="!$ctrl.invoice">
<!-- SELECT MULTISIG ACCOUNT -->
<fieldset class="form-group" ng-show="$ctrl.formData.isMultisig">
<div class="input-group">
<span class="input-group-btn">
<label for="namespaceParent" class="control-label">{{ 'GENERAL_ACCOUNT' | translate }}:</label>
</span>
<!-- Update account mosaics on change -->
<select class="form-control" ng-options="(acc.address | fmtContact:$ctrl.contacts) for acc in $ctrl._DataBridge.accountData.meta.cosignatoryOf track by acc.address" ng-model="$ctrl.formData.multisigAccount" ng-change="$ctrl.updateCurrentAccountMosaics();$ctrl.updateCurrentAccountNS();$ctrl.setMessage();$ctrl.setMosaicTransfer();"></select>
</div>
</fieldset>
<!-- MULTISIG ACCOUNT BALANCE -->
<fieldset class="form-group" ng-show="$ctrl.formData.isMultisig && $ctrl.formData.multisigAccount">
<div class="input-group">
<span class="input-group-btn">
<label>{{'FORM_SIDE_BTN_BALANCE' | translate}}</label>
</span>
<div class="form-control formFloat" readOnly>
<input type="text" value="{{ ($ctrl.formData.multisigAccount.balance | fmtNemValue)[0] }}.{{ ($ctrl.formData.multisigAccount.balance | fmtNemValue)[1] }}" readOnly disabled/>
<label class="floatRight"><small>XEM</small></label>
</div>
</div>
</fieldset>
<!-- NOTARIZATION ACCOUNT -->
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{'APOSTILLE_NTY_ACCOUNT' | translate}}</label>
</span>
<input class="form-control" type="text" ng-model="$ctrl.formData.recipient" readOnly/>
</div>
</fieldset>
<!-- CHECKBOX FIELDS -->
<div class="row checkboxes">
<div class="col-sm-3">
<fieldset class="form-group">
<input id="box10" type="checkbox" ng-model="$ctrl.formData.isMosaicTransfer" ng-change="$ctrl.setMosaicTransfer();">
<label for="box10">{{'APOSTILLE_MESSAGE_ADD_MOSAIC' | translate}}</label>
</fieldset>
</div>
<div class="col-sm-5">
<fieldset class="form-group">
<input id="box11" type="checkbox" ng-model="$ctrl.addNamespace" ng-change="$ctrl.setMessage();">
<label for="box11">{{'APOSTILLE_MESSAGE_NS_BRAND' | translate}}</label>
</fieldset>
</div>
<div class="col-sm-4">
<fieldset class="form-group">
<input id="box12" type="checkbox" ng-model="$ctrl.formData.encryptMessage" placeholder="" ng-disabled="$ctrl.formData.isMultisig || !$ctrl.formData.recipientPubKey.length" ng-change="$ctrl.updateFees();">
<label for="box12">{{'TRANSFER_TRANSACTION_ENCRYPT_MESSAGE' | translate}}</label>
</fieldset>
</div>
</div>
<!-- NAMESPACE TO USE AS BRAND -->
<fieldset class="form-group" ng-show="$ctrl.addNamespace">
<div class="input-group">
<span class="input-group-btn">
<label>{{'GENERAL_NAMESPACE' | translate}}</label>
</span>
<select class="form-control" ng-options="namespace.fqn for namespace in $ctrl._DataBridge.namespaceOwned[$ctrl.currentAccount] | objValues" ng-model="$ctrl.namespaceParent" ng-change="$ctrl.setMessage();"></select>
</div>
</fieldset>
<!-- MESSAGE FIELD -->
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn message">
<label>{{'FORM_MESSAGE_PLACEHOLDER' | translate}}: </label>
</span>
<textarea class="form-control" ng-model="$ctrl.formData.message" placeholder="{{'FORM_MESSAGE_PLACEHOLDER' | translate}}" rows="4" ng-change="$ctrl.updateFees();"></textarea>
</div>
</fieldset>
<!-- Transaction fee calculation section -->
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{'FORM_SIDE_BTN_TX_FEE' | translate}}: </label>
</span>
<div class="form-control formFloat" readOnly>
<span class="feeAmount">
<!-- Multisig fee -->
<span ng-show="$ctrl.formData.isMultisig">{{($ctrl.formData.innerFee | fmtNemValue)[0]}}.{{($ctrl.formData.innerFee | fmtNemValue)[1]}} +</span>
<!-- Transaction fee -->
<span>{{($ctrl.formData.fee | fmtNemValue)[0]}}.{{($ctrl.formData.fee | fmtNemValue)[1]}} <span ng-show="$ctrl.formData.encryptMessage">(+ encryption fees)</span></span>
</span>
<label class="floatRight"><small>XEM</small></label>
</div>
</div>
</fieldset>
<!-- PASSWORD FIELD -->
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label ng-class="!$ctrl.common.password.length ? 'has-error' : ''">{{ 'FORM_PASSWORD' | translate }}: </label>
</span>
<input class="form-control" type="password" placeholder="{{ 'FORM_PASSWORD_FIELD_PLACEHOLDER' | translate }}" ng-model="$ctrl.common.password" ng-class="!$ctrl.common.password.length ? 'has-error' : ''"/>
</div>
</fieldset>
<!-- Send button disabled if already pressed or no password or no clean recipient address or message is supposed to be encrypted but no recipient public key or is a mosaic transfer and no mosaics in array -->
<button class="btn btn-success" type="submit" ng-show="!$ctrl.invoice" ng-disabled="$ctrl.okPressed || !$ctrl.common.password.length || $ctrl.formData.recipient.length !== 40 || $ctrl.formData.encryptMessage && $ctrl.formData.recipientPubKey.length !== 64 || $ctrl.formData.isMosaicTransfer && !$ctrl.formData.mosaics.length || $ctrl.addNamespace && !$ctrl.namespaceParent" ng-click="$ctrl.send()">
<i class="fa fa-send"></i> {{ 'GENERAL_SEND' | translate }}
</button>
</div>
<div class="panel-body" ng-show="$ctrl.invoice">
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{'APOSTILLE_NTY_ACCOUNT' | translate}}: </label>
</span>
<input class="form-control" type="text" ng-model="$ctrl.invoiceData.data.addr" disabled/>
</div>
</fieldset>
<fieldset class="form-group">
<div class="input-group">
<span class="input-group-btn">
<label>{{'FORM_MESSAGE_PLACEHOLDER' | translate}}: </label>
</span>
<textarea class="form-control" ng-model="$ctrl.invoiceData.data.msg" placeholder="{{'FORM_MESSAGE_PLACEHOLDER' | translate}}" rows="4" ng-change="$ctrl.updateInvoiceQR();"></textarea>
</div>
</fieldset>
</div>
</div>
<!-- Mosaics part -->
<div class="col-md-6" ng-show="$ctrl.formData.isMosaicTransfer">
<div class="panel-heading">
<h3>{{ 'TRANSFER_TRANSACTION_ATTACH_MOSAIC' | translate }} <i class="fa fa-paperclip"></i></h3>
</div>
<div class="panel-body">
<!-- MOSAIC SELECTION -->
<div class="form-group">
<div class="input-group">
<select class="col-sm-7 form-control" ng-options="mosaicName for mosaicName in $ctrl.currentAccountMosaicNames" ng-model="$ctrl.selectedMosaic" required="required" id="mosaic" ng-disabled="!$ctrl.formData.isMosaicTransfer"></select>
<span class="input-group-btn">
<button type="button" class="btn btn-success" ng-click="$ctrl.attachMosaic()" ng-disabled="!$ctrl.formData.isMosaicTransfer">{{ 'TRANSFER_TRANSACTION_ATTACH' | translate }}</button>
</span>
</div>
</div>
<!-- MOSAIC BALANCE -->
<div class="form-group" ng-show="$ctrl.selectedMosaic !== 'nem:xem'">
<div class="input-group">
<span class="input-group-btn">
<label>{{'FORM_SIDE_BTN_BALANCE' | translate}}</label>
</span>
<div class="form-control formFloat" disabled>
<input class="readOnly mosaic" type="text" value="{{($ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].quantity | fmtSupply:$ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].mosaicId:$ctrl._DataBridge.mosaicDefinitionMetaDataPair)[0]}}.{{($ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].quantity | fmtSupply:$ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].mosaicId:$ctrl._DataBridge.mosaicDefinitionMetaDataPair)[1]}}" readOnly/>
<label class="floatRight"><small>{{$ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].mosaicId.namespaceId}}:{{$ctrl.currentAccountMosaicData[$ctrl.selectedMosaic].mosaicId.name}}</small></label>
</div>
</div>
</div>
</div>
<!-- Mosaics attached table -->
<div class="panel-default mosaicsAttached">
<div class="panel-heading">
<h3> {{ 'TRANSFER_TRANSACTION_MOSAICS_ATTACHED' | translate }}</h3>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>{{ 'GENERAL_MOSAIC' | translate }}</th>
<th>{{ 'GENERAL_AMOUNT' | translate }}</th>
<th>{{ 'GENERAL_TOTAL' | translate }}</th>
<th>{{ 'GENERAL_LEVY' | translate }}</th>
<th>{{ 'GENERAL_REMOVE' | translate }}</th>
</tr>
</thead>
</table>
<table class="table table-condensed">
<tbody>
<tr ng-repeat="mos in $ctrl.formData.mosaics">
<td style="overflow:hidden;text-overflow: ellipsis;" title="{{mos.mosaicId.namespaceId}}:{{mos.mosaicId.name}}"><span class="text-muted">{{mos.mosaicId.namespaceId}}</span>:{{mos.mosaicId.name}}</span>
</td>
<td style="padding:0;"><input id="{{mos.gid}}" type="number" class="form-control" ng-model="mos.quantity" placeholder="1" min="0" ng-change="$ctrl.updateFees()"></td>
<td><strong>{{(mos.quantity | fmtSupply:mos.mosaicId:$ctrl.mosaicsMetaData)[0]}}</strong>
<span class="text-muted">.{{(mos.quantity | fmtSupply:mos.mosaicId:$ctrl.mosaicsMetaData)[1]}}</span>
<td>
<tag-levy mos="mos" tx="$ctrl.formData" mosaics="$ctrl.mosaicsMetaData">
<div ng-show="levy.type">
<p class="form-control-static">
<!-- tx.amount * 1000000 because it needs to be in micro xem in fmtLevyFee filter -->
<strong>{{mos | fmtLevyFee:tx.amount*1000000:levy:mosaics}}</strong>
<span class="text-muted">{{levy.mosaicId.namespaceId}}</span>:{{levy.mosaicId.name}}
<span ng-show="levy.type === 1">- I<!--({{ 'TRANSFER_INFO_LEVY_TYPE_1' | translate }})--></span>
<span ng-show="levy.type === 2">- II<!--({{ 'TRANSFER_INFO_LEVY_TYPE_2' | translate }})--></span>
</p>
</div>
<div ng-show="!levy.type">
{{ 'GENERAL_NONE' | translate }}
</div>
</tag-levy>
</td>
<td>
<a ng-click="$ctrl.removeMosaic($index)">
<span class="fa fa-times"></span>
</a>
</td>
</tr>
</tbody>
</table>
<div class="panel-body" ng-show="!$ctrl.formData.mosaics.length">
<p>{{ 'GENERAL_NO_RESULTS' | translate }}</p>
</div>
<div class="bg-info">
<small><i><b>{{ 'GENERAL_LEVY_TYPES' | translate }}: {{ 'GENERAL_LEVY_TYPES_NOTE' | translate }}</b></i></small>
</div>
</div>
</div>
<!-- Invoice part -->
<div class="col-md-6" ng-show="$ctrl.invoice">
<div class="panel-heading">
<h3>{{ 'GENERAL_QR' | translate }}</h3>
</div>
<div class="panel-body">
<center>
<!-- QR appended from controller here -->
<div id="invoiceQR"></div>
</center>
</div>
</div>
</div>
</div>
</div>
|
zytfo/smartPaymentsModule
|
src/app/modules/apostille/manage/message/apostilleMessage.html
|
HTML
|
mit
| 15,064
|
---
title: 统计词话(一)
date: '2011-03-04T22:05:29+00:00'
author: 邱怡轩
categories:
- 数据分析
- 数据挖掘与机器学习
tags:
- 分词
- 宋词
- 文本挖掘
- 词频
- 频率
slug: statistics-in-chinese-song-poem-1
forum_id: 418833
---

不知道这个标题是否有足够的吸引力把你骗进来。如果你认为统计是一个到处充满了期望方差分布回归随机多元和概率的东西,那么……你可能是对的,不过本文想要告诉你的是,你其实还可以用统计来做一些你关心的事情,比如现在,我们既谈风月,也谈统计。:D
相信大家对宋词都不会陌生。无论你是否喜欢,总还是可以吟诵出几句名篇来的。如果你经常找一些宋词来读的话,你可能会发现一个有趣的现象,那就是有些词语或意象似乎特别受到词人的青睐,像是东风,明月,芳草等等。当然,对于这个现象,不同的人有不同的看法。一种观点是这些意象往往具有特定的含义,或是抒发离恨,或是寄托相思,总之是把人们的情感倾注在了这些最常见的事物之中,让人触景生情;而另一种看法则觉得词的雕琢痕迹太明显,内容也相对单调,使得用词容易造成重复。本文当然不是来探讨这些话题的,而是想用统计的方法来给大家展示一下究竟有哪些话语被词人一次一次地书写,被读者一遍一遍地传唱。
从统计的角度来看,上面这个问题其实非常简单,无非就是计算一下宋词之中词语出现的频率,然后做一个排序就可以了。但这个问题对于中文来说恰恰是最难攻克的一个环节。在英语中,词语与词语之间有着天然的分隔符,但对于中文,只有句子之间有标点符号,句子之内只能通过词语的含义来进行辨别。这也就是为什么在文本挖掘领域中,中文的分词依然是一个富有挑战性的任务的原因。
不过好在宋词本身的形式帮了我们很大的忙。首先,宋词的句子一般都非常短,这相当于已经有了一次粗略的词语划分;其次,宋词的用词也很简洁,一个词一般是两个字,偶尔可能有三个字、四个字,超过四个字的词就非常罕见了。于是我们就有一种比较“野蛮”的做法,来对宋词中的用词进行划分。
<!--more-->
举个例子来说,《青玉案》中的这句“东风夜放花千树”,如果把所有可能的两个字的组合列出来,就是:
> 东风 风夜 夜放 放花 花千 千树
如果再把三个字的可能组合列出来,则有:
> 东风夜 风夜放 夜放花 放花千 花千树
如果不考虑其它的可能,那么总共就有11个词语。当然,这其中会有很多无意义的组合,但是我们可以预想的是,这些无意义的组合将不太可能大规模地重复出现,因此在排序的过程中它们自动地就被排在高频词语之后了。通过这种做法,宋词中的每句话大体都能分成10个左右的词语单位,然后对所有的这些词语单位进行频数统计,就可以得到最终的高频词语列表了。
下面就通过一段R程序来进行一次实际的分析,用到的数据是从网络上整理的《全宋词》电子资料,其中可能有部分字词不正确。完整的程序和数据可以从[这里下载](https://uploads.cosx.org/2011/03/SongPoem.tar.gz)。
首先,当然是读取数据。
```r
txt=read.csv("SongPoem.csv",colClasses="character");
```
接下来提取出宋词的内容,并根据标点符号对句子进行分割。
```r
sentences=strsplit(txt$Sentence,",|。|!|?|、");
sentences=unlist(sentences);
sentences=sentences[sentences!=""];
```
对句子进行分割后需要检查一遍,如果有些句子的长度超过了15个字,那么很可能是错误的字符,应该剔除掉。
```r
s.len=nchar(sentences);
sentences=sentences[s.len<=15];
s.len=nchar(sentences);
```
下面的这个函数非常重要,其作用就是按照之前的做法把所有可能的字的组合计算出来。这里只是考虑了两个字的组合。
```r
splitwords=function(x,x.len) substring(x,1:(x.len-1),2:x.len);
```
接下来就好办了,无非就是应用上面的函数对句子进行拆分,然后统计词频并排序。
```r
words=mapply(splitwords,sentences,s.len,SIMPLIFY=TRUE,USE.NAMES=FALSE);
words=unlist(words);
words.freq=table(words);
words.freq=sort(words.freq,decreasing=TRUE);
words.freq[1:100];
```
最后的结果如下:
```
排序 词语 频数 排序 词语 频数
1 □□ 1584 51 匆匆 357
2 东风 1379 52 芙蓉 356
3 何处 1231 53 今日 354
4 人间 1164 54 扁舟 351
5 风流 843 55 西湖 350
6 归去 818 56 憔瘁 349
7 春风 800 57 消息 347
8 西风 782 58 桃花 343
9 归来 768 59 何事 335
10 江南 760 60 一片 333
11 相思 759 61 神仙 332
12 梅花 725 62 一声 331
13 千里 668 63 黄花 330
14 多少 653 64 心事 330
15 回首 649 65 鸳鸯 328
16 如今 647 66 十分 327
17 明月 646 67 人生 324
18 阑干 632 68 断肠 323
19 年年 605 69 佳人 323
20 万里 587 70 长安 321
21 一笑 579 71 东君 319
22 黄昏 561 72 桃李 319
23 当年 537 73 而今 318
24 芳草 533 74 为谁 317
25 天涯 531 75 无情 307
26 相逢 523 76 去年 306
27 尊前 519 77 天气 306
28 一枝 510 78 不是 305
29 风雨 500 79 海棠 305
30 流水 481 80 少年 305
31 风吹 474 81 今夜 304
32 依旧 469 82 不似 303
33 多情 458 83 十年 303
34 风月 452 84 行人 300
35 当时 451 85 谁知 300
36 故人 445 86 寂寞 299
37 斜阳 444 87 肠断 297
38 无人 443 88 江上 297
39 不知 426 89 悠悠 297
40 深处 424 90 富贵 295
41 不见 416 91 时候 295
42 时节 407 92 昨夜 295
43 凄凉 404 93 几度 292
44 平生 394 94 月明 292
45 春色 393 95 何时 291
46 无限 381 96 青山 291
47 一点 374 97 蓬莱 290
48 功名 366 98 往事 290
49 杨柳 363 99 如何 287
50 天上 361 100 惟有 287
```
需要解释一下的是,排在第一位的方框是词库中的一些出错的字符,直接略去即可。
至此,真相大白。至于这个结果意味着什么,就留给读者自己细细品读吧。
|
JianqiaoWang/cosx.org
|
content/post/2011-03-04-statistics-in-chinese-song-poem-1.md
|
Markdown
|
mit
| 7,565
|
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("05. Calculate Sequence with Queue")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("05. Calculate Sequence with Queue")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[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("2ac1ddc3-dcaa-426c-9a73-9ebf325f293d")]
// 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")]
|
PhilipYordanov/Software-University-CSharp-Fundamentals-track
|
CSharpAdvance/Stacks and Queues/05. Calculate Sequence with Queue/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,437
|
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
using ApprovalTests.Reporters;
using Mono.Cecil;
using NUnit.Framework;
[TestFixture]
[UseReporter(typeof(VisualStudioReporter))]
public class PureDotNetAssemblyTests
{
Assembly assembly;
string beforeAssemblyPath;
string afterAssemblyPath;
ModuleDefinition moduleDefinition;
public PureDotNetAssemblyTests()
{
beforeAssemblyPath = Path.GetFullPath(@"..\..\..\AssemblyToProcessWithoutUnmanaged\bin\Debug\AssemblyToProcessWithoutUnmanaged.dll");
var directoryName = Path.GetDirectoryName(@"..\..\..\Debug\");
#if (!DEBUG)
beforeAssemblyPath = beforeAssemblyPath.Replace("Debug", "Release");
directoryName = directoryName.Replace("Debug", "Release");
#endif
afterAssemblyPath = beforeAssemblyPath.Replace(".dll", "InMemory.dll");
File.Copy(beforeAssemblyPath, afterAssemblyPath, true);
File.Copy(beforeAssemblyPath.Replace(".dll", ".pdb"), afterAssemblyPath.Replace(".dll", ".pdb"), true);
var readerParams = new ReaderParameters { ReadSymbols = true };
moduleDefinition = ModuleDefinition.ReadModule(afterAssemblyPath, readerParams);
var references = new List<string>
{
beforeAssemblyPath.Replace("AssemblyToProcessWithoutUnmanaged", "AssemblyToReference"),
};
var assemblyToReferenceDirectory = Path.GetDirectoryName(beforeAssemblyPath.Replace("AssemblyToProcessWithoutUnmanaged", "AssemblyToReference"));
var assemblyToReferenceResources = Directory.GetFiles(assemblyToReferenceDirectory, "*.resources.dll", SearchOption.AllDirectories);
references.AddRange(assemblyToReferenceResources);
// This should use ILTemplate instead of ILTemplateWithUnmanagedHandler.
using (var weavingTask = new ModuleWeaver
{
ModuleDefinition = moduleDefinition,
AssemblyResolver = new MockAssemblyResolver(),
Config = XElement.Parse("<Costura />"),
ReferenceCopyLocalPaths = references,
AssemblyFilePath = beforeAssemblyPath
})
{
weavingTask.Execute();
var writerParams = new WriterParameters { WriteSymbols = true };
moduleDefinition.Write(afterAssemblyPath, writerParams);
}
var isolatedPath = Path.Combine(Path.GetTempPath(), "CosturaPureDotNetIsolatedMemory.dll");
File.Copy(afterAssemblyPath, isolatedPath, true);
File.Copy(afterAssemblyPath.Replace(".dll", ".pdb"), isolatedPath.Replace(".dll", ".pdb"), true);
assembly = Assembly.LoadFile(isolatedPath);
}
[Test]
public void Simple()
{
var instance2 = assembly.GetInstance("ClassToTest");
Assert.AreEqual("Hello", instance2.Foo());
}
[Test]
public void ThrowException()
{
try
{
var instance = assembly.GetInstance("ClassToTest");
instance.ThrowException();
}
catch (Exception exception)
{
Debug.WriteLine(exception.StackTrace);
Assert.IsTrue(exception.StackTrace.Contains("ClassToReference.cs:line"));
}
}
[Test]
public void EnsureOnly1RefToMscorLib()
{
Assert.AreEqual(1, moduleDefinition.AssemblyReferences.Count(x => x.Name == "mscorlib"));
}
[Test]
public void EnsureNoReferenceToTemplate()
{
Assert.AreEqual(0, moduleDefinition.AssemblyReferences.Count(x => x.Name == "Template"));
}
[Test]
public void EnsureCompilerGeneratedAttribute()
{
Assert.IsTrue(moduleDefinition.GetType("Costura.AssemblyLoader").Resolve().CustomAttributes.Any(attr => attr.AttributeType.Name == "CompilerGeneratedAttribute"));
}
#if DEBUG
[Test]
public void TemplateHasCorrectSymbols()
{
Approvals.Verify(Decompiler.Decompile(afterAssemblyPath, "Costura.AssemblyLoader"));
}
#endif
[Test]
public void PeVerify()
{
Verifier.Verify(beforeAssemblyPath, afterAssemblyPath);
}
[Test]
public void TypeReferencedWithPartialAssemblyNameIsLoadedFromExistingAssemblyInstance()
{
var instance = assembly.GetInstance("ClassToTest");
var assemblyLoadedByCompileTimeReference = instance.GetReferencedAssembly();
var typeLoadedWithPartialAssemblyName = Type.GetType("ClassToReference, AssemblyToReference");
Assume.That(typeLoadedWithPartialAssemblyName, Is.Not.Null);
Assert.AreSame(assemblyLoadedByCompileTimeReference, typeLoadedWithPartialAssemblyName.Assembly);
}
}
|
distantcam/Costura
|
Tests/PureDotNetAssemblyTests.cs
|
C#
|
mit
| 4,751
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>print_table (Thor::Shell::Basic)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
<pre><span class="ruby-comment cmt"># File lib/bundler/vendor/thor/shell/basic.rb, line 86</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_table</span>(<span class="ruby-identifier">table</span>, <span class="ruby-identifier">options</span>={})
<span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">table</span>.<span class="ruby-identifier">empty?</span>
<span class="ruby-identifier">formats</span>, <span class="ruby-identifier">ident</span> = [], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:ident</span>].<span class="ruby-identifier">to_i</span>
<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:truncate</span>] = <span class="ruby-identifier">terminal_width</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:truncate</span>] <span class="ruby-operator">==</span> <span class="ruby-keyword kw">true</span>
<span class="ruby-value">0</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-identifier">table</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-value">2</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">maxima</span> = <span class="ruby-identifier">table</span>.<span class="ruby-identifier">max</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">a</span>,<span class="ruby-identifier">b</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">size</span> <span class="ruby-operator"><=></span> <span class="ruby-identifier">b</span>[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">size</span> }[<span class="ruby-identifier">i</span>].<span class="ruby-identifier">size</span>
<span class="ruby-identifier">formats</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"%-#{maxima + 2}s"</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">formats</span>[<span class="ruby-value">0</span>] = <span class="ruby-identifier">formats</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">insert</span>(<span class="ruby-value">0</span>, <span class="ruby-value str">" "</span> <span class="ruby-operator">*</span> <span class="ruby-identifier">ident</span>)
<span class="ruby-identifier">formats</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"%s"</span>
<span class="ruby-identifier">table</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">sentence</span> = <span class="ruby-value str">""</span>
<span class="ruby-identifier">row</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">column</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">sentence</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">formats</span>[<span class="ruby-identifier">i</span>] <span class="ruby-operator">%</span> <span class="ruby-identifier">column</span>.<span class="ruby-identifier">to_s</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">sentence</span> = <span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">sentence</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:truncate</span>]) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:truncate</span>]
<span class="ruby-identifier">$stdout</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sentence</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
|
rafamvc/Refinery-Banner
|
vendor/bundler_gems/doc/bundler-0.9.6/rdoc/classes/Thor/Shell/Basic.src/M000035.html
|
HTML
|
mit
| 5,019
|
// -----------------------------------------------------------
// visualizer.js - main code for visualizing hands
// Created by Raquel Vélez
//
// 30 Dec 2011 - Reviewing code for submission. For future
// development: fix bugs, implement inverse kinematic model
// for single-point drag of each finger (more human-like
// and intuitive than adjusting each individual joint)
//
// 12 Oct 2010 - Compiled all the individual files (math.js,
// setupHand.js, setupHandFunctions.js, visualizerFunctions.js)
// into one to facilitate moving to the server. It's not
// perfect, but it's cool!
// -----------------------------------------------------------
// -----------------------------------------------------------
// set the angles of each joint and global rotation (for testing)
// -----------------------------------------------------------
function setAngles()
{
var thumb = [0 * Math.PI/180, -30 * Math.PI/180, 10 * Math.PI/180, 10 * Math.PI/180];
var index = [0 * Math.PI/180, 0 * Math.PI/180, 10 * Math.PI/180, 10 * Math.PI/180];
var middle = [0 * Math.PI/180, 0 * Math.PI/180, 10 * Math.PI/180, 10 * Math.PI/180];
var ring = [0 * Math.PI/180, 0 * Math.PI/180, 10 * Math.PI/180, 10 * Math.PI/180];
var pinky = [0 * Math.PI/180, 0 * Math.PI/180, 10 * Math.PI/180, 10 * Math.PI/180];
var global = [0,0,Math.PI/2];
return thumb.concat(index, middle, ring, pinky, global);
}
// -----------------------------------------------------------
// get angles from the hand (and the orientation), and whether the hand is left or right))
// -----------------------------------------------------------
function getAnglesDeg(fingers, globalRotationAngles)
{
var angles = new Array();
for (var f = 0; f < fingers.length; ++f)
{
for (var j = 0; j < fingers[f].jointAngles.length; ++j)
{
angles.push(Math.round(fingers[f].jointAngles[j] * 180 / Math.PI));
}
}
for (var g = 0; g < globalRotationAngles.length; ++g)
{
angles.push(Math.round(globalRotationAngles[g] * 180 / Math.PI));
}
angles.push(fingers[0].isLeft);
return angles;
}
// -----------------------------------------------------------
// get angles from the hand
// -----------------------------------------------------------
function getAnglesRad(fingers, globalRotationAngles)
{
var angles = new Array();
for (var f = 0; f < fingers.length; ++f)
{
for (var j = 0; j < fingers[f].jointAngles.length; ++j)
{
angles.push(fingers[f].jointAngles[j]);
}
}
for (var g = 0; g < globalRotationAngles.length; ++g)
{
angles.push(globalRotationAngles[g]);
}
return angles;
}
// -----------------------------------------------------------
// create a gesture
// -----------------------------------------------------------
function startMove()
{
// initialize the canvas and context writer
var canvas = document.getElementById("canvas_new_gesture");
var ctx = canvas.getContext("2d");
// set up the guide coordinates
var origin_guide = new Vector(380,380,0);
guide_coords = createCoords(origin_guide, 15);
// pre-define global yaw, pitch, roll, with rotations for isometric view
var startGlobalZrotAng = 0;//Math.PI/15;
var startGlobalYrotAng = -Math.PI/10;
var startGlobalXrotAng = Math.PI/3;
var globalRotationAngles = new Array(startGlobalZrotAng, startGlobalYrotAng, startGlobalXrotAng);
// set up the hand
var origin_palm = new Vector(185,185,0);
var isLeft = false;
var spacing = 30;
var shrinkFactor = 1;
var fingers = Hand(origin_palm, spacing, shrinkFactor, isLeft);
applyRotToAllFingers(fingers, origin_palm, globalRotationAngles);
// pre-rotate into isometric view
var visGuideCoords = rotateCoords(guide_coords, globalRotationAngles);
//var visPalm = rotatePalm(palm, origin_palm, globalRotationAngles);
var visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
// draw the guide coordinates and the fingers into view
redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
// draw the origin of the entire hand
// ctx.fillStyle = "rgb(200,200,100)";
// ctx.fillRect(origin_palm.v[0]-3, origin_palm.v[1]-3, 6, 6);
var reset = false;
var moveHand_lr = false;
var moveHand_ud = false;
var movePoint = false;
var selectedPointIndex = null;
var selectedFinger = null;
var mouseCoords = null;
// document.getElementById('new_gesture_left_hand_button').onclick = function(event)
// {
// document.getElementById('new_gesture_left_hand_button').className='new_gesture_hand_button_selected';
// document.getElementById('new_gesture_right_hand_button').className='new_gesture_hand_button';
// globalRotationAngles = [globalRotationAngles[0], -globalRotationAngles[1], globalRotationAngles[2]];
// fingers = switchHands(fingers, globalRotationAngles, origin_palm, spacing, shrinkFactor, 1); // 1 is left
// visGuideCoords = rotateHand([0,0], guide_coords, fingers, origin_palm, globalRotationAngles, moveHand_lr, moveHand_ud);
// visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
// redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
// }
//
// document.getElementById('new_gesture_right_hand_button').onclick = function(event)
// {
// document.getElementById('new_gesture_left_hand_button').className='new_gesture_hand_button';
// document.getElementById('new_gesture_right_hand_button').className='new_gesture_hand_button_selected';
// globalRotationAngles = [globalRotationAngles[0], -globalRotationAngles[1], globalRotationAngles[2]];
// fingers = switchHands(fingers, globalRotationAngles, origin_palm, spacing, shrinkFactor, 0); // 0 is right
// visGuideCoords = rotateHand([0,0], guide_coords, fingers, origin_palm, globalRotationAngles, moveHand_lr, moveHand_ud);
// visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
// redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
// }
//
// document.getElementById('new_gesture_reset_button').onclick = function(event)
// {
// for (var f=0; f<fingers.length; ++f) {
// fingers[f].reset();
// }
// applyRotToAllFingers(fingers, origin_palm, globalRotationAngles);
//
// globalRotationAngles = [startGlobalZrotAng, startGlobalYrotAng, startGlobalXrotAng];
// visGuideCoords = rotateHand([0,0], guide_coords, fingers, origin_palm, globalRotationAngles, moveHand_lr, moveHand_ud);
//
// visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
// redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
// }
// when the mouse is clicked
document.onmousedown = function(event)
{
mouseCoords = getMouseCoords(event);
if (mouseCoords == null)
{
alert("Nothing!")
}
else
{
// if there's a click on the guide coords, reset to starting angles
if (mouseCoords[0] > 370 && mouseCoords[1] < 400 &&
mouseCoords[1] > 370 && mouseCoords[1] < 400)
{
reset = true;
}
// if dragging around in one of the guide boxes, move the hand
else if (mouseCoords[0] > 0 && mouseCoords[0] < 370 &&
mouseCoords[1] > 370 && mouseCoords[1] < 400)
{
moveHand_lr = true;
}
else if (mouseCoords[0] > 370 && mouseCoords[0] < 400 &&
mouseCoords[1] > 0 && mouseCoords[1] < 370)
{
moveHand_ud = true;
}
else
{
// if dragging one of the points, move the point around
// the appropriate joint
for (var fingNum = 0; fingNum < fingers.length; ++fingNum)
{
for (var ip = 0; ip < fingers[fingNum].visPoints.length; ++ip)
{
var radiusAroundPoints = 10;
if (fingers[fingNum].visPoints[ip].withinRadiusAroundPoint(radiusAroundPoints, mouseCoords))
{
// set current point for dragging
movePoint = true;
selectedPointIndex = ip;
selectedFinger = fingers[fingNum];
} // if
} // for ip
} // for fingerNumber
} // else
}
}
// when the mouse is being dragged around
document.onmousemove = function(event)
{
var newMouseCoords = getMouseCoords(event);
if (newMouseCoords == null)
{
alert("Nothing!")
}
else
{
// determine the direction of the mouse movement
if (mouseCoords != null)
var diff = [ newMouseCoords[0] - mouseCoords[0], newMouseCoords[1] - mouseCoords[1] ];
// move a selected point and the corresponding joints along the finger
if (movePoint)
{
moveFinger(ctx, mouseCoords, newMouseCoords, selectedFinger, selectedPointIndex, origin_palm, globalRotationAngles, visGuideCoords);
visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
}
// move the entire hand
else if (moveHand_lr || moveHand_ud)
{
visGuideCoords = rotateHand(diff, guide_coords, fingers, origin_palm, globalRotationAngles, moveHand_lr, moveHand_ud);
// visPalm = rotatePalm(palm, origin_palm, globalRotationAngles);
visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
}
// reset for next mouse movement
mouseCoords = newMouseCoords;
// redraw everything
// ctx.fillStyle = "rgb(200,200,100)";
// ctx.fillRect(origin_palm.v[0]-3, origin_palm.v[1]-3, 6, 6);
// debugText(ctx, visGuideCoords[1].v[0] - visGuideCoords[2].v[0]);
}
}
// after dragging
document.onmouseup = function(event)
{
mouseCoords = getMouseCoords(event);
if (mouseCoords == null)
{
alert("Nothing!")
}
else
{
if (reset)
{
globalRotationAngles = [startGlobalZrotAng, startGlobalYrotAng, startGlobalXrotAng];
visGuideCoords = rotateHand([0,0], guide_coords, fingers, origin_palm, globalRotationAngles, moveHand_lr, moveHand_ud);
visPalm = createPalm(fingers, origin_palm, globalRotationAngles);
redrawAllMove(ctx, origin_palm, visGuideCoords, fingers, visPalm, globalRotationAngles);
reset = false;
}
moveHand_lr = false;
moveHand_ud = false;
movePoint = false;
selectedPointIndex = null;
selectedFinger = null;
// document.getElementById('input_new_gesture_angles').value = getAnglesDeg(fingers, globalRotationAngles);
}
}
}
// -----------------------------------------------------------
// visualize the hand only
// -----------------------------------------------------------
function startVis(handArray)
{
for(iterator=0; iterator<handArray.length; iterator++) {
// initialize the canvas and context writer
var canvas = document.getElementById("hand_"+handArray[iterator][0]);
var ctx = canvas.getContext("2d");
var thumb = [handArray[iterator][2] * Math.PI/180, handArray[iterator][3] * Math.PI/180, handArray[iterator][4] * Math.PI/180, handArray[iterator][5] * Math.PI/180];
var index = [handArray[iterator][6] * Math.PI/180, handArray[iterator][7] * Math.PI/180, handArray[iterator][8] * Math.PI/180, handArray[iterator][9] * Math.PI/180];
var middle = [handArray[iterator][10] * Math.PI/180, handArray[iterator][11] * Math.PI/180, handArray[iterator][12] * Math.PI/180, handArray[iterator][13] * Math.PI/180];
var ring = [handArray[iterator][14] * Math.PI/180, handArray[iterator][15] * Math.PI/180, handArray[iterator][16] * Math.PI/180, handArray[iterator][17] * Math.PI/180];
var pinky = [handArray[iterator][18] * Math.PI/180, handArray[iterator][19] * Math.PI/180, handArray[iterator][20] * Math.PI/180, handArray[iterator][21] * Math.PI/180];
var global = [handArray[iterator][22] * Math.PI/180, handArray[iterator][23] * Math.PI/180, handArray[iterator][24] * Math.PI/180];
var handedness = handArray[iterator][25];
var shrinkFactor = 180.0/400.0;
// set up the hand
var origin_palm = new Vector(90, 90, 0);
// draw the fancy circle around everything
ctx.fillStyle = "rgb(255,255,255)";
ctx.beginPath();
ctx.arc(origin_palm.v[0], origin_palm.v[1], 90, 0, Math.PI * 2, 0);
ctx.fill();
var fingers = Hand(origin_palm, 30, shrinkFactor, handedness);
var angles = thumb.concat(index, middle, ring, pinky, global);
applyAngles(angles, fingers, origin_palm, handedness);
// how do i get the angles out again?????
applyRotToAllFingers(fingers, origin_palm, angles.slice(-3));
var visPalm = createPalm(fingers, origin_palm, angles.slice(-3));
redrawAllVis(ctx, origin_palm, fingers, visPalm, angles.slice(-3), shrinkFactor);
}
}
// -----------------------------------------------------------
// apply an array of angles to the hand
// -----------------------------------------------------------
function applyAngles(angles, fingers, isLeft)
{
for (var f = 0; f < fingers.length; ++f)
{
fingers[f].jointAngles = angles.slice(f * 4, (f + 1) * 4);
fingers[f].recalc();
}
}
// -----------------------------------------------------------
// one place to describe the hand and do all the dirty work
// -----------------------------------------------------------
function Hand(origin_palm, spacing, shrinkFactor, isLeftHand)
{
if (isLeftHand)
{
// define the origin of each finger
var origin_thumb = new Vector(origin_palm.v[0] - spacing * shrinkFactor, origin_palm.v[1], -125 * shrinkFactor);
var origin_index = new Vector(origin_palm.v[0] - spacing * shrinkFactor, origin_palm.v[1], 0);
var origin_middle = new Vector(origin_palm.v[0], origin_palm.v[1], 0);
var origin_ring = new Vector(origin_palm.v[0] + spacing * shrinkFactor, origin_palm.v[1], -10 * shrinkFactor);
var origin_pinky = new Vector(origin_palm.v[0] + 2 * spacing * shrinkFactor, origin_palm.v[1], -20 * shrinkFactor);
}
else
{
// define the origin of each finger
var origin_thumb = new Vector(origin_palm.v[0] + spacing * shrinkFactor, origin_palm.v[1], -125 * shrinkFactor);
var origin_index = new Vector(origin_palm.v[0] + spacing * shrinkFactor, origin_palm.v[1], 0);
var origin_middle = new Vector(origin_palm.v[0], origin_palm.v[1], 0);
var origin_ring = new Vector(origin_palm.v[0] - spacing * shrinkFactor, origin_palm.v[1], -10 * shrinkFactor);
var origin_pinky = new Vector(origin_palm.v[0] - 2 * spacing * shrinkFactor, origin_palm.v[1], -20 * shrinkFactor);
}
var numPoints = 6;
var numPhalanges = 4;
// define the segment lengths for each finger
var thumbHeights = new Array(0, 80 * shrinkFactor, 53 * shrinkFactor, 46 * shrinkFactor);
var indexHeights = new Array(0, 73 * shrinkFactor, 46 * shrinkFactor, 37 * shrinkFactor);
var middleHeights = new Array(0, 78 * shrinkFactor, 52 * shrinkFactor, 37 * shrinkFactor);
var ringHeights = new Array(0, 75 * shrinkFactor, 51 * shrinkFactor, 37 * shrinkFactor);
var pinkyHeights = new Array(0, 60 * shrinkFactor, 37 * shrinkFactor, 35 * shrinkFactor);
// create each finger
var thumb = new Finger(origin_thumb, numPoints, numPhalanges, thumbHeights, 'thumb', isLeftHand);
var indexFinger = new Finger(origin_index, numPoints, numPhalanges, indexHeights, 'index', isLeftHand);
var middleFinger = new Finger(origin_middle, numPoints, numPhalanges, middleHeights, 'middle', isLeftHand);
var ringFinger = new Finger(origin_ring, numPoints, numPhalanges, ringHeights, 'ring', isLeftHand);
var pinkyFinger = new Finger(origin_pinky, numPoints, numPhalanges, pinkyHeights, 'pinky', isLeftHand);
return [thumb, indexFinger, middleFinger, ringFinger, pinkyFinger];
}
// -----------------------------------------------------------
// switch between left and right hand orientations
// -----------------------------------------------------------
function switchHands(fingers, globalRotationAngles, origin_palm, spacing, shrinkFactor, handedness)
{
if (handedness == fingers[0].isLeft) {
return fingers;
}
else {
// now, grab all the angles from the current hand
var angles = getAnglesRad(fingers, globalRotationAngles);
// now, create a new hand
var newFingers = Hand(origin_palm, spacing, shrinkFactor, handedness);
applyAngles(angles, newFingers, handedness);
applyRotToAllFingers(newFingers, origin_palm, globalRotationAngles);
return newFingers;
}
}
// -----------------------------------------------------------
// collect z-coords of visualized points
// -----------------------------------------------------------
function buildFingerZ(fingers, palmAvg, thumbAvg)
{
// array for z coords
var fingerZ = new Array(fingers.length);
// array for matching coords
var matchTable = new Array();
for (var g = 0; g < fingers.length; ++g)
{
fingerZ[g] = new Array(fingers[g].numPhalanges);
for (var ph = 0; ph < fingers[g].numPhalanges; ++ph)
{
fingerZ[g][ph] = fingers[g].visPoints[ph].v[2] + fingers[g].visPoints[ph+1].v[2];
fingerZ[g][ph] /= 2;
var unmatched = true;
for (var i = 0; i < matchTable.length; ++i)
{
if (matchTable[i][0] == fingerZ[g][ph])
{
matchTable[i][1].push([g, ph]);
unmatched = false;
}
}
if (unmatched)
{
matchArray = new Array();
matchArray.push([g, ph]);
matchTable.push([fingerZ[g][ph], matchArray]);
}
}
}
var palmUnmatched = true;
for (var i = 0; i < matchTable.length; ++i)
{
if (matchTable[i][0] == palmAvg)
{
matchTable[i][1].push([0, 'p']);
palmUnmatched = false;
}
}
if (palmUnmatched)
{
matchArray = new Array();
matchArray.push([0, 'p']);
matchTable.push([palmAvg, matchArray]);
}
var thumbUnmatched = true;
for (var i = 0; i < matchTable.length; ++i)
{
if (matchTable[i][0] == thumbAvg)
{
matchTable[i][1].push([0, 't']);
thumbUnmatched = false;
}
}
if (thumbUnmatched)
{
matchArray = new Array();
matchArray.push([0, 't']);
matchTable.push([thumbAvg, matchArray]);
}
return [fingerZ, matchTable];
}
// -----------------------------------------------------------
// calculate the average z coord of the palm's vis points
// -----------------------------------------------------------
function calcPalmAvgZ(visPalm)
{
var palmAvg = 0;
for (var i = 3; i < visPalm.length; ++i)
{
palmAvg += visPalm[i].v[2];
}
palmAvg /= visPalm.length;
return palmAvg;
}
// -----------------------------------------------------------
// calculate the average z coord of the palm-thumb's vis points
// -----------------------------------------------------------
function calcThumbAvgZ(visPalm)
{
var palmAvg = 0;
for (var i = 0; i <= 3; ++i)
{
palmAvg += visPalm[i].v[2];
}
palmAvg /= visPalm.length;
return palmAvg;
}
// -----------------------------------------------------------
// determine drawing order
// -----------------------------------------------------------
function getDrawingOrder(fingerArrays)
{
var fingerZ = fingerArrays[0];
var matchTable = fingerArrays[1];
var drawingOrder = new Array();
var minZ = 100000; // some ridiculously large number
var prevMinZ = -100000; // some ridiculously low number
while (drawingOrder.length < fingerZ.length * fingerZ[0].length + 2)
{
for (var i = 0; i < matchTable.length; ++i)
{
var inQuestion = parseFloat(matchTable[i][0]);
if (inQuestion < minZ && inQuestion > prevMinZ)
{
// alert('i: ' + i + ' minZ: ' + minZ + ' inQ: ' + inQuestion + ' prev: ' + prevMinZ);
minZ = inQuestion;
loc = i;
} // if
} // for i
for (var m = 0; m < matchTable[loc][1].length; ++m)
{
drawingOrder.push(matchTable[loc][1][m]);
} // for m
prevMinZ = minZ;
minZ = 100000;
} // while
return drawingOrder;
}
// -----------------------------------------------------------
// clears the board and draws everything fresh for startMove()
// -----------------------------------------------------------
function redrawAllMove(ctx, origin_palm, guide_coords, fingers, visPalm, globalRotationAngles)
{
// clear the board
ctx.clearRect(0,0,400,400);
// calculate the average z coord of the palm's vis points
var palmAvg = calcPalmAvgZ(visPalm);
var thumbAvg = calcThumbAvgZ(visPalm);
// figure out what to draw in what order
var fingerArrays = buildFingerZ(fingers, palmAvg, thumbAvg);
// now compile them into one array in the order in which they should be drawn
var drawingOrder = getDrawingOrder(fingerArrays, palmAvg, thumbAvg);
for (d = 0; d < drawingOrder.length; ++d)
{
var drawNow = drawingOrder[d];
if (drawNow[1] == 'p')
{
drawPalm(ctx, visPalm, 1);
}
else if (drawNow[1] == 't')
{
drawThumb(ctx, visPalm, 1);
}
else
{
var fingNum = drawNow[0];
var phalNum = drawNow[1];
if (phalNum != 0)
{
drawPhalanx(ctx, fingers[fingNum], phalNum, 1);
drawFingerPoint(ctx, fingers[fingNum], phalNum);
}
}
}
// drawFingerPoints(ctx, fingers);
drawCoords(ctx, guide_coords);
}
// -----------------------------------------------------------
// clears the board and draws everything fresh for startVis()
// -----------------------------------------------------------
function redrawAllVis(ctx, origin_palm, fingers, visPalm, globalRotationAngles, shrinkFactor)
{
// clear the board
// ctx.clearRect(0,0,400,400);
// calculate the average z coord of the palm's vis points
var palmAvg = calcPalmAvgZ(visPalm);
var thumbAvg = calcThumbAvgZ(visPalm);
// figure out what to draw in what order
var fingerArrays = buildFingerZ(fingers, palmAvg, thumbAvg);
// now compile them into one array in the order in which they should be drawn
var drawingOrder = getDrawingOrder(fingerArrays, palmAvg, thumbAvg);
for (d = 0; d < drawingOrder.length; ++d)
{
var drawNow = drawingOrder[d];
if (drawNow[1] == 'p')
{
drawPalm(ctx, visPalm, shrinkFactor);
}
else if (drawNow[1] == 't')
{
drawThumb(ctx, visPalm, shrinkFactor);
}
else
{
var fingNum = drawNow[0];
var phalNum = drawNow[1];
if (phalNum != 0)
{
drawPhalanx(ctx, fingers[fingNum], phalNum, shrinkFactor);
}
}
}
}
// -----------------------------------------------------------
// create palm
// -----------------------------------------------------------
function createPalm(fingers, origin, globalRotationAngles)
{
var thumb = fingers[0].points3D;
var index = fingers[1].points3D;
var pinky = fingers[4].points3D;
var atIndex = new Vector(index[0].v[0], index[0].v[1], index[0].v[2]);
var atPinky = new Vector(pinky[0].v[0], pinky[0].v[1], pinky[0].v[2]);
var atHeel = new Vector(pinky[0].v[0], thumb[0].v[1],
Math.min(thumb[0].v[2], thumb[0].v[2]));
var atThenar = new Vector(thumb[0].v[0], thumb[0].v[1], thumb[0].v[2]);
var atSquishy = new Vector(index[0].v[0], index[0].v[1],
(index[0].v[2] + thumb[0].v[2])/2);
var atThumb = thumb[2];
var palm = [atSquishy, atThumb, atThenar, atSquishy, atIndex, atPinky, atHeel, atThenar];
var visPalm = new Array(palm.length);
for (var i = 0; i < palm.length; ++i)
{
var vp = RotVectorAboutOrigin(palm[i], origin, globalRotationAngles, true);
// alert(palm[i].v);
visPalm[i] = new Vector(vp[0], vp[1], vp[2]);
}
return visPalm;
}
// -----------------------------------------------------------
// draws the palm
// -----------------------------------------------------------
function drawPalm(ctx, palm, shrinkFactor)
{
ctx.lineWidth = 34 * shrinkFactor;
ctx.lineCap = 'round';
ctx.lineJoin = 'round';
ctx.strokeStyle = "rgba(0,0,0,0.3)";
ctx.beginPath();
ctx.moveTo(palm[3].v[0], palm[3].v[1]);
for (var i = 3; i < palm.length; ++i)
{
ctx.lineTo(palm[i].v[0], palm[i].v[1]);
}
ctx.stroke();
// ctx.fill();
ctx.lineWidth = 31 * shrinkFactor;
ctx.strokeStyle = "rgb(255,203,162)";
ctx.fillStyle = "rgb(255,203,162)";
ctx.beginPath();
ctx.moveTo(palm[palm.length-1].v[0], palm[palm.length-1].v[1]);
for (i = 3; i < palm.length; ++i)
{
ctx.lineTo(palm[i].v[0], palm[i].v[1]);
}
ctx.stroke();
ctx.fill();
}
// -----------------------------------------------------------
// draws the flappy part between the thumb and palm
// -----------------------------------------------------------
function drawThumb(ctx, palm, shrinkFactor)
{
ctx.lineWidth = 34 * shrinkFactor;
ctx.lineCap = 'round';
ctx.lineJoin = 'round';
ctx.strokeStyle = "rgba(0,0,0,0.3)";
ctx.beginPath();
ctx.moveTo(palm[0].v[0], palm[0].v[1]);
for (var i = 0; i < 3; ++i)
{
ctx.lineTo(palm[i].v[0], palm[i].v[1]);
}
ctx.stroke();
ctx.lineWidth = 31 * shrinkFactor;
ctx.strokeStyle = "rgb(255,203,162)";
ctx.fillStyle = "rgb(255,203,162)";
ctx.beginPath();
ctx.moveTo(palm[palm.length-1].v[0], palm[palm.length-1].v[1]);
for (var i = 0; i <= 3; ++i)
{
ctx.lineTo(palm[i].v[0], palm[i].v[1]);
}
ctx.stroke();
ctx.fill();
}
// -----------------------------------------------------------
// draw each individual phalanx
// -----------------------------------------------------------
function drawPhalanx(ctx, finger, phalanxNumber, shrinkFactor)
{
if (phalanxNumber == 1)
{
var startPoint = finger.visPoints[0];
}
else
{
var startPoint = finger.visPoints[phalanxNumber];
}
var endPoint = finger.visPoints[phalanxNumber+1];
if (finger.fingerType == 'thumb')
{
ctx.lineWidth = shrinkFactor * (34 - 1.5 * phalanxNumber);
}
else
{
ctx.lineWidth = shrinkFactor * (27 - 1.5 * phalanxNumber);
}
// draw outside of phalanx
ctx.strokeStyle = "rgba(0,0,0,0.3)";
ctx.lineJoin = 'round';
ctx.lineCap = 'round';
ctx.beginPath();
ctx.moveTo(startPoint.v[0], startPoint.v[1]-2);
ctx.lineTo(endPoint.v[0]+1, endPoint.v[1]+1);
ctx.stroke();
if (finger.fingerType == 'thumb')
{
ctx.lineWidth = shrinkFactor * (31 - 1.5 * phalanxNumber);
}
else
{
ctx.lineWidth = shrinkFactor * (24 - 1.5 * phalanxNumber);
}
// draw inside of finger
ctx.strokeStyle = "rgb(255,203,162)";
ctx.lineJoin = 'round';
ctx.lineCap = 'round';
ctx.beginPath();
ctx.moveTo(startPoint.v[0], startPoint.v[1]);
ctx.lineTo(endPoint.v[0]+1, endPoint.v[1]+1);
ctx.stroke();
// draw the point at the bottom of the phalanx
if (shrinkFactor == 1)
{
drawFingerPoint(ctx, finger, phalanxNumber-1);
}
}
// -----------------------------------------------------------
// draw the finger points for all fingers
// -----------------------------------------------------------
function drawFingerPoint(ctx, finger, phalanxNum)
{
var colors = ["rgb(200, 200, 0)", "rgb(0,0,200)", "rgb(0,200,0)", "rgb(200,0,0)"];
var fingerPoint = finger.visPoints[phalanxNum+1];
ctx.fillStyle = colors[phalanxNum];
ctx.beginPath();
ctx.arc(fingerPoint.v[0], fingerPoint.v[1], 4, 0, Math.PI * 2, 0);
ctx.fill();
}
// -----------------------------------------------------------
// move the finger joints in a reasonable way
// -----------------------------------------------------------
function moveFinger(ctx, startMouse, endMouse, selectedFinger, selectedPointIndex, origin_palm, globalRotAngles, visGuideCoords)
{
// determine the rotation angle based on the mouse movement
var visPoint = selectedFinger.visPoints[selectedPointIndex].v;
var visJoint = selectedFinger.visPoints[selectedPointIndex-1].v;
//var v1 = [ visPoint[0] - visJoint[0], visPoint[1] - visJoint[1] ];
var v1 = [ startMouse[0] - visJoint[0], startMouse[1] - visJoint[1], startMouse[2] - visJoint[2], 1 ];
var v2 = [ endMouse[0] - visJoint[0], endMouse[1] - visJoint[1], endMouse[2] - visJoint[2], 1 ];
var vis1 = RotVectorAboutOrigin(v1, origin_palm, globalRotAngles);
// alert(vis1);
var newV1 = new Vector(vis1[0] + selectedFinger.points3D[selectedPointIndex-1].v[0], vis1[1] + selectedFinger.points3D[selectedPointIndex-1].v[1], vis1[2] + selectedFinger.points3D[selectedPointIndex-1].v[2]);
// alert(newV1.v);
var vis2 = RotVectorAboutOrigin(v2, origin_palm, globalRotAngles);
// alert(vis2);
var newV2 = new Vector(vis2[0] + selectedFinger.points3D[selectedPointIndex-1].v[0], vis2[1] + selectedFinger.points3D[selectedPointIndex-1].v[1], vis2[2] + selectedFinger.points3D[selectedPointIndex-1].v[2]);
// alert(newV2.v);
v1 = newV1.v;
v2 = newV2.v;
var v1dotv2 = v1[0] * v2[0] + v1[1] * v2[1];
var v1crossv2 = v1[0] * v2[1] - v1[1] * v2[0];
var magv1 = Math.sqrt( v1[0] * v1[0] + v1[1] * v1[1] );
var magv2 = Math.sqrt( v2[0] * v2[0] + v2[1] * v2[1] );
var mouseRotAng = Math.acos( v1dotv2 / (magv1 * magv2) );
var diffX = [visGuideCoords[1].v[0] - visGuideCoords[0].v[0], visGuideCoords[1].v[1] - visGuideCoords[0].v[1], visGuideCoords[1].v[2] - visGuideCoords[0].v[2]];
var diffY = [visGuideCoords[2].v[0] - visGuideCoords[0].v[0], visGuideCoords[2].v[1] - visGuideCoords[0].v[1], visGuideCoords[2].v[2] - visGuideCoords[0].v[2]];
var diffZ = [visGuideCoords[3].v[0] - visGuideCoords[0].v[0], visGuideCoords[3].v[1] - visGuideCoords[0].v[1], visGuideCoords[3].v[2] - visGuideCoords[0].v[2]];
var xCrossY = diffX[0] * diffY[1] - diffX[1] * diffY[0];
var yCrossZ = diffY[0] * diffZ[1] - diffY[1] * diffZ[0];
var zCrossX = diffZ[0] * diffX[1] - diffZ[1] * diffX[0];
var compareToVisGuideCoords;
if (selectedFinger.fingerType == 'thumb')
{
if (selectedPointIndex == 1) {
if (selectedFinger.isLeft) { compareToVisGuideCoords = yCrossZ; }
else { compareToVisGuideCoords = -yCrossZ; }
}
else {
if (selectedFinger.isLeft) { compareToVisGuideCoords = -xCrossY; }
else { compareToVisGuideCoords = xCrossY; }
}
}
else
{
if (selectedPointIndex == 1) {
if (selectedFinger.isLeft) { compareToVisGuideCoords = -yCrossZ * zCrossX; }
else { compareToVisGuideCoords = yCrossZ * zCrossX; }
}
else {
compareToVisGuideCoords = yCrossZ;
}
}
// determine the rotation angle
var rotAngle = 2 * Math.PI/180;// mouseRotAng; //Math.PI/30;
var zRotAng = 0;
// rotate around z axis
if (mouseRotAng)
{
if (v1crossv2 > 0)
{
// if (compareToVisGuideCoords > 0) { zRotAng = -rotAngle; }
{ zRotAng = rotAngle; }
}
else if (v1crossv2 < 0)
{
// if (compareToVisGuideCoords > 0) { zRotAng = rotAngle; }
{ zRotAng = -rotAngle; }
}
}
// apply new joint angles to finger
selectedFinger.jointAngles[selectedPointIndex-1] += zRotAng;
ctx.lineWidth = 1;
ctx.strokeStyle = "rgb(0,0,0)";
ctx.font = "10pt Arial";
ctx.clearRect(400,0,400,400);
ctx.strokeText('finger: ' + selectedFinger.fingerType, 410, 10);
ctx.strokeText('joint0: ' + (selectedFinger.jointAngles[0] * 180/Math.PI), 410, 40);
ctx.strokeText('joint1: ' + (selectedFinger.jointAngles[1] * 180/Math.PI), 410, 70);
ctx.strokeText('joint2: ' + (selectedFinger.jointAngles[2] * 180/Math.PI), 410, 100);
ctx.strokeText('joint3: ' + (selectedFinger.jointAngles[3] * 180/Math.PI), 410, 130);
// var D = new Array(3);
// for (var k = 0; k < D.length; ++k)
// {
// D[k] = [visGuideCoords[k+1].v[0] - visGuideCoords[0].v[0],
// visGuideCoords[k+1].v[1] - visGuideCoords[0].v[1],
// visGuideCoords[k+1].v[2] - visGuideCoords[0].v[2]];
// }
// var v1crossv2 = v1[0] * v2[1] - v1[1] * v2[0];
ctx.strokeText('rot: ' + zRotAng, 410, 170);
ctx.strokeText('FingPos3d: ' + selectedFinger.points3D[selectedPointIndex].v, 410, 200);
ctx.strokeText('FingPosVis: ' + selectedFinger.visPoints[selectedPointIndex].v, 410, 230);
// ctx.strokeText('diffX: ' + diffX, 410, 200);
// ctx.strokeText('diffY: ' + diffY, 410, 230);
// ctx.strokeText('diffZ: ' + diffZ, 410, 260);
ctx.strokeText('v1: ' + v1, 410, 290);
ctx.strokeText('v2: ' + v2, 410, 320);
// ctx.strokeText('diffX x diffY: ' + (D[0][0] * D[1][1] - D[0][1] * D[1][0]), 410, 300);
// ctx.strokeText('diffY x diffZ: ' + (D[1][0] * D[2][1] - D[1][1] * D[2][0]), 410, 330);
// ctx.strokeText('diffZ x diffX: ' + (D[2][0] * D[0][1] - D[2][1] * D[0][0]), 410, 360);
// recalculate 3D position of finger
selectedFinger.recalc();
// interpret 3D points to visual points:
// go through each finger point
for (var p = 0; p < selectedFinger.points3D.length; ++p)
{
// update the viewer coordinates of each point
var vip = RotVectorAboutOrigin(selectedFinger.points3D[p], origin_palm, globalRotAngles, true);
selectedFinger.visPoints[p] = new Vector(vip[0], vip[1], vip[2]);
}
// for the 1st point, we want it located approx 1/3 of the way up the finger
var pt0 = selectedFinger.visPoints[1].v;
var pt1 = selectedFinger.visPoints[2].v;
vip = [pt1[0] - pt0[0], pt1[1] - pt0[1], pt1[2] - pt0[2]];
selectedFinger.visPoints[1] = new Vector(pt0[0] + vip[0] / 3, pt0[1] + vip[1] / 3, pt0[2] + vip[2] / 3);
}
// -----------------------------------------------------------
// rotate the hand and the guide around the palm's origin
// -----------------------------------------------------------
function rotateHand(diff, guide_coords, fingers, origin_palm, globalRotAng, moveHand_lr, moveHand_ud)
{
var rotAngle = Math.PI/30;
if (moveHand_lr)
{
if ( diff[0] < -1 )
{
globalRotAng[1] -= rotAngle;
}
if ( diff[0] > 1 )
{
globalRotAng[1] += rotAngle;
}
}
if (moveHand_ud)
{
if ( diff[1] > 1 )
{
globalRotAng[2] -= rotAngle;
}
if ( diff[1] < -1 )
{
globalRotAng[2] += rotAngle;
}
}
// calculate the visualized coordinates
var visGuideCoords = rotateCoords(guide_coords, globalRotAng);
applyRotToAllFingers(fingers, origin_palm, globalRotAng);
return visGuideCoords;
}
// -----------------------------------------------------------
// apply a given rotation to all the fingers in the hand
// -----------------------------------------------------------
function applyRotToAllFingers(fingers, origin_palm, rotAngles)
{
// go through each finger
for (var f = 0; f < fingers.length; ++f)
{
var thisFinger = fingers[f];
// go through each finger point
for (var p = 0; p < thisFinger.points3D.length; ++p)
{
// update the viewer coordinates of each point
var vip = RotVectorAboutOrigin(thisFinger.points3D[p], origin_palm, rotAngles, true);
thisFinger.visPoints[p] = new Vector(vip[0], vip[1], vip[2]);
}
// for the 1st point, we want it located approx 1/3 of the way up the finger
var pt0 = thisFinger.visPoints[1].v;
var pt1 = thisFinger.visPoints[2].v;
vip = [pt1[0] - pt0[0], pt1[1] - pt0[1], pt1[2] - pt0[2]];
thisFinger.visPoints[1] = new Vector(pt0[0] + vip[0] / 3, pt0[1] + vip[1] / 3, pt0[2] + vip[2] / 3);
}
}
// -----------------------------------------------------------
// apply inverse rotation to a point
// -----------------------------------------------------------
function applyInverseRotation(origin_palm, globalRotAngles, pt)
{
var invRotAng = [-globalRotAngles[0], -globalRotAngles[1], -globalRotAngles[2] ];
var inv = RotVectorAboutOrigin(pt, origin_palm, invRotAng);
return inv;
}
// -----------------------------------------------------------
// angle limits, as posed by Winnie Tsang's Master thesis, "Helping
// Hand: An Atomically Accurate Inverse Dynamics Solution for
// Unconstrained Hand Motion," 2005
// -----------------------------------------------------------
function calcMinAndMaxJointAngles(fingerType, isLeft)
{
var minAngles = new Array(4);
var maxAngles = new Array(4);
if (fingerType == 'thumb')
{
minAngles[0] = -10 * Math.PI/180;
maxAngles[0] = 70 * Math.PI/180;
minAngles[1] = -40 * Math.PI/180;
maxAngles[1] = 15 * Math.PI/180;
minAngles[2] = 0;
maxAngles[2] = 50 * Math.PI/180;
minAngles[3] = 0;
maxAngles[3] = 80 * Math.PI/180;
}
else
{
if (fingerType == 'index')
{
minAngles[0] = -20 * Math.PI/180;
maxAngles[0] = 20 * Math.PI/180;
}
else if (fingerType == 'middle')
{
minAngles[0] = -10 * Math.PI/180;
maxAngles[0] = 10 * Math.PI/180;
}
else if (fingerType == 'ring')
{
minAngles[0] = -5 * Math.PI/180;
maxAngles[0] = 15 * Math.PI/180;
}
else
{
minAngles[0] = -5 * Math.PI/180;
maxAngles[0] = 20 * Math.PI/180;
}
minAngles[1] = -10 * Math.PI/180;
maxAngles[1] = 90 * Math.PI/180;
minAngles[2] = 0;
maxAngles[2] = 100 * Math.PI/180;
minAngles[3] = -10 * Math.PI/180;
maxAngles[3] = 90 * Math.PI/180;
}
return [minAngles, maxAngles];
}
// -----------------------------------------------------------
// Finger class - might make things a bit easier? - later!!
// -----------------------------------------------------------
function Finger(origin, numPoints, numPhalanges, heights, fingerType, isLeft)
{
// VARIABLES
this.origin = origin;
this.numPoints = numPoints;
this.numPhalanges = numPhalanges;
this.heights = heights;
this.fingerType = fingerType;
this.isLeft = isLeft;
// initialize the joint angles
this.jointAngles = new Array(numPhalanges);
for (var jointNum = 0; jointNum < this.jointAngles.length; ++jointNum)
{
this.jointAngles[jointNum] = 0;
}
// initialize the manipulator
if (this.fingerType == 'thumb')
{
this.jointAngles[0] = 15 * Math.PI/180;
this.jointAngles[1] = -20 * Math.PI/180;
// different manipulator!
this.manipulator = new ThumbManipulator(origin, numPhalanges, heights, isLeft);
}
else
{
this.manipulator = new Manipulator(origin, numPhalanges, heights, isLeft);
}
// define the 3-dimensional locations of each point along the finger
this.points3D = this.manipulator.recalcManipulator(this.jointAngles);
// define the 2-dimensional locations viewed by the user
this.visPoints = new Array(this.points3D.length);
// FUNCTIONS
this.recalc = function()
{
var jointLimits = calcMinAndMaxJointAngles(this.fingerType, this.isLeft);
for (var j = 0; j < this.jointAngles.length; ++j)
{
if (this.jointAngles[j] < jointLimits[0][j])
{
this.jointAngles[j] = jointLimits[0][j];
}
else if (this.jointAngles[j] > jointLimits[1][j])
{
this.jointAngles[j] = jointLimits[1][j];
}
}
// send the joint angles to the manipulator
this.points3D = this.manipulator.recalcManipulator(this.jointAngles);
// also send the joint angles to the phalanges
// this.phalanges = calcPhalanges(this.numPoints, this.numPhalanges, this.points3D, this.jointAngles);
}
this.reset = function()
{
// set joint angles back to initial values
for (var jointNum = 0; jointNum < this.jointAngles.length; ++jointNum)
{
this.jointAngles[jointNum] = 0;
}
if (this.fingerType == 'thumb')
{
this.jointAngles[0] = 15 * Math.PI/180;
this.jointAngles[1] = -20 * Math.PI/180;
}
// recalculate the manipulator
this.recalc();
}
}
// -----------------------------------------------------------
// create a coordinate system based on an origin and armlength
// -----------------------------------------------------------
function createCoords(origin, lengthOfArm)
{
var x = new Vector(origin.v[0] + lengthOfArm, origin.v[1], origin.v[2]);
var y = new Vector(origin.v[0], origin.v[1] + lengthOfArm, origin.v[2]);
var z = new Vector(origin.v[0], origin.v[1], origin.v[2] + lengthOfArm);
return new Array(origin, x, y, z);
}
// -----------------------------------------------------------
// rotate coordinate system
// -----------------------------------------------------------
function rotateCoords(guide_coords, globalRotationAngles)
{
var visGuideCoords = new Array(guide_coords.length);
for (var i = 1; i < guide_coords.length; ++i)
{
var vgc = RotVectorAboutOrigin(guide_coords[i], guide_coords[0], globalRotationAngles, true);
visGuideCoords[i] = new Vector(vgc[0], vgc[1], vgc[2]);
}
visGuideCoords[0] = new Vector(guide_coords[0].v[0], guide_coords[0].v[1], guide_coords[0].v[2])
return visGuideCoords;
}
// -----------------------------------------------------------
// draws the coordinate orientation guide in the lower
// left-hand corner of the canvas
// -----------------------------------------------------------
function drawCoords(ctx, points)
{
// designate the colors for each point/ray
var colors = new Array("rgb(0,0,0)",
"rgb(200,0,0)",
"rgb(0,0,200)",
"rgb(0,200,0)");
// draw each ray from the origin
var o = points[0].v; // origin
for (var i = 1; i < points.length; ++i)
{
var v = points[i].v; // vector
ctx.fillStyle = colors[0];
ctx.fillRect (o[0],o[1],4,4);
ctx.lineWidth = 2;
ctx.strokeStyle = colors[i];
ctx.fillStyle = colors[i];
ctx.beginPath();
ctx.moveTo(o[0]+2, o[1]+2);
ctx.lineTo(v[0]+2, v[1]+2);
ctx.stroke();
ctx.fillStyle = colors[i];
ctx.fillRect (v[0],v[1],4,4);
}
// draw the box around the guide
// ctx.strokeStyle = colors[0];
// ctx.strokeRect(370,370,30,30);
//
// draw the left-right box
// ctx.strokeRect(0,370,370,30);
//
// draw the up-down box
// ctx.strokeRect(370,0,30,370);
ctx.beginPath();
// draw the left-right arrows
ctx.strokeStyle = "rgb(128,128,128)";
ctx.moveTo(10,385);
ctx.lineTo(20,390);
ctx.moveTo(10,385);
ctx.lineTo(20,380);
ctx.moveTo(10,385);
ctx.lineTo(360,385);
ctx.moveTo(360,385);
ctx.lineTo(350,390);
ctx.moveTo(360,385);
ctx.lineTo(350,380);
// draw the up-down box and arrows
ctx.moveTo(385,10);
ctx.lineTo(390,20);
ctx.moveTo(385,10);
ctx.lineTo(380,20);
ctx.moveTo(385,10);
ctx.lineTo(385,360);
ctx.moveTo(385,360);
ctx.lineTo(390,350);
ctx.moveTo(385,360);
ctx.lineTo(380,350);
ctx.stroke();
}
// -----------------------------------------------------------
// grab mouse coordinates from the window
// -----------------------------------------------------------
function getMouseCoords(event)
{
if (event == null)
{
alert("mouse event resulted in null");
event = window.event;
return null;
}
// NOTE: This is specific to Safari; will need to be changed
// for FF & IE
if (event.offsetX || event.offsetY)
{
var coords = new Vector(event.offsetX, event.offsetY, 0);
return coords.v;
}
return null;
}
// -----------------------------------------------------------
// math.js - math code
// -----------------------------------------------------------
// -----------------------------------------------------------
// Vector class
// -----------------------------------------------------------
function Vector(x, y, z)
{
this.v = new Array(x,y,z,1);
// check to see if the vector is within a given distance to
// a point
this.withinRadiusAroundPoint = function(r, p)
{
var dx = this.v[0] - p[0];
var dy = this.v[1] - p[1];
return (dx * dx + dy * dy) < (r * r);
}
// rotate the vector about an origin
this.rotateAboutOrigin = function(o, rotAngles)
{
var rv = RotVectorAboutOrigin(this.v, o, rotAngles);
for (var i = 0; i < rv.length; ++i)
{
this.v[i] = rv[i];
}
}
// move the vector to another point
this.moveTo = function(p)
{
this.v[0] = p.v[0];
this.v[1] = p.v[1];
this.v[2] = p.v[2];
}
// calculate the distance from another vector
this.distanceFrom = function(b)
{
var sumOfSquares = 0;
for (var i = 0; i < this.v.length; ++i)
{
sumOfSquares += (this.v[i] - b.v[i]) * (this.v[i] - b.v[i]);
}
return Math.sqrt(sumOfSquares);
}
}
// -----------------------------------------------------------
// multiply two matrices together
// -----------------------------------------------------------
function MultiplyMatrices(A,B)
{
var size = A.size;
var m = new SqMat(size);
for (var i = 0; i < size; ++i)
{
for (var j = 0; j < size; ++j)
{
var val = 0;
for (var k = 0; k < size; ++k)
{
val += A.get(i,k) * B.get(k,j);
}
m.set(i, j, val);
}
}
return m;
}
// -----------------------------------------------------------
// Square Matrix class
// -----------------------------------------------------------
function SqMat(size)
{
// initialize the matrix
this.size = size;
this.A = new Array(size);
for (var i = 0; i < size; ++i)
{
this.A[i] = new Array(size);
}
// set values
this.set = function(i,j,val)
{
this.A[i][j] = val;
}
// get values
this.get = function(i,j)
{
return this.A[i][j];
}
// get position info
this.getPos = function()
{
var pos = new Vector(0, 0, 0);
for (var i = 0; i < size-1; ++i)
{
pos.v[i] = this.A[i][size-1];
}
return pos;
}
// mutliply the matrix by another matrix
this.multiplyByMatrix = function(B)
{
var m = MultiplyMatrices(this, B);
this.A = m.A;
}
// multiply the matrix by a vector
this.multiplyByVector = function(v)
{
var vec = new Array(size);
for (var i = 0; i < size; ++i)
{
vec[i] = 0;
for (var k = 0; k < size; ++k)
{
vec[i] += this.A[i][k] * v[k];
}
}
return vec;
}
// determine the transpose of the matrix
this.transpose = function()
{
var T = new Array(size);
for(var i = 0; i < size; ++i)
{
T[i] = new Array(size);
for (var j = 0; j < size; ++j)
{
T[i][j] = this.A[j][i];
}
}
return T;
}
}
// -----------------------------------------------------------
// rotation matrix around the X axis
// -----------------------------------------------------------
function RotX(theta)
{
var R = new SqMat(4);
R.set(0, 0, 1);
R.set(0, 1, 0);
R.set(0, 2, 0);
R.set(0, 3, 0);
R.set(1, 0, 0);
R.set(1, 1, Math.cos(theta));
R.set(1, 2, -Math.sin(theta));
R.set(1, 3, 0);
R.set(2, 0, 0);
R.set(2, 1, Math.sin(theta));
R.set(2, 2, Math.cos(theta));
R.set(2, 3, 0);
R.set(3, 0, 0);
R.set(3, 1, 0);
R.set(3, 2, 0);
R.set(3, 3, 1);
return R;
}
// -----------------------------------------------------------
// rotation matrix around the Y axis
// -----------------------------------------------------------
function RotY(theta)
{
var R = new SqMat(4);
R.set(0, 0, Math.cos(theta));
R.set(0, 1, 0);
R.set(0, 2, Math.sin(theta));
R.set(0, 3, 0);
R.set(1, 0, 0);
R.set(1, 1, 1);
R.set(1, 2, 0);
R.set(1, 3, 0);
R.set(2, 0, -Math.sin(theta));
R.set(2, 1, 0);
R.set(2, 2, Math.cos(theta));
R.set(2, 3, 0);
R.set(3, 0, 0);
R.set(3, 1, 0);
R.set(3, 2, 0);
R.set(3, 3, 1);
return R;
}
// -----------------------------------------------------------
// rotation matrix around the Z axis
// -----------------------------------------------------------
function RotZ(theta)
{
var R = new SqMat(4);
R.set(0, 0, Math.cos(theta));
R.set(0, 1, -Math.sin(theta));
R.set(0, 2, 0);
R.set(0, 3, 0);
R.set(1, 0, Math.sin(theta));
R.set(1, 1, Math.cos(theta));
R.set(1, 2, 0);
R.set(1, 3, 0);
R.set(2, 0, 0);
R.set(2, 1, 0);
R.set(2, 2, 1);
R.set(2, 3, 0);
R.set(3, 0, 0);
R.set(3, 1, 0);
R.set(3, 2, 0);
R.set(3, 3, 1);
return R;
}
// -----------------------------------------------------------
// rotate ZYX
// -----------------------------------------------------------
function Rot(zRotAng, yRotAng, xRotAng)
{
return MultiplyMatrices( MultiplyMatrices(RotZ(zRotAng), RotY(yRotAng)), RotX(xRotAng) );
// return MultiplyMatrices( MultiplyMatrices(RotX(xRotAng), RotY(yRotAng)), RotZ(zRotAng) );
}
// -----------------------------------------------------------
// translation matrix
// -----------------------------------------------------------
function Trans(x,y,z)
{
var R = new SqMat(4);
R.set(0, 0, 1);
R.set(0, 1, 0);
R.set(0, 2, 0);
R.set(0, 3, x);
R.set(1, 0, 0);
R.set(1, 1, 1);
R.set(1, 2, 0);
R.set(1, 3, y);
R.set(2, 0, 0);
R.set(2, 1, 0);
R.set(2, 2, 1);
R.set(2, 3, z);
R.set(3, 0, 0);
R.set(3, 1, 0);
R.set(3, 2, 0);
R.set(3, 3, 1);
return R;
}
// -----------------------------------------------------------
// rotate a vector about a defined origin by angles
// zRotAng (yaw), yRotAng (pitch), xRotAng (roll)
// -----------------------------------------------------------
function RotVectorAboutOrigin(vector, origin, rotAngles, on)
{
var T = Trans(-origin.v[0], -origin.v[1], -origin.v[2]);
var R = MultiplyMatrices( MultiplyMatrices(RotZ(rotAngles[0]), RotY(rotAngles[1])), RotX(rotAngles[2]) );
var Trev = Trans(origin.v[0], origin.v[1], origin.v[2]);
var TRTrev = MultiplyMatrices( Trev, MultiplyMatrices(R, T) );
if (on)
{
return TRTrev.multiplyByVector(vector.v);
}
return TRTrev.multiplyByVector(vector);
}
// -----------------------------------------------------------
// define a manipulator system
// -----------------------------------------------------------
function Manipulator(origin, numJoints, heights, isLeft)
{
// set up the manipulator
this.origin = origin;
this.tipPos;
// recalculate the position of the end effector (fingertip)
this.recalcManipulator = function(jointAngles)
{
// prepare to return the positions of each joint
var pointPositions = new Array(jointAngles+1);
// start at the origin
var T = Trans(this.origin.v[0], this.origin.v[1], this.origin.v[2]);
// orient joint coordinates
T.multiplyByMatrix(RotY(-Math.PI/2));
// apply side-to-side rotation to base
T.multiplyByMatrix(RotX(-Math.PI/2));
if (isLeft)
{
T.multiplyByMatrix(RotZ(jointAngles[0]));
}
else
{
T.multiplyByMatrix(RotZ(-jointAngles[0]));
}
pointPositions[0] = T.getPos();
// rotate for front-to-back rotations for other joints
T.multiplyByMatrix(RotX(Math.PI/2));
pointPositions[1] = T.getPos();
var A;
for (var j = 1; j < jointAngles.length; ++j)
{
A = MultiplyMatrices(RotZ(jointAngles[j]), Trans(heights[j],0,0));
T.multiplyByMatrix(A);
pointPositions[j+1] = T.getPos();
}
// finish with the final positions
this.tipPos = T.getPos();
return pointPositions;
}
this.getPos = function()
{
return this.tipPos;
}
}
// -----------------------------------------------------------
// define a manipulator system specific to thumbs
// -----------------------------------------------------------
function ThumbManipulator(origin, numJoints, heights, isLeft)
{
// set up the manipulator
this.origin = origin;
this.tipPos;
this.isLeft = isLeft;
// recalculate the position of the end effector (fingertip)
this.recalcManipulator = function(jointAngles)
{
var pointPositions = new Array(jointAngles+1);
// start at the origin
var T = Trans(this.origin.v[0], this.origin.v[1], this.origin.v[2]);
// then rotate the origin so that each joint rotates around the z axis
T.multiplyByMatrix(RotY(-Math.PI/2));
T.multiplyByMatrix(RotZ(jointAngles[0]));
pointPositions[0] = T.getPos();
T.multiplyByMatrix(RotX(-Math.PI/2));
// apply the joint angle rotations to each joint
var A;
// var dVals = [0, 10, 15, 10];
var dVals = [0, 0, 0, 0];
pointPositions[1] = T.getPos();
for (var j = 1; j < jointAngles.length; ++j)
{
if (isLeft)
{
A = MultiplyMatrices(RotZ(jointAngles[j]), Trans(0,0,dVals[j-1]));
}
else
{
A = MultiplyMatrices(RotZ(-jointAngles[j]), Trans(0,0,dVals[j-1]));
}
A.multiplyByMatrix(Trans(heights[j],0,0));
T.multiplyByMatrix(A);
pointPositions[j+1] = T.getPos();
}
// finish with the final positions
this.tipPos = T.getPos();
return pointPositions;
}
this.getPos = function()
{
return this.tipPos;
}
}
|
rwaldron/vektor
|
example/public/js/visualizer.js
|
JavaScript
|
mit
| 52,295
|
# Määrittelydokumentti
## Yleiskuva
Tiralabra-Compression toteuttaa Lempel-Ziv-Welch -algoritmin enkooderina sekä dekooderina.
Toteutetulla ohjelmalla voi tiivistää minkä tahansa tiedoston 12- tai 16-bittisillä koodiavaimilla. LZWalgoritmi
on hyvin suosittu kompressioalgoritmi ja se ei edellytä erillistä koodiavaintaulukkoa, vaan
taulukko rakennetaan enkoodatessa sekä dekoodatessa. Tämä tekee LZW-algoritmista myös erittäin
sopeutuvan, sillä kooditaulukko tyhjennetään sen täyttyessä ja täytetään uusilla avainsanoilla. Näin
ollen algoritmi sopeutuu tiedoston sisällä vaihtuviin symbolien esiintymistiheyksiin.
## Käytetyt tietorakenteet
* Taulukot
* Linkitetyt listat
* Tasapainotettu binääripuu (mahdollisena optimointina projektin loppupuolella)
## Validit syötteet
LZW on häviötön algoritmi, joten syötteeksi kelpaa mikä tahansa tiedosto. Enkoodatut tiedostot
sisältävät tunnisteet, jolla ohjelma osaa dekoodata ne.
Vaativuusmäärittely
LZW-algoritmi on sopeutuva algoritmi, jossa taulukon maksimikoko ei riipu lähdetiedoston koosta.
Koska taulukko tyhjennetään tietyin väliajoin, enkoodaus/dekoodausprosessin voi ajatella jakautuvan
tietynmittaisiin, erillisiin paloihin.
|
jclc/tiralabra-compression
|
project-docs/määrittelydokumentti.md
|
Markdown
|
mit
| 1,228
|
(function () {
'use strict';
angular
.module('app')
.factory('config', config);
function config() {
return {
baseApiUrl: "http://localhost:3000/api"
// baseApiUrl: "https://nuflow.herokuapp.com/api"
};
}
})();
|
Alberto19/nuflow-web
|
public/config/config.js
|
JavaScript
|
mit
| 298
|
/* Fonts */
@import url('http://fonts.googleapis.com/css?family=Raleway:400,300,600,700|Lobster');
@font-face {
font-family: 'Citizen Slab';
src: url('fonts/citizen_slab.otf') format("opentype");
}
/* Site Presets */
html, body
{
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
font-family: 'Raleway', sans-serif;
}
body
{
padding-top: 20px;
background: #ececec;
position: relative;
line-height: 1.7em;
background: url('../images/tree_bark.png');
background-attachment: fixed;
}
html:before
{
content: '';
display: block;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, .32);
position: fixed;
top: 0; bottom: 0;
left: 0; right: 0;
z-index: 0;
}
h1, h2, h3, h4, h5, h6
{
}
*
{
box-sizing: border-box;
}
a
{
text-decoration: none;
}
.module
{
padding: 5px 10px;
border: 1px solid WHITE;
border-radius: 2px;
transition: all .2s linear;
}
.module img, .teacher .name
{
display: block;
margin: 0 auto;
text-align: center;
}
.right
{
margin-right: 45px;
float: right;
}
.left
{
margin-left: 45px;
float: left;
}
.container a:not(.btn-cta)
{
padding: 2px 3px;
color: ORANGE;
}
.container a:not(.btn-cta):hover
{
color: WHITE;
background: ORANGE;
}
.btn
{
background: ORANGE;
color: WHITE !important;
padding: 10px 15px !important;
border-bottom: 2px solid DARKORANGE;
transition: all .2s linear;
}
.btn:hover
{
border-bottom-color: transparent;
box-shadow: inset 0 0 10px gray;
}
.btn-cta
{
display: inline-block;
position: relative;
height: 50px;
padding-right: 15px;
background: ORANGE;
color: #000;
text-decoration: none;
line-height: 50px;
transition: all .3s linear;
}
.btn-cta:hover
{
background: DARKORANGE;
color: WHITE;
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-o-transform: rotate(360deg);
-ms-transform: rotate(360deg);
}
.btn-cta:hover:before
{
border-color: DARKORANGE;
border-left-color: transparent;
}
.btn-cta:hover:after
{
border-left-color: DARKORANGE;
}
.btn-cta:before, .btn-cta:after
{
content: '';
position: absolute;
top: 0; bottom: 0;
display: block;
transition: all .2s linear;
}
.btn-cta:before
{
left: -50px;
border: 25px solid ORANGE;
border-left-color: transparent;
}
.btn-cta:after
{
right: -50px;
border: 25px solid transparent;
border-left-color: ORANGE;
}
img
{
max-width: 100%;
}
section, footer
{
margin: 0 auto;
padding: 15px 20px;
}
footer
{
text-align: center;
font-size: smaller;
}
hr
{
width: 85%;
}
.block-center
{
display: block;
margin: 0 auto;
}
/* Container */
.container
{
display: block;
margin: 50px auto;
width: 960px;
max-width: 95%;
position: relative;
background: WHITE;
padding: 0;
box-shadow: 0 0 3px #816D6D;
z-index: 99;
}
.bookshelf{border-top: 8px solid darkorchid;}
.attribution{border-top: 8px solid limegreen;}
.premium{border-top: 8px solid deepskyblue;}
/* Grid */
div[class*='grid-']
{
display: inline-block;
padding: 10px;
vertical-align: middle;
}
.grid { width: 100%; }
.grid-1 { width: 100%; }
.grid-1-2 { width: 50%; }
.grid-1-3 { width: 33%; }
.grid-2-3 { width: 66%; }
.grid-1-4 { width: 25%; }
.grid-3-4 { width: 75%; }
.grid:after
{
content: '';
display: table;
clear: both;
}
/* Header */
header
{
position: fixed;
top: 0;
left: 0; right: 0;
z-index: 999;
padding: 0 0 0 10px;
font-size: .8em;
text-transform: uppercase;
background: #456070;
color: WHITE;
box-shadow: 0 0 2px #816D6D;
overflow: hidden;
}
header a
{
color: WHITE;
}
header > div, header > nav, header li
{
height: 50px;
display: inline-block;
}
header ul
{
list-style-type: none;
padding: 0;
margin: 0;
}
header nav
{
float: right;
margin-right: 20px;
}
header nav li a
{
padding: 10px;
display: block;
text-align: center;
}
header nav li a i
{
display: block;
}
header nav li a:hover
{
background: rgb(197, 76, 76);
}
header nav li:nth-child(1) a:hover { background: rgb(197, 76, 76); }
header nav li:nth-child(2) a:hover { background: rgb(73, 121, 223); }
header nav li:nth-child(3) a:hover { background: rgba(42, 167, 77, 0.46); }
header nav li:nth-child(4) a:hover { background: rgb(192, 206, 38); }
header .user-controls, header .logo
{
line-height: 50px;
}
header .user-controls
{
background: ORANGE;
float: right;
}
header .user-controls li
{
padding: 0 15px;
width: 100%;
}
header .user-controls li:hover
{
background-color: DARKORANGE;
}
header .user-controls li a
{
display: block;
height: 100%;
width: 100%;
}
.logo
{
font-family: 'Lobster', sans-serif;
font-size: 1.7em;
}
/* Banner */
.banner
{
padding: 0;
margin-bottom: -50px;
}
.banner p, .banner h1
{
display: inline-block;
background: RGBA(0, 0, 0, .5);
padding: 10px 5px;
}
.banner ul li
{
background-attachment: fixed;
color: WHITE;
padding: 35px;
text-align: center;
font-size: 1.3em;
display: block;
min-height: 500px;
}
.banner .slide1
{
background: url('../images/bikes.jpg');
}
.banner .slide2
{
background: url('../images/splash.jpg');
}
/* Tracks */
.track
{
padding: 15px 30px;
}
.track img, .track h4, .track p
{
display: block;
}
.track img
{
width: 60%;
margin: 0 auto;
}
/* Teachers */
.teacher:hover:not(:empty)
{
border: 1px solid #CCC;
}
.teacher img
{
border-radius: 50%;
margin-bottom: 10px;
}
/* Names */
.name
{
font-size: 1.4em;
position: relative;
}
.name:hover:before, .name:hover:after
{
content: '';
position: absolute;
top: 0; bottom: 0;
display: block;
border: 15px solid ORANGE;
transition: all .2s linear;
}
.name:hover:before
{
left: -20px;
border-left-color: transparent;
}
.name:hover:after
{
right: -20px;
border-right-color: transparent;
}
/* Bookshelf */
.book
{
}
.book-cover
{
text-align: center;
}
.book-cover img
{
vertical-align: middle;
max-height: 200px;
}
/* Premium Plans */
.plan
{
padding: 10px 0;
text-align: center;
margin: 10px;
border-radius: 3px;
box-shadow: 0 0 4px lightgrey;
}
.plan:hover
{
box-shadow: 0 0 4px grey;
}
.plan ul
{
list-style-type: none;
padding: 0;
}
.plan h3
{
background: deepskyblue;
color: WHITE;
font-weight: 400;
}
.plan h2 {color: ORANGE; margin: 0;}
.plan small {color: grey;}
/* Articles */
article
{
padding: 15px 35px;
}
article h1
{
background: rgb(206, 84, 46);
color: WHITE;
margin: -15px -35px 15px -35px;
padding: 15px 20px;
}
article h1 small
{
float: right;
font-size: .5em;
color: RGBA(255, 255, 255, .5);
}
code
{
overflow-y: hidden;
}
/* Media Queries */
@media screen and (max-width: 720px)
{
.grid-1-4
{
width: 50%;
}
.grid-1-3, .grid-2-3
{
width: 100%;
}
}
@media screen and (max-width: 480px)
{
[class^='grid-']
{
display: block;
float: none;
width: 100%;
}
.container
{
max-width: 98%;
}
}
@media screen and (max-width: 390px)
{
nav ul li a span
{
display: none;
}
nav ul li a i
{
font-size: 2.4em;
}
}
@media screen and (max-width: 510px)
{
body
{
padding-top: 60px;
}
header
{
padding: 0;
}
header .logo, header .user-controls
{
display: block;
width: 50%;
float: left;
text-align: center;
}
header nav
{
margin: 0;
}
header nav ul
{
display: table;
width: 100%;
table-layout: fixed;
}
header nav ul li
{
display: table-cell;
}
}
/* Icon Fonts */
@font-face {
font-family: 'icomoon';
src:url('fonts/icomoon.eot?-shp6z9');
src:url('fonts/icomoon.eot?#iefix-shp6z9') format('embedded-opentype'),
url('fonts/icomoon.woff?-shp6z9') format('woff'),
url('fonts/icomoon.ttf?-shp6z9') format('truetype'),
url('fonts/icomoon.svg?-shp6z9#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="icon-"], [class*=" icon-"] {
font-family: 'icomoon';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-home:before {
content: "\e600";
}
.icon-books:before {
content: "\e601";
}
.icon-bookmarks:before {
content: "\e602";
}
.icon-trophy:before {
content: "\e603";
}
|
JordanForeman/ABCSS
|
css/screen.css
|
CSS
|
mit
| 8,235
|
namespace WebBlocks.Types.DataContracts
{
public interface ISortable
{
int SortOrder { get; }
}
}
|
dyatlov-a/WebBlocks
|
src/WebBlocks.Types/DataContracts/ISortable.cs
|
C#
|
mit
| 121
|
#ifndef CALC_CPP
#define CALC_CPP
#include "../include/calc.hpp"
std::unordered_map<std::string, double> Calculator::constants;
int Calculator::get_prim(char*& expr) {
skip_spaces(expr);
bool is_negative = false;
switch (*expr) {
case '+': {
expr++;
break;
}
case '-': {
is_negative = true;
expr++;
break;
}
default:
break;
}
if (*expr == '(') {
expr++;
opened_brackets_cnt++;
int prim = get_expr(expr);
if (*expr != ')') {
std::stringstream err;
err << "Mismached brackets: an extra \"(\"" << endl;
throw std::runtime_error(err.str());
}
expr++;
opened_brackets_cnt--;
return is_negative ? (-prim) : (prim);
}
int prim = 0;
if (is_digit(*expr)) {
do {
prim = 10 * prim + (*expr - '0');
if (value > NumericTraits<int>::max || value < NumericTraits<int>::min) {
cout << "error" << endl;
exit(0);
}
expr++;
} while (is_digit(*expr));
} else if (is_letter(*expr)) {
string s;
do {
s += *expr;
expr++;
} while (is_letter(*expr));
if (constants.find(s) != constants.end()) {
prim = constants[s];
} else {
std::stringstream err;
err << "Constant: \"" << s << "\" is not found" << endl;
throw std::runtime_error(err.str());
}
}
return is_negative ? (-prim) : (prim);
}
int Calculator::get_term(char*& expr) {
int term_1 = get_prim(expr);
while (1) {
skip_spaces(expr);
char op = *expr;
switch (op) {
case '*': {
expr++;
term_1 *= get_prim(expr);
break;
}
case '/': {
expr++;
int term_2 = get_prim(expr);
if (term_2 == 0) {
std::stringstream err;
err << "Division by zero: \"" << term_1 << " / " << term_2 << "\"" << endl;
throw std::runtime_error(err.str());
}
term_1 /= term_2;
break;
}
default:
return term_1;
}
}
}
int Calculator::get_expr(char*& expr) {
int term_1 = get_term(expr);
while (1) {
skip_spaces(expr);
char op = *expr;
switch (op) {
case '+': {
expr++;
term_1 += get_term(expr);
break;
}
case '-': {
expr++;
term_1 -= get_term(expr);
break;
}
default:
return term_1;
}
}
}
int Calculator::eval(char* expr) {
if (*expr == '\0') {
std::stringstream err;
err << "Error: input expression is empty" << endl;
throw std::runtime_error(err.str());
}
opened_brackets_cnt = 0;
int result = get_expr(expr);
if (opened_brackets_cnt != 0 || *expr == ')') {
std::stringstream err;
err << "Mismached brackets: an extra \"" << *expr << "\"" << endl;
throw std::runtime_error(err.str());
}
if (*expr != '\0') {
std::stringstream err;
err << "Invalid character: \"" << *expr << "\"" << endl;
throw std::runtime_error(err.str());
}
return result;
};
#endif
|
mtrempoltsev/msu_cpp_autumn_2017
|
homework/Kulagin/03/src/calc.cpp
|
C++
|
mit
| 2,738
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clients', '0010_auto_20151024_2343'),
]
operations = [
migrations.AddField(
model_name='client',
name='napis_id',
field=models.CharField(blank=True, max_length=11, null=True),
),
]
|
deafhhs/adapt
|
clients/migrations/0011_client_napis_id.py
|
Python
|
mit
| 425
|
package com.zebdar.tom;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollListener;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
public class DropdownListView extends ListView implements OnScrollListener {
private static final String TAG = "listview";
private final static int RELEASE_To_REFRESH = 0;
private final static int PULL_To_REFRESH = 1;
private final static int REFRESHING = 2;
private final static int DONE = 3;
private final static int LOADING = 4;
// 实际的padding的距离与界面上偏移距离的比例
private final static int RATIO = 3;
private LayoutInflater inflater;
private FrameLayout fl;
private LinearLayout headView;
// private View line;
private ProgressBar progressBar;
// private RotateAnimation animation;
// private RotateAnimation reverseAnimation;
// 用于保证startY的值在一个完整的touch事件中只被记录一次
private boolean isRecored;
private int headContentWidth;
private int headContentHeight;
private int startY;
private int firstItemIndex;
private int state;
private boolean isBack;
private OnRefreshListenerHeader refreshListenerHeader;
private boolean isRefreshableHeader;
public DropdownListView(Context context) {
super(context);
init(context);
}
public DropdownListView(Context context, AttributeSet attrs) {
super(context, attrs);
init(context);
}
private void init(Context context) {
setCacheColorHint(context.getResources().getColor(R.color.transparent));
inflater = LayoutInflater.from(context);
fl = (FrameLayout)inflater.inflate(R.layout.dropdown_lv_head, null);
headView = (LinearLayout) fl.findViewById(R.id.drop_down_head);
progressBar = (ProgressBar) fl.findViewById(R.id.loading);
measureView(headView);
headContentHeight = headView.getMeasuredHeight();
headContentWidth = headView.getMeasuredWidth();
headView.setPadding(0, -1 * headContentHeight, 0, 0);
headView.invalidate();
Log.v("size", "width:" + headContentWidth + " height:"
+ headContentHeight);
addHeaderView(fl, null, false);
// addHeaderView(headView, null, false);
setOnScrollListener(this);
state = DONE;
isRefreshableHeader = false;
}
public void onScroll(AbsListView arg0, int firstVisiableItem, int arg2,
int arg3) {
firstItemIndex = firstVisiableItem;
}
public void onScrollStateChanged(AbsListView arg0, int scrollState) {
if (scrollState == OnScrollListener.SCROLL_STATE_IDLE) {
// 判断滚动到底部
}
}
public boolean onTouchEvent(MotionEvent event) {
if (isRefreshableHeader) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
if (firstItemIndex == 0 && !isRecored) {
isRecored = true;
startY = (int) event.getY();
Log.v(TAG, "在down时候记录当前位置‘");
}
break;
case MotionEvent.ACTION_UP:
if (state != REFRESHING && state != LOADING) {
if (state == DONE) {
// 什么都不做
}
if (state == PULL_To_REFRESH) {
state = DONE;
changeHeaderViewByState();
Log.v(TAG, "由下拉刷新状态,到done状态");
}
if (state == RELEASE_To_REFRESH) {
state = REFRESHING;
changeHeaderViewByState();
// recoverLine();
onRefresh();
Log.v(TAG, "由松开刷新状态,到done状态");
}
}
isRecored = false;
isBack = false;
break;
case MotionEvent.ACTION_MOVE:
int tempY = (int) event.getY();
if (!isRecored && firstItemIndex == 0) {
Log.v(TAG, "在move时候记录下位置");
isRecored = true;
startY = tempY;
}
if (state != REFRESHING && isRecored && state != LOADING) {
// 保证在设置padding的过程中,当前的位置一直是在head,否则如果当列表超出屏幕的话,当在上推的时候,列表会同时进行滚动
// 可以松手去刷新了
if (state == RELEASE_To_REFRESH) {
setSelection(0);
// 往上推了,推到了屏幕足够掩盖head的程度,但是还没有推到全部掩盖的地步
if (((tempY - startY) / RATIO < headContentHeight)
&& (tempY - startY) > 0) {
state = PULL_To_REFRESH;
changeHeaderViewByState();
Log.v(TAG, "由松开刷新状态转变到下拉刷新状态");
}
// 一下子推到顶了
else if (tempY - startY <= 0) {
state = DONE;
changeHeaderViewByState();
Log.v(TAG, "由松开刷新状态转变到done状态");
}
// 往下拉了,或者还没有上推到屏幕顶部掩盖head的地步
else {
// 不用进行特别的操作,只用更新paddingTop的值就行了
}
}
// 还没有到达显示松开刷新的时候,DONE或者是PULL_To_REFRESH状态
if (state == PULL_To_REFRESH) {
setSelection(0);
// 下拉到可以进入RELEASE_TO_REFRESH的状态
if ((tempY - startY) / RATIO >= headContentHeight) {
state = RELEASE_To_REFRESH;
isBack = true;
changeHeaderViewByState();
Log.v(TAG, "由done或者下拉刷新状态转变到松开刷新");
}
// 上推到顶了
else if (tempY - startY <= 0) {
state = DONE;
changeHeaderViewByState();
Log.v(TAG, "由DOne或者下拉刷新状态转变到done状态");
}
}
// done状态下
if (state == DONE) {
if (tempY - startY > 0) {
state = PULL_To_REFRESH;
changeHeaderViewByState();
}
}
// 更新headView的size
if (state == PULL_To_REFRESH) {
headView.setPadding(0, -1 * headContentHeight
+ (tempY - startY) / RATIO, 0, 0);
}
// 更新headView的paddingTop
if (state == RELEASE_To_REFRESH) {
headView.setPadding(0, (tempY - startY) / RATIO
- headContentHeight, 0, 0);
}
}
break;
}
}
return super.onTouchEvent(event);
}
// 当状态改变时候,调用该方法,以更新界面
private void changeHeaderViewByState() {
switch (state) {
case RELEASE_To_REFRESH:
progressBar.setVisibility(View.VISIBLE);
Log.v(TAG, "当前状态,松开刷新");
break;
case PULL_To_REFRESH:
progressBar.setVisibility(View.VISIBLE);
// 是由RELEASE_To_REFRESH状态转变来的
if (isBack) {
isBack = false;
} else {
}
Log.v(TAG, "当前状态,下拉刷新");
break;
case REFRESHING:
headView.setPadding(0, 0, 0, 0);
progressBar.setVisibility(View.VISIBLE);
Log.v(TAG, "当前状态,正在刷新...");
break;
case DONE:
headView.setPadding(0, -1 * headContentHeight, 0, 0);
progressBar.setVisibility(View.GONE);
Log.v(TAG, "当前状态,done");
break;
}
}
public void setOnRefreshListenerHead(
OnRefreshListenerHeader refreshListenerHeader) {
this.refreshListenerHeader = refreshListenerHeader;
isRefreshableHeader = true;
}
public interface OnRefreshListenerHeader {
public void onRefresh();
}
public interface OnRefreshListenerFooter {
public void onRefresh();
}
public void onRefreshCompleteHeader() {
state = DONE;
changeHeaderViewByState();
}
private void onRefresh() {
if (refreshListenerHeader != null) {
refreshListenerHeader.onRefresh();
}
}
// 此方法直接照搬自网络上的一个下拉刷新的demo,此处是“估计”headView的width以及height
private void measureView(View child) {
ViewGroup.LayoutParams p = child.getLayoutParams();
if (p == null) {
p = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
}
int childWidthSpec = ViewGroup.getChildMeasureSpec(0, 0 + 0, p.width);
int lpHeight = p.height;
int childHeightSpec;
if (lpHeight > 0) {
childHeightSpec = MeasureSpec.makeMeasureSpec(lpHeight,
MeasureSpec.EXACTLY);
} else {
childHeightSpec = MeasureSpec.makeMeasureSpec(0,
MeasureSpec.UNSPECIFIED);
}
child.measure(childWidthSpec, childHeightSpec);
}
public void setAdapter(BaseAdapter adapter) {
super.setAdapter(adapter);
}
}
|
cowthan/Ayo2022
|
Ayo/app-talker/src/main/java/com/zebdar/tom/DropdownListView.java
|
Java
|
mit
| 8,410
|
---
layout: page
title: Gold Orb Music Conference
date: 2016-05-24
author: Victoria Parker
tags: weekly links, java
status: published
summary: Proin vehicula ex dignissim ipsum tincidunt, eu pellentesque turpis finibus.
banner: images/banner/meeting-01.jpg
booking:
startDate: 12/13/2016
endDate: 12/14/2016
ctyhocn: ADEGAHX
groupCode: GOMC
published: true
---
Mauris eros lectus, iaculis quis mauris sit amet, consequat pretium metus. Integer pulvinar tellus nec ante suscipit, ac placerat diam laoreet. Cras iaculis, mi nec scelerisque tempus, eros odio pharetra elit, non imperdiet sapien ante eget sapien. Sed laoreet blandit risus quis porttitor. Aenean porta metus sed felis tristique pretium. Vestibulum hendrerit aliquet mauris, eget aliquam massa iaculis a. Phasellus tristique mauris congue cursus fringilla. Nam finibus, eros id elementum feugiat, turpis nibh consequat felis, pharetra convallis ante odio eu purus.
1 Sed tincidunt mauris at sem scelerisque, auctor semper libero sodales
1 Cras congue mauris at dui tempor viverra.
Quisque gravida commodo ipsum, id venenatis sem fermentum ac. Vivamus magna purus, mattis in tellus at, sollicitudin luctus ante. Aliquam vehicula dolor tellus, et varius nunc gravida pharetra. Aliquam erat volutpat. Praesent suscipit odio et dolor dictum, eget semper libero finibus. Phasellus quis mi non nisl ultrices tristique eu non purus. Pellentesque leo libero, eleifend non lorem vitae, laoreet sagittis enim. Nullam et lectus ut odio tempor condimentum dignissim in lectus. Nullam dapibus metus a massa iaculis faucibus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Etiam a enim ut quam bibendum dapibus eget in sem. Aenean fringilla tincidunt sapien. Nunc nunc arcu, dignissim et est vel, laoreet tristique augue. Etiam sed orci semper felis pellentesque rhoncus.
|
KlishGroup/prose-pogs
|
pogs/A/ADEGAHX/GOMC/index.md
|
Markdown
|
mit
| 1,877
|
from django import forms
from django_filters.widgets import RangeWidget
class DropDownFilterWidget(forms.widgets.ChoiceWidget):
template_name = 'foirequest/widgets/dropdown_filter.html'
def __init__(self, *args, **kwargs):
self.get_url = kwargs.pop('get_url', None)
super().__init__(*args, **kwargs)
def render(self, name, value, attrs=None, renderer=None):
value = super(DropDownFilterWidget, self).render(name, value, attrs=attrs, renderer=renderer)
return value
def get_context(self, name, value, attrs):
self.default_label = self.attrs.get('label', '')
self.selected_label = self.default_label
context = super(DropDownFilterWidget, self).get_context(
name, value, attrs
)
context['selected_label'] = self.selected_label
context['default_label'] = self.default_label
return context
def create_option(self, name, value, label, selected, index,
subindex=None, attrs=None):
option = super(DropDownFilterWidget, self).create_option(name, value,
label, selected, index, subindex=subindex, attrs=attrs)
if selected and value:
self.selected_label = label
# Data is set on widget directly before rendering
data = self.data.copy()
data[name] = value
option['url'] = self.get_url(data)
return option
class AttachmentFileWidget(forms.ClearableFileInput):
template_name = 'foirequest/widgets/attachment_file.html'
class DateRangeWidget(RangeWidget):
template_name = 'foirequest/widgets/daterange.html'
def __init__(self):
widgets = [
forms.DateInput(attrs={'class': 'form-control', 'type': 'date'}),
forms.DateInput(attrs={'class': 'form-control', 'type': 'date'})
]
super(RangeWidget, self).__init__(widgets)
|
stefanw/froide
|
froide/foirequest/widgets.py
|
Python
|
mit
| 1,895
|
---
layout: page
title: Ready Industries Executive Retreat
date: 2016-05-24
author: Karen Vang
tags: weekly links, java
status: published
summary: Suspendisse ac urna eget augue ullamcorper feugiat vitae ac enim.
banner: images/banner/leisure-04.jpg
booking:
startDate: 10/28/2016
endDate: 10/29/2016
ctyhocn: SEAEDHX
groupCode: RIER
published: true
---
Nullam id nunc interdum tortor commodo rhoncus. Cras vel faucibus dui. Quisque quis pellentesque massa, at facilisis nisi. Nam justo quam, blandit sed lacinia tempus, porta et sem. Duis eget mattis est. Curabitur sit amet aliquet ex. Quisque dolor lacus, egestas et massa sit amet, laoreet fringilla libero.
* Sed sagittis eros vel felis pellentesque pulvinar.
Sed aliquam bibendum hendrerit. Sed imperdiet tristique est, sed varius diam ultricies eget. Vestibulum viverra fringilla imperdiet. Donec enim leo, iaculis at rutrum sed, consequat id eros. Donec vitae elit vitae neque vehicula aliquet. Quisque nec turpis ac tellus placerat sodales. Nam in volutpat metus. Suspendisse ultrices viverra nunc at aliquam. Mauris auctor est nunc, in aliquet orci convallis eget. Donec condimentum vestibulum eros, iaculis efficitur leo dignissim id. Praesent sit amet justo erat. Curabitur metus purus, congue et tempus eget, bibendum eget ante. Ut tempus nibh at magna pretium rutrum. Duis euismod, metus non mollis tempus, felis ligula suscipit mauris, in aliquam neque nunc vitae nisl.
|
KlishGroup/prose-pogs
|
pogs/S/SEAEDHX/RIER/index.md
|
Markdown
|
mit
| 1,445
|
"use strict";
module.exports = {
hexagon: {
interval: 400,
frames: ['⬡', '⬢'],
},
dots: {
interval: 80,
frames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
},
dots2: {
interval: 80,
frames: ['⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷'],
},
dots3: {
interval: 80,
frames: ['⠋', '⠙', '⠚', '⠞', '⠖', '⠦', '⠴', '⠲', '⠳', '⠓'],
},
dots4: {
interval: 80,
frames: ['⠄', '⠆', '⠇', '⠋', '⠙', '⠸', '⠰', '⠠', '⠰', '⠸', '⠙', '⠋', '⠇', '⠆'],
},
dots5: {
interval: 80,
frames: ['⠋', '⠙', '⠚', '⠒', '⠂', '⠂', '⠒', '⠲', '⠴', '⠦', '⠖', '⠒', '⠐', '⠐', '⠒', '⠓', '⠋'],
},
dots6: {
interval: 80,
frames: [
'⠁',
'⠉',
'⠙',
'⠚',
'⠒',
'⠂',
'⠂',
'⠒',
'⠲',
'⠴',
'⠤',
'⠄',
'⠄',
'⠤',
'⠴',
'⠲',
'⠒',
'⠂',
'⠂',
'⠒',
'⠚',
'⠙',
'⠉',
'⠁',
],
},
dots7: {
interval: 80,
frames: [
'⠈',
'⠉',
'⠋',
'⠓',
'⠒',
'⠐',
'⠐',
'⠒',
'⠖',
'⠦',
'⠤',
'⠠',
'⠠',
'⠤',
'⠦',
'⠖',
'⠒',
'⠐',
'⠐',
'⠒',
'⠓',
'⠋',
'⠉',
'⠈',
],
},
dots8: {
interval: 80,
frames: [
'⠁',
'⠁',
'⠉',
'⠙',
'⠚',
'⠒',
'⠂',
'⠂',
'⠒',
'⠲',
'⠴',
'⠤',
'⠄',
'⠄',
'⠤',
'⠠',
'⠠',
'⠤',
'⠦',
'⠖',
'⠒',
'⠐',
'⠐',
'⠒',
'⠓',
'⠋',
'⠉',
'⠈',
'⠈',
],
},
dots9: {
interval: 80,
frames: ['⢹', '⢺', '⢼', '⣸', '⣇', '⡧', '⡗', '⡏'],
},
dots10: {
interval: 80,
frames: ['⢄', '⢂', '⢁', '⡁', '⡈', '⡐', '⡠'],
},
dots11: {
interval: 100,
frames: ['⠁', '⠂', '⠄', '⡀', '⢀', '⠠', '⠐', '⠈'],
},
line: {
interval: 130,
frames: ['-', '\\', '|', '/'],
},
line2: {
interval: 100,
frames: ['⠂', '-', '–', '—', '–', '-'],
},
pipe: {
interval: 100,
frames: ['┤', '┘', '┴', '└', '├', '┌', '┬', '┐'],
},
simpleDots: {
interval: 400,
frames: ['. ', '.. ', '...', ' '],
},
simpleDotsScrolling: {
interval: 200,
frames: ['. ', '.. ', '...', ' ..', ' .', ' '],
},
star: {
interval: 70,
frames: ['✶', '✸', '✹', '✺', '✹', '✷'],
},
star2: {
interval: 80,
frames: ['+', 'x', '*'],
},
flip: {
interval: 70,
frames: ['_', '_', '_', '-', '`', '`', '\'', '´', '-', '_', '_', '_'],
},
hamburger: {
interval: 100,
frames: ['☱', '☲', '☴'],
},
growVertical: {
interval: 120,
frames: ['▁', '▃', '▄', '▅', '▆', '▇', '▆', '▅', '▄', '▃'],
},
growHorizontal: {
interval: 120,
frames: ['▏', '▎', '▍', '▌', '▋', '▊', '▉', '▊', '▋', '▌', '▍', '▎'],
},
balloon: {
interval: 140,
frames: [' ', '.', 'o', 'O', '@', '*', ' '],
},
balloon2: {
interval: 120,
frames: ['.', 'o', 'O', '°', 'O', 'o', '.'],
},
noise: {
interval: 100,
frames: ['▓', '▒', '░'],
},
bounce: {
interval: 120,
frames: ['⠁', '⠂', '⠄', '⠂'],
},
boxBounce: {
interval: 120,
frames: ['▖', '▘', '▝', '▗'],
},
boxBounce2: {
interval: 100,
frames: ['▌', '▀', '▐', '▄'],
},
triangle: {
interval: 50,
frames: ['◢', '◣', '◤', '◥'],
},
arc: {
interval: 100,
frames: ['◜', '◠', '◝', '◞', '◡', '◟'],
},
circle: {
interval: 120,
frames: ['◡', '⊙', '◠'],
},
squareCorners: {
interval: 180,
frames: ['◰', '◳', '◲', '◱'],
},
circleQuarters: {
interval: 120,
frames: ['◴', '◷', '◶', '◵'],
},
circleHalves: {
interval: 50,
frames: ['◐', '◓', '◑', '◒'],
},
squish: {
interval: 100,
frames: ['╫', '╪'],
},
toggle: {
interval: 250,
frames: ['⊶', '⊷'],
},
toggle2: {
interval: 80,
frames: ['▫', '▪'],
},
toggle3: {
interval: 120,
frames: ['□', '■'],
},
toggle4: {
interval: 100,
frames: ['■', '□', '▪', '▫'],
},
toggle5: {
interval: 100,
frames: ['▮', '▯'],
},
toggle6: {
interval: 300,
frames: ['ဝ', '၀'],
},
toggle7: {
interval: 80,
frames: ['⦾', '⦿'],
},
toggle8: {
interval: 100,
frames: ['◍', '◌'],
},
toggle9: {
interval: 100,
frames: ['◉', '◎'],
},
toggle10: {
interval: 100,
frames: ['㊂', '㊀', '㊁'],
},
toggle11: {
interval: 50,
frames: ['⧇', '⧆'],
},
toggle12: {
interval: 120,
frames: ['☗', '☖'],
},
toggle13: {
interval: 80,
frames: ['=', '*', '-'],
},
arrow: {
interval: 100,
frames: ['←', '↖', '↑', '↗', '→', '↘', '↓', '↙'],
},
arrow2: {
interval: 80,
frames: ['⬆️ ', '↗️ ', '➡️ ', '↘️ ', '⬇️ ', '↙️ ', '⬅️ ', '↖️ '],
},
arrow3: {
interval: 120,
frames: ['▹▹▹▹▹', '▸▹▹▹▹', '▹▸▹▹▹', '▹▹▸▹▹', '▹▹▹▸▹', '▹▹▹▹▸'],
},
bouncingBar: {
interval: 80,
frames: ['[ ]', '[ =]', '[ ==]', '[ ===]', '[====]', '[=== ]', '[== ]', '[= ]'],
},
bouncingBall: {
interval: 80,
frames: [
'( ● )',
'( ● )',
'( ● )',
'( ● )',
'( ●)',
'( ● )',
'( ● )',
'( ● )',
'( ● )',
'(● )',
],
},
smiley: {
interval: 200,
frames: ['😄 ', '😝 '],
},
monkey: {
interval: 300,
frames: ['🙈 ', '🙈 ', '🙉 ', '🙊 '],
},
hearts: {
interval: 100,
frames: ['💛 ', '💙 ', '💜 ', '💚 ', '❤️ '],
},
clock: {
interval: 100,
frames: ['🕐 ', '🕑 ', '🕒 ', '🕓 ', '🕔 ', '🕕 ', '🕖 ', '🕗 ', '🕘 ', '🕙 ', '🕚 '],
},
earth: {
interval: 180,
frames: ['🌍 ', '🌎 ', '🌏 '],
},
moon: {
interval: 80,
frames: ['🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 '],
},
runner: {
interval: 140,
frames: ['🚶 ', '🏃 '],
},
pong: {
interval: 80,
frames: [
'▐⠂ ▌',
'▐⠈ ▌',
'▐ ⠂ ▌',
'▐ ⠠ ▌',
'▐ ⡀ ▌',
'▐ ⠠ ▌',
'▐ ⠂ ▌',
'▐ ⠈ ▌',
'▐ ⠂ ▌',
'▐ ⠠ ▌',
'▐ ⡀ ▌',
'▐ ⠠ ▌',
'▐ ⠂ ▌',
'▐ ⠈ ▌',
'▐ ⠂▌',
'▐ ⠠▌',
'▐ ⡀▌',
'▐ ⠠ ▌',
'▐ ⠂ ▌',
'▐ ⠈ ▌',
'▐ ⠂ ▌',
'▐ ⠠ ▌',
'▐ ⡀ ▌',
'▐ ⠠ ▌',
'▐ ⠂ ▌',
'▐ ⠈ ▌',
'▐ ⠂ ▌',
'▐ ⠠ ▌',
'▐ ⡀ ▌',
'▐⠠ ▌',
],
},
};
|
aredotna/case
|
ios/node_modules/cli-ux/lib/action/spinners.js
|
JavaScript
|
mit
| 8,949
|
package com.gulj.app.admin.config;
import com.gulj.entity.common.bo.JoinAnnotationBeanNameGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@PropertySource(value = "classpath:config/mybatis.properties")
@ComponentScan(basePackages = {"com.gulj.app.admin.biz.service"}, nameGenerator = JoinAnnotationBeanNameGenerator.class)
@MapperScan(basePackages = "com.gulj.app.admin.biz.mapper")
public class AdminBizConfig {
/* private final static Logger logger = LoggerFactory.getLogger(AdminBizConfig.class);
@Autowired
private DataSourceProperties dataSourceProperties;
@Bean
public String getStr() {
logger.info("++++加载的数据源信息 url:{}", dataSourceProperties.getUrl());
return "ok";
}*/
}
|
gulijian/joingu
|
gulj-app-admin-biz/src/main/java/com/gulj/app/admin/config/AdminBizConfig.java
|
Java
|
mit
| 952
|
<?php
namespace Kernel\Snmp;
use Kernel\Interfaces\OltInterface;
/**
* @ This class work with only zte olt
* @author Xeleniumz Fx
* @version 1.1
* @date 2/3/2017
* */
class Olt implements OltInterface
{
private $olt_name = '1.3.6.1.2.1.1.5.0';
private $snmp_get_octet = '1.3.6.1.2.1.2.2.1.1';
private $gpon_name ='1.3.6.1.2.1.2.2.1.2';
private $gpon_status = '1.3.6.1.2.1.2.2.1.8';
private $gpon_uptime = '1.3.6.1.2.1.1.3.0';
private $community = 'public';
public function __construct()
{
$this->olt_name = '1.3.6.1.2.1.1.5.0';
$this->snmp_get_octet = '1.3.6.1.2.1.2.2.1.1';
$this->gpon_name ='1.3.6.1.2.1.2.2.1.2';
$this->gpon_status = '1.3.6.1.2.1.2.2.1.8';
$this->gpon_uptime = '1.3.6.1.2.1.1.3.0';
$this->community = 'public';
}
public function getOltName($ip) :string
{
$name = snmpwalk($ip, $this->community, $this->olt_name);
return $name;
}
public function getOltId($ip) :int
{
$id = snmpwalk($ip, $this->community, $this->snmp_get_octet);
return $id;
}
public function getOltSolt($ip,$id) :array
{
$data = $this->gpon_name.'.'.$id;
$rs = snmpwalk($ip,$this->community,$data);
return $rs;
}
public function getOltStatus($ip,$id,$check=FALSE) :string
{
if($check == TRUE){
$data = $this->gpon_status.'.'.$id;
$rs = snmpwalk($ip,$this->community,$data);
$rs = explode(' ', $rs[0]);
return $rs[1];
}else{
$data = $this->gpon_status.'.'.$id;
$rs = snmpwalk($ip,$this->community,$data);
$rs = explode(' ', $rs[0]);
$res = ($rs[1] == '1') ? 'ONLINE':'OFFLINE';
return $res;
}
}
public function checkGpon($val) :string
{
$v = explode('"', $val);
$g = explode('_', $v[1]);
$rs['chk'] = ($g[0] == 'gpon') ? TRUE:FALSE;
$rs['gpon'] = $v[1];
return $rs;
}
public function getUptime($ip) :string
{
$uptime = snmpwalk($ip,$this->community,$this->gpon_uptime);
return $uptime;
}
}
|
xeleniumz/zte-libraries-php
|
Kernel/Snmp/Olt.php
|
PHP
|
mit
| 1,896
|
from ..operations import Operations
from .migration import MigrationContext
from .. import util
class EnvironmentContext(util.ModuleClsProxy):
"""A configurational facade made available in an ``env.py`` script.
The :class:`.EnvironmentContext` acts as a *facade* to the more
nuts-and-bolts objects of :class:`.MigrationContext` as well as certain
aspects of :class:`.Config`,
within the context of the ``env.py`` script that is invoked by
most Alembic commands.
:class:`.EnvironmentContext` is normally instantiated
when a command in :mod:`alembic.command` is run. It then makes
itself available in the ``alembic.context`` module for the scope
of the command. From within an ``env.py`` script, the current
:class:`.EnvironmentContext` is available by importing this module.
:class:`.EnvironmentContext` also supports programmatic usage.
At this level, it acts as a Python context manager, that is, is
intended to be used using the
``with:`` statement. A typical use of :class:`.EnvironmentContext`::
from alembic.config import Config
from alembic.script import ScriptDirectory
config = Config()
config.set_main_option("script_location", "myapp:migrations")
script = ScriptDirectory.from_config(config)
def my_function(rev, context):
'''do something with revision "rev", which
will be the current database revision,
and "context", which is the MigrationContext
that the env.py will create'''
with EnvironmentContext(
config,
script,
fn = my_function,
as_sql = False,
starting_rev = 'base',
destination_rev = 'head',
tag = "sometag"
):
script.run_env()
The above script will invoke the ``env.py`` script
within the migration environment. If and when ``env.py``
calls :meth:`.MigrationContext.run_migrations`, the
``my_function()`` function above will be called
by the :class:`.MigrationContext`, given the context
itself as well as the current revision in the database.
.. note::
For most API usages other than full blown
invocation of migration scripts, the :class:`.MigrationContext`
and :class:`.ScriptDirectory` objects can be created and
used directly. The :class:`.EnvironmentContext` object
is *only* needed when you need to actually invoke the
``env.py`` module present in the migration environment.
"""
_migration_context = None
config = None
"""An instance of :class:`.Config` representing the
configuration file contents as well as other variables
set programmatically within it."""
script = None
"""An instance of :class:`.ScriptDirectory` which provides
programmatic access to version files within the ``versions/``
directory.
"""
def __init__(self, config, script, **kw):
"""Construct a new :class:`.EnvironmentContext`.
:param config: a :class:`.Config` instance.
:param script: a :class:`.ScriptDirectory` instance.
:param \**kw: keyword options that will be ultimately
passed along to the :class:`.MigrationContext` when
:meth:`.EnvironmentContext.configure` is called.
"""
self.config = config
self.script = script
self.context_opts = kw
def __enter__(self):
"""Establish a context which provides a
:class:`.EnvironmentContext` object to
env.py scripts.
The :class:`.EnvironmentContext` will
be made available as ``from alembic import context``.
"""
self._install_proxy()
return self
def __exit__(self, *arg, **kw):
self._remove_proxy()
def is_offline_mode(self):
"""Return True if the current migrations environment
is running in "offline mode".
This is ``True`` or ``False`` depending
on the the ``--sql`` flag passed.
This function does not require that the :class:`.MigrationContext`
has been configured.
"""
return self.context_opts.get('as_sql', False)
def is_transactional_ddl(self):
"""Return True if the context is configured to expect a
transactional DDL capable backend.
This defaults to the type of database in use, and
can be overridden by the ``transactional_ddl`` argument
to :meth:`.configure`
This function requires that a :class:`.MigrationContext`
has first been made available via :meth:`.configure`.
"""
return self.get_context().impl.transactional_ddl
def requires_connection(self):
return not self.is_offline_mode()
def get_head_revision(self):
"""Return the hex identifier of the 'head' script revision.
If the script directory has multiple heads, this
method raises a :class:`.CommandError`;
:meth:`.EnvironmentContext.get_head_revisions` should be preferred.
This function does not require that the :class:`.MigrationContext`
has been configured.
.. seealso:: :meth:`.EnvironmentContext.get_head_revisions`
"""
return self.script.as_revision_number("head")
def get_head_revisions(self):
"""Return the hex identifier of the 'heads' script revision(s).
This returns a tuple containing the version number of all
heads in the script directory.
This function does not require that the :class:`.MigrationContext`
has been configured.
.. versionadded:: 0.7.0
"""
return self.script.as_revision_number("heads")
def get_starting_revision_argument(self):
"""Return the 'starting revision' argument,
if the revision was passed using ``start:end``.
This is only meaningful in "offline" mode.
Returns ``None`` if no value is available
or was configured.
This function does not require that the :class:`.MigrationContext`
has been configured.
"""
if self._migration_context is not None:
return self.script.as_revision_number(
self.get_context()._start_from_rev)
elif 'starting_rev' in self.context_opts:
return self.script.as_revision_number(
self.context_opts['starting_rev'])
else:
# this should raise only in the case that a command
# is being run where the "starting rev" is never applicable;
# this is to catch scripts which rely upon this in
# non-sql mode or similar
raise util.CommandError(
"No starting revision argument is available.")
def get_revision_argument(self):
"""Get the 'destination' revision argument.
This is typically the argument passed to the
``upgrade`` or ``downgrade`` command.
If it was specified as ``head``, the actual
version number is returned; if specified
as ``base``, ``None`` is returned.
This function does not require that the :class:`.MigrationContext`
has been configured.
"""
return self.script.as_revision_number(
self.context_opts['destination_rev'])
def get_tag_argument(self):
"""Return the value passed for the ``--tag`` argument, if any.
The ``--tag`` argument is not used directly by Alembic,
but is available for custom ``env.py`` configurations that
wish to use it; particularly for offline generation scripts
that wish to generate tagged filenames.
This function does not require that the :class:`.MigrationContext`
has been configured.
.. seealso::
:meth:`.EnvironmentContext.get_x_argument` - a newer and more
open ended system of extending ``env.py`` scripts via the command
line.
"""
return self.context_opts.get('tag', None)
def get_x_argument(self, as_dictionary=False):
"""Return the value(s) passed for the ``-x`` argument, if any.
The ``-x`` argument is an open ended flag that allows any user-defined
value or values to be passed on the command line, then available
here for consumption by a custom ``env.py`` script.
The return value is a list, returned directly from the ``argparse``
structure. If ``as_dictionary=True`` is passed, the ``x`` arguments
are parsed using ``key=value`` format into a dictionary that is
then returned.
For example, to support passing a database URL on the command line,
the standard ``env.py`` script can be modified like this::
cmd_line_url = context.get_x_argument(
as_dictionary=True).get('dbname')
if cmd_line_url:
engine = create_engine(cmd_line_url)
else:
engine = engine_from_config(
config.get_section(config.config_ini_section),
prefix='sqlalchemy.',
poolclass=pool.NullPool)
This then takes effect by running the ``alembic`` script as::
alembic -x dbname=postgresql://user:pass@host/dbname upgrade head
This function does not require that the :class:`.MigrationContext`
has been configured.
.. versionadded:: 0.6.0
.. seealso::
:meth:`.EnvironmentContext.get_tag_argument`
:attr:`.Config.cmd_opts`
"""
if self.config.cmd_opts is not None:
value = self.config.cmd_opts.x or []
else:
value = []
if as_dictionary:
value = dict(
arg.split('=', 1) for arg in value
)
return value
def configure(self,
connection=None,
url=None,
dialect_name=None,
transactional_ddl=None,
transaction_per_migration=False,
output_buffer=None,
starting_rev=None,
tag=None,
template_args=None,
render_as_batch=False,
target_metadata=None,
include_symbol=None,
include_object=None,
include_schemas=False,
process_revision_directives=None,
compare_type=False,
compare_server_default=False,
render_item=None,
literal_binds=False,
upgrade_token="upgrades",
downgrade_token="downgrades",
alembic_module_prefix="op.",
sqlalchemy_module_prefix="sa.",
user_module_prefix=None,
**kw
):
"""Configure a :class:`.MigrationContext` within this
:class:`.EnvironmentContext` which will provide database
connectivity and other configuration to a series of
migration scripts.
Many methods on :class:`.EnvironmentContext` require that
this method has been called in order to function, as they
ultimately need to have database access or at least access
to the dialect in use. Those which do are documented as such.
The important thing needed by :meth:`.configure` is a
means to determine what kind of database dialect is in use.
An actual connection to that database is needed only if
the :class:`.MigrationContext` is to be used in
"online" mode.
If the :meth:`.is_offline_mode` function returns ``True``,
then no connection is needed here. Otherwise, the
``connection`` parameter should be present as an
instance of :class:`sqlalchemy.engine.Connection`.
This function is typically called from the ``env.py``
script within a migration environment. It can be called
multiple times for an invocation. The most recent
:class:`~sqlalchemy.engine.Connection`
for which it was called is the one that will be operated upon
by the next call to :meth:`.run_migrations`.
General parameters:
:param connection: a :class:`~sqlalchemy.engine.Connection`
to use
for SQL execution in "online" mode. When present, is also
used to determine the type of dialect in use.
:param url: a string database url, or a
:class:`sqlalchemy.engine.url.URL` object.
The type of dialect to be used will be derived from this if
``connection`` is not passed.
:param dialect_name: string name of a dialect, such as
"postgresql", "mssql", etc.
The type of dialect to be used will be derived from this if
``connection`` and ``url`` are not passed.
:param transactional_ddl: Force the usage of "transactional"
DDL on or off;
this otherwise defaults to whether or not the dialect in
use supports it.
:param transaction_per_migration: if True, nest each migration script
in a transaction rather than the full series of migrations to
run.
.. versionadded:: 0.6.5
:param output_buffer: a file-like object that will be used
for textual output
when the ``--sql`` option is used to generate SQL scripts.
Defaults to
``sys.stdout`` if not passed here and also not present on
the :class:`.Config`
object. The value here overrides that of the :class:`.Config`
object.
:param output_encoding: when using ``--sql`` to generate SQL
scripts, apply this encoding to the string output.
:param literal_binds: when using ``--sql`` to generate SQL
scripts, pass through the ``literal_binds`` flag to the compiler
so that any literal values that would ordinarily be bound
parameters are converted to plain strings.
.. warning:: Dialects can typically only handle simple datatypes
like strings and numbers for auto-literal generation. Datatypes
like dates, intervals, and others may still require manual
formatting, typically using :meth:`.Operations.inline_literal`.
.. note:: the ``literal_binds`` flag is ignored on SQLAlchemy
versions prior to 0.8 where this feature is not supported.
.. versionadded:: 0.7.6
.. seealso::
:meth:`.Operations.inline_literal`
:param starting_rev: Override the "starting revision" argument
when using ``--sql`` mode.
:param tag: a string tag for usage by custom ``env.py`` scripts.
Set via the ``--tag`` option, can be overridden here.
:param template_args: dictionary of template arguments which
will be added to the template argument environment when
running the "revision" command. Note that the script environment
is only run within the "revision" command if the --autogenerate
option is used, or if the option "revision_environment=true"
is present in the alembic.ini file.
:param version_table: The name of the Alembic version table.
The default is ``'alembic_version'``.
:param version_table_schema: Optional schema to place version
table within.
Parameters specific to the autogenerate feature, when
``alembic revision`` is run with the ``--autogenerate`` feature:
:param target_metadata: a :class:`sqlalchemy.schema.MetaData`
object that
will be consulted during autogeneration. The tables present
will be compared against
what is locally available on the target
:class:`~sqlalchemy.engine.Connection`
to produce candidate upgrade/downgrade operations.
:param compare_type: Indicates type comparison behavior during
an autogenerate
operation. Defaults to ``False`` which disables type
comparison. Set to
``True`` to turn on default type comparison, which has varied
accuracy depending on backend. See :ref:`compare_types`
for an example as well as information on other type
comparison options.
.. seealso::
:ref:`compare_types`
:paramref:`.EnvironmentContext.configure.compare_server_default`
:param compare_server_default: Indicates server default comparison
behavior during
an autogenerate operation. Defaults to ``False`` which disables
server default
comparison. Set to ``True`` to turn on server default comparison,
which has
varied accuracy depending on backend.
To customize server default comparison behavior, a callable may
be specified
which can filter server default comparisons during an
autogenerate operation.
defaults during an autogenerate operation. The format of this
callable is::
def my_compare_server_default(context, inspected_column,
metadata_column, inspected_default, metadata_default,
rendered_metadata_default):
# return True if the defaults are different,
# False if not, or None to allow the default implementation
# to compare these defaults
return None
context.configure(
# ...
compare_server_default = my_compare_server_default
)
``inspected_column`` is a dictionary structure as returned by
:meth:`sqlalchemy.engine.reflection.Inspector.get_columns`, whereas
``metadata_column`` is a :class:`sqlalchemy.schema.Column` from
the local model environment.
A return value of ``None`` indicates to allow default server default
comparison
to proceed. Note that some backends such as Postgresql actually
execute
the two defaults on the database side to compare for equivalence.
.. seealso::
:paramref:`.EnvironmentContext.configure.compare_type`
:param include_object: A callable function which is given
the chance to return ``True`` or ``False`` for any object,
indicating if the given object should be considered in the
autogenerate sweep.
The function accepts the following positional arguments:
* ``object``: a :class:`~sqlalchemy.schema.SchemaItem` object such
as a :class:`~sqlalchemy.schema.Table`,
:class:`~sqlalchemy.schema.Column`,
:class:`~sqlalchemy.schema.Index`
:class:`~sqlalchemy.schema.UniqueConstraint`,
or :class:`~sqlalchemy.schema.ForeignKeyConstraint` object
* ``name``: the name of the object. This is typically available
via ``object.name``.
* ``type``: a string describing the type of object; currently
``"table"``, ``"column"``, ``"index"``, ``"unique_constraint"``,
or ``"foreign_key_constraint"``
.. versionadded:: 0.7.0 Support for indexes and unique constraints
within the
:paramref:`~.EnvironmentContext.configure.include_object` hook.
.. versionadded:: 0.7.1 Support for foreign keys within the
:paramref:`~.EnvironmentContext.configure.include_object` hook.
* ``reflected``: ``True`` if the given object was produced based on
table reflection, ``False`` if it's from a local :class:`.MetaData`
object.
* ``compare_to``: the object being compared against, if available,
else ``None``.
E.g.::
def include_object(object, name, type_, reflected, compare_to):
if (type_ == "column" and
not reflected and
object.info.get("skip_autogenerate", False)):
return False
else:
return True
context.configure(
# ...
include_object = include_object
)
:paramref:`.EnvironmentContext.configure.include_object` can also
be used to filter on specific schemas to include or omit, when
the :paramref:`.EnvironmentContext.configure.include_schemas`
flag is set to ``True``. The :attr:`.Table.schema` attribute
on each :class:`.Table` object reflected will indicate the name of the
schema from which the :class:`.Table` originates.
.. versionadded:: 0.6.0
.. seealso::
:paramref:`.EnvironmentContext.configure.include_schemas`
:param include_symbol: A callable function which, given a table name
and schema name (may be ``None``), returns ``True`` or ``False``,
indicating if the given table should be considered in the
autogenerate sweep.
.. deprecated:: 0.6.0
:paramref:`.EnvironmentContext.configure.include_symbol`
is superceded by the more generic
:paramref:`.EnvironmentContext.configure.include_object`
parameter.
E.g.::
def include_symbol(tablename, schema):
return tablename not in ("skip_table_one", "skip_table_two")
context.configure(
# ...
include_symbol = include_symbol
)
.. seealso::
:paramref:`.EnvironmentContext.configure.include_schemas`
:paramref:`.EnvironmentContext.configure.include_object`
:param render_as_batch: if True, commands which alter elements
within a table will be placed under a ``with batch_alter_table():``
directive, so that batch migrations will take place.
.. versionadded:: 0.7.0
.. seealso::
:ref:`batch_migrations`
:param include_schemas: If True, autogenerate will scan across
all schemas located by the SQLAlchemy
:meth:`~sqlalchemy.engine.reflection.Inspector.get_schema_names`
method, and include all differences in tables found across all
those schemas. When using this option, you may want to also
use the :paramref:`.EnvironmentContext.configure.include_object`
option to specify a callable which
can filter the tables/schemas that get included.
.. seealso::
:paramref:`.EnvironmentContext.configure.include_object`
:param render_item: Callable that can be used to override how
any schema item, i.e. column, constraint, type,
etc., is rendered for autogenerate. The callable receives a
string describing the type of object, the object, and
the autogen context. If it returns False, the
default rendering method will be used. If it returns None,
the item will not be rendered in the context of a Table
construct, that is, can be used to skip columns or constraints
within op.create_table()::
def my_render_column(type_, col, autogen_context):
if type_ == "column" and isinstance(col, MySpecialCol):
return repr(col)
else:
return False
context.configure(
# ...
render_item = my_render_column
)
Available values for the type string include: ``"column"``,
``"primary_key"``, ``"foreign_key"``, ``"unique"``, ``"check"``,
``"type"``, ``"server_default"``.
.. seealso::
:ref:`autogen_render_types`
:param upgrade_token: When autogenerate completes, the text of the
candidate upgrade operations will be present in this template
variable when ``script.py.mako`` is rendered. Defaults to
``upgrades``.
:param downgrade_token: When autogenerate completes, the text of the
candidate downgrade operations will be present in this
template variable when ``script.py.mako`` is rendered. Defaults to
``downgrades``.
:param alembic_module_prefix: When autogenerate refers to Alembic
:mod:`alembic.operations` constructs, this prefix will be used
(i.e. ``op.create_table``) Defaults to "``op.``".
Can be ``None`` to indicate no prefix.
:param sqlalchemy_module_prefix: When autogenerate refers to
SQLAlchemy
:class:`~sqlalchemy.schema.Column` or type classes, this prefix
will be used
(i.e. ``sa.Column("somename", sa.Integer)``) Defaults to "``sa.``".
Can be ``None`` to indicate no prefix.
Note that when dialect-specific types are rendered, autogenerate
will render them using the dialect module name, i.e. ``mssql.BIT()``,
``postgresql.UUID()``.
:param user_module_prefix: When autogenerate refers to a SQLAlchemy
type (e.g. :class:`.TypeEngine`) where the module name is not
under the ``sqlalchemy`` namespace, this prefix will be used
within autogenerate. If left at its default of
``None``, the ``__module__`` attribute of the type is used to
render the import module. It's a good practice to set this
and to have all custom types be available from a fixed module space,
in order to future-proof migration files against reorganizations
in modules.
.. versionchanged:: 0.7.0
:paramref:`.EnvironmentContext.configure.user_module_prefix`
no longer defaults to the value of
:paramref:`.EnvironmentContext.configure.sqlalchemy_module_prefix`
when left at ``None``; the ``__module__`` attribute is now used.
.. versionadded:: 0.6.3 added
:paramref:`.EnvironmentContext.configure.user_module_prefix`
.. seealso::
:ref:`autogen_module_prefix`
:param process_revision_directives: a callable function that will
be passed a structure representing the end result of an autogenerate
or plain "revision" operation, which can be manipulated to affect
how the ``alembic revision`` command ultimately outputs new
revision scripts. The structure of the callable is::
def process_revision_directives(context, revision, directives):
pass
The ``directives`` parameter is a Python list containing
a single :class:`.MigrationScript` directive, which represents
the revision file to be generated. This list as well as its
contents may be freely modified to produce any set of commands.
The section :ref:`customizing_revision` shows an example of
doing this. The ``context`` parameter is the
:class:`.MigrationContext` in use,
and ``revision`` is a tuple of revision identifiers representing the
current revision of the database.
The callable is invoked at all times when the ``--autogenerate``
option is passed to ``alembic revision``. If ``--autogenerate``
is not passed, the callable is invoked only if the
``revision_environment`` variable is set to True in the Alembic
configuration, in which case the given ``directives`` collection
will contain empty :class:`.UpgradeOps` and :class:`.DowngradeOps`
collections for ``.upgrade_ops`` and ``.downgrade_ops``. The
``--autogenerate`` option itself can be inferred by inspecting
``context.config.cmd_opts.autogenerate``.
The callable function may optionally be an instance of
a :class:`.Rewriter` object. This is a helper object that
assists in the production of autogenerate-stream rewriter functions.
.. versionadded:: 0.8.0
.. seealso::
:ref:`customizing_revision`
:ref:`autogen_rewriter`
Parameters specific to individual backends:
:param mssql_batch_separator: The "batch separator" which will
be placed between each statement when generating offline SQL Server
migrations. Defaults to ``GO``. Note this is in addition to the
customary semicolon ``;`` at the end of each statement; SQL Server
considers the "batch separator" to denote the end of an
individual statement execution, and cannot group certain
dependent operations in one step.
:param oracle_batch_separator: The "batch separator" which will
be placed between each statement when generating offline
Oracle migrations. Defaults to ``/``. Oracle doesn't add a
semicolon between statements like most other backends.
"""
opts = self.context_opts
if transactional_ddl is not None:
opts["transactional_ddl"] = transactional_ddl
if output_buffer is not None:
opts["output_buffer"] = output_buffer
elif self.config.output_buffer is not None:
opts["output_buffer"] = self.config.output_buffer
if starting_rev:
opts['starting_rev'] = starting_rev
if tag:
opts['tag'] = tag
if template_args and 'template_args' in opts:
opts['template_args'].update(template_args)
opts["transaction_per_migration"] = transaction_per_migration
opts['target_metadata'] = target_metadata
opts['include_symbol'] = include_symbol
opts['include_object'] = include_object
opts['include_schemas'] = include_schemas
opts['render_as_batch'] = render_as_batch
opts['upgrade_token'] = upgrade_token
opts['downgrade_token'] = downgrade_token
opts['sqlalchemy_module_prefix'] = sqlalchemy_module_prefix
opts['alembic_module_prefix'] = alembic_module_prefix
opts['user_module_prefix'] = user_module_prefix
opts['literal_binds'] = literal_binds
opts['process_revision_directives'] = process_revision_directives
if render_item is not None:
opts['render_item'] = render_item
if compare_type is not None:
opts['compare_type'] = compare_type
if compare_server_default is not None:
opts['compare_server_default'] = compare_server_default
opts['script'] = self.script
opts.update(kw)
self._migration_context = MigrationContext.configure(
connection=connection,
url=url,
dialect_name=dialect_name,
environment_context=self,
opts=opts
)
def run_migrations(self, **kw):
"""Run migrations as determined by the current command line
configuration
as well as versioning information present (or not) in the current
database connection (if one is present).
The function accepts optional ``**kw`` arguments. If these are
passed, they are sent directly to the ``upgrade()`` and
``downgrade()``
functions within each target revision file. By modifying the
``script.py.mako`` file so that the ``upgrade()`` and ``downgrade()``
functions accept arguments, parameters can be passed here so that
contextual information, usually information to identify a particular
database in use, can be passed from a custom ``env.py`` script
to the migration functions.
This function requires that a :class:`.MigrationContext` has
first been made available via :meth:`.configure`.
"""
with Operations.context(self._migration_context):
self.get_context().run_migrations(**kw)
def execute(self, sql, execution_options=None):
"""Execute the given SQL using the current change context.
The behavior of :meth:`.execute` is the same
as that of :meth:`.Operations.execute`. Please see that
function's documentation for full detail including
caveats and limitations.
This function requires that a :class:`.MigrationContext` has
first been made available via :meth:`.configure`.
"""
self.get_context().execute(sql,
execution_options=execution_options)
def static_output(self, text):
"""Emit text directly to the "offline" SQL stream.
Typically this is for emitting comments that
start with --. The statement is not treated
as a SQL execution, no ; or batch separator
is added, etc.
"""
self.get_context().impl.static_output(text)
def begin_transaction(self):
"""Return a context manager that will
enclose an operation within a "transaction",
as defined by the environment's offline
and transactional DDL settings.
e.g.::
with context.begin_transaction():
context.run_migrations()
:meth:`.begin_transaction` is intended to
"do the right thing" regardless of
calling context:
* If :meth:`.is_transactional_ddl` is ``False``,
returns a "do nothing" context manager
which otherwise produces no transactional
state or directives.
* If :meth:`.is_offline_mode` is ``True``,
returns a context manager that will
invoke the :meth:`.DefaultImpl.emit_begin`
and :meth:`.DefaultImpl.emit_commit`
methods, which will produce the string
directives ``BEGIN`` and ``COMMIT`` on
the output stream, as rendered by the
target backend (e.g. SQL Server would
emit ``BEGIN TRANSACTION``).
* Otherwise, calls :meth:`sqlalchemy.engine.Connection.begin`
on the current online connection, which
returns a :class:`sqlalchemy.engine.Transaction`
object. This object demarcates a real
transaction and is itself a context manager,
which will roll back if an exception
is raised.
Note that a custom ``env.py`` script which
has more specific transactional needs can of course
manipulate the :class:`~sqlalchemy.engine.Connection`
directly to produce transactional state in "online"
mode.
"""
return self.get_context().begin_transaction()
def get_context(self):
"""Return the current :class:`.MigrationContext` object.
If :meth:`.EnvironmentContext.configure` has not been
called yet, raises an exception.
"""
if self._migration_context is None:
raise Exception("No context has been configured yet.")
return self._migration_context
def get_bind(self):
"""Return the current 'bind'.
In "online" mode, this is the
:class:`sqlalchemy.engine.Connection` currently being used
to emit SQL to the database.
This function requires that a :class:`.MigrationContext`
has first been made available via :meth:`.configure`.
"""
return self.get_context().bind
def get_impl(self):
return self.get_context().impl
|
graingert/alembic
|
alembic/runtime/environment.py
|
Python
|
mit
| 35,396
|
<?php
echo "This feature is under construction";
?>
|
mjcurry/LinkStor
|
directory.php
|
PHP
|
mit
| 53
|
using Leak.Common;
namespace Leak.Listener
{
public class PeerListenerHandshake
{
private readonly Handshake handshake;
public PeerListenerHandshake(Handshake handshake)
{
this.handshake = handshake;
}
public bool HasExtensions
{
get { return handshake.Options.HasFlag(HandshakeOptions.Extended); }
}
}
}
|
amacal/leak
|
sources/Leak.Listener/PeerListenerHandshake.cs
|
C#
|
mit
| 402
|
RSpec.describe CharactersController do
include ActiveJob::TestHelper
describe "GET index" do
let(:user) { create(:user) }
it "requires login without an id" do
get :index
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "requires valid id" do
get :index, params: { user_id: -1 }
expect(response).to redirect_to(users_url)
expect(flash[:error]).to eq("User could not be found.")
end
it "succeeds with an id" do
get :index, params: { user_id: user.id }
expect(response.status).to eq(200)
end
it "succeeds when logged in" do
login
get :index
expect(response.status).to eq(200)
end
it "succeeds with an id when logged in" do
login
get :index, params: { user_id: user.id }
expect(response.status).to eq(200)
end
it "succeeds with character group" do
group = create(:character_group, user: user)
create_list(:character, 3, character_group: group, user: user)
get :index, params: { user_id: user.id, group_id: group.id }
expect(response.status).to eq(200)
end
context "with render_views" do
render_views
it "successfully renders the page in template group" do
character = create(:character)
create(:template_character, user: character.user) # character2
get :index, params: { user_id: character.user_id, character_split: 'template' }
expect(response.status).to eq(200)
end
it "successfully renders the page with no group" do
character = create(:character)
create(:template_character, user: character.user) # character2
get :index, params: { user_id: character.user_id, character_split: 'none' }
expect(response.status).to eq(200)
end
it "skips retired characters when specified" do
character = create(:character, name: 'ExistingCharacter')
create(:character, user: character.user, retired: true, name: 'RetiredCharacter')
get :index, params: { user_id: character.user_id, retired: 'false' }
expect(response.body).to include('ExistingCharacter')
expect(response.body).not_to include('RetiredCharacter')
end
end
end
describe "GET new" do
it "requires login" do
get :new
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "succeeds when logged in" do
login
get :new
expect(response.status).to eq(200)
end
it "sets correct variables with template_id" do
template = create(:template)
login_as(template.user)
get :new, params: { template_id: template.id }
expect(response.status).to eq(200)
expect(assigns(:character).template).to eq(template)
end
context "with views" do
render_views
it "sets correct variables" do
user = create(:user)
templates = Array.new(2) { create(:template, user: user) }
create(:template)
login_as(user)
get :new
expect(assigns(:page_title)).to eq("New Character")
expect(assigns(:templates).map(&:name)).to match_array(templates.map(&:name))
expect(controller.gon.character_id).to eq('')
expect(controller.gon.user_id).to eq(user.id)
expect(controller.gon.gallery_groups).to eq([])
expect(assigns(:aliases)).to be_blank
end
end
end
describe "POST create" do
it "requires login" do
post :create
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "fails with missing params" do
login
post :create
expect(response.status).to eq(200)
expect(flash[:error][:message]).to eq("Your character could not be saved.")
end
it "fails with invalid params" do
login
post :create, params: { character: {} }
expect(response.status).to eq(200)
expect(flash[:error][:message]).to eq("Your character could not be saved.")
end
it "succeeds when valid" do
expect(Character.count).to eq(0)
test_name = 'Test character'
user = create(:user)
template = create(:template, user: user)
gallery = create(:gallery, user: user)
setting = create(:setting, user: user, name: 'A World')
login_as(user)
post :create, params: {
character: {
name: test_name,
nickname: 'TempName',
screenname: 'just-a-test',
setting_ids: [setting.id],
template_id: template.id,
pb: 'Facecast',
description: 'Desc',
ungrouped_gallery_ids: [gallery.id],
},
}
expect(response).to redirect_to(assigns(:character))
expect(flash[:success]).to eq("Character saved successfully.")
expect(Character.count).to eq(1)
character = assigns(:character).reload
expect(character.name).to eq(test_name)
expect(character.user_id).to eq(user.id)
expect(character.nickname).to eq('TempName')
expect(character.screenname).to eq('just-a-test')
expect(character.settings.pluck(:name)).to eq(['A World'])
expect(character.template).to eq(template)
expect(character.pb).to eq('Facecast')
expect(character.description).to eq('Desc')
expect(character.galleries).to match_array([gallery])
end
it "creates new templates when specified" do
expect(Template.count).to eq(0)
login
post :create, params: {
new_template: '1',
character: {
template_attributes: {
name: 'TemplateTest',
},
name: 'Test',
},
}
expect(Template.count).to eq(1)
expect(Template.first.name).to eq('TemplateTest')
expect(assigns(:character).template_id).to eq(Template.first.id)
end
context "with views" do
render_views
it "sets correct variables when invalid" do
user = create(:user)
gallery = create(:gallery, user: user)
group = create(:gallery_group)
group_gallery = create(:gallery, user: user, gallery_groups: [group])
templates = Array.new(2) { create(:template, user: user) }
create(:template)
login_as(user)
post :create, params: {
character: {
ungrouped_gallery_ids: [gallery.id, group_gallery.id],
gallery_group_ids: [group.id],
},
}
expect(response).to render_template(:new)
expect(controller.gon.character_id).to eq('')
expect(assigns(:templates).map(&:name)).to match_array(templates.map(&:name))
expect(assigns(:character).ungrouped_gallery_ids).to match_array([gallery.id, group_gallery.id])
expect(assigns(:character).gallery_group_ids).to eq([group.id])
end
end
end
describe "GET show" do
it "requires valid character logged out" do
get :show, params: { id: -1 }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("Character could not be found.")
end
it "requires valid character logged in" do
user_id = login
get :show, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("Character could not be found.")
end
it "should succeed when logged out" do
character = create(:character)
get :show, params: { id: character.id }
expect(response.status).to eq(200)
end
it "should succeed when logged in" do
character = create(:character)
login
get :show, params: { id: character.id }
expect(response.status).to eq(200)
end
it "should set correct variables" do
character = create(:character)
Array.new(26) { create(:post, character: character, user: character.user) }
get :show, params: { id: character.id }
expect(response.status).to eq(200)
expect(assigns(:page_title)).to eq(character.name)
expect(assigns(:posts).size).to eq(25)
expect(assigns(:posts)).to match_array(Post.where(character_id: character.id).ordered.limit(25))
end
it "should only show visible posts" do
character = create(:character)
create(:post, character: character, user: character.user, privacy: :private)
get :show, params: { id: character.id }
expect(assigns(:posts)).to be_blank
end
it "orders recent posts" do
character = create(:character)
post3 = create(:post)
post1 = create(:post, user: character.user, character: character)
post4 = create(:post, user: character.user, character: character)
post2 = create(:post)
create(:reply, post: post4)
create(:reply, post: post3, user: character.user, character: character)
create(:reply, post: post2, user: character.user, character: character)
create(:reply, post: post1)
get :show, params: { id: character.id }
expect(assigns(:posts)).to eq([post1, post2, post3, post4])
end
it "calculates OpenGraph meta for basic character" do
user = create(:user, username: 'John Doe')
character = create(:character,
user: user,
name: "Alice",
screenname: "player_one",
description: "Alice is a character",
)
get :show, params: { id: character.id }
meta_og = assigns(:meta_og)
expect(meta_og.keys).to match_array([:url, :title, :description])
expect(meta_og[:url]).to eq(character_url(character))
expect(meta_og[:title]).to eq('John Doe » Alice | player_one')
expect(meta_og[:description]).to eq("Alice is a character")
end
it "calculates OpenGraph meta for expanded character" do
user = create(:user, username: 'John Doe')
character = create(:character,
user: user,
template: create(:template, name: "A"),
name: "Alice",
nickname: "Lis",
screenname: "player_one",
settings: [
create(:setting, name: 'Infosec'),
create(:setting, name: 'Wander'),
],
description: "Alice is a character",
with_default_icon: true,
)
create(:alias, character: character, name: "Alicia")
create(:post, character: character, user: user)
create(:reply, character: character, user: user)
get :show, params: { id: character.id }
meta_og = assigns(:meta_og)
expect(meta_og.keys).to match_array([:url, :title, :description, :image])
expect(meta_og[:url]).to eq(character_url(character))
expect(meta_og[:title]).to eq('John Doe » A » Alice | player_one')
expect(meta_og[:description]).to eq("Nicknames: Lis, Alicia. Settings: Infosec, Wander\nAlice is a character\n2 posts")
expect(meta_og[:image].keys).to match_array([:src, :width, :height])
expect(meta_og[:image][:src]).to eq(character.default_icon.url)
expect(meta_og[:image][:height]).to eq('75')
expect(meta_og[:image][:width]).to eq('75')
end
end
describe "GET edit" do
it "requires login" do
get :edit, params: { id: -1 }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "requires valid character id" do
user_id = login
get :edit, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("Character could not be found.")
end
it "requires character with permissions" do
user_id = login
get :edit, params: { id: create(:character).id }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("You do not have permission to edit that character.")
end
it "succeeds when logged in" do
character = create(:character)
login_as(character.user)
get :edit, params: { id: character.id }
expect(response.status).to eq(200)
end
context "with views" do
render_views
it "sets correct variables" do
user = create(:user)
group = create(:gallery_group)
gallery = create(:gallery, user: user, gallery_groups: [group])
character = create(:character, user: user, gallery_groups: [group])
calias = create(:alias, character: character)
templates = Array.new(2) { create(:template, user: user) }
create(:template)
login_as(user)
get :edit, params: { id: character.id }
expect(assigns(:page_title)).to eq("Edit Character: #{character.name}")
expect(controller.gon.character_id).to eq(character.id)
expect(controller.gon.user_id).to eq(user.id)
expect(controller.gon.gallery_groups.pluck(:id)).to eq([group.id])
expect(controller.gon.gallery_groups.pluck(:gallery_ids)).to eq([[gallery.id]])
expect(assigns(:character).gallery_groups).to match_array([group])
expect(assigns(:templates).map(&:name)).to match_array(templates.map(&:name))
expect(assigns(:aliases)).to match_array([calias])
end
it "works for moderator with untemplated character" do
user = create(:mod_user)
login_as(user)
character = create(:character)
template = create(:template, user: character.user)
get :edit, params: { id: character.id }
expect(assigns(:page_title)).to eq("Edit Character: #{character.name}")
expect(controller.gon.character_id).to eq(character.id)
expect(controller.gon.user_id).to eq(character.user.id)
expect(assigns(:templates)).to match_array([template])
end
it "works for moderator with templated character" do
user = create(:mod_user)
login_as(user)
character = create(:template_character)
template = create(:template, user: character.user)
get :edit, params: { id: character.id }
expect(assigns(:page_title)).to eq("Edit Character: #{character.name}")
expect(controller.gon.character_id).to eq(character.id)
expect(controller.gon.user_id).to eq(character.user.id)
expect(assigns(:templates)).to match_array([character.template, template])
end
end
end
describe "PUT update" do
it "requires login" do
put :update, params: { id: -1 }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "requires valid character id" do
user_id = login
put :update, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("Character could not be found.")
end
it "requires character with permissions" do
user_id = login
put :update, params: { id: create(:character).id }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("You do not have permission to edit that character.")
end
it "fails with invalid params" do
character = create(:character)
login_as(character.user)
put :update, params: { id: character.id, character: { name: '' } }
expect(response.status).to eq(200)
expect(flash[:error][:message]).to eq("Your character could not be saved.")
end
it "fails with invalid template params" do
character = create(:character)
login_as(character.user)
new_name = character.name + 'aaa'
put :update, params: {
id: character.id,
new_template: '1',
character: {
template_attributes: { name: '' },
name: new_name,
},
}
expect(response.status).to eq(200)
expect(flash[:error][:message]).to eq("Your character could not be saved.")
expect(character.reload.name).not_to eq(new_name)
end
it "requires notes from moderators" do
character = create(:character, name: 'a')
login_as(create(:mod_user))
put :update, params: { id: character.id, character: { name: 'b' } }
expect(response).to render_template(:edit)
expect(flash[:error]).to eq('You must provide a reason for your moderator edit.')
end
it "stores note from moderators" do
Character.auditing_enabled = true
character = create(:character, name: 'a')
admin = create(:admin_user)
login_as(admin)
put :update, params: { id: character.id, character: { name: 'b', audit_comment: 'note' } }
expect(flash[:success]).to eq("Character saved successfully.")
expect(character.reload.name).to eq('b')
expect(character.audits.last.comment).to eq('note')
Character.auditing_enabled = false
end
it "succeeds when valid" do
character = create(:character)
user = character.user
login_as(user)
new_name = character.name + 'aaa'
template = create(:template, user: user)
gallery = create(:gallery, user: user)
setting = create(:setting, name: 'Another World')
put :update, params: {
id: character.id,
character: {
name: new_name,
nickname: 'TemplateName',
screenname: 'a-new-test',
setting_ids: [setting.id],
template_id: template.id,
pb: 'Actor',
description: 'Description',
ungrouped_gallery_ids: [gallery.id],
},
}
expect(response).to redirect_to(assigns(:character))
expect(flash[:success]).to eq("Character saved successfully.")
character.reload
expect(character.name).to eq(new_name)
expect(character.nickname).to eq('TemplateName')
expect(character.screenname).to eq('a-new-test')
expect(character.settings.pluck(:name)).to eq(['Another World'])
expect(character.template).to eq(template)
expect(character.pb).to eq('Actor')
expect(character.description).to eq('Description')
expect(character.galleries).to match_array([gallery])
end
it "does not persist values when invalid" do
character = create(:character)
user = character.user
login_as(user)
old_name = character.name
template = create(:template, user: user)
gallery = create(:gallery, user: user)
setting = create(:setting, name: 'Another World')
put :update, params: {
id: character.id,
character: {
name: '',
nickname: 'TemplateName',
screenname: 'a-new-test',
setting_ids: [setting.id],
template_id: template.id,
pb: 'Actor',
description: 'Description',
ungrouped_gallery_ids: [gallery.id],
},
}
expect(response.status).to eq(200)
expect(flash[:error][:message]).to eq("Your character could not be saved.")
character.reload
expect(character.name).to eq(old_name)
expect(character.nickname).to be_nil
expect(character.screenname).to be_nil
expect(character.settings).to be_blank
expect(character.template).to be_blank
expect(character.pb).to be_nil
expect(character.description).to be_nil
expect(character.galleries).to be_blank
end
it "adds galleries by groups" do
user = create(:user)
group = create(:gallery_group)
gallery = create(:gallery, gallery_groups: [group], user: user)
character = create(:character, user: user)
login_as(user)
put :update, params: { id: character.id, character: { gallery_group_ids: [group.id] } }
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to match_array([group])
expect(character.galleries).to match_array([gallery])
expect(character.ungrouped_gallery_ids).to be_blank
expect(character.characters_galleries.first).to be_added_by_group
end
it "creates new templates when specified" do
expect(Template.count).to eq(0)
character = create(:character)
login_as(character.user)
put :update, params: { id: character.id, new_template: '1', character: { template_attributes: { name: 'Test' } } }
expect(Template.count).to eq(1)
expect(Template.first.name).to eq('Test')
expect(character.reload.template_id).to eq(Template.first.id)
end
it "removes gallery only if not shared between groups" do
user = create(:user)
group1 = create(:gallery_group) # gallery1
group2 = create(:gallery_group) # -> gallery1
group3 = create(:gallery_group) # gallery2 ->
group4 = create(:gallery_group) # gallery2
gallery1 = create(:gallery, gallery_groups: [group1, group2], user: user)
gallery2 = create(:gallery, gallery_groups: [group3, group4], user: user)
character = create(:character, gallery_groups: [group1, group3, group4], user: user)
login_as(user)
put :update, params: { id: character.id, character: { gallery_group_ids: [group2.id, group4.id] } }
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to match_array([group2, group4])
expect(character.galleries).to match_array([gallery1, gallery2])
expect(character.ungrouped_gallery_ids).to be_blank
expect(character.characters_galleries.map(&:added_by_group)).to eq([true, true])
end
it "does not remove gallery if tethered by group" do
user = create(:user)
group = create(:gallery_group)
gallery = create(:gallery, gallery_groups: [group], user: user)
character = create(:character, gallery_groups: [group], user: user)
character.ungrouped_gallery_ids = [gallery.id]
character.save!
expect(character.characters_galleries.first).not_to be_added_by_group
login_as(user)
put :update, params: {
id: character.id,
character: {
ungrouped_gallery_ids: [''],
gallery_group_ids: [group.id],
},
}
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to match_array([group])
expect(character.galleries).to match_array([gallery])
expect(character.ungrouped_gallery_ids).to be_blank
expect(character.characters_galleries.first).to be_added_by_group
end
it "works when adding both group and gallery" do
user = create(:user)
group = create(:gallery_group)
gallery = create(:gallery, gallery_groups: [group], user: user)
character = create(:character, user: user)
login_as(user)
put :update, params: {
id: character.id,
character: {
gallery_group_ids: [group.id],
ungrouped_gallery_ids: [gallery.id],
},
}
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to match_array([group])
expect(character.galleries).to match_array([gallery])
expect(character.ungrouped_gallery_ids).to eq([gallery.id])
expect(character.characters_galleries.first).not_to be_added_by_group
end
it "does not add another user's galleries" do
group = create(:gallery_group)
create(:gallery, gallery_groups: [group]) # gallery
character = create(:character)
login_as(character.user)
put :update, params: { id: character.id, character: { gallery_group_ids: [group.id] } }
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to match_array([group])
expect(character.galleries).to be_blank
end
it "removes untethered galleries when group goes" do
user = create(:user)
group = create(:gallery_group)
create(:gallery, gallery_groups: [group], user: user) # gallery
character = create(:character, gallery_groups: [group], user: user)
login_as(user)
put :update, params: { id: character.id, character: { gallery_group_ids: [''] } }
expect(flash[:success]).to eq('Character saved successfully.')
character.reload
expect(character.gallery_groups).to eq([])
expect(character.galleries).to eq([])
end
context "with views" do
render_views
it "sets correct variables when invalid" do
user = create(:user)
group = create(:gallery_group)
gallery = create(:gallery, user: user, gallery_groups: [group])
character = create(:character, user: user, gallery_groups: [group])
templates = Array.new(2) { create(:template, user: user) }
create(:template)
login_as(user)
put :update, params: { id: character.id, character: { name: '', gallery_group_ids: [group.id] } }
expect(response).to render_template(:edit)
expect(controller.gon.character_id).to eq(character.id)
expect(controller.gon.user_id).to eq(user.id)
expect(controller.gon.gallery_groups.pluck(:id)).to eq([group.id])
expect(controller.gon.gallery_groups.pluck(:gallery_ids)).to eq([[gallery.id]])
expect(assigns(:character).gallery_groups).to match_array([group])
expect(assigns(:templates).map(&:name)).to match_array(templates.map(&:name))
end
end
it "reorders galleries as necessary" do
character = create(:character)
g1 = create(:gallery, user: character.user)
g2 = create(:gallery, user: character.user)
character.galleries << g1
character.galleries << g2
g1_cg = CharactersGallery.where(gallery_id: g1.id).first
g2_cg = CharactersGallery.where(gallery_id: g2.id).first
expect(g1_cg.section_order).to eq(0)
expect(g2_cg.section_order).to eq(1)
login_as(character.user)
put :update, params: { id: character.id, character: { ungrouped_gallery_ids: [g2.id.to_s] } }
expect(character.reload.galleries.pluck(:id)).to eq([g2.id])
expect(g2_cg.reload.section_order).to eq(0)
end
it "orders settings by default" do
char = create(:character)
login_as(char.user)
setting1 = create(:setting)
setting3 = create(:setting)
setting2 = create(:setting)
put :update, params: {
id: char.id,
character: { setting_ids: [setting1, setting2, setting3].map(&:id) },
}
expect(flash[:success]).to eq('Character saved successfully.')
expect(char.settings).to eq([setting1, setting2, setting3])
end
it "orders gallery groups by default" do
user = create(:user)
login_as(user)
char = create(:character, user: user)
group4 = create(:gallery_group, user: user)
group1 = create(:gallery_group, user: user)
group3 = create(:gallery_group, user: user)
group2 = create(:gallery_group, user: user)
put :update, params: {
id: char.id,
character: { gallery_group_ids: [group1, group2, group3, group4].map(&:id) },
}
expect(flash[:success]).to eq('Character saved successfully.')
expect(char.gallery_groups).to eq([group1, group2, group3, group4])
end
end
describe "GET facecasts" do
it "does not require login" do
get :facecasts
expect(response.status).to eq(200)
expect(assigns(:page_title)).to eq("Facecasts")
end
it "sets correct variables for facecast name sort" do
chars = Array.new(3) { create(:character, pb: SecureRandom.urlsafe_base64) }
get :facecasts
pbs = assigns(:pbs).map(&:pb)
expect(pbs).to match_array(chars.map(&:pb))
end
it "sets correct variables for character name sort: character only" do
chars = Array.new(3) { create(:character, pb: SecureRandom.urlsafe_base64) }
get :facecasts, params: { sort: 'name' }
names = assigns(:pbs).map(&:item_name)
expect(names).to match_array(chars.map(&:name))
end
it "sets correct variables for character name sort: template only" do
chars = Array.new(3) { create(:template_character, pb: SecureRandom.urlsafe_base64) }
get :facecasts, params: { sort: 'name' }
names = assigns(:pbs).map(&:item_name)
expect(names).to match_array(chars.map(&:template).map(&:name))
end
it "sets correct variables for character name sort: character and template mixed" do
chars = Array.new(3) { create(:template_character, pb: SecureRandom.urlsafe_base64) }
chars += Array.new(3) { create(:character, pb: SecureRandom.urlsafe_base64) }
get :facecasts, params: { sort: 'name' }
names = assigns(:pbs).map(&:item_name)
expect(names).to match_array(chars.map { |c| (c.template || c).name })
end
it "sets correct variables for writer sort" do
chars = Array.new(3) { create(:template_character, pb: SecureRandom.urlsafe_base64) }
chars += Array.new(3) { create(:character, pb: SecureRandom.urlsafe_base64) }
get :facecasts, params: { sort: 'writer' }
user_ids = assigns(:pbs).map(&:user_id)
expect(user_ids).to match_array(chars.map(&:user).map(&:id))
end
end
describe "DELETE destroy" do
it "requires login" do
delete :destroy, params: { id: -1 }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
end
it "requires valid character" do
user_id = login
delete :destroy, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq("Character could not be found.")
end
it "requires permission" do
user = create(:user)
login_as(user)
character = create(:character)
expect(character.user_id).not_to eq(user.id)
delete :destroy, params: { id: character.id }
expect(response).to redirect_to(user_characters_url(user.id))
expect(flash[:error]).to eq("You do not have permission to edit that character.")
end
it "succeeds" do
character = create(:character)
login_as(character.user)
delete :destroy, params: { id: character.id }
expect(response).to redirect_to(user_characters_url(character.user_id))
expect(flash[:success]).to eq("Character deleted successfully.")
expect(Character.find_by_id(character.id)).to be_nil
end
it "handles destroy failure" do
character = create(:character)
post = create(:post, user: character.user, character: character)
login_as(character.user)
expect_any_instance_of(Character).to receive(:destroy!).and_raise(ActiveRecord::RecordNotDestroyed, 'fake error')
delete :destroy, params: { id: character.id }
expect(response).to redirect_to(character_url(character))
expect(flash[:error]).to eq({ message: "Character could not be deleted.", array: [] })
expect(post.reload.character).to eq(character)
end
end
describe "GET replace" do
it "requires login" do
character = create(:character)
get :replace, params: { id: character.id }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq('You must be logged in to view that page.')
end
it "requires valid character" do
user_id = login
get :replace, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('Character could not be found.')
end
it "requires own character" do
character = create(:character)
user_id = login
get :replace, params: { id: character.id }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('You do not have permission to edit that character.')
end
it "sets correct variables" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
other_char.default_icon = create(:icon, user: user)
other_char.save!
calias = create(:alias, character: other_char)
char_post = create(:post, user: user, character: character)
create(:reply, user: user, post: char_post, character: character) # reply
create(:post) # other post
char_reply2 = create(:reply, user: user, character: character) # other reply
login_as(user)
get :replace, params: { id: character.id }
expect(response).to have_http_status(200)
expect(assigns(:page_title)).to eq('Replace Character: ' + character.name)
expect(controller.gon.gallery[other_char.id][:url]).to eq(other_char.default_icon.url)
expect(controller.gon.gallery[other_char.id][:aliases]).to eq([calias.as_json])
expect(assigns(:posts)).to match_array([char_post, char_reply2.post])
end
context "with template" do
it "sets alts correctly" do
user = create(:user)
template = create(:template, user: user)
character = create(:character, user: user, template: template)
alts = Array.new(5) { create(:character, user: user, template: template) }
create(:character, user: user) # other character
login_as(user)
get :replace, params: { id: character.id }
expect(response).to have_http_status(200)
expect(assigns(:page_title)).to eq('Replace Character: ' + character.name)
expect(assigns(:alts)).to match_array(alts)
expect(assigns(:alt_dropdown).length).to eq(alts.length)
end
it "includes character if no others in template" do
user = create(:user)
template = create(:template, user: user)
character = create(:character, user: user, template: template)
create(:character, user: user) # other character
login_as(user)
get :replace, params: { id: character.id }
expect(response).to have_http_status(200)
expect(assigns(:alts)).to match_array([character])
end
end
context "without template" do
it "sets alts correctly" do
user = create(:user)
character = create(:character, user: user)
alts = Array.new(5) { create(:character, user: user) }
template = create(:template, user: user)
create(:character, user: user, template: template) # other character
login_as(user)
get :replace, params: { id: character.id }
expect(response).to have_http_status(200)
expect(assigns(:page_title)).to eq('Replace Character: ' + character.name)
expect(assigns(:alts)).to match_array(alts)
expect(assigns(:alt_dropdown).length).to eq(alts.length)
end
it "includes character if no others in template" do
user = create(:user)
template = create(:template, user: user)
character = create(:character, user: user)
create(:character, user: user, template: template) # other character
login_as(user)
get :replace, params: { id: character.id }
expect(response).to have_http_status(200)
expect(assigns(:alts)).to match_array([character])
end
end
end
describe "POST do_replace" do
it "requires login" do
character = create(:character)
post :do_replace, params: { id: character.id }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq('You must be logged in to view that page.')
end
it "requires valid character" do
user_id = login
post :do_replace, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('Character could not be found.')
end
it "requires own character" do
character = create(:character)
user_id = login
post :do_replace, params: { id: character.id }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('You do not have permission to edit that character.')
end
it "requires valid other character" do
character = create(:character)
login_as(character.user)
post :do_replace, params: { id: character.id, icon_dropdown: -1 }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('Character could not be found.')
end
it "requires other character to be yours if present" do
character = create(:character)
other_char = create(:character)
login_as(character.user)
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('That is not your character.')
end
it "requires valid new alias if parameter provided" do
character = create(:character)
login_as(character.user)
post :do_replace, params: { id: character.id, alias_dropdown: -1 }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('Invalid new alias.')
end
it "requires matching new alias if parameter provided" do
character = create(:character)
other_char = create(:character, user: character.user)
calias = create(:alias)
login_as(character.user)
post :do_replace, params: { id: character.id, alias_dropdown: calias.id, icon_dropdown: other_char.id }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('Invalid new alias.')
end
it "requires valid old alias if parameter provided" do
character = create(:character)
login_as(character.user)
post :do_replace, params: { id: character.id, orig_alias: -1 }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('Invalid old alias.')
end
it "requires matching old alias if parameter provided" do
character = create(:character)
calias = create(:alias)
login_as(character.user)
post :do_replace, params: { id: character.id, orig_alias: calias.id }
expect(response).to redirect_to(replace_character_path(character))
expect(flash[:error]).to eq('Invalid old alias.')
end
context "with audits enabled" do
before(:each) { Reply.auditing_enabled = true }
after(:each) { Reply.auditing_enabled = false }
it "succeeds with valid other character" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
char_post = create(:post, user: user, character: character)
reply = create(:reply, user: user, character: character)
reply_post_char = reply.post.character_id
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id }
end
expect(response).to redirect_to(character_path(character))
expect(flash[:success]).to eq('All uses of this character will be replaced.')
expect(char_post.reload.character_id).to eq(other_char.id)
expect(reply.reload.character_id).to eq(other_char.id)
expect(reply.post.reload.character_id).to eq(reply_post_char) # check it doesn't replace all replies in a post
audit = reply.audits.where(action: 'update').first
expect(audit).not_to be(nil)
expect(audit.user).to eq(user)
end
end
it "succeeds with no other character" do
user = create(:user)
character = create(:character, user: user)
char_post = create(:post, user: user, character: character)
reply = create(:reply, user: user, character: character)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id }
end
expect(response).to redirect_to(character_path(character))
expect(flash[:success]).to eq('All uses of this character will be replaced.')
expect(char_post.reload.character_id).to be_nil
expect(reply.reload.character_id).to be_nil
end
it "succeeds with alias" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
calias = create(:alias, character: other_char)
char_post = create(:post, user: user, character: character)
reply = create(:reply, user: user, character: character)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id, alias_dropdown: calias.id }
end
expect(char_post.reload.character_id).to eq(other_char.id)
expect(reply.reload.character_id).to eq(other_char.id)
expect(char_post.reload.character_alias_id).to eq(calias.id)
expect(reply.reload.character_alias_id).to eq(calias.id)
end
it "filters to selected posts if given" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
char_post = create(:post, user: user, character: character)
char_reply = create(:reply, user: user, character: character)
other_post = create(:post, user: user, character: character)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: {
id: character.id,
icon_dropdown: other_char.id,
post_ids: [char_post.id, char_reply.post.id],
}
end
expect(response).to redirect_to(character_path(character))
expect(flash[:success]).to eq('All uses of this character in the specified posts will be replaced.')
expect(char_post.reload.character_id).to eq(other_char.id)
expect(char_reply.reload.character_id).to eq(other_char.id)
expect(other_post.reload.character_id).to eq(character.id)
end
it "filters to alias if given" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
calias = create(:alias, character: character)
char_post = create(:post, user: user, character: character)
char_reply = create(:reply, user: user, character: character, character_alias_id: calias.id)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id, orig_alias: calias.id }
end
expect(char_post.reload.character_id).to eq(character.id)
expect(char_reply.reload.character_id).to eq(other_char.id)
end
it "filters to nil if given" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
calias = create(:alias, character: character)
char_post = create(:post, user: user, character: character)
char_reply = create(:reply, user: user, character: character, character_alias_id: calias.id)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id, orig_alias: '' }
end
expect(char_post.reload.character_id).to eq(other_char.id)
expect(char_reply.reload.character_id).to eq(character.id)
end
it "does not filter if all given" do
user = create(:user)
character = create(:character, user: user)
other_char = create(:character, user: user)
calias = create(:alias, character: character)
char_post = create(:post, user: user, character: character)
char_reply = create(:reply, user: user, character: character, character_alias_id: calias.id)
login_as(user)
perform_enqueued_jobs(only: UpdateModelJob) do
post :do_replace, params: { id: character.id, icon_dropdown: other_char.id, orig_alias: 'all' }
end
expect(char_post.reload.character_id).to eq(other_char.id)
expect(char_reply.reload.character_id).to eq(other_char.id)
end
end
describe "GET search" do
it 'works logged in' do
login
get :search
expect(response).to have_http_status(200)
expect(assigns(:users)).to be_empty
expect(assigns(:templates)).to be_empty
end
it 'works logged out' do
get :search
expect(response).to have_http_status(200)
expect(assigns(:users)).to be_empty
end
it 'searches author' do
author = create(:user)
found = create(:character, user: author)
create(:character) # notfound
get :search, params: { commit: true, author_id: author.id }
expect(response).to have_http_status(200)
expect(assigns(:users)).to match_array([author])
expect(assigns(:search_results)).to match_array([found])
end
it "doesn't search missing author" do
character = create(:template_character)
get :search, params: { commit: true, author_id: 9999 }
expect(response).to have_http_status(200)
expect(flash[:error]).to eq('The specified author could not be found.')
expect(assigns(:users)).to be_empty
expect(assigns(:search_results)).to match_array([character])
end
it "sets templates by author" do
author = create(:user)
template2 = create(:template, user: author, name: 'b')
template = create(:template, user: author, name: 'a')
template3 = create(:template, user: author, name: 'c')
create(:template)
get :search, params: { commit: true, author_id: author.id }
expect(assigns(:templates)).to eq([template, template2, template3])
end
it "doesn't search missing template" do
character = create(:template_character)
get :search, params: { commit: true, template_id: 9999 }
expect(response).to have_http_status(200)
expect(flash[:error]).to eq('The specified template could not be found.')
expect(assigns(:templates)).to be_empty
expect(assigns(:search_results)).to match_array([character])
end
it "doesn't search author/template mismatch" do
character = create(:template_character)
character2 = create(:character)
get :search, params: { commit: true, template_id: character.template_id, author_id: character2.user_id }
expect(response).to have_http_status(200)
expect(flash[:error]).to eq('The specified author and template do not match; template filter will be ignored.')
expect(assigns(:templates)).to be_empty
expect(assigns(:search_results)).to match_array([character2])
end
it 'searches template' do
author = create(:user)
template = create(:template, user: author)
found = create(:character, user: author, template: template)
create(:character, user: author, template: create(:template, user: author)) # notfound
get :search, params: { commit: true, template_id: template.id }
expect(response).to have_http_status(200)
expect(assigns(:templates)).to match_array([template])
expect(assigns(:search_results)).to match_array([found])
end
context "with search" do
let!(:name) { create(:character, name: 'a', screenname: 'b', nickname: 'c') }
let!(:nickname) { create(:character, name: 'b', screenname: 'c', nickname: 'a') }
let!(:screenname) { create(:character, name: 'c', screenname: 'a', nickname: 'b') }
it "searches names correctly" do
get :search, params: { commit: true, name: 'a', search_name: true }
expect(assigns(:search_results)).to match_array([name])
end
it "searches screenname correctly" do
get :search, params: { commit: true, name: 'a', search_screenname: true }
expect(assigns(:search_results)).to match_array([screenname])
end
it "searches nickname correctly" do
get :search, params: { commit: true, name: 'a', search_nickname: true }
expect(assigns(:search_results)).to match_array([nickname])
end
it "searches name + screenname correctly" do
get :search, params: { commit: true, name: 'a', search_name: true, search_screenname: true }
expect(assigns(:search_results)).to match_array([name, screenname])
end
it "searches name + nickname correctly" do
get :search, params: { commit: true, name: 'a', search_name: true, search_nickname: true }
expect(assigns(:search_results)).to match_array([name, nickname])
end
it "searches nickname + screenname correctly" do
get :search, params: { commit: true, name: 'a', search_nickname: true, search_screenname: true }
expect(assigns(:search_results)).to match_array([nickname, screenname])
end
it "searches all correctly" do
get :search, params: {
commit: true,
name: 'a',
search_name: true,
search_screenname: true,
search_nickname: true,
}
expect(assigns(:search_results)).to match_array([name, screenname, nickname])
end
it "orders results correctly" do
template = create(:template)
user = template.user
char4 = create(:character, user: user, template: template, name: 'd')
char2 = create(:character, user: user, name: 'b')
char1 = create(:character, user: user, template: template, name: 'a')
char5 = create(:character, user: user, name: 'e')
char3 = create(:character, user: user, name: 'c')
get :search, params: { commit: true, author_id: user.id }
expect(assigns(:search_results)).to eq([char1, char2, char3, char4, char5])
end
it "paginates correctly" do
user = create(:user)
26.times do |i|
create(:character, user: user, name: "character#{i}")
end
get :search, params: { commit: true, author_id: user.id }
expect(assigns(:search_results).length).to eq(25)
end
end
end
describe "POST duplicate" do
it "requires login" do
post :duplicate, params: { id: -1 }
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq('You must be logged in to view that page.')
end
it "requires valid character id" do
user_id = login
post :duplicate, params: { id: -1 }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('Character could not be found.')
end
it "requires character with permissions" do
user_id = login
post :duplicate, params: { id: create(:character).id }
expect(response).to redirect_to(user_characters_url(user_id))
expect(flash[:error]).to eq('You do not have permission to edit that character.')
end
it "succeeds" do
user = create(:user)
template = create(:template, user: user)
icon = create(:icon, user: user)
gallery = create(:gallery, icons: [icon], user: user)
group = create(:gallery_group)
gallery2 = create(:gallery, gallery_groups: [group], user: user)
gallery3 = create(:gallery, gallery_groups: [group], user: user)
character = create(:character, template: template, galleries: [gallery, gallery2], gallery_groups: [group], default_icon: icon, user: user)
calias = create(:alias, character: character)
char_post = create(:post, character: character, user: user)
char_reply = create(:reply, character: character, user: user)
character.settings << create(:setting)
character.reload
expect(character.galleries).to match_array([gallery, gallery2, gallery3])
expect(character.ungrouped_gallery_ids).to match_array([gallery.id, gallery2.id])
expect(character.gallery_groups).to match_array([group])
login_as(user)
expect do
post :duplicate, params: { id: character.id }
end.to not_change {
[Template.count, Gallery.count, Icon.count, Reply.count, Post.count, Tag.count]
}.and change { Character.count }.by(1).and change { CharactersGallery.count }.by(3).and change { CharacterTag.count }.by(2)
dupe = Character.last
character.reload
expect(response).to redirect_to(edit_character_url(dupe))
expect(flash[:success]).to eq('Character duplicated successfully. You are now editing the new character.')
expect(dupe).not_to eq(character)
# check all attrs but id, created_at and updated_at are same
dup_attrs = dupe.attributes.clone
char_attrs = character.attributes.clone
['id', 'created_at', 'updated_at'].each do |val|
dup_attrs.delete(val)
char_attrs.delete(val)
end
expect(dup_attrs).to eq(char_attrs)
# check character associations aren't changed
expect(character.template).to eq(template)
expect(character.galleries).to match_array([gallery, gallery2, gallery3])
expect(character.ungrouped_gallery_ids).to match_array([gallery.id, gallery2.id])
expect(character.gallery_groups).to match_array([group])
expect(character.default_icon).to eq(icon)
expect(character.user).to eq(user)
expect(character.aliases.map(&:name)).to eq([calias.name])
# check duplicate has appropriate associations
expect(dupe.template).to eq(template)
expect(dupe.galleries).to match_array([gallery, gallery2, gallery3])
expect(dupe.ungrouped_gallery_ids).to match_array([gallery.id, gallery2.id])
expect(dupe.gallery_groups).to match_array([group])
expect(dupe.default_icon).to eq(icon)
expect(dupe.user).to eq(user)
expect(dupe.aliases.map(&:name)).to eq([calias.name])
# check old posts and replies have old attributes
char_post.reload
char_reply.reload
expect(char_post.character).to eq(character)
expect(char_reply.character).to eq(character)
end
it "handles unexpected failure" do
character = create(:character)
login_as(character.user)
character.update_columns(default_icon_id: create(:icon).id) # rubocop:disable Rails/SkipsModelValidations
expect(character).not_to be_valid
expect { post :duplicate, params: { id: character.id } }.to not_change { Character.count }
expect(response).to redirect_to(character_path(character))
expect(flash[:error][:message]).to eq('Character could not be duplicated.')
expect(flash[:error][:array]).to eq(['Default icon must be yours'])
end
end
describe "#character_split" do
context "when logged out" do
it "works by default" do
expect(controller.send(:character_split)).to eq('template')
end
it "can be overridden with a parameter" do
controller.params[:character_split] = 'none'
expect(session[:character_split]).to be_nil
expect(controller.send(:character_split)).to eq('none')
expect(session[:character_split]).to eq('none')
end
it "uses session variable if it exists" do
session[:character_split] = 'none'
expect(controller.send(:character_split)).to eq('none')
end
end
context "when logged in" do
it "works by default" do
login
expect(controller.send(:character_split)).to eq('template')
end
it "uses account default if different" do
user = create(:user, default_character_split: 'none')
login_as(user)
expect(controller.send(:character_split)).to eq('none')
end
it "is not overridden by session" do
# also does not modify user default
user = create(:user, default_character_split: 'none')
login_as(user)
session[:character_split] = 'template'
expect(controller.send(:character_split)).to eq('none')
expect(user.reload.default_character_split).to eq('none')
end
it "can be overridden by params" do
# also does not modify user default
user = create(:user, default_character_split: 'none')
login_as(user)
controller.params[:character_split] = 'template'
expect(controller.send(:character_split)).to eq('template')
expect(user.reload.default_character_split).to eq('none')
end
end
end
describe "#editor_setup" do
it "orders characters correctly" do
user = create(:user)
login_as(user)
template4 = create(:template, user: user, name: "d")
template2 = create(:template, user: user, name: "b")
template1 = create(:template, user: user, name: "a")
template3 = create(:template, user: user, name: "c")
controller.send(:editor_setup)
expect(assigns(:templates)).to eq([template1, template2, template3, template4])
end
skip "has more tests"
end
end
|
Marri/glowfic
|
spec/controllers/characters_controller_spec.rb
|
Ruby
|
mit
| 56,627
|
<?php get_template_part('templates/page', 'header'); ?>
<?php if (!have_posts()) : ?>
<div data-alert class="alert-box warning">
<?php _e('Sorry, no results were found.', 'roots'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('templates/content', get_post_format()); ?>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages > 1) : ?>
<nav class="post-nav clearfix">
<ul class="pagination">
<li class="left"><?php next_posts_link(__('← Older posts', 'roots')); ?></li>
<li class="right"><?php previous_posts_link(__('Newer posts →', 'roots')); ?></li>
</ul>
</nav>
<?php endif; ?>
|
atanasiuswau/furai
|
index.php
|
PHP
|
mit
| 706
|
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Screen | picturepark-sdk-v1-widgets API</title>
<meta name="description" content="Documentation for picturepark-sdk-v1-widgets API">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">picturepark-sdk-v1-widgets API</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="screen.html">Screen</a>
</li>
</ul>
<h1>Interface Screen</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A screen, usually the one on which the current window is being rendered, and is obtained using window.screen.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">Screen</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#availheight" class="tsd-kind-icon">avail<wbr>Height</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#availwidth" class="tsd-kind-icon">avail<wbr>Width</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#colordepth" class="tsd-kind-icon">color<wbr>Depth</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#height" class="tsd-kind-icon">height</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#orientation" class="tsd-kind-icon">orientation</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#pixeldepth" class="tsd-kind-icon">pixel<wbr>Depth</a></li>
<li class="tsd-kind-property tsd-parent-kind-interface tsd-is-external"><a href="screen.html#width" class="tsd-kind-icon">width</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="availheight" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> avail<wbr>Height</h3>
<div class="tsd-signature tsd-kind-icon">avail<wbr>Height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14748</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="availwidth" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> avail<wbr>Width</h3>
<div class="tsd-signature tsd-kind-icon">avail<wbr>Width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14749</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="colordepth" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> color<wbr>Depth</h3>
<div class="tsd-signature tsd-kind-icon">color<wbr>Depth<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14750</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="height" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> height</h3>
<div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14751</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="orientation" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> orientation</h3>
<div class="tsd-signature tsd-kind-icon">orientation<span class="tsd-signature-symbol">:</span> <a href="screenorientation.html" class="tsd-signature-type">ScreenOrientation</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14752</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="pixeldepth" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> pixel<wbr>Depth</h3>
<div class="tsd-signature tsd-kind-icon">pixel<wbr>Depth<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14753</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a name="width" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagReadonly">Readonly</span> width</h3>
<div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/typescript/lib/lib.dom.d.ts:14754</li>
</ul>
</aside>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-is-external">
<a href="screen.html" class="tsd-kind-icon">Screen</a>
<ul>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#availheight" class="tsd-kind-icon">avail<wbr>Height</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#availwidth" class="tsd-kind-icon">avail<wbr>Width</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#colordepth" class="tsd-kind-icon">color<wbr>Depth</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#height" class="tsd-kind-icon">height</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#orientation" class="tsd-kind-icon">orientation</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#pixeldepth" class="tsd-kind-icon">pixel<wbr>Depth</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-interface tsd-is-external">
<a href="screen.html#width" class="tsd-kind-icon">width</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>
|
Picturepark/Picturepark.SDK.TypeScript
|
docs/picturepark-sdk-v1-widgets/api/interfaces/screen.html
|
HTML
|
mit
| 10,675
|
Package.describe({
summary: "Stanford Javascript Crypto Library with public key cryptography support"
});
Package.on_use(function (api, where) {
api.export('sjcl', 'client');
api.add_files('sjcl.js', 'client', {
bare: true
});
});
|
lencinhaus/ubersafe
|
app/packages/sjcl/package.js
|
JavaScript
|
mit
| 254
|
<?php
namespace Crocos\SecurityBundle\Security\AuthLogic;
/**
* AuthLogicInterface.
*
* @author Katsuhiro Ogawa <ogawa@crocos.co.jp>
*/
interface AuthLogicInterface
{
/**
* Set authentication domain.
*/
public function setDomain($domain);
/**
* Log in.
*
* @param user $user
*/
public function login($user);
/**
* Log out.
*/
public function logout();
/**
* Check is authenticated.
*
* @return bool
*/
public function isAuthenticated();
/**
* Get user.
*
* @return mixed
*/
public function getUser();
}
|
crocos/CrocosSecurityBundle
|
Security/AuthLogic/AuthLogicInterface.php
|
PHP
|
mit
| 632
|
module WeMeet
class ActivityCategory
attr_accessor :name
def initialize(name)
@name = name.capitalize
end
def similar_to?(other)
return (@name.downcase.include? other.downcase or other.downcase.include? @name.downcase)
end
def ==(other)
return @name.downcase == other.name.downcase
end
end
end
|
dcaba/wemeet
|
lib/we_meet/activity_category.rb
|
Ruby
|
mit
| 322
|
module Tod
module TasksRepository
class InMemory
def initialize
@tasks = {}
@id = 0
end
def persist(task)
@id += 1
task.id = @id
tasks[@id] = task
task
end
def count
tasks.length
end
private
attr_reader :tasks
end
end
end
|
bezelga/tod
|
lib/tod/tasks_repository/in_memory.rb
|
Ruby
|
mit
| 342
|
measure-stick
=============
A simple bookmarklet for measuring pixels on a webpage
Save as a bookmark in your browser. Click the bookmarklet to add the
measure-stick to the page.
The orange square can be moved with the arrow keys, or be dragged
around. Resize by holding alt and using the arrow keys. Press shift to
move or resize in steps of 10 pixels.
|
adrianschmidt/measure-stick
|
README.md
|
Markdown
|
mit
| 357
|
<?php
/* TwigBundle:Exception:trace.txt.twig */
class __TwigTemplate_9059c36d2d4ecdaa941ebef449cf6897e5465f46e03b305a1a47f53905e11533 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
);
}
protected function doDisplay(array $context, array $blocks = array())
{
// line 1
if ($this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "function")) {
// line 2
echo " at ";
echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "class") . $this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "type")) . $this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "function")), "html", null, true);
echo "(";
echo twig_escape_filter($this->env, $this->env->getExtension('code')->formatArgsAsText($this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "args")), "html", null, true);
echo ")
";
} else {
// line 4
echo " at n/a
";
}
// line 6
if (($this->getAttribute((isset($context["trace"]) ? $context["trace"] : null), "file", array(), "any", true, true) && $this->getAttribute((isset($context["trace"]) ? $context["trace"] : null), "line", array(), "any", true, true))) {
// line 7
echo " in ";
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "file"), "html", null, true);
echo " line ";
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["trace"]) ? $context["trace"] : $this->getContext($context, "trace")), "line"), "html", null, true);
echo "
";
}
}
public function getTemplateName()
{
return "TwigBundle:Exception:trace.txt.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 29 => 4, 42 => 14, 38 => 13, 35 => 7, 26 => 5, 87 => 20, 80 => 19, 55 => 13, 46 => 7, 44 => 10, 36 => 7, 31 => 5, 25 => 3, 21 => 2, 94 => 22, 92 => 21, 89 => 20, 85 => 19, 79 => 18, 75 => 17, 72 => 16, 68 => 14, 64 => 12, 56 => 9, 50 => 8, 41 => 9, 27 => 4, 24 => 4, 22 => 2, 201 => 92, 199 => 91, 196 => 90, 187 => 84, 183 => 82, 173 => 74, 171 => 73, 168 => 72, 166 => 71, 163 => 70, 158 => 67, 156 => 66, 151 => 63, 142 => 59, 138 => 57, 136 => 56, 133 => 55, 123 => 47, 121 => 46, 117 => 44, 115 => 43, 112 => 42, 105 => 40, 101 => 24, 91 => 31, 86 => 28, 69 => 25, 66 => 15, 62 => 23, 51 => 15, 49 => 19, 39 => 6, 32 => 12, 19 => 1, 57 => 16, 54 => 21, 43 => 8, 40 => 7, 33 => 6, 30 => 3,);
}
}
|
Oukhay/smjetsetmag
|
app/cache/dev/twig/90/59/c36d2d4ecdaa941ebef449cf6897e5465f46e03b305a1a47f53905e11533.php
|
PHP
|
mit
| 3,171
|
var expect = require('chai').expect;
var _ = require('lodash');
var ReadlineStub = require('../../helpers/readline');
var fixtures = require('../../helpers/fixtures');
var Expand = require('../../../lib/prompts/expand');
describe('`expand` prompt', function () {
beforeEach(function () {
this.fixture = _.clone(fixtures.expand);
this.rl = new ReadlineStub();
this.expand = new Expand(this.fixture, this.rl);
});
it('should throw if `key` is missing', function () {
var mkPrompt = function () {
this.fixture.choices = ['a', 'a'];
return new Expand(this.fixture, this.rl);
}.bind(this);
expect(mkPrompt).to.throw(/Format error/);
});
it('should throw if `key` is duplicate', function () {
var mkPrompt = function () {
this.fixture.choices = [
{key: 'a', name: 'foo'},
{key: 'a', name: 'foo'}
];
return new Expand(this.fixture, this.rl);
}.bind(this);
expect(mkPrompt).to.throw(/Duplicate\ key\ error/);
});
it('should throw if `key` is `h`', function () {
var mkPrompt = function () {
this.fixture.choices = [
{key: 'h', name: 'foo'}
];
return new Expand(this.fixture, this.rl);
}.bind(this);
expect(mkPrompt).to.throw(/Reserved\ key\ error/);
});
it('should take the first choice by default', function (done) {
this.expand.run().then(function (answer) {
expect(answer).to.equal('acab');
done();
});
this.rl.emit('line');
});
it('should use the `default` argument value', function (done) {
this.fixture.default = 1;
this.expand = new Expand(this.fixture, this.rl);
this.expand.run().then(function (answer) {
expect(answer).to.equal('bar');
done();
});
this.rl.emit('line');
});
it('should return the user input', function (done) {
this.expand.run().then(function (answer) {
expect(answer).to.equal('bar');
done();
});
this.rl.emit('line', 'b');
});
it('should strip the user input', function (done) {
this.expand.run().then(function (answer) {
expect(answer).to.equal('bar');
done();
});
this.rl.emit('line', ' b ');
});
it('should have help option', function (done) {
this.expand.run().then(function (answer) {
expect(this.rl.output.__raw__).to.match(/a\)\ acab/);
expect(this.rl.output.__raw__).to.match(/b\)\ bar/);
expect(answer).to.equal('chile');
done();
}.bind(this));
this.rl.emit('line', 'h');
this.rl.emit('line', 'c');
});
it('should not allow invalid command', function () {
var self = this;
var promise = this.expand.run();
this.rl.emit('line', 'blah');
setTimeout(function () {
self.rl.emit('line', 'a');
}, 10);
return promise;
});
it('should display and capitalize the default choice `key`', function () {
this.fixture.default = 1;
this.expand = new Expand(this.fixture, this.rl);
this.expand.run();
expect(this.rl.output.__raw__).to.contain('(aBch)');
});
it('should \'autocomplete\' the user input', function (done) {
this.expand = new Expand(this.fixture, this.rl);
this.expand.run();
this.rl.line = 'a';
this.rl.emit('keypress');
setTimeout(function () {
expect(this.rl.output.__raw__).to.contain('acab');
done();
}.bind(this), 10);
});
});
|
senshuu/Inquirer.js
|
test/specs/prompts/expand.js
|
JavaScript
|
mit
| 3,372
|
var engine = require("../../engine").engine;
var task;
var factories = require("../spec_helper").component_factories;
describe("error scenarios", function(){
beforeEach(function(){
waits(500);
runs(function(){
this.identifier = "error" + Math.floor(Math.random() * 100000);
this.intake = factories.create_ipc_intake(this.identifier);
this.exhaust = factories.create_ipc_exhaust(this.identifier);
this.cylinder = (factories.create_ipc_cylinders(1,this.identifier))["1"];
this.client = (factories.create_ipc_clients(1,this.identifier))["1"];
});
});
afterEach(function(){
this.intake.close();
this.exhaust.close();
this.cylinder.close();
this.client.close();
});
it("throws a TimeoutError", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("(function(locals){ return { sleep: function() { var now = new Date().getTime(); while(new Date().getTime() < now + 10000) { /* sleep */ } } } })");
task.setLocals({});
task.setCode("sleep();");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
var error = callback.mostRecentCall.args[0]
expect(error).toContain("TimeoutError");
});
});
it("catches syntax errors with task's code", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("(function(locals){ return { add: function(a,b){ return a+b; } } })");
task.setLocals({});
task.setCode("add(1,2");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
var response = callback.mostRecentCall.args[1]
expect(response.getEvaluation()).toContain("SyntaxError");
expect(response.isError()).toBe(true);
});
});
it("throws a ReferenceError", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("(function(locals){ return { add: function(a,b){ return a+b; } } })");
task.setLocals({});
task.setCode("subtract(1,1)");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
var response = callback.mostRecentCall.args[1]
expect(response.getEvaluation()).toContain("ReferenceError");
expect(response.isError()).toBe(true);
});
});
describe("Context Validation", function(){
it("catches syntax errors in task's context", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("foo;");
task.setLocals({});
task.setCode("subtract(1,1)");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
expect(callback.mostRecentCall.args[0]).toContain("SandboxError");
});
});
it("catches task context's that are not functions", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("({'foo':'bar'})");
task.setLocals({});
task.setCode("subtract(1,1)");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
expect(callback.mostRecentCall.args[0]).toContain("SandboxError");
});
});
it("catches task context's that do not return object literals", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("(function(){ return 1; })");
task.setLocals({});
task.setCode("subtract(1,1)");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
expect(callback.mostRecentCall.args[0]).toContain("SandboxError");
});
});
it("catches task contexts that reference non-existant locals", function(){
var callback = jasmine.createSpy();
task = this.client.createTask();
task.setContext("(function(locals){ var foo = locals.foo.bar; return { getFoo:function(){ return foo; } } })");
task.setLocals({bar:"hello"});
task.setCode("getFoo()");
task.on('eval', callback);
task.run();
waitsFor(function(){
return callback.callCount > 0;
});
runs(function(){
expect(callback.mostRecentCall.args[0]).toContain("SandboxError");
});
});
});
});
|
rehanift/engine.js
|
spec/end-to-end/errors_spec.js
|
JavaScript
|
mit
| 4,732
|
/* Copyright 1986, 1989, 1990 by Abacus Research and
* Development, Inc. All rights reserved.
*/
#if !defined (OMIT_RCSID_STRINGS)
char ROMlib_rcsid_qRegular[] =
"$Id: qRegular.c 63 2004-12-24 18:19:43Z ctm $";
#endif
/* Forward declarations in QuickDraw.h (DO NOT DELETE THIS LINE) */
#include "rsys/common.h"
#include "QuickDraw.h"
#include "CQuickDraw.h"
#include "DialogMgr.h"
#include "rsys/quick.h"
#include "rsys/cquick.h"
#include "rsys/ctl.h"
#include "rsys/wind.h"
using namespace Executor;
P1(PUBLIC pascal trap, void, FrameRect, Rect *, r)
{
CALLRECT(frame, r);
}
P1(PUBLIC pascal trap, void, PaintRect, Rect *, r)
{
CALLRECT(paint, r);
}
P1(PUBLIC pascal trap, void, EraseRect, Rect *, r)
{
CALLRECT(erase, r);
}
P1(PUBLIC pascal trap, void, InvertRect, Rect *, r)
{
CALLRECT(invert, r);
}
P2(PUBLIC pascal trap, void, FillRect, Rect *, r, Pattern, pat)
{
if (!EmptyRgn (PORT_VIS_REGION (thePort)))
{
ROMlib_fill_pat (pat);
CALLRECT(fill, r);
}
}
P1(PUBLIC pascal trap, void, FrameOval, Rect *, r)
{
CALLOVAL(frame, r);
}
P1(PUBLIC pascal trap, void, PaintOval, Rect *, r)
{
CALLOVAL(paint, r);
}
P1(PUBLIC pascal trap, void, EraseOval, Rect *, r)
{
CALLOVAL(erase, r);
}
P1(PUBLIC pascal trap, void, InvertOval, Rect *, r)
{
CALLOVAL(invert, r);
}
P2(PUBLIC pascal trap, void, FillOval, Rect *, r, Pattern, pat)
{
ROMlib_fill_pat (pat);
CALLOVAL(fill, r);
}
PRIVATE boolean_t
rect_matches_control_item (WindowPtr w, Rect *rp)
{
boolean_t retval;
ControlHandle c;
retval = FALSE;
for (c = WINDOW_CONTROL_LIST (w); !retval && c ; c = CTL_NEXT_CONTROL (c))
{
Rect r;
r = CTL_RECT (c);
retval = ((CW (r.top) - CW (rp->top) == CW (rp->bottom) - CW (r.bottom)) &&
(CW (r.left) - CW (rp->left) == CW (rp->right) - CW (r.right)));
}
return retval;
}
P3(PUBLIC pascal trap, void, FrameRoundRect, Rect *, r, INTEGER, ow,
INTEGER, oh)
{
boolean_t do_rect;
do_rect = FALSE;
if (ROMlib_cdef0_is_rectangular)
{
AuxWinHandle aux;
aux = MR (*lookup_aux_win (thePort));
if (aux && rect_matches_control_item (HxP(aux, awOwner), r))
do_rect = TRUE;
}
if (do_rect)
FrameRect (r);
else
CALLRRECT(frame, r, ow, oh);
}
P3(PUBLIC pascal trap, void, PaintRoundRect, Rect *, r, INTEGER, ow,
INTEGER, oh)
{
CALLRRECT(paint, r, ow, oh);
}
P3(PUBLIC pascal trap, void, EraseRoundRect, Rect *, r, INTEGER, ow,
INTEGER, oh)
{
CALLRRECT(erase, r, ow, oh);
}
P3(PUBLIC pascal trap, void, InvertRoundRect, Rect *, r, INTEGER, ow,
INTEGER, oh)
{
CALLRRECT(invert, r, ow, oh);
}
P4(PUBLIC pascal trap, void, FillRoundRect, Rect *, r, INTEGER, ow,
INTEGER, oh, Pattern, pat)
{
ROMlib_fill_pat (pat);
CALLRRECT(fill, r, ow, oh);
}
P3(PUBLIC pascal trap, void, FrameArc, Rect *, r, INTEGER, start,
INTEGER, angle)
{
CALLARC(frame, r, start, angle);
}
P3(PUBLIC pascal trap, void, PaintArc, Rect *, r, INTEGER, start,
INTEGER, angle)
{
CALLARC(paint, r, start, angle);
}
P3(PUBLIC pascal trap, void, EraseArc, Rect *, r, INTEGER, start,
INTEGER, angle)
{
CALLARC(erase, r, start, angle);
}
P3(PUBLIC pascal trap, void, InvertArc, Rect *, r, INTEGER, start,
INTEGER, angle)
{
CALLARC(invert, r, start, angle);
}
P4(PUBLIC pascal trap, void, FillArc, Rect *, r, INTEGER, start,
INTEGER, angle, Pattern, pat)
{
ROMlib_fill_pat (pat);
CALLARC (fill, r, start, angle);
}
P1(PUBLIC pascal trap, void, FrameRgn, RgnHandle, rh)
{
CALLRGN(frame, rh);
}
P1(PUBLIC pascal trap, void, PaintRgn, RgnHandle, rh)
{
CALLRGN(paint, rh);
}
P1(PUBLIC pascal trap, void, EraseRgn, RgnHandle, rh)
{
CALLRGN(erase, rh);
}
P1(PUBLIC pascal trap, void, InvertRgn, RgnHandle, rh)
{
CALLRGN(invert, rh);
}
P2(PUBLIC pascal trap, void, FillRgn, RgnHandle, rh, Pattern, pat)
{
ROMlib_fill_pat (pat);
CALLRGN(fill, rh);
}
P1(PUBLIC pascal trap, void, FramePoly, PolyHandle, poly)
{
CALLPOLY(frame, poly);
}
P1(PUBLIC pascal trap, void, PaintPoly, PolyHandle, poly)
{
CALLPOLY(paint, poly);
}
P1(PUBLIC pascal trap, void, ErasePoly, PolyHandle, poly)
{
CALLPOLY(erase, poly);
}
P1(PUBLIC pascal trap, void, InvertPoly, PolyHandle, poly)
{
CALLPOLY(invert, poly);
}
P2(PUBLIC pascal trap, void, FillPoly, PolyHandle, poly, Pattern, pat)
{
ROMlib_fill_pat (pat);
CALLPOLY (fill, poly);
}
|
MaddTheSane/executor
|
src/qRegular.cpp
|
C++
|
mit
| 4,494
|
# Kryo
Runtime types for validation and serialization.
|
demurgos/kryo
|
packages/kryo/README.md
|
Markdown
|
mit
| 56
|
using System;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace LentilToolbox
{
//-------------------派生文本框类----------------------
//修改后不会影响dB和dd的参数
public class TextBoxInt: TextBox
{
public TextBoxInt()
{
}
private int value = 0;
public void Check()
{
if ((Regex.IsMatch(Text, @"^\d+$")) && (Text != "0"))
{
value = Convert.ToInt32(Text);
}
else
{
MessageBox.Show(Name + "一般是正整数值,请填写一个正整数");
}
}
public int consult()
{
Check();
return value;
}
}
public class TextBoxDouble : TextBox
{
public TextBoxDouble()
{
}
private double value = 0;
public void Check()
{
if (Regex.IsMatch(Text, @"^\d+(\.\d+)?$"))
{
value = Convert.ToDouble(Text);
}
else
{
MessageBox.Show(Name + "一般是正实数值,请填写一个正实数");
}
}
public double consult()
{
Check();
return value;
}
}
//修改后会影响dB和dd的参数
public class TextBoxIntFactor : TextBoxInt
{
private ftrwin ParentWin;
public TextBoxIntFactor(ftrwin oftrwin)
{
ParentWin = oftrwin;
this.Leave += new System.EventHandler(IntTextFactorChanged);
}
private void IntTextFactorChanged(object sender, EventArgs e)
{
ParentWin.refreshdBAnddd();
//MessageBox.Show("Faxtor Changed");
}
}
public class TextBoxDoubleFactor : TextBoxDouble
{
private ftrwin ParentWin;
public TextBoxDoubleFactor(ftrwin oftrwin)
{
ParentWin = oftrwin;
this.Leave += new System.EventHandler(DoubleTextFactorChanged);
}
private void DoubleTextFactorChanged(object sender, EventArgs e)
{
ParentWin.refreshdBAnddd();
//MessageBox.Show("Faxtor Changed");
}
}
}
|
Lentil1016/LTB
|
v1.1/LentilToolbox/TextBox.cs
|
C#
|
mit
| 2,271
|
/**
* Copyright 2013 Facebook, Inc.
*
* 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.
*
* @providesModule ReactInputSelection
*/
"use strict";
var ReactDOMSelection = require("./ReactDOMSelection");
var getActiveElement = require("./getActiveElement");
var nodeContains = require("./nodeContains");
function isInDocument(node) {
return nodeContains(document.documentElement, node);
}
/**
* @ReactInputSelection: React input selection module. Based on Selection.js,
* but modified to be suitable for react and has a couple of bug fixes (doesn't
* assume buttons have range selections allowed).
* Input selection module for React.
*/
var ReactInputSelection = {
hasSelectionCapabilities: function(elem) {
return elem && (
(elem.nodeName === 'INPUT' && elem.type === 'text') ||
elem.nodeName === 'TEXTAREA' ||
elem.contentEditable === 'true'
);
},
getSelectionInformation: function() {
var focusedElem = getActiveElement();
return {
focusedElem: focusedElem,
selectionRange:
ReactInputSelection.hasSelectionCapabilities(focusedElem) ?
ReactInputSelection.getSelection(focusedElem) :
null
};
},
/**
* @restoreSelection: If any selection information was potentially lost,
* restore it. This is useful when performing operations that could remove dom
* nodes and place them back in, resulting in focus being lost.
*/
restoreSelection: function(priorSelectionInformation) {
var curFocusedElem = getActiveElement();
var priorFocusedElem = priorSelectionInformation.focusedElem;
var priorSelectionRange = priorSelectionInformation.selectionRange;
if (curFocusedElem !== priorFocusedElem &&
isInDocument(priorFocusedElem)) {
if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) {
ReactInputSelection.setSelection(
priorFocusedElem,
priorSelectionRange
);
}
priorFocusedElem.focus();
}
},
/**
* @getSelection: Gets the selection bounds of a focused textarea, input or
* contentEditable node.
* -@input: Look up selection bounds of this input
* -@return {start: selectionStart, end: selectionEnd}
*/
getSelection: function(input) {
var selection;
if ('selectionStart' in input) {
// Modern browser with input or textarea.
selection = {
start: input.selectionStart,
end: input.selectionEnd
};
} else if (document.selection && input.nodeName === 'INPUT') {
// IE8 input.
var range = document.selection.createRange();
// There can only be one selection per document in IE, so it must
// be in our element.
if (range.parentElement() === input) {
selection = {
start: -range.moveStart('character', -input.value.length),
end: -range.moveEnd('character', -input.value.length)
};
}
} else {
// Content editable or old IE textarea.
selection = ReactDOMSelection.getOffsets(input);
}
return selection || {start: 0, end: 0};
},
/**
* @setSelection: Sets the selection bounds of a textarea or input and focuses
* the input.
* -@input Set selection bounds of this input or textarea
* -@offsets Object of same form that is returned from get*
*/
setSelection: function(input, offsets) {
var start = offsets.start;
var end = offsets.end;
if (typeof end === 'undefined') {
end = start;
}
if ('selectionStart' in input) {
input.selectionStart = start;
input.selectionEnd = Math.min(end, input.value.length);
} else if (document.selection && input.nodeName === 'INPUT') {
var range = input.createTextRange();
range.collapse(true);
range.moveStart('character', start);
range.moveEnd('character', end - start);
range.select();
} else {
ReactDOMSelection.setOffsets(input, offsets);
}
}
};
module.exports = ReactInputSelection;
|
M3kH/tire-bouchon
|
node_modules/grunt-react/node_modules/react-tools/build/modules/ReactInputSelection.js
|
JavaScript
|
mit
| 4,502
|
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import frappe
def get_parent_doc(doc):
"""Returns document of `reference_doctype`, `reference_doctype`"""
if not hasattr(doc, "parent_doc"):
if doc.reference_doctype and doc.reference_name:
doc.parent_doc = frappe.get_doc(doc.reference_doctype, doc.reference_name)
else:
doc.parent_doc = None
return doc.parent_doc
def set_timeline_doc(doc):
"""Set timeline_doctype and timeline_name"""
parent_doc = get_parent_doc(doc)
if (doc.timeline_doctype and doc.timeline_name) or not parent_doc:
return
timeline_field = parent_doc.meta.timeline_field
if not timeline_field:
return
doctype = parent_doc.meta.get_link_doctype(timeline_field)
name = parent_doc.get(timeline_field)
if doctype and name:
doc.timeline_doctype = doctype
doc.timeline_name = name
else:
return
def find(list_of_dict, match_function):
'''Returns a dict in a list of dicts on matching the conditions
provided in match function
Usage:
list_of_dict = [{'name': 'Suraj'}, {'name': 'Aditya'}]
required_dict = find(list_of_dict, lambda d: d['name'] == 'Aditya')
'''
for entry in list_of_dict:
if match_function(entry):
return entry
return None
def find_all(list_of_dict, match_function):
'''Returns all matching dicts in a list of dicts.
Uses matching function to filter out the dicts
Usage:
colored_shapes = [
{'color': 'red', 'shape': 'square'},
{'color': 'red', 'shape': 'circle'},
{'color': 'blue', 'shape': 'triangle'}
]
red_shapes = find_all(colored_shapes, lambda d: d['color'] == 'red')
'''
found = []
for entry in list_of_dict:
if match_function(entry):
found.append(entry)
return found
def ljust_list(_list, length, fill_word=None):
"""
Similar to ljust but for list.
Usage:
$ ljust_list([1, 2, 3], 5)
> [1, 2, 3, None, None]
"""
# make a copy to avoid mutation of passed list
_list = list(_list)
fill_length = length - len(_list)
if fill_length > 0:
_list.extend([fill_word] * fill_length)
return _list
|
mhbu50/frappe
|
frappe/core/utils.py
|
Python
|
mit
| 2,081
|
/*
Problem 1. Say Hello
Write a method that asks the user for his name and prints “Hello, <name>”
Write a program to test this method.
Example:
input output
Peter Hello, Peter!
*/
using System;
class SayHello
{
static void PrintHello(string name)
{
Console.WriteLine("Hello, {0}!", name);
}
static void Main()
{
Console.Write("Please, enter your first name: ");
string name = Console.ReadLine();
PrintHello(name);
}
}
|
AdrianApostolov/TelerikAcademy
|
Homeworks/C#2/MethodsHomework/01.SayHello/SayHello.cs
|
C#
|
mit
| 497
|
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
/* Body style, for the entire document */
body {
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1 {
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2 {
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3 {
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
h4 {
font-weight: normal;
font-size: 12pt;
margin: 0;
padding: 0 0 0 0;
background-color: transparent;
}
/* Color all hyperlinks one color */
a {
color: #1382CE;
}
/* Paragraph text (for longer informational messages) */
p {
font-size: 10pt;
}
/* Table styles */
table {
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}
table th {
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td {
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
.NoBreakingChanges {
color: darkgreen;
font-weight:bold;
}
.FewBreakingChanges {
color: orange;
font-weight:bold;
}
.ManyBreakingChanges {
color: red;
font-weight:bold;
}
.BreakDetails {
margin-left: 30px;
}
.CompatMessage {
font-style: italic;
font-size: 10pt;
}
.GoodMessage {
color: darkgreen;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink {
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover {
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
/* Center text, used in the over views cells that contain message level counts */
.textCentered {
text-align: center;
}
/* The message cells in message tables should take up all avaliable space */
.messageCell {
width: 100%;
}
/* Padding around the content after the h1 */
#content {
padding: 0px 12px 12px 12px;
}
/* The overview table expands to width, with a max width of 97% */
#overview table {
width: auto;
max-width: 75%;
}
/* The messages tables are always 97% width */
#messages table {
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
min-width: 18px;
min-height: 18px;
background-repeat: no-repeat;
background-position: center;
}
/* Success icon encoded */
.IconSuccessEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
}
/* Information icon encoded */
.IconInfoEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
/* Warning icon encoded */
.IconWarningEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
/* Error icon encoded */
.IconErrorEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h1 _locid="PortabilityReport">.NET Portability Report</h1>
<div id="content">
<div id="submissionId" style="font-size:8pt;">
<p>
<i>
Submission Id
7f0501ad-59fa-4aeb-986a-2e2ca77db86e
</i>
</p>
</div>
<h2 _locid="SummaryTitle">
<a name="Portability Summary"></a>Portability Summary
</h2>
<div id="summary">
<table>
<tbody>
<tr>
<th>Assembly</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
</tr>
<tr>
<td><strong><a href="#TwoLayeredGUI.WinForms">TwoLayeredGUI.WinForms</a></strong></td>
<td class="text-center">69.15 %</td>
<td class="text-center">68.89 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">68.89 %</td>
</tr>
</tbody>
</table>
</div>
<div id="details">
<a name="TwoLayeredGUI.WinForms"><h3>TwoLayeredGUI.WinForms</h3></a>
<table>
<tbody>
<tr>
<th>Target type</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
<th>Recommended changes</th>
</tr>
<tr>
<td>System.ComponentModel.CancelEventHandler</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Object,System.IntPtr)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.ComponentModel.Component</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Remove usage</td>
</tr>
<tr>
<td style="padding-left:2em">add_Disposed(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Remove usage</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Bitmap</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.IO.Stream)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Brush</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Color</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Blue</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Navy</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_White</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">op_Inequality(System.Drawing.Color,System.Drawing.Color)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.ContentAlignment</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Drawing2D.LinearGradientBrush</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Drawing.Point,System.Drawing.Point,System.Drawing.Color,System.Drawing.Color)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Font</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Drawing.FontFamily,System.Single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.String,System.Single,System.Drawing.FontStyle,System.Drawing.GraphicsUnit)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_FontFamily</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Name</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Size</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SizeInPoints</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Style</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Unit</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.FontFamily</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_GenericMonospace</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_GenericSansSerif</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_GenericSerif</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Name</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.FontStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Graphics</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">FillRectangle(System.Drawing.Brush,System.Drawing.Rectangle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">MeasureString(System.String,System.Drawing.Font)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">MeasureString(System.String,System.Drawing.Font,System.Int32,System.Drawing.StringFormat)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.GraphicsUnit</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Image</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Size</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Point</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_X</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Y</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Rectangle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32,System.Int32,System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Bottom</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Left</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Right</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Top</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Width</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_X</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Y</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Size</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Empty</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Width</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Height(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Width(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.SizeF</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.SolidBrush</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Drawing.Color)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.StringFormat</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_HotkeyPrefix(System.Drawing.Text.HotkeyPrefix)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Trimming(System.Drawing.StringTrimming)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.StringTrimming</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.SystemColors</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Control</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Window</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_WindowText</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.SystemFonts</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_DialogFont</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Text.HotkeyPrefix</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Threading.Thread</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_CurrentThread</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_ManagedThreadId</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Type</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>.GetTypeInfo().IsValueType</td>
</tr>
<tr>
<td style="padding-left:2em">get_IsValueType</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>.GetTypeInfo().IsValueType</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.AnchorStyles</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Appearance</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.AutoSizeMode</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Border3DSide</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Border3DStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.BorderStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Button</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnClick(System.EventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_AutoSizeMode(System.Windows.Forms.AutoSizeMode)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ButtonBase</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Image</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Image(System.Drawing.Image)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TextAlign(System.Drawing.ContentAlignment)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TextImageRelation(System.Windows.Forms.TextImageRelation)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.CheckBox</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_CheckedChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Checked</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnClick(System.EventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Appearance(System.Windows.Forms.Appearance)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Checked(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ColumnStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Windows.Forms.SizeType)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Width(System.Single)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ComboBox</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_SelectedIndexChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Items</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SelectedItem</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_DropDownStyle(System.Windows.Forms.ComboBoxStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ComboBox.ObjectCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">AddRange(System.Object[])</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ComboBoxStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.CommonDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">ShowDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ContainerControl</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnFontChanged(System.EventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ActiveControl(System.Windows.Forms.Control)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ContextMenuStrip</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Control</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Click(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_EnabledChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Paint(System.Windows.Forms.PaintEventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_SizeChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_TextChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">CreateGraphics</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">FindForm</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Anchor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Bottom</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_ClientRectangle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_ClientSize</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Controls</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Enabled</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Font</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_IsDisposed</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Left</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Margin</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_MinimumSize</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Parent</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_PreferredSize</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Right</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Size</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Text</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Top</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Width</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">GetPreferredSize(System.Drawing.Size)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Hide</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnPaint(System.Windows.Forms.PaintEventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnSizeChanged(System.EventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Refresh</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Anchor(System.Windows.Forms.AnchorStyles)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_AutoSize(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_BackColor(System.Drawing.Color)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Dock(System.Windows.Forms.DockStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Enabled(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Font(System.Drawing.Font)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ForeColor(System.Drawing.Color)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Height(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Left(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Location(System.Drawing.Point)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Margin(System.Windows.Forms.Padding)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_MaximumSize(System.Drawing.Size)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_MinimumSize(System.Drawing.Size)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Padding(System.Windows.Forms.Padding)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Parent(System.Windows.Forms.Control)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Size(System.Drawing.Size)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TabIndex(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TabStop(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Text(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Top(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Visible(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Width(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">SetBounds(System.Int32,System.Int32,System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Show</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Control.ControlCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Windows.Forms.Control)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Item(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Remove(System.Windows.Forms.Control)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ControlPaint</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">DrawBorder3D(System.Drawing.Graphics,System.Drawing.Rectangle,System.Windows.Forms.Border3DStyle,System.Windows.Forms.Border3DSide)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.DialogResult</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.DockStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.FileDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_FileName</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_FileNames</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_CheckFileExists(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_CheckPathExists(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_FileName(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Filter(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Title(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.FolderBrowserDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SelectedPath</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_SelectedPath(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ShowNewFolderButton(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Form</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Closed(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Closing(System.ComponentModel.CancelEventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Shown(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Close</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Dispose(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_AcceptButton(System.Windows.Forms.IButtonControl)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_CancelButton(System.Windows.Forms.IButtonControl)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ClientSize(System.Drawing.Size)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ControlBox(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_DialogResult(System.Windows.Forms.DialogResult)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_FormBorderStyle(System.Windows.Forms.FormBorderStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_MaximizeBox(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_MinimizeBox(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ShowInTaskbar(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_StartPosition(System.Windows.Forms.FormStartPosition)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TopMost(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">ShowDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.FormBorderStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.FormStartPosition</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.IButtonControl</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Label</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_TextAlign(System.Drawing.ContentAlignment)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_UseMnemonic(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Layout.ArrangedElementCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Count</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">GetEnumerator</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ListBox</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_SelectedIndexChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Items</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SelectedIndices</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SelectedItems</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_SelectionMode(System.Windows.Forms.SelectionMode)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ListBox.ObjectCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Object)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">AddRange(System.Object[])</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Contains(System.Object)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Remove(System.Object)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ListBox.SelectedIndexCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Count</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ListBox.SelectedObjectCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ListControl</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_SelectedIndex</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_SelectedIndex(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.MessageBoxButtons</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.MessageBoxDefaultButton</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.MessageBoxIcon</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.NumericUpDown</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_ValueChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Value</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_DecimalPlaces(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Maximum(System.Decimal)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Minimum(System.Decimal)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Value(System.Decimal)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.OpenFileDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Multiselect(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Padding</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32,System.Int32,System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Bottom</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Horizontal</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Left</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Right</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Top</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Vertical</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.PaintEventArgs</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Graphics</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.PaintEventHandler</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Object,System.IntPtr)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Panel</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">OnResize(System.EventArgs)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_AutoSizeMode(System.Windows.Forms.AutoSizeMode)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.PictureBox</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_BorderStyle(System.Windows.Forms.BorderStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Image(System.Drawing.Image)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ProgressBar</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Maximum</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Minimum</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Maximum(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Minimum(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Value(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.RadioButton</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_CheckedChanged(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Checked</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Checked(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.RowStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Windows.Forms.SizeType)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Height(System.Single)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.SaveFileDialog</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_OverwritePrompt(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.Screen</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Bounds</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_PrimaryScreen</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_WorkingArea</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ScrollBars</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.SelectionMode</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.SizeType</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutColumnStyleCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Windows.Forms.ColumnStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Item(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutControlCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Windows.Forms.Control,System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutPanel</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_ColumnCount</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_ColumnStyles</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Controls</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_RowCount</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_RowStyles</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ColumnCount(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_RowCount(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">SetColumnSpan(System.Windows.Forms.Control,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">SetRowSpan(System.Windows.Forms.Control,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutRowStyleCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Windows.Forms.RowStyle)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutStyle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_SizeType(System.Windows.Forms.SizeType)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TableLayoutStyleCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Count</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">RemoveAt(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TextBox</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ScrollBars(System.Windows.Forms.ScrollBars)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TextBoxBase</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">ScrollToCaret</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Multiline(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_ReadOnly(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_SelectionStart(System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_WordWrap(System.Boolean)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.TextImageRelation</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStrip</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Items</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStripDropDown</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Show(System.Windows.Forms.Control,System.Drawing.Point,System.Windows.Forms.ToolStripDropDownDirection)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStripDropDownDirection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStripItem</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">add_Click(System.EventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Image(System.Drawing.Image)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Text(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStripItemCollection</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Add(System.Windows.Forms.ToolStripItem)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolStripMenuItem</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.ToolTip</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">SetToolTip(System.Windows.Forms.Control,System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Windows.Forms.UserControl</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_AutoSizeMode(System.Windows.Forms.AutoSizeMode)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p>
<a href="#Portability Summary">Back to Summary</a>
</p>
</div>
</div>
</body>
</html>
|
kuhlenh/port-to-core
|
Reports/tw/twolayeredgui.winforms.1.0.0/TwoLayeredGUI.WinForms-Net35.html
|
HTML
|
mit
| 204,634
|
// Copied from the lunr.js test suite
var stemmingFixture = { "läufer": "lauf" };
test('should stem words correctly', function () {
Object.keys(stemmingFixture).forEach(function (testWord) {
var expected = stemmingFixture[testWord];
equal(lunr.de.stemmer(testWord), expected);
});
});
test('should be registered with lunr.Pipeline', function () {
equal(lunr.de.stemmer.label, 'stemmer-de');
deepEqual(lunr.Pipeline.registeredFunctions['stemmer-de'], lunr.de.stemmer);
});
|
severinh/lunr.de.js
|
test/stemmer_test.js
|
JavaScript
|
mit
| 492
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_21) on Fri May 03 11:00:28 CEST 2013 -->
<TITLE>
Uses of Package nio.mapping
</TITLE>
<META NAME="date" CONTENT="2013-05-03">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package nio.mapping";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?nio/mapping/package-use.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Package<br>nio.mapping</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../nio/mapping/package-summary.html">nio.mapping</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#nio.mapping"><B>nio.mapping</B></A></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<A NAME="nio.mapping"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Classes in <A HREF="../../nio/mapping/package-summary.html">nio.mapping</A> used by <A HREF="../../nio/mapping/package-summary.html">nio.mapping</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../nio/mapping/class-use/BufferController.html#nio.mapping"><B>BufferController</B></A></B>
<BR>
Trieda kontroluje vytvaranie MappedByteBuffer z Buffer, ich alokovany
pocet, velkost, zaroven stare MappedByteBuffer buffre maze.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../nio/mapping/class-use/MappedFile.html#nio.mapping"><B>MappedFile</B></A></B>
<BR>
Vsetky buffre su spojene dokopy a vytvaraju tak pametovo namapovany subor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../nio/mapping/class-use/SimpleArrayList.html#nio.mapping"><B>SimpleArrayList</B></A></B>
<BR>
Pametovo namapovany arraylist pre jeden objekt, ktory ma
konstantnu velkost.</TD>
</TR>
</TABLE>
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../index.html?nio/mapping/package-use.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|
sekys/ivis
|
project/doc/nio/mapping/package-use.html
|
HTML
|
mit
| 7,123
|
ScalaJS.impls.scala_collection_IterableProxyLike$class__iterator__Lscala_collection_IterableProxyLike__Lscala_collection_Iterator = (function($$this) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).iterator__Lscala_collection_Iterator()
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__grouped__Lscala_collection_IterableProxyLike__I__Lscala_collection_Iterator = (function($$this, size) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).grouped__I__Lscala_collection_Iterator(size)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__sliding__Lscala_collection_IterableProxyLike__I__Lscala_collection_Iterator = (function($$this, size) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).sliding__I__Lscala_collection_Iterator(size)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__sliding__Lscala_collection_IterableProxyLike__I__I__Lscala_collection_Iterator = (function($$this, size, step) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).sliding__I__I__Lscala_collection_Iterator(size, step)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__takeRight__Lscala_collection_IterableProxyLike__I__Lscala_collection_Iterable = (function($$this, n) {
return ScalaJS.as.scala_collection_Iterable(ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).takeRight__I__O(n))
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__dropRight__Lscala_collection_IterableProxyLike__I__Lscala_collection_Iterable = (function($$this, n) {
return ScalaJS.as.scala_collection_Iterable(ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).dropRight__I__O(n))
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__zip__Lscala_collection_IterableProxyLike__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O = (function($$this, that, bf) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).zip__Lscala_collection_GenIterable__Lscala_collection_generic_CanBuildFrom__O(that, bf)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__zipAll__Lscala_collection_IterableProxyLike__Lscala_collection_GenIterable__O__O__Lscala_collection_generic_CanBuildFrom__O = (function($$this, that, thisElem, thatElem, bf) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).zipAll__Lscala_collection_GenIterable__O__O__Lscala_collection_generic_CanBuildFrom__O(that, thisElem, thatElem, bf)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__zipWithIndex__Lscala_collection_IterableProxyLike__Lscala_collection_generic_CanBuildFrom__O = (function($$this, bf) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).zipWithIndex__Lscala_collection_generic_CanBuildFrom__O(bf)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__sameElements__Lscala_collection_IterableProxyLike__Lscala_collection_GenIterable__Z = (function($$this, that) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).sameElements__Lscala_collection_GenIterable__Z(that)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__view__Lscala_collection_IterableProxyLike__Lscala_collection_IterableView = (function($$this) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).view__Lscala_collection_IterableView()
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__view__Lscala_collection_IterableProxyLike__I__I__Lscala_collection_IterableView = (function($$this, from, until) {
return ScalaJS.as.scala_collection_IterableLike($$this.self__Lscala_collection_Traversable()).view__I__I__Lscala_collection_IterableView(from, until)
});
ScalaJS.impls.scala_collection_IterableProxyLike$class__$init$__Lscala_collection_IterableProxyLike__V = (function($$this) {
/*<skip>*/
});
//@ sourceMappingURL=IterableProxyLike$class.js.map
|
ignaciocases/hermeneumatics
|
node_modules/scala-node/main/target/streams/compile/externalDependencyClasspath/$global/package-js/extracted-jars/scalajs-library_2.10-0.4.0.jar--29fb2f8b/scala/collection/IterableProxyLike$class.js
|
JavaScript
|
mit
| 4,164
|
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open&id=3 (optional: ?Open&page=filename.html&id=x) -->
<!-- Created: ; Product Code: 536; Server: stratnotes2.ic.gc.ca -->
<head>
<!-- Title begins / Début du titre -->
<title>
New Persona -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<!-- Meta-data begins / Début des métadonnées -->
<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />
<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />
<!-- EPI-11240 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- MCG-202 -->
<meta content="width=device-width,initial-scale=1" name="viewport">
<!-- EPI-11567 -->
<meta name = "format-detection" content = "telephone=no">
<!-- EPI-12603 -->
<meta name="robots" content="noarchive">
<!-- EPI-11190 - Webtrends -->
<script>
var startTime = new Date();
startTime = startTime.getTime();
</script>
<!--[if gte IE 9 | !IE ]><!-->
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">
<!--<![endif]-->
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">
<!--[if lt IE 9]>
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/ie8-wet-boew.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew.min.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<![endif]-->
<noscript><link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" /></noscript>
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<script>dataLayer1 = [];</script>
<!-- End Google Tag Manager -->
<!-- EPI-11235 -->
<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body class="home" vocab="http://schema.org/" typeof="WebPage">
<!-- EPIC HEADER BEGIN -->
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<noscript><iframe title="Google Tag Manager" src="//www.googletagmanager.com/ns.html?id=GTM-TLGQ9K" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer1','GTM-TLGQ9K');</script>
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="Department_of_Industry"></span>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Skip to "About this site"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr" class="container">
<section id="wb-lng" class="visible-md visible-lg text-right">
<h2 class="wb-inv">Language selection</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline mrgn-bttm-0">
<li><a href="nvgt.do?V_TOKEN=1492306332269&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=32287&V_SEARCH.docsStart=32286&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn/updt.sec?_flId?_flxKy=e1s1&estblmntNo=234567041301&profileId=61&_evId=bck&lang=eng&V_SEARCH.showStricts=false&prtl=1&_flId?_flId?_flxKy=e1s1" title="Français" lang="fr">Français</a></li>
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-8 col-sm-9 col-md-6">
<a href="http://www.canada.ca/en/index.html"><object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object><span class="wb-inv"> Government of Canada</span></a>
</div>
<section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn">
<h2>Search and menus</h2>
<ul class="list-inline text-right chvrn">
<li><a href="#mb-pnl" title="Search and menus" aria-controls="mb-pnl" class="overlay-lnk" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Search and menus</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
<!-- Site Search Removed -->
</div>
</div>
<nav role="navigation" id="wb-sm" class="wb-menu visible-md visible-lg" data-trgt="mb-pnl" data-ajax-fetch="//cdn.canada.ca/gcweb-cdn-dev/sitemenu/sitemenu-en.html" typeof="SiteNavigationElement">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https://www.canada.ca/en/services/jobs.html">Jobs</a></li>
<li><a href="http://www.cic.gc.ca/english/index.asp">Immigration</a></li>
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https://www.canada.ca/en/services/business.html">Business</a></li>
<li><a href="https://www.canada.ca/en/services/benefits.html">Benefits</a></li>
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li>
<li><a href="https://www.canada.ca/en/services.html">More services</a></li>
</ul>
</div>
</div>
</nav>
<!-- EPIC BODY BEGIN -->
<nav role="navigation" id="wb-bc" class="" property="breadcrumb">
<h2 class="wb-inv">You are here:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li><a href="/eic/site/icgc.nsf/eng/home" title="Home">Home</a></li>
<li><a href="/eic/site/icgc.nsf/eng/h_07063.html" title="Industries and Business">Industries and Business</a></li>
<li><a href="/eic/site/ccc-rec.nsf/tpl-eng/../eng/home" >Canadian Company Capabilities</a></li>
</ol>
</div>
</div>
</nav>
</header>
<main id="wb-cont" role="main" property="mainContentOfPage" class="container">
<!-- End Header -->
<!-- Begin Body -->
<!-- Begin Body Title -->
<!-- End Body Title -->
<!-- Begin Body Head -->
<!-- End Body Head -->
<!-- Begin Body Content -->
<br>
<!-- Complete Profile -->
<!-- Company Information above tabbed area-->
<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>
<h1 id="wb-cont">
Company profile - Canadian Company Capabilities
</h1>
<div class="profileInfo hidden-print">
<ul class="list-inline">
<li><a href="cccSrch.do?lang=eng&profileId=&prtl=1&key.hitsPerPage=25&searchPage=%252Fapp%252Fccc%252Fsrch%252FcccBscSrch.do%253Flang%253Deng%2526amp%253Bprtl%253D1%2526amp%253Btagid%253D&V_SEARCH.scopeCategory=CCC.Root&V_SEARCH.depth=1&V_SEARCH.showStricts=false&V_SEARCH.sortSpec=title+asc&rstBtn.x=" class="btn btn-link">New Search</a> |</li>
<li><form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">
<input type="hidden" name="lang" value="eng" />
<input type="hidden" name="profileId" value="" />
<input type="hidden" name="prtl" value="1" />
<input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D" />
<input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />
<input type="hidden" name="V_SEARCH.depth" value="1" />
<input type="hidden" name="V_SEARCH.showStricts" value="false" />
<input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />
</form></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=32285&V_DOCUMENT.docRank=32286&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492306350211&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567061823&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=32287&V_DOCUMENT.docRank=32288&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492306350211&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567153975&profileId=&key.newSearchLabel=">Next Company</a></li>
</ul>
</div>
<details>
<summary>Third-Party Information Liability Disclaimer</summary>
<p>Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.</p>
</details>
<h2>
New Persona Fitness
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal Name:</h2>
<p>New Persona Fitness</p>
<h2 class="h5 mrgn-bttm-0">Operating Name:</h2>
<p>New Persona</p>
<div class="mrgn-tp-md"></div>
<p class="mrgn-bttm-0" ><a href="http://www.newpersona.info"
target="_blank" title="Website URL">http://www.newpersona.info</a></p>
<p><a href="mailto:coaches@newpersona.info" title="coaches@newpersona.info">coaches@newpersona.info</a></p>
</div>
<div class="col-md-4 mrgn-sm-sm">
<h2 class="h5 mrgn-bttm-0">Mailing Address:</h2>
<address class="mrgn-bttm-md">
PO Box 192 Station F <br/>
TORONTO,
Ontario<br/>
M4Y 2L5
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
B4-490 Bramalea Rd<br/>
BRAMPTON,
Ontario<br/>
L6T 0G1
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(647) 492-7848
</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
</p>
</div>
<div class="col-md-3 mrgn-tp-md">
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> New Persona is a lifestyle brand. We offer workplace wellness programs, employee wellness programs, fitness training, group training and other health and fitness based program solutions in Brampton, Toronto and the GTA.<br>
</div>
</div>
<!-- <div class="wb-tabs ignore-session update-hash wb-eqht-off print-active"> -->
<div class="wb-tabs ignore-session">
<div class="tabpanels">
<details id="details-panel1">
<summary>
Full profile
</summary>
<!-- Tab 1 -->
<h2 class="wb-invisible">
Full profile
</h2>
<!-- Contact Information -->
<h3 class="page-header">
Contact information
</h3>
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Femi
Doyle-Marshall
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Director
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(647) 492-7848
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
fdoylemarshall@newpersona.info
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Company Description -->
<h3 class="page-header">
Company description
</h3>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
713940 - Fitness and Recreational Sports Centres
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
812190 - Other Personal Care Services<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Services
</div>
</div>
</section>
<!-- Products / Services / Licensing -->
<h3 class="page-header">
Product / Service / Licensing
</h3>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Workplace Wellness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
The workplace has the ability to embody wellness. Our workplace wellness programs provide the ultimate educational experience for our corporate members. Education stands at the forefront.<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Employee Wellness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Your team is the greatest investment. In our employee wellness programs and workplace wellness programs we provide on site and off site solutions. Bring physically activity into the workplace to supercharge your team.<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
General Fitness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
his is perfect for those already active. If you’re already strong why not get stronger? If you’re already healthy why not get healthier? General fitness programs are for you. Work with one of our coaches to get on the right track towards your health.<br>
<br>
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Technology Profile -->
<!-- Market Profile -->
<!-- Sector Information -->
<details class="mrgn-tp-md mrgn-bttm-md">
<summary>
Third-Party Information Liability Disclaimer
</summary>
<p>
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
</p>
</details>
</details>
<details id="details-panel2">
<summary>
Contacts
</summary>
<h2 class="wb-invisible">
Contact information
</h2>
<!-- Contact Information -->
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Femi
Doyle-Marshall
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Director
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(647) 492-7848
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
fdoylemarshall@newpersona.info
</div>
</div>
</section>
</details>
<details id="details-panel3">
<summary>
Description
</summary>
<h2 class="wb-invisible">
Company description
</h2>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
No
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
713940 - Fitness and Recreational Sports Centres
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Alternate Industries (NAICS):
</strong>
</div>
<div class="col-md-7">
812190 - Other Personal Care Services<br>
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Services
</div>
</div>
</section>
</details>
<details id="details-panel4">
<summary>
Products, services and licensing
</summary>
<h2 class="wb-invisible">
Product / Service / Licensing
</h2>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Workplace Wellness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
The workplace has the ability to embody wellness. Our workplace wellness programs provide the ultimate educational experience for our corporate members. Education stands at the forefront.<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Employee Wellness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Your team is the greatest investment. In our employee wellness programs and workplace wellness programs we provide on site and off site solutions. Bring physically activity into the workplace to supercharge your team.<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
General Fitness Programs<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
his is perfect for those already active. If you’re already strong why not get stronger? If you’re already healthy why not get healthier? General fitness programs are for you. Work with one of our coaches to get on the right track towards your health.<br>
<br>
</div>
</div>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2016-06-15
</div>
</div>
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
<!-- End Body Content -->
<!-- Begin Body Foot -->
<!-- End Body Foot -->
<!-- END MAIN TABLE -->
<!-- End body -->
<!-- Begin footer -->
<div class="row pagedetails">
<div class="col-sm-5 col-xs-12 datemod">
<dl id="wb-dtmd">
<dt class=" hidden-print">Date Modified:</dt>
<dd class=" hidden-print">
<span><time>2017-03-02</time></span>
</dd>
</dl>
</div>
<div class="clear visible-xs"></div>
<div class="col-sm-4 col-xs-6">
</div>
<div class="col-sm-3 col-xs-6 text-right">
</div>
<div class="clear visible-xs"></div>
</div>
</main>
<footer role="contentinfo" id="wb-info">
<nav role="navigation" class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<!-- EPIC FOOTER BEGIN -->
<!-- EPI-11638 Contact us -->
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07026.html#pageid=E048-H00000&from=Industries">Contact us</a></li>
<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li>
<li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li>
<li><a href="https://www.canada.ca/en/news.html">News</a></li>
<li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li>
<li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li>
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li>
<li><a href="http://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https://www.canada.ca/en/social.html">Social media</a></li>
<li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li>
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html">Terms and conditions</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html#p1">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew2.min.js"></script>
<![endif]-->
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/theme.min.js"></script>
<!-- EPI-10519 -->
<span class="wb-sessto"
data-wb-sessto='{"inactivity": 1800000, "reactionTime": 180000, "sessionalive": 1800000, "logouturl": "/app/ccc/srch/cccSrch.do?lang=eng&prtl=1"}'></span>
<script src="/eic/home.nsf/js/jQuery.externalOpensInNewWindow.js"></script>
<!-- EPI-11190 - Webtrends -->
<script src="/eic/home.nsf/js/webtrends.js"></script>
<script>var endTime = new Date();</script>
<noscript>
<div><img alt="" id="DCSIMG" width="1" height="1" src="//wt-sdc.ic.gc.ca/dcs6v67hwe0ei7wsv8g9fv50d_3k6i/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=9.4.0&dcssip=www.ic.gc.ca"/></div>
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/_WET_4-0_utils_canada.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' data-project-groupid='' data-project-artifactid='' data-project-version='' data-project-build-timestamp='' data-issue-tracking='' data-scm-sha1='' data-scm-sha1-abbrev='' data-scm-branch='' data-scm-commit-date=''></span>
</body></html>
<!-- End Footer -->
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
|
GoC-Spending/data-corporations
|
html/234567163063.html
|
HTML
|
mit
| 42,216
|
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { getComponentTestId } from 'utils/test-utils';
import { head } from 'ramda';
import Modal from 'react-modal';
import * as nodeValidation from 'validations/node';
import * as eventUtils from 'utils/event';
import EditNodeCptModal from './component';
const renderComponent = (props) => {
Modal.setAppElement(document.body);
return {
...render(<EditNodeCptModal {...props} />),
element: document.body.lastChild,
};
};
describe('EditNodeCptModal Component', () => {
let component;
describe('When node has no parents', () => {
const props = {
node: {
id: 'Node 1',
states: [
'True',
'False',
],
parents: [],
cpt: {
True: 0.5,
False: 0.5,
},
},
hasParents: false,
onSave: jest.fn(),
onCancel: jest.fn(),
onAlert: jest.fn(),
};
beforeEach(() => {
component = renderComponent(props);
});
it('matches snapshot', () => {
expect(component.element).toMatchSnapshot();
});
describe('When key pressed in cpt input', () => {
beforeEach(() => {
props.onSave.mockClear();
});
describe('and is "enter" key', () => {
const { isEnterKey } = eventUtils;
beforeEach(() => {
const { getAllByTestId } = component;
const inputCptTrueState = head(getAllByTestId(getComponentTestId('InputCpt', 'True')));
eventUtils.isEnterKey = () => true;
fireEvent.keyUp(inputCptTrueState);
});
afterAll(() => {
eventUtils.isEnterKey = isEnterKey;
});
it('calls onSave fucntion', () => {
expect(props.onSave).toHaveBeenCalledWith(props.node.id, props.node.cpt);
});
});
describe('and is not "enter" key', () => {
const { isEnterKey } = eventUtils;
beforeEach(() => {
const { getAllByTestId } = component;
const inputCptTrueState = head(getAllByTestId(getComponentTestId('InputCpt', 'True')));
eventUtils.isEnterKey = () => false;
fireEvent.keyUp(inputCptTrueState);
});
afterAll(() => {
eventUtils.isEnterKey = isEnterKey;
});
it('does not call onSave fucntion', () => {
expect(props.onSave).not.toHaveBeenCalled();
});
});
});
describe('When saving', () => {
beforeEach(() => {
props.onSave.mockClear();
props.onAlert.mockClear();
});
describe('and cpt is valid', () => {
beforeEach(() => {
const { getByText } = component;
const saveButton = getByText('Salvar');
fireEvent.click(saveButton);
});
it('calls onSave function with cpt', () => {
expect(props.onSave).toHaveBeenCalledWith(props.node.id, props.node.cpt);
});
});
describe('and cpt is invalid', () => {
const { isNodeCptValid } = nodeValidation;
beforeEach(() => {
const { getByText } = component;
const saveButton = getByText('Salvar');
nodeValidation.isNodeCptValid = () => false;
fireEvent.click(saveButton);
});
afterAll(() => {
nodeValidation.isNodeCptValid = isNodeCptValid;
});
it('calls onAlert function with message', () => {
expect(props.onAlert).toHaveBeenCalledWith('A soma das probabilidades para cada uma das linhas deve ser igual a 1');
});
});
});
});
describe('When node has parents', () => {
const props = {
node: {
id: 'Node 3',
states: [
'True',
'False',
],
parents: [
'Node 2',
'Node 1',
],
cpt: [
{
when: {
'Node 2': 'True',
'Node 1': 'True',
},
then: {
True: 0.5,
False: 0.5,
},
},
{
when: {
'Node 2': 'False',
'Node 1': 'True',
},
then: {
True: 0.5,
False: 0.5,
},
},
{
when: {
'Node 2': 'True',
'Node 1': 'False',
},
then: {
True: 0.5,
False: 0.5,
},
},
{
when: {
'Node 2': 'False',
'Node 1': 'False',
},
then: {
True: 0.5,
False: 0.5,
},
},
],
},
hasParents: true,
onSave: jest.fn(),
onCancel: jest.fn(),
onAlert: jest.fn(),
};
beforeEach(() => {
component = renderComponent(props);
});
it('matches snapshot', () => {
expect(component.element).toMatchSnapshot();
});
describe('When key pressed in cpt input', () => {
beforeEach(() => {
props.onSave.mockClear();
});
describe('and is "enter" key', () => {
const { isEnterKey } = eventUtils;
beforeEach(() => {
const { getAllByTestId } = component;
const inputCptTrueState = head(getAllByTestId(getComponentTestId('InputCpt', 'True')));
eventUtils.isEnterKey = () => true;
fireEvent.keyUp(inputCptTrueState);
});
afterAll(() => {
eventUtils.isEnterKey = isEnterKey;
});
it('calls onSave fucntion', () => {
expect(props.onSave).toHaveBeenCalledWith(props.node.id, props.node.cpt);
});
});
describe('and is not "enter" key', () => {
const { isEnterKey } = eventUtils;
beforeEach(() => {
const { getAllByTestId } = component;
const inputCptTrueState = head(getAllByTestId(getComponentTestId('InputCpt', 'True')));
eventUtils.isEnterKey = () => false;
fireEvent.keyUp(inputCptTrueState);
});
afterAll(() => {
eventUtils.isEnterKey = isEnterKey;
});
it('does not call onSave fucntion', () => {
expect(props.onSave).not.toHaveBeenCalled();
});
});
});
describe('When saving', () => {
beforeEach(() => {
props.onSave.mockClear();
props.onAlert.mockClear();
});
describe('and cpt is valid', () => {
beforeEach(() => {
const { getByText } = component;
const saveButton = getByText('Salvar');
fireEvent.click(saveButton);
});
it('calls onSave function with cpt', () => {
expect(props.onSave).toHaveBeenCalledWith(props.node.id, props.node.cpt);
});
});
describe('and cpt is invalid', () => {
const { isNodeCptValid } = nodeValidation;
beforeEach(() => {
const { getByText } = component;
const saveButton = getByText('Salvar');
nodeValidation.isNodeCptValid = () => false;
fireEvent.click(saveButton);
});
afterAll(() => {
nodeValidation.isNodeCptValid = isNodeCptValid;
});
it('calls onAlert function with message', () => {
expect(props.onAlert).toHaveBeenCalledWith('A soma das probabilidades para cada uma das linhas deve ser igual a 1');
});
});
});
});
});
|
fhelwanger/bayesjs-editor
|
src/components/EditNodeCptModal/index.test.js
|
JavaScript
|
mit
| 7,502
|
<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About TheoremCoin</source>
<translation>Om TheoremCoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>TheoremCoin</b> version</source>
<translation><b>TheoremCoin</b> versjon</translation>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2015 The TheoremCoin developers</source>
<translation>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2015 The TheoremCoin developers</translation>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href="https://www.openssl.org/">https://www.openssl.org/</a>) and cryptographic software written by Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adressebok</translation>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Dobbeltklikk for å redigere adresse eller merkelapp</translation>
</message>
<message>
<location line="+24"/>
<source>Create a new address</source>
<translation>Lag en ny adresse</translation>
</message>
<message>
<location line="+10"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Kopier den valgte adressen til systemets utklippstavle</translation>
</message>
<message>
<location line="-7"/>
<source>&New Address</source>
<translation>&Ny Adresse</translation>
</message>
<message>
<location line="-43"/>
<source>These are your TheoremCoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Dette er adressene for å motta betalinger. Du ønsker kanskje å gi ulike adresser til hver avsender så du lettere kan holde øye med hvem som betaler deg.</translation>
</message>
<message>
<location line="+53"/>
<source>&Copy Address</source>
<translation>&Kopier Adresse</translation>
</message>
<message>
<location line="+7"/>
<source>Show &QR Code</source>
<translation>Vis &QR Kode</translation>
</message>
<message>
<location line="+7"/>
<source>Sign a message to prove you own a TheoremCoin address</source>
<translation>Signer en melding for å bevise din egen TheoremCoin adresse.</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Signer &Melding</translation>
</message>
<message>
<location line="+17"/>
<source>Delete the currently selected address from the list</source>
<translation>Slett den valgte adressen fra listen.</translation>
</message>
<message>
<location line="-10"/>
<source>Verify a message to ensure it was signed with a specified TheoremCoin address</source>
<translation>Verifiser en melding får å forsikre deg om at den er signert med en spesifikk TheoremCoin adresse</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Verifiser en melding</translation>
</message>
<message>
<location line="+10"/>
<source>&Delete</source>
<translation>&Slett</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation>Kopier &Merkelapp</translation>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation>&Rediger</translation>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation>Eksporter Adressebok</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommaseparert fil (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Feil under eksportering</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kunne ikke skrive til filen %1</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+145"/>
<source>Label</source>
<translation>Merkelapp</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(ingen merkelapp)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Dialog for Adgangsfrase</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Angi adgangsfrase</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Ny adgangsfrase</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Gjenta ny adgangsfrase</translation>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+38"/>
<source>Encrypt wallet</source>
<translation>Krypter lommebok</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Denne operasjonen krever adgangsfrasen til lommeboken for å låse den opp.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Lås opp lommebok</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Denne operasjonen krever adgangsfrasen til lommeboken for å dekryptere den.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Dekrypter lommebok</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Endre adgangsfrase</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Skriv inn gammel og ny adgangsfrase for lommeboken.</translation>
</message>
<message>
<location line="+45"/>
<source>Confirm wallet encryption</source>
<translation>Bekreft kryptering av lommebok</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation>Advarsel: Viss du krypterer lommeboken og mister passordet vil du <b>MISTE ALLE MYNTENE DINE</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Er du sikker på at du vil kryptere lommeboken?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>VIKTIG: Tidligere sikkerhetskopier av din lommebok-fil, bør erstattes med den nylig genererte, krypterte filen, da de blir ugyldiggjort av sikkerhetshensyn så snart du begynner å bruke den nye krypterte lommeboken.</translation>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Advarsel: Caps Lock er på !</translation>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Lommebok kryptert</translation>
</message>
<message>
<location line="-140"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>TheoremCoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Kryptering av lommebok feilet</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Kryptering av lommebok feilet på grunn av en intern feil. Din lommebok ble ikke kryptert.</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>De angitte adgangsfrasene er ulike.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Opplåsing av lommebok feilet</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Adgangsfrasen angitt for dekryptering av lommeboken var feil.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Dekryptering av lommebok feilet</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Adgangsfrase for lommebok endret.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+297"/>
<source>Sign &message...</source>
<translation>Signer &melding...</translation>
</message>
<message>
<location line="-64"/>
<source>Show general overview of wallet</source>
<translation>Vis generell oversikt over lommeboken</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&Transaksjoner</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Vis transaksjonshistorikk</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation>&Adressebok</translation>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Endre listen med lagrede adresser og merkelapper</translation>
</message>
<message>
<location line="-18"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Vis listen med adresser for å motta betalinger</translation>
</message>
<message>
<location line="+34"/>
<source>E&xit</source>
<translation>&Avslutt</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Avslutt applikasjonen</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about TheoremCoin</source>
<translation>Vis info om TheoremCoin</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Om &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Vis informasjon om Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Innstillinger...</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation>&Krypter Lommebok...</translation>
</message>
<message>
<location line="+2"/>
<source>&Backup Wallet...</source>
<translation>Lag &Sikkerhetskopi av Lommebok...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Endre Adgangsfrase...</translation>
</message>
<message>
<location line="+9"/>
<source>&Export...</source>
<translation>&Eksporter...</translation>
</message>
<message>
<location line="-55"/>
<source>Send coins to a TheoremCoin address</source>
<translation>Send coins til en TheoremCoin adresse</translation>
</message>
<message>
<location line="+39"/>
<source>Modify configuration options for TheoremCoin</source>
<translation>Endre innstillingene til TheoremCoin</translation>
</message>
<message>
<location line="+17"/>
<source>Export the data in the current tab to a file</source>
<translation>Eksporter dataene i nåværende fane til en fil</translation>
</message>
<message>
<location line="-13"/>
<source>Encrypt or decrypt wallet</source>
<translation>Krypter eller dekrypter lommeboken</translation>
</message>
<message>
<location line="+2"/>
<source>Backup wallet to another location</source>
<translation>Sikkerhetskopiér lommebok til annet sted</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Endre adgangsfrasen brukt for kryptering av lommebok</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation>&Feilsøkingsvindu</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Åpne konsoll for feilsøk og diagnostikk</translation>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation>&Verifiser melding...</translation>
</message>
<message>
<location line="-214"/>
<location line="+555"/>
<source>TheoremCoin</source>
<translation>TheoremCoin</translation>
</message>
<message>
<location line="-555"/>
<source>Wallet</source>
<translation>Lommebok</translation>
</message>
<message>
<location line="+193"/>
<source>&About TheoremCoin</source>
<translation>&Om TheoremCoin</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Gjem / vis</translation>
</message>
<message>
<location line="+8"/>
<source>Unlock wallet</source>
<translation>Lås opp lommebok</translation>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation>&Lås Lommeboken</translation>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation>Lås lommeboken</translation>
</message>
<message>
<location line="+32"/>
<source>&File</source>
<translation>&Fil</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&Innstillinger</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&Hjelp</translation>
</message>
<message>
<location line="+17"/>
<source>Tabs toolbar</source>
<translation>Verktøylinje for faner</translation>
</message>
<message>
<location line="+46"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[testnett]</translation>
</message>
<message>
<location line="+0"/>
<location line="+58"/>
<source>TheoremCoin client</source>
<translation>TheoremCoin klient</translation>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to TheoremCoin network</source>
<translation><numerusform>%n aktiv tilkobling til TheoremCoin nettverket</numerusform><numerusform>%n aktive tilkoblinger til TheoremCoin nettverket</numerusform></translation>
</message>
<message>
<location line="+488"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-812"/>
<source>&Dashboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>&Unlock Wallet...</source>
<translation>&Lås opp lommeboken</translation>
</message>
<message>
<location line="+277"/>
<source>Up to date</source>
<translation>Ajour</translation>
</message>
<message>
<location line="+43"/>
<source>Catching up...</source>
<translation>Kommer ajour...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation>Sendt transaksjon</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>Innkommende transaksjon</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Dato: %1
Beløp: %2
Type: %3
Adresse: %4
</translation>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid TheoremCoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Wallet is <b>not encrypted</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Lommeboken er <b>kryptert</b> og for tiden <b>ulåst</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Lommeboken er <b>kryptert</b> og for tiden <b>låst</b></translation>
</message>
<message>
<location line="+24"/>
<source>Backup Wallet</source>
<translation>Sikkerhetskopier Lommeboken</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Lommebokdata (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Sikkerhetskopiering feilet</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+91"/>
<source>%n second(s)</source>
<translation><numerusform>%n sekund</numerusform><numerusform>%n sekunder</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation><numerusform>%n minutt</numerusform><numerusform>%n minutter</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+433"/>
<source>%n hour(s)</source>
<translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
</message>
<message>
<location line="-456"/>
<source>Processed %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+27"/>
<location line="+433"/>
<source>%n day(s)</source>
<translation><numerusform>%n dag</numerusform><numerusform>%n dager</numerusform></translation>
</message>
<message numerus="yes">
<location line="-429"/>
<location line="+6"/>
<source>%n week(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+0"/>
<source>%1 and %2</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+0"/>
<source>%n year(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>%1 behind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Last received block was generated %1 ago.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+324"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+104"/>
<source>A fatal error occurred. TheoremCoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+110"/>
<source>Network Alert</source>
<translation>Nettverksvarsel</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation>Mengde:</translation>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation>Bytes:</translation>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>Beløp:</translation>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation>Prioritet:</translation>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation>Avgift:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Lav Utdata:</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+537"/>
<source>no</source>
<translation>nei</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation>Etter Avgift:</translation>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation>Endring:</translation>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation>Fjern alt valgt</translation>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation>Tre modus</translation>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation>Liste modus</translation>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Beløp</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation>Merkelapp</translation>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Dato</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation>Bekreftelser</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>Bekreftet</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation>Prioritet</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-500"/>
<source>Copy address</source>
<translation>Kopier adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopier merkelapp</translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>Kopiér beløp</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation>Kopier transaksjons-ID</translation>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation>Kopier mengde</translation>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation>Kopier gebyr</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Kopier etter gebyr</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation>Kopier prioritet</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Kopier veksel</translation>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation>høyest</translation>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation>høy</translation>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation>medium-høy</translation>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation>medium</translation>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation>lav-medium</translation>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation>lav</translation>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation>lavest</translation>
</message>
<message>
<location line="+140"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation>ja</translation>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation>Denne merkelappen blir rød, viss endringen er mindre enn %1
Dette betyr at det trengs en avgift på minimum %2.</translation>
</message>
<message>
<location line="+36"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(ingen merkelapp)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation>endring fra %1 (%2)</translation>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation>(endring)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Rediger adresse</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Merkelapp</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Merkelappen assosiert med denne adressen</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adresse</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Ny mottaksadresse</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Ny utsendingsadresse</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Rediger mottaksadresse</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Rediger utsendingsadresse</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Den oppgitte adressen "%1" er allerede i adresseboken.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid TheoremCoin address.</source>
<translation>Den angitte adressen "%1" er ikke en gyldig TheoremCoin adresse.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Kunne ikke låse opp lommeboken.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Generering av ny nøkkel feilet.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+426"/>
<location line="+12"/>
<source>TheoremCoin-Qt</source>
<translation>TheoremCoin-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>versjon</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Bruk:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Start Minimert</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Innstillinger</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Hoved</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Betal transaksjons&gebyr</translation>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start TheoremCoin after logging in to the system.</source>
<translation>Start TheoremCoin automatisk ved hver innlogging.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start TheoremCoin on system login</source>
<translation>&Start Theoremcoin ved innlogging</translation>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation>&Nettverk</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the TheoremCoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Sett opp port vha. &UPnP</translation>
</message>
<message>
<location line="+19"/>
<source>Proxy &IP:</source>
<translation>Proxy &IP:</translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port:</translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Proxyens port (f.eks. 9050)</translation>
</message>
<message>
<location line="-57"/>
<source>Connect to the TheoremCoin network through a SOCKS5 proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS5 proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+90"/>
<source>&Window</source>
<translation>&Vindu</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Vis kun ikon i systemkurv etter minimering av vinduet.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimer til systemkurv istedenfor oppgavelinjen</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimerer vinduet istedenfor å avslutte applikasjonen når vinduet lukkes. Når dette er slått på avsluttes applikasjonen kun ved å velge avslutt i menyen.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimer ved lukking</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Visning</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>&Språk for brukergrensesnitt</translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting TheoremCoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Enhet for visning av beløper:</translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Velg standard delt enhet for visning i grensesnittet og for sending av theoremcoins.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show coin control features or not.</source>
<translation>Skal mynt kontroll funksjoner vises eller ikke.</translation>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to select the coin outputs randomly or with minimal coin age.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Minimize weight consumption (experimental)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Use black visual theme (requires restart)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Avbryt</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Bruk</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+47"/>
<source>default</source>
<translation>standardverdi</translation>
</message>
<message>
<location line="+148"/>
<location line="+9"/>
<source>Warning</source>
<translation>Advarsel</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting TheoremCoin.</source>
<translation>Denne innstillingen vil tre i kraft etter TheoremCoin er blitt startet på nytt.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Angitt proxyadresse er ugyldig.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Skjema</translation>
</message>
<message>
<location line="+46"/>
<location line="+247"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the TheoremCoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-173"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Unconfirmed:</source>
<translation>Ubekreftet:</translation>
</message>
<message>
<location line="-113"/>
<source>Wallet</source>
<translation>Lommebok</translation>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation>Disponibelt:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation>Din nåværende saldo</translation>
</message>
<message>
<location line="+80"/>
<source>Immature:</source>
<translation>Umoden:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Minet saldo har ikke modnet enda</translation>
</message>
<message>
<location line="+23"/>
<source>Total:</source>
<translation>Totalt:</translation>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation>Din nåværende saldo</translation>
</message>
<message>
<location line="+50"/>
<source><b>Recent transactions</b></source>
<translation><b>Siste transaksjoner</b></translation>
</message>
<message>
<location line="-118"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-32"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>ute av synk</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start theoremcoin: click-to-pay handler</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Beløp:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Merkelapp:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Melding:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Lagre som...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG Bilder (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Klientnavn</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<source>N/A</source>
<translation>-</translation>
</message>
<message>
<location line="-194"/>
<source>Client version</source>
<translation>Klientversjon</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Informasjon</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Bruker OpenSSL versjon</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Oppstartstidspunkt</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Nettverk</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Antall tilkoblinger</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Blokkjeden</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Nåværende antall blokker</translation>
</message>
<message>
<location line="+197"/>
<source>&Network Traffic</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Clear</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Totals</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>In:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+80"/>
<source>Out:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-383"/>
<source>Last block time</source>
<translation>Tidspunkt for siste blokk</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Åpne</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the TheoremCoin-Qt help message to get a list with possible TheoremCoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Vis</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsoll</translation>
</message>
<message>
<location line="-237"/>
<source>Build date</source>
<translation>Byggedato</translation>
</message>
<message>
<location line="-104"/>
<source>TheoremCoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>TheoremCoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+256"/>
<source>Debug log file</source>
<translation>Loggfil for feilsøk</translation>
</message>
<message>
<location line="+7"/>
<source>Open the TheoremCoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Tøm konsoll</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="+325"/>
<source>Welcome to the TheoremCoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Bruk opp og ned pil for å navigere historikken, og <b>Ctrl-L</b> for å tømme skjermen.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Skriv <b>help</b> for en oversikt over kommandoer.</translation>
</message>
<message>
<location line="+127"/>
<source>%1 B</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 KB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 MB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 GB</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>%1 m</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>%1 h</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 h %2 m</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Send Theoremcoins</translation>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation>Mynt Kontroll Funksjoner</translation>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation>Inndata...</translation>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation>automatisk valgte</translation>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation>Utilstrekkelige midler!</translation>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation>Mengde:</translation>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation>Bytes:</translation>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation>Beløp:</translation>
</message>
<message>
<location line="+35"/>
<source>Priority:</source>
<translation>Prioritet:</translation>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation>Avgift:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Lav Utdata:</translation>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation>nei</translation>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation>Etter Avgift:</translation>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>Send til flere enn én mottaker</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>&Legg til Mottaker</translation>
</message>
<message>
<location line="+16"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Fjern &Alt</translation>
</message>
<message>
<location line="+24"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+47"/>
<source>Confirm the send action</source>
<translation>Bekreft sending</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>S&end</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-174"/>
<source>Enter a TheoremCoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation>Kopier mengde</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiér beløp</translation>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation>Kopier gebyr</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+87"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> til %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Bekreft sending av bitcoins</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Er du sikker på du ønsker å sende %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation>og</translation>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Adresse for mottaker er ugyldig.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Beløpen som skal betales må være over 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Beløpet overstiger saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Totalbeløpet overstiger saldo etter at %1 transaksjonsgebyr er lagt til.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Duplikate adresser funnet. Kan bare sende én gang til hver adresse per operasjon.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+247"/>
<source>WARNING: Invalid TheoremCoin address</source>
<translation>ADVARSEL: Ugyldig TheoremCoin adresse</translation>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(ingen merkelapp)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Beløp:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Betal &Til:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Skriv inn en merkelapp for denne adressen for å legge den til i din adressebok</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Merkelapp:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Velg adresse fra adresseboken</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Lim inn adresse fra utklippstavlen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Fjern denne mottakeren</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a TheoremCoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Signaturer - Signer / Verifiser en melding</translation>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation>&Signér Melding</translation>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Du kan signere meldinger med dine adresser for å bevise at du eier dem. Ikke signér vage meldinger da phishing-angrep kan prøve å lure deg til å signere din identitet over til andre. Signér kun fullt detaljerte utsagn som du er enig i.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation>Velg en adresse fra adresseboken</translation>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Lim inn adresse fra utklippstavlen</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Skriv inn meldingen du vil signere her</translation>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Kopier valgt signatur til utklippstavle</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this TheoremCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation>Tilbakestill alle felter for meldingssignering</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Fjern &Alt</translation>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation>&Verifiser Melding</translation>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Angi adresse for signering, melding (vær sikker på at du kopierer linjeskift, mellomrom, tab, etc. helt nøyaktig) og signatur under for å verifisere meldingen. Vær forsiktig med at du ikke gir signaturen mer betydning enn det som faktisk står i meldingen, for å unngå å bli lurt av såkalte "man-in-the-middle" angrep.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified TheoremCoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation>Tilbakestill alle felter for meldingsverifikasjon</translation>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a TheoremCoin address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Klikk "Signer Melding" for å generere signatur</translation>
</message>
<message>
<location line="+3"/>
<source>Enter TheoremCoin signature</source>
<translation>Skriv inn TheoremCoin signatur</translation>
</message>
<message>
<location line="+85"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Angitt adresse er ugyldig.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Vennligst sjekk adressen og prøv igjen.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Angitt adresse refererer ikke til en nøkkel.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Opplåsing av lommebok ble avbrutt.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Privat nøkkel for den angitte adressen er ikke tilgjengelig.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Signering av melding feilet.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Melding signert.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Signaturen kunne ikke dekodes.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Vennligst sjekk signaturen og prøv igjen.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>Signaturen passer ikke til meldingen.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Verifikasjon av melding feilet.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Melding verifisert.</translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+75"/>
<source>KB/s</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+25"/>
<source>Open until %1</source>
<translation>Åpen til %1</translation>
</message>
<message>
<location line="+6"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation>%1/frakoblet</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/ubekreftet</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 bekreftelser</translation>
</message>
<message>
<location line="+17"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, kringkast gjennom %n node</numerusform><numerusform>, kringkast gjennom %n noder</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Dato</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Kilde</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generert</translation>
</message>
<message>
<location line="+5"/>
<location line="+13"/>
<source>From</source>
<translation>Fra</translation>
</message>
<message>
<location line="+1"/>
<location line="+19"/>
<location line="+58"/>
<source>To</source>
<translation>Til</translation>
</message>
<message>
<location line="-74"/>
<location line="+2"/>
<source>own address</source>
<translation>egen adresse</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>merkelapp</translation>
</message>
<message>
<location line="+34"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Kredit</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>blir moden om %n blokk</numerusform><numerusform>blir moden om %n blokker</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>ikke akseptert</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Debet</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Transaksjonsgebyr</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Nettobeløp</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Melding</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Kommentar</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Transaksjons-ID</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Informasjon for feilsøk</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transaksjon</translation>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation>Inndata</translation>
</message>
<message>
<location line="+21"/>
<source>Amount</source>
<translation>Beløp</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>sann</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>usann</translation>
</message>
<message>
<location line="-202"/>
<source>, has not been successfully broadcast yet</source>
<translation>, har ikke blitt kringkastet uten problemer enda.</translation>
</message>
<message numerus="yes">
<location line="-36"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+67"/>
<source>unknown</source>
<translation>ukjent</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Transaksjonsdetaljer</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Her vises en detaljert beskrivelse av transaksjonen</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+231"/>
<source>Date</source>
<translation>Dato</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Type</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Beløp</translation>
</message>
<message>
<location line="+52"/>
<source>Open until %1</source>
<translation>Åpen til %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Bekreftet (%1 bekreftelser)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Åpen for %n blokk til</numerusform><numerusform>Åpen for %n blokker til</numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation>Ubekreftet</translation>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation>Bekrefter (%1 av %2 anbefalte bekreftelser)</translation>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Denne blokken har ikke blitt mottatt av noen andre noder og vil sannsynligvis ikke bli akseptert!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generert men ikke akseptert</translation>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation>Mottatt med</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Mottatt fra</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Sendt til</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Betaling til deg selv</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Utvunnet</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>-</translation>
</message>
<message>
<location line="+194"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transaksjonsstatus. Hold muspekeren over dette feltet for å se antall bekreftelser.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Dato og tid for da transaksjonen ble mottat.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Type transaksjon.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Mottaksadresse for transaksjonen</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Beløp fjernet eller lagt til saldo.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+54"/>
<location line="+17"/>
<source>All</source>
<translation>Alle</translation>
</message>
<message>
<location line="-16"/>
<source>Today</source>
<translation>I dag</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Denne uken</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Denne måneden</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Forrige måned</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Dette året</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Intervall...</translation>
</message>
<message>
<location line="+12"/>
<source>Received with</source>
<translation>Mottatt med</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Sendt til</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Til deg selv</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Utvunnet</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Andre</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Skriv inn adresse eller merkelapp for søk</translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Minimumsbeløp</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Kopier adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopier merkelapp</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiér beløp</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Kopier transaksjons-ID</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Rediger merkelapp</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Vis transaksjonsdetaljer</translation>
</message>
<message>
<location line="+138"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommaseparert fil (*.csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Bekreftet</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Dato</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Type</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Merkelapp</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Beløp</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kunne ikke skrive til filen %1</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Intervall:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>til</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+208"/>
<source>Sending...</source>
<translation>Sender...</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+173"/>
<source>TheoremCoin version</source>
<translation>TheoremCoin versjon</translation>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation>Bruk:</translation>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or theoremcoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation>List opp kommandoer</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>Vis hjelpetekst for en kommando</translation>
</message>
<message>
<location line="-147"/>
<source>Options:</source>
<translation>Innstillinger:</translation>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: theoremcoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: theoremcoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation>Angi lommebok fil (inne i data mappe)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Angi mappe for datafiler</translation>
</message>
<message>
<location line="-25"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=theoremcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "TheoremCoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Sett størrelse på mellomlager for database i megabytes (standardverdi: 25)</translation>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Listen for connections on <port> (default: 63211 or testnet: 53211)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Hold maks <n> koblinger åpne til andre noder (standardverdi: 125)</translation>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Koble til node for å hente adresser til andre noder, koble så fra igjen</translation>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation>Angi din egen offentlige adresse</translation>
</message>
<message>
<location line="+4"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Always query for peer addresses via DNS lookup (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Grenseverdi for å koble fra noder med dårlig oppførsel (standardverdi: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Antall sekunder noder med dårlig oppførsel hindres fra å koble til på nytt (standardverdi: 86400)</translation>
</message>
<message>
<location line="-36"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>En feil oppstod ved opprettelse av RPC port %u for lytting: %s</translation>
</message>
<message>
<location line="+63"/>
<source>Listen for JSON-RPC connections on <port> (default: 63212 or testnet: 53212)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Ta imot kommandolinje- og JSON-RPC-kommandoer</translation>
</message>
<message>
<location line="+1"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Kjør i bakgrunnen som daemon og ta imot kommandoer</translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>Bruk testnettverket</translation>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Ta imot tilkoblinger fra utsiden (standardverdi: 1 hvis uten -proxy eller -connect)</translation>
</message>
<message>
<location line="-28"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>En feil oppstod under oppsettet av RPC port %u for IPv6, tilbakestilles til IPv4: %s</translation>
</message>
<message>
<location line="+94"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Advarsel: -paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner.</translation>
</message>
<message>
<location line="-104"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong TheoremCoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+132"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Advarsel: Feil ved lesing av wallet.dat! Alle taster lest riktig, men transaksjon dataene eller adresse innlegg er kanskje manglende eller feil.</translation>
</message>
<message>
<location line="-17"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Advarsel: wallet.dat korrupt, data reddet! Original wallet.dat lagret som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaksjoner ikke er korrekte bør du gjenopprette fra en backup.</translation>
</message>
<message>
<location line="-34"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Forsøk å berge private nøkler fra en korrupt wallet.dat</translation>
</message>
<message>
<location line="+5"/>
<source>Block creation options:</source>
<translation>Valg for opprettelse av blokker:</translation>
</message>
<message>
<location line="-68"/>
<source>Connect only to the specified node(s)</source>
<translation>Koble kun til angitt(e) node(r)</translation>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Oppdag egen IP-adresse (standardverdi: 1 ved lytting og uten -externalip)</translation>
</message>
<message>
<location line="+102"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Kunne ikke lytte på noen port. Bruk -listen=0 hvis det er dette du vil.</translation>
</message>
<message>
<location line="-92"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+90"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-89"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Maks mottaksbuffer per forbindelse, <n>*1000 bytes (standardverdi: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maks sendebuffer per forbindelse, <n>*1000 bytes (standardverdi: 1000)</translation>
</message>
<message>
<location line="-17"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Koble kun til noder i nettverket <nett> (IPv4, IPv6 eller Tor)</translation>
</message>
<message>
<location line="+31"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>SSL valg: (se Bitcoin Wiki for instruksjoner for oppsett av SSL)</translation>
</message>
<message>
<location line="-38"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Send spor/debug informasjon til konsollet istedenfor debug.log filen</translation>
</message>
<message>
<location line="+34"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Sett minimum blokkstørrelse i bytes (standardverdi: 0)</translation>
</message>
<message>
<location line="-34"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Krymp debug.log filen når klienten starter (standardverdi: 1 hvis uten -debug)</translation>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Angi tidsavbrudd for forbindelse i millisekunder (standardverdi: 5000)</translation>
</message>
<message>
<location line="+116"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Bruk UPnP for lytteport (standardverdi: 0)</translation>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Bruk UPnP for lytteport (standardverdi: 1 ved lytting)</translation>
</message>
<message>
<location line="-26"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source>Username for JSON-RPC connections</source>
<translation>Brukernavn for JSON-RPC forbindelser</translation>
</message>
<message>
<location line="+54"/>
<source>Verifying database integrity...</source>
<translation>Verifiserer databasens integritet...</translation>
</message>
<message>
<location line="+43"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: Transaction creation failed!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Advarsel: Denne versjonen er foreldet, oppgradering kreves!</translation>
</message>
<message>
<location line="-53"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat korrupt, bergning feilet</translation>
</message>
<message>
<location line="-59"/>
<source>Password for JSON-RPC connections</source>
<translation>Passord for JSON-RPC forbindelser</translation>
</message>
<message>
<location line="-48"/>
<source>Connect through SOCKS5 proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Output debugging information (default: 0, supplying <category> is optional)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>If <category> is not supplied, output all debugging information.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source><category> can be:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Tillat JSON-RPC tilkoblinger fra angitt IP-adresse</translation>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Send kommandoer til node på <ip> (standardverdi: 127.0.0.1)</translation>
</message>
<message>
<location line="+1"/>
<source>Wait for RPC server to start</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Eksekvér kommando når beste blokk endrer seg (%s i kommandoen erstattes med blokkens hash)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Kjør kommando når en lommeboktransaksjon endres (%s i cmd er erstattet med TxID)</translation>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation>Oppgradér lommebok til nyeste format</translation>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Angi størrelse på nøkkel-lager til <n> (standardverdi: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Se gjennom blokk-kjeden etter manglende lommeboktransaksjoner</translation>
</message>
<message>
<location line="+3"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Bruk OpenSSL (https) for JSON-RPC forbindelser</translation>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Servers sertifikat (standardverdi: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Servers private nøkkel (standardverdi: server.pem)</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Initialization sanity check failed. TheoremCoin is shutting down.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Error: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-174"/>
<source>This help message</source>
<translation>Denne hjelpemeldingen</translation>
</message>
<message>
<location line="+105"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation>Lommeboken %s holder til utenfor data mappen %s.</translation>
</message>
<message>
<location line="+36"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Kan ikke binde til %s på denne datamaskinen (bind returnerte feil %d, %s)</translation>
</message>
<message>
<location line="-131"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Tillat DNS oppslag for -addnode, -seednode og -connect</translation>
</message>
<message>
<location line="+127"/>
<source>Loading addresses...</source>
<translation>Laster adresser...</translation>
</message>
<message>
<location line="-10"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Feil ved lasting av wallet.dat: Lommeboken er skadet</translation>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of TheoremCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart TheoremCoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation>Feil ved lasting av wallet.dat</translation>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Ugyldig -proxy adresse: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Ukjent nettverk angitt i -onlynet '%s'</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Kunne ikke slå opp -bind adresse: '%s'</translation>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Kunne ikke slå opp -externalip adresse: '%s'</translation>
</message>
<message>
<location line="-22"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Ugyldig beløp for -paytxfee=<beløp>: '%s'</translation>
</message>
<message>
<location line="+59"/>
<source>Sending...</source>
<translation>Sender...</translation>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation>Ugyldig beløp</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>Utilstrekkelige midler</translation>
</message>
<message>
<location line="-40"/>
<source>Loading block index...</source>
<translation>Laster blokkindeks...</translation>
</message>
<message>
<location line="-111"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Legg til node for tilkobling og hold forbindelsen åpen</translation>
</message>
<message>
<location line="+126"/>
<source>Unable to bind to %s on this computer. TheoremCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-102"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Gebyr per KB som skal legges til transaksjoner du sender</translation>
</message>
<message>
<location line="+33"/>
<source>Minimize weight consumption (experimental) (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>How many blocks to check at startup (default: 500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Keep at most <n> unconnectable blocks in memory (default: %u)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. TheoremCoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Loading wallet...</source>
<translation>Laster lommebok...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation>Kan ikke nedgradere lommebok</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation>Kan ikke skrive standardadresse</translation>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>Leser gjennom...</translation>
</message>
<message>
<location line="+2"/>
<source>Done loading</source>
<translation>Ferdig med lasting</translation>
</message>
<message>
<location line="-161"/>
<source>To use the %s option</source>
<translation>For å bruke %s opsjonen</translation>
</message>
<message>
<location line="+188"/>
<source>Error</source>
<translation>Feil</translation>
</message>
<message>
<location line="-18"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Du må sette rpcpassword=<passord> i konfigurasjonsfilen:
%s
Hvis filen ikke finnes, opprett den med leserettighet kun for eier av filen.</translation>
</message>
</context>
</TS>
|
TheoremCrypto/TheoremCoin
|
src/qt/locale/bitcoin_nb.ts
|
TypeScript
|
mit
| 120,368
|
<?php
namespace minipipo1\BlogBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class CommentType extends AbstractType
{
/**
* @var \minipipo1\UserBundle\Entity\User $current_user
*/
private $current_user;
public function __construct(\minipipo1\UserBundle\Entity\User $current_user = NULL) {
$this->current_user = $current_user;
}
public function buildForm(FormBuilder $builder, array $options)
{
$cu = $this->current_user;
$builder
->add('content', 'textarea', array('required' => false)) // Le required à false est juste là pour empêcher que Symfony mette l'attribut required car il cause un bug à cause de TinyMCE
->add('auteur', 'entity', array(
'empty_value' => "Choisissez l'auteur",
'required' => true,
'class' => 'minipipo1UserBundle:Membre',
'query_builder' => function(\minipipo1\UserBundle\Entity\MembreRepository $er) use ($options, $cu) {
if ($options["data"]->getId())
$user = $options["data"]->getAuteur()->getUser();
else
$user = $cu;
return $er->createQueryBuilder('m')
->where('m.user = :user')
->setParameter('user', $user);
},
))
;
}
public function getName()
{
return 'minipipo1_blogbundle_commenttype';
}
public function getDefaultOptions(array $options)
{
return array(
'data_class' => 'minipipo1\BlogBundle\Entity\Comment',
);
}
}
|
ilancoulon/familyWeb
|
src/minipipo1/BlogBundle/Form/CommentType.php
|
PHP
|
mit
| 1,893
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Lidgren.Network;
using ClientServerExtension;
using System.ComponentModel;
namespace Troma
{
public class GameClient
{
#region Constants
private const string APP_NAME = "TROMA";
private const int PORT = 11420;
public const int MAX_CLIENT = 10;
private const int DT = 30; // ms
#endregion
#region Fields
private NetClient Client;
private NetPeerConfiguration Config;
private NetIncomingMessage IncMsg;
private NetOutgoingMessage OutMsg;
public int ID;
public STATE State;
public INPUT Input;
public bool Alive;
public int Score;
public Map Terrain;
public int MaxScore;
public event EventHandler ScoreChanged;
public event EventHandler EndedGame;
public List<OtherPlayer> Players;
public Tuple<int, string, int>[] Scoring;
private System.Timers.Timer timerUpdate;
private BackgroundWorker backgroundUpdater;
public bool Connected
{
get
{
return (Client.ConnectionStatus == NetConnectionStatus.Connected);
}
}
#endregion
public GameClient()
{
Initialize();
SetupClient();
}
#region Initialization
private void Initialize()
{
Players = new List<OtherPlayer>();
Players.Capacity = MAX_CLIENT;
Score = 0;
timerUpdate = new System.Timers.Timer(35); // 35ms
timerUpdate.Elapsed += new System.Timers.ElapsedEventHandler(UpdateElapsed);
backgroundUpdater = new BackgroundWorker();
backgroundUpdater.DoWork += HandleMsg;
}
private void SetupClient()
{
Config = new NetPeerConfiguration(APP_NAME);
Config.EnableUPnP = true;
Config.EnableMessageType(NetIncomingMessageType.Data);
Config.EnableMessageType(NetIncomingMessageType.ConnectionApproval);
#if DEBUG
Config.EnableMessageType(NetIncomingMessageType.WarningMessage);
Config.EnableMessageType(NetIncomingMessageType.VerboseDebugMessage);
Config.EnableMessageType(NetIncomingMessageType.ErrorMessage);
Config.EnableMessageType(NetIncomingMessageType.Error);
Config.EnableMessageType(NetIncomingMessageType.DebugMessage);
#endif
Client = new NetClient(Config);
Client.Start();
Client.UPnP.ForwardPort(Client.Port, "Troma client");
#if DEBUG
Console.WriteLine("Client start.");
#endif
}
private void Connect(string host)
{
OutMsg = Client.CreateMessage();
OutMsg.Write((byte)PacketTypes.LOGIN);
OutMsg.Write(Settings.Name);
Client.Connect(host, PORT, OutMsg);
#if DEBUG
Console.WriteLine("Send connection request to server.");
#endif
}
private void WaitInitialData()
{
DateTime expired = DateTime.Now + new TimeSpan(0, 0, 0, 10, 0);
bool canStart = false;
#if DEBUG
Console.WriteLine("Waiting initial data...");
#endif
while (!canStart && expired > DateTime.Now)
{
if ((IncMsg = Client.ReadMessage()) != null)
{
switch (IncMsg.MessageType)
{
case NetIncomingMessageType.Data:
#region Connection Approved
switch (IncMsg.ReadPacketType())
{
case PacketTypes.LOGIN:
ID = IncMsg.ReadInt32();
Terrain = (Map)IncMsg.ReadByte();
Terrain = Map.Cracovie;
MaxScore = IncMsg.ReadInt32();
canStart = true;
#if DEBUG
Console.WriteLine("Confirm initial data!");
#endif
break;
default:
break;
}
break;
#endregion
#if DEBUG
case NetIncomingMessageType.VerboseDebugMessage:
break;
case NetIncomingMessageType.DebugMessage:
break;
case NetIncomingMessageType.WarningMessage:
break;
case NetIncomingMessageType.ErrorMessage:
break;
case NetIncomingMessageType.Error:
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Corrupted message!!!");
break;
#endif
default:
break;
}
#if DEBUG
Console.ResetColor();
#endif
Client.Recycle(IncMsg); // generate less garbage
}
System.Threading.Thread.Sleep(1);
}
}
#endregion
public void Join(string host)
{
Connect(host);
WaitInitialData();
}
public void Shutdown()
{
Client.Shutdown("End");
}
public void Start()
{
timerUpdate.Start();
backgroundUpdater.RunWorkerAsync();
}
private void HandleMsg(object sender, DoWorkEventArgs e)
{
OtherPlayer p;
int id;
string name;
while (true)
{
if ((IncMsg = Client.ReadMessage()) != null)
{
switch (IncMsg.MessageType)
{
case NetIncomingMessageType.Data:
#region Process Data
switch (IncMsg.ReadPacketType())
{
case PacketTypes.QUIT:
p = FindPlayer(IncMsg.ReadInt32(), Players);
if (p == null)
break;
Players.Remove(p);
break;
case PacketTypes.KILL:
Alive = false;
break;
case PacketTypes.SPAWN:
Alive = true;
State = IncMsg.ReadPlayerState();
break;
case PacketTypes.SHOOT:
p = FindPlayer(IncMsg.ReadInt32(), Players);
if (p == null)
break;
//p.Shoot();
break;
case PacketTypes.SCORE:
Score = IncMsg.ReadInt32();
ScoreChanged(null, null);
break;
case PacketTypes.END:
int size = IncMsg.ReadInt32();
Scoring = new Tuple<int, string, int>[size];
for (int i = 0; i < size; i++)
{
Scoring[i] = new Tuple<int, string, int>(
IncMsg.ReadInt32(),
IncMsg.ReadString(),
IncMsg.ReadInt32());
}
EndedGame(null, null);
break;
case PacketTypes.STATE:
id = IncMsg.ReadInt32();
name = IncMsg.ReadString();
p = FindPlayer(id, Players);
if (p == null)
{
p = new OtherPlayer(name, id);
Players.Add(p);
}
p.State = IncMsg.ReadPlayerState();
break;
case PacketTypes.INPUT:
p = FindPlayer(IncMsg.ReadInt32(), Players);
if (p == null)
break;
p.Input = IncMsg.ReadPlayerInput();
break;
default:
break;
}
break;
#endregion
default:
break;
}
Client.Recycle(IncMsg); // generate less garbage
}
System.Threading.Thread.Sleep(1);
}
}
private void UpdateElapsed(object sender, System.Timers.ElapsedEventArgs e)
{
SendState(State);
SendInput(Input);
}
private void SendState(STATE s)
{
OutMsg = Client.CreateMessage();
OutMsg.Write((byte)PacketTypes.STATE);
OutMsg.WritePlayerState(s);
Client.SendMessage(OutMsg, NetDeliveryMethod.UnreliableSequenced, 2);
}
private void SendInput(INPUT i)
{
OutMsg = Client.CreateMessage();
OutMsg.Write((byte)PacketTypes.INPUT);
OutMsg.WritePlayerInput(i);
Client.SendMessage(OutMsg, NetDeliveryMethod.UnreliableSequenced, 2);
}
public void SendShoot()
{
OutMsg = Client.CreateMessage();
OutMsg.Write((byte)PacketTypes.SHOOT);
Client.SendMessage(OutMsg, NetDeliveryMethod.Unreliable, 0);
}
public void SetData(STATE s, INPUT i)
{
State = s;
Input = i;
}
#region Help Methods
public OtherPlayer FindPlayer(int id, List<OtherPlayer> list)
{
foreach (OtherPlayer player in list)
{
if (player.ID == id)
return player;
}
return null;
}
#endregion
}
}
|
dethi/troma
|
src/Game/Troma/Troma/Game/GameClient.cs
|
C#
|
mit
| 11,170
|
# Android SplashScreenDemo
This sample code project for tutorial in http://androidprimercontacto.blogspot.com.es/2016/01/splash-screen-android.html, from blog http://androidprimercontacto.blogspot.com.es
A simple Android Studio project with a Splash Screen demo.
Project creation steps:
- Create a new project with an empty activity
- Create a new activity and set it as main activity, name it as SplashScreen
- Write the splash screen code in the main activity
*********************************************************************************************************************
Este proyecto es un ejemplo de código del tutorial http://androidprimercontacto.blogspot.com.es/2016/01/splash-screen-android.html, del blog http://androidprimercontacto.blogspot.com.es
Un proyecto sencillo de Android Studio con un ejemplo de Splash Screen.
Estapas de la creción del proyecto:
- Crear proyecto en Android Studio con una actividad en blanco (empty activity)
- Crear otra actividad y configurarla como principal, con el nombre SplashScreen
- Implementar el código de splash screen en la actividad principal
*********************************************************************************************************************
|
diegomtnezglez/android.first.contact.SplashScreenDemo
|
README.md
|
Markdown
|
mit
| 1,235
|
<?php
abstract class Controller {
public $view;
public $input;
private $_uri;
private $_errors;
private $_success;
private $_renderView;
private $_name;
const VALIDATION_NUMBER = 1;
const VALIDATION_ALPHANUM = 2;
public function __construct() {
$this->view = new stdClass();
$this->input = new stdClass();
$this->_errors = array();
$this->_success = array();
}
public function getControllerName() {
return $this->_name;
}
public function getUser() {
global $USER;
return $USER;
}
public function setUser($user) {
global $USER;
$USER = $user;
}
public function setName($s) {
$this->_name = $s;
}
public function setRenderView($str) {
$this->_renderView = $str;
}
public function getRenderViewForDisplay() {
return str_replace('indexIndex','index',$this->_renderView);
}
public function getRenderview() {
return $this->_renderView;
}
public function callAction($action,$arg=null) {
$this->{$action}($arg);
$this->render();
}
public function addParam($name,$value) {
$this->input->{$name} = $value;
}
public function setUri($s) {$this->_uri = $s;}
public function getUri() {return $this->_uri;}
public function formUnserialize($salt,$name) {
if (md5($_POST[$name].$salt) == $_POST[$name.'Hash']) {
return unserialize(gzinflate(base64_decode($_POST[$name])));
} else {
return null;
}
}
public function formSerialize($data,$salt,$name) {
$ser = base64_encode(gzdeflate(serialize($data)));
$hash = md5($ser.$salt);
return '<input type="hidden" name="'.$name.'" value="'.$ser.'"/><input type="hidden" name="'.$name.'Hash" value="'.$hash.'"/>';
}
public function formEscape($text) {
return htmlspecialchars($text);
}
public function hasErrorMessages() {
return $this->_errors;
}
public function addErrorMsg($msg) {
array_push($this->_errors,$msg);
}
public function addSuccessMsg($msg) {
array_push($this->_success,$msg);
}
public function renderMessages() {
$result = '';
if ($this->_errors) {
$result .= Bootstrap_Alert::error(implode('<br/>',$this->_errors));
}
if ($this->_success) {
$result .= Bootstrap_Alert::success(implode('<br/>',$this->_success));
}
return $result;
}
public function args($id,$validate = null) {
if (isset($this->input->{'arg'.$id})) {
if ($validate != null) {
$str = $this->input->{'arg'.$id};
switch ($validate) {
case Controller::VALIDATION_NUMBER : return ctype_digit($str)?$str:null;
case Controller::VALIDATION_ALPHANUM : return ctype_alnum($str)?$str:null;
default : return null;
}
} else {
return trim($this->input->{'arg'.$id});
}
} else {
return null;
}
}
public function forwardAction($action) {
$array = get_object_vars($this->input);
foreach ($array as $idx => $value) {
if (strpos($idx,'arg') === 0) {
continue;
}
unset($this->input->$idx);
}
$array = get_object_vars($this->view);
foreach ($array as $idx => $value) {unset($this->input->$idx);}
//echo '<pre>';print_r($this);exit;
if (strstr($this->_renderView,'/')) {
$parts = explode("/",$this->_renderView);
$this->_renderView = $parts[0].'/'.strtolower($this->_name).ucfirst($action);
} else {
$this->_renderView = $action;
}
$this->callAction($action.'Action');
exit;
}
public function get($name,$trim = true) {
if (isset($_GET[$name])) {
if (is_array($_GET[$name])) {
return $_GET[$name];
} else {
if ($trim) {
return trim($_GET[$name]);
} else {
return $_GET[$name];
}
}
} else {
return null;
}
}
public function isPost() {
return $_SERVER['REQUEST_METHOD']=='POST';
}
public function post($name,$trim = true) {
if (isset($_POST[$name])) {
if (is_array($_POST[$name])) {
return $_POST[$name];
} else {
if ($trim) {
return trim($_POST[$name]);
} else {
return $_POST[$name];
}
}
}
}
}
|
bryhardt/grcpool
|
classes/core/Controller.php
|
PHP
|
mit
| 3,916
|
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react/addons'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from '../../node_modules/react/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, height: 768}; // Default size for server-side rendering
const RESIZE_EVENT = 'resize';
function handleWindowResize() {
if (viewport.width !== window.innerWidth || viewport.height !== window.innerHeight) {
viewport = {width: window.innerWidth, height: window.innerHeight};
EE.emit(RESIZE_EVENT, viewport);
}
}
function withViewport(ComposedComponent) {
return class WithViewport extends Component {
constructor() {
super();
this.state = {
viewport: canUseDOM ? {width: window.innerWidth, height: window.innerHeight} : viewport
};
}
componentDidMount() {
if (!EE) {
EE = new EventEmitter();
window.addEventListener('resize', handleWindowResize);
window.addEventListener('orientationchange', handleWindowResize);
}
EE.on(RESIZE_EVENT, this.handleResize, this);
}
componentWillUnmount() {
EE.removeListener(RESIZE_EVENT, this.handleResize, this);
if (!EE.listeners(RESIZE_EVENT, true)) {
window.removeEventListener('resize', handleWindowResize);
window.removeEventListener('orientationchange', handleWindowResize);
EE = null;
}
}
render() {
return <ComposedComponent {...this.props} viewport={this.state.viewport}/>;
}
handleResize(value) {
this.setState({viewport: value}); // eslint-disable-line react/no-set-state
}
};
}
export default withViewport;
|
tonikarttunen/tonikarttunen-com
|
src/decorators/withViewport.js
|
JavaScript
|
mit
| 1,757
|
module Nodectl
VERSION = "0.2.5.dev"
end
|
sybis/nodectl
|
lib/nodectl/version.rb
|
Ruby
|
mit
| 43
|
<!DOCTYPE html>
<html>
<head>
<!-- meta information -->
<meta charset="utf-8">
<meta name="description"
content="- [AFNetworking]: 说起iOS,说起开源,不得不提[Mattt Thompson], 一个神一样的男人。Github上star数最多的Objective-C项目AFNetworking就出自他手下。- [Shimmer..." >
<meta name="author" content="liaojinxing">
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<!-- title -->
<title>github上iOS优秀开源代码 · Love your code</title>
<!-- icons -->
<link rel="shortcut icon" href="/public/images/favicon.ico" />
<!-- stylesheets -->
<link rel="stylesheet" href="/public/css/responsive.gs.12col.css">
<link rel="stylesheet" href="/public/css/animate.min.css">
<link rel="stylesheet" href="/public/css/main.css">
<!-- Google fonts -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic&subset=latin-ext">
<!-- feed links -->
<link rel="alternate" href="/feed.xml" type="application/rss+xml" title="">
</head>
<body>
<div class="container azul">
<header class="top row gutters">
<div class="col span_2 center">
<!-- TODO: add baseurl to the logo link -->
<a href="" id="logo" title="Love your code"
style="background-image: url(/public/images/logo.png);"></a>
</div>
<nav class="col span_10 top-navbar">
<a href="/" title="Home"
>Home</a>
<a href="/about" title="About"
>About</a>
</nav>
</header>
<article class="single row gutters">
<time class="published" datetime="2014-03-01">01 March 2014</time>
<h2>github上iOS优秀开源代码</h2>
<ul>
<li><p><a href="https://github.com/AFNetworking/AFNetworking">AFNetworking</a>: 说起iOS,说起开源,不得不提<a href="https://github.com/mattt">Mattt Thompson</a>, 一个神一样的男人。Github上star数最多的Objective-C项目AFNetworking就出自他手下。</p></li>
<li><p><a href="https://github.com/facebook/Shimmer">Shimmer</a>: An easy way to add a simple shimmering effect to any view in an iOS app, which is particularly useful as an unobtrusive loading indicator.</p></li>
<li><p><a href="https://github.com/facebook/Tweaks">Tweaks</a>: 有了这个就不用怕设计师分分钟改颜色,改大小,改各种小的交互了。</p></li>
<li><p><a href="https://github.com/twitter/CocoaSPDY">CocoaSPDY</a>: 基本不用怎么修改就可以让app使用SPDY协议。</p></li>
<li><p><a href="https://github.com/MatthewYork/DateTools">DateTools</a>: 关于日期的各种操作</p></li>
<li><p><a href="https://github.com/MatthewYork/MYBlurIntroductionView">MYBlurIntroductionView</a>: 轻松搞定开机画面</p></li>
<li><p><a href="https://github.com/andreamazz/AMScrollingNavbar">AMScrollingNavbar</a>: 可缩放的NavigationBar</p></li>
<li><p><a href="https://github.com/ccgus/fmdb">fmdb</a>: sqlite的objc wrapper</p></li>
<li><p><a href="https://github.com/liaojinxing/HybridBridge">HybridBridge</a>: iOS+web混合开发实践。提供模板资源管理,并基于JavaScriptCore实现JavaScript和Objective-C通讯的中间库。</p></li>
<li><p><a href="https://github.com/liaojinxing/EasyImage">EasyImage</a>: 各种图片的处理。</p></li>
</ul>
<h3>这篇博客会不断更新和充实。记录每日发现的优秀开源代码。</h3>
</article>
</div>
<!-- scripts -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="/public/js/jquery.fitvids.js"></script>
<script>
$(document).ready(function(){
$("article").fitVids();
});
</script>
</body>
</html>
|
liaojinxing/liaojinxing.github.io
|
_site/iOS优秀开源代码/index.html
|
HTML
|
mit
| 3,769
|
#include <iostream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
void c_to_f(void);
void f_to_c(void);
int main(void)
{
int choice;
char again;
do
{
system("CLS");
cout<<setw(10)<<" "<< "What conversion would you like to make?\n";// menu
cout<<setw(20)<<" "<< "1. Celsius to Fahrenhei\n\n";
// make a choice which functions to use.
cout<<setw(20)<<" "<< "2. Fahrenheit to Celsius\n\n";
cin>>choice;
switch(choice)
// go to chosen function
{
case 1:
{
c_to_f();
break;
}
case 2:
{
f_to_c();
break;
}
default:
{
cout<<setw(10)<<" "<< "Enter 1 ot 2 "<< endl;
// validate and correct input of function choice.
}
}
cout<<setw(10)<<" "<< "Do you wish to do another conversion? y for yes, n for no "; // return loop on y for yes.
cin>> again;
}while (again=='Y'||again=='y');
return 0;
}
void c_to_f(void)
{
system("CLS"); //clean screen for function data.
int temp,fahrenheit;
cout<< "\n\n\n ";
cout<<setw(10)<<" "<< "Enter the temperature in whole degress Celsius: \a";
cin>>temp;
fahrenheit=((temp*9)/5)+32;
cout<<endl<<setw(10)<<" "<<temp<<" degrees celsius is " <<fahrenheit<<"\a\n\n\n ";
}
void f_to_c(void)
{
system("CLS"); // clear screen for function data.
int temp, celsius;
cout<< "\n\n\n ";
cout<<setw(10)<<" "<< "Enter the temperature in whole degrees fahrenheit: \a";
cin>>temp;
celsius=((temp-32)*5)/9;
cout<<endl<<setw(10)<<" "<<temp<<" degrees fahrenheit is "<<celsius<<" degrees celsius \a\n\n\n";
}
|
wshca/Modelling_ClimateChange_Forest_CPP
|
converter.cpp
|
C++
|
mit
| 1,540
|
import React from 'react';
import Utils from '../utils/utils';
import Mixins from '../utils/mixins';
import __reactComponentSlots from '../runtime-helpers/react-component-slots.js';
import __reactComponentSetProps from '../runtime-helpers/react-component-set-props.js';
class F7AccordionContent extends React.Component {
constructor(props, context) {
super(props, context);
}
render() {
const props = this.props;
const {
className,
id,
style
} = props;
const classes = Utils.classNames(className, 'accordion-item-content', Mixins.colorClasses(props));
return React.createElement('div', {
id: id,
style: style,
className: classes
}, this.slots['default']);
}
get slots() {
return __reactComponentSlots(this.props);
}
}
__reactComponentSetProps(F7AccordionContent, Object.assign({
id: [String, Number]
}, Mixins.colorProps));
F7AccordionContent.displayName = 'f7-accordion-content';
export default F7AccordionContent;
|
AdrianV/Framework7
|
packages/react/components/accordion-content.js
|
JavaScript
|
mit
| 1,003
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-16 21:29
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('quotes', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='quote',
name='mentions',
field=models.ManyToManyField(blank=True, editable=False, related_name='mentioned_in', to=settings.AUTH_USER_MODEL),
),
migrations.AlterField(
model_name='quote',
name='author',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author_of', to=settings.AUTH_USER_MODEL),
),
]
|
nivbend/memoir
|
quotes/migrations/0002_mentions.py
|
Python
|
mit
| 885
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_21) on Tue Nov 17 15:15:29 EST 2009 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class org.mortbay.xml.XmlParser.Node (Jetty Server Project 6.1.22 API)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../javadoc.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Uses of Class org.mortbay.xml.XmlParser.Node (Jetty Server Project 6.1.22 API)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mortbay/xml/class-use/XmlParser.Node.html" target="_top"><B>FRAMES</B></A>
<A HREF="XmlParser.Node.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.mortbay.xml.XmlParser.Node</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.mortbay.jetty.plus.webapp"><B>org.mortbay.jetty.plus.webapp</B></A></TD>
<TD> </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.mortbay.jetty.webapp"><B>org.mortbay.jetty.webapp</B></A></TD>
<TD> </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.mortbay.xml"><B>org.mortbay.xml</B></A></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<A NAME="org.mortbay.jetty.plus.webapp"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> in <A HREF="../../../../org/mortbay/jetty/plus/webapp/package-summary.html">org.mortbay.jetty.plus.webapp</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../org/mortbay/jetty/plus/webapp/package-summary.html">org.mortbay.jetty.plus.webapp</A> with parameters of type <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initEnvEntry(org.mortbay.xml.XmlParser.Node)">initEnvEntry</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
JavaEE 5.4.1.3</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initialize(org.mortbay.xml.XmlParser.Node)">initialize</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> config)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initInjection(org.mortbay.xml.XmlParser.Node, java.lang.String, java.lang.Class)">initInjection</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> jndiName,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A> valueClass)</CODE>
<BR>
Iterate over the <injection-target> entries for a node</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initMessageDestinationRef(org.mortbay.xml.XmlParser.Node)">initMessageDestinationRef</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Common Annotations Spec section 2.3:
message-destination-ref is for:
- javax.jms.Queue
- javax.jms.Topic</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initPostConstruct(org.mortbay.xml.XmlParser.Node)">initPostConstruct</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Process <post-construct></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initPreDestroy(org.mortbay.xml.XmlParser.Node)">initPreDestroy</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Process <pre-destroy></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initResourceEnvRef(org.mortbay.xml.XmlParser.Node)">initResourceEnvRef</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Common Annotations Spec section 2.3:
resource-env-ref is for:
- javax.transaction.UserTransaction
- javax.resource.cci.InteractionSpec
- anything else that is not a connection factory</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initResourceRef(org.mortbay.xml.XmlParser.Node)">initResourceRef</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Common Annotations Spec section 2.3:
resource-ref is for:
- javax.sql.DataSource
- javax.jms.ConnectionFactory
- javax.jms.QueueConnectionFactory
- javax.jms.TopicConnectionFactory
- javax.mail.Session
- java.net.URL
- javax.resource.cci.ConnectionFactory
- org.omg.CORBA_2_3.ORB
- any other connection factory defined by a resource adapter</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>AbstractConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/plus/webapp/AbstractConfiguration.html#initWebXmlElement(java.lang.String, org.mortbay.xml.XmlParser.Node)">initWebXmlElement</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> element,
<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<A NAME="org.mortbay.jetty.webapp"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> in <A HREF="../../../../org/mortbay/jetty/webapp/package-summary.html">org.mortbay.jetty.webapp</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../org/mortbay/jetty/webapp/package-summary.html">org.mortbay.jetty.webapp</A> with parameters of type <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initContextParam(org.mortbay.xml.XmlParser.Node)">initContextParam</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initDisplayName(org.mortbay.xml.XmlParser.Node)">initDisplayName</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initDistributable(org.mortbay.xml.XmlParser.Node)">initDistributable</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initErrorPage(org.mortbay.xml.XmlParser.Node)">initErrorPage</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initFilter(org.mortbay.xml.XmlParser.Node)">initFilter</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initFilterMapping(org.mortbay.xml.XmlParser.Node)">initFilterMapping</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initialize(org.mortbay.xml.XmlParser.Node)">initialize</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> config)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initJspConfig(org.mortbay.xml.XmlParser.Node)">initJspConfig</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initListener(org.mortbay.xml.XmlParser.Node)">initListener</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initLocaleEncodingList(org.mortbay.xml.XmlParser.Node)">initLocaleEncodingList</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initLoginConfig(org.mortbay.xml.XmlParser.Node)">initLoginConfig</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initMimeConfig(org.mortbay.xml.XmlParser.Node)">initMimeConfig</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initSecurityConstraint(org.mortbay.xml.XmlParser.Node)">initSecurityConstraint</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initSecurityRole(org.mortbay.xml.XmlParser.Node)">initSecurityRole</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initServlet(org.mortbay.xml.XmlParser.Node)">initServlet</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initServletMapping(org.mortbay.xml.XmlParser.Node)">initServletMapping</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initSessionConfig(org.mortbay.xml.XmlParser.Node)">initSessionConfig</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initTagLib(org.mortbay.xml.XmlParser.Node)">initTagLib</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initWebXmlElement(java.lang.String, org.mortbay.xml.XmlParser.Node)">initWebXmlElement</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> element,
<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
Handle web.xml element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected void</CODE></FONT></TD>
<TD><CODE><B>WebXmlConfiguration.</B><B><A HREF="../../../../org/mortbay/jetty/webapp/WebXmlConfiguration.html#initWelcomeFileList(org.mortbay.xml.XmlParser.Node)">initWelcomeFileList</A></B>(<A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> node)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<A NAME="org.mortbay.xml"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A> in <A HREF="../../../../org/mortbay/xml/package-summary.html">org.mortbay.xml</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left" COLSPAN="2">Methods in <A HREF="../../../../org/mortbay/xml/package-summary.html">org.mortbay.xml</A> that return <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.Node.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.Node.html#get(java.lang.String)">get</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> tag)</CODE>
<BR>
Get the first child node with the tag.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.Node.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.Node.html#getParent()">getParent</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.html#parse(java.io.File)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html" title="class or interface in java.io">File</A> file)</CODE>
<BR>
Parse File.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.html#parse(org.xml.sax.InputSource)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax">InputSource</A> source)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.html#parse(java.io.InputStream)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> in)</CODE>
<BR>
Parse InputStream.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml">XmlParser.Node</A></CODE></FONT></TD>
<TD><CODE><B>XmlParser.</B><B><A HREF="../../../../org/mortbay/xml/XmlParser.html#parse(java.lang.String)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> url)</CODE>
<BR>
Parse String URL.</TD>
</TR>
</TABLE>
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../org/mortbay/xml/XmlParser.Node.html" title="class in org.mortbay.xml"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/mortbay/xml/class-use/XmlParser.Node.html" target="_top"><B>FRAMES</B></A>
<A HREF="XmlParser.Node.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 1995-2009 <a href="http://www.mortbay.com">Mort Bay Consulting</a>. All Rights Reserved.
</BODY>
</HTML>
|
cscotta/miso-java
|
jetty/javadoc/org/mortbay/xml/class-use/XmlParser.Node.html
|
HTML
|
mit
| 30,190
|