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
line_mean
float64
0.5
100
line_max
int64
1
1k
alpha_frac
float64
0.25
1
autogenerated
bool
1 class
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. namespace System.Resources { // Intentionally excluding visibility so it defaults to internal except for // the one public version in System.Resources.ResourceManager which defines // another version of this partial class with the public visibility [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] sealed partial class NeutralResourcesLanguageAttribute : Attribute { private readonly string _culture; public NeutralResourcesLanguageAttribute(string cultureName) { if (cultureName == null) throw new ArgumentNullException("cultureName"); _culture = cultureName; } public string CultureName { get { return _culture; } } } }
mafiya69/corefx
src/Common/src/System/Resources/NeutralResourcesLanguageAttribute.cs
C#
mit
984
34.142857
79
0.685976
false
//--------------------------------------------------------------------------------------------------------------------- // <copyright company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> //--------------------------------------------------------------------------------------------------------------------- namespace CodeGraphModel { using System.Collections.Generic; using System.Runtime.Serialization; [DataContract] public class Symbol : Entity { [DataMember] public string Name { get; set; } [DataMember] public string SymbolType { get; set; } [DataMember] public bool IsExternal { get; set; } [DataMember] public int LineStart { get; set; } [DataMember] public int LineEnd { get; set; } [DataMember] public int ColumnStart { get; set; } [DataMember] public int ColumnEnd { get; set; } [DataMember] public string FileUId { get; set; } [DataMember] public List<SymbolReference> References { get; set; } public override string ToString() { return string.Format("[Name: {0}, Type: {1}, UId: {2}]", Name, Type, UId); } public override bool IsValid() { return this.Type == EntityType.Symbol; } } public class SymbolResponse { [DataMember] public string uid; [DataMember] public string name; [DataMember] public string type; [DataMember] public string fileUid; [DataMember] public int lineStart; [DataMember] public int lineEnd; [DataMember] public int columnStart; [DataMember] public int columnEnd; } }
too4words/Call-Graph-Builder-DotNet
CodeGraphModel/Symbol.cs
C#
mit
1,852
22.455696
119
0.483801
false
// Compiled by ClojureScript 1.7.170 {} goog.provide('figwheel.client.file_reloading'); goog.require('cljs.core'); goog.require('goog.string'); goog.require('goog.Uri'); goog.require('goog.net.jsloader'); goog.require('cljs.core.async'); goog.require('goog.object'); goog.require('clojure.set'); goog.require('clojure.string'); goog.require('figwheel.client.utils'); figwheel.client.file_reloading.queued_file_reload; if(typeof figwheel.client.file_reloading.figwheel_meta_pragmas !== 'undefined'){ } else { figwheel.client.file_reloading.figwheel_meta_pragmas = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY); } figwheel.client.file_reloading.on_jsload_custom_event = (function figwheel$client$file_reloading$on_jsload_custom_event(url){ return figwheel.client.utils.dispatch_custom_event.call(null,"figwheel.js-reload",url); }); figwheel.client.file_reloading.before_jsload_custom_event = (function figwheel$client$file_reloading$before_jsload_custom_event(files){ return figwheel.client.utils.dispatch_custom_event.call(null,"figwheel.before-js-reload",files); }); figwheel.client.file_reloading.namespace_file_map_QMARK_ = (function figwheel$client$file_reloading$namespace_file_map_QMARK_(m){ var or__16826__auto__ = (cljs.core.map_QMARK_.call(null,m)) && (typeof new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(m) === 'string') && (((new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) == null)) || (typeof new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) === 'string')) && (cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(m),new cljs.core.Keyword(null,"namespace","namespace",-377510372))); if(or__16826__auto__){ return or__16826__auto__; } else { cljs.core.println.call(null,"Error not namespace-file-map",cljs.core.pr_str.call(null,m)); return false; } }); figwheel.client.file_reloading.add_cache_buster = (function figwheel$client$file_reloading$add_cache_buster(url){ return goog.Uri.parse(url).makeUnique(); }); figwheel.client.file_reloading.name__GT_path = (function figwheel$client$file_reloading$name__GT_path(ns){ return (goog.dependencies_.nameToPath[ns]); }); figwheel.client.file_reloading.provided_QMARK_ = (function figwheel$client$file_reloading$provided_QMARK_(ns){ return (goog.dependencies_.written[figwheel.client.file_reloading.name__GT_path.call(null,ns)]); }); figwheel.client.file_reloading.fix_node_request_url = (function figwheel$client$file_reloading$fix_node_request_url(url){ if(cljs.core.truth_(goog.string.startsWith(url,"../"))){ return clojure.string.replace.call(null,url,"../",""); } else { return [cljs.core.str("goog/"),cljs.core.str(url)].join(''); } }); figwheel.client.file_reloading.immutable_ns_QMARK_ = (function figwheel$client$file_reloading$immutable_ns_QMARK_(name){ var or__16826__auto__ = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 9, ["svgpan.SvgPan",null,"far.out",null,"testDep.bar",null,"someprotopackage.TestPackageTypes",null,"goog",null,"an.existing.path",null,"cljs.core",null,"ns",null,"dup.base",null], null), null).call(null,name); if(cljs.core.truth_(or__16826__auto__)){ return or__16826__auto__; } else { return cljs.core.some.call(null,cljs.core.partial.call(null,goog.string.startsWith,name),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, ["goog.","cljs.","clojure.","fake.","proto2."], null)); } }); figwheel.client.file_reloading.get_requires = (function figwheel$client$file_reloading$get_requires(ns){ return cljs.core.set.call(null,cljs.core.filter.call(null,(function (p1__23844_SHARP_){ return cljs.core.not.call(null,figwheel.client.file_reloading.immutable_ns_QMARK_.call(null,p1__23844_SHARP_)); }),goog.object.getKeys((goog.dependencies_.requires[figwheel.client.file_reloading.name__GT_path.call(null,ns)])))); }); if(typeof figwheel.client.file_reloading.dependency_data !== 'undefined'){ } else { figwheel.client.file_reloading.dependency_data = cljs.core.atom.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"dependents","dependents",136812837),cljs.core.PersistentArrayMap.EMPTY], null)); } figwheel.client.file_reloading.path_to_name_BANG_ = (function figwheel$client$file_reloading$path_to_name_BANG_(path,name){ return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([name], true)); }); /** * Setup a path to name dependencies map. * That goes from path -> #{ ns-names } */ figwheel.client.file_reloading.setup_path__GT_name_BANG_ = (function figwheel$client$file_reloading$setup_path__GT_name_BANG_(){ var nameToPath = goog.object.filter(goog.dependencies_.nameToPath,(function (v,k,o){ return goog.string.startsWith(v,"../"); })); return goog.object.forEach(nameToPath,((function (nameToPath){ return (function (v,k,o){ return figwheel.client.file_reloading.path_to_name_BANG_.call(null,v,k); });})(nameToPath)) ); }); /** * returns a set of namespaces defined by a path */ figwheel.client.file_reloading.path__GT_name = (function figwheel$client$file_reloading$path__GT_name(path){ return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null)); }); figwheel.client.file_reloading.name_to_parent_BANG_ = (function figwheel$client$file_reloading$name_to_parent_BANG_(ns,parent_ns){ return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([parent_ns], true)); }); /** * This reverses the goog.dependencies_.requires for looking up ns-dependents. */ figwheel.client.file_reloading.setup_ns__GT_dependents_BANG_ = (function figwheel$client$file_reloading$setup_ns__GT_dependents_BANG_(){ var requires = goog.object.filter(goog.dependencies_.requires,(function (v,k,o){ return goog.string.startsWith(k,"../"); })); return goog.object.forEach(requires,((function (requires){ return (function (v,k,_){ return goog.object.forEach(v,((function (requires){ return (function (v_SINGLEQUOTE_,k_SINGLEQUOTE_,___$1){ var seq__23849 = cljs.core.seq.call(null,figwheel.client.file_reloading.path__GT_name.call(null,k)); var chunk__23850 = null; var count__23851 = (0); var i__23852 = (0); while(true){ if((i__23852 < count__23851)){ var n = cljs.core._nth.call(null,chunk__23850,i__23852); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,k_SINGLEQUOTE_,n); var G__23853 = seq__23849; var G__23854 = chunk__23850; var G__23855 = count__23851; var G__23856 = (i__23852 + (1)); seq__23849 = G__23853; chunk__23850 = G__23854; count__23851 = G__23855; i__23852 = G__23856; continue; } else { var temp__4425__auto__ = cljs.core.seq.call(null,seq__23849); if(temp__4425__auto__){ var seq__23849__$1 = temp__4425__auto__; if(cljs.core.chunked_seq_QMARK_.call(null,seq__23849__$1)){ var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23849__$1); var G__23857 = cljs.core.chunk_rest.call(null,seq__23849__$1); var G__23858 = c__17629__auto__; var G__23859 = cljs.core.count.call(null,c__17629__auto__); var G__23860 = (0); seq__23849 = G__23857; chunk__23850 = G__23858; count__23851 = G__23859; i__23852 = G__23860; continue; } else { var n = cljs.core.first.call(null,seq__23849__$1); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,k_SINGLEQUOTE_,n); var G__23861 = cljs.core.next.call(null,seq__23849__$1); var G__23862 = null; var G__23863 = (0); var G__23864 = (0); seq__23849 = G__23861; chunk__23850 = G__23862; count__23851 = G__23863; i__23852 = G__23864; continue; } } else { return null; } } break; } });})(requires)) ); });})(requires)) ); }); figwheel.client.file_reloading.ns__GT_dependents = (function figwheel$client$file_reloading$ns__GT_dependents(ns){ return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null)); }); figwheel.client.file_reloading.build_topo_sort = (function figwheel$client$file_reloading$build_topo_sort(get_deps){ var get_deps__$1 = cljs.core.memoize.call(null,get_deps); var topo_sort_helper_STAR_ = ((function (get_deps__$1){ return (function figwheel$client$file_reloading$build_topo_sort_$_topo_sort_helper_STAR_(x,depth,state){ var deps = get_deps__$1.call(null,x); if(cljs.core.empty_QMARK_.call(null,deps)){ return null; } else { return topo_sort_STAR_.call(null,deps,depth,state); } });})(get_deps__$1)) ; var topo_sort_STAR_ = ((function (get_deps__$1){ return (function() { var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = null; var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1 = (function (deps){ return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.call(null,deps,(0),cljs.core.atom.call(null,cljs.core.sorted_map.call(null))); }); var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3 = (function (deps,depth,state){ cljs.core.swap_BANG_.call(null,state,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [depth], null),cljs.core.fnil.call(null,cljs.core.into,cljs.core.PersistentHashSet.EMPTY),deps); var seq__23903_23910 = cljs.core.seq.call(null,deps); var chunk__23904_23911 = null; var count__23905_23912 = (0); var i__23906_23913 = (0); while(true){ if((i__23906_23913 < count__23905_23912)){ var dep_23914 = cljs.core._nth.call(null,chunk__23904_23911,i__23906_23913); topo_sort_helper_STAR_.call(null,dep_23914,(depth + (1)),state); var G__23915 = seq__23903_23910; var G__23916 = chunk__23904_23911; var G__23917 = count__23905_23912; var G__23918 = (i__23906_23913 + (1)); seq__23903_23910 = G__23915; chunk__23904_23911 = G__23916; count__23905_23912 = G__23917; i__23906_23913 = G__23918; continue; } else { var temp__4425__auto___23919 = cljs.core.seq.call(null,seq__23903_23910); if(temp__4425__auto___23919){ var seq__23903_23920__$1 = temp__4425__auto___23919; if(cljs.core.chunked_seq_QMARK_.call(null,seq__23903_23920__$1)){ var c__17629__auto___23921 = cljs.core.chunk_first.call(null,seq__23903_23920__$1); var G__23922 = cljs.core.chunk_rest.call(null,seq__23903_23920__$1); var G__23923 = c__17629__auto___23921; var G__23924 = cljs.core.count.call(null,c__17629__auto___23921); var G__23925 = (0); seq__23903_23910 = G__23922; chunk__23904_23911 = G__23923; count__23905_23912 = G__23924; i__23906_23913 = G__23925; continue; } else { var dep_23926 = cljs.core.first.call(null,seq__23903_23920__$1); topo_sort_helper_STAR_.call(null,dep_23926,(depth + (1)),state); var G__23927 = cljs.core.next.call(null,seq__23903_23920__$1); var G__23928 = null; var G__23929 = (0); var G__23930 = (0); seq__23903_23910 = G__23927; chunk__23904_23911 = G__23928; count__23905_23912 = G__23929; i__23906_23913 = G__23930; continue; } } else { } } break; } if(cljs.core._EQ_.call(null,depth,(0))){ return elim_dups_STAR_.call(null,cljs.core.reverse.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,state)))); } else { return null; } }); figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = function(deps,depth,state){ switch(arguments.length){ case 1: return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1.call(this,deps); case 3: return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3.call(this,deps,depth,state); } throw(new Error('Invalid arity: ' + arguments.length)); }; figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1; figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$3 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3; return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_; })() ;})(get_deps__$1)) ; var elim_dups_STAR_ = ((function (get_deps__$1){ return (function figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_(p__23907){ var vec__23909 = p__23907; var x = cljs.core.nth.call(null,vec__23909,(0),null); var xs = cljs.core.nthnext.call(null,vec__23909,(1)); if((x == null)){ return cljs.core.List.EMPTY; } else { return cljs.core.cons.call(null,x,figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_.call(null,cljs.core.map.call(null,((function (vec__23909,x,xs,get_deps__$1){ return (function (p1__23865_SHARP_){ return clojure.set.difference.call(null,p1__23865_SHARP_,x); });})(vec__23909,x,xs,get_deps__$1)) ,xs))); } });})(get_deps__$1)) ; return topo_sort_STAR_; }); figwheel.client.file_reloading.get_all_dependencies = (function figwheel$client$file_reloading$get_all_dependencies(ns){ var topo_sort_SINGLEQUOTE_ = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.get_requires); return cljs.core.apply.call(null,cljs.core.concat,topo_sort_SINGLEQUOTE_.call(null,cljs.core.set.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [ns], null)))); }); figwheel.client.file_reloading.get_all_dependents = (function figwheel$client$file_reloading$get_all_dependents(nss){ var topo_sort_SINGLEQUOTE_ = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.ns__GT_dependents); return cljs.core.reverse.call(null,cljs.core.apply.call(null,cljs.core.concat,topo_sort_SINGLEQUOTE_.call(null,cljs.core.set.call(null,nss)))); }); figwheel.client.file_reloading.unprovide_BANG_ = (function figwheel$client$file_reloading$unprovide_BANG_(ns){ var path = figwheel.client.file_reloading.name__GT_path.call(null,ns); goog.object.remove(goog.dependencies_.visited,path); goog.object.remove(goog.dependencies_.written,path); return goog.object.remove(goog.dependencies_.written,[cljs.core.str(goog.basePath),cljs.core.str(path)].join('')); }); figwheel.client.file_reloading.resolve_ns = (function figwheel$client$file_reloading$resolve_ns(ns){ return [cljs.core.str(goog.basePath),cljs.core.str(figwheel.client.file_reloading.name__GT_path.call(null,ns))].join(''); }); figwheel.client.file_reloading.addDependency = (function figwheel$client$file_reloading$addDependency(path,provides,requires){ var seq__23943 = cljs.core.seq.call(null,provides); var chunk__23944 = null; var count__23945 = (0); var i__23946 = (0); while(true){ if((i__23946 < count__23945)){ var prov = cljs.core._nth.call(null,chunk__23944,i__23946); figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov); var seq__23947_23955 = cljs.core.seq.call(null,requires); var chunk__23948_23956 = null; var count__23949_23957 = (0); var i__23950_23958 = (0); while(true){ if((i__23950_23958 < count__23949_23957)){ var req_23959 = cljs.core._nth.call(null,chunk__23948_23956,i__23950_23958); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23959,prov); var G__23960 = seq__23947_23955; var G__23961 = chunk__23948_23956; var G__23962 = count__23949_23957; var G__23963 = (i__23950_23958 + (1)); seq__23947_23955 = G__23960; chunk__23948_23956 = G__23961; count__23949_23957 = G__23962; i__23950_23958 = G__23963; continue; } else { var temp__4425__auto___23964 = cljs.core.seq.call(null,seq__23947_23955); if(temp__4425__auto___23964){ var seq__23947_23965__$1 = temp__4425__auto___23964; if(cljs.core.chunked_seq_QMARK_.call(null,seq__23947_23965__$1)){ var c__17629__auto___23966 = cljs.core.chunk_first.call(null,seq__23947_23965__$1); var G__23967 = cljs.core.chunk_rest.call(null,seq__23947_23965__$1); var G__23968 = c__17629__auto___23966; var G__23969 = cljs.core.count.call(null,c__17629__auto___23966); var G__23970 = (0); seq__23947_23955 = G__23967; chunk__23948_23956 = G__23968; count__23949_23957 = G__23969; i__23950_23958 = G__23970; continue; } else { var req_23971 = cljs.core.first.call(null,seq__23947_23965__$1); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23971,prov); var G__23972 = cljs.core.next.call(null,seq__23947_23965__$1); var G__23973 = null; var G__23974 = (0); var G__23975 = (0); seq__23947_23955 = G__23972; chunk__23948_23956 = G__23973; count__23949_23957 = G__23974; i__23950_23958 = G__23975; continue; } } else { } } break; } var G__23976 = seq__23943; var G__23977 = chunk__23944; var G__23978 = count__23945; var G__23979 = (i__23946 + (1)); seq__23943 = G__23976; chunk__23944 = G__23977; count__23945 = G__23978; i__23946 = G__23979; continue; } else { var temp__4425__auto__ = cljs.core.seq.call(null,seq__23943); if(temp__4425__auto__){ var seq__23943__$1 = temp__4425__auto__; if(cljs.core.chunked_seq_QMARK_.call(null,seq__23943__$1)){ var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23943__$1); var G__23980 = cljs.core.chunk_rest.call(null,seq__23943__$1); var G__23981 = c__17629__auto__; var G__23982 = cljs.core.count.call(null,c__17629__auto__); var G__23983 = (0); seq__23943 = G__23980; chunk__23944 = G__23981; count__23945 = G__23982; i__23946 = G__23983; continue; } else { var prov = cljs.core.first.call(null,seq__23943__$1); figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov); var seq__23951_23984 = cljs.core.seq.call(null,requires); var chunk__23952_23985 = null; var count__23953_23986 = (0); var i__23954_23987 = (0); while(true){ if((i__23954_23987 < count__23953_23986)){ var req_23988 = cljs.core._nth.call(null,chunk__23952_23985,i__23954_23987); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23988,prov); var G__23989 = seq__23951_23984; var G__23990 = chunk__23952_23985; var G__23991 = count__23953_23986; var G__23992 = (i__23954_23987 + (1)); seq__23951_23984 = G__23989; chunk__23952_23985 = G__23990; count__23953_23986 = G__23991; i__23954_23987 = G__23992; continue; } else { var temp__4425__auto___23993__$1 = cljs.core.seq.call(null,seq__23951_23984); if(temp__4425__auto___23993__$1){ var seq__23951_23994__$1 = temp__4425__auto___23993__$1; if(cljs.core.chunked_seq_QMARK_.call(null,seq__23951_23994__$1)){ var c__17629__auto___23995 = cljs.core.chunk_first.call(null,seq__23951_23994__$1); var G__23996 = cljs.core.chunk_rest.call(null,seq__23951_23994__$1); var G__23997 = c__17629__auto___23995; var G__23998 = cljs.core.count.call(null,c__17629__auto___23995); var G__23999 = (0); seq__23951_23984 = G__23996; chunk__23952_23985 = G__23997; count__23953_23986 = G__23998; i__23954_23987 = G__23999; continue; } else { var req_24000 = cljs.core.first.call(null,seq__23951_23994__$1); figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_24000,prov); var G__24001 = cljs.core.next.call(null,seq__23951_23994__$1); var G__24002 = null; var G__24003 = (0); var G__24004 = (0); seq__23951_23984 = G__24001; chunk__23952_23985 = G__24002; count__23953_23986 = G__24003; i__23954_23987 = G__24004; continue; } } else { } } break; } var G__24005 = cljs.core.next.call(null,seq__23943__$1); var G__24006 = null; var G__24007 = (0); var G__24008 = (0); seq__23943 = G__24005; chunk__23944 = G__24006; count__23945 = G__24007; i__23946 = G__24008; continue; } } else { return null; } } break; } }); figwheel.client.file_reloading.figwheel_require = (function figwheel$client$file_reloading$figwheel_require(src,reload){ goog.require = figwheel$client$file_reloading$figwheel_require; if(cljs.core._EQ_.call(null,reload,"reload-all")){ var seq__24013_24017 = cljs.core.seq.call(null,figwheel.client.file_reloading.get_all_dependencies.call(null,src)); var chunk__24014_24018 = null; var count__24015_24019 = (0); var i__24016_24020 = (0); while(true){ if((i__24016_24020 < count__24015_24019)){ var ns_24021 = cljs.core._nth.call(null,chunk__24014_24018,i__24016_24020); figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24021); var G__24022 = seq__24013_24017; var G__24023 = chunk__24014_24018; var G__24024 = count__24015_24019; var G__24025 = (i__24016_24020 + (1)); seq__24013_24017 = G__24022; chunk__24014_24018 = G__24023; count__24015_24019 = G__24024; i__24016_24020 = G__24025; continue; } else { var temp__4425__auto___24026 = cljs.core.seq.call(null,seq__24013_24017); if(temp__4425__auto___24026){ var seq__24013_24027__$1 = temp__4425__auto___24026; if(cljs.core.chunked_seq_QMARK_.call(null,seq__24013_24027__$1)){ var c__17629__auto___24028 = cljs.core.chunk_first.call(null,seq__24013_24027__$1); var G__24029 = cljs.core.chunk_rest.call(null,seq__24013_24027__$1); var G__24030 = c__17629__auto___24028; var G__24031 = cljs.core.count.call(null,c__17629__auto___24028); var G__24032 = (0); seq__24013_24017 = G__24029; chunk__24014_24018 = G__24030; count__24015_24019 = G__24031; i__24016_24020 = G__24032; continue; } else { var ns_24033 = cljs.core.first.call(null,seq__24013_24027__$1); figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24033); var G__24034 = cljs.core.next.call(null,seq__24013_24027__$1); var G__24035 = null; var G__24036 = (0); var G__24037 = (0); seq__24013_24017 = G__24034; chunk__24014_24018 = G__24035; count__24015_24019 = G__24036; i__24016_24020 = G__24037; continue; } } else { } } break; } } else { } if(cljs.core.truth_(reload)){ figwheel.client.file_reloading.unprovide_BANG_.call(null,src); } else { } return goog.require_figwheel_backup_(src); }); /** * Reusable browser REPL bootstrapping. Patches the essential functions * in goog.base to support re-loading of namespaces after page load. */ figwheel.client.file_reloading.bootstrap_goog_base = (function figwheel$client$file_reloading$bootstrap_goog_base(){ if(cljs.core.truth_(COMPILED)){ return null; } else { goog.require_figwheel_backup_ = (function (){var or__16826__auto__ = goog.require__; if(cljs.core.truth_(or__16826__auto__)){ return or__16826__auto__; } else { return goog.require; } })(); goog.isProvided_ = (function (name){ return false; }); figwheel.client.file_reloading.setup_path__GT_name_BANG_.call(null); figwheel.client.file_reloading.setup_ns__GT_dependents_BANG_.call(null); goog.addDependency_figwheel_backup_ = goog.addDependency; goog.addDependency = (function() { var G__24038__delegate = function (args){ cljs.core.apply.call(null,figwheel.client.file_reloading.addDependency,args); return cljs.core.apply.call(null,goog.addDependency_figwheel_backup_,args); }; var G__24038 = function (var_args){ var args = null; if (arguments.length > 0) { var G__24039__i = 0, G__24039__a = new Array(arguments.length - 0); while (G__24039__i < G__24039__a.length) {G__24039__a[G__24039__i] = arguments[G__24039__i + 0]; ++G__24039__i;} args = new cljs.core.IndexedSeq(G__24039__a,0); } return G__24038__delegate.call(this,args);}; G__24038.cljs$lang$maxFixedArity = 0; G__24038.cljs$lang$applyTo = (function (arglist__24040){ var args = cljs.core.seq(arglist__24040); return G__24038__delegate(args); }); G__24038.cljs$core$IFn$_invoke$arity$variadic = G__24038__delegate; return G__24038; })() ; goog.constructNamespace_("cljs.user"); goog.global.CLOSURE_IMPORT_SCRIPT = figwheel.client.file_reloading.queued_file_reload; return goog.require = figwheel.client.file_reloading.figwheel_require; } }); figwheel.client.file_reloading.patch_goog_base = (function figwheel$client$file_reloading$patch_goog_base(){ if(typeof figwheel.client.file_reloading.bootstrapped_cljs !== 'undefined'){ return null; } else { figwheel.client.file_reloading.bootstrapped_cljs = (function (){ figwheel.client.file_reloading.bootstrap_goog_base.call(null); return true; })() ; } }); figwheel.client.file_reloading.reload_file_STAR_ = (function (){var pred__24042 = cljs.core._EQ_; var expr__24043 = figwheel.client.utils.host_env_QMARK_.call(null); if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"node","node",581201198),expr__24043))){ var path_parts = ((function (pred__24042,expr__24043){ return (function (p1__24041_SHARP_){ return clojure.string.split.call(null,p1__24041_SHARP_,/[\/\\]/); });})(pred__24042,expr__24043)) ; var sep = (cljs.core.truth_(cljs.core.re_matches.call(null,/win.*/,process.platform))?"\\":"/"); var root = clojure.string.join.call(null,sep,cljs.core.pop.call(null,cljs.core.pop.call(null,path_parts.call(null,__dirname)))); return ((function (path_parts,sep,root,pred__24042,expr__24043){ return (function (request_url,callback){ var cache_path = clojure.string.join.call(null,sep,cljs.core.cons.call(null,root,path_parts.call(null,figwheel.client.file_reloading.fix_node_request_url.call(null,request_url)))); (require.cache[cache_path] = null); return callback.call(null,(function (){try{return require(cache_path); }catch (e24045){if((e24045 instanceof Error)){ var e = e24045; figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(cache_path)].join('')); figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),e.stack); return false; } else { throw e24045; } }})()); }); ;})(path_parts,sep,root,pred__24042,expr__24043)) } else { if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"html","html",-998796897),expr__24043))){ return ((function (pred__24042,expr__24043){ return (function (request_url,callback){ var deferred = goog.net.jsloader.load(figwheel.client.file_reloading.add_cache_buster.call(null,request_url),{"cleanupWhenDone": true}); deferred.addCallback(((function (deferred,pred__24042,expr__24043){ return (function (){ return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [true], null)); });})(deferred,pred__24042,expr__24043)) ); return deferred.addErrback(((function (deferred,pred__24042,expr__24043){ return (function (){ return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [false], null)); });})(deferred,pred__24042,expr__24043)) ); }); ;})(pred__24042,expr__24043)) } else { return ((function (pred__24042,expr__24043){ return (function (a,b){ throw "Reload not defined for this platform"; }); ;})(pred__24042,expr__24043)) } } })(); figwheel.client.file_reloading.reload_file = (function figwheel$client$file_reloading$reload_file(p__24046,callback){ var map__24049 = p__24046; var map__24049__$1 = ((((!((map__24049 == null)))?((((map__24049.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24049.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24049):map__24049); var file_msg = map__24049__$1; var request_url = cljs.core.get.call(null,map__24049__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596)); figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Attempting to load "),cljs.core.str(request_url)].join('')); return figwheel.client.file_reloading.reload_file_STAR_.call(null,request_url,((function (map__24049,map__24049__$1,file_msg,request_url){ return (function (success_QMARK_){ if(cljs.core.truth_(success_QMARK_)){ figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Successfully loaded "),cljs.core.str(request_url)].join('')); return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.assoc.call(null,file_msg,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),true)], null)); } else { figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(request_url)].join('')); return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null)); } });})(map__24049,map__24049__$1,file_msg,request_url)) ); }); if(typeof figwheel.client.file_reloading.reload_chan !== 'undefined'){ } else { figwheel.client.file_reloading.reload_chan = cljs.core.async.chan.call(null); } if(typeof figwheel.client.file_reloading.on_load_callbacks !== 'undefined'){ } else { figwheel.client.file_reloading.on_load_callbacks = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY); } if(typeof figwheel.client.file_reloading.dependencies_loaded !== 'undefined'){ } else { figwheel.client.file_reloading.dependencies_loaded = cljs.core.atom.call(null,cljs.core.PersistentVector.EMPTY); } figwheel.client.file_reloading.blocking_load = (function figwheel$client$file_reloading$blocking_load(url){ var out = cljs.core.async.chan.call(null); figwheel.client.file_reloading.reload_file.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"request-url","request-url",2100346596),url], null),((function (out){ return (function (file_msg){ cljs.core.async.put_BANG_.call(null,out,file_msg); return cljs.core.async.close_BANG_.call(null,out); });})(out)) ); return out; }); if(typeof figwheel.client.file_reloading.reloader_loop !== 'undefined'){ } else { figwheel.client.file_reloading.reloader_loop = (function (){var c__20950__auto__ = cljs.core.async.chan.call(null,(1)); cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__){ return (function (){ var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto__){ return (function (state_24073){ var state_val_24074 = (state_24073[(1)]); if((state_val_24074 === (7))){ var inst_24069 = (state_24073[(2)]); var state_24073__$1 = state_24073; var statearr_24075_24095 = state_24073__$1; (statearr_24075_24095[(2)] = inst_24069); (statearr_24075_24095[(1)] = (3)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (1))){ var state_24073__$1 = state_24073; var statearr_24076_24096 = state_24073__$1; (statearr_24076_24096[(2)] = null); (statearr_24076_24096[(1)] = (2)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (4))){ var inst_24053 = (state_24073[(7)]); var inst_24053__$1 = (state_24073[(2)]); var state_24073__$1 = (function (){var statearr_24077 = state_24073; (statearr_24077[(7)] = inst_24053__$1); return statearr_24077; })(); if(cljs.core.truth_(inst_24053__$1)){ var statearr_24078_24097 = state_24073__$1; (statearr_24078_24097[(1)] = (5)); } else { var statearr_24079_24098 = state_24073__$1; (statearr_24079_24098[(1)] = (6)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (6))){ var state_24073__$1 = state_24073; var statearr_24080_24099 = state_24073__$1; (statearr_24080_24099[(2)] = null); (statearr_24080_24099[(1)] = (7)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (3))){ var inst_24071 = (state_24073[(2)]); var state_24073__$1 = state_24073; return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24073__$1,inst_24071); } else { if((state_val_24074 === (2))){ var state_24073__$1 = state_24073; return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(4),figwheel.client.file_reloading.reload_chan); } else { if((state_val_24074 === (11))){ var inst_24065 = (state_24073[(2)]); var state_24073__$1 = (function (){var statearr_24081 = state_24073; (statearr_24081[(8)] = inst_24065); return statearr_24081; })(); var statearr_24082_24100 = state_24073__$1; (statearr_24082_24100[(2)] = null); (statearr_24082_24100[(1)] = (2)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (9))){ var inst_24057 = (state_24073[(9)]); var inst_24059 = (state_24073[(10)]); var inst_24061 = inst_24059.call(null,inst_24057); var state_24073__$1 = state_24073; var statearr_24083_24101 = state_24073__$1; (statearr_24083_24101[(2)] = inst_24061); (statearr_24083_24101[(1)] = (11)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (5))){ var inst_24053 = (state_24073[(7)]); var inst_24055 = figwheel.client.file_reloading.blocking_load.call(null,inst_24053); var state_24073__$1 = state_24073; return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(8),inst_24055); } else { if((state_val_24074 === (10))){ var inst_24057 = (state_24073[(9)]); var inst_24063 = cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,cljs.core.conj,inst_24057); var state_24073__$1 = state_24073; var statearr_24084_24102 = state_24073__$1; (statearr_24084_24102[(2)] = inst_24063); (statearr_24084_24102[(1)] = (11)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24074 === (8))){ var inst_24059 = (state_24073[(10)]); var inst_24053 = (state_24073[(7)]); var inst_24057 = (state_24073[(2)]); var inst_24058 = cljs.core.deref.call(null,figwheel.client.file_reloading.on_load_callbacks); var inst_24059__$1 = cljs.core.get.call(null,inst_24058,inst_24053); var state_24073__$1 = (function (){var statearr_24085 = state_24073; (statearr_24085[(9)] = inst_24057); (statearr_24085[(10)] = inst_24059__$1); return statearr_24085; })(); if(cljs.core.truth_(inst_24059__$1)){ var statearr_24086_24103 = state_24073__$1; (statearr_24086_24103[(1)] = (9)); } else { var statearr_24087_24104 = state_24073__$1; (statearr_24087_24104[(1)] = (10)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { return null; } } } } } } } } } } } });})(c__20950__auto__)) ; return ((function (switch__20838__auto__,c__20950__auto__){ return (function() { var figwheel$client$file_reloading$state_machine__20839__auto__ = null; var figwheel$client$file_reloading$state_machine__20839__auto____0 = (function (){ var statearr_24091 = [null,null,null,null,null,null,null,null,null,null,null]; (statearr_24091[(0)] = figwheel$client$file_reloading$state_machine__20839__auto__); (statearr_24091[(1)] = (1)); return statearr_24091; }); var figwheel$client$file_reloading$state_machine__20839__auto____1 = (function (state_24073){ while(true){ var ret_value__20840__auto__ = (function (){try{while(true){ var result__20841__auto__ = switch__20838__auto__.call(null,state_24073); if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ continue; } else { return result__20841__auto__; } break; } }catch (e24092){if((e24092 instanceof Object)){ var ex__20842__auto__ = e24092; var statearr_24093_24105 = state_24073; (statearr_24093_24105[(5)] = ex__20842__auto__); cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24073); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { throw e24092; } }})(); if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ var G__24106 = state_24073; state_24073 = G__24106; continue; } else { return ret_value__20840__auto__; } break; } }); figwheel$client$file_reloading$state_machine__20839__auto__ = function(state_24073){ switch(arguments.length){ case 0: return figwheel$client$file_reloading$state_machine__20839__auto____0.call(this); case 1: return figwheel$client$file_reloading$state_machine__20839__auto____1.call(this,state_24073); } throw(new Error('Invalid arity: ' + arguments.length)); }; figwheel$client$file_reloading$state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$state_machine__20839__auto____0; figwheel$client$file_reloading$state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$state_machine__20839__auto____1; return figwheel$client$file_reloading$state_machine__20839__auto__; })() ;})(switch__20838__auto__,c__20950__auto__)) })(); var state__20952__auto__ = (function (){var statearr_24094 = f__20951__auto__.call(null); (statearr_24094[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__); return statearr_24094; })(); return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__); });})(c__20950__auto__)) ); return c__20950__auto__; })(); } figwheel.client.file_reloading.queued_file_reload = (function figwheel$client$file_reloading$queued_file_reload(url){ return cljs.core.async.put_BANG_.call(null,figwheel.client.file_reloading.reload_chan,url); }); figwheel.client.file_reloading.require_with_callback = (function figwheel$client$file_reloading$require_with_callback(p__24107,callback){ var map__24110 = p__24107; var map__24110__$1 = ((((!((map__24110 == null)))?((((map__24110.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24110.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24110):map__24110); var file_msg = map__24110__$1; var namespace = cljs.core.get.call(null,map__24110__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); var request_url = figwheel.client.file_reloading.resolve_ns.call(null,namespace); cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.assoc,request_url,((function (request_url,map__24110,map__24110__$1,file_msg,namespace){ return (function (file_msg_SINGLEQUOTE_){ cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.dissoc,request_url); return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.merge.call(null,file_msg,cljs.core.select_keys.call(null,file_msg_SINGLEQUOTE_,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375)], null)))], null)); });})(request_url,map__24110,map__24110__$1,file_msg,namespace)) ); return figwheel.client.file_reloading.figwheel_require.call(null,cljs.core.name.call(null,namespace),true); }); figwheel.client.file_reloading.reload_file_QMARK_ = (function figwheel$client$file_reloading$reload_file_QMARK_(p__24112){ var map__24115 = p__24112; var map__24115__$1 = ((((!((map__24115 == null)))?((((map__24115.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24115.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24115):map__24115); var file_msg = map__24115__$1; var namespace = cljs.core.get.call(null,map__24115__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); var meta_pragmas = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas),cljs.core.name.call(null,namespace)); var and__16814__auto__ = cljs.core.not.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179).cljs$core$IFn$_invoke$arity$1(meta_pragmas)); if(and__16814__auto__){ var or__16826__auto__ = new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(meta_pragmas); if(cljs.core.truth_(or__16826__auto__)){ return or__16826__auto__; } else { var or__16826__auto____$1 = new cljs.core.Keyword(null,"figwheel-load","figwheel-load",1316089175).cljs$core$IFn$_invoke$arity$1(meta_pragmas); if(cljs.core.truth_(or__16826__auto____$1)){ return or__16826__auto____$1; } else { return figwheel.client.file_reloading.provided_QMARK_.call(null,cljs.core.name.call(null,namespace)); } } } else { return and__16814__auto__; } }); figwheel.client.file_reloading.js_reload = (function figwheel$client$file_reloading$js_reload(p__24117,callback){ var map__24120 = p__24117; var map__24120__$1 = ((((!((map__24120 == null)))?((((map__24120.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24120.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24120):map__24120); var file_msg = map__24120__$1; var request_url = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596)); var namespace = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); if(cljs.core.truth_(figwheel.client.file_reloading.reload_file_QMARK_.call(null,file_msg))){ return figwheel.client.file_reloading.require_with_callback.call(null,file_msg,callback); } else { figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Figwheel: Not trying to load file "),cljs.core.str(request_url)].join('')); return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null)); } }); figwheel.client.file_reloading.reload_js_file = (function figwheel$client$file_reloading$reload_js_file(file_msg){ var out = cljs.core.async.chan.call(null); figwheel.client.file_reloading.js_reload.call(null,file_msg,((function (out){ return (function (url){ cljs.core.async.put_BANG_.call(null,out,url); return cljs.core.async.close_BANG_.call(null,out); });})(out)) ); return out; }); /** * Returns a chanel with one collection of loaded filenames on it. */ figwheel.client.file_reloading.load_all_js_files = (function figwheel$client$file_reloading$load_all_js_files(files){ var out = cljs.core.async.chan.call(null); var c__20950__auto___24208 = cljs.core.async.chan.call(null,(1)); cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto___24208,out){ return (function (){ var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto___24208,out){ return (function (state_24190){ var state_val_24191 = (state_24190[(1)]); if((state_val_24191 === (1))){ var inst_24168 = cljs.core.nth.call(null,files,(0),null); var inst_24169 = cljs.core.nthnext.call(null,files,(1)); var inst_24170 = files; var state_24190__$1 = (function (){var statearr_24192 = state_24190; (statearr_24192[(7)] = inst_24168); (statearr_24192[(8)] = inst_24169); (statearr_24192[(9)] = inst_24170); return statearr_24192; })(); var statearr_24193_24209 = state_24190__$1; (statearr_24193_24209[(2)] = null); (statearr_24193_24209[(1)] = (2)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24191 === (2))){ var inst_24173 = (state_24190[(10)]); var inst_24170 = (state_24190[(9)]); var inst_24173__$1 = cljs.core.nth.call(null,inst_24170,(0),null); var inst_24174 = cljs.core.nthnext.call(null,inst_24170,(1)); var inst_24175 = (inst_24173__$1 == null); var inst_24176 = cljs.core.not.call(null,inst_24175); var state_24190__$1 = (function (){var statearr_24194 = state_24190; (statearr_24194[(11)] = inst_24174); (statearr_24194[(10)] = inst_24173__$1); return statearr_24194; })(); if(inst_24176){ var statearr_24195_24210 = state_24190__$1; (statearr_24195_24210[(1)] = (4)); } else { var statearr_24196_24211 = state_24190__$1; (statearr_24196_24211[(1)] = (5)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24191 === (3))){ var inst_24188 = (state_24190[(2)]); var state_24190__$1 = state_24190; return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24190__$1,inst_24188); } else { if((state_val_24191 === (4))){ var inst_24173 = (state_24190[(10)]); var inst_24178 = figwheel.client.file_reloading.reload_js_file.call(null,inst_24173); var state_24190__$1 = state_24190; return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24190__$1,(7),inst_24178); } else { if((state_val_24191 === (5))){ var inst_24184 = cljs.core.async.close_BANG_.call(null,out); var state_24190__$1 = state_24190; var statearr_24197_24212 = state_24190__$1; (statearr_24197_24212[(2)] = inst_24184); (statearr_24197_24212[(1)] = (6)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24191 === (6))){ var inst_24186 = (state_24190[(2)]); var state_24190__$1 = state_24190; var statearr_24198_24213 = state_24190__$1; (statearr_24198_24213[(2)] = inst_24186); (statearr_24198_24213[(1)] = (3)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24191 === (7))){ var inst_24174 = (state_24190[(11)]); var inst_24180 = (state_24190[(2)]); var inst_24181 = cljs.core.async.put_BANG_.call(null,out,inst_24180); var inst_24170 = inst_24174; var state_24190__$1 = (function (){var statearr_24199 = state_24190; (statearr_24199[(9)] = inst_24170); (statearr_24199[(12)] = inst_24181); return statearr_24199; })(); var statearr_24200_24214 = state_24190__$1; (statearr_24200_24214[(2)] = null); (statearr_24200_24214[(1)] = (2)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { return null; } } } } } } } });})(c__20950__auto___24208,out)) ; return ((function (switch__20838__auto__,c__20950__auto___24208,out){ return (function() { var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__ = null; var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0 = (function (){ var statearr_24204 = [null,null,null,null,null,null,null,null,null,null,null,null,null]; (statearr_24204[(0)] = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__); (statearr_24204[(1)] = (1)); return statearr_24204; }); var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1 = (function (state_24190){ while(true){ var ret_value__20840__auto__ = (function (){try{while(true){ var result__20841__auto__ = switch__20838__auto__.call(null,state_24190); if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ continue; } else { return result__20841__auto__; } break; } }catch (e24205){if((e24205 instanceof Object)){ var ex__20842__auto__ = e24205; var statearr_24206_24215 = state_24190; (statearr_24206_24215[(5)] = ex__20842__auto__); cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24190); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { throw e24205; } }})(); if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ var G__24216 = state_24190; state_24190 = G__24216; continue; } else { return ret_value__20840__auto__; } break; } }); figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__ = function(state_24190){ switch(arguments.length){ case 0: return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0.call(this); case 1: return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1.call(this,state_24190); } throw(new Error('Invalid arity: ' + arguments.length)); }; figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0; figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1; return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__; })() ;})(switch__20838__auto__,c__20950__auto___24208,out)) })(); var state__20952__auto__ = (function (){var statearr_24207 = f__20951__auto__.call(null); (statearr_24207[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto___24208); return statearr_24207; })(); return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__); });})(c__20950__auto___24208,out)) ); return cljs.core.async.into.call(null,cljs.core.PersistentVector.EMPTY,out); }); figwheel.client.file_reloading.eval_body = (function figwheel$client$file_reloading$eval_body(p__24217,opts){ var map__24221 = p__24217; var map__24221__$1 = ((((!((map__24221 == null)))?((((map__24221.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24221.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24221):map__24221); var eval_body__$1 = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883)); var file = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"file","file",-1269645878)); if(cljs.core.truth_((function (){var and__16814__auto__ = eval_body__$1; if(cljs.core.truth_(and__16814__auto__)){ return typeof eval_body__$1 === 'string'; } else { return and__16814__auto__; } })())){ var code = eval_body__$1; try{figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Evaling file "),cljs.core.str(file)].join('')); return figwheel.client.utils.eval_helper.call(null,code,opts); }catch (e24223){var e = e24223; return figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Unable to evaluate "),cljs.core.str(file)].join('')); }} else { return null; } }); figwheel.client.file_reloading.expand_files = (function figwheel$client$file_reloading$expand_files(files){ var deps = figwheel.client.file_reloading.get_all_dependents.call(null,cljs.core.map.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files)); return cljs.core.filter.call(null,cljs.core.comp.call(null,cljs.core.not,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, ["figwheel.connect",null], null), null),new cljs.core.Keyword(null,"namespace","namespace",-377510372)),cljs.core.map.call(null,((function (deps){ return (function (n){ var temp__4423__auto__ = cljs.core.first.call(null,cljs.core.filter.call(null,((function (deps){ return (function (p1__24224_SHARP_){ return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24224_SHARP_),n); });})(deps)) ,files)); if(cljs.core.truth_(temp__4423__auto__)){ var file_msg = temp__4423__auto__; return file_msg; } else { return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372),new cljs.core.Keyword(null,"namespace","namespace",-377510372),n], null); } });})(deps)) ,deps)); }); figwheel.client.file_reloading.sort_files = (function figwheel$client$file_reloading$sort_files(files){ if((cljs.core.count.call(null,files) <= (1))){ return files; } else { var keep_files = cljs.core.set.call(null,cljs.core.keep.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files)); return cljs.core.filter.call(null,cljs.core.comp.call(null,keep_files,new cljs.core.Keyword(null,"namespace","namespace",-377510372)),figwheel.client.file_reloading.expand_files.call(null,files)); } }); figwheel.client.file_reloading.get_figwheel_always = (function figwheel$client$file_reloading$get_figwheel_always(){ return cljs.core.map.call(null,(function (p__24229){ var vec__24230 = p__24229; var k = cljs.core.nth.call(null,vec__24230,(0),null); var v = cljs.core.nth.call(null,vec__24230,(1),null); return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"namespace","namespace",-377510372),k,new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372)], null); }),cljs.core.filter.call(null,(function (p__24231){ var vec__24232 = p__24231; var k = cljs.core.nth.call(null,vec__24232,(0),null); var v = cljs.core.nth.call(null,vec__24232,(1),null); return new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(v); }),cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas))); }); figwheel.client.file_reloading.reload_js_files = (function figwheel$client$file_reloading$reload_js_files(p__24236,p__24237){ var map__24484 = p__24236; var map__24484__$1 = ((((!((map__24484 == null)))?((((map__24484.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24484.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24484):map__24484); var opts = map__24484__$1; var before_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"before-jsload","before-jsload",-847513128)); var on_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"on-jsload","on-jsload",-395756602)); var reload_dependents = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"reload-dependents","reload-dependents",-956865430)); var map__24485 = p__24237; var map__24485__$1 = ((((!((map__24485 == null)))?((((map__24485.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24485.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24485):map__24485); var msg = map__24485__$1; var files = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"files","files",-472457450)); var figwheel_meta = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"figwheel-meta","figwheel-meta",-225970237)); var recompile_dependents = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"recompile-dependents","recompile-dependents",523804171)); if(cljs.core.empty_QMARK_.call(null,figwheel_meta)){ } else { cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas,figwheel_meta); } var c__20950__auto__ = cljs.core.async.chan.call(null,(1)); cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (){ var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (state_24638){ var state_val_24639 = (state_24638[(1)]); if((state_val_24639 === (7))){ var inst_24501 = (state_24638[(7)]); var inst_24500 = (state_24638[(8)]); var inst_24502 = (state_24638[(9)]); var inst_24499 = (state_24638[(10)]); var inst_24507 = cljs.core._nth.call(null,inst_24500,inst_24502); var inst_24508 = figwheel.client.file_reloading.eval_body.call(null,inst_24507,opts); var inst_24509 = (inst_24502 + (1)); var tmp24640 = inst_24501; var tmp24641 = inst_24500; var tmp24642 = inst_24499; var inst_24499__$1 = tmp24642; var inst_24500__$1 = tmp24641; var inst_24501__$1 = tmp24640; var inst_24502__$1 = inst_24509; var state_24638__$1 = (function (){var statearr_24643 = state_24638; (statearr_24643[(7)] = inst_24501__$1); (statearr_24643[(8)] = inst_24500__$1); (statearr_24643[(9)] = inst_24502__$1); (statearr_24643[(11)] = inst_24508); (statearr_24643[(10)] = inst_24499__$1); return statearr_24643; })(); var statearr_24644_24730 = state_24638__$1; (statearr_24644_24730[(2)] = null); (statearr_24644_24730[(1)] = (5)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (20))){ var inst_24542 = (state_24638[(12)]); var inst_24550 = figwheel.client.file_reloading.sort_files.call(null,inst_24542); var state_24638__$1 = state_24638; var statearr_24645_24731 = state_24638__$1; (statearr_24645_24731[(2)] = inst_24550); (statearr_24645_24731[(1)] = (21)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (27))){ var state_24638__$1 = state_24638; var statearr_24646_24732 = state_24638__$1; (statearr_24646_24732[(2)] = null); (statearr_24646_24732[(1)] = (28)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (1))){ var inst_24491 = (state_24638[(13)]); var inst_24488 = before_jsload.call(null,files); var inst_24489 = figwheel.client.file_reloading.before_jsload_custom_event.call(null,files); var inst_24490 = (function (){return ((function (inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p1__24233_SHARP_){ return new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24233_SHARP_); }); ;})(inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24491__$1 = cljs.core.filter.call(null,inst_24490,files); var inst_24492 = cljs.core.not_empty.call(null,inst_24491__$1); var state_24638__$1 = (function (){var statearr_24647 = state_24638; (statearr_24647[(13)] = inst_24491__$1); (statearr_24647[(14)] = inst_24489); (statearr_24647[(15)] = inst_24488); return statearr_24647; })(); if(cljs.core.truth_(inst_24492)){ var statearr_24648_24733 = state_24638__$1; (statearr_24648_24733[(1)] = (2)); } else { var statearr_24649_24734 = state_24638__$1; (statearr_24649_24734[(1)] = (3)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (24))){ var state_24638__$1 = state_24638; var statearr_24650_24735 = state_24638__$1; (statearr_24650_24735[(2)] = null); (statearr_24650_24735[(1)] = (25)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (39))){ var inst_24592 = (state_24638[(16)]); var state_24638__$1 = state_24638; var statearr_24651_24736 = state_24638__$1; (statearr_24651_24736[(2)] = inst_24592); (statearr_24651_24736[(1)] = (40)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (46))){ var inst_24633 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24652_24737 = state_24638__$1; (statearr_24652_24737[(2)] = inst_24633); (statearr_24652_24737[(1)] = (31)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (4))){ var inst_24536 = (state_24638[(2)]); var inst_24537 = cljs.core.List.EMPTY; var inst_24538 = cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,inst_24537); var inst_24539 = (function (){return ((function (inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p1__24234_SHARP_){ var and__16814__auto__ = new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_); if(cljs.core.truth_(and__16814__auto__)){ return cljs.core.not.call(null,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_)); } else { return and__16814__auto__; } }); ;})(inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24540 = cljs.core.filter.call(null,inst_24539,files); var inst_24541 = figwheel.client.file_reloading.get_figwheel_always.call(null); var inst_24542 = cljs.core.concat.call(null,inst_24540,inst_24541); var state_24638__$1 = (function (){var statearr_24653 = state_24638; (statearr_24653[(17)] = inst_24536); (statearr_24653[(18)] = inst_24538); (statearr_24653[(12)] = inst_24542); return statearr_24653; })(); if(cljs.core.truth_(reload_dependents)){ var statearr_24654_24738 = state_24638__$1; (statearr_24654_24738[(1)] = (16)); } else { var statearr_24655_24739 = state_24638__$1; (statearr_24655_24739[(1)] = (17)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (15))){ var inst_24526 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24656_24740 = state_24638__$1; (statearr_24656_24740[(2)] = inst_24526); (statearr_24656_24740[(1)] = (12)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (21))){ var inst_24552 = (state_24638[(19)]); var inst_24552__$1 = (state_24638[(2)]); var inst_24553 = figwheel.client.file_reloading.load_all_js_files.call(null,inst_24552__$1); var state_24638__$1 = (function (){var statearr_24657 = state_24638; (statearr_24657[(19)] = inst_24552__$1); return statearr_24657; })(); return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24638__$1,(22),inst_24553); } else { if((state_val_24639 === (31))){ var inst_24636 = (state_24638[(2)]); var state_24638__$1 = state_24638; return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24638__$1,inst_24636); } else { if((state_val_24639 === (32))){ var inst_24592 = (state_24638[(16)]); var inst_24597 = inst_24592.cljs$lang$protocol_mask$partition0$; var inst_24598 = (inst_24597 & (64)); var inst_24599 = inst_24592.cljs$core$ISeq$; var inst_24600 = (inst_24598) || (inst_24599); var state_24638__$1 = state_24638; if(cljs.core.truth_(inst_24600)){ var statearr_24658_24741 = state_24638__$1; (statearr_24658_24741[(1)] = (35)); } else { var statearr_24659_24742 = state_24638__$1; (statearr_24659_24742[(1)] = (36)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (40))){ var inst_24613 = (state_24638[(20)]); var inst_24612 = (state_24638[(2)]); var inst_24613__$1 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179)); var inst_24614 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"not-required","not-required",-950359114)); var inst_24615 = cljs.core.not_empty.call(null,inst_24613__$1); var state_24638__$1 = (function (){var statearr_24660 = state_24638; (statearr_24660[(20)] = inst_24613__$1); (statearr_24660[(21)] = inst_24614); return statearr_24660; })(); if(cljs.core.truth_(inst_24615)){ var statearr_24661_24743 = state_24638__$1; (statearr_24661_24743[(1)] = (41)); } else { var statearr_24662_24744 = state_24638__$1; (statearr_24662_24744[(1)] = (42)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (33))){ var state_24638__$1 = state_24638; var statearr_24663_24745 = state_24638__$1; (statearr_24663_24745[(2)] = false); (statearr_24663_24745[(1)] = (34)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (13))){ var inst_24512 = (state_24638[(22)]); var inst_24516 = cljs.core.chunk_first.call(null,inst_24512); var inst_24517 = cljs.core.chunk_rest.call(null,inst_24512); var inst_24518 = cljs.core.count.call(null,inst_24516); var inst_24499 = inst_24517; var inst_24500 = inst_24516; var inst_24501 = inst_24518; var inst_24502 = (0); var state_24638__$1 = (function (){var statearr_24664 = state_24638; (statearr_24664[(7)] = inst_24501); (statearr_24664[(8)] = inst_24500); (statearr_24664[(9)] = inst_24502); (statearr_24664[(10)] = inst_24499); return statearr_24664; })(); var statearr_24665_24746 = state_24638__$1; (statearr_24665_24746[(2)] = null); (statearr_24665_24746[(1)] = (5)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (22))){ var inst_24552 = (state_24638[(19)]); var inst_24560 = (state_24638[(23)]); var inst_24556 = (state_24638[(24)]); var inst_24555 = (state_24638[(25)]); var inst_24555__$1 = (state_24638[(2)]); var inst_24556__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24555__$1); var inst_24557 = (function (){var all_files = inst_24552; var res_SINGLEQUOTE_ = inst_24555__$1; var res = inst_24556__$1; return ((function (all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p1__24235_SHARP_){ return cljs.core.not.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375).cljs$core$IFn$_invoke$arity$1(p1__24235_SHARP_)); }); ;})(all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24558 = cljs.core.filter.call(null,inst_24557,inst_24555__$1); var inst_24559 = cljs.core.deref.call(null,figwheel.client.file_reloading.dependencies_loaded); var inst_24560__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24559); var inst_24561 = cljs.core.not_empty.call(null,inst_24560__$1); var state_24638__$1 = (function (){var statearr_24666 = state_24638; (statearr_24666[(26)] = inst_24558); (statearr_24666[(23)] = inst_24560__$1); (statearr_24666[(24)] = inst_24556__$1); (statearr_24666[(25)] = inst_24555__$1); return statearr_24666; })(); if(cljs.core.truth_(inst_24561)){ var statearr_24667_24747 = state_24638__$1; (statearr_24667_24747[(1)] = (23)); } else { var statearr_24668_24748 = state_24638__$1; (statearr_24668_24748[(1)] = (24)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (36))){ var state_24638__$1 = state_24638; var statearr_24669_24749 = state_24638__$1; (statearr_24669_24749[(2)] = false); (statearr_24669_24749[(1)] = (37)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (41))){ var inst_24613 = (state_24638[(20)]); var inst_24617 = cljs.core.comp.call(null,figwheel.client.file_reloading.name__GT_path,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); var inst_24618 = cljs.core.map.call(null,inst_24617,inst_24613); var inst_24619 = cljs.core.pr_str.call(null,inst_24618); var inst_24620 = [cljs.core.str("figwheel-no-load meta-data: "),cljs.core.str(inst_24619)].join(''); var inst_24621 = figwheel.client.utils.log.call(null,inst_24620); var state_24638__$1 = state_24638; var statearr_24670_24750 = state_24638__$1; (statearr_24670_24750[(2)] = inst_24621); (statearr_24670_24750[(1)] = (43)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (43))){ var inst_24614 = (state_24638[(21)]); var inst_24624 = (state_24638[(2)]); var inst_24625 = cljs.core.not_empty.call(null,inst_24614); var state_24638__$1 = (function (){var statearr_24671 = state_24638; (statearr_24671[(27)] = inst_24624); return statearr_24671; })(); if(cljs.core.truth_(inst_24625)){ var statearr_24672_24751 = state_24638__$1; (statearr_24672_24751[(1)] = (44)); } else { var statearr_24673_24752 = state_24638__$1; (statearr_24673_24752[(1)] = (45)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (29))){ var inst_24552 = (state_24638[(19)]); var inst_24558 = (state_24638[(26)]); var inst_24592 = (state_24638[(16)]); var inst_24560 = (state_24638[(23)]); var inst_24556 = (state_24638[(24)]); var inst_24555 = (state_24638[(25)]); var inst_24588 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: NOT loading these files "); var inst_24591 = (function (){var all_files = inst_24552; var res_SINGLEQUOTE_ = inst_24555; var res = inst_24556; var files_not_loaded = inst_24558; var dependencies_that_loaded = inst_24560; return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p__24590){ var map__24674 = p__24590; var map__24674__$1 = ((((!((map__24674 == null)))?((((map__24674.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24674.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24674):map__24674); var namespace = cljs.core.get.call(null,map__24674__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); var meta_data = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas),cljs.core.name.call(null,namespace)); if((meta_data == null)){ return new cljs.core.Keyword(null,"not-required","not-required",-950359114); } else { if(cljs.core.truth_(meta_data.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179)))){ return new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179); } else { return new cljs.core.Keyword(null,"not-required","not-required",-950359114); } } }); ;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24592__$1 = cljs.core.group_by.call(null,inst_24591,inst_24558); var inst_24594 = (inst_24592__$1 == null); var inst_24595 = cljs.core.not.call(null,inst_24594); var state_24638__$1 = (function (){var statearr_24676 = state_24638; (statearr_24676[(16)] = inst_24592__$1); (statearr_24676[(28)] = inst_24588); return statearr_24676; })(); if(inst_24595){ var statearr_24677_24753 = state_24638__$1; (statearr_24677_24753[(1)] = (32)); } else { var statearr_24678_24754 = state_24638__$1; (statearr_24678_24754[(1)] = (33)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (44))){ var inst_24614 = (state_24638[(21)]); var inst_24627 = cljs.core.map.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),inst_24614); var inst_24628 = cljs.core.pr_str.call(null,inst_24627); var inst_24629 = [cljs.core.str("not required: "),cljs.core.str(inst_24628)].join(''); var inst_24630 = figwheel.client.utils.log.call(null,inst_24629); var state_24638__$1 = state_24638; var statearr_24679_24755 = state_24638__$1; (statearr_24679_24755[(2)] = inst_24630); (statearr_24679_24755[(1)] = (46)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (6))){ var inst_24533 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24680_24756 = state_24638__$1; (statearr_24680_24756[(2)] = inst_24533); (statearr_24680_24756[(1)] = (4)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (28))){ var inst_24558 = (state_24638[(26)]); var inst_24585 = (state_24638[(2)]); var inst_24586 = cljs.core.not_empty.call(null,inst_24558); var state_24638__$1 = (function (){var statearr_24681 = state_24638; (statearr_24681[(29)] = inst_24585); return statearr_24681; })(); if(cljs.core.truth_(inst_24586)){ var statearr_24682_24757 = state_24638__$1; (statearr_24682_24757[(1)] = (29)); } else { var statearr_24683_24758 = state_24638__$1; (statearr_24683_24758[(1)] = (30)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (25))){ var inst_24556 = (state_24638[(24)]); var inst_24572 = (state_24638[(2)]); var inst_24573 = cljs.core.not_empty.call(null,inst_24556); var state_24638__$1 = (function (){var statearr_24684 = state_24638; (statearr_24684[(30)] = inst_24572); return statearr_24684; })(); if(cljs.core.truth_(inst_24573)){ var statearr_24685_24759 = state_24638__$1; (statearr_24685_24759[(1)] = (26)); } else { var statearr_24686_24760 = state_24638__$1; (statearr_24686_24760[(1)] = (27)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (34))){ var inst_24607 = (state_24638[(2)]); var state_24638__$1 = state_24638; if(cljs.core.truth_(inst_24607)){ var statearr_24687_24761 = state_24638__$1; (statearr_24687_24761[(1)] = (38)); } else { var statearr_24688_24762 = state_24638__$1; (statearr_24688_24762[(1)] = (39)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (17))){ var state_24638__$1 = state_24638; var statearr_24689_24763 = state_24638__$1; (statearr_24689_24763[(2)] = recompile_dependents); (statearr_24689_24763[(1)] = (18)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (3))){ var state_24638__$1 = state_24638; var statearr_24690_24764 = state_24638__$1; (statearr_24690_24764[(2)] = null); (statearr_24690_24764[(1)] = (4)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (12))){ var inst_24529 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24691_24765 = state_24638__$1; (statearr_24691_24765[(2)] = inst_24529); (statearr_24691_24765[(1)] = (9)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (2))){ var inst_24491 = (state_24638[(13)]); var inst_24498 = cljs.core.seq.call(null,inst_24491); var inst_24499 = inst_24498; var inst_24500 = null; var inst_24501 = (0); var inst_24502 = (0); var state_24638__$1 = (function (){var statearr_24692 = state_24638; (statearr_24692[(7)] = inst_24501); (statearr_24692[(8)] = inst_24500); (statearr_24692[(9)] = inst_24502); (statearr_24692[(10)] = inst_24499); return statearr_24692; })(); var statearr_24693_24766 = state_24638__$1; (statearr_24693_24766[(2)] = null); (statearr_24693_24766[(1)] = (5)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (23))){ var inst_24552 = (state_24638[(19)]); var inst_24558 = (state_24638[(26)]); var inst_24560 = (state_24638[(23)]); var inst_24556 = (state_24638[(24)]); var inst_24555 = (state_24638[(25)]); var inst_24563 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these dependencies"); var inst_24565 = (function (){var all_files = inst_24552; var res_SINGLEQUOTE_ = inst_24555; var res = inst_24556; var files_not_loaded = inst_24558; var dependencies_that_loaded = inst_24560; return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p__24564){ var map__24694 = p__24564; var map__24694__$1 = ((((!((map__24694 == null)))?((((map__24694.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24694.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24694):map__24694); var request_url = cljs.core.get.call(null,map__24694__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596)); return clojure.string.replace.call(null,request_url,goog.basePath,""); }); ;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24566 = cljs.core.reverse.call(null,inst_24560); var inst_24567 = cljs.core.map.call(null,inst_24565,inst_24566); var inst_24568 = cljs.core.pr_str.call(null,inst_24567); var inst_24569 = figwheel.client.utils.log.call(null,inst_24568); var state_24638__$1 = (function (){var statearr_24696 = state_24638; (statearr_24696[(31)] = inst_24563); return statearr_24696; })(); var statearr_24697_24767 = state_24638__$1; (statearr_24697_24767[(2)] = inst_24569); (statearr_24697_24767[(1)] = (25)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (35))){ var state_24638__$1 = state_24638; var statearr_24698_24768 = state_24638__$1; (statearr_24698_24768[(2)] = true); (statearr_24698_24768[(1)] = (37)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (19))){ var inst_24542 = (state_24638[(12)]); var inst_24548 = figwheel.client.file_reloading.expand_files.call(null,inst_24542); var state_24638__$1 = state_24638; var statearr_24699_24769 = state_24638__$1; (statearr_24699_24769[(2)] = inst_24548); (statearr_24699_24769[(1)] = (21)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (11))){ var state_24638__$1 = state_24638; var statearr_24700_24770 = state_24638__$1; (statearr_24700_24770[(2)] = null); (statearr_24700_24770[(1)] = (12)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (9))){ var inst_24531 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24701_24771 = state_24638__$1; (statearr_24701_24771[(2)] = inst_24531); (statearr_24701_24771[(1)] = (6)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (5))){ var inst_24501 = (state_24638[(7)]); var inst_24502 = (state_24638[(9)]); var inst_24504 = (inst_24502 < inst_24501); var inst_24505 = inst_24504; var state_24638__$1 = state_24638; if(cljs.core.truth_(inst_24505)){ var statearr_24702_24772 = state_24638__$1; (statearr_24702_24772[(1)] = (7)); } else { var statearr_24703_24773 = state_24638__$1; (statearr_24703_24773[(1)] = (8)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (14))){ var inst_24512 = (state_24638[(22)]); var inst_24521 = cljs.core.first.call(null,inst_24512); var inst_24522 = figwheel.client.file_reloading.eval_body.call(null,inst_24521,opts); var inst_24523 = cljs.core.next.call(null,inst_24512); var inst_24499 = inst_24523; var inst_24500 = null; var inst_24501 = (0); var inst_24502 = (0); var state_24638__$1 = (function (){var statearr_24704 = state_24638; (statearr_24704[(32)] = inst_24522); (statearr_24704[(7)] = inst_24501); (statearr_24704[(8)] = inst_24500); (statearr_24704[(9)] = inst_24502); (statearr_24704[(10)] = inst_24499); return statearr_24704; })(); var statearr_24705_24774 = state_24638__$1; (statearr_24705_24774[(2)] = null); (statearr_24705_24774[(1)] = (5)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (45))){ var state_24638__$1 = state_24638; var statearr_24706_24775 = state_24638__$1; (statearr_24706_24775[(2)] = null); (statearr_24706_24775[(1)] = (46)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (26))){ var inst_24552 = (state_24638[(19)]); var inst_24558 = (state_24638[(26)]); var inst_24560 = (state_24638[(23)]); var inst_24556 = (state_24638[(24)]); var inst_24555 = (state_24638[(25)]); var inst_24575 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these files"); var inst_24577 = (function (){var all_files = inst_24552; var res_SINGLEQUOTE_ = inst_24555; var res = inst_24556; var files_not_loaded = inst_24558; var dependencies_that_loaded = inst_24560; return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (p__24576){ var map__24707 = p__24576; var map__24707__$1 = ((((!((map__24707 == null)))?((((map__24707.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24707.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24707):map__24707); var namespace = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372)); var file = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"file","file",-1269645878)); if(cljs.core.truth_(namespace)){ return figwheel.client.file_reloading.name__GT_path.call(null,cljs.core.name.call(null,namespace)); } else { return file; } }); ;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24578 = cljs.core.map.call(null,inst_24577,inst_24556); var inst_24579 = cljs.core.pr_str.call(null,inst_24578); var inst_24580 = figwheel.client.utils.log.call(null,inst_24579); var inst_24581 = (function (){var all_files = inst_24552; var res_SINGLEQUOTE_ = inst_24555; var res = inst_24556; var files_not_loaded = inst_24558; var dependencies_that_loaded = inst_24560; return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function (){ figwheel.client.file_reloading.on_jsload_custom_event.call(null,res); return cljs.core.apply.call(null,on_jsload,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [res], null)); }); ;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var inst_24582 = setTimeout(inst_24581,(10)); var state_24638__$1 = (function (){var statearr_24709 = state_24638; (statearr_24709[(33)] = inst_24575); (statearr_24709[(34)] = inst_24580); return statearr_24709; })(); var statearr_24710_24776 = state_24638__$1; (statearr_24710_24776[(2)] = inst_24582); (statearr_24710_24776[(1)] = (28)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (16))){ var state_24638__$1 = state_24638; var statearr_24711_24777 = state_24638__$1; (statearr_24711_24777[(2)] = reload_dependents); (statearr_24711_24777[(1)] = (18)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (38))){ var inst_24592 = (state_24638[(16)]); var inst_24609 = cljs.core.apply.call(null,cljs.core.hash_map,inst_24592); var state_24638__$1 = state_24638; var statearr_24712_24778 = state_24638__$1; (statearr_24712_24778[(2)] = inst_24609); (statearr_24712_24778[(1)] = (40)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (30))){ var state_24638__$1 = state_24638; var statearr_24713_24779 = state_24638__$1; (statearr_24713_24779[(2)] = null); (statearr_24713_24779[(1)] = (31)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (10))){ var inst_24512 = (state_24638[(22)]); var inst_24514 = cljs.core.chunked_seq_QMARK_.call(null,inst_24512); var state_24638__$1 = state_24638; if(inst_24514){ var statearr_24714_24780 = state_24638__$1; (statearr_24714_24780[(1)] = (13)); } else { var statearr_24715_24781 = state_24638__$1; (statearr_24715_24781[(1)] = (14)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (18))){ var inst_24546 = (state_24638[(2)]); var state_24638__$1 = state_24638; if(cljs.core.truth_(inst_24546)){ var statearr_24716_24782 = state_24638__$1; (statearr_24716_24782[(1)] = (19)); } else { var statearr_24717_24783 = state_24638__$1; (statearr_24717_24783[(1)] = (20)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (42))){ var state_24638__$1 = state_24638; var statearr_24718_24784 = state_24638__$1; (statearr_24718_24784[(2)] = null); (statearr_24718_24784[(1)] = (43)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (37))){ var inst_24604 = (state_24638[(2)]); var state_24638__$1 = state_24638; var statearr_24719_24785 = state_24638__$1; (statearr_24719_24785[(2)] = inst_24604); (statearr_24719_24785[(1)] = (34)); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { if((state_val_24639 === (8))){ var inst_24512 = (state_24638[(22)]); var inst_24499 = (state_24638[(10)]); var inst_24512__$1 = cljs.core.seq.call(null,inst_24499); var state_24638__$1 = (function (){var statearr_24720 = state_24638; (statearr_24720[(22)] = inst_24512__$1); return statearr_24720; })(); if(inst_24512__$1){ var statearr_24721_24786 = state_24638__$1; (statearr_24721_24786[(1)] = (10)); } else { var statearr_24722_24787 = state_24638__$1; (statearr_24722_24787[(1)] = (11)); } return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { return null; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } });})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) ; return ((function (switch__20838__auto__,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){ return (function() { var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__ = null; var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0 = (function (){ var statearr_24726 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; (statearr_24726[(0)] = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__); (statearr_24726[(1)] = (1)); return statearr_24726; }); var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1 = (function (state_24638){ while(true){ var ret_value__20840__auto__ = (function (){try{while(true){ var result__20841__auto__ = switch__20838__auto__.call(null,state_24638); if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ continue; } else { return result__20841__auto__; } break; } }catch (e24727){if((e24727 instanceof Object)){ var ex__20842__auto__ = e24727; var statearr_24728_24788 = state_24638; (statearr_24728_24788[(5)] = ex__20842__auto__); cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24638); return new cljs.core.Keyword(null,"recur","recur",-437573268); } else { throw e24727; } }})(); if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){ var G__24789 = state_24638; state_24638 = G__24789; continue; } else { return ret_value__20840__auto__; } break; } }); figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__ = function(state_24638){ switch(arguments.length){ case 0: return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0.call(this); case 1: return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1.call(this,state_24638); } throw(new Error('Invalid arity: ' + arguments.length)); }; figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0; figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1; return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__; })() ;})(switch__20838__auto__,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) })(); var state__20952__auto__ = (function (){var statearr_24729 = f__20951__auto__.call(null); (statearr_24729[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__); return statearr_24729; })(); return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__); });})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents)) ); return c__20950__auto__; }); figwheel.client.file_reloading.current_links = (function figwheel$client$file_reloading$current_links(){ return Array.prototype.slice.call(document.getElementsByTagName("link")); }); figwheel.client.file_reloading.truncate_url = (function figwheel$client$file_reloading$truncate_url(url){ return clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,cljs.core.first.call(null,clojure.string.split.call(null,url,/\?/)),[cljs.core.str(location.protocol),cljs.core.str("//")].join(''),""),".*://",""),/^\/\//,""),/[^\\/]*/,""); }); figwheel.client.file_reloading.matches_file_QMARK_ = (function figwheel$client$file_reloading$matches_file_QMARK_(p__24792,link){ var map__24795 = p__24792; var map__24795__$1 = ((((!((map__24795 == null)))?((((map__24795.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24795.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24795):map__24795); var file = cljs.core.get.call(null,map__24795__$1,new cljs.core.Keyword(null,"file","file",-1269645878)); var temp__4425__auto__ = link.href; if(cljs.core.truth_(temp__4425__auto__)){ var link_href = temp__4425__auto__; var match = clojure.string.join.call(null,"/",cljs.core.take_while.call(null,cljs.core.identity,cljs.core.map.call(null,((function (link_href,temp__4425__auto__,map__24795,map__24795__$1,file){ return (function (p1__24790_SHARP_,p2__24791_SHARP_){ if(cljs.core._EQ_.call(null,p1__24790_SHARP_,p2__24791_SHARP_)){ return p1__24790_SHARP_; } else { return false; } });})(link_href,temp__4425__auto__,map__24795,map__24795__$1,file)) ,cljs.core.reverse.call(null,clojure.string.split.call(null,file,"/")),cljs.core.reverse.call(null,clojure.string.split.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href),"/"))))); var match_length = cljs.core.count.call(null,match); var file_name_length = cljs.core.count.call(null,cljs.core.last.call(null,clojure.string.split.call(null,file,"/"))); if((match_length >= file_name_length)){ return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"link","link",-1769163468),link,new cljs.core.Keyword(null,"link-href","link-href",-250644450),link_href,new cljs.core.Keyword(null,"match-length","match-length",1101537310),match_length,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083),cljs.core.count.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href))], null); } else { return null; } } else { return null; } }); figwheel.client.file_reloading.get_correct_link = (function figwheel$client$file_reloading$get_correct_link(f_data){ var temp__4425__auto__ = cljs.core.first.call(null,cljs.core.sort_by.call(null,(function (p__24801){ var map__24802 = p__24801; var map__24802__$1 = ((((!((map__24802 == null)))?((((map__24802.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24802.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24802):map__24802); var match_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"match-length","match-length",1101537310)); var current_url_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083)); return (current_url_length - match_length); }),cljs.core.keep.call(null,(function (p1__24797_SHARP_){ return figwheel.client.file_reloading.matches_file_QMARK_.call(null,f_data,p1__24797_SHARP_); }),figwheel.client.file_reloading.current_links.call(null)))); if(cljs.core.truth_(temp__4425__auto__)){ var res = temp__4425__auto__; return new cljs.core.Keyword(null,"link","link",-1769163468).cljs$core$IFn$_invoke$arity$1(res); } else { return null; } }); figwheel.client.file_reloading.clone_link = (function figwheel$client$file_reloading$clone_link(link,url){ var clone = document.createElement("link"); clone.rel = "stylesheet"; clone.media = link.media; clone.disabled = link.disabled; clone.href = figwheel.client.file_reloading.add_cache_buster.call(null,url); return clone; }); figwheel.client.file_reloading.create_link = (function figwheel$client$file_reloading$create_link(url){ var link = document.createElement("link"); link.rel = "stylesheet"; link.href = figwheel.client.file_reloading.add_cache_buster.call(null,url); return link; }); figwheel.client.file_reloading.add_link_to_doc = (function figwheel$client$file_reloading$add_link_to_doc(var_args){ var args24804 = []; var len__17884__auto___24807 = arguments.length; var i__17885__auto___24808 = (0); while(true){ if((i__17885__auto___24808 < len__17884__auto___24807)){ args24804.push((arguments[i__17885__auto___24808])); var G__24809 = (i__17885__auto___24808 + (1)); i__17885__auto___24808 = G__24809; continue; } else { } break; } var G__24806 = args24804.length; switch (G__24806) { case 1: return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); break; case 2: return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); break; default: throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args24804.length)].join(''))); } }); figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1 = (function (new_link){ return (document.getElementsByTagName("head")[(0)]).appendChild(new_link); }); figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2 = (function (orig_link,klone){ var parent = orig_link.parentNode; if(cljs.core._EQ_.call(null,orig_link,parent.lastChild)){ parent.appendChild(klone); } else { parent.insertBefore(klone,orig_link.nextSibling); } return setTimeout(((function (parent){ return (function (){ return parent.removeChild(orig_link); });})(parent)) ,(300)); }); figwheel.client.file_reloading.add_link_to_doc.cljs$lang$maxFixedArity = 2; figwheel.client.file_reloading.distictify = (function figwheel$client$file_reloading$distictify(key,seqq){ return cljs.core.vals.call(null,cljs.core.reduce.call(null,(function (p1__24811_SHARP_,p2__24812_SHARP_){ return cljs.core.assoc.call(null,p1__24811_SHARP_,cljs.core.get.call(null,p2__24812_SHARP_,key),p2__24812_SHARP_); }),cljs.core.PersistentArrayMap.EMPTY,seqq)); }); figwheel.client.file_reloading.reload_css_file = (function figwheel$client$file_reloading$reload_css_file(p__24813){ var map__24816 = p__24813; var map__24816__$1 = ((((!((map__24816 == null)))?((((map__24816.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24816.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24816):map__24816); var f_data = map__24816__$1; var file = cljs.core.get.call(null,map__24816__$1,new cljs.core.Keyword(null,"file","file",-1269645878)); var temp__4425__auto__ = figwheel.client.file_reloading.get_correct_link.call(null,f_data); if(cljs.core.truth_(temp__4425__auto__)){ var link = temp__4425__auto__; return figwheel.client.file_reloading.add_link_to_doc.call(null,link,figwheel.client.file_reloading.clone_link.call(null,link,link.href)); } else { return null; } }); figwheel.client.file_reloading.reload_css_files = (function figwheel$client$file_reloading$reload_css_files(p__24818,files_msg){ var map__24825 = p__24818; var map__24825__$1 = ((((!((map__24825 == null)))?((((map__24825.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24825.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24825):map__24825); var opts = map__24825__$1; var on_cssload = cljs.core.get.call(null,map__24825__$1,new cljs.core.Keyword(null,"on-cssload","on-cssload",1825432318)); if(cljs.core.truth_(figwheel.client.utils.html_env_QMARK_.call(null))){ var seq__24827_24831 = cljs.core.seq.call(null,figwheel.client.file_reloading.distictify.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg))); var chunk__24828_24832 = null; var count__24829_24833 = (0); var i__24830_24834 = (0); while(true){ if((i__24830_24834 < count__24829_24833)){ var f_24835 = cljs.core._nth.call(null,chunk__24828_24832,i__24830_24834); figwheel.client.file_reloading.reload_css_file.call(null,f_24835); var G__24836 = seq__24827_24831; var G__24837 = chunk__24828_24832; var G__24838 = count__24829_24833; var G__24839 = (i__24830_24834 + (1)); seq__24827_24831 = G__24836; chunk__24828_24832 = G__24837; count__24829_24833 = G__24838; i__24830_24834 = G__24839; continue; } else { var temp__4425__auto___24840 = cljs.core.seq.call(null,seq__24827_24831); if(temp__4425__auto___24840){ var seq__24827_24841__$1 = temp__4425__auto___24840; if(cljs.core.chunked_seq_QMARK_.call(null,seq__24827_24841__$1)){ var c__17629__auto___24842 = cljs.core.chunk_first.call(null,seq__24827_24841__$1); var G__24843 = cljs.core.chunk_rest.call(null,seq__24827_24841__$1); var G__24844 = c__17629__auto___24842; var G__24845 = cljs.core.count.call(null,c__17629__auto___24842); var G__24846 = (0); seq__24827_24831 = G__24843; chunk__24828_24832 = G__24844; count__24829_24833 = G__24845; i__24830_24834 = G__24846; continue; } else { var f_24847 = cljs.core.first.call(null,seq__24827_24841__$1); figwheel.client.file_reloading.reload_css_file.call(null,f_24847); var G__24848 = cljs.core.next.call(null,seq__24827_24841__$1); var G__24849 = null; var G__24850 = (0); var G__24851 = (0); seq__24827_24831 = G__24848; chunk__24828_24832 = G__24849; count__24829_24833 = G__24850; i__24830_24834 = G__24851; continue; } } else { } } break; } return setTimeout(((function (map__24825,map__24825__$1,opts,on_cssload){ return (function (){ return on_cssload.call(null,new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg)); });})(map__24825,map__24825__$1,opts,on_cssload)) ,(100)); } else { return null; } }); //# sourceMappingURL=file_reloading.js.map?rel=1449036926031
imaximix/om-tutorials
resources/public/js/compiled/out/figwheel/client/file_reloading.js
JavaScript
mit
99,819
39.544273
577
0.703233
false
export default class State { constructor($rootScope) { this.$rootScope = $rootScope; this.state = []; } setData(data) { console.log('state set data', data) this.state = data; this.$rootScope.$apply(); } getData() { //console.log('state get data', state) return this.state; } }
vanzylv/youtube-dl-gui-v2
scripts/services/downloadState.js
JavaScript
mit
361
18
46
0.529086
false
<?php /** * This file is part of the BootstrapBundle project. * * (c) 2013 Philipp Boes <mostgreedy@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace P2\Bundle\BootstrapBundle\Form\Extension; /** * Class FormTypeExtension * @package P2\Bundle\BootstrapBundle\Form\Extension */ class FormTypeExtension extends AbstractTypeExtension { /** * {@inheritDoc} */ public function getExtendedType() { return 'form'; } }
phillies2k/bootstrap-bundle
Form/Extension/FormTypeExtension.php
PHP
mit
558
20.461538
74
0.693548
false
--- layout: post date: 2015-10-14 title: "Allure Quinceanera Dresses - Style Q400 2015 Sleeveless Floor-Length Ballgown" category: Allure tags: [Allure,Ballgown,Sweetheart,Floor-Length,Sleeveless,2015] --- ### Allure Quinceanera Dresses - Style Q400 Just **$266.99** ### 2015 Sleeveless Floor-Length Ballgown <table><tr><td>BRANDS</td><td>Allure</td></tr><tr><td>Silhouette</td><td>Ballgown</td></tr><tr><td>Neckline</td><td>Sweetheart</td></tr><tr><td>Hemline/Train</td><td>Floor-Length</td></tr><tr><td>Sleeve</td><td>Sleeveless</td></tr><tr><td>Years</td><td>2015</td></tr></table> <a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1554/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a> <!-- break --><a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1555/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a> <a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1553/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a> Buy it: [https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html](https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html)
HOLEIN/HOLEIN.github.io
_posts/2015-10-14-Allure-Quinceanera-Dresses-Style-Q400-2015-Sleeveless-FloorLength-Ballgown.md
Markdown
mit
1,527
94.4375
275
0.738048
false
14 uid=311598 27 mtime=1430738623.672251 27 atime=1430738623.671251
Pintulalmeena/Projects
Virtual Memory Implementation/Theme_B_9/GeekOS (os)/build/PaxHeader/Makefile
Makefile
mit
68
21.666667
26
0.838235
false
var request = require('request'); var Client = (function () { function Client() { this.options = { "url": "", "method": "GET", "bodyParams": {}, "gzip": true, "json": true }; } Client.prototype.connect = function (parent) { var config = parent.config; this.configure(config); this._connector = parent; parent.logger.trace('Connected to google custom search'); }; Client.prototype.disconnect = function (parent) { this.config = {}; this.url = ''; this._connector = parent; parent.logger.trace('Disconnected from google custom search'); }; Client.prototype.configure = function (config) { if (!config || !config.key) throw new Error('Configuration is not set.'); this.key = config.key; this.config = config; if (config.cx) this.cx = config.cx; else if (config.cref) this.cref = config.cref; if (!this.cx && !this.cref) throw new Error('You must provide either cx or cref parameter in your configuration!'); this.url = 'https://www.googleapis.com/customsearch/v1?key=' + this.key; if (this.cx) this.url += '&cx=' + this.cx; else if (this.cref) this.url += '&cref=' + this.cref; this.baseUrl = this.url; return true; }; Client.prototype.setParameters = function (v) { if (!v.where) throw "You need to set a where clause and provide a query ('q') parameter"; if (typeof v.where === 'string' || v.where instanceof String) v.where = JSON.parse(v.where); if (!v.where.q) { throw "You need to provide a query ('q') parameter in where clause."; } this._parseParameters(v); this._creteQuery(); this.url = this.baseUrl + this._query; return this; }; Client.prototype.query = function (callback) { this.options.url = this.url; return request(this.options, callback); }; Client.prototype.prepareResults = function (results, model) { var tmp_results = []; if (results && results.length) { for (var i = 0; i < results.length; i++) { var p_model = this._createIndividualModel(model, results[i]); tmp_results.push(p_model); } } return tmp_results; }; Client.prototype._creteQuery = function () { var params = this._params; var i = 0; for (var key in params) { if (i === 0) { this._query = '&' + key + '=' + params[key]; } else { this._query += '&' + key + '=' + params[key]; } i++; } return this._query; }; Client.prototype._parseParameters = function (v) { if (!v.per_page) v.where.num = 10; else v.where.num = v.per_page; if (!v.skip) v.where.start = 1; else v.where.start = v.skip; if (v.limit) v.where.num = v.limit - v.where.start; if (v.page) { v.where.start = ((v.page - 1) * v.per_page + 1); } if (v.order) v.where.sort = v.order; if (v.linkSite) v.where.linkSite = v.linkSite; if (v.lowRange) v.where.lowRange = v.lowRange; if (v.relatedSite) v.where.relatedSite = v.relatedSite; if (v.searchType) v.where.searchType = v.searchType; if (v.siteSearch) v.where.siteSearch = v.siteSearch; if (v.siteSearchFilter) v.where.siteSearchFilter = v.siteSearchFilter; this._params = v.where; return true; }; Client.prototype._createIndividualModel = function (Model, data) { var model = Model.instance(data, true); model.setPrimaryKey(data.cacheId); return model; }; return Client; })(); exports.Client = Client; //# sourceMappingURL=client.js.map
marinvvasilev/appc.googlesearch
lib/client.js
JavaScript
mit
4,155
32.788618
99
0.517208
false
#encoding:UTF-8 # ISS017 - Character Improve 1.1 #==============================================================================# # ** ISS - Character Improve #==============================================================================# # ** Date Created : 08/04/2011 # ** Date Modified : 08/10/2011 # ** Created By : IceDragon # ** For Game : Code JIFZ # ** ID : 017 # ** Version : 1.1 # ** Requires : ISS000 - Core(1.9 or above) #==============================================================================# ($imported ||= {})["ISS-CharacterImprove"] = true #==============================================================================# # ** ISS #==============================================================================# module ISS install_script(17, :system) end #==============================================================================# # ** Game_Character #==============================================================================# class Game_Character #--------------------------------------------------------------------------# # * Public Instance Variables #--------------------------------------------------------------------------# attr_accessor :sox, :soy, :soz #--------------------------------------------------------------------------# # * alias-method :initialize #--------------------------------------------------------------------------# alias :iss017_gmc_initialize :initialize unless $@ def initialize(*args, &block) @sox, @soy, @soz = 0, 0, 0 iss017_gmc_initialize(*args, &block) end #--------------------------------------------------------------------------# # * alias-method :screen_x #--------------------------------------------------------------------------# alias :iss017_gmc_screen_x :screen_x unless $@ def screen_x(*args, &block) return iss017_gmc_screen_x(*args, &block) + @sox end #--------------------------------------------------------------------------# # * alias-method :screen_y #--------------------------------------------------------------------------# alias :iss017_gmc_screen_y :screen_y unless $@ def screen_y(*args, &block) return iss017_gmc_screen_y(*args, &block) + @soy end #--------------------------------------------------------------------------# # * alias-method :screen_z #--------------------------------------------------------------------------# alias :iss017_gmc_screen_z :screen_z unless $@ def screen_z(*args, &block) return iss017_gmc_screen_z(*args, &block) + @soz end end #=*==========================================================================*=# # ** END OF FILE #=*==========================================================================*=#
Archeia/Kread-Ex-Scripts
IceDragon2000/lib/iss/017_character_improve.rb
Ruby
mit
2,756
38.942029
80
0.280116
false
# mozaik-ext-sheets List rows from Google Sheets in Mozaïk dashboard. The extension can be handy for various use cases where data is maintained in Google Sheets: - List events (including dates etc) - Show game results - Show event participants, company vacation listing - Etc. ![preview](https://raw.githubusercontent.com/SC5/mozaik-ext-sheets/master/preview.png) - The widget tries to provide a generic but easy-to-use way to show content in dashboard. - You can also utilise the Sheets functions as the outcome is shown in widget - Use format functions to format some cell data - Use filter function to leave out some results ## Setup - Install module ```bash npm install --save mozaik-ext-sheets ``` - Create a project and service account in Google Developer Console - Enable API: Drive API - Collect service email and .p12 file - Convert .p12 file into .PEM - Configure service key and .PEM file into dashboard ``config.js`` file and environment variables / ``.env`` file: ```javascript api: { sheets: { googleServiceEmail: process.env.GOOGLE_SERVICE_EMAIL, googleServiceKeypath: process.env.GOOGLE_SERVICE_KEYPATH } } ``` - Done. ## Widget: List Show cell contents in a listing. Use dashboard theme to customize the outcome to match with your requirements. ### parameters key | required | description --------------|----------|--------------- `documentId` | yes | *Sheets document id, taken form web UI* `sheetNo` | no | *Sheet order number, starting from 0. Defaults to first: `0`* `range` | no | *Range from where to list data. Example: `A2:C10` or `A2:`. Defaults to full sheet* `fields` | no | *Columns to list, using advanced formatting* `format` | no | *Custom formating functions in object, where key is name of the formatter and used like {COLUMNLETTER!formatter}. See usage for examples* `filter` | no | *Filter some rows out of the outcome by implementing the function. See usage for examples* ### usage Imaginary example of Google Sheet document cells: ``` | A | B | C | D | 1 | 2015-01-28 | React.js Conf | Facebook HQ | | 2 | 2015-07-02 | ReactEurope | Paris, France | | ``` One widget in dashboard config: ```javascript // widget in config.js { type: 'sheets.list', // You can find the documentId in sheet URL documentId: 'abasdfsdfafsd123123', range: 'A1:D10', // Values (cells) to show on each row. Use one or multiple column letters: // Uses https://www.npmjs.com/package/string-format for formatting fields: [ 'Event date: {A!date}', '{B!uppercase}', '{C} {D}' ], // Custom formatter functions, name must match with the usage: !method // NOTE: Call method.toString() to every function! // NOTE: `moment` is available format: { // !date formatter date: function(s){ return new moment(s).format('YYYY-MM-DD'); }.toString(), // !uppercase formatter uppercase: function(s) { return s.toUpperCase(); }.toString() }, // Custom function to filter some results rows // If defined, each row is processed through it. // Return `false` if you want to filter the row out and `true` // for inclusion. // NOTE: Only one variable is passed, containing all columns from current row // NOTE: Variable `columns` does not contain the columns out of the range // NOTE: Call method.toString() to every function! filter: function(columns){ var eventStart = moment(columns.B, ['YYYY-MM-DD']); // Filter out the results that are in past if (eventStart.isBefore(new moment())) { return false; } return true; }.toString(), columns: 1, rows: 2, x: 0, y: 0 } ``` ## License Module is MIT -licensed ## Credit Module is backed by: <a href="http://sc5.io"> <img src="http://logo.sc5.io/78x33.png" style="padding: 4px 0;"> </a>
jtbonhomme/mozaik-ext-sheets
README.md
Markdown
mit
3,954
29.407692
164
0.657222
false
function* generatorFn() { yield 'foo'; yield 'bar'; return 'baz'; } let generatorObject1 = generatorFn(); let generatorObject2 = generatorFn(); console.log(generatorObject1.next()); // { done: false, value: 'foo' } console.log(generatorObject2.next()); // { done: false, value: 'foo' } console.log(generatorObject2.next()); // { done: false, value: 'bar' } console.log(generatorObject1.next()); // { done: false, value: 'bar' } GeneratorYieldExample03.js
msfrisbie/pjwd-src
Chapter7IteratorsAndGenerators/Generators/InterruptingExecutionWithYield/InterruptingExecutionWithYieldExample03.js
JavaScript
mit
472
30.466667
72
0.67161
false
<div class="four wide column center aligned votes"> <div class="ui statistic"> <div class="value"> {{ article.votes }} </div> <div class="label"> Points </div> </div> </div> <div class="twelve wide column"> <a class="ui large header" href="{{ article.link }}"> {{ article.title }} </a> <div class="meta">({{ article.domain() }})</div> <ul class="ui big horizontal list votes"> <li class="item"> <a href="" (click)="voteUp()"> <i class="arrow up icon"></i> upvote </a> <li class="item"> <a href="" (click)="voteDown()"> <i class="arrow up icon"></i> downvote </a> </li> </ul> </div>
twolun/ng-book-4
angular4-reddit/src/app/article/article.component.html
HTML
mit
640
21.068966
54
0.5625
false
#pragma once #include "animations/display.h" #include "animations/AnimationProgram.h" #include "animations/PaintPixel.h" #include "blewiz/BLECharacteristic.h" #include "freertos/task.h" class BadgeService : public BLEService { public: BadgeService(Display &display, AnimationProgram &animationProgram); virtual ~BadgeService(); void init(); void setPaintPixel(PaintPixel *paintPixel) { this->paintPixel = paintPixel; } void onStarted() override; void onConnect() override; void onDisconnect() override; private: Display &display; AnimationProgram &animationProgram; PaintPixel *paintPixel; BLECharacteristic batteryCharacteristic; BLEDescriptor batteryNotifyDesciptor; BLECharacteristic brightnessCharacteristic; BLECharacteristic programCharacteristic; BLECharacteristic downloadCharacteristic; BLECharacteristic paintPixelCharacteristic; BLECharacteristic paintFrameCharacteristic; BLECharacteristic appVersionCharacteristic; BLECharacteristic frameDumpCharacteristic; static void batteryTask(void *parameters); TaskHandle_t taskHandle; std::vector<uint8_t> paintFrame; };
fweiss/badge
main/BadgeService.h
C
mit
1,174
26.302326
81
0.772572
false
/* Document : colors Author : Little Neko Description: template colors */ /* Table of Content ================================================== #BOOSTRAP CUSTOMIZATION #TYPOGRAPHY #LINKS AND BUTTONS #HEADER #MAIN MENU #FOOTER #SLIDERS #PORTFOLIO #MISCELANIOUS #NEKO CSS FRAMEWORK */ /* BOOSTRAP CUSTOMIZATION ================================================== */ /** tabs **/ .panel-default>.panel-heading {background:#EB7F37; } .panel-default>.panel-heading:hover {background:#fff; } .panel-default>.panel-heading:hover a {color:#EB7F37; } .panel-title>a {color:#fff;} .panel-title>a:hover {text-decoration: none;} /* END BOOSTRAP CUSTOMIZATION ================================================== */ /* TYPOGRAPHY ================================================== */ body { color:#777; background: #fff; } blockquote small { color:inherit; } h1, h2, h3, h4, h5, h6 { color:#222; } h2 { color:#888; } h2 i {color:#999} h2.subTitle:after, h1.noSubtitle:after{ background-color:#EB7F37; } /*** parallax sections ***/ .paralaxText blockquote:before, .paralaxText blockquote:after { color:#fff; } #home, #paralaxSlice1, #paralaxSlice2, #paralaxSlice3, #paralaxSlice4 { background-color:#EB7F37; } #home { background-image:url('../images/theme-pics/paralax-grey-3.jpg'); } #paralaxSlice1 { background-image: url('../images/theme-pics/paralax-1.jpg'); } #paralaxSlice2 { background-image: url('../images/theme-pics/paralax-grey-2.jpg'); } #paralaxSlice3 { background-image: url('../images/theme-pics/paralax-grey-3.jpg'); } #paralaxSlice4 { background-image: url('../images/theme-pics/paralax-4.jpg'); } .paralaxText blockquote, .paralaxText h1, .paralaxText h2, .paralaxText h3, .paralaxText p, .paralaxText i{ color:#fff; } /* END TYPOGRAPHY ================================================== */ /* LINKS AND BUTTONS ================================================== */ a { color:#EB7F37; } a:hover, .scrollspyNav .active a { color:#EB7F37; } ul.iconsList li a { color:#555 } ul.iconsList li a:hover, ul.iconsList i { color:#EB7F37 } /*** buttons ***/ .btn { background:#EB7F37; color:#fff; border:2px solid #fff; } .btn:hover { color:#EB7F37; border-color:#eee; text-shadow:none; background:#fff } .btn-primary { background: #006dcc; } .btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] { background: #555; } .btn-info { background: #49AFCD; } .btn-success { background: #5BB75B; } .btn-warning { background: #FAA732; } .btn-danger { background: #DA4F49; } .btn-link, .btn-link:active, .btn-link[disabled], .btn-link:hover { background:none; border:none; -moz-box-shadow: none; -webkit-box-shadow:none; box-shadow: none; color:#49AFCD; } .btnWrapper { border:1px solid #ccc; } /* END LINKS AND BUTTONS ================================================== */ /* MAIN MENU ================================================== */ #mainHeader{ background-color: white; -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); } #mainMenu ul li a, #resMainMenu ul li a { color:#444; } .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus { background: #EB7F37; color:#fff; } /* END MAIN MENU ================================================== */ /* FOOTER ================================================== */ footer { color:#777; background:#eee; } #footerRights { background-color:#fff; color:#999; } p.credits { color:#555; } p.credits a { color:#EB7F37; } /* END FOOTER ================================================== */ /* HOME ================================================== */ #home h1 {color:#FFFFFF;} /* END HOME ================================================== */ /* SLIDERS ================================================== */ /*** FLEX ***/ .flexslider { box-shadow:none; } .slides .txt div { background:#444; color:#FFFFFF; } .flexslider .flex-direction-nav a { background-color:#EB7F37; } .flexslider .flex-control-paging li a:hover, #sliderWrapper .flex-control-paging li a.flex-active{ background: #fff; border:2px solid #fff; } .flexslider .flex-control-paging li a { background: transparent; border:2px solid rgba(255,255,255,0.5); } .flexslider .flex-control-nav { background:transparent; } .flexslider h1 { color:#fff; background-color:#EB7F37; } .flexslider h2 { color:#fff; background-color:#333; } .flexslider .caption p { background-color:#fff; color:#555 } /*** flexHome ***/ #flexHome h1 { color:#fff; background:none; } #flexHome h2 { color:#fff; background:none; } /*** END FLEX SLIDER ***/ /* END SLIDERS ================================================== */ /* PORTFOLIO ================================================== */ nav#filter a { background-color: #EEE; color:#555; } nav#filter a:hover, nav#filter a.current { background-color: #EB7F37; color:#fff; } li.filterTitle { color:#4F6266; } section#projectDescription { background-color:#F8F8F8 } .mask{background-color: #EB7F37;} /* END PORTFOLIO ================================================== */ /* MISCELANIOUS ================================================== */ /*** hover images ***/ .iconLinks a span {color:#fff;} /*** pricing table ***/ .pricingBloc { background-color:#fff; border:1px solid rgba(0, 0, 0, 0.2); } .pricingBloc ul li { border-bottom:1px solid #ddd; color:#444!important; } .pricingBloc ul li:last-child { border-bottom:none; } .pricingBloc h2 { background-color:#555; color:#888!important; border:none; } .pricingBloc h3 { background-color:#777; color:#fff!important; } .pricingBloc p { background-color:#eee; color:#444!important; } .pricingBloc.focusPlan { margin-top:0; border-color:#D1D1D1; } .pricingBloc.focusPlan h2{ background-color:#333; color:#fff!important; } .pricingBloc.focusPlan h3 { background-color:#EB7F37; padding:1.25em; color:#fff!important; } /*** Form ***/ .form-control:focus{ border: none; background-color:#ddd; box-shadow:none; -webkit-box-shadow:none; -moz-box-shadow:none; } .form-control { color: #444; background-color:#ededed; border:none; } .error {color: #B94A48; background-color: #F2DEDE; border-color: #EED3D7;} label.error {color:#fff; background-color: #B94A48; border:none} #projectQuote, #projectQuote h3{background:#ddd;color:#444;} /* END MISCELANIOUS ================================================== */ /* NEKO CSS FRAMEWORK ================================================== */ /*** Feature box **/ .boxFeature i{color:#EB7F37;} /*** slices ***/ .slice{ background-color:#fff; } /*** call to action ***/ .ctaBox {border:2px solid rgba(0,0,0,0.05);} .ctaBoxFullwidth{border:none} .ctaBox blockquote { color:#fff; } /*color1*/ .color1, .slice.color1, .bulle.color1, .ctaBox.color1{ background-color:#F7F7F7; color:#444; } .color1 h1, .color1 h2, .color1 h3, .color1 h4, .color1 blockquote, .color1 a{ color:#444; } .color1 a.btn{color:#fff;} .color1 a.btn:hover{color:#EB7F37;} /*color4*/ .color4, .slice.color4, .bulle.color4, .ctaBox.color4{ background-color:#EB7F37; color:#fff; } .color4 h1, .color4 h2, .color4 h3, .color4 h4, .color4 blockquote, .color4 a { color:#fff; } .color4 h2.subTitle:after, .color4 h1.noSubtitle:after { background:#fff; } /*** icons ***/ .iconRounded {border:2px solid #EB7F37;color:#EB7F37;background-color:#fff;} .iconRounded:hover, .color1 .iconRounded:hover{background-color:#EB7F37;color:#fff;} .color1 .iconRounded {color:#EB7F37;} .color4 .iconRounded {background-color:#FFF;color:#EB7F37;} /* END NEKO CSS FRAMEWORK ================================================== */
peihsi/www_taichung_m_s_pub
One_page/css/orange.css
CSS
mit
7,897
18.79198
221
0.588831
false
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;bitcoinlite&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The bitcoinlite developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Tạo một địa chỉ mới</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your bitcoinlite addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation type="unfinished"/> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>(no label)</source> <translation type="unfinished"/> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation type="unfinished"/> </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="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation type="unfinished"/> </message> <message> <location line="-58"/> <source>bitcoinlite 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 type="unfinished"/> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+280"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+242"/> <source>Synchronizing with network...</source> <translation type="unfinished"/> </message> <message> <location line="-308"/> <source>&amp;Overview</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>&amp;Receive coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="-7"/> <source>&amp;Send coins</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Show information about bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+250"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"/> </message> <message> <location line="-247"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Send coins to a bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Modify configuration options for bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-200"/> <source>bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+178"/> <source>&amp;About bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>&amp;File</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+60"/> <source>bitcoinlite client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+70"/> <source>%n active connection(s) to bitcoinlite network</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;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&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="-284"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+288"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <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="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </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 bitcoinlite address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+109"/> <source>A fatal error occurred. bitcoinlite can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>List mode</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation type="unfinished"/> </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="+317"/> <source>highest</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium-high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>low-medium</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>low</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation type="unfinished"/> </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 &quot;medium&quot;. 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 type="unfinished"/> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>(change)</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation type="unfinished"/> </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="+20"/> <source>New receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>New sending address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid bitcoinlite address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation type="unfinished"/> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>bitcoinlite-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </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 bitcoinlite after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start bitcoinlite on system login</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the bitcoinlite 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 &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the bitcoinlite network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting bitcoinlite.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show bitcoinlite addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+149"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting bitcoinlite.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the bitcoinlite network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-160"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-107"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-108"/> <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="-29"/> <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="+113"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the bitcoinlite-Qt help message to get a list with possible bitcoinlite command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>bitcoinlite - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>bitcoinlite Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the bitcoinlite debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the bitcoinlite RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"/> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 BC</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Balance:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>123.456 BC</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation type="unfinished"/> </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="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation type="unfinished"/> </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&amp;mount:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a bitcoinlite 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 type="unfinished"/> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </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 type="unfinished"/> </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 bitcoinlite address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter bitcoinlite signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 20 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 &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>unknown</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation type="unfinished"/> </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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation type="unfinished"/> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Sent to</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>bitcoinlite version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to -server or bitcoinlited</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify configuration file (default: bitcoinlite.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: bitcoinlited.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 21347 or testnet: 31347)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <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="-5"/> <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="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 21348 or testnet: 31348)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"/> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong bitcoinlite will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-18"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=bitcoinliterpc 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 &quot;bitcoinlite Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <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="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</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 type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</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 type="unfinished"/> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <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="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <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="-158"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. bitcoinlite is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of bitcoinlite</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart bitcoinlite to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. bitcoinlite is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
bitcoin-lite/BitcoinLite
src/qt/locale/bitcoin_vi_VN.ts
TypeScript
mit
107,042
31.680611
394
0.582726
false
// var isWaiting = false; // var isRunning = false; // var seconds = 10; // var countdownTimer; // var finalCountdown = false; function GameTimer(game) { this.seconds = game.timelimit; this.secondPassed = function() { if (this.seconds === 0 && !game.gameOver) { game.endGame(); } else if (!game.gameOver) { this.seconds--; $("#timer_num").html(this.seconds); } } var countdownTimer = setInterval('t.secondPassed()', 1000); }
alanflorendo/syllabgl
public/js/timer.js
JavaScript
mit
457
21.85
60
0.630197
false
Click With Me Now ============== This is an integration between Interactive Intelligence's CIC platform and Click With Me Now. See the [wiki](https://github.com/InteractiveIntelligence/ClickWithMeNow/wiki) for more information. Visit CWMN at http://clickwithmenow.com
T-Boss/ClickWithMeNow
README.md
Markdown
mit
271
32.875
100
0.763838
false
package uk.gov.prototype.vitruvius.parser.validator; import java.util.List; public class ValidationMessage { private String message; private ValidationType type; public ValidationMessage() { } public ValidationMessage(String message, ValidationType type) { this.message = message; this.type = type; } public String getMessage() { return message; } public ValidationType getType() { return type; } @Override public String toString() { return "ValidationMessage{" + "message='" + message + '\'' + ", type=" + type + '}'; } public enum ValidationType { ERROR, WARNING } public static ValidationMessage createErrorMessage(String message) { return new ValidationMessage(message, ValidationType.ERROR); } public static ValidationMessage createWarning(String message) { return new ValidationMessage(message, ValidationType.WARNING); } public static boolean hasErrors(List<ValidationMessage> messages) { for (ValidationMessage validationMessage : messages) { if (validationMessage.getType() == ValidationType.ERROR) { return true; } } return false; } }
alphagov/vitruvius
vitruvius.markdown/src/main/java/uk/gov/prototype/vitruvius/parser/validator/ValidationMessage.java
Java
mit
1,327
22.280702
72
0.61266
false
/* global Cervus */ const material = new Cervus.materials.PhongMaterial({ requires: [ Cervus.components.Render, Cervus.components.Transform ], texture: Cervus.core.image_loader('../textures/4.png'), normal_map: Cervus.core.image_loader('../textures/normal2.jpg') }); const phong_material = new Cervus.materials.PhongMaterial({ requires: [ Cervus.components.Render, Cervus.components.Transform ] }); const game = new Cervus.core.Game({ width: window.innerWidth, height: window.innerHeight, // clear_color: 'f0f' // fps: 1 }); game.camera.get_component(Cervus.components.Move).keyboard_controlled = true; // game.camera.get_component(Cervus.components.Move).mouse_controlled = true; // By default all entities face the user. // Rotate the camera to see the scene. const camera_transform = game.camera.get_component(Cervus.components.Transform); camera_transform.position = [0, 2, 5]; camera_transform.rotate_rl(Math.PI); // game.camera.keyboard_controlled = true; const plane = new Cervus.shapes.Plane(); const plane_transform = plane.get_component(Cervus.components.Transform); const plane_render = plane.get_component(Cervus.components.Render); plane_transform.scale = [100, 1, 100]; plane_render.material = phong_material; plane_render.color = "#eeeeee"; game.add(plane); const cube = new Cervus.shapes.Box(); const cube_transform = cube.get_component(Cervus.components.Transform); const cube_render = cube.get_component(Cervus.components.Render); cube_render.material = material; cube_render.color = "#00ff00"; cube_transform.position = [0, 0.5, -1]; const group = new Cervus.core.Entity({ components: [ new Cervus.components.Transform() ] }); game.add(group); group.add(cube); // game.on('tick', () => { // group.get_component(Cervus.components.Transform).rotate_rl(16/1000); game.light.get_component(Cervus.components.Transform).position = game.camera.get_component(Cervus.components.Transform).position; });
michalbe/cervus
_example/5/game.js
JavaScript
mit
1,969
30.758065
131
0.732859
false
#!/bin/mksh # (c) alexh 2016 set -eu printf "%s\n\n" 'Content-type: text/plain' # Optional with use of 'check_interval' WANTED_INTERVAL='10' USER="$( /usr/bin/whoami )" HOMES_DIR='/home' WWW_DIR="/var/www/virtual/${USER}" HOME="${HOMES_DIR}/${USER}" VAR_DIR="${HOME}/var/git-publish" SRC_DIR="${HOME}/git" function identify_service { case "${HTTP_USER_AGENT}" in send_post_manual) printf "%s\n" 'Service identified as send_post_manual. Hi!' . "${VAR_DIR}"/read_post_manual ;; GitHub-Hookshot/*) printf "%s\n" 'Service identified as GitHub.' . "${VAR_DIR}"/read_post_github ;; *) printf "%s\n" "I don't know service ${HTTP_USER_AGENT}." exit 73 ;; esac } POST="$(cat)" if [ -z "${POST}" ]; then printf "%s\n" 'POST empty' exit 70 fi function check_signature { get_sig if [ "${SIGNATURE}" == "${POST_SIG}" ]; then printf "%s\n" 'POST body: Good signature' else printf "%s\n" 'POST body: Wrong signature' exit 79 fi } function id_values { ID_VALUES="$( /bin/grep -E "^${ID}\ " "${VAR_DIR}"/list.txt )" REPO="$( /bin/awk '{print $1}'<<<"${ID_VALUES}" )" BRANCH="$( /bin/awk '{print $2}'<<<"${ID_VALUES}" )" BUILD_FUNCTION="$( /bin/awk '{print $3}'<<<"${ID_VALUES}" )" URL="$( /bin/awk '{print $4}'<<<"${ID_VALUES}" )" SECRET_TOKEN="$( /bin/awk '{print $5}'<<<"${ID_VALUES}" )" REPO_DIR="${VAR_DIR}/${REPO}" if [ ! -d "${REPO_DIR}" ]; then mkdir -p "${REPO_DIR}" fi } function check_interval { CALLTIME="$( /bin/date +%s )" if [ ! -f "${REPO_DIR}"/last.txt ];then printf "%d\n" '0' >"${REPO_DIR}"/last.txt fi LAST_CALLTIME="$( <"${REPO_DIR}"/last.txt )" INTERVAL="$(( ${CALLTIME} - ${LAST_CALLTIME} ))" TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))" if [ ! -f "${REPO_DIR}"/waiting.txt ];then printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt fi WAITING="$( <"${REPO_DIR}"/waiting.txt )" if [ "${WAITING}" == 1 ]; then CASE='waiting' else if (( "${INTERVAL}" > "${WANTED_INTERVAL}" )); then CASE='ready' else CASE='too_soon' fi fi } function update { cd "${SRC_DIR}"/"${REPO}" printf "%s" "Git checkout: " /usr/bin/git checkout "${BRANCH}" printf "%s" "Git pull: " /usr/bin/git pull . "${VAR_DIR}"/"${BUILD_FUNCTION}" build rsync -qaP --del --exclude-from='.gitignore' dest/ "${WWW_DIR}"/"${URL}"/ printf "%s\n" 'Synced' } function update_stuff { case "${CASE}" in waiting) printf "Update in queue. %d seconds left.\n" "${TIME_LEFT}" exit 72 ;; ready) printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt ;; too_soon) printf "%d\n" '1' >"${REPO_DIR}"/waiting.txt TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))" printf "Waiting for %d seconds.\n" "${TIME_LEFT}" sleep "${TIME_LEFT}" ;; esac if [ ! -f "${REPO_DIR}"/progress.txt ]; then printf "%d\n" '0' >"${REPO_DIR}"/progress.txt fi progress="$(<"${REPO_DIR}"/progress.txt)" while (( "${progress}" == '1' )); do progress="$(<"${REPO_DIR}"/last.txt)" printf "%s\n" 'Earlier update in progress. Waiting...' sleep 1 done printf "%s\n" 'Ready' printf "%d\n" '1' >"${REPO_DIR}"/progress.txt update printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt printf "%d\n" '0' >"${REPO_DIR}"/progress.txt printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt } identify_service read_post id_values check_signature CASE='ready' check_interval update_stuff
alexh-name/git-publish
git-publish.sh
Shell
mit
3,479
23.5
75
0.555907
false
#!/usr/bin/env python import pygame pygame.display.init() pygame.font.init() modes_list = pygame.display.list_modes() #screen = pygame.display.set_mode(modes_list[0], pygame.FULLSCREEN) # the highest resolution with fullscreen screen = pygame.display.set_mode(modes_list[-1]) # the lowest resolution background_color = (255, 255, 255) screen.fill(background_color) font = pygame.font.Font(pygame.font.get_default_font(), 22) text_surface = font.render("Hello world!", True, (0,0,0)) screen.blit(text_surface, (0,0)) # paste the text at the top left corner of the window pygame.display.flip() # display the image while True: # main loop (event loop) event = pygame.event.wait() if(event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE)): break
jeremiedecock/snippets
python/pygame/hello_text.py
Python
mit
882
35.75
110
0.654195
false
// // Copyright(c) 2017-2018 Paweł Księżopolski ( pumexx ) // // 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 #include <memory> #include <vector> #include <mutex> #include <vulkan/vulkan.h> #include <pumex/Export.h> #include <pumex/PerObjectData.h> namespace pumex { class Descriptor; class RenderContext; struct PUMEX_EXPORT DescriptorValue { enum Type { Undefined, Image, Buffer }; DescriptorValue(); DescriptorValue(VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range); DescriptorValue(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout); Type vType; union { VkDescriptorBufferInfo bufferInfo; VkDescriptorImageInfo imageInfo; }; }; // Resource is an object stored in a descriptor ( SampledImage, UniformBuffer, etc. ) class PUMEX_EXPORT Resource : public std::enable_shared_from_this<Resource> { public: Resource(PerObjectBehaviour perObjectBehaviour, SwapChainImageBehaviour swapChainImageBehaviour); virtual ~Resource(); void addDescriptor(std::shared_ptr<Descriptor> descriptor); void removeDescriptor(std::shared_ptr<Descriptor> descriptor); // invalidateDescriptors() is called to inform the scenegraph that validate() needs to be called virtual void invalidateDescriptors(); // notifyDescriptors() is called from within validate() when some serious change in resource occured // ( getDescriptorValue() will return new values, so vkUpdateDescriptorSets must be called by DescriptorSet ). virtual void notifyDescriptors(const RenderContext& renderContext); virtual std::pair<bool,VkDescriptorType> getDefaultDescriptorType(); virtual void validate(const RenderContext& renderContext) = 0; virtual DescriptorValue getDescriptorValue(const RenderContext& renderContext) = 0; protected: mutable std::mutex mutex; std::vector<std::weak_ptr<Descriptor>> descriptors; PerObjectBehaviour perObjectBehaviour; SwapChainImageBehaviour swapChainImageBehaviour; uint32_t activeCount; }; }
pumexx/pumex
include/pumex/Resource.h
C
mit
3,289
41.128205
112
0.712721
false
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `from_u32_unchecked` fn in crate `std`."> <meta name="keywords" content="rust, rustlang, rust-lang, from_u32_unchecked"> <title>std::char::from_u32_unchecked - Rust</title> <link rel="stylesheet" type="text/css" href="../../rustdoc.css"> <link rel="stylesheet" type="text/css" href="../../main.css"> <link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico"> </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif]--> <nav class="sidebar"> <a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a> <p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a></p><script>window.sidebarCurrent = {name: 'from_u32_unchecked', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script> </nav> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"> </div> </form> </nav> <section id='main' class="content fn"> <h1 class='fqn'><span class='in-band'>Function <a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a>::<wbr><a class='fn' href=''>from_u32_unchecked</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.5.0'>1.5.0</span><span id='render-detail'> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>&#x2212;</span>] </a> </span><a id='src-34245' class='srclink' href='https://doc.rust-lang.org/nightly/core/char/fn.from_u32_unchecked.html?gotosrc=34245' title='goto source code'>[src]</a></span></h1> <pre class='rust fn'>pub unsafe fn from_u32_unchecked(i: <a class='primitive' href='../primitive.u32.html'>u32</a>) -&gt; <a class='primitive' href='../primitive.char.html'>char</a></pre><div class='docblock'><p>Converts a <code>u32</code> to a <code>char</code>, ignoring validity.</p> <p>Note that all <a href="../../std/primitive.char.html"><code>char</code></a>s are valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s, and can be casted to one with <a href="../../book/casting-between-types.html#as"><code>as</code></a>:</p> <span class='rusttest'>fn main() { let c = &#39;💯&#39;; let i = c as u32; assert_eq!(128175, i); }</span><pre class='rust rust-example-rendered'> <span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='string'>&#39;💯&#39;</span>; <span class='kw'>let</span> <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>c</span> <span class='kw'>as</span> <span class='ident'>u32</span>; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>128175</span>, <span class='ident'>i</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> <p>However, the reverse is not true: not all valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s are valid <a href="../../std/primitive.char.html"><code>char</code></a>s. <code>from_u32_unchecked()</code> will ignore this, and blindly cast to <a href="../../std/primitive.char.html"><code>char</code></a>, possibly creating an invalid one.</p> <h1 id='safety' class='section-header'><a href='#safety'>Safety</a></h1> <p>This function is unsafe, as it may construct invalid <code>char</code> values.</p> <p>For a safe version of this function, see the <a href="fn.from_u32.html"><code>from_u32()</code></a> function.</p> <h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1> <p>Basic usage:</p> <span class='rusttest'>fn main() { use std::char; let c = unsafe { char::from_u32_unchecked(0x2764) }; assert_eq!(&#39;❤&#39;, c); }</span><pre class='rust rust-example-rendered'> <span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>char</span>; <span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='kw'>unsafe</span> { <span class='ident'>char</span>::<span class='ident'>from_u32_unchecked</span>(<span class='number'>0x2764</span>) }; <span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>&#39;❤&#39;</span>, <span class='ident'>c</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre> </div></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <aside id="help" class="hidden"> <div> <h1 class="hidden">Help</h1> <div class="shortcuts"> <h2>Keyboard Shortcuts</h2> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>&larrb;</dt> <dd>Move up in search results</dd> <dt>&rarrb;</dt> <dd>Move down in search results</dd> <dt>&#9166;</dt> <dd>Go to active search result</dd> <dt>+</dt> <dd>Collapse/expand all sections</dd> </dl> </div> <div class="infos"> <h2>Search Tricks</h2> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>. </p> <p> Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>) </p> </div> </div> </aside> <script> window.rootPath = "../../"; window.currentCrate = "std"; window.playgroundUrl = "https://play.rust-lang.org/"; </script> <script src="../../jquery.js"></script> <script src="../../main.js"></script> <script src="../../playpen.js"></script> <script defer src="../../search-index.js"></script> </body> </html>
liigo/liigo.github.io
tmp/rust/inline-sidebar-items/std/char/fn.from_u32_unchecked.html
HTML
mit
7,081
44.857143
295
0.56281
false
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ /* ========================================================================== HTML5 display definitions ========================================================================== */ /** * Correct `block` display not defined in IE 8/9. */ /* line 11, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } /** * Correct `inline-block` display not defined in IE 8/9. */ /* line 30, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ audio, canvas, video { display: inline-block; } /** * Prevent modern browsers from displaying `audio` without controls. * Remove excess height in iOS 5 devices. */ /* line 41, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ audio:not([controls]) { display: none; height: 0; } /** * Address `[hidden]` styling not present in IE 8/9. * Hide the `template` element in IE, Safari, and Firefox < 22. */ /* line 51, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ [hidden], template { display: none; } /* line 56, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ script { display: none !important; } /* ========================================================================== Base ========================================================================== */ /** * 1. Set default font family to sans-serif. * 2. Prevent iOS text size adjust after orientation change, without disabling * user zoom. */ /* line 70, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } /** * Remove default margin. */ /* line 80, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ body { margin: 0; } /* ========================================================================== Links ========================================================================== */ /** * Remove the gray background color from active links in IE 10. */ /* line 92, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a { background: transparent; } /** * Address `outline` inconsistency between Chrome and other browsers. */ /* line 100, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a:focus { outline: thin dotted; } /** * Improve readability when focused and also mouse hovered in all browsers. */ /* line 108, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ a:active, a:hover { outline: 0; } /* ========================================================================== Typography ========================================================================== */ /** * Address variable `h1` font-size and margin within `section` and `article` * contexts in Firefox 4+, Safari 5, and Chrome. */ /* line 122, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ h1 { font-size: 2em; margin: 0.67em 0; } /** * Address styling not present in IE 8/9, Safari 5, and Chrome. */ /* line 131, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ abbr[title] { border-bottom: 1px dotted; } /** * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. */ /* line 139, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ b, strong { font-weight: bold; } /** * Address styling not present in Safari 5 and Chrome. */ /* line 148, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ dfn { font-style: italic; } /** * Address differences between Firefox and other browsers. */ /* line 156, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } /** * Address styling not present in IE 8/9. */ /* line 166, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ mark { background: #ff0; color: #000; } /** * Correct font family set oddly in Safari 5 and Chrome. */ /* line 175, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ code, kbd, pre, samp { font-family: monospace, serif; font-size: 1em; } /** * Improve readability of pre-formatted text in all browsers. */ /* line 187, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ pre { white-space: pre-wrap; } /** * Set consistent quote types. */ /* line 195, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ q { quotes: "\201C" "\201D" "\2018" "\2019"; } /** * Address inconsistent and variable font size in all browsers. */ /* line 203, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ small { font-size: 80%; } /** * Prevent `sub` and `sup` affecting `line-height` in all browsers. */ /* line 211, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } /* line 219, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sup { top: -0.5em; } /* line 223, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ sub { bottom: -0.25em; } /* ========================================================================== Embedded content ========================================================================== */ /** * Remove border when inside `a` element in IE 8/9. */ /* line 235, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ img { border: 0; } /** * Correct overflow displayed oddly in IE 9. */ /* line 243, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ svg:not(:root) { overflow: hidden; } /* ========================================================================== Figures ========================================================================== */ /** * Address margin not present in IE 8/9 and Safari 5. */ /* line 255, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ figure { margin: 0; } /* ========================================================================== Forms ========================================================================== */ /** * Define consistent border, margin, and padding. */ /* line 267, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } /** * 1. Correct `color` not being inherited in IE 8/9. * 2. Remove padding so people aren't caught out if they zero out fieldsets. */ /* line 278, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ legend { border: 0; /* 1 */ padding: 0; /* 2 */ } /** * 1. Correct font family not being inherited in all browsers. * 2. Correct font size not being inherited in all browsers. * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. */ /* line 289, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, input, select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 2 */ margin: 0; /* 3 */ } /** * Address Firefox 4+ setting `line-height` on `input` using `!important` in * the UA stylesheet. */ /* line 303, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, input { line-height: normal; } /** * Address inconsistent `text-transform` inheritance for `button` and `select`. * All other form control elements do not inherit `text-transform` values. * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. * Correct `select` style inheritance in Firefox 4+ and Opera. */ /* line 315, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, select { text-transform: none; } /** * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * and `video` controls. * 2. Correct inability to style clickable `input` types in iOS. * 3. Improve usability and consistency of cursor style between image-type * `input` and others. */ /* line 328, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } /** * Re-set default cursor for disabled elements. */ /* line 340, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button[disabled], html input[disabled] { cursor: default; } /** * 1. Address box sizing set to `content-box` in IE 8/9. * 2. Remove excess padding in IE 8/9. */ /* line 350, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } /** * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome * (include `-moz` to future-proof). */ /* line 362, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="search"] { -webkit-appearance: textfield; /* 1 */ -moz-box-sizing: content-box; -webkit-box-sizing: content-box; /* 2 */ box-sizing: content-box; } /** * Remove inner padding and search cancel button in Safari 5 and Chrome * on OS X. */ /* line 374, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } /** * Remove inner padding and border in Firefox 4+. */ /* line 383, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } /** * 1. Remove default vertical scrollbar in IE 8/9. * 2. Improve readability and alignment in all browsers. */ /* line 394, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ textarea { overflow: auto; /* 1 */ vertical-align: top; /* 2 */ } /* ========================================================================== Tables ========================================================================== */ /** * Remove most spacing between table cells. */ /* line 407, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */ table { border-collapse: collapse; border-spacing: 0; }
namho102/business-site
stylesheets/foundation/normalize.css
CSS
mit
11,327
25.969048
99
0.586916
false
yii-lazy-image ============== Lazy image loader for the Yii framework. It is implemented as a static class which leverages [jQuery Unveil](http://luis-almeida.github.io/unveil/) to load images lazily. The interface is the same as `CHtml::image()` so existing code can easily be adapted to use it. ## Usage Require the project in your `composer.json`, then use it like this: ```php echo \yiilazyimage\components\LazyImage::image($url, $alt, $htmlOptions); ``` ## License This project is licensed under the MIT license
Jalle19/yii-lazy-image
README.md
Markdown
mit
524
29.823529
266
0.729008
false
/* Zepto v1.1.4 - zepto event ajax form ie - zeptojs.com/license */ var Zepto = (function() { var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter, document = window.document, elementDisplay = {}, classCache = {}, cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 }, fragmentRE = /^\s*<(\w+|!)[^>]*>/, singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, rootNodeRE = /^(?:body|html)$/i, capitalRE = /([A-Z])/g, // special attributes that should be get/set via method calls methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'], adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ], table = document.createElement('table'), tableRow = document.createElement('tr'), containers = { 'tr': document.createElement('tbody'), 'tbody': table, 'thead': table, 'tfoot': table, 'td': tableRow, 'th': tableRow, '*': document.createElement('div') }, readyRE = /complete|loaded|interactive/, simpleSelectorRE = /^[\w-]*$/, class2type = {}, toString = class2type.toString, zepto = {}, camelize, uniq, tempParent = document.createElement('div'), propMap = { 'tabindex': 'tabIndex', 'readonly': 'readOnly', 'for': 'htmlFor', 'class': 'className', 'maxlength': 'maxLength', 'cellspacing': 'cellSpacing', 'cellpadding': 'cellPadding', 'rowspan': 'rowSpan', 'colspan': 'colSpan', 'usemap': 'useMap', 'frameborder': 'frameBorder', 'contenteditable': 'contentEditable' }, isArray = Array.isArray || function(object){ return object instanceof Array } zepto.matches = function(element, selector) { if (!selector || !element || element.nodeType !== 1) return false var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector if (matchesSelector) return matchesSelector.call(element, selector) // fall back to performing a selector: var match, parent = element.parentNode, temp = !parent if (temp) (parent = tempParent).appendChild(element) match = ~zepto.qsa(parent, selector).indexOf(element) temp && tempParent.removeChild(element) return match } function type(obj) { return obj == null ? String(obj) : class2type[toString.call(obj)] || "object" } function isFunction(value) { return type(value) == "function" } function isWindow(obj) { return obj != null && obj == obj.window } function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE } function isObject(obj) { return type(obj) == "object" } function isPlainObject(obj) { return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype } function likeArray(obj) { return typeof obj.length == 'number' } function compact(array) { return filter.call(array, function(item){ return item != null }) } function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array } camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) } function dasherize(str) { return str.replace(/::/g, '/') .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') .replace(/([a-z\d])([A-Z])/g, '$1_$2') .replace(/_/g, '-') .toLowerCase() } uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) } function classRE(name) { return name in classCache ? classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)')) } function maybeAddPx(name, value) { return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value } function defaultDisplay(nodeName) { var element, display if (!elementDisplay[nodeName]) { element = document.createElement(nodeName) document.body.appendChild(element) display = getComputedStyle(element, '').getPropertyValue("display") element.parentNode.removeChild(element) display == "none" && (display = "block") elementDisplay[nodeName] = display } return elementDisplay[nodeName] } function children(element) { return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function(node){ if (node.nodeType == 1) return node }) } // `$.zepto.fragment` takes a html string and an optional tag name // to generate DOM nodes nodes from the given html string. // The generated DOM nodes are returned as an array. // This function can be overriden in plugins for example to make // it compatible with browsers that don't support the DOM fully. zepto.fragment = function(html, name, properties) { var dom, nodes, container // A special case optimization for a single tag if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1)) if (!dom) { if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>") if (name === undefined) name = fragmentRE.test(html) && RegExp.$1 if (!(name in containers)) name = '*' container = containers[name] container.innerHTML = '' + html dom = $.each(slice.call(container.childNodes), function(){ container.removeChild(this) }) } if (isPlainObject(properties)) { nodes = $(dom) $.each(properties, function(key, value) { if (methodAttributes.indexOf(key) > -1) nodes[key](value) else nodes.attr(key, value) }) } return dom } // `$.zepto.Z` swaps out the prototype of the given `dom` array // of nodes with `$.fn` and thus supplying all the Zepto functions // to the array. Note that `__proto__` is not supported on Internet // Explorer. This method can be overriden in plugins. zepto.Z = function(dom, selector) { dom = dom || [] dom.__proto__ = $.fn dom.selector = selector || '' return dom } // `$.zepto.isZ` should return `true` if the given object is a Zepto // collection. This method can be overriden in plugins. zepto.isZ = function(object) { return object instanceof zepto.Z } // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and // takes a CSS selector and an optional context (and handles various // special cases). // This method can be overriden in plugins. zepto.init = function(selector, context) { var dom // If nothing given, return an empty Zepto collection if (!selector) return zepto.Z() // Optimize for string selectors else if (typeof selector == 'string') { selector = selector.trim() // If it's a html fragment, create nodes from it // Note: In both Chrome 21 and Firefox 15, DOM error 12 // is thrown if the fragment doesn't begin with < if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // If it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // If a function is given, call it when the DOM is ready else if (isFunction(selector)) return $(document).ready(selector) // If a Zepto collection is given, just return it else if (zepto.isZ(selector)) return selector else { // normalize array if an array of nodes is given if (isArray(selector)) dom = compact(selector) // Wrap DOM nodes. else if (isObject(selector)) dom = [selector], selector = null // If it's a html fragment, create nodes from it else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null // If there's a context, create a collection on that context first, and select // nodes from there else if (context !== undefined) return $(context).find(selector) // And last but no least, if it's a CSS selector, use it to select nodes. else dom = zepto.qsa(document, selector) } // create a new Zepto collection from the nodes found return zepto.Z(dom, selector) } // `$` will be the base `Zepto` object. When calling this // function just call `$.zepto.init, which makes the implementation // details of selecting nodes and creating Zepto collections // patchable in plugins. $ = function(selector, context){ return zepto.init(selector, context) } function extend(target, source, deep) { for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {} if (isArray(source[key]) && !isArray(target[key])) target[key] = [] extend(target[key], source[key], deep) } else if (source[key] !== undefined) target[key] = source[key] } // Copy all but undefined properties from one or more // objects to the `target` object. $.extend = function(target){ var deep, args = slice.call(arguments, 1) if (typeof target == 'boolean') { deep = target target = args.shift() } args.forEach(function(arg){ extend(target, arg, deep) }) return target } // `$.zepto.qsa` is Zepto's CSS selector implementation which // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`. // This method can be overriden in plugins. zepto.qsa = function(element, selector){ var found, maybeID = selector[0] == '#', maybeClass = !maybeID && selector[0] == '.', nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked isSimple = simpleSelectorRE.test(nameOnly) return (isDocument(element) && isSimple && maybeID) ? ( (found = element.getElementById(nameOnly)) ? [found] : [] ) : (element.nodeType !== 1 && element.nodeType !== 9) ? [] : slice.call( isSimple && !maybeID ? maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class element.getElementsByTagName(selector) : // Or a tag element.querySelectorAll(selector) // Or it's not simple, and we need to query all ) } function filtered(nodes, selector) { return selector == null ? $(nodes) : $(nodes).filter(selector) } $.contains = document.documentElement.contains ? function(parent, node) { return parent !== node && parent.contains(node) } : function(parent, node) { while (node && (node = node.parentNode)) if (node === parent) return true return false } function funcArg(context, arg, idx, payload) { return isFunction(arg) ? arg.call(context, idx, payload) : arg } function setAttribute(node, name, value) { value == null ? node.removeAttribute(name) : node.setAttribute(name, value) } // access className property while respecting SVGAnimatedString function className(node, value){ var klass = node.className, svg = klass && klass.baseVal !== undefined if (value === undefined) return svg ? klass.baseVal : klass svg ? (klass.baseVal = value) : (node.className = value) } // "true" => true // "false" => false // "null" => null // "42" => 42 // "42.5" => 42.5 // "08" => "08" // JSON => parse if valid // String => self function deserializeValue(value) { var num try { return value ? value == "true" || ( value == "false" ? false : value == "null" ? null : !/^0/.test(value) && !isNaN(num = Number(value)) ? num : /^[\[\{]/.test(value) ? $.parseJSON(value) : value ) : value } catch(e) { return value } } $.type = type $.isFunction = isFunction $.isWindow = isWindow $.isArray = isArray $.isPlainObject = isPlainObject $.isEmptyObject = function(obj) { var name for (name in obj) return false return true } $.inArray = function(elem, array, i){ return emptyArray.indexOf.call(array, elem, i) } $.camelCase = camelize $.trim = function(str) { return str == null ? "" : String.prototype.trim.call(str) } // plugin compatibility $.uuid = 0 $.support = { } $.expr = { } $.map = function(elements, callback){ var value, values = [], i, key if (likeArray(elements)) for (i = 0; i < elements.length; i++) { value = callback(elements[i], i) if (value != null) values.push(value) } else for (key in elements) { value = callback(elements[key], key) if (value != null) values.push(value) } return flatten(values) } $.each = function(elements, callback){ var i, key if (likeArray(elements)) { for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements } else { for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements } return elements } $.grep = function(elements, callback){ return filter.call(elements, callback) } if (window.JSON) $.parseJSON = JSON.parse // Populate the class2type map $.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { class2type[ "[object " + name + "]" ] = name.toLowerCase() }) // Define methods that will be available on all // Zepto collections $.fn = { // Because a collection acts like an array // copy over these useful array functions. forEach: emptyArray.forEach, reduce: emptyArray.reduce, push: emptyArray.push, sort: emptyArray.sort, indexOf: emptyArray.indexOf, concat: emptyArray.concat, // `map` and `slice` in the jQuery API work differently // from their array counterparts map: function(fn){ return $($.map(this, function(el, i){ return fn.call(el, i, el) })) }, slice: function(){ return $(slice.apply(this, arguments)) }, ready: function(callback){ // need to check if document.body exists for IE as that browser reports // document ready when it hasn't yet created the body element if (readyRE.test(document.readyState) && document.body) callback($) else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false) return this }, get: function(idx){ return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length] }, toArray: function(){ return this.get() }, size: function(){ return this.length }, remove: function(){ return this.each(function(){ if (this.parentNode != null) this.parentNode.removeChild(this) }) }, each: function(callback){ emptyArray.every.call(this, function(el, idx){ return callback.call(el, idx, el) !== false }) return this }, filter: function(selector){ if (isFunction(selector)) return this.not(this.not(selector)) return $(filter.call(this, function(element){ return zepto.matches(element, selector) })) }, add: function(selector,context){ return $(uniq(this.concat($(selector,context)))) }, is: function(selector){ return this.length > 0 && zepto.matches(this[0], selector) }, not: function(selector){ var nodes=[] if (isFunction(selector) && selector.call !== undefined) this.each(function(idx){ if (!selector.call(this,idx)) nodes.push(this) }) else { var excludes = typeof selector == 'string' ? this.filter(selector) : (likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector) this.forEach(function(el){ if (excludes.indexOf(el) < 0) nodes.push(el) }) } return $(nodes) }, has: function(selector){ return this.filter(function(){ return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size() }) }, eq: function(idx){ return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1) }, first: function(){ var el = this[0] return el && !isObject(el) ? el : $(el) }, last: function(){ var el = this[this.length - 1] return el && !isObject(el) ? el : $(el) }, find: function(selector){ var result, $this = this if (!selector) result = [] else if (typeof selector == 'object') result = $(selector).filter(function(){ var node = this return emptyArray.some.call($this, function(parent){ return $.contains(parent, node) }) }) else if (this.length == 1) result = $(zepto.qsa(this[0], selector)) else result = this.map(function(){ return zepto.qsa(this, selector) }) return result }, closest: function(selector, context){ var node = this[0], collection = false if (typeof selector == 'object') collection = $(selector) while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode return $(node) }, parents: function(selector){ var ancestors = [], nodes = this while (nodes.length > 0) nodes = $.map(nodes, function(node){ if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) { ancestors.push(node) return node } }) return filtered(ancestors, selector) }, parent: function(selector){ return filtered(uniq(this.pluck('parentNode')), selector) }, children: function(selector){ return filtered(this.map(function(){ return children(this) }), selector) }, contents: function() { return this.map(function() { return slice.call(this.childNodes) }) }, siblings: function(selector){ return filtered(this.map(function(i, el){ return filter.call(children(el.parentNode), function(child){ return child!==el }) }), selector) }, empty: function(){ return this.each(function(){ this.innerHTML = '' }) }, // `pluck` is borrowed from Prototype.js pluck: function(property){ return $.map(this, function(el){ return el[property] }) }, show: function(){ return this.each(function(){ this.style.display == "none" && (this.style.display = '') if (getComputedStyle(this, '').getPropertyValue("display") == "none") this.style.display = defaultDisplay(this.nodeName) }) }, replaceWith: function(newContent){ return this.before(newContent).remove() }, wrap: function(structure){ var func = isFunction(structure) if (this[0] && !func) var dom = $(structure).get(0), clone = dom.parentNode || this.length > 1 return this.each(function(index){ $(this).wrapAll( func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom ) }) }, wrapAll: function(structure){ if (this[0]) { $(this[0]).before(structure = $(structure)) var children // drill down to the inmost element while ((children = structure.children()).length) structure = children.first() $(structure).append(this) } return this }, wrapInner: function(structure){ var func = isFunction(structure) return this.each(function(index){ var self = $(this), contents = self.contents(), dom = func ? structure.call(this, index) : structure contents.length ? contents.wrapAll(dom) : self.append(dom) }) }, unwrap: function(){ this.parent().each(function(){ $(this).replaceWith($(this).children()) }) return this }, clone: function(){ return this.map(function(){ return this.cloneNode(true) }) }, hide: function(){ return this.css("display", "none") }, toggle: function(setting){ return this.each(function(){ var el = $(this) ;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide() }) }, prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') }, next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') }, html: function(html){ return 0 in arguments ? this.each(function(idx){ var originHtml = this.innerHTML $(this).empty().append( funcArg(this, html, idx, originHtml) ) }) : (0 in this ? this[0].innerHTML : null) }, text: function(text){ return 0 in arguments ? this.each(function(idx){ var newText = funcArg(this, text, idx, this.textContent) this.textContent = newText == null ? '' : ''+newText }) : (0 in this ? this[0].textContent : null) }, attr: function(name, value){ var result return (typeof name == 'string' && !(1 in arguments)) ? (!this.length || this[0].nodeType !== 1 ? undefined : (!(result = this[0].getAttribute(name)) && name in this[0]) ? this[0][name] : result ) : this.each(function(idx){ if (this.nodeType !== 1) return if (isObject(name)) for (key in name) setAttribute(this, key, name[key]) else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name))) }) }, removeAttr: function(name){ return this.each(function(){ this.nodeType === 1 && setAttribute(this, name) }) }, prop: function(name, value){ name = propMap[name] || name return (1 in arguments) ? this.each(function(idx){ this[name] = funcArg(this, value, idx, this[name]) }) : (this[0] && this[0][name]) }, data: function(name, value){ var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase() var data = (1 in arguments) ? this.attr(attrName, value) : this.attr(attrName) return data !== null ? deserializeValue(data) : undefined }, val: function(value){ return 0 in arguments ? this.each(function(idx){ this.value = funcArg(this, value, idx, this.value) }) : (this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') : this[0].value) ) }, offset: function(coordinates){ if (coordinates) return this.each(function(index){ var $this = $(this), coords = funcArg(this, coordinates, index, $this.offset()), parentOffset = $this.offsetParent().offset(), props = { top: coords.top - parentOffset.top, left: coords.left - parentOffset.left } if ($this.css('position') == 'static') props['position'] = 'relative' $this.css(props) }) if (!this.length) return null var obj = this[0].getBoundingClientRect() return { left: obj.left + window.pageXOffset, top: obj.top + window.pageYOffset, width: Math.round(obj.width), height: Math.round(obj.height) } }, css: function(property, value){ if (arguments.length < 2) { var element = this[0], computedStyle = getComputedStyle(element, '') if(!element) return if (typeof property == 'string') return element.style[camelize(property)] || computedStyle.getPropertyValue(property) else if (isArray(property)) { var props = {} $.each(isArray(property) ? property: [property], function(_, prop){ props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop)) }) return props } } var css = '' if (type(property) == 'string') { if (!value && value !== 0) this.each(function(){ this.style.removeProperty(dasherize(property)) }) else css = dasherize(property) + ":" + maybeAddPx(property, value) } else { for (key in property) if (!property[key] && property[key] !== 0) this.each(function(){ this.style.removeProperty(dasherize(key)) }) else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';' } return this.each(function(){ this.style.cssText += ';' + css }) }, index: function(element){ return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]) }, hasClass: function(name){ if (!name) return false return emptyArray.some.call(this, function(el){ return this.test(className(el)) }, classRE(name)) }, addClass: function(name){ if (!name) return this return this.each(function(idx){ classList = [] var cls = className(this), newName = funcArg(this, name, idx, cls) newName.split(/\s+/g).forEach(function(klass){ if (!$(this).hasClass(klass)) classList.push(klass) }, this) classList.length && className(this, cls + (cls ? " " : "") + classList.join(" ")) }) }, removeClass: function(name){ return this.each(function(idx){ if (name === undefined) return className(this, '') classList = className(this) funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){ classList = classList.replace(classRE(klass), " ") }) className(this, classList.trim()) }) }, toggleClass: function(name, when){ if (!name) return this return this.each(function(idx){ var $this = $(this), names = funcArg(this, name, idx, className(this)) names.split(/\s+/g).forEach(function(klass){ (when === undefined ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass) }) }) }, scrollTop: function(value){ if (!this.length) return var hasScrollTop = 'scrollTop' in this[0] if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset return this.each(hasScrollTop ? function(){ this.scrollTop = value } : function(){ this.scrollTo(this.scrollX, value) }) }, scrollLeft: function(value){ if (!this.length) return var hasScrollLeft = 'scrollLeft' in this[0] if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset return this.each(hasScrollLeft ? function(){ this.scrollLeft = value } : function(){ this.scrollTo(value, this.scrollY) }) }, position: function() { if (!this.length) return var elem = this[0], // Get *real* offsetParent offsetParent = this.offsetParent(), // Get correct offsets offset = this.offset(), parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset() // Subtract element margins // note: when an element has margin: auto the offsetLeft and marginLeft // are the same in Safari causing offset.left to incorrectly be 0 offset.top -= parseFloat( $(elem).css('margin-top') ) || 0 offset.left -= parseFloat( $(elem).css('margin-left') ) || 0 // Add offsetParent borders parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0 parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0 // Subtract the two offsets return { top: offset.top - parentOffset.top, left: offset.left - parentOffset.left } }, offsetParent: function() { return this.map(function(){ var parent = this.offsetParent || document.body while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static") parent = parent.offsetParent return parent }) } } // for now $.fn.detach = $.fn.remove // Generate the `width` and `height` functions ;['width', 'height'].forEach(function(dimension){ var dimensionProperty = dimension.replace(/./, function(m){ return m[0].toUpperCase() }) $.fn[dimension] = function(value){ var offset, el = this[0] if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension] else return this.each(function(idx){ el = $(this) el.css(dimension, funcArg(this, value, idx, el[dimension]())) }) } }) function traverseNode(node, fun) { fun(node) for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun) } // Generate the `after`, `prepend`, `before`, `append`, // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods. adjacencyOperators.forEach(function(operator, operatorIndex) { var inside = operatorIndex % 2 //=> prepend, append $.fn[operator] = function(){ // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings var argType, nodes = $.map(arguments, function(arg) { argType = type(arg) return argType == "object" || argType == "array" || arg == null ? arg : zepto.fragment(arg) }), parent, copyByClone = this.length > 1 if (nodes.length < 1) return this return this.each(function(_, target){ parent = inside ? target : target.parentNode // convert all methods to a "before" operation target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null var parentInDocument = $.contains(document.documentElement, parent) nodes.forEach(function(node){ if (copyByClone) node = node.cloneNode(true) else if (!parent) return $(node).remove() parent.insertBefore(node, target) if (parentInDocument) traverseNode(node, function(el){ if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src) window['eval'].call(window, el.innerHTML) }) }) }) } // after => insertAfter // prepend => prependTo // before => insertBefore // append => appendTo $.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){ $(html)[operator](this) return this } }) zepto.Z.prototype = $.fn // Export internal API functions in the `$.zepto` namespace zepto.uniq = uniq zepto.deserializeValue = deserializeValue $.zepto = zepto return $ })() window.Zepto = Zepto window.$ === undefined && (window.$ = Zepto) ;(function($){ var _zid = 1, undefined, slice = Array.prototype.slice, isFunction = $.isFunction, isString = function(obj){ return typeof obj == 'string' }, handlers = {}, specialEvents={}, focusinSupported = 'onfocusin' in window, focus = { focus: 'focusin', blur: 'focusout' }, hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' } specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents' function zid(element) { return element._zid || (element._zid = _zid++) } function findHandlers(element, event, fn, selector) { event = parse(event) if (event.ns) var matcher = matcherFor(event.ns) return (handlers[zid(element)] || []).filter(function(handler) { return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector) }) } function parse(event) { var parts = ('' + event).split('.') return {e: parts[0], ns: parts.slice(1).sort().join(' ')} } function matcherFor(ns) { return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)') } function eventCapture(handler, captureSetting) { return handler.del && (!focusinSupported && (handler.e in focus)) || !!captureSetting } function realEvent(type) { return hover[type] || (focusinSupported && focus[type]) || type } function add(element, events, fn, data, selector, delegator, capture){ var id = zid(element), set = (handlers[id] || (handlers[id] = [])) events.split(/\s/).forEach(function(event){ if (event == 'ready') return $(document).ready(fn) var handler = parse(event) handler.fn = fn handler.sel = selector // emulate mouseenter, mouseleave if (handler.e in hover) fn = function(e){ var related = e.relatedTarget if (!related || (related !== this && !$.contains(this, related))) return handler.fn.apply(this, arguments) } handler.del = delegator var callback = delegator || fn handler.proxy = function(e){ e = compatible(e) if (e.isImmediatePropagationStopped()) return e.data = data var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args)) if (result === false) e.preventDefault(), e.stopPropagation() return result } handler.i = set.length set.push(handler) if ('addEventListener' in element) element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) } function remove(element, events, fn, selector, capture){ var id = zid(element) ;(events || '').split(/\s/).forEach(function(event){ findHandlers(element, event, fn, selector).forEach(function(handler){ delete handlers[id][handler.i] if ('removeEventListener' in element) element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture)) }) }) } $.event = { add: add, remove: remove } $.proxy = function(fn, context) { var args = (2 in arguments) && slice.call(arguments, 2) if (isFunction(fn)) { var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) } proxyFn._zid = zid(fn) return proxyFn } else if (isString(context)) { if (args) { args.unshift(fn[context], fn) return $.proxy.apply(null, args) } else { return $.proxy(fn[context], fn) } } else { throw new TypeError("expected function") } } $.fn.bind = function(event, data, callback){ return this.on(event, data, callback) } $.fn.unbind = function(event, callback){ return this.off(event, callback) } $.fn.one = function(event, selector, data, callback){ return this.on(event, selector, data, callback, 1) } var returnTrue = function(){return true}, returnFalse = function(){return false}, ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$)/, eventMethods = { preventDefault: 'isDefaultPrevented', stopImmediatePropagation: 'isImmediatePropagationStopped', stopPropagation: 'isPropagationStopped' } function compatible(event, source) { if (source || !event.isDefaultPrevented) { source || (source = event) $.each(eventMethods, function(name, predicate) { var sourceMethod = source[name] event[name] = function(){ this[predicate] = returnTrue return sourceMethod && sourceMethod.apply(source, arguments) } event[predicate] = returnFalse }) if (source.defaultPrevented !== undefined ? source.defaultPrevented : 'returnValue' in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) event.isDefaultPrevented = returnTrue } return event } function createProxy(event) { var key, proxy = { originalEvent: event } for (key in event) if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key] return compatible(proxy, event) } $.fn.delegate = function(selector, event, callback){ return this.on(event, selector, callback) } $.fn.undelegate = function(selector, event, callback){ return this.off(event, selector, callback) } $.fn.live = function(event, callback){ $(document.body).delegate(this.selector, event, callback) return this } $.fn.die = function(event, callback){ $(document.body).undelegate(this.selector, event, callback) return this } $.fn.on = function(event, selector, data, callback, one){ var autoRemove, delegator, $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.on(type, selector, data, fn, one) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = data, data = selector, selector = undefined if (isFunction(data) || data === false) callback = data, data = undefined if (callback === false) callback = returnFalse return $this.each(function(_, element){ if (one) autoRemove = function(e){ remove(element, e.type, callback) return callback.apply(this, arguments) } if (selector) delegator = function(e){ var evt, match = $(e.target).closest(selector, element).get(0) if (match && match !== element) { evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element}) return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1))) } } add(element, event, callback, data, selector, delegator || autoRemove) }) } $.fn.off = function(event, selector, callback){ var $this = this if (event && !isString(event)) { $.each(event, function(type, fn){ $this.off(type, selector, fn) }) return $this } if (!isString(selector) && !isFunction(callback) && callback !== false) callback = selector, selector = undefined if (callback === false) callback = returnFalse return $this.each(function(){ remove(this, event, callback, selector) }) } $.fn.trigger = function(event, args){ event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event) event._args = args return this.each(function(){ // items in the collection might not be DOM elements if('dispatchEvent' in this) this.dispatchEvent(event) else $(this).triggerHandler(event, args) }) } // triggers event handlers on current element just as if an event occurred, // doesn't trigger an actual event, doesn't bubble $.fn.triggerHandler = function(event, args){ var e, result this.each(function(i, element){ e = createProxy(isString(event) ? $.Event(event) : event) e._args = args e.target = element $.each(findHandlers(element, event.type || event), function(i, handler){ result = handler.proxy(e) if (e.isImmediatePropagationStopped()) return false }) }) return result } // shortcut methods for `.bind(event, fn)` for each event type ;('focusin focusout load resize scroll unload click dblclick '+ 'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+ 'change select keydown keypress keyup error').split(' ').forEach(function(event) { $.fn[event] = function(callback) { return callback ? this.bind(event, callback) : this.trigger(event) } }) ;['focus', 'blur'].forEach(function(name) { $.fn[name] = function(callback) { if (callback) this.bind(name, callback) else this.each(function(){ try { this[name]() } catch(e) {} }) return this } }) $.Event = function(type, props) { if (!isString(type)) props = type, type = props.type var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name]) event.initEvent(type, bubbles, true) return compatible(event) } })(Zepto) ;(function($){ var jsonpID = 0, document = window.document, key, name, rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, scriptTypeRE = /^(?:text|application)\/javascript/i, xmlTypeRE = /^(?:text|application)\/xml/i, jsonType = 'application/json', htmlType = 'text/html', blankRE = /^\s*$/ // trigger a custom event and return false if it was cancelled function triggerAndReturn(context, eventName, data) { var event = $.Event(eventName) $(context).trigger(event, data) return !event.isDefaultPrevented() } // trigger an Ajax "global" event function triggerGlobal(settings, context, eventName, data) { if (settings.global) return triggerAndReturn(context || document, eventName, data) } // Number of active Ajax requests $.active = 0 function ajaxStart(settings) { if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart') } function ajaxStop(settings) { if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop') } // triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable function ajaxBeforeSend(xhr, settings) { var context = settings.context if (settings.beforeSend.call(context, xhr, settings) === false || triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false) return false triggerGlobal(settings, context, 'ajaxSend', [xhr, settings]) } function ajaxSuccess(data, xhr, settings, deferred) { var context = settings.context, status = 'success' settings.success.call(context, data, status, xhr) if (deferred) deferred.resolveWith(context, [data, status, xhr]) triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data]) ajaxComplete(status, xhr, settings) } // type: "timeout", "error", "abort", "parsererror" function ajaxError(error, type, xhr, settings, deferred) { var context = settings.context settings.error.call(context, xhr, type, error) if (deferred) deferred.rejectWith(context, [xhr, type, error]) triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type]) ajaxComplete(type, xhr, settings) } // status: "success", "notmodified", "error", "timeout", "abort", "parsererror" function ajaxComplete(status, xhr, settings) { var context = settings.context settings.complete.call(context, xhr, status) triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings]) ajaxStop(settings) } // Empty function, used as default callback function empty() {} $.ajaxJSONP = function(options, deferred){ if (!('type' in options)) return $.ajax(options) var _callbackName = options.jsonpCallback, callbackName = ($.isFunction(_callbackName) ? _callbackName() : _callbackName) || ('jsonp' + (++jsonpID)), script = document.createElement('script'), originalCallback = window[callbackName], responseData, abort = function(errorType) { $(script).triggerHandler('error', errorType || 'abort') }, xhr = { abort: abort }, abortTimeout if (deferred) deferred.promise(xhr) $(script).on('load error', function(e, errorType){ clearTimeout(abortTimeout) $(script).off().remove() if (e.type == 'error' || !responseData) { ajaxError(null, errorType || 'error', xhr, options, deferred) } else { ajaxSuccess(responseData[0], xhr, options, deferred) } window[callbackName] = originalCallback if (responseData && $.isFunction(originalCallback)) originalCallback(responseData[0]) originalCallback = responseData = undefined }) if (ajaxBeforeSend(xhr, options) === false) { abort('abort') return xhr } window[callbackName] = function(){ responseData = arguments } script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName) document.head.appendChild(script) if (options.timeout > 0) abortTimeout = setTimeout(function(){ abort('timeout') }, options.timeout) return xhr } $.ajaxSettings = { // Default type of request type: 'GET', // Callback that is executed before request beforeSend: empty, // Callback that is executed if the request succeeds success: empty, // Callback that is executed the the server drops error error: empty, // Callback that is executed on request complete (both: error and success) complete: empty, // The context for the callbacks context: null, // Whether to trigger "global" Ajax events global: true, // Transport xhr: function () { return new window.XMLHttpRequest() }, // MIME types mapping // IIS returns Javascript as "application/x-javascript" accepts: { script: 'text/javascript, application/javascript, application/x-javascript', json: jsonType, xml: 'application/xml, text/xml', html: htmlType, text: 'text/plain' }, // Whether the request is to another domain crossDomain: false, // Default timeout timeout: 0, // Whether data should be serialized to string processData: true, // Whether the browser should be allowed to cache GET responses cache: true } function mimeToDataType(mime) { if (mime) mime = mime.split(';', 2)[0] return mime && ( mime == htmlType ? 'html' : mime == jsonType ? 'json' : scriptTypeRE.test(mime) ? 'script' : xmlTypeRE.test(mime) && 'xml' ) || 'text' } function appendQuery(url, query) { if (query == '') return url return (url + '&' + query).replace(/[&?]{1,2}/, '?') } // serialize payload and append it to the URL for GET requests function serializeData(options) { if (options.processData && options.data && $.type(options.data) != "string") options.data = $.param(options.data, options.traditional) if (options.data && (!options.type || options.type.toUpperCase() == 'GET')) options.url = appendQuery(options.url, options.data), options.data = undefined } $.ajax = function(options){ var settings = $.extend({}, options || {}), deferred = $.Deferred && $.Deferred() for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key] ajaxStart(settings) if (!settings.crossDomain) settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) && RegExp.$2 != window.location.host if (!settings.url) settings.url = window.location.toString() serializeData(settings) var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url) if (hasPlaceholder) dataType = 'jsonp' if (settings.cache === false || ( (!options || options.cache !== true) && ('script' == dataType || 'jsonp' == dataType) )) settings.url = appendQuery(settings.url, '_=' + Date.now()) if ('jsonp' == dataType) { if (!hasPlaceholder) settings.url = appendQuery(settings.url, settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?') return $.ajaxJSONP(settings, deferred) } var mime = settings.accepts[dataType], headers = { }, setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] }, protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol, xhr = settings.xhr(), nativeSetHeader = xhr.setRequestHeader, abortTimeout if (deferred) deferred.promise(xhr) if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest') setHeader('Accept', mime || '*/*') if (mime = settings.mimeType || mime) { if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0] xhr.overrideMimeType && xhr.overrideMimeType(mime) } if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET')) setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded') if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name]) xhr.setRequestHeader = setHeader xhr.onreadystatechange = function(){ if (xhr.readyState == 4) { xhr.onreadystatechange = empty clearTimeout(abortTimeout) var result, error = false if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) { dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type')) result = xhr.responseText try { // http://perfectionkills.com/global-eval-what-are-the-options/ if (dataType == 'script') (1,eval)(result) else if (dataType == 'xml') result = xhr.responseXML else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result) } catch (e) { error = e } if (error) ajaxError(error, 'parsererror', xhr, settings, deferred) else ajaxSuccess(result, xhr, settings, deferred) } else { ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred) } } } if (ajaxBeforeSend(xhr, settings) === false) { xhr.abort() ajaxError(null, 'abort', xhr, settings, deferred) return xhr } if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name] var async = 'async' in settings ? settings.async : true xhr.open(settings.type, settings.url, async, settings.username, settings.password) for (name in headers) nativeSetHeader.apply(xhr, headers[name]) if (settings.timeout > 0) abortTimeout = setTimeout(function(){ xhr.onreadystatechange = empty xhr.abort() ajaxError(null, 'timeout', xhr, settings, deferred) }, settings.timeout) // avoid sending empty string (#319) xhr.send(settings.data ? settings.data : null) return xhr } // handle optional data/success arguments function parseArguments(url, data, success, dataType) { if ($.isFunction(data)) dataType = success, success = data, data = undefined if (!$.isFunction(success)) dataType = success, success = undefined return { url: url , data: data , success: success , dataType: dataType } } $.get = function(/* url, data, success, dataType */){ return $.ajax(parseArguments.apply(null, arguments)) } $.post = function(/* url, data, success, dataType */){ var options = parseArguments.apply(null, arguments) options.type = 'POST' return $.ajax(options) } $.getJSON = function(/* url, data, success */){ var options = parseArguments.apply(null, arguments) options.dataType = 'json' return $.ajax(options) } $.fn.load = function(url, data, success){ if (!this.length) return this var self = this, parts = url.split(/\s/), selector, options = parseArguments(url, data, success), callback = options.success if (parts.length > 1) options.url = parts[0], selector = parts[1] options.success = function(response){ self.html(selector ? $('<div>').html(response.replace(rscript, "")).find(selector) : response) callback && callback.apply(self, arguments) } $.ajax(options) return this } var escape = encodeURIComponent function serialize(params, obj, traditional, scope){ var type, array = $.isArray(obj), hash = $.isPlainObject(obj) $.each(obj, function(key, value) { type = $.type(value) if (scope) key = traditional ? scope : scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']' // handle data in serializeArray() format if (!scope && array) params.add(value.name, value.value) // recurse into nested objects else if (type == "array" || (!traditional && type == "object")) serialize(params, value, traditional, key) else params.add(key, value) }) } $.param = function(obj, traditional){ var params = [] params.add = function(k, v){ this.push(escape(k) + '=' + escape(v)) } serialize(params, obj, traditional) return params.join('&').replace(/%20/g, '+') } })(Zepto) ;(function($){ $.fn.serializeArray = function() { var result = [], el $([].slice.call(this.get(0).elements)).each(function(){ el = $(this) var type = el.attr('type') if (this.nodeName.toLowerCase() != 'fieldset' && !this.disabled && type != 'submit' && type != 'reset' && type != 'button' && ((type != 'radio' && type != 'checkbox') || this.checked)) result.push({ name: el.attr('name'), value: el.val() }) }) return result } $.fn.serialize = function(){ var result = [] this.serializeArray().forEach(function(elm){ result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value)) }) return result.join('&') } $.fn.submit = function(callback) { if (callback) this.bind('submit', callback) else if (this.length) { var event = $.Event('submit') this.eq(0).trigger(event) if (!event.isDefaultPrevented()) this.get(0).submit() } return this } })(Zepto) ;(function($){ // __proto__ doesn't exist on IE<11, so redefine // the Z function to use object extension instead if (!('__proto__' in {})) { $.extend($.zepto, { Z: function(dom, selector){ dom = dom || [] $.extend(dom, $.fn) dom.selector = selector || '' dom.__Z = true return dom }, // this is a kludge but works isZ: function(object){ return $.type(object) === 'array' && '__Z' in object } }) } // getComputedStyle shouldn't freak out when called // without a valid element as argument try { getComputedStyle(undefined) } catch(e) { var nativeGetComputedStyle = getComputedStyle; window.getComputedStyle = function(element){ try { return nativeGetComputedStyle(element) } catch(e) { return null } } } })(Zepto) // Zepto.js // (c) 2010-2014 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. ;(function($){ var touch = {}, touchTimeout, tapTimeout, swipeTimeout, longTapTimeout, longTapDelay = 750, gesture function swipeDirection(x1, x2, y1, y2) { return Math.abs(x1 - x2) >= Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down') } function longTap() { longTapTimeout = null if (touch.last) { touch.el.trigger('longTap') touch = {} } } function cancelLongTap() { if (longTapTimeout) clearTimeout(longTapTimeout) longTapTimeout = null } function cancelAll() { if (touchTimeout) clearTimeout(touchTimeout) if (tapTimeout) clearTimeout(tapTimeout) if (swipeTimeout) clearTimeout(swipeTimeout) if (longTapTimeout) clearTimeout(longTapTimeout) touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null touch = {} } function isPrimaryTouch(event){ return (event.pointerType == 'touch' || event.pointerType == event.MSPOINTER_TYPE_TOUCH) && event.isPrimary } function isPointerEventType(e, type){ return (e.type == 'pointer'+type || e.type.toLowerCase() == 'mspointer'+type) } $(document).ready(function(){ var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType if ('MSGesture' in window) { gesture = new MSGesture() gesture.target = document.body } $(document) .bind('MSGestureEnd', function(e){ var swipeDirectionFromVelocity = e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null; if (swipeDirectionFromVelocity) { touch.el.trigger('swipe') touch.el.trigger('swipe'+ swipeDirectionFromVelocity) } }) .on('touchstart MSPointerDown pointerdown', function(e){ if((_isPointerType = isPointerEventType(e, 'down')) && !isPrimaryTouch(e)) return firstTouch = _isPointerType ? e : e.touches[0] if (e.touches && e.touches.length === 1 && touch.x2) { // Clear out touch movement data if we have it sticking around // This can occur if touchcancel doesn't fire due to preventDefault, etc. touch.x2 = undefined touch.y2 = undefined } now = Date.now() delta = now - (touch.last || now) touch.el = $('tagName' in firstTouch.target ? firstTouch.target : firstTouch.target.parentNode) touchTimeout && clearTimeout(touchTimeout) touch.x1 = firstTouch.pageX touch.y1 = firstTouch.pageY if (delta > 0 && delta <= 250) touch.isDoubleTap = true touch.last = now longTapTimeout = setTimeout(longTap, longTapDelay) // adds the current touch contact for IE gesture recognition if (gesture && _isPointerType) gesture.addPointer(e.pointerId); }) .on('touchmove MSPointerMove pointermove', function(e){ if((_isPointerType = isPointerEventType(e, 'move')) && !isPrimaryTouch(e)) return firstTouch = _isPointerType ? e : e.touches[0] cancelLongTap() touch.x2 = firstTouch.pageX touch.y2 = firstTouch.pageY deltaX += Math.abs(touch.x1 - touch.x2) deltaY += Math.abs(touch.y1 - touch.y2) }) .on('touchend MSPointerUp pointerup', function(e){ if((_isPointerType = isPointerEventType(e, 'up')) && !isPrimaryTouch(e)) return cancelLongTap() // swipe if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) || (touch.y2 && Math.abs(touch.y1 - touch.y2) > 30)) swipeTimeout = setTimeout(function() { touch.el.trigger('swipe') touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2))) touch = {} }, 0) // normal tap else if ('last' in touch) // don't fire tap when delta position changed by more than 30 pixels, // for instance when moving to a point and back to origin if (deltaX < 30 && deltaY < 30) { // delay by one tick so we can cancel the 'tap' event if 'scroll' fires // ('tap' fires before 'scroll') tapTimeout = setTimeout(function() { // trigger universal 'tap' with the option to cancelTouch() // (cancelTouch cancels processing of single vs double taps for faster 'tap' response) var event = $.Event('tap') event.cancelTouch = cancelAll touch.el.trigger(event) // trigger double tap immediately if (touch.isDoubleTap) { if (touch.el) touch.el.trigger('doubleTap') touch = {} } // trigger single tap after 250ms of inactivity else { touchTimeout = setTimeout(function(){ touchTimeout = null if (touch.el) touch.el.trigger('singleTap') touch = {} }, 250) } }, 0) } else { touch = {} } deltaX = deltaY = 0 }) // when the browser window loses focus, // for example when a modal dialog is shown, // cancel all ongoing events .on('touchcancel MSPointerCancel pointercancel', cancelAll) // scrolling the window indicates intention of the user // to scroll, not tap or swipe, so cancel all ongoing events $(window).on('scroll', cancelAll) }) ;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown', 'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){ $.fn[eventName] = function(callback){ return this.on(eventName, callback) } }) })(Zepto)
picacure/_sandBox
photoGallery/flux/js/zepto.js
JavaScript
mit
62,392
34.734822
134
0.592496
false
import asyncio import asyncio.subprocess import datetime import logging from collections import OrderedDict, defaultdict from typing import Any, Awaitable, Dict, List, Optional, Union # noqa from urllib.parse import urlparse from aiohttp import web import yacron.version from yacron.config import ( JobConfig, parse_config, ConfigError, parse_config_string, WebConfig, ) from yacron.job import RunningJob, JobRetryState from crontab import CronTab # noqa logger = logging.getLogger("yacron") WAKEUP_INTERVAL = datetime.timedelta(minutes=1) def naturaltime(seconds: float, future=False) -> str: assert future if seconds < 120: return "in {} second{}".format( int(seconds), "s" if seconds >= 2 else "" ) minutes = seconds / 60 if minutes < 120: return "in {} minute{}".format( int(minutes), "s" if minutes >= 2 else "" ) hours = minutes / 60 if hours < 48: return "in {} hour{}".format(int(hours), "s" if hours >= 2 else "") days = hours / 24 return "in {} day{}".format(int(days), "s" if days >= 2 else "") def get_now(timezone: Optional[datetime.tzinfo]) -> datetime.datetime: return datetime.datetime.now(timezone) def next_sleep_interval() -> float: now = get_now(datetime.timezone.utc) target = now.replace(second=0) + WAKEUP_INTERVAL return (target - now).total_seconds() def create_task(coro: Awaitable) -> asyncio.Task: return asyncio.get_event_loop().create_task(coro) def web_site_from_url(runner: web.AppRunner, url: str) -> web.BaseSite: parsed = urlparse(url) if parsed.scheme == "http": assert parsed.hostname is not None assert parsed.port is not None return web.TCPSite(runner, parsed.hostname, parsed.port) elif parsed.scheme == "unix": return web.UnixSite(runner, parsed.path) else: logger.warning( "Ignoring web listen url %s: scheme %r not supported", url, parsed.scheme, ) raise ValueError(url) class Cron: def __init__( self, config_arg: Optional[str], *, config_yaml: Optional[str] = None ) -> None: # list of cron jobs we /want/ to run self.cron_jobs = OrderedDict() # type: Dict[str, JobConfig] # list of cron jobs already running # name -> list of RunningJob self.running_jobs = defaultdict( list ) # type: Dict[str, List[RunningJob]] self.config_arg = config_arg if config_arg is not None: self.update_config() if config_yaml is not None: # config_yaml is for unit testing config, _, _ = parse_config_string(config_yaml, "") self.cron_jobs = OrderedDict((job.name, job) for job in config) self._wait_for_running_jobs_task = None # type: Optional[asyncio.Task] self._stop_event = asyncio.Event() self._jobs_running = asyncio.Event() self.retry_state = {} # type: Dict[str, JobRetryState] self.web_runner = None # type: Optional[web.AppRunner] self.web_config = None # type: Optional[WebConfig] async def run(self) -> None: self._wait_for_running_jobs_task = create_task( self._wait_for_running_jobs() ) startup = True while not self._stop_event.is_set(): try: web_config = self.update_config() await self.start_stop_web_app(web_config) except ConfigError as err: logger.error( "Error in configuration file(s), so not updating " "any of the config.:\n%s", str(err), ) except Exception: # pragma: nocover logger.exception("please report this as a bug (1)") await self.spawn_jobs(startup) startup = False sleep_interval = next_sleep_interval() logger.debug("Will sleep for %.1f seconds", sleep_interval) try: await asyncio.wait_for(self._stop_event.wait(), sleep_interval) except asyncio.TimeoutError: pass logger.info("Shutting down (after currently running jobs finish)...") while self.retry_state: cancel_all = [ self.cancel_job_retries(name) for name in self.retry_state ] await asyncio.gather(*cancel_all) await self._wait_for_running_jobs_task if self.web_runner is not None: logger.info("Stopping http server") await self.web_runner.cleanup() def signal_shutdown(self) -> None: logger.debug("Signalling shutdown") self._stop_event.set() def update_config(self) -> Optional[WebConfig]: if self.config_arg is None: return None config, web_config = parse_config(self.config_arg) self.cron_jobs = OrderedDict((job.name, job) for job in config) return web_config async def _web_get_version(self, request: web.Request) -> web.Response: return web.Response(text=yacron.version.version) async def _web_get_status(self, request: web.Request) -> web.Response: out = [] for name, job in self.cron_jobs.items(): running = self.running_jobs.get(name, None) if running: out.append( { "job": name, "status": "running", "pid": [ runjob.proc.pid for runjob in running if runjob.proc is not None ], } ) else: crontab = job.schedule # type: Union[CronTab, str] now = get_now(job.timezone) out.append( { "job": name, "status": "scheduled", "scheduled_in": ( crontab.next(now=now, default_utc=job.utc) if isinstance(crontab, CronTab) else str(crontab) ), } ) if request.headers.get("Accept") == "application/json": return web.json_response(out) else: lines = [] for jobstat in out: # type: Dict[str, Any] if jobstat["status"] == "running": status = "running (pid: {pid})".format( pid=", ".join(str(pid) for pid in jobstat["pid"]) ) else: status = "scheduled ({})".format( ( jobstat["scheduled_in"] if type(jobstat["scheduled_in"]) is str else naturaltime( jobstat["scheduled_in"], future=True ) ) ) lines.append( "{name}: {status}".format( name=jobstat["job"], status=status ) ) return web.Response(text="\n".join(lines)) async def _web_start_job(self, request: web.Request) -> web.Response: name = request.match_info["name"] try: job = self.cron_jobs[name] except KeyError: raise web.HTTPNotFound() await self.maybe_launch_job(job) return web.Response() async def start_stop_web_app(self, web_config: Optional[WebConfig]): if self.web_runner is not None and ( web_config is None or web_config != self.web_config ): # assert self.web_runner is not None logger.info("Stopping http server") await self.web_runner.cleanup() self.web_runner = None if ( web_config is not None and web_config["listen"] and self.web_runner is None ): app = web.Application() app.add_routes( [ web.get("/version", self._web_get_version), web.get("/status", self._web_get_status), web.post("/jobs/{name}/start", self._web_start_job), ] ) self.web_runner = web.AppRunner(app) await self.web_runner.setup() for addr in web_config["listen"]: site = web_site_from_url(self.web_runner, addr) logger.info("web: started listening on %s", addr) try: await site.start() except ValueError: pass self.web_config = web_config async def spawn_jobs(self, startup: bool) -> None: for job in self.cron_jobs.values(): if self.job_should_run(startup, job): await self.launch_scheduled_job(job) @staticmethod def job_should_run(startup: bool, job: JobConfig) -> bool: if ( startup and isinstance(job.schedule, str) and job.schedule == "@reboot" ): logger.debug( "Job %s (%s) is scheduled for startup (@reboot)", job.name, job.schedule_unparsed, ) return True elif isinstance(job.schedule, CronTab): crontab = job.schedule # type: CronTab if crontab.test(get_now(job.timezone).replace(second=0)): logger.debug( "Job %s (%s) is scheduled for now", job.name, job.schedule_unparsed, ) return True else: logger.debug( "Job %s (%s) not scheduled for now", job.name, job.schedule_unparsed, ) return False else: return False async def launch_scheduled_job(self, job: JobConfig) -> None: await self.cancel_job_retries(job.name) assert job.name not in self.retry_state retry = job.onFailure["retry"] logger.debug("Job %s retry config: %s", job.name, retry) if retry["maximumRetries"]: retry_state = JobRetryState( retry["initialDelay"], retry["backoffMultiplier"], retry["maximumDelay"], ) self.retry_state[job.name] = retry_state await self.maybe_launch_job(job) async def maybe_launch_job(self, job: JobConfig) -> None: if self.running_jobs[job.name]: logger.warning( "Job %s: still running and concurrencyPolicy is %s", job.name, job.concurrencyPolicy, ) if job.concurrencyPolicy == "Allow": pass elif job.concurrencyPolicy == "Forbid": return elif job.concurrencyPolicy == "Replace": for running_job in self.running_jobs[job.name]: await running_job.cancel() else: raise AssertionError # pragma: no cover logger.info("Starting job %s", job.name) running_job = RunningJob(job, self.retry_state.get(job.name)) await running_job.start() self.running_jobs[job.name].append(running_job) logger.info("Job %s spawned", job.name) self._jobs_running.set() # continually watches for the running jobs, clean them up when they exit async def _wait_for_running_jobs(self) -> None: # job -> wait task wait_tasks = {} # type: Dict[RunningJob, asyncio.Task] while self.running_jobs or not self._stop_event.is_set(): try: for jobs in self.running_jobs.values(): for job in jobs: if job not in wait_tasks: wait_tasks[job] = create_task(job.wait()) if not wait_tasks: try: await asyncio.wait_for(self._jobs_running.wait(), 1) except asyncio.TimeoutError: pass continue self._jobs_running.clear() # wait for at least one task with timeout done_tasks, _ = await asyncio.wait( wait_tasks.values(), timeout=1.0, return_when=asyncio.FIRST_COMPLETED, ) done_jobs = set() for job, task in list(wait_tasks.items()): if task in done_tasks: done_jobs.add(job) for job in done_jobs: task = wait_tasks.pop(job) try: task.result() except Exception: # pragma: no cover logger.exception("please report this as a bug (2)") jobs_list = self.running_jobs[job.config.name] jobs_list.remove(job) if not jobs_list: del self.running_jobs[job.config.name] fail_reason = job.fail_reason logger.info( "Job %s exit code %s; has stdout: %s, " "has stderr: %s; fail_reason: %r", job.config.name, job.retcode, str(bool(job.stdout)).lower(), str(bool(job.stderr)).lower(), fail_reason, ) if fail_reason is not None: await self.handle_job_failure(job) else: await self.handle_job_success(job) except asyncio.CancelledError: raise except Exception: # pragma: no cover logger.exception("please report this as a bug (3)") await asyncio.sleep(1) async def handle_job_failure(self, job: RunningJob) -> None: if self._stop_event.is_set(): return if job.stdout: logger.info( "Job %s STDOUT:\n%s", job.config.name, job.stdout.rstrip() ) if job.stderr: logger.info( "Job %s STDERR:\n%s", job.config.name, job.stderr.rstrip() ) await job.report_failure() # Handle retries... state = job.retry_state if state is None or state.cancelled: await job.report_permanent_failure() return logger.debug( "Job %s has been retried %i times", job.config.name, state.count ) if state.task is not None: if state.task.done(): await state.task else: state.task.cancel() retry = job.config.onFailure["retry"] if ( state.count >= retry["maximumRetries"] and retry["maximumRetries"] != -1 ): await self.cancel_job_retries(job.config.name) await job.report_permanent_failure() else: retry_delay = state.next_delay() state.task = create_task( self.schedule_retry_job( job.config.name, retry_delay, state.count ) ) async def schedule_retry_job( self, job_name: str, delay: float, retry_num: int ) -> None: logger.info( "Cron job %s scheduled to be retried (#%i) " "in %.1f seconds", job_name, retry_num, delay, ) await asyncio.sleep(delay) try: job = self.cron_jobs[job_name] except KeyError: logger.warning( "Cron job %s was scheduled for retry, but " "disappeared from the configuration", job_name, ) await self.maybe_launch_job(job) async def handle_job_success(self, job: RunningJob) -> None: await self.cancel_job_retries(job.config.name) await job.report_success() async def cancel_job_retries(self, name: str) -> None: try: state = self.retry_state.pop(name) except KeyError: return state.cancelled = True if state.task is not None: if state.task.done(): await state.task else: state.task.cancel()
gjcarneiro/yacron
yacron/cron.py
Python
mit
16,835
35.518438
79
0.503416
false
--- layout: single title: "将数组分成和相等的三个部分" date: 2018-10-10 21:30:00 +0800 categories: [Leetcode] tags: [Greedy, Array] permalink: /problems/partition-array-into-three-parts-with-equal-sum/ --- ## 1013. 将数组分成和相等的三个部分 (Easy) {% raw %} <p>给你一个整数数组 <code>arr</code>,只有可以将其划分为三个和相等的 <strong>非空</strong> 部分时才返回 <code>true</code>,否则返回 <code>false</code>。</p> <p>形式上,如果可以找出索引 <code>i + 1 < j</code> 且满足 <code>(arr[0] + arr[1] + ... + arr[i] == arr[i + 1] + arr[i + 2] + ... + arr[j - 1] == arr[j] + arr[j + 1] + ... + arr[arr.length - 1])</code> 就可以将数组三等分。</p> <p> </p> <p><strong>示例 1:</strong></p> <pre> <strong>输入:</strong>arr = [0,2,1,-6,6,-7,9,1,2,0,1] <strong>输出:</strong>true <strong>解释:</strong>0 + 2 + 1 = -6 + 6 - 7 + 9 + 1 = 2 + 0 + 1 </pre> <p><strong>示例 2:</strong></p> <pre> <strong>输入:</strong>arr = [0,2,1,-6,6,7,9,-1,2,0,1] <strong>输出:</strong>false </pre> <p><strong>示例 3:</strong></p> <pre> <strong>输入:</strong>arr = [3,3,6,5,-2,2,5,1,-9,4] <strong>输出:</strong>true <strong>解释:</strong>3 + 3 = 6 = 5 - 2 + 2 + 5 + 1 - 9 + 4 </pre> <p> </p> <p><strong>提示:</strong></p> <ul> <li><code>3 <= arr.length <= 5 * 10<sup>4</sup></code></li> <li><code>-10<sup>4</sup> <= arr[i] <= 10<sup>4</sup></code></li> </ul> {% endraw %} ### 相关话题 [[贪心](https://github.com/awesee/leetcode/tree/main/tag/greedy/README.md)] [[数组](https://github.com/awesee/leetcode/tree/main/tag/array/README.md)] --- ## [解法](https://github.com/awesee/leetcode/tree/main/problems/partition-array-into-three-parts-with-equal-sum)
openset/openset.github.io
_posts/2018-10-10-partition-array-into-three-parts-with-equal-sum.md
Markdown
mit
1,823
24.766667
200
0.578913
false
const SELECTOR_BOOK_IMAGE = '#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img'; const puppeteer = require('puppeteer'); let scrapeSite1 = async (browser) => { const page = await browser.newPage(); await page.goto('http://books.toscrape.com/'); await page.waitFor(1000); await page.click(SELECTOR_BOOK_IMAGE); await page.waitFor(2000); const result = await page.evaluate(() => { let title = document.querySelector('h1').innerText; let price = document.querySelector('.price_color').innerText; return { title, price } }); return result; } let scrape = async () => { const browser = await puppeteer.launch({ headless: false }); const result = await Promise.all([ scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser), scrapeSite1(browser) ]); await browser.close(); return result; }; scrape().then((value) => { console.log(value); // Success! });
yogendra/yogendra.me
source/_posts/2017/10/28/puppeteer-no-strings-attached/scrape-multi.js
JavaScript
mit
1,035
26.972973
157
0.651208
false
# Command Bus - [Introduction](#introduction) - [Creating Commamnds](#creating-commands) - [Dispatching Commamnds](#dispatching-commands) - [Queued Commands](#queued-commands) <a name="introduction"></a> ## Introduction The Laravel command bus provides a convenient method of encapsulating tasks your application needs to perform into simple, easy to understand "commands". To help us understand the purpose of commands, let's pretend we are building an application that allows users to purchase podcasts. When a user purchases a podcast, there are a variety of things that need to happen. For example, we may need to charge the user's credit card, add a record to our database that represents the purchase, and send a confirmation e-mail of the purchase. Perhaps we also need to perform some kind of validation as to whether the user is allowed to purchase podcasts. We could put all of this logic inside a controller method; however, this has several disadvantages. The first disadvantage is that our controller probably handles several other incoming HTTP actions, and including complicated logic in each controller method will soon bloat our controller and make it harder to read. Secondly, it is difficult to re-use the purchase podcast logic outside of the controller context. Thirdly, it is more difficult to unit-test the command as we must also generate a stub HTTP request and make a full request to the application to test the purchase podcast logic. Instead of putting this logic in the controller, we may choose to encapsulte it within a "command" object, such as a `PurchasePodcast` command. <a name="creating-commands"></a> ## Creating Commands The Artisan CLI can generate new command classes using the `make:command` command: php artisan make:command PurchasePodcast The newly generated class will be placed in the `app/Commands` directory. By default, the command contains two methods: the constructor and the `handle` method. Of course, the constructor allows you to pass any relevant objects to the command, while the `handle` method executes the command. For example: class PurchasePodcast extends Command implements SelfHandling { protected $user, $podcast; /** * Create a new command instance. * * @return void */ public function __construct(User $user, Podcast $pocast) { $this->user = $user; $this->podcast = $podcast; } /** * Execute the command. * * @return void */ public function handle() { // Handle the logic to purchase the podcast... event(new PodcastWasPurchased($this->user, $this->podcast)); } } The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example: /** * Execute the command. * * @return void */ public function handle(BillingGateway $billing) { // Handle the logic to purchase the podcast... } <a name="dispatching-commands"></a> ## Dispatching Commands So, once we have created a command, how do we dispatch it? Of course, we could call the `handle` method directly; however, dispatching the command through the Laravel "command bus" has several advantages which we will discuss later. If you glance at your application's base controller, you will see the `DispatchesCommands` trait. This trait allows us to call the `dispatch` method from any of our controllers. For example: public function purchasePodcast($podcastId) { $this->dispatch( new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId)) ); } The command bus will take care of executing the command and calling the IoC container to inject any needed dependencies into the `handle` method. You may add the `Illuminate\Foundation\Bus\DispatchesCommands` trait to any class you wish. If you would like to receive a command bus instance through the constructor of any of your classes, you may type-hint the `Illuminate\Contracts\Bus\Dispatcher` interface. Finally, you may also use the `Bus` facade to quickly dispatch commands: Bus::dispatch( new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId)) ); ### Mapping Command Properties From Requests It is very common to map HTTP request variables into commands. So, instead of forcing you to do this manually for each request, Laravel provides some helper methods to make it a cinch. Let's take a look at the `dispatchFrom` method available on the `DispatchesCommands` trait: $this->dispatchFrom('Command\Class\Name', $request); This method will examine the constructor of the command class it is given, and then extract variables from the HTTP request (or any other `ArrayAccess` object) to fill the needed constructor parameters of the command. So, if our command class accepts a `firstName` variable in its constructor, the command bus will attempt to pull the `firstName` parameter from the HTTP request. You may also pass an array as the third argument to the `dispatchFrom` method. This array will be used to fill any constructor parameters that are not available on the request: $this->dispatchFrom('Command\Class\Name', $request, [ 'firstName' => 'Taylor', ]); <a name="queued-commands"></a> ## Queued Commands The command bus is not just for synchronous jobs that run during the current request cycle, but also serves as the primary way to build queued jobs in Laravel. So, how do we instruct command bus to queue our job for background processing instead of running it synchronously? It's easy. Firstly, when generating a new command, just add the `--queued` flag to the command: php artisan make:command PurchasePodcast --queued As you will see, this adds a few more features to the command, namely the `Illuminate\Contracts\Queue\ShouldBeQueued` interface and the `SerializesModels` trait. These instruct the command bus to queue the command, as well as gracefully serialize and deserialize any Eloquent models your command stores as properties. If you would like to convert an existing command into a queued command, simply implement the `Illuminate\Contracts\Queue\ShouldBeQueued` interface on the class manually. It contains no methods, and merely serves as a "marker interface" for the dispatcher. Then, just write your command normally. When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that. For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues).
laravel-tr/docs
bus.md
Markdown
mit
6,517
54.228814
593
0.770753
false
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="robots" content="index, follow, all" /> <title>Soluble\FlexStore\Source\QueryableSourceInterface | Soluble API</title> <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css"> <link rel="stylesheet" type="text/css" href="../../../css/sami.css"> <script src="../../../js/jquery-1.11.1.min.js"></script> <script src="../../../js/bootstrap.min.js"></script> <script src="../../../js/typeahead.min.js"></script> <script src="../../../sami.js"></script> </head> <body id="class" data-name="class:Soluble_FlexStore_Source_QueryableSourceInterface" data-root-path="../../../"> <div id="content"> <div id="left-column"> <div id="control-panel"> <form id="search-form" action="../../../search.html" method="GET"> <span class="glyphicon glyphicon-search"></span> <input name="search" class="typeahead form-control" type="search" placeholder="Search"> </form> </div> <div id="api-tree"></div> </div> <div id="right-column"> <nav id="site-nav" class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../../../index.html">Soluble API</a> </div> <div class="collapse navbar-collapse" id="navbar-elements"> <ul class="nav navbar-nav"> <li><a href="../../../classes.html">Classes</a></li> <li><a href="../../../namespaces.html">Namespaces</a></li> <li><a href="../../../interfaces.html">Interfaces</a></li> <li><a href="../../../traits.html">Traits</a></li> <li><a href="../../../doc-index.html">Index</a></li> <li><a href="../../../search.html">Search</a></li> </ul> </div> </div> </nav> <div class="namespace-breadcrumbs"> <ol class="breadcrumb"> <li><span class="label label-default">interface</span></li> <li><a href="../../../Soluble.html">Soluble</a></li> <li><a href="../../../Soluble/FlexStore.html">FlexStore</a></li> <li><a href="../../../Soluble/FlexStore/Source.html">Source</a></li> <li>QueryableSourceInterface</li> </ol> </div> <div id="page-content"> <div class="page-header"> <h1>QueryableSourceInterface</h1> </div> <p> interface <strong>QueryableSourceInterface</strong></p> <h2>Methods</h2> <div class="container-fluid underlined"> <div class="row"> <div class="col-md-2 type"> string </div> <div class="col-md-8 type"> <a href="#method_getQueryString">getQueryString</a>() <p>Return underlying query (sql) string</p> </div> <div class="col-md-2"></div> </div> </div> <h2>Details</h2> <div id="method-details"> <div class="method-item"> <h3 id="method_getQueryString"> <div class="location">at line 10</div> <code> string <strong>getQueryString</strong>()</code> </h3> <div class="details"> <div class="method-description"> <p>Return underlying query (sql) string</p> </div> <div class="tags"> <h4>Return Value</h4> <table class="table table-condensed"> <tr> <td>string</td> <td> </td> </tr> </table> </div> </div> </div> </div> </div> <div id="footer"> Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>. </div> </div> </div> </body> </html>
belgattitude/solublecomponents
docs/sphinx/source/_static/API/SAMI/Soluble/FlexStore/Source/QueryableSourceInterface.html
HTML
mit
5,087
35.335714
117
0.437979
false
<?php class Symfony2EpamCi_Sniffs_Functions_DisallowedFunctionsSniff implements PHP_CodeSniffer_Sniff { private static $disallowedFunctionNames = array( 'var_dump', 'print_r', 'var_export', 'trigger_error', 'header', 'fastcgi_finish_request', 'xdebug_debug_zval', 'xdebug_debug_zval_stdout', 'xdebug_var_dump', 'xdebug_break', 'set_error_handler', 'set_exception_handler', ); /** * Returns an array of tokens this test wants to listen for. * * @return array */ public function register() { return array( T_STRING, ); } /** * Processes this test, when one of its tokens is encountered. * * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. * @param int $stackPtr The position of the current token in * the stack passed in $tokens. * * @return void */ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); $content = $tokens[$stackPtr]['content']; if (in_array(strtolower($content), self::$disallowedFunctionNames)) { //Checking previous token as it could be a static method or object method $previousTokenPtr = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $stackPtr - 1, null, true); if (!is_null($previousTokenPtr)) { switch($tokens[$previousTokenPtr]['code']) { case T_OBJECT_OPERATOR: case T_DOUBLE_COLON: return; } } $error = 'Disallowed function "%s" was called'; $data = array($content); $phpcsFile->addError($error, $stackPtr, 'DisallowedFunctionCalled', $data); } } }
epam-php-solutions/EpamCiBundle
Resources/configs/phpcs/Standards/Symfony2EpamCi/Sniffs/Functions/DisallowedFunctionsSniff.php
PHP
mit
1,954
31.032787
122
0.546571
false
using System; using System.Globalization; using System.IO; using System.Windows.Data; namespace MailUI.Converters { [ValueConversion(typeof(DirectoryInfo), typeof(FileInfo[]))] public class FilesInDirectoryConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return null; } if (value is DirectoryInfo) { return ((DirectoryInfo) value).GetFiles(); } return null; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }
ALEX-ANV/GSMail
MailUI/Converters/FilesInDirectoryConverter.cs
C#
mit
795
25.433333
103
0.590164
false
#region Lock Object against files #region Initial File Creation $File = 'C:\users\proxb\desktop\test.log' '1,2,3,4' | Out-File $File #endregion Initial File Creation #region Take lock and attempt to update file in runspace $LockTaken = $null [System.Threading.Monitor]::TryEnter($File, [ref]$LockTaken) If ($LockTaken) { [powershell]::Create().AddScript({ Param($File,$RSHost) $LockTaken = $Null [System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken) If ($LockTaken) { '5,6,7,8' | Out-File $File -Append } Else { $RSHost.ui.WriteWarningLine("[RUNSPACE1] Unable to take lock and update file!") } }).AddArgument($File).AddArgument($Host).Invoke() [System.Threading.Monitor]::Exit($File) } #endregion Take lock and attempt to update file in runspace #region Take lock in Runspace and update file [powershell]::Create().AddScript({ Param($File,$RSHost) $LockTaken = $Null [System.Threading.Monitor]::TryEnter($File,[ref]$LockTaken) If ($LockTaken) { '9,10,11,12' | Out-File $File -Append } Else { $RSHost.ui.WriteWarningLine("[RUNSPACE2] Unable to take lock and update file!") } }).AddArgument($File).AddArgument($Host).Invoke() $LockTaken = $null [System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken) If ($LockTaken) { '13,14,15,16' | Out-File $File -Append } Else { Write-Warning "[HOST] Unable to take lock and update file!" } #endregion Take lock in Runspace and update file #endregion Lock Object against files
proxb/Presentations
Tampa - A Look at PowerShell Runspaces/3_3_3_RunSpacesDemo_TryLockLogFile.ps1
PowerShell
mit
1,578
34.044444
99
0.665609
false
<?php namespace GS\UsuarioBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Lecturaconproposito * * @ORM\Table(name="lecturaconproposito", indexes={@ORM\Index(name="bibliografia_lecturaConProposito_idx", columns={"bibliografia"})}) * @ORM\Entity */ class Lecturaconproposito { /** * @var string * * @ORM\Column(name="idlecturaConProposito", type="string", length=10, nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $idlecturaconproposito; /** * @var string * * @ORM\Column(name="propositoGeneral", type="text", nullable=false) */ private $propositogeneral; /** * @var string * * @ORM\Column(name="tituloSubcapitulos", type="text", nullable=true) */ private $titulosubcapitulos; /** * @var boolean * * @ORM\Column(name="resumen", type="boolean", nullable=false) */ private $resumen; /** * @var boolean * * @ORM\Column(name="preguntasFinalCapitulo", type="boolean", nullable=false) */ private $preguntasfinalcapitulo; /** * @var boolean * * @ORM\Column(name="glosario", type="boolean", nullable=false) */ private $glosario; /** * @var string * * @ORM\Column(name="secciones", type="text", nullable=true) */ private $secciones; /** * @var string * * @ORM\Column(name="descripcionIlustraciones", type="text", nullable=true) */ private $descripcionilustraciones; /** * @var string * * @ORM\Column(name="resumenLectura", type="text", nullable=true) */ private $resumenlectura; /** * @var string * * @ORM\Column(name="lecturaProposito", type="text", nullable=true) */ private $lecturaproposito; /** * @var string * * @ORM\Column(name="resumenSeccion", type="text", nullable=true) */ private $resumenseccion; /** * @var string * * @ORM\Column(name="preguntas", type="text", nullable=true) */ private $preguntas; /** * @var string * * @ORM\Column(name="recomendaciones", type="text", nullable=true) */ private $recomendaciones; /** * @var \DateTime * * @ORM\Column(name="fechaRegistro", type="datetime", nullable=false) */ private $fecharegistro; /** * @var \Bibliografia * * @ORM\ManyToOne(targetEntity="Bibliografia") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="bibliografia", referencedColumnName="idbibliografia") * }) */ private $bibliografia; /** * Get idlecturaconproposito * * @return string */ public function getIdlecturaconproposito() { return $this->idlecturaconproposito; } /** * Set propositogeneral * * @param string $propositogeneral * @return Lecturaconproposito */ public function setPropositogeneral($propositogeneral) { $this->propositogeneral = $propositogeneral; return $this; } /** * Get propositogeneral * * @return string */ public function getPropositogeneral() { return $this->propositogeneral; } /** * Set titulosubcapitulos * * @param string $titulosubcapitulos * @return Lecturaconproposito */ public function setTitulosubcapitulos($titulosubcapitulos) { $this->titulosubcapitulos = $titulosubcapitulos; return $this; } /** * Get titulosubcapitulos * * @return string */ public function getTitulosubcapitulos() { return $this->titulosubcapitulos; } /** * Set resumen * * @param boolean $resumen * @return Lecturaconproposito */ public function setResumen($resumen) { $this->resumen = $resumen; return $this; } /** * Get resumen * * @return boolean */ public function getResumen() { return $this->resumen; } /** * Set preguntasfinalcapitulo * * @param boolean $preguntasfinalcapitulo * @return Lecturaconproposito */ public function setPreguntasfinalcapitulo($preguntasfinalcapitulo) { $this->preguntasfinalcapitulo = $preguntasfinalcapitulo; return $this; } /** * Get preguntasfinalcapitulo * * @return boolean */ public function getPreguntasfinalcapitulo() { return $this->preguntasfinalcapitulo; } /** * Set glosario * * @param boolean $glosario * @return Lecturaconproposito */ public function setGlosario($glosario) { $this->glosario = $glosario; return $this; } /** * Get glosario * * @return boolean */ public function getGlosario() { return $this->glosario; } /** * Set secciones * * @param string $secciones * @return Lecturaconproposito */ public function setSecciones($secciones) { $this->secciones = $secciones; return $this; } /** * Get secciones * * @return string */ public function getSecciones() { return $this->secciones; } /** * Set descripcionilustraciones * * @param string $descripcionilustraciones * @return Lecturaconproposito */ public function setDescripcionilustraciones($descripcionilustraciones) { $this->descripcionilustraciones = $descripcionilustraciones; return $this; } /** * Get descripcionilustraciones * * @return string */ public function getDescripcionilustraciones() { return $this->descripcionilustraciones; } /** * Set resumenlectura * * @param string $resumenlectura * @return Lecturaconproposito */ public function setResumenlectura($resumenlectura) { $this->resumenlectura = $resumenlectura; return $this; } /** * Get resumenlectura * * @return string */ public function getResumenlectura() { return $this->resumenlectura; } /** * Set lecturaproposito * * @param string $lecturaproposito * @return Lecturaconproposito */ public function setLecturaproposito($lecturaproposito) { $this->lecturaproposito = $lecturaproposito; return $this; } /** * Get lecturaproposito * * @return string */ public function getLecturaproposito() { return $this->lecturaproposito; } /** * Set resumenseccion * * @param string $resumenseccion * @return Lecturaconproposito */ public function setResumenseccion($resumenseccion) { $this->resumenseccion = $resumenseccion; return $this; } /** * Get resumenseccion * * @return string */ public function getResumenseccion() { return $this->resumenseccion; } /** * Set preguntas * * @param string $preguntas * @return Lecturaconproposito */ public function setPreguntas($preguntas) { $this->preguntas = $preguntas; return $this; } /** * Get preguntas * * @return string */ public function getPreguntas() { return $this->preguntas; } /** * Set recomendaciones * * @param string $recomendaciones * @return Lecturaconproposito */ public function setRecomendaciones($recomendaciones) { $this->recomendaciones = $recomendaciones; return $this; } /** * Get recomendaciones * * @return string */ public function getRecomendaciones() { return $this->recomendaciones; } /** * Set fecharegistro * * @param \DateTime $fecharegistro * @return Lecturaconproposito */ public function setFecharegistro($fecharegistro) { $this->fecharegistro = $fecharegistro; return $this; } /** * Get fecharegistro * * @return \DateTime */ public function getFecharegistro() { return $this->fecharegistro; } /** * Set bibliografia * * @param \GS\UsuarioBundle\Entity\Bibliografia $bibliografia * @return Lecturaconproposito */ public function setBibliografia(\GS\UsuarioBundle\Entity\Bibliografia $bibliografia = null) { $this->bibliografia = $bibliografia; return $this; } /** * Get bibliografia * * @return \GS\UsuarioBundle\Entity\Bibliografia */ public function getBibliografia() { return $this->bibliografia; } }
mdoviedor/WEBsimon
src/GS/UsuarioBundle/Entity/Lecturaconproposito.php
PHP
mit
8,898
18.427948
134
0.57069
false
import pytest @pytest.fixture def genetic_modification(testapp, lab, award): item = { 'award': award['@id'], 'lab': lab['@id'], 'modified_site_by_coordinates': { 'assembly': 'GRCh38', 'chromosome': '11', 'start': 20000, 'end': 21000 }, 'purpose': 'repression', 'category': 'deletion', 'method': 'CRISPR', 'zygosity': 'homozygous' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_RNAi(testapp, lab, award): item = { 'award': award['@id'], 'lab': lab['@id'], 'modified_site_by_coordinates': { 'assembly': 'GRCh38', 'chromosome': '11', 'start': 20000, 'end': 21000 }, 'purpose': 'repression', 'category': 'deletion', 'method': 'RNAi' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_source(testapp, lab, award, source, gene): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'introduced_gene': gene['@id'], 'purpose': 'expression', 'method': 'CRISPR', 'reagents': [ { 'source': source['@id'], 'identifier': 'sigma:ABC123' } ] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def crispr_deletion(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'CRISPR' } @pytest.fixture def crispr_deletion_1(testapp, lab, award, target): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'CRISPR', 'modified_site_by_target_id': target['@id'], 'guide_rna_sequences': ['ACCGGAGA'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def tale_deletion(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'deletion', 'purpose': 'repression', 'method': 'TALEN', 'zygosity': 'heterozygous' } @pytest.fixture def crispr_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'CRISPR' } @pytest.fixture def bombardment_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['bombardment'] } @pytest.fixture def recomb_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'site-specific recombination' } @pytest.fixture def transfection_tag(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'] } @pytest.fixture def crispri(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'CRISPR' } @pytest.fixture def rnai(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi' } @pytest.fixture def mutagen(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'mutagenesis', 'purpose': 'repression', 'method': 'mutagen treatment' } @pytest.fixture def tale_replacement(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'replacement', 'purpose': 'characterization', 'method': 'TALEN', 'zygosity': 'heterozygous' } @pytest.fixture def mpra(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transduction'] } @pytest.fixture def starr_seq(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'episome', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transient transfection'] } @pytest.fixture def introduced_elements(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'episome', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transient transfection'], 'introduced_elements': 'genomic DNA regions' } @pytest.fixture def crispr_tag_1(testapp, lab, award, ctcf): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'CRISPR', 'modified_site_by_gene_id': ctcf['@id'], 'introduced_tags': [{'name': 'mAID-mClover', 'location': 'C-terminal'}] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def mpra_1(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'synthesized DNA', 'modified_site_nonspecific': 'random' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def recomb_tag_1(testapp, lab, award, target, treatment_5, document): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'tagging', 'method': 'site-specific recombination', 'modified_site_by_target_id': target['@id'], 'modified_site_nonspecific': 'random', 'category': 'insertion', 'treatments': [treatment_5['@id']], 'documents': [document['@id']], 'introduced_tags': [{'name': 'eGFP', 'location': 'C-terminal'}] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def rnai_1(testapp, lab, award, source, target): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi', 'reagents': [{'source': source['@id'], 'identifier': 'addgene:12345'}], 'rnai_sequences': ['ATTACG'], 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_1(lab, award): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'modifiction_description': 'some description' } @pytest.fixture def genetic_modification_2(lab, award): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'modification_description': 'some description', 'modification_zygocity': 'homozygous', 'modification_purpose': 'tagging', 'modification_treatments': [], 'modification_genome_coordinates': [{ 'chromosome': '11', 'start': 5309435, 'end': 5309451 }] } @pytest.fixture def crispr_gm(lab, award, source): return { 'lab': lab['uuid'], 'award': award['uuid'], 'source': source['uuid'], 'guide_rna_sequences': [ "ACA", "GCG" ], 'insert_sequence': 'TCGA', 'aliases': ['encode:crispr_technique1'], '@type': ['Crispr', 'ModificationTechnique', 'Item'], '@id': '/crisprs/79c1ec08-c878-4419-8dba-66aa4eca156b/', 'uuid': '79c1ec08-c878-4419-8dba-66aa4eca156b' } @pytest.fixture def genetic_modification_5(lab, award, crispr_gm): return { 'modification_type': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', 'zygosity': 'homozygous', 'treatments': [], 'source': 'sigma', 'product_id': '12345', 'modification_techniques': [crispr_gm], 'modified_site': [{ 'assembly': 'GRCh38', 'chromosome': '11', 'start': 5309435, 'end': 5309451 }] } @pytest.fixture def genetic_modification_6(lab, award, crispr_gm, source): return { 'purpose': 'validation', 'category': 'deeltion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "placeholder_id", "source": source['uuid'] } ] } @pytest.fixture def genetic_modification_7_invalid_reagent(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "placeholder_id", "source": "/sources/sigma/" } ] } @pytest.fixture def genetic_modification_7_valid_reagent(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "ABC123", "source": "/sources/sigma/" } ] } @pytest.fixture def genetic_modification_7_addgene_source(testapp): item = { 'name': 'addgene', 'title': 'Addgene', 'status': 'released' } return testapp.post_json('/source', item).json['@graph'][0] @pytest.fixture def genetic_modification_7_multiple_matched_identifiers(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "12345", "source": "/sources/addgene/" } ] } @pytest.fixture def genetic_modification_7_multiple_reagents(lab, award, crispr_gm): return { 'purpose': 'characterization', 'category': 'deletion', 'award': award['uuid'], 'lab': lab['uuid'], 'description': 'blah blah description blah', "method": "CRISPR", "modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/", "reagents": [ { "identifier": "12345", "source": "/sources/addgene/", "url": "http://www.addgene.org" }, { "identifier": "67890", "source": "/sources/addgene/", "url": "http://www.addgene.org" } ] } @pytest.fixture def genetic_modification_8(lab, award): return { 'purpose': 'analysis', 'category': 'interference', 'award': award['uuid'], 'lab': lab['uuid'], "method": "CRISPR", } @pytest.fixture def construct_genetic_modification( testapp, lab, award, document, target_ATF5_genes, target_promoter): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'], 'introduced_tags': [{'name':'eGFP', 'location': 'C-terminal', 'promoter_used': target_promoter['@id']}], 'modified_site_by_target_id': target_ATF5_genes['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def construct_genetic_modification_N( testapp, lab, award, document, target): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'insertion', 'purpose': 'tagging', 'nucleic_acid_delivery_method': ['stable transfection'], 'introduced_tags': [{'name':'eGFP', 'location': 'N-terminal'}], 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def interference_genetic_modification( testapp, lab, award, document, target): item = { 'award': award['@id'], 'documents': [document['@id']], 'lab': lab['@id'], 'category': 'interference', 'purpose': 'repression', 'method': 'RNAi', 'modified_site_by_target_id': target['@id'] } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def crispr_knockout(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def recombination_knockout(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'repression', 'method': 'site-specific recombination', 'modified_site_by_coordinates': { "assembly": "GRCh38", "chromosome": "11", "start": 60000, "end": 62000 } } @pytest.fixture def characterization_insertion_transfection(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'nucleic_acid_delivery_method': ['stable transfection'], 'modified_site_nonspecific': 'random', 'introduced_elements': 'synthesized DNA' } @pytest.fixture def characterization_insertion_CRISPR(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'characterization', 'method': 'CRISPR', 'modified_site_nonspecific': 'random', 'introduced_elements': 'synthesized DNA' } @pytest.fixture def disruption_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPR cutting', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def activation_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPRa', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def binding_genetic_modification(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'CRISPR dCas', 'purpose': 'characterization', 'method': 'CRISPR' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def HR_knockout(lab, award, target): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'knockout', 'purpose': 'repression', 'method': 'homologous recombination', 'modified_site_by_target_id': target['@id'] } @pytest.fixture def CRISPR_introduction(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transient transfection'] } @pytest.fixture def genetic_modification_9(lab, award, human_donor_1): return { 'lab': lab['@id'], 'award': award['@id'], 'donor': human_donor_1['@id'], 'category': 'insertion', 'purpose': 'expression', 'method': 'transient transfection' } @pytest.fixture def transgene_insertion(testapp, lab, award, ctcf): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'in vivo enhancer characterization', 'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'], 'modified_site_by_gene_id': ctcf['@id'], 'introduced_sequence': 'ATCGTA' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def guides_transduction_GM(testapp, lab, award): item = { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'gRNAs and CRISPR machinery', 'MOI': 'high', 'guide_type': 'sgRNA' } return testapp.post_json('/genetic_modification', item).json['@graph'][0] @pytest.fixture def genetic_modification_10(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'insertion', 'purpose': 'expression', 'nucleic_acid_delivery_method': ['transduction'], 'introduced_elements': 'gRNAs and CRISPR machinery', } @pytest.fixture def genetic_modification_11(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'disruption', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def transgene_insertion_2(testapp, lab, award, ctcf): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'transgene insertion', 'purpose': 'in vivo enhancer characterization', 'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'], 'modified_site_by_gene_id': ctcf['@id'], 'introduced_sequence': 'ATCGTA' } @pytest.fixture def activation_genetic_modification_2(testapp, lab, award): return{ 'lab': lab['@id'], 'award': award['@id'], 'category': 'activation', 'purpose': 'characterization', 'method': 'CRISPR' } @pytest.fixture def binding_genetic_modification_2(testapp, lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'category': 'binding', 'purpose': 'characterization', 'method': 'CRISPR' }
ENCODE-DCC/encoded
src/encoded/tests/fixtures/schemas/genetic_modification.py
Python
mit
19,673
25.62111
112
0.533828
false
--- layout: page title: Schmitt Llc. Dinner date: 2016-05-24 author: Gerald Golden tags: weekly links, java status: published summary: Sed hendrerit, dui a ullamcorper dignissim. banner: images/banner/office-01.jpg booking: startDate: 03/17/2016 endDate: 03/22/2016 ctyhocn: YQLLEHX groupCode: SLD published: true --- Nullam in maximus sapien. Quisque congue imperdiet eros, fermentum pharetra lorem euismod non. Ut iaculis leo vitae massa maximus, ut malesuada nibh ornare. Suspendisse vehicula mollis nunc ut tincidunt. Mauris imperdiet mattis nunc, et tempor est euismod vel. Nulla et erat a lectus iaculis ultricies. Morbi vestibulum velit sem, vitae porttitor urna vestibulum a. Nullam mattis ut odio eget feugiat. Aliquam convallis lectus quis magna tempor, quis ultricies ligula faucibus. Fusce ut diam iaculis, varius felis nec, pulvinar turpis. Donec nisl ligula, ullamcorper vel risus eu, vehicula tristique tortor. Etiam feugiat ante in nunc lacinia bibendum nec ac arcu. Aenean in viverra dui, non tincidunt nibh. Nullam neque felis, laoreet quis ex non, pulvinar ultrices ex. Duis eu lacus vitae dolor euismod dapibus nec sit amet arcu. Curabitur id mauris sit amet mi feugiat imperdiet in eget risus. 1 Integer iaculis ante ut metus pellentesque viverra 1 Sed a nisi at urna condimentum dapibus a at eros 1 Mauris non arcu tincidunt, gravida nulla in, facilisis diam 1 Aliquam rhoncus ante vel fringilla interdum. In hac habitasse platea dictumst. Fusce in dictum orci. Nullam lacinia in mi nec accumsan. Mauris condimentum mi lorem, ac pharetra massa scelerisque scelerisque. Proin mattis euismod ipsum sit amet accumsan. Suspendisse ut ipsum non velit sollicitudin dictum. Etiam quis ligula vitae neque placerat ultrices ac et dolor. Vestibulum convallis orci vestibulum iaculis dapibus. Sed maximus mauris sed augue consequat, ac ornare orci egestas. Cras dictum, quam at sollicitudin tempor, urna lorem porta sapien, id faucibus mi libero a libero. Sed ut est ut lectus sollicitudin gravida sit amet vel orci. Sed consectetur tortor vel sollicitudin maximus. Suspendisse ut ornare quam. Suspendisse lobortis tortor id mi venenatis, in ornare libero lacinia. In diam libero, sollicitudin et consectetur et, vehicula ac velit. Sed in nulla orci.
KlishGroup/prose-pogs
pogs/Y/YQLLEHX/SLD/index.md
Markdown
mit
2,272
93.666667
896
0.807658
false
class SessionsController < ApplicationController def new end def create user = User.find_by(email: params[:session][:email]) if user && user.authenticate(params[:session][:password]) log_in(user) redirect_to user else render :new end end def destroy log_out redirect_to root_url end end
WuJoo/simple-blog
app/controllers/sessions_controller.rb
Ruby
mit
345
15.428571
61
0.646377
false
<!DOCTYPE html> <html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"/> </head> <body> <div id="wrapper"> <div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">实习教师分配 - <small>批量分配</small> <small class="pull-right"> <button type="button" class="btn btn-primary" id="page_back">返回</button> </small> </h1> </div> <!-- /.col-lg-12 --> </div> <!-- /.row --> <div class="row"> <div class="col-lg-12 col-md-12"> <form id="demoform" role="form"> <div class="form-group" id="valid_organize"> <label>班级</label> <select multiple="multiple" size="10" name="duallistbox_demo1[]" id="select_organize"> </select> <p class="text-danger hidden" id="organize_error_msg"></p> </div> <div class="form-group" id="valid_teacher"> <label>教职工</label> <select multiple="multiple" size="10" name="duallistbox_demo2[]" id="select_teacher"> </select> <p class="text-danger hidden" id="teacher_error_msg"></p> </div> <div class="form-group" id="valid_exclude_internship_release"> <label>排除以下实习中已分配学生</label> <select multiple="multiple" size="10" name="duallistbox_demo3[]" id="exclude_internship_release"> </select> <p class="text-danger hidden" id="exclude_internship_release_error_msg"></p> </div> <br/> <div class="text-center"> <button type="button" id="save" class="btn btn-default btn-block">确认分配</button> </div> </form> </div> </div> <!-- /.row --> <footer class="footer" th:include="footer::footer"> <p class="text-muted">&copy; Company 2016</p> </footer> <!-- /.footer --> <script id="organize-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{organize_value}}">{{organize_name}}</option> {{/each}} </script> <script id="teacher-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{teacher_value}}">{{teacher_name}}</option> {{/each}} </script> <script id="exclude-internship-release-template" type="text/x-handlebars-template"> {{#each listResult}} <option value="{{internshipReleaseId}}">{{internship_title}}</option> {{/each}} </script> <script th:inline="javascript"> /*页面参数*/ var init_page_param = { 'internshipReleaseId': /*[[${internshipReleaseId}]]*/ '' }; </script> <input type="hidden" class="dy_script" value="/js/internship/distribution/internship_batch_distribution.js"/> </div> <!-- /#page-wrapper --> </div> <!-- /#wrapper --> </body> </html>
zbeboy/ISY
src/main/resources/templates/web/internship/distribution/internship_batch_distribution.html
HTML
mit
3,478
39.058824
121
0.468273
false
package com.longluo.demo.widget.swipelistview; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; import android.support.v4.view.MotionEventCompat; import android.support.v4.view.ViewConfigurationCompat; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.widget.ListAdapter; import android.widget.ListView; import com.longluo.demo.R; import java.util.List; /** * ListView subclass that provides the swipe functionality */ public class SwipeListView extends ListView { /** * log tag */ public final static String TAG = "SwipeListView"; /** * whether debug */ public final static boolean DEBUG = false; /** * Used when user want change swipe list mode on some rows */ public final static int SWIPE_MODE_DEFAULT = -1; /** * Disables all swipes */ public final static int SWIPE_MODE_NONE = 0; /** * Enables both left and right swipe */ public final static int SWIPE_MODE_BOTH = 1; /** * Enables right swipe */ public final static int SWIPE_MODE_RIGHT = 2; /** * Enables left swipe */ public final static int SWIPE_MODE_LEFT = 3; /** * Binds the swipe gesture to reveal a view behind the row (Drawer style) */ public final static int SWIPE_ACTION_REVEAL = 0; /** * Dismisses the cell when swiped over */ public final static int SWIPE_ACTION_DISMISS = 1; /** * Marks the cell as checked when swiped and release */ public final static int SWIPE_ACTION_CHOICE = 2; /** * No action when swiped */ public final static int SWIPE_ACTION_NONE = 3; /** * Default ids for front view */ public final static String SWIPE_DEFAULT_FRONT_VIEW = "swipelist_frontview"; /** * Default id for back view */ public final static String SWIPE_DEFAULT_BACK_VIEW = "swipelist_backview"; /** * Indicates no movement */ private final static int TOUCH_STATE_REST = 0; /** * State scrolling x position */ private final static int TOUCH_STATE_SCROLLING_X = 1; /** * State scrolling y position */ private final static int TOUCH_STATE_SCROLLING_Y = 2; private int touchState = TOUCH_STATE_REST; private float lastMotionX; private float lastMotionY; private int touchSlop; int swipeFrontView = 0; int swipeBackView = 0; /** * Internal listener for common swipe events */ private SwipeListViewListener swipeListViewListener; /** * Internal touch listener */ private SwipeListViewTouchListener touchListener; /** * If you create a View programmatically you need send back and front identifier * * @param context Context * @param swipeBackView Back Identifier * @param swipeFrontView Front Identifier */ public SwipeListView(Context context, int swipeBackView, int swipeFrontView) { super(context); this.swipeFrontView = swipeFrontView; this.swipeBackView = swipeBackView; init(null); } /** * @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet) */ public SwipeListView(Context context, AttributeSet attrs) { super(context, attrs); init(attrs); } /** * @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet, int) */ public SwipeListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); init(attrs); } /** * Init ListView * * @param attrs AttributeSet */ private void init(AttributeSet attrs) { int swipeMode = SWIPE_MODE_BOTH; boolean swipeOpenOnLongPress = true; boolean swipeCloseAllItemsWhenMoveList = true; long swipeAnimationTime = 0; float swipeOffsetLeft = 0; float swipeOffsetRight = 0; int swipeDrawableChecked = 0; int swipeDrawableUnchecked = 0; int swipeActionLeft = SWIPE_ACTION_REVEAL; int swipeActionRight = SWIPE_ACTION_REVEAL; if (attrs != null) { TypedArray styled = getContext().obtainStyledAttributes(attrs, R.styleable.SwipeListView); swipeMode = styled.getInt(R.styleable.SwipeListView_swipeMode, SWIPE_MODE_BOTH); swipeActionLeft = styled.getInt(R.styleable.SwipeListView_swipeActionLeft, SWIPE_ACTION_REVEAL); swipeActionRight = styled.getInt(R.styleable.SwipeListView_swipeActionRight, SWIPE_ACTION_REVEAL); swipeOffsetLeft = styled.getDimension(R.styleable.SwipeListView_swipeOffsetLeft, 0); swipeOffsetRight = styled.getDimension(R.styleable.SwipeListView_swipeOffsetRight, 0); swipeOpenOnLongPress = styled.getBoolean(R.styleable.SwipeListView_swipeOpenOnLongPress, true); swipeAnimationTime = styled.getInteger(R.styleable.SwipeListView_swipeAnimationTime, 0); swipeCloseAllItemsWhenMoveList = styled.getBoolean(R.styleable.SwipeListView_swipeCloseAllItemsWhenMoveList, true); swipeDrawableChecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableChecked, 0); swipeDrawableUnchecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableUnchecked, 0); swipeFrontView = styled.getResourceId(R.styleable.SwipeListView_swipeFrontView, 0); swipeBackView = styled.getResourceId(R.styleable.SwipeListView_swipeBackView, 0); styled.recycle(); } if (swipeFrontView == 0 || swipeBackView == 0) { swipeFrontView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_FRONT_VIEW, "id", getContext().getPackageName()); swipeBackView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_BACK_VIEW, "id", getContext().getPackageName()); if (swipeFrontView == 0 || swipeBackView == 0) { throw new RuntimeException(String.format("You forgot the attributes swipeFrontView or swipeBackView. You can add this attributes or use '%s' and '%s' identifiers", SWIPE_DEFAULT_FRONT_VIEW, SWIPE_DEFAULT_BACK_VIEW)); } } final ViewConfiguration configuration = ViewConfiguration.get(getContext()); touchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration); touchListener = new SwipeListViewTouchListener(this, swipeFrontView, swipeBackView); if (swipeAnimationTime > 0) { touchListener.setAnimationTime(swipeAnimationTime); } touchListener.setRightOffset(swipeOffsetRight); touchListener.setLeftOffset(swipeOffsetLeft); touchListener.setSwipeActionLeft(swipeActionLeft); touchListener.setSwipeActionRight(swipeActionRight); touchListener.setSwipeMode(swipeMode); touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList); touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress); touchListener.setSwipeDrawableChecked(swipeDrawableChecked); touchListener.setSwipeDrawableUnchecked(swipeDrawableUnchecked); setOnTouchListener(touchListener); setOnScrollListener(touchListener.makeScrollListener()); } /** * Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE * * @param convertView parent view * @param position position in list */ public void recycle(View convertView, int position) { touchListener.reloadChoiceStateInView(convertView.findViewById(swipeFrontView), position); touchListener.reloadSwipeStateInView(convertView.findViewById(swipeFrontView), position); // Clean pressed state (if dismiss is fire from a cell, to this cell, with a press drawable, in a swipelistview // when this cell will be recycle it will still have his pressed state. This ensure the pressed state is // cleaned. for (int j = 0; j < ((ViewGroup) convertView).getChildCount(); ++j) { View nextChild = ((ViewGroup) convertView).getChildAt(j); nextChild.setPressed(false); } } /** * Get if item is selected * * @param position position in list * @return */ public boolean isChecked(int position) { return touchListener.isChecked(position); } /** * Get positions selected * * @return */ public List<Integer> getPositionsSelected() { return touchListener.getPositionsSelected(); } /** * Count selected * * @return */ public int getCountSelected() { return touchListener.getCountSelected(); } /** * Unselected choice state in item */ public void unselectedChoiceStates() { touchListener.unselectedChoiceStates(); } /** * @see android.widget.ListView#setAdapter(android.widget.ListAdapter) */ @Override public void setAdapter(ListAdapter adapter) { super.setAdapter(adapter); touchListener.resetItems(); if (null != adapter) { adapter.registerDataSetObserver(new DataSetObserver() { @Override public void onChanged() { super.onChanged(); onListChanged(); touchListener.resetItems(); } }); } } /** * Dismiss item * * @param position Position that you want open */ public void dismiss(int position) { int height = touchListener.dismiss(position); if (height > 0) { touchListener.handlerPendingDismisses(height); } else { int[] dismissPositions = new int[1]; dismissPositions[0] = position; onDismiss(dismissPositions); touchListener.resetPendingDismisses(); } } /** * Dismiss items selected */ public void dismissSelected() { List<Integer> list = touchListener.getPositionsSelected(); int[] dismissPositions = new int[list.size()]; int height = 0; for (int i = 0; i < list.size(); i++) { int position = list.get(i); dismissPositions[i] = position; int auxHeight = touchListener.dismiss(position); if (auxHeight > 0) { height = auxHeight; } } if (height > 0) { touchListener.handlerPendingDismisses(height); } else { onDismiss(dismissPositions); touchListener.resetPendingDismisses(); } touchListener.returnOldActions(); } /** * Open ListView's item * * @param position Position that you want open */ public void openAnimate(int position) { touchListener.openAnimate(position); } /** * Close ListView's item * * @param position Position that you want open */ public void closeAnimate(int position) { touchListener.closeAnimate(position); } /** * Notifies onDismiss * * @param reverseSortedPositions All dismissed positions */ protected void onDismiss(int[] reverseSortedPositions) { if (swipeListViewListener != null) { swipeListViewListener.onDismiss(reverseSortedPositions); } } /** * Start open item * * @param position list item * @param action current action * @param right to right */ protected void onStartOpen(int position, int action, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartOpen(position, action, right); } } /** * Start close item * * @param position list item * @param right */ protected void onStartClose(int position, boolean right) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onStartClose(position, right); } } /** * Notifies onClickFrontView * * @param position item clicked */ protected void onClickFrontView(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClickFrontView(position); } } /** * Notifies onClickBackView * * @param position back item clicked */ protected void onClickBackView(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClickBackView(position); } } /** * Notifies onOpened * * @param position Item opened * @param toRight If should be opened toward the right */ protected void onOpened(int position, boolean toRight) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onOpened(position, toRight); } } /** * Notifies onClosed * * @param position Item closed * @param fromRight If open from right */ protected void onClosed(int position, boolean fromRight) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onClosed(position, fromRight); } } /** * Notifies onChoiceChanged * * @param position position that choice * @param selected if item is selected or not */ protected void onChoiceChanged(int position, boolean selected) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onChoiceChanged(position, selected); } } /** * User start choice items */ protected void onChoiceStarted() { if (swipeListViewListener != null) { swipeListViewListener.onChoiceStarted(); } } /** * User end choice items */ protected void onChoiceEnded() { if (swipeListViewListener != null) { swipeListViewListener.onChoiceEnded(); } } /** * User is in first item of list */ protected void onFirstListItem() { if (swipeListViewListener != null) { swipeListViewListener.onFirstListItem(); } } /** * User is in last item of list */ protected void onLastListItem() { if (swipeListViewListener != null) { swipeListViewListener.onLastListItem(); } } /** * Notifies onListChanged */ protected void onListChanged() { if (swipeListViewListener != null) { swipeListViewListener.onListChanged(); } } /** * Notifies onMove * * @param position Item moving * @param x Current position */ protected void onMove(int position, float x) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { swipeListViewListener.onMove(position, x); } } protected int changeSwipeMode(int position) { if (swipeListViewListener != null && position != ListView.INVALID_POSITION) { return swipeListViewListener.onChangeSwipeMode(position); } return SWIPE_MODE_DEFAULT; } /** * Sets the Listener * * @param swipeListViewListener Listener */ public void setSwipeListViewListener(SwipeListViewListener swipeListViewListener) { this.swipeListViewListener = swipeListViewListener; } /** * Resets scrolling */ public void resetScrolling() { touchState = TOUCH_STATE_REST; } /** * Set offset on right * * @param offsetRight Offset */ public void setOffsetRight(float offsetRight) { touchListener.setRightOffset(offsetRight); } /** * Set offset on left * * @param offsetLeft Offset */ public void setOffsetLeft(float offsetLeft) { touchListener.setLeftOffset(offsetLeft); } /** * Set if all items opened will be closed when the user moves the ListView * * @param swipeCloseAllItemsWhenMoveList */ public void setSwipeCloseAllItemsWhenMoveList(boolean swipeCloseAllItemsWhenMoveList) { touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList); } /** * Sets if the user can open an item with long pressing on cell * * @param swipeOpenOnLongPress */ public void setSwipeOpenOnLongPress(boolean swipeOpenOnLongPress) { touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress); } /** * Set swipe mode * * @param swipeMode */ public void setSwipeMode(int swipeMode) { touchListener.setSwipeMode(swipeMode); } /** * Return action on left * * @return Action */ public int getSwipeActionLeft() { return touchListener.getSwipeActionLeft(); } /** * Set action on left * * @param swipeActionLeft Action */ public void setSwipeActionLeft(int swipeActionLeft) { touchListener.setSwipeActionLeft(swipeActionLeft); } /** * Return action on right * * @return Action */ public int getSwipeActionRight() { return touchListener.getSwipeActionRight(); } /** * Set action on right * * @param swipeActionRight Action */ public void setSwipeActionRight(int swipeActionRight) { touchListener.setSwipeActionRight(swipeActionRight); } /** * Sets animation time when user drops cell * * @param animationTime milliseconds */ public void setAnimationTime(long animationTime) { touchListener.setAnimationTime(animationTime); } /** * @see android.widget.ListView#onInterceptTouchEvent(android.view.MotionEvent) */ @Override public boolean onInterceptTouchEvent(MotionEvent ev) { int action = MotionEventCompat.getActionMasked(ev); final float x = ev.getX(); final float y = ev.getY(); if (isEnabled() && touchListener.isSwipeEnabled()) { if (touchState == TOUCH_STATE_SCROLLING_X) { return touchListener.onTouch(this, ev); } switch (action) { case MotionEvent.ACTION_MOVE: checkInMoving(x, y); return touchState == TOUCH_STATE_SCROLLING_Y; case MotionEvent.ACTION_DOWN: super.onInterceptTouchEvent(ev); touchListener.onTouch(this, ev); touchState = TOUCH_STATE_REST; lastMotionX = x; lastMotionY = y; return false; case MotionEvent.ACTION_CANCEL: touchState = TOUCH_STATE_REST; break; case MotionEvent.ACTION_UP: touchListener.onTouch(this, ev); return touchState == TOUCH_STATE_SCROLLING_Y; default: break; } } return super.onInterceptTouchEvent(ev); } /** * Check if the user is moving the cell * * @param x Position X * @param y Position Y */ private void checkInMoving(float x, float y) { final int xDiff = (int) Math.abs(x - lastMotionX); final int yDiff = (int) Math.abs(y - lastMotionY); final int touchSlop = this.touchSlop; boolean xMoved = xDiff > touchSlop; boolean yMoved = yDiff > touchSlop; if (xMoved) { touchState = TOUCH_STATE_SCROLLING_X; lastMotionX = x; lastMotionY = y; } if (yMoved) { touchState = TOUCH_STATE_SCROLLING_Y; lastMotionX = x; lastMotionY = y; } } /** * Close all opened items */ public void closeOpenedItems() { touchListener.closeOpenedItems(); } }
longluo/AndroidDemo
app/src/main/java/com/longluo/demo/widget/swipelistview/SwipeListView.java
Java
mit
20,482
28.6411
232
0.622351
false
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"> <meta name=viewport content="width=device-width, initial-scale=1"> <title>Hisabo &#8211; Borker dot co</title> <meta name="description" content="A note about my involvement with Hisabo"> <meta name="keywords" content="Hisabo"> <link rel="canonical" href="http://borker.co/project-hisabo/"> <!-- Twitter Cards --> <meta name="twitter:title" content="Hisabo"> <meta name="twitter:description" content="A note about my involvement with Hisabo"> <meta name="twitter:site" content="@borker"> <meta name="twitter:creator" content="@borker"> <meta name="twitter:card" content="summary"> <meta name="twitter:image" content="http://borker.co/assets/img/logo-new.png"> <!-- Open Graph --> <meta property="og:locale" content="en_US"> <meta property="og:type" content="article"> <meta property="og:title" content="Hisabo"> <meta property="og:description" content="A note about my involvement with Hisabo"> <meta property="og:url" content="http://borker.co/project-hisabo/"> <meta property="og:site_name" content="Borker dot co"> <meta property="og:image" content="http://borker.co/assets/img/logo-new.png"> <!-- Handheld --> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Favicons --> <link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://borker.co/assets/img/favicon/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://borker.co/assets/img/favicon/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://borker.co/assets/img/favicon/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://borker.co/assets/img/favicon/apple-touch-icon-144x144.png"> <link rel="icon" type="image/png" href="http://borker.co/assets/img/favicon/favicon.png"> <link rel="shortcut icon" href="http://borker.co/assets/img/favicon/favicon.ico"> <!-- Feed --> <link rel="alternate" type="application/rss+xml" title="Borker dot co" href="http://borker.co/feed.xml" /> <!-- CSS --> <link rel="stylesheet" type="text/css" href="http://borker.co/assets/css/main.css"> <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','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-86377416-1', 'auto'); ga('send', 'pageview'); </script> </head> <body> <nav class="nav"> <ul class="list"> <li class="item"><a class="link" href="http://borker.co/" >Home</a></li> <li class="item"><a class="link" href="http://borker.co/projects" >Projects</a></li> <li class="item"><a class="link" href="http://borker.co/about" >About</a></li> <li class="item"><a class="link" href="http://borker.co/writing" >Writing</a></li> <li class="item"><a class="link" href="http://borker.co/thoughts" >Thoughts</a></li> <li class="item"><a class="link" href="http://borker.co/design" >Design</a></li> </ul> </nav> <div class="wrapper"> <div class="title"> <h1>Hisabo</h1> <h4>23 Jul 2015</h4> </div> <div class="article"> <h2 id="hisabo">Hisabo</h2> <p>I founded and ran <a href="http://www.hisabo.com">Hisabo Tea Company</a> for a few months as a side project.</p> <p>Through Hisabo, we sold hard to find or unique teas to a list of email subscribers (similar to Garagiste for wines).</p> <p>We sourced each tea through a network of connections in Japan, Taiwan, China and Nepal.</p> <p>I stopped working on Hisabo to focus exclusively on Shortlist.</p> </div> </div> <div class="footer"> Borker dot co © 2019 <a href="http://borker.co/feed.xml" target="_blank"><i class="fa fa-fw fa-feed"></i></a> </div> <script src="http://borker.co/assets/js/jquery-1.12.2.min.js"></script> <script src="http://borker.co/assets/js/jquery.goup.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $.goup({ trigger: 500, bottomOffset: 10, locationOffset: 20, containerRadius: 0, containerColor: '#fff', arrowColor: '#000', goupSpeed: 'normal' }); }); </script> <!-- Asynchronous Google Analytics snippet --> <script> var _gaq = _gaq || []; var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js'; _gaq.push(['_require', 'inpage_linkid', pluginUrl]); _gaq.push(['_setAccount', 'UA-86377416-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </body> </html>
borker-co/borker-co.github.io
_site/project-hisabo/index.html
HTML
mit
5,566
39.326087
133
0.626415
false
--- title: padding-line-between-statements - Rules layout: doc --- <!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. --> # Require or disallow padding lines between statements (padding-line-between-statements) (fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule. This rule requires or disallows blank lines between the given 2 kinds of statements. Properly blank lines help developers to understand the code. For example, the following configuration requires a blank line between a variable declaration and a `return` statement. ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "var", next: "return" } ]*/ function foo() { var a = 1; return a; } ``` ## Rule Details This rule does nothing if no configuration. A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "var", next: "return" }` is meaning "it requires one or more blank lines between a variable declaration and a `return` statement." You can supply any number of configurations. If an statement pair matches multiple configurations, the last matched configuration will be used. ```json { "padding-line-between-statements": [ "error", { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, { "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE }, ... ] } ``` - `LINEBREAK_TYPE` is one of the following. - `"any"` just ignores the statement pair. - `"never"` disallows blank lines. - `"always"` requires one or more blank lines. Note it does not count lines that comments exist as blank lines. - `STATEMENT_TYPE` is one of the following, or an array of the following. - `"*"` is wildcard. This matches any statements. - `"block"` is lonely blocks. - `"block-like"` is block like statements. This matches statements that the last token is the closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`. - `"break"` is `break` statements. - `"case"` is `case` labels. - `"cjs-export"` is `export` statements of CommonJS; e.g. `module.exports = 0`, `module.exports.foo = 1`, and `exports.foo = 2`. This is the special cases of assignment. - `"cjs-import"` is `import` statements of CommonJS; e.g. `const foo = require("foo")`. This is the special cases of variable declarations. - `"class"` is `class` declarations. - `"const"` is `const` variable declarations. - `"continue"` is `continue` statements. - `"debugger"` is `debugger` statements. - `"default"` is `default` labels. - `"directive"` is directive prologues. This matches directives; e.g. `"use strict"`. - `"do"` is `do-while` statements. This matches all statements that the first token is `do` keyword. - `"empty"` is empty statements. - `"export"` is `export` declarations. - `"expression"` is expression statements. - `"for"` is `for` loop families. This matches all statements that the first token is `for` keyword. - `"function"` is function declarations. - `"if"` is `if` statements. - `"import"` is `import` declarations. - `"let"` is `let` variable declarations. - `"multiline-block-like"` is block like statements. This is the same as `block-like` type, but only the block is multiline. - `"return"` is `return` statements. - `"switch"` is `switch` statements. - `"throw"` is `throw` statements. - `"try"` is `try` statements. - `"var"` is `var` variable declarations. - `"while"` is `while` loop statements. - `"with"` is `with` statements. ## Examples This configuration would require blank lines before all `return` statements, like the [newline-before-return] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "*", next: "return" } ]*/ function foo() { bar(); return; } ``` Examples of **correct** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "*", next: "return" } ]*/ function foo() { bar(); return; } function foo() { return; } ``` ---- This configuration would require blank lines after every sequence of variable declarations, like the [newline-after-var] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]} ]*/ function foo() { var a = 0; bar(); } function foo() { let a = 0; bar(); } function foo() { const a = 0; bar(); } ``` Examples of **correct** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]} ]*/ function foo() { var a = 0; var b = 0; bar(); } function foo() { let a = 0; const b = 0; bar(); } function foo() { const a = 0; const b = 0; bar(); } ``` ---- This configuration would require blank lines after all directive prologues, like the [lines-around-directive] rule. Examples of **incorrect** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" } ]*/ "use strict"; foo(); ``` Examples of **correct** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration: ```js /*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" } ]*/ "use strict"; "use asm"; foo(); ``` ## Compatibility - **JSCS:** [requirePaddingNewLineAfterVariableDeclaration] - **JSCS:** [requirePaddingNewLinesAfterBlocks] - **JSCS:** [disallowPaddingNewLinesAfterBlocks] - **JSCS:** [requirePaddingNewLinesAfterUseStrict] - **JSCS:** [disallowPaddingNewLinesAfterUseStrict] - **JSCS:** [requirePaddingNewLinesBeforeExport] - **JSCS:** [disallowPaddingNewLinesBeforeExport] - **JSCS:** [requirePaddingNewlinesBeforeKeywords] - **JSCS:** [disallowPaddingNewlinesBeforeKeywords] ## When Not To Use It If you don't want to notify warnings about linebreaks, then it's safe to disable this rule. [lines-around-directive]: http://eslint.org/docs/rules/lines-around-directive [newline-after-var]: http://eslint.org/docs/rules/newline-after-var [newline-before-return]: http://eslint.org/docs/rules/newline-before-return [requirePaddingNewLineAfterVariableDeclaration]: http://jscs.info/rule/requirePaddingNewLineAfterVariableDeclaration [requirePaddingNewLinesAfterBlocks]: http://jscs.info/rule/requirePaddingNewLinesAfterBlocks [disallowPaddingNewLinesAfterBlocks]: http://jscs.info/rule/disallowPaddingNewLinesAfterBlocks [requirePaddingNewLinesAfterUseStrict]: http://jscs.info/rule/requirePaddingNewLinesAfterUseStrict [disallowPaddingNewLinesAfterUseStrict]: http://jscs.info/rule/disallowPaddingNewLinesAfterUseStrict [requirePaddingNewLinesBeforeExport]: http://jscs.info/rule/requirePaddingNewLinesBeforeExport [disallowPaddingNewLinesBeforeExport]: http://jscs.info/rule/disallowPaddingNewLinesBeforeExport [requirePaddingNewlinesBeforeKeywords]: http://jscs.info/rule/requirePaddingNewlinesBeforeKeywords [disallowPaddingNewlinesBeforeKeywords]: http://jscs.info/rule/disallowPaddingNewlinesBeforeKeywords ## Version This rule was introduced in ESLint 4.0.0-beta.0. ## Resources * [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/padding-line-between-statements.js) * [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/padding-line-between-statements.md)
mockee/eslint.github.io
docs/4.0.0/rules/padding-line-between-statements.md
Markdown
mit
8,977
34.623016
258
0.674056
false
[![Demi.js](https://raw2.github.com/enytc/demi/master/logo.png)](http://demijs.enytc.com) # Demi.js Logger [![Build Status](https://secure.travis-ci.org/chrisenytc/demi-logger.png?branch=master)](http://travis-ci.org/chrisenytc/demi-logger) [![NPM version](https://badge-me.herokuapp.com/api/npm/demi-logger.png)](http://badges.enytc.com/for/npm/demi-logger) [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/chrisenytc/demi-logger/trend.png)](https://bitdeli.com/free "Bitdeli Badge") Demi.js middleware for advanced logging ## Getting Started Install the module with: `npm install demi-logger` ```javascript var logger = require('demi-logger'); //Express example.js app.configure(function() { app.use(express.logger(logger)); }); ``` ## Screenshort [![Demi.js](screenshort.png)](http://demijs.enytc.com) ## Contributing Please submit all issues and pull requests to the [chrisenytc/demi-logger](http://github.com/chrisenytc/demi-logger) repository! ## Support If you have any problem or suggestion please open an issue [here](https://github.com/chrisenytc/demi-logger/issues). ## License The MIT License Copyright (c) 2014 Christopher EnyTC 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.
chrisenytc/demi-logger
README.md
Markdown
mit
2,189
38.089286
401
0.773869
false
## Prerequisites [Node.js](http://nodejs.org/) >= 6 must be installed. ## Installation - Running `npm install` in the component's root directory will install everything you need for development. ## Demo Development Server - `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading. ## Running Tests - `npm test` will run the tests once. - `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`. - `npm run test:watch` will run the tests on every change. ## Building - `npm run build` will build the component for publishing to npm and also bundle the demo app. - `npm run clean` will delete built resources.
cpeele00/bigbrother
CONTRIBUTING.md
Markdown
mit
744
28.76
150
0.736559
false
<?php declare(strict_types=1); namespace DiContainerBenchmarks\Fixture\C; class FixtureC846 { public function __construct(FixtureC845 $dependency) { } }
kocsismate/php-di-container-benchmarks
src/Fixture/C/FixtureC846.php
PHP
mit
168
13
56
0.714286
false
var five = require("../lib/johnny-five.js"); var board = new five.Board(); board.on("ready", function() { var gyro = new five.Gyroscope({ pins: ["I0", "I1"], freq: 200, extent: 4 }); gyro.on("acceleration", function(data) { console.log(data.position); }); });
januszhou/pi
node_modules/johnny-five/eg/tinkerkit-imu-gyro-accel.js
JavaScript
mit
286
19.428571
44
0.58042
false
--- layout: null section-type: contact title: Contact --- ## Contact Nothing to say!
hxflove521/hxflove521.github.io
contact.html
HTML
mit
85
9.75
21
0.694118
false
// "horizontalaxis" : { // "id" : STRING, "type" : DATATYPE(number), "length" : RELLEN(1.0), "base" : POINT(-1,1), "anchor" : DOUBLE(-1), "position" : POINT(0,0), // "min" : DATAVALUEORAUTO(auto), "max" : DATAVALUEORAUTO(auto), "minposition" : RELPOS(-1.0), "maxposition" : RELPOS(1.0), "color" : COLOR(black), "linewidth" : INTEGER(1), // "tickmin" : INTEGER(-3), "tickmax" : INTEGER(3), "tickcolor" : COLOR(black), // "labels" : { // "format" : STRING, "start" : DATAVALUE(0), "angle" : DOUBLE(0), "position" : POINT, // "anchor" : POINT, "color" : COLOR(black), "spacing" : STRING, "densityfactor" : DOUBLE(1.0), // "label" : [ // { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE }, // { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE }, // ... // ] // } // "title" : { "base" : DOUBLE(0), "anchor" : POINT, "position" : POINT, "angle" : DOUBLE(0), "text" : "TITLETEXT", "font": STRING }, // "grid" : { "color" : COLOR(0xeeeeee), "visible" : BOOLEAN(false) }, // "pan" : { "allowed" : BOOLEAN(yes), "min" : DATAVALUE, "max" : DATAVALUE }, // "zoom" : { "allowed" : BOOLEAN(yes), "min" : DATAMEASURE, "max" : DATAMEASURE, "anchor" : DATAVALUE }, // "binding" : { "id" : STRING!, "min" : DATAVALUE!, "max" : DATAVALUE! } // "visible" : BOOLEAN(true) // } // these are needed so that their .parseJSON methods will be defined when called below: require('./labeler.js'); require('./axis_title.js'); require('./grid.js'); require('./pan.js'); require('./zoom.js'); var Axis = require('../../core/axis.js'), pF = require('../../util/parsingFunctions.js'), vF = require('../../util/validationFunctions.js'), uF = require('../../util/utilityFunctions.js'); var parseLabels = function (json, axis) { var spacings, labelers = axis.labelers(), Labeler = require('../../core/labeler.js'), DataValue = require('../../core/data_value.js'), i; spacings = []; if (json !== undefined) { if (json.spacing !== undefined) { spacings = vF.typeOf(json.spacing) === 'array' ? json.spacing : [ json.spacing ]; } } if (spacings.length > 0) { // If there was a spacing attr on the <labels> tag, create a new labeler for // each spacing present in it, using the other values from the <labels> tag for (i = 0; i < spacings.length; ++i) { labelers.add(Labeler.parseJSON(json, axis, undefined, spacings[i])); } } else if (json !== undefined && json.label !== undefined && json.label.length > 0) { // If there are <label> tags, parse the <labels> tag to get default values var defaults = Labeler.parseJSON(json, axis, undefined, null); // And loop over each <label> tag, creating labelers for each, splitting multiple // spacings on the same <label> tag into multiple labelers: json.label.forEach(function(e) { var spacing = []; if (e.spacing !== undefined) { spacing = vF.typeOf(e.spacing) === 'array' ? e.spacing : [ e.spacing ]; } spacing.forEach(function(s) { labelers.add( Labeler.parseJSON(e, axis, defaults, s) ); }); }); } else { // Otherwise create labelers using the default spacing, with the other values // from the <labels> tag var defaultValues = (uF.getDefaultValuesFromXSD()).horizontalaxis.labels; var defaultSpacings = axis.type() === DataValue.NUMBER ? defaultValues.defaultNumberSpacing : defaultValues.defaultDatetimeSpacing; for (i = 0; i < defaultSpacings.length; ++i) { labelers.add(Labeler.parseJSON(json, axis, undefined, defaultSpacings[i])); } } }; Axis.parseJSON = function (json, orientation, messageHandler, multigraph) { var DataValue = require('../../core/data_value.js'), Point = require('../../math/point.js'), RGBColor = require('../../math/rgb_color.js'), Displacement = require('../../math/displacement.js'), AxisTitle = require('../../core/axis_title.js'), Grid = require('../../core/grid.js'), Pan = require('../../core/pan.js'), Zoom = require('../../core/zoom.js'), AxisBinding = require('../../core/axis_binding.js'), axis = new Axis(orientation), parseAttribute = pF.parseAttribute, parseDisplacement = Displacement.parse, parseJSONPoint = function(p) { return new Point(p[0], p[1]); }, parseRGBColor = RGBColor.parse, attr, child, value; if (json) { parseAttribute(json.id, axis.id); parseAttribute(json.type, axis.type, DataValue.parseType); parseAttribute(json.length, axis.length, parseDisplacement); // // The following provides support for the deprecated "positionbase" axis attribute; // MUGL files should use the "base" attribute instead. When we're ready to remove // support for the deprecated attribute, delete this block of code: // (function () { var positionbase = json.positionbase; if (positionbase) { messageHandler.warning('Use of deprecated axis attribute "positionbase"; use "base" attribute instead'); if ((positionbase === "left") || (positionbase === "bottom")) { axis.base(new Point(-1, -1)); } else if (positionbase === "right") { axis.base(new Point(1, -1)); } else if (positionbase === "top") { axis.base(new Point(-1, 1)); } } }()); // // End of code to delete when removing support for deprecated "positionbase" // attribute. // attr = json.position; if (attr !== undefined) { if (vF.typeOf(attr) === 'array') { axis.position(parseJSONPoint(attr)); } else { // If position is not an array, and if it can be interpreted // as a number, construct the position point by interpreting that // number as an offset from the 0 location along the perpendicular // direction. if (vF.isNumberNotNaN(attr)) { if (orientation === Axis.HORIZONTAL) { axis.position(new Point(0, attr)); } else { axis.position(new Point(attr, 0)); } } else { throw new Error("axis position '"+attr+"' is of the wrong type; it should be a number or a point"); } } } // Note: we coerce the min and max values to strings here, because the "min" and "max" attrs // of the Axis object require strings. See the comments about these properties in src/core/axis.js // for a discussion of why this is the case. if ("min" in json) { axis.min(uF.coerceToString(json.min)); } if (axis.min() !== "auto") { axis.dataMin(DataValue.parse(axis.type(), axis.min())); } if ("max" in json) { axis.max(uF.coerceToString(json.max)); } if (axis.max() !== "auto") { axis.dataMax(DataValue.parse(axis.type(), axis.max())); } parseAttribute(json.pregap, axis.pregap); parseAttribute(json.postgap, axis.postgap); parseAttribute(json.anchor, axis.anchor); parseAttribute(json.base, axis.base, parseJSONPoint); parseAttribute(json.minposition, axis.minposition, parseDisplacement); parseAttribute(json.maxposition, axis.maxposition, parseDisplacement); parseAttribute(json.minoffset, axis.minoffset); parseAttribute(json.maxoffset, axis.maxoffset); parseAttribute(json.color, axis.color, parseRGBColor); parseAttribute(json.tickcolor, axis.tickcolor, parseRGBColor); parseAttribute(json.tickwidth, axis.tickwidth); parseAttribute(json.tickmin, axis.tickmin); parseAttribute(json.tickmax, axis.tickmax); parseAttribute(json.highlightstyle, axis.highlightstyle); parseAttribute(json.linewidth, axis.linewidth); if ("title" in json) { if (typeof(json.title) === 'boolean') { if (json.title) { axis.title(new AxisTitle(axis)); } else { axis.title(AxisTitle.parseJSON({}, axis)); } } else { axis.title(AxisTitle.parseJSON(json.title, axis)); } } else { axis.title(new AxisTitle(axis)); } if (json.grid) { axis.grid(Grid.parseJSON(json.grid)); } if (json.visible !== undefined) { axis.visible(json.visible); } if ("pan" in json) { axis.pan(Pan.parseJSON(json.pan, axis.type())); } if ("zoom" in json) { axis.zoom(Zoom.parseJSON(json.zoom, axis.type())); } if (json.labels) { parseLabels(json.labels, axis); } if (json.binding) { var bindingMinDataValue = DataValue.parse(axis.type(), json.binding.min), bindingMaxDataValue = DataValue.parse(axis.type(), json.binding.max); if (typeof(json.binding.id) !== "string") { throw new Error("invalid axis binding id: '" + json.binding.id + "'"); } if (! DataValue.isInstance(bindingMinDataValue)) { throw new Error("invalid axis binding min: '" + json.binding.min + "'"); } if (! DataValue.isInstance(bindingMaxDataValue)) { throw new Error("invalid axis binding max: '" + json.binding.max + "'"); } AxisBinding.findByIdOrCreateNew(json.binding.id).addAxis(axis, bindingMinDataValue, bindingMaxDataValue, multigraph); } } return axis; }; module.exports = Axis;
multigraph/js-multigraph
src/parser/json/axis.js
JavaScript
mit
10,515
43.180672
176
0.547408
false
namespace Todo.ViewModel { public sealed class NewTodoItem { public string Text { get; set; } } }
spicydog/Todo-app-sample
src/Todo/ViewModel/NewTodoItem.cs
C#
mit
120
16
40
0.610169
false
<?xml version="1.0" encoding="utf-8"?> <!-- This comment will force IE7 to go into quirks mode. --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link> <script type="text/javascript" src="../../JS/Common.js"></script> <title>Zips.Zip&lt;T, U, V&gt; Method</title> </head> <body> <div id="Header"> <div id="ProjectTitle">Documentation Project</div> <div id="PageTitle">Zips.Zip&lt;T, U, V&gt; Method</div> <div id="HeaderShortcuts"> <a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Overload List</a>&nbsp; </div> <div class="DarkLine"></div> <div class="LightLine"></div> <div id="HeaderToolbar"> <img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" /> <span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span> </div> </div> <div id="Contents"> <a id="ContentsAnchor">&nbsp;</a> Zip a paired stream with a third stream. <div id="ItemLocation"> <b>Declaring type:</b> <a href="../../Contents/2/287.html">Zips</a><br /> <b>Namespace:</b> <a href="../../Contents/1/212.html">Sasa.Linq</a><br /> <b>Assembly:</b> <a href="../../Contents/1/1.html">Sasa</a> </div> <div id="SectionHeader0" class="SectionHeader"> <img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" /> <span class="SectionHeader"> <span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);"> Overload List </span> </span> </div> <div id="SectionContainerDiv0" class="SectionContainer"> <table class="MembersTable"> <col width="7%" /> <col width="38%" /> <col width="55%" /> <tr> <th>&nbsp;</th> <th>Name</th> <th>Description</th> </tr> <tr> <td class="IconColumn"> <img src="../../GFX/PublicMethod.gif" alt="Public Method" />&nbsp;<img src="../../GFX/Static.gif" alt="Static" /></td> <td><a href="../../Contents/2/316.html">Zips.Zip&lt;T, U, V&gt; (IEnumerable&lt;T&gt;, IEnumerable&lt;U&gt;, IEnumerable&lt;V&gt;)</a></td> <td>Zip the elements of three streams.</td> </tr> <tr> <td class="IconColumn"> <img src="../../GFX/PublicMethod.gif" alt="Public Method" />&nbsp;<img src="../../GFX/Static.gif" alt="Static" /></td> <td><a href="../../Contents/2/317.html">Zips.Zip&lt;T, U, V&gt; (IEnumerable&lt;Pair&lt;T, U&gt;&gt;, IEnumerable&lt;V&gt;)</a></td> <td>Zip a paired stream with a third stream.</td> </tr> </table> <div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div> </div> <div id="Footer"> <span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>. </div> </body> </html>
fschwiet/ManyConsole
lib/Sasa-v0.9.3-docs/Contents/2/306.html
HTML
mit
3,096
40.410959
162
0.656977
false
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); $lang = array( 'img_module_name' => 'Img', 'img_module_description' => 'PHPImageWorkshop for EE', 'module_home' => 'Img Home', // Start inserting custom language keys/values here ); /* End of file lang.img.php */ /* Location: /system/expressionengine/third_party/img/language/english/lang.img.php */
bjornbjorn/img.ee_addon
system/expressionengine/third_party/img/language/english/lang.img.php
PHP
mit
392
22.058824
86
0.670918
false
module WoopleTheme class Configuration attr_accessor :profile_helper, :menu_helper, :impersonation_banner_helper, :layout_javascript def profile_helper @profile_helper || :profile_helper end def menu_helper @menu_helper || :menu_helper end def impersonation_banner_helper @impersonation_banner_helper || :impersonation_banner_helper end end class << self attr_accessor :configuration end def self.configure self.configuration ||= Configuration.new yield(configuration) end end
woople/woople-theme
lib/woople-theme/configuration.rb
Ruby
mit
553
19.481481
97
0.698011
false
export * from './about'; export * from './no-content'; export * from './home';
pschulzk/angular-webpack-starter
src/app/views/index.ts
TypeScript
mit
78
25.333333
29
0.615385
false
<!--conf <sample> <product version="2.6" edition="std"/> <modifications> <modified date="100609"/> </modifications> </sample> --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Series</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/> <script src="../../../codebase/dhtmlx.js"></script> <script src="../common/testdata.js"></script> </head> <body> <div id="chart1" style="width:900px;height:250px;border:1px solid #A4BED4;"></div> <script> var barChart1 = new dhtmlXChart({ view:"bar", container:"chart1", value:"#sales#", color: "#58dccd", gradient:"rising", tooltip:{ template:"#sales#" }, width:60, tooltip:{ template:"#sales#" }, xAxis:{ template:"'#year#" }, yAxis:{ start:0, step:10, end:100 }, legend:{ values:[{text:"Type A",color:"#58dccd"},{text:"Type B",color:"#a7ee70"},{text:"Type C",color:"#36abee"}], valign:"middle", align:"right", width:90, layout:"y" } }); barChart1.addSeries({ value:"#sales2#", color:"#a7ee70", tooltip:{ template:"#sales2#" } }); barChart1.addSeries({ value:"#sales3#", color:"#36abee", tooltip:{ template:"#sales3#" } }); barChart1.parse(multiple_dataset,"json"); </script> </body> </html>
blale-zhang/codegen
WebContent/component/dhtmlxSuite_v403_std/samples/dhtmlxChart/06_bar_chart/06_series.html
HTML
mit
1,793
22.630137
121
0.490798
false
version https://git-lfs.github.com/spec/v1 oid sha256:d5b913ad3304fa791ac6c6064dcecf37b157290bb0e8292e76aee05bee6dc425 size 3752
yogeshsaroya/new-cdnjs
ajax/libs/reqwest/0.2.2/reqwest.min.js
JavaScript
mit
129
42
75
0.883721
false
--- layout: player radio: gardarica date: 2017-04-06T05:06:27Z ---
guskant/accessible
_radios/gardarica.md
Markdown
mit
68
12.6
26
0.676471
false
/** * Filtering sensitive information */ const _ = require('lodash'); /** * reset option * @param {string|object|array} opt filter option * @param {array} filterKeys filter keys * @param {string|function} replaceChat replace chat or function * @param {boolean} recursion whether recursive , true of false */ const setOption = (option) => { let filterKeys = ['password', 'token', 'authorization']; let replaceChat = '*'; let recursion = false; if (option !== undefined) { if (typeof option === 'string') { filterKeys = [option]; } else if (option instanceof Array && option.length > 0) { filterKeys = option.filter(item => typeof item === 'string'); } else if (_.isPlainObject(option)) { const { filterKeys: fks, recursion: rcs, replaceChat: rpc } = option; recursion = !!rcs; if (fks instanceof Array && fks.length > 0) { filterKeys = fks.filter(item => typeof item === 'string'); } if (typeof rpc === 'string') { replaceChat = rpc; } else { replaceChat = '*'; } } else { console.error(new Error(`option.filter do not support ${typeof option} type !`)); } } return { filterKeys, recursion, replaceChat }; }; /** * replace by replaceChat * @param {string} param content to replace * @param {string|function} replaceChat replace chat or function */ const replace = (param, replaceChat) => { if (typeof replaceChat === 'function') { return replaceChat(param); } return param.replace(/\S/g, '*'); }; /** * filter log message by option * @param {*} message logger message * @param {object} opt filter option * @param {boolean} hit hit the fileterkeys , default false */ const filter = (message, opt, hit = false) => { const result = message; const { filterKeys, replaceChat } = opt; if (_.isPlainObject(result)) { Object.keys(result).forEach((key) => { const dHit = hit || filterKeys.indexOf(key) > -1; result[key] = filter(result[key], opt, dHit); // if (recursion) { // result[key] = filter(param, opt, true); // } else { // result[key] = replaceChat; // // replace the value of hit key // // eslint-disable-next-line no-return-assign // Object.keys(param).forEach(pk => (filterKeys.indexOf(pk) !== -1 ? result[key] = replaceChat : '')); // } }); return result; } else if (typeof result === 'number') { return replace(result.toString(), replaceChat); } else if (result instanceof Array && result.length > 0) { return result.map(param => filter(param, opt, hit)); } return replace(result, replaceChat); }; /** * filter log message by option do not recursion * @param {*} message logger message * @param {object} opt filter option * @param {array} opt.filterKeys filter keys * @param {string} opt.replaceChat replace chat or function */ const filterNoRecursion = (message, opt) => { const result = message; const { filterKeys, replaceChat } = opt; if (_.isPlainObject(result)) { Object.keys(result).forEach((key) => { if (filterKeys.indexOf(key) === -1) { result[key] = filterNoRecursion(result[key], opt); } else { result[key] = replaceChat; } }); return result; } else if (typeof result === 'number') { return result; } else if (result instanceof Array && result.length > 0) { return result; } return result; }; /** * filter sensitive information * @param {object} message log message * @param {*} option filter option */ const filteringSensitiveInfo = (message, option = false) => { if (!option) { return message; } if (typeof option === 'function') { return option(message); } return filterNoRecursion(message, setOption(option)); }; module.exports = { filteringSensitiveInfo, setOption, };
baijijs/logger
lib/filter.js
JavaScript
mit
3,846
28.813953
110
0.620385
false
from slm_lab.env.vec_env import make_gym_venv import numpy as np import pytest @pytest.mark.parametrize('name,state_shape,reward_scale', [ ('PongNoFrameskip-v4', (1, 84, 84), 'sign'), ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_venv_nostack(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = None frame_op_len = None venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) assert state.shape == (num_envs,) + state_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.parametrize('name,state_shape, reward_scale', [ ('PongNoFrameskip-v4', (1, 84, 84), 'sign'), ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_concat(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = 'concat' # used for image, or for concat vector frame_op_len = 4 venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) stack_shape = (num_envs, frame_op_len * state_shape[0],) + state_shape[1:] assert state.shape == stack_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.skip(reason='Not implemented yet') @pytest.mark.parametrize('name,state_shape,reward_scale', [ ('LunarLander-v2', (8,), None), ('CartPole-v0', (4,), None), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_stack(name, num_envs, state_shape, reward_scale): seed = 0 frame_op = 'stack' # used for rnn frame_op_len = 4 venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, reward_scale=reward_scale) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) stack_shape = (num_envs, frame_op_len,) + state_shape assert state.shape == stack_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close() @pytest.mark.parametrize('name,state_shape,image_downsize', [ ('PongNoFrameskip-v4', (1, 84, 84), (84, 84)), ('PongNoFrameskip-v4', (1, 64, 64), (64, 64)), ]) @pytest.mark.parametrize('num_envs', (1, 4)) def test_make_gym_venv_downsize(name, num_envs, state_shape, image_downsize): seed = 0 frame_op = None frame_op_len = None venv = make_gym_venv(name, num_envs, seed, frame_op=frame_op, frame_op_len=frame_op_len, image_downsize=image_downsize) venv.reset() for i in range(5): state, reward, done, info = venv.step([venv.action_space.sample()] * num_envs) assert isinstance(state, np.ndarray) assert state.shape == (num_envs,) + state_shape assert isinstance(reward, np.ndarray) assert reward.shape == (num_envs,) assert isinstance(done, np.ndarray) assert done.shape == (num_envs,) assert len(info) == num_envs venv.close()
kengz/Unity-Lab
test/env/test_vec_env.py
Python
mit
3,861
36.125
123
0.64776
false
package com.github.pineasaurusrex.inference_engine; import java.util.HashMap; /** * Partially or fully assigned model * A model represents a possible representation of the propositional symbol states in the KB */ public class Model { private HashMap<PropositionalSymbol, Boolean> symbolValues = new HashMap<>(); public boolean holdsTrue(Sentence sentence) { if (sentence.isPropositionSymbol()) { return symbolValues.get(sentence); } else { switch(sentence.getConnective()) { case NOT: return !holdsTrue(sentence.getOperand(0)); case AND: return holdsTrue(sentence.getOperand(0)) && holdsTrue(sentence.getOperand(1)); case OR: return holdsTrue(sentence.getOperand(0)) || holdsTrue(sentence.getOperand(1)); case IMPLICATION: return !holdsTrue(sentence.getOperand(0)) || holdsTrue(sentence.getOperand(1)); case BICONDITIONAL: return holdsTrue(sentence.getOperand(0)) == holdsTrue(sentence.getOperand(1)); } } return false; } public boolean holdsTrue(KnowledgeBase kb) { return kb.getSentences().parallelStream() .map(this::holdsTrue) .allMatch(Boolean::booleanValue); } /** * Returns a new model, with the union of the results of the old model and the result passed in * @param symbol the symbol to merge in * @param b the value to set * @return a new Model object */ public Model union(PropositionalSymbol symbol, boolean b) { Model m = new Model(); m.symbolValues.putAll(this.symbolValues); m.symbolValues.put(symbol, b); return m; } }
pineasaurusrex/inference-engine
src/com/github/pineasaurusrex/inference_engine/Model.java
Java
mit
1,821
34.705882
99
0.606809
false
describe("The ot object has a forEach method, which allows you: ", function () { it("To iterate over an array", function () { var array = [1, 2, 4, 8, 16]; var sum = 0; var sumIndex = 0; ot.forEach(array, function (value, index) { sum += value; sumIndex += index; expect(this.context).toBe(true); }, {context: true}); expect(sum).toBe(1 + 2 + 4 + 8 + 16); expect(sumIndex).toBe(1 + 2 + 3 + 4); }); it("To iterate over an object's properties", function () { var obj = { prop1: false, prop2: false, prop3: false }; ot.forEach(obj, function (value, key) { obj[key] = !value; expect(this.context).toBe(true); }, {context: true}); expect(obj.prop1).toBe(true); expect(obj.prop2).toBe(true); expect(obj.prop3).toBe(true); }); it("To iterate over user set function properties", function () { var fnWithProps = function aName() { }; fnWithProps.prop1 = false; fnWithProps.prop2 = false; fnWithProps.prop3 = false; ot.forEach(fnWithProps, function (value, key) { fnWithProps[key] = !value; expect(this.context).toBe(true); }, {context: true}); expect(fnWithProps.prop1).toBe(true); expect(fnWithProps.prop2).toBe(true); expect(fnWithProps.prop3).toBe(true); }); it("To iterate over an object with a forEach method", function () { var objectWithForEach = { forEach: function (iterator, context) { iterator.call(context, true); } }; ot.forEach(objectWithForEach, function(calledFromForEach) { expect(calledFromForEach).toBe(true); expect(this.context).toBe(true); }, {context: true}); }); });
rodyhaddad/objectTools.js
tests/specs/forEach.js
JavaScript
mit
1,933
28.753846
80
0.532333
false
#ifndef LWEXML_H #define LWEXML_H #include <LWCore/LWText.h> #include <functional> #include "LWETypes.h" #define LWEXMLMAXNAMELEN 32 #define LWEXMLMAXVALUELEN 256 #define LWEXMLMAXTEXTLEN 1024 struct LWXMLAttribute { char m_Name[LWEXMLMAXNAMELEN]; char m_Value[LWEXMLMAXVALUELEN]; }; struct LWEXMLNode { enum { MaxAttributes = 32 }; LWXMLAttribute m_Attributes[MaxAttributes]; char m_Text[LWEXMLMAXTEXTLEN]; char m_Name[LWEXMLMAXNAMELEN]; uint32_t m_AttributeCount; LWEXMLNode *m_Parent; LWEXMLNode *m_Next; LWEXMLNode *m_FirstChild; LWEXMLNode *m_LastChild; bool PushAttribute(const char *Name, const char *Value); bool PushAttributef(const char *Name, const char *ValueFmt, ...); bool RemoveAttribute(uint32_t i); bool RemoveAttribute(LWXMLAttribute *Attr); LWEXMLNode &SetName(const char *Name); LWEXMLNode &SetText(const char *Text); LWEXMLNode &SetTextf(const char *TextFmt, ...); LWXMLAttribute *FindAttribute(const LWText &Name); }; struct LWEXMLParser { char m_Name[LWEXMLMAXNAMELEN]; std::function<bool(LWEXMLNode *, void *, LWEXML *)> m_Callback; void *m_UserData; }; class LWEXML { public: enum { NodePoolSize = 256, MaxParsers = 32 }; static bool LoadFile(LWEXML &XML, LWAllocator &Allocator, const LWText &Path, bool StripFormatting, LWEXMLNode *Parent, LWEXMLNode *Prev, LWFileStream *ExistingStream = nullptr); static bool LoadFile(LWEXML &XML, LWAllocator &Allocator, const LWText &Path, bool StripFormatting, LWFileStream *ExistingStream = nullptr); static bool ParseBuffer(LWEXML &XML, LWAllocator &Allocator, const char *Buffer, bool StripFormatting, LWEXMLNode *Parent, LWEXMLNode *Prev); static bool ParseBuffer(LWEXML &XML, LWAllocator &Allocator, const char *Buffer, bool StripFormatting); static uint32_t ConstructBuffer(LWEXML &XML, char *Buffer, uint32_t BufferLen, bool Format); LWEXMLNode *NextNode(LWEXMLNode *Current, bool SkipChildren=false); LWEXMLNode *NextNode(LWEXMLNode *Current, LWEXMLNode *Top, bool SkipChildren = false); LWEXMLNode *NextNodeWithName(LWEXMLNode *Current, const LWText &Name, bool SkipChildren =false); template<class Method, class Obj> LWEXML &PushMethodParser(const LWText &XMLNodeName, Method CB, Obj *O, void *UserData) { return PushParser(XMLNodeName, std::bind(CB, O, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3), UserData); } LWEXML &PushParser(const LWText &XMLNodeName, std::function<bool(LWEXMLNode*, void*, LWEXML*)> Callback, void *UserData); LWEXML &Process(void); LWEXMLNode *GetInsertedNodeAfter(LWEXMLNode *Parent, LWEXMLNode *Prev, LWAllocator &Allocator); LWEXMLNode *GetFirstNode(void); LWEXMLNode *GetLastNode(void); LWEXML(); ~LWEXML(); private: LWEXMLNode **m_NodePool; LWEXMLParser m_Parsers[MaxParsers]; uint32_t m_NodeCount; uint32_t m_ParserCount; LWEXMLNode *m_FirstNode; LWEXMLNode *m_LastNode; }; #endif
slicer4ever/Lightwave
Engine/Includes/C++11/LWEXML.h
C
mit
3,001
27.15534
179
0.731423
false
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CycleCycleCycle.Services { public interface IRideService { bool Create(int accountId, int routeId, DateTime dateRidden, int? hours, int? minutes, int? seconds); } }
JamesRandall/CycleCycleCycle.com
CycleCycleCycle/Services/IRideService.cs
C#
mit
285
22.583333
109
0.731449
false
<?php /** * [PHPFOX_HEADER] */ defined('PHPFOX') or exit('NO DICE!'); /** * * * @copyright [PHPFOX_COPYRIGHT] * @author Raymond Benc * @package Module_Mail * @version $Id: index.class.php 4378 2012-06-27 08:44:47Z Raymond_Benc $ */ class Mail_Component_Controller_Index extends Phpfox_Component { /** * Class process method wnich is used to execute this component. */ public function process() { Phpfox::isUser(true); $bIsInLegacyView = false; if (Phpfox::getParam('mail.threaded_mail_conversation') && $this->request()->get('legacy')) { Phpfox::getLib('setting')->setParam('mail.threaded_mail_conversation', false); $bIsInLegacyView = true; } $this->setParam('bIsInLegacyView', $bIsInLegacyView); if (($aItemModerate = $this->request()->get('item_moderate'))) { $sFile = Phpfox::getService('mail')->getThreadsForExport($aItemModerate); Phpfox::getLib('file')->forceDownload($sFile, 'mail.xml'); } $iPage = $this->request()->getInt('page'); $iPageSize = 10; $bIsSentbox = ($this->request()->get('view') == 'sent' ? true : false); $bIsTrash = ($this->request()->get('view') == 'trash' ? true : false); $iPrivateBox = ($this->request()->get('view') == 'box' ? $this->request()->getInt('id') : false); $bIs = $this->getParam('bIsSentbox'); if ($this->request()->get('action') == 'archive') { Phpfox::getService('mail.process')->archiveThread($this->request()->getInt('id'), 1); $this->url()->send('mail.trash', null, Phpfox::getPhrase('mail.message_successfully_archived')); } if ($this->request()->get('action') == 'unarchive') { Phpfox::getService('mail.process')->archiveThread($this->request()->getInt('id'), 0); $this->url()->send('mail', null, Phpfox::getPhrase('mail.message_successfully_unarchived')); } if ($this->request()->get('action') == 'delete') { $iMailId = $this->request()->getInt('id'); if (!is_int($iMailId) || empty($iMailId)) { Phpfox_Error::set(Phpfox::getPhrase('mail.no_mail_specified')); } else { $bTrash = $this->getParam('bIsTrash'); if (!isset($bTrash) || !is_bool($bTrash)) { $bIsTrash = Phpfox::getService('mail')->isDeleted($iMailId); } if ($bIsTrash) { if (Phpfox::getService('mail.process')->deleteTrash($iMailId)) { $this->url()->send('mail.trash', null, Phpfox::getPhrase('mail.mail_deleted_successfully')); } else { Phpfox_Error::set(Phpfox::getPhrase('mail.mail_could_not_be_deleted')); } } else { $bIsSent = $this->getParam('bIsSentbox'); if (!isset($bIsSent) || !is_bool($bIsSent)) { $bIsSentbox = Phpfox::getService('mail')->isSent($iMailId); } if (Phpfox::getService('mail.process')->delete($iMailId, $bIsSentbox)) { $this->url()->send($bIsSentbox == true ? 'mail.sentbox' : 'mail', null, Phpfox::getPhrase('mail.mail_deleted_successfully')); } else { Phpfox_Error::set(Phpfox::getPhrase('mail.mail_could_not_be_deleted')); } } } } if (($aVals = $this->request()->getArray('val')) && isset($aVals['action'])) { if (isset($aVals['id'])) { //make sure there is at least one selected $oMailProcess = Phpfox::getService('mail.process'); switch ($aVals['action']) { case 'unread': case 'read': foreach ($aVals['id'] as $iId) { $oMailProcess->toggleView($iId, ($aVals['action'] == 'unread' ? true : false)); } $sMessage = Phpfox::getPhrase('mail.messages_updated'); break; case 'delete': if (isset($aVals['select']) && $aVals['select'] == 'every') { $aMail = Phpfox::getService('mail')->getAllMailFromFolder(Phpfox::getUserId(),(int)$aVals['folder'], $bIsSentbox, $bIsTrash); $aVals['id'] = $aMail; } foreach ($aVals['id'] as $iId) { ($bIsTrash ? $oMailProcess->deleteTrash($iId) : $oMailProcess->delete($iId, $bIsSentbox)); } $sMessage = Phpfox::getPhrase('mail.messages_deleted'); break; case 'undelete': foreach ($aVals['id'] as $iId) { $oMailProcess->undelete($iId); } $sMessage = Phpfox::getPhrase('mail.messages_updated'); break; } } else { // didnt select any message $sMessage = Phpfox::getPhrase('mail.error_you_did_not_select_any_message'); } // define the mail box that the user was looking at $mSend = null; if ($bIsSentbox) { $mSend = array('sentbox'); } elseif ($bIsTrash) { $mSend = array('trash'); } elseif ($iPrivateBox) { $mSend = array('box', 'id' => $iPrivateBox); } // send the user to that folder with the message $this->url()->send('mail', $mSend, $sMessage); } $this->search()->set(array( 'type' => 'mail', 'field' => 'mail.mail_id', 'search_tool' => array( 'table_alias' => 'm', 'search' => array( 'action' => $this->url()->makeUrl('mail', array('view' => $this->request()->get('view'), 'id' => $this->request()->get('id'))), 'default_value' => Phpfox::getPhrase('mail.search_messages'), 'name' => 'search', 'field' => array('m.subject', 'm.preview') ), 'sort' => array( 'latest' => array('m.time_stamp', Phpfox::getPhrase('mail.latest')), 'most-viewed' => array('m.viewer_is_new', Phpfox::getPhrase('mail.unread_first')) ), 'show' => array(10, 15, 20) ) ) ); $iPageSize = $this->search()->getDisplay(); $aFolders = Phpfox::getService('mail.folder')->get(); $sUrl = ''; $sFolder = ''; if (Phpfox::getParam('mail.threaded_mail_conversation')) { if ($bIsTrash) { $sUrl = $this->url()->makeUrl('mail.trash'); $this->search()->setCondition('AND m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.is_archive = 1'); } else { if ($bIsSentbox) { $sUrl = $this->url()->makeUrl('mail.sentbox'); } else { $sUrl = $this->url()->makeUrl('mail'); } $this->search()->setCondition('AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.is_archive = 0'); } } else { if ($bIsTrash) { $sFolder = Phpfox::getPhrase('mail.trash'); $sUrl = $this->url()->makeUrl('mail.trash'); $this->search()->setCondition('AND (m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 1) OR (m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.owner_type_id = 1)'); // $this->search()->setCondition('AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 1'); } elseif ($iPrivateBox) { if (isset($aFolders[$iPrivateBox])) { $sFolder = $aFolders[$iPrivateBox]['name']; $sUrl = $this->url()->makeUrl('mail.box', array('id' => (int) $iPrivateBox)); $this->search()->setCondition('AND m.viewer_folder_id = ' . (int) $iPrivateBox . ' AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 0'); } else { $this->url()->send('mail', null, Phpfox::getPhrase('mail.mail_folder_does_not_exist')); } } else { if ($bIsSentbox) { $sFolder = Phpfox::getPhrase('mail.sent_messages'); $sUrl = $this->url()->makeUrl('mail.sentbox'); $this->search()->setCondition('AND m.owner_user_id = ' . Phpfox::getUserId() . ' AND m.owner_type_id = 0'); } else { $sFolder = Phpfox::getPhrase('mail.inbox'); $sUrl = $this->url()->makeUrl('mail'); $this->search()->setCondition('AND m.viewer_folder_id = 0 AND m.viewer_user_id = ' . Phpfox::getUserId() . ' AND m.viewer_type_id = 0'); } } } list($iCnt, $aRows, $aInputs) = Phpfox::getService('mail')->get($this->search()->getConditions(), $this->search()->getSort(), $this->search()->getPage(), $iPageSize, $bIsSentbox, $bIsTrash); Phpfox::getLib('pager')->set(array( 'page' => $iPage, 'size' => $iPageSize, 'count' => $iCnt ) ); Phpfox::getService('mail')->buildMenu(); $aActions = array(); $aActions[] = array( 'phrase' => Phpfox::getPhrase('mail.delete'), 'action' => 'delete' ); if (!$bIsSentbox) { $aActions[] = array( 'phrase' => Phpfox::getPhrase('mail.move'), 'action' => 'move' ); } $aModeration = array( 'name' => 'mail', 'ajax' => 'mail.moderation', 'menu' => $aActions ); if ($bIsSentbox) { $aModeration['custom_fields'] = '<div><input type="hidden" name="sent" value="1" /></div>'; } elseif ($bIsTrash) { $aModeration['custom_fields'] = '<div><input type="hidden" name="trash" value="1" /></div>'; } if (Phpfox::getParam('mail.threaded_mail_conversation')) { $aModeration['ajax'] = 'mail.archive'; $aMenuOptions = array(); if ($bIsTrash) { $aMenuOptions = array( 'phrase' => Phpfox::getPhrase('mail.un_archive'), 'action' => 'un-archive' ); } else { $aMenuOptions = array( 'phrase' => Phpfox::getPhrase('mail.archive'), 'action' => 'archive' ); } $aModeration['menu'] = array($aMenuOptions, array( 'phrase' => Phpfox::getPhrase('mail.export'), 'action' => 'export' ) ); } $this->setParam('global_moderation', $aModeration); if (empty($sFolder)) { $sFolder = Phpfox::getPhrase('mail.mail'); } $iMailSpaceUsed = 0; if ((!Phpfox::getUserParam('mail.override_mail_box_limit') && Phpfox::getParam('mail.enable_mail_box_warning'))) { $iMailSpaceUsed = Phpfox::getService('mail')->getSpaceUsed(Phpfox::getUserId()); } $this->template()->setTitle($sFolder) ->setBreadcrumb(Phpfox::getPhrase('mail.mail'), $this->url()->makeUrl('mail')) ->setPhrase(array( 'mail.add_new_folder', 'mail.adding_new_folder', 'mail.view_folders', 'mail.edit_folders', 'mail.you_will_delete_every_message_in_this_folder', 'mail.updating' ) ) ->setHeader('cache', array( 'jquery/plugin/jquery.highlightFade.js' => 'static_script', 'quick_edit.js' => 'static_script', 'selector.js' => 'static_script', 'mail.js' => 'module_mail', 'pager.css' => 'style_css', 'mail.css' => 'style_css' ) ) ->assign(array( 'aMails' => $aRows, 'bIsSentbox' => $bIsSentbox, 'bIsTrash' => $bIsTrash, 'aInputs' => $aInputs, 'aFolders' => $aFolders, 'iMailSpaceUsed' => $iMailSpaceUsed, 'iMessageAge' => Phpfox::getParam('mail.message_age_to_delete'), 'sUrl' => $sUrl, 'iFolder' => (isset($aFolders[$iPrivateBox]['folder_id']) ? $aFolders[$iPrivateBox]['folder_id'] : 0), 'iTotalMessages' => $iCnt, 'sSiteName' => Phpfox::getParam('core.site_title'), 'bIsInLegacyView' => $bIsInLegacyView ) ); } /** * Garbage collector. Is executed after this class has completed * its job and the template has also been displayed. */ public function clean() { (($sPlugin = Phpfox_Plugin::get('mail.component_controller_index_clean')) ? eval($sPlugin) : false); } } ?>
edbiler/BazaarCorner
module/mail/include/component/controller/index.class.php
PHP
mit
11,278
28.142119
196
0.562156
false
<?php namespace Vin\FrontOfficeBundle\Entity; use Doctrine\ORM\EntityRepository; /** * MessageRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class MessageRepository extends EntityRepository { public function countMessages() { $query = $this -> getEntityManager()->createQuery(' SELECT COUNT(m.id) FROM VinFrontOfficeBundle:Message m'); return $query ->getSingleScalarResult(); } }
chhoulet/vin.com
src/Vin/FrontOfficeBundle/Entity/MessageRepository.php
PHP
mit
508
20.166667
68
0.681102
false
"""Classification-based test and kernel two-sample test. Author: Sandro Vega-Pons, Emanuele Olivetti. """ import os import numpy as np from sklearn.metrics import pairwise_distances, confusion_matrix from sklearn.metrics import pairwise_kernels from sklearn.svm import SVC from sklearn.cross_validation import StratifiedKFold, KFold, cross_val_score from sklearn.grid_search import GridSearchCV from kernel_two_sample_test import MMD2u, compute_null_distribution from kernel_two_sample_test import compute_null_distribution_given_permutations import matplotlib.pylab as plt from joblib import Parallel, delayed def compute_rbf_kernel_matrix(X): """Compute the RBF kernel matrix with sigma2 as the median pairwise distance. """ sigma2 = np.median(pairwise_distances(X, metric='euclidean'))**2 K = pairwise_kernels(X, X, metric='rbf', gamma=1.0/sigma2, n_jobs=-1) return K def balanced_accuracy_scoring(clf, X, y): """Scoring function that computes the balanced accuracy to be used internally in the cross-validation procedure. """ y_pred = clf.predict(X) conf_mat = confusion_matrix(y, y_pred) bal_acc = 0. for i in range(len(conf_mat)): bal_acc += (float(conf_mat[i, i])) / np.sum(conf_mat[i]) bal_acc /= len(conf_mat) return bal_acc def compute_svm_cv(K, y, C=100.0, n_folds=5, scoring=balanced_accuracy_scoring): """Compute cross-validated score of SVM with given precomputed kernel. """ cv = StratifiedKFold(y, n_folds=n_folds) clf = SVC(C=C, kernel='precomputed', class_weight='auto') scores = cross_val_score(clf, K, y, scoring=scoring, cv=cv) return scores.mean() def compute_svm_subjects(K, y, n_folds=5): """ """ cv = KFold(len(K)/2, n_folds) scores = np.zeros(n_folds) for i, (train, test) in enumerate(cv): train_ids = np.concatenate((train, len(K)/2+train)) test_ids = np.concatenate((test, len(K)/2+test)) clf = SVC(kernel='precomputed') clf.fit(K[train_ids, :][:, train_ids], y[train_ids]) scores[i] = clf.score(K[test_ids, :][:, train_ids], y[test_ids]) return scores.mean() def permutation_subjects(y): """Permute class labels of Contextual Disorder dataset. """ y_perm = np.random.randint(0, 2, len(y)/2) y_perm = np.concatenate((y_perm, np.logical_not(y_perm).astype(int))) return y_perm def permutation_subjects_ktst(y): """Permute class labels of Contextual Disorder dataset for KTST. """ yp = np.random.randint(0, 2, len(y)/2) yp = np.concatenate((yp, np.logical_not(yp).astype(int))) y_perm = np.arange(len(y)) for i in range(len(y)/2): if yp[i] == 1: y_perm[i] = len(y)/2+i y_perm[len(y)/2+i] = i return y_perm def compute_svm_score_nestedCV(K, y, n_folds, scoring=balanced_accuracy_scoring, random_state=None, param_grid=[{'C': np.logspace(-5, 5, 25)}]): """Compute cross-validated score of SVM using precomputed kernel. """ cv = StratifiedKFold(y, n_folds=n_folds, shuffle=True, random_state=random_state) scores = np.zeros(n_folds) for i, (train, test) in enumerate(cv): cvclf = SVC(kernel='precomputed') y_train = y[train] cvcv = StratifiedKFold(y_train, n_folds=n_folds, shuffle=True, random_state=random_state) clf = GridSearchCV(cvclf, param_grid=param_grid, scoring=scoring, cv=cvcv, n_jobs=1) clf.fit(K[train, :][:, train], y_train) # print clf.best_params_ scores[i] = clf.score(K[test, :][:, train], y[test]) return scores.mean() def apply_svm(K, y, n_folds=5, iterations=10000, subjects=False, verbose=True, random_state=None): """ Compute the balanced accuracy, its null distribution and the p-value. Parameters: ---------- K: array-like Kernel matrix y: array_like class labels cv: Number of folds in the stratified cross-validation verbose: bool Verbosity Returns: ------- acc: float Average balanced accuracy. acc_null: array Null distribution of the balanced accuracy. p_value: float p-value """ # Computing the accuracy param_grid = [{'C': np.logspace(-5, 5, 20)}] if subjects: acc = compute_svm_subjects(K, y, n_folds) else: acc = compute_svm_score_nestedCV(K, y, n_folds, param_grid=param_grid, random_state=random_state) if verbose: print("Mean balanced accuracy = %s" % (acc)) print("Computing the null-distribution.") # Computing the null-distribution # acc_null = np.zeros(iterations) # for i in range(iterations): # if verbose and (i % 1000) == 0: # print(i), # stdout.flush() # y_perm = np.random.permutation(y) # acc_null[i] = compute_svm_score_nestedCV(K, y_perm, n_folds, # param_grid=param_grid) # if verbose: # print '' # Computing the null-distribution if subjects: yis = [permutation_subjects(y) for i in range(iterations)] acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_subjects)(K, yis[i], n_folds) for i in range(iterations)) else: yis = [np.random.permutation(y) for i in range(iterations)] acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_score_nestedCV)(K, yis[i], n_folds, scoring=balanced_accuracy_scoring, param_grid=param_grid) for i in range(iterations)) # acc_null = Parallel(n_jobs=-1)(delayed(compute_svm_cv)(K, yis[i], C=100., n_folds=n_folds) for i in range(iterations)) p_value = max(1.0 / iterations, (acc_null > acc).sum() / float(iterations)) if verbose: print("p-value ~= %s \t (resolution : %s)" % (p_value, 1.0/iterations)) return acc, acc_null, p_value def apply_ktst(K, y, iterations=10000, subjects=False, verbose=True): """ Compute MMD^2_u, its null distribution and the p-value of the kernel two-sample test. Parameters: ---------- K: array-like Kernel matrix y: array_like class labels verbose: bool Verbosity Returns: ------- mmd2u: float MMD^2_u value. acc_null: array Null distribution of the MMD^2_u p_value: float p-value """ assert len(np.unique(y)) == 2, 'KTST only works on binary problems' # Assuming that the first m rows of the kernel matrix are from one # class and the other n rows from the second class. m = len(y[y == 0]) n = len(y[y == 1]) mmd2u = MMD2u(K, m, n) if verbose: print("MMD^2_u = %s" % mmd2u) print("Computing the null distribution.") if subjects: perms = [permutation_subjects_ktst(y) for i in range(iterations)] mmd2u_null = compute_null_distribution_given_permutations(K, m, n, perms, iterations) else: mmd2u_null = compute_null_distribution(K, m, n, iterations, verbose=verbose) p_value = max(1.0/iterations, (mmd2u_null > mmd2u).sum() / float(iterations)) if verbose: print("p-value ~= %s \t (resolution : %s)" % (p_value, 1.0/iterations)) return mmd2u, mmd2u_null, p_value def plot_null_distribution(stats, stats_null, p_value, data_name='', stats_name='$MMD^2_u$', save_figure=True): """Plot the observed value for the test statistic, its null distribution and p-value. """ fig = plt.figure() ax = fig.add_subplot(111) prob, bins, patches = plt.hist(stats_null, bins=50, normed=True) ax.plot(stats, prob.max()/30, 'w*', markersize=15, markeredgecolor='k', markeredgewidth=2, label="%s = %s" % (stats_name, stats)) ax.annotate('p-value: %s' % (p_value), xy=(float(stats), prob.max()/9.), xycoords='data', xytext=(-105, 30), textcoords='offset points', bbox=dict(boxstyle="round", fc="1."), arrowprops={"arrowstyle": "->", "connectionstyle": "angle,angleA=0,angleB=90,rad=10"}, ) plt.xlabel(stats_name) plt.ylabel('p(%s)' % stats_name) plt.legend(numpoints=1) plt.title('Data: %s' % data_name) if save_figure: save_dir = 'figures' if not os.path.exists(save_dir): os.makedirs(save_dir) stn = 'ktst' if stats_name == '$MMD^2_u$' else 'clf' fig_name = os.path.join(save_dir, '%s_%s.pdf' % (data_name, stn)) fig.savefig(fig_name)
emanuele/jstsp2015
classif_and_ktst.py
Python
mit
9,044
33.651341
180
0.578616
false
#export pid=`ps aux | grep python | grep hello_gevent.py | awk 'NR==1{print $2}' | cut -d' ' -f1`;kill -9 $pid for KILLPID in `ps aux | grep 'python' | grep 'server01' | awk ' { print $2;}'`; do kill -9 $KILLPID; done #ps aux | grep python | grep -v grep | awk '{print $2}' | xargs kill -9
alexp25/d4w_app_lab
utils/rpi/app_exit.sh
Shell
mit
296
36
110
0.594595
false
<?php class kml_Overlay extends kml_Feature { protected $tagName = 'Overlay'; var $color; var $drawOrder; var $Icon; /* Constructor */ function kml_Overlay() { parent::kml_Feature(); } /* Assignments */ function set_color($color) { $this->color = $color; } function set_drawOrder($drawOrder) { $this->drawOrder = $drawOrder; } function set_Icon($Icon) { $this->Icon = $Icon; } /* Render */ function render($doc) { $X = parent::render($doc); if (isset($this->color)) $X->appendChild(XML_create_text_element($doc, 'color', $this->color)); if (isset($this->drawOrder)) $X->appendChild(XML_create_text_element($doc, 'drawOrder', $this->drawOrder)); if (isset($this->Icon)) $X->appendChild($this->Icon->render($doc)); return $X; } } /* $a = new kml_Overlay(); $a->set_id('1'); $a->dump(false); */
lifelink1987/old.life-link.org
libs/php-kml/kml_Overlay.php
PHP
mit
908
21.7
115
0.573789
false
###Simple CMS written in python3 bottle framework by default, project is configured to work on openshift cloud: https://openshift.redhat.com. You only need to add mongodb cartridge and restart app. If you want to deploy app on your own server, you have to configure ```DB_CREDENTIALS``` variable in ```config/__init__.py``` ``` DB_CREDENTIALS = { 'creds': { 'username': 'database username', 'password': 'database password', 'host': 'database host name', 'port': database port #must be integer }, 'db': 'database name' } ``` When application is deployed default user is created for admin interface. ``` username: admin password: admin ``` **It is strongly recomended to change password after deployment.**
unixxxx/simplecms
README.md
Markdown
mit
756
25.068966
97
0.68254
false
require "importeer_plan/version" require 'importeer_plan/configuration' module ImporteerPlan class Importeer attr_accessor :path, :name, :dir, :size_batch, :sep, :initial, :options #call importeer("filename") to import the file in batches of 1000, optional importeer("filename", size_) def initialize(name, options={}) @options = options @name = name @path = Importeer.dir.join( @name ) @size_batch = options[:size_batch]||1000 @sep = options[:sep]|| ";" @initial = options[:initial]|| false end def self.dir # Rails.root.join('public/imports/') ImporteerPlan.configuration.dir end def bron end def sweep end def importeer sweep bron.each{|batch| importeer_batch batch} end def commaf(str) # comma-float; "1,234" ('%.2f' % str.gsub(',', '.') ).to_f end def pointf(str) # point-float; "1.234" ('%.2f' % str.gsub(',', '.') ).to_f end end class MyXls < Importeer require 'spreadsheet' def initialize(*) super end def bron Spreadsheet.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each end end class MyCsv< Importeer require 'csv' def initialize(*) super # @sep = options[:sep] end def bron CSV.read(path, { :col_sep => @sep , :encoding => "ISO-8859-1"}).tap{|x| x.shift}.each_slice(@size_batch) end end class MyTxt< Importeer def initialize(*) super end def bron # Csv.open(@path).worksheet(0).to_a.tap{|x| x.shift}.each_slice(size_batch).each end end end
l-plan/importeer_plan
lib/importeer_plan.rb
Ruby
mit
1,598
18.02381
109
0.610763
false
from collections import namedtuple Resolution = namedtuple('Resolution', ['x', 'y']) class Resolutions(object): resolutions = [ (1920, 1200), (1920, 1080), (1680, 1050), (1440, 900), (1360, 768), (1280, 800), (1024, 640) ] @classmethod def parse(self, x, y): if (x,y) not in self.resolutions: resolutions = ', '.join(['%sx%s' % (a, b) for a,b in self.resolutions]) raise Exception('Resolution %s x %s not supported. Available resolutions: %s' % (x,y, resolutions) ) return Resolution(x, y) class Color(object): gray = (0.15, 0.15, 0.13, 1.0) black = (0.0, 0.0, 0.0, 1.0) white = (1.0, 1.0, 1.0, 1.0) red = (1.0, 0.2, 0.0, 1.0) orange = (1.0, 0.4, 0.0, 1.0) yellow = (1.0, 0.9, 0.0, 1.0) light_green = (0.4, 1.0, 0.0, 1.0) green = (0.0, 1.0, 0.2, 1.0) cyan = (0.0, 1.0, 0.4, 1.0) light_blue = (0.0, 0.6, 1.0, 1.0) blue = (0.0, 0.2, 1.0, 1.0) purple = (0.4, 0.0, 1.0, 1.0) pink = (1.0, 0.0, 0.8, 1.0) @classmethod def __colors(self): return [key for key in self.__dict__.keys() if not key.startswith('_') and key != 'named'] @classmethod def named(self, name): if not hasattr(self, name): colors = ', '.join(self.__colors()) raise Exception('Unknown color %s. Available colors are: %s' % (name, colors)) return getattr(self, name) def try_parse(value): try: return int(value) except: return { 'true': True, 'false': False }.get(value.lower(), value) def read_config(): with open('config.cfg', 'r') as cfg_file: lines = cfg_file.readlines() lines = [ line.strip().replace(' ', '').split('=') for line in lines if line.strip() and '=' in line ] cfg = {key:try_parse(value) for key,value in lines} return cfg cfg = read_config() NUM_CELLS = cfg.get('CELLS', 100) RESOLUTION = Resolutions.parse(cfg.get('WINDOW_WIDTH', 1280), cfg.get('WINDOW_HEIGHT', 800)) limit = min(RESOLUTION) PIXEL_PER_CELL = limit / NUM_CELLS OFFSET_X = (RESOLUTION.x - (NUM_CELLS * PIXEL_PER_CELL)) / 2 OFFSET_Y = (RESOLUTION.y - (NUM_CELLS * PIXEL_PER_CELL)) / 2 SHOW_FULLSCREEN = cfg.get('FULLSCREEN', False) SHOW_GRID = cfg.get('SHOW_GRID', True) BACKGROUND_COLOR = Color.named(cfg.get('BACKGROUND_COLOR', 'black')) GRID_BACKDROP_COLOR = Color.named(cfg.get('GRID_BACKDROP_COLOR', 'gray')) GRID_LINE_COLOR = Color.named(cfg.get('GRID_LINE_COLOR', 'black')) CELL_COLOR = Color.named(cfg.get('CELL_COLOR', 'green')) CURSOR_COLOR = Color.named(cfg.get('CURSOR_COLOR', 'red'))
cessor/gameoflife
config.py
Python
mit
2,820
35.131579
113
0.537234
false
namespace Dapper.SimpleSave.Tests.Dto { [Table("dbo.OneToManySpecialChild")] [ReferenceData(true)] public class OneToManySpecialChildDto : BaseOneToManyChildDto { } }
Paymentsense/Dapper.SimpleSave
src/Dapper.SimpleSave.Tests/Dto/OneToManySpecialChildDto.cs
C#
mit
186
29.666667
67
0.733696
false
using System.Diagnostics; namespace AdventOfCode.Day07.SignalProviders { [DebuggerDisplay("{DebuggerDisplay}")] public class Wire : SignalProvider { #region | Properties & fields private readonly Circut _parentCircut; private readonly string _rawProvider; public string ID { get; } private SignalProvider Connection { get; set; } public string DebuggerDisplay => $"{ID}{_rawProvider}"; #endregion #region | ctors public Wire(Circut circut, string wireId, string rawSignalProvider) { _parentCircut = circut; ID = wireId; _rawProvider = rawSignalProvider; } #endregion #region | Non-public members private void ResolveProvider() { Connection = ProviderParser.ParseProviderType(_rawProvider, _parentCircut); } #endregion #region | Overrides public override ushort GetValue() { if (!IsResolved) // cache the value { ResolveProvider(); Value = Connection.GetValue(); IsResolved = true; } return Value; } #endregion } }
vatioz/AdventOfCode
AdventOfCode/Day07/SignalProviders/Wire.cs
C#
mit
1,265
21.210526
87
0.556522
false
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./c9030aaf9d04a204bbcb52ab81f7d32203b0d25fa13ca8835e8e8174018d7f33.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
simonmysun/praxis
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/c626cc48559647aac2af68227fe2c20bf0ef84e83b8980fa8bf479b27ae81274.html
HTML
mit
550
28
98
0.581818
false
// // SLWordViewController.h // 百思不得姐 // // Created by Anthony on 17/3/30. // Copyright © 2017年 SLZeng. All rights reserved. // #import "SLTopicViewController.h" @interface SLWordViewController : SLTopicViewController @end
CoderSLZeng/BaiSiBuDeJie
百思不得姐/百思不得姐/Classes/Essence-精华/Controller/SLWordViewController.h
C
mit
243
16.692308
55
0.726087
false
# Use this setup block to configure all options available in SimpleForm. SimpleForm.setup do |config| # Wrappers are used by the form builder to generate a # complete input. You can remove any component from the # wrapper, change the order or even add your own to the # stack. The options given below are used to wrap the # whole input. config.wrappers :default, class: :input, hint_class: :field_with_hint, error_class: :field_with_errors do |b| ## Extensions enabled by default # Any of these extensions can be disabled for a # given input by passing: `f.input EXTENSION_NAME => false`. # You can make any of these extensions optional by # renaming `b.use` to `b.optional`. # Determines whether to use HTML5 (:email, :url, ...) # and required attributes b.use :html5 # Calculates placeholders automatically from I18n # You can also pass a string as f.input placeholder: "Placeholder" b.use :placeholder ## Optional extensions # They are disabled unless you pass `f.input EXTENSION_NAME => true` # to the input. If so, they will retrieve the values from the model # if any exists. If you want to enable any of those # extensions by default, you can change `b.optional` to `b.use`. # Calculates maxlength from length validations for string inputs b.optional :maxlength # Calculates pattern from format validations for string inputs b.optional :pattern # Calculates min and max from length validations for numeric inputs b.optional :min_max # Calculates readonly automatically from readonly attributes b.optional :readonly ## Inputs b.use :label_input b.use :hint, wrap_with: { tag: :span, class: :hint } b.use :error, wrap_with: { tag: :span, class: :error } ## full_messages_for # If you want to display the full error message for the attribute, you can # use the component :full_error, like: # # b.use :full_error, wrap_with: { tag: :span, class: :error } end # The default wrapper to be used by the FormBuilder. config.default_wrapper = :default # Define the way to render check boxes / radio buttons with labels. # Defaults to :nested for bootstrap config. # inline: input + label # nested: label > input config.boolean_style = :nested # Default class for buttons config.button_class = 'btn' # Method used to tidy up errors. Specify any Rails Array method. # :first lists the first message for each field. # Use :to_sentence to list all errors for each field. # config.error_method = :first # Default tag used for error notification helper. config.error_notification_tag = :div # CSS class to add for error notification helper. config.error_notification_class = 'error_notification' # ID to add for error notification helper. # config.error_notification_id = nil # Series of attempts to detect a default label method for collection. # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] # Series of attempts to detect a default value method for collection. # config.collection_value_methods = [ :id, :to_s ] # You can wrap a collection of radio/check boxes in a pre-defined tag, defaulting to none. # config.collection_wrapper_tag = nil # You can define the class to use on all collection wrappers. Defaulting to none. # config.collection_wrapper_class = nil # You can wrap each item in a collection of radio/check boxes with a tag, # defaulting to :span. Please note that when using :boolean_style = :nested, # SimpleForm will force this option to be a label. # config.item_wrapper_tag = :span # You can define a class to use in all item wrappers. Defaulting to none. # config.item_wrapper_class = nil # How the label text should be generated altogether with the required text. # config.label_text = lambda { |label, required, explicit_label| "#{required} #{label}" } # You can define the class to use on all labels. Default is nil. # config.label_class = nil # You can define the default class to be used on forms. Can be overriden # with `html: { :class }`. Defaulting to none. # config.default_form_class = nil # You can define which elements should obtain additional classes # config.generate_additional_classes_for = [:wrapper, :label, :input] # Whether attributes are required by default (or not). Default is true. # config.required_by_default = true # Tell browsers whether to use the native HTML5 validations (novalidate form option). # These validations are enabled in SimpleForm's internal config but disabled by default # in this configuration, which is recommended due to some quirks from different browsers. # To stop SimpleForm from generating the novalidate option, enabling the HTML5 validations, # change this configuration to true. config.browser_validations = false # Collection of methods to detect if a file type was given. # config.file_methods = [ :mounted_as, :file?, :public_filename ] # Custom mappings for input types. This should be a hash containing a regexp # to match as key, and the input type that will be used when the field name # matches the regexp as value. # config.input_mappings = { /count/ => :integer } # Custom wrappers for input types. This should be a hash containing an input # type as key and the wrapper that will be used for all inputs with specified type. # config.wrapper_mappings = { string: :prepend } # Namespaces where SimpleForm should look for custom input classes that # override default inputs. # config.custom_inputs_namespaces << "CustomInputs" # Default priority for time_zone inputs. # config.time_zone_priority = nil # Default priority for country inputs. # config.country_priority = nil # When false, do not use translations for labels. # config.translate_labels = true # Automatically discover new inputs in Rails' autoload path. # config.inputs_discovery = true # Cache SimpleForm inputs discovery # config.cache_discovery = !Rails.env.development? # Default class for inputs # config.input_class = nil # Define the default class of the input wrapper of the boolean input. config.boolean_label_class = 'checkbox' # Defines if the default input wrapper class should be included in radio # collection wrappers. # config.include_default_input_wrapper_class = true # Defines which i18n scope will be used in Simple Form. # config.i18n_scope = 'simple_form' end
orbanbotond/subscribem
config/initializers/simple_form.rb
Ruby
mit
6,504
38.186747
93
0.717712
false
<?php namespace Craft\UserBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class CraftUserBundle extends Bundle { }
rickogden/craftbeeruk
src/Craft/UserBundle/CraftUserBundle.php
PHP
mit
126
13
47
0.801587
false
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class TestModel extends CI_Model { public function popular_merchants(){ //include total reviews, sum of reviews, mp_id, unit, building, street, city name, region name, merchant name, merchant image, date and time of application approval, sub category $sql = "(SELECT SUM(gr.rev_rate) AS sum_rev, COUNT(gr.rev_rate) AS total_rev, gr.mp_id AS ref_id,mp.mp_unit AS unit_add,mp.mp_building AS building_add,mp.mp_street AS street_add,ac.city_name AS merchant_city_name,ar.region_name AS merchant_region_name,ma.ma_merchant_name AS merchant_name,ma.ma_application_datetime AS datetime_approve, cs.cs_description AS merchant_sub_cat, gml.logo_name AS merchant_image FROM gl_review gr INNER JOIN gl_merchant_profile mp ON gr.mp_id = mp.mp_id INNER JOIN gl_merchant_application ma ON mp.ma_id = ma.ma_id INNER JOIN gl_address_city ac ON mp.city_id = ac.city_id INNER JOIN gl_address_region ar ON mp.region_id = ar.region_id INNER JOIN gl_category_sub cs ON ma.cs_id = cs.cs_id INNER JOIN gl_merchant_logo gml ON gml.mp_id = mp.mp_id AND ma.pub_id= 1 GROUP BY ref_id ORDER BY sum_rev DESC, datetime_approve ASC LIMIT 12)"; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? $q->result() : false; } public function insert_lang($lang_name,$lang_flag){ $this->db->set('lang_name', $lang_name); $this->db->set('lang_flag', $lang_flag); $this->db->insert('language'); return ($this->db->affected_rows() > 0) ? true : false; } public function check_lang($lang_name){ $this->db->where('lang_name', $lang_name); $q = $this->db->get('language'); return ($q->num_rows() > 0) ? true : false; } public function list_lang(){ $q = $this->db->get('language'); return ($q->num_rows() > 0) ? $q->result_array() : false; } public function delete_lang($lang_id){ $this->db->where('lang_id', $lang_id); $this->db->delete('language'); return ($this->db->affected_rows() > 0) ? true : false; } public function bookmarks($ui_id){ $sql = "SELECT CONCAT_WS('-', REPLACE(`ma`.`ma_merchant_name`, ' ', '-'), REPLACE(`ac`.`city_name`, ' ', '-')) AS `merchant_linkname`, `mp`.`mp_id` AS `merchant_prof_id`, `ma`.`ma_id` AS `merchant_app_id`, `ma`.`ma_merchant_name` AS `merchant_name`, `ma`.`cm_id` AS `merchant_main_cat_id`, `cm`.`cm_category` AS `merchant_main_cat_text`, `ma`.`cs_id` AS `merchant_sub_cat_id`, `cs`.`cs_description` AS `merchant_sub_cat_text`, `ma`.`ma_email` AS `merchant_email`, `ma`.`ma_contact_number` AS `merchant_contact_number`, `ma`.`ma_status` AS `merchant_status`, `bk`.book_id AS `book_id` FROM `gl_bookmark` `bk` LEFT JOIN `gl_merchant_profile` `mp` ON `mp`.`mp_id` = `bk`.`mp_id` LEFT JOIN `gl_merchant_application` `ma` ON `ma`.`ma_id` = `mp`.`ma_id` LEFT JOIN `gl_address_city` `ac` ON `ac`.`city_id` = `mp`.`city_id` LEFT JOIN `gl_category_main` `cm` ON `cm`.`cm_id` = `ma`.`cm_id` LEFT JOIN `gl_category_sub` `cs` ON `cs`.`cs_id` = `ma`.`cs_id` LEFT JOIN `gl_address_region` `ar` ON `ar`.`region_id` = `mp`.`region_id` WHERE `bk`.`ui_id` = '".$ui_id."' "; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? $q->result() : false; } public function check_bookmark($ui_id , $mp_id){ $sql = "SELECT * FROM `gl_bookmark` WHERE `ui_id` = '".$ui_id."' AND `mp_id` = '".$mp_id."'"; $q = $this->db->query($sql); return ($q->num_rows() > 0) ? true : false; } public function add_bookmark($data) { return ($this->db->insert('gl_bookmark',$data))?$this->db->insert_id():false; } public function delete_bookmark($ui_id , $book_id){ $sql = "DELETE FROM `gl_bookmark` WHERE `ui_id` = '".$ui_id."' AND `book_id` = '".$book_id."'"; $q = $this->db->query($sql); return ($this->db->affected_rows() > 0) ? true : false; } }
shiranui03/-_-
application/models/TestModel.php
PHP
mit
3,940
41.836957
396
0.615228
false
/* * Copyright (c) 2013 Triforce - in association with the University of Pretoria and Epi-Use <Advance/> * * 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. */ package afk.ge.tokyo.ems.nodes; import afk.ge.ems.Node; import afk.ge.tokyo.ems.components.Life; /** * * @author Daniel */ public class LifeNode extends Node { public Life life; }
jwfwessels/AFK
src/afk/ge/tokyo/ems/nodes/LifeNode.java
Java
mit
1,391
39.529412
102
0.744788
false
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Documentation Module: DBConnector</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.flatly.css"> </head> <body> <div class="container-fluid"> <div class="navbar navbar-fixed-top "> <div class="navbar-inner"> <a class="brand" href="index.html">Documentation</a> <ul class="nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="module-Dashboard.html">Dashboard</a> </li> <li> <a href="module-DBConnector.html">DBConnector</a> </li> <li> <a href="module-MessageCenter.html">MessageCenter</a> </li> <li> <a href="module-Mocks.html">Mocks</a> </li> <li> <a href="module-Widget.html">Widget</a> </li> <li> <a href="module-WidgetMap.html">WidgetMap</a> </li> </ul> </li> <li class="dropdown"> <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a> <ul class="dropdown-menu "> <li> <a href="module-Dashboard-Dashboard.html">Dashboard</a> </li> <li> <a href="module-Widget-Widget.html">Widget</a> </li> </ul> </li> </ul> </div> </div> <div class="row-fluid"> <div class="span8"> <div id="main"> <h1 class="page-title">Module: DBConnector</h1> <section> <header> <h2> DBConnector </h2> </header> <article> <div class="container-overview"> <div class="description">Database connector module<br> Implements ajax data fetching from Cache back-end</div> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <dl> <dt> <h4 class="name" id="defaults"><span class="type-signature">&lt;private> </span>defaults<code><span class="type-signature"> :Object</span></code></h4> </dt> <dd> <div class="description"> Default settings for DBConnector </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <dl class="details"> <h5 class="subsection-title">Properties:</h5> <dl> <table class="props table table-striped"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>username</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Username to connect to DB</td> </tr> <tr> <td class="name"><code>password</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last">Password to connect to DB</td> </tr> </tbody> </table> </dl> </dl> </dd> </dl> <h3 class="subsection-title">Methods</h3> <table class="table table-stripped"> <tr> <td> <h4 class="name" id="acquireData"><span class="type-signature"></span>acquireData<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Does ajax request for data from server </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:*_data_acquired</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:data_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="acquireFilters"><span class="type-signature"></span>acquireFilters<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Acquires filter list for cube from server </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:filters_acquired</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:filters_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="acquireFilterValues"><span class="type-signature"></span>acquireFilterValues<span class="signature">()</span><span class="type-signature"></span></h4> </td> <td> <div class="description"> Acquire possible values for selected filter </div> <dl class="details"> </dl> <h5>Fires:</h5> <ul> <li>module:MessageCenter#event:filter_list_acquired[path]</li> </ul> <h5>Listens to Events:</h5> <ul> <li>module:MessageCenter#event:filter_list_requested</li> </ul> </td> </tr> <tr> <td> <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4> </td> <td> <dl class="details"> </dl> <h5>Returns:</h5> <div class="param-desc"> Module name </div> <dl> <dt> Type </dt> <dd> <span class="param-type">String</span> </dd> </dl> </td> </tr> </table> </article> </section> </div> <div class="clearfix"></div> <footer> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha8</a> on 2014-09-11T04:54:51+04:00 using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>. </span> </footer> </div> <div class="span3"> <div id="toc"></div> </div> <br clear="both"> </div> </div> <!--<script src="scripts/sunlight.js"></script>--> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/bootstrap-dropdown.js"></script> <script src="scripts/toc.js"></script> <script> $( function () { $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "h1,h2,h3,h4", showAndHide : false, scrollTo : 60 } ); $( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $('.dropdown-toggle').dropdown(); // $( ".tutorial-section pre, .readme-section pre" ).addClass( "sunlight-highlight-javascript" ).addClass( "linenums" ); $( ".tutorial-section pre, .readme-section pre" ).each( function () { var $this = $( this ); var example = $this.find("code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html(exampleText); lang = lang[1]; } else { lang = "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : false, showMenu:true, enableDoclinks:true } ); } ); </script> <!--Google Analytics--> <!--Navigation and Symbol Display--> </body> </html>
intersystems-ru/DeepSeeMobile
documentation/module-DBConnector.html
HTML
mit
8,717
11.158996
175
0.481014
false
import * as types from '../actions/types'; const search = (state = [], action) => { switch(action.type) { case types.SEARCH_INPUT_SUCCESS: return action.data; case types.SEARCH_INPUT_FAILED: return action.error.message; default: return state; } }; export default search;
communicode-source/communicode
app/reducers/search.js
JavaScript
mit
341
23.357143
42
0.577713
false
using System; using System.Collections.Generic; using System.Text; namespace Light.Data.Mysql.Test { class BaseFieldSelectModelNull { #region "Data Property" private int id; /// <summary> /// Id /// </summary> /// <value></value> public int Id { get { return this.id; } set { this.id = value; } } private bool? boolFieldNull; /// <summary> /// BoolField /// </summary> /// <value></value> public bool? BoolFieldNull { get { return this.boolFieldNull; } set { this.boolFieldNull = value; } } private sbyte? sbyteFieldNull; /// <summary> /// SbyteField /// </summary> /// <value></value> public sbyte? SbyteFieldNull { get { return this.sbyteFieldNull; } set { this.sbyteFieldNull = value; } } private byte? byteFieldNull; /// <summary> /// ByteField /// </summary> /// <value></value> public byte? ByteFieldNull { get { return this.byteFieldNull; } set { this.byteFieldNull = value; } } private short? int16FieldNull; /// <summary> /// Int16Field /// </summary> /// <value></value> public short? Int16FieldNull { get { return this.int16FieldNull; } set { this.int16FieldNull = value; } } private ushort? uInt16FieldNull; /// <summary> /// UInt16Field /// </summary> /// <value></value> public ushort? UInt16FieldNull { get { return this.uInt16FieldNull; } set { this.uInt16FieldNull = value; } } private int? int32FieldNull; /// <summary> /// Int32Field /// </summary> /// <value></value> public int? Int32FieldNull { get { return this.int32FieldNull; } set { this.int32FieldNull = value; } } private uint? uInt32FieldNull; /// <summary> /// UInt32Field /// </summary> /// <value></value> public uint? UInt32FieldNull { get { return this.uInt32FieldNull; } set { this.uInt32FieldNull = value; } } private long? int64FieldNull; /// <summary> /// Int64Field /// </summary> /// <value></value> public long? Int64FieldNull { get { return this.int64FieldNull; } set { this.int64FieldNull = value; } } private ulong? uInt64FieldNull; /// <summary> /// UInt64Field /// </summary> /// <value></value> public ulong? UInt64FieldNull { get { return this.uInt64FieldNull; } set { this.uInt64FieldNull = value; } } private float? floatFieldNull; /// <summary> /// FloatField /// </summary> /// <value></value> public float? FloatFieldNull { get { return this.floatFieldNull; } set { this.floatFieldNull = value; } } private double? doubleFieldNull; /// <summary> /// DoubleField /// </summary> /// <value></value> public double? DoubleFieldNull { get { return this.doubleFieldNull; } set { this.doubleFieldNull = value; } } private decimal? decimalFieldNull; /// <summary> /// DecimalField /// </summary> /// <value></value> public decimal? DecimalFieldNull { get { return this.decimalFieldNull; } set { this.decimalFieldNull = value; } } private DateTime? dateTimeFieldNull; /// <summary> /// DateTimeField /// </summary> /// <value></value> public DateTime? DateTimeFieldNull { get { return this.dateTimeFieldNull; } set { this.dateTimeFieldNull = value; } } private string varcharFieldNull; /// <summary> /// VarcharField /// </summary> /// <value></value> public string VarcharFieldNull { get { return this.varcharFieldNull; } set { this.varcharFieldNull = value; } } private string textFieldNull; /// <summary> /// TextField /// </summary> /// <value></value> public string TextFieldNull { get { return this.textFieldNull; } set { this.textFieldNull = value; } } private byte[] bigDataFieldNull; /// <summary> /// BigDataField /// </summary> /// <value></value> public byte[] BigDataFieldNull { get { return this.bigDataFieldNull; } set { this.bigDataFieldNull = value; } } private EnumInt32Type enumInt32FieldNull; /// <summary> /// EnumInt32Field /// </summary> /// <value></value> public EnumInt32Type EnumInt32FieldNull { get { return this.enumInt32FieldNull; } set { this.enumInt32FieldNull = value; } } private EnumInt64Type enumInt64FieldNull; /// <summary> /// EnumInt64Field /// </summary> /// <value></value> public EnumInt64Type EnumInt64FieldNull { get { return this.enumInt64FieldNull; } set { this.enumInt64FieldNull = value; } } #endregion } }
aquilahkj/Light.Data2
test/Light.Data.Mysql.Test/Model/BaseFieldSelectModelNull.cs
C#
mit
6,702
21.711864
49
0.421791
false
// // YWPayViewController.h // YuWa // // Created by 黄佳峰 on 16/10/10. // Copyright © 2016年 Shanghai DuRui Information Technology Company. All rights reserved. // #import <UIKit/UIKit.h> typedef NS_ENUM(NSInteger,PayCategory){ PayCategoryQRCodePay=0, //二维码支付 PayCategoryWritePay //手写支付 }; @interface YWPayViewController : UIViewController @property(nonatomic,assign)PayCategory whichPay; //哪种支付 @property(nonatomic,strong)NSString*shopID; //店铺的id @property(nonatomic,strong)NSString*shopName; //店铺的名字 @property(nonatomic,assign)CGFloat shopZhekou; //店铺的折扣 //如果是 扫码支付 就得有下面的参数 否则就不需要 @property(nonatomic,assign)CGFloat payAllMoney; //需要支付的总额 @property(nonatomic,assign)CGFloat NOZheMoney; //不打折的金额 //---------------------------------------------- //折扣多少 +(instancetype)payViewControllerCreatWithWritePayAndShopNameStr:(NSString*)shopName andShopID:(NSString*)shopID andZhekou:(CGFloat)shopZhekou; +(instancetype)payViewControllerCreatWithQRCodePayAndShopNameStr:(NSString*)shopName andShopID:(NSString*)shopID andZhekou:(CGFloat)shopZhekou andpayAllMoney:(CGFloat)payAllMoney andNOZheMoney:(CGFloat)NOZheMoney; @end
daidi-double/_new_YWB
YuWa/YuWa/Contents/HomePage/支付界面/YWPayViewController.h
C
mit
1,300
28.075
213
0.748925
false
<?php use PHPUnit\Framework\TestCase; use voku\helper\HtmlDomHelper; use voku\helper\HtmlDomParser; /** * @internal */ final class SimpleHtmlHelperTest extends TestCase { public function testMergeHtmlAttributes() { $result = HtmlDomHelper::mergeHtmlAttributes( '<div class="foo" id="bar" data-foo="bar"></div>', 'class="foo2" data-lall="foo"', '#bar' ); self::assertSame('<div class="foo foo2" id="bar" data-foo="bar" data-lall="foo"></div>', $result); } }
voku/simple_html_dom
tests/SimpleHtmlHelperTest.php
PHP
mit
535
22.26087
106
0.609346
false
<?php namespace Youshido\CommentsBundle; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; use Youshido\CommentsBundle\DependencyInjection\CompilerPass\CommentsCompilerPass; /** * Class CommentsBundle */ class CommentsBundle extends Bundle { /** * @param ContainerBuilder $container */ public function build(ContainerBuilder $container) { parent::build($container); $container->addCompilerPass(new CommentsCompilerPass()); } }
Youshido/CommentsBundle
CommentsBundle.php
PHP
mit
533
22.173913
82
0.744841
false
#include <stdio.h> #include <set> #include <utility> #include <vector> using namespace std; const int MAXN = 1e+2; int n, x0, y0; typedef pair<int, int> point; set<point> s; int cross(int x0, int y0, const point &a, const point &b) { return (a.first - x0) * (b.second - y0) - (a.second - y0) * (b.first - x0); } int main() { scanf("%d %d %d", &n, &x0, &y0); int x, y; for (int i = 0; i < n; i++) { scanf("%d %d", &x, &y); s.emplace(x, y); } int n = s.size(); vector<point> v(s.begin(), s.end()); vector<bool> dead(n); int count = 0; for (int i = 0; i < n; i++) { if (dead[i]) { continue; } dead[i] = true; count++; for (int j = i + 1; j < n; j++) { if (dead[j]) { continue; } if (!cross(x0, y0, v[i], v[j])) { dead[j] = true; } } } printf("%d\n", count); }
aLagoG/kygerand
and/semana_i2018/dia_3/han_solo_lazer_gun.cpp
C++
mit
967
19.595745
79
0.429162
false
// 1000. 连通性问题 #include <iostream> using namespace std; int unionFind[100001]; int find(int val) { if (val == unionFind[val]) return val; unionFind[val] = find(unionFind[val]); return unionFind[val]; } int main() { int a, b; for (int i = 0; i < 100001; i++) { unionFind[i] = i; } while (cin >> a >> b) { if (find(a) != find(b)) { cout << a << ' ' << b << endl; unionFind[find(a)] = unionFind[find(b)]; } } }
MegaShow/college-programming
Homework/Data Structures and Algorithms/GJR/5 Weightd Graph Algorithms/1000.cpp
C++
mit
461
17.791667
46
0.538803
false
<?php class ProvinceModel extends CI_Model { function __construct() { parent::__construct(); } /** * 插入数据 * @param $insertRows * @return mixed */ function insert_entry($insertRows) { foreach ($insertRows as $key => $val) { $this->$key = $val; } $res = $this->db->insert('province', $this); return $res; } /** * 修改数据 * @param $updateRows * @return mixed */ function update_entry($updateRows) { foreach ($updateRows as $key => $val) { if ($key !== 'id') { $this->$key = $val; } } $res = $this->db->update('province', $this, array('id' => $updateRows['id'])); return $res; } /** * 查询数据 * @param string $field * @param $where * @param int $offset * @param int $count * @return mixed */ function getData($field = '*', $where = '', $offset = 0, $count = 20) { $this->db->select($field); if (!empty($where) && is_array($where)) { foreach ($where as $key => $val) { $this->db->where($key, $val); } } $query = $this->db->get('province', $count, $offset); return $query->result(); } /** * 获取数据总量 * @return mixed */ function getCount() { return $this->db->count_all('province'); } }
onlySun/daxue
application/models/provinceModel.php
PHP
mit
1,537
19.861111
86
0.432378
false
.sidenav { height: 100%; width: 0; position: fixed; z-index: 1; top: 0; left: 0; background-color: #111; overflow-x: hidden; transition: 0.5s; padding-top: 60px; } .sidenav a { padding: 8px 8px 8px 32px; text-decoration: none; font-size: 25px; color: #818181; display: block; transition: 0.3s; } .sidenav a:hover, .offcanvas a:focus{ color: #f1f1f1; } .sidenav .closebtn { position: absolute; top: 0; right: 25px; font-size: 36px; margin-left: 50px; } @media screen and (max-height: 450px) { .sidenav {padding-top: 15px;} .sidenav a {font-size: 18px;} }
vvn050/WebStoreMEAN
public/spastore/src/app/navigation/main-navigation/main-navigation.component.css
CSS
mit
650
15.692308
39
0.589231
false
#!/bin/sh sqlite3 -echo db/test.db < db/schema_context_a.sql
DDD-Hamburg/ddd-in-legacy-systems
scripts/setup-db.sh
Shell
mit
61
29.5
50
0.704918
false
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About KCz</source> <translation>در مورد KCz</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;KCz&lt;/b&gt; version</source> <translation>نسخه KCz</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation>⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ (eay@cryptsoft.com ) و UPnP توسط توماس برنارد طراحی شده است.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The KCz developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>فهرست آدرس</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>برای ویرایش آدرس یا بر چسب دو بار کلیک کنید</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>آدرس جدید ایجاد کنید</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>آدرس جدید</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your KCz 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>این آدرسها، آدرسهای KCz شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>کپی آدرس</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>نمایش &amp;کد QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a KCz address</source> <translation>پیام را برای اثبات آدرس KCz خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>امضا و پیام</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified KCz address</source> <translation>یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس KCz مشخص، شناسایی کنید</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>شناسایی پیام</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>حذف</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your KCz addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>کپی و برچسب گذاری</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>ویرایش</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>خطای صدور</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>بر چسب</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>آدرس</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>بدون برچسب</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>دیالوگ Passphrase </translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>وارد عبارت عبور</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>عبارت عبور نو</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>وارد کنید..&amp;lt;br/&amp;gt عبارت عبور نو در پنجره 10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &amp;lt;b&amp;gt لطفا عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>این عملیت نیاز عبارت عبور پنجره شما دارد برای رمز گشایی آن</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>این عملیت نیاز عبارت عبور شما دارد برای رمز بندی آن</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>تایید رمز گذاری</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOMMODITIZ&lt;/b&gt;!</source> <translation>هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات KCz را از دست خواهید داد.</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>آیا اطمینان دارید که می خواهید wallet رمزگذاری شود؟</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 type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>هشدار: Caps lock key روشن است</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="-56"/> <source>KCz will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your KCzs from being stolen by malware infecting your computer.</source> <translation>Biticon هم اکنون بسته می‌شود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمی‌تواند به طور کامل بیتیکون‌های شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده می‌کنند، محافظت نماید.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>تنا موفق رمز بندی پنجره ناشی از خطای داخل شد. پنجره شما مرز بندی نشده است</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>عبارت عبور عرضه تطابق نشد</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>نجره رمز گذار شد</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>اموفق رمز بندی پنجر</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>ناموفق رمز بندی پنجره</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>wallet passphrase با موفقیت تغییر یافت</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>امضا و پیام</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>همگام سازی با شبکه ...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>بررسی اجمالی</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>نمای کلی پنجره نشان بده</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;معاملات</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>نمایش تاریخ معاملات</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>ویرایش لیست آدرسها و بر چسب های ذخیره ای</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>نمایش لیست آدرس ها برای در یافت پر داخت ها</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>خروج</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>خروج از برنامه </translation> </message> <message> <location line="+4"/> <source>Show information about KCz</source> <translation>نمایش اطلاعات در مورد بیتکویین</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>درباره &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>نمایش اطلاعات درباره Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>تنظیمات...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>رمزگذاری wallet</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>پشتیبان گیری از wallet</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>تغییر Passphrase</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a KCz address</source> <translation>سکه ها را به آدرس bitocin ارسال کن</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for KCz</source> <translation>انتخابهای پیکربندی را برای KCz اصلاح کن</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>نسخه پیشتیبان wallet را به محل دیگر انتقال دهید</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>عبارت عبور رمز گشایی پنجره تغییر کنید</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>اشکال زدایی از صفحه</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>کنسول اشکال زدایی و تشخیص را باز کنید</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>بازبینی پیام</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>KCz</source> <translation>یت کویین </translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About KCz</source> <translation>در مورد KCz</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;نمایش/ عدم نمایش</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your KCz addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified KCz addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>فایل</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>تنظیمات</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>کمک</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>نوار ابزار زبانه ها</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> <message> <location line="+47"/> <source>KCz client</source> <translation>مشتری KCz</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to KCz network</source> <translation><numerusform>در صد ارتباطات فعال بیتکویین با شبکه %n</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>تا تاریخ</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>ابتلا به بالا</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>هزینه تراکنش را تایید کنید</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>معامله ارسال شده</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>معامله در یافت شده</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>تاریخ %1 مبلغ%2 نوع %3 آدرس %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>مدیریت URI</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid KCz address or malformed URI parameters.</source> <translation>URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس LITECOIN اشتباه یا پارامترهای اشتباه URI رخ داده باشد</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>زمایش شبکهه</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>زمایش شبکه</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. KCz can no longer continue safely and will quit.</source> <translation>خطا روی داده است. KCz نمی تواند بدون مشکل ادامه دهد و باید بسته شود</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>پیام شبکه</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>اصلاح آدرس</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>بر چسب</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>بر چسب با دفتر آدرس ورود مرتبط است</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>آدرس</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>آدرس با دفتر آدرس ورودی مرتبط است. این فقط در مورد آدرسهای ارسال شده است</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>آدرس در یافت نو</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>آدرس ارسال نو</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>اصلاح آدرس در یافت</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>اصلاح آدرس ارسال</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid KCz address.</source> <translation>آدرس وارد شده %1 یک ادرس صحیح KCz نیست</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>رمز گشایی پنجره امکان پذیر نیست</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>کلید نسل جدید ناموفق است</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>KCz-Qt</source> <translation>KCz-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>نسخه</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>انتخابها برای خطوط دستور command line</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>انتخابهای UI </translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>زبان را تنظیم کنید برای مثال &quot;de_DE&quot; (پیش فرض: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>شروع حد اقل</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>نمایش صفحه splash در STARTUP (پیش فرض:1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>اصلی</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>اصلی</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.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>دستمزد&amp;پر داخت معامله</translation> </message> <message> <location line="+31"/> <source>Automatically start KCz after logging in to the system.</source> <translation>در زمان ورود به سیستم به صورت خودکار KCz را اجرا کن</translation> </message> <message> <location line="+3"/> <source>&amp;Start KCz on system login</source> <translation>اجرای KCz در زمان ورود به سیستم</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>شبکه</translation> </message> <message> <location line="+6"/> <source>Automatically open the KCz client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>درگاه با استفاده از</translation> </message> <message> <location line="+7"/> <source>Connect to the KCz network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>اتصال به شبکه LITECOIN از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>اتصال با پراکسی SOCKS</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>پراکسی و آی.پی.</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>درس پروکسی</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>درگاه</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>درگاه پراکسی (مثال 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS و نسخه</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>نسخه SOCKS از پراکسی (مثال 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>صفحه</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>tray icon را تنها بعد از کوچک کردن صفحه نمایش بده</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>حد اقل رساندن در جای نوار ابزار ها</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>حد اقل رساندن در جای خروج بر نامه وقتیکه پنجره بسته است.وقتیکه این فعال است برنامه خاموش می شود بعد از انتخاب دستور خاموش در منیو</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>کوچک کردن صفحه در زمان بستن</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>نمایش</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>میانجی کاربر و زبان</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting KCz.</source> <translation>زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در LITECOIN اجرایی خواهند بود.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>واحد برای نمایش میزان وجوه در:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید</translation> </message> <message> <location line="+9"/> <source>Whether to show KCz addresses in the transaction list or not.</source> <translation>تا آدرسهای bITCOIN در فهرست تراکنش نمایش داده شوند یا نشوند.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>نمایش آدرسها در فهرست تراکنش</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>تایید</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>رد</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>انجام</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>پیش فرض</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>هشدار</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting KCz.</source> <translation>این تنظیمات پس از اجرای دوباره KCz اعمال می شوند</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>آدرس پراکسی داده شده صحیح نیست</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the KCz network after a connection is established, but this process has not completed yet.</source> <translation>اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه KCz بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>راز:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>تایید نشده</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>نابالغ</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>اخرین معاملات&amp;lt</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>تزار جاری شما</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>روزآمد نشده</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start KCz: 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>دیالوگ QR CODE</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>درخواست پرداخت</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>مقدار:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>برچسب:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>پیام</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;ذخیره به عنوان...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>خطا در زمان رمزدار کردن URI در کد QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>ذخیره کد QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>تصاویر با فرمت PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>نام مشتری</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"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>-</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>نسخه مشتری</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>اطلاعات</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>استفاده از نسخه OPENSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>زمان آغاز STARTUP</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>شبکه</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>تعداد اتصالات</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>در testnetکها</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>زنجیره بلاک</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>تعداد کنونی بلاکها</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>تعداد تخمینی بلاکها</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>زمان آخرین بلاک</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>باز کردن</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>گزینه های command-line</translation> </message> <message> <location line="+7"/> <source>Show the KCz-Qt help message to get a list with possible KCz command-line options.</source> <translation>پیام راهنمای KCz-Qt را برای گرفتن فهرست گزینه های command-line نشان بده</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>نمایش</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>کنسول</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>ساخت تاریخ</translation> </message> <message> <location line="-104"/> <source>KCz - Debug window</source> <translation>صفحه اشکال زدایی KCz </translation> </message> <message> <location line="+25"/> <source>KCz Core</source> <translation> هسته KCz </translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>فایلِ لاگِ اشکال زدایی</translation> </message> <message> <location line="+7"/> <source>Open the KCz debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>فایلِ لاگِ اشکال زدایی KCz را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>پاکسازی کنسول</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the KCz RPC console.</source> <translation>به کنسول KCz RPC خوش آمدید</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>ارسال چندین در یافت ها فورا</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>اضافه کردن دریافت کننده</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>پاک کردن تمام ستون‌های تراکنش</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>تزار :</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 بتس</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>عملیت دوم تایید کنید</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;;ارسال</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>(%3) تا &lt;b&gt;%1&lt;/b&gt; درصد%2</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>ارسال سکه ها تایید کنید</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation> %1شما متماینید که می خواهید 1% ارسال کنید ؟</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>و</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>مبلغ پر داخت باید از 0 بیشتر باشد </translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>میزان وجه از بالانس/تتمه حساب شما بیشتر است</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>آدرس تکراری یافت شده است، در زمان انجام عملیات به هر آدرس تنها یکبار می توانید اطلاعات ارسال کنید</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>خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>A&amp;مبلغ :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>به&amp;پر داخت :</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;بر چسب </translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>اآدرسن ازدفتر آدرس انتخاب کنید</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>آدرس از تخته رسم گیره دار پست کنید </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>بر داشتن این در یافت کننده</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a KCz address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>امضا - امضا کردن /شناسایی یک پیام</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;امضای پیام</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>شما می توانید پیامها را با آدرس خودتان امضا نمایید تا ثابت شود متعلق به شما هستند. مواظب باشید تا چیزی که بدان مطمئن نیستنید را امضا نکنید زیرا حملات فیشینگ در زمان ورود شما به سیستم فریبنده هستند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند را امضا کنید</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>یک آدرس را از فهرست آدرسها انتخاب کنید</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>آدرس از تخته رسم گیره دار پست کنید </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>پیامی را که می‌خواهید امضا کنید در اینجا وارد کنید</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>این امضا را در system clipboard کپی کن</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this KCz address</source> <translation>پیام را برای اثبات آدرس LITECOIN خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>تایید پیام</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>آدرس/پیام خود را وارد کنید (مطمئن شوید که فاصله بین خطوط، فاصله ها، تب ها و ... را دقیقا کپی می کنید) و سپس امضا کنید تا پیام تایید شود. مراقب باشید که پیام را بیشتر از مطالب درون امضا مطالعه نمایید تا فریب شخص سوم/دزدان اینترنتی را نخورید.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified KCz address</source> <translation>پیام را برای اطمنان از ورود به سیستم با آدرس LITECOIN مشخص خود،تایید کنید</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام تایید شده</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a KCz address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>با کلیک بر &quot;امضای پیام&quot; شما یک امضای جدید درست می کنید</translation> </message> <message> <location line="+3"/> <source>Enter KCz signature</source> <translation>امضای BITOCOIN خود را وارد کنید</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>آدرس وارد شده صحیح نیست</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>اطفا آدرس را بررسی کرده و دوباره امتحان کنید</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>آدرس وارد شده با کلید وارد شده مرتبط نیست</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>قفل کردن wallet انجام نشد</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>کلید شخصی برای آدرس وارد شده در دسترس نیست</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>پیام امضا کردن انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>پیام امضا شد</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>امضا نمی تواند رمزگشایی شود</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>لطفا امضا را بررسی و دوباره تلاش نمایید</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>امضا با تحلیلِ پیام مطابقت ندارد</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>عملیات شناسایی پیام انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>پیام شناسایی شد</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The KCz developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>باز کردن تا%1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1 آفلاین</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1 تایید نشده </translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>ایید %1 </translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>وضعیت</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>انتشار از طریق n% گره انتشار از طریق %n گره</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>منبع</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>تولید شده</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>فرستنده</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>گیرنده</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>آدرس شما</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>برچسب</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>بدهی </translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>بلوغ در n% از بیشتر بلاکها بلوغ در %n از بیشتر بلاکها</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>غیرقابل قبول</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>اعتبار</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>هزینه تراکنش</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>هزینه خالص</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>پیام</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>نظر</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>شناسه کاربری برای تراکنش</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>سکه های ایجاد شده باید 120 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>اشکال زدایی طلاعات</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>تراکنش</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>درونداد</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>صحیح</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>نادرست</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>هنوز با مو فقیت ارسال نشده</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>مشخص نیست </translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>جزییات معاملات</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>در این قاب شیشه توصیف دقیق معامله نشان می شود</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>تاریخ</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>نوع</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>از شده تا 1%1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>افلایین (%1)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>تایید نشده (%1/%2)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>تایید شده (%1)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود</numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>این بلوک از دیگر گره ها در یافت نشده بدین دلیل شاید قابل قابول نیست</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>تولید شده ولی قبول نشده</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>در یافت با :</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>دریافتی از</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>ارسال به :</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>پر داخت به خودتان</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(کاربرد ندارد)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>وضعیت معالمه . عرصه که تعداد تایید نشان می دهد</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>تاریخ و ساعت در یافت معامله</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>نوع معاملات</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>آدرس مقصود معاملات </translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>مبلغ از تزار شما خارج یا وارد شده</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>همه</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>امروز</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>این هفته</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>این ماه</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>ماه گذشته</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>امسال</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>محدوده </translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>در یافت با</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>ارسال به</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>به خودتان </translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>یگر </translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>برای جست‌‌وجو نشانی یا برچسب را وارد کنید</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>حد اقل مبلغ </translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>کپی آدرس </translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>کپی بر چسب</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>روگرفت مقدار</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>اصلاح بر چسب</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>جزئیات تراکنش را نمایش بده</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>صادرات تاریخ معامله</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma فایل جدا </translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>تایید شده</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>نوع </translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>ر چسب</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>آی دی</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>خطای صادرت</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>&gt;محدوده</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>به</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>KCz version</source> <translation>سخه بیتکویین</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="-29"/> <source>Send command to -server or KCzd</source> <translation>ارسال فرمان به سرور یا باتکویین</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>لیست فومان ها</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>کمک برای فرمان </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>تنظیمات</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: KCz.conf)</source> <translation>(: KCz.confپیش فرض: )فایل تنظیمی خاص </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: KCzd.pid)</source> <translation>(KCzd.pidپیش فرض : ) فایل پید خاص</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>دایرکتور اطلاعاتی خاص</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 9333 or testnet: 19333)</source> <translation>برای اتصالات به &lt;port&gt; (پیش‌فرض: 9333 یا تست‌نت: 19333) گوش کنید</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>حداکثر &lt;n&gt; اتصال با همکاران برقرار داشته باشید (پیش‌فرض: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>آدرس عمومی خود را ذکر کنید</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>آستانه برای قطع ارتباط با همکاران بدرفتار (پیش‌فرض: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیش‌فرض: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9332 or testnet: 19332)</source> <translation>( 9332پیش فرض :) &amp;lt;poort&amp;gt; JSON-RPC شنوایی برای ارتباطات</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>JSON-RPC قابل فرمانها و</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>اجرای در پس زمینه به عنوان شبح و قبول فرمان ها</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>استفاده شبکه آزمایش</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=KCzrpc 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 &quot;KCz Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. KCz is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض:27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید </translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong KCz will not work properly.</source> <translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد KCz ممکن است صحیح کار نکند</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>بستن گزینه ایجاد</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>تنها در گره (های) مشخص شده متصل شوید</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>آدرس نرم افزار تور غلط است %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>تنها =به گره ها در شبکه متصا شوید &lt;net&gt; (IPv4, IPv6 or Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>برونداد اطلاعات اشکال زدایی اضافی. گزینه های اشکال زدایی دیگر رفع شدند</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>برونداد اطلاعات اشکال زدایی اضافی برای شبکه</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>به خروجی اشکال‌زدایی برچسب زمان بزنید</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the KCz Wiki for SSL setup instructions)</source> <translation>گزینه ssl (به ویکیKCz برای راهنمای راه اندازی ssl مراجعه شود)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض:5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به اشکال‌زدا بفرستید</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>(میلی ثانیه )فاصله ارتباط خاص</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>JSON-RPC شناسه برای ارتباطات</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>JSON-RPC عبارت عبور برای ارتباطات</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>(127.0.0.1پیش فرض: ) &amp;lt;ip&amp;gt; دادن فرمانها برای استفاده گره ها روی</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>wallet را به جدیدترین فرمت روزآمد کنید</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation> (100پیش فرض:)&amp;lt;n&amp;gt; گذاشتن اندازه کلید روی </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation> (server.certپیش فرض: )گواهی نامه سرور</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>پیام کمکی</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>اتصال از طریق پراکسی ساکس</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>بار گیری آدرس ها</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of KCz</source> <translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart KCz to complete</source> <translation>سلام</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>خطا در بارگیری wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>آدرس پراکسی اشتباه %s</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>آدرس قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>میزان وجه اشتباه</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>بود جه نا کافی </translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>بار گیری شاخص بلوک</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. KCz is probably already running.</source> <translation>اتصال به %s از این رایانه امکان پذیر نیست. KCz احتمالا در حال اجراست.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>بار گیری والت</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>امکان تنزل نسخه در wallet وجود ندارد</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>آدرس پیش فرض قابل ذخیره نیست</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>اسکان مجدد</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>بار گیری انجام شده است</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>برای استفاده از %s از انتخابات</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>خطا</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>%s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید. </translation> </message> </context> </TS>
bitcommoditiz/Coffeez-KCz
src/qt/locale/bitcoin_fa.ts
TypeScript
mit
118,770
36.045128
405
0.612112
false
# Anchor
boldr/boldr-ui
src/Anchor/Anchor.md
Markdown
mit
9
8
8
0.666667
false
<?php namespace APP\AppBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use APP\AppBundle\Entity\Cliente; use APP\AppBundle\Form\ClienteType; /** * Cliente controller. * */ class ClienteController extends Controller { /** * Lists all Cliente entities. * */ public function indexAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('AppBundle:Cliente')->findAll(); return $this->render('AppBundle:Cliente:index.html.twig', array( 'entities' => $entities, )); } /** * Creates a new Cliente entity. * */ public function createAction(Request $request) { $entity = new Cliente(); $form = $this->CreateForm(ClienteType::class, $entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity->setFechaAlta(new \DateTime()); $entity->setFechaMod(new \DateTime()); $usuario = $this->get('security.token_storage')->getToken()->getUser(); $entity->setUsuarioAlta($usuario); $entity->setUsuarioMod($usuario); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('cliente')); } return $this->render('AppBundle:Cliente:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); } /** * Función para crear Cliente por Ajax */ public function createAjaxAction(Request $request) { if ($request->getMethod() == "POST") { $em = $this->getDoctrine()->getManager(); $name = $request->get('name'); $entity = new Cliente(); $entity->setNombre($name); $usuarioAlta = $this->get('security.token_storage')->getToken()->getUser(); $entity->setUsuarioAlta($usuarioAlta); $em->persist($entity); $em->flush(); } return $this->render("AppBundle:Default:_newOptionEntity.html.twig", array( 'entity' => $entity )); } /** * Displays a form to create a new Cliente entity. * */ public function newAction() { $entity = new Cliente(); $form = $this->CreateForm(ClienteType::class, $entity); return $this->render('AppBundle:Cliente:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); } /** * Finds and displays a Cliente entity. * */ public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $deleteForm = $this->createForm(ClienteType::class); return $this->render('AppBundle:Cliente:show.html.twig', array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), )); } /** * Displays a form to edit an existing Cliente entity. * */ public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $editForm = $this->createForm(ClienteType::class, $entity); return $this->render('AppBundle:Cliente:edit.html.twig', array( 'entity' => $entity, 'form' => $editForm->createView() )); } /** * Edits an existing Cliente entity. * */ public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $editForm = $this->createForm(ClienteType::class, $entity); $editForm->handleRequest($request); if ($editForm->isValid()) { /** @var $entity Cliente */ $usuario = $this->get('security.token_storage')->getToken()->getUser(); $entity->setFechaMod(new \DateTime()); $entity->setUsuarioMod($usuario); $em->persist($entity); $em->flush(); $this->setFlash('success', 'Los cambios se han realizado con éxito'); return $this->redirect($this->generateUrl('compania_edit', array('id' => $id))); } $this->setFlash('error', 'Ha ocurrido un error'); return $this->render('AppBundle:Cliente:edit.html.twig', array( 'entity' => $entity, 'form' => $editForm->createView(), )); } /** * Deletes a Cliente entity. * */ public function deleteAction(Request $request, $id) { $form = $this->createDeleteForm($id); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('AppBundle:Cliente')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Cliente entity.'); } $em->remove($entity); $em->flush(); } return $this->redirect($this->generateUrl('cliente')); } /** * Creates a form to delete a Cliente entity by id. * * @param mixed $id The entity id * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('companias_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Delete')) ->getForm() ; } private function setFlash($index, $message) { $this->get('session')->getFlashBag()->clear(); $this->get('session')->getFlashBag()->add($index, $message); } }
alegperea/cmsgabriel
src/APP/AppBundle/Controller/ClienteController.php
PHP
mit
6,482
28.724771
95
0.53287
false
WebsiteOne::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.raise_delivery_errors = true config.action_mailer.smtp_settings = { :address => 'smtp.gmail.com', :port => 587, :domain => '', :user_name => 'wso.av.test@gmail.com', :password => 'Wso12345', :authentication => 'plain', :enable_starttls_auto => true } end
tochman/WebsiteOne
config/environments/development.rb
Ruby
mit
1,607
37.261905
85
0.690728
false
require "presigner/version" require 'aws-sdk-v1' class Presigner DEFAULT_DURATION = 60 * 30 def initialize(options) @bucket = options[:bucket] @key = options[:key] @duration = options[:duration] || DEFAULT_DURATION @region = options[:region] || "us-east-1" @base = Time.now.to_i end attr_reader :duration, :base, :bucket, :key, :region def generate s3 = AWS::S3.new(region: region) # check if specified bucket and key exist. begin target_obj = s3.buckets[bucket].objects[key] if !target_obj.exists? $stderr.puts "Specified bucket or key does not exist." exit 1 end rescue AWS::S3::Errors::Forbidden $stderr.puts "Access to the S3 object is denied. Credential or target name might be wrong" exit 1 end if !target_obj.exists? $stderr.puts "Specified bucket or key does not exist." exit 1 end presigner = AWS::S3::PresignV4.new(target_obj) expires = calc_duration url = presigner.presign(:get, expires: base + duration, secure: true) url end def calc_duration duration end end
masaomoc/presigner
lib/presigner.rb
Ruby
mit
1,127
22
96
0.643301
false
# frozen_string_literal: true require "administrate/base_dashboard" module Eve class StationDashboard < Administrate::BaseDashboard ATTRIBUTE_TYPES = { id: Field::Number, station_id: Field::Number, name: Field::String, system: Field::BelongsTo.with_options(class_name: "Eve::System"), type_id: Field::Number, # TODO: add type dashboard owner: Field::Number, race: Field::BelongsTo.with_options(class_name: "Eve::Race"), max_dockable_ship_volume: Field::Number, office_rental_cost: Field::Number, reprocessing_efficiency: Field::Number, reprocessing_stations_take: Field::Number, # TODO: t.string "services", array: true # services: Field::String, created_at: Field::DateTime, updated_at: Field::DateTime # position: Field::HasOne }.freeze COLLECTION_ATTRIBUTES = [:id, :station_id, :name].freeze SHOW_PAGE_ATTRIBUTES = [ :id, :station_id, :name, :system, :type_id, :owner, :race, :max_dockable_ship_volume, :office_rental_cost, :reprocessing_efficiency, :reprocessing_stations_take, # :services, :created_at, :updated_at # :position ].freeze COLLECTION_FILTERS = {}.freeze def display_resource(station) station.name end end end
biow0lf/evemonk
app/dashboards/eve/station_dashboard.rb
Ruby
mit
1,362
25.192308
71
0.622614
false
declare namespace jdk { namespace nashorn { namespace api { namespace tree { interface ModuleTree extends jdk.nashorn.api.tree.Tree { getImportEntries(): java.util.List<jdk.nashorn.api.tree.ImportEntryTree> getLocalExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> getIndirectExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> getStarExportEntries(): java.util.List<jdk.nashorn.api.tree.ExportEntryTree> } } } } }
wizawu/1c
@types/jdk/jdk.nashorn.api.tree.ModuleTree.d.ts
TypeScript
mit
535
32.4375
90
0.680374
false
<?php namespace GL\ProtocolloBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class GLProtocolloBundle extends Bundle { }
lucagtc/protocollo
src/GL/ProtocolloBundle/GLProtocolloBundle.php
PHP
mit
132
13.666667
47
0.810606
false
/** * Created by lee on 10/13/17. */ import React, { Component } from 'react'; export default class PlacesItem extends Component { constructor(props) { super(props); this.config = this.config.bind(this); this.rateStars = this.rateStars.bind(this); this.startBounce = this.startBounce.bind(this); this.endBounce = this.endBounce.bind(this); } config() { return { itemPhotoSize : { maxWidth: 80, maxHeight: 91 } } } startBounce() { this.props.place.marker.setAnimation(google.maps.Animation.BOUNCE); } endBounce() { this.props.place.marker.setAnimation(null); } // build rate starts rateStars(num) { let stars = []; for(let i = 0; i < num; i++) { stars.push( <span><img key={i} src='./assets/star.png' /></span> ) } return stars } render() { const {place} = this.props.place; const img = place.photos ? place.photos[0].getUrl(this.config().itemPhotoSize) : './assets/no_image.png'; return( <div className="item-box" onMouseOver = {this.startBounce} onMouseOut={this.endBounce}> <div className="item-text"> <strong>{place.name}</strong> { place.rating ?<p>{this.rateStars(place.rating)}<span>&nbsp;&nbsp;&nbsp;{'$'.repeat(place.price_level)}</span></p> : <p>{'$'.repeat(place.price_level)}</p> } <p id="item-address">{place.formatted_address}</p> <p>{place.opening_hours && place.opening_hours.open_now ? "Open" :"Closed"}</p> </div> <img className='item-image' src={img} /> </div> ) } }
LEEwith/google-map-react
src/components/places_item.js
JavaScript
mit
1,854
28.444444
176
0.515102
false
class Solution(object): def missingNumber(self, nums): """ :type nums: List[int] :rtype: int """ xor = len(nums) for i, n in enumerate(nums): xor ^= n xor ^= i return xor inputs = [ [0], [1], [3,0,1], [9,6,4,2,3,5,7,0,1] ] s = Solution() for i in inputs: print s.missingNumber(i)
daicang/Leetcode-solutions
268-missing-number.py
Python
mit
388
15.166667
36
0.448454
false
/**************************************************************************** * * Copyright (c) 2005 - 2012 by Vivante Corp. All rights reserved. * * The material in this file is confidential and contains trade secrets * of Vivante Corporation. This is proprietary information owned by * Vivante Corporation. No part of this work may be disclosed, * reproduced, copied, transmitted, or used in any way for any purpose, * without the express written permission of Vivante Corporation. * *****************************************************************************/ /** * \file sarea.h * SAREA definitions. * * \author Kevin E. Martin <kevin@precisioninsight.com> * \author Jens Owen <jens@tungstengraphics.com> * \author Rickard E. (Rik) Faith <faith@valinux.com> */ /* * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc. * All Rights Reserved. * * 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, sub license, 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 (including the * next paragraph) 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 NON-INFRINGEMENT. * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. */ #ifndef _SAREA_H_ #define _SAREA_H_ #include "xf86drm.h" /* SAREA area needs to be at least a page */ #if defined(__alpha__) #define SAREA_MAX 0x2000 #elif defined(__ia64__) #define SAREA_MAX 0x10000 /* 64kB */ #else /* Intel 830M driver needs at least 8k SAREA */ #define SAREA_MAX 0x2000 #endif #define SAREA_MAX_DRAWABLES 256 #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 /** * SAREA per drawable information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREADrawable { unsigned int stamp; unsigned int flags; } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; /** * SAREA frame information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREAFrame { unsigned int x; unsigned int y; unsigned int width; unsigned int height; unsigned int fullscreen; } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; /** * SAREA definition. */ typedef struct _XF86DRISAREA { /** first thing is always the DRM locking structure */ drmLock lock; /** \todo Use readers/writer lock for drawable_lock */ drmLock drawable_lock; XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; XF86DRISAREAFrameRec frame; drm_context_t dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; typedef struct _XF86DRILSAREA { drmLock lock; drmLock otherLocks[31]; } XF86DRILSAREARec, *XF86DRILSAREAPtr; #endif
zOrg1331/xorg-drv-vivante
dri/src/sarea.h
C
mit
3,526
31.054545
78
0.678673
false