code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
//--------------------------------------------------------------------------------------------------------------------- // <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
// 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
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
<?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
#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
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
<?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
// 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
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
/* 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
#!/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
/* 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
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
<?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
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
<?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
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
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
<?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
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
// "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
namespace Todo.ViewModel { public sealed class NewTodoItem { public string Text { get; set; } } }
spicydog/Todo-app-sample
src/Todo/ViewModel/NewTodoItem.cs
C#
mit
120
<?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
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
export * from './about'; export * from './no-content'; export * from './home';
pschulzk/angular-webpack-starter
src/app/views/index.ts
TypeScript
mit
78
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
/** * 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
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
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
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
<?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
<?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
<?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
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
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
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
<?php namespace Craft\UserBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class CraftUserBundle extends Bundle { }
rickogden/craftbeeruk
src/Craft/UserBundle/CraftUserBundle.php
PHP
mit
126
<?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
/* * 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
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
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
<?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
#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
// 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
<?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
<?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
<?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
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
# 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
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
<?php namespace GL\ProtocolloBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class GLProtocolloBundle extends Bundle { }
lucagtc/protocollo
src/GL/ProtocolloBundle/GLProtocolloBundle.php
PHP
mit
132
/** * 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
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
<?php namespace spec\Genesis\API\Constants\Transaction; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class StatesSpec extends ObjectBehavior { function it_is_initializable() { $this->shouldHaveType('Genesis\API\Constants\Transaction\States'); } }
dev018/testrepo
spec/Genesis/API/Constants/Transaction/StatesSpec.php
PHP
mit
276
// ----------------------------------------------------------------------- // <copyright file="ViewModel.cs" company="Screenmedia"> // Copyright (c) Screenmedia 2018. All rights reserved. // </copyright> // ----------------------------------------------------------------------- namespace VanillaSample.Core.ViewModels { using Screenmedia.Plugin.Vanilla; using Screenmedia.Plugin.Vanilla.Abstractions; public class ViewModel { private readonly IIceCreamMachine _iceCreamMachine; public ViewModel() { _iceCreamMachine = CrossIceCreamMachine.Current; IceCreamFlavour = _iceCreamMachine.Dispense(); } public string IceCreamFlavour { get; set; } = "Empty Cone"; } }
Screenmedia/Plugin.Vanilla
samples/VanillaSample/VanillaSample.Core/ViewModels/ViewModel.cs
C#
mit
759
module Goaltender end require "goaltender/version" require "goaltender/base_module" require 'goaltender/value_parser' require 'goaltender/input' require 'goaltender/base'
francirp/goaltender
lib/goaltender.rb
Ruby
mit
172
package com.sms4blood.emergencyhealthservices.util; import android.content.Intent; import android.location.Location; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.widget.Toast; import com.sms4blood.emergencyhealthservices.Sms; import com.sms4blood.emergencyhealthservices.app.EhsApplication; import java.text.DecimalFormat; /** * Created by Vishnu on 8/1/2015. */ public class AppUtil extends Util { public static boolean callNumber(String phoneNumber) { boolean isValidPhoneNumber = checkPhoneNumber(phoneNumber); if (isValidPhoneNumber) { String callUri = "tel:" + phoneNumber; Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse(callUri)); callIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(callIntent); } else { Toast.makeText(EhsApplication.getContext(), "Invalid phone number.", Toast.LENGTH_SHORT).show(); } return isValidPhoneNumber; } public static boolean sendSms(String phoneNumber, String message) { boolean isValidPhoneNumber = checkPhoneNumber(phoneNumber); if (isValidPhoneNumber) { // /*It is better to let the android manage the sms sending task using native messaging app*/ // Intent smsIntent = new Intent(Intent.ACTION_VIEW); // // Invokes only SMS/MMS clients // smsIntent.setType("vnd.android-dir/mms-sms"); // // Specify the Phone Number // smsIntent.putExtra("address", phoneNumber); // // Specify the Message // smsIntent.putExtra("sms_body", message); // smsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // try { // startActivity(smsIntent); // } catch (Exception e) { // e.printStackTrace(); // Toast.makeText(EhsApplication.getContext(), "Unable to send sms to this number.", Toast.LENGTH_SHORT) // .show(); // } Intent i=new Intent(EhsApplication.getContext(), Sms.class); i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Bundle bundle = new Bundle(); bundle.putString("mobileno",phoneNumber); i.putExtras(bundle); startActivity(i); } else { Toast.makeText(EhsApplication.getContext(), "Invalid phone number.", Toast.LENGTH_SHORT).show(); } return isValidPhoneNumber; } public static boolean showMap(String latitude, String longitude) { try { if (!TextUtils.isEmpty(latitude) && (!TextUtils.isEmpty(longitude))) { Uri gmmIntentUri = Uri.parse("google.navigation:q=" + latitude + "," + longitude); Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); mapIntent.setPackage("com.google.android.apps.maps"); mapIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(mapIntent); return true; } else { Toast.makeText(EhsApplication.getContext(), "Address not available.", Toast.LENGTH_SHORT).show(); } } catch (Exception e) { e.printStackTrace(); } return false; } public static boolean showMap(String address) { try { if (!TextUtils.isEmpty(address)) { String encodedAddress = address.replaceAll("\n", " "); Uri gmmIntentUri = Uri.parse("google.navigation:q=" + encodedAddress); Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); mapIntent.setPackage("com.google.android.apps.maps"); mapIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(mapIntent); return true; } else { Toast.makeText(EhsApplication.getContext(), "Address not available.", Toast.LENGTH_SHORT).show(); } } catch (Exception e) { e.printStackTrace(); } return false; } /** * @param fromLatitude * @param fromLongitude * @param toLatitude * @param toLongitude * @return distance between the two latitudes and longitudes in kms. */ public static double calculateDistance(double fromLatitude,double fromLongitude,double toLatitude,double toLongitude) { float results[] = new float[1]; try { Location.distanceBetween(fromLatitude, fromLongitude, toLatitude, toLongitude, results); } catch (Exception e) { if (e != null) e.printStackTrace(); } int dist = (int) results[0]; if(dist<=0) { return 0D; } DecimalFormat decimalFormat = new DecimalFormat("#.##"); results[0]/=1000D; String distance = decimalFormat.format(results[0]); double d = Double.parseDouble(distance); return d; } }
VishnuPrabhu/EHS
app/src/main/java/com/sms4blood/emergencyhealthservices/util/AppUtil.java
Java
mit
5,042
<?php namespace App\FrontModule; use App\AppModule\ErrorPresenter as Presenter; class ErrorPresenter extends Presenter { }
castamir/MPR-projekt
app/modules/Front/presenters/ErrorPresenter.php
PHP
mit
129
package miwax.java_conf.gr.jp.frugalitycalc.view; import android.app.AlertDialog; import android.databinding.DataBindingUtil; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import miwax.java_conf.gr.jp.frugalitycalc.R; import miwax.java_conf.gr.jp.frugalitycalc.databinding.ActivityMainBinding; import miwax.java_conf.gr.jp.frugalitycalc.util.messenger.ShowAlertDialogMessage; import miwax.java_conf.gr.jp.frugalitycalc.viewmodel.MainViewModel; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.subscriptions.CompositeSubscription; public class MainActivity extends AppCompatActivity { private final String VIEW_MODEL = "VIEW_MODEL"; private ActivityMainBinding binding; private MainViewModel mainViewModel; private CompositeSubscription subscriptions = new CompositeSubscription(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = DataBindingUtil.setContentView(this, R.layout.activity_main); if (savedInstanceState != null) { mainViewModel = savedInstanceState.getParcelable(VIEW_MODEL); } else { mainViewModel = new MainViewModel(); } binding.setViewModel(mainViewModel); // ダイアログ表示のメッセージ受信 subscriptions.add( mainViewModel.getMessenger().register(ShowAlertDialogMessage.class) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<ShowAlertDialogMessage>() { @Override public void call(ShowAlertDialogMessage message) { showAlertDialog(message.getTitleId(), message.getTextId()); } }) ); } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putParcelable(VIEW_MODEL, mainViewModel); } @Override protected void onDestroy() { mainViewModel.unsubscribe(); super.onDestroy(); } private void showAlertDialog(int titleId, int textId) { new AlertDialog.Builder(this) .setTitle(this.getString(titleId)) .setMessage(this.getString(textId)) .setPositiveButton("OK", null) .show(); } }
tomoya0x00/FrugalityCalc
app/src/main/java/miwax/java_conf/gr/jp/frugalitycalc/view/MainActivity.java
Java
mit
2,423
<?php namespace Manialib\Maniacode\Elements; class ViewReplay extends UrlDownload { protected $nodeName = 'view_replay'; }
manialib/maniacode
src/Manialib/Maniacode/Elements/ViewReplay.php
PHP
mit
127
import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name="minexponent", parent_name="choropleth.colorbar", **kwargs ): super(MinexponentValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, edit_type=kwargs.pop("edit_type", "colorbars"), min=kwargs.pop("min", 0), **kwargs )
plotly/plotly.py
packages/python/plotly/plotly/validators/choropleth/colorbar/_minexponent.py
Python
mit
477
namespace VoiceWall.Web.ViewModels.Search { using System.ComponentModel.DataAnnotations; public class SearchViewModel { [Required] [MinLength(2, ErrorMessage="Search text must be at least 2 characters")] [DataType(DataType.Text)] public string SearchText { get; set; } } }
dzhenko/VoiceWall
src/Web/VoiceWall.Web/ViewModels/Search/SearchViewModel.cs
C#
mit
324
using SharpDX; using SharpDX.Direct3D11; using System; using System.Runtime.InteropServices; using System.Windows; using System.Xml; using System.IO; using System.Reflection; namespace Profiler.DirectX { public class TextManager : IDisposable { [StructLayout(LayoutKind.Sequential)] public struct Vertex { public Vector2 Position; public Vector2 UV; public SharpDX.Color Color; } DynamicBuffer<Vertex> VertexBuffer; DynamicBuffer<int> IndexBuffer; Mesh TextMesh; class Font : IDisposable { public struct Symbol { public RectangleF UV; public Size2F Size; public float Advance; } public Symbol[] Symbols = new Symbol[256]; public Texture2D Texture; public ShaderResourceView TextureView; public double Size { get; set; } public static Font Create(Device device, String name) { Font font = new Font(); Assembly assembly = Assembly.GetExecutingAssembly(); using (Stream stream = assembly.GetManifestResourceStream(String.Format("Profiler.DirectX.Fonts.{0}.fnt", name))) { XmlDocument doc = new XmlDocument(); doc.Load(stream); XmlNode desc = doc.SelectSingleNode("//info"); font.Size = double.Parse(desc.Attributes["size"].Value); XmlNode info = doc.SelectSingleNode("//common"); float width = float.Parse(info.Attributes["scaleW"].Value); float height = float.Parse(info.Attributes["scaleH"].Value); foreach (XmlNode node in doc.SelectNodes("//char")) { int id = int.Parse(node.Attributes["id"].Value); Symbol symbol = new Symbol(); symbol.Size.Width = float.Parse(node.Attributes["width"].Value); symbol.Size.Height = float.Parse(node.Attributes["height"].Value); int x = int.Parse(node.Attributes["x"].Value); int y = int.Parse(node.Attributes["y"].Value); symbol.UV = new RectangleF(x / width, y / height, symbol.Size.Width / width, symbol.Size.Height / height); symbol.Advance = float.Parse(node.Attributes["xadvance"].Value); font.Symbols[id] = symbol; } using (Stream textureStream = assembly.GetManifestResourceStream(String.Format("Profiler.DirectX.Fonts.{0}_0.png", name))) { font.Texture = TextureLoader.CreateTex2DFromFile(device, textureStream); } font.TextureView = new ShaderResourceView(device, font.Texture); } return font; } public void Dispose() { Utilities.Dispose(ref Texture); Utilities.Dispose(ref TextureView); } } Font SegoeUI; public TextManager(DirectX.DirectXCanvas canvas) { double baseFontSize = 16.0; int desiredFontSize = (int)(RenderSettings.dpiScaleY * baseFontSize); int fontSize = 16; int[] sizes = { 16, 20, 24, 28, 32 }; for (int i = 0; i < sizes.Length; ++i) { if (desiredFontSize < sizes[i]) break; fontSize = sizes[i]; } SegoeUI = Font.Create(canvas.RenderDevice, String.Format("SegoeUI_{0}_Normal", fontSize)); VertexBuffer = new DynamicBuffer<Vertex>(canvas.RenderDevice, BindFlags.VertexBuffer); IndexBuffer = new DynamicBuffer<int>(canvas.RenderDevice, BindFlags.IndexBuffer); TextMesh = canvas.CreateMesh(DirectXCanvas.MeshType.Text); TextMesh.UseAlpha = true; } public void Draw(System.Windows.Point pos, String text, System.Windows.Media.Color color, TextAlignment alignment = TextAlignment.Left, double maxWidth = double.MaxValue) { Color textColor = Utils.Convert(color); char[] str = text.ToCharArray(); switch (alignment) { case TextAlignment.Center: { double totalWidth = 0.0; for (int i = 0; i < str.Length; ++i) totalWidth += SegoeUI.Symbols[str[i]].Advance; double shift = Math.Max(0.0, (maxWidth - totalWidth) * 0.5); Vector2 origin = new Vector2((float)(pos.X + shift), (float)pos.Y); for (int i = 0; i < str.Length; ++i) { Font.Symbol symbol = SegoeUI.Symbols[str[i]]; if (symbol.Size.Width > maxWidth) break; Draw(origin, symbol, textColor); origin.X += symbol.Advance; maxWidth -= symbol.Advance; } } break; case TextAlignment.Right: { Vector2 origin = new Vector2((float)(pos.X + maxWidth), (float)pos.Y); for (int i = str.Length - 1; i >= 0; --i) { Font.Symbol symbol = SegoeUI.Symbols[str[i]]; origin.X -= symbol.Advance; if (symbol.Size.Width > maxWidth) break; Draw(origin, symbol, textColor); maxWidth -= symbol.Advance; } } break; default: { Vector2 origin = new Vector2((float)pos.X, (float)pos.Y); for (int i = 0; i < str.Length; ++i) { Font.Symbol symbol = SegoeUI.Symbols[str[i]]; if (symbol.Size.Width > maxWidth) break; Draw(origin, symbol, textColor); origin.X += symbol.Advance; maxWidth -= symbol.Advance; } } break; } } void Draw(Vector2 pos, Font.Symbol symbol, Color color) { VertexBuffer.Add(new Vertex() { Position = new Vector2(pos.X, pos.Y), UV = symbol.UV.TopLeft, Color = color }); VertexBuffer.Add(new Vertex() { Position = new Vector2(pos.X + symbol.Size.Width, pos.Y), UV = symbol.UV.TopRight, Color = color }); VertexBuffer.Add(new Vertex() { Position = new Vector2(pos.X + symbol.Size.Width, pos.Y + symbol.Size.Height), UV = symbol.UV.BottomRight, Color = color }); VertexBuffer.Add(new Vertex() { Position = new Vector2(pos.X, pos.Y + symbol.Size.Height), UV = symbol.UV.BottomLeft, Color = color }); } public void Render(DirectX.DirectXCanvas canvas) { Freeze(canvas.RenderDevice); canvas.RenderDevice.ImmediateContext.PixelShader.SetSampler(0, canvas.TextSamplerState); canvas.RenderDevice.ImmediateContext.PixelShader.SetShaderResource(0, SegoeUI.TextureView); canvas.Draw(TextMesh); } public void Freeze(Device device) { TextMesh.PrimitiveCount = VertexBuffer.Count * 2 / 4; if (IndexBuffer.Count < TextMesh.PrimitiveCount * 6) { IndexBuffer.Capacity = TextMesh.PrimitiveCount * 6; while (IndexBuffer.Count < TextMesh.PrimitiveCount * 6) { int baseIndex = (IndexBuffer.Count * 4) / 6; foreach (int i in DynamicMesh.BoxTriIndices) IndexBuffer.Add(baseIndex + i); } IndexBuffer.Update(device); } VertexBuffer.Update(device); TextMesh.VertexBuffer = VertexBuffer.Buffer; TextMesh.IndexBuffer = IndexBuffer.Buffer; TextMesh.VertexBufferBinding = new VertexBufferBinding(TextMesh.VertexBuffer, Utilites.SizeOf<Vertex>(), 0); } public void Dispose() { SharpDX.Utilities.Dispose(ref SegoeUI); SharpDX.Utilities.Dispose(ref TextMesh); } } }
galek/brofiler
Brofiler/DirectX/TextManager.cs
C#
mit
9,431
#include <iostream> #include <string> using namespace std; int main(){ int n; string experiment; for(cin>>n; n>0; n--){ cin >> experiment; if (experiment.size() < 3) cout << '+' << endl; else{ string s = experiment.substr(experiment.size()-2, 2); string saux; if(s == "35") cout << '-' << endl; else{ s = s[1]; saux = experiment[0]; if(saux == "9" && s == "4") cout << '*' << endl; else{ s = experiment.substr(0,3); if(s == "190") cout << '?' << endl; else cout << '?' << endl; } } } } return 0; }
DVRodri8/Competitive-programs
OnlineJudgeUVa/C++/100-9999/621 - Secret Research/main.cpp
C++
mit
626
import urllib import urllib2 from bs4 import BeautifulSoup textToSearch = 'gorillaz' query = urllib.quote(textToSearch) url = "https://www.youtube.com/results?search_query=" + query response = urllib2.urlopen(url) html = response.read() soup = BeautifulSoup(html) for vid in soup.findAll(attrs={'class':'yt-uix-tile-link'}): print 'https://www.youtube.com' + vid['href']
arbakker/yt-daemon
search_yt.py
Python
mit
380
"use strict" var o = require("../../ospec/ospec") var callAsync = require("../../test-utils/callAsync") var browserMock = require("../../test-utils/browserMock") var m = require("../../render/hyperscript") var callAsync = require("../../test-utils/callAsync") var coreRenderer = require("../../render/render") var apiRedraw = require("../../api/redraw") var apiRouter = require("../../api/router") var Promise = require("../../promise/promise") o.spec("route", function() { void [{protocol: "http:", hostname: "localhost"}, {protocol: "file:", hostname: "/"}].forEach(function(env) { void ["#", "?", "", "#!", "?!", "/foo"].forEach(function(prefix) { o.spec("using prefix `" + prefix + "` starting on " + env.protocol + "//" + env.hostname, function() { var FRAME_BUDGET = Math.floor(1000 / 60) var $window, root, redrawService, route o.beforeEach(function() { $window = browserMock(env) root = $window.document.body redrawService = apiRedraw($window) route = apiRouter($window, redrawService) route.prefix(prefix) }) o("throws on invalid `root` DOM node", function() { var threw = false try { route(null, '/', {'/':{view: function() {}}}) } catch (e) { threw = true } o(threw).equals(true) }) o("renders into `root`", function() { $window.location.href = prefix + "/" route(root, "/", { "/" : { view: function() { return m("div") } } }) o(root.firstChild.nodeName).equals("DIV") }) o("routed mount points can redraw synchronously (#1275)", function() { var view = o.spy() $window.location.href = prefix + "/" route(root, "/", {"/":{view:view}}) o(view.callCount).equals(1) redrawService.redraw() o(view.callCount).equals(2) }) o("default route doesn't break back button", function(done) { $window.location.href = "http://old.com" $window.location.href = "http://new.com" route(root, "/a", { "/a" : { view: function() { return m("div") } } }) callAsync(function() { o(root.firstChild.nodeName).equals("DIV") o(route.get()).equals("/a") $window.history.back() o($window.location.pathname).equals("/") o($window.location.hostname).equals("old.com") done() }) }) o("default route does not inherit params", function(done) { $window.location.href = "/invalid?foo=bar" route(root, "/a", { "/a" : { oninit: init, view: function() { return m("div") } } }) function init(vnode) { o(vnode.attrs.foo).equals(undefined) done() } }) o("redraws when render function is executed", function() { var onupdate = o.spy() var oninit = o.spy() $window.location.href = prefix + "/" route(root, "/", { "/" : { view: function() { return m("div", { oninit: oninit, onupdate: onupdate }) } } }) o(oninit.callCount).equals(1) redrawService.redraw() o(onupdate.callCount).equals(1) }) o("redraws on events", function(done) { var onupdate = o.spy() var oninit = o.spy() var onclick = o.spy() var e = $window.document.createEvent("MouseEvents") e.initEvent("click", true, true) $window.location.href = prefix + "/" route(root, "/", { "/" : { view: function() { return m("div", { oninit: oninit, onupdate: onupdate, onclick: onclick, }) } } }) root.firstChild.dispatchEvent(e) o(oninit.callCount).equals(1) o(onclick.callCount).equals(1) o(onclick.this).equals(root.firstChild) o(onclick.args[0].type).equals("click") o(onclick.args[0].target).equals(root.firstChild) // Wrapped to give time for the rate-limited redraw to fire callAsync(function() { o(onupdate.callCount).equals(1) done() }) }) o("event handlers can skip redraw", function(done) { var onupdate = o.spy() var oninit = o.spy() var onclick = o.spy() var e = $window.document.createEvent("MouseEvents") e.initEvent("click", true, true) $window.location.href = prefix + "/" route(root, "/", { "/" : { view: function() { return m("div", { oninit: oninit, onupdate: onupdate, onclick: function(e) { e.redraw = false }, }) } } }) root.firstChild.dispatchEvent(e) o(oninit.callCount).equals(1) // Wrapped to ensure no redraw fired callAsync(function() { o(onupdate.callCount).equals(0) done() }) }) o("changes location on route.link", function() { var e = $window.document.createEvent("MouseEvents") e.initEvent("click", true, true) $window.location.href = prefix + "/" route(root, "/", { "/" : { view: function() { return m("a", { href: "/test", oncreate: route.link }) } }, "/test" : { view : function() { return m("div") } } }) var slash = prefix[0] === "/" ? "" : "/" o($window.location.href).equals(env.protocol + "//" + (env.hostname === "/" ? "" : env.hostname) + slash + (prefix ? prefix + "/" : "")) root.firstChild.dispatchEvent(e) o($window.location.href).equals(env.protocol + "//" + (env.hostname === "/" ? "" : env.hostname) + slash + (prefix ? prefix + "/" : "") + "test") }) o("accepts RouteResolver with onmatch that returns Component", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("span") } } var resolver = { onmatch: function(args, requestedPath) { matchCount++ o(args.id).equals("abc") o(requestedPath).equals("/abc") o(this).equals(resolver) return Component }, render: function(vnode) { renderCount++ o(vnode.attrs.id).equals("abc") o(this).equals(resolver) return vnode }, } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : resolver }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) o(root.firstChild.nodeName).equals("SPAN") done() }) }) o("accepts RouteResolver with onmatch that returns Promise<Component>", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("span") } } var resolver = { onmatch: function(args, requestedPath) { matchCount++ o(args.id).equals("abc") o(requestedPath).equals("/abc") o(this).equals(resolver) return Promise.resolve(Component) }, render: function(vnode) { renderCount++ o(vnode.attrs.id).equals("abc") o(this).equals(resolver) return vnode }, } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : resolver }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) o(root.firstChild.nodeName).equals("SPAN") done() }) }) o("accepts RouteResolver with onmatch that returns Promise<undefined>", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("span") } } var resolver = { onmatch: function(args, requestedPath) { matchCount++ o(args.id).equals("abc") o(requestedPath).equals("/abc") o(this).equals(resolver) return Promise.resolve() }, render: function(vnode) { renderCount++ o(vnode.attrs.id).equals("abc") o(this).equals(resolver) return vnode }, } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : resolver }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) o(root.firstChild.nodeName).equals("DIV") done() }) }) o("accepts RouteResolver with onmatch that returns Promise<any>", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("span") } } var resolver = { onmatch: function(args, requestedPath) { matchCount++ o(args.id).equals("abc") o(requestedPath).equals("/abc") o(this).equals(resolver) return Promise.resolve([]) }, render: function(vnode) { renderCount++ o(vnode.attrs.id).equals("abc") o(this).equals(resolver) return vnode }, } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : resolver }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) o(root.firstChild.nodeName).equals("DIV") done() }) }) o("accepts RouteResolver with onmatch that returns rejected Promise", function(done) { var matchCount = 0 var renderCount = 0 var spy = o.spy() var Component = { view: function() { return m("span") } } var resolver = { onmatch: function(args, requestedPath) { matchCount++ return Promise.reject(new Error("error")) }, render: function(vnode) { renderCount++ return vnode }, } $window.location.href = prefix + "/test/1" route(root, "/default", { "/default" : {view: spy}, "/test/:id" : resolver }) callAsync(function() { callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(0) o(spy.callCount).equals(1) done() }) }) }) o("accepts RouteResolver without `render` method as payload", function(done) { var matchCount = 0 var Component = { view: function() { return m("div") } } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : { onmatch: function(args, requestedPath) { matchCount++ o(args.id).equals("abc") o(requestedPath).equals("/abc") return Component }, }, }) callAsync(function() { o(matchCount).equals(1) o(root.firstChild.nodeName).equals("DIV") done() }) }) o("changing `vnode.key` in `render` resets the component", function(done, timeout){ var oninit = o.spy() var Component = { oninit: oninit, view: function() { return m("div") } } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id": {render: function(vnode) { return m(Component, {key: vnode.attrs.id}) }} }) callAsync(function() { o(oninit.callCount).equals(1) route.set("/def") callAsync(function() { o(oninit.callCount).equals(2) done() }) }) }) o("accepts RouteResolver without `onmatch` method as payload", function() { var renderCount = 0 var Component = { view: function() { return m("div") } } $window.location.href = prefix + "/abc" route(root, "/abc", { "/:id" : { render: function(vnode) { renderCount++ o(vnode.attrs.id).equals("abc") return m(Component) }, }, }) o(root.firstChild.nodeName).equals("DIV") }) o("RouteResolver `render` does not have component semantics", function(done) { var renderCount = 0 var A = { view: function() { return m("div") } } $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { render: function(vnode) { return m("div") }, }, "/b" : { render: function(vnode) { return m("div") }, }, }) var dom = root.firstChild o(root.firstChild.nodeName).equals("DIV") route.set("/b") callAsync(function() { o(root.firstChild).equals(dom) done() }) }) o("calls onmatch and view correct number of times", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("div") } } $window.location.href = prefix + "/" route(root, "/", { "/" : { onmatch: function() { matchCount++ return Component }, render: function(vnode) { renderCount++ return vnode }, }, }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) redrawService.redraw() o(matchCount).equals(1) o(renderCount).equals(2) done() }) }) o("calls onmatch and view correct number of times when not onmatch returns undefined", function(done) { var matchCount = 0 var renderCount = 0 var Component = { view: function() { return m("div") } } $window.location.href = prefix + "/" route(root, "/", { "/" : { onmatch: function() { matchCount++ }, render: function(vnode) { renderCount++ return {tag: Component} }, }, }) callAsync(function() { o(matchCount).equals(1) o(renderCount).equals(1) redrawService.redraw() o(matchCount).equals(1) o(renderCount).equals(2) done() }) }) o("onmatch can redirect to another route", function(done) { var redirected = false var render = o.spy() $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { route.set("/b") }, render: render }, "/b" : { view: function() { redirected = true } } }) callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) done() }) }) o("onmatch can redirect to another route that has RouteResolver w/ only onmatch", function(done) { var redirected = false var render = o.spy() var view = o.spy(function() {return m("div")}) $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { route.set("/b") }, render: render }, "/b" : { onmatch: function() { redirected = true return {view: view} } } }) callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) o(view.callCount).equals(1) o(root.childNodes.length).equals(1) o(root.firstChild.nodeName).equals("DIV") done() }) }) }) o("onmatch can redirect to another route that has RouteResolver w/ only render", function(done) { var redirected = false var render = o.spy() $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { route.set("/b") }, render: render }, "/b" : { render: function(vnode){ redirected = true } } }) callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) done() }) }) o("onmatch can redirect to another route that has RouteResolver whose onmatch resolves asynchronously", function(done) { var redirected = false var render = o.spy() var view = o.spy() $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { route.set("/b") }, render: render }, "/b" : { onmatch: function() { redirected = true return new Promise(function(fulfill){ callAsync(function(){ fulfill({view: view}) }) }) } } }) callAsync(function() { callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) o(view.callCount).equals(1) done() }) }) }) }) o("onmatch can redirect to another route asynchronously", function(done) { var redirected = false var render = o.spy() var view = o.spy() $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { callAsync(function() {route.set("/b")}) return new Promise(function() {}) }, render: render }, "/b" : { onmatch: function() { redirected = true return {view: view} } } }) callAsync(function() { callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) o(view.callCount).equals(1) done() }) }) }) }) o("onmatch can redirect w/ window.history.back()", function(done) { var render = o.spy() var component = {view: o.spy()} $window.location.href = prefix + "/a" route(root, "/a", { "/a" : { onmatch: function() { return component }, render: function(vnode) { return vnode } }, "/b" : { onmatch: function() { $window.history.back() return new Promise(function() {}) }, render: render } }) callAsync(function() { route.set('/b') callAsync(function() { callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(component.view.callCount).equals(2) done() }) }) }) }) }) o("onmatch can redirect to a non-existent route that defaults to a RouteResolver w/ onmatch", function(done) { var redirected = false var render = o.spy() $window.location.href = prefix + "/a" route(root, "/b", { "/a" : { onmatch: function() { route.set("/c") }, render: render }, "/b" : { onmatch: function(vnode){ redirected = true return {view: function() {}} } } }) callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) done() }) }) }) o("onmatch can redirect to a non-existent route that defaults to a RouteResolver w/ render", function(done) { var redirected = false var render = o.spy() $window.location.href = prefix + "/a" route(root, "/b", { "/a" : { onmatch: function() { route.set("/c") }, render: render }, "/b" : { render: function(vnode){ redirected = true } } }) callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) done() }) }) }) o("onmatch can redirect to a non-existent route that defaults to a component", function(done) { var redirected = false var render = o.spy() $window.location.href = prefix + "/a" route(root, "/b", { "/a" : { onmatch: function() { route.set("/c") }, render: render }, "/b" : { view: function(vnode){ redirected = true } } }) callAsync(function() { callAsync(function() { o(render.callCount).equals(0) o(redirected).equals(true) done() }) }) }) o("the previous view redraws while onmatch resolution is pending (#1268)", function(done) { var view = o.spy() var onmatch = o.spy(function() { return new Promise(function() {}) }) $window.location.href = prefix + "/a" route(root, "/", { "/a": {view: view}, "/b": {onmatch: onmatch} }) o(view.callCount).equals(1) o(onmatch.callCount).equals(0) route.set("/b") callAsync(function() { o(view.callCount).equals(1) o(onmatch.callCount).equals(1) redrawService.redraw() o(view.callCount).equals(2) o(onmatch.callCount).equals(1) done() }) }) o("when two async routes are racing, the last one set cancels the finalization of the first", function(done) { var renderA = o.spy() var renderB = o.spy() var onmatchA = o.spy(function(){ return new Promise(function(fulfill) { setTimeout(function(){ fulfill() }, 10) }) }) $window.location.href = prefix + "/a" route(root, "/a", { "/a": { onmatch: onmatchA, render: renderA }, "/b": { onmatch: function(){ var p = new Promise(function(fulfill) { o(onmatchA.callCount).equals(1) o(renderA.callCount).equals(0) o(renderB.callCount).equals(0) setTimeout(function(){ o(onmatchA.callCount).equals(1) o(renderA.callCount).equals(0) o(renderB.callCount).equals(0) fulfill() p.then(function(){ o(onmatchA.callCount).equals(1) o(renderA.callCount).equals(0) o(renderB.callCount).equals(1) done() }) }, 20) }) return p }, render: renderB } }) callAsync(function() { o(onmatchA.callCount).equals(1) o(renderA.callCount).equals(0) o(renderB.callCount).equals(0) route.set("/b") o(onmatchA.callCount).equals(1) o(renderA.callCount).equals(0) o(renderB.callCount).equals(0) }) }) o("m.route.set(m.route.get()) re-runs the resolution logic (#1180)", function(done){ var onmatch = o.spy() var render = o.spy(function() {return m("div")}) $window.location.href = prefix + "/" route(root, '/', { "/": { onmatch: onmatch, render: render } }) callAsync(function() { o(onmatch.callCount).equals(1) o(render.callCount).equals(1) route.set(route.get()) callAsync(function() { callAsync(function() { o(onmatch.callCount).equals(2) o(render.callCount).equals(2) done() }) }) }) }) o("m.route.get() returns the last fully resolved route (#1276)", function(done){ $window.location.href = prefix + "/" route(root, "/", { "/": {view: function() {}}, "/2": { onmatch: function() { return new Promise(function() {}) } } }) o(route.get()).equals("/") route.set("/2") callAsync(function() { o(route.get()).equals("/") done() }) }) o("routing with RouteResolver works more than once", function(done) { $window.location.href = prefix + "/a" route(root, '/a', { '/a': { render: function() { return m("a", "a") } }, '/b': { render: function() { return m("b", "b") } } }) route.set('/b') callAsync(function() { route.set('/a') callAsync(function() { o(root.firstChild.nodeName).equals("A") done() }) }) }) o("calling route.set invalidates pending onmatch resolution", function(done) { var rendered = false var resolved $window.location.href = prefix + "/a" route(root, "/a", { "/a": { onmatch: function() { return new Promise(function(resolve) { callAsync(function() { callAsync(function() { resolve({view: function() {rendered = true}}) }) }) }) }, render: function(vnode) { rendered = true resolved = "a" } }, "/b": { view: function() { resolved = "b" } } }) route.set("/b") callAsync(function() { o(rendered).equals(false) o(resolved).equals("b") callAsync(function() { o(rendered).equals(false) o(resolved).equals("b") done() }) }) }) o("route changes activate onbeforeremove", function(done) { var spy = o.spy() $window.location.href = prefix + "/a" route(root, "/a", { "/a": { onbeforeremove: spy, view: function() {} }, "/b": { view: function() {} } }) route.set("/b") callAsync(function() { o(spy.callCount).equals(1) done() }) }) o("asynchronous route.set in onmatch works", function(done) { var rendered = false, resolved route(root, "/a", { "/a": { onmatch: function() { return Promise.resolve().then(function() { route.set("/b") }) }, render: function(vnode) { rendered = true resolved = "a" } }, "/b": { view: function() { resolved = "b" } }, }) callAsync(function() { // tick for popstate for /a callAsync(function() { // tick for promise in onmatch callAsync(function() { // tick for onpopstate for /b o(rendered).equals(false) o(resolved).equals("b") done() }) }) }) }) o("throttles", function(done, timeout) { timeout(200) var i = 0 $window.location.href = prefix + "/" route(root, "/", { "/": {view: function(v) {i++}} }) var before = i redrawService.redraw() redrawService.redraw() redrawService.redraw() redrawService.redraw() var after = i setTimeout(function() { o(before).equals(1) // routes synchronously o(after).equals(2) // redraws synchronously o(i).equals(3) // throttles rest done() }, FRAME_BUDGET * 2) }) o("m.route.param is available outside of route handlers", function(done) { $window.location.href = prefix + "/" route(root, "/1", { "/:id" : { view : function() { o(route.param("id")).equals("1") return m("div") } } }) o(route.param("id")).equals(undefined); o(route.param()).deepEquals(undefined); callAsync(function() { o(route.param("id")).equals("1") o(route.param()).deepEquals({id:"1"}) done() }) }) }) }) }) })
jsguy/slides
resource/mithril.js-rewrite/api/tests/test-router.js
JavaScript
mit
26,809
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: > Math.sqrt, recommended that implementations use the approximation algorithms for IEEE 754 arithmetic contained in fdlibm es5id: 15.8.2.17_A6 description: > Checking if Math.sqrt is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC includes: - math_precision.js - math_isequal.js ---*/ // CHECK#1 vnum = 64; var x = new Array(); x[0] = 0.00000000000000000000; x[1] = 0.25396825396825395000; x[2] = 0.50793650793650791000; x[3] = 0.76190476190476186000; x[4] = 1.01587301587301580000; x[5] = 1.26984126984126980000; x[6] = 1.52380952380952370000; x[7] = 1.77777777777777770000; x[8] = 2.03174603174603160000; x[9] = 2.28571428571428560000; x[10] = 2.53968253968253950000; x[11] = 2.79365079365079350000; x[12] = 3.04761904761904740000; x[13] = 3.30158730158730140000; x[14] = 3.55555555555555540000; x[15] = 3.80952380952380930000; x[16] = 4.06349206349206330000; x[17] = 4.31746031746031720000; x[18] = 4.57142857142857120000; x[19] = 4.82539682539682510000; x[20] = 5.07936507936507910000; x[21] = 5.33333333333333300000; x[22] = 5.58730158730158700000; x[23] = 5.84126984126984090000; x[24] = 6.09523809523809490000; x[25] = 6.34920634920634890000; x[26] = 6.60317460317460280000; x[27] = 6.85714285714285680000; x[28] = 7.11111111111111070000; x[29] = 7.36507936507936470000; x[30] = 7.61904761904761860000; x[31] = 7.87301587301587260000; x[32] = 8.12698412698412650000; x[33] = 8.38095238095238140000; x[34] = 8.63492063492063440000; x[35] = 8.88888888888888930000; x[36] = 9.14285714285714230000; x[37] = 9.39682539682539720000; x[38] = 9.65079365079365030000; x[39] = 9.90476190476190510000; x[40] = 10.15873015873015800000; x[41] = 10.41269841269841300000; x[42] = 10.66666666666666600000; x[43] = 10.92063492063492100000; x[44] = 11.17460317460317400000; x[45] = 11.42857142857142900000; x[46] = 11.68253968253968200000; x[47] = 11.93650793650793700000; x[48] = 12.19047619047619000000; x[49] = 12.44444444444444500000; x[50] = 12.69841269841269800000; x[51] = 12.95238095238095300000; x[52] = 13.20634920634920600000; x[53] = 13.46031746031746000000; x[54] = 13.71428571428571400000; x[55] = 13.96825396825396800000; x[56] = 14.22222222222222100000; x[57] = 14.47619047619047600000; x[58] = 14.73015873015872900000; x[59] = 14.98412698412698400000; x[60] = 15.23809523809523700000; x[61] = 15.49206349206349200000; x[62] = 15.74603174603174500000; x[63] = 16.00000000000000000000; var y = new Array(); y[0] = 0.00000000000000000000; y[1] = 0.50395263067896967000; y[2] = 0.71269664509979835000; y[3] = 0.87287156094396945000; y[4] = 1.00790526135793930000; y[5] = 1.12687233963802200000; y[6] = 1.23442679969673530000; y[7] = 1.33333333333333330000; y[8] = 1.42539329019959670000; y[9] = 1.51185789203690880000; y[10] = 1.59363814577919150000; y[11] = 1.67142178807468980000; y[12] = 1.74574312188793890000; y[13] = 1.81702705031799170000; y[14] = 1.88561808316412670000; y[15] = 1.95180014589706640000; y[16] = 2.01581052271587870000; y[17] = 2.07784992659727900000; y[18] = 2.13808993529939520000; y[19] = 2.19667858946110380000; y[20] = 2.25374467927604400000; y[21] = 2.30940107675850290000; y[22] = 2.36374736114111530000; y[23] = 2.41687191246657520000; y[24] = 2.46885359939347060000; y[25] = 2.51976315339484810000; y[26] = 2.56966429775848400000; y[27] = 2.61861468283190830000; y[28] = 2.66666666666666650000; y[29] = 2.71386797119523940000; y[30] = 2.76026223736941700000; y[31] = 2.80588949764880670000; y[32] = 2.85078658039919340000; y[33] = 2.89498745782298350000; y[34] = 2.93852354676981160000; y[35] = 2.98142396999971960000; y[36] = 3.02371578407381760000; y[37] = 3.06542417893925380000; y[38] = 3.10657265339049320000; y[39] = 3.14718316987777280000; y[40] = 3.18727629155838300000; y[41] = 3.22687130401855570000; y[42] = 3.26598632371090410000; y[43] = 3.30463839483761390000; y[44] = 3.34284357614937950000; y[45] = 3.38061701891406630000; y[46] = 3.41797303712883060000; y[47] = 3.45492517089848670000; y[48] = 3.49148624377587780000; y[49] = 3.52766841475278750000; y[50] = 3.56348322549899170000; y[51] = 3.59894164336974940000; y[52] = 3.63405410063598340000; y[53] = 3.66883053033489940000; y[54] = 3.70328039909020570000; y[55] = 3.73741273720925400000; y[56] = 3.77123616632825340000; y[57] = 3.80475892484536750000; y[58] = 3.83798889135426350000; y[59] = 3.87093360626696680000; y[60] = 3.90360029179413280000; y[61] = 3.93599587043272870000; y[62] = 3.96812698209517300000; y[63] = 4.00000000000000000000; var val; for (i = 0; i < vnum; i++) { val = Math.sqrt(x[i]); if (!isEqual(val, y[i])) { $ERROR("\nx = " + x[i] + "\nlibc.sqrt(x) = " + y[i] + "\nMath.sqrt(x) = " + Math.sqrt(x[i]) + "\nMath.abs(libc.sqrt(x) - Math.sqrt(x)) > " + prec + "\n\n"); } }
PiotrDabkowski/Js2Py
tests/test_cases/built-ins/Math/sqrt/S15.8.2.17_A6.js
JavaScript
mit
4,964
/////////////////////////////////////////////////////////////// // This is generated code. ////////////////////////////////////////////////////////////// // Code is generated using LLBLGen Pro version: 4.2 // Code is generated on: // Code is generated using templates: SD.TemplateBindings.SharedTemplates // Templates vendor: Solutions Design. // Templates version: ////////////////////////////////////////////////////////////// using System; using System.Collections; using System.Collections.Generic; using AdventureWorks.Dal; using AdventureWorks.Dal.FactoryClasses; using AdventureWorks.Dal.HelperClasses; using SD.LLBLGen.Pro.ORMSupportClasses; namespace AdventureWorks.Dal.RelationClasses { /// <summary>Implements the relations factory for the entity: WorkOrderRouting. </summary> public partial class WorkOrderRoutingRelations { /// <summary>CTor</summary> public WorkOrderRoutingRelations() { } /// <summary>Gets all relations of the WorkOrderRoutingEntity as a list of IEntityRelation objects.</summary> /// <returns>a list of IEntityRelation objects</returns> public virtual List<IEntityRelation> GetAllRelations() { List<IEntityRelation> toReturn = new List<IEntityRelation>(); toReturn.Add(this.LocationEntityUsingLocationId); toReturn.Add(this.WorkOrderEntityUsingWorkOrderId); return toReturn; } #region Class Property Declarations /// <summary>Returns a new IEntityRelation object, between WorkOrderRoutingEntity and LocationEntity over the m:1 relation they have, using the relation between the fields: /// WorkOrderRouting.LocationId - Location.LocationId /// </summary> public virtual IEntityRelation LocationEntityUsingLocationId { get { IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "Location", false); relation.AddEntityFieldPair(LocationFields.LocationId, WorkOrderRoutingFields.LocationId); relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("LocationEntity", false); relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("WorkOrderRoutingEntity", true); return relation; } } /// <summary>Returns a new IEntityRelation object, between WorkOrderRoutingEntity and WorkOrderEntity over the m:1 relation they have, using the relation between the fields: /// WorkOrderRouting.WorkOrderId - WorkOrder.WorkOrderId /// </summary> public virtual IEntityRelation WorkOrderEntityUsingWorkOrderId { get { IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "WorkOrder", false); relation.AddEntityFieldPair(WorkOrderFields.WorkOrderId, WorkOrderRoutingFields.WorkOrderId); relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("WorkOrderEntity", false); relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("WorkOrderRoutingEntity", true); return relation; } } /// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary> public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; } /// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary> public virtual IEntityRelation GetSuperTypeRelation() { return null;} #endregion #region Included Code #endregion } /// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary> internal static class StaticWorkOrderRoutingRelations { internal static readonly IEntityRelation LocationEntityUsingLocationIdStatic = new WorkOrderRoutingRelations().LocationEntityUsingLocationId; internal static readonly IEntityRelation WorkOrderEntityUsingWorkOrderIdStatic = new WorkOrderRoutingRelations().WorkOrderEntityUsingWorkOrderId; /// <summary>CTor</summary> static StaticWorkOrderRoutingRelations() { } } }
net-industry/llblgen-training
AdventureWorks.Dal/DatabaseGeneric/RelationClasses/WorkOrderRoutingRelations.cs
C#
mit
4,089
'use strict'; export interface IPrint extends ng.resource.IResource<IPrint> { printOptions: any; } export interface IPrintResource extends ng.resource.IResourceClass<IPrint> {} export class PrintResource { /* @ngInject */ public static Print($resource: ng.resource.IResourceService): IPrintResource { var url = '/api/print'; var resource = $resource(url, {}); return <IPrintResource> resource; } }
marksmall/mapuse
src/app/components/print/print.resource.ts
TypeScript
mit
424
<?php // :default:index.html.twig return array ( 'fe7793f' => array ( 0 => array ( 0 => '@bootstrap_css', 1 => '@fontawesome_css_be', 2 => '@YallaWebsiteBackendBundle/Resources/public/css/jquery-ui.css', 3 => '@YallaWebsiteBackendBundle/Resources/public/css/select2.min.css', 4 => '@YallaWebsiteBackendBundle/Resources/public/css/jquery.tagsinput.min.css', 5 => '@YallaWebsiteBackendBundle/Resources/public/css/image-picker.css', 6 => '@YallaWebsiteBackendBundle/Resources/public/css/style.css', ), 1 => array ( ), 2 => array ( 'output' => '_controller/css/fe7793f.css', 'name' => 'fe7793f', 'debug' => NULL, 'combine' => NULL, 'vars' => array ( ), ), ), 'a56fa94' => array ( 0 => array ( 0 => '@jquery', 1 => '@bootstrap_js', ), 1 => array ( ), 2 => array ( 'output' => '_controller/js/a56fa94.js', 'name' => 'a56fa94', 'debug' => NULL, 'combine' => NULL, 'vars' => array ( ), ), ), );
DevKhater/YallaWebSite
app/cache/dev/assetic/config/a/ae1b290dcfca1cdecd87a85bbe4b1164.php
PHP
mit
1,120
/** * JRakLibPlus is not affiliated with Jenkins Software LLC or RakNet. * This software is an enhanced port of RakLib https://github.com/PocketMine/RakLib. * This file is part of JRakLibPlus. * * JRakLibPlus is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * JRakLibPlus is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with JRakLibPlus. If not, see <http://www.gnu.org/licenses/>. */ package io.github.jython234.jraklibplus.protocol.raknet; import static io.github.jython234.jraklibplus.JRakLibPlus.*; /** * Created by jython234 on 9/12/2015. * * @author RedstoneLamp Team */ public class NACKPacket extends AcknowledgePacket { @Override public byte getPID() { return NACK; } }
MrGenga/BouncyBall
src/main/java/io/github/jython234/jraklibplus/protocol/raknet/NACKPacket.java
Java
mit
1,189
#if UNITY_EDITOR using UnityEngine; using UnityEditor; using System.IO; public class CreateAssetbundle : MonoBehaviour { [MenuItem("Fineness/Build AssetBundle From Select Resource")] static void SelectResourceAndBuildAB() { UnityEngine.Object[] selecteds = Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.DeepAssets); var count = 0; var max = selecteds.Length; var fileNames = new string[max]; var assetBundle = new AssetBundleBuild(); Debug.Log("即将打包的文件路径队列:"); for (var i = 0; i < max; i++) { var target = selecteds[i]; string assetPath = AssetDatabase.GetAssetPath(target); var fileName = assetPath; assetPath = assetPath.Replace("Assets/", ""); var fileInfo = new FileInfo(assetPath); if ((fileName.IndexOf('.') != -1) && (fileInfo.Extension != "cs") && (fileInfo.Extension != "meta")) { fileNames[i] = fileName; count++; Debug.Log(i + " >> " + fileNames[i]); } } if (count > 0) { var activer = Selection.activeObject; if (activer == null) { Debug.Log(" ╮(╯▽╰)╭ 缺少被选中的激活物件,请选择后重试..."); return; } assetBundle.assetBundleName = activer.name; assetBundle.assetNames = fileNames; var outputFileName = Application.streamingAssetsPath + "/AB" + assetBundle.assetBundleName; if (!Directory.Exists(outputFileName)) Directory.CreateDirectory(outputFileName); var options = BuildAssetBundleOptions.None; var path = "Assets" + outputFileName.Replace(Application.dataPath, ""); BuildPipeline.BuildAssetBundles(path, new[] { assetBundle }, options, EditorUserBuildSettings.activeBuildTarget); AssetDatabase.Refresh(); Debug.Log(" ♪(^∇^*) 尊敬的主人,打包已完成,资源存放路径:" + path); } else Debug.Log("所选文件中没有可打包的资源"); } } //获取打包的平台 public class PlatformPath { /// <summary> /// 获取打包的平台,根据平台设置打包的文件夹名称 /// </summary> /// <param name="target"></param> /// <returns></returns> public static string GetPlatformFolder(BuildTarget target) { switch (target) { case BuildTarget.Android: return "Android"; case BuildTarget.iOS: return "IOS"; //case BuildTarget.WebPlayer: // return "WebPlayer"; case BuildTarget.StandaloneWindows: case BuildTarget.StandaloneWindows64: return "Windows"; case BuildTarget.StandaloneOSXIntel: case BuildTarget.StandaloneOSXIntel64: case BuildTarget.StandaloneOSXUniversal: return "OSX"; default: return null; } } } #endif
firefishes/ShipDockU3D
Framework/Editer/AssetBundle/CreateAssetbundle.cs
C#
mit
3,193
'use strict'; var gulp = require('gulp'); var autoprefixer = require('jstransformer')(require('jstransformer-stylus')); var autoprefixer = require('autoprefixer-stylus'); var browserSync = require('browser-sync').create(); var changed = require('gulp-changed'); var concat = require('gulp-concat'); var cssbeautify = require('gulp-cssbeautify'); var csscomb = require('gulp-csscomb'); var csso = require('gulp-csso'); var data = require('gulp-data'); var del = require('del'); var filter = require('gulp-filter'); var flatten = require('gulp-flatten'); var gulpZip = require('gulp-zip'); var gulpif = require('gulp-if'); var gutil = require('gulp-util'); var htmlPrettify = require('gulp-prettify'); var imagemin = require('gulp-imagemin'); var imageminPngquant = require('imagemin-pngquant'); var imageminSvgo = require('imagemin-svgo'); var include = require('gulp-include'); var jade = require('gulp-jade'); var jadeInheritance = require('gulp-jade-inheritance'); var path = require('path'); var plumber = require('gulp-plumber'); var rename = require('gulp-rename'); var runSequence = require('run-sequence'); var rupture = require('rupture'); var stylus = require('gulp-stylus'); var svgSymbols = require('gulp-svg-symbols'); var uglify = require('gulp-uglify'); var watch = require('gulp-watch'); var gcmq = require('gulp-combine-mq'); // Error handler for gulp-plumber var errorHandler = function (err) { gutil.log([(err.name + ' in ' + err.plugin).bold.red, '', err.message, ''].join('\n')); if (gutil.env.beep) { gutil.beep(); } this.emit('end'); }; // Print object in console var debugObj = function (obj) { var util = require('util'); console.log(util.inspect(obj, {showHidden: false, depth: null})); }; // Read file and return object var getData = function getData (file) { var dataEntry; var data; var dataTmp; var fs = require('fs'); try { dataEntry = fs.readFileSync(file, 'utf8'); } catch (er) { dataEntry = false; } dataTmp = '{' + dataEntry + '}'; if (dataEntry) { // eval('data = {' + dataEntry + '}'); data = JSON.parse(dataTmp); } else { data = '{}'; } return data; }; var correctNumber = function correctNumber(number) { return number < 10 ? '0' + number : number; }; // Return timestamp var getDateTime = function getDateTime() { var now = new Date(); var year = now.getFullYear(); var month = correctNumber(now.getMonth() + 1); var day = correctNumber(now.getDate()); var hours = correctNumber(now.getHours()); var minutes = correctNumber(now.getMinutes()); return year + '-' + month + '-' + day + '-' + hours + minutes; }; // Plugins options var options = { del: [ 'dest', 'tmp' ], plumber: { errorHandler: errorHandler }, browserSync: { server: { baseDir: './dest' } }, stylus: { use: [ rupture(), autoprefixer({ browsers: ['last 2 version', '> 1%', 'safari 5', 'ie 8', 'ie 7', 'opera 12.1', 'ios 6', 'android 4'], cascade: false }) ] }, cssbeautify: { indent: '\t', autosemicolon: true }, jade: { pretty: '\t' }, htmlPrettify: { "unformatted": ["pre", "code"], "indent_with_tabs": true, "preserve_newlines": true, "brace_style": "expand", "end_with_newline": true }, svgSymbols: { title: false, id: '%f', className: '%f', templates: [ path.join(__dirname, 'source/static/styles/components/icons-template.styl'), 'default-svg' ] }, imagemin: { optimizationLevel: 3, progressive: true, interlaced: true, svgoPlugins: [{removeViewBox: false}], use: [ imageminPngquant(), imageminSvgo() ] } }; gulp.task('cleanup', function (cb) { return del(options.del, cb); }); gulp.task('browser-sync', function() { return browserSync.init(options.browserSync); }); gulp.task('bs-reload', function (cb) { browserSync.reload(); }); gulp.task('combine-modules-styles', function (cb) { return gulp.src(['**/*.styl', '!**/_*.styl'], {cwd: 'source/modules'}) .pipe(plumber(options.plumber)) .pipe(concat('modules.styl')) .pipe(gulp.dest('tmp')); }); gulp.task('compile-styles', function (cb) { return gulp.src(['*.styl', '!_*.styl'], {cwd: 'source/static/styles'}) .pipe(plumber(options.plumber)) .pipe(stylus(options.stylus)) .pipe(gcmq({beautify: false})) .pipe(cssbeautify(options.cssbeautify)) .pipe(csscomb()) .pipe(gulp.dest('dest/css')) .pipe(csso()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('dest/css')) .pipe(browserSync.stream()); }); gulp.task('combine-modules-data', function (cb) { return gulp.src(['**/*.js', '!**/_*.js'], {cwd: 'source/modules/*/data'}) .pipe(plumber(options.plumber)) .pipe(concat('data.js', { newLine: ',\n\n' })) .pipe(gulp.dest('tmp')); }); gulp.task('compile-pages', function (cb) { return gulp.src(['**/*.jade', '!**/_*.jade'], {cwd: 'source/pages'}) .pipe(plumber(options.plumber)) .pipe(data(getData('tmp/data.js'))) .pipe(jade(options.jade)) .pipe(htmlPrettify(options.htmlPrettify)) .pipe(gulp.dest('dest')); }); gulp.task('copy-modules-img', function (cb) { return gulp.src('**/*.{jpg,gif,svg,png}', {cwd: 'source/modules/*/assets'}) .pipe(plumber(options.plumber)) .pipe(changed('dest/img')) .pipe(imagemin(options.imagemin)) .pipe(flatten()) .pipe(gulp.dest('dest/img')); }); gulp.task('combine-modules-scripts', function (cb) { return gulp.src(['*.js', '!_*.js'], {cwd: 'source/modules/*'}) .pipe(plumber(options.plumber)) .pipe(concat('modules.js', { newLine: '\n\n' })) .pipe(gulp.dest('tmp')); }); gulp.task('copy-assets', function (cb) { var imageFilter = filter('**/*.{jpg,gif,svg,png}', {restore: true}); var scriptsFilter = filter(['**/*.js', '!**/*.min.js'], {restore: true}); var stylesFilter = filter(['**/*.css', '!**/*.min.css'], {restore: true}); return gulp.src(['**/*.*', '!**/_*.*'], {cwd: 'source/static/assets'}) .pipe(plumber(options.plumber)) .pipe(changed('dest')) // Minify images .pipe(imageFilter) .pipe(changed('dest')) .pipe(imagemin(options.imagemin)) .pipe(imageFilter.restore) // Minify JavaScript files .pipe(scriptsFilter) .pipe(gulp.dest('dest')) .pipe(uglify()) .pipe(rename({suffix: '.min'})) .pipe(scriptsFilter.restore) // Minify css .pipe(stylesFilter) .pipe(csso()) .pipe(rename({suffix: '.min'})) .pipe(stylesFilter.restore) // Copy other files .pipe(gulp.dest('dest')); }); gulp.task('combine-scripts', function (cb) { return gulp.src(['*.js', '!_*.js'], {cwd: 'source/static/scripts'}) .pipe(plumber(options.plumber)) .pipe(include()) .pipe(gulp.dest('dest/js')) .pipe(uglify()) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('dest/js')); }); gulp.task('combine-svg-icons', function (cb) { return gulp.src(['**/*.svg', '!**/_*.svg'], {cwd: 'source/static/icons'}) .pipe(plumber(options.plumber)) .pipe(imagemin(options.imagemin)) .pipe(svgSymbols(options.svgSymbols)) .pipe(gulpif(/\.styl$/, gulp.dest('tmp'))) .pipe(gulpif(/\.svg$/, rename('icons.svg'))) .pipe(gulpif(/\.svg$/, gulp.dest('dest/img'))); }); gulp.task('build-zip', function() { var datetime = '-' + getDateTime(); var zipName = 'dist' + datetime + '.zip'; return gulp.src('dest/**/*') .pipe(gulpZip(zipName)) .pipe(gulp.dest('zip')); }); gulp.task('build-html', function (cb) { return runSequence( 'combine-modules-data', 'compile-pages', cb ); }); gulp.task('build-css', function (cb) { return runSequence( 'combine-modules-styles', 'compile-styles', cb ); }); gulp.task('build-js', function (cb) { return runSequence( 'combine-modules-scripts', 'combine-scripts', cb ); }); gulp.task('build', function (cb) { return runSequence( 'cleanup', 'combine-svg-icons', [ 'build-html', 'copy-modules-img', 'copy-assets', 'build-css', 'build-js' ], cb ); }); gulp.task('zip', function (cb) { return runSequence( 'build', 'build-zip', cb ); }); gulp.task('develop', function (cb) { return runSequence( 'build', 'browser-sync', cb ); }); gulp.task('dev', ['develop'], function (cb) { // Modules, pages watch('source/**/*.jade', function() { return runSequence('compile-pages', browserSync.reload); }); // Modules data watch('source/modules/*/data/*.js', function() { return runSequence('build-html', browserSync.reload); }); // Static styles watch('source/static/styles/**/*.styl', function() { // return runSequence('compile-styles'); gulp.start('compile-styles'); }); // Modules styles watch('source/modules/**/*.styl', function() { // return runSequence('build-css'); gulp.start('build-css'); }); // Static scripts watch('source/static/scripts/**/*.js', function() { return runSequence('combine-scripts', browserSync.reload); }); // Modules scripts watch('source/modules/*/*.js', function() { return runSequence('build-js', browserSync.reload); }); // Modules images watch('source/modules/*/assets/**/*.{jpg,gif,svg,png}', function() { return runSequence('copy-modules-img', browserSync.reload); }); // Static files watch('source/static/assets/**/*', function() { return runSequence('copy-assets', browserSync.reload); }); // Svg icons watch('source/static/icons/**/*.svg', function() { return runSequence('combine-svg-icons', browserSync.reload); }); });
cloud00/fast-front
gulpfile.js
JavaScript
mit
9,271
<?php namespace Lib\Router\Exception; class NotFoundException extends \Exception{}
nirnanaaa/ofwn
libs/Lib/Router/Exception/NotFoundException.php
PHP
mit
85
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; namespace Lab2A.Models.AccountViewModels { public class LoginViewModel { [Required] [EmailAddress] public string Email { get; set; } [Required] [DataType(DataType.Password)] public string Password { get; set; } [Display(Name = "Remember me?")] public bool RememberMe { get; set; } } }
jongalloway/aspnetcore-workshop
Labs/Code/Lab2A/src/Lab2A/Models/AccountViewModels/LoginViewModel.cs
C#
mit
509
import Ember from 'ember'; import PaginatedScrollViewMixin from 'kowa/mixins/paginated-scroll-view'; var PaginatedScrollBox = Ember.View.extend(PaginatedScrollViewMixin); export default PaginatedScrollBox;
aymerick/kowa-client
app/views/paginated-scroll-box.js
JavaScript
mit
208
var assert = require('assert'); var listXf = require('./helpers/listXf'); var R = require('..'); describe('any', function() { var odd = function(n) {return n % 2 === 1;}; var T = function() {return true;}; var intoArray = R.into([]); it('returns true if any element satisfies the predicate', function() { assert.strictEqual(R.any(odd, [2, 4, 6, 8, 10, 11, 12]), true); }); it('returns false if all elements fails to satisfy the predicate', function() { assert.strictEqual(R.any(odd, [2, 4, 6, 8, 10, 12]), false); }); it('returns true into array if any element satisfies the predicate', function() { assert.deepEqual(intoArray(R.any(odd), [2, 4, 6, 8, 10, 11, 12]), [true]); }); it('returns false if all elements fails to satisfy the predicate', function() { assert.deepEqual(intoArray(R.any(odd), [2, 4, 6, 8, 10, 12]), [false]); }); it('works with more complex objects', function() { var people = [{first: 'Paul', last: 'Grenier'}, {first:'Mike', last: 'Hurley'}, {first: 'Will', last: 'Klein'}]; var alliterative = function(person) {return person.first.charAt(0) === person.last.charAt(0);}; assert.strictEqual(R.any(alliterative, people), false); people.push({first: 'Scott', last: 'Sauyet'}); assert.strictEqual(R.any(alliterative, people), true); }); it('can use a configurable function', function() { var teens = [{name: 'Alice', age: 14}, {name: 'Betty', age: 18}, {name: 'Cindy', age: 17}]; var atLeast = function(age) {return function(person) {return person.age >= age;};}; assert.strictEqual(R.any(atLeast(16), teens), true, 'Some can legally drive'); assert.strictEqual(R.any(atLeast(21), teens), false, 'None can legally drink'); }); it('returns false for an empty list', function() { assert.strictEqual(R.any(T, []), false); }); it('returns false into array for an empty list', function() { assert.deepEqual(intoArray(R.any(T), []), [false]); }); it('dispatches when given a transformer in list position', function() { assert.deepEqual(R.any(odd, listXf), { any: false, f: odd, xf: listXf }); }); it('is automatically curried', function() { var count = 0; var test = function(n) {count++; return odd(n);}; assert(R.any(test)([2, 4, 6, 7, 8, 10]) === true); }); });
megawac/ramda
test/any.js
JavaScript
mit
2,480
@extends('frontend.layouts.default') @section('content') <div class="breadcrumb-wrapper"> <div class="pattern-overlay"> <div class="container"> <div class="row"> <div class="col-lg-6 col-md-6 col-xs-12 col-sm-6"> <h2 class="title">Recent Events</h2> </div> <div class="col-lg-6 col-md-6 col-xs-12 col-sm-6"> <div class="breadcrumbs pull-right"> <ul> <li><a href="{!! URL::to('/') !!}">Home</a></li> <li><a href="#">Events</a></li> </ul> </div> </div> </div> </div> </div> </div> <!-- Main Content start--> <div class="content margin-top60 margin-bottom60"> <div class="container"> <div class="row"> <!-- Blog Posts --> <div class="posts-block col-lg-8 col-md-8 col-sm-8 col-xs-12"> @foreach($events as $event) <!-- Blog Post 1 --> <article class="post hentry"> <div class="post-image"> <a href="{!! asset($event->banner) !!}" data-rel="prettyPhoto"> <span class="img-hover"></span> <span class="fullscreen"><i class="fa fa-plus"></i></span> <img src="{!! asset($event->banner) !!}" alt="" width="800px" class="img-responsive"> </a> </div> <header class="post-header"> <h2><a href="{!! route('event.details',$event->event_meta_data) !!}" title="dd"> {!! $event->headline !!}</a></h2> <div class="blog-entry-meta"> <div class="blog-entry-meta-author"> <i class="fa fa-user"></i> <span class="blog-entry-meta-author">Department: {!! $event->dept->name !!}</span> </div> <div class="blog-entry-meta-tags"> <i class="fa fa-tags"></i> <a href="#">Venue: {!! $event->venue !!}</a>, </div> <div class="blog-entry-meta-date"> <i class="fa fa-clock-o"></i> <span class="blog-entry-meta-date-day">Start Date: {!! $event->start_time !!}</span> </div> </div> </header> <div class="post-content"> <p> {!! strip_tags(str_limit($event->description, 350)) !!} </p> </div> <footer class="post-footer"> <a class="btn btn-color" href="{!! route('event.details',$event->event_meta_data) !!}" class="readmore">Read More</a> </footer> </article> <!-- /Blog Post 1 --> <!-- Star--> <div class="star"> <div class="row"> <div class="col-md-12"> <div class="star-divider"> <div class="star-divider-icon"> <i class=" fa fa-star"></i> </div> </div> </div> </div> </div> <!-- /Star --> @endforeach <!-- /Star --> <ul class="pager"> {!! $events->render() !!} </ul> </div> <!-- /Blog Posts --> @include('frontend.includes.rightsidebarEvent') </div> </div> </div> <!-- /Main Content end--> @stop @section('style') <style> </style> @stop @section('script') @stop
talha08/sust-society
resources/views/event.blade.php
PHP
mit
4,484
<?php namespace Kids\Controller; use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Kids\Entity\Workshop; use Kids\Entity\Establishment; use Kids\Entity\PublicAge; use Kids\Entity\WorkshopCategory; use Kids\Entity\Address; use Kids\Entity\Kid; use Kids\Entity\KidHasParent; use Kids\Entity\ParentOfKid; use Kids\Entity\WorkshopHasKid; use Kids\Entity\Timetable; class WorkshopController { public function indexAction(Application $app, Request $request) { $workshop = new Workshop(); $list = $workshop->fetchAll(); $age = new PublicAge(); $ages = $age->fetchAll(); $establishment = new Establishment(); $establishments = $establishment->fetchAll(); $categorie = new WorkshopCategory(); $categories = $categorie->fetchAll(); return new Response($app['twig']->render('workshop/index.html.twig', array('workshops' => $list, 'ages' => $ages, 'lieux' => $establishments, 'categories' => $categories))); } public function indexAdminAction(Application $app, Request $request) { $workshop = new Workshop(); $list = $workshop->fetchAll(null, false); return new Response($app['twig']->render('workshop/index_admin.html.twig', array( 'workshops' => $list))); } /** * nouveau atelier * */ public function newAction(Application $app, Request $request) { $user = $app['session']->get('user'); if (empty($user)) { return $app->redirect('/login'); } $age = new PublicAge(); $ages = $age->fetchAll(); $establishment = new Establishment(); $establishments = $establishment->fetchAll(); $workshop = new WorkshopCategory(); $workshops = $workshop->fetchAll(); if ($request->isMethod('post')){ // upload images $target_dir = __DIR__.'/../../web/images/'; $filename = time() . basename($_FILES["fileToUpload"]["name"]); $target_file = $target_dir . $filename; $uploadOk = 1; $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); // Check if image file is a actual image or fake image $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { echo "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { echo "File is not an image."; $uploadOk = 0; } // Check if file already exists if (file_exists($target_file)) { echo "Sorry, file already exists."; $uploadOk = 0; } // Check file size if ($_FILES["fileToUpload"]["size"] > 9999999) { echo "Sorry, your file is too large."; $uploadOk = 0; } // Allow certain file formats if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) { echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; $uploadOk = 0; } // Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { echo "Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; } else { echo "Sorry, there was an error uploading your file."; } } $workshop = new Workshop(); if (isset($_POST['visibility']) && $_POST['visibility'] != null) { $visibility = 1; } else { $visibility = 0; } $workshop ->setTitle($_POST['title']) ->setDescription($_POST['description']) ->setPrice($_POST['price']) ->setMaxKids($_POST['max_kids']) ->setImage($filename) ->setVisible($visibility) ->setPublicAgeId($_POST['age']) ->setEstablishmentId($_POST['establishment']) ->setWorkshopCategoryId($_POST['category']); $workshop->save(); $timetable = new Timetable(); $date = explode('/', $_POST['debut']); $dateFormat = $date[2] . '-' . $date[1] . '-' . $date[0]; $startAt = $dateFormat . ' ' . $_POST['hours_debut']; $endAt = $dateFormat . ' ' . $_POST['hours_fin']; $timetable->setStartAt($startAt) ->setEndAt($endAt) ->setWorkshopId($workshop->getId()) ->save(); return $app->redirect('/admin/ateliers'); } return new Response($app['twig']->render('workshop/new.html.twig', array( 'ages' => $ages, 'establishments' => $establishments, 'workshops_category' => $workshops, ))); } public function deleteAction(Application $app, Request $request) { $user = $app['session']->get('user'); if (empty($user)) { return $app->redirect('/login'); } $id = $request->get('id'); $workshopModel = new Workshop(); $workshop = $workshopModel->delete($id); return $app->redirect('/admin/ateliers'); } public function registerAction(Application $app, Request $request) { $default = ($request->get('id') != null ? $request->get('id') : null); $workshop = new Workshop(); $list = $workshop->fetchAll(); if ($request->isMethod('post')){ $address = new Address(); $address->setAddress($_POST['adresse']) ->setComplement($_POST['complement']) ->setCity($_POST['ville']) ->setZipcode($_POST['code_postal']) ->save(); $parent = new ParentOfKid(); $parent->setFirstname($_POST['parent_prenom']) ->setLastname($_POST['parent_nom']) ->setEmail($_POST['mail']) ->setAddressId($address->getId()) ->setPhone($_POST['telephone']) ->save(); $enfant = new Kid(); $birthday = explode('/', $_POST['enfant1_naissance']); $birthdayFormat = $birthday[2] . '-' . $birthday[1] . '-' . $birthday[0]; $enfant->setFirstname($_POST['enfant1_prenom']) ->setLastname($_POST['enfant1_nom']) ->setBirthday($birthdayFormat) ->setClassroom( ($_POST['enfant1_classe'] == '' ? 'NULL' : $_POST['enfant1_classe'])) ->save(); $WorkshopHasKid = new WorkshopHasKid(); $WorkshopHasKid->setWorkshopId($_POST['ateliers']) ->setKidId($enfant->getId()) ->save(); $kidHasParent = new KidHasParent(); $kidHasParent->setKidId($enfant->getId()) ->setParentId($parent->getId()) ->save(); if ($_POST['enfant2_nom'] != '' && $_POST['enfant2_prenom'] != '' && $_POST['enfant2_naissance'] != '') { $enfant = new Kid(); $birthday = explode('/', $_POST['enfant2_naissance']); $birthdayFormat = $birthday[2] . '-' . $birthday[1] . '-' . $birthday[0]; $enfant->setFirstname($_POST['enfant2_prenom']) ->setLastname($_POST['enfant2_nom']) ->setBirthday($birthdayFormat) ->setClassroom( ($_POST['enfant2_classe'] == '' ? 'NULL' : $_POST['enfant2_classe'])) ->save(); $WorkshopHasKid = new WorkshopHasKid(); $WorkshopHasKid->setWorkshopId($_POST['ateliers']) ->setKidId($enfant->getId()) ->save(); $kidHasParent = new KidHasParent(); $kidHasParent->setKidId($enfant->getId()) ->setParentId($parent->getId()) ->save(); } $app['session']->getFlashBag()->add('message', 'Votre inscription a bien été enregistrer.'); return $app->redirect('/ateliers'); } return new Response($app['twig']->render('workshop/register.html.twig', array('workshops' => $list, 'default' => $default))); } public function attenteAdminAction(Application $app, Request $request) { $user = $app['session']->get('user'); if (empty($user)) { return $app->redirect('/login'); } $workshop = new WorkshopHasKid(); $list = $workshop->fetchAll(); if ($request->get('workshop') != NULL && $request->get('response') != NULL && $request->get('kid') != NULL) { $workshop->edit($request->get('response'), $request->get('workshop'), $request->get('kid')); return $app->redirect('/ateliers/attente'); } return new Response($app['twig']->render('workshop/attente.html.twig', array('workshops' => $list))); } }
AshvinPainiaye/simplon-kids
src/Controller/WorkshopController.php
PHP
mit
8,315
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AuthorizeNet.Api.Contracts.V1; using AuthorizeNet.Api.Controllers; using AuthorizeNet.Api.Controllers.Bases; namespace net.authorize.sample { public class GetAccountUpdaterJobSummary { public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) { Console.WriteLine("Get Account Updater job summary sample"); ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX; // define the merchant information (authentication / transaction id) ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType() { name = ApiLoginID, ItemElementName = ItemChoiceType.transactionKey, Item = ApiTransactionKey, }; // Set a valid month for the request string month = "2017-07"; // Build tbe request object var request = new getAUJobSummaryRequest(); request.month = month; // Instantiate the controller that will call the service var controller = new getAUJobSummaryController(request); controller.Execute(); // Get the response from the service (errors contained if any) var response = controller.GetApiResponse(); if (response != null && response.messages.resultCode == messageTypeEnum.Ok) { Console.WriteLine("SUCCESS: Get Account Updater Summary for Month : " + month); if (response.auSummary == null) { Console.WriteLine("No Account Updater summary for this month."); return response; } // Displaying the summary of each response in the list foreach (var result in response.auSummary) { Console.WriteLine(" Reason Code : " + result.auReasonCode); Console.WriteLine(" Reason Description : " + result.reasonDescription); Console.WriteLine(" # of Profiles updated for this reason : " + result.profileCount); } } else if (response != null) { Console.WriteLine("ERROR : Invalid response"); Console.WriteLine("Response : " + response.messages.message[0].code + " " + response.messages.message[0].text); } return response; } } }
AuthorizeNet/sample-code-csharp
TransactionReporting/GetAccountUpdaterJobSummary.cs
C#
mit
2,682
import {Vec3f} from "./Vec3f"; import {Quaternion} from "./Quaternion"; import {MathUtils} from "./MathUtils"; import {Vec4f} from "./Vec4f"; /** * Created by r3f on 7/1/2016. */ export class Mat4f{ // Matrix row & column values as in i,j m:Float32Array; /* * Constructor Mat4f() * @info: Rows and columns are 0 by default */ constructor(m?:Float32Array) { this.m = m?m:new Float32Array(16); } identity(overwrite:boolean=false):Mat4f { if (!overwrite) { var mat = new Mat4f() mat.m[0] = 1; mat.m[1] = 0; mat.m[2] = 0; mat.m[3] = 0; mat.m[4] = 0; mat.m[5] = 1; mat.m[6] = 0; mat.m[7] = 0; mat.m[8] = 0; mat.m[9] = 0; mat.m[10] = 1; mat.m[11] = 0; mat.m[12] = 0; mat.m[13] = 0; mat.m[14] = 0; mat.m[15] = 1; return mat; } this.m[0] = 1; this.m[1] = 0; this.m[2] = 0; this.m[3] = 0; this.m[4] = 0; this.m[5] = 1; this.m[6] = 0; this.m[7] = 0; this.m[8] = 0; this.m[9] = 0; this.m[10] = 1; this.m[11] = 0; this.m[12] = 0; this.m[13] = 0; this.m[14] = 0; this.m[15] = 1; return this; } transpose(overwrite:boolean=false):Mat4f { if (!overwrite) { var mat = new Mat4f(); var a01 = this.m[1], a02 = this.m[2], a03 = this.m[3], a12 = this.m[6], a13 = this.m[7], a23 = this.m[11]; mat.m[1] = mat[4]; mat.m[2] = mat[8]; mat.m[3] = mat[12]; mat.m[4] = a01; mat.m[6] = mat[9]; mat.m[7] = mat[13]; mat.m[8] = a02; mat.m[9] = a12; mat.m[11] = mat[14]; mat.m[12] = a03; mat.m[13] = a13; mat.m[14] = a23; return mat; } this.m[0] = this.m[0]; this.m[1] = this.m[4]; this.m[2] = this.m[8]; this.m[3] = this.m[12]; this.m[4] = this.m[1]; this.m[5] = this.m[5]; this.m[6] = this.m[9]; this.m[7] = this.m[13]; this.m[8] = this.m[2]; this.m[9] = this.m[6]; this.m[10] = this.m[10]; this.m[11] = this.m[14]; this.m[12] = this.m[3]; this.m[13] = this.m[7]; this.m[14] = this.m[11]; this.m[15] = this.m[15]; return this; } determinant():number { // Cache the matrix values (makes for huge speed increases!) var a00 = this.m[0], a01 = this.m[1], a02 = this.m[2], a03 = this.m[3], a10 = this.m[4], a11 = this.m[5], a12 = this.m[6], a13 = this.m[7], a20 = this.m[8], a21 = this.m[9], a22 = this.m[10], a23 = this.m[11], a30 = this.m[12], a31 = this.m[13], a32 = this.m[14], a33 = this.m[15]; return (a30 * a21 * a12 * a03 - a20 * a31 * a12 * a03 - a30 * a11 * a22 * a03 + a10 * a31 * a22 * a03 + a20 * a11 * a32 * a03 - a10 * a21 * a32 * a03 - a30 * a21 * a02 * a13 + a20 * a31 * a02 * a13 + a30 * a01 * a22 * a13 - a00 * a31 * a22 * a13 - a20 * a01 * a32 * a13 + a00 * a21 * a32 * a13 + a30 * a11 * a02 * a23 - a10 * a31 * a02 * a23 - a30 * a01 * a12 * a23 + a00 * a31 * a12 * a23 + a10 * a01 * a32 * a23 - a00 * a11 * a32 * a23 - a20 * a11 * a02 * a33 + a10 * a21 * a02 * a33 + a20 * a01 * a12 * a33 - a00 * a21 * a12 * a33 - a10 * a01 * a22 * a33 + a00 * a11 * a22 * a33); } inverse(overwrite:boolean=false) { var mat = this.m; if(overwrite){ var dest:Mat4f = this; }else{ var dest = new Mat4f(); } // Cache the matrix values (makes for huge speed increases!) var a00 = mat[0], a01 = mat[1], a02 = mat[2], a03 = mat[3], a10 = mat[4], a11 = mat[5], a12 = mat[6], a13 = mat[7], a20 = mat[8], a21 = mat[9], a22 = mat[10], a23 = mat[11], a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15], b00 = a00 * a11 - a01 * a10, b01 = a00 * a12 - a02 * a10, b02 = a00 * a13 - a03 * a10, b03 = a01 * a12 - a02 * a11, b04 = a01 * a13 - a03 * a11, b05 = a02 * a13 - a03 * a12, b06 = a20 * a31 - a21 * a30, b07 = a20 * a32 - a22 * a30, b08 = a20 * a33 - a23 * a30, b09 = a21 * a32 - a22 * a31, b10 = a21 * a33 - a23 * a31, b11 = a22 * a33 - a23 * a32, d = (b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06), invDet; // Calculate the determinant if (!d) { return null; } invDet = 1 / d; dest.m[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet; dest.m[1] = (-a01 * b11 + a02 * b10 - a03 * b09) * invDet; dest.m[2] = (a31 * b05 - a32 * b04 + a33 * b03) * invDet; dest.m[3] = (-a21 * b05 + a22 * b04 - a23 * b03) * invDet; dest.m[4] = (-a10 * b11 + a12 * b08 - a13 * b07) * invDet; dest.m[5] = (a00 * b11 - a02 * b08 + a03 * b07) * invDet; dest.m[6] = (-a30 * b05 + a32 * b02 - a33 * b01) * invDet; dest.m[7] = (a20 * b05 - a22 * b02 + a23 * b01) * invDet; dest.m[8] = (a10 * b10 - a11 * b08 + a13 * b06) * invDet; dest.m[9] = (-a00 * b10 + a01 * b08 - a03 * b06) * invDet; dest.m[10] = (a30 * b04 - a31 * b02 + a33 * b00) * invDet; dest.m[11] = (-a20 * b04 + a21 * b02 - a23 * b00) * invDet; dest.m[12] = (-a10 * b09 + a11 * b07 - a12 * b06) * invDet; dest.m[13] = (a00 * b09 - a01 * b07 + a02 * b06) * invDet; dest.m[14] = (-a30 * b03 + a31 * b01 - a32 * b00) * invDet; dest.m[15] = (a20 * b03 - a21 * b01 + a22 * b00) * invDet; return dest; } toRotationMat() { var dest:Mat4f = new Mat4f(); dest.m[0] = this.m[0]; dest.m[1] = this.m[1]; dest.m[2] = this.m[2]; dest.m[3] = this.m[3]; dest.m[4] = this.m[4]; dest.m[5] = this.m[5]; dest.m[6] = this.m[6]; dest.m[7] = this.m[7]; dest.m[8] = this.m[8]; dest.m[9] = this.m[9]; dest.m[10] = this.m[10]; dest.m[11] = this.m[11]; dest.m[12] = 0; dest.m[13] = 0; dest.m[14] = 0; dest.m[15] = 1; return dest; } frustum(left, right, bottom, top, near, far, overwrite:boolean=false) { if(overwrite){ var dest:Mat4f = this; }else{ dest = new Mat4f(); } var rl = (right - left), tb = (top - bottom), fn = (far - near); dest.m[0] = (near * 2) / rl; dest.m[1] = 0; dest.m[2] = 0; dest.m[3] = 0; dest.m[4] = 0; dest.m[5] = (near * 2) / tb; dest.m[6] = 0; dest.m[7] = 0; dest.m[8] = (right + left) / rl; dest.m[9] = (top + bottom) / tb; dest.m[10] = -(far + near) / fn; dest.m[11] = -1; dest.m[12] = 0; dest.m[13] = 0; dest.m[14] = -(far * near * 2) / fn; dest.m[15] = 0; return dest; } perspective(fovy, aspect, near, far, overwrite:boolean=false) { var top = near * Math.tan(fovy * Math.PI / 360.0), right = top * aspect; return this.frustum(-right, right, -top, top, near, far, overwrite); } lookAt(eye, center, up) { var x0, x1, x2, y0, y1, y2, z0, z1, z2, len, eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2], centerx = center[0], centery = center[1], centerz = center[2]; if (eyex === centerx && eyey === centery && eyez === centerz) { return this.identity(true); } //vec3.direction(eye, center, z); z0 = eyex - centerx; z1 = eyey - centery; z2 = eyez - centerz; // normalize (no check needed for 0 because of early return) len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2); z0 *= len; z1 *= len; z2 *= len; //vec3.normalize(vec3.cross(up, z, x)); x0 = upy * z2 - upz * z1; x1 = upz * z0 - upx * z2; x2 = upx * z1 - upy * z0; len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2); if (!len) { x0 = 0; x1 = 0; x2 = 0; } else { len = 1 / len; x0 *= len; x1 *= len; x2 *= len; } //vec3.normalize(vec3.cross(z, x, y)); y0 = z1 * x2 - z2 * x1; y1 = z2 * x0 - z0 * x2; y2 = z0 * x1 - z1 * x0; len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2); if (!len) { y0 = 0; y1 = 0; y2 = 0; } else { len = 1 / len; y0 *= len; y1 *= len; y2 *= len; } this.m[0] = x0; this.m[1] = y0; this.m[2] = z0; this.m[3] = 0; this.m[4] = x1; this.m[5] = y1; this.m[6] = z1; this.m[7] = 0; this.m[8] = x2; this.m[9] = y2; this.m[10] = z2; this.m[11] = 0; this.m[12] = -(x0 * eyex + x1 * eyey + x2 * eyez); this.m[13] = -(y0 * eyex + y1 * eyey + y2 * eyez); this.m[14] = -(z0 * eyex + z1 * eyey + z2 * eyez); this.m[15] = 1; return this; } multiply(mat2) { var dest = new Mat4f(); var mat = this.m; // Cache the matrix values (makes for huge speed increases!) var a00 = mat[ 0], a01 = mat[ 1], a02 = mat[ 2], a03 = mat[3]; var a10 = mat[ 4], a11 = mat[ 5], a12 = mat[ 6], a13 = mat[7]; var a20 = mat[ 8], a21 = mat[ 9], a22 = mat[10], a23 = mat[11]; var a30 = mat[12], a31 = mat[13], a32 = mat[14], a33 = mat[15]; // Cache only the current line of the second matrix var b0 = mat2.m[0], b1 = mat2.m[1], b2 = mat2.m[2], b3 = mat2.m[3]; dest.m[0] = b0*a00 + b1*a10 + b2*a20 + b3*a30; dest.m[1] = b0*a01 + b1*a11 + b2*a21 + b3*a31; dest.m[2] = b0*a02 + b1*a12 + b2*a22 + b3*a32; dest.m[3] = b0*a03 + b1*a13 + b2*a23 + b3*a33; b0 = mat2.m[4]; b1 = mat2.m[5]; b2 = mat2.m[6]; b3 = mat2.m[7]; dest.m[4] = b0*a00 + b1*a10 + b2*a20 + b3*a30; dest.m[5] = b0*a01 + b1*a11 + b2*a21 + b3*a31; dest.m[6] = b0*a02 + b1*a12 + b2*a22 + b3*a32; dest.m[7] = b0*a03 + b1*a13 + b2*a23 + b3*a33; b0 = mat2.m[8]; b1 = mat2.m[9]; b2 = mat2.m[10]; b3 = mat2.m[11]; dest.m[8] = b0*a00 + b1*a10 + b2*a20 + b3*a30; dest.m[9] = b0*a01 + b1*a11 + b2*a21 + b3*a31; dest.m[10] = b0*a02 + b1*a12 + b2*a22 + b3*a32; dest.m[11] = b0*a03 + b1*a13 + b2*a23 + b3*a33; b0 = mat2.m[12]; b1 = mat2.m[13]; b2 = mat2.m[14]; b3 = mat2.m[15]; dest.m[12] = b0*a00 + b1*a10 + b2*a20 + b3*a30; dest.m[13] = b0*a01 + b1*a11 + b2*a21 + b3*a31; dest.m[14] = b0*a02 + b1*a12 + b2*a22 + b3*a32; dest.m[15] = b0*a03 + b1*a13 + b2*a23 + b3*a33; return dest; } multiplyVec4(vec) { var dest = new Vec4f(); var x = vec[0], y = vec[1], z = vec[2], w = vec[3]; dest.x = this.m[0] * x + this.m[4] * y + this.m[8] * z + this.m[12] * w; dest.y = this.m[1] * x + this.m[5] * y + this.m[9] * z + this.m[13] * w; dest.z = this.m[2] * x + this.m[6] * y + this.m[10] * z + this.m[14] * w; dest.w = this.m[3] * x + this.m[7] * y + this.m[11] * z + this.m[15] * w; return dest; } }
01alchemist/ParallelPathTracerJS
src/parallelpath/util/math/Mat4f.ts
TypeScript
mit
11,955
module.exports = function (options, suite, test, expect, teardown) { require('./integration.expressions')(options, suite, test, expect, teardown); suite('tribe.storage.integration.' + options.type, function () { var storage = require('tribe.storage'), db; test("basic store and retrieve", function () { return open(['p1', 'p2'], [ { p1: 1, p2: 'test' }, { p1: 2, p2: 'test2' } ]) .then(function (container) { return container.retrieve({ p: 'p1', v: 1 }); }) .then(function (rows) { expect(rows.length).to.equal(1); expect(rows[0]).to.deep.equal({ p1: 1, p2: 'test' }); }); }); test("multiple key index store and retrieve", function () { return open([['p1', 'p2']], [ { p1: 'test', p2: 1 }, { p1: 'test', p2: 2 }, { p1: 'test', p2: 3 }, { p1: 'test2', p2: 2 }, ]) .then(function (container) { return container.retrieve([{ p: 'p1', v: 'test' }, { p: 'p2', o: '>=', v: 2 }]); }) .then(function (rows) { expect(rows.length).to.equal(2); }); }); // this was originally done by sorting the index. this won't work with indexeddb as order is significant // we can store some metadata about index order and apply expression components in the correct order. todo. //test("multiple key order does not need to match expression order", function () { // return open([['p1', 'p2']], [{ p1: 'test', p2: 1 }]) // .then(function (container) { // return container.retrieve([{ p: 'p2', v: 1 }, { p: 'p1', v: 'test' }]); // }) // .then(function (rows) { // expect(rows.length).to.equal(1); // }); //}); test("complex object store and retrieve", function () { return open([['p1.p2', 'p3']], [ { p1: { p2: 'test' }, p3: 1 }, { p1: { p2: 'test' }, p3: 1 }, { p1: { p2: 'test2' }, p3: 1 } ]) .then(function (container) { return container.retrieve([{ p: 'p1.p2', v: 'test' }, { p: 'p3', v: 1 }]); }) .then(function (rows) { expect(rows.length).to.equal(2); }); }); test("keyPath can be queried when autoIncrement is set", function () { return open([], [ { p2: 'test' }, { p2: 'test2' } ], 'p1', true) .then(function (container) { return container.retrieve({ p: 'p1', v: 1 }); }) .then(function (rows) { expect(rows.length).to.equal(1); expect(rows[0]).to.deep.equal({ p1: 1, p2: 'test' }); }); }); test("keyPath can be queried when autoIncrement is not set", function () { return open([], [ { p1: 3, p2: 'test' }, { p1: 4, p2: 'test2' } ], 'p1', false) .then(function (container) { return container.retrieve({ p: 'p1', v: 3 }); }) .then(function (rows) { expect(rows.length).to.equal(1); expect(rows[0]).to.deep.equal({ p1: 3, p2: 'test' }); }); }); test("keyPath can be queried with indexes", function () { return open(['p2'], [ { p1: 1, p2: 'test' }, { p1: 2, p2: 'test2' } ], 'p1') .then(function (container) { return container.retrieve([{ p: 'p1', v: 1 }, { p: 'p2', v: 'test' }]); }) .then(function (rows) { expect(rows.length).to.equal(1); expect(rows[0]).to.deep.equal({ p1: 1, p2: 'test' }); }); }); test("store operation returns entity with autoIncrement keyPath property set", function () { return open([], [], 'id', true) .then(function (container) { return container.store({}); }) .then(function (updatedEntity) { expect(updatedEntity).to.deep.equal({ id: 1 }); }); }); test("multiple store operation returns entities with autoIncrement keyPath property set", function () { return open([], [], 'id', true) .then(function (container) { return container.store([{}, {}]); }) .then(function (updatedEntity) { expect(updatedEntity).to.deep.equal([{ id: 1 }, { id: 2 }]); }); }); test("stored entity has autoIncrement keyPath property set", function () { var container; return open([], [], 'id', true) .then(function (db) { container = db; return container.store({}); }) .then(function () { return container.retrieve({ p: 'id', v: 1 }); }) .then(function (entities) { expect(entities.length).to.equal(1); expect(entities[0]).to.deep.equal({ id: 1 }); }); }); test("store operation replaces entities with matching keys", function () { var entity; return open([], [{ p1: 1, p2: 'test' }], 'p1') .then(function (provider) { entity = provider; return entity.store({ p1: 1, p2: 'test2' }); }) .then(function () { return entity.retrieve({ p: 'p1', v: 1 }); }) .then(function (entities) { expect(entities.length).to.equal(1); expect(entities[0].p2).to.equal('test2'); }); }); test("single property indexes can be specified and requested as arrays or individually", function () { var container; return open(['p1', ['p2']], [ { p1: 1, p2: 1 }, { p1: 2, p2: 2 } ]) .then(function (result) { container = result; return container.retrieve({ p: 'p1', v: 2 }); }) .then(function (results) { expect(results.length).to.equal(1); }) .then(function (result) { return container.retrieve([{ p: 'p1', v: 2 }]); }) .then(function (results) { expect(results.length).to.equal(1); }) .then(function (result) { return container.retrieve({ p: 'p2', v: 2 }); }) .then(function (results) { expect(results.length).to.equal(1); }) .then(function (result) { return container.retrieve([{ p: 'p2', v: 2 }]); }) .then(function (results) { expect(results.length).to.equal(1); }); }); test("retrieve sorts by index properties", function () { var container; return open([['p1', 'p2.value'], ['p2.value', 'p1']], [ { p1: 4, p2: { value: 1 } }, { p1: 3, p2: { value: 2 } }, { p1: 1, p2: { value: 1 } }, { p1: 2, p2: { value: 2 } } ]) .then(function (result) { container = result; return container.retrieve([{ p: 'p1', o: '>', v: 0 }, { p: 'p2.value', o: '>', v: 0 }]); }) .then(function (results) { expect(results).to.deep.equal([ { p1: 1, p2: { value: 1 } }, { p1: 2, p2: { value: 2 } }, { p1: 3, p2: { value: 2 } }, { p1: 4, p2: { value: 1 } } ]); return container.retrieve([{ p: 'p2.value', o: '>', v: 0 }, { p: 'p1', o: '>', v: 0 }]); }) .then(function (results) { expect(results).to.deep.equal([ { p1: 1, p2: { value: 1 } }, { p1: 4, p2: { value: 1 } }, { p1: 2, p2: { value: 2 } }, { p1: 3, p2: { value: 2 } } ]); }); }); test("clear deletes all entities", function () { var container; return open(['p1'], [{ p1: 1, p2: 1 }]) .then(function (result) { container = result; container.clear(); }) .then(function () { return container.retrieve({ p: 'p1', v: 1 }); }) .then(function (messages) { expect(messages.length).to.equal(0); }); }); function open(indexes, entities, keyPath, autoIncrement) { var entity; return storage.open([{ name: 'test', indexes: indexes, keyPath: keyPath, autoIncrement: autoIncrement }], options) .then(function (provider) { db = provider; entity = provider.entity('test'); return entity.store(entities); }) .then(function () { return entity; }); } teardown(function () { db.close(); }); }); };
danderson00/tribe.storage
tests/integration.js
JavaScript
mit
10,388
using System; using App.Common.Extensions; namespace App.Core.Elements { /// <summary> /// Класс для описания списка заявлений по оплате по типам служб. /// </summary> public class Declaration { /// <summary> /// Расчетный период. /// </summary> public string SettlementPeriod { get; set; } /// <summary> /// Имя. /// </summary> public string Name { get; set; } /// <summary> /// Тип. /// </summary> public string Type { get; set; } /// <summary> /// Ресурс. /// </summary> public string Resource { get; set; } /// <summary> /// Регион. /// </summary> public string Region { get; set; } /// <summary> /// SKU. /// </summary> /// <remarks>Указывает уникальный идентификатор системы для каждого ресурса Windows Azure.</remarks> public string SKU { get; set; } /// <summary> /// Единица. /// </summary> public string Unit { get; set; } /// <summary> /// Израсходовано. /// </summary> public string Spent { get; set; } /// <summary> /// Включено. /// </summary> /// <remarks>Содержит объем ресурсов, бесплатно включаемых в текущий расчетный период.</remarks> public string Include { get; set; } /// <summary> /// Подлежит оплате. /// </summary> /// <remarks>Содержит объем ресурсов, подлежащих оплате в текущем расчетном периоде.</remarks> public string Payable { get; set; } /// <summary> /// В рамках обязательства. /// </summary> /// <remarks>Содержит выплаты за ресурсы, которые вычитаются из суммы обязательства, связанной с 6- или 12-месячным предложением. Обратите внимание на то, что выплаты за ресурсы вычитаются из суммы обязательства в хронологическом порядке.</remarks> public string AsPartOfACommitment { get; set; } /// <summary> /// Валюта. /// </summary> /// <remarks>Указывает валюту, используемую в текущем расчетном периоде.</remarks> public string Currency { get; set; } /// <summary> /// Превышение. /// </summary> /// <remarks>Содержит выплаты за ресурсы, которые превышают сумму обязательства, связанную с 6- или 12-месячным предложением.</remarks> public string Excess { get; set; } /// <summary> /// Тариф по обязательствам. /// </summary> /// <remarks>Содержит тариф по обязательствам, который зависит от общей суммы обязательства, связанной с 6- или 12-месячным предложением.</remarks> public string TariffCommitments { get; set; } /// <summary> /// Тариф. /// </summary> /// <remarks>Содержит тариф оплаты по мере использования для ресурса.</remarks> public string Tariff { get; set; } /// <summary> /// Значение. /// </summary> /// <remarks>Содержит итоговую денежную сумму для израсходованного ресурса.</remarks> public string Value { get; set; } /// <summary> /// Инициализация "пустого" объекта. /// </summary> public Declaration() { } /// <summary> /// Инициализация объекта с данными полученными из разбора строки CSV файла. /// </summary> /// <param name="data">Массив строк из файла.</param> public Declaration(string[] data) { SettlementPeriod = data[0]; Name = data[1]; Type = data[2]; Resource = data[3]; Region = data[4]; SKU = data[5]; Unit = data[6]; Spent = data[7]; Include = data[8]; Payable = data[9]; AsPartOfACommitment = data[10]; Currency = data[11]; Excess = data[12]; TariffCommitments = data[13]; Tariff = data[14]; Value = data[15]; } public override string ToString() { return String.Format("Декларация за {0} отчетный период по службе {1}.", SettlementPeriod, Name); } /// <summary> /// Расчет потраченной суммы по декларации. /// </summary> /// <returns>Возвращает значение суммы, реально потраченной на услугу.</returns> public double CalculateSpentValue() { return Convert.ToDouble(Spent.CorrectDouble())*Convert.ToDouble(Tariff.CorrectDouble()); } } }
Digiman/AzureBillingViewer
App.Core/Elements/Declaration.cs
C#
mit
5,760
/* * Copyright (C) 2013-2015 Uncharted Software Inc. * * Property of Uncharted(TM), formerly Oculus Info Inc. * http://uncharted.software/ * * Released under the MIT License. * * 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 influent.server.sql; /** * Represents a SQL FROM clause. This can be used to create complicated * sub-selects that can still be chained together. * * @author cregnier * */ public interface SQLFrom { /** * Sets the name of table to select results from.<br> * This cannot be set if {@link #fromQuery(SQLSelect)} has also been set. * @param name * The name of an existing table in the database * @return */ SQLFrom table(String name); /** * Adds an alias for the table. * @param alias * The name of the alias that will be used in the SQL statement. * @return */ SQLFrom as(String alias); /** * Sets a subquery that should be used to select results from.<br> * This cannot be set if {@link #table(String)} has also been set. * @param fromQuery * A subquery to select results from. * @return */ SQLFrom fromQuery(SQLSelect fromQuery); }
MjAbuz/influent
influent-server/src/main/java/influent/server/sql/SQLFrom.java
Java
mit
2,160
module TinyMVC class BaseModel attr_reader :id def initialize(options = {}) parameters = self.class.stored_parameters + [:id] parameters.each do |attr| instance_variable_set(:"@#{attr}", options[attr.to_s] || options[attr.to_sym]) end end def self.stored_parameters(*args) return @stored_parameters if args.empty? @stored_parameters = *args @stored_parameters.freeze attr_accessor *args end def self.all raise NotImplementedError end def self.find(id) raise NotImplementedError end def self.count raise NotImplementedError end def self.create(options) new(options).save end def self.delete_all raise NotImplementedError end # should generate @id for new record and return self def save raise NotImplementedError end # should return self def delete raise NotImplementedError end def ==(obj) self.class == obj.class && obj.id && self.id == obj.id end def new_record? self.id.nil? end def attributes parameters = self.class.stored_parameters + [:id] parameters.reduce({}) do |hash, attr| hash.merge(attr => instance_variable_get("@#{attr}")) end end end end
DordovskyDmitry/tiny_mvc
lib/tiny_mvc/mvc/model/base_model.rb
Ruby
mit
1,309
<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About ReturnCoin</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;ReturnCoin&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 © 2015 The ReturnCoin 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> Este é um programa experimental. Distribuído sob uma licença de software MIT/X11, por favor verifique o ficheiro anexo license.txt ou http://www.opensource.org/licenses/mit-license.php. Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por Eric Young (eay@cryptsoft.com) e software UPnP escrito por Thomas Bernard.</translation> </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>Clique duas vezes para editar o endereço ou o rótulo</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Criar um novo endereço</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Copie o endereço selecionado para a área de transferência</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your ReturnCoin 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>&amp;Copiar Endereço</translation> </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 ReturnCoin 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>Apagar o endereço selecionado da lista</translation> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified ReturnCoin 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>E&amp;liminar</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation>Copiar &amp;Rótulo</translation> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation>&amp;Editar</translation> </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>Ficheiro separado por vírgulas (*.csv)</translation> </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>Rótulo</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Endereço</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(sem rótulo)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Diálogo de Frase-Passe</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Escreva a frase de segurança</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Nova frase de segurança</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Repita a nova frase de segurança</translation> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+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>Escreva a nova frase de seguraça da sua carteira. &lt;br/&gt; Por favor, use uma frase de &lt;b&gt;10 ou mais caracteres aleatórios,&lt;/b&gt; ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Encriptar carteira</translation> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>A sua frase de segurança é necessária para desbloquear a carteira.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Desbloquear carteira</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>A sua frase de segurança é necessária para desencriptar a carteira.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Desencriptar carteira</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Alterar frase de segurança</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Escreva a frase de segurança antiga seguida da nova para a carteira.</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Confirmar encriptação da carteira</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 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>Tem a certeza que deseja encriptar a carteira?</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>IMPORTANTE: Qualquer cópia de segurança anterior da carteira deverá ser substituída com o novo, actualmente encriptado, ficheiro de carteira. Por razões de segurança, cópias de segurança não encriptadas efectuadas anteriormente do ficheiro da carteira tornar-se-ão inúteis assim que começar a usar a nova carteira encriptada.</translation> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Atenção: A tecla Caps Lock está activa!</translation> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation>Carteira encriptada</translation> </message> <message> <location line="-58"/> <source>ReturnCoin 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>A encriptação da carteira falhou</translation> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>A encriptação da carteira falhou devido a um erro interno. A carteira não foi encriptada.</translation> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation>As frases de segurança fornecidas não coincidem.</translation> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation>O desbloqueio da carteira falhou</translation> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>A frase de segurança introduzida para a desencriptação da carteira estava incorreta.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>A desencriptação da carteira falhou</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>A frase de segurança da carteira foi alterada com êxito.</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+282"/> <source>Sign &amp;message...</source> <translation>Assinar &amp;mensagem...</translation> </message> <message> <location line="+251"/> <source>Synchronizing with network...</source> <translation>Sincronizando com a rede...</translation> </message> <message> <location line="-319"/> <source>&amp;Overview</source> <translation>Visã&amp;o geral</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Mostrar visão geral da carteira</translation> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation>&amp;Transações</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Navegar pelo histórico de transações</translation> </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>Fec&amp;har</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Sair da aplicação</translation> </message> <message> <location line="+6"/> <source>Show information about ReturnCoin</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>Sobre &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>Mostrar informação sobre Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Opções...</translation> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation>E&amp;ncriptar Carteira...</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>&amp;Guardar Carteira...</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>Mudar &amp;Palavra-passe...</translation> </message> <message numerus="yes"> <location line="+259"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform><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="-256"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Send coins to a ReturnCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Modify configuration options for ReturnCoin</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>Faça uma cópia de segurança da carteira para outra localização</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Mudar a frase de segurança utilizada na encriptação da carteira</translation> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation>Janela de &amp;depuração</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>Abrir consola de diagnóstico e depuração</translation> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation>&amp;Verificar mensagem...</translation> </message> <message> <location line="-202"/> <source>ReturnCoin</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation>Carteira</translation> </message> <message> <location line="+180"/> <source>&amp;About ReturnCoin</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>Mo&amp;strar / Ocultar</translation> </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="+35"/> <source>&amp;File</source> <translation>&amp;Ficheiro</translation> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation>Con&amp;figurações</translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation>A&amp;juda</translation> </message> <message> <location line="+12"/> <source>Tabs toolbar</source> <translation>Barra de separadores</translation> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation>[rede de testes]</translation> </message> <message> <location line="+0"/> <location line="+60"/> <source>ReturnCoin client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+75"/> <source>%n active connection(s) to ReturnCoin network</source> <translation type="unfinished"><numerusform></numerusform><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><numerusform></numerusform></translation> </message> <message> <location line="-312"/> <source>About ReturnCoin card</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about ReturnCoin card</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+297"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation>Atualizado</translation> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation>Recuperando...</translation> </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>Transação enviada</translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation>Transação recebida</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>Data: %1 Quantia: %2 Tipo: %3 Endereço: %4 </translation> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid ReturnCoin 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>A carteira está &lt;b&gt;encriptada&lt;/b&gt; e atualmente &lt;b&gt;desbloqueada&lt;/b&gt;</translation> </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>A carteira está &lt;b&gt;encriptada&lt;/b&gt; e atualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation> </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><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation><numerusform>%n dia</numerusform><numerusform>%n dias</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. ReturnCoin 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>Alerta da Rede</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation>Quantidade:</translation> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation>Bytes:</translation> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Quantia:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation>Prioridade:</translation> </message> <message> <location line="+48"/> <source>Fee:</source> <translation>Taxa:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation>Saída Baixa:</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation>não</translation> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation>Depois de taxas:</translation> </message> <message> <location line="+35"/> <source>Change:</source> <translation>Troco:</translation> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation>(des)seleccionar todos</translation> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation>Modo de árvore</translation> </message> <message> <location line="+16"/> <source>List mode</source> <translation>Modo lista</translation> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Quantia</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation>Endereço</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation>Confirmados</translation> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Confirmada</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation>Prioridade</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation>Copiar endereço</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copiar rótulo</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Copiar quantia</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation>Copiar ID da Transação</translation> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation>Copiar quantidade</translation> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation>Taxa de cópia</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Taxa depois de cópia</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Copiar bytes</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Prioridade de Cópia</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation>Copiar output baixo</translation> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Copiar alteração</translation> </message> <message> <location line="+317"/> <source>highest</source> <translation>o maior</translation> </message> <message> <location line="+1"/> <source>high</source> <translation>alto</translation> </message> <message> <location line="+1"/> <source>medium-high</source> <translation>médio-alto</translation> </message> <message> <location line="+1"/> <source>medium</source> <translation>médio</translation> </message> <message> <location line="+4"/> <source>low-medium</source> <translation>baixo-médio</translation> </message> <message> <location line="+1"/> <source>low</source> <translation>baixo</translation> </message> <message> <location line="+1"/> <source>lowest</source> <translation>O mais baixo</translation> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation>sim</translation> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &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>(Sem rótulo)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation>Alteração de %1 (%2)</translation> </message> <message> <location line="+1"/> <source>(change)</source> <translation>(Alteração)</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Editar Endereço</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Rótulo</translation> </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>E&amp;ndereço</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Novo endereço de entrada</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Novo endereço de saída</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Editar endereço de entrada</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>Editar endereço de saída</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>O endereço introduzido &quot;%1&quot; já se encontra no livro de endereços.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid ReturnCoin address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Impossível desbloquear carteira.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Falha ao gerar nova chave.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>returncoin-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>Opções</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>&amp;Principal</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>Pagar &amp;taxa de transação</translation> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start ReturnCoin after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start ReturnCoin 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>&amp;Rede</translation> </message> <message> <location line="+6"/> <source>Automatically open the ReturnCoin 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>Mapear porta usando &amp;UPnP</translation> </message> <message> <location line="+7"/> <source>Connect to the ReturnCoin 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>&amp;IP do proxy:</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>&amp;Porta:</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>Porta do proxy (p.ex. 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>&amp;Versão SOCKS:</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>Versão do proxy SOCKS (p.ex. 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>&amp;Janela</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>Apenas mostrar o ícone da bandeja após minimizar a janela.</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>&amp;Minimizar para a bandeja e não para a barra de ferramentas</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>Minimize ao invés de sair da aplicação quando a janela é fechada. Com esta opção selecionada, a aplicação apenas será encerrada quando escolher Sair da aplicação no menú.</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>M&amp;inimizar ao fechar</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>Vis&amp;ualização</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>&amp;Linguagem da interface de utilizador:</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting ReturnCoin.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>&amp;Unidade a usar em quantias:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>Escolha a subdivisão unitária a ser mostrada por defeito na aplicação e ao enviar moedas.</translation> </message> <message> <location line="+9"/> <source>Whether to show ReturnCoin 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>Mostrar en&amp;dereços na lista de transações</translation> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation>Escolha para mostrar funcionalidades de controlo &quot;coin&quot; ou não.</translation> </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>&amp;OK</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>&amp;Cancelar</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation>padrão</translation> </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 ReturnCoin.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>O endereço de proxy introduzido é inválido. </translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formulário</translation> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the ReturnCoin 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>Carteira</translation> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation>O seu saldo disponível para gastar</translation> </message> <message> <location line="+71"/> <source>Immature:</source> <translation>Imaturo:</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>O saldo minado ainda não maturou</translation> </message> <message> <location line="+20"/> <source>Total:</source> <translation>Total:</translation> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation>O seu saldo total actual</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Transações recentes&lt;/b&gt;</translation> </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>fora de sincronia</translation> </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>Nome do Cliente</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="+348"/> <source>N/A</source> <translation>N/D</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>Versão do Cliente</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Informação</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>Usando versão OpenSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Tempo de início</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Rede</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>Número de ligações</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>Cadeia de blocos</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Número actual de blocos</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Total estimado de blocos</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Tempo do último bloco</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>&amp;Abrir</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the returncoin-qt help message to get a list with possible ReturnCoin 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>&amp;Consola</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>Data de construção</translation> </message> <message> <location line="-104"/> <source>ReturnCoin - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>ReturnCoin Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>Ficheiro de registo de depuração</translation> </message> <message> <location line="+7"/> <source>Open the ReturnCoin 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>Limpar consola</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the ReturnCoin 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>Use as setas para cima e para baixo para navegar no histórico e &lt;b&gt;Ctrl-L&lt;/b&gt; para limpar o ecrã.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Digite &lt;b&gt;help&lt;/b&gt; para visualizar os comandos disponíveis.</translation> </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>Enviar Moedas</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation>Funcionalidades de Coin Controlo:</translation> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation>Entradas</translation> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation>Selecção automática</translation> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation>Fundos insuficientes!</translation> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation>Quantidade:</translation> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation>Bytes:</translation> </message> <message> <location line="+51"/> <source>Amount:</source> <translation>Quantia:</translation> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 hack</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation>Prioridade:</translation> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation>Taxa:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation>Output Baixo:</translation> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation>Depois de taxas:</translation> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation>Enviar para múltiplos destinatários de uma vez</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>Adicionar &amp;Destinatário</translation> </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>&amp;Limpar Tudo</translation> </message> <message> <location line="+28"/> <source>Balance:</source> <translation>Saldo:</translation> </message> <message> <location line="+16"/> <source>123.456 hack</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Confirme ação de envio</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;Enviar</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation>Copiar quantidade</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copiar quantia</translation> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation>Taxa de cópia</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Taxa depois de cópia</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Copiar bytes</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Prioridade de Cópia</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation>Copiar output baixo</translation> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Copiar alteração</translation> </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>Confirme envio de moedas</translation> </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>O endereço de destino não é válido, por favor verifique.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>A quantia a pagar deverá ser maior que 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>A quantia excede o seu saldo.</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>O total excede o seu saldo quando a taxa de transação de %1 for incluída.</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>Endereço duplicado encontrado, apenas poderá enviar uma vez para cada endereço por cada operação de envio.</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid ReturnCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>(Sem rótulo)</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Qu&amp;antia:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>&amp;Pagar A:</translation> </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>Escreva um rótulo para este endereço para o adicionar ao seu livro de endereços</translation> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation>Rótu&amp;lo:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</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>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Cole endereço da área de transferência</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</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>Assinaturas - Assinar / Verificar uma Mensagem</translation> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation>A&amp;ssinar Mensagem</translation> </message> <message> <location line="-118"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção ao assinar mensagens ambíguas, pois ataques de phishing podem tentar enganá-lo, de modo a assinar a sua identidade para os atacantes. Apenas assine declarações completamente detalhadas com as quais concorde.</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</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>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation>Cole endereço da área de transferência</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>Escreva aqui a mensagem que deseja assinar</translation> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation>Copiar a assinatura actual para a área de transferência</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this ReturnCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation>Repôr todos os campos de assinatura de mensagem</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>Limpar &amp;Tudo</translation> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation>&amp;Verificar Mensagem</translation> </message> <message> <location line="-64"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>Introduza o endereço de assinatura, mensagem (assegure-se de copiar quebras de linha, espaços, tabuladores, etc. exactamente) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified ReturnCoin address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation>Repôr todos os campos de verificação de mensagem</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a ReturnCoin address (e.g. PXkRZYXwNDxsgvMmtE3M7rXJKDohbf54Pm)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>Clique &quot;Assinar mensagem&quot; para gerar a assinatura</translation> </message> <message> <location line="+3"/> <source>Enter ReturnCoin signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>O endereço introduzido é inválido. </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>Por favor verifique o endereço e tente de novo.</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>O endereço introduzido não refere a chave alguma.</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>O desbloqueio da carteira foi cancelado.</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>A chave privada para o endereço introduzido não está disponível.</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>Assinatura de mensagem falhou.</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>Mensagem assinada.</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>A assinatura não pôde ser descodificada.</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>Por favor verifique a assinatura e tente de novo.</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>A assinatura não condiz com o conteúdo da mensagem.</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>Verificação da mensagem falhou.</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>Mensagem verificada.</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation>Aberto até %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation>%1/desligado</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/não confirmada</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 confirmações</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Estado</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>, transmitida através de %n nó</numerusform><numerusform>, transmitida através de %n nós</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Origem</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Gerado</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>De</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>Para</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>endereço próprio</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>rótulo</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>Crédito</translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>matura daqui por %n bloco</numerusform><numerusform>matura daqui por %n blocos</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>não aceite</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>Débito</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>Taxa de transação</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>Valor líquido</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Mensagem</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Comentário</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>ID da Transação</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &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>Informação de depuração</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transação</translation> </message> <message> <location line="+5"/> <source>Inputs</source> <translation>Entradas</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Quantia</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>verdadeiro</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>falso</translation> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation>, ainda não foi transmitida com sucesso</translation> </message> <message> <location line="+35"/> <source>unknown</source> <translation>desconhecido</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Detalhes da transação</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Esta janela mostra uma descrição detalhada da transação</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Tipo</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Endereço</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Quantia</translation> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation>Aberto até %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>Confirmada (%1 confirmações)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation><numerusform>Aberta por mais %n bloco</numerusform><numerusform>Aberta por mais %n blocos</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>Este bloco não foi recebido por outros nós e provavelmente não será aceite pela rede!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Gerado mas não aceite</translation> </message> <message> <location line="+42"/> <source>Received with</source> <translation>Recebido com</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>Recebido de</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Enviado para</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Pagamento ao próprio</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Minadas</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(n/d)</translation> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Estado da transação. Pairar por cima deste campo para mostrar o número de confirmações.</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Data e hora a que esta transação foi recebida.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Tipo de transação.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Endereço de destino da transação.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Quantia retirada ou adicionada ao saldo.</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation>Todas</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>Hoje</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>Esta semana</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>Este mês</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>Mês passado</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>Este ano</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>Período...</translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Recebida com</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Enviada para</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>Para si</translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Minadas</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>Outras</translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>Escreva endereço ou rótulo a procurar</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>Quantia mínima</translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>Copiar endereço</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Copiar rótulo</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>Copiar quantia</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation>Copiar ID da Transação</translation> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>Editar rótulo</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>Mostrar detalhes da transação</translation> </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>Ficheiro separado por vírgula (*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>Confirmada</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Tipo</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Rótulo</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Endereço</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Quantia</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>ID</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation>Período:</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>até</translation> </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>ReturnCoin version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation>Utilização:</translation> </message> <message> <location line="+1"/> <source>Send command to -server or returncoind</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation>Listar comandos</translation> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation>Obter ajuda para um comando</translation> </message> <message> <location line="+2"/> <source>Options:</source> <translation>Opções:</translation> </message> <message> <location line="+2"/> <source>Specify configuration file (default: ReturnCoin.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: returncoind.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation>Especifique ficheiro de carteira (dentro da pasta de dados)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Especificar pasta de dados</translation> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Definir o tamanho da cache de base de dados em megabytes (por defeito: 25)</translation> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 15714 or testnet: 25714)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Manter no máximo &lt;n&gt; ligações a outros nós da rede (por defeito: 125)</translation> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Ligar a um nó para recuperar endereços de pares, e desligar</translation> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation>Especifique o seu endereço público</translation> </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>Tolerância para desligar nós mal-formados (por defeito: 100)</translation> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Número de segundos a impedir que nós mal-formados se liguem de novo (por defeito: 86400)</translation> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv4: %s</translation> </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: 15715 or testnet: 25715)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation>Aceitar comandos da consola e JSON-RPC</translation> </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>Correr o processo como um daemon e aceitar comandos</translation> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation>Utilizar a rede de testes - testnet</translation> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Aceitar ligações externas (padrão: 1 sem -proxy ou -connect)</translation> </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>Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv6, a usar IPv4: %s</translation> </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>Atenção: -paytxfee está definida com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transação.</translation> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong ReturnCoin 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>Atenção: erro ao ler wallet.dat! Todas as chaves foram lidas correctamente, mas dados de transação ou do livro de endereços podem estar em falta ou incorrectos.</translation> </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>Atenção: wallet.dat corrupto, dados recuperados! wallet.dat original salvo como wallet.{timestamp}.bak em %s; se o seu saldo ou transações estiverem incorrectos deverá recuperar de uma cópia de segurança.</translation> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Tentar recuperar chaves privadas de um wallet.dat corrupto</translation> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation>Opções de criação de bloco:</translation> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation>Apenas ligar ao(s) nó(s) especificado(s)</translation> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Descobrir endereço IP próprio (padrão: 1 ao escutar e sem -externalip)</translation> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Falhou a escutar em qualquer porta. Use -listen=0 se quer isto.</translation> </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>Armazenamento intermédio de recepção por ligação, &lt;n&gt;*1000 bytes (por defeito: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Armazenamento intermédio de envio por ligação, &lt;n&gt;*1000 bytes (por defeito: 1000)</translation> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Apenas ligar a nós na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation> </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>Opções SSL: (ver a Wiki Bitcoin para instruções de configuração SSL)</translation> </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>Enviar informação de rastreio/depuração para a consola e não para o ficheiro debug.log</translation> </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>Definir tamanho minímo de um bloco em bytes (por defeito: 0)</translation> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Encolher ficheiro debug.log ao iniciar o cliente (por defeito: 1 sem -debug definido)</translation> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Especificar tempo de espera da ligação em millisegundos (por defeito: 5000)</translation> </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>Usar UPnP para mapear a porta de escuta (padrão: 0)</translation> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Usar UPnP para mapear a porta de escuta (padrão: 1 ao escutar)</translation> </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>Nome de utilizador para ligações JSON-RPC</translation> </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>Atenção: Esta versão está obsoleta, é necessário actualizar!</translation> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat corrupta, recuperação falhou</translation> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation>Palavra-passe para ligações JSON-RPC</translation> </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=ReturnCoinrpc 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;ReturnCoin 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>Permitir ligações JSON-RPC do endereço IP especificado</translation> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Enviar comandos para o nó a correr em &lt;ip&gt; (por defeito: 127.0.0.1)</translation> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>Executar comando quando mudar o melhor bloco (no comando, %s é substituído pela hash do bloco)</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação)</translation> </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>Atualize a carteira para o formato mais recente</translation> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Definir o tamanho da memória de chaves para &lt;n&gt; (por defeito: 100)</translation> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Reexaminar a cadeia de blocos para transações em falta na carteira</translation> </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>Usar OpenSSL (https) para ligações JSON-RPC</translation> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation>Ficheiro de certificado do servidor (por defeito: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Chave privada do servidor (por defeito: server.pem)</translation> </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>Esta mensagem de ajuda</translation> </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. ReturnCoin is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>ReturnCoin</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>Incapaz de vincular a %s neste computador (vínculo retornou erro %d, %s)</translation> </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>Permitir procuras DNS para -addnode, -seednode e -connect</translation> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation>Carregar endereços...</translation> </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>Erro ao carregar wallet.dat: Carteira danificada</translation> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of ReturnCoin</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart ReturnCoin to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation>Erro ao carregar wallet.dat</translation> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Endereço -proxy inválido: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Rede desconhecida especificada em -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Versão desconhecida de proxy -socks requisitada: %i</translation> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Não conseguiu resolver endereço -bind: &apos;%s&apos;</translation> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Não conseguiu resolver endereço -externalip: &apos;%s&apos;</translation> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </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>Quantia inválida</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>Fundos insuficientes</translation> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation>Carregar índice de blocos...</translation> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Adicione um nó ao qual se ligar e tentar manter a ligação aberta</translation> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. ReturnCoin 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>Carregar carteira...</translation> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation>Impossível mudar a carteira para uma versão anterior</translation> </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>Impossível escrever endereço por defeito</translation> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation>Reexaminando...</translation> </message> <message> <location line="+5"/> <source>Done loading</source> <translation>Carregamento completo</translation> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation>Para usar a opção %s</translation> </message> <message> <location line="+14"/> <source>Error</source> <translation>Erro</translation> </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>Deverá definir rpcpassword=&lt;password&gt; no ficheiro de configuração: %s Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono.</translation> </message> </context> </TS>
ReturnCoin/ReturnCoin
src/qt/locale/bitcoin_pt_PT.ts
TypeScript
mit
119,402
<?php namespace App\Entity; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * Oeuvre. * * @ORM\Table(name="oeuvre") * @ORM\Entity(repositoryClass="App\Repository\OeuvreRepository") */ class Oeuvre { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="titre", type="string", length=100) */ private $titre; /** * @var string * * @ORM\Column(name="soustitre", type="string", length=100, nullable=true) */ private $sousTitre; /** * @var int * * @ORM\Column(name="annee", type="integer", nullable=true) */ private $annee; /** * @var int * * @ORM\Column(name="ageminimum", type="integer", nullable=true) */ private $ageMinimum; /** * @var Audience * * @ORM\ManyToOne( * targetEntity="App\Entity\Audience", * inversedBy="oeuvres" * ) */ private $audience; /** * @var Collection * * @ORM\ManyToMany( * targetEntity="App\Entity\Nationalite", * inversedBy="oeuvres" * ) */ private $nationalites; /** * @var Collection * * @ORM\ManyToMany( * targetEntity="App\Entity\Langue", * inversedBy="oeuvres" * ) */ private $langues; /** * @var CategorieOeuvre * * @ORM\ManyToOne( * targetEntity="App\Entity\CategorieOeuvre", * inversedBy="oeuvres" * ) * @ORM\JoinColumn(name="categorieoeuvre_id", referencedColumnName="id") */ private $categorieOeuvre; /** * @var Collection * * @ORM\OneToMany( * targetEntity="App\Entity\OeuvreCategorieArtiste", * mappedBy="oeuvre" * ) */ private $oeuvreCategorieArtistes; /** * @var Partie * * @ORM\OneToOne( * targetEntity="App\Entity\Partie", * mappedBy="oeuvre" * ) */ private $partie; /** * @var Collection * * @ORM\ManyToMany( * targetEntity="App\Entity\Support", * inversedBy="oeuvres" * ) */ private $supports; /** * @var Collection * * @ORM\ManyToMany( * targetEntity="App\Entity\GroupePrincipal", * inversedBy="oeuvres" * ) * @ORM\JoinTable( * name="oeuvre_groupeprincipal", * joinColumns={ * @ORM\JoinColumn( * name="oeuvre_id", * referencedColumnName="id" * ) * }, * inverseJoinColumns={ * @ORM\JoinColumn( * name="groupeprincipal_id", * referencedColumnName="id" * ) * } * ) */ private $groupesPrincipaux; /** * Constructeur. * * @param string|null $titre * @param string|null $sousTitre * @param int|null $annee * @param int|null $ageMinimum */ public function __construct( string $titre = null, string $sousTitre = null, int $annee = null, int $ageMinimum = null ) { $this->titre = $this->checkTitre($titre); $this->sousTitre = $this->checkTitre($sousTitre); $this->annee = $annee; $this->ageMinimum = $ageMinimum; $this->nationalites = new ArrayCollection(); $this->langues = new ArrayCollection(); $this->oeuvreCategorieArtistes = new ArrayCollection(); $this->supports = new ArrayCollection(); $this->groupesPrincipaux = new ArrayCollection(); } /** * Get id. * * @return int */ public function getId(): int { return $this->id; } /** * Set titre. * * @param string $titre */ public function setTitre(?string $titre): void { $this->titre = $titre; } /** * Get titre. * * @return string|null */ public function getTitre(): ?string { return $this->titre; } /** * Set sousTitre. * * @param string|null $sousTitre */ public function setSousTitre(?string $sousTitre): void { $this->sousTitre = $sousTitre; } /** * Get sousTitre. * * @return string */ public function getSousTitre(): ?string { return $this->sousTitre; } /** * Set annee. * * @param int|null $annee */ public function setAnnee(?int $annee): void { $this->annee = $annee; } /** * Get annee. * * @return int|null */ public function getAnnee(): ?int { return $this->annee; } /** * Set ageMinimum. * * @param int|null $ageMinimum */ public function setAgeMinimum(?int $ageMinimum): void { $this->ageMinimum = $ageMinimum; } /** * Get ageMinimum. * * @return int */ public function getAgeMinimum(): ?int { return $this->ageMinimum; } /** * @param mixed $titre * @param int $maxSize * * @return null|string */ public function checkTitre(?string $titre, $maxSize = 100): ?string { if (null !== $titre) { $titre = trim($titre); $titre = iconv_substr($titre, 0, $maxSize); return trim($titre); } return null; } /** * Set audience. * * @param Audience $audience */ public function setAudience(Audience $audience = null): void { $this->audience = $audience; } /** * Get audience. * * @return Audience|null */ public function getAudience(): ?Audience { return $this->audience; } /** * Add nationalite. * * @param Nationalite $nationalite */ public function addNationalite(Nationalite $nationalite): void { if (!$this->nationalites->contains($nationalite)) { $this->nationalites[] = $nationalite; $nationalite->addOeuvre($this); } } /** * Remove nationalite. * * @param Nationalite $nationalite */ public function removeNationalite(Nationalite $nationalite): void { if ($this->nationalites->contains($nationalite)) { $this->nationalites->removeElement($nationalite); $nationalite->removeOeuvre($this); } } /** * Get nationalites. * * @return Collection */ public function getNationalites(): Collection { return $this->nationalites; } /** * Add langue. * * @param Langue $langue */ public function addLangue(Langue $langue): void { if (!$this->langues->contains($langue)) { $this->langues[] = $langue; $langue->addOeuvre($this); } } /** * Remove langue. * * @param Langue $langue */ public function removeLangue(Langue $langue): void { if ($this->langues->contains($langue)) { $this->langues->removeElement($langue); $langue->removeOeuvre($this); } } /** * Get langues. * * @return Collection */ public function getLangues(): Collection { return $this->langues; } /** * Set categorieOeuvre. * * @param CategorieOeuvre $categorieOeuvre */ public function setCategorieOeuvre( CategorieOeuvre $categorieOeuvre = null ): void { $this->categorieOeuvre = $categorieOeuvre; } /** * Get categorieOeuvre. * * @return CategorieOeuvre */ public function getCategorieOeuvre(): ?CategorieOeuvre { return $this->categorieOeuvre; } /** * Remove oeuvreCategorieArtiste. * * @param OeuvreCategorieArtiste $oeuvreCategorieArtiste */ public function removeOeuvreCategorieArtiste( OeuvreCategorieArtiste $oeuvreCategorieArtiste ): void { if ($this->oeuvreCategorieArtistes->contains($oeuvreCategorieArtiste)) { $this->oeuvreCategorieArtistes->removeElement($oeuvreCategorieArtiste); } $oeuvreCategorieArtiste->setOeuvre(null); } /** * Add oeuvreCategorieArtiste. * * @param OeuvreCategorieArtiste $oeuvreCategorieArtiste */ public function addOeuvreCategorieArtiste( OeuvreCategorieArtiste $oeuvreCategorieArtiste ): void { if (!$this->oeuvreCategorieArtistes->contains($oeuvreCategorieArtiste)) { $this->oeuvreCategorieArtistes[] = $oeuvreCategorieArtiste; } $oeuvreCategorieArtiste->setOeuvre($this); } /** * Get oeuvreCategorieArtistes. * * @return Collection */ public function getOeuvreCategorieArtistes(): Collection { return $this->oeuvreCategorieArtistes; } /** * Set partie. * * @param Partie|null $partie */ public function setPartie(Partie $partie = null): void { $this->partie = $partie; } /** * Get partie. * * @return Partie|null */ public function getPartie(): ?Partie { return $this->partie; } /** * Add support. * * @param Support $support */ public function addSupport(Support $support): void { if (!$this->supports->contains($support)) { $this->supports[] = $support; $support->addOeuvre($this); } } /** * Remove support. * * @param Support $support */ public function removeSupport(Support $support): void { if ($this->supports->contains($support)) { $this->supports->removeElement($support); $support->removeOeuvre($this); } } /** * Get supports. * * @return Collection */ public function getSupports(): Collection { return $this->supports; } /** * Add groupePrincipal. * * @param GroupePrincipal $groupePrincipal */ public function addGroupePrincipal(GroupePrincipal $groupePrincipal): void { if (!$this->groupesPrincipaux->contains($groupePrincipal)) { $this->groupesPrincipaux[] = $groupePrincipal; $groupePrincipal->addOeuvre($this); } } /** * Remove groupePrincipal. * * @param GroupePrincipal $groupePrincipal */ public function removeGroupePrincipal(GroupePrincipal $groupePrincipal): void { if ($this->groupesPrincipaux->contains($groupePrincipal)) { $this->groupesPrincipaux->removeElement($groupePrincipal); $groupePrincipal->removeOeuvre($this); } } /** * Get groupesPrincipaux. * * @return Collection */ public function getGroupesPrincipaux(): Collection { return $this->groupesPrincipaux; } }
dmsr45/github_sf_media
src/Entity/Oeuvre.php
PHP
mit
11,190
<section> <body> <!-- Quick setting box starts --> <div class="quick-slide hidden-xs"></div> <div class="out-container"> <div class="outer"> <!-- Sidebar starts --> <!-- Sidebar ends --> <!-- Mainbar starts --> <div class="mainbar"> <!-- Page heading starts --> <div class="page-head"> <div class="container"> <div class="row"> <!-- Page heading --> <div class="col-md-3 col-sm-6 col-xs-6"> <h2><i class="fa fa-desktop"></i>LAY</h2> </div> </div> </div> <!-- Page heading ends --> <!-- Black block starts --> <div class="blue-block"> <div class="page-title"> <h3 class="pull-left"><i class="fa fa-group"></i>Denuncias</h3> <div class="clearfix"></div> </div> </div> <!-- Black block ends --> <!-- Content starts --> <div class="container"> <div class="page-content"> <!-- Content starts --> <div class="container"> <div class="page-content page-users"> <div class="page-tabs"> <!-- Tab panes --> <div class="tab-content"> <div class="tab-pane fade active in" id="search"> <h3>Denuncias</h3> <?php echo form_open('regidenu/registro_exitoso', array('class'=>'form-horizontal')); ?> <h1>Inserción exitosa</h1> </div> </form> <a href="<?php echo site_url('regidenu/buscar');?>" class="btn btn-danger">Aceptar</a> <div class="well" align="center"> <!-- Advanced search Denuncia--> </div> <!-- Add new Denuncia --> <div class="tab-pane fade" id="addnew"> </div> <!--hasta aqui --> </div> </div> </div> </div> </div> </div> <!-- Content ends --> </div> <!-- Mainbar ends --> <div class="clearfix"></div> </div> </div> </body> </section>
Citlaa/LAY
application/views/denuncias/exito.php
PHP
mit
2,261
package builtins import ( "fmt" "net/mail" "net/url" "regexp" "strings" u "github.com/araddon/gou" "github.com/mssola/user_agent" "github.com/araddon/qlbridge/expr" "github.com/araddon/qlbridge/value" "github.com/araddon/qlbridge/vm" ) var _ = u.EMPTY // email a string, parses email and makes sure it is valid // // email("Bob <bob@bob.com>") => bob@bob.com, true // email("Bob <bob>") => "", false // type Email struct{} // Type string func (m *Email) Type() value.ValueType { return value.StringType } func (m *Email) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 args for Email(field) but got %s", n) } return emailEval, nil } func emailEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := args[0] if val == nil || val.Nil() || val.Err() { return nil, false } emailStr := "" switch v := val.(type) { case value.StringValue: emailStr = v.ToString() case value.Slice: if v.Len() > 0 { v1 := v.SliceValue()[0] emailStr = v1.ToString() } } if emailStr == "" { return value.EmptyStringValue, false } if em, err := mail.ParseAddress(emailStr); err == nil { return value.NewStringValue(strings.ToLower(em.Address)), true } return value.EmptyStringValue, false } // emailname a string, parses email // // emailname("Bob <bob@bob.com>") => Bob // type EmailName struct{} // Type string func (m *EmailName) Type() value.ValueType { return value.StringType } func (m *EmailName) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for EmailName(fieldname) but got %s", n) } return emailNameEval, nil } func emailNameEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val, ok := value.ValueToString(args[0]) if !ok || val == "" { return value.EmptyStringValue, false } if em, err := mail.ParseAddress(val); err == nil { return value.NewStringValue(em.Name), true } return value.EmptyStringValue, false } // emaildomain parses email and returns domain // // emaildomain("Bob <bob@bob.com>") => bob.com // type EmailDomain struct{} // Type string func (m *EmailDomain) Type() value.ValueType { return value.StringType } func (m *EmailDomain) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for EmailDomain(fieldname) but got %s", n) } return emailDomainEval, nil } func emailDomainEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val, ok := value.ValueToString(args[0]) if !ok || val == "" { return value.EmptyStringValue, false } if em, err := mail.ParseAddress(strings.ToLower(val)); err == nil { parts := strings.SplitN(strings.ToLower(em.Address), "@", 2) if len(parts) == 2 { return value.NewStringValue(parts[1]), true } } return value.EmptyStringValue, false } // Domains Extract Domains from a Value, or Values (must be urlish), doesn't do much/any validation // // domains("http://www.lytics.io/index.html") => []string{"lytics.io"} // type Domains struct{} // Type strings func (m *Domains) Type() value.ValueType { return value.StringsType } func (m *Domains) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) == 0 { return nil, fmt.Errorf("Expected 1 or more args for Domains(arg, ...) but got %s", n) } return domainsEval, nil } func domainsEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { svals := value.NewStringsValue(make([]string, 0)) for _, val := range args { switch v := val.(type) { case value.StringValue: svals.Append(v.Val()) case value.StringsValue: for _, sv := range v.Val() { svals.Append(sv) } } } // Since its empty, we will just re-use it if svals.Len() == 0 { return nil, false } // Now convert to domains domains := value.NewStringsValue(make([]string, 0)) for _, val := range svals.Val() { urlstr := strings.ToLower(val) if len(urlstr) < 4 { continue } // May not have an http prefix, if not assume it if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } if urlParsed, err := url.Parse(urlstr); err == nil { parts := strings.Split(urlParsed.Host, ".") if len(parts) > 2 { parts = parts[len(parts)-2:] } if len(parts) > 0 { domains.Append(strings.Join(parts, ".")) } } } if domains.Len() == 0 { return nil, false } return domains, true } // Extract Domain from a Value, or Values (must be urlish), doesn't do much/any validation. // if input is a list of strings, only first is evaluated, for plural see domains() // // domain("http://www.lytics.io/index.html") => "lytics.io" // type Domain struct{} // Type string func (m *Domain) Type() value.ValueType { return value.StringType } func (m *Domain) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for Domain(field) but got %s", n) } return domainEval, nil } func domainEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { urlstr := "" switch itemT := args[0].(type) { case value.StringValue: urlstr = itemT.Val() case value.StringsValue: for _, sv := range itemT.Val() { urlstr = sv break } } urlstr = strings.ToLower(urlstr) if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } if urlParsed, err := url.Parse(urlstr); err == nil && len(urlParsed.Host) > 2 { parts := strings.Split(urlParsed.Host, ".") if len(parts) > 2 { parts = parts[len(parts)-2:] } if len(parts) > 0 { return value.NewStringValue(strings.Join(parts, ".")), true } } return value.EmptyStringValue, false } // Extract host from a String (must be urlish), doesn't do much/any validation // In the event the value contains more than one input url, will ONLY evaluate first // // host("http://www.lytics.io/index.html") => www.lytics.io // type Host struct{} // Type string func (m *Host) Type() value.ValueType { return value.StringType } func (m *Host) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for Host(field) but got %s", n) } return HostEval, nil } func HostEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } urlstr := strings.ToLower(val) if len(urlstr) < 8 { return value.EmptyStringValue, false } if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } if urlParsed, err := url.Parse(urlstr); err == nil { //u.Infof("url.parse: %#v", urlParsed) return value.NewStringValue(urlParsed.Host), true } return value.EmptyStringValue, false } // Extract hosts from a Strings (must be urlish), doesn't do much/any validation // // hosts("http://www.lytics.io", "http://www.activate.lytics.io") => www.lytics.io, www.activate.lytics.io // type Hosts struct{} // Type strings func (m *Hosts) Type() value.ValueType { return value.StringsType } func (m *Hosts) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) == 0 { return nil, fmt.Errorf("Expected 1 or more args for Hosts() but got %s", n) } return HostsEval, nil } func HostsEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { vals := value.NewStringsValue(make([]string, 0)) for _, item := range args { switch itemT := item.(type) { case value.StringValue: val := itemT.Val() if len(val) > 0 { vals.Append(itemT.Val()) } case value.Slice: for _, sv := range itemT.SliceValue() { val := sv.ToString() if len(val) > 0 { vals.Append(val) } } } } if vals.Len() == 0 { return vals, false } hosts := value.NewStringsValue(make([]string, 0)) for _, val := range vals.Val() { urlstr := strings.ToLower(val) if len(urlstr) < 8 { continue } if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } if urlParsed, err := url.Parse(urlstr); err == nil { //u.Infof("url.parse: %#v", urlParsed) hosts.Append(urlParsed.Host) } } if hosts.Len() == 0 { return nil, false } return hosts, true } // url decode a string // // urldecode("http://www.lytics.io/index.html") => http://www.lytics.io // // In the event the value contains more than one input url, will ONLY evaluate first // type UrlDecode struct{} // Type string func (m *UrlDecode) Type() value.ValueType { return value.StringType } func (m *UrlDecode) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for UrlDecode(field) but got %s", n) } return urlDecodeEval, nil } func urlDecodeEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } val, err := url.QueryUnescape(val) return value.NewStringValue(val), err == nil } // UrlPath Extract url path from a String (must be urlish), doesn't do much/any validation // // path("http://www.lytics.io/blog/index.html") => blog/index.html // // In the event the value contains more than one input url, will ONLY evaluate first // type UrlPath struct{} // Type string func (m *UrlPath) Type() value.ValueType { return value.StringType } func (m *UrlPath) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for UrlPath() but got %s", n) } return urlPathEval, nil } func urlPathEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } urlstr := strings.ToLower(val) if len(urlstr) > 6 && !strings.Contains(urlstr[:5], "/") { if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } } if urlParsed, err := url.Parse(urlstr); err == nil { return value.NewStringValue(urlParsed.Path), true } return value.EmptyStringValue, false } // Qs Extract qs param from a string (must be url valid) // // qs("http://www.lytics.io/?utm_source=google","utm_source") => "google", true // type Qs struct{} // Type string func (m *Qs) Type() value.ValueType { return value.StringType } func (m *Qs) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 2 { return nil, fmt.Errorf("Expected 2 args for Qs(url, param) but got %s", n) } return qsEval, nil } func qsEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { urlstr := "" switch itemT := args[0].(type) { case value.StringValue: urlstr = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } urlstr = itemT.SliceValue()[0].ToString() } if urlstr == "" { return value.EmptyStringValue, false } qsParam, ok := value.ValueToString(args[1]) if !ok || qsParam == "" { return value.EmptyStringValue, false } if len(urlstr) > 6 && !strings.Contains(urlstr[:5], "/") { if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } } if urlParsed, err := url.Parse(urlstr); err == nil { qsval := urlParsed.Query().Get(qsParam) if len(qsval) > 0 { return value.NewStringValue(qsval), true } } return value.EmptyStringValue, false } // Qs Extract qs param from a string (must be url valid) // // qs("http://www.lytics.io/?utm_source=google","utm_source") => "google", true // type QsDeprecate struct{} // Type string func (m *QsDeprecate) Type() value.ValueType { return value.StringType } func (m *QsDeprecate) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 2 { return nil, fmt.Errorf("Expected 2 args for Qs(url, param) but got %s", n) } return qsDeprecateEval, nil } func qsDeprecateEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } urlstr := strings.ToLower(val) keyVal, ok := value.ValueToString(args[1]) if !ok || keyVal == "" { return value.EmptyStringValue, false } if len(urlstr) > 6 && !strings.Contains(urlstr[:5], "/") { if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } } if urlParsed, err := url.Parse(urlstr); err == nil { qsval := urlParsed.Query().Get(keyVal) if len(qsval) > 0 { return value.NewStringValue(qsval), true } } return value.EmptyStringValue, false } // UrlMain remove the querystring and scheme from url // // urlmain("http://www.lytics.io/?utm_source=google") => "www.lytics.io/", true // type UrlMain struct{} // Type string func (m *UrlMain) Type() value.ValueType { return value.StringType } func (m *UrlMain) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 arg for UrlMain() but got %s", n) } return urlMainEval, nil } func urlMainEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } if up, err := url.Parse(val); err == nil { return value.NewStringValue(fmt.Sprintf("%s%s", up.Host, up.Path)), true } return value.EmptyStringValue, false } // UrlMinusQs removes a specific query parameter and its value from a url // // urlminusqs("http://www.lytics.io/?q1=google&q2=123", "q1") => "http://www.lytics.io/?q2=123", true // type UrlMinusQs struct{} // Type string func (m *UrlMinusQs) Type() value.ValueType { return value.StringType } func (m *UrlMinusQs) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 2 { return nil, fmt.Errorf("Expected 2 args for UrlMinusQs(url, qsparam) but got %s", n) } return urlMinusQsEval, nil } func urlMinusQsEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { urlstr := "" switch itemT := args[0].(type) { case value.StringValue: urlstr = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } urlstr = itemT.SliceValue()[0].ToString() } if urlstr == "" { return value.EmptyStringValue, false } if len(urlstr) > 6 && !strings.Contains(urlstr[:5], "/") { if !strings.HasPrefix(urlstr, "http") { urlstr = "http://" + urlstr } } keyVal, ok := value.ValueToString(args[1]) if !ok || keyVal == "" { return value.EmptyStringValue, false } if up, err := url.Parse(urlstr); err == nil { qsval := up.Query() _, ok := qsval[keyVal] if !ok { return value.NewStringValue(fmt.Sprintf("%s://%s%s?%s", up.Scheme, up.Host, up.Path, up.RawQuery)), true } qsval.Del(keyVal) up.RawQuery = qsval.Encode() if up.RawQuery == "" { return value.NewStringValue(fmt.Sprintf("%s://%s%s", up.Scheme, up.Host, up.Path)), true } return value.NewStringValue(fmt.Sprintf("%s://%s%s?%s", up.Scheme, up.Host, up.Path, up.RawQuery)), true } return value.EmptyStringValue, false } // UrlWithQueryFunc strips a url and retains only url parameters that match // the supplied regular expressions. // // url.matchqs(url, re1, re2, ...) => url_withoutqs // type UrlWithQuery struct{} // Type string func (m *UrlWithQuery) Type() value.ValueType { return value.StringType } func (*UrlWithQuery) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) == 0 { return nil, fmt.Errorf("Expected at least 1 args for urlwithqs(url, param, param2) but got %s", n) } if len(n.Args) == 1 { return UrlWithQueryEval(nil), nil } // Memoize these compiled reg-expressions include := make([]*regexp.Regexp, 0) for _, n := range n.Args[1:] { keyItem, ok := vm.Eval(nil, n) if !ok { return nil, fmt.Errorf("Could not evaluate %v", n) } keyVal, ok := value.ValueToString(keyItem) if !ok || keyVal == "" { return nil, fmt.Errorf("Could not convert %q to regex", n.String()) } keyRegexp, err := regexp.Compile(keyVal) if err != nil { return nil, err } include = append(include, keyRegexp) } return UrlWithQueryEval(include), nil } // UrlWithQueryEval pass reg-expressions to match qs args. // Must match one regexp or else the qs param is dropped. func UrlWithQueryEval(include []*regexp.Regexp) expr.EvaluatorFunc { return func(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } up, err := url.Parse(val) if err != nil { return value.EmptyStringValue, false } if len(args) == 1 { return value.NewStringValue(fmt.Sprintf("%s%s", up.Host, up.Path)), true } oldvals := up.Query() newvals := make(url.Values) for k, v := range oldvals { // include fields specified as arguments for _, pattern := range include { if pattern.MatchString(k) { newvals[k] = v break } } } up.RawQuery = newvals.Encode() if up.RawQuery == "" { return value.NewStringValue(fmt.Sprintf("%s%s", up.Host, up.Path)), true } return value.NewStringValue(fmt.Sprintf("%s%s?%s", up.Host, up.Path, up.RawQuery)), true } } // UserAgent Extract user agent features // // useragent(user_agent_field,"mobile") => "true", true // type UserAgent struct{} // Type string func (m *UserAgent) Type() value.ValueType { return value.StringType } func (m *UserAgent) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 2 { return nil, fmt.Errorf("Expected 2 args for UserAgent(user_agent_field, feature) but got %s", n) } return userAgentEval, nil } func userAgentEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return value.EmptyStringValue, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return value.EmptyStringValue, false } /* fmt.Printf("%v\n", ua.Mobile()) // => false fmt.Printf("%v\n", ua.Bot()) // => false fmt.Printf("%v\n", ua.Mozilla()) // => "5.0" fmt.Printf("%v\n", ua.Platform()) // => "X11" fmt.Printf("%v\n", ua.OS()) // => "Linux x86_64" name, version := ua.Engine() fmt.Printf("%v\n", name) // => "AppleWebKit" fmt.Printf("%v\n", version) // => "537.11" name, version = ua.Browser() fmt.Printf("%v\n", name) // => "Chrome" fmt.Printf("%v\n", version) // => "23.0.1271.97" // Let's see an example with a bot. ua.Parse("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)") fmt.Printf("%v\n", ua.Bot()) // => true name, version = ua.Browser() fmt.Printf("%v\n", name) // => Googlebot fmt.Printf("%v\n", version) // => 2.1 */ method, ok := value.ValueToString(args[1]) if !ok || method == "" { return value.EmptyStringValue, false } ua := user_agent.New(val) switch strings.ToLower(method) { case "bot": return value.NewStringValue(fmt.Sprintf("%v", ua.Bot())), true case "mobile": return value.NewStringValue(fmt.Sprintf("%v", ua.Mobile())), true case "mozilla": return value.NewStringValue(ua.Mozilla()), true case "platform": return value.NewStringValue(ua.Platform()), true case "os": return value.NewStringValue(ua.OS()), true case "engine": name, _ := ua.Engine() return value.NewStringValue(name), true case "engine_version": _, version := ua.Engine() return value.NewStringValue(version), true case "browser": name, _ := ua.Browser() return value.NewStringValue(name), true case "browser_version": _, version := ua.Browser() return value.NewStringValue(version), true } return value.EmptyStringValue, false } // UserAgentMap Extract user agent features // // useragent.map(user_agent_field) => {"mobile": "false","platform":"X11"}, true // type UserAgentMap struct{} // Type MapString func (m *UserAgentMap) Type() value.ValueType { return value.MapStringType } func (m *UserAgentMap) Validate(n *expr.FuncNode) (expr.EvaluatorFunc, error) { if len(n.Args) != 1 { return nil, fmt.Errorf("Expected 1 args for useragentmap(user_agent) but got %s", n) } return userAgentMapEval, nil } func userAgentMapEval(ctx expr.EvalContext, args []value.Value) (value.Value, bool) { val := "" switch itemT := args[0].(type) { case value.StringValue: val = itemT.Val() case value.Slice: if itemT.Len() == 0 { return nil, false } val = itemT.SliceValue()[0].ToString() } if val == "" { return nil, false } /* fmt.Printf("%v\n", ua.Mobile()) // => false fmt.Printf("%v\n", ua.Bot()) // => false fmt.Printf("%v\n", ua.Mozilla()) // => "5.0" fmt.Printf("%v\n", ua.Platform()) // => "X11" fmt.Printf("%v\n", ua.OS()) // => "Linux x86_64" name, version := ua.Engine() fmt.Printf("%v\n", name) // => "AppleWebKit" fmt.Printf("%v\n", version) // => "537.11" name, version = ua.Browser() fmt.Printf("%v\n", name) // => "Chrome" fmt.Printf("%v\n", version) // => "23.0.1271.97" // Let's see an example with a bot. ua.Parse("Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)") fmt.Printf("%v\n", ua.Bot()) // => true name, version = ua.Browser() fmt.Printf("%v\n", name) // => Googlebot fmt.Printf("%v\n", version) // => 2.1 */ ua := user_agent.New(val) out := make(map[string]string) out["bot"] = fmt.Sprintf("%v", ua.Bot()) out["mobile"] = fmt.Sprintf("%v", ua.Mobile()) out["mozilla"] = ua.Mozilla() out["platform"] = ua.Platform() out["os"] = ua.OS() name, version := ua.Engine() out["engine"] = name out["engine_version"] = version name, version = ua.Browser() out["browser"] = name out["browser_version"] = version return value.NewMapStringValue(out), true }
araddon/qlbridge
expr/builtins/url_email.go
GO
mit
23,042
#include <QWebView> #include "helpdialog.h" /** * Constructor of Help Dialog */ HelpDialog::HelpDialog(QWidget *parent) : QWebPage(parent) { view = new QWebView(); } /** * Shows the help dialog */ void HelpDialog::showHelpDialog() { createWindow(QWebPage::WebModalDialog); view->setPage(this); view->setWindowIcon(QIcon(":/images/help-icon.png")); view->setWindowTitle("Othello FPG - Help"); view->load(QUrl("qrc:/html/index.html")); view->show(); }
yannakisg/othello
helpdialog.cpp
C++
mit
489
"use strict"; var _slicedToArray = function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { _arr.push(_step.value); if (i && _arr.length === i) break; } return _arr; } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; var _createClass = (function () { function defineProperties(target, props) { for (var key in props) { var prop = props[key]; prop.configurable = true; if (prop.value) prop.writable = true; } Object.defineProperties(target, props); } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); var _get = function get(object, property, receiver) { var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc && desc.writable) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; var _inherits = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }; var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; exports.alts = alts; exports.timeout = timeout; exports.pipelineAsync = pipelineAsync; // Enforces order resolution on resulting channel // This might need to be the default behavior, though that requires more thought exports.order = order; Object.defineProperty(exports, "__esModule", { value: true }); var _channelsJs = require("./channels.js"); var Channel = _channelsJs.Channel; var Transactor = _channelsJs.Transactor; var AltsTransactor = (function (_Transactor) { function AltsTransactor(offer, commitCb) { _classCallCheck(this, AltsTransactor); _get(Object.getPrototypeOf(AltsTransactor.prototype), "constructor", this).call(this, offer); this.commitCb = commitCb; } _inherits(AltsTransactor, _Transactor); _createClass(AltsTransactor, { commit: { value: function commit() { this.commitCb(); return _get(Object.getPrototypeOf(AltsTransactor.prototype), "commit", this).call(this); } } }); return AltsTransactor; })(Transactor); function alts(race) { var outCh = new Channel(); var transactors = race.map(function (cmd) { var tx = undefined; if (Array.isArray(cmd)) { var _cmd; (function () { _cmd = _slicedToArray(cmd, 2); var ch = _cmd[0]; var val = _cmd[1]; tx = new AltsTransactor(val, function () { transactors.forEach(function (h) { return h.active = false; }); }); ch.fill(val, tx).deref(function () { outCh.fill([val, ch]).deref(function () { return outCh.close(); }); }); })(); } else { tx = new AltsTransactor(true, function () { transactors.forEach(function (h) { return h.active = false; }); }); cmd.drain(tx).deref(function (val) { outCh.fill([val, cmd]).deref(function () { return outCh.close(); }); }); } return tx; }); return outCh; } function timeout(ms) { var ch = new Channel(); setTimeout(function () { ch.close(); }, ms); return ch; } function pipelineAsync(inch, converter, outch) { var shouldCloseDownstream = arguments[3] === undefined ? false : arguments[3]; function take(val) { if (val !== null) { Promise.resolve(converter(val)).then(function (converted) { outch.put(converted).then(function (didPut) { if (didPut) { inch.take().then(take); } }); }); } else if (shouldCloseDownstream) { outch.close(); } } inch.take().then(take); } function order(inch, sizeOrBuf) { var outch = new Channel(sizeOrBuf); function drain() { inch.take().then(function (val) { if (val === null) { outch.close(); } else { outch.put(val).then(drain); } }); } drain(); return outch; } //# sourceMappingURL=utils.js.map
nhusher/js-channels
dist/node/utils.js
JavaScript
mit
4,823
<?php namespace Wallabag\Bundle\CoreBundle\Entity; use Doctrine\Bundle\MongoDBBundle\Validator\Constraints\Unique; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\ORM\Mapping as ORM; use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB; use JMS\Serializer\Annotation\Expose; use JMS\Serializer\Annotation\Groups; /** * Entry * * @ORM\Entity */ class Entry { /** * @var integer * * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(type="text") * @Expose * @Groups({"entries"}) */ private $url; /** * @var string * * @ORM\Column(type="text") * @Expose * @Groups({"entries"}) */ private $title; /** * @var string * * @ORM\Column(type="text") * @Expose * @Groups({"entries"}) */ private $content; /** * @var User * * @ORM\OneToOne(targetEntity="Wallabag\Bundle\CoreBundle\Entity\User") */ private $user; /** * @var \DateTime * @ORM\Column(type="datetime") * @Expose * @Groups({"entries"}) */ private $createdAt; /** * @var ArrayCollection * @ORM\ManyToMany(targetEntity="Wallabag\Bundle\CoreBundle\Entity\Tag") * @Expose * @Groups({"entries"}) */ private $tags; /** * @var boolean * @ORM\Column(type="boolean") * @Expose * @Groups({"entries"}) */ private $archived = false; /** * @var boolean * @ORM\Column(type="boolean") * @Expose * @Groups({"entries"}) */ private $deleted = false; /** * @var boolean * @ORM\Column(type="boolean") * @Expose * @Groups({"entries"}) */ private $starred = false; public function __construct() { $this->tags = new ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set url * * @param string $url * @return Entry */ public function setUrl($url) { $this->url = $url; return $this; } /** * Get url * * @return string */ public function getUrl() { return $this->url; } /** * Set title * * @param string $title * @return Entry */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } /** * Set content * * @param string $content * @return Entry */ public function setContent($content) { $this->content = $content; return $this; } /** * Get content * * @return string */ public function getContent() { return $this->content; } /** * Set createdAt * * @param \DateTime $createdAt * @return self */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime $createdAt */ public function getCreatedAt() { return $this->createdAt; } /** * Add tag * * @param \Wallabag\Bundle\CoreBundle\Entiy\Tag $tag */ public function addTag(\Wallabag\Bundle\CoreBundle\Entiy\Tag $tag) { $this->tags[] = $tag; } /** * Remove tag * * @param \Wallabag\Bundle\CoreBundle\Entiy\Tag $tag */ public function removeTag(\Wallabag\Bundle\CoreBundle\Entiy\Tag $tag) { $this->tags->removeElement($tag); } public function flushTags() { $this->tags->clear(); } /** * Get tags * * @return Tag[] $tags */ public function getTags() { return $this->tags; } /** * Set archived * * @param boolean $archived * @return self */ public function setArchived($archived) { $this->archived = $archived; return $this; } /** * Get archived * * @return boolean $archived */ public function getArchived() { return $this->archived; } /** * Set deleted * * @param boolean $deleted * @return self */ public function setDeleted($deleted) { $this->deleted = $deleted; return $this; } /** * Get deleted * * @return boolean $deleted */ public function getDeleted() { return $this->deleted; } /** * Set starred * * @param boolean $starred * @return self */ public function setStarred($starred) { $this->starred = $starred; return $this; } /** * Get starred * * @return boolean $starred */ public function getStarred() { return $this->starred; } /** * Set user * * @param User $user * @return self */ public function setUser(User $user) { $this->user = $user; return $this; } /** * Get user * * @return User $user */ public function getUser() { return $this->user; } }
sylvainlg/wallabag-v2-symfony
src/Wallabag/Bundle/CoreBundle/Entity/Entry.php
PHP
mit
5,803
using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Web.Script.Serialization; namespace CommonHelperLibrary.WEB { /// <summary> /// Author : Hans.Huang /// Date : 2012-12-03 /// Class : HttpWebDealer /// Discription : Helper class for dealer with the http website /// </summary> public class HttpWebDealer { protected static LoggerHelper Logger = LoggerHelper.Instance; #region GetHtml /// <summary> /// Get Html text by URL /// I can't tell the encoding of page,So give me the encodeing best /// </summary> /// <param name="url">URL</param> /// <param name="headers">http request headers</param> /// <param name="txtEncoding">The Encoding suggest of webpage</param> /// <returns></returns> public static string GetHtml(string url, WebHeaderCollection headers = null, Encoding txtEncoding = null) { var html = ""; if (string.IsNullOrWhiteSpace(url)) return html; var response = GetResponseByUrl(url,headers); html = HttpWebDealerBase.GetHtmlFromResponse(response, txtEncoding); return html; } #endregion #region GetJsonObject /// <summary> /// Get Dynamic Object (json) /// </summary> /// <param name="url">URL</param> /// <param name="headers">http request headers</param> /// <param name="txtEncoding">The Encoding suggest of response</param> /// <returns></returns> public static dynamic GetJsonObject(string url,WebHeaderCollection headers = null, Encoding txtEncoding = null) { var json = GetHtml(url, headers, txtEncoding); var jsonSerializer = new JavaScriptSerializer(); return jsonSerializer.Deserialize<dynamic>(json); } #endregion #region DownloadFile /// <summary> /// Get file by HttpWebRequest and save it(Just for Small files those's content length less then 65K) /// </summary> /// <param name="fileName">File Name to save as</param> /// <param name="url">URL</param> /// <param name="path">The path to save the file</param> /// <param name="timeout">Request timeout</param> /// <param name="headers">http request header</param> /// <returns>Success:Ture</returns> public static bool DownloadFile(string fileName, string url, string path, int timeout, WebHeaderCollection headers = null) { var response = GetResponseByUrl(url, headers, timeout); var stream = response.GetResponseStream(); if (stream == null) return false; using (var bReader = new BinaryReader(stream)) { var length = Int32.Parse(response.ContentLength.ToString(CultureInfo.InvariantCulture)); var byteArr = new byte[length]; //stream.Read(byteArr, 0, length); bReader.Read(byteArr, 0, length); //if (File.Exists(path + fileName)) File.Delete(path + fileName); if (!Directory.Exists(path)) Directory.CreateDirectory(path); var fs = File.Create(path +"\\"+ fileName); fs.Write(byteArr, 0, length); fs.Close(); } return true; } /// <summary> /// Get file by WebClient method /// </summary> /// <param name="fileName">File name to save</param> /// <param name="url">file url to download</param> /// <param name="path">file path to save</param> /// <param name="monitor">Monitor action for download progress</param> /// <returns></returns> public static bool DownloadFile(string fileName, string url, string path, DownloadProgressChangedEventHandler monitor = null) { if (string.IsNullOrWhiteSpace(url)) return false; if (!path.EndsWith("\\")) path += "\\"; using (var wc = new WebClient()) { //if (File.Exists(path +"\\"+ fileName)) File.Delete(path +"\\"+ fileName); if (!Directory.Exists(path)) Directory.CreateDirectory(path); if (monitor != null) wc.DownloadProgressChanged += monitor; wc.DownloadFileAsync(new Uri(url), path + fileName); } return true; } /// <summary> /// Download largest file from url list /// </summary> /// <param name="fileName">File name to save</param> /// <param name="urls">file url list to download</param> /// <param name="path">file path to save</param> /// <param name="monitor">Monitor action for download progress</param> /// <returns>File Length</returns> public static long DownloadLargestFile(string fileName, List<string> urls, string path, DownloadProgressChangedEventHandler monitor = null) { if (urls == null || urls.Count == 0) return 0; var results = new Dictionary<string, long>(); var signals = new List<EventWaitHandle>(); var locker = new object(); foreach (var url in urls) { var signal = new EventWaitHandle(true, EventResetMode.ManualReset); signals.Add(signal); var str = url; signal.Reset(); Task.Run(() => { var rsponse = GetResponseByUrl(str, null, 3000); if (rsponse == null) return; lock (locker) { results.Add(str, rsponse.ContentLength); } signal.Set(); }); } signals.ForEach(s => s.WaitOne(3000)); var largest = new KeyValuePair<string, long>(string.Empty, 0); foreach (var res in results) { if (res.Value > largest.Value) largest = res; } return DownloadFile(fileName, largest.Key, path, monitor) ? largest.Value : 0; } #endregion #region GetResponseByUrl /// <summary> /// Get response by url /// </summary> /// <param name="url">URL</param> /// <param name="headers">Request headers</param> /// <param name="requestTimeout">Request timeout(Set to 0 for no limit)</param> /// <returns></returns> public static HttpWebResponse GetResponseByUrl(string url, WebHeaderCollection headers = null, int requestTimeout = 0) { HttpWebResponse response = null; var request = (HttpWebRequest)WebRequest.Create(url); if (requestTimeout > 0) request.Timeout = requestTimeout; string postData; HttpWebDealerBase.CorrectHeader(request, headers, out postData); for (var i = 0; i < 3; i++) { try { HttpWebDealerBase.TryPostData(request, postData); response = (HttpWebResponse)request.GetResponse(); return response; } catch (Exception e) { Logger.Msg("Error", url); Logger.Exception(e); } Thread.Sleep(200); } return response; } #endregion /// <summary> /// Detects the byte order mark of a file and returns an appropriate encoding for the file. /// </summary> /// <param name="stream"></param> /// <returns></returns> public static Encoding GetEncoding(Stream stream) { // Use Default of Encoding.Default (Ansi CodePage) var enc = Encoding.Default; // Detect byte order mark if any - otherwise assume default //var simple = new MemoryStream(); //stream.CopyTo(simple, 5); var buffer = new byte[5]; stream.Read(buffer, 0, 5); if (buffer[0] == 0xef && buffer[1] == 0xbb && buffer[2] == 0xbf) enc = Encoding.UTF8; else if (buffer[0] == 0xfe && buffer[1] == 0xff) enc = Encoding.Unicode; else if (buffer[0] == 0 && buffer[1] == 0 && buffer[2] == 0xfe && buffer[3] == 0xff) enc = Encoding.UTF32; else if (buffer[0] == 0x2b && buffer[1] == 0x2f && buffer[2] == 0x76) enc = Encoding.UTF7; //simple.Close(); return enc; } } }
HansHuang/MusicFM
CommonHelperLibrary/WEB/HttpWebDealer.cs
C#
mit
9,283
// Endless Online Bot v0.0.1 #ifndef UTIL_HPP_INCLUDED #define UTIL_HPP_INCLUDED #include <math.h> #include <vector> #include <string> int path_length(int x1, int y1, int x2, int y2); std::vector<std::string> Args(std::string str); std::string Lowercase(std::string str); #endif // UTIL_HPP_INCLUDED
Jimmyee/Endless-Online-Bot
util.hpp
C++
mit
318
const mutations = { SET_ACTIVE_TAB(state, tab){ state.activeTab = tab; }, SET_DATA_ACTIVE_TAB(state, tab){ state.hubActiveTab = tab; }, SET_PROXY_STATE(state, proxy){ state.proxy_switch = proxy; }, SET_INIT_INFO(state, info){ _.extend(state, info); } }; export default mutations;
NSFA/ysfplatform
src/store/mutations.js
JavaScript
mit
313
# frozen_string_literal: true require "dis/jobs/delete" require "dis/jobs/store" require "dis/jobs/change_type"
elektronaut/dis
lib/dis/jobs.rb
Ruby
mit
113
<?php namespace AppBundle\Security\Core\User; use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface; use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseClass; use Symfony\Component\Security\Core\User\UserInterface; class FOSUBUserProvider extends BaseClass { /** * {@inheritDoc} */ public function connect(UserInterface $user, UserResponseInterface $response) { $property = $this->getProperty($response); $username = $response->getUsername(); $previousUser = $this->userManager->findUserBy(array($property => $username)); var_dump( $property, $response->getProfilePicture(), $response->getRealName(), $response->getNickname(), $response->getUsername(), $previousUser ); //on connect - get the access token and the user ID $service = $response->getResourceOwner()->getName(); //we "disconnect" previously connected users if (null !== $previousUser = $this->userManager->findUserBy(array($property => $username,'auth_type'=>$service))) { $previousUser->setAccessToken($response->getAccessToken()); $this->userManager->updateUser($previousUser); } } /** * {@inheritdoc} */ public function loadUserByOAuthUserResponse(UserResponseInterface $response) { $username = $response->getUsername(); $service = $response->getResourceOwner()->getName(); $user = $this->userManager->findUserBy(array($this->getProperty($response) => $username,'auth_type'=>$service)); //when the user is registrating if (null === $user) { $user = $this->userManager->createUser(); $user->setUid($username); $user->setAccessToken($response->getAccessToken()); $user->setAuthType($service); //I have set all requested data with the user's username //modify here with relevant data $user->setUsername($response->getRealName()); $user->setUsernameCanonical($username); $user->setEmail($response->getEmail()); if($service=="facebook"){ $user->setPicture("https://graph.facebook.com/$username/picture"); }else{ $user->setPicture($response->getProfilePicture()); } $user->setPassword($username); $user->setEnabled(true); $this->userManager->updateUser($user); return $user; } //if user exists - go with the HWIOAuth way $user = parent::loadUserByOAuthUserResponse($response); //update access token $user->setAccessToken($response->getAccessToken()); return $user; } }
lahiiru/Quota
src/AppBundle/Security/Core/User/FOSUBUserProvider.php
PHP
mit
2,811
<?php namespace Db\User; use Core\Query; class GetUnconfirmedUsers extends Query { protected $id; protected function build() { $query = ' SELECT u.id, u.type, u.email, u.email_confirmed, u.email_confirmation_hash, u.account_confirmed, u.password, u.language, u.first_name, u.last_name, u.department, IFNULL(u.portrait_file_id, cnfg.value) AS portrait_file_id, u.created FROM users u JOIN configs cnfg ON cnfg.key = \'default_portrait_id\' WHERE u.email_confirmed = 1 AND u.account_confirmed = 0'; return $query; } }
dnl-jst/ownsocial
library/Db/User/GetUnconfirmedUsers.php
PHP
mit
606
// home page exports.index = function(req, res){ res.render('index', { title: 'B O X L A N D' }); };
Thomas-Elder/bo-xy
server/controllers/indexController.js
JavaScript
mit
102
'use strict'; /** * Module dependencies. */ var express = require('express'), mean = require('meanio'), consolidate = require('consolidate'), mongoStore = require('connect-mongo')(express), flash = require('connect-flash'), helpers = require('view-helpers'), config = require('./config'), expressValidator = require('express-validator'), appPath = process.cwd(), fs = require('fs'), assetmanager = require('assetmanager'); module.exports = function(app, passport, db) { app.set('showStackError', true); // Prettify HTML app.locals.pretty = true; // cache=memory or swig dies in NODE_ENV=production app.locals.cache = 'memory'; // Should be placed before express.static // To ensure that all assets and data are compressed (utilize bandwidth) app.use(express.compress({ filter: function(req, res) { return (/json|text|javascript|css/).test(res.getHeader('Content-Type')); }, // Levels are specified in a range of 0 to 9, where-as 0 is // no compression and 9 is best compression, but slowest level: 9 })); // Only use logger for development environment if (process.env.NODE_ENV === 'development') { app.use(express.logger('dev')); } // assign the template engine to .html files app.engine('html', consolidate[config.templateEngine]); // set .html as the default extension app.set('view engine', 'html'); // Set views path, template engine and default layout app.set('views', config.root + '/server/views'); // Enable jsonp app.enable('jsonp callback'); app.configure(function() { // The cookieParser should be above session app.use(express.cookieParser()); // Request body parsing middleware should be above methodOverride app.use(express.urlencoded()); app.use(express.json()); app.use(expressValidator()); app.use(express.methodOverride()); // Import your asset file var assets = require('./assets.json'); assetmanager.init({ js: assets.js, css: assets.css, debug: (process.env.NODE_ENV !== 'production'), webroot: 'public/public' }); // Add assets to local variables app.use(function(req, res, next) { res.locals({ assets: assetmanager.assets }); next(); }); // Express/Mongo session storage app.use(express.session({ secret: config.sessionSecret, store: new mongoStore({ db: db.connection.db, collection: config.sessionCollection }) })); // Dynamic helpers app.use(helpers(config.app.name)); // Use passport session app.use(passport.initialize()); app.use(passport.session()); //mean middleware from modules before routes app.use(mean.chainware.before); // Connect flash for flash messages app.use(flash()); // Routes should be at the last app.use(app.router); // Setting the fav icon and static folder app.use(express.favicon()); app.use('/public', express.static(config.root + '/public')); app.get('/modules/aggregated.js', function(req, res) { res.setHeader('content-type', 'text/javascript'); res.send(mean.aggregated.js); }); app.get('/modules/aggregated.css', function(req, res) { res.setHeader('content-type', 'text/css'); res.send(mean.aggregated.css); }); mean.events.on('modulesFound', function() { mean.modules.forEach(function(module) { app.use('/' + module.name, express.static(config.root + '/node_modules/' + module.name + '/public')); }); bootstrapRoutes(); //mean middlware from modules after routes app.use(mean.chainware.after); // Assume "not found" in the error msgs is a 404. this is somewhat // silly, but valid, you can do whatever you like, set properties, // use instanceof etc. app.use(function(err, req, res, next) { // Treat as 404 if (~err.message.indexOf('not found')) return next(); // Log it console.error(err.stack); // Error page res.status(500).render('500', { error: err.stack }); }); // Assume 404 since no middleware responded app.use(function(req, res) { res.status(404).render('404', { url: req.originalUrl, error: 'Not found' }); }); }); }); function bootstrapRoutes() { var routes_path = appPath + '/server/routes'; var walk = function(path) { fs.readdirSync(path).forEach(function(file) { var newPath = path + '/' + file; var stat = fs.statSync(newPath); if (stat.isFile()) { if (/(.*)\.(js$|coffee$)/.test(file)) { require(newPath)(app, passport); } // We skip the app/routes/middlewares directory as it is meant to be // used and shared by routes as further middlewares and is not a // route by itself } else if (stat.isDirectory() && file !== 'middlewares') { walk(newPath); } }); }; walk(routes_path); } };
tmcelreath/meanCity
server/config/express.js
JavaScript
mit
5,758