code
stringlengths
4
1.01M
body { background: #edefed; font-family: 'Lato', sans-serif; color: #FDFCFB; text-align: center; } form { width: 450px; margin: 17% auto; } .header { font-size: 35px; text-transform: uppercase; letter-spacing: 5px; color: #333; } .description { font-size: 14px; letter-spacing: 1px; line-height: 1.3em; margin: -2px 0 45px; color: #333; } .input { display: flex; align-items: center; } .button { height: 44px; color: #333; } #email { width: 75%; background: #FDFCFB; font-family: inherit; color: #737373; letter-spacing: 1px; text-indent: 5%; border-radius: 5px 0 0 5px; } #submit { width: 25%; height: 46px; background: #1BBD36; font-family: inherit; font-weight: bold; color: inherit; letter-spacing: 1px; border-radius: 0 5px 5px 0; cursor: pointer; transition: background .3s ease-in-out; } #submit:hover { background: #d45d7d; } input:focus { outline: none; outline: 2px solid #E86C8D; box-shadow: 0 0 2px #E86C8D; }
{template '_header'} <div class="page-heading"> <span class='pull-right'> {ifp 'shop.nav.add'} <a class="btn btn-primary btn-sm" href="{php echo merchUrl('shop/nav/add')}">添加新首页导航</a> {/if} <a class="btn btn-default btn-sm" href="{php echo merchUrl('shop/nav')}">返回列表</a> </span> <h2>{if !empty($item['id'])}编辑{else}添加{/if}首页导航 <small>{if !empty($item['id'])}修改【{$item['navname']}】{/if}</small></h2> </div> <form {ife 'shop.nav' $item}action="" method="post"{/if} class="form-horizontal form-validate" enctype="multipart/form-data"> <input type="hidden" name="id" value="{$item['id']}" /> <div class="form-group"> <label class="col-sm-2 control-label">排序</label> <div class="col-sm-9 col-xs-12"> {ife 'shop.nav' $item} <input type="text" name="displayorder" class="form-control" value="{$item['displayorder']}" /> <span class='help-block'>数字越大,排名越靠前</span> {else} <div class='form-control-static'>{$item['displayorder']}</div> {/if} </div> </div> <div class="form-group"> <label class="col-sm-2 control-label must">首页导航标题</label> <div class="col-sm-9 col-xs-12 "> {ife 'shop.nav' $item} <input type="text" id='navname' name="navname" class="form-control" value="{$item['navname']}" data-rule-required="true" /> {else} <div class='form-control-static'>{$item['navname']}</div> {/if} </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">首页导航图片</label> <div class="col-sm-9 col-xs-12"> {ife 'shop.nav' $item} {php echo tpl_form_field_image('icon', $item['icon'],'',array('dest_dir'=>'merch/'.$_W['merchid']))} <span class='help-block'>建议尺寸:100 * 100 , 请将所有首页导航图片尺寸保持一致</span> {else} {if !empty($item['icon'])} <a href='{php echo tomedia($item['icon'])}' target='_blank'> <img src="{php echo tomedia($item['icon'])}" style='width:100px;border:1px solid #ccc;padding:1px' /> </a> {/if} {/if} </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">首页导航链接</label> <div class="col-sm-9 col-xs-12"> {ife 'shop.nav' $item} <div class="input-group form-group" style="margin: 0;"> <input type="text" value="{$item['url']}" class="form-control valid" name="url" placeholder="" id="navlink"> <span data-input="#navlink" data-toggle="selectUrlMerch" class="input-group-addon btn btn-default">选择链接</span> </div> {else} <div class='form-control-static'>{$item['url']}</div> {/if} </div> </div> <div class="form-group"> <label class="col-sm-2 control-label">状态</label> <div class="col-sm-9 col-xs-12"> {ife 'shop.nav' $item} <label class='radio-inline'> <input type='radio' name='status' value=1' {if $item['status']==1}checked{/if} /> 显示 </label> <label class='radio-inline'> <input type='radio' name='status' value=0' {if $item['status']==0}checked{/if} /> 隐藏 </label> {else} <div class='form-control-static'>{if empty($item['status'])}隐藏{else}显示{/if}</div> {/if} </div> </div> <div class="form-group"> <label class="col-sm-2 control-label"></label> <div class="col-sm-9 col-xs-12"> {ife 'shop.nav' $item} <input type="submit" value="提交" class="btn btn-primary" /> {/if} <input type="button" name="back" onclick='history.back()' {ifp 'shop.nav.add|shop.nav.edit'}style='margin-left:10px;'{/if} value="返回列表" class="btn btn-default" /> </div> </div> </form> {template '_footer'}
using System; using System.Collections.Generic; using System.ComponentModel; using System.Net.Http.Headers; namespace food_therapist.Areas.HelpPage { /// <summary> /// This is used to identify the place where the sample should be applied. /// </summary> public class HelpPageSampleKey { /// <summary> /// Creates a new <see cref="HelpPageSampleKey"/> based on media type. /// </summary> /// <param name="mediaType">The media type.</param> public HelpPageSampleKey(MediaTypeHeaderValue mediaType) { if (mediaType == null) { throw new ArgumentNullException("mediaType"); } ActionName = String.Empty; ControllerName = String.Empty; MediaType = mediaType; ParameterNames = new HashSet<string>(StringComparer.OrdinalIgnoreCase); } /// <summary> /// Creates a new <see cref="HelpPageSampleKey"/> based on media type and CLR type. /// </summary> /// <param name="mediaType">The media type.</param> /// <param name="type">The CLR type.</param> public HelpPageSampleKey(MediaTypeHeaderValue mediaType, Type type) : this(mediaType) { if (type == null) { throw new ArgumentNullException("type"); } ParameterType = type; } /// <summary> /// Creates a new <see cref="HelpPageSampleKey"/> based on <see cref="SampleDirection"/>, controller name, action name and parameter names. /// </summary> /// <param name="sampleDirection">The <see cref="SampleDirection"/>.</param> /// <param name="controllerName">Name of the controller.</param> /// <param name="actionName">Name of the action.</param> /// <param name="parameterNames">The parameter names.</param> public HelpPageSampleKey(SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable<string> parameterNames) { if (!Enum.IsDefined(typeof(SampleDirection), sampleDirection)) { throw new InvalidEnumArgumentException("sampleDirection", (int)sampleDirection, typeof(SampleDirection)); } if (controllerName == null) { throw new ArgumentNullException("controllerName"); } if (actionName == null) { throw new ArgumentNullException("actionName"); } if (parameterNames == null) { throw new ArgumentNullException("parameterNames"); } ControllerName = controllerName; ActionName = actionName; ParameterNames = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase); SampleDirection = sampleDirection; } /// <summary> /// Creates a new <see cref="HelpPageSampleKey"/> based on media type, <see cref="SampleDirection"/>, controller name, action name and parameter names. /// </summary> /// <param name="mediaType">The media type.</param> /// <param name="sampleDirection">The <see cref="SampleDirection"/>.</param> /// <param name="controllerName">Name of the controller.</param> /// <param name="actionName">Name of the action.</param> /// <param name="parameterNames">The parameter names.</param> public HelpPageSampleKey(MediaTypeHeaderValue mediaType, SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable<string> parameterNames) : this(sampleDirection, controllerName, actionName, parameterNames) { if (mediaType == null) { throw new ArgumentNullException("mediaType"); } MediaType = mediaType; } /// <summary> /// Gets the name of the controller. /// </summary> /// <value> /// The name of the controller. /// </value> public string ControllerName { get; private set; } /// <summary> /// Gets the name of the action. /// </summary> /// <value> /// The name of the action. /// </value> public string ActionName { get; private set; } /// <summary> /// Gets the media type. /// </summary> /// <value> /// The media type. /// </value> public MediaTypeHeaderValue MediaType { get; private set; } /// <summary> /// Gets the parameter names. /// </summary> public HashSet<string> ParameterNames { get; private set; } public Type ParameterType { get; private set; } /// <summary> /// Gets the <see cref="SampleDirection"/>. /// </summary> public SampleDirection? SampleDirection { get; private set; } public override bool Equals(object obj) { HelpPageSampleKey otherKey = obj as HelpPageSampleKey; if (otherKey == null) { return false; } return String.Equals(ControllerName, otherKey.ControllerName, StringComparison.OrdinalIgnoreCase) && String.Equals(ActionName, otherKey.ActionName, StringComparison.OrdinalIgnoreCase) && (MediaType == otherKey.MediaType || (MediaType != null && MediaType.Equals(otherKey.MediaType))) && ParameterType == otherKey.ParameterType && SampleDirection == otherKey.SampleDirection && ParameterNames.SetEquals(otherKey.ParameterNames); } public override int GetHashCode() { int hashCode = ControllerName.ToUpperInvariant().GetHashCode() ^ ActionName.ToUpperInvariant().GetHashCode(); if (MediaType != null) { hashCode ^= MediaType.GetHashCode(); } if (SampleDirection != null) { hashCode ^= SampleDirection.GetHashCode(); } if (ParameterType != null) { hashCode ^= ParameterType.GetHashCode(); } foreach (string parameterName in ParameterNames) { hashCode ^= parameterName.ToUpperInvariant().GetHashCode(); } return hashCode; } } }
package com.f2prateek.segment.model; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.Collections; import java.util.Date; import java.util.Map; import static com.f2prateek.segment.model.Utils.assertNotNull; import static com.f2prateek.segment.model.Utils.assertNotNullOrEmpty; import static com.f2prateek.segment.model.Utils.immutableCopyOf; import static com.f2prateek.segment.model.Utils.isNullOrEmpty; /** * The screen call lets you record whenever a user sees a screen, along with any properties about * the screen. * * @see <a href="https://segment.com/docs/spec/screen/">Screen</a> */ public final class ScreenMessage extends Message { private @NonNull final String name; private @Nullable final Map<String, Object> properties; @Private ScreenMessage(Type type, String messageId, Date timestamp, Map<String, Object> context, Map<String, Object> integrations, String userId, String anonymousId, @NonNull String name, @Nullable Map<String, Object> properties) { super(type, messageId, timestamp, context, integrations, userId, anonymousId); this.name = name; this.properties = properties; } public @NonNull String name() { return name; } public @Nullable Map<String, Object> properties() { return properties; } @Override public @NonNull Builder toBuilder() { return new Builder(this); } @Override public String toString() { return "ScreenMessage{" + "type=" + type + ", " + "messageId=" + messageId + ", " + "timestamp=" + timestamp + ", " + "context=" + context + ", " + "integrations=" + integrations + ", " + "userId=" + userId + ", " + "anonymousId=" + anonymousId + ", " + "name=" + name + ", " + "properties=" + properties + "}"; } @Override public boolean equals(Object o) { if (o == this) { return true; } if (o instanceof ScreenMessage) { ScreenMessage that = (ScreenMessage) o; return (this.type.equals(that.type())) && ((this.messageId == null) ? (that.messageId() == null) : this.messageId.equals(that.messageId())) && ((this.timestamp == null) ? (that.timestamp() == null) : this.timestamp.equals(that.timestamp())) && ((this.context == null) ? (that.context() == null) : this.context.equals(that.context())) && ((this.integrations == null) ? (that.integrations() == null) : this.integrations.equals(that.integrations())) && ((this.userId == null) ? (that.userId() == null) : this.userId.equals(that.userId())) && ((this.anonymousId == null) ? (that.anonymousId() == null) : this.anonymousId.equals(that.anonymousId())) && (this.name.equals(that.name())) && ((this.properties == null) ? (that.properties() == null) : this.properties.equals(that.properties())); } return false; } @Override public int hashCode() { int h = 1; h *= 1000003; h ^= this.type.hashCode(); h *= 1000003; h ^= (messageId == null) ? 0 : this.messageId.hashCode(); h *= 1000003; h ^= (timestamp == null) ? 0 : this.timestamp.hashCode(); h *= 1000003; h ^= (context == null) ? 0 : this.context.hashCode(); h *= 1000003; h ^= (integrations == null) ? 0 : this.integrations.hashCode(); h *= 1000003; h ^= (userId == null) ? 0 : this.userId.hashCode(); h *= 1000003; h ^= (anonymousId == null) ? 0 : this.anonymousId.hashCode(); h *= 1000003; h ^= this.name.hashCode(); h *= 1000003; h ^= (properties == null) ? 0 : this.properties.hashCode(); return h; } /** Fluent API for creating {@link ScreenMessage} instances. */ public static class Builder extends Message.Builder<ScreenMessage, Builder> { private String name; private Map<String, Object> properties; public Builder() { super(Type.screen); } @Private Builder(ScreenMessage screen) { super(screen); name = screen.name(); properties = screen.properties(); } public @NonNull Builder name(@NonNull String name) { this.name = assertNotNullOrEmpty(name, "name"); return this; } public @NonNull Builder properties(@NonNull Map<String, Object> properties) { assertNotNull(properties, "properties"); this.properties = immutableCopyOf(properties); return this; } @Override protected ScreenMessage realBuild(Type type, String messageId, Date timestamp, Map<String, Object> context, Map<String, Object> integrations, String userId, String anonymousId) { assertNotNullOrEmpty(name, "name"); Map<String, Object> properties = this.properties; if (isNullOrEmpty(properties)) { properties = Collections.emptyMap(); } return new ScreenMessage(type, messageId, timestamp, context, integrations, userId, anonymousId, name, properties); } @Override Builder self() { return this; } } }
namespace BlockEngine.Math { public class Mathx { public static int DivideRoundDown(int numerator, int positiveDivisor) { if (numerator >= 0) { return numerator / positiveDivisor; } else { return (numerator + 1) / positiveDivisor - 1; } } } }
(function () { 'use strict'; // var matcher = require('../../lib/matchUsers'); angular .module('chat.routes') .config(routeConfig); routeConfig.$inject = ['$stateProvider']; var c = "/room";// need to make this somehow return the correct room function routeConfig($stateProvider) { $stateProvider .state('chat', { url: c, templateUrl: '/modules/chat/client/views/chat.client.view.html', controller: 'ChatController', controllerAs: 'vm', data: { roles: ['user', 'admin'], pageTitle: 'Chat' } }); } }());
import React from 'react'; import { shallow } from 'enzyme'; import { expect } from 'chai'; import sinon from 'sinon'; import RadioInput from './'; describe('RadioInput', () => { let wrapper; let value; let style; let onChange; beforeEach(() => { value = 'test'; style = { backgroundColor: 'blue' }; onChange = sinon.spy(); wrapper = shallow( <RadioInput style={style} value={value} onChange={onChange} /> ); }); it('should render a radio tag', () => { expect(wrapper.find('radio')).to.have.length(1); }); it('should have a style value set via the style prop', () => { expect(wrapper.find('radio')).to.have.style('background-color', 'blue'); }); it('should have a value set via the value prop', () => { expect(wrapper.find('radio').text()).to.equal(value); }); it('should call onChange on change', () => { wrapper.find('radio').simulate('change'); expect(onChange.calledOnce).to.equal(true); }); });
#include <iostream> #include <future> #include <signal.h> #include <string.h> #include <vector> #include "BotHandler.h" #include "BotService.h" #include "config.h" #include "ClientHandler.h" #include "Net/TCPConnection.h" #include "Net/TCPServer.h" using namespace std; using namespace hlt; vector<ClientHandler::Ptr> clientHandlers; vector<BotHandler::Ptr> botHandlers; void removeBot(BotHandler::Ptr handler) { BotService::UnregisterBot(handler->getName()); auto iter = std::find(botHandlers.begin(), botHandlers.end(), handler); if (iter != botHandlers.end()) botHandlers.erase(iter); } void registerBot(const BotHandler::EventArgument& arg, BotHandler::Ptr botHandler) { cout << "Trying to register new bot: " << arg["name"] << endl; int result = BotService::RegisterBot(arg["name"], botHandler); if (result == 0) { cout << "Registered new bot: " << arg["name"] << endl; } else { cout << "Couldn't register bot closing..." << endl; botHandler->close(); removeBot(botHandler); } } static void signalHandler(int signum) { // TODO Handle signals } int main(int argc, char** argv) { struct sigaction sa; sa.sa_handler = signalHandler; sigemptyset(&sa.sa_mask); if (sigaction(SIGPIPE, &sa, NULL) == -1) { cout << "Couldn't set signal handler. Exiting..." << endl; return 1; } TCPServer clientServer(string(CLIENT_PORT)); clientServer.getEventEmitter().on("connection", [](const TCPServer::EventArgument& arg) { cout << "New connection to client server!" << endl; clientHandlers.push_back(ClientHandler::Ptr( new ClientHandler(arg.connection))); } ); clientServer.start(); TCPServer spServer(string(SP_PORT)); spServer.getEventEmitter().on("connection", [](const TCPServer::EventArgument& arg) { cout << "New connection to bot server!" << endl; BotHandler::Ptr botHandler(new BotHandler(arg.connection)); botHandlers.push_back(botHandler); botHandler->getEventEmitter().on("close", std::bind(removeBot, botHandler)); botHandler->getEventEmitter().on("info", std::bind(registerBot, placeholders::_1, botHandler)); } ); spServer.start(); while (1) { string in; cin >> in; // Possible UI here } return 0; }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"><!-- saved from url=(0014)about:internet --><html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Keyins API Documentation</title><link rel="stylesheet" href="style.css" type="text/css" media="screen"><link rel="stylesheet" href="print.css" type="text/css" media="print"><link rel="stylesheet" href="override.css" type="text/css"> </head> <frameset rows="40%,60%" border="2" framespacing="1" bordercolor="#AAAAAA"> <frame src="package-list.html" name="packageListFrame" scrolling="yes"> <frame src="all-classes.html" name="classListFrame" scrolling="yes"> <noframes> <body> <h2>Frame Alert</h2> <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <br> Link to<a href="package-summary.html">Non-frame version.</a> </p> </body> </noframes> </frameset> <!--<br/>Fri Sep 30 2011, 03:10 AM +09:00 --></html>
--- type: post layout: post title: Version Control eye_catch: /assets/img/acw.png tags: - agile-chuck-wagon - devops - vcs - versioning - git comments: true categories: - professional - podcast status: publish published: true meta: _edit_last: "1" --- ### Agile Chuck Wagon, season 9, episode 11 In today's episode, Chuck talks about version control. He uses software and non-software examples, then talks through the basics of git, a popular version control system, uses those running examples. (length: 22 min)
#import <Foundation/Foundation.h> #import "JSONAPIRequest.h" @class ShuttleStop; @class ShuttleRoute; @class ShuttleRouteCache; @class ShuttleStopLocation; @protocol ShuttleDataManagerDelegate<NSObject> // everything is optional. @optional // message sent when routes were received. If request failed, this is called with a nil routes array -(void) routesReceived:(NSArray*) routes; // message sent when stops were received. If request failed, this is called with a nil stops array -(void) stopsReceived:(NSArray*) routes; // message sent when a shuttle stop is received. If request fails, this is called with nil -(void) stopInfoReceived:(NSArray*)shuttleStopSchedules forStopID:(NSString*)stopID; // message sent when a shuttle route is received. If request fails, this is called with nil -(void) routeInfoReceived:(ShuttleRoute*)shuttleRoute forRouteID:(NSString*)routeID; @end @interface ShuttleDataManager : NSObject <JSONAPIDelegate> { // cached shuttle routes. NSMutableArray* _shuttleRoutes; // cached shuttle routes sorted by route ID NSMutableDictionary* _shuttleRoutesByID; // cached shuttle stops locations. NSMutableArray* _stopLocations; NSMutableDictionary *_stopLocationsByID; // registered delegates NSMutableSet* _registeredDelegates; } @property (readonly) NSArray* shuttleRoutes; @property (readonly) NSDictionary* shuttleRoutesByID; @property (readonly) NSArray* stopLocations; @property (readonly) NSDictionary *stopLocationsByID; // get the signleton data manager +(ShuttleDataManager*) sharedDataManager; // return a list of all shuttle stops. // this method is only here for backwards compatibility with CampusMapViewController // which includes a function to display all shuttle stops on the map // though that function is not used as we decided to get rid of the shuttle button from the UI // so this can go away if that goes away - (NSArray *)shuttleStops; + (ShuttleRoute *)shuttleRouteWithID:(NSString *)routeID; + (ShuttleRouteCache *)routeCacheWithID:(NSString *)routeID; + (ShuttleStop *)stopWithRoute:(NSString *)routeID stopID:(NSString *)stopID error:(NSError **)error; + (ShuttleStopLocation *)stopLocationWithID:(NSString *)stopID; // delegate registration and unregistration -(void) registerDelegate:(id<ShuttleDataManagerDelegate>)delegate; -(void) unregisterDelegate:(id<ShuttleDataManagerDelegate>)delegate; // request the routes from the server. -(void) requestRoutes; // request the stops -(void) requestStops; // request full information about a particular stop -(void) requestStop:(NSString*)stopID; // request full information about a particular route - (void)requestFullRoute:(NSString*)routeID; - (void)requestRoute:(NSString*)routeID; @end
/*global describe, beforeEach, it*/ 'use strict'; var assert = require('assert'); describe('ttwebapp generator', function () { it('can be imported without blowing up', function () { var app = require('../app'); assert(app !== undefined); }); });
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- Mirrored from www.codeigniter.org.tw/user_guide/tutorial/index.html by HTTrack Website Copier/3.x [XR&CO'2013], Mon, 14 Oct 2013 15:25:28 GMT --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>基本簡介 : CodeIgniter 使用手冊</title> <style type='text/css' media='all'>@import url('../userguide.css');</style> <link rel='stylesheet' type='text/css' media='all' href='../userguide.css' /> <script type="text/javascript" src="../nav/nav.js"></script> <script type="text/javascript" src="../nav/prototype.lite.js"></script> <script type="text/javascript" src="../nav/moo.fx.js"></script> <script type="text/javascript" src="../nav/user_guide_menu.js"></script> <meta http-equiv='expires' content='-1' /> <meta http-equiv= 'pragma' content='no-cache' /> <meta name='robots' content='all' /> <meta name='author' content='ExpressionEngine Dev Team' /> <meta name='description' content='CodeIgniter User Guide' /> </head> <body> <!-- START NAVIGATION --> <div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div> <div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div> <div id="masthead"> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> <td><h1>CodeIgniter 使用手冊版本 2.1.4</h1></td> <td id="breadcrumb_right"><a href="../toc.html">目錄</a></td> </tr> </table> </div> <!-- END NAVIGATION --> <!-- START BREADCRUMB --> <table cellpadding="0" cellspacing="0" border="0" style="width:100%"> <tr> <td id="breadcrumb"> <a href="http://www.codeigniter.org.tw/">CodeIgniter 首頁</a> &nbsp;&#8250;&nbsp; <a href="../index-2.html">使用手冊首頁</a> &nbsp;&#8250;&nbsp; <a href="index.html">指導手冊</a> &nbsp;&#8250;&nbsp; 基本簡介 </td> <td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="www.codeigniter.org.tw/user_guide/" />搜尋使用手冊&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td> </tr> </table> <!-- END BREADCRUMB --> <br clear="all" /> <!-- START CONTENT --> <div id="content"> <h1>指導手冊 &minus; 基本簡介</h1> <p>這篇教學旨在向你介紹 CodeIgniter 框架以及 MVC 架構的基本原則。它將一步步的告訴你一個基本的 CodeIgniter 程式是如何建構的。</p> <p>在這篇教學裡,你將會製作一個<strong>簡單的新聞程式</strong>。你將從使用程式來讀取靜態頁面開始。接著,你會製作一個新聞模組,可以從資料庫讀取新聞項目。最後你會增加一個表單,用來在資料庫中增加新聞項目。</p> <p>這篇教學主要會專注在:</p> <ul> <li>Model-View-Controller 基礎知識</li> <li>路由(Routing)基礎知識</li> <li>表單驗證</li> <li>使用 &quot;Active Record&quot; 來做簡單的資料庫查詢</li> </ul> <p>整篇教學被分為數個部份進行,每一部份解釋 CodeIgniter 框架的一小部份功能。祥列如下:</p> <ul> <li>簡介,也就是目前這一頁,給你一些概念讓你知道接下來會做些什麼。</li> <li><a href="static_pages.html">靜態頁面</a>,將會教你關於控制器(Controller),檢視(View)與路由的基礎知識。</li> <li><a href="news_section.html">新聞模組</a>,這邊你將開始使用模型(Model),並且進行一些簡單的資料庫操作。</li> <li><a href="create_news_items.html">新增新聞項目</a>,將會進行更進階的資料庫操作以及表單驗證。</li> <li><a href="conclusion.html">結論</a>,將會指引你一些未來的學習方向以及其它資源。</li> </ul> <p>祝你在 CodeIgniter 框架的探索中旅途愉快。</p> </div> <!-- END CONTENT --> <div id="footer"> <p> 上個主題:&nbsp;&nbsp;<a href="../overview/goals.html">架構目標</a> &nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp; <a href="#top">回到頂端</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp; <a href="../index-2.html">使用手冊首頁</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp; 下個主題:&nbsp;&nbsp;<a href="static_pages.html">靜態頁面</a> </p> <p><a href="http://www.codeigniter.org.tw/">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2013 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a></p> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-5766319-11"); pageTracker._trackPageview(); } catch(err) {}</script> </body> <!-- Mirrored from www.codeigniter.org.tw/user_guide/tutorial/index.html by HTTrack Website Copier/3.x [XR&CO'2013], Mon, 14 Oct 2013 15:25:28 GMT --> </html>
# ProgramRelations_items ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **href** | **string** | | [optional] [default to null] **model** | **string** | | [optional] [default to null] **operation** | **string** | | [optional] [default to null] **params** | [**ProgramRelations_items_params**](ProgramRelations_items_params.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
require 'test_helper' class GridTest < ActiveSupport::TestCase test 'load Grid model correctly' do assert_kind_of Gridder::Grid, Gridder::Grid.new(12, 60, 20) end test 'handle accessors correctly' do grid = Gridder::Grid.new(12, 60, 20) assert_same 12, grid.num_cols assert_same 60, grid.col_width assert_same 20, grid.gutter grid.num_cols = 10 assert_same 10, grid.num_cols grid.col_width = 80 assert_same 80, grid.col_width grid.gutter = 30 assert_same 30, grid.gutter end test 'validate correctly' do assert Gridder::Grid.new(12, 60, 20).valid? assert Gridder::Grid.new(false, false, false).invalid? assert Gridder::Grid.new(12, false, false).invalid? assert Gridder::Grid.new(12, 60, false).invalid? assert Gridder::Grid.new(12, 60, 'test').invalid? assert Gridder::Grid.new(12, 60.5, 20).invalid? assert Gridder::Grid.new(-12, 60, 20).invalid? assert Gridder::Grid.new(0, 60, 20).invalid? assert Gridder::Grid.new(1, 60, 20).valid? assert Gridder::Grid.new(12, -60, 20).invalid? assert Gridder::Grid.new(12, 0, 20).invalid? assert Gridder::Grid.new(12, 1, 20).valid? assert Gridder::Grid.new(12, 60, -20).invalid? assert Gridder::Grid.new(12, 60, 0).valid? assert Gridder::Grid.new(12, 60, 11).invalid? assert Gridder::Grid.new(12, 200, 100).invalid? assert Gridder::Grid.new(200, 60, 20).invalid? end end
<!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <!--Designerd by: http://bootstrapthemes.co--> <head> <meta charset="utf-8"> <title>Sami Ellougani</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <!--Google Font link--> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Raleway:400,600,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet"> <link rel="stylesheet" href="assets/css/slick.css"> <link rel="stylesheet" href="assets/css/slick-theme.css"> <link rel="stylesheet" href="assets/css/animate.css"> <link rel="stylesheet" href="assets/css/icofont.css"> <link rel="stylesheet" href="assets/css/font-awesome.min.css"> <link rel="stylesheet" href="assets/css/bootstrap.css"> <link rel="stylesheet" href="assets/css/magnific-popup.css"> <link rel="stylesheet" href="assets/css/bootsnav.css"> <!--For Plugins external css--> <!--<link rel="stylesheet" href="assets/css/plugins.css" />--> <!--Theme custom css --> <link rel="stylesheet" href="assets/css/style.css"> <!--<link rel="stylesheet" href="assets/css/colors/maron.css">--> <!--Theme Responsive css--> <link rel="stylesheet" href="assets/css/responsive.css" /> <script src="assets/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script> <script> if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { window.location.href = "mobile/mobile.html"; } </script> </head> <body data-spy="scroll" data-target=".navbar-collapse"> <!-- Preloader --> <div id="loading"> <div id="loading-center"> <div id="loading-center-absolute"> <div class="object" id="object_one"></div> <div class="object" id="object_two"></div> <div class="object" id="object_three"></div> <div class="object" id="object_four"></div> </div> </div> </div><!--End off Preloader --> <div class="culmn"> <!--Home page style--> <nav class="navbar navbar-default navbar-fixed white no-background bootsnav"> <!-- Start Top Search --> <div class="top-search"> <div class="container"> <div class="input-group"> <span class="input-group-addon"><i class="fa fa-search"></i></span> <input type="text" class="form-control" placeholder="Search"> <span class="input-group-addon close-search"><i class="fa fa-times"></i></span> </div> </div> </div> <!-- End Top Search --> <div class="container"> <!-- Start Header Navigation --> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-menu"> <i class="fa fa-bars"></i> </button> </div> <!-- End Header Navigation --> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="navbar-menu"> <ul class="nav navbar-nav navbar-right" data-in="fadeInDown" data-out="fadeOutUp"> <li><a href="#hello">Hello</a></li> <li><a href="#about">About</a></li> <li><a href="#portfolio">Projects</a></li> <li><a href="#skill">Skills</a></li> <li><a href="#contact">Contact</a></li> <li><a href="index.html">Landing</a></li> </ul> </div><!-- /.navbar-collapse --> </div> </nav> <!--Home Sections--> <section id="hello" class="home bg-mega"> <div class="overlay"></div> <div class="container"> <div class="row"> <div class="main_home"> <img class="img-responsive" src="assets/images/profile.png" alt=""> <div class="home_text"> <h1 class="text-white"> Sami Ellougani </br > <small class="text-white">Student | Programmer | Problem Solver </small></h1> </div> </div> </div><!--End off row--> </div><!--End off container --> </section> <!--End off Home Sections--> <!--About Sections--> <section id="about" class="about roomy-100"> <div class="container"> <div class="row"> <div class="main_about"> <div class="col-md-6"> <div class="about_content"> <h2>ABOUT ME</h2> <div class="separator_left"></div> <p>I am a senior pursuing a Computer Science degree at Marist College located in Poughkeepsie, New York. I continue to learn by being an active member of Computer Society, a campus technology club, and I also practice my programming skills by working on personal projects. In terms of experience, I have interned at Express Scripts as a SQL Server DBA during the summer of 2016. I worked as a programming lab tutor for Marist College in an effort to help students learn several different programming languages. I have also worked as a Full Stack JavaScript Developer for the CCAC at Marist College. I spent a summer in San Antonio, Texas interning at USAA as a Software Developer. If you would like more technical details, be sure to download my resume below. Be sure to take a look at the extra content I added to see a more detailed description of my different experiences! </p> <div class="about_btns m-top-40"> <a href="assets/pdf/Ellougani,Sami-resume.pdf" class="btn btn-primary">DOWNLOAD RESUME</a> </div> </div> </div> <div class="col-md-6"> <div class="about_accordion wow fadeIn"> <div id="faq_main_content" class="faq_main_content"> <h6><i class="fa fa-angle-right"></i> USAA </h6> <div> <div class="content"> <p>Software Developer - Intern</p> <p>This internship was an incredible experience. This was actually the first time I spent being more than an hour away from home for a long period of time (I live in NJ, and worked in TX). USAA tought me a lot about Software Development, and even more about the hardship of the military lifestyle. Experiences like these will carry on with me throughout the rest of my career. Very thankful for the opportunities that were given to me during this summer!</p> </div> </div> <!-- End off accordion item-1 --> <h6><i class="fa fa-angle-right"></i> MARIST COLLEGE CLOUD COMPUTING AND ANALYTICS CENTER</h6> <div> <div class="content"> <p>Full Stack Software Developer</p> <p>At this point in my career, I had no interest in learning about Full Stack Development. I had an idea of what it was, but I thought that it would not be something that would ever interest me. My time working for the Marist CCAC taught me otherwise. I learned about a ton of cool JavaScript tools, and even had the oppurtunity to collaborate several times with the customer! </p> </div> </div> <!-- End off accordion item-2 --> <h6> <i class="fa fa-angle-right"></i> SCHOOL OF COMPUTER SCIENCE AND MATH AT MARIST COLLEGE </h6> <div> <div class="content"> <p>Programming Lab Tutor</p> <p>I used to go to my school's Programming Lab for help during my intro courses. However, I never thought that I would be in the position of being the tutor that helps others. My professor recommended me for this position going into my junior year, and I couldn't thank him enough. Not only was it a great way to test how well I knew the foundations of programming, but it was also so rewarding seeing my classmates succeed in their classes! </p> </div> </div> <!-- End off accordion item-3 --> <h6><i class="fa fa-angle-right"></i> EXPRESS SCRIPTS </h6> <div> <div class="content"> <p>SQL Server Database Administrator - Intern</p> <p>My first internship was at Express Scripts working as a SQL Server DBA. I left Express Scripts feeling proud of how well I performed. I contributed to my team's success by completing my intern project, and contributed to my own success by knocking my intern presentation out of the park. Express Scripts taught me to be brave and bold. </p> </div> </div> <!-- End off accordion item-4 --> </div> </div> </div> </div> </div><!--End off row--> </div><!--End off container --> <br /> <br /> <br /> <br /> <hr /> <br /> <br /> <div class="container"> <div class="row"> <div class="about_bottom_content"> <div class="col-md-4"> <div class="about_bottom_item m-top-20"> <div class="ab_head"> <div class="ab_head_icon"> <i class="icofont icofont-brain-alt"></i> </div> <h6 class="m-top-20"> PROGRAMMER </h6> </div> <p class="m-top-20">I started programming when I enrolled in AP Computer Science in high school. It has been a great experience seeing how much technology has changed throughout the years and how I am going to impact the future of technology as well.</p> </div> </div> <div class="col-md-4"> <div class="about_bottom_item m-top-20"> <div class="ab_head"> <div class="ab_head_icon"> <i class="icofont icofont-runner"></i> </div> <h6 class="m-top-20">STUDENT</h6> </div> <p class="m-top-20">I am student at Marist College pursuing a BS in Computer Science. Fun fact, I have participated in sports since I was a freshman in high school. I am going into my 8th year of being on a Cross Country/Track team because I am a Division 1 athlete for Marist. </p> </div> </div> <div class="col-md-4"> <div class="about_bottom_item m-top-20"> <div class="ab_head"> <div class="ab_head_icon"> <i class="icofont icofont-chat"></i> </div> <h6 class="m-top-20">PROBLEM SOLVER</h6> </div> <p class="m-top-20">Problem solving and programming go together like peanut butter and jelly. Programming is only a skill that is used to solve problems that people face day to day. Being able to contribute to a company's success in problem solving is the reason I enjoy programming.</p> </div> </div> </div><!--End off row--> </div><!--End off container --> </section> <!--End off About section --> <!--Portfolio Section--> <section id="portfolio" class="portfolio lightbg"> <div class="container"> <div class="row"> <div class="main_portfolio roomy-100"> <div class="col-md-8 col-md-offset-2"> <div class="head_title text-center"> <h2>MY PROJECTS</h2> <div class="separator_auto"></div> <p>Programming is only best when you get to make new things! Below I have some photos of the prevalent tools I used to make some of my projects, along with links to my <a href="https://github.com/sami10015">Github</a> repos! </p> </div> </div> <div class="portfolio_content"> <div class="col-md-6 m-top-30"> <div class="portfolio_item portfolio_item2"> <img src="assets/images/Portfolio/ts.jpg" alt="" /> <div class="portfolio_hover text-center"> <h6 class="text-uppercase text-white">6502 Operating System</h6> <p class=" text-white">Created an Operating System simulation using basic OS architecture and 6502 operation codes. Visuals are created with HTML5+CSS3 and back-end functionality was implemented with TypeScript(super-set of JavaScript)</p> <div class="portfolio_hover_icon"> <a href="https://github.com/sami10015/TS-OperatingSystem"><i class="fa fa-github"></i></a> </div> </div> </div> </div> <div class="col-md-6 m-top-30"> <div class="portfolio_item portfolio_item2"> <img src="assets/images/Portfolio/py.png" alt="" /> <div class="portfolio_hover text-center"> <h6 class="text-uppercase text-white">Twitter Clone</h6> <p class=" text-white">This program was created in a test driven environment that implements common Twitter functionalities such as sending a tweet, updating a profile, and looking through a timeline. This project was the final project of an online Advanced Python Programming bootcamp. </p> <div class="portfolio_hover_icon"> <a href="https://github.com/sami10015/pyp-w4-gw-twitter-clone"><i class="fa fa-github"></i></a> </div> </div> </div> </div> </div> <div class="col-md-4 m-top-30"> <div class="portfolio_item portfolio_item2"> <img src="assets/images/Portfolio/java.jpg" alt="" /> <div class="portfolio_hover text-center"> <h6 class="text-uppercase text-white">FlAmazon Shopping Cart</h6> <p class=" text-white">Created a desktop application that allows a user to keep track of their order on a fictional website called "flAmazon." The user's data is stored in an Access 2013 database, and the GUI was created with Java Swing.</p> <div class="portfolio_hover_icon"> <a href="https://github.com/sami10015/flAmazon_Project"><i class="fa fa-github"></i></a> </div> </div> </div> </div> <div class="col-md-4 m-top-30"> <div class="portfolio_item portfolio_item2"> <img src="assets/images/Portfolio/c++.png" alt="" /> <div class="portfolio_hover text-center"> <h6 class="text-uppercase text-white">No-Stairs</h6> <p class=" text-white">Wrote and built an event-driven game that utilizes the C++ language, and SFML library. Also, gained a grasp of game assets such as objects, sprites, sounds, and music.</p> <div class="portfolio_hover_icon"> <a href="https://github.com/sami10015/No-Stairs"><i class="fa fa-github"></i></a> </div> </div> </div> </div> <div class="col-md-4 m-top-30"> <div class="portfolio_item portfolio_item2"> <img src="assets/images/Portfolio/php.png" alt="" /> <div class="portfolio_hover text-center"> <h6 class="text-uppercase text-white">Limbo</h6> <p class=" text-white">Created a website that allows students, faculty, and staff to search through a database for lost items. The website also allows users to post findings of items that includes details such as where it was found, what time, etc. There is also admin functionality.</p> <div class="portfolio_hover_icon"> <a href="https://github.com/sami10015/limbo-marist-php"><i class="fa fa-github"></i></a> </div> </div> </div> </div> </div> </div> </div><!--End off row --> </div><!--End off container --> </section><!-- End off Portfolio section--> <!--Skill Sections--> <section id="skill" class="skill roomy-100"> <div class="container"> <div class="row"> <div class="main_skill"> <div class="col-md-6"> <div class="skill_content wow fadeIn"> <h2>My Skills</h2> <div class="separator_left"></div> <p>Marist College has taught me a broad range of skills that I will utilize throughout the rest of my career. I had several courses teach me about different back-end technologies, and also created several projects that showcase my skillset with them. I have also had several oppurtunities to learn about front-end development, and how important design is when creating any application. With the combination of a front-end and back-end skillset, I was hired by the Marist CCAC to work as a Full Stack Developer. In my free time, I enjoy learning about the field of game development, and took a couple game programming courses at Marist. </p> </div> </div> <div class="col-md-6"> <div class="skill_bar sm-m-top-50"> <div class="teamskillbar clearfix m-top-20" data-percent="70%"> <h6>Full Stack Development</h6> <div class="teamskillbar-bar"></div> </div> <!-- End Skill Bar --> <div class="teamskillbar clearfix m-top-50" data-percent="80%"> <h6>Back-End Development</h6> <div class="teamskillbar-bar"></div> </div> <!-- End Skill Bar --> <div class="teamskillbar clearfix m-top-50" data-percent="55%"> <h6>Game Development</h6> <div class="teamskillbar-bar"></div> </div> <!-- End Skill Bar --> <div class="teamskillbar clearfix m-top-50" data-percent="60%"> <h6>Front-End Development</h6> <div class="teamskillbar-bar"></div> </div> <!-- End Skill Bar --> </div> </div> </div> </div><!--End off row--> </div><!--End off container --> <br /> <br /> <br /> <hr /> <br /> <br /> <br /> <div class="container"> <div class="row"> <div class="skill_bottom_content text-center"> <div class="col-md-3"> <div class="skill_bottom_item"> <h2 class="statistic-counter">3468</h2> <div class="separator_small"></div> <h5><em>Questions Asked</em></h5> </div> </div> <div class="col-md-3"> <div class="skill_bottom_item"> <h2 class="statistic-counter">4638</h2> <div class="separator_small"></div> <h5><em>Bugs Found</em></h5> </div> </div> <div class="col-md-3"> <div class="skill_bottom_item"> <h2 class="statistic-counter">4321</h2> <div class="separator_small"></div> <h5><em>Cups of coffee</em></h5> </div> </div> <div class="col-md-3"> <div class="skill_bottom_item"> <h2 class="statistic-counter">9999</h2> <div class="separator_small"></div> <h5><em>Times I Felt Proud</em></h5> </div> </div> </div> </div><!--End off row--> </div><!--End off container --> </section> <!--End off Skill section --> <!--Contact Us Section--> <section id="contact" class="contact bg-mega fix"> <div class="container"> <div class="row"> <div class="main_contact roomy-100 text-white"> <div class="col-md-4"> <div class="rage_widget"> <div class="widget_head"> <h3 class="text-white">CONTACT ME</h3> <div class="separator_small"></div> </div> <p>I hope you enjoyed reading a little bit more about who I am, and what I do. If you would like to further connect with me, be sure to send me a message and/or add me on LinkedIn! Also, below is my GitHub if you would like to know more about how I created my several projects. Thanks so much for your time. </br ><small class="text-white">-Sami Ellougani</small></p> <div class="widget_socail m-top-30"> <ul class="list-inline"> <li><a href=""><i class="fa fa-github"></i></a></li> <li><a href=""><i class="fa fa-linkedin"></i></a></li> </ul> </div> </div> </div> <div class="col-md-8 sm-m-top-30"> <form method="POST" action="http://formspree.io/sami10015@hotmail.com"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <input type="text" name="email" class="form-control" placeholder="Your email"> </div> </div> <div class="col-sm-12"> <div class="form-group"> <textarea class="form-control" rows="6" placeholder="Message" name="message"></textarea> </div> <div class="form-group text-center"> <button type="submit" class="btn btn-primary">Send Message</button> </div> </div> </div> </form> </div> </div> </div><!--End off row --> </div><!--End off container --> </section><!--End off Contact Section--> <!--Maps Section--> <div class="main_maps text-center fix" > <div class="overlay"></div> <div class="maps_text"> <h3 class="text-white" onclick="showmap()">FIND ME ON THE MAP <i class="fa fa-angle-down"></i></h3> <div id="map_canvas" class="mapheight"></div> </div> </div><!-- End off Maps Section--> <!-- scroll up--> <div class="scrollup"> <a href="#"><i class="fa fa-chevron-up"></i></a> </div><!-- End off scroll up --> <footer id="footer" class="footer bg-black"> <div class="container"> <div class="row"> <div class="main_footer text-center p-top-40 p-bottom-30"> <p class="wow fadeInRight" data-wow-duration="1s"> Copyright © samiellougani.com 2016 </p> </div> </div> </div> </footer> </div> <!-- JS includes --> <script src="assets/js/vendor/jquery-1.11.2.min.js"></script> <script src="assets/js/vendor/bootstrap.min.js"></script> <script src="assets/js/jquery.magnific-popup.js"></script> <script src="assets/js/jquery.easing.1.3.js"></script> <script src="assets/js/slick.min.js"></script> <script src="assets/js/jquery.collapse.js"></script> <script src="assets/js/bootsnav.js"></script> <!-- paradise slider js --> <script src="http://maps.google.com/maps/api/js?key=AIzaSyD_tAQD36pKp9v4at5AnpGbvBUsLCOSJx8"></script> <script src="assets/js/gmaps.min.js"></script> <script> function showmap() { var mapOptions = { zoom: 14, scrollwheel: false, center: new google.maps.LatLng(41.047, -74.151), mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions); $('.mapheight').css('height', '350'); $('.maps_text h3').hide(); } </script> <script src="assets/js/plugins.js"></script> <script src="assets/js/main.js"></script> </body> </html>
//setup Dependencies var connect = require('connect'); //Setup Express var express = require('express'); var path = require('path'); let app = express(); var server = require('http').Server(app); var io = require('socket.io')(server); var keypress = require('keypress'); var port = (process.env.PORT || 8081); var muted = false; const debug = true; app.set("view engine", "pug"); app.set("views", path.join(__dirname, "views")); app.use(express.static(path.join(__dirname, "public"))); app.set('env', 'development'); server.listen(port); var message = ''; var main_socket; var auksalaq_mode = 'chatMode'; //Setup Socket.IO io.on('connection', function(socket){ if(debug){ console.log('Client Connected'); } main_socket = socket; //start time setInterval(sendTime, 1000); //ceiling socket.on('ceiling_newuser', function (data) { if(debug){ console.log('new user added! ' + data.username); console.log(data); } socket.emit('ceiling_user_confirmed', data); socket.broadcast.emit('ceiling_user_confirmed', data); }); //see NomadsMobileClient.js for data var socket.on('ceiling_message', function(data){ socket.broadcast.emit('ceiling_proc_update',data); //send data to all clients for processing sketch socket.broadcast.emit('ceiling_client_update',data); //send data back to all clients? if(debug){ console.log(data); } }); //auksalaq socket.on('auksalaq_newuser', function (data) { if(debug){ console.log('new user added! ' + data.username); console.log(data); } data.mode = auksalaq_mode; data.muted = muted; socket.emit('auksalaq_user_confirmed', data); socket.broadcast.emit('auksalaq_user_confirmed', data); }); //see NomadsMobileClient.js for data var socket.on('auksalaq_message', function(data){ //socket.broadcast.emit('auksalaq_proc_update',data); //send data to all clients for processing sketch socket.broadcast.emit('auksalaq_client_update',data); socket.emit('auksalaq_client_update',data); if(debug){ console.log(data); } }); //mode change from controller socket.on('auksalaq_mode', function(data){ socket.broadcast.emit('auksalaq_mode', data); auksalaq_mode = data; if(debug){ console.log(data); } }); socket.on('mute_state', function(data){ muted = data; socket.broadcast.emit('mute_state', data); console.log(data); }); //clocky socket.on('clock_start', function(data){ socket.broadcast.emit('clock_start', data); if(debug){ console.log(data); } }); socket.on('clock_stop', function(data){ socket.broadcast.emit('clock_stop', data); if(debug){ console.log(data); } }); socket.on('clock_reset', function(data){ socket.broadcast.emit('clock_reset', data); if(debug){ console.log("resettting clock"); } }); /* socket.on('begin_ceiling', function(){ ; }); socket.on('begin_auksalak', function(){ ; }); socket.on('stop_ceiling', function(){ ; }); socket.on('stop_auksalak', function(){ ; }); */ socket.on('disconnect', function(){ if(debug){ console.log('Client Disconnected.'); } }); }); /////////////////////////////////////////// // Routes // /////////////////////////////////////////// /////// ADD ALL YOUR ROUTES HERE ///////// app.get('/', function(req,res){ //res.send('hello world'); res.render('index.pug', { locals : { title : 'Nomads' ,description: 'Nomads System' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' ,cache: 'false' } }); }); // The Ceiling Floats Away Routes app.get('/ceiling', function(req,res){ res.render('ceiling/ceiling_client.pug', { locals : { title : 'The Ceiling Floats Away' ,description: 'The Ceiluing Floats Away' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); app.get('/ceiling_display', function(req,res){ res.render('ceiling/ceiling_display.pug', { locals : { title : 'The Ceiling Floats Away' ,description: 'Ceiling Nomads message disply' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); app.get('/ceiling_control', function(req,res){ res.render('ceiling/ceiling_control.pug', { locals : { title : 'The Ceiling Floats Away Control' ,description: 'Ceiling Nomads System Control' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); // Auksalaq Routes app.get('/auksalaq', function(req,res){ res.render('auksalaq/auksalaq_client.pug', { locals : { title : 'Auksalaq' ,description: 'Auksalaq Nomads System' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); app.get('/auksalaq_display', function(req,res){ res.render('auksalaq/auksalaq_display.pug', { locals : { title : 'Auksalaq' ,description: 'Auksalaq Nomads message disply' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); app.get('/auksalaq_control', function(req,res){ res.render('auksalaq/auksalaq_control.pug', { locals : { title : 'Auksalaq Control' ,description: 'Auksalaq Nomads System Control' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); app.get('/auksalaq_clock', function(req,res){ res.render('auksalaq/auksalaq_clock.pug', { locals : { title : 'Auksalaq Clock' ,description: 'Auksalaq Nomads System Clock' ,author: 'TThatcher' ,analyticssiteid: 'XXXXXXX' } }); }); // catch 404 and forward to error handler app.use(function(req, res, next) { var err = new Error('Not Found '+req); err.status = 404; next(err); }); // error handler app.use(function(err, req, res, next) { // set locals, only providing error in development res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; // very basic! if(debug){ console.error(err.stack); } // render the error page res.status(err.status || 500); res.render('404'); }); function NotFound(msg){ this.name = 'NotFound'; Error.call(this, msg); Error.captureStackTrace(this, arguments.callee); } if(debug){ console.log('Listening on http://127.0.0.1:' + port ); } //for testing sendChat = function(data, type){ if(debug) console.log("sending data ", data); var messageToSend = {}; messageToSend.id = 123; messageToSend.username = "Nomads_Server"; messageToSend.type = type; messageToSend.messageText = data; messageToSend.location = 0; messageToSend.latitude = 0; messageToSend.longitude = 0; messageToSend.x = 0; messageToSend.y = 0; var date = new Date(); d = date.getMonth()+1+"."+date.getDate()+"."+date.getFullYear()+ " at " + date.getHours()+":"+date.getMinutes()+":"+date.getSeconds(); messageToSend.timestamp = d; main_socket.broadcast.emit('auksalaq_client_update', messageToSend); } sendTime = function(){ var d = new Date(); main_socket.broadcast.emit('clock_update', d.getTime()); }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.6.0_27) on Thu Jan 23 20:13:40 EST 2014 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>Uses of Class org.apache.lucene.util.fst.FSTTester (Lucene 4.6.1 API)</title> <meta name="date" content="2014-01-23"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.lucene.util.fst.FSTTester (Lucene 4.6.1 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/apache/lucene/util/fst/FSTTester.html" title="class in org.apache.lucene.util.fst">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li>NEXT</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/lucene/util/fst//class-useFSTTester.html" target="_top">FRAMES</a></li> <li><a href="FSTTester.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.lucene.util.fst.FSTTester" class="title">Uses of Class<br>org.apache.lucene.util.fst.FSTTester</h2> </div> <div class="classUseContainer">No usage of org.apache.lucene.util.fst.FSTTester</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/apache/lucene/util/fst/FSTTester.html" title="class in org.apache.lucene.util.fst">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li>NEXT</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/apache/lucene/util/fst//class-useFSTTester.html" target="_top">FRAMES</a></li> <li><a href="FSTTester.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2014 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.6.0_27) on Thu Jan 23 20:13:12 EST 2014 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>org.apache.lucene.search.highlight Class Hierarchy (Lucene 4.6.1 API)</title> <meta name="date" content="2014-01-23"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.apache.lucene.search.highlight Class Hierarchy (Lucene 4.6.1 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li><a href="../../../../../org/apache/lucene/search/postingshighlight/package-tree.html">NEXT</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/lucene/search/highlight/package-tree.html" target="_top">FRAMES</a></li> <li><a href="package-tree.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">Hierarchy For Package org.apache.lucene.search.highlight</h1> <span class="strong">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="strong">Object</span></a> <ul> <li type="circle">java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/AbstractMap.html?is-external=true" title="class or interface in java.util"><span class="strong">AbstractMap</span></a>&lt;K,V&gt; (implements java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;) <ul> <li type="circle">java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><span class="strong">HashMap</span></a>&lt;K,V&gt; (implements java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, java.util.<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;K,V&gt;, java.io.<a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/WeightedSpanTermExtractor.PositionCheckingMap.html" title="class in org.apache.lucene.search.highlight"><span class="strong">WeightedSpanTermExtractor.PositionCheckingMap</span></a>&lt;K&gt;</li> </ul> </li> </ul> </li> <li type="circle">org.apache.lucene.util.<a href="../../../../../../core/org/apache/lucene/util/AttributeSource.html?is-external=true" title="class or interface in org.apache.lucene.util"><span class="strong">AttributeSource</span></a> <ul> <li type="circle">org.apache.lucene.analysis.<a href="../../../../../../core/org/apache/lucene/analysis/TokenStream.html?is-external=true" title="class or interface in org.apache.lucene.analysis"><span class="strong">TokenStream</span></a> (implements java.io.<a href="http://download.oracle.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>) <ul> <li type="circle">org.apache.lucene.analysis.<a href="../../../../../../core/org/apache/lucene/analysis/TokenFilter.html?is-external=true" title="class or interface in org.apache.lucene.analysis"><span class="strong">TokenFilter</span></a> <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/OffsetLimitTokenFilter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">OffsetLimitTokenFilter</span></a></li> </ul> </li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/TokenStreamFromTermPositionVector.html" title="class in org.apache.lucene.search.highlight"><span class="strong">TokenStreamFromTermPositionVector</span></a></li> </ul> </li> </ul> </li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/DefaultEncoder.html" title="class in org.apache.lucene.search.highlight"><span class="strong">DefaultEncoder</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Encoder.html" title="interface in org.apache.lucene.search.highlight">Encoder</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/GradientFormatter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">GradientFormatter</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Formatter.html" title="interface in org.apache.lucene.search.highlight">Formatter</a>) <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/SpanGradientFormatter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">SpanGradientFormatter</span></a></li> </ul> </li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Highlighter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">Highlighter</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/NullFragmenter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">NullFragmenter</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Fragmenter.html" title="interface in org.apache.lucene.search.highlight">Fragmenter</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/PositionSpan.html" title="class in org.apache.lucene.search.highlight"><span class="strong">PositionSpan</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/QueryScorer.html" title="class in org.apache.lucene.search.highlight"><span class="strong">QueryScorer</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Scorer.html" title="interface in org.apache.lucene.search.highlight">Scorer</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/QueryTermExtractor.html" title="class in org.apache.lucene.search.highlight"><span class="strong">QueryTermExtractor</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/QueryTermScorer.html" title="class in org.apache.lucene.search.highlight"><span class="strong">QueryTermScorer</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Scorer.html" title="interface in org.apache.lucene.search.highlight">Scorer</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/SimpleFragmenter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">SimpleFragmenter</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Fragmenter.html" title="interface in org.apache.lucene.search.highlight">Fragmenter</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/SimpleHTMLEncoder.html" title="class in org.apache.lucene.search.highlight"><span class="strong">SimpleHTMLEncoder</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Encoder.html" title="interface in org.apache.lucene.search.highlight">Encoder</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/SimpleHTMLFormatter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">SimpleHTMLFormatter</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Formatter.html" title="interface in org.apache.lucene.search.highlight">Formatter</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/SimpleSpanFragmenter.html" title="class in org.apache.lucene.search.highlight"><span class="strong">SimpleSpanFragmenter</span></a> (implements org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Fragmenter.html" title="interface in org.apache.lucene.search.highlight">Fragmenter</a>)</li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/TextFragment.html" title="class in org.apache.lucene.search.highlight"><span class="strong">TextFragment</span></a></li> <li type="circle">java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang"><span class="strong">Throwable</span></a> (implements java.io.<a href="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</a>) <ul> <li type="circle">java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><span class="strong">Exception</span></a> <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/InvalidTokenOffsetsException.html" title="class in org.apache.lucene.search.highlight"><span class="strong">InvalidTokenOffsetsException</span></a></li> </ul> </li> </ul> </li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/TokenGroup.html" title="class in org.apache.lucene.search.highlight"><span class="strong">TokenGroup</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/TokenSources.html" title="class in org.apache.lucene.search.highlight"><span class="strong">TokenSources</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/WeightedSpanTermExtractor.html" title="class in org.apache.lucene.search.highlight"><span class="strong">WeightedSpanTermExtractor</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/WeightedTerm.html" title="class in org.apache.lucene.search.highlight"><span class="strong">WeightedTerm</span></a> <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/WeightedSpanTerm.html" title="class in org.apache.lucene.search.highlight"><span class="strong">WeightedSpanTerm</span></a></li> </ul> </li> </ul> </li> </ul> <h2 title="Interface Hierarchy">Interface Hierarchy</h2> <ul> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Encoder.html" title="interface in org.apache.lucene.search.highlight"><span class="strong">Encoder</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Formatter.html" title="interface in org.apache.lucene.search.highlight"><span class="strong">Formatter</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Fragmenter.html" title="interface in org.apache.lucene.search.highlight"><span class="strong">Fragmenter</span></a></li> <li type="circle">org.apache.lucene.search.highlight.<a href="../../../../../org/apache/lucene/search/highlight/Scorer.html" title="interface in org.apache.lucene.search.highlight"><span class="strong">Scorer</span></a></li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>PREV</li> <li><a href="../../../../../org/apache/lucene/search/postingshighlight/package-tree.html">NEXT</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/lucene/search/highlight/package-tree.html" target="_top">FRAMES</a></li> <li><a href="package-tree.html" target="_top">NO FRAMES</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2014 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
/** * Created by Tivie on 12-11-2014. */ module.exports = function (grunt) { // Project configuration. var config = { pkg: grunt.file.readJSON('package.json'), concat: { options: { sourceMap: true, banner: ';/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n(function(){\n', footer: '}).call(this);' }, dist: { src: [ 'src/showdown.js', 'src/helpers.js', 'src/converter.js', 'src/subParsers/*.js', 'src/loader.js' ], dest: 'dist/<%= pkg.name %>.js' } }, uglify: { options: { sourceMap: true, banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' }, dist: { files: { 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] } } }, jshint: { options: { jshintrc: '.jshintrc' }, files: [ 'Gruntfile.js', 'src/**/*.js', 'test/**/*.js' ] }, jscs: { options: { config: '.jscs.json' }, files: { src: [ 'Gruntfile.js', 'src/**/*.js', 'test/**/*.js' ] } }, changelog: { options: { repository: 'http://github.com/showdownjs/showdown', dest: 'CHANGELOG.md' } }, bump: { options: { files: ['package.json'], updateConfigs: [], commit: true, commitMessage: 'Release version %VERSION%', commitFiles: ['package.json'], createTag: true, tagName: '%VERSION%', tagMessage: 'Version %VERSION%', push: true, pushTo: 'upstream', gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d', globalReplace: false, prereleaseName: 'alpha', regExp: false } }, simplemocha: { node: { src: 'test/node/**/*.js', options: { globals: ['should'], timeout: 3000, ignoreLeaks: false, reporter: 'spec' } }, karlcow: { src: 'test/node/testsuite.karlcow.js', options: { globals: ['should'], timeout: 3000, ignoreLeaks: false, reporter: 'spec' } }, browser: { src: 'test/browser/**/*.js', options: { reporter: 'spec' } } } }; grunt.initConfig(config); require('load-grunt-tasks')(grunt); grunt.registerTask('concatenate', ['concat']); grunt.registerTask('lint', ['jshint', 'jscs']); grunt.registerTask('test', ['lint', 'concat', 'simplemocha:node']); grunt.registerTask('test-without-building', ['simplemocha:node']); grunt.registerTask('build', ['test', 'uglify']); grunt.registerTask('prep-release', ['build', 'changelog']); // Default task(s). grunt.registerTask('default', ['test']); };
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Pso extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('url'); $this->PARTICLE_COUNT = 6; $this->V_MAX = 8; $this->MAX_EPOCH = 10000; $this->CITY_COUNT = 8; $this->TARGET = 86.63; $this->particles = []; $this->map = []; $this->XLocs = [30, 40, 40, 29, 19, 9, 9, 20]; //City X coordinate $this->YLocs = [5, 10, 20, 25, 25, 19, 9, 5]; //City Y coordinate $this->totalEpoch = 0; $this->shortestRoute = ''; $this->shortestDistance = 0.0; } public function index() { $this->load->model('pso_model'); $init = $this->input->get(); $init_param = $this->pso_model->get_init_param($init['init_param_id'])->row_array(); if($init['particle_count'] > 0){ $this->PARTICLE_COUNT = $init['particle_count']; }else{ $this->PARTICLE_COUNT = $init_param['particle_count']; } if($init['v_max'] > $init_param['city_count'] || $init['v_max'] < 1){ $this->V_MAX = $init_param['v_max']; }else{ $this->V_MAX = $init['v_max']; } if($init['max_epoch'] > 0){ $this->MAX_EPOCH = $init['max_epoch']; }else{ $this->MAX_EPOCH = $init_param['max_epoch']; } if(isset($init['target']) && $init['target'] == "Y"){ $this->TARGET = $init_param['target']; }else{ $this->TARGET = 0; } $this->CITY_COUNT = $init_param['city_count']; $this->XLocs = []; foreach(explode(',',$init_param['xlocs']) as $x){ array_push($this->XLocs, $x); } $this->YLocs = []; foreach(explode(',',$init_param['ylocs']) as $y){ array_push($this->YLocs, $y); } $this->initMap(); $this->PSOAlgorithm(); $this->printBestSolution(); if($init['command'] == 'save') $this->save_result($init); } public function save_result($init){ $this->load->model('pso_model'); $data = [ 'init_param_id' => $init['init_param_id'], 'v_max' => $this->V_MAX, 'max_epoch' => $this->MAX_EPOCH, 'particle_count'=> $this->PARTICLE_COUNT, 'epoch_number' => $this->totalEpoch, 'shortest_route'=> $this->shortestRoute, 'shortest_distance'=> $this->shortestDistance ]; $this->pso_model->save_result($data); } public function initMap() { for($i = 0; $i < $this->CITY_COUNT; $i++) { $city = new CCity(); $city->setX($this->XLocs[$i]); $city->setY($this->YLocs[$i]); array_push($this->map, $city); } } public function PSOAlgorithm(){ $aParticle = null; $epoch = 0; $done = FALSE; $this->initialize(); while(!$done) { // Two conditions can end this loop: // if the maximum number of epochs allowed has been reached, or, // if the Target value has been found. if($epoch < $this->MAX_EPOCH){ echo "<br><br>Iteration number: ".$epoch."<br>"; for($i = 0; $i < $this->PARTICLE_COUNT; $i++){ $aParticle = $this->particles[$i]; echo "Particle <strong>".$aParticle->label()."</strong> "; echo "Route: "; for($j = 0; $j < $this->CITY_COUNT; $j++){ echo $aParticle->data($j)." - "; } $this->getTotalDistance($i); echo "Distance: ".$aParticle->pBest().'<br>'; if($aParticle->pBest() <= $this->TARGET){ $this->shortestDistance = $aParticle->pBest(); for($j = 0; $j < $this->CITY_COUNT; $j++) { $this->shortestRoute.= $aParticle->data($j) . ","; } $done = TRUE; } } $this->bubbleSort(); // sort particles by their pBest scores, best to worst. $this->getVelocity(); $this->updateParticle(); $epoch++; }else{ $done = TRUE; } $this->totalEpoch = $epoch; } } public function printBestSolution(){ if($this->particles[0]->pBest() <= $this->TARGET){ echo "<h4>Target Reached</h4>"; }else{ echo "<h4>Target not Reached</h4>"; } echo "<h5>Shortest Route:"; for($i = 0; $i < $this->CITY_COUNT; $i++){ echo $this->particles[0]->data($i)."-"; } echo "</h5>"; echo "<h5>Distance :".$this->particles[0]->pBest()."</h5>"; } private function initialize(){ for($i = 0; $i < $this->PARTICLE_COUNT; $i++){ $newParticle = new Particle(); $newParticle->setlabel($i+1); for($j = 0; $j < $this->CITY_COUNT; $j++){ $newParticle->setData($j, $j); } array_push($this->particles, $newParticle); for($j = 0; $j < 10; $j++){ $this->randomlyArrange(array_search($newParticle, $this->particles)); } //console.log("cetak " + particles.indexOf(newParticle)); $this->getTotalDistance(array_search($newParticle, $this->particles)); } } private function randomlyArrange($index){ $cityA = rand(0, $this->CITY_COUNT - 1); $cityB = 0; $done = FALSE; while(!$done){ $cityB = rand(0, $this->CITY_COUNT - 1); if($cityB != $cityA) $done = TRUE; } $temp = $this->particles[$index]->data($cityA); $this->particles[$index]->setData($cityA, $this->particles[$index]->data($cityB)); $this->particles[$index]->setData($cityB, $temp); } private function getVelocity(){ $worstResult = $this->particles[$this->PARTICLE_COUNT - 1]->pBest(); for($i = 0; $i < $this->PARTICLE_COUNT; $i++){ $vValue = ($this->V_MAX * $this->particles[$i]->pBest()) / $worstResult; if($vValue > $this->V_MAX){ $this->particles[$i]->setVelocity($this->V_MAX); }elseif($vValue < 0.0){ $this->particles[$i]->setVelocity(0.0); }else{ $this->particles[$i]->setVelocity($vValue); } } } private function updateParticle(){ echo "Sort :<br>"; echo "Best is Particle <strong>".$this->particles[0]->label()."</strong> <strong>Distance: ".$this->particles[0]->pBest().'</strong><br>'; // Best is at index 0, so start from the second best. for($i = 1; $i < $this->PARTICLE_COUNT; $i++){ // The higher the velocity score, the more changes it will need. $changes = (int)(floor(abs($this->particles[$i]->velocity()))); echo "Changes velocity for particle <strong>".$this->particles[$i]->label()."</strong>: ".$changes; echo " <strong>Distance: ".$this->particles[$i]->pBest().'</strong><br>'; for($j = 0; $j < $changes; $j++){ if(rand(0,1) == 1) $this->randomlyArrange($i); // Push it closer to it's best neighbor. $this->copyFromParticle($i - 1, $i); } // Update pBest value. $this->getTotalDistance($i); } } private function copyFromParticle($source, $destination){ // push destination's data points closer to source's data points. $best = $this->particles[$source]; $targetA = rand(0, $this->CITY_COUNT - 1); // source's city distance to target. $targetB = $indexA = $indexB = $tempIndex = 0; // targetB will be source's neighbor immediately succeeding targetA (circular). for($i = 0; $i < $this->CITY_COUNT; $i++){ if($best->data($i) == $targetA) { if ($i == $this->CITY_COUNT - 1) $targetB = $best->data(0); // if end of array, take from beginning. else $targetB = $best->data($i + 1); break; } } // Move targetB next to targetA by switching values. for($j = 0; $j < $this->CITY_COUNT; $j++){ if($this->particles[$destination]->data($j) == $targetA) $indexA = $j; if($this->particles[$destination]->data($j) == $targetB) $indexB = $j; } // get temp index succeeding indexA. if($indexA == $this->CITY_COUNT - 1) $tempIndex = 0; else $tempIndex = $indexA + 1; // Switch indexB value with tempIndex value. $temp = $this->particles[$destination]->data($tempIndex); $this->particles[$destination]->setData($tempIndex, $this->particles[$destination]->data($indexB)); $this->particles[$destination]->setData($indexB, $temp); } private function getTotalDistance($index){ $thisParticle = $this->particles[$index]; $thisParticle->setpBest(0.0); for($i = 0; $i < $this->CITY_COUNT; $i++){ if(($this->CITY_COUNT - 1) == $i){ $thisParticle->setpBest($thisParticle->pBest() + $this->getDistance($thisParticle->data($this->CITY_COUNT - 1), $thisParticle->data(0))); }else{ $thisParticle->setpBest($thisParticle->pBest() + $this->getDistance($thisParticle->data($i), $thisParticle->data($i+1))); } } } private function getDistance($firstCity, $secondCity){ $cityA = $cityB = NULL; $a2 = $b2 = 0; $cityA = $this->map[$firstCity]; $cityB = $this->map[$secondCity]; $a2 = pow(abs($cityA->x() - $cityB->x()), 2); $b2 = pow(abs($cityA->y() - $cityB->y()), 2); return sqrt($a2 + $b2); } private function bubbleSort(){ $done = false; while(!$done){ $changes = 0; $listSize = count($this->particles); for($i = 0; $i < $listSize -1; $i++){ if($this->particles[$i]->compareTo($this->particles[$i + 1]) == 1){ $temp = $this->particles[$i]; $this->particles[$i] = $this->particles[$i+1]; $this->particles[$i+1] = $temp; $changes++; } } if($changes == 0){ $done = true; } } } } class CCity { function __construct() { $this->mX = 0; $this->mY = 0; } public function x(){ return $this->mX; } public function y(){ return $this->mY; } public function setX($xCoordinate){ $this->mX = $xCoordinate; } public function setY($yCoordinate){ $this->mY = $yCoordinate; } } class Particle { function __construct() { $this->mData = []; $this->mpBest = 0; $this->mVelocity = 0.0; $this->label = 0; } public function compareTo($that){ if($this->pBest() < $that->pBest()) return -1; elseif($this->pBest() > $that->pBest()) return 1; else return 0; } public function data($index){ return $this->mData[$index]; } public function setData($index, $value){ $this->mData[$index] = $value; } public function pBest(){ return $this->mpBest; } public function setpBest($value){ $this->mpBest = $value; } public function velocity(){ return $this->mVelocity; } public function setVelocity($velocityScore){ $this->mVelocity = $velocityScore; } public function label(){ return $this->label; } public function setlabel($value){ $this->label = $value; } }
class ProfilesController < ApplicationController before_action :authenticate_user! before_action :only_current_user def new # form where a user can fill out their own profile @user = User.find( params[:user_id] ) @profile = Profile.new end def create @user = User.find( params[:user_id] ) @profile = @user.build_profile(profile_params) if @profile.save flash[:success] = "Profile Updated!" redirect_to user_path( params[:user_id] ) else render action: :new end end def edit @user = User.find( params[:user_id] ) @profile = @user.profile end def update @user = User.find( params[:user_id] ) @profile = @user.profile if @profile.update_attributes(profile_params) flash[:success] = "Profile Updated" redirect_to user_path( params[:user_id] ) else render action: :edit end end private def profile_params params.require(:profile).permit(:first_name, :last_name, :avatar, :job_title, :phone_number, :contact_email, :description) end def only_current_user @user = User.find(params[:user_id]) redirect_to root_url unless @user == current_user end end
// The MIT License (MIT) // // Copyright (c) 2015-2016 Rasmus Mikkelsen // Copyright (c) 2015-2016 eBay Software Foundation // https://github.com/rasmus/EventFlow // // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of // the Software, and to permit persons to whom the Software is furnished to do so, // subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // using System; namespace EventFlow.Core { public interface IJsonSerializer { string Serialize(object obj, bool indented = false); object Deserialize(string json, Type type); T Deserialize<T>(string json); } }
from django.conf.urls import url, include urlpatterns = [ url(r'^postcode-lookup/', include('django_postcode_lookup.urls')), ]
The next step in designing the PCB in the KiCad EDA suite is to assign layout footprints to the components included in the schematic with the program CvPcb, which reads the netlist file created by Eeschema. Through-hole footprints are utilized for connectors, protection diodes, and electrolytic capacitors. Surface mount footprints are utilized for all other components to limit footprint size and lead length inductance~\cite{Montrose1999}. Solder mount through-hole footprints with $0.1\unit{in}$ ($2.54\unit{mm}$) spacing are used for connectors with the exception of the Hirose FX2 and PCI-Express connectors. Resistors, ceramic capacitors, and LEDs use standard 0805 package outline footprints as a compromise between choosing a package that minimizes the board space requirement and one that is large enough to be easy to solder by hand. Small-Outline (SO) variations of integrated circuits are preferred when available for the component, and Quad-Flat Package (QFP) variations are used for the 64-pin count components. Test points are implemented with a square pad of plated copper which minimizes required area on the board while allowing a test probe to connect to the signal and provides an acceptable surface for soldering a wire if rework is needed. Custom footprints not included in the KiCad suite are used for several components and are included in the $lib$ directory under the main project directory. The footprints for the Preamp PCI-Express connector and the CPLD are based on libraries from~\cite{osheclib}, and the footprint for the 100-pin Hirose FX2 connector is based on a library from~\cite{CodingAdvFX2}. The footprint for the 16-pin terminal block for connecting to the recording electrodes was modified with a larger hole size to enable two 8-pin terminal blocks to be used side-by-side~\cite{TETermBlockDraw}. Guide holes were modified to be plated to be compatible with the design constraints of the manufacturer~\cite{AdvCir66}. All component footprints were compared to the recommended PCB footprints in the components' respective data sheets to ensure compatibility. CvPcb saves the footprint information to the netlist file created by Eeschema. The name for the footprints of each component can be seen in the $Package$ column on the bill of materials in Table~\ref{tab:bom} in Appendix~\ref{sec:bom}.
package com.witchworks.api.brew; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.DamageSource; import net.minecraftforge.event.entity.living.LivingDeathEvent; /** * This class was created by Arekkuusu on 06/06/2017. * It's distributed as part of Witchworks under * the MIT license. */ public interface IBrewDeath { void onDeath(LivingDeathEvent event, DamageSource source, EntityLivingBase dying, int amplifier); }
\begin{tabular}{ c c c c c c } Program & Size & Allocs & Runtime & Elapsed & TotalMem\\ \hline \end{tabular} \begin{verbatim} [("Project name","The Glorious Glasgow Haskell Compilation System") ,("GCC extra via C opts"," -fwrapv -fno-builtin") ,("C compiler command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/gcc.exe") ,("C compiler flags","") ,("C compiler link flags"," ") ,("C compiler supports -no-pie","YES") ,("Haskell CPP command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/gcc.exe") ,("Haskell CPP flags","-E -undef -traditional") ,("ld command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/ld.exe") ,("ld flags","") ,("ld supports compact unwind","YES") ,("ld supports build-id","YES") ,("ld supports filelist","NO") ,("ld is GNU ld","YES") ,("ar command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/ar.exe") ,("ar flags","q") ,("ar supports at file","YES") ,("ranlib command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/ranlib.exe") ,("touch command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib/bin/touchy.exe") ,("dllwrap command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/dllwrap.exe") ,("windres command","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\../mingw/bin/windres.exe") ,("libtool command","C:/ghc-dev/msys64/usr/bin/libtool") ,("cross compiling","NO") ,("target os","OSMinGW32") ,("target arch","ArchX86_64") ,("target word size","8") ,("target has GNU nonexec stack","False") ,("target has .ident directive","True") ,("target has subsections via symbols","False") ,("target has RTS linker","YES") ,("Unregisterised","NO") ,("LLVM llc command","llc") ,("LLVM opt command","opt") ,("LLVM clang command","clang") ,("Project version","8.9.20190316") ,("Project Git commit id","57201bebaeb15c5635ac5ea153b0141b55670199") ,("Booter version","8.4.3") ,("Stage","2") ,("Build platform","x86_64-unknown-mingw32") ,("Host platform","x86_64-unknown-mingw32") ,("Target platform","x86_64-unknown-mingw32") ,("Have interpreter","YES") ,("Object splitting supported","NO") ,("Have native code generator","YES") ,("Support SMP","YES") ,("Tables next to code","YES") ,("RTS ways","l debug thr thr_debug thr_l ") ,("RTS expects libdw","NO") ,("Support dynamic-too","NO") ,("Support parallel --make","YES") ,("Support reexported-modules","YES") ,("Support thinning and renaming package flags","YES") ,("Support Backpack","YES") ,("Requires unified installed package IDs","YES") ,("Uses package keys","YES") ,("Uses unit IDs","YES") ,("Dynamic by default","NO") ,("GHC Dynamic","NO") ,("GHC Profiled","NO") ,("Leading underscore","NO") ,("Debug on","False") ,("LibDir","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib") ,("Global Package DB","C:\\TeamCity\\buildAgent\\work\\a45bb99c6f82efd7\\inplace\\lib\\package.conf.d") ] \end{verbatim}
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreatePcLoginRequest extends Migration { /** * Run the migrations. * * @return void */ public function up() { // Recently no errors detected, the deprecated tables should be destoryed. Schema::dropIfExists('wx_order_item_temp'); Schema::dropIfExists('wx_order_temp'); Schema::create('pc_login_request', function (Blueprint $t) { $t->bigIncrements('id')->unsigned(); $t->string('code', '32'); $t->index('code'); $t->tinyInteger('status')->default(0); $t->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('pc_login_request'); } }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DddDemo.Domain")] [assembly: AssemblyTrademark("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("fc984400-902e-4563-ae83-0fc1116074d7")]
TRGS = bc bc_non_partitioned LIBS += -lpthread -lrt ##BOOST_PATH = /run/pkg/boost-/1.53.0-gcc_4.7.3 ##BOOST_FLAGS = -I$(BOOST_PATH)/include -L$(BOOST_PATH)/lib -lboost_graph CXXFLAGS = -g --std=c++0x -O3 CXXFLAGS += -Wall -Werror all: $(TRGS) bc: bc.cc bc_non_partitioned: bc_non_partitioned.cc ##boost_dijk_real: boost_dijk_real.cc clean: rm -f $(TRGS) *.o *.dot %: %.cc ; $(CXX) $(CXXFLAGS) $< -o $@ $(LIBS)
<?php declare(strict_types=1); namespace Doctrine\ORM\Mapping; /** * @Annotation * @Target("PROPERTY") */ final class JoinColumns implements Annotation { /** @var array<\Doctrine\ORM\Mapping\JoinColumn> */ public $value; }
<?php namespace AvalancheDevelopment\Approach\Schema; class ExternalDocumentation { use Part\Extensions; /** @var string */ protected $description; /** @var string */ protected $url; /** * @return string */ public function getDescription() { return $this->description; } /** * @param string $description */ public function setDescription($description) { $this->description = $description; } /** * @return string */ public function getUrl() { return $this->url; } /** * @param string $url */ public function setUrl($url) { $this->url = $url; } }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 30 22:16:17 GMT+01:00 2004 --> <TITLE> ServletContextAwareProcessor (Spring Framework) </TITLE> <META NAME="keywords" CONTENT="org.springframework.web.context.support.ServletContextAwareProcessor class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="ServletContextAwareProcessor (Spring Framework)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ServletContextAwareProcessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/springframework/web/context/support/RequestHandledEvent.html" title="class in org.springframework.web.context.support"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/springframework/web/context/support/ServletContextResource.html" title="class in org.springframework.web.context.support"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="ServletContextAwareProcessor.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.springframework.web.context.support</FONT> <BR> Class ServletContextAwareProcessor</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.springframework.web.context.support.ServletContextAwareProcessor</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></DD> </DL> <HR> <DL> <DT>public class <B>ServletContextAwareProcessor</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></DL> <P> BeanPostProcessor implementation that passes the ServletContext to beans that implement the ApplicationContextAware or ResourceLoaderAware interfaces. If both are implemented, the latter is satisfied first. <p>Web application contexts will automatically register this with their underlying bean factory. Applications do not use this directly. <P> <P> <DL> <DT><B>Since:</B></DT> <DD>12.03.2004</DD> <DT><B>Author:</B></DT> <DD>Juergen Hoeller</DD> <DT><B>See Also:</B><DD><A HREF="../../../../../org/springframework/web/context/ServletContextAware.html" title="interface in org.springframework.web.context"><CODE>ServletContextAware</CODE></A>, <A HREF="../../../../../org/springframework/web/context/support/XmlWebApplicationContext.html#postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)"><CODE>XmlWebApplicationContext.postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)</CODE></A></DL> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected &nbsp;org.apache.commons.logging.Log</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/springframework/web/context/support/ServletContextAwareProcessor.html#logger">logger</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../org/springframework/web/context/support/ServletContextAwareProcessor.html#ServletContextAwareProcessor(javax.servlet.ServletContext)">ServletContextAwareProcessor</A></B>(javax.servlet.ServletContext&nbsp;servletContext)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new ServletContextAwareProcessor for the given context.</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/springframework/web/context/support/ServletContextAwareProcessor.html#postProcessAfterInitialization(java.lang.Object, java.lang.String)">postProcessAfterInitialization</A></B>(java.lang.Object&nbsp;bean, java.lang.String&nbsp;name)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply this BeanPostProcessor to the given new bean instance <i>after</i> any bean initialization callbacks (like InitializingBean's afterPropertiesSet or a custom init-method). </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.Object</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../org/springframework/web/context/support/ServletContextAwareProcessor.html#postProcessBeforeInitialization(java.lang.Object, java.lang.String)">postProcessBeforeInitialization</A></B>(java.lang.Object&nbsp;bean, java.lang.String&nbsp;name)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Apply this BeanPostProcessor to the given new bean instance <i>before</i> any bean initialization callbacks (like InitializingBean's afterPropertiesSet or a custom init-method). </TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.Object</B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="logger"><!-- --></A><H3> logger</H3> <PRE> protected final org.apache.commons.logging.Log <B>logger</B></PRE> <DL> <DL> </DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="ServletContextAwareProcessor(javax.servlet.ServletContext)"><!-- --></A><H3> ServletContextAwareProcessor</H3> <PRE> public <B>ServletContextAwareProcessor</B>(javax.servlet.ServletContext&nbsp;servletContext)</PRE> <DL> <DD>Create a new ServletContextAwareProcessor for the given context. <P> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="postProcessBeforeInitialization(java.lang.Object, java.lang.String)"><!-- --></A><H3> postProcessBeforeInitialization</H3> <PRE> public java.lang.Object <B>postProcessBeforeInitialization</B>(java.lang.Object&nbsp;bean, java.lang.String&nbsp;name) throws <A HREF="../../../../../org/springframework/beans/BeansException.html" title="class in org.springframework.beans">BeansException</A></PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></CODE></B></DD> <DD>Apply this BeanPostProcessor to the given new bean instance <i>before</i> any bean initialization callbacks (like InitializingBean's afterPropertiesSet or a custom init-method). The bean will already be populated with property values. The returned bean instance may be a wrapper around the original. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html#postProcessBeforeInitialization(java.lang.Object, java.lang.String)">postProcessBeforeInitialization</A></CODE> in interface <CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>bean</CODE> - the new bean instance<DD><CODE>name</CODE> - the beanName of the bean <DT><B>Returns:</B><DD>the bean instance to use, either the original or a wrapped one <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../org/springframework/beans/BeansException.html" title="class in org.springframework.beans">BeansException</A></CODE> - in case of errors<DT><B>See Also:</B><DD><A HREF="../../../../../org/springframework/beans/factory/InitializingBean.html#afterPropertiesSet()"><CODE>InitializingBean.afterPropertiesSet()</CODE></A></DL> </DD> </DL> <HR> <A NAME="postProcessAfterInitialization(java.lang.Object, java.lang.String)"><!-- --></A><H3> postProcessAfterInitialization</H3> <PRE> public java.lang.Object <B>postProcessAfterInitialization</B>(java.lang.Object&nbsp;bean, java.lang.String&nbsp;name)</PRE> <DL> <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></CODE></B></DD> <DD>Apply this BeanPostProcessor to the given new bean instance <i>after</i> any bean initialization callbacks (like InitializingBean's afterPropertiesSet or a custom init-method). The bean will already be populated with property values. The returned bean instance may be a wrapper around the original. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html#postProcessAfterInitialization(java.lang.Object, java.lang.String)">postProcessAfterInitialization</A></CODE> in interface <CODE><A HREF="../../../../../org/springframework/beans/factory/config/BeanPostProcessor.html" title="interface in org.springframework.beans.factory.config">BeanPostProcessor</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>bean</CODE> - the new bean instance<DD><CODE>name</CODE> - the beanName of the bean <DT><B>Returns:</B><DD>the bean instance to use, either the original or a wrapped one<DT><B>See Also:</B><DD><A HREF="../../../../../org/springframework/beans/factory/InitializingBean.html#afterPropertiesSet()"><CODE>InitializingBean.afterPropertiesSet()</CODE></A></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ServletContextAwareProcessor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../../org/springframework/web/context/support/RequestHandledEvent.html" title="class in org.springframework.web.context.support"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../org/springframework/web/context/support/ServletContextResource.html" title="class in org.springframework.web.context.support"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="ServletContextAwareProcessor.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright (C) 2003-2004 The Spring Framework Project.</i> </BODY> </HTML>
using MVC.View; using System; using System.Collections.Generic; using System.Linq; using System.Net.Configuration; using System.Text; using System.Threading.Tasks; using Webshop.Models; using DataModels; using MVC; namespace Webshop.Controllers { public class PublisherController : MVC.Controller.Controller { private readonly Context context; public PublisherController() { context = new Context(); } //public ViewObject GetAll() //{ // //IEnumerable<Publisher> genres = context.Genres.GetAll().Result; // //return Json(genres); //} } }
package demo import ( _ "fmt" cp "github.com/eka-tel72/go-chipmunk62/chipmunk" ) /* #include <stdlib.h> int Random(void) { return rand(); } void Seed(unsigned int i) { srand(i); } */ import "C" type tumble struct { *demoClass rogueBoxBody *cp.Body } var tumbleInst = &tumble{ &demoClass{ name: "Tumble", timestep: 1.0/180.0, }, nil, } func (t *tumble) Update(space *cp.Space, dt float64) { fdt := cp.Float(dt) cp.BodyUpdatePosition(t.rogueBoxBody, fdt) cp.SpaceStep(space, fdt) } func tumbleAddBox(space *cp.Space, pos cp.Vect, mass, width, height cp.Float) { body := cp.SpaceAddBody( space, cp.BodyNew(mass, cp.MomentForBox(mass, width, height)) ) cp.BodySetPos(body, pos) shape := cp.SpaceAddShape(space, cp.BoxShapeNew(body, width, height)) cp.ShapeSetElasticity(shape, 0.0) cp.ShapeSetFriction(shape, 0.7) } func tumbleAddSegment(space *cp.Space, pos cp.Vect, mass, width, height cp.Float) { body := cp.SpaceAddBody( space, cp.BodyNew(mass, cp.MomentForBox(mass, width, height)) ) cp.BodySetPos(body, pos) shape := cp.SpaceAddShape(space, cp.SegmentShapeNew(body, cp.V(0.0, (height - width)/2.0), cp.V(0.0, (width - height)/2.0), width/2.0)) cp.ShapeSetElasticity(shape, 0.0) cp.ShapeSetFriction(shape, 0.7) } func tumbleAddCircle(space *cp.Space, pos cp.Vect, mass, radius cp.Float) { body := cp.SpaceAddBody( space, cp.BodyNew(mass, cp.MomentForCircle(mass, 0.0, radius, cpvzero)) ) cp.BodySetPos(body, pos) shape := cp.SpaceAddShape(space, cp.CircleShapeNew(body, radius, cpvzero)) cp.ShapeSetElasticity(shape, 0.0) cp.ShapeSetFriction(shape, 0.7) } func (t *tumble) Init() *cp.Space { C.Seed(45073) space := cp.SpaceNew() cp.SpaceSetGravity(space, cp.V(0, -600)) rogueBoxBody := cp.BodyNew(infinity, infinity) cp.BodySetAngVel(rogueBoxBody, 0.4) a := cp.V(-200, -200) b := cp.V(-200, 200) c := cp.V( 200, 200) d := cp.V( 200, -200) seg := [][]cp.Vect {{a, b}, {b, c}, {c, d}, {d, a}} for i := 0; i < len(seg); i++ { vs := seg[i] shape := cp.SpaceAddShape(space, cp.SegmentShapeNew(rogueBoxBody, vs[0], vs[1], 0.0)) cp.ShapeSetElasticity(shape, 1.0) cp.ShapeSetFriction(shape, 1.0) cp.ShapeSetLayers(shape, notGrabableMask) } mass := cp.Float(1.0) width := cp.Float(30.0) height := width*2 for i := 0; i < 7; i++ { for j := 0; j < 3; j++ { pos := cp.V(cp.Float(i)*width - 150, cp.Float(j)*height - 150) switch (C.Random()%3000)/1000 { default: tumbleAddCircle(space, cp.Vadd(pos, cp.V(0.0, (height - width)/2.0)), mass, width/2.0) tumbleAddCircle(space, cp.Vadd(pos, cp.V(0.0, (width - height)/2.0)), mass, width/2.0) case 0: tumbleAddBox(space, pos, mass, width, height) case 1: tumbleAddSegment(space, pos, mass, width, height) } } } t.rogueBoxBody = rogueBoxBody return space } func (t *tumble) Destroy(space *cp.Space) { freeSpaceChildren(space) cp.BodyFree(t.rogueBoxBody) cp.SpaceFree(space) }
<?php /** * @copyright 2009-2016 Vanilla Forums Inc. * @license MIT */ namespace HipChat\v2\Auth; /** * Represents a HipChat auth token. * * @author Tim Gunter <tim@vanillaforums.com> */ class AuthContainer { /** * Token * @var string */ protected $token; /** * Token type (Basic or Bearer) * @var string */ protected $type; /** * Auth Container * * @param string $token oauth2 token for hipchat */ public function __construct($token, $type) { $this->token = $token; $this->type = $type; } /** * Get token * * @return string */ public function getToken() { return $this->token; } /** * Get Authorization Header * * @return string */ public function getAuth() { return "{$this->type} {$this->token}"; } }
// Created by Yang Meyer on 03.02.12. // Copyright (c) 2012 compeople. All rights reserved. #import <UIKit/UIKit.h> @interface UIResponder (MotionRecognizers) /** Registers the receiver for future motion events. The `action` message will be sent to the receiver when a motion event occurs and is not intercepted in the responder chain. The `action` selector must take exactly one parameter of type NSNotification. You must not add a motion recognizer more than once. */ - (void) addMotionRecognizerWithAction:(SEL)action; /** You must call this before deallocating the receiver. */ - (void) removeMotionRecognizer; @end
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sl_SI"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About LEOcoin</source> <translation>O LEOcoin</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;LEOcoin&lt;/b&gt; version</source> <translation>&lt;b&gt;LEOcoin&lt;/b&gt; verzija</translation> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The BlackCoin developers Copyright © 2014-%1 The LEOcoin developers</source> <translation type="unfinished"></translation> </message> <message> <location line="+16"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;a href=&quot;http://www.opensource.org/licenses/mit-license.php&quot;&gt;http://www.opensource.org/licenses/mit-license.php&lt;/a&gt;. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (&lt;a href=&quot;https://www.openssl.org/&quot;&gt;https://www.openssl.org/&lt;/a&gt;) and cryptographic software written by Eric Young (&lt;a href=&quot;mailto:eay@cryptsoft.com&quot;&gt;eay@cryptsoft.com&lt;/a&gt;) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+218"/> <source>Label</source> <translation>Oznaka</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Naslov</translation> </message> <message> <location line="+0"/> <source>pubkey</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>stealth</source> <translation type="unfinished"></translation> </message> <message> <location line="+34"/> <source>(no label)</source> <translation>(ni oznake)</translation> </message> <message> <location line="+4"/> <source>Stealth Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>n/a</source> <translation type="unfinished"></translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>Poziv gesla</translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Vnesite geslo</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Novo geslo</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Ponovite novo geslo</translation> </message> <message> <location line="+33"/> <location line="+16"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation>Služi kot onemogočenje pošiljanja prostega denarja, v primerih okužbe operacijskega sistema. Ne ponuja prave zaščite.</translation> </message> <message> <location line="-13"/> <source>For staking only</source> <translation>Samo za staking.</translation> </message> <message> <location line="+16"/> <source>Enable messaging</source> <translation type="unfinished"></translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+39"/> <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>Vnesite novo geslo za vstop v denarnico.&lt;br/&gt;Prosimo, da geslo sestavite iz &lt;b&gt; 10 ali več naključnih znakov&lt;/b&gt; oz. &lt;b&gt;osem ali več besed&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Šifriraj denarnico</translation> </message> <message> <location line="+11"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>To dejanje zahteva geslo za odklepanje vaše denarnice.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>Odkleni denarnico</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>To dejanje zahteva geslo za dešifriranje vaše denarnice.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Dešifriraj denarnico</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Zamenjaj geslo</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Vnesite staro in novo geslo denarnice.</translation> </message> <message> <location line="+45"/> <source>Confirm wallet encryption</source> <translation>Potrdi šifriranje denarnice</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>Opozorilo: Če šifrirate svojo denarnico in izgubite svoje geslo, boste &lt;b&gt; IZGUBILI VSE SVOJE KOVANCE&lt;/b&gt;!</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>Ali ste prepričani, da želite šifrirati vašo denarnico?</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>POMEMBNO: Vsaka predhodna varnostna kopija datoteke denarnice mora biti nadomeščena z novo datoteko šifrirane denarnice. Zaradi varnostnih razlogov bodo namreč prejšnje varnostne kopije datoteke nešifrirane denarnice postale neuporabne takoj ko boste pričeli uporabljati novo, šifrirano denarnico.</translation> </message> <message> <location line="+104"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>Opozorilo: imate prižgan Cap Lock</translation> </message> <message> <location line="-134"/> <location line="+61"/> <source>Wallet encrypted</source> <translation>Denarnica šifrirana</translation> </message> <message> <location line="-59"/> <source>LEOcoin 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>LEOcoin se bo sedaj zaprl, da dokonča proces šifriranje. Pomnite, da tudi šifriranje vaše denarnice ne more v celoti zaščititi vaših kovancev pred krajo z zlonamernimi programi in računalniškimi virusi, če ti okužijo vaš računalnik.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+45"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Šifriranje denarnice je spodletelo</translation> </message> <message> <location line="-57"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Šifriranje denarnice spodletelo je zaradi notranje napake. Vaša denarnica ni šifrirana.</translation> </message> <message> <location line="+7"/> <location line="+51"/> <source>The supplied passphrases do not match.</source> <translation>Vnešeno geslo se ne ujema</translation> </message> <message> <location line="-39"/> <source>Wallet unlock failed</source> <translation>Odklep denarnice spodletel</translation> </message> <message> <location line="+1"/> <location line="+13"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Geslo za dešifriranje denarnice, ki ste ga vnesli, ni pravilno.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Dešifriranje denarnice je spodletelo</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>Geslo denarnice je bilo uspešno spremenjeno.</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+137"/> <source>Network Alert</source> <translation>Omrežno Opozorilo</translation> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation>Kontrola kovancev</translation> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation>Količina:</translation> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation>Biti:</translation> </message> <message> <location line="+48"/> <source>Amount:</source> <translation>Količina:</translation> </message> <message> <location line="+32"/> <source>Priority:</source> <translation>Prednostno mesto:</translation> </message> <message> <location line="+48"/> <source>Fee:</source> <translation>Provizija:</translation> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation>Nizek output:</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="+528"/> <location line="+30"/> <source>no</source> <translation>ne</translation> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation>Po proviziji:</translation> </message> <message> <location line="+35"/> <source>Change:</source> <translation>Sprememba:</translation> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation>od/obkljukaj vse</translation> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation>Drevo</translation> </message> <message> <location line="+16"/> <source>List mode</source> <translation>Seznam</translation> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Količina</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation>Oznaka</translation> </message> <message> <location line="+5"/> <source>Address</source> <translation>Naslov</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation>Potrdila</translation> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation>Potrjeno</translation> </message> <message> <location line="+5"/> <source>Priority</source> <translation>Prednostno mesto</translation> </message> <message> <location filename="../coincontroldialog.cpp" line="-520"/> <source>Copy address</source> <translation>Kopiraj naslov</translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>Kopiraj oznako</translation> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation>Kopiraj količino</translation> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation>Kopiraj ID transakcije</translation> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation>Kopiraj količino</translation> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation>Kopiraj provizijo</translation> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation>Kopiraj po proviziji</translation> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation>Kopiraj bite</translation> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation>Kopiraj prednostno mesto</translation> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation>Kopiraj nizek output:</translation> </message> <message> <location line="+1"/> <source>Copy change</source> <translation>Kopiraj spremembo</translation> </message> <message> <location line="+317"/> <source>highest</source> <translation>najvišja</translation> </message> <message> <location line="+1"/> <source>high</source> <translation>visoka</translation> </message> <message> <location line="+1"/> <source>medium-high</source> <translation>srednje visoka</translation> </message> <message> <location line="+1"/> <source>medium</source> <translation>srednje</translation> </message> <message> <location line="+4"/> <source>low-medium</source> <translation>srednje nizka</translation> </message> <message> <location line="+1"/> <source>low</source> <translation>nizka</translation> </message> <message> <location line="+1"/> <source>lowest</source> <translation>najnižja</translation> </message> <message> <location line="+130"/> <location line="+30"/> <source>DUST</source> <translation>PRAH</translation> </message> <message> <location line="-30"/> <location line="+30"/> <source>yes</source> <translation>da</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>Ta oznakla se obarva rdeče, če je transakcija večja od 10000 bajtov. To pomeni, da je zahtevana provizija vsaj %1 na kb. Lahko variira +/- 1 Bajt na vnos.</translation> </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>Transakcije z višjo prioriteto imajo višjo verjetnost, da so vključene v blok. Ta oznaka se obarva rdeče, če je prioriteta manjša kot &quot;srednja&quot;. To pomeni, da je zahtevana provizija vsaj %1 na kb.</translation> </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>Ta oznaka se obarva rdeče, če prejemnik dobi količino manjšo od %1. To pomeni, da je potrebna vsaj %2 provizija. Zneski pod 0.546 krat minimalna transakcijska provizija so prikazani kot PRAH.</translation> </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>Ta oznakla se obarva rdeče, če je sprememba manjša od %1. To pomeni, da je zahtevana provizija vsaj %2.</translation> </message> <message> <location line="+40"/> <location line="+66"/> <source>(no label)</source> <translation>(ni oznake)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation>spremeni iz %1 (%2)</translation> </message> <message> <location line="+1"/> <source>(change)</source> <translation>(spremeni)</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Uredi naslov</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Oznaka</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>Oznaka povezana s tem vnosom v imeniku</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Naslov</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>Naslov povezan s tem vnosom v imeniku. Spremenite ga lahko le za naslove odlivov.</translation> </message> <message> <location line="+7"/> <source>&amp;Stealth Address</source> <translation type="unfinished"></translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Nov naslov za prilive</translation> </message> <message> <location line="+7"/> <source>New sending address</source> <translation>Nov naslov za odlive</translation> </message> <message> <location line="+4"/> <source>Edit receiving address</source> <translation>Uredi naslov za prilive</translation> </message> <message> <location line="+7"/> <source>Edit sending address</source> <translation>Uredi naslov za odlive</translation> </message> <message> <location line="+82"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Vnešeni naslov &quot;&amp;1&quot; je že v imeniku.</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid LEOcoin address.</source> <translation>Vneseni naslov &quot;%1&quot; ni veljaven LEOcoin naslov.</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Denarnice ni bilo mogoče odkleniti.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Ustvarjanje novega ključa je spodletelo.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+526"/> <source>version</source> <translation>različica</translation> </message> <message> <location line="+0"/> <location line="+12"/> <source>LEOcoin</source> <translation type="unfinished">LEOcoin</translation> </message> <message> <location line="-10"/> <source>Usage:</source> <translation>Uporaba:</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>možnosti ukazne vrstice</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>možnosti uporabniškega vmesnika</translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>Nastavi jezik, npr. &quot;sl_SI&quot; (privzeto: jezikovna oznaka sistema)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>Zaženi pomanjšano</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>Prikaži splash screen ob zagonu (default: 1)</translation> </message> </context> <context> <name>LEOcoinBridge</name> <message> <location filename="../LEOcoinbridge.cpp" line="+410"/> <source>Incoming Message</source> <translation type="unfinished"></translation> </message> <message> <location line="+12"/> <source>default</source> <translation type="unfinished"></translation> </message> <message> <location line="+58"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <source>&lt;b&gt;%1&lt;/b&gt; to LEO %2 (%3)</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <location line="+5"/> <source>&lt;b&gt;%1&lt;/b&gt; LEO, ring size %2 to LEO %3 (%4)</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <location line="+10"/> <location line="+12"/> <location line="+8"/> <source>Error:</source> <translation type="unfinished"></translation> </message> <message> <location line="-30"/> <source>Unknown txn type detected %1.</source> <translation type="unfinished"></translation> </message> <message> <location line="+10"/> <source>Input types must match for all recipients.</source> <translation type="unfinished"></translation> </message> <message> <location line="+12"/> <source>Ring sizes must match for all recipients.</source> <translation type="unfinished"></translation> </message> <message> <location line="+8"/> <source>Ring size outside range [%1, %2].</source> <translation type="unfinished"></translation> </message> <message> <location line="+8"/> <location line="+9"/> <source>Confirm send coins</source> <translation type="unfinished"></translation> </message> <message> <location line="-9"/> <source>Are you sure you want to send? Ring size of one is not anonymous, and harms the network.</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <location line="+9"/> <source> and </source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"></translation> </message> <message> <location line="+15"/> <location line="+25"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation type="unfinished"></translation> </message> <message> <location line="-95"/> <source>The change address is not valid, please recheck.</source> <translation type="unfinished"></translation> </message> <message> <location line="+25"/> <location line="+376"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"></translation> </message> <message> <location line="-371"/> <source>The amount to pay must be larger than 0.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <location line="+365"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"></translation> </message> <message> <location line="-360"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"></translation> </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"></translation> </message> <message> <location line="+5"/> <source>Error: Narration is too long.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error: Ring Size Error.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error: Input Type Error.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error: Must be in full mode to send anon.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error: Invalid Stealth Address.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>The total exceeds your LEOcoin balance when the %1 transaction fee is included.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error generating transaction.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error generating transaction: %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+304"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <source>Send Message</source> <translation type="unfinished"></translation> </message> <message> <location line="-14"/> <source>The message can&apos;t be empty.</source> <translation type="unfinished"></translation> </message> <message> <location line="+10"/> <source>Error: Message creation failed.</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Error: The message was rejected.</source> <translation type="unfinished"></translation> </message> <message> <location line="+98"/> <source>Sanity Error!</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Error: a sanity check prevented the transfer of a non-group private key, please close your wallet and report this error to the development team as soon as possible.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../bridgetranslations.h" line="+8"/> <source>Overview</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Send</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Receive</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Transactions</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Address Book</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Chat</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Notifications</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Options</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Wallet Management</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Add New Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Import Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Advanced</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Backup</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Backup Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Encrypt Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Change Passphrase</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>(Un)lock Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Tools</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Chain Data</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Block Explorer</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Sign Message</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Verify Message</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Debug</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>About LEOcoin</source> <translation type="unfinished">O LEOcoin</translation> </message> <message> <location line="+1"/> <source>About QT</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>QR code</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Address:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Label:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Narration:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Amount:</source> <translation type="unfinished">Količina:</translation> </message> <message> <location line="+1"/> <source>LEO</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>mLEO</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>µLEO</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Satoshi</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Add new receive address</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <source>Add Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Add a new contact</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Address Lookup</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Address Type</source> <translation type="unfinished"></translation> </message> <message> <location line="-6"/> <source>Normal</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Stealth</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <source>Group</source> <translation type="unfinished"></translation> </message> <message> <location line="-5"/> <source>BIP32</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <source>Label</source> <translation type="unfinished">Oznaka</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation type="unfinished">Naslov</translation> </message> <message> <location line="+1"/> <source>Public Key</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Transaction Hash</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Recent Transactions</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Market</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Advanced Options</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Coin Control</source> <translation type="unfinished">Kontrola kovancev</translation> </message> <message> <location line="+1"/> <source>Make payment</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Balance transfer</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Select Inputs</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Automatically selected</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Quantity:</source> <translation type="unfinished">Količina:</translation> </message> <message> <location line="+1"/> <source>Fee:</source> <translation type="unfinished">Provizija:</translation> </message> <message> <location line="+1"/> <source>After Fee:</source> <translation type="unfinished">Po proviziji:</translation> </message> <message> <location line="+1"/> <source>Bytes:</source> <translation type="unfinished">Biti:</translation> </message> <message> <location line="+1"/> <source>Priority:</source> <translation type="unfinished">Prednostno mesto:</translation> </message> <message> <location line="+1"/> <source>LowOutput:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Change:</source> <translation type="unfinished">Sprememba:</translation> </message> <message> <location line="+1"/> <source>Custom change address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>From account</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>PUBLIC</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>PRIVATE</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Balance:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Ring Size:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>To account</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Pay to</source> <translation type="unfinished"></translation> </message> <message> <location line="+135"/> <source>Tor connection offline</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>i2p connection offline</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Wallet is encrypted and currently locked</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>Wallet is syncing</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Open chat list</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a label for this address to add it to your address book</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a address to add it to your address book</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Inputs</source> <translation type="unfinished">Vnosi</translation> </message> <message> <location line="+1"/> <source>Values</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Outputs</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a LEOcoin address to sign the message with (e.g. 8MfTCSnMvix9mVVNb2MGiEw92GpLrvzhVp)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter the message you want to sign</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Click sign message to generate signature</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Copy the signed message signature</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a LEOcoin address to verify the message with (e.g. 8MfTCSnMvix9mVVNb2MGiEw92GpLrvzhVp)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter the message you want to verify</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a LEOcoin signature</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Paste signature from clipboard</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Your total balance</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Balances overview</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Recent in/out transactions or stakes</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Select inputs to spend</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Optional address to receive transaction change</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Choose from address book</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Paste address from clipboard</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Remove this recipient</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Current spendable send payment balance</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Current spendable balance to account</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <source>The address to transfer the balance to</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>The label for this address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Amount to transfer</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Send to multiple recipients at once</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Double click to edit</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished">Datum in čas, ko je transakcija bila prejeta.</translation> </message> <message> <location line="+1"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished">Stanje transakcije. Zapeljite z miško čez to polje za prikaz števila potrdil. </translation> </message> <message> <location line="+1"/> <source>Type of transaction.</source> <translation type="unfinished">Vrsta transakcije.</translation> </message> <message> <location line="+1"/> <source>Destination address of transaction.</source> <translation type="unfinished">Naslov prejemnika transakcije.</translation> </message> <message> <location line="+1"/> <source>Short payment note.</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished">Količina odlita ali prilita dobroimetju.</translation> </message> <message> <location line="+1"/> <source>The address to send the payment to (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Choose address from address book</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a public key for the address above</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a label for this group</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Name for this Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a password</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Would you like to create a bip44 path?</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Your recovery phrase (Keep this safe!)</source> <translation type="unfinished"></translation> </message> <message> <location line="-80"/> <source>Recovery Phrase</source> <translation type="unfinished"></translation> </message> <message> <location line="+26"/> <source>Make Default</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Activate/Deactivate</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Set as Master</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>0 active connections to LEOcoin network</source> <translation type="unfinished"></translation> </message> <message> <location line="+26"/> <source>The address to send the payment to</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a label for this address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter a short note to send with payment (max 24 characters)</source> <translation type="unfinished"></translation> </message> <message> <location line="+20"/> <source>Wallet Name for recovered account</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enter the password for the wallet you are trying to recover</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Is this a bip44 path?</source> <translation type="unfinished"></translation> </message> <message> <location line="-66"/> <source>ID</source> <translation type="unfinished"></translation> </message> <message> <location line="-122"/> <source>Narration</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation type="unfinished">Količina</translation> </message> <message> <location line="+1"/> <source>Default Stealth Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Add Recipient</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Clear All</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Suggest Ring Size</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Send Payment</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>RECEIVE</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Filter by type..</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Type</source> <translation type="unfinished">Vrsta</translation> </message> <message> <location line="+1"/> <source>Show QR Code</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>New Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Copy Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>TRANSACTIONS</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Date</source> <translation type="unfinished">Datum</translation> </message> <message> <location line="+1"/> <source>ADDRESSBOOK</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Delete</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start Private Conversation</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Name:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Public Key:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start Conversation</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Choose identity</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Identity:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start Group Conversation</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Group name:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Create Group</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Invite others</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Search</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Invite others to group</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Invite to Group</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Invite</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>GROUP</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>BOOK</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start private conversation</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start group conversation</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>CHAT</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Leave Group</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>CHAIN DATA</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Coin Value</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Owned (Mature)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>System (Mature)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Spends</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Least Depth</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>BLOCK EXPLORER</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Refresh</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Hash</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Height</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Timestamp</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Value Out</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>OPTIONS</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Main</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Network</source> <translation type="unfinished">Omrežje</translation> </message> <message> <location line="+1"/> <source>Window</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Display</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>I2P</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Tor</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Start LEOcoin on system login</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Detach databases at shutdown</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Pay transaction fee:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly.</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Most transactions are 1kB. Fee 0.01 recommended.</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enable Staking</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Reserve:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Minimum Stake Interval</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Minimum Ring size:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Maximum Ring size:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Automatically select ring size</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Enable Secure messaging</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Thin Mode (Requires Restart)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Thin Full Index</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Thin Index Window</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Map port using UPnP</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Connect through SOCKS proxy:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Details</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Proxy IP:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Port:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>SOCKS Version:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Minimize to the tray instead of the taskbar</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Minimize on close</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>User Interface language:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Unit to show amounts in:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Rows per page:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Display addresses in transaction list</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Notifications:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Visible Transaction Types:</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>I2P (coming soon)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>TOR (coming soon)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Cancel</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Apply</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Ok</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Lets create a New Wallet and Account to get you started!</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Wallet Name</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Password</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Add an optional Password to secure the Recovery Phrase (shown on next page)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Would you like to create a Multi-Account HD Key? (BIP44)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Language</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>English</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>French</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Japanese</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Spanish</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Chinese (Simplified)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Chinese (Traditional)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Next Step</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Write your Wallet Recovery Phrase</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Important!</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>You need the Wallet Recovery Phrase to restore this wallet. Write it down and keep them somewhere safe. You will be asked to confirm the Wallet Recovery Phrase in the next screen to ensure you have written it down correctly</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Back</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Please confirm your Wallet Recovery Phrase</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Congratulations! You have successfully created a New Wallet and Account</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>You can now use your Account to send and receive funds :) Remember to keep your Wallet Recovery Phrase and Password (if set) safe in case you ever need to recover your wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Lets import your Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>The Wallet Recovery Phrase could require a password to be imported</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Is this a Multi-Account HD Key (BIP44)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Recovery Phrase (Usually 24 words)</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Congratulations! You have successfully imported your Wallet from your Recovery Phrase</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>You can now use your Account to send and receive funds :) Remember to keep your Wallet Recovery Phrase and Password safe in case you ever need to recover your wallet again!</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Accounts</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Name</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Created</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Active Account</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Default</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Wallet Keys</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Path</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Active</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Master</source> <translation type="unfinished"></translation> </message> <message> <location line="+61"/> <source>LEOcoin Notification</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>A new version of the LEOcoin wallet is available.</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>Please go to</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>and upgrade to the latest version.</source> <translation type="unfinished"></translation> </message> </context> <context> <name>LEOcoinGUI</name> <message> <location filename="../LEOcoin.cpp" line="+111"/> <source>A fatal error occurred. LEOcoin can no longer continue safely and will quit.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../LEOcoingui.cpp" line="+89"/> <location line="+178"/> <source>LEOcoin</source> <translation type="unfinished">LEOcoin</translation> </message> <message> <location line="-178"/> <source>Client</source> <translation type="unfinished"></translation> </message> <message> <location line="+90"/> <source>E&amp;xit</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>&amp;About LEOcoin</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Show information about LEOcoin</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Modify configuration options for LEOcoin</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>&amp;Show / Hide</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Backup wallet to another location</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Change the passphrase used for wallet encryption</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Unlock wallet</source> <translation type="unfinished">Odkleni denarnico</translation> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+4"/> <source>&amp;Debug window</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"></translation> </message> <message> <location line="+26"/> <source>&amp;File</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <source>&amp;Settings</source> <translation type="unfinished"></translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation type="unfinished"></translation> </message> <message> <location line="+19"/> <source>Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <location line="+9"/> <source>[testnet]</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <location line="+74"/> <source>LEOcoin client</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> <location line="+63"/> <source>%n active connection(s) to LEOcoin network</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message> <location line="+18"/> <source>block</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>header</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>blocks</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>headers</source> <translation type="unfinished"></translation> </message> <message> <location line="+8"/> <location line="+22"/> <source>Synchronizing with network...</source> <translation type="unfinished"></translation> </message> <message> <location line="-20"/> <source>Downloading filtered blocks...</source> <translation type="unfinished"></translation> </message> <message> <location line="+6"/> <source>~%1 filtered block(s) remaining (%2% done).</source> <translation type="unfinished"></translation> </message> <message> <location line="+14"/> <source>Importing blocks...</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> <location line="+5"/> <source>~%n block(s) remaining</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message> <location line="+13"/> <location line="+4"/> <source>Imported</source> <translation type="unfinished"></translation> </message> <message> <location line="-4"/> <location line="+4"/> <source>Downloaded</source> <translation type="unfinished"></translation> </message> <message> <location line="-3"/> <source>%1 of %2 %3 of transaction history (%4% done).</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>%1 blocks of transaction history.</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> <location line="+23"/> <source>%n second(s) ago</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s) ago</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <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> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message numerus="yes"> <location line="+3"/> <source>%n day(s) ago</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message> <location line="+7"/> <source>Up to date</source> <translation type="unfinished"></translation> </message> <message> <location line="+12"/> <source>Catching up...</source> <translation type="unfinished"></translation> </message> <message> <location line="+16"/> <source>Last received %1 was generated %2.</source> <translation type="unfinished"></translation> </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"></translation> </message> <message> <location line="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"></translation> </message> <message> <location line="+28"/> <source>Sent transaction</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"></translation> </message> <message> <location line="+16"/> <location line="+15"/> <source>Incoming Message</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Date: %1 From Address: %2 To Address: %3 Message: %4 </source> <translation type="unfinished"></translation> </message> <message> <location line="+45"/> <location line="+23"/> <source>URI handling</source> <translation type="unfinished"></translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid LEOcoin address or malformed URI parameters.</source> <translation type="unfinished"></translation> </message> <message> <location line="+42"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for staking and messaging only.</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for messaging only.</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for staking only.</source> <translation type="unfinished"></translation> </message> <message> <location line="+12"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation type="unfinished"></translation> </message> <message> <location line="+25"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation type="unfinished"></translation> </message> <message> <location line="+33"/> <source>Backup Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>Backup Failed</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"></translation> </message> <message> <location line="+48"/> <source>Lock Wallet</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Error: Wallet must first be encrypted to be locked.</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> <location line="+69"/> <source>%n second(s)</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message numerus="yes"> <location line="+1"/> <source>%n minute(s)</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message numerus="yes"> <location line="+1"/> <source>%n hour(s)</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message numerus="yes"> <location line="+1"/> <source>%n day(s)</source> <translation type="unfinished"> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> <numerusform></numerusform> </translation> </message> <message> <location line="+9"/> <source>Staking. Your weight is %1 Network weight is %2 Expected time to earn reward is %3</source> <translation type="unfinished"></translation> </message> <message> <location line="+7"/> <source>Not staking because wallet is in thin mode</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking, staking is disabled</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Not staking</source> <translation type="unfinished"></translation> </message> <message> <location filename="../transactionrecord.cpp" line="+23"/> <source>Received with</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Received LEOcoin</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Sent LEOcoin</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>Other</source> <translation type="unfinished"></translation> </message> </context> <context> <name>MessageModel</name> <message> <location filename="../messagemodel.cpp" line="+376"/> <source>Type</source> <translation type="unfinished">Vrsta</translation> </message> <message> <location line="+0"/> <source>Sent Date Time</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Received Date Time</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Label</source> <translation type="unfinished">Oznaka</translation> </message> <message> <location line="+0"/> <source>To Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>From Address</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Message</source> <translation type="unfinished">Sporočilo</translation> </message> <message> <location line="+41"/> <source>Send Secure Message</source> <translation type="unfinished"></translation> </message> <message> <location line="+1"/> <source>Send failed: %1.</source> <translation type="unfinished"></translation> </message> <message> <location line="+22"/> <location line="+1"/> <source>(no label)</source> <translation type="unfinished">(ni oznake)</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start LEOcoin: click-to-pay handler</source> <translation type="unfinished"></translation> </message> </context> <context> <name>PeerTableModel</name> <message> <location filename="../peertablemodel.cpp" line="+118"/> <source>Address/Hostname</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>User Agent</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Ping Time</source> <translation type="unfinished"></translation> </message> </context> <context> <name>QObject</name> <message> <location filename="../guiutil.cpp" line="-470"/> <source>%1 d</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>%1 h</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <source>%1 m</source> <translation type="unfinished"></translation> </message> <message> <location line="+2"/> <location line="+55"/> <source>%1 s</source> <translation type="unfinished"></translation> </message> <message> <location line="-10"/> <source>None</source> <translation type="unfinished"></translation> </message> <message> <location line="+5"/> <source>N/A</source> <translation type="unfinished">Neznano</translation> </message> <message> <location line="+0"/> <source>%1 ms</source> <translation type="unfinished"></translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>Ime odjemalca</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+23"/> <location line="+36"/> <location line="+23"/> <location line="+23"/> <location line="+491"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <location line="+23"/> <source>N/A</source> <translation>Neznano</translation> </message> <message> <location line="-1062"/> <source>Client version</source> <translation>Različica odjemalca</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>&amp;Informacije</translation> </message> <message> <location line="-10"/> <source>LEOcoin - Debug window</source> <translation type="unfinished"></translation> </message> <message> <location line="+25"/> <source>LEOcoin Core</source> <translation type="unfinished"></translation> </message> <message> <location line="+53"/> <source>Using OpenSSL version</source> <translation>OpenSSL različica v rabi</translation> </message> <message> <location line="+26"/> <source>Using BerkeleyDB version</source> <translation type="unfinished"></translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>Čas zagona</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>Omrežje</translation> </message> <message> <location line="+7"/> <source>Name</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Number of connections</source> <translation>Število povezav</translation> </message> <message> <location line="+157"/> <source>Show the LEOcoin help message to get a list with possible LEOcoin command-line options.</source> <translation type="unfinished"></translation> </message> <message> <location line="+99"/> <source>&amp;Network Traffic</source> <translation type="unfinished"></translation> </message> <message> <location line="+52"/> <source>&amp;Clear</source> <translation type="unfinished"></translation> </message> <message> <location line="+16"/> <source>Totals</source> <translation type="unfinished"></translation> </message> <message> <location line="+64"/> <location filename="../rpcconsole.cpp" line="+396"/> <source>In:</source> <translation type="unfinished"></translation> </message> <message> <location line="+80"/> <location filename="../rpcconsole.cpp" line="+1"/> <source>Out:</source> <translation type="unfinished"></translation> </message> <message> <location line="+41"/> <source>&amp;Peers</source> <translation type="unfinished"></translation> </message> <message> <location line="+39"/> <location filename="../rpcconsole.cpp" line="-167"/> <location line="+328"/> <source>Select a peer to view detailed information.</source> <translation type="unfinished"></translation> </message> <message> <location line="+25"/> <source>Peer ID</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Direction</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Version</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>User Agent</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Services</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Starting Height</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Sync Height</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Ban Score</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Connection Time</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Last Send</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Last Receive</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Bytes Sent</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Bytes Received</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Ping Time</source> <translation type="unfinished"></translation> </message> <message> <location line="+23"/> <source>Time Offset</source> <translation type="unfinished"></translation> </message> <message> <location line="-866"/> <source>Block chain</source> <translation>veriga blokov</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>Trenutno število blokov</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>Ocena vseh blokov</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>Čas zadnjega bloka</translation> </message> <message> <location line="+49"/> <source>Open the LEOcoin debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <source>&amp;Open</source> <translation>&amp;Odpri</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>Možnosti ukazne vrstice.</translation> </message> <message> <location line="+10"/> <source>&amp;Show</source> <translation>&amp;Prikaži</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>&amp;Konzola</translation> </message> <message> <location line="-266"/> <source>Build date</source> <translation>Datum izgradnje</translation> </message> <message> <location line="+206"/> <source>Debug log file</source> <translation>Razhroščevalna dnevniška datoteka</translation> </message> <message> <location line="+109"/> <source>Clear console</source> <translation>Počisti konzolo</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-197"/> <source>Welcome to the LEOcoin Core RPC console.</source> <translation type="unfinished"></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>Za navigiranje po zgodovini uporabite puščici gor in dol, in &lt;b&gt;Ctrl-L&lt;/b&gt; za izpraznjenje zaslona.</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>Vtipkaj &lt;b&gt;pomoč&lt;/b&gt; za vpogled v razpožljive ukaze.</translation> </message> <message> <location line="+233"/> <source>via %1</source> <translation type="unfinished"></translation> </message> <message> <location line="+3"/> <location line="+1"/> <source>never</source> <translation type="unfinished"></translation> </message> <message> <location line="+9"/> <source>Inbound</source> <translation type="unfinished"></translation> </message> <message> <location line="+0"/> <source>Outbound</source> <translation type="unfinished"></translation> </message> <message> <location line="+7"/> <source>Unknown</source> <translation type="unfinished"></translation> </message> </context> <context> <name>TrafficGraphWidget</name> <message> <location filename="../trafficgraphwidget.cpp" line="+79"/> <source>KB/s</source> <translation type="unfinished"></translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>Odpri enoto %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation> <numerusform>Odprt za %n blok</numerusform> <numerusform>Odprt za %n bloka</numerusform> <numerusform>Odprt za %n blokov</numerusform> <numerusform>Odprt za %n blokov</numerusform> </translation> </message> <message> <location line="+7"/> <source>conflicted</source> <translation>sporen</translation> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation>%1/offline</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/nepotrjeno</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 potrdil</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>Stanje</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation> <numerusform>, predvajanje skozi %n vozlišče</numerusform> <numerusform>, predvajanje skozi %n vozlišči</numerusform> <numerusform>, predvajanje skozi %n vozlišč</numerusform> <numerusform>, predvajanje skozi %n vozlišč</numerusform> </translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>Izvor</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>Generirano</translation> </message> <message> <location line="+5"/> <location line="+17"/> <location line="+20"/> <source>From</source> <translation>Pošiljatelj</translation> </message> <message> <location line="-19"/> <location line="+20"/> <location line="+23"/> <location line="+57"/> <source>To</source> <translation>Prejemnik</translation> </message> <message> <location line="-96"/> <location line="+2"/> <location line="+18"/> <location line="+2"/> <source>own address</source> <translation>lasten naslov</translation> </message> <message> <location line="-22"/> <location line="+20"/> <source>label</source> <translation>oznaka</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+44"/> <location line="+20"/> <location line="+40"/> <source>Credit</source> <translation>Kredit</translation> </message> <message numerus="yes"> <location line="-114"/> <source>matures in %n more block(s)</source> <translation> <numerusform>dozori čez %n blok</numerusform> <numerusform>dozori čez %n bloka</numerusform> <numerusform>dozori čez %n blokov</numerusform> <numerusform>dozori čez %n blokov</numerusform> </translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>ni bilo sprejeto</translation> </message> <message> <location line="+43"/> <location line="+8"/> <location line="+16"/> <location line="+42"/> <source>Debit</source> <translation>Dolg</translation> </message> <message> <location line="-52"/> <source>Transaction fee</source> <translation>Provizija transakcije</translation> </message> <message> <location line="+19"/> <source>Net amount</source> <translation>Neto količina</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>Sporočilo</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>Opomba</translation> </message> <message> <location line="+12"/> <source>Transaction ID</source> <translation>ID transakcije</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 type="unfinished"></translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>Razhroščevalna informacija</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>Transakcija</translation> </message> <message> <location line="+5"/> <source>Inputs</source> <translation>Vnosi</translation> </message> <message> <location line="+44"/> <source>Amount</source> <translation>Količina</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>pravilno</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>nepravilno</translation> </message> <message> <location line="-266"/> <source>, has not been successfully broadcast yet</source> <translation>, še ni bil uspešno predvajan</translation> </message> <message> <location line="+36"/> <location line="+20"/> <source>unknown</source> <translation>neznano</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Podrobnosti transakcije</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>To podokno prikazuje podroben opis transakcije</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+217"/> <source>Date</source> <translation>Datum</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Vrsta</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Naslov</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Količina</translation> </message> <message> <location line="+54"/> <source>Open until %1</source> <translation>Odpri enoto %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>Potrjeno (%1 potrdil)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation> <numerusform>Odprt še %n blok</numerusform> <numerusform>Odprt še %n bloka</numerusform> <numerusform>Odprt še %n blokov</numerusform> <numerusform>Odprt še %n blokov</numerusform> </translation> </message> <message> <location line="-51"/> <source>Narration</source> <translation type="unfinished"></translation> </message> <message> <location line="+57"/> <source>Offline</source> <translation>Nepovezan</translation> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation>Nepotrjeno</translation> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation>Potrjuje (%1 od %2 priporočenih potrditev)</translation> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation>Sporen</translation> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation>Nezrel (%1 potrditev, na voljo bo po %2)</translation> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Ta blok ni prejelo še nobeno vozlišče. Najverjetneje ne bo sprejet!</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>Generirano, toda ne sprejeto</translation> </message> <message> <location line="+49"/> <source>(n/a)</source> <translation>(ni na voljo)</translation> </message> <message> <location line="+202"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>Stanje transakcije. Zapeljite z miško čez to polje za prikaz števila potrdil. </translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>Datum in čas, ko je transakcija bila prejeta.</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>Vrsta transakcije.</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>Naslov prejemnika transakcije.</translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>Količina odlita ali prilita dobroimetju.</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+402"/> <location line="+246"/> <source>Sending...</source> <translation>Pošiljanje...</translation> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>LEOcoin version</source> <translation>LEOcoin različica</translation> </message> <message> <location line="+1"/> <source>Usage:</source> <translation>Uporaba:</translation> </message> <message> <location line="+1"/> <source>Send command to -server or LEOcoind</source> <translation>Pošlji ukaz na -server ali LEOcoind</translation> </message> <message> <location line="+1"/> <source>List commands</source> <translation>Prikaži ukaze</translation> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation>Prikaži pomoč za ukaz</translation> </message> <message> <location line="+2"/> <source>Options:</source> <translation>Možnosti:</translation> </message> <message> <location line="+2"/> <source>Specify configuration file (default: LEOcoin.conf)</source> <translation>Določi konfiguracijsko datoteko (privzeto: LEOcoin.conf)</translation> </message> <message> <location line="+1"/> <source>Specify pid file (default: LEOcoind.pid)</source> <translation>Določi pid datoteko (privzeto: LEOcoind.pid)</translation> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation>Določi datoteko denarnice (znotraj imenika s podatki)</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>Določi podatkovni imenik</translation> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>Nastavi pomnilnik podatkovne zbirke v megabajtih (privzeto: 25)</translation> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation>Nastavi velikost zapisa podatkovne baze na disku v megabajtih (privzeto: 100)</translation> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 51737 or testnet: 51997)</source> <translation>Sprejmi povezave na &lt;port&gt; (privzeta vrata: 51737 ali testnet: 51997) </translation> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>Obdrži maksimalno število &lt;n&gt; povezav (privzeto: 125)</translation> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>Poveži se na vozlišče da pridobiš naslove soležnikov in prekini povezavo</translation> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation>Določite vaš lasten javni naslov</translation> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation>Naveži na dani naslov. Uporabi [host]:port ukaz za IPv6</translation> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation>Deleži svoje kovance za podporo omrežja in pridobi nagrado (default: 1)</translation> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>Prag za prekinitev povezav s slabimi odjemalci (privzeto: 1000)</translation> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>Število sekund preden se ponovno povežejo neodzivni soležniki (privzeto: 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>Prišlo je do napake pri nastavljanju RPC porta %u za vhodne povezave na IPv4: %s</translation> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation>Loči podatkovne baze blokov in naslovov. Podaljša čas zaustavitve (privzeto: 0)</translation> </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>Napaka: Transakcija je bila zavrnjena. To se je lahko zgodilo, če so bili kovanci v vaši denarnici že zapravljeni, na primer če ste uporabili kopijo wallet.dat in so bili kovanci zapravljeni v kopiji, a tu še niso bili označeni kot zapravljeni.</translation> </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>Napaka: Ta transakcija zahteva transakcijsko provizijo vsaj %s zaradi svoje količine, kompleksnosti ali uporabo sredstev, ki ste jih prejeli pred kratkim. </translation> </message> <message> <location line="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 51736 or testnet: 51996)</source> <translation>Sprejmi povezave na &lt;port&gt; (privzeta vrata: 51737 ali testnet: 51997) </translation> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation>Sprejmi ukaze iz ukazne vrstice in JSON-RPC</translation> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation>Napaka: Ustvarjanje transakcije spodletelo</translation> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation>Napaka: Zaklenjena denarnica, ni mogoče opraviti transakcije</translation> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation>Uvažanje blockchain podatkovne datoteke.</translation> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation>Uvažanje podatkovne datoteke verige blokov.</translation> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation>Teci v ozadju in sprejemaj ukaze</translation> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation>Uporabi testno omrežje</translation> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>Sprejmi zunanje povezave (privzeto: 1 če ni nastavljen -proxy ali -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>Prišlo je do napake pri nastavljanju RPC porta %u za vhodne povezave na IPv6: %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>Napaka pri zagonu podatkovne baze okolja %s! Za popravilo, NAPRAVITE VARNOSTNO KOPIJO IMENIKA, in iz njega odstranite vse razen datoteke wallet.dat</translation> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>Nastavi maksimalno velikost visoke-prioritete/nizke-provizije transakcij v bajtih (privzeto: 27000)</translation> </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>Opozorilo: -paytxfee je nastavljen zelo visoko! To je transakcijska provizija, ki jo boste plačali ob pošiljanju transakcije.</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 LEOcoin will not work properly.</source> <translation>Opozorilo: Prosimo preverite svoj datum in čas svojega računalnika! Če je vaša ura nastavljena napačno LEOcoin ne bo deloval.</translation> </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>Opozorilo: napaka pri branju wallet.dat! Vsi ključi so bili pravilno prebrani, podatki o transakciji ali imenik vnešenih naslovov so morda izgubljeni ali nepravilni.</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>Opozorilo: wallet.dat je pokvarjena, podatki rešeni! Originalna wallet.dat je bila shranjena kot denarnica. {timestamp}.bak v %s; če imate napačno prikazano stanje na računu ali v transakcijah prenovite datoteko z varnostno kopijo. </translation> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation>Poizkusi rešiti zasebni ključ iz pokvarjene wallet.dat </translation> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation>Možnosti ustvarjanja blokov:</translation> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation>Poveži se samo na določena vozlišče(a)</translation> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>Odkrij svoj IP naslov (privzeto: 1 ob poslušanju, ko ni aktiviran -externalip)</translation> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>Poslušanje za vrata je spodletelo. Če želite lahko uporabite ukaz -listen=0.</translation> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation>Najdi soležnike z uporabno DNS vpogleda (privzeto: 1)</translation> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation>Sinhronizacija načina točk preverjanja (privzeto: strogo)</translation> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>Neveljaven -tor naslov: &apos;%s&apos;</translation> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation>Neveljavni znesek za -reservebalance=&lt;amount&gt;</translation> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>Največji sprejemni medpomnilnik glede na povezavo, &lt;n&gt;*1000 bytov (privzeto: 5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>Največji oddajni medpomnilnik glede na povezavo, &lt;n&gt;*1000 bytov (privzeto: 1000)</translation> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>Poveži se samo z vozlišči v omrežju &lt;net&gt; (IPv4, IPv6 in Tor)</translation> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>Output dodatnih informacij razhroščevanja. Obsega vse druge -debug* možnosti.</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>Output dodatnih informacij razhroščevanja omrežja. </translation> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation>Opremi output rahroščevanja s časovnim žigom. </translation> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation>SSL možnosti: (glejte Bitcoin Wiki za navodla, kako nastaviti SSL)</translation> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>Izberi verzijo socks proxya za uporabo (4-5, privzeto: 5)</translation> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>Pošlji sledilne/razhroščevalne informacije v konzolo namesto jih shraniti v debug.log datoteko</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>Pošlji sledilne/razhroščevalne informacije v razhroščevalnik</translation> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>Nastavi največjo velikost bloka v bajtih (privzeto: 250000)</translation> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>Nastavi najmanjšo velikost bloka v bajtih (privzeto: 0)</translation> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>Skrči debug.log datoteko ob zagonu aplikacije (privzeto: 1 ko ni aktiviran -debug)</translation> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>Določi čas pavze povezovanja v milisekundah (privzeto: 5000)</translation> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation>Ni bilo mogoče vpisati točke preverjanja, napačen ključ za točko preverjanja? </translation> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>Uporabi UPnP za mapiranje vrat poslušanja (privzeto: 0)</translation> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>Uporabi UPnP za mapiranje vrat poslušanja (privzeto: 1 med poslušanjem)</translation> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>Uporabi proxy za povezavo s skritimi storitvami tora (privzeto: isto kot -proxy) </translation> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation>Uporabniško ime za JSON-RPC povezave</translation> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation>Potrdite neoporečnost baze podatkov...</translation> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation>OPOZORILO: zaznana je bila kršitev s sinhronizirami točkami preverjanja, a je bila izpuščena.</translation> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation>Opozorilo: Malo prostora na disku!</translation> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>Opozorilo: ta različica je zastarela, potrebna je nadgradnja!</translation> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation>wallet.dat poškodovana, neuspešna obnova</translation> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation>Geslo za JSON-RPC povezave</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=LEOcoinrpc 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;LEOcoin Alert&quot; admin@foo.com </source> <translation>%s, nastaviti morate rpcgeslo v konfiguracijski datoteki: %s Priporočeno je, da uporabite naslednje naključno geslo: rpcuser=LEOcoinrpc rpcpassword=%s (tega gesla si vam ni potrebno zapomniti) Uporabniško ime in geslo NE SMETA biti ista. Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke. Prav tako je priporočeno, da nastavite alernotify, tkako da vas opozori na probleme; na primer: alertnotify=echo %%s | mail -s &quot;LEOcoin Alarm&quot; admin@foo.com </translation> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation>Najdi soležnike prek irca (privzeto: 0)</translation> </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>Sinhroniziraj čas z drugimi vozlišči. Onemogoči, če je čas na vašem sistemu točno nastavljen, npr. sinhroniziranje z NTP (privzeto: 1)</translation> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation>Ob ustvarjanju transakcij, prezri vnose z manjšo vrednostjo kot (privzeto: 0.01)</translation> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>Dovoli JSON-RPC povezave z določenega IP naslova</translation> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>Pošlji ukaze vozlišču na &lt;ip&gt; (privzet: 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>Izvrši ukaz, ko se najboljši blok spremeni (%s je v cmd programu nadomeščen z zgoščenimi bloki).</translation> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation>Izvedi ukaz, ko bo transakcija denarnice se spremenila (V cmd je bil TxID zamenjan za %s)</translation> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation>Zahtevaj potrditve za spremembo (default: 0)</translation> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation>Zahtevaj da transakcijske skripte uporabljajo operatorje canonical PUSH (privzeto: 1)</translation> </message> <message> <location line="+2"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation>Izvrši ukaz, ko je prejet relevanten alarm (%s je v cmd programu nadomeščen s sporočilom)</translation> </message> <message> <location line="+3"/> <source>Upgrade wallet to latest format</source> <translation>Posodobi denarnico v najnovejši zapis</translation> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation>Nastavi velikost ključa bazena na &lt;n&gt; (privzeto: 100)</translation> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>Ponovno preglej verigo blokov za manjkajoče transakcije denarnice</translation> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation>Koliko blokov naj preveri ob zagonu aplikacije (privzeto: 2500, 0 = vse)</translation> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation>Kako temeljito naj bo preverjanje blokov (0-6, privzeto: 1)</translation> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation>Uvozi bloke iz zunanje blk000?.dat datoteke</translation> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>Uporabi OpenSSL (https) za JSON-RPC povezave</translation> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation>Datoteka potrdila strežnika (privzeta: server.cert)</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>Zasebni ključ strežnika (privzet: server.pem)</translation> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>Dovoljeni kodirniki (privzeti: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"></translation> </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>OPOZORILO: Najdene so bile neveljavne točke preverjanja! Prikazane transakcije so morda napačne! Poiščite novo različico aplikacije ali pa obvestite razvijalce.</translation> </message> <message> <location line="-158"/> <source>This help message</source> <translation>To sporočilo pomoči</translation> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation>Denarnica %s se nahaja zunaj datotečnega imenika %s.</translation> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. LEOcoin is probably already running.</source> <translation>Ni bilo mogoče najti podatkovnega imenika %s. Aplikacija LEOcoin je verjetno že zagnana.</translation> </message> <message> <location line="-98"/> <source>LEOcoin</source> <translation>LEOcoin</translation> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>Na tem računalniku je bilo nemogoče vezati na %s (bind returned error %d, %s)</translation> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation>Poveži se skozi socks proxy</translation> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>Omogoči DNS povezave za -addnode, -seednode in -connect</translation> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation>Nalaganje naslovov ...</translation> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation>Napaka pri nalaganju blkindex.dat</translation> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>Napaka pri nalaganju wallet.dat: denarnica pokvarjena</translation> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of LEOcoin</source> <translation>Napaka pri nalaganju wallet.dat: denarnica zahteva novejšo verzijo LEOcoin</translation> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart LEOcoin to complete</source> <translation>Denarnica mora biti prepisana: ponovno odprite LEOcoin za dokončanje</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation>Napaka pri nalaganju wallet.dat</translation> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>Neveljaven -proxy naslov: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>Neznano omrežje določeno v -onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>Zahtevana neznana -socks proxy različica: %i</translation> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>Ni mogoče določiti -bind naslova: &apos;%s&apos;</translation> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>Ni mogoče določiti -externalip naslova: &apos;%s&apos;</translation> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Neveljavni znesek za -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation>Napaka: ni mogoče zagnati vozlišča</translation> </message> <message> <location line="+11"/> <source>Sending...</source> <translation>Pošiljanje...</translation> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation>Neveljavna količina</translation> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation>Premalo sredstev</translation> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation>Nalaganje indeksa blokov ...</translation> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>Dodaj vozlišče za povezavo nanj in skušaj le to obdržati odprto</translation> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. LEOcoin is probably already running.</source> <translation>Navezava v %s na tem računalniku ni mogoča LEOcoin aplikacija je verjetno že zagnana.</translation> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation>Provizija na KB ki jo morate dodati transakcijam, ki jih pošiljate</translation> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation>Neveljavni znesek za -miniput=&lt;amount&gt;: &apos;%s&apos;</translation> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation>Nalaganje denarnice ...</translation> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation>Ne morem </translation> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation>Ni mogoče zagnati keypoola</translation> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation>Ni mogoče zapisati privzetega naslova</translation> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation>Ponovno pregledovanje ...</translation> </message> <message> <location line="+5"/> <source>Done loading</source> <translation>Nalaganje končano</translation> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation>Za uporabo %s opcije</translation> </message> <message> <location line="+14"/> <source>Error</source> <translation>Napaka</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>Nastaviti morate rpcpassword=&lt;password&gt; v konfiguracijski datoteki: %s Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke.</translation> </message> </context> </TS>
// // EGTiledLayerViewController.h // Widgets // // Created by EG on 2017/9/4. // Copyright © 2017年 EGMade. All rights reserved. // #import "EGBasicViewController.h" @interface EGTiledLayerViewController : EGBasicViewController @end
<!DOCTYPE html> <!-- Modification 08/02/2015 (omie w.): - Added foundation-icons.css - Installed Foundation Icons inside of /icons - Added drop-down menu HTML Modification 08/05/2015 (omie w.): - Changed Search icon to drop-down menu in mobile Design - Changed the event titles to orange with a 15% top radius - Updated main.CSS to reflect changes in drop-down menu - Revised and fixed drop-down menu HTML - Added Responsive Design for phone/tablet/desktop versions --> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width"> <title>NewDevATL</title> <!--Initialize Font--> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> <!--Initialize Stylesheets--> <link rel='stylesheet' href='css/normalize.css' type='text/css'> <link rel='stylesheet' href='css/foundation.css' type='text/css'> <link rel='stylesheet' href='css/foundation-icons.css' type='text/css'> <link rel='stylesheet' href='css/main.css' type='text/css'> <!--Initialize JavaScript--> <script src="/js/vendor/modernizr.js"></script> </head> <body> <!--Navigation Top-Bar--> <div class="full-width navigation-area"> <div class="row"> <div class="large-12 columns"> <nav class="top-bar" data-topbar role="navigation"> <ul class="title-area"> <!-- Title Area --> <li class="name" id="NewDevATL">New<b>Dev</b>ATL</li> <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone --> <li class="toggle-topbar menu-icon"> <a href="#"> <span></span> </a> </li> </ul> <!-- The Section wrap --> <section class="top-bar-section"> <!-- Left Nav Section --> <ul class="left"> <li class="active"><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Events</a></li> <li><a href="#">News</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Projects</a></li> <li class="has-form"> <input id="event-search" type="text" placeholder="Search"> </li> </ul> <!-- Right Nav Section --> <ul class="right"></ul> </section> </nav> </div> </div> </div> <main> <h1 class="columns"> Upcoming Events</h2> <h2 class="columns"> <small>A resource guide for beginner-friendly tech events around Atlanta</small> </h2> <section class="events"> <div class="row event-row"> <div class="small-12 large-4 columns"> <div class="event row"> <div class="columns event-title"> <h3 class="event-title-text"> Free Code Camp Atlanta meetup </h3> </div> <div class="event-body small-12 columns"> <!-- Fill in upcoming Free Code Camp Atlanta meetup info below --> <p>The Free Code Camp Atlanta Group is for individuals participating Free Code Camp. We're learning to code online on our own time at our own pace! We also get to build things to help causes we believe in. It's a totally free volunteer supported resource provided by an awesome community. Check us out at <a href="http://www.freecodecamp.com/">Free Code Camp<a></p> <p class="date"></p> <p class="address"> <span class="name"></span> <span class="street-address"></span> <span class="region"></span> </p> </div> <div class="info columns"> <span class="more-info"><a href="https://www.facebook.com/groups/free.code.camp.atlanta/815262645189979/">more info</a></span> </div> </div> </div> <div class="small-12 large-4 columns"> <div class="event row"> <div class="columns event-title"> <h3 class="event-title-text">ConnectJS Conference (must purchase tickets for event)</h3> </div> <div class="event-body small-12 columns"> <p class="date">October 16 - 17, 2015</p> <p class="address"> <span class="name">Cobb Galleria Center</span> <span class="street-address">2 Galleria Pkwy SE</span> <span class="region">Atlanta, GA 30339</span> </p> </div> <div class="info columns"> <span class="more-info"><a href="http://connect-js.com/">more info</a></span> </div> </div> </div> <div class="small-12 large-4 columns end"> <div class="event row"> <div class="columns event-title"> <h3 class="event-title-text"> HackATL </h3> </div> <div class="event-body small-12 columns"> <p class="date">October 16-18</p> <p class="address"> <span class="name">Emory University's Goizueta Business School</span> <span class="street-address">1300 Clifton Rd</span> <span class="region">Atlanta, GA 30322</span> </p> </div> <div class="info columns"> <span class="more-info"><a href="http://hackatl.org/">more info</a></span> </div> </div> </div> </div> <div class="small-12 columns"> <p class="add-event"> Create an issue for <a href="https://github.com/LeahW/NewDevATL">NewDevATL</a> to list your event </p> </div> </section> </main> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script src="js/vendor/fastclick.js"> </script> <script src="js/main.js"></script> <script src="js/foundation.min.js"></script> <script> $(document).foundation(); </script> </body> </html>
<p> comp-788 works! </p>
<?php /** * This is a Loom pagecontroller. * Show search form and overview of movies * together with administration links like edit, delete, ... * */ // Include the essential config-file which also creates the $loom variable with its defaults. include(__DIR__.'/config.php'); // Do it and store it all in variables in the Loom container. // Add style for movie_db $loom['stylesheets'][] = 'css/movie.css'; $loom['title'] = "movieDb"; // Connect to a MySQL database using PHP PDO $db = new CDatabase($loom['database']); if (isset($_POST['title'])) { // User is searchin movies through search form $movieSearch = new CRMMovieSearch($db, $_POST); $out = $movieSearch->output(); } else { // User is searchin movies via url query $movieSearch = new CRMMovieSearch($db, $_GET); // Get html-output for movie search form and // movie search results. $out = $movieSearch->output(); } // Do it and store it all in variables in the Loom container. $loom['title'] = "Filmer - Administration"; $loom['main'] = <<<EOD <h1>{$loom['title']}</h1> $out EOD; // Finally, leave it all to the rendering phase of Loom. include(LOOM_THEME_PATH);
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. using MixedRealityToolkit.InputModule.EventData; using UnityEngine.EventSystems; namespace MixedRealityToolkit.InputModule.InputHandlers { /// <summary> /// Interface to implement to react to speech recognition. /// </summary> public interface ISpeechHandler : IEventSystemHandler { void OnSpeechKeywordRecognized(SpeechEventData eventData); } }
## 37. FacebookのEduardo Saverin [Eduardo Saverin](https://en.wikipedia.org/wiki/Eduardo_Saverin)は、ブラジルのサンパウロで、裕福な家族に生まれた。Harvardに入学し、Mark Zuckerbergと会う。 「フェイスブック;若き天才の野望」のよれば、Eduardo Saverinは、大学の投資研究クラブの幹事を務めていた。Mark Zuckerbergは、Eduardo Saverinと各$1000の出資をし、Eduardo SaverinにFacebookの30%の株を渡した。 Eduardo Saverinは、2004年春、$10Kを運転資金として、Facebookに提供した。しかし、Mark ZuckerbergがPalo Altoに引っ越してから、関係が悪くなる。お互いの収益に対する考え方が違っていた。Eduardo Saverinは、Palo Altoに引っ越すつもりがなく、東海岸にとどまった。 関係が決定的に悪くなったのは、2005年5月にAccelが、$12.7MをFacebookに投資した直後である。それまで、Eduardo Saverinは、Facebookの34.4%の株式を保有していたが、10%に希釈してしまった。Eduardo Saverinは、Facebookの仕事を全てやめる。しかし、株は保持したままであった。 FacebookもEduardo Saverinを訴え、Eduardo SaverinもFacebookを訴えたが、和解し、提訴を取り下げた。 Eduardo Saverinの資産は、$7.2BとWIKIPEDIAには記述されている。また、16社に20回の投資を行っている。
// Export modules to global scope as necessary (only for testing) if (typeof process !== 'undefined' && process.title === 'node') { // We are in node. Require modules. expect = require('chai').expect; sinon = require('sinon'); num = require('..'); isBrowser = false; } else { // We are in the browser. Set up variables like above using served js files. expect = chai.expect; // num and sinon already exported globally in the browser. isBrowser = true; }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Test Page</title> </head> <body> <h1>Hello Bryan</h1> </body> </html>
import sys [_, ms, _, ns] = list(sys.stdin) ms = set(int(m) for m in ms.split(' ')) ns = set(int(n) for n in ns.split(' ')) print(sep='\n', *sorted(ms.difference(ns).union(ns.difference(ms))))
package org.innovateuk.ifs.management.publiccontent.formpopulator.section; import org.innovateuk.ifs.competition.publiccontent.resource.PublicContentSectionType; import org.innovateuk.ifs.management.publiccontent.form.section.ScopeForm; import org.innovateuk.ifs.management.publiccontent.formpopulator.PublicContentFormPopulator; import org.innovateuk.ifs.management.publiccontent.formpopulator.AbstractContentGroupFormPopulator; import org.springframework.stereotype.Service; @Service public class ScopeFormPopulator extends AbstractContentGroupFormPopulator<ScopeForm> implements PublicContentFormPopulator<ScopeForm> { @Override protected ScopeForm createInitial() { return new ScopeForm(); } @Override protected PublicContentSectionType getType() { return PublicContentSectionType.SCOPE; } }
import os import numpy as np class Dataset(object): """ This class represents a dataset and consists of a list of SongData along with some metadata about the dataset """ def __init__(self, songs_data=None): if songs_data is None: self.songs_data = [] else: self.songs_data = songs_data def add_song(self, song_data): self.songs_data.append(song_data) def songs(self): for s in self.songs_data: yield s @property def num_features(self): if len(self.songs_data): return self.songs_data[0].X.shape[1] @property def size(self): return len(self.songs_data) def __repr__(self): return ', '.join([s.name for s in self.songs()]) class SongData(object): """ This class holds features, labels, and metadata for a song. """ def __init__(self, audio_path, label_path): if not os.path.isfile(audio_path): raise IOError("Audio file at %s does not exist" % audio_path) if label_path and not os.path.isfile(label_path): raise IOError("MIDI file at %s does not exist" % label_path) self.audio_path = audio_path self.label_path = label_path """ x [num_samples,] is the samples of the song """ @property def x(self): return self.__x @x.setter def x(self, x): self.__x = x """ X [num_frames x num_features] is the feature matrix for the song """ @property def X(self): return self.__X @X.setter def X(self, X): if hasattr(self, 'Y') and self.Y.shape[0] != X.shape[0]: raise ValueError("Number of feature frames must equal number of label frames") self.__X = X """ Y [num_frames x num_pitches] is the label matrix for the song """ @property def Y(self): return self.__Y @Y.setter def Y(self, Y): if hasattr(self, 'X') and self.X.shape[0] != Y.shape[0]: raise ValueError("Number of label frames must equal number of feature frames") self.__Y = Y @property def num_pitches(self): if hasattr(self, 'Y'): return np.shape(self.Y)[1] return 0 @property def num_features(self): if hasattr(self, 'X'): return self.X.shape[1] @property def num_frames(self): if hasattr(self, 'X'): return self.X.shape[0] @property def name(self): return os.path.splitext(os.path.split(self.audio_path)[-1])[0]
import gevent import time def doit(i): print "do it:%s" % (i) gevent.sleep(2) print "done:%s" %(i) t2 = time.time() threads = {} for i in range(5): t = gevent.spawn(doit, i) threads[i] = t #print dir(t) gevent.sleep(1) print threads print threads[3].dead threads[3].kill() print threads[3].dead del threads[3] threads[2].kill() print threads #gevent.sleep(3) print time.time() - t2 for i in threads: print threads[ i ].dead #print t gevent.sleep(3) print time.time() - t2 for i in threads: print threads[ i ].dead
import sys import os import time import numpy import cv2 import cv2.cv as cv from PIL import Image sys.path.insert(0, os.path.join( os.path.dirname(os.path.dirname(os.path.dirname(__file__))))) from picture.util import define from picture.util.system import POINT from picture.util.log import LOG as L THRESHOLD = 0.96 class PatternMatch(object): def __init__(self): pass @classmethod def __patternmatch(self, reference, target): L.info("reference : %s" % reference) img_rgb = cv2.imread(reference) img_gray = cv2.cvtColor(img_rgb, cv2.COLOR_BGR2GRAY) template = cv2.imread(target, 0) w, h = template.shape[::-1] res = cv2.matchTemplate(img_gray,template,cv2.TM_CCOEFF_NORMED) loc = numpy.where( res >= THRESHOLD) result = None for pt in zip(*loc[::-1]): result = POINT(pt[0], pt[1], w, h) return result @classmethod def bool(self, reference, target): result = PatternMatch.__patternmatch(reference, target) if result is None: return False else: return True @classmethod def coordinate(self, reference, target): return PatternMatch.__patternmatch(reference, target) if __name__ == "__main__": pmc = PatternMatch() print pmc.bool(os.path.join(define.APP_TMP,"screen.png"), os.path.join(define.APP_TMP,"login.png"))
/* io::mod.rs */ use core::mem::volatile_store; use kernel::sgash; mod font; /* http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/BBABEGGE.html */ pub static UART0: *mut u32 = 0x101f1000 as *mut u32; pub static UART0_IMSC: *mut u32 = (0x101f1000 + 0x038) as *mut u32; #[allow(dead_code)] pub static VIC_INTENABLE: *mut u32 = (0x10140000 + 0x010) as *mut u32; pub static mut CURSOR_X: u32 = 0; pub static mut CURSOR_Y: u32 = 0; pub static CURSOR_HEIGHT: u32 = 16; pub static CURSOR_WIDTH: u32 = 8; pub static mut CURSOR_COLOR: u32 = 0x000000FF; pub static mut FG_COLOR: u32 = 0x00FFFFFF; pub static mut BG_COLOR: u32 = 0xF0000000; pub static mut CURSOR_BUFFER: [u32, ..8*16] = [0x00FF0000, ..8*16]; pub static mut SAVE_X: u32 = 0; pub static mut SAVE_Y: u32 = 0; pub static START_ADDR: u32 = 1024*1024; pub static mut SCREEN_WIDTH: u32 = 0; pub static mut SCREEN_HEIGHT: u32 = 0; pub unsafe fn init(width: u32, height: u32) { SCREEN_WIDTH = width; SCREEN_HEIGHT= height; sgash::init(); /* For the following magic values, see * http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/CACHEDGD.html */ // 800x600 // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/CACCCFBF.html if (SCREEN_WIDTH == 800 && SCREEN_HEIGHT == 600) { ws(0x10000010, 0x2CAC); ws(0x10120000, 0x1313A4C4); ws(0x10120004, 0x0505F657); ws(0x10120008, 0x071F1800); /* See http://forum.osdev.org/viewtopic.php?p=195000 */ ws(0x10120010, START_ADDR); /* See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0161e/I911024.html */ ws(0x10120018, 0x82B); } // 640x480 // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/CACCCFBF.html else if (SCREEN_WIDTH == 640 && SCREEN_HEIGHT == 480) { ws(0x10000010, 0x2C77); ws(0x10120000, 0x3F1F3F9C); ws(0x10120004, 0x090B61DF); ws(0x10120008, 0x067F1800); /* See http://forum.osdev.org/viewtopic.php?p=195000 */ ws(0x10120010, START_ADDR); /* See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0161e/I911024.html */ ws(0x10120018, 0x82B); } set_bg(0x000000); set_fg(0xFAFCFF); set_cursor_color(0xFAFCFF); fill_bg(); sgash::drawstr(&"sgash> "); draw_cursor(); } pub unsafe fn write_char(c: char, address: *mut u32) { volatile_store(address, c as u32); } pub unsafe fn scrollup() { let mut i = CURSOR_HEIGHT*SCREEN_WIDTH; while i < (SCREEN_WIDTH*SCREEN_HEIGHT) { *((START_ADDR + ((i-16*SCREEN_WIDTH)*4)) as *mut u32) = *((START_ADDR+(i*4)) as *u32); i += 1; } i = 4*(SCREEN_WIDTH*SCREEN_HEIGHT - CURSOR_HEIGHT*SCREEN_WIDTH); while i < 4*SCREEN_WIDTH*SCREEN_HEIGHT { *((START_ADDR + (i as u32)) as *mut u32) = BG_COLOR; i += 4; } CURSOR_X = 0x0u32; CURSOR_Y -= CURSOR_HEIGHT; } pub unsafe fn draw_char(c: char) { if CURSOR_X+(SCREEN_WIDTH*CURSOR_Y) >= SCREEN_WIDTH*SCREEN_HEIGHT { scrollup(); } let font_offset = (c as u8) - 0x20; let map = font::bitmaps[font_offset]; let mut i = -1; let mut j = 0; let mut addr = START_ADDR + 4*(CURSOR_X + /*CURSOR_WIDTH +*/ 1 + SCREEN_WIDTH*CURSOR_Y + CURSOR_HEIGHT*SCREEN_WIDTH); while j < CURSOR_HEIGHT { while i < CURSOR_WIDTH { //let addr = START_ADDR + 4*(CURSOR_X + CURSOR_WIDTH - i + SCREEN_WIDTH*(CURSOR_Y + j)); //let addr = START_ADDR + 4*(CURSOR_X + CURSOR_WIDTH + SCREEN_WIDTH*CURSOR_Y) - 4*i + 4*SCREEN_WIDTH*j if ((map[j] >> 4*i) & 1) == 1 { *(addr as *mut u32) = FG_COLOR; } else { *(addr as *mut u32) = BG_COLOR; } addr+= 4; i += 1; } addr -= 4*(SCREEN_WIDTH+i); i = 0; j += 1; } } pub unsafe fn backup() { let mut i = 0; let mut j = 0; while j < CURSOR_HEIGHT { while i < CURSOR_WIDTH { let addr = START_ADDR + 4*(CURSOR_X + i + SCREEN_WIDTH*(CURSOR_Y + j)); CURSOR_BUFFER[i + j*8] = *(addr as *mut u32); i += 1; } i = 0; j += 1; } SAVE_X = CURSOR_X; SAVE_Y = CURSOR_Y; } pub unsafe fn restore() { let mut i = 0; let mut j = 0; while j < CURSOR_HEIGHT { while i < CURSOR_WIDTH { let addr = START_ADDR + 4*(SAVE_X + i + SCREEN_WIDTH*(SAVE_Y + j)); *(addr as *mut u32) = CURSOR_BUFFER[i + j*8]; i += 1; } i = 0; j += 1; } } pub unsafe fn draw_cursor() { let mut i = 0; let mut j = 0; while j < CURSOR_HEIGHT { while i < CURSOR_WIDTH { let addr = START_ADDR + 4*(CURSOR_X + i + SCREEN_WIDTH*(CURSOR_Y + j)); *(addr as *mut u32) = CURSOR_COLOR; i += 1; } i = 0; j += 1; } } pub unsafe fn paint(color: u32) { let mut i = 0; while i < SCREEN_WIDTH*SCREEN_HEIGHT { *((START_ADDR as u32 + i*4) as *mut u32) = color; i+=1; } } pub unsafe fn fill_bg() { paint(BG_COLOR); } #[allow(dead_code)] pub unsafe fn read(addr: u32) -> u32 { *(addr as *mut u32) } pub unsafe fn ws(addr: u32, value: u32) { *(addr as *mut u32) = *(addr as *mut u32) | value; } #[allow(dead_code)] pub unsafe fn wh(addr: u32, value: u32) { *(addr as *mut u32) = value; } pub unsafe fn set_fg(color: u32) { FG_COLOR = color; } pub unsafe fn set_bg(color: u32) { BG_COLOR = color; } pub unsafe fn set_cursor_color(color: u32) { CURSOR_COLOR = color; }
# How to use this repo: 1. Use the search bar above to look for tests. 2. If we are missing a test please PR and be sure to add keywords to it. ### Controllers ``` describe('controllers', function(){ beforeEach(module('myApp.controllers')); it('should ....', inject(function() { //spec body })); it('should ....', inject(function() { //spec body })); }); ``` ### Directives ``` describe('directives', function() { beforeEach(module('myApp.directives')); describe('app-version', function() { it('should print current version', function() { module(function($provide) { $provide.value('version', 'TEST_VER'); }); inject(function($compile, $rootScope) { var element = $compile('<span app-version></span>')($rootScope); expect(element.text()).toEqual('TEST_VER'); }); }); }); }); ``` ### Filters ``` describe('filter', function() { beforeEach(module('myApp.filters')); describe('interpolate', function() { beforeEach(module(function($provide) { $provide.value('version', 'TEST_VER'); })); it('should replace VERSION', inject(function(interpolateFilter) { expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after'); })); }); }); ``` ### Services ``` describe('service', function() { beforeEach(module('myApp.services')); describe('version', function() { it('should return current version', inject(function(version) { expect(version).toEqual('0.1'); })); }); }); ``` http://stackoverflow.com/questions/20916228/angularjs-what-would-this-look-like-had-it-been-created-tdd-style ``` describe('Module, Service, and Controller', function() { beforeEach(module('system', function($provide) { api = { get: function(url, params) {}, put: function(url, params) {}, post: function(url, params) {} }; spyOn(api, 'get'); spyOn(api, 'put'); spyOn(api, 'post'); $provide.value('Api', api); })); beforeEach(module('system_centers')); beforeEach(inject(function(System) { system = System; })); it('should load the system', function() { system.loadSystem(1, 0); expect(api.get).toHaveBeenCalledWith('lmc/contact/system/1', {card_id : 0}); }); it('should be able to complete the system', function() { system.completeSystem(20); expect(api.put).toHaveBeenCalledWith('system/complete/20'); }); it('should create the system', function() { system.createSystem(1, 3); expect(api.post).toHaveBeenCalledWith('contact/system/1', { card_id: 3, type: 'systems', origin: 'lmc'}); }); it('should not create the system if contact_id is 0', function() { system.createSystem(0, 20); expect(api.post).not.toHaveBeenCalled(); }); it('should not create the system if card_id is 0', function() { system.createSystem(1, 0); expect(api.post).not.toHaveBeenCalled(); }); }); ``` http://stackoverflow.com/questions/15927919/using-ngmock-to-simulate-http-calls-in-service-unit-tests ``` angular.module('myApp.services', []) .factory("exampleService", function ($http) { return { getData: function () { return $http.get("/exampleUrl"); } } }); ``` ``` describe('service', function() { var $httpBackend; beforeEach(module('myApp.services')); beforeEach(inject(function ($injector) { $httpBackend = $injector.get("$httpBackend"); $httpBackend.when("GET", "/exampleUrl") .respond(200, {value:"goodValue"}); })); afterEach(function () { $httpBackend.flush() $httpBackend.verifyNoOutstandingExpectation(); $httpBackend.verifyNoOutstandingRequest(); }); describe('exampleService successful http request', function () { it('.value should be "goodValue"', inject(function (exampleService) { exampleService.getData().success(function(response) { expect(response.value).toEqual("goodValue"); }).error( function(response) { //should not error with $httpBackend interceptor 200 status expect(false).toEqual(true); }); })); }); }); ``` ## Service that uses $http http://stackoverflow.com/questions/12084410/angularjs-testing-service-method-that-uses-http-service ``` beforeEach(module('MyApp')); beforeEach(inject(function(MyService, _$httpBackend_) { service = MyService; $httpBackend = _$httpBackend_; })); it('should invoke service with right paramaeters', function() { $httpBackend.expectPOST('/foo/bar', { "user": "testUser", "action": "testAction", "object": {} }, function(headers){ return headers.Authorization === 'Basic YWxhZGRpbjpvcGVuIHNlc2FtZQ=='; }).respond({}); service.addStatement('testUser', 'testAction', {}); $httpBackend.flush(); }); ``` ## Module checking Controller and making $http request with a service dependent on a different module ``` describe("Module: accountability |", function() { describe("Controllers |", function() { var api, accountability, $httpBackend, scope, ctrl; beforeEach(angular.mock.module('gamify')); beforeEach(inject(function(Accountability, Api, _$httpBackend_, _$rootScope_, _$controller_) { api = Api; accountability = Accountability; $httpBackend = _$httpBackend_; scope = _$rootScope_.$new(); ctrl = _$controller_("AccountabilityCtrl", { $scope: scope }); })); it('should have a AccountabiltyCtrl', function() { // not really sure this actually does anything. expect(module.AccountabilityCtrl).not.to.equal(null); }); it('gamify object is hydrated', function() { expect(scope.gamify).to.exist; expect(scope.gamify).to.have.property('card_id'); expect(scope.gamify).to.have.property('date'); }); it ('should have a load progress function', function() { expect(scope.loadProgress).to.not.equal(undefined); }); it ('should have a go to rmc function', function() { expect(scope.goToAccountability).to.not.equal(undefined); }); it('should load progress', function() { var date = "2013-12-31 21:30:23"; var userId = 1; var cardId = 1; api.setBase('/api/v2/'); $httpBackend.expectGET('/api/v2/user/progress/1?date=' + date + '&card_id=' + cardId + '&').respond({ completed: 10, caught_up_completed: 3, caught_up: 10, upcoming: 100 }); scope.loadProgress(userId, date, cardId); $httpBackend.flush(); expect(scope.progress.completed).to.equal(10); expect(scope.progress.caught_up_completed).to.equal(3); expect(scope.progress.caught_up).to.equal(10); expect(scope.progress.upcoming).to.equal(100); expect(scope.progress.todaysProgress).to.equal(13); }); }); }); ``` ### Directives with events ``` describe('directives', function(){ var windowMock, scope, controller, element, form; var changeInputValue; beforeEach(function(){ module("myApp.directives"); }); beforeEach(function () { inject(function ($compile, $rootScope, $window){ scope = $rootScope; element = angular.element('<form name="editForm"><input type="text" name="email" data-ng-model="name" text-box-blur /></form>'); scope.name=""; form = $compile(element)(scope); scope.$digest(); windowMock=$window; spyOn(windowMock, "alert"); changeInputValue = function (elem, value) { elem.val(value); elem.triggerHandler('blur'); }; }); }); it('Should call alert on losing focus', function(){ changeInputValue(form.find('input'), "Ravi"); expect(windowMock.alert).toHaveBeenCalled(); }); }); ```
export var lusolveDocs = { name: 'lusolve', category: 'Algebra', syntax: ['x=lusolve(A, b)', 'x=lusolve(lu, b)'], description: 'Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.', examples: ['a = [-2, 3; 2, 1]', 'b = [11, 9]', 'x = lusolve(a, b)'], seealso: ['lup', 'slu', 'lsolve', 'usolve', 'matrix', 'sparse'] };
# stable-node-version [![Build Status](https://travis-ci.org/vadimdemedes/stable-node-version.svg?branch=master)](https://travis-ci.org/vadimdemedes/stable-node-version) Fetch stable Node.js version. ### Installation ``` $ npm install stable-node-version --save ``` ### Usage ```js const fetchStableVersion = require('stable-node-version'); fetchStableVersion().then(stableVersion => { stableVersion === '4.0.0'; // true }); ``` ### Tests [![Build Status](https://travis-ci.org/vadimdemedes/stable-node-version.svg?branch=master)](https://travis-ci.org/vadimdemedes/stable-node-version) ``` $ make test ``` ### License MIT © [vdemedes](https://github.com/vdemedes)
/** * Copyright (C) 2014 Kasper Kronborg Isager. */ package dk.itu.donkey; // SQL utilities import java.sql.SQLException; /** * The Schema class is used for executing Data Definition Language (DDL) * statements against a database thus handling schema definition. * * @see <a href="https://en.wikipedia.org/wiki/Data_definition_language"> * Wikipedia - Data definition language</a> * * @since 1.0.0 Initial release. */ public final class Schema { /** * The database to run the schema against. */ private Database db; /** * The SQL grammar to use for the schema. */ private Grammar grammar; /** * Initialize a new schema. * * @param db The database to run the schema against. */ public Schema(final Database db) { this.db = db; this.grammar = db.grammar(); } /** * Begin a table creation statement. * * @param table The name of the table to create. * @return The current {@link Schema} object, for chaining. */ public Schema create(final String table) { this.grammar.addTable(table); return this; } /** * Run the create statement. * * @throws SQLException In case of a SQL error. */ public void run() throws SQLException { this.db.execute(this.grammar.compileCreate()); } /** * Drop a database table. * * @param table The table to drop from the database. * * @throws SQLException In case of a SQL error. */ public void drop(final String table) throws SQLException { this.grammar.addTable(table); this.db.execute(this.grammar.compileDrop()); } /** * Add a text column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema text(final String column) { this.grammar.addDataType(column, "text", true); return this; } /** * Add an integer column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema integer(final String column) { this.grammar.addDataType(column, "integer", true); return this; } /** * Add a double column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema doublePrecision(final String column) { this.grammar.addDataType(column, "double precision", true); return this; } /** * Add a float column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema floatingPoint(final String column) { this.grammar.addDataType(column, "float", 24, true); return this; } /** * Add a long column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema longInteger(final String column) { this.grammar.addDataType(column, "bigint", true); return this; } /** * Add a real column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema real(final String column) { this.grammar.addDataType(column, "real", true); return this; } /** * Add a numeric column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema numeric(final String column) { this.grammar.addDataType(column, "numeric", true); return this; } /** * Add a boolean column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema bool(final String column) { this.grammar.addDataType(column, "boolean", true); return this; } /** * Add a date column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema date(final String column) { this.grammar.addDataType(column, "date", true); return this; } /** * Add a time column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema time(final String column) { this.grammar.addDataType(column, "time", true); return this; } /** * Add a timestamp column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema timestamp(final String column) { this.grammar.addDataType(column, "timestamp", true); return this; } /** * Add an auto incrementing integer column to the schema. * * @param column The name of the column. * @return The current {@link Schema} object, for chaining. */ public Schema increments(final String column) { this.grammar.addAutoIncrement(column); return this; } /** * Add a foreign key to the schema. * * @param column The name of the column. * @param foreignTable The name of the foreign table. * @param foreignColumn The name of the foreign column. * @return The current {@link Schema} object, for chaining. */ public Schema foreignKey( final String column, final String foreignTable, final String foreignColumn ) { this.grammar.addForeignKey(column, foreignTable, foreignColumn); return this; } }
class EducatorSectionAssignmentRow < Struct.new(:row, :school_ids_dictionary) # Represents a row in a CSV export from Somerville's Aspen X2 student information system. # This structure represents student section assignments. # # Expects the following headers: # # :local_id, :course_number, :school_local_id, :section_number, # :term_local_id # def self.build(row) new(row).build end def build if educator and section educator_section_assignment = EducatorSectionAssignment.find_or_initialize_by(educator: educator, section: section) return educator_section_assignment end end def educator return Educator.find_by_local_id(row[:local_id]) if row[:local_id] end def section return Section.find_by_section_number(row[:section_number]) if row[:section_number] end end
def output_gpx(points, output_filename): """ Output a GPX file with latitude and longitude from the points DataFrame. """ from xml.dom.minidom import getDOMImplementation def append_trkpt(pt, trkseg, doc): trkpt = doc.createElement('trkpt') trkpt.setAttribute('lat', '%.8f' % (pt['lat'])) trkpt.setAttribute('lon', '%.8f' % (pt['lon'])) trkseg.appendChild(trkpt) doc = getDOMImplementation().createDocument(None, 'gpx', None) trk = doc.createElement('trk') doc.documentElement.appendChild(trk) trkseg = doc.createElement('trkseg') trk.appendChild(trkseg) points.apply(append_trkpt, axis=1, trkseg=trkseg, doc=doc) with open(output_filename, 'w') as fh: doc.writexml(fh, indent=' ') def main(): points = get_data(sys.argv[1]) print('Unfiltered distance: %0.2f' % (distance(points),)) smoothed_points = smooth(points) print('Filtered distance: %0.2f' % (distance(smoothed_points),)) output_gpx(smoothed_points, 'out.gpx') if __name__ == '__main__': main()
<?php require_once(__DIR__ . "/../model/config.php"); $username = filter_input(INPUT_POST, "username", FILTER_SANITIZE_STRING); $password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING); $salt = "$5$" . "rounds=5000$" . uniqid(mt_rand(), true) . "$"; $hashedPassword = crypt($password, $salt); $query = $_SESSION["connection"]->query("INSERT INTO users SET " . "email = '$email', " . "username = '$username', " . "password = '$hashedPassword', " . "salt = '$salt', " . "exp = 0, " . "exp1 = 0, " . "exp2 = 0, " . "exp3 = 0, " . "exp4 = 0"); $_SESSION["name"] = $username; if ($query) { echo "true"; } else { echo "<p>" . $_SESSION["connection"]->error . "</p>"; }
/* * PaintableShape.cpp * * Created on: Mar 19, 2017 * Author: Brian Schnepp * License: See 'LICENSE' in root of this repository. */ #include <PathToolKit/graphic/gstructs.h> #include <PathToolKit/graphic/PaintableShape.h> #include <PathToolKit/gutil/Color.h> #include <cstdlib> namespace PathDraw { PaintableShape::PaintableShape() { this->fill = true; this->stroke = static_cast<PTK_Stroke*>(malloc(sizeof(PTK_Stroke))); this->stroke->colors = { new Color(0,0,0)}; this->stroke->joinstyle = PTK_Join_Style::JOIN_MITER; this->stroke->capstyle = PTK_Cap_Style::CAP_BUTT; } PaintableShape::~PaintableShape() { delete[] this->stroke->colors; free(this->stroke); } uint16_t PaintableShape::GetNumPoints() { //Circle/Arcs should always return 1 //Shape should do this as intended. return 0; } PTK_Point* PaintableShape::GetPoints() { //Circle/arc should return their single point as a pointer. return nullptr; } bool PaintableShape::GetFill() { return this->fill; } void PaintableShape::SetFill(bool fill) { this->fill = fill; } bool PaintableShape::IsArc() { return false; } bool PaintableShape::IsCircle() { return false; } bool PaintableShape::isRectangle() { return false; } bool PaintableShape::isIrregularArc() { return false; } bool PaintableShape::isIrregularCircle() { return false; } void PaintableShape::SetStroke(PTK_Stroke* stroke) { delete this->stroke; this->stroke = stroke; } PTK_Stroke PaintableShape::GetStroke() { return *(this->stroke); } void PaintableShape::SetSolidColor(Color* color) { free(this->stroke->colors); this->stroke->colors = color; } void PaintableShape::SetLinearGradientColor(Color* color1, Color* color2) { free(this->stroke->colors); Color colors[2] = new Color[2]; colors[0] = *color1; colors[1] = *color2; this->stroke->colors = colors; //Gradients can only be between two colors. } void PaintableShape::SetGradientRadial(bool val) { this->stroke->radial = val; } } /* namespace Pathfinder */
/* Copyright (c) 2017, Dogan Yazar 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. */ /** * Remove commonly used diacritic marks from a string as these * are not used in a consistent manner. Leave only ä, ö, å. */ var remove_diacritics = function(text) { text = text.replace('à', 'a'); text = text.replace('À', 'A'); text = text.replace('á', 'a'); text = text.replace('Á', 'A'); text = text.replace('è', 'e'); text = text.replace('È', 'E'); text = text.replace('é', 'e'); text = text.replace('É', 'E'); return text; }; // export the relevant stuff. exports.remove_diacritics = remove_diacritics;
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import urllib import time import datetime #From PatMap by Jason Young, available on GitHub at github.com/JasYoung314/PatMap #Function to get distance between 2 points from google maps. By default route is by car, distance is given in miles and time in minutes. def CalculateDistance(Origin = False,Destination = False, Method = "driving",TimeUnits = "Minutes",DistUnits = "Miles"): #this is the start of a distnace matrix url base = "https://maps.googleapis.com/maps/api/distancematrix/json?" #Converts the variables to the required format urlorigin = "origins=%s&".encode('utf-8') %(Origin) urldestination = "destinations=%s&".encode('utf-8') %(Destination) urlmethod = "mode=%s&" %(Method) if DistUnits == "Kilometers" or DistUnits == "Meters": urlunits = "units=metric&" else: urlunits = "units=imperial&" #constructs the completed url url = base.decode('utf-8') + urlorigin.decode('utf-8') + urldestination.decode('utf-8') + urlmethod.decode('utf-8') + urlunits.decode('utf-8') + "language=en-EN&sensor=false".decode('utf-8') #Interprets the json data recieved try: result= json.load(urllib.urlopen(url)) except: return 'ERROR','ERROR' #Reads the status code and takes the appropriate action if result["status"] == "OK": if result["rows"][0]["elements"][0]["status"] == "OK": time = result["rows"][0]["elements"][0]["duration"]["value"] distance = result["rows"][0]["elements"][0]["distance"]["value"] if TimeUnits == "Minutes": time = time/60.0 elif TimeUnits == "Hours": time = time/3600.0 if DistUnits == "Kilometres": distance = distance/1000.0 elif DistUnits == "Yards": distance = distance*1.0936133 elif DistUnits == "Miles": distance = distance*0.000621371192 return time,distance else: return result["rows"][0]["elements"][0]["status"],result["rows"][0]["elements"][0]["status"] else: return result["status"]
import { StyleSheet } from "react-native"; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: "flex-start", alignItems: "center", backgroundColor: "#669999" }, buttons: { // flex: 0.15, flexDirection: "row", alignItems: "center", marginVertical: 20 }, button: { marginHorizontal: 20, padding: 20, backgroundColor: "#0D4D4D", color: "white", textAlign: "center" }, selectedButton: { backgroundColor: "#006699" }, body: { // flex: 0.8, justifyContent: "flex-start", alignItems: "center" }, subTitle: { marginVertical: 10 }, viewport: { // flex: 1, alignSelf: "center", backgroundColor: "white" } }); export default styles;
# make_gdalrasterband_view ## Prototype ```cpp template<T> gdal_raster_view<T> make_gdalrasterdata_view(GDALRasterBand* band); template<T> gdal_raster_view<T> make_gdalrasterdata_view(std::shared_ptr<GDALRasterBand> band); ``` ## Description Creates a gdal_raster_view for the band. The user is responsible for the lifetime of the band, which must exceed that of the gdal_raster_view. The `make_gdalrasterband_view` functions are not generally recommended to access raster data. Generally, the [`open` function](./open.md) is preferred. However, you may need to used the `make_gdalrasterdata_view` function in the following cases: 1. You need to interact with code that uses GDALRasterBand* already 2. You need to open multiple bands from the same dataset with read_write access. In the latter case, you can use two otherwise undocumented functions that open a GDALDataset and GDALRasterBand as a smart pointer. The dataset will be closed when the (last copy of) the shared_ptr is deleted. ```cpp std::shared_ptr<GDALDataset> detail::open_dataset(filesystem::path path, access elem_access); std::shared_ptr<GDALRasterBand> detail::open_band(std::shared_ptr<GDALDataset> dataset, int band_index); ``` ## Definition <pronto/raster/io.h> [(open in Github)](https://github.com/ahhz/raster/blob/master/include/pronto/raster/io.h) ## Requirements on types The native value type of the GDALRasterBand must be castable to T. ## Preconditions band must point to a valid and GDALRasterBand ## Complexity Constant cost, independent of raster size ## Example of use ```cpp //example_make_gdalrasterdata_view.cpp #include <pronto/raster/io.h> #include <pronto/raster/plot_raster.h> namespace pr = pronto::raster; int main() { // prepare a file in a separate scope { auto raster = pr::create<int>("test.tif", 3, 4, GDT_Byte); auto i = 0; for (auto&& v : raster) { i = (i + 3) % 7; v = i; } } // open dataset separately from band std::shared_ptr<GDALDataset> dataset = pr::detail::open_dataset("test.tif", pr::read_only); std::shared_ptr<GDALRasterBand> band = pr::detail::open_band(dataset, 1); // Note that here the type must be specified auto view = pr::make_gdalrasterdata_view<int>(band); plot_raster(view); return 0; } ``` ## Notes ## See also [`open`](./open.md)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>OpenISA Dynamic Binary Translator: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="oi.png"/></td> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">OpenISA Dynamic Binary Translator &#160;<span id="projectnumber">0.0.1</span> </div> <div id="projectbrief">This project implements the Dynamic Binary Translator for the OpenISA Instruction Set. Besides, it implement the Region Formation Techniques such as NET, MRET2, NETPLUS, ...</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('structspp___1_1cvt_3_01const_01std_1_1pair_3_01const_01_k_00_01_v_01_4_01_4.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title">spp_::cvt&lt; const std::pair&lt; const K, V &gt; &gt; Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="structspp___1_1cvt_3_01const_01std_1_1pair_3_01const_01_k_00_01_v_01_4_01_4.html">spp_::cvt&lt; const std::pair&lt; const K, V &gt; &gt;</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>type</b> typedef (defined in <a class="el" href="structspp___1_1cvt_3_01const_01std_1_1pair_3_01const_01_k_00_01_v_01_4_01_4.html">spp_::cvt&lt; const std::pair&lt; const K, V &gt; &gt;</a>)</td><td class="entry"><a class="el" href="structspp___1_1cvt_3_01const_01std_1_1pair_3_01const_01_k_00_01_v_01_4_01_4.html">spp_::cvt&lt; const std::pair&lt; const K, V &gt; &gt;</a></td><td class="entry"></td></tr> </table></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li> </ul> </div> </body> </html>
/** * Appcelerator Titanium Mobile * Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ #import "TiProxy.h" @interface Com0x82SocialRequestProxy : TiProxy { } @end
LifeBalancer ============ iPhone App to plan your life as described in the book "The 7 Habits of Highly Effective People"
var express = require('express'); var router = express.Router(); /* GET home page. */ router.get('/', function (req, res, next) { res.render('index', { title: 'Express' }); }); //test canvas router.get('/canvas', function (req, res, next) { res.render('canvas'); }); module.exports = router;
package com.jexpect.exception_messages; import org.junit.Test; import com.jexpect.util.Command; import static com.jexpect.Expect.expect; import static com.jexpect.util.ExceptionHandler.getExceptionMessage; import static org.junit.Assert.assertEquals; public class ToBeBooleanTest { @Test public void When_Expected_False_Fails_Then_Exception_Should_Have_Message() throws Exception { assertEquals("Expected to be <false>, but found: <true>", getExceptionMessage(new Command() { @Override public void execute() { expect(true).toBeFalse(); } })); } @Test public void When_Expected_To_Be_True_Fails_Then_Exception_Should_Have_Message() throws Exception { assertEquals("Expected to be <true>, but found: <false>", getExceptionMessage(new Command() { @Override public void execute() { expect(false).toBeTrue(); } })); } @Test public void When_Expected_Actual_To_Be_Same_As_Expected_Fails_Then_Exception_Should_Have_Message() throws Exception { assertEquals("Expected to be <true>, but found: <false>", getExceptionMessage(new Command() { @Override public void execute() { expect(false).toBe(true); } })); assertEquals("Expected to be <false>, but found: <true>", getExceptionMessage(new Command() { @Override public void execute() { expect(true).toBe(false); } })); assertEquals("Expected to be <null>, but found: <true>", getExceptionMessage(new Command() { @Override public void execute() { expect(true).toBe(null); } })); } }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2015-2021 The Neutron Developers // // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcconsole.h" #include "ui_rpcconsole.h" #include "clientmodel.h" #include "bitcoinrpc.h" #include "guiutil.h" #include "main.h" #include "util.h" #ifdef USE_UPNP // used to retrieve miniupnpc version #include <miniupnpc/miniupnpc.h> #endif #ifdef ENABLE_WALLET #include <db_cxx.h> #endif #include <QDir> #include <QTime> #include <QTimer> #include <QThread> #include <QTextEdit> #include <QKeyEvent> #include <QUrl> #include <QScrollBar> #include <QStringList> #include <QDesktopServices> #include <QAbstractItemView> #include <openssl/crypto.h> #ifdef USE_UPNP static const string MINIUPNPC_VERSION_NUM = strprintf("MiniUPnPc %s", MINIUPNPC_VERSION); #else static const string MINIUPNPC_VERSION_NUM = strprintf("MiniUPnPc Disabled"); #endif // TODO: make it possible to filter out categories (esp debug messages when implemented) // TODO: receive errors and debug messages through ClientModel const int CONSOLE_SCROLLBACK = 50; const int CONSOLE_HISTORY = 50; const QSize ICON_SIZE(24, 24); // Repair parameters const QString SALVAGEWALLET("-salvagewallet"); const QString RESCAN("-rescan"); const QString ZAPTXES1("-zapwallettxes=1"); const QString ZAPTXES2("-zapwallettxes=2"); const QString UPGRADEWALLET("-upgradewallet"); const QString REINDEX("-reindex"); const struct { const char *url; const char *source; } ICON_MAPPING[] = { {"cmd-request", ":/icons/tx_input"}, {"cmd-reply", ":/icons/tx_output"}, {"cmd-error", ":/icons/tx_output"}, {"misc", ":/icons/tx_inout"}, {NULL, NULL} }; namespace { // don't add private key handling cmd's to the history const QStringList historyFilter = QStringList() << "importprivkey" << "importmulti" << "signmessagewithprivkey" << "signrawtransaction" << "walletpassphrase" << "walletpassphrasechange" << "encryptwallet"; } /* Object for executing console RPC commands in a separate thread. */ class RPCExecutor: public QObject { Q_OBJECT public slots: void start(); void request(const QString &command); signals: void reply(int category, const QString &command); }; #include "rpcconsole.moc" void RPCExecutor::start() { // Nothing to do } /** * Split shell command line into a list of arguments and optionally execute the command(s). * Aims to emulate \c bash and friends. * * - Command nesting is possible with parenthesis; for example: validateaddress(getnewaddress()) * - Arguments are delimited with whitespace or comma * - Extra whitespace at the beginning and end and between arguments will be ignored * - Text can be "double" or 'single' quoted * - The backslash \c \ is used as escape character * - Outside quotes, any character can be escaped * - Within double quotes, only escape \c " and backslashes before a \c " or another backslash * - Within single quotes, no escaping is possible and no special interpretation takes place * * @param[out] result stringified Result from the executed command(chain) * @param[in] strCommand Command line to split * @param[in] fExecute set true if you want the command to be executed * @param[out] pstrFilteredOut Command line, filtered to remove any sensitive data */ bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string &strCommand, const bool fExecute, std::string * const pstrFilteredOut) { std::vector< std::vector<std::string> > stack; stack.push_back(std::vector<std::string>()); enum CmdParseState { STATE_EATING_SPACES, STATE_EATING_SPACES_IN_ARG, STATE_EATING_SPACES_IN_BRACKETS, STATE_ARGUMENT, STATE_SINGLEQUOTED, STATE_DOUBLEQUOTED, STATE_ESCAPE_OUTER, STATE_ESCAPE_DOUBLEQUOTED, STATE_COMMAND_EXECUTED, STATE_COMMAND_EXECUTED_INNER } state = STATE_EATING_SPACES; std::string curarg; UniValue lastResult; unsigned nDepthInsideSensitive = 0; size_t filter_begin_pos = 0, chpos; std::vector<std::pair<size_t, size_t>> filter_ranges; auto add_to_current_stack = [&](const std::string& strArg) { if (stack.back().empty() && (!nDepthInsideSensitive) && historyFilter.contains(QString::fromStdString(strArg), Qt::CaseInsensitive)) { nDepthInsideSensitive = 1; filter_begin_pos = chpos; } // Make sure stack is not empty before adding something if (stack.empty()) { stack.push_back(std::vector<std::string>()); } stack.back().push_back(strArg); }; auto close_out_params = [&]() { if (nDepthInsideSensitive) { if (!--nDepthInsideSensitive) { assert(filter_begin_pos); filter_ranges.push_back(std::make_pair(filter_begin_pos, chpos)); filter_begin_pos = 0; } } stack.pop_back(); }; std::string strCommandTerminated = strCommand; if (strCommandTerminated.back() != '\n') strCommandTerminated += "\n"; for (chpos = 0; chpos < strCommandTerminated.size(); ++chpos) { char ch = strCommandTerminated[chpos]; switch(state) { case STATE_COMMAND_EXECUTED_INNER: case STATE_COMMAND_EXECUTED: { bool breakParsing = true; switch(ch) { case '[': curarg.clear(); state = STATE_COMMAND_EXECUTED_INNER; break; default: if (state == STATE_COMMAND_EXECUTED_INNER) { if (ch != ']') { // append char to the current argument (which is also used for the query command) curarg += ch; break; } if (curarg.size() && fExecute) { // if we have a value query, query arrays with index and objects with a string key UniValue subelement; if (lastResult.isArray()) { for(char argch: curarg) if (!std::isdigit(argch)) throw std::runtime_error("Invalid result query"); subelement = lastResult[atoi(curarg.c_str())]; } else if (lastResult.isObject()) subelement = find_value(lastResult, curarg); else throw std::runtime_error("Invalid result query"); //no array or object: abort lastResult = subelement; } state = STATE_COMMAND_EXECUTED; break; } // don't break parsing when the char is required for the next argument breakParsing = false; // pop the stack and return the result to the current command arguments close_out_params(); // don't stringify the json in case of a string to avoid doublequotes if (lastResult.isStr()) curarg = lastResult.get_str(); else curarg = lastResult.write(2); // if we have a non empty result, use it as stack argument otherwise as general result if (curarg.size()) { if (stack.size()) add_to_current_stack(curarg); else strResult = curarg; } curarg.clear(); // assume eating space state state = STATE_EATING_SPACES; } if (breakParsing) break; } case STATE_ARGUMENT: // In or after argument case STATE_EATING_SPACES_IN_ARG: case STATE_EATING_SPACES_IN_BRACKETS: case STATE_EATING_SPACES: // Handle runs of whitespace switch(ch) { case '"': state = STATE_DOUBLEQUOTED; break; case '\'': state = STATE_SINGLEQUOTED; break; case '\\': state = STATE_ESCAPE_OUTER; break; case '(': case ')': case '\n': if (state == STATE_EATING_SPACES_IN_ARG) throw std::runtime_error("Invalid Syntax"); if (state == STATE_ARGUMENT) { if (ch == '(' && stack.size() && stack.back().size() > 0) { if (nDepthInsideSensitive) { ++nDepthInsideSensitive; } stack.push_back(std::vector<std::string>()); } // don't allow commands after executed commands on baselevel if (!stack.size()) throw std::runtime_error("Invalid Syntax"); add_to_current_stack(curarg); curarg.clear(); state = STATE_EATING_SPACES_IN_BRACKETS; } if ((ch == ')' || ch == '\n') && stack.size() > 0) { if (fExecute) { // Convert argument list to JSON objects in method-dependent way, // and pass it along with the method name to the dispatcher. JSONRPCRequest req; req.params = RPCConvertValues(stack.back()[0], std::vector<std::string>(stack.back().begin() + 1, stack.back().end())); req.strMethod = stack.back()[0]; lastResult = tableRPC.execute(req); } state = STATE_COMMAND_EXECUTED; curarg.clear(); } break; case ' ': case ',': case '\t': if(state == STATE_EATING_SPACES_IN_ARG && curarg.empty() && ch == ',') throw std::runtime_error("Invalid Syntax"); else if(state == STATE_ARGUMENT) // Space ends argument { add_to_current_stack(curarg); curarg.clear(); } if ((state == STATE_EATING_SPACES_IN_BRACKETS || state == STATE_ARGUMENT) && ch == ',') { state = STATE_EATING_SPACES_IN_ARG; break; } state = STATE_EATING_SPACES; break; default: curarg += ch; state = STATE_ARGUMENT; } break; case STATE_SINGLEQUOTED: // Single-quoted string switch(ch) { case '\'': state = STATE_ARGUMENT; break; default: curarg += ch; } break; case STATE_DOUBLEQUOTED: // Double-quoted string switch(ch) { case '"': state = STATE_ARGUMENT; break; case '\\': state = STATE_ESCAPE_DOUBLEQUOTED; break; default: curarg += ch; } break; case STATE_ESCAPE_OUTER: // '\' outside quotes curarg += ch; state = STATE_ARGUMENT; break; case STATE_ESCAPE_DOUBLEQUOTED: // '\' in double-quoted text if(ch != '"' && ch != '\\') curarg += '\\'; // keep '\' for everything but the quote and '\' itself curarg += ch; state = STATE_DOUBLEQUOTED; break; } } if (pstrFilteredOut) { if (STATE_COMMAND_EXECUTED == state) { assert(!stack.empty()); close_out_params(); } *pstrFilteredOut = strCommand; for (auto i = filter_ranges.rbegin(); i != filter_ranges.rend(); ++i) { pstrFilteredOut->replace(i->first, i->second - i->first, "(…)"); } } switch(state) // final state { case STATE_COMMAND_EXECUTED: if (lastResult.isStr()) strResult = lastResult.get_str(); else strResult = lastResult.write(2); case STATE_ARGUMENT: case STATE_EATING_SPACES: return true; default: // ERROR to end in one of the other states return false; } } void RPCExecutor::request(const QString &command) { try { std::string result; std::string executableCommand = command.toStdString() + "\n"; if(!RPCConsole::RPCExecuteCommandLine(result, executableCommand)) { Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Parse error: unbalanced ' or \"")); return; } Q_EMIT reply(RPCConsole::CMD_REPLY, QString::fromStdString(result)); } catch (UniValue& objError) { try // Nice formatting for standard-format error { int code = find_value(objError, "code").get_int(); std::string message = find_value(objError, "message").get_str(); Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(message) + " (code " + QString::number(code) + ")"); } catch (const std::runtime_error&) // raised when converting to invalid type, i.e. missing code or message { // Show raw JSON object Q_EMIT reply(RPCConsole::CMD_ERROR, QString::fromStdString(objError.write())); } } catch (const std::exception& e) { Q_EMIT reply(RPCConsole::CMD_ERROR, QString("Error: ") + QString::fromStdString(e.what())); } } RPCConsole::RPCConsole(QWidget *parent) : QDialog(parent), ui(new Ui::RPCConsole), historyPtr(0) { ui->setupUi(this); #ifndef Q_OS_MAC ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export")); ui->showCLOptionsButton->setIcon(QIcon(":/icons/options")); #endif // Install event filter for up and down arrow ui->lineEdit->installEventFilter(this); ui->messagesWidget->installEventFilter(this); connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear())); // Wallet Repair Buttons(rpcconsole.ui) //connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(walletSalvage())); //connect(ui->discordButton, SIGNAL(clicked()), this, SLOT(walletSalvage())); //connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(walletRescan())); //connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(walletZaptxes1())); //connect(ui->btn_zapwallettxes2, SIGNAL(clicked()), this, SLOT(walletZaptxes2())); //connect(ui->btn_upgradewallet, SIGNAL(clicked()), this, SLOT(walletUpgrade())); //connect(ui->btn_reindex, SIGNAL(clicked()), this, SLOT(walletReindex())); // set library version labels #ifdef ENABLE_WALLET ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0)); ui->wallet_path->setText(QString::fromStdString(GetDataDir().string() + QDir::separator().toLatin1() + GetArg("-wallet", "wallet.dat"))); #else ui->label_berkeleyDBVersion->hide(); ui->berkeleyDBVersion->hide(); #endif // set OpenSSL version label ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION)); // set Boost version label ui->boostVersion->setText(BOOST_VERSION_NUM.c_str()); // set UPNP status ui->UPNPInfo->setText(tr("%1 | %2").arg(MINIUPNPC_VERSION_NUM.c_str()).arg(fUseUPnP ? "Enabled": "Disabled")); startExecutor(); clear(); } RPCConsole::~RPCConsole() { emit stopExecutor(); delete ui; } bool RPCConsole::eventFilter(QObject* obj, QEvent *event) { if(event->type() == QEvent::KeyPress) // Special key handling { QKeyEvent *keyevt = static_cast<QKeyEvent*>(event); int key = keyevt->key(); Qt::KeyboardModifiers mod = keyevt->modifiers(); switch(key) { case Qt::Key_Up: if(obj == ui->lineEdit) { browseHistory(-1); return true; } break; case Qt::Key_Down: if(obj == ui->lineEdit) { browseHistory(1); return true; } break; case Qt::Key_PageUp: /* pass paging keys to messages widget */ case Qt::Key_PageDown: if(obj == ui->lineEdit) { QApplication::postEvent(ui->messagesWidget, new QKeyEvent(*keyevt)); return true; } break; case Qt::Key_Return: case Qt::Key_Enter: // forward these events to lineEdit if(obj == autoCompleter->popup()) { autoCompleter->popup()->hide(); QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt)); return true; } break; default: // Typing in messages widget brings focus to line edit, and redirects key there // Exclude most combinations and keys that emit no text, except paste shortcuts if(obj == ui->messagesWidget && ( (!mod && !keyevt->text().isEmpty() && key != Qt::Key_Tab) || ((mod & Qt::ControlModifier) && key == Qt::Key_V) || ((mod & Qt::ShiftModifier) && key == Qt::Key_Insert))) { ui->lineEdit->setFocus(); QApplication::postEvent(ui->lineEdit, new QKeyEvent(*keyevt)); return true; } } } return QDialog::eventFilter(obj, event); } void RPCConsole::setClientModel(ClientModel *model) { this->clientModel = model; if(model) { // Keep up to date with client setNumConnections(model->getNumConnections()); connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int))); setNumBlocks(model->getNumBlocks()); connect(model, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int))); setMasternodeCount(model->getMasternodeCountString()); connect(model, SIGNAL(strMasternodesChanged(QString)), this, SLOT(setMasternodeCount(QString))); timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(refreshDebugInfo())); timer->start(60 * 1000); // 60 seconds connect(model, SIGNAL(mempoolSizeChanged(long)), this, SLOT(setMempoolSize(long))); // Provide initial values ui->clientVersion->setText(model->formatFullVersion()); ui->clientName->setText(model->clientName()); ui->buildDate->setText(model->formatBuildDate()); ui->startupTime->setText(model->formatClientStartupTime()); ui->isTestNet->setChecked(model->isTestNet()); //Setup autocomplete and attach it QStringList wordList; std::vector<std::string> commandList = tableRPC.listCommands(); for (size_t i = 0; i < commandList.size(); ++i) { wordList << commandList[i].c_str(); } autoCompleter = new QCompleter(wordList, this); ui->lineEdit->setCompleter(autoCompleter); autoCompleter->popup()->installEventFilter(this); } } static QString categoryClass(int category) { switch(category) { case RPCConsole::CMD_REQUEST: return "cmd-request"; break; case RPCConsole::CMD_REPLY: return "cmd-reply"; break; case RPCConsole::CMD_ERROR: return "cmd-error"; break; default: return "misc"; } } /** Restart wallet with "-salvagewallet" */ void RPCConsole::walletSalvage() { buildParameterlist(SALVAGEWALLET); } /** Restart wallet with "-rescan" */ void RPCConsole::walletRescan() { buildParameterlist(RESCAN); } /** Restart wallet with "-zapwallettxes=1" */ void RPCConsole::walletZaptxes1() { buildParameterlist(ZAPTXES1); } /** Restart wallet with "-zapwallettxes=2" */ void RPCConsole::walletZaptxes2() { buildParameterlist(ZAPTXES2); } /** Restart wallet with "-upgradewallet" */ void RPCConsole::walletUpgrade() { buildParameterlist(UPGRADEWALLET); } /** Restart wallet with "-reindex" */ void RPCConsole::walletReindex() { buildParameterlist(REINDEX); } /** Build command-line parameter list for restart */ void RPCConsole::buildParameterlist(QString arg) { // Get command-line arguments and remove the application name QStringList args = QApplication::arguments(); args.removeFirst(); // Remove existing repair-options args.removeAll(SALVAGEWALLET); args.removeAll(RESCAN); args.removeAll(ZAPTXES1); args.removeAll(ZAPTXES2); args.removeAll(UPGRADEWALLET); args.removeAll(REINDEX); // Append repair parameter to command line. args.append(arg); // Send command-line arguments to BitcoinGUI::handleRestart() emit handleRestart(args); } void RPCConsole::clear() { ui->messagesWidget->clear(); ui->lineEdit->clear(); ui->lineEdit->setFocus(); // Add smoothly scaled icon images. // (when using width/height on an img, Qt uses nearest instead of linear interpolation) for(int i=0; ICON_MAPPING[i].url; ++i) { ui->messagesWidget->document()->addResource( QTextDocument::ImageResource, QUrl(ICON_MAPPING[i].url), QImage(ICON_MAPPING[i].source).scaled(ICON_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } // Set default style sheet ui->messagesWidget->document()->setDefaultStyleSheet( "table { }" "td.time { color: #808080; padding-top: 3px; } " "td.message { font-family: Monospace; font-size: 12px; } " "td.cmd-request { color: #006060; } " "td.cmd-error { color: red; } " "b { color: #006060; } " ); message(CMD_REPLY, (tr("Welcome to the Neutron RPC console.") + "<br>" + tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" + tr("Type <b>help</b> for an overview of available commands.")), true); } void RPCConsole::message(int category, const QString &message, bool html) { QTime time = QTime::currentTime(); QString timeString = time.toString(); QString out; out += "<table><tr><td class=\"time\" width=\"65\">" + timeString + "</td>"; out += "<td class=\"icon\" width=\"32\"><img src=\"" + categoryClass(category) + "\"></td>"; out += "<td class=\"message " + categoryClass(category) + "\" valign=\"middle\">"; if(html) out += message; else out += GUIUtil::HtmlEscape(message, true); out += "</td></tr></table>"; ui->messagesWidget->append(out); } void RPCConsole::refreshDebugInfo() { // set UPNP status ui->UPNPInfo->setText(tr("%1 | %2").arg(MINIUPNPC_VERSION_NUM.c_str()).arg(fUseUPnP ? "Enabled": "Disabled")); updateLastBlockSeen(); } void RPCConsole::updateLastBlockSeen() { setNumBlocks(clientModel->getNumBlocks()); } void RPCConsole::updateNetworkState() { QString connections = QString::number(clientModel->getNumConnections()) + " ("; connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / "; connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")"; ui->numberOfConnections->setText(connections); } void RPCConsole::setNumConnections(int count) { if (!clientModel) return; updateNetworkState(); } void RPCConsole::setNumBlocks(int count) { ui->numberOfBlocks->setText(QString::number(count)); if(clientModel) { QDateTime lastBlockDate = clientModel->getLastBlockDate(); int secs = lastBlockDate.secsTo(QDateTime::currentDateTime()); QString howLongAgo = GUIUtil::formatNiceTimeOffset(secs); ui->lastBlockTime->setText(tr("%1 [%2 ago]").arg(lastBlockDate.toString(), howLongAgo)); } } void RPCConsole::setMasternodeCount(const QString &strMasternodes) { ui->masternodeCount->setText(strMasternodes); } void RPCConsole::setMempoolSize(long numberOfTxs) { ui->mempoolNumberTxs->setText(QString::number(numberOfTxs)); } void RPCConsole::on_lineEdit_returnPressed() { QString cmd = ui->lineEdit->text(); if(!cmd.isEmpty()) { std::string strFilteredCmd; try { std::string dummy; if (!RPCParseCommandLine(dummy, cmd.toStdString(), false, &strFilteredCmd)) { // Failed to parse command, so we cannot even filter it for the history throw std::runtime_error("Invalid command line"); } } catch (const std::exception& e) { QMessageBox::critical(this, "Error", QString("Error: ") + QString::fromStdString(e.what())); return; } ui->lineEdit->clear(); cmdBeforeBrowsing = QString(); message(CMD_REQUEST, cmd); Q_EMIT cmdRequest(cmd); cmd = QString::fromStdString(strFilteredCmd); // Remove command, if already in history history.removeOne(cmd); // Append command to history history.append(cmd); // Enforce maximum history size while(history.size() > CONSOLE_HISTORY) history.removeFirst(); // Set pointer to end of history historyPtr = history.size(); // Scroll console view to end scrollToEnd(); } } void RPCConsole::browseHistory(int offset) { historyPtr += offset; if(historyPtr < 0) historyPtr = 0; if(historyPtr > history.size()) historyPtr = history.size(); QString cmd; if(historyPtr < history.size()) cmd = history.at(historyPtr); ui->lineEdit->setText(cmd); } void RPCConsole::startExecutor() { QThread* thread = new QThread; RPCExecutor *executor = new RPCExecutor(); executor->moveToThread(thread); // Notify executor when thread started (in executor thread) connect(thread, SIGNAL(started()), executor, SLOT(start())); // Replies from executor object must go to this object connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString))); // Requests from this object must go to executor connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); // On stopExecutor signal // - queue executor for deletion (in execution thread) // - quit the Qt event loop in the execution thread connect(this, SIGNAL(stopExecutor()), executor, SLOT(deleteLater())); connect(this, SIGNAL(stopExecutor()), thread, SLOT(quit())); // Queue the thread for deletion (in this thread) when it is finished connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); // Default implementation of QThread::run() simply spins up an event loop in the thread, // which is what we want. thread->start(); } void RPCConsole::on_tabWidget_currentChanged(int index) { if(ui->tabWidget->widget(index) == ui->tab_console) { ui->lineEdit->setFocus(); } } void RPCConsole::on_discordButton_clicked() { GUIUtil::discordButtonLink(); } void RPCConsole::on_explorerButton_clicked() { GUIUtil::explorerButtonLink(); } void RPCConsole::on_supportButton_clicked() { GUIUtil::supportButtonLink(); } void RPCConsole::on_bootstrapButton_clicked() { GUIUtil::bootstrapButtonLink(); } void RPCConsole::on_repoButton_clicked() { GUIUtil::repoButtonLink(); } void RPCConsole::on_cmcButton_clicked() { GUIUtil::cmcButtonLink(); } void RPCConsole::on_openDebugLogfileButton_clicked() { GUIUtil::openDebugLogfile(); } void RPCConsole::scrollToEnd() { QScrollBar *scrollbar = ui->messagesWidget->verticalScrollBar(); scrollbar->setValue(scrollbar->maximum()); } void RPCConsole::on_showCLOptionsButton_clicked() { GUIUtil::HelpMessageBox help; help.exec(); } void RPCConsole::setTabFocus(enum TabTypes tabType) { ui->tabWidget->setCurrentIndex(tabType); }
'use strict'; module.exports = { "definitions": { "validation-error": { "type": "object", "description": "Validation error", "properties": { "param": { "type": "string", "description": "The parameter in error" }, "msg": { "type": "string", "enum": ["invalid","required"], "description": "The error code" } } }, "validation-errors": { "type": "array", "description": "Validation errors", "items": { "$ref": "#/definitions/validation-error" } }, "system-error": { "type": "object", "description": "System error", "properties": { "error": { "type": "string", "description": "The error message" } } } } };
# Muriel van Caster Portfolio
from datetime import date NTESTS = 1 PREV_DAYS = 10 PERCENT_UP = 0.01 PERCENT_DOWN = 0.01 PERIOD = 'Hourly' # [5-min, 15-min, 30-min, Hourly, 2-hour, 6-hour, 12-hour, Daily, Weekly] MARKET = 'bitstampUSD' # DATE START YEAR_START = 2011 MONTH_START = 9 DAY_START = 13 DATE_START = date(YEAR_START, MONTH_START, DAY_START) # DATE END DATE_END = date.today() URL_DATA_BASE = 'http://bitcoincharts.com/charts/chart.json?'
class Lancamento < ActiveRecord::Base belongs_to :user belongs_to :categoria belongs_to :tipo_lancamento belongs_to :rotina belongs_to :sub_categoria validates_presence_of :valor, :user_id, :tipo_lancamento_id, :categoria_id, :descricao, :data_pagamento scope :mes_atual, -> (data,user_id) { where(["(data_pagamento::date between ? and ?) and user_id = ?", data.beginning_of_month, data.end_of_month, user_id]) } scope :receita, -> { where("tipo_lancamento_id = 1") } scope :despesa, -> { where("tipo_lancamento_id = 2") } #default_scope { order(:id => :desc) } end
package nl.dekkr.hoppr.rest import nl.dekkr.hoppr.model.{Feed, Syndication, FetchLogger} import nl.dekkr.hoppr.rss.{FeedLogOutput, AtomOutput} import spray.http.MediaTypes._ import spray.http.StatusCodes import spray.httpx.marshalling._ import StatusCodes._ import spray.routing.HttpService case class Url(uri: String) /** * REST Service definition */ // this trait defines our service behavior independently from the service actor trait RestService extends HttpService { import nl.dekkr.hoppr.rest.MyJsonProtocol._ import spray.httpx.SprayJsonSupport._ //TODO Actor per request ? lazy val index = <html> <body> <h1>This is <i>hoppR</i> !</h1> <p>Defined resources:</p> <ul> <li> <a href="/api/log">/log</a> </li> <li>Add feed: <form action="/api/feed" method="post"> <input type="text" name="url"></input> <input type="submit" name="Add feed"/> </form> </li> </ul> </body> </html> val myRoute = { get { pathSingleSlash { complete(index) } } ~ pathPrefix("api") { get { path("log") { respondWithMediaType(`application/json`) { complete { marshal(FetchLogger.getLast100) } } } } ~ path("feed") { post { entity(as[Url]) { url => respondWithMediaType(`application/json`) { Syndication.addNewFeed(url.uri) match { case feed: Feed => respondWithStatus(Created) { complete(feed) } case _ => respondWithStatus(BadRequest) { complete("Could not add feed") } } } } } ~ delete { entity(as[Url]) { url => respondWithMediaType(`application/json`) { Syndication.removeFeed(url.uri) match { case 1 => complete(OK) case 0 => complete(NotFound) case _ => respondWithStatus(BadRequest) { complete("Could not remove feed") } } } } } ~ get { entity(as[Url]) { url => respondWithMediaType(`application/json`) { Syndication.getFeed(url.uri) match { case Some(feed) => respondWithStatus(OK) { complete(feed) } case None => complete(NotFound) } } } } } ~ path("rss" / IntNumber) { feedId => get { respondWithMediaType(`application/xml`) { if (feedId == 0) { complete(FeedLogOutput.getAtomFeed(0).get) } else { AtomOutput.getAtomFeed(feedId) match { case Some(output) => complete(output) case None => complete(NotFound) } } } } } } } }
version https://git-lfs.github.com/spec/v1 oid sha256:2e65db5b56d276f8bcf293bede932b782ec29e72a25125d3412f81315301ecc4 size 14066
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20150104185303) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "recipes", force: :cascade do |t| t.string "title" t.string "source" t.datetime "created_at", null: false t.datetime "updated_at", null: false end end
import { subtract } from '../subtract'; describe('Core.subtract', () => { test('Subtracts the second argument from the first', () => { expect(subtract(10, 8)).toBe(2); }); });
/* Copyright (C) YOOtheme GmbH, YOOtheme Proprietary Use License (http://www.yootheme.com/license) */ /* * RTL Style Sheet */ .wk-slideshow-default .nav li { margin-left: 0; margin-right: 5px; } .wk-slideshow-default .nav li:first-child { margin-right: 0; } .wk-slideshow-default > div:hover .next { right: auto; left: 30px; background-position: 0 -50px; } .wk-slideshow-default > div:hover .prev { left: auto; right: 30px; background-position: 0 0; }
'use strict'; describe('AutoFormatter', function() { var event = require('../polyfill/event'); var AutoFormatter = require('../src/auto-formatter'); var autoFormatter; var inputNode; var config = { limitToMaxLength: true, recurringPattern: false }; before(function() { inputNode = document.createElement('input'); document.body.appendChild(inputNode); config.targetNode = inputNode; autoFormatter = new AutoFormatter(config); }); it('should return an function', function() { assert.isFunction(AutoFormatter); }); describe('invoked with new operator', function() { it('should return an object with enableFormatting & disableFormatting method', function() { assert.isObject(autoFormatter); assert.isFunction(autoFormatter.enableFormatting); assert.isFunction(autoFormatter.disableFormatting); }); }); describe('new AutoFormatter()', function() { describe('.enableFormatting', function() { before(function() { autoFormatter = new AutoFormatter(config); inputNode.value = '1234567890'; inputNode.setAttribute('data-format', '(XXX) XXX-XXXX'); autoFormatter.enableFormatting(); }); it('should format 1234567890 in (XXX) XXX-XXXX format', function() { assert.equal(inputNode.value, '(123) 456-7890'); }); it('should format if the keyCode is between 48 & 90 and 96 && 105', function() { inputNode.value = '1234567890'; event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '(123) 456-7890'); inputNode.value = '1234567890'; event.triggerKeyupEvent(inputNode, 96); assert.equal(inputNode.value, '(123) 456-7890'); }); it('should not format if the keyCode is not between 48 & 90 and 96 && 105', function() { inputNode.value = '1234567890'; event.triggerKeyupEvent(inputNode, 8); assert.equal(inputNode.value, '1234567890'); }); it('should format if the last chracter typed is a separator and also a modifier key', function() { inputNode.value = '(123) 456-7890'; inputNode.selectionStart = 10; inputNode.selectionEnd = 10; event.triggerKeyupEvent(inputNode, 8); assert.equal(inputNode.value, '(123) 456-7890'); }); it('should not format if the last chracter typed is a separator and not a modifier key', function() { inputNode.value = '(123) 456-7890'; inputNode.selectionStart = 10; inputNode.selectionEnd = 10; event.triggerKeyupEvent(inputNode, 47); assert.equal(inputNode.value, '(123) 456-7890'); }); it('should format 1234567890 in XXXXX-XXXXX format', function() { inputNode.value = '1234567890'; inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); autoFormatter.enableFormatting(); assert.equal(inputNode.value, '12345-67890'); }); it('should not add format listenter if data-format attribute is not present', function() { inputNode.value = '1234567890'; inputNode.removeAttribute('data-format'); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '1234567890'); }); it('should not format if the value is empty even if data-format attribute is present', function() { inputNode.value = ''; inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); autoFormatter.enableFormatting(); assert.equal(inputNode.value, ''); }); it('should not format if the value length is shorter than separatorIndex', function() { inputNode.value = '1234'; inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); autoFormatter.enableFormatting(); assert.equal(inputNode.value, '1234'); }); it('should increment the caretIndex if the current caretIndex is equal to the index of next sperator', function() { inputNode.value = '12345'; inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); autoFormatter.enableFormatting(); assert.equal(inputNode.value, '12345-'); }); it('should set the caretIndex properly', function() { inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); autoFormatter.enableFormatting(); inputNode.value = '1234567890'; inputNode.selectionStart = 6; inputNode.selectionEnd = 6; event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '12345-67890'); assert.equal(inputNode.selectionStart, 7); inputNode.setAttribute('data-format', '(XXX) XXX-XXXX'); autoFormatter.enableFormatting(); inputNode.value = '(123'; inputNode.selectionStart = 4; inputNode.selectionEnd = 4; event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.selectionStart, 6); }); it('should add maxlength attribute to the input node if limitToMaxLength is passed as true', function() { autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); inputNode.value = '12345678901234567890'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); assert.equal(inputNode.getAttribute('maxlength'), '11'); }); it('should limit the maximum character to the format length', function() { autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', '(XXX) XXX-XXXX'); inputNode.value = '12345678901234567890'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '(123) 456-7890'); }); it('should format recurringly w.r.t the last seperator if desired', function() { autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', '(XXX) XXX-XXXX'); inputNode.value = '12345678901234567890'; config.limitToMaxLength = false; config.recurringPattern = true; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '(123) 456-7890-1234-5678-90'); autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', 'XXXXX-XXXXX'); inputNode.value = '1234567890123456789'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '12345-67890-12345-6789'); autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', 'X-XX'); inputNode.value = '12345678'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '1-23-45-67-8'); }); it('should format in rtl manner, recurringly if desired', function() { autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', 'XXX,XXX.XX'); inputNode.value = '1234567890'; config.direction = 'rtl'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '12,345,678.90'); autoFormatter.disableFormatting(); inputNode.setAttribute('data-format', 'XXX,XXX.XX'); inputNode.value = '12345'; autoFormatter = new AutoFormatter(config); autoFormatter.enableFormatting(); event.triggerKeyupEvent(inputNode, 48); assert.equal(inputNode.value, '123.45'); }); }); }); describe('.format', function() { it('should return the value as is if no format has been provided', function() { config.value = '1234567890'; config.format = ''; assert.equal(AutoFormatter.format(config), '1234567890'); }); it('should return the value as is if no value has been provided', function() { config.value = ''; config.format = '(XXX) XXX-XXXX'; assert.equal(AutoFormatter.format(config), ''); }); it('should return the value as is if its length is less than the first separatorIndex', function() { config.value = '1234'; config.format = 'XXXXX-XXXXX'; assert.equal(AutoFormatter.format(config), '1234'); }); it('should format the value with respect to passed format', function() { config.value = '1234567890'; config.format = '(XXX) XXX-XXXX'; config.recurringPattern = false; assert.equal(AutoFormatter.format(config), '(123) 456-7890'); }); it('should format and limit the maximum character to the format length', function() { config.value = '12345678901234567890'; config.format = '(XXX) XXX-XXXX'; config.limitToMaxLength = true; config.direction = false; assert.equal(AutoFormatter.format(config), '(123) 456-7890'); }); it('should format recurringly w.r.t the last seperator if desired', function() { config.value = '12345678901234567890'; config.format = '(XXX) XXX-XXXX'; config.limitToMaxLength = false; config.recurringPattern = true; assert.equal(AutoFormatter.format(config), '(123) 456-7890-1234-5678-90'); config.format = 'XXXXX-XXXXX'; assert.equal(AutoFormatter.format(config), '12345-67890-12345-67890'); config.value = '123456789012345678'; assert.equal(AutoFormatter.format(config), '12345-67890-12345-678'); config.value = '123456789'; config.format = 'X-XX'; assert.equal(AutoFormatter.format(config), '1-23-45-67-89'); }); it('should not format recurringly and limit the maximum character to the format length if desired', function() { config.value = '12345678901234567890'; config.format = '(XXX) XXX-XXXX'; config.limitToMaxLength = true; config.recurringPattern = true; assert.equal(AutoFormatter.format(config), '(123) 456-7890'); config.format = 'XXXXX-XXXXX'; assert.equal(AutoFormatter.format(config), '12345-67890'); config.value = '123456789'; config.format = 'X-XX'; assert.equal(AutoFormatter.format(config), '1-23'); }); it('should format in rtl manner, recurringly if desired', function() { config.limitToMaxLength = false; config.recurringPattern = true; config.direction = 'rtl'; config.value = '1234567890'; config.format = 'XXX,XXX.XX'; assert.equal(AutoFormatter.format(config), '12,345,678.90'); config.value = '12345'; config.format = 'XXX,XXX.XX'; assert.equal(AutoFormatter.format(config), '123.45'); }); }); });
/*jslint node: true */ 'use strict'; var _ = require('underscore.string'), inquirer = require('inquirer'), path = require('path'), chalk = require('chalk-log'); module.exports = function() { return function (done) { var prompts = [{ name: 'taglibName', message: 'What is the name of your taglib or taglibs (, separated) ?', }, { name: 'appName', message: 'For which app (empty: global) ?' }, { type: 'confirm', name: 'moveon', message: 'Continue?' }]; //Ask inquirer.prompt(prompts, function (answers) { if (!answers.moveon) { return done(); } if (_.isBlank(answers.taglibName)) { chalk.error('Taglib name can NOT be empty'); done(); } answers.taglibName = _.clean(answers.taglibName); var appPath = path.join('./apps', answers.appName); var targetDir = _.isBlank(answers.appName) ? './apps/_global' : appPath; var createTagLib = require('./create-taglib'); if (answers.taglibName.match(/,/)) { var taglibs = answers.taglibName.split(',').map(function(taglib) { return _.clean(taglib); }); for (let taglib of taglibs) { answers = {taglibName: taglib, appName: answers.appName}; createTagLib(answers, targetDir); } } else { createTagLib(answers, targetDir); } } ); }; };
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Member extends Model { protected $fillable = ['first_name', 'last_name', 'district_id']; public function groups() { return $this->belongsToMany('App\Group'); } public function votes() { return $this->hasMany('App\Vote'); } public function district() { return $this->belongsTo('App\District'); } /** * Get a list of group ids that this member is in * * @return array */ public function getGroupListAttribute() { return $this->groups->lists('id'); } /** * Function that returns the default answer of this member, * for a specified voting and voting item, based on the * first group that they are in * * @param $votingId The id of the voting * @param $votingItemId The id of the votingItem * @return int The id of the answer */ public function groupAnswer($votingId, $votingItemId) { // Check if member is in ANY group if ($this->groups()->count() > 0) { $firstGroup = $this->groups()->firstOrFail(); // Get the first group // Get the group vote of the above group in the specified voting and get the answer id $answerId = GroupVote::where([ 'voting_id' => $votingId, 'voting_item_id' => $votingItemId, 'group_id' => $firstGroup->id ])->first()->answer->id; // If there was an answer for this group, voting and voting item, return it (otherwise will be null) return $answerId; } return null; // If the member isn't in any groups, return null so the first answer is selected } /** * Returns the id of the answer that this member voted for in a specified voting and for a specific voting item, * or null if the member hasn't voted on that voting at all yet. * * @param $votingId The id of the voting * @param $votingItemId The id of the votingItem * @return int VoteTypeAnswer id! */ public function vote($votingId, $votingItemId) { $vote = $this->votes()->where([ 'voting_id' => $votingId, 'voting_item_id' => $votingItemId ])->first(); if ($vote != null) { if ($vote->answer != null) { return $vote->answer->id; } else { return ''; // Return empty string to show that the member was saved as absent } } return null; } }
<?php namespace App\AdminBundle\Controller; use Sonata\AdminBundle\Controller\CoreController as BaseCoreController; use Symfony\Component\HttpFoundation\StreamedResponse; class CoreController extends BaseCoreController { protected function createStreamedFileResponse($file, $filename) { // $response->headers->makeDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'wave-speed-report.xls'); return new StreamedResponse(function () use ($file) { readfile($file); }, 200, array( 'Content-length', filesize($file), 'Content-Type' => mime_content_type($file), 'Content-Disposition' => 'attachment; filename='.$filename )); } public function addFlash($type, $message) { $this->get('session') ->getFlashBag() ->add($type, $message); } }
'use strict'; var _ = require('lodash'); var Q = require('q'); var util = require('util'); var should = require('./utils/should'); var descriptors = require('./utils/descriptors'); var Attribute = require('./attribute'); var AssertionResult = require('./assertion-result'); var PropertyAssertion = require('./assertions/property-assertion'); var StateAssertion = require('./assertions/state-assertion'); var tinto = {}; tinto.Entity = function Entity() { this._properties = {}; this._states = {}; /** * @name tinto.Entity#should * @type {tinto.Assertion} */ /** * @name tinto.Entity#should * @function * @param {...tinto.Assertion} assertions */ Object.defineProperty(this, 'should', { get: should }); }; /** * @param {string} state * @returns {function() : Promise.<tinto.AssertionResult>} */ tinto.Entity.prototype.is = function(state) { var self = this; if (!this._states[state]) { throw new Error(util.format('Unsupported state "%s"', state)); } return function() { return self._states[state].call(self).then(function(result) { return new AssertionResult(result); }); }; }; /** * @param {string} property * @param {*} expected * @returns {function() : Promise.<tinto.AssertionResult>} */ tinto.Entity.prototype.has = function(property, expected) { if (typeof property === 'number') { return hasCount.call(this, expected, property); } else { return hasValue.call(this, property, expected); } }; /** * @param {string} name * @param {function} [matcher] * @param {Array.<*>} [args] */ tinto.Entity.prototype.state = function(name, matcher, args) { this._states[name] = wrap(matcher, args); StateAssertion.register(name); }; /** * @param {Object.<string, function>} mappings */ tinto.Entity.prototype.states = function() { processMappings.call(this, 'state', arguments); }; /** * @param {string} name * @param {function} [matcher] * @param {Array.<*>} [args] */ tinto.Entity.prototype.property = function(name, matcher, args) { this._properties[name] = wrap(matcher, args); PropertyAssertion.register(name); this.getter(name, function() { return new Attribute(this, name, matcher.call(this)); }); }; /** * @param {Object.<string, function>} mappings */ tinto.Entity.prototype.properties = function() { processMappings.call(this, 'property', arguments); }; /** * @param {string} prop * @param {function()} func */ tinto.Entity.prototype.getter = function(prop, func) { Object.defineProperty(this, prop, { get: func, enumerable: true, configurable: true }); }; /** * @param {Object} props */ tinto.Entity.prototype.getters = function(props) { _.forIn(descriptors(props), function(descriptor, prop) { if (descriptor.enumerable) { if (descriptor.get) { this.getter(prop, descriptor.get); } else if (descriptor.value && typeof descriptor.value === 'function') { this.getter(prop, descriptor.value); } } }, this); }; /** * @private * @param {function()} matcher * @param {Array.<*>} args * @returns {Function} */ function wrap(matcher, args) { return function() { return Q.when(args ? matcher.apply(this, args) : matcher.call(this)); }; } /** * @private * @param {string} property * @param {*} value * @returns {function() : Promise.<tinto.AssertionResult>} */ function hasValue(property, value) { var self = this; if (!this._properties[property]) { throw new Error(util.format('Unsupported property "%s"', property)); } return function() { return self._properties[property].call(self).then(function(actual) { return new AssertionResult(_.isEqual(value, actual), value, actual); }); }; } /** * @private * @param {string} property * @param {Number} count * @returns {function() : Promise.<tinto.AssertionResult>} */ function hasCount(property, count) { var collection = this[property]; if (collection.count === undefined || typeof collection.count !== 'function') { throw new Error('Count assertions can only be applied to collections'); } return function() { return Q.resolve(collection.count()).then(function(length) { return new AssertionResult(count === length, count, length); }); }; } /** * @private * @param {string} type * @param {Array.<string|Object>} mappings */ function processMappings(type, mappings) { var self = this; mappings = Array.prototype.slice.call(mappings, 0); mappings.forEach(function(mapping) { if (typeof mapping === 'string') { self[type](mapping); } else { _.forEach(mapping, function(matcher, name) { self[type](name, matcher); }, self); } }); } module.exports = tinto.Entity;
require 'rails/generators' module Conductor class MailersController < ApplicationController def new end def create @form = MailerGeneratorForm.new(params[:mailer]) if @form.valid? Rails.logger.info @form.command_line @form.run flash[:success] = "The mailer was created!" else flash[:error] = "Cannot create the mailer! Please verify the information" end redirect_to(new_mailer_url) end end end
#import <UIKit/UIKit.h> @class ViewController; @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) ViewController *viewController; @end
require 'rails_helper' describe Standup do describe 'permitted params' do it 'allows the scalars through as well as supporting complex attributes such as the image_days array' do unpermitted = ActionController::Parameters.new( title: 'Foo', to_address: 'Bar', subject_prefix: 'Baz', closing_message: 'Quux', time_zone_name: 'Corge', start_time_string: 'Fred', image_urls: 'Garply', image_days: ['', 'Mon', 'Thu'], not_allowed: 'Biteme' ) permitted = unpermitted.permit(Standup::ACCESSIBLE_ATTRS) expect(permitted.keys.map(&:to_sym) - [:image_days]).to match_array(Standup::ACCESSIBLE_SCALARS) expect(permitted[:image_days]).to eq(['', 'Mon', 'Thu']) end end describe 'associations' do it { is_expected.to have_many(:items).dependent(:destroy) } it { is_expected.to have_many(:posts).dependent(:destroy) } end describe 'validations' do it { is_expected.to validate_presence_of(:title) } it { is_expected.to validate_presence_of(:to_address) } it "should validate the format of the standup time" do standup = FactoryBot.build(:standup) expect(standup).to be_valid standup.start_time_string = "9:00 am" expect(standup).to be_valid standup.start_time_string = "09:10 AM" expect(standup).to be_valid standup.start_time_string = "10:00" expect(standup).to_not be_valid standup.start_time_string = "23:00" expect(standup).to_not be_valid end end it 'has a closing message' do standup = FactoryBot.create(:standup, closing_message: 'Yay') expect(standup.closing_message).to eq 'Yay' end describe "dates" do before do @utc_today = Time.new(2012, 1, 1).utc.to_date @utc_yesterday = @utc_today - 1.day @standup = FactoryBot.create(:standup, closing_message: 'Yay') @standup.time_zone_name = "Pacific Time (US & Canada)" Timecop.freeze(@utc_today) end after do Timecop.return end describe "#date_today" do it "returns the date based on the time zone" do expect(@standup.date_today).to eq @utc_yesterday end end describe "#date_tomorrow" do it "returns the date based on the time zone" do expect(@standup.date_tomorrow).to eq @utc_today end end describe "#time_zone_name_iana" do it "returns IANA format of the time zone" do expect(@standup.time_zone_name_iana).to eq "America/Los_Angeles" end end describe "#next_standup_date" do context "when the standup is today" do it "returns date and time as an integer" do standup_beginning_of_day = @standup.time_zone.now.beginning_of_day @standup.start_time_string = "5:00pm" expect(@standup.next_standup_date).to eq standup_beginning_of_day + 17.hours end end context "when the standup is tomorrow" do it "returns date and time as an integer" do standup_beginning_of_day = @standup.time_zone.now.beginning_of_day @standup.start_time_string = "8:00am" expect(@standup.next_standup_date).to eq standup_beginning_of_day + 1.day + 8.hour end end end end it "allows mass assignment" do expect { Standup.new( title: "Berlin", to_address: "berlin+standup@pivotallabs.com", subject_prefix: "[FOO]", closing_message: "Go Running.", time_zone_name: "Mountain Time (US & Canada)", start_time_string: "9:00am", image_urls: 'http://example.com/bar.png', image_days: '["M"]', ) }.to_not raise_exception end it 'serializes the image_days array for storage in the db' do standup = create(:standup, image_days: ['mon', 'tue']) expect(standup.image_days).to eq ['mon', 'tue'] end describe "#last_email_time" do context "when there are no posts" do let (:standup_with_no_posts) { create(:standup) } it "is nil" do expect(standup_with_no_posts.last_email_time).to be_nil end end context "when there are posts" do let (:last_email_time) { Time.local(2016, 1, 1, 19, 42) } let (:last_emailed_post) { create(:post, sent_at: last_email_time) } let (:standup_with_posts) { create(:standup, posts: [ create(:post, sent_at: last_email_time - 1), last_emailed_post, create(:post, sent_at: last_email_time - 1), create(:post, sent_at: nil) ])} it "is the time the most recently emailed post was emailed" do expect(standup_with_posts.last_email_time).to eq(last_email_time) end end end end
// // RootViewController.cs // // Author: // Alan McGovern <alan@xamarin.com> // // Copyright 2011, Xamarin Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; using CoreGraphics; using System.Linq; using UIKit; using Foundation; using System.Collections.ObjectModel; using System.Threading.Tasks; using System.Net; using System.Threading; namespace LazyTableImages { public partial class RootViewController : UITableViewController { public ObservableCollection<App> Apps { get; private set; } public RootViewController (string nibName, NSBundle bundle) : base (nibName, bundle) { Apps = new ObservableCollection<App> (); Title = NSBundle.MainBundle.LocalizedString ("Top 50 Apps", "Master"); } public override void ViewDidLoad () { base.ViewDidLoad (); TableView.Source = new DataSource (this); } public override bool ShouldAutorotateToInterfaceOrientation (UIInterfaceOrientation toInterfaceOrientation) { return (toInterfaceOrientation != UIInterfaceOrientation.PortraitUpsideDown); } public override void DidReceiveMemoryWarning () { // Release all cached images. This will cause them to be redownloaded // later as they're displayed. foreach (var v in Apps) v.Image = null; } class DataSource : UITableViewSource { RootViewController Controller { get; set; } Task DownloadTask { get; set; } UIImage PlaceholderImage { get; set; } public DataSource (RootViewController controller) { Controller = controller; // Listen for changes to the Apps collection so the TableView can be updated Controller.Apps.CollectionChanged += HandleAppsCollectionChanged; // Initialise DownloadTask with an empty and complete task DownloadTask = Task.Factory.StartNew (() => { }); // Load the Placeholder image so it's ready to be used immediately PlaceholderImage = UIImage.FromFile ("Images/Placeholder.png"); // If either a download fails or the image we download is corrupt, ignore the problem. TaskScheduler.UnobservedTaskException += delegate(object sender, UnobservedTaskExceptionEventArgs e) { e.SetObserved (); }; } void HandleAppsCollectionChanged (object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { // Whenever the Items change, reload the data. Controller.TableView.ReloadData (); } public override nint NumberOfSections (UITableView tableView) { return 1; } public override nint RowsInSection (UITableView tableview, nint section) { return Controller.Apps.Count; } // Customize the appearance of table view cells. public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { UITableViewCell cell; // If the list is empty, put in a 'loading' entry if (Controller.Apps.Count == 0 && indexPath.Row == 0) { cell = tableView.DequeueReusableCell ("Placeholder"); if (cell == null) { cell = new UITableViewCell (UITableViewCellStyle.Subtitle, "Placeholder"); cell.DetailTextLabel.TextAlignment = UITextAlignment.Center; cell.SelectionStyle = UITableViewCellSelectionStyle.None; cell.DetailTextLabel.Text = "Loading"; } return cell; } cell = tableView.DequeueReusableCell ("Cell"); if (cell == null) { cell = new UITableViewCell (UITableViewCellStyle.Subtitle, "Cell"); cell.SelectionStyle = UITableViewCellSelectionStyle.None; } // Set the tag of each cell to the index of the App that // it's displaying. This allows us to directly match a cell // with an item when we're updating the Image var app = Controller.Apps [indexPath.Row]; cell.Tag = indexPath.Row; cell.TextLabel.Text = app.Name; cell.DetailTextLabel.Text = app.Artist; // If the Image for this App has not been downloaded, // use the Placeholder image while we try to download // the real image from the web. if (app.Image == null) { app.Image = PlaceholderImage; BeginDownloadingImage (app, indexPath); } cell.ImageView.Image = app.Image; return cell; } void BeginDownloadingImage (App app, NSIndexPath path) { // Queue the image to be downloaded. This task will execute // as soon as the existing ones have finished. byte[] data = null; DownloadTask = DownloadTask.ContinueWith (prevTask => { try { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = true; using (var c = new GzipWebClient ()) data = c.DownloadData (app.ImageUrl); } finally { UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false; } }); // When the download task is finished, queue another task to update the UI. // Note that this task will run only if the download is successful and it // uses the CurrentSyncronisationContext, which on MonoTouch causes the task // to be run on the main UI thread. This allows us to safely access the UI. DownloadTask = DownloadTask.ContinueWith (t => { // Load the image from the byte array. app.Image = UIImage.LoadFromData (NSData.FromArray (data)); // Retrieve the cell which corresponds to the current App. If the cell is null, it means the user // has already scrolled that app off-screen. var cell = Controller.TableView.VisibleCells.Where (c => c.Tag == Controller.Apps.IndexOf (app)).FirstOrDefault (); if (cell != null) cell.ImageView.Image = app.Image; }, CancellationToken.None, TaskContinuationOptions.OnlyOnRanToCompletion, TaskScheduler.FromCurrentSynchronizationContext ()); } } } }
// // AppDelegate.h // practice // // Created by na on 14-3-3. // Copyright (c) 2014年 na. All rights reserved. // #import <UIKit/UIKit.h> #import "LockViewController.h" @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
ofThread is a thread base class with a built in mutex. A [thread](http://en.wikipedia.org/wiki/Thread_(computing)) is essentially a mini processing object you can run in parallel to your main application loop and is useful for running time intensive operations without slowing down your app. ####Implementing a Thread For instance, you have to grab from a camera and waiting for an image slows down your app. You can offload this wait to a thread which tells the main app when an image is ready. To do this, you create a class that inherits from the ofThread class and implement the threadedFunction() function. Declaration in a .h file: ```cpp class MyThread : public ofThread { ... // the thread function void MyThread::threadedFunction() { // start while(isThreadRunning()) { cam.update(); if(cam.isFrameNew()) { // load the image image.setFromPixels(cam.getPixels()); } } // done } ofVideoGrabber cam; // the cam ofImage image; }; ``` In the application .h inside the ofApp class declare an object of type MyThread like: ```cpp // create object MyThread thread; ``` then in the .cpp file: ```cpp void ofApp::setup() { // start the thread thread.startThread(true, false); // blocking, non verbose } void ofApp::update() { // do something with the thread is running } void ofApp::exit() { // stop the thread thread.stopThread(); } ``` ####Shared Resources With this great power, however, comes great responsibility. If both the thread and your main app loop try to access the image at the same time, bad things happen inside your computer and the app will crash. The image is a considered a "shared resource" and you need to make sure to lock access to it so that only 1 thread can access it a time. You can do this using a ["mutal exclusion" object](http://en.wikipedia.org/wiki/Mutex) by called lock() when you want to access the resource, then unlock() when you are done. Declaration in a .h file: ```cpp class MyThread : public ofThread { ... // the thread function void MyThread::threadedFunction() { // start while(isThreadRunning()) { cam.update(); if(cam.isFrameNew()) { // lock access to the resource lock(); // load the image image.setFromPixels(cam.getPixels()); // done with the resource unlock(); } } // done } ofVideoGrabber cam; // the cam ofImage image; // the shared resource }; ``` In the .cpp file: ```cpp void ofApp::setup() { // start the thread thread.startThread(true, false); // blocking, non verbose } void ofApp::update() { // lock access to the resource thread.lock(); // copy image myImage = thread.image; // done with the resource thread.unlock(); } void ofApp::exit() { // stop the thread thread.stopThread(); } ``` ####Exiting Nicely As a thread is running in parallel with your application main loop, it's important to remember to tell it to stop before exiting the app. If you don't, you'll get weird errors or hangs because you aren't being nice to your threads. Depending on how you started your thread (blocking or non-blocking mode), you will either stop it for wait for it to finish. See the stopThread() & waitForThread() functions. ####Debugging Thread errors are *notoriously* difficult to debug sometimes. You will probably see a "Bad Access" runtime error or something similar if multiple threads are trying to access a shared resource simultaneously. Other times, nothing will happen as the thread may be stuck in an infinite loop and you can't stop it. Wee! We assume if you've read this far, you probably accept the difficulties in order to reap the thread speed rewards. A useful tool in debugging thread timing and access is the ofThread verbose mode which prints thread events such as starting, stopping, and mutex locking/unlocking. Simply set verbose=true when calling startThread(). Another trick is to use an ofSleepMillis() inside the thread to slow it down so you can see the timing better while debugging it. ####HOO RAH Ok soldier, lock and load ... good luck!
require 'chaos/commands/server' require 'chaos/commands/app' require 'chaos/commands/domains' require 'chaos/commands/config' require 'chaos/commands/servicepacks' require 'chaos/commands/addons'
// Vaca - Visual Application Components Abstraction // Copyright (c) 2005-2009 David Capello // // This file is distributed under the terms of the MIT license, // please read LICENSE.txt for more information. #include <vaca/vaca.h> #include "../resource.h" using namespace vaca; class TimerViewer : public Widget { Timer m_timer; bool m_on; public: TimerViewer(int msecs, Color color, Widget* parent) : Widget(parent) , m_timer(msecs) , m_on(false) { setBgColor(color); setPreferredSize(Size(64, 64)); m_timer.Tick.connect(&TimerViewer::onTick, this); m_timer.start(); } protected: virtual void onPaint(PaintEvent& ev) { Graphics& g = ev.getGraphics(); Rect rc = getClientBounds(); Color bg = getBgColor(); Pen blackPen(Color::Black); Brush foreBrush(m_on ? getBgColor()+Color(200, 200, 200): getBgColor()); g.drawRect(blackPen, rc); rc.shrink(1); g.fillRect(foreBrush, rc); } private: void onTick() { // switch state m_on = !m_on; invalidate(true); } }; // the main window class MainFrame : public Frame { Label m_label1; Label m_label2; Label m_label3; TimerViewer m_timer1; TimerViewer m_timer2; TimerViewer m_timer3; public: MainFrame() : Frame(L"Timers", NULL, Frame::Styles::Default - Frame::Styles::Resizable - Frame::Styles::Maximizable) , m_label1(L"1 sec", this) , m_label2(L"2 sec", this) , m_label3(L"4 sec", this) , m_timer1(1000, Color::Red, this) , m_timer2(2000, Color(0, 128, 0), this) , m_timer3(4000, Color::Blue, this) { setLayout(Bix::parse(L"XY[%,%,%;%,%,%]", &m_label1, &m_label2, &m_label3, &m_timer1, &m_timer2, &m_timer3)); setSize(getPreferredSize()); } }; int VACA_MAIN() { Application app; MainFrame frm; frm.setIcon(ResourceId(IDI_VACA)); frm.setVisible(true); app.run(); return 0; }
--- layout: post title: 每天500字:如何取舍 categories: 500字 description: 最近一直在纠结买房子的事情,从二手看到一手房,信息扑朔迷离,着实让人难以取舍。 keywords: 500字 --- APR 10 2017 08:29 广州 从真正下了决心准备开始买房子开始,东奔西跑大概有二十多天的时间,其中真是百味杂陈,苦不堪言。因为老人和妻子都非常看重配套,希望能住的方便一些,离成熟的社区近一些。 加上还要考虑学位户型大小价格,因此开始的时候是从找二手房开始的,安装家人的想法,二手房价格便宜,地段相对成熟,生活配套完善,对应的学区也比较优越,对我们这种刚需住房的购买者来说,确实是第一选择。 但几个星期跑下来,发现了很多问题的确是让人不吐不快。第一、就是价格的问题,三月中下旬,广州和佛山相继对一手房进行了限购,限制了一手房的认购资格,造成很多人炒房者无法进入,但佛山二手房却没有限购,这个带来的后果就是,二手房的价格在短短一个星期左右的时间,普遍涨幅达20%左右。这一上涨,造成本来二手的价格优势荡然无存,这一圈跑下来,我们发现,在某些位置学位比较好的二手楼盘,其售价已经远远超过了一手的楼盘,价格已经不存在优势。 第二是卖方的诚信问题,因为二手房的卖家市场,这些卖家很多都是一些个人,甚至有些人就是炒房者。这种情况下,卖家把房源放出来,其真实的用意其实很难揣摩,根据我们的实际经验来看,很多放房源,其实就是一种价格试探,一旦买家表现出购买欲望,这种卖家不是避而不见就是提高价格,让交易难度很大,买家的购买欲望越强,卖家反而会不断的加码,这种情况我们遇到很多次。 第三是房源的问题,因为是二手房,房源的情况和来源都很不稳定,要不然不是是合适的大小,要不然就不是合适的位置,有时候是买家希望是毛坯,而卖家提供的是一个你完全不喜欢的装修风格,倒霉的是,如果你像交易,这个你不喜欢的装修,你可能还要为之付出不小的代价。 上面的三条是比较主要的三个原因,这三个原因造成在看房的过程中困难重重,不是浪费自己大量的精力在无畏的奔波中,就是你心仪的房子卖家根本就没有打算出售。 如何取舍,这的确是个问题。 APR 10 2017 09:11 广州 ---- 公众号:你想看的World(Youw2s) ![][image-1] [image-1]: http://upload-images.jianshu.io/upload_images/3342594-dca1f89eba3e50ca.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240
package com.dwarfartisan.parsec; import java.io.EOFException; /** * Created by Mars Liu on 2016-01-07. * Digit 判断下一个项是否是一个表示数字的字符.它仅接受 Character/char . */ public class Digit<Status, Tran> implements Parsec<Character, Character, Status, Tran> { @Override public Character parse(State<Character, Status, Tran> s) throws EOFException, ParsecException { Character re = s.next(); if (Character.isDigit(re)) { return re; } else { String message = String.format("Expect %c is digit.", re); throw s.trap(message); } } }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="/static/img/favicon.ico" /> <title>Microsoft Student Partner - Tiago Espinha</title> <meta name="author" content="Tiago Espinha" /> <meta name="description" content="Microsoft Student Partner" /> <meta name="keywords" content="Microsoft Student Partner, Tiago Espinha, my life" /> <meta content="0" property="fb:app_id"> <meta content="Tiago Espinha" property="og:site_name"> <meta content="Microsoft Student Partner" property="og:title"> <meta content="article" property="og:type"> <meta content="My Personal Blog" property="og:description"> <meta content="http://localhost:4000/2008/08/microsoft-student-partner/" property="og:url"> <meta content="2008-08-08T15:59:00+01:00" property="article:published_time"> <meta content="http://localhost:4000/about/" property="article:author"> <meta content="http://aboutashu.com/static/img/logo-high-resolution.png" property="og:image"> <meta content="my life" property="article:section"> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@\#"> <meta name="twitter:creator" content="@\#"> <meta name="twitter:title" content="Microsoft Student Partner"> <meta name="twitter:url" content="http://localhost:4000/2008/08/microsoft-student-partner/"> <meta name="twitter:description" content="My Personal Blog"> <link rel="alternate" type="application/rss+xml" title="RSS" href="/feed.xml"> <!-- Custom Fonts --> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css"> <!-- FontAwesome icons --> <link rel="stylesheet" href="https://use.fontawesome.com/74dfc6cf47.css"> <!-- Core BootStrap CSS --> <link rel="stylesheet" href="http://localhost:4000/static/css/bootstrap.min.css"> <!-- Material Design CSS --> <link rel="stylesheet" href="http://localhost:4000/static/css/bootstrap-material-design.min.css"> <!-- syntax highlighting CSS --> <link rel="stylesheet" href="http://localhost:4000/static/css/syntax.css"> <!-- Custom CSS --> <link rel="stylesheet" href="http://localhost:4000/static/css/thickbox.css"> <link rel="stylesheet" href="http://localhost:4000/static/css/main.css"> <link rel="stylesheet" href="http://localhost:4000/static/css/projects.css"> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-5075580-2', 'auto'); ga('send', 'pageview'); </script> </head> <body class="home overflow-hidden"> <!--[if lt IE 7]> <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <div class="header-panel shadow-z-2"> <div class="container"> <div class="row"> <div class="col-md-3 col-sm-4 col-xs-12"> <div class="row-picture"> <img id="about" class="logo-img" src="https://www.tiagoespinha.net/static/img/avatar.png" height="75px" width="75px"> </div> <div class="row-details"> <h4 class="list-group-item-heading">Tiago Espinha</h4> <p class="list-group-item-text">Tiago's Tech Blog</p> <div class="social-icons"> <a class="icon" target="_blank" href="#"><i class="fa fa-facebook"></i></a> <a class="icon" target="_blank" href="#"><i class="fa fa-skype"></i></a> <a class="icon" target="_blank" href="#"><i class="fa fa-twitter"></i></a> <a class="icon" target="_blank" href="#"><i class="fa fa-linkedin"></i></a> <a class="icon" target="_blank" href="#"><i class="fa fa-stack-exchange"></i></a> </div> </div> <div class="navbar-header pull-right"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <i class="fa fa-2x fa-bars"></i> </button> </div> </div> <div class="col-md-9 col-sm-8 col-xs-12"> <h2 class="blog-title-pro">Microsoft Student Partner</h2> <p class="info"> <span class="time">08 Aug 2008</span> <span class="categories"> &raquo; <a href="/category/my life">my life</a> </span> </p> </div> </div> </div> </div> <div class="container main outer"> <div class="row"> <div class="col-md-3 col-xs-12"> <nav class="menu"> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="list-separator nav navbar-nav well well-primary post"> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 current-menu-item microsoft-student-partner"><a href="/"><i class="fa fa-home"></i> Home</a></li> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 microsoft-student-partner"><a href="/about/"><i class="fa fa-comments"></i> About</a></li> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 microsoft-student-partner"><a href="/projects/"><i class="fa fa-desktop"></i> Projects</a></li> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 microsoft-student-partner"><a href="#"><i class="fa fa-graduation-cap"></i> Resume</a></li> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 microsoft-student-partner"><a href="https://github.com/etiago"><i class="fa fa-github"></i> GitHub</a></li> <li class="col-lg-12 col-md-12 col-sm-4 col-xs-12 microsoft-student-partner"><a href="/feed.xml"><i class="fa fa-feed"></i> XML Feed</a></li> </ul> </div> </nav> </div> <!-- end /.col-md-3 --> <div class="col-md-9 col-xs-12 full"> <div class="post-content well"> <article class="content"> <div class="post"><div style="text-align: justify;"> Hello my dear friends and readers in general,&lt;/p&gt; <p> I come here today with a subject of great happiness and ecstasy! I was called in by Microsoft to be «interviewed» for Microsoft&#8217;s Student Partner Program in Lisbon 😀 . So on August 13th there I shall go and attempt my best at getting the position. For the first time I will be even entering Microsoft&#8217;s building so that alone is already stomach-tickling. It&#8217;s set to be a great experience and I can but hope that I get a position as a MSP. </p> <p> As my best-friend would say: the plot thickens. 😉 </p> <p> I shall keep news coming on this blog so stay tuned! </p> </div> </div> <hr /> <div class="share-page"> Share this on &rarr; <a href="https://twitter.com/share" class="twitter-share-button" data-via="\#">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> <!-- Google + --> <div class="g-plus" data-action="share" data-annotation="bubble"></div> <script src="https://apis.google.com/js/platform.js" async defer></script> <!-- Facebook --> <div class="fb-share-button" data-href="http://localhost:4000/2008/08/microsoft-student-partner/" data-layout="button_count" style="position: relative; top: -8px; left: 3px;"></div> </div> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6&appId=0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> </article> <hr /> <div class="panel-body"> <h4>Related Posts</h4> <ul> <li class="relatedPost"> <a href="http://localhost:4000/2010/08/tiago-is-now-officially-an-asf-committer/">Tiago is now officially an ASF committer!</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> <li class="relatedPost"> <a href="http://localhost:4000/2010/04/imagine-cup-and-volcano-ash/">Imagine Cup and volcano ash</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> <li class="relatedPost"> <a href="http://localhost:4000/2009/09/ay-up-me-duck/">&#8216;Ay up me duck!</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> <li class="relatedPost"> <a href="http://localhost:4000/2009/05/google-summer-of-code-payments-rolling-in/">Google Summer of Code &#8211; Payments Rolling In</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> <li class="relatedPost"> <a href="http://localhost:4000/2009/05/masters-degree/">Master&#8217;s Degree</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> <li class="relatedPost"> <a href="http://localhost:4000/2009/04/google-summer-of-code-2009/">Google Summer of Code 2009</a> <small>(Categories: <a href="/category/my life">my life</a>)</small> </li> </ul> </div> <div class="PageNavigation"> <a class="prev pull-left" href="/2008/08/update/">&laquo; Update</a> <a class="next pull-right" href="/2008/08/microsoft-student-partner-pt-2/">Microsoft Student Partner pt. 2 &raquo;</a> </div> <div class="disqus-comments"> <div id="disqus_thread"></div> <script type="text/javascript"> /* <![CDATA[ */ var disqus_shortname = "tiagostechblog"; var disqus_identifier = "http://localhost:4000_Microsoft Student Partner"; var disqus_title = "Microsoft Student Partner"; /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); /* ]]> */ </script> </div> </div> <div class="row"> <div class="col-md-12 col-xs-12 footer"> <footer> © Copyright text here - <a href="#">Privacy link</a> - Powered by Jekyll. </footer> <div align="center"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- hcz-jekyll --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-0776433630785969" data-ad-slot="9690958902" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> <!-- end /.col-md-9 --> </div> <!-- end /.row --> </div> <!-- end /.container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script> <script src="http://localhost:4000/static/js/bootstrap.min.js"></script> <script src="http://localhost:4000/static/js/thickbox-compressed.js"></script> <script src="http://localhost:4000/static/js/material.min.js"></script> <script src="http://localhost:4000/static/js/main.js"></script> <script src="http://localhost:4000/static/js/projects.js"></script> </body> </html>
import React from 'react' import MediaSummary from './MediaSummary' import { Button } from 'semantic-ui-react' import './mediaverticallist.css' export default class MediaVerticalList extends React.Component { render () { var arr = this.props.data if (arr === undefined) { arr = [] } var mediaNodes = arr.map((media, idx) => { return ( <MediaSummary key={media.id + '-' + idx} logo_url={media.logo_url} /> ) }) return ( <div> <h3 className='text-centered'>{this.props.title}</h3> {mediaNodes} <Button fluid size='huge'>3 Media Lainnya</Button> </div> ) } }
/* global window beforeEach jasmine it xit fit */ if (typeof global === 'undefined') { global = window; // eslint-disable-line } const customMatchers = { toAlmostEqual: (util, customEqualityTesters) => ({ compare: (actual, expected) => { const cleanActual = actual .trim() .replace(/\n/g, '') .replace(/\s+/g, ' '); // remove extra whitespace const cleanExpected = expected .trim() .replace(/\n/g, '') .replace(/\s+/g, ' '); // remove extra whitespace return { pass: util.equals(cleanActual, cleanExpected, customEqualityTesters), }; }, }), }; beforeEach(() => { jasmine.addMatchers(customMatchers); }); function addDataTableSupport() { function executeTest(name, fn, entries, override) { entries.forEach((entry) => { const itName = `${name} ${entry.name}`; const itFn = () => fn(...entry.params); (override || entry.proxy)(itName, itFn); }); } global.entry = (name, ...params) => { const result = { name, params, proxy: it, }; return result; }; global.fentry = (name, ...params) => { const result = { name, params, proxy: fit, }; return result; }; global.xentry = (name, ...params) => { const result = { name, params, proxy: xit, }; return result; }; global.describeTable = (name, fn, ...entries) => { executeTest(name, fn, entries); }; global.fdescribeTable = (name, fn, ...entries) => { executeTest(name, fn, entries, fit); }; global.xdescribeTable = (name, fn, ...entries) => { executeTest(name, fn, entries, xit); }; } addDataTableSupport();
 namespace PatientManagement.Administration.Repositories { using Serenity; using Serenity.Data; using Serenity.Services; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Reflection; using MyRow = Entities.UserRoleRow; public class UserRoleRepository { private static MyRow.RowFields fld { get { return MyRow.Fields; } } public SaveResponse Update(IUnitOfWork uow, UserRoleUpdateRequest request) { Check.NotNull(request, "request"); Check.NotNull(request.UserID, "userID"); Check.NotNull(request.Roles, "permissions"); var userID = request.UserID.Value; var oldList = new HashSet<Int32>( GetExisting(uow.Connection, userID) .Select(x => x.RoleId.Value)); var newList = new HashSet<Int32>(request.Roles.ToList()); if (oldList.SetEquals(newList)) return new SaveResponse(); foreach (var k in oldList) { if (newList.Contains(k)) continue; new SqlDelete(fld.TableName) .Where( new Criteria(fld.UserId) == userID & new Criteria(fld.RoleId) == k) .Execute(uow.Connection); } foreach (var k in newList) { if (oldList.Contains(k)) continue; uow.Connection.Insert(new MyRow { UserId = userID, RoleId = k }); } BatchGenerationUpdater.OnCommit(uow, fld.GenerationKey); BatchGenerationUpdater.OnCommit(uow, Entities.UserPermissionRow.Fields.GenerationKey); return new SaveResponse(); } private List<MyRow> GetExisting(IDbConnection connection, Int32 userId) { return connection.List<MyRow>(q => { q.Select(fld.UserRoleId, fld.RoleId) .Where(new Criteria(fld.UserId) == userId); }); } public UserRoleListResponse List(IDbConnection connection, UserRoleListRequest request) { Check.NotNull(request, "request"); Check.NotNull(request.UserID, "userID"); var response = new UserRoleListResponse(); response.Entities = GetExisting(connection, request.UserID.Value) .Select(x => x.RoleId.Value).ToList(); return response; } private void ProcessAttributes<TAttr>(HashSet<string> hash, MemberInfo member, Func<TAttr, string> getRole) where TAttr : Attribute { foreach (var attr in member.GetCustomAttributes<TAttr>()) { var permission = getRole(attr); if (!permission.IsEmptyOrNull()) hash.Add(permission); } } } }
using System; using System.Collections.Generic; namespace TietoCRM.Models { /// <summary> /// Denna klass används inte längre! /// </summary> public class MainContractText { public enum MainContractType { MainHead, Subheading, Text }; private MainContractType type; public MainContractType Type { get { return type; } set { type = value; } } private String name; public String Name { get { return name; } set { name = value; } } private String value; public String Value { get { return this.value; } set { this.value = value; } } private List<MainContractText> children; public List<MainContractText> Children { get { return children; } set { children = value; } } /// <summary> /// init the object with certain values. /// </summary> /// <param name="name">The column name in the database</param> /// <param name="type">The heading type of the object, MainHead, Subheading, Text</param> /// <param name="value">The value the database holds</param> public MainContractText(String name, MainContractType type, String value) { this.Name = name; this.Type = type; this.Value = value; this.Children = new List<MainContractText>(); } } }
<?php namespace Web\GeneralBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; class GeneralController extends Controller { //Muestra Index public function indexAction() { $name='mensaje index'; return $this->render('GeneralBundle:General:index.html.twig', array('name' => $name)); } //Muestra sección. public function seccionAction() { $name='mensaje seccion'; return $this->render('GeneralBundle:General:index.html.twig', array('name' => $name)); } }