code stringlengths 4 1.01M | language stringclasses 2 values |
|---|---|
# frozen_string_literal: true
require "cases/helper"
require "models/user"
require "models/visitor"
class SecurePasswordTest < ActiveModel::TestCase
setup do
# Used only to speed up tests
@original_min_cost = ActiveModel::SecurePassword.min_cost
ActiveModel::SecurePassword.min_cost = true
@user = User.new
@visitor = Visitor.new
# Simulate loading an existing user from the DB
@existing_user = User.new
@existing_user.password_digest = BCrypt::Password.create("password", cost: BCrypt::Engine::MIN_COST)
end
teardown do
ActiveModel::SecurePassword.min_cost = @original_min_cost
end
test "automatically include ActiveModel::Validations when validations are enabled" do
assert_respond_to @user, :valid?
end
test "don't include ActiveModel::Validations when validations are disabled" do
assert_not_respond_to @visitor, :valid?
end
test "create a new user with validations and valid password/confirmation" do
@user.password = "password"
@user.password_confirmation = "password"
assert @user.valid?(:create), "user should be valid"
@user.password = "a" * 72
@user.password_confirmation = "a" * 72
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and a spaces only password" do
@user.password = " " * 72
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and a blank password" do
@user.password = ""
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["can't be blank"], @user.errors[:password]
end
test "create a new user with validation and a nil password" do
@user.password = nil
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["can't be blank"], @user.errors[:password]
end
test "create a new user with validation and password length greater than 72" do
@user.password = "a" * 73
@user.password_confirmation = "a" * 73
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["is too long (maximum is 72 characters)"], @user.errors[:password]
end
test "create a new user with validation and a blank password confirmation" do
@user.password = "password"
@user.password_confirmation = ""
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["doesn't match Password"], @user.errors[:password_confirmation]
end
test "create a new user with validation and a nil password confirmation" do
@user.password = "password"
@user.password_confirmation = nil
assert @user.valid?(:create), "user should be valid"
end
test "create a new user with validation and an incorrect password confirmation" do
@user.password = "password"
@user.password_confirmation = "something else"
assert !@user.valid?(:create), "user should be invalid"
assert_equal 1, @user.errors.count
assert_equal ["doesn't match Password"], @user.errors[:password_confirmation]
end
test "update an existing user with validation and no change in password" do
assert @existing_user.valid?(:update), "user should be valid"
end
test "update an existing user with validations and valid password/confirmation" do
@existing_user.password = "password"
@existing_user.password_confirmation = "password"
assert @existing_user.valid?(:update), "user should be valid"
@existing_user.password = "a" * 72
@existing_user.password_confirmation = "a" * 72
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a blank password" do
@existing_user.password = ""
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a spaces only password" do
@user.password = " " * 72
assert @user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a blank password and password_confirmation" do
@existing_user.password = ""
@existing_user.password_confirmation = ""
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and a nil password" do
@existing_user.password = nil
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "updating an existing user with validation and password length greater than 72" do
@existing_user.password = "a" * 73
@existing_user.password_confirmation = "a" * 73
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["is too long (maximum is 72 characters)"], @existing_user.errors[:password]
end
test "updating an existing user with validation and a blank password confirmation" do
@existing_user.password = "password"
@existing_user.password_confirmation = ""
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["doesn't match Password"], @existing_user.errors[:password_confirmation]
end
test "updating an existing user with validation and a nil password confirmation" do
@existing_user.password = "password"
@existing_user.password_confirmation = nil
assert @existing_user.valid?(:update), "user should be valid"
end
test "updating an existing user with validation and an incorrect password confirmation" do
@existing_user.password = "password"
@existing_user.password_confirmation = "something else"
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["doesn't match Password"], @existing_user.errors[:password_confirmation]
end
test "updating an existing user with validation and a blank password digest" do
@existing_user.password_digest = ""
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "updating an existing user with validation and a nil password digest" do
@existing_user.password_digest = nil
assert !@existing_user.valid?(:update), "user should be invalid"
assert_equal 1, @existing_user.errors.count
assert_equal ["can't be blank"], @existing_user.errors[:password]
end
test "setting a blank password should not change an existing password" do
@existing_user.password = ""
assert @existing_user.password_digest == "password"
end
test "setting a nil password should clear an existing password" do
@existing_user.password = nil
assert_nil @existing_user.password_digest
end
test "authenticate" do
@user.password = "secret"
assert_not @user.authenticate("wrong")
assert @user.authenticate("secret")
end
test "Password digest cost defaults to bcrypt default cost when min_cost is false" do
ActiveModel::SecurePassword.min_cost = false
@user.password = "secret"
assert_equal BCrypt::Engine::DEFAULT_COST, @user.password_digest.cost
end
test "Password digest cost honors bcrypt cost attribute when min_cost is false" do
begin
original_bcrypt_cost = BCrypt::Engine.cost
ActiveModel::SecurePassword.min_cost = false
BCrypt::Engine.cost = 5
@user.password = "secret"
assert_equal BCrypt::Engine.cost, @user.password_digest.cost
ensure
BCrypt::Engine.cost = original_bcrypt_cost
end
end
test "Password digest cost can be set to bcrypt min cost to speed up tests" do
ActiveModel::SecurePassword.min_cost = true
@user.password = "secret"
assert_equal BCrypt::Engine::MIN_COST, @user.password_digest.cost
end
end
| Java |
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstring>
#include "../include/globals.hpp"
#include "../include/classes.hpp"
#include "../include/functions.hpp"
struct cell{
double xStart;
double yStart;
double zStart;
};
int main(int argc, char** argv)
{
int a;
int run=0;
gsl_rng_set(r,98);
gsl_histogram_set_ranges_uniform(gas_in,-1,5);
gsl_histogram_set_ranges_uniform(gas_out,-1,5);
gsl_histogram_set_ranges_uniform(gas_real_in,-1,5);
Particle *cube = new Particle[N];
std::list<Particle*> gas;
std::list<Particle*> gasHistory;
double* rCM = new double[3];
double* rCMtemp = new double[3];
double* vCM = new double[3];
double energy = 0;
InitPositions(cube);
calcCM(cube,rCMStart,vCM);
calcCM(cube,rCM,vCM);
InitVelocities(cube);
ComputeAccelerations(cube);
/*
*for(run=0;run<10000;run++)
*{
* if(run%500==0)
* printf("(INIT) Zeitschritt %d\n",run);
* VelocityVerlet(cube,0,NULL);
* if(run%100 == 0)
* rescaleVelocities(cube);
* if(run%100 == 0)
* GenerateOutput(cube,gas,run);
*}
*/
gsl_histogram *cells = gsl_histogram_alloc(100);
gsl_histogram_set_ranges_uniform(cells,0,50);
double lcx = floor(L/rCutOff);
double rcx = L/lcx;
double c = 0;
double ci[3] = {0,0,0};
for(int i=0;i<N;i++)
{
for(int k=0;k<3;k++)
ci[k] = floor(cube[i].r[k]/rcx);
c = ci[0]*lcx*lcx+ci[1]*lcx+ci[2];
std::cout << c << std::endl;
gsl_histogram_increment(cells,c);
}
FILE* celldata = fopen("cell_list_test.dat","w");
gsl_histogram_fprintf(celldata,cells,"%f","%f");
fclose(celldata);
return 0;
}
| Java |
<?php
namespace Sigcotweb\AplicativoBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
*/
class Configuration implements ConfigurationInterface
{
/**
* {@inheritDoc}
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('aplicativo');
// Here you should define the parameters that are allowed to
// configure your bundle. See the documentation linked above for
// more information on that topic.
return $treeBuilder;
}
}
| Java |
using System;
using System.Collections.Generic;
using System.Text;
using _03BarracksFactory.Contracts;
namespace P03_BarraksWars.Core.Commands
{
class RetireCommand : Command
{
public RetireCommand(string[] data, IRepository repository, IUnitFactory unitFactory)
: base(data, repository, unitFactory)
{
}
public override string Execute()
{
try
{
this.Repository.RemoveUnit(this.Data[1]);
return $"{this.Data[1]} retured!";
}
catch (InvalidOperationException ex)
{
return ex.Message;
}
}
}
}
| Java |
/*
* Globalize Culture id
*
* http://github.com/jquery/globalize
*
* Copyright Software Freedom Conservancy, Inc.
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* This file was generated by the Globalize Culture Generator
* Translation: bugs found in this file need to be fixed in the generator * Portions (c) Corporate Web Solutions Ltd.
*/
(function( window, undefined ) {
var Globalize;
if ( typeof require !== "undefined" &&
typeof exports !== "undefined" &&
typeof module !== "undefined" ) {
// Assume CommonJS
Globalize = require( "globalize" );
} else {
// Global variable
Globalize = window.Globalize;
}
Globalize.addCultureInfo( "id", "default", {
name: "id",
englishName: "Indonesian",
nativeName: "Bahasa Indonesia",
language: "id",
numberFormat: {
",": ".",
".": ",",
percent: {
",": ".",
".": ","
},
currency: {
decimals: 0,
",": ".",
".": ",",
symbol: "Rp"
}
},
calendars: {
standard: {
firstDay: 1,
days: {
names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
namesShort: ["M","S","S","R","K","J","S"]
},
months: {
names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
},
AM: null,
PM: null,
patterns: {
d: "dd/MM/yyyy",
D: "dd MMMM yyyy",
t: "H:mm",
T: "H:mm:ss",
f: "dd MMMM yyyy H:mm",
F: "dd MMMM yyyy H:mm:ss",
M: "dd MMMM",
Y: "MMMM yyyy"
}
}
}
});
}( this ));
| Java |
package de.codecentric.awesome.recommendation.core;
import java.util.HashMap;
import java.util.Map;
/**
* Created by afitz on 15.03.16.
*/
public class RecommendationLookup {
private static RecommendationLookup ourInstance = new RecommendationLookup();
private String standardProductRecommendation = "P999";
// Map<User, Product>
private final Map<String, String> recommendationMap = new HashMap<String, String>();
public static RecommendationLookup getInstance() {
return ourInstance;
}
private RecommendationLookup() {
recommendationMap.put("P00T", "P001");
recommendationMap.put("P001", "P002");
recommendationMap.put("P002", "P003");
recommendationMap.put("P003", "P003");
}
public Product getRecommendation (Product product) {
return new Product((recommendationMap.containsKey(product.getId()) ? recommendationMap.get(product.getId()) : standardProductRecommendation));
}
}
| Java |
import omit from 'lodash/omit';
import get from 'lodash/get';
import isFunction from 'lodash/isFunction';
import { bunyanLevelToRollbarLevelName } from '../common/rollbar';
// Rollbar script exposes this global immediately, whether or not its already initialized
export const isGlobalRollbarConfigured = () => !!get(global, 'Rollbar');
/**
* Custom rollbar stream that transports to logentries from a browser
* Wortks with a global Rollbar instance that is already initialized.
* Note this expects rollbar to be loaded in the head, not via an npm module.
* See https://rollbar.com/docs/notifier/rollbar.js/#quick-start for details on
* integrating Rollbar in client apps
*
* @param {String} options.token
* @param {String} options.environment
* @param {String} options.codeVersion
*/
export default function ClientRollbarLogger({ token, environment, codeVersion }) {
// Rollbar may already be initialized, but thats ok
// https://rollbar.com/docs/notifier/rollbar.js/configuration/
global.Rollbar.configure({
accessToken: token,
environment,
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment,
javascript: {
code_version: codeVersion,
source_map_enabled: true,
},
},
});
}
/**
* Transport logs to Rollbar
* @param {Object} data
* @returns {undefined}
*/
ClientRollbarLogger.prototype.write = function (data = {}) {
const rollbarLevelName = bunyanLevelToRollbarLevelName(data.level);
const scopeData = omit(data, ['err', 'level']);
const payload = Object.assign({ level: rollbarLevelName }, scopeData);
// https://rollbar.com/docs/notifier/rollbar.js/#rollbarlog
const logFn = global.Rollbar[rollbarLevelName];
if (isFunction(logFn)) {
logFn.call(global.Rollbar, data.msg, data.err, payload);
} else {
global.Rollbar.error(data.msg, data.err, payload);
}
};
| Java |
# coding: utf-8
""" General utilities. """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import collections
import sys
import logging
import multiprocessing
# Third-party
import numpy as np
__all__ = ['get_pool']
# Create logger
logger = logging.getLogger(__name__)
class SerialPool(object):
def close(self):
return
def map(self, *args, **kwargs):
return map(*args, **kwargs)
def get_pool(mpi=False, threads=None):
""" Get a pool object to pass to emcee for parallel processing.
If mpi is False and threads is None, pool is None.
Parameters
----------
mpi : bool
Use MPI or not. If specified, ignores the threads kwarg.
threads : int (optional)
If mpi is False and threads is specified, use a Python
multiprocessing pool with the specified number of threads.
"""
if mpi:
from emcee.utils import MPIPool
# Initialize the MPI pool
pool = MPIPool()
# Make sure the thread we're running on is the master
if not pool.is_master():
pool.wait()
sys.exit(0)
logger.debug("Running with MPI...")
elif threads > 1:
logger.debug("Running with multiprocessing on {} cores..."
.format(threads))
pool = multiprocessing.Pool(threads)
else:
logger.debug("Running serial...")
pool = SerialPool()
return pool
def gram_schmidt(y):
""" Modified Gram-Schmidt orthonormalization of the matrix y(n,n) """
n = y.shape[0]
if y.shape[1] != n:
raise ValueError("Invalid shape: {}".format(y.shape))
mo = np.zeros(n)
# Main loop
for i in range(n):
# Remove component in direction i
for j in range(i):
esc = np.sum(y[j]*y[i])
y[i] -= y[j]*esc
# Normalization
mo[i] = np.linalg.norm(y[i])
y[i] /= mo[i]
return mo
class use_backend(object):
def __init__(self, backend):
import matplotlib.pyplot as plt
from IPython.core.interactiveshell import InteractiveShell
from IPython.core.pylabtools import backend2gui
self.shell = InteractiveShell.instance()
self.old_backend = backend2gui[str(plt.get_backend())]
self.new_backend = backend
def __enter__(self):
gui, backend = self.shell.enable_matplotlib(self.new_backend)
def __exit__(self, type, value, tb):
gui, backend = self.shell.enable_matplotlib(self.old_backend)
def inherit_docs(cls):
for name, func in vars(cls).items():
if not func.__doc__:
for parent in cls.__bases__:
try:
parfunc = getattr(parent, name)
except AttributeError: # parent doesn't have function
break
if parfunc and getattr(parfunc, '__doc__', None):
func.__doc__ = parfunc.__doc__
break
return cls
class ImmutableDict(collections.Mapping):
def __init__(self, somedict):
self._dict = dict(somedict) # make a copy
self._hash = None
def __getitem__(self, key):
return self._dict[key]
def __len__(self):
return len(self._dict)
def __iter__(self):
return iter(self._dict)
def __hash__(self):
if self._hash is None:
self._hash = hash(frozenset(self._dict.items()))
return self._hash
def __eq__(self, other):
return self._dict == other._dict
| Java |
{% extends 'layout.server.view.html' %}
{% block content %}
<div ui-view></div>
{% endblock %}
| Java |
##  PdfRasterizer Plugin for Xamarin and Windows
Simple cross platform plugin that renders PDF files to images for easier integration.
### Setup
* Available on NuGet: http://www.nuget.org/packages/Xam.Plugin.PdfRasterizer [](https://www.nuget.org/packages/Xam.Plugin.PdfRasterizer/)
* Install into your PCL project and Client projects.
**Platform Support**
|Platform|Supported|Version|
| ------------------- | :-----------: | :------------------: |
|Xamarin.iOS|Yes|iOS 6+|
|Xamarin.iOS Unified|Yes|iOS 6+|
|Xamarin.Android|Yes|API 21+|
|Windows Store RT|Yes|8.1+|
|Windows 10 UWP|Yes|10+|
|Windows Phone Silverlight|No||
|Windows Phone RT|No||
|Xamarin.Mac|No||
### API Usage
Call **CrossPdfRasterizer.Current** from any project or PCL to gain access to APIs.
A `.pdf` document rasterization will render all of its pages as `.png` images in the local storage of the application (by default in the `/.pdf/` subfolder). Local and distant document can be prodvided. If the provided document path starts with `http://` or `https://`, the document will be downloaded first in the local temporary folder of the application.
#### Example
```csharp
try
{
const string documentUrl = "https://developer.xamarin.com/guides/xamarin-forms/getting-started/introduction-to-xamarin-forms/offline.pdf";
const bool forceRasterize = false;
var rasterizer = CrossPdfRasterizer.Current;
var document = await rasterizer.Rasterize(documentUrl,forceRasterize);
var pageImages = document.Pages.Select((p) => p.Path);
}
catch(Exception ex)
{
Debug.WriteLine("Unable to rasterize provided document: " + ex);
}
```
#### API
```csharp
/// <summary>
/// The directory where all the rasterized PDF's sub-directories containing page images are created (default: "/.pdf/").
/// </summary>
string RasterizationCacheDirectory { get; set; }
```
```csharp
/// <summary>
/// Renders a local PDF file as a set of page images into the local storage.
/// </summary>
/// <param name="pdfPath">The relative path to the PDF file in local storage, or a distant url. If a distant Url is provided, the document will be downloaded first in the temporary folder of the application.</param>
/// <param name="cachePirority">Indicates whether the already rasterized version should be taken, or images must be forced to be rasterized again.</param>
/// <returns>A document containing all the pages with their paths.</returns>
Task<PdfDocument> Rasterize(string pdfPath, bool cachePirority = true);
```
```csharp
/// <summary>
/// Gets the locally rendered document if it has already been rasterized, else it returns null.
/// </summary>
/// <param name="pdfPath"></param>
/// <returns></returns>
Task<PdfDocument> GetRasterized(string pdfPath);
```
#### Q&A
> Why is the rasterizer only available for Android version prior to Lollipop ?
Because the `PdfRenderer` was introduced only in this version. I didn't found any free solution to have the same result of older versions of Android. If you have a solution don't hesitate to contact me !
### Roadmap / Ideas
* Adding custoization for generation location.
* Adding more document meta-data (with maybe the original document available too)
* Adding PDF drawing generation functionality (*iOS and Android only*)
* Creating a Xamarin.Forms SimplePdfViewer
### Contributors
* [aloisdeniel](https://github.com/aloisdeniel)
Thanks!
### License
Licensed under main repo license | Java |
#include <pthread.h>
#include <assert.h>
int g = 17; // matches expected precise read
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
g = 42;
pthread_mutex_unlock(&B);
g = 17;
pthread_mutex_unlock(&C);
return NULL;
}
int main(void) {
pthread_t id;
pthread_create(&id, NULL, t_fun, NULL);
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
assert(g == 17);
pthread_mutex_unlock(&A);
pthread_mutex_unlock(&B);
pthread_mutex_unlock(&C);
return 0;
}
| Java |
import EmberObject from '@ember/object';
import { htmlSafe } from '@ember/string';
import RSVP from 'rsvp';
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import {
render,
settled,
find,
click
} from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
const { resolve } = RSVP;
module('Integration | Component | school session types list', function(hooks) {
setupRenderingTest(hooks);
test('it renders', async function(assert) {
assert.expect(19);
let assessmentOption = EmberObject.create({
id: 1,
name: 'formative'
});
let sessionType1 = EmberObject.create({
id: 1,
school: 1,
title: 'not needed anymore',
assessment: false,
assessmentOption: resolve(null),
safeCalendarColor: htmlSafe('#ffffff'),
sessionCount: 2,
active: false,
});
let sessionType2 = EmberObject.create({
id: 2,
school: 1,
title: 'second',
assessment: true,
assessmentOption: resolve(assessmentOption),
safeCalendarColor: htmlSafe('#123456'),
sessionCount: 0,
active: true,
});
let sessionType3 = EmberObject.create({
id: 2,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
safeCalendarColor: htmlSafe('#cccccc'),
sessionCount: 2,
active: true,
});
this.set('sessionTypes', [sessionType1, sessionType2, sessionType3]);
this.set('nothing', parseInt);
await render(hbs`{{school-session-types-list
sessionTypes=sessionTypes
manageSessionType=(action nothing)
}}`);
const rows = 'table tbody tr';
const firstSessionType = `${rows}:nth-of-type(1)`;
const firstTitle = `${firstSessionType} td:nth-of-type(1)`;
const firstSessionCount = `${firstSessionType} td:nth-of-type(2)`;
const firstAssessment = `${firstSessionType} td:nth-of-type(3) svg`;
const firstAssessmentOption = `${firstSessionType} td:nth-of-type(4)`;
const firstColorBox = `${firstSessionType} td:nth-of-type(6) .box`;
const secondSessionType = `${rows}:nth-of-type(2)`;
const secondTitle = `${secondSessionType} td:nth-of-type(1)`;
const secondSessionCount = `${secondSessionType} td:nth-of-type(2)`;
const secondAssessment = `${secondSessionType} td:nth-of-type(3) svg`;
const secondAssessmentOption = `${secondSessionType} td:nth-of-type(4)`;
const secondColorBox = `${secondSessionType} td:nth-of-type(6) .box`;
const thirdSessionType = `${rows}:nth-of-type(3)`;
const thirdTitle = `${thirdSessionType} td:nth-of-type(1)`;
const thirdSessionCount = `${thirdSessionType} td:nth-of-type(2)`;
const thirdAssessment = `${thirdSessionType} td:nth-of-type(3) svg`;
const thirdAssessmentOption = `${thirdSessionType} td:nth-of-type(4)`;
const thirdColorBox = `${thirdSessionType} td:nth-of-type(6) .box`;
assert.dom(firstTitle).hasText('first');
assert.dom(firstSessionCount).hasText('2');
assert.dom(firstAssessment).hasClass('no');
assert.dom(firstAssessment).hasClass('fa-ban');
assert.dom(firstAssessmentOption).hasText('');
assert.equal(find(firstColorBox).style.getPropertyValue('background-color').trim(), ('rgb(204, 204, 204)'));
assert.dom(secondTitle).hasText('second');
assert.dom(secondSessionCount).hasText('0');
assert.dom(secondAssessment).hasClass('yes');
assert.dom(secondAssessment).hasClass('fa-check');
assert.dom(secondAssessmentOption).hasText('formative');
assert.equal(find(secondColorBox).style.getPropertyValue('background-color').trim(), ('rgb(18, 52, 86)'));
assert.ok(find(thirdTitle).textContent.trim().startsWith('not needed anymore'));
assert.ok(find(thirdTitle).textContent.trim().endsWith('(inactive)'));
assert.dom(thirdSessionCount).hasText('2');
assert.dom(thirdAssessment).hasClass('no');
assert.dom(thirdAssessment).hasClass('fa-ban');
assert.dom(thirdAssessmentOption).hasText('');
assert.equal(find(thirdColorBox).style.getPropertyValue('background-color').trim(), ('rgb(255, 255, 255)'));
});
test('clicking edit fires action', async function(assert) {
assert.expect(1);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff'
});
this.set('sessionTypes', [sessionType]);
this.set('manageSessionType', sessionTypeId => {
assert.equal(sessionTypeId, 1);
});
await render(hbs`{{school-session-types-list
sessionTypes=sessionTypes
manageSessionType=(action manageSessionType)
}}`);
await settled();
const rows = 'table tbody tr';
const edit = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-edit`;
await click(edit);
});
test('clicking title fires action', async function(assert) {
assert.expect(1);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff'
});
this.set('sessionTypes', [sessionType]);
this.set('manageSessionType', sessionTypeId => {
assert.equal(sessionTypeId, 1);
});
await render(hbs`{{school-session-types-list
sessionTypes=sessionTypes
manageSessionType=(action manageSessionType)
}}`);
await settled();
const rows = 'table tbody tr';
const title = `${rows}:nth-of-type(1) td:nth-of-type(1) a`;
await click(title);
});
test('session types without sessions can be deleted', async function(assert) {
assert.expect(4);
let unlinkedSessionType = EmberObject.create({
id: 1,
school: 1,
title: 'unlinked',
active: true,
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 0,
deleteRecord(){
assert.ok(true, 'was deleted');
return resolve();
}
});
let linkedSessionType = EmberObject.create({
id: 1,
school: 1,
title: 'linked',
active: true,
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 5,
deleteRecord(){
assert.ok(true, 'was deleted');
return resolve();
}
});
this.set('sessionTypes', [linkedSessionType, unlinkedSessionType]);
this.set('nothing', parseInt);
await render(hbs`{{school-session-types-list
sessionTypes=sessionTypes
manageSessionType=(action nothing)
canDelete=true
}}`);
await settled();
const rows = 'table tbody tr';
const linkedTitle = `${rows}:nth-of-type(1) td:nth-of-type(1)`;
const unlinkedTitle = `${rows}:nth-of-type(2) td:nth-of-type(1)`;
const linkedTrash = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-trash.disabled`;
const unlinkedTrash = `${rows}:nth-of-type(2) td:nth-of-type(7) .fa-trash.enabled`;
assert.dom(linkedTitle).hasText('linked', 'linked is first');
assert.dom(unlinkedTitle).hasText('unlinked', 'unlinked is second');
assert.dom(linkedTrash).exists({ count: 1 }, 'linked has a disabled trash can');
assert.dom(unlinkedTrash).exists({ count: 1 }, 'unlinked has an enabled trash can');
});
test('clicking delete deletes the record', async function(assert) {
assert.expect(2);
let sessionType = EmberObject.create({
id: 1,
school: 1,
title: 'first',
assessment: false,
assessmentOption: resolve(null),
calendarColor: '#fff',
sessionCount: 0,
deleteRecord(){
assert.ok(true, 'was deleted');
},
save(){
assert.ok(true, 'was deleted');
return resolve();
},
});
this.set('sessionTypes', [sessionType]);
this.set('nothing', parseInt);
await render(hbs`{{school-session-types-list
sessionTypes=sessionTypes
manageSessionType=(action nothing)
canDelete=true
}}`);
await settled();
const rows = 'table tbody tr';
const trash = `${rows}:nth-of-type(1) td:nth-of-type(7) .fa-trash`;
await click(trash);
await settled();
});
});
| Java |
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Threading;
using Dependinator.Common.ModelMetadataFolders;
using Dependinator.Common.ModelMetadataFolders.Private;
using Dependinator.Common.SettingsHandling;
using Dependinator.Utils;
using Dependinator.Utils.Dependencies;
using Dependinator.Utils.ErrorHandling;
using Dependinator.Utils.Net;
using Dependinator.Utils.OsSystem;
using Dependinator.Utils.Serialization;
using Dependinator.Utils.Threading;
using Microsoft.Win32;
namespace Dependinator.Common.Installation.Private
{
[SingleInstance]
internal class LatestVersionService : ILatestVersionService
{
private static readonly TimeSpan IdleTimerInterval = TimeSpan.FromMinutes(1);
private static readonly TimeSpan IdleTimeBeforeRestarting = TimeSpan.FromMinutes(10);
private static readonly string latestUri =
"https://api.github.com/repos/michael-reichenauer/Dependinator/releases/latest";
private static readonly string UserAgent = "Dependinator";
private readonly ModelMetadata modelMetadata;
private readonly ISettingsService settingsService;
private readonly IStartInstanceService startInstanceService;
private DispatcherTimer idleTimer;
private DateTime lastIdleCheck = DateTime.MaxValue;
public LatestVersionService(
IStartInstanceService startInstanceService,
ISettingsService settingsService,
ModelMetadata modelMetadata)
{
this.startInstanceService = startInstanceService;
this.settingsService = settingsService;
this.modelMetadata = modelMetadata;
}
public event EventHandler OnNewVersionAvailable;
public void StartCheckForLatestVersion()
{
idleTimer = new DispatcherTimer();
idleTimer.Tick += CheckIdleBeforeRestart;
idleTimer.Interval = IdleTimerInterval;
idleTimer.Start();
SystemEvents.PowerModeChanged += OnPowerModeChange;
}
public async Task CheckLatestVersionAsync()
{
if (settingsService.Get<Options>().DisableAutoUpdate)
{
return;
}
if (await IsNewRemoteVersionAvailableAsync())
{
await DownloadLatestVersionAsync();
await IsNewRemoteVersionAvailableAsync();
}
}
private async Task<bool> IsNewRemoteVersionAvailableAsync()
{
Version remoteVersion = await GetLatestRemoteVersionAsync();
Version currentVersion = Version.Parse(ProgramInfo.Version);
Version installedVersion = ProgramInfo.GetInstalledVersion();
Version setupVersion = ProgramInfo.GetSetupVersion();
LogVersion(currentVersion, installedVersion, remoteVersion, setupVersion);
return installedVersion < remoteVersion && setupVersion < remoteVersion;
}
private async Task<bool> DownloadLatestVersionAsync()
{
try
{
Log.Info($"Downloading remote setup {latestUri} ...");
LatestInfo latestInfo = GetCachedLatestVersionInfo();
if (latestInfo == null)
{
// No installed version.
return false;
}
using (HttpClientDownloadWithProgress httpClient = GetDownloadHttpClient())
{
await DownloadSetupAsync(httpClient, latestInfo);
return true;
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Error($"Failed to install new version {e}");
}
return false;
}
private static async Task<string> DownloadSetupAsync(
HttpClientDownloadWithProgress httpClient, LatestInfo latestInfo)
{
Asset setupFileInfo = latestInfo.assets.First(a => a.name == $"{ProgramInfo.Name}Setup.exe");
string downloadUrl = setupFileInfo.browser_download_url;
Log.Info($"Downloading {latestInfo.tag_name} from {downloadUrl} ...");
Timing t = Timing.Start();
httpClient.ProgressChanged += (totalFileSize, totalBytesDownloaded, progressPercentage) =>
{
Log.Info($"Downloading {latestInfo.tag_name} {progressPercentage}% (time: {t.Elapsed}) ...");
};
string setupPath = ProgramInfo.GetSetupFilePath();
if (File.Exists(setupPath))
{
File.Delete(setupPath);
}
await httpClient.StartDownloadAsync(downloadUrl, setupPath);
Log.Info($"Downloaded {latestInfo.tag_name} to {setupPath}");
return setupPath;
}
private async Task<Version> GetLatestRemoteVersionAsync()
{
try
{
M<LatestInfo> latestInfo = await GetLatestInfoAsync();
if (latestInfo.IsOk && latestInfo.Value.tag_name != null)
{
Version version = Version.Parse(latestInfo.Value.tag_name.Substring(1));
return version;
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Warn($"Failed to get latest version {e}");
}
return new Version(0, 0, 0, 0);
}
private async Task<M<LatestInfo>> GetLatestInfoAsync()
{
try
{
using (HttpClient httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Add("user-agent", UserAgent);
// Try get cached information about latest remote version
string eTag = GetCachedLatestVersionInfoEtag();
if (!string.IsNullOrEmpty(eTag))
{
// There is cached information, lets use the ETag when checking to follow
// GitHub Rate Limiting method.
httpClient.DefaultRequestHeaders.IfNoneMatch.Clear();
httpClient.DefaultRequestHeaders.IfNoneMatch.Add(new EntityTagHeaderValue(eTag));
}
HttpResponseMessage response = await httpClient.GetAsync(latestUri);
if (response.StatusCode == HttpStatusCode.NotModified || response.Content == null)
{
return GetCachedLatestVersionInfo();
}
string latestInfoText = await response.Content.ReadAsStringAsync();
Log.Debug("New version info");
if (response.Headers.ETag != null)
{
eTag = response.Headers.ETag.Tag;
CacheLatestVersionInfo(eTag, latestInfoText);
}
return Json.As<LatestInfo>(latestInfoText);
}
}
catch (Exception e) when (e.IsNotFatal())
{
Log.Exception(e, "Failed to download latest setup");
return Error.From(e);
}
}
private LatestInfo GetCachedLatestVersionInfo()
{
ProgramSettings programSettings = settingsService.Get<ProgramSettings>();
return Json.As<LatestInfo>(programSettings.LatestVersionInfo);
}
private string GetCachedLatestVersionInfoEtag()
{
ProgramSettings programSettings = settingsService.Get<ProgramSettings>();
return programSettings.LatestVersionInfoETag;
}
private void CacheLatestVersionInfo(string eTag, string latestInfoText)
{
if (string.IsNullOrEmpty(eTag)) return;
// Cache the latest version info
settingsService.Edit<ProgramSettings>(s =>
{
s.LatestVersionInfoETag = eTag;
s.LatestVersionInfo = latestInfoText;
});
}
private static void LogVersion(Version current, Version installed, Version remote, Version setup)
{
Log.Usage(
$"Version current: {current}, installed: {installed}, remote: {remote}, setup {setup}");
}
private void NotifyIfNewVersionIsAvailable()
{
if (IsNewVersionInstalled())
{
OnNewVersionAvailable?.Invoke(this, EventArgs.Empty);
}
}
private void OnPowerModeChange(object sender, PowerModeChangedEventArgs e)
{
Log.Info($"Power mode {e.Mode}");
if (e.Mode == PowerModes.Resume)
{
if (IsNewVersionInstalled())
{
Log.Info("Newer version is installed, restart ...");
if (startInstanceService.StartInstance(modelMetadata.ModelFilePath))
{
// Newer version is started, close this instance
Application.Current.Shutdown(0);
}
}
}
}
private void CheckIdleBeforeRestart(object sender, EventArgs e)
{
TimeSpan timeSinceCheck = DateTime.UtcNow - lastIdleCheck;
bool wasSleeping = false;
if (timeSinceCheck > IdleTimerInterval + TimeSpan.FromMinutes(1))
{
// The timer did not tick within the expected timeout, thus computer was probably sleeping.
Log.Info($"Idle timer timeout, was: {timeSinceCheck}");
wasSleeping = true;
}
lastIdleCheck = DateTime.UtcNow;
TimeSpan idleTime = SystemIdle.GetLastInputIdleTimeSpan();
if (wasSleeping || idleTime > IdleTimeBeforeRestarting)
{
if (IsNewVersionInstalled())
{
if (startInstanceService.StartInstance(modelMetadata.ModelFilePath))
{
// Newer version is started, close this instance
Application.Current.Shutdown(0);
}
}
}
}
private static bool IsNewVersionInstalled()
{
Version currentVersion = Version.Parse(ProgramInfo.Version);
Version installedVersion = ProgramInfo.GetInstalledVersion();
Log.Debug($"Current version: {currentVersion} installed version: {installedVersion}");
return currentVersion < installedVersion;
}
private static HttpClientDownloadWithProgress GetDownloadHttpClient()
{
HttpClientDownloadWithProgress client = new HttpClientDownloadWithProgress();
client.NetworkActivityTimeout = TimeSpan.FromSeconds(30);
client.HttpClient.Timeout = TimeSpan.FromSeconds(60 * 5);
client.HttpClient.DefaultRequestHeaders.Add("user-agent", UserAgent);
return client;
}
// Type used when parsing latest version information json
public class LatestInfo
{
public Asset[] assets;
public string tag_name;
}
// Type used when parsing latest version information json
internal class Asset
{
public string browser_download_url;
public int download_count;
public string name;
}
}
}
| Java |
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
// define the schema for our user model
var authUserSchema = mongoose.Schema({
unique_ID : String,
username : String,
password : String,
role : String,
first_name : String,
last_name : String
});
// methods ======================
// generating a hash
authUserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
};
// checking if password is valid
authUserSchema.methods.validPassword = function(password) {
return bcrypt.compareSync(password, this.password);
};
// create the model for users and expose it to our app
module.exports = mongoose.model('authUser', authUserSchema);
| Java |
<?php
namespace fm\KitBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class KitBundle extends Bundle
{
}
| Java |
from notifications_utils.clients.antivirus.antivirus_client import (
AntivirusClient,
)
from notifications_utils.clients.redis.redis_client import RedisClient
from notifications_utils.clients.zendesk.zendesk_client import ZendeskClient
antivirus_client = AntivirusClient()
zendesk_client = ZendeskClient()
redis_client = RedisClient()
| Java |
/**
* Copyright 2012-2018, Plotly, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
var Lib = require('../../lib');
// The contour extraction is great, except it totally fails for constraints because we
// need weird range loops and flipped contours instead of the usual format. This function
// does some weird manipulation of the extracted pathinfo data such that it magically
// draws contours correctly *as* constraints.
module.exports = function(pathinfo, operation) {
var i, pi0, pi1;
var op0 = function(arr) { return arr.reverse(); };
var op1 = function(arr) { return arr; };
switch(operation) {
case '][':
case ')[':
case '](':
case ')(':
var tmp = op0;
op0 = op1;
op1 = tmp;
// It's a nice rule, except this definitely *is* what's intended here.
/* eslint-disable: no-fallthrough */
case '[]':
case '[)':
case '(]':
case '()':
/* eslint-enable: no-fallthrough */
if(pathinfo.length !== 2) {
Lib.warn('Contour data invalid for the specified inequality range operation.');
return;
}
// In this case there should be exactly two contour levels in pathinfo. We
// simply concatenate the info into one pathinfo and flip all of the data
// in one. This will draw the contour as closed.
pi0 = pathinfo[0];
pi1 = pathinfo[1];
for(i = 0; i < pi0.edgepaths.length; i++) {
pi0.edgepaths[i] = op0(pi0.edgepaths[i]);
}
for(i = 0; i < pi0.paths.length; i++) {
pi0.paths[i] = op0(pi0.paths[i]);
}
while(pi1.edgepaths.length) {
pi0.edgepaths.push(op1(pi1.edgepaths.shift()));
}
while(pi1.paths.length) {
pi0.paths.push(op1(pi1.paths.shift()));
}
pathinfo.pop();
break;
case '>=':
case '>':
if(pathinfo.length !== 1) {
Lib.warn('Contour data invalid for the specified inequality operation.');
return;
}
// In this case there should be exactly two contour levels in pathinfo. We
// simply concatenate the info into one pathinfo and flip all of the data
// in one. This will draw the contour as closed.
pi0 = pathinfo[0];
for(i = 0; i < pi0.edgepaths.length; i++) {
pi0.edgepaths[i] = op0(pi0.edgepaths[i]);
}
for(i = 0; i < pi0.paths.length; i++) {
pi0.paths[i] = op0(pi0.paths[i]);
}
break;
}
};
| Java |
module.exports = {
defersToPromises : function(defers) {
if(Array.isArray(defers)) {
return defers.map(function(defer) {
return defer && defer.promise ?
defer.promise :
defer;
});
}
var res = {};
Object.keys(defers).forEach(function(key) {
res[key] = defers[key] && defers[key].promise ?
defers[key].promise :
defer;
});
return res;
}
}; | Java |
export default (sequelize, DataTypes) => {
const Product = sequelize.define('Product', {
name: DataTypes.STRING,
description: DataTypes.TEXT,
price: DataTypes.FLOAT,
releasedate: DataTypes.DATE
}, {
classMethods: {
associate: models => {
Product.belongsToMany(models.Cart, {through: 'ProductCart'});
Product.belongsToMany(models.Platform, {through: 'ProductPlatform'});
Product.belongsTo(models.SpecialEdition);
}
}
});
return Product;
};
| Java |
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>lora imoti</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/modern-business.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/pgwslideshow.css" rel="stylesheet">
<link href="css/pgwslideshow.min.css" rel="stylesheet">
<link href="css/pgwslideshow_light.css" rel="stylesheet">
<link href="css/pgwslideshow_light.min.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Lora imoti</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="about.html">About</a>
</li>
<li>
<a href="team.html">Team</a>
</li>
<li>
<a href="services.html">Services</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Portfolio <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="portfolio-1-col.html">1 Column Portfolio</a>
</li>
<li>
<a href="portfolio-2-col.html">2 Column Portfolio</a>
</li>
<li>
<a href="portfolio-3-col.html">3 Column Portfolio</a>
</li>
<li>
<a href="portfolio-4-col.html">4 Column Portfolio</a>
</li>
</ul>
</li>
<li>
<a href="search.php">Search</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Top <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="naem.html">Naem</a>
</li>
<li>
<a href="prodava.html">Prodava</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Naem <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="ednostaen.html">Ednostaen</a>
</li>
<li>
<a href="dvustaen.html">Dvustaen</a>
</li>
<li>
<a href="tristaen.html">Tristaen</a>
</li>
<li>
<a href="mnogostaen.html">Mnogostaen</a>
</li>
<li>
<a href="mezonet.html">Mezonet</a>
</li>
<li>
<a href="Ofis.html">Ofis</a>
</li>
<li>
<a href="magazin.html">Magazin</a>
</li>
<li>
<a href="zavedenie.html">Zavedenie</a>
</li>
<li>
<a href="kashta.html">Kashta</a>
</li>
<li>
<a href="sklad.html">Sklad</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Prodava <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="1_Ednostaen.html">Ednostaen</a>
</li>
<li>
<a href="2_Dvustaen.html">Dvustaen</a>
</li>
<li>
<a href="3_Tristaen.html">Tristaen</a>
</li>
<li>
<a href="4_Mnogostaen.html">Mnogostaen</a>
</li>
<li>
<a href="5_Mezonet.html">Mezonet</a>
</li>
<li>
<a href="6_Ofis.html">Ofis</a>
</li>
<li>
<a href="7_Magazin.html">Magazin</a>
</li>
<li>
<a href="8_Zavedenie.html">Zavedenie</a>
</li>
<li>
<a href="9_Kashta.html">Kashta</a>
</li>
<li>
<a href="10_Sklad.html">Sklad</a>
</li>
</ul>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Naem dvustaen apartament
</h1>
</div>
<div class="row">
<div class="col-md-4">
<a href="dvustaen-vraska-1.html">
<img class="img-responsive img-hover" src="img/hol.jpg" alt="">
</a>
<h3>
<a href="dvustaenn-vraska-1.html">Centar</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-2.html">
<img class="img-responsive img-hover" src="img/holluk.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-2.html">Malchika</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-3.html">
<img class="img-responsive img-hover" src="img/kuhnq.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-3.html">Gagarin</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
</div>
<!-- /.row -->
<!-- Projects Row -->
<div class="row">
<div class="col-md-4">
<a href="dvustaen-vraska-4.html">
<img class="img-responsive img-hover" src="img/doc.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vrask-4.html">Belomorski</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-5.html">
<img class="img-responsive img-hover" src="img/ofice.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-5.html">Marasha</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
<div class="col-md-4">
<a href="dvustaen-vraska-6.html">
<img class="img-responsive img-hover" src="img/docum.jpg" alt="">
</a>
<h3>
<a href="dvustaen-vraska-6.html">Centar</a>
</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam viverra euismod odio, gravida pellentesque urna varius vitae.</p>
</div>
</div>
</div>
<!-- Pagination -->
<div class="row text-center">
<div class="col-lg-12">
<ul class="pagination">
<li>
<a href="#">«</a>
</li>
<li class="active">
<a href="#">1</a>
</li>
<li>
<a href="#">2</a>
</li>
<li>
<a href="#">3</a>
</li>
<li>
<a href="#">4</a>
</li>
<li>
<a href="#">5</a>
</li>
<li>
<a href="#">»</a>
</li>
</ul>
</div>
</div>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
| Java |
<?php
namespace Glucose\Exceptions\User;
class PrimaryKeyCollisionException extends \Glucose\Exceptions\Entity\DuplicateEntityException {
} | Java |
Arktrail
========
You are the captain of a futuristic interstellar ark that quite honestly, left space-dock months too early.
Will you patch up your ship and survive the long journey between worlds to finish the space gate you are tasked to build, or will your ship succumb to the perils of interstellar space?
#####
Current version uses LibGDX 1.3.1 and Artemis-odb 1.7.1<br/>
Originally coded in 48 hours for Ludum Dare 30!
##### License
The MIT License (MIT)
##### Links
*Play it here:*
http://www.mostlyoriginal.net/play-arktrail/
*Coding Timelapse:*
http://youtu.be/A6wYyjA10tA
*More of my games:*
http://www.mostlyoriginal.net/
| Java |
require "tenant/engine"
module Tenant
end
| Java |
import { SET_SORT_ORDER } from '../constants/actions';
export default function (state = 'ASCENDING', action) {
switch (action.type) {
case SET_SORT_ORDER:
return action.order;
default:
return state;
}
}
| Java |
<app-header></app-header>
<app-slider></app-slider>
<<div class="container text-center">
<h1 id="title">Delicious Recipes</h1>
<p>Angular</p>
<h4>The Tranquil Gazelles</h4>
<img [src]="gazelles" class="img-circle" alt="Us">
<p>We have created a fictional food SPA.</p>
</div>
<div class="latest-recipes row eq-height">
<h3 class="col-sm-12" id="enjoy">Enjoy Our Recipes</h3>
<div *ngFor="let recipe of allRecipes; let i=index" class="col-sm-12 col-md-3 eq-height" (click)="redirectToDetails(recipe?.key)">
<div *ngIf="i<8" class="recipe-container"> <!-- shows only 8 recipes -->
<img src="{{recipe.img}}" alt="recipe image">
<p><strong>{{recipe.title}}</strong></p>
</div>
</div>
</div>
<app-footer></app-footer> | Java |
import mongoose from 'mongoose';
const ModelPortfolioSchema = new mongoose.Schema({
id: String,
name: String,
displayName: String,
email: String,
securities: [{
symbol: String,
allocation: {type: Number, min: 0, max: 100},
}]
});
ModelPortfolioSchema.add({
subGroups: [ModelPortfolioSchema],
modelPortfolios: [ModelPortfolioSchema],
});
export default mongoose.model('ModelPortfolio', ModelPortfolioSchema);
| Java |
import React, { Component } from 'react';
class Home extends Component {
render () {
return (
<div>
<h1>Home</h1>
<p>Bienvenidos!!!</p>
<pre>{`
{
path: '/',
pathExact: true,
component: Home
},
{
path: '/pageOne',
pathExact: true,
component: PageOne
},
{
path: '/pageTwo',
pathExact: true,
component: PageTwo
},
{
path: '/pageThree',
pathExact: true,
auth: true,
component: PageThree,
routes: [
// PAGE 3/ADD
{
path: '/pageThree/add',
pathExact: true,
auth: true,
component: PageThreeAdd
},
// PAGE 4
{
path: '/pageFour/:id/:action',
auth: true,
component: PageFour
}
]
},
// 404 NOT FOUND
{
component: NotFound
}
`}
</pre>
</div>
);
}
}
export default Home;
| Java |
---
author: Joanna Rothkopf
lang: en
title: 'The sharing economy is a lie: Uber, Ayn Rand and the truth about tech and libertarians'
---
Horror stories about the increasingly unpopular taxi service Uber have been commonplace in recent months, but there is still much to be learned from its handling of the recent hostage drama in downtown Sydney, Australia. We’re told that we reveal our true character in moments of crisis, and apparently that’s as true for companies as it is for individuals.
A number of experts have challenged the idea that the horrific explosion of violence in a Sydney café was “terrorism,” since the attacker was mentally unbalanced and acted alone. But, terror or not, the ordeal was certainly terrifying. Amid the chaos and uncertainty, the city believed itself to be under a coordinated and deadly attack.
Uber had an interesting, if predictable, response to the panic and mayhem: It raised prices. A lot.
In case you missed the story, the facts are these: Someone named Man Haron Monis, who was considered mentally unstable and had been investigated for murdering his ex-wife, seized hostages in a café that was located in Sydney’s Central Business District or “CBD.” In the process he put up an Islamic flag – “igniting,” as [Reuters] reported, “fears of a jihadist attack in the heart of the country’s biggest city.”
In the midst of the fear, Uber stepped in and tweeted this announcement: “We are all concerned with events in CBD. Fares have increased to encourage more drivers to come online & pick up passengers in the area.”
As [Mashable] reports, the company announced that it would charge a minimum of \$100 Australian to take passengers from the area immediately surrounding the ongoing crisis, and prices increased by as much as four times the standard amount. A firestorm of criticism quickly erupted – “[@Uber\_Sydney] stop being assholes,” one Twitter response began – and Uber soon found itself offering free rides out of the troubled area instead.
That opener suggests that Uber, as part of a community under siege, is preparing to respond in a civic manner.
*“… Fares have increased to encourage more drivers to come online & pick up passengers in the area.”*
But, despite the expression of shared concern, there is no sense of *civitas* to be found in the statement that follows. There is only a transaction, executed at what the corporation believes to be market value. Lesson \#1 about Uber is, therefore, that in its view there is no heroism, only self-interest. This is Ayn Rand’s brutal, irrational and primitive philosophy in its purest form: altruism is evil, and self-interest is the only true heroism.
There was once a time when we might have read of “hero cabdrivers” or “hero bus drivers” placing themselves in harm’s way to rescue their fellow citizens. For its part, Uber might have suggested that it would use its network of drivers and its scheduling software to recruit volunteer drivers for a rescue mission.
Instead, we are told that Uber’s pricing surge *was* its expression of concern. Uber’s way to address a human crisis is apparently by letting the market govern human behavior, as if there were (in libertarian economist Tyler Cowen’s phrase) “markets in everything” – including the lives of a city’s beleaguered citizens (and its Uber drivers).
Where would this kind of market-driven practice leave poor or middle-income citizens in a time of crisis? If they can’t afford the “surged” price, apparently it would leave them squarely in the line of fire. And come to think of it, why would Uber drivers value their lives so cheaply, unless they’re underpaid?
One of the lessons of Sydney is this: Uber’s philosophy, whether consciously expressed or not, is that life belongs to the highest bidder – and therefore, by implication, the highest bidder’s life has the greatest value. Society, on the other hand, may choose to believe that every life has equal value – or that lifesaving services should be available at affordable prices.
If nothing else, the Sydney experience should prove once and for all that there is no such thing as “the sharing economy.” Uber is a taxi company, albeit an under-regulated one, and nothing more. It’s certainly not a “ride sharing” service, where someone who happens to be going in the same direction is willing to take along an extra passenger and split gas costs. A ride-sharing service wouldn’t find itself “increasing fares to encourage more drivers” to come into Sydney’s terrorized Central Business District.
A “sharing economy,” by definition, is lateral in structure. It is a peer-to-peer economy. But Uber, as its name suggests, is hierarchical in structure. It monitors and controls its drivers, demanding that they purchase services from it while guiding their movements and determining their level of earnings. And its pricing mechanisms impose unpredictable costs on its customers, extracting greater amounts whenever the data suggests customers can be compelled to pay them.
This is a top-down economy, not a “shared” one.
A number of Uber’s fans and supporters defended the company on the grounds that its “surge prices,” including those seen during the Sydney crisis, are determined by an algorithm. But an algorithm can be an ideological statement, and is always a cultural artifact. As human creations, algorithms reflect their creators.
Uber’s tweet during the Sydney crisis made it sound as if human intervention, rather than algorithmic processes, caused prices to soar that day. But it doesn’t really matter if that surge was manually or algorithmically driven. Either way the prices were Uber’s doing – and its moral choice.
Uber has been strenuously defending its surge pricing in the wake of accusations (apparently [justified]) that the company enjoyed windfall profits during Hurricane Sandy. It has now promised the state of New York that it will cap its surge prices (at three times the highest rate on two non-emergency days). But if Uber has its way, it will soon enjoy a monopolistic stranglehold on car service rates in most major markets. And it has demonstrated its willingness to ignore rules and regulations. That means predictable and affordable taxi fares could become a thing of the past.
In practice, surge pricing could become a new, privatized form of taxation on middle-class taxi customers.
Even without surge pricing, Uber and its supporters are hiding its full costs. When middle-class workers are underpaid or deprived of benefits and full working rights, as Uber’s [reportedly are], the entire middle-class economy suffers. Overall wages and benefits are suppressed for the majority, while the wealthy few are made even richer. The invisible costs of ventures like Uber are extracted over time, far surpassing whatever short-term savings they may occasionally offer.
Like Walmart, Uber underpays its employees – many of its drivers *are* employees, in everything but name – and then drains the social safety net to make up the difference. While Uber preaches libertarianism, it practices a form of corporate welfare. It’s reportedly [celebrating Obamacare], for example, since the Affordable Care Act allows it to avoid providing health insurance to its workforce. But the ACA’s subsidies, together with Uber’s often woefully insufficient wages, mean that the rest of us are paying its tab instead. And the lack of income security among Uber’s drivers creates another social cost for Americans – in lost tax revenue, and possibly in increased use of social services.
The company’s war on regulation will also carry a social price. Uber and its supporters don’t seem to understand that regulations exist for a reason. It’s true that nobody likes excessive bureaucracy, but not all regulations are excessive or onerous. And when they are, it’s a flaw in execution rather than principle.
Regulations were created because they serve a social purpose, ensuring the free and fair exchange of services and resources among all segments of society. Some services, such as transportation, are of such importance that the public has a vested interest in ensuring they will be readily available at reasonably affordable prices. That’s not unreasonable for taxi services, especially given the fact that they profit from publicly maintained roads and bridges.
Uber has presented itself as a modernized, efficient alternative to government oversight. But it’s an evasion of regulation, not its replacement. As [Alexis Madrigal]reports, Uber has deliberately ignored city regulators and used customer demand to force its model of inadequate self-governance (my conclusion, not his) onto one city after another.
Uber presented itself as a refreshing alternative to the over-bureaucratized world of urban transportation. But that’s a false choice. We can streamline sclerotic city regulators, upgrade taxi fleets and even provide users with fancy apps that make it easier to call a cab. The company’s binary presentation – us, or City Hall – frames the debate in artificial terms.
Uber claims that its driver rating system is a more efficient way to monitor drivers, but that’s an entirely unproven assumption. While taxi drivers have been known to misbehave, the worldwide litany of complaints against Uber drivers – for everything from dirty cars and [spider bites] to [assault with a hammer], [fondling] and [rape]– suggest that Uber’s system may not work as well as old-fashioned regulation. It’s certainly not noticeably superior.
In fact, [prosecutors in San Francisco and Los Angeles] say Uber has been lying to its customers about the level and quality of its background checks. The company now promises it will do a better job at screening drivers. But it [won’t tell us] what measures its taking to improve its safety record, and it’s [fighting the kind of driver scrutiny][won’t tell us] that taxicab companies have been required to enforce for many decades.
Many reports suggest that beleaguered drivers don’t feel much better about the company than victimized passengers do. They tell [horror stories] about the company’s hiring and management practices. Uber [unilaterally slashes drivers’ rates], while claiming they don’t need to unionize. (The [Teamsters] disagree.)
The company also pushes [sketchy, substandard loans] onto its drivers – but hey, what could go wrong?
Uber has many libertarian defenders. And yet, it [deceives the press] and [threatens to spy on journalists], [lies to its own employees], keeps its practices a secret and routinely invades the privacy of civilians – sometimes merely for entertainment. (It has a tool, with the Orwellian name the “[God View],” that it can use for monitoring customers’ personal movements.)
Aren’t those the kinds of things libertarians say they hate about *government*?
This isn’t a “gotcha” exercise. It matters. Uber is the poster child for the pro-privatization, anti-regulatory ideology that ascribes magical powers to technology and the private sector. It is deeply a political entity, from its Nietzschean name to its recent hiring of White House veteran David Plouffe. Uber is built around a relatively simple app (which relies on government-created technology), but it’s not really a tech company. Above all else Uber is an ideological campaign, a neoliberal project whose real products are deregulation and the dismantling of the social contract.
Or maybe, as that tweeter in Sydney suggested, they’re just assholes.
Either way, it’s important that Uber’s worldview and business practices not be allowed to “disrupt” our economy or our social fabric. People who work hard deserve to make a decent living. Society at large deserves access to safe and affordable transportation. And government, as the collective expression of a democratic society, has a role to play in protecting its citizens.
And then there’s the matter of our collective psyche. In her book “A Paradise Built in Hell: The Extraordinary Communities that Arise in Disaster,” Rebecca Solnit wrote of the purpose, meaning and deep satisfaction people find when they pull together to help one another in the face of adversity. But in the world Uber seeks to create, those surges of the spirit would be replaced by surge pricing.
You don’t need a “God view” to see what happens next. When heroism is reduced to a transaction, the soul of a society is sold cheap.
[Reuters]: http://www.reuters.com/article/2014/12/15/us-australia-security-idUSKBN0JS0WX20141215
[Mashable]: http://mashable.com/2014/12/14/uber-sydney-surge-pricing/
[@Uber\_Sydney]: https://twitter.com/Uber_Sydney
[justified]: http://gothamist.com/2012/11/04/uber.php
[reportedly are]: http://www.businessinsider.com/uber-drivers-say-theyre-making-less-than-minimum-wage-2014-10
[celebrating Obamacare]: http://www.washingtonpost.com/blogs/wonkblog/wp/2014/11/17/why-uber-loves-obamacare/
[Alexis Madrigal]: http://fusion.net/story/33680/the-inside-story-of-how-the-uber-portland-negotiations-broke-down/
[spider bites]: http://consumerist.com/2014/07/30/uber-passenger-complains-of-spider-bite-in-filthy-car/
[assault with a hammer]: http://www.forbes.com/sites/ellenhuet/2014/09/30/uber-driver-hammer-attack-liability/
[fondling]: http://www.businessinsider.com/uber-nikki-williams-2014-12
[rape]: http://www.businessinsider.com/an-uber-driver-allegedly-raped-a-female-passenger-in-boston-2014-12
[prosecutors in San Francisco and Los Angeles]: http://www.huffingtonpost.com/2014/12/09/uber-california-lawsuit_n_6298206.html
[won’t tell us]: http://consumerist.com/2014/12/18/uber-reportedly-revamping-security-wont-say-exactly-what-its-doing/
[horror stories]: http://qz.com/299655/why-your-uber-driver-hates-uber/
[unilaterally slashes drivers’ rates]: http://www.salon.com/2014/09/03/uber_unrest_drivers_in_los_angeles_protest_the_slashing_of_rates/
[Teamsters]: http://www.fastcompany.com/3037371/the-teamsters-of-the-21st-century-how-uber-lyft-and-facebook-drivers-are-organizing
[sketchy, substandard loans]: http://thinkprogress.org/economy/2014/11/06/3589715/uber-lending-investigation/
[deceives the press]: http://pando.com/2014/10/29/uber-prs-latest-trick-impersonating-its-drivers-and-trying-to-scam-journalists/
[threatens to spy on journalists]: http://www.slate.com/blogs/the_slatest/2014/11/17/uber_exec_suggests_using_personal_info_against_journalists.html
[lies to its own employees]: http://money.cnn.com/2014/08/04/technology/uber-lyft/
[God View]: http://www.forbes.com/sites/kashmirhill/2014/10/03/god-view-uber-allegedly-stalked-users-for-party-goers-viewing-pleasure/
| Java |
<ion-view view-title="{{ctrl.guideTitle}}">
<ion-content>
<div class="list">
<div class="card-panel grey lighten-4" ng-repeat="guide in ctrl.guides">
<div ng-repeat="guideline in guide.guidelines">
<div class="item-text-wrap">{{guideline.text}}</div>
</div>
</div>
</div>
</ion-content>
</ion-view>
| Java |
define('findScriptUrls', [], function () {
return function(pattern) {
var type = typeof pattern, i, tags = document.querySelectorAll("script"), matches = [], src;
for (i = 0; i < tags.length; i++) {
src = tags[i].src || "";
if (type === "string") {
if (src.indexOf(pattern) !== -1) {
matches.push(src);
}
} else if (pattern.test(src)) {
matches.push(src);
}
}
return matches;
};
}); | Java |
<h2>Sprzątanie pobojowisk</h2>
<?php
f('jednostki_miasto');
$jednostki = jednostki_miasto($gracz);
if(!empty($_POST['cel']) && !empty($_POST['u'])){
f('sprzatanie_wyslij');
echo sprzatanie_wyslij($jednostki,$_POST['cel'],$_POST['u'],$gracz);
$gracz = gracz($gracz['gracz']);
f('jednostki_miasto');
$jednostki = jednostki_miasto($gracz);
} elseif(!empty($_GET['przerwij'])){
f('sprzatanie_przerwij');
echo sprzatanie_przerwij($gracz,$_GET['przerwij']);
$gracz = gracz($gracz['gracz']);
}
if(!empty($jednostki)){
$razem = 0;
$echo ="
<p>
<br style='clear:both'/>
<form action ='?a=sprzatanie' method='post'>
<table>
<tr>
<td>cel </td>
<td><input type='text' name='cel' class='input2' value ='".$_GET['cel']."'></td>
</tr>
";
foreach($jednostki as $oddzial){
if($oddzial['ilosc'] > 0){
$razem = 1;
$echo .="
<tr>
<td>".$oddzial['nazwa']." ( ".$oddzial['ilosc']." ) <span style='float:right'> udźwig: ".$oddzial['udzwig']."</span></td>
<td> <input type='text' class='input2' name='u[".$oddzial['id']."]' ></td>
</tr>
";
}
}
$echo .="
<tr>
<th colspan='2'><input type='submit' class='submit' value='wyślij'></th>
</tr>
</table>
</form>
</p>";
if($razem == 0){
echo "<p class='error'>Nie posiadasz jednostek</p>";
} else {
echo $echo;
}
} else echo "<p class='error'>Brak jednostek w grze</p>";
$wyslane = mysql_query("select * from osadnicy_sprzatanie inner join osadnicy_miasta on do_miasto = miasto where z_miasto = ".$gracz['aktywne_miasto']." order by koniec asc");
if(mysql_num_rows($wyslane) > 0){
echo "<hr/>Akcje<br/>
<table>
<tr>
<th>cel</th>
<th></th>
</tr>
";
$czas = time();
while($akcja = mysql_fetch_array($wyslane)){
$pozostalo = $akcja['koniec'] - $czas;
if($akcja['status'] == 0){
$tekst = "wyprawa kieruje się do miasta <i><b>".$akcja['nazwa']."</b></i>";
$opcja = " <a href='?a=sprzatanie&przerwij=".$akcja['id']."'>X</a>";
} else {
$tekst = "wyprawa powraca z miasta <i><b>".$akcja['nazwa']."</b></i>";
$opcja = "";
}
echo "
<tr align='center'>
<td>".$tekst."</td>
<td>
<span id='sp".$akcja['id']."'></span>
<script type='text/javascript'>liczCzas('sp".$akcja['id']."',".$pozostalo.");</script>
".$opcja."
</td>
</tr>";
}
echo "</table>";
}
?>
| Java |
package net.tmachq.Ported_Blocks.tileentities.renderers;
import java.io.DataInputStream;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import org.lwjgl.opengl.GL11;
import net.tmachq.Ported_Blocks.models.SailModel;
public class TileEntitySailRenderer extends TileEntitySpecialRenderer {
private final SailModel model;
public TileEntitySailRenderer() {
this.model = new SailModel();
}
@Override
public void renderTileEntityAt(TileEntity te, double x, double y, double z, float scale) {
int rotation = 180;
switch (te.getBlockMetadata() % 4) {
case 0:
rotation = 0;
break;
case 3:
rotation = 90;
break;
case 2:
rotation = 180;
break;
case 1:
rotation = 270;
break;
}
GL11.glPushMatrix();
int i = te.getBlockMetadata();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glRotatef(rotation, 0.0F, 1.0F, 0.0F);
Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("Ported_Blocks:textures/texturemaps/Sail_HD.png"));
GL11.glScalef(1.0F, -1F, -1F);
model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
}
private void adjustLightFixture(World world, int i, int j, int k, Block block) {
Tessellator tess = Tessellator.instance;
float brightness = block.getBlockBrightness(world, i, j, k);
int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
int modulousModifier = skyLight % 65536;
int divModifier = skyLight / 65536;
tess.setColorOpaque_F(brightness, brightness, brightness);
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) modulousModifier, divModifier);
}
} | Java |
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually
#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
enum MENUPARTS
{
MENUPartFiller0 = 0x0,
MP_MENUITEM = 0x1,
MP_MENUDROPDOWN = 0x2,
MP_MENUBARITEM = 0x3,
MP_MENUBARDROPDOWN = 0x4,
MP_CHEVRON = 0x5,
MP_SEPARATOR = 0x6,
};
END_ATF_NAMESPACE
| Java |
// Karma configuration
// http://karma-runner.github.io/0.12/config/configuration-file.html
// Generated on 2015-05-11 using
// generator-karma 0.8.3
module.exports = function(config) {
'use strict';
config.set({
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'app/scripts/**/*.js',
'test/mock/**/*.js',
'test/spec/**/*.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [
'PhantomJS'
],
// Which plugins to enable
plugins: [
'karma-phantomjs-launcher',
'karma-jasmine'
],
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false,
colors: true,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
// Uncomment the following lines if you are using grunt's server to run the tests
// proxies: {
// '/': 'http://localhost:9000/'
// },
// URL root prevent conflicts with the site root
// urlRoot: '_karma_'
});
};
| Java |
var indexSectionsWithContent =
{
0: "dfrsw~",
1: "drs",
2: "dfrs~",
3: "rs",
4: "w"
};
var indexSectionNames =
{
0: "all",
1: "classes",
2: "functions",
3: "variables",
4: "pages"
};
var indexSectionLabels =
{
0: "All",
1: "Classes",
2: "Functions",
3: "Variables",
4: "Pages"
};
| Java |
---
layout: post
title: 1212 TIL
excerpt: ""
tags: [TIL]
categories: [TIL]
link:
comments: true
pinned: true
image:
feature:
---
## Today Check List
- [ ] S3로 이미지 업로딩 테스트
- [ ] 지도 위치 DB에 넣기
- [ ] 그룹스터디 express 환경세팅
## Tomorrow Check List
## Today I learned
### Spring
뷰 데이터를 Controller로 전달하는 여러가지 방법.
* https://netframework.tistory.com/entry/25-View-%EB%8D%B0%EC%9D%B4%ED%84%B0%EC%9D%98-Controller-%EC%A0%84%EB%8B%AC-%EB%B0%A9%EB%B2%95
자바에서 String을 JSON으로 변환하는 방법
* https://zzznara2.tistory.com/673
자바 각종 타입 변환
* https://blog.opid.kr/248
## Today's Algorithm
| Java |
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table :users do |t|
## Database authenticatable
t.boolean :admin
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps null: false
end
add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end
| Java |
class RoomSerializer < ActiveModel::Serializer
attribute :id
attribute :name, key: :title
end
| Java |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Authentication extends CI_Controller {
function index(){
$value = $this->input->cookie('remember_me');
if ($value == 'true') {
$arr = array(
'user' => $this->input->cookie('user'),
'real_name' => $this->input->cookie('real_name'),
'user_id' => $this->input->cookie('user_id'),
);
$this->session->set_userdata($arr);
}
$this->load->view('login_view');
}
function create_user(){
$this->load->library('myencryption');
$arr = array('username'=>$this->myencryption->encode('admin'),
'password'=>$this->myencryption->encode('123'));
$this->db->insert('user',$arr);
}
function resetPassword(){
$this->load->library('myencryption');
$this->load->library('form_validation');
$this->form_validation->set_rules('resetmail','Reset email','valid_email');
$this->form_validation->set_error_delimiters('<div class="alert alert-warning">','</div>');
if ($this->form_validation->run() == false) {
$this->load->view('login_view');
}else{
$mail = $this->input->post('resetmail');
$this->db->where('email_address',trim(strtolower($mail)));
$result = $this->db->get('user');
if ($result->num_rows() == 1 ){
function get_random_password($chars_min=8, $chars_max=10, $use_upper_case=true, $include_numbers=true, $include_special_chars=false){
$length = rand($chars_min, $chars_max);
$selection = 'aeuoyibcdfghjklmnpqrstvwxz';
if($include_numbers) {
$selection .= "1234567890";
}
if($include_special_chars) {
$selection .= "!@\"#$%&[]{}?|";
}
$password = "";
for($i=0; $i<$length; $i++) {
$current_letter = $use_upper_case ? (rand(0,1) ? strtoupper($selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))]) : $selection[(rand() % strlen($selection))];
$password .= $current_letter;
}
return $password;
}
$newpass = get_random_password();
$this->db->where('email_address',trim(strtolower($mail)));
$newpass1 = $this->myencryption->encode($newpass);
$this->db->update('user',array('password'=>$newpass1));
if ($this->db->affected_rows() == 1){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.gmail.com',
'smtp_port' => 465,
'smtp_user' => 'thythona168@gmail.com',
'smtp_pass' => 'Broskomsot123',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email',$config);
$this->email->set_newline("\r\n");
// Set to, from, message, etc.
$this->email->from('thythona168@gmail.com', 'Rest password MSC');
$this->email->to($mail);
$this->email->subject('New Password');
$this->email->message('Your New Password is : '.$newpass);
if (! $this->email->send()) {
$arr['message'] = '<div class="alert alert-warning" style="text-align:left">Reset password failed. please try again later.</div>';
$this->load->view('login_view',$arr);
}else{
$arr['message'] = '<div class="alert alert-success" style="text-align:left">Reset password successful. Please check your email for the new password</div>';
$this->load->view('login_view',$arr);
}
}
}else{
$arr['message'] = '<div class="alert alert-warning">Given reset email dose not exist!</div>';
$this->load->view('login_view',$arr);
}
}
}
function validation(){
$this->load->library('myencryption');
$this->load->library('form_validation');
$this->form_validation->set_rules('username','Username','required');
$this->form_validation->set_rules('password','Password','required');
$this->form_validation->set_error_delimiters('<div class="alert alert-warning">','</div>');
if ($this->form_validation->run() == false ) {
$this->load->view('login_view');
}else{
$username = $this->input->post('username');
$password = $this->input->post('password');
$rememberme = $this->input->post('rememberme');
$this->db->where('username',$this->myencryption->encode($username));
$this->db->where('password',$this->myencryption->encode($password));
$result = $this->db->get('user');
if ($result->num_rows()==1) {
$value = $result->row();
if ($rememberme == 'on'){
$arr = array('user'=>TRUE,'real_name'=>$value->real_name,'user_id'=>$value->id);
$this->session->set_userdata($arr);
$cookie = array(
'name' => 'remember_me',
'value' => 'true',
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'user',
'value' => TRUE,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'real_name',
'value' => $value->real_name,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
$cookie = array(
'name' => 'user_id',
'value' => $value->id,
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
}else{
$arr = array('user'=>TRUE,'real_name'=>$value->real_name,'user_id'=>$value->id);
$this->session->set_userdata($arr);
$cookie = array(
'name' => 'remember_me',
'value' => 'false',
'expire' => '15000000',
'prefix' => ''
);
$this->input->set_cookie($cookie);
}
redirect('home');
}else{
$arr['message'] = '<div class="alert alert-danger" style="text-align:left">Incorrect username or password !!! </div>';
$this->load->view('login_view',$arr);
}
}
}
} | Java |
/*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Web Client
* Copyright (C) 2006, 2007, 2009, 2010 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.webClient.build;
import java.io.*;
import java.util.*;
import java.util.regex.*;
import org.apache.tools.ant.*;
import org.apache.tools.ant.types.*;
public class PackageJammerTask
extends Task {
//
// Constants
//
private static final Pattern RE_DEFINE = Pattern.compile("^AjxPackage\\.define\\(['\"]([^'\"]+)['\"]\\);?");
private static final Pattern RE_UNDEFINE = Pattern.compile("^AjxPackage\\.undefine\\(['\"]([^'\"]+)['\"]\\);?");
private static final Pattern RE_REQUIRE = Pattern.compile("^AjxPackage\\.require\\(['\"]([^'\"]+)['\"](.*?)\\);?");
private static final Pattern RE_REQUIRE_OBJ = Pattern.compile("^AjxPackage\\.require\\((\\s*\\{\\s*name\\s*:\")?([^'\"]+)['\"](.*?)\\);?");
private static final String OUTPUT_JS = "js";
private static final String OUTPUT_HTML = "html";
private static final String OUTPUT_ALL = "all";
//
// Data
//
// attributes
private File destFile;
private File jsFile;
private File htmlFile;
private List<Source> sources = new LinkedList<Source>();
private File dependsFile;
private String output = OUTPUT_JS;
private String basepath = "";
private String extension = ".js";
private boolean verbose = false;
// children
private Text prefix;
private Text suffix;
private List<JammerFiles> files = new LinkedList<JammerFiles>();
// internal state
private String depth;
private Map<String,Boolean> defines;
private boolean isJs = true;
private boolean isHtml = false;
private boolean isAll = false;
//
// Public methods
//
// attributes
public void setDestFile(File file) {
this.destFile = file;
}
public void setJsDestFile(File file) {
this.jsFile = file;
}
public void setHtmlDestFile(File file) {
this.htmlFile = file;
}
public void setJsDir(File dir) {
Source source = new Source();
source.setDir(dir);
this.sources.clear();
this.sources.add(source);
}
public void setDependsFile(File file) {
this.dependsFile = file;
}
public void setOutput(String output) {
this.output = output;
this.isAll = OUTPUT_ALL.equals(output);
this.isHtml = this.isAll || OUTPUT_HTML.equals(output);
this.isJs = this.isAll || OUTPUT_JS.equals(output) || !this.isHtml;
}
public void setBasePath(String basepath) {
this.basepath = basepath;
}
public void setExtension(String extension) {
this.extension = extension;
}
public void setVerbose(boolean verbose) {
this.verbose = verbose;
}
// children
public Text createPrefix() {
return this.prefix = new Text();
}
public Text createSuffix() {
return this.suffix = new Text();
}
public FileList createFileList() {
JammerFileList fileList = new JammerFileList();
this.files.add(fileList);
return fileList;
}
public FileSet createFileSet() {
JammerFileSet fileSet = new JammerFileSet();
this.files.add(fileSet);
return fileSet;
}
public Source createSrc() {
Source source = new Source();
this.sources.add(source);
return source;
}
//
// Task methods
//
public void execute() throws BuildException {
this.depth = "";
this.defines = new HashMap<String,Boolean>();
PrintWriter jsOut = null;
PrintWriter htmlOut = null;
PrintWriter dependsOut = null;
try {
if (this.isJs) {
File file = this.jsFile != null ? this.jsFile : this.destFile;
log("Jamming to ",file.toString());
jsOut = new PrintWriter(new FileWriter(file));
}
if (this.isHtml) {
File file = this.htmlFile != null ? this.htmlFile : this.destFile;
log("Jamming to ",file.toString());
htmlOut = new PrintWriter(new FileWriter(file));
}
if (this.dependsFile != null) {
log("Dependencies saved to "+this.dependsFile);
dependsOut = new PrintWriter(new FileWriter(this.dependsFile));
}
if (this.prefix != null) {
PrintWriter out = OUTPUT_JS.equals(this.prefix.output) ? jsOut : htmlOut;
if (out != null) {
out.println(this.prefix.toString());
}
}
List<String> packages = new LinkedList<String>();
for (JammerFiles files : this.files) {
boolean wrap = files.isWrapped();
boolean isManifest = files.isManifest();
File dir = files.getDir(this.getProject());
for (String filename : files.getFiles(this.getProject())) {
File file = new File(dir, filename);
String pkg = path2package(stripExt(filename).replace(File.separatorChar, '/'));
packages.add(pkg);
if (this.isHtml && !isManifest) {
printHTML(htmlOut, pkg, files.getBasePath(), files.getExtension());
}
jamFile(jsOut, htmlOut, file, pkg, packages, wrap, true, dependsOut);
}
}
if (this.isHtml && packages.size() > 0 && htmlOut != null) {
htmlOut.println("<script type=\"text/javascript\">");
for (String pkg : packages) {
htmlOut.print("AjxPackage.define(\"");
htmlOut.print(pkg);
htmlOut.println("\");");
}
htmlOut.println("</script>");
}
if (this.suffix != null) {
PrintWriter out = OUTPUT_JS.equals(this.prefix.output) ? jsOut : htmlOut;
if (out != null) {
out.println(this.suffix.toString());
}
}
}
catch (IOException e) {
throw new BuildException(e);
}
finally {
if (jsOut != null) jsOut.close();
if (htmlOut != null) htmlOut.close();
if (dependsOut != null) dependsOut.close();
}
}
//
// Private methods
//
private void jamFile(PrintWriter jsOut, PrintWriter htmlOut, File ifile,
String pkg, List<String> packages,
boolean wrap, boolean top, PrintWriter dependsOut)
throws IOException {
if (this.verbose) log("file: ",ifile.toString());
BufferedReader in = new BufferedReader(new FileReader(ifile));
boolean isJS = ifile.getName().endsWith(".js");
// "wrap" source
if (this.isJs && isJS && pkg != null && wrap && jsOut != null) {
jsOut.print("if (AjxPackage.define(\"");
jsOut.print(pkg);
jsOut.println("\")) {");
}
// remember this file
if (dependsOut != null) {
dependsOut.println(ifile.getCanonicalPath());
dependsOut.flush();
}
// read file
String line;
while ((line = in.readLine()) != null) {
// define package
String define = matchDefine(line);
if (define != null) {
if (this.verbose) log("define ", define);
this.defines.put(package2path(define), true);
continue;
}
// undefine package
String undefine = matchUndefine(line);
if (undefine != null) {
if (this.verbose) log("undefine ", undefine);
this.defines.remove(package2path(undefine));
continue;
}
// require package
String require = matchRequire(line);
if (require != null) {
if (this.verbose) log("require ", require);
String path = package2path(require);
if (this.defines.get(path) == null) {
packages.add(require);
// output script tag
if (this.isHtml && !path.endsWith("__all__")) {
printHTML(htmlOut, require, null, null);
}
// implicitly define and jam on!
this.defines.put(path, true);
File file = this.getFileForPath(path);
String odepth = this.verbose ? this.depth : null;
if (this.verbose) this.depth += " ";
jamFile(jsOut, htmlOut, file, path2package(require), packages, wrap, false, dependsOut);
if (this.verbose) this.depth = odepth;
}
continue;
}
// leave line intact
if (this.isJs && isJS && jsOut != null) {
jsOut.println(line);
}
}
if (this.isJs && isJS && pkg != null && wrap && jsOut != null) {
jsOut.println("}");
}
in.close();
}
private File getFileForPath(String path) {
String name = path.replace('/',File.separatorChar)+".js";
File file = null;
for (Source source : this.sources) {
String filename = name;
if (source.prefix != null && name.startsWith(source.prefix+"/")) {
filename = name.substring(source.prefix.length() + 1);
}
file = new File(source.dir, filename);
if (file.exists()) {
break;
}
}
return file;
}
private void printHTML(PrintWriter out, String pkg, String basePath, String extension) {
if (out == null) return;
String path = package2path(pkg);
out.print("<script type=\"text/javascript\" src=\"");
out.print(basePath != null ? basePath : this.basepath);
out.print(path);
out.print(extension != null ? extension : this.extension);
out.println("\"></script>");
}
private String matchDefine(String s) {
Matcher m = RE_DEFINE.matcher(s);
return m.matches() ? m.group(1) : null;
}
private String matchUndefine(String s) {
Matcher m = RE_UNDEFINE.matcher(s);
return m.matches() ? m.group(1) : null;
}
private String matchRequire(String s) {
Matcher m = RE_REQUIRE.matcher(s);
if (m.matches()){
return m.group(1);
}
m = RE_REQUIRE_OBJ.matcher(s);
if (m.matches()){
return m.group(2);
}
return null;
}
private void log(String... ss) {
System.out.print(this.depth);
for (String s : ss) {
System.out.print(s);
}
System.out.println();
}
//
// Private functions
//
private static String package2path(String pkg) {
return pkg.replace('.', '/').replaceAll("\\*$", "__all__");
}
private static String path2package(String path) {
return path.replace('/', '.').replaceAll("\\*$", "__all__");
}
private static String stripExt(String fname) {
return fname.replaceAll("\\..+$", "");
}
//
// Classes
//
private static interface JammerFiles {
public boolean isWrapped();
public boolean isManifest();
public String getBasePath();
public String getExtension();
public File getDir(Project project);
public String[] getFiles(Project project);
}
public static class JammerFileList
extends FileList
implements JammerFiles {
//
// Data
//
private boolean wrap = true;
private boolean manifest = true;
private String basePath;
private String extension;
//
// Public methods
//
public void setWrap(boolean wrap) {
this.wrap = wrap;
}
public boolean isWrapped() {
return this.wrap;
}
public void setManifest(boolean manifest) {
this.manifest = manifest;
}
public boolean isManifest() {
return this.manifest;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return this.basePath;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getExtension() {
return this.extension;
}
} // class JammerFileList
public static class JammerFileSet
extends FileSet
implements JammerFiles {
//
// Data
//
private boolean wrap = true;
private boolean manifest = true;
private String basePath;
private String extension;
//
// Public methods
//
public String[] getFiles(Project project) {
return this.getDirectoryScanner(project).getIncludedFiles();
}
public void setWrap(boolean wrap) {
this.wrap = wrap;
}
public boolean isWrapped() {
return wrap;
}
public void setManifest(boolean manifest) {
this.manifest = manifest;
}
public boolean isManifest() {
return this.manifest;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return this.basePath;
}
public void setExtension(String extension) {
this.extension = extension;
}
public String getExtension() {
return this.extension;
}
} // class JammerFileList
public static class Text {
public String output = PackageJammerTask.OUTPUT_JS;
private StringBuilder str = new StringBuilder();
public void setOutput(String output) {
this.output = output;
}
public void addText(String s) {
str.append(s);
}
public String toString() { return str.toString(); }
}
public class Source {
public File dir;
public String prefix;
public void setDir(File dir) {
this.dir = dir;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}
} // class PackageJammerTask
| Java |
var pub = {},
Q,
Knex;
module.exports = function ($inject) {
$inject = $inject || {};
Q = $inject.Q;
Knex = $inject.Knex;
return pub;
};
pub.get = function(tableName) {
var q = Q.defer();
pub.getMetadata(tableName)
.then(function(relations) {
q.resolve(relations[0]);
});
return q.promise;
};
pub.getMetadata = function(tableName) {
return Knex.knex.raw('SELECT ' +
'KCU1.CONSTRAINT_NAME AS FK_CONSTRAINT_NAME, ' +
'KCU1.COLUMN_NAME AS FK_COLUMN_NAME, ' +
'KCU2.CONSTRAINT_NAME AS REFERENCED_CONSTRAINT_NAME, ' +
'KCU2.TABLE_NAME AS REFERENCED_TABLE_NAME, ' +
'KCU2.COLUMN_NAME AS REFERENCED_COLUMN_NAME ' +
'FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS AS RC ' +
'INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU1 ' +
'ON KCU1.CONSTRAINT_CATALOG = RC.CONSTRAINT_CATALOG ' +
'AND KCU1.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA ' +
'AND KCU1.CONSTRAINT_NAME = RC.CONSTRAINT_NAME ' +
'AND KCU1.TABLE_NAME = RC.TABLE_NAME ' +
'INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS KCU2 ' +
'ON KCU2.CONSTRAINT_CATALOG = RC.UNIQUE_CONSTRAINT_CATALOG ' +
'AND KCU2.CONSTRAINT_SCHEMA = RC.UNIQUE_CONSTRAINT_SCHEMA ' +
'AND KCU2.CONSTRAINT_NAME = RC.UNIQUE_CONSTRAINT_NAME ' +
'AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION ' +
'AND KCU2.TABLE_NAME = RC.REFERENCED_TABLE_NAME ' +
'WHERE kcu1.table_name = ?', tableName);
};
| Java |
using System.Web.Mvc;
using FFLTask.SRV.ServiceInterface;
using FFLTask.UI.PC.Filter;
using FFLTask.SRV.ViewModel.Account;
using FFLTask.SRV.ViewModel.Shared;
namespace FFLTask.UI.PC.Controllers
{
public class RegisterController : BaseController
{
private IRegisterService _registerService;
public RegisterController(IRegisterService registerService)
{
_registerService = registerService;
}
#region URL: /Register
[HttpGet]
[CheckCookieEnabled]
public ActionResult Index()
{
return View(new RegisterModel());
}
[HttpPost]
public ActionResult Index(RegisterModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}
model.ImageCode = imageCodeHelper.CheckResult();
if (model.ImageCode.ImageCodeError != ImageCodeError.NoError)
{
return View(model);
}
if (_registerService.GetUserByName(model.UserName) > 0)
{
ModelState.AddModelError("UserName", "*用户名已被使用");
return View(model);
}
int userId = _registerService.Do(model);
userHelper.SetUserId(userId.ToString());
return RedirectToAction("Profile", "User");
}
#endregion
#region Ajax
public JsonResult IsUserNameExist(string name)
{
bool duplicated = _registerService.GetUserByName(name) > 0;
return Json(duplicated);
}
#endregion
}
}
| Java |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name')->unique();
$table->string('empresa')->unique();
$table->string('first_name');
$table->string('last_name');
$table->string('email')->unique()->nullable();
$table->string('password', 60);
$table->integer('role_id');
$table->rememberToken()->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
| Java |
# frozen_string_literal: true
require 'fieldhand/metadata_format'
module Fieldhand
# A parser for ListMetadataFormats responses.
#
# See https://www.openarchives.org/OAI/openarchivesprotocol.html#ListMetadataFormats
class ListMetadataFormatsParser
attr_reader :response_parser
# Return a parser for the given response parser.
def initialize(response_parser)
@response_parser = response_parser
end
# Return an array of `MetadataFormat`s found in the response.
def items
response_parser.
root.
locate('ListMetadataFormats/metadataFormat').
map { |item| MetadataFormat.new(item, response_parser.response_date) }
end
end
end
| Java |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Botos</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body{
color: #28fe14;
background-color: black;
font-family: "Courier New";
font-size: 15pt;
cursor: default
}
</style>
<script type="text/javascript">
document.ondragstart = function(){return false;}
document.oncontextmenu = function(){return false;}
document.onselectstart = function(){return false;}
</script>
</head>
<body>
| Java |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Resources
{
// Intentionally excluding visibility so it defaults to internal except for
// the one public version in System.Resources.ResourceManager which defines
// another version of this partial class with the public visibility
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
sealed partial class NeutralResourcesLanguageAttribute : Attribute
{
private readonly string _culture;
public NeutralResourcesLanguageAttribute(string cultureName)
{
if (cultureName == null)
throw new ArgumentNullException("cultureName");
_culture = cultureName;
}
public string CultureName
{
get { return _culture; }
}
}
}
| Java |
//---------------------------------------------------------------------------------------------------------------------
// <copyright company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//---------------------------------------------------------------------------------------------------------------------
namespace CodeGraphModel
{
using System.Collections.Generic;
using System.Runtime.Serialization;
[DataContract]
public class Symbol : Entity
{
[DataMember]
public string Name { get; set; }
[DataMember]
public string SymbolType { get; set; }
[DataMember]
public bool IsExternal { get; set; }
[DataMember]
public int LineStart { get; set; }
[DataMember]
public int LineEnd { get; set; }
[DataMember]
public int ColumnStart { get; set; }
[DataMember]
public int ColumnEnd { get; set; }
[DataMember]
public string FileUId { get; set; }
[DataMember]
public List<SymbolReference> References { get; set; }
public override string ToString()
{
return string.Format("[Name: {0}, Type: {1}, UId: {2}]", Name, Type, UId);
}
public override bool IsValid()
{
return this.Type == EntityType.Symbol;
}
}
public class SymbolResponse
{
[DataMember]
public string uid;
[DataMember]
public string name;
[DataMember]
public string type;
[DataMember]
public string fileUid;
[DataMember]
public int lineStart;
[DataMember]
public int lineEnd;
[DataMember]
public int columnStart;
[DataMember]
public int columnEnd;
}
} | Java |
// Compiled by ClojureScript 1.7.170 {}
goog.provide('figwheel.client.file_reloading');
goog.require('cljs.core');
goog.require('goog.string');
goog.require('goog.Uri');
goog.require('goog.net.jsloader');
goog.require('cljs.core.async');
goog.require('goog.object');
goog.require('clojure.set');
goog.require('clojure.string');
goog.require('figwheel.client.utils');
figwheel.client.file_reloading.queued_file_reload;
if(typeof figwheel.client.file_reloading.figwheel_meta_pragmas !== 'undefined'){
} else {
figwheel.client.file_reloading.figwheel_meta_pragmas = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
}
figwheel.client.file_reloading.on_jsload_custom_event = (function figwheel$client$file_reloading$on_jsload_custom_event(url){
return figwheel.client.utils.dispatch_custom_event.call(null,"figwheel.js-reload",url);
});
figwheel.client.file_reloading.before_jsload_custom_event = (function figwheel$client$file_reloading$before_jsload_custom_event(files){
return figwheel.client.utils.dispatch_custom_event.call(null,"figwheel.before-js-reload",files);
});
figwheel.client.file_reloading.namespace_file_map_QMARK_ = (function figwheel$client$file_reloading$namespace_file_map_QMARK_(m){
var or__16826__auto__ = (cljs.core.map_QMARK_.call(null,m)) && (typeof new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(m) === 'string') && (((new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) == null)) || (typeof new cljs.core.Keyword(null,"file","file",-1269645878).cljs$core$IFn$_invoke$arity$1(m) === 'string')) && (cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"type","type",1174270348).cljs$core$IFn$_invoke$arity$1(m),new cljs.core.Keyword(null,"namespace","namespace",-377510372)));
if(or__16826__auto__){
return or__16826__auto__;
} else {
cljs.core.println.call(null,"Error not namespace-file-map",cljs.core.pr_str.call(null,m));
return false;
}
});
figwheel.client.file_reloading.add_cache_buster = (function figwheel$client$file_reloading$add_cache_buster(url){
return goog.Uri.parse(url).makeUnique();
});
figwheel.client.file_reloading.name__GT_path = (function figwheel$client$file_reloading$name__GT_path(ns){
return (goog.dependencies_.nameToPath[ns]);
});
figwheel.client.file_reloading.provided_QMARK_ = (function figwheel$client$file_reloading$provided_QMARK_(ns){
return (goog.dependencies_.written[figwheel.client.file_reloading.name__GT_path.call(null,ns)]);
});
figwheel.client.file_reloading.fix_node_request_url = (function figwheel$client$file_reloading$fix_node_request_url(url){
if(cljs.core.truth_(goog.string.startsWith(url,"../"))){
return clojure.string.replace.call(null,url,"../","");
} else {
return [cljs.core.str("goog/"),cljs.core.str(url)].join('');
}
});
figwheel.client.file_reloading.immutable_ns_QMARK_ = (function figwheel$client$file_reloading$immutable_ns_QMARK_(name){
var or__16826__auto__ = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 9, ["svgpan.SvgPan",null,"far.out",null,"testDep.bar",null,"someprotopackage.TestPackageTypes",null,"goog",null,"an.existing.path",null,"cljs.core",null,"ns",null,"dup.base",null], null), null).call(null,name);
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
return cljs.core.some.call(null,cljs.core.partial.call(null,goog.string.startsWith,name),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, ["goog.","cljs.","clojure.","fake.","proto2."], null));
}
});
figwheel.client.file_reloading.get_requires = (function figwheel$client$file_reloading$get_requires(ns){
return cljs.core.set.call(null,cljs.core.filter.call(null,(function (p1__23844_SHARP_){
return cljs.core.not.call(null,figwheel.client.file_reloading.immutable_ns_QMARK_.call(null,p1__23844_SHARP_));
}),goog.object.getKeys((goog.dependencies_.requires[figwheel.client.file_reloading.name__GT_path.call(null,ns)]))));
});
if(typeof figwheel.client.file_reloading.dependency_data !== 'undefined'){
} else {
figwheel.client.file_reloading.dependency_data = cljs.core.atom.call(null,new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),cljs.core.PersistentArrayMap.EMPTY,new cljs.core.Keyword(null,"dependents","dependents",136812837),cljs.core.PersistentArrayMap.EMPTY], null));
}
figwheel.client.file_reloading.path_to_name_BANG_ = (function figwheel$client$file_reloading$path_to_name_BANG_(path,name){
return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([name], true));
});
/**
* Setup a path to name dependencies map.
* That goes from path -> #{ ns-names }
*/
figwheel.client.file_reloading.setup_path__GT_name_BANG_ = (function figwheel$client$file_reloading$setup_path__GT_name_BANG_(){
var nameToPath = goog.object.filter(goog.dependencies_.nameToPath,(function (v,k,o){
return goog.string.startsWith(v,"../");
}));
return goog.object.forEach(nameToPath,((function (nameToPath){
return (function (v,k,o){
return figwheel.client.file_reloading.path_to_name_BANG_.call(null,v,k);
});})(nameToPath))
);
});
/**
* returns a set of namespaces defined by a path
*/
figwheel.client.file_reloading.path__GT_name = (function figwheel$client$file_reloading$path__GT_name(path){
return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"pathToName","pathToName",-1236616181),path], null));
});
figwheel.client.file_reloading.name_to_parent_BANG_ = (function figwheel$client$file_reloading$name_to_parent_BANG_(ns,parent_ns){
return cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependency_data,cljs.core.update_in,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null),cljs.core.fnil.call(null,clojure.set.union,cljs.core.PersistentHashSet.EMPTY),cljs.core.PersistentHashSet.fromArray([parent_ns], true));
});
/**
* This reverses the goog.dependencies_.requires for looking up ns-dependents.
*/
figwheel.client.file_reloading.setup_ns__GT_dependents_BANG_ = (function figwheel$client$file_reloading$setup_ns__GT_dependents_BANG_(){
var requires = goog.object.filter(goog.dependencies_.requires,(function (v,k,o){
return goog.string.startsWith(k,"../");
}));
return goog.object.forEach(requires,((function (requires){
return (function (v,k,_){
return goog.object.forEach(v,((function (requires){
return (function (v_SINGLEQUOTE_,k_SINGLEQUOTE_,___$1){
var seq__23849 = cljs.core.seq.call(null,figwheel.client.file_reloading.path__GT_name.call(null,k));
var chunk__23850 = null;
var count__23851 = (0);
var i__23852 = (0);
while(true){
if((i__23852 < count__23851)){
var n = cljs.core._nth.call(null,chunk__23850,i__23852);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,k_SINGLEQUOTE_,n);
var G__23853 = seq__23849;
var G__23854 = chunk__23850;
var G__23855 = count__23851;
var G__23856 = (i__23852 + (1));
seq__23849 = G__23853;
chunk__23850 = G__23854;
count__23851 = G__23855;
i__23852 = G__23856;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null,seq__23849);
if(temp__4425__auto__){
var seq__23849__$1 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23849__$1)){
var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23849__$1);
var G__23857 = cljs.core.chunk_rest.call(null,seq__23849__$1);
var G__23858 = c__17629__auto__;
var G__23859 = cljs.core.count.call(null,c__17629__auto__);
var G__23860 = (0);
seq__23849 = G__23857;
chunk__23850 = G__23858;
count__23851 = G__23859;
i__23852 = G__23860;
continue;
} else {
var n = cljs.core.first.call(null,seq__23849__$1);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,k_SINGLEQUOTE_,n);
var G__23861 = cljs.core.next.call(null,seq__23849__$1);
var G__23862 = null;
var G__23863 = (0);
var G__23864 = (0);
seq__23849 = G__23861;
chunk__23850 = G__23862;
count__23851 = G__23863;
i__23852 = G__23864;
continue;
}
} else {
return null;
}
}
break;
}
});})(requires))
);
});})(requires))
);
});
figwheel.client.file_reloading.ns__GT_dependents = (function figwheel$client$file_reloading$ns__GT_dependents(ns){
return cljs.core.get_in.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.dependency_data),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"dependents","dependents",136812837),ns], null));
});
figwheel.client.file_reloading.build_topo_sort = (function figwheel$client$file_reloading$build_topo_sort(get_deps){
var get_deps__$1 = cljs.core.memoize.call(null,get_deps);
var topo_sort_helper_STAR_ = ((function (get_deps__$1){
return (function figwheel$client$file_reloading$build_topo_sort_$_topo_sort_helper_STAR_(x,depth,state){
var deps = get_deps__$1.call(null,x);
if(cljs.core.empty_QMARK_.call(null,deps)){
return null;
} else {
return topo_sort_STAR_.call(null,deps,depth,state);
}
});})(get_deps__$1))
;
var topo_sort_STAR_ = ((function (get_deps__$1){
return (function() {
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = null;
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1 = (function (deps){
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.call(null,deps,(0),cljs.core.atom.call(null,cljs.core.sorted_map.call(null)));
});
var figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3 = (function (deps,depth,state){
cljs.core.swap_BANG_.call(null,state,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [depth], null),cljs.core.fnil.call(null,cljs.core.into,cljs.core.PersistentHashSet.EMPTY),deps);
var seq__23903_23910 = cljs.core.seq.call(null,deps);
var chunk__23904_23911 = null;
var count__23905_23912 = (0);
var i__23906_23913 = (0);
while(true){
if((i__23906_23913 < count__23905_23912)){
var dep_23914 = cljs.core._nth.call(null,chunk__23904_23911,i__23906_23913);
topo_sort_helper_STAR_.call(null,dep_23914,(depth + (1)),state);
var G__23915 = seq__23903_23910;
var G__23916 = chunk__23904_23911;
var G__23917 = count__23905_23912;
var G__23918 = (i__23906_23913 + (1));
seq__23903_23910 = G__23915;
chunk__23904_23911 = G__23916;
count__23905_23912 = G__23917;
i__23906_23913 = G__23918;
continue;
} else {
var temp__4425__auto___23919 = cljs.core.seq.call(null,seq__23903_23910);
if(temp__4425__auto___23919){
var seq__23903_23920__$1 = temp__4425__auto___23919;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23903_23920__$1)){
var c__17629__auto___23921 = cljs.core.chunk_first.call(null,seq__23903_23920__$1);
var G__23922 = cljs.core.chunk_rest.call(null,seq__23903_23920__$1);
var G__23923 = c__17629__auto___23921;
var G__23924 = cljs.core.count.call(null,c__17629__auto___23921);
var G__23925 = (0);
seq__23903_23910 = G__23922;
chunk__23904_23911 = G__23923;
count__23905_23912 = G__23924;
i__23906_23913 = G__23925;
continue;
} else {
var dep_23926 = cljs.core.first.call(null,seq__23903_23920__$1);
topo_sort_helper_STAR_.call(null,dep_23926,(depth + (1)),state);
var G__23927 = cljs.core.next.call(null,seq__23903_23920__$1);
var G__23928 = null;
var G__23929 = (0);
var G__23930 = (0);
seq__23903_23910 = G__23927;
chunk__23904_23911 = G__23928;
count__23905_23912 = G__23929;
i__23906_23913 = G__23930;
continue;
}
} else {
}
}
break;
}
if(cljs.core._EQ_.call(null,depth,(0))){
return elim_dups_STAR_.call(null,cljs.core.reverse.call(null,cljs.core.vals.call(null,cljs.core.deref.call(null,state))));
} else {
return null;
}
});
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_ = function(deps,depth,state){
switch(arguments.length){
case 1:
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1.call(this,deps);
case 3:
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3.call(this,deps,depth,state);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___1;
figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_.cljs$core$IFn$_invoke$arity$3 = figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR___3;
return figwheel$client$file_reloading$build_topo_sort_$_topo_sort_STAR_;
})()
;})(get_deps__$1))
;
var elim_dups_STAR_ = ((function (get_deps__$1){
return (function figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_(p__23907){
var vec__23909 = p__23907;
var x = cljs.core.nth.call(null,vec__23909,(0),null);
var xs = cljs.core.nthnext.call(null,vec__23909,(1));
if((x == null)){
return cljs.core.List.EMPTY;
} else {
return cljs.core.cons.call(null,x,figwheel$client$file_reloading$build_topo_sort_$_elim_dups_STAR_.call(null,cljs.core.map.call(null,((function (vec__23909,x,xs,get_deps__$1){
return (function (p1__23865_SHARP_){
return clojure.set.difference.call(null,p1__23865_SHARP_,x);
});})(vec__23909,x,xs,get_deps__$1))
,xs)));
}
});})(get_deps__$1))
;
return topo_sort_STAR_;
});
figwheel.client.file_reloading.get_all_dependencies = (function figwheel$client$file_reloading$get_all_dependencies(ns){
var topo_sort_SINGLEQUOTE_ = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.get_requires);
return cljs.core.apply.call(null,cljs.core.concat,topo_sort_SINGLEQUOTE_.call(null,cljs.core.set.call(null,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [ns], null))));
});
figwheel.client.file_reloading.get_all_dependents = (function figwheel$client$file_reloading$get_all_dependents(nss){
var topo_sort_SINGLEQUOTE_ = figwheel.client.file_reloading.build_topo_sort.call(null,figwheel.client.file_reloading.ns__GT_dependents);
return cljs.core.reverse.call(null,cljs.core.apply.call(null,cljs.core.concat,topo_sort_SINGLEQUOTE_.call(null,cljs.core.set.call(null,nss))));
});
figwheel.client.file_reloading.unprovide_BANG_ = (function figwheel$client$file_reloading$unprovide_BANG_(ns){
var path = figwheel.client.file_reloading.name__GT_path.call(null,ns);
goog.object.remove(goog.dependencies_.visited,path);
goog.object.remove(goog.dependencies_.written,path);
return goog.object.remove(goog.dependencies_.written,[cljs.core.str(goog.basePath),cljs.core.str(path)].join(''));
});
figwheel.client.file_reloading.resolve_ns = (function figwheel$client$file_reloading$resolve_ns(ns){
return [cljs.core.str(goog.basePath),cljs.core.str(figwheel.client.file_reloading.name__GT_path.call(null,ns))].join('');
});
figwheel.client.file_reloading.addDependency = (function figwheel$client$file_reloading$addDependency(path,provides,requires){
var seq__23943 = cljs.core.seq.call(null,provides);
var chunk__23944 = null;
var count__23945 = (0);
var i__23946 = (0);
while(true){
if((i__23946 < count__23945)){
var prov = cljs.core._nth.call(null,chunk__23944,i__23946);
figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov);
var seq__23947_23955 = cljs.core.seq.call(null,requires);
var chunk__23948_23956 = null;
var count__23949_23957 = (0);
var i__23950_23958 = (0);
while(true){
if((i__23950_23958 < count__23949_23957)){
var req_23959 = cljs.core._nth.call(null,chunk__23948_23956,i__23950_23958);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23959,prov);
var G__23960 = seq__23947_23955;
var G__23961 = chunk__23948_23956;
var G__23962 = count__23949_23957;
var G__23963 = (i__23950_23958 + (1));
seq__23947_23955 = G__23960;
chunk__23948_23956 = G__23961;
count__23949_23957 = G__23962;
i__23950_23958 = G__23963;
continue;
} else {
var temp__4425__auto___23964 = cljs.core.seq.call(null,seq__23947_23955);
if(temp__4425__auto___23964){
var seq__23947_23965__$1 = temp__4425__auto___23964;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23947_23965__$1)){
var c__17629__auto___23966 = cljs.core.chunk_first.call(null,seq__23947_23965__$1);
var G__23967 = cljs.core.chunk_rest.call(null,seq__23947_23965__$1);
var G__23968 = c__17629__auto___23966;
var G__23969 = cljs.core.count.call(null,c__17629__auto___23966);
var G__23970 = (0);
seq__23947_23955 = G__23967;
chunk__23948_23956 = G__23968;
count__23949_23957 = G__23969;
i__23950_23958 = G__23970;
continue;
} else {
var req_23971 = cljs.core.first.call(null,seq__23947_23965__$1);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23971,prov);
var G__23972 = cljs.core.next.call(null,seq__23947_23965__$1);
var G__23973 = null;
var G__23974 = (0);
var G__23975 = (0);
seq__23947_23955 = G__23972;
chunk__23948_23956 = G__23973;
count__23949_23957 = G__23974;
i__23950_23958 = G__23975;
continue;
}
} else {
}
}
break;
}
var G__23976 = seq__23943;
var G__23977 = chunk__23944;
var G__23978 = count__23945;
var G__23979 = (i__23946 + (1));
seq__23943 = G__23976;
chunk__23944 = G__23977;
count__23945 = G__23978;
i__23946 = G__23979;
continue;
} else {
var temp__4425__auto__ = cljs.core.seq.call(null,seq__23943);
if(temp__4425__auto__){
var seq__23943__$1 = temp__4425__auto__;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23943__$1)){
var c__17629__auto__ = cljs.core.chunk_first.call(null,seq__23943__$1);
var G__23980 = cljs.core.chunk_rest.call(null,seq__23943__$1);
var G__23981 = c__17629__auto__;
var G__23982 = cljs.core.count.call(null,c__17629__auto__);
var G__23983 = (0);
seq__23943 = G__23980;
chunk__23944 = G__23981;
count__23945 = G__23982;
i__23946 = G__23983;
continue;
} else {
var prov = cljs.core.first.call(null,seq__23943__$1);
figwheel.client.file_reloading.path_to_name_BANG_.call(null,path,prov);
var seq__23951_23984 = cljs.core.seq.call(null,requires);
var chunk__23952_23985 = null;
var count__23953_23986 = (0);
var i__23954_23987 = (0);
while(true){
if((i__23954_23987 < count__23953_23986)){
var req_23988 = cljs.core._nth.call(null,chunk__23952_23985,i__23954_23987);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_23988,prov);
var G__23989 = seq__23951_23984;
var G__23990 = chunk__23952_23985;
var G__23991 = count__23953_23986;
var G__23992 = (i__23954_23987 + (1));
seq__23951_23984 = G__23989;
chunk__23952_23985 = G__23990;
count__23953_23986 = G__23991;
i__23954_23987 = G__23992;
continue;
} else {
var temp__4425__auto___23993__$1 = cljs.core.seq.call(null,seq__23951_23984);
if(temp__4425__auto___23993__$1){
var seq__23951_23994__$1 = temp__4425__auto___23993__$1;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__23951_23994__$1)){
var c__17629__auto___23995 = cljs.core.chunk_first.call(null,seq__23951_23994__$1);
var G__23996 = cljs.core.chunk_rest.call(null,seq__23951_23994__$1);
var G__23997 = c__17629__auto___23995;
var G__23998 = cljs.core.count.call(null,c__17629__auto___23995);
var G__23999 = (0);
seq__23951_23984 = G__23996;
chunk__23952_23985 = G__23997;
count__23953_23986 = G__23998;
i__23954_23987 = G__23999;
continue;
} else {
var req_24000 = cljs.core.first.call(null,seq__23951_23994__$1);
figwheel.client.file_reloading.name_to_parent_BANG_.call(null,req_24000,prov);
var G__24001 = cljs.core.next.call(null,seq__23951_23994__$1);
var G__24002 = null;
var G__24003 = (0);
var G__24004 = (0);
seq__23951_23984 = G__24001;
chunk__23952_23985 = G__24002;
count__23953_23986 = G__24003;
i__23954_23987 = G__24004;
continue;
}
} else {
}
}
break;
}
var G__24005 = cljs.core.next.call(null,seq__23943__$1);
var G__24006 = null;
var G__24007 = (0);
var G__24008 = (0);
seq__23943 = G__24005;
chunk__23944 = G__24006;
count__23945 = G__24007;
i__23946 = G__24008;
continue;
}
} else {
return null;
}
}
break;
}
});
figwheel.client.file_reloading.figwheel_require = (function figwheel$client$file_reloading$figwheel_require(src,reload){
goog.require = figwheel$client$file_reloading$figwheel_require;
if(cljs.core._EQ_.call(null,reload,"reload-all")){
var seq__24013_24017 = cljs.core.seq.call(null,figwheel.client.file_reloading.get_all_dependencies.call(null,src));
var chunk__24014_24018 = null;
var count__24015_24019 = (0);
var i__24016_24020 = (0);
while(true){
if((i__24016_24020 < count__24015_24019)){
var ns_24021 = cljs.core._nth.call(null,chunk__24014_24018,i__24016_24020);
figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24021);
var G__24022 = seq__24013_24017;
var G__24023 = chunk__24014_24018;
var G__24024 = count__24015_24019;
var G__24025 = (i__24016_24020 + (1));
seq__24013_24017 = G__24022;
chunk__24014_24018 = G__24023;
count__24015_24019 = G__24024;
i__24016_24020 = G__24025;
continue;
} else {
var temp__4425__auto___24026 = cljs.core.seq.call(null,seq__24013_24017);
if(temp__4425__auto___24026){
var seq__24013_24027__$1 = temp__4425__auto___24026;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__24013_24027__$1)){
var c__17629__auto___24028 = cljs.core.chunk_first.call(null,seq__24013_24027__$1);
var G__24029 = cljs.core.chunk_rest.call(null,seq__24013_24027__$1);
var G__24030 = c__17629__auto___24028;
var G__24031 = cljs.core.count.call(null,c__17629__auto___24028);
var G__24032 = (0);
seq__24013_24017 = G__24029;
chunk__24014_24018 = G__24030;
count__24015_24019 = G__24031;
i__24016_24020 = G__24032;
continue;
} else {
var ns_24033 = cljs.core.first.call(null,seq__24013_24027__$1);
figwheel.client.file_reloading.unprovide_BANG_.call(null,ns_24033);
var G__24034 = cljs.core.next.call(null,seq__24013_24027__$1);
var G__24035 = null;
var G__24036 = (0);
var G__24037 = (0);
seq__24013_24017 = G__24034;
chunk__24014_24018 = G__24035;
count__24015_24019 = G__24036;
i__24016_24020 = G__24037;
continue;
}
} else {
}
}
break;
}
} else {
}
if(cljs.core.truth_(reload)){
figwheel.client.file_reloading.unprovide_BANG_.call(null,src);
} else {
}
return goog.require_figwheel_backup_(src);
});
/**
* Reusable browser REPL bootstrapping. Patches the essential functions
* in goog.base to support re-loading of namespaces after page load.
*/
figwheel.client.file_reloading.bootstrap_goog_base = (function figwheel$client$file_reloading$bootstrap_goog_base(){
if(cljs.core.truth_(COMPILED)){
return null;
} else {
goog.require_figwheel_backup_ = (function (){var or__16826__auto__ = goog.require__;
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
return goog.require;
}
})();
goog.isProvided_ = (function (name){
return false;
});
figwheel.client.file_reloading.setup_path__GT_name_BANG_.call(null);
figwheel.client.file_reloading.setup_ns__GT_dependents_BANG_.call(null);
goog.addDependency_figwheel_backup_ = goog.addDependency;
goog.addDependency = (function() {
var G__24038__delegate = function (args){
cljs.core.apply.call(null,figwheel.client.file_reloading.addDependency,args);
return cljs.core.apply.call(null,goog.addDependency_figwheel_backup_,args);
};
var G__24038 = function (var_args){
var args = null;
if (arguments.length > 0) {
var G__24039__i = 0, G__24039__a = new Array(arguments.length - 0);
while (G__24039__i < G__24039__a.length) {G__24039__a[G__24039__i] = arguments[G__24039__i + 0]; ++G__24039__i;}
args = new cljs.core.IndexedSeq(G__24039__a,0);
}
return G__24038__delegate.call(this,args);};
G__24038.cljs$lang$maxFixedArity = 0;
G__24038.cljs$lang$applyTo = (function (arglist__24040){
var args = cljs.core.seq(arglist__24040);
return G__24038__delegate(args);
});
G__24038.cljs$core$IFn$_invoke$arity$variadic = G__24038__delegate;
return G__24038;
})()
;
goog.constructNamespace_("cljs.user");
goog.global.CLOSURE_IMPORT_SCRIPT = figwheel.client.file_reloading.queued_file_reload;
return goog.require = figwheel.client.file_reloading.figwheel_require;
}
});
figwheel.client.file_reloading.patch_goog_base = (function figwheel$client$file_reloading$patch_goog_base(){
if(typeof figwheel.client.file_reloading.bootstrapped_cljs !== 'undefined'){
return null;
} else {
figwheel.client.file_reloading.bootstrapped_cljs = (function (){
figwheel.client.file_reloading.bootstrap_goog_base.call(null);
return true;
})()
;
}
});
figwheel.client.file_reloading.reload_file_STAR_ = (function (){var pred__24042 = cljs.core._EQ_;
var expr__24043 = figwheel.client.utils.host_env_QMARK_.call(null);
if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"node","node",581201198),expr__24043))){
var path_parts = ((function (pred__24042,expr__24043){
return (function (p1__24041_SHARP_){
return clojure.string.split.call(null,p1__24041_SHARP_,/[\/\\]/);
});})(pred__24042,expr__24043))
;
var sep = (cljs.core.truth_(cljs.core.re_matches.call(null,/win.*/,process.platform))?"\\":"/");
var root = clojure.string.join.call(null,sep,cljs.core.pop.call(null,cljs.core.pop.call(null,path_parts.call(null,__dirname))));
return ((function (path_parts,sep,root,pred__24042,expr__24043){
return (function (request_url,callback){
var cache_path = clojure.string.join.call(null,sep,cljs.core.cons.call(null,root,path_parts.call(null,figwheel.client.file_reloading.fix_node_request_url.call(null,request_url))));
(require.cache[cache_path] = null);
return callback.call(null,(function (){try{return require(cache_path);
}catch (e24045){if((e24045 instanceof Error)){
var e = e24045;
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(cache_path)].join(''));
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),e.stack);
return false;
} else {
throw e24045;
}
}})());
});
;})(path_parts,sep,root,pred__24042,expr__24043))
} else {
if(cljs.core.truth_(pred__24042.call(null,new cljs.core.Keyword(null,"html","html",-998796897),expr__24043))){
return ((function (pred__24042,expr__24043){
return (function (request_url,callback){
var deferred = goog.net.jsloader.load(figwheel.client.file_reloading.add_cache_buster.call(null,request_url),{"cleanupWhenDone": true});
deferred.addCallback(((function (deferred,pred__24042,expr__24043){
return (function (){
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [true], null));
});})(deferred,pred__24042,expr__24043))
);
return deferred.addErrback(((function (deferred,pred__24042,expr__24043){
return (function (){
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [false], null));
});})(deferred,pred__24042,expr__24043))
);
});
;})(pred__24042,expr__24043))
} else {
return ((function (pred__24042,expr__24043){
return (function (a,b){
throw "Reload not defined for this platform";
});
;})(pred__24042,expr__24043))
}
}
})();
figwheel.client.file_reloading.reload_file = (function figwheel$client$file_reloading$reload_file(p__24046,callback){
var map__24049 = p__24046;
var map__24049__$1 = ((((!((map__24049 == null)))?((((map__24049.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24049.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24049):map__24049);
var file_msg = map__24049__$1;
var request_url = cljs.core.get.call(null,map__24049__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Attempting to load "),cljs.core.str(request_url)].join(''));
return figwheel.client.file_reloading.reload_file_STAR_.call(null,request_url,((function (map__24049,map__24049__$1,file_msg,request_url){
return (function (success_QMARK_){
if(cljs.core.truth_(success_QMARK_)){
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("FigWheel: Successfully loaded "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.assoc.call(null,file_msg,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),true)], null));
} else {
figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Figwheel: Error loading file "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null));
}
});})(map__24049,map__24049__$1,file_msg,request_url))
);
});
if(typeof figwheel.client.file_reloading.reload_chan !== 'undefined'){
} else {
figwheel.client.file_reloading.reload_chan = cljs.core.async.chan.call(null);
}
if(typeof figwheel.client.file_reloading.on_load_callbacks !== 'undefined'){
} else {
figwheel.client.file_reloading.on_load_callbacks = cljs.core.atom.call(null,cljs.core.PersistentArrayMap.EMPTY);
}
if(typeof figwheel.client.file_reloading.dependencies_loaded !== 'undefined'){
} else {
figwheel.client.file_reloading.dependencies_loaded = cljs.core.atom.call(null,cljs.core.PersistentVector.EMPTY);
}
figwheel.client.file_reloading.blocking_load = (function figwheel$client$file_reloading$blocking_load(url){
var out = cljs.core.async.chan.call(null);
figwheel.client.file_reloading.reload_file.call(null,new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null,"request-url","request-url",2100346596),url], null),((function (out){
return (function (file_msg){
cljs.core.async.put_BANG_.call(null,out,file_msg);
return cljs.core.async.close_BANG_.call(null,out);
});})(out))
);
return out;
});
if(typeof figwheel.client.file_reloading.reloader_loop !== 'undefined'){
} else {
figwheel.client.file_reloading.reloader_loop = (function (){var c__20950__auto__ = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__){
return (function (){
var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto__){
return (function (state_24073){
var state_val_24074 = (state_24073[(1)]);
if((state_val_24074 === (7))){
var inst_24069 = (state_24073[(2)]);
var state_24073__$1 = state_24073;
var statearr_24075_24095 = state_24073__$1;
(statearr_24075_24095[(2)] = inst_24069);
(statearr_24075_24095[(1)] = (3));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (1))){
var state_24073__$1 = state_24073;
var statearr_24076_24096 = state_24073__$1;
(statearr_24076_24096[(2)] = null);
(statearr_24076_24096[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (4))){
var inst_24053 = (state_24073[(7)]);
var inst_24053__$1 = (state_24073[(2)]);
var state_24073__$1 = (function (){var statearr_24077 = state_24073;
(statearr_24077[(7)] = inst_24053__$1);
return statearr_24077;
})();
if(cljs.core.truth_(inst_24053__$1)){
var statearr_24078_24097 = state_24073__$1;
(statearr_24078_24097[(1)] = (5));
} else {
var statearr_24079_24098 = state_24073__$1;
(statearr_24079_24098[(1)] = (6));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (6))){
var state_24073__$1 = state_24073;
var statearr_24080_24099 = state_24073__$1;
(statearr_24080_24099[(2)] = null);
(statearr_24080_24099[(1)] = (7));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (3))){
var inst_24071 = (state_24073[(2)]);
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24073__$1,inst_24071);
} else {
if((state_val_24074 === (2))){
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(4),figwheel.client.file_reloading.reload_chan);
} else {
if((state_val_24074 === (11))){
var inst_24065 = (state_24073[(2)]);
var state_24073__$1 = (function (){var statearr_24081 = state_24073;
(statearr_24081[(8)] = inst_24065);
return statearr_24081;
})();
var statearr_24082_24100 = state_24073__$1;
(statearr_24082_24100[(2)] = null);
(statearr_24082_24100[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (9))){
var inst_24057 = (state_24073[(9)]);
var inst_24059 = (state_24073[(10)]);
var inst_24061 = inst_24059.call(null,inst_24057);
var state_24073__$1 = state_24073;
var statearr_24083_24101 = state_24073__$1;
(statearr_24083_24101[(2)] = inst_24061);
(statearr_24083_24101[(1)] = (11));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (5))){
var inst_24053 = (state_24073[(7)]);
var inst_24055 = figwheel.client.file_reloading.blocking_load.call(null,inst_24053);
var state_24073__$1 = state_24073;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24073__$1,(8),inst_24055);
} else {
if((state_val_24074 === (10))){
var inst_24057 = (state_24073[(9)]);
var inst_24063 = cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,cljs.core.conj,inst_24057);
var state_24073__$1 = state_24073;
var statearr_24084_24102 = state_24073__$1;
(statearr_24084_24102[(2)] = inst_24063);
(statearr_24084_24102[(1)] = (11));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24074 === (8))){
var inst_24059 = (state_24073[(10)]);
var inst_24053 = (state_24073[(7)]);
var inst_24057 = (state_24073[(2)]);
var inst_24058 = cljs.core.deref.call(null,figwheel.client.file_reloading.on_load_callbacks);
var inst_24059__$1 = cljs.core.get.call(null,inst_24058,inst_24053);
var state_24073__$1 = (function (){var statearr_24085 = state_24073;
(statearr_24085[(9)] = inst_24057);
(statearr_24085[(10)] = inst_24059__$1);
return statearr_24085;
})();
if(cljs.core.truth_(inst_24059__$1)){
var statearr_24086_24103 = state_24073__$1;
(statearr_24086_24103[(1)] = (9));
} else {
var statearr_24087_24104 = state_24073__$1;
(statearr_24087_24104[(1)] = (10));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
});})(c__20950__auto__))
;
return ((function (switch__20838__auto__,c__20950__auto__){
return (function() {
var figwheel$client$file_reloading$state_machine__20839__auto__ = null;
var figwheel$client$file_reloading$state_machine__20839__auto____0 = (function (){
var statearr_24091 = [null,null,null,null,null,null,null,null,null,null,null];
(statearr_24091[(0)] = figwheel$client$file_reloading$state_machine__20839__auto__);
(statearr_24091[(1)] = (1));
return statearr_24091;
});
var figwheel$client$file_reloading$state_machine__20839__auto____1 = (function (state_24073){
while(true){
var ret_value__20840__auto__ = (function (){try{while(true){
var result__20841__auto__ = switch__20838__auto__.call(null,state_24073);
if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return result__20841__auto__;
}
break;
}
}catch (e24092){if((e24092 instanceof Object)){
var ex__20842__auto__ = e24092;
var statearr_24093_24105 = state_24073;
(statearr_24093_24105[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24073);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24092;
}
}})();
if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24106 = state_24073;
state_24073 = G__24106;
continue;
} else {
return ret_value__20840__auto__;
}
break;
}
});
figwheel$client$file_reloading$state_machine__20839__auto__ = function(state_24073){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$state_machine__20839__auto____0.call(this);
case 1:
return figwheel$client$file_reloading$state_machine__20839__auto____1.call(this,state_24073);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$state_machine__20839__auto____0;
figwheel$client$file_reloading$state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$state_machine__20839__auto____1;
return figwheel$client$file_reloading$state_machine__20839__auto__;
})()
;})(switch__20838__auto__,c__20950__auto__))
})();
var state__20952__auto__ = (function (){var statearr_24094 = f__20951__auto__.call(null);
(statearr_24094[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__);
return statearr_24094;
})();
return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__);
});})(c__20950__auto__))
);
return c__20950__auto__;
})();
}
figwheel.client.file_reloading.queued_file_reload = (function figwheel$client$file_reloading$queued_file_reload(url){
return cljs.core.async.put_BANG_.call(null,figwheel.client.file_reloading.reload_chan,url);
});
figwheel.client.file_reloading.require_with_callback = (function figwheel$client$file_reloading$require_with_callback(p__24107,callback){
var map__24110 = p__24107;
var map__24110__$1 = ((((!((map__24110 == null)))?((((map__24110.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24110.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24110):map__24110);
var file_msg = map__24110__$1;
var namespace = cljs.core.get.call(null,map__24110__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var request_url = figwheel.client.file_reloading.resolve_ns.call(null,namespace);
cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.assoc,request_url,((function (request_url,map__24110,map__24110__$1,file_msg,namespace){
return (function (file_msg_SINGLEQUOTE_){
cljs.core.swap_BANG_.call(null,figwheel.client.file_reloading.on_load_callbacks,cljs.core.dissoc,request_url);
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.merge.call(null,file_msg,cljs.core.select_keys.call(null,file_msg_SINGLEQUOTE_,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375)], null)))], null));
});})(request_url,map__24110,map__24110__$1,file_msg,namespace))
);
return figwheel.client.file_reloading.figwheel_require.call(null,cljs.core.name.call(null,namespace),true);
});
figwheel.client.file_reloading.reload_file_QMARK_ = (function figwheel$client$file_reloading$reload_file_QMARK_(p__24112){
var map__24115 = p__24112;
var map__24115__$1 = ((((!((map__24115 == null)))?((((map__24115.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24115.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24115):map__24115);
var file_msg = map__24115__$1;
var namespace = cljs.core.get.call(null,map__24115__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var meta_pragmas = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas),cljs.core.name.call(null,namespace));
var and__16814__auto__ = cljs.core.not.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179).cljs$core$IFn$_invoke$arity$1(meta_pragmas));
if(and__16814__auto__){
var or__16826__auto__ = new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(meta_pragmas);
if(cljs.core.truth_(or__16826__auto__)){
return or__16826__auto__;
} else {
var or__16826__auto____$1 = new cljs.core.Keyword(null,"figwheel-load","figwheel-load",1316089175).cljs$core$IFn$_invoke$arity$1(meta_pragmas);
if(cljs.core.truth_(or__16826__auto____$1)){
return or__16826__auto____$1;
} else {
return figwheel.client.file_reloading.provided_QMARK_.call(null,cljs.core.name.call(null,namespace));
}
}
} else {
return and__16814__auto__;
}
});
figwheel.client.file_reloading.js_reload = (function figwheel$client$file_reloading$js_reload(p__24117,callback){
var map__24120 = p__24117;
var map__24120__$1 = ((((!((map__24120 == null)))?((((map__24120.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24120.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24120):map__24120);
var file_msg = map__24120__$1;
var request_url = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
var namespace = cljs.core.get.call(null,map__24120__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
if(cljs.core.truth_(figwheel.client.file_reloading.reload_file_QMARK_.call(null,file_msg))){
return figwheel.client.file_reloading.require_with_callback.call(null,file_msg,callback);
} else {
figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Figwheel: Not trying to load file "),cljs.core.str(request_url)].join(''));
return cljs.core.apply.call(null,callback,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [file_msg], null));
}
});
figwheel.client.file_reloading.reload_js_file = (function figwheel$client$file_reloading$reload_js_file(file_msg){
var out = cljs.core.async.chan.call(null);
figwheel.client.file_reloading.js_reload.call(null,file_msg,((function (out){
return (function (url){
cljs.core.async.put_BANG_.call(null,out,url);
return cljs.core.async.close_BANG_.call(null,out);
});})(out))
);
return out;
});
/**
* Returns a chanel with one collection of loaded filenames on it.
*/
figwheel.client.file_reloading.load_all_js_files = (function figwheel$client$file_reloading$load_all_js_files(files){
var out = cljs.core.async.chan.call(null);
var c__20950__auto___24208 = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto___24208,out){
return (function (){
var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto___24208,out){
return (function (state_24190){
var state_val_24191 = (state_24190[(1)]);
if((state_val_24191 === (1))){
var inst_24168 = cljs.core.nth.call(null,files,(0),null);
var inst_24169 = cljs.core.nthnext.call(null,files,(1));
var inst_24170 = files;
var state_24190__$1 = (function (){var statearr_24192 = state_24190;
(statearr_24192[(7)] = inst_24168);
(statearr_24192[(8)] = inst_24169);
(statearr_24192[(9)] = inst_24170);
return statearr_24192;
})();
var statearr_24193_24209 = state_24190__$1;
(statearr_24193_24209[(2)] = null);
(statearr_24193_24209[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (2))){
var inst_24173 = (state_24190[(10)]);
var inst_24170 = (state_24190[(9)]);
var inst_24173__$1 = cljs.core.nth.call(null,inst_24170,(0),null);
var inst_24174 = cljs.core.nthnext.call(null,inst_24170,(1));
var inst_24175 = (inst_24173__$1 == null);
var inst_24176 = cljs.core.not.call(null,inst_24175);
var state_24190__$1 = (function (){var statearr_24194 = state_24190;
(statearr_24194[(11)] = inst_24174);
(statearr_24194[(10)] = inst_24173__$1);
return statearr_24194;
})();
if(inst_24176){
var statearr_24195_24210 = state_24190__$1;
(statearr_24195_24210[(1)] = (4));
} else {
var statearr_24196_24211 = state_24190__$1;
(statearr_24196_24211[(1)] = (5));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (3))){
var inst_24188 = (state_24190[(2)]);
var state_24190__$1 = state_24190;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24190__$1,inst_24188);
} else {
if((state_val_24191 === (4))){
var inst_24173 = (state_24190[(10)]);
var inst_24178 = figwheel.client.file_reloading.reload_js_file.call(null,inst_24173);
var state_24190__$1 = state_24190;
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24190__$1,(7),inst_24178);
} else {
if((state_val_24191 === (5))){
var inst_24184 = cljs.core.async.close_BANG_.call(null,out);
var state_24190__$1 = state_24190;
var statearr_24197_24212 = state_24190__$1;
(statearr_24197_24212[(2)] = inst_24184);
(statearr_24197_24212[(1)] = (6));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (6))){
var inst_24186 = (state_24190[(2)]);
var state_24190__$1 = state_24190;
var statearr_24198_24213 = state_24190__$1;
(statearr_24198_24213[(2)] = inst_24186);
(statearr_24198_24213[(1)] = (3));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24191 === (7))){
var inst_24174 = (state_24190[(11)]);
var inst_24180 = (state_24190[(2)]);
var inst_24181 = cljs.core.async.put_BANG_.call(null,out,inst_24180);
var inst_24170 = inst_24174;
var state_24190__$1 = (function (){var statearr_24199 = state_24190;
(statearr_24199[(9)] = inst_24170);
(statearr_24199[(12)] = inst_24181);
return statearr_24199;
})();
var statearr_24200_24214 = state_24190__$1;
(statearr_24200_24214[(2)] = null);
(statearr_24200_24214[(1)] = (2));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
});})(c__20950__auto___24208,out))
;
return ((function (switch__20838__auto__,c__20950__auto___24208,out){
return (function() {
var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__ = null;
var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0 = (function (){
var statearr_24204 = [null,null,null,null,null,null,null,null,null,null,null,null,null];
(statearr_24204[(0)] = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__);
(statearr_24204[(1)] = (1));
return statearr_24204;
});
var figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1 = (function (state_24190){
while(true){
var ret_value__20840__auto__ = (function (){try{while(true){
var result__20841__auto__ = switch__20838__auto__.call(null,state_24190);
if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return result__20841__auto__;
}
break;
}
}catch (e24205){if((e24205 instanceof Object)){
var ex__20842__auto__ = e24205;
var statearr_24206_24215 = state_24190;
(statearr_24206_24215[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24190);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24205;
}
}})();
if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24216 = state_24190;
state_24190 = G__24216;
continue;
} else {
return ret_value__20840__auto__;
}
break;
}
});
figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__ = function(state_24190){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0.call(this);
case 1:
return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1.call(this,state_24190);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____0;
figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto____1;
return figwheel$client$file_reloading$load_all_js_files_$_state_machine__20839__auto__;
})()
;})(switch__20838__auto__,c__20950__auto___24208,out))
})();
var state__20952__auto__ = (function (){var statearr_24207 = f__20951__auto__.call(null);
(statearr_24207[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto___24208);
return statearr_24207;
})();
return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__);
});})(c__20950__auto___24208,out))
);
return cljs.core.async.into.call(null,cljs.core.PersistentVector.EMPTY,out);
});
figwheel.client.file_reloading.eval_body = (function figwheel$client$file_reloading$eval_body(p__24217,opts){
var map__24221 = p__24217;
var map__24221__$1 = ((((!((map__24221 == null)))?((((map__24221.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24221.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24221):map__24221);
var eval_body__$1 = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883));
var file = cljs.core.get.call(null,map__24221__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
if(cljs.core.truth_((function (){var and__16814__auto__ = eval_body__$1;
if(cljs.core.truth_(and__16814__auto__)){
return typeof eval_body__$1 === 'string';
} else {
return and__16814__auto__;
}
})())){
var code = eval_body__$1;
try{figwheel.client.utils.debug_prn.call(null,[cljs.core.str("Evaling file "),cljs.core.str(file)].join(''));
return figwheel.client.utils.eval_helper.call(null,code,opts);
}catch (e24223){var e = e24223;
return figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"error","error",-978969032),[cljs.core.str("Unable to evaluate "),cljs.core.str(file)].join(''));
}} else {
return null;
}
});
figwheel.client.file_reloading.expand_files = (function figwheel$client$file_reloading$expand_files(files){
var deps = figwheel.client.file_reloading.get_all_dependents.call(null,cljs.core.map.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files));
return cljs.core.filter.call(null,cljs.core.comp.call(null,cljs.core.not,new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, ["figwheel.connect",null], null), null),new cljs.core.Keyword(null,"namespace","namespace",-377510372)),cljs.core.map.call(null,((function (deps){
return (function (n){
var temp__4423__auto__ = cljs.core.first.call(null,cljs.core.filter.call(null,((function (deps){
return (function (p1__24224_SHARP_){
return cljs.core._EQ_.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24224_SHARP_),n);
});})(deps))
,files));
if(cljs.core.truth_(temp__4423__auto__)){
var file_msg = temp__4423__auto__;
return file_msg;
} else {
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372),new cljs.core.Keyword(null,"namespace","namespace",-377510372),n], null);
}
});})(deps))
,deps));
});
figwheel.client.file_reloading.sort_files = (function figwheel$client$file_reloading$sort_files(files){
if((cljs.core.count.call(null,files) <= (1))){
return files;
} else {
var keep_files = cljs.core.set.call(null,cljs.core.keep.call(null,new cljs.core.Keyword(null,"namespace","namespace",-377510372),files));
return cljs.core.filter.call(null,cljs.core.comp.call(null,keep_files,new cljs.core.Keyword(null,"namespace","namespace",-377510372)),figwheel.client.file_reloading.expand_files.call(null,files));
}
});
figwheel.client.file_reloading.get_figwheel_always = (function figwheel$client$file_reloading$get_figwheel_always(){
return cljs.core.map.call(null,(function (p__24229){
var vec__24230 = p__24229;
var k = cljs.core.nth.call(null,vec__24230,(0),null);
var v = cljs.core.nth.call(null,vec__24230,(1),null);
return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null,"namespace","namespace",-377510372),k,new cljs.core.Keyword(null,"type","type",1174270348),new cljs.core.Keyword(null,"namespace","namespace",-377510372)], null);
}),cljs.core.filter.call(null,(function (p__24231){
var vec__24232 = p__24231;
var k = cljs.core.nth.call(null,vec__24232,(0),null);
var v = cljs.core.nth.call(null,vec__24232,(1),null);
return new cljs.core.Keyword(null,"figwheel-always","figwheel-always",799819691).cljs$core$IFn$_invoke$arity$1(v);
}),cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas)));
});
figwheel.client.file_reloading.reload_js_files = (function figwheel$client$file_reloading$reload_js_files(p__24236,p__24237){
var map__24484 = p__24236;
var map__24484__$1 = ((((!((map__24484 == null)))?((((map__24484.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24484.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24484):map__24484);
var opts = map__24484__$1;
var before_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"before-jsload","before-jsload",-847513128));
var on_jsload = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"on-jsload","on-jsload",-395756602));
var reload_dependents = cljs.core.get.call(null,map__24484__$1,new cljs.core.Keyword(null,"reload-dependents","reload-dependents",-956865430));
var map__24485 = p__24237;
var map__24485__$1 = ((((!((map__24485 == null)))?((((map__24485.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24485.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24485):map__24485);
var msg = map__24485__$1;
var files = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"files","files",-472457450));
var figwheel_meta = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"figwheel-meta","figwheel-meta",-225970237));
var recompile_dependents = cljs.core.get.call(null,map__24485__$1,new cljs.core.Keyword(null,"recompile-dependents","recompile-dependents",523804171));
if(cljs.core.empty_QMARK_.call(null,figwheel_meta)){
} else {
cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas,figwheel_meta);
}
var c__20950__auto__ = cljs.core.async.chan.call(null,(1));
cljs.core.async.impl.dispatch.run.call(null,((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (){
var f__20951__auto__ = (function (){var switch__20838__auto__ = ((function (c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (state_24638){
var state_val_24639 = (state_24638[(1)]);
if((state_val_24639 === (7))){
var inst_24501 = (state_24638[(7)]);
var inst_24500 = (state_24638[(8)]);
var inst_24502 = (state_24638[(9)]);
var inst_24499 = (state_24638[(10)]);
var inst_24507 = cljs.core._nth.call(null,inst_24500,inst_24502);
var inst_24508 = figwheel.client.file_reloading.eval_body.call(null,inst_24507,opts);
var inst_24509 = (inst_24502 + (1));
var tmp24640 = inst_24501;
var tmp24641 = inst_24500;
var tmp24642 = inst_24499;
var inst_24499__$1 = tmp24642;
var inst_24500__$1 = tmp24641;
var inst_24501__$1 = tmp24640;
var inst_24502__$1 = inst_24509;
var state_24638__$1 = (function (){var statearr_24643 = state_24638;
(statearr_24643[(7)] = inst_24501__$1);
(statearr_24643[(8)] = inst_24500__$1);
(statearr_24643[(9)] = inst_24502__$1);
(statearr_24643[(11)] = inst_24508);
(statearr_24643[(10)] = inst_24499__$1);
return statearr_24643;
})();
var statearr_24644_24730 = state_24638__$1;
(statearr_24644_24730[(2)] = null);
(statearr_24644_24730[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (20))){
var inst_24542 = (state_24638[(12)]);
var inst_24550 = figwheel.client.file_reloading.sort_files.call(null,inst_24542);
var state_24638__$1 = state_24638;
var statearr_24645_24731 = state_24638__$1;
(statearr_24645_24731[(2)] = inst_24550);
(statearr_24645_24731[(1)] = (21));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (27))){
var state_24638__$1 = state_24638;
var statearr_24646_24732 = state_24638__$1;
(statearr_24646_24732[(2)] = null);
(statearr_24646_24732[(1)] = (28));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (1))){
var inst_24491 = (state_24638[(13)]);
var inst_24488 = before_jsload.call(null,files);
var inst_24489 = figwheel.client.file_reloading.before_jsload_custom_event.call(null,files);
var inst_24490 = (function (){return ((function (inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p1__24233_SHARP_){
return new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24233_SHARP_);
});
;})(inst_24491,inst_24488,inst_24489,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24491__$1 = cljs.core.filter.call(null,inst_24490,files);
var inst_24492 = cljs.core.not_empty.call(null,inst_24491__$1);
var state_24638__$1 = (function (){var statearr_24647 = state_24638;
(statearr_24647[(13)] = inst_24491__$1);
(statearr_24647[(14)] = inst_24489);
(statearr_24647[(15)] = inst_24488);
return statearr_24647;
})();
if(cljs.core.truth_(inst_24492)){
var statearr_24648_24733 = state_24638__$1;
(statearr_24648_24733[(1)] = (2));
} else {
var statearr_24649_24734 = state_24638__$1;
(statearr_24649_24734[(1)] = (3));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (24))){
var state_24638__$1 = state_24638;
var statearr_24650_24735 = state_24638__$1;
(statearr_24650_24735[(2)] = null);
(statearr_24650_24735[(1)] = (25));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (39))){
var inst_24592 = (state_24638[(16)]);
var state_24638__$1 = state_24638;
var statearr_24651_24736 = state_24638__$1;
(statearr_24651_24736[(2)] = inst_24592);
(statearr_24651_24736[(1)] = (40));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (46))){
var inst_24633 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24652_24737 = state_24638__$1;
(statearr_24652_24737[(2)] = inst_24633);
(statearr_24652_24737[(1)] = (31));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (4))){
var inst_24536 = (state_24638[(2)]);
var inst_24537 = cljs.core.List.EMPTY;
var inst_24538 = cljs.core.reset_BANG_.call(null,figwheel.client.file_reloading.dependencies_loaded,inst_24537);
var inst_24539 = (function (){return ((function (inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p1__24234_SHARP_){
var and__16814__auto__ = new cljs.core.Keyword(null,"namespace","namespace",-377510372).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_);
if(cljs.core.truth_(and__16814__auto__)){
return cljs.core.not.call(null,new cljs.core.Keyword(null,"eval-body","eval-body",-907279883).cljs$core$IFn$_invoke$arity$1(p1__24234_SHARP_));
} else {
return and__16814__auto__;
}
});
;})(inst_24536,inst_24537,inst_24538,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24540 = cljs.core.filter.call(null,inst_24539,files);
var inst_24541 = figwheel.client.file_reloading.get_figwheel_always.call(null);
var inst_24542 = cljs.core.concat.call(null,inst_24540,inst_24541);
var state_24638__$1 = (function (){var statearr_24653 = state_24638;
(statearr_24653[(17)] = inst_24536);
(statearr_24653[(18)] = inst_24538);
(statearr_24653[(12)] = inst_24542);
return statearr_24653;
})();
if(cljs.core.truth_(reload_dependents)){
var statearr_24654_24738 = state_24638__$1;
(statearr_24654_24738[(1)] = (16));
} else {
var statearr_24655_24739 = state_24638__$1;
(statearr_24655_24739[(1)] = (17));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (15))){
var inst_24526 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24656_24740 = state_24638__$1;
(statearr_24656_24740[(2)] = inst_24526);
(statearr_24656_24740[(1)] = (12));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (21))){
var inst_24552 = (state_24638[(19)]);
var inst_24552__$1 = (state_24638[(2)]);
var inst_24553 = figwheel.client.file_reloading.load_all_js_files.call(null,inst_24552__$1);
var state_24638__$1 = (function (){var statearr_24657 = state_24638;
(statearr_24657[(19)] = inst_24552__$1);
return statearr_24657;
})();
return cljs.core.async.impl.ioc_helpers.take_BANG_.call(null,state_24638__$1,(22),inst_24553);
} else {
if((state_val_24639 === (31))){
var inst_24636 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
return cljs.core.async.impl.ioc_helpers.return_chan.call(null,state_24638__$1,inst_24636);
} else {
if((state_val_24639 === (32))){
var inst_24592 = (state_24638[(16)]);
var inst_24597 = inst_24592.cljs$lang$protocol_mask$partition0$;
var inst_24598 = (inst_24597 & (64));
var inst_24599 = inst_24592.cljs$core$ISeq$;
var inst_24600 = (inst_24598) || (inst_24599);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24600)){
var statearr_24658_24741 = state_24638__$1;
(statearr_24658_24741[(1)] = (35));
} else {
var statearr_24659_24742 = state_24638__$1;
(statearr_24659_24742[(1)] = (36));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (40))){
var inst_24613 = (state_24638[(20)]);
var inst_24612 = (state_24638[(2)]);
var inst_24613__$1 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179));
var inst_24614 = cljs.core.get.call(null,inst_24612,new cljs.core.Keyword(null,"not-required","not-required",-950359114));
var inst_24615 = cljs.core.not_empty.call(null,inst_24613__$1);
var state_24638__$1 = (function (){var statearr_24660 = state_24638;
(statearr_24660[(20)] = inst_24613__$1);
(statearr_24660[(21)] = inst_24614);
return statearr_24660;
})();
if(cljs.core.truth_(inst_24615)){
var statearr_24661_24743 = state_24638__$1;
(statearr_24661_24743[(1)] = (41));
} else {
var statearr_24662_24744 = state_24638__$1;
(statearr_24662_24744[(1)] = (42));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (33))){
var state_24638__$1 = state_24638;
var statearr_24663_24745 = state_24638__$1;
(statearr_24663_24745[(2)] = false);
(statearr_24663_24745[(1)] = (34));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (13))){
var inst_24512 = (state_24638[(22)]);
var inst_24516 = cljs.core.chunk_first.call(null,inst_24512);
var inst_24517 = cljs.core.chunk_rest.call(null,inst_24512);
var inst_24518 = cljs.core.count.call(null,inst_24516);
var inst_24499 = inst_24517;
var inst_24500 = inst_24516;
var inst_24501 = inst_24518;
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24664 = state_24638;
(statearr_24664[(7)] = inst_24501);
(statearr_24664[(8)] = inst_24500);
(statearr_24664[(9)] = inst_24502);
(statearr_24664[(10)] = inst_24499);
return statearr_24664;
})();
var statearr_24665_24746 = state_24638__$1;
(statearr_24665_24746[(2)] = null);
(statearr_24665_24746[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (22))){
var inst_24552 = (state_24638[(19)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24555__$1 = (state_24638[(2)]);
var inst_24556__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24555__$1);
var inst_24557 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555__$1;
var res = inst_24556__$1;
return ((function (all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p1__24235_SHARP_){
return cljs.core.not.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375).cljs$core$IFn$_invoke$arity$1(p1__24235_SHARP_));
});
;})(all_files,res_SINGLEQUOTE_,res,inst_24552,inst_24560,inst_24556,inst_24555,inst_24555__$1,inst_24556__$1,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24558 = cljs.core.filter.call(null,inst_24557,inst_24555__$1);
var inst_24559 = cljs.core.deref.call(null,figwheel.client.file_reloading.dependencies_loaded);
var inst_24560__$1 = cljs.core.filter.call(null,new cljs.core.Keyword(null,"loaded-file","loaded-file",-168399375),inst_24559);
var inst_24561 = cljs.core.not_empty.call(null,inst_24560__$1);
var state_24638__$1 = (function (){var statearr_24666 = state_24638;
(statearr_24666[(26)] = inst_24558);
(statearr_24666[(23)] = inst_24560__$1);
(statearr_24666[(24)] = inst_24556__$1);
(statearr_24666[(25)] = inst_24555__$1);
return statearr_24666;
})();
if(cljs.core.truth_(inst_24561)){
var statearr_24667_24747 = state_24638__$1;
(statearr_24667_24747[(1)] = (23));
} else {
var statearr_24668_24748 = state_24638__$1;
(statearr_24668_24748[(1)] = (24));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (36))){
var state_24638__$1 = state_24638;
var statearr_24669_24749 = state_24638__$1;
(statearr_24669_24749[(2)] = false);
(statearr_24669_24749[(1)] = (37));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (41))){
var inst_24613 = (state_24638[(20)]);
var inst_24617 = cljs.core.comp.call(null,figwheel.client.file_reloading.name__GT_path,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var inst_24618 = cljs.core.map.call(null,inst_24617,inst_24613);
var inst_24619 = cljs.core.pr_str.call(null,inst_24618);
var inst_24620 = [cljs.core.str("figwheel-no-load meta-data: "),cljs.core.str(inst_24619)].join('');
var inst_24621 = figwheel.client.utils.log.call(null,inst_24620);
var state_24638__$1 = state_24638;
var statearr_24670_24750 = state_24638__$1;
(statearr_24670_24750[(2)] = inst_24621);
(statearr_24670_24750[(1)] = (43));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (43))){
var inst_24614 = (state_24638[(21)]);
var inst_24624 = (state_24638[(2)]);
var inst_24625 = cljs.core.not_empty.call(null,inst_24614);
var state_24638__$1 = (function (){var statearr_24671 = state_24638;
(statearr_24671[(27)] = inst_24624);
return statearr_24671;
})();
if(cljs.core.truth_(inst_24625)){
var statearr_24672_24751 = state_24638__$1;
(statearr_24672_24751[(1)] = (44));
} else {
var statearr_24673_24752 = state_24638__$1;
(statearr_24673_24752[(1)] = (45));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (29))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24592 = (state_24638[(16)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24588 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: NOT loading these files ");
var inst_24591 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var dependencies_that_loaded = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p__24590){
var map__24674 = p__24590;
var map__24674__$1 = ((((!((map__24674 == null)))?((((map__24674.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24674.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24674):map__24674);
var namespace = cljs.core.get.call(null,map__24674__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var meta_data = cljs.core.get.call(null,cljs.core.deref.call(null,figwheel.client.file_reloading.figwheel_meta_pragmas),cljs.core.name.call(null,namespace));
if((meta_data == null)){
return new cljs.core.Keyword(null,"not-required","not-required",-950359114);
} else {
if(cljs.core.truth_(meta_data.call(null,new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179)))){
return new cljs.core.Keyword(null,"figwheel-no-load","figwheel-no-load",-555840179);
} else {
return new cljs.core.Keyword(null,"not-required","not-required",-950359114);
}
}
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24592,inst_24560,inst_24556,inst_24555,inst_24588,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24592__$1 = cljs.core.group_by.call(null,inst_24591,inst_24558);
var inst_24594 = (inst_24592__$1 == null);
var inst_24595 = cljs.core.not.call(null,inst_24594);
var state_24638__$1 = (function (){var statearr_24676 = state_24638;
(statearr_24676[(16)] = inst_24592__$1);
(statearr_24676[(28)] = inst_24588);
return statearr_24676;
})();
if(inst_24595){
var statearr_24677_24753 = state_24638__$1;
(statearr_24677_24753[(1)] = (32));
} else {
var statearr_24678_24754 = state_24638__$1;
(statearr_24678_24754[(1)] = (33));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (44))){
var inst_24614 = (state_24638[(21)]);
var inst_24627 = cljs.core.map.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),inst_24614);
var inst_24628 = cljs.core.pr_str.call(null,inst_24627);
var inst_24629 = [cljs.core.str("not required: "),cljs.core.str(inst_24628)].join('');
var inst_24630 = figwheel.client.utils.log.call(null,inst_24629);
var state_24638__$1 = state_24638;
var statearr_24679_24755 = state_24638__$1;
(statearr_24679_24755[(2)] = inst_24630);
(statearr_24679_24755[(1)] = (46));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (6))){
var inst_24533 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24680_24756 = state_24638__$1;
(statearr_24680_24756[(2)] = inst_24533);
(statearr_24680_24756[(1)] = (4));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (28))){
var inst_24558 = (state_24638[(26)]);
var inst_24585 = (state_24638[(2)]);
var inst_24586 = cljs.core.not_empty.call(null,inst_24558);
var state_24638__$1 = (function (){var statearr_24681 = state_24638;
(statearr_24681[(29)] = inst_24585);
return statearr_24681;
})();
if(cljs.core.truth_(inst_24586)){
var statearr_24682_24757 = state_24638__$1;
(statearr_24682_24757[(1)] = (29));
} else {
var statearr_24683_24758 = state_24638__$1;
(statearr_24683_24758[(1)] = (30));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (25))){
var inst_24556 = (state_24638[(24)]);
var inst_24572 = (state_24638[(2)]);
var inst_24573 = cljs.core.not_empty.call(null,inst_24556);
var state_24638__$1 = (function (){var statearr_24684 = state_24638;
(statearr_24684[(30)] = inst_24572);
return statearr_24684;
})();
if(cljs.core.truth_(inst_24573)){
var statearr_24685_24759 = state_24638__$1;
(statearr_24685_24759[(1)] = (26));
} else {
var statearr_24686_24760 = state_24638__$1;
(statearr_24686_24760[(1)] = (27));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (34))){
var inst_24607 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24607)){
var statearr_24687_24761 = state_24638__$1;
(statearr_24687_24761[(1)] = (38));
} else {
var statearr_24688_24762 = state_24638__$1;
(statearr_24688_24762[(1)] = (39));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (17))){
var state_24638__$1 = state_24638;
var statearr_24689_24763 = state_24638__$1;
(statearr_24689_24763[(2)] = recompile_dependents);
(statearr_24689_24763[(1)] = (18));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (3))){
var state_24638__$1 = state_24638;
var statearr_24690_24764 = state_24638__$1;
(statearr_24690_24764[(2)] = null);
(statearr_24690_24764[(1)] = (4));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (12))){
var inst_24529 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24691_24765 = state_24638__$1;
(statearr_24691_24765[(2)] = inst_24529);
(statearr_24691_24765[(1)] = (9));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (2))){
var inst_24491 = (state_24638[(13)]);
var inst_24498 = cljs.core.seq.call(null,inst_24491);
var inst_24499 = inst_24498;
var inst_24500 = null;
var inst_24501 = (0);
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24692 = state_24638;
(statearr_24692[(7)] = inst_24501);
(statearr_24692[(8)] = inst_24500);
(statearr_24692[(9)] = inst_24502);
(statearr_24692[(10)] = inst_24499);
return statearr_24692;
})();
var statearr_24693_24766 = state_24638__$1;
(statearr_24693_24766[(2)] = null);
(statearr_24693_24766[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (23))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24563 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these dependencies");
var inst_24565 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var dependencies_that_loaded = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p__24564){
var map__24694 = p__24564;
var map__24694__$1 = ((((!((map__24694 == null)))?((((map__24694.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24694.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24694):map__24694);
var request_url = cljs.core.get.call(null,map__24694__$1,new cljs.core.Keyword(null,"request-url","request-url",2100346596));
return clojure.string.replace.call(null,request_url,goog.basePath,"");
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24563,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24566 = cljs.core.reverse.call(null,inst_24560);
var inst_24567 = cljs.core.map.call(null,inst_24565,inst_24566);
var inst_24568 = cljs.core.pr_str.call(null,inst_24567);
var inst_24569 = figwheel.client.utils.log.call(null,inst_24568);
var state_24638__$1 = (function (){var statearr_24696 = state_24638;
(statearr_24696[(31)] = inst_24563);
return statearr_24696;
})();
var statearr_24697_24767 = state_24638__$1;
(statearr_24697_24767[(2)] = inst_24569);
(statearr_24697_24767[(1)] = (25));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (35))){
var state_24638__$1 = state_24638;
var statearr_24698_24768 = state_24638__$1;
(statearr_24698_24768[(2)] = true);
(statearr_24698_24768[(1)] = (37));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (19))){
var inst_24542 = (state_24638[(12)]);
var inst_24548 = figwheel.client.file_reloading.expand_files.call(null,inst_24542);
var state_24638__$1 = state_24638;
var statearr_24699_24769 = state_24638__$1;
(statearr_24699_24769[(2)] = inst_24548);
(statearr_24699_24769[(1)] = (21));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (11))){
var state_24638__$1 = state_24638;
var statearr_24700_24770 = state_24638__$1;
(statearr_24700_24770[(2)] = null);
(statearr_24700_24770[(1)] = (12));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (9))){
var inst_24531 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24701_24771 = state_24638__$1;
(statearr_24701_24771[(2)] = inst_24531);
(statearr_24701_24771[(1)] = (6));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (5))){
var inst_24501 = (state_24638[(7)]);
var inst_24502 = (state_24638[(9)]);
var inst_24504 = (inst_24502 < inst_24501);
var inst_24505 = inst_24504;
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24505)){
var statearr_24702_24772 = state_24638__$1;
(statearr_24702_24772[(1)] = (7));
} else {
var statearr_24703_24773 = state_24638__$1;
(statearr_24703_24773[(1)] = (8));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (14))){
var inst_24512 = (state_24638[(22)]);
var inst_24521 = cljs.core.first.call(null,inst_24512);
var inst_24522 = figwheel.client.file_reloading.eval_body.call(null,inst_24521,opts);
var inst_24523 = cljs.core.next.call(null,inst_24512);
var inst_24499 = inst_24523;
var inst_24500 = null;
var inst_24501 = (0);
var inst_24502 = (0);
var state_24638__$1 = (function (){var statearr_24704 = state_24638;
(statearr_24704[(32)] = inst_24522);
(statearr_24704[(7)] = inst_24501);
(statearr_24704[(8)] = inst_24500);
(statearr_24704[(9)] = inst_24502);
(statearr_24704[(10)] = inst_24499);
return statearr_24704;
})();
var statearr_24705_24774 = state_24638__$1;
(statearr_24705_24774[(2)] = null);
(statearr_24705_24774[(1)] = (5));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (45))){
var state_24638__$1 = state_24638;
var statearr_24706_24775 = state_24638__$1;
(statearr_24706_24775[(2)] = null);
(statearr_24706_24775[(1)] = (46));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (26))){
var inst_24552 = (state_24638[(19)]);
var inst_24558 = (state_24638[(26)]);
var inst_24560 = (state_24638[(23)]);
var inst_24556 = (state_24638[(24)]);
var inst_24555 = (state_24638[(25)]);
var inst_24575 = figwheel.client.utils.log.call(null,new cljs.core.Keyword(null,"debug","debug",-1608172596),"Figwheel: loaded these files");
var inst_24577 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var dependencies_that_loaded = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (p__24576){
var map__24707 = p__24576;
var map__24707__$1 = ((((!((map__24707 == null)))?((((map__24707.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24707.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24707):map__24707);
var namespace = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"namespace","namespace",-377510372));
var file = cljs.core.get.call(null,map__24707__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
if(cljs.core.truth_(namespace)){
return figwheel.client.file_reloading.name__GT_path.call(null,cljs.core.name.call(null,namespace));
} else {
return file;
}
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24578 = cljs.core.map.call(null,inst_24577,inst_24556);
var inst_24579 = cljs.core.pr_str.call(null,inst_24578);
var inst_24580 = figwheel.client.utils.log.call(null,inst_24579);
var inst_24581 = (function (){var all_files = inst_24552;
var res_SINGLEQUOTE_ = inst_24555;
var res = inst_24556;
var files_not_loaded = inst_24558;
var dependencies_that_loaded = inst_24560;
return ((function (all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function (){
figwheel.client.file_reloading.on_jsload_custom_event.call(null,res);
return cljs.core.apply.call(null,on_jsload,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [res], null));
});
;})(all_files,res_SINGLEQUOTE_,res,files_not_loaded,dependencies_that_loaded,inst_24552,inst_24558,inst_24560,inst_24556,inst_24555,inst_24575,inst_24577,inst_24578,inst_24579,inst_24580,state_val_24639,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var inst_24582 = setTimeout(inst_24581,(10));
var state_24638__$1 = (function (){var statearr_24709 = state_24638;
(statearr_24709[(33)] = inst_24575);
(statearr_24709[(34)] = inst_24580);
return statearr_24709;
})();
var statearr_24710_24776 = state_24638__$1;
(statearr_24710_24776[(2)] = inst_24582);
(statearr_24710_24776[(1)] = (28));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (16))){
var state_24638__$1 = state_24638;
var statearr_24711_24777 = state_24638__$1;
(statearr_24711_24777[(2)] = reload_dependents);
(statearr_24711_24777[(1)] = (18));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (38))){
var inst_24592 = (state_24638[(16)]);
var inst_24609 = cljs.core.apply.call(null,cljs.core.hash_map,inst_24592);
var state_24638__$1 = state_24638;
var statearr_24712_24778 = state_24638__$1;
(statearr_24712_24778[(2)] = inst_24609);
(statearr_24712_24778[(1)] = (40));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (30))){
var state_24638__$1 = state_24638;
var statearr_24713_24779 = state_24638__$1;
(statearr_24713_24779[(2)] = null);
(statearr_24713_24779[(1)] = (31));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (10))){
var inst_24512 = (state_24638[(22)]);
var inst_24514 = cljs.core.chunked_seq_QMARK_.call(null,inst_24512);
var state_24638__$1 = state_24638;
if(inst_24514){
var statearr_24714_24780 = state_24638__$1;
(statearr_24714_24780[(1)] = (13));
} else {
var statearr_24715_24781 = state_24638__$1;
(statearr_24715_24781[(1)] = (14));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (18))){
var inst_24546 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
if(cljs.core.truth_(inst_24546)){
var statearr_24716_24782 = state_24638__$1;
(statearr_24716_24782[(1)] = (19));
} else {
var statearr_24717_24783 = state_24638__$1;
(statearr_24717_24783[(1)] = (20));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (42))){
var state_24638__$1 = state_24638;
var statearr_24718_24784 = state_24638__$1;
(statearr_24718_24784[(2)] = null);
(statearr_24718_24784[(1)] = (43));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (37))){
var inst_24604 = (state_24638[(2)]);
var state_24638__$1 = state_24638;
var statearr_24719_24785 = state_24638__$1;
(statearr_24719_24785[(2)] = inst_24604);
(statearr_24719_24785[(1)] = (34));
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
if((state_val_24639 === (8))){
var inst_24512 = (state_24638[(22)]);
var inst_24499 = (state_24638[(10)]);
var inst_24512__$1 = cljs.core.seq.call(null,inst_24499);
var state_24638__$1 = (function (){var statearr_24720 = state_24638;
(statearr_24720[(22)] = inst_24512__$1);
return statearr_24720;
})();
if(inst_24512__$1){
var statearr_24721_24786 = state_24638__$1;
(statearr_24721_24786[(1)] = (10));
} else {
var statearr_24722_24787 = state_24638__$1;
(statearr_24722_24787[(1)] = (11));
}
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
return null;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
});})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
;
return ((function (switch__20838__auto__,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents){
return (function() {
var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__ = null;
var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0 = (function (){
var statearr_24726 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null];
(statearr_24726[(0)] = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__);
(statearr_24726[(1)] = (1));
return statearr_24726;
});
var figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1 = (function (state_24638){
while(true){
var ret_value__20840__auto__ = (function (){try{while(true){
var result__20841__auto__ = switch__20838__auto__.call(null,state_24638);
if(cljs.core.keyword_identical_QMARK_.call(null,result__20841__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
continue;
} else {
return result__20841__auto__;
}
break;
}
}catch (e24727){if((e24727 instanceof Object)){
var ex__20842__auto__ = e24727;
var statearr_24728_24788 = state_24638;
(statearr_24728_24788[(5)] = ex__20842__auto__);
cljs.core.async.impl.ioc_helpers.process_exception.call(null,state_24638);
return new cljs.core.Keyword(null,"recur","recur",-437573268);
} else {
throw e24727;
}
}})();
if(cljs.core.keyword_identical_QMARK_.call(null,ret_value__20840__auto__,new cljs.core.Keyword(null,"recur","recur",-437573268))){
var G__24789 = state_24638;
state_24638 = G__24789;
continue;
} else {
return ret_value__20840__auto__;
}
break;
}
});
figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__ = function(state_24638){
switch(arguments.length){
case 0:
return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0.call(this);
case 1:
return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1.call(this,state_24638);
}
throw(new Error('Invalid arity: ' + arguments.length));
};
figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$0 = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____0;
figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__.cljs$core$IFn$_invoke$arity$1 = figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto____1;
return figwheel$client$file_reloading$reload_js_files_$_state_machine__20839__auto__;
})()
;})(switch__20838__auto__,c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
})();
var state__20952__auto__ = (function (){var statearr_24729 = f__20951__auto__.call(null);
(statearr_24729[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__20950__auto__);
return statearr_24729;
})();
return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped.call(null,state__20952__auto__);
});})(c__20950__auto__,map__24484,map__24484__$1,opts,before_jsload,on_jsload,reload_dependents,map__24485,map__24485__$1,msg,files,figwheel_meta,recompile_dependents))
);
return c__20950__auto__;
});
figwheel.client.file_reloading.current_links = (function figwheel$client$file_reloading$current_links(){
return Array.prototype.slice.call(document.getElementsByTagName("link"));
});
figwheel.client.file_reloading.truncate_url = (function figwheel$client$file_reloading$truncate_url(url){
return clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,clojure.string.replace_first.call(null,cljs.core.first.call(null,clojure.string.split.call(null,url,/\?/)),[cljs.core.str(location.protocol),cljs.core.str("//")].join(''),""),".*://",""),/^\/\//,""),/[^\\/]*/,"");
});
figwheel.client.file_reloading.matches_file_QMARK_ = (function figwheel$client$file_reloading$matches_file_QMARK_(p__24792,link){
var map__24795 = p__24792;
var map__24795__$1 = ((((!((map__24795 == null)))?((((map__24795.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24795.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24795):map__24795);
var file = cljs.core.get.call(null,map__24795__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var temp__4425__auto__ = link.href;
if(cljs.core.truth_(temp__4425__auto__)){
var link_href = temp__4425__auto__;
var match = clojure.string.join.call(null,"/",cljs.core.take_while.call(null,cljs.core.identity,cljs.core.map.call(null,((function (link_href,temp__4425__auto__,map__24795,map__24795__$1,file){
return (function (p1__24790_SHARP_,p2__24791_SHARP_){
if(cljs.core._EQ_.call(null,p1__24790_SHARP_,p2__24791_SHARP_)){
return p1__24790_SHARP_;
} else {
return false;
}
});})(link_href,temp__4425__auto__,map__24795,map__24795__$1,file))
,cljs.core.reverse.call(null,clojure.string.split.call(null,file,"/")),cljs.core.reverse.call(null,clojure.string.split.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href),"/")))));
var match_length = cljs.core.count.call(null,match);
var file_name_length = cljs.core.count.call(null,cljs.core.last.call(null,clojure.string.split.call(null,file,"/")));
if((match_length >= file_name_length)){
return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null,"link","link",-1769163468),link,new cljs.core.Keyword(null,"link-href","link-href",-250644450),link_href,new cljs.core.Keyword(null,"match-length","match-length",1101537310),match_length,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083),cljs.core.count.call(null,figwheel.client.file_reloading.truncate_url.call(null,link_href))], null);
} else {
return null;
}
} else {
return null;
}
});
figwheel.client.file_reloading.get_correct_link = (function figwheel$client$file_reloading$get_correct_link(f_data){
var temp__4425__auto__ = cljs.core.first.call(null,cljs.core.sort_by.call(null,(function (p__24801){
var map__24802 = p__24801;
var map__24802__$1 = ((((!((map__24802 == null)))?((((map__24802.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24802.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24802):map__24802);
var match_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"match-length","match-length",1101537310));
var current_url_length = cljs.core.get.call(null,map__24802__$1,new cljs.core.Keyword(null,"current-url-length","current-url-length",380404083));
return (current_url_length - match_length);
}),cljs.core.keep.call(null,(function (p1__24797_SHARP_){
return figwheel.client.file_reloading.matches_file_QMARK_.call(null,f_data,p1__24797_SHARP_);
}),figwheel.client.file_reloading.current_links.call(null))));
if(cljs.core.truth_(temp__4425__auto__)){
var res = temp__4425__auto__;
return new cljs.core.Keyword(null,"link","link",-1769163468).cljs$core$IFn$_invoke$arity$1(res);
} else {
return null;
}
});
figwheel.client.file_reloading.clone_link = (function figwheel$client$file_reloading$clone_link(link,url){
var clone = document.createElement("link");
clone.rel = "stylesheet";
clone.media = link.media;
clone.disabled = link.disabled;
clone.href = figwheel.client.file_reloading.add_cache_buster.call(null,url);
return clone;
});
figwheel.client.file_reloading.create_link = (function figwheel$client$file_reloading$create_link(url){
var link = document.createElement("link");
link.rel = "stylesheet";
link.href = figwheel.client.file_reloading.add_cache_buster.call(null,url);
return link;
});
figwheel.client.file_reloading.add_link_to_doc = (function figwheel$client$file_reloading$add_link_to_doc(var_args){
var args24804 = [];
var len__17884__auto___24807 = arguments.length;
var i__17885__auto___24808 = (0);
while(true){
if((i__17885__auto___24808 < len__17884__auto___24807)){
args24804.push((arguments[i__17885__auto___24808]));
var G__24809 = (i__17885__auto___24808 + (1));
i__17885__auto___24808 = G__24809;
continue;
} else {
}
break;
}
var G__24806 = args24804.length;
switch (G__24806) {
case 1:
return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));
break;
case 2:
return figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));
break;
default:
throw (new Error([cljs.core.str("Invalid arity: "),cljs.core.str(args24804.length)].join('')));
}
});
figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$1 = (function (new_link){
return (document.getElementsByTagName("head")[(0)]).appendChild(new_link);
});
figwheel.client.file_reloading.add_link_to_doc.cljs$core$IFn$_invoke$arity$2 = (function (orig_link,klone){
var parent = orig_link.parentNode;
if(cljs.core._EQ_.call(null,orig_link,parent.lastChild)){
parent.appendChild(klone);
} else {
parent.insertBefore(klone,orig_link.nextSibling);
}
return setTimeout(((function (parent){
return (function (){
return parent.removeChild(orig_link);
});})(parent))
,(300));
});
figwheel.client.file_reloading.add_link_to_doc.cljs$lang$maxFixedArity = 2;
figwheel.client.file_reloading.distictify = (function figwheel$client$file_reloading$distictify(key,seqq){
return cljs.core.vals.call(null,cljs.core.reduce.call(null,(function (p1__24811_SHARP_,p2__24812_SHARP_){
return cljs.core.assoc.call(null,p1__24811_SHARP_,cljs.core.get.call(null,p2__24812_SHARP_,key),p2__24812_SHARP_);
}),cljs.core.PersistentArrayMap.EMPTY,seqq));
});
figwheel.client.file_reloading.reload_css_file = (function figwheel$client$file_reloading$reload_css_file(p__24813){
var map__24816 = p__24813;
var map__24816__$1 = ((((!((map__24816 == null)))?((((map__24816.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24816.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24816):map__24816);
var f_data = map__24816__$1;
var file = cljs.core.get.call(null,map__24816__$1,new cljs.core.Keyword(null,"file","file",-1269645878));
var temp__4425__auto__ = figwheel.client.file_reloading.get_correct_link.call(null,f_data);
if(cljs.core.truth_(temp__4425__auto__)){
var link = temp__4425__auto__;
return figwheel.client.file_reloading.add_link_to_doc.call(null,link,figwheel.client.file_reloading.clone_link.call(null,link,link.href));
} else {
return null;
}
});
figwheel.client.file_reloading.reload_css_files = (function figwheel$client$file_reloading$reload_css_files(p__24818,files_msg){
var map__24825 = p__24818;
var map__24825__$1 = ((((!((map__24825 == null)))?((((map__24825.cljs$lang$protocol_mask$partition0$ & (64))) || (map__24825.cljs$core$ISeq$))?true:false):false))?cljs.core.apply.call(null,cljs.core.hash_map,map__24825):map__24825);
var opts = map__24825__$1;
var on_cssload = cljs.core.get.call(null,map__24825__$1,new cljs.core.Keyword(null,"on-cssload","on-cssload",1825432318));
if(cljs.core.truth_(figwheel.client.utils.html_env_QMARK_.call(null))){
var seq__24827_24831 = cljs.core.seq.call(null,figwheel.client.file_reloading.distictify.call(null,new cljs.core.Keyword(null,"file","file",-1269645878),new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg)));
var chunk__24828_24832 = null;
var count__24829_24833 = (0);
var i__24830_24834 = (0);
while(true){
if((i__24830_24834 < count__24829_24833)){
var f_24835 = cljs.core._nth.call(null,chunk__24828_24832,i__24830_24834);
figwheel.client.file_reloading.reload_css_file.call(null,f_24835);
var G__24836 = seq__24827_24831;
var G__24837 = chunk__24828_24832;
var G__24838 = count__24829_24833;
var G__24839 = (i__24830_24834 + (1));
seq__24827_24831 = G__24836;
chunk__24828_24832 = G__24837;
count__24829_24833 = G__24838;
i__24830_24834 = G__24839;
continue;
} else {
var temp__4425__auto___24840 = cljs.core.seq.call(null,seq__24827_24831);
if(temp__4425__auto___24840){
var seq__24827_24841__$1 = temp__4425__auto___24840;
if(cljs.core.chunked_seq_QMARK_.call(null,seq__24827_24841__$1)){
var c__17629__auto___24842 = cljs.core.chunk_first.call(null,seq__24827_24841__$1);
var G__24843 = cljs.core.chunk_rest.call(null,seq__24827_24841__$1);
var G__24844 = c__17629__auto___24842;
var G__24845 = cljs.core.count.call(null,c__17629__auto___24842);
var G__24846 = (0);
seq__24827_24831 = G__24843;
chunk__24828_24832 = G__24844;
count__24829_24833 = G__24845;
i__24830_24834 = G__24846;
continue;
} else {
var f_24847 = cljs.core.first.call(null,seq__24827_24841__$1);
figwheel.client.file_reloading.reload_css_file.call(null,f_24847);
var G__24848 = cljs.core.next.call(null,seq__24827_24841__$1);
var G__24849 = null;
var G__24850 = (0);
var G__24851 = (0);
seq__24827_24831 = G__24848;
chunk__24828_24832 = G__24849;
count__24829_24833 = G__24850;
i__24830_24834 = G__24851;
continue;
}
} else {
}
}
break;
}
return setTimeout(((function (map__24825,map__24825__$1,opts,on_cssload){
return (function (){
return on_cssload.call(null,new cljs.core.Keyword(null,"files","files",-472457450).cljs$core$IFn$_invoke$arity$1(files_msg));
});})(map__24825,map__24825__$1,opts,on_cssload))
,(100));
} else {
return null;
}
});
//# sourceMappingURL=file_reloading.js.map?rel=1449036926031 | Java |
export default class State {
constructor($rootScope) {
this.$rootScope = $rootScope;
this.state = [];
}
setData(data) {
console.log('state set data', data)
this.state = data;
this.$rootScope.$apply();
}
getData() {
//console.log('state get data', state)
return this.state;
}
}
| Java |
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 9 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 10 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 11 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 12 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 13 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
python tile_grab2.py -b "35.247;32.130;42.786;37.676" -z 14 -i false -d "syria_satellite" -u "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v9/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic3BhdGlhbG5ldHdvcmtzIiwiYSI6ImNpcW83Mm1kYjAxZ3hmbm5ub2llYnNuMmkifQ.an57h9ykokxNlGArcWQztw" -f jpg
| Java |
<?php
/**
* This file is part of the BootstrapBundle project.
*
* (c) 2013 Philipp Boes <mostgreedy@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace P2\Bundle\BootstrapBundle\Form\Extension;
/**
* Class FormTypeExtension
* @package P2\Bundle\BootstrapBundle\Form\Extension
*/
class FormTypeExtension extends AbstractTypeExtension
{
/**
* {@inheritDoc}
*/
public function getExtendedType()
{
return 'form';
}
}
| Java |
---
layout: post
date: 2015-10-14
title: "Allure Quinceanera Dresses - Style Q400 2015 Sleeveless Floor-Length Ballgown"
category: Allure
tags: [Allure,Ballgown,Sweetheart,Floor-Length,Sleeveless,2015]
---
### Allure Quinceanera Dresses - Style Q400
Just **$266.99**
### 2015 Sleeveless Floor-Length Ballgown
<table><tr><td>BRANDS</td><td>Allure</td></tr><tr><td>Silhouette</td><td>Ballgown</td></tr><tr><td>Neckline</td><td>Sweetheart</td></tr><tr><td>Hemline/Train</td><td>Floor-Length</td></tr><tr><td>Sleeve</td><td>Sleeveless</td></tr><tr><td>Years</td><td>2015</td></tr></table>
<a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1554/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a>
<!-- break --><a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1555/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a>
<a href="https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html"><img src="//img.readybrides.com/1553/allure-quinceanera-dresses-style-q400.jpg" alt="Allure Quinceanera Dresses - Style Q400" style="width:100%;" /></a>
Buy it: [https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html](https://www.readybrides.com/en/allure/439-allure-quinceanera-dresses-style-q400.html)
| Java |
14 uid=311598
27 mtime=1430738623.672251
27 atime=1430738623.671251
| Java |
var request = require('request');
var Client = (function () {
function Client() {
this.options = {
"url": "",
"method": "GET",
"bodyParams": {},
"gzip": true,
"json": true
};
}
Client.prototype.connect = function (parent) {
var config = parent.config;
this.configure(config);
this._connector = parent;
parent.logger.trace('Connected to google custom search');
};
Client.prototype.disconnect = function (parent) {
this.config = {};
this.url = '';
this._connector = parent;
parent.logger.trace('Disconnected from google custom search');
};
Client.prototype.configure = function (config) {
if (!config || !config.key)
throw new Error('Configuration is not set.');
this.key = config.key;
this.config = config;
if (config.cx)
this.cx = config.cx;
else if (config.cref)
this.cref = config.cref;
if (!this.cx && !this.cref)
throw new Error('You must provide either cx or cref parameter in your configuration!');
this.url = 'https://www.googleapis.com/customsearch/v1?key=' + this.key;
if (this.cx)
this.url += '&cx=' + this.cx;
else if (this.cref)
this.url += '&cref=' + this.cref;
this.baseUrl = this.url;
return true;
};
Client.prototype.setParameters = function (v) {
if (!v.where)
throw "You need to set a where clause and provide a query ('q') parameter";
if (typeof v.where === 'string' || v.where instanceof String)
v.where = JSON.parse(v.where);
if (!v.where.q) {
throw "You need to provide a query ('q') parameter in where clause.";
}
this._parseParameters(v);
this._creteQuery();
this.url = this.baseUrl + this._query;
return this;
};
Client.prototype.query = function (callback) {
this.options.url = this.url;
return request(this.options, callback);
};
Client.prototype.prepareResults = function (results, model) {
var tmp_results = [];
if (results && results.length) {
for (var i = 0; i < results.length; i++) {
var p_model = this._createIndividualModel(model, results[i]);
tmp_results.push(p_model);
}
}
return tmp_results;
};
Client.prototype._creteQuery = function () {
var params = this._params;
var i = 0;
for (var key in params) {
if (i === 0) {
this._query = '&' + key + '=' + params[key];
}
else {
this._query += '&' + key + '=' + params[key];
}
i++;
}
return this._query;
};
Client.prototype._parseParameters = function (v) {
if (!v.per_page)
v.where.num = 10;
else
v.where.num = v.per_page;
if (!v.skip)
v.where.start = 1;
else
v.where.start = v.skip;
if (v.limit)
v.where.num = v.limit - v.where.start;
if (v.page) {
v.where.start = ((v.page - 1) * v.per_page + 1);
}
if (v.order)
v.where.sort = v.order;
if (v.linkSite)
v.where.linkSite = v.linkSite;
if (v.lowRange)
v.where.lowRange = v.lowRange;
if (v.relatedSite)
v.where.relatedSite = v.relatedSite;
if (v.searchType)
v.where.searchType = v.searchType;
if (v.siteSearch)
v.where.siteSearch = v.siteSearch;
if (v.siteSearchFilter)
v.where.siteSearchFilter = v.siteSearchFilter;
this._params = v.where;
return true;
};
Client.prototype._createIndividualModel = function (Model, data) {
var model = Model.instance(data, true);
model.setPrimaryKey(data.cacheId);
return model;
};
return Client;
})();
exports.Client = Client;
//# sourceMappingURL=client.js.map | Java |
#encoding:UTF-8
# ISS017 - Character Improve 1.1
#==============================================================================#
# ** ISS - Character Improve
#==============================================================================#
# ** Date Created : 08/04/2011
# ** Date Modified : 08/10/2011
# ** Created By : IceDragon
# ** For Game : Code JIFZ
# ** ID : 017
# ** Version : 1.1
# ** Requires : ISS000 - Core(1.9 or above)
#==============================================================================#
($imported ||= {})["ISS-CharacterImprove"] = true
#==============================================================================#
# ** ISS
#==============================================================================#
module ISS
install_script(17, :system)
end
#==============================================================================#
# ** Game_Character
#==============================================================================#
class Game_Character
#--------------------------------------------------------------------------#
# * Public Instance Variables
#--------------------------------------------------------------------------#
attr_accessor :sox, :soy, :soz
#--------------------------------------------------------------------------#
# * alias-method :initialize
#--------------------------------------------------------------------------#
alias :iss017_gmc_initialize :initialize unless $@
def initialize(*args, &block)
@sox, @soy, @soz = 0, 0, 0
iss017_gmc_initialize(*args, &block)
end
#--------------------------------------------------------------------------#
# * alias-method :screen_x
#--------------------------------------------------------------------------#
alias :iss017_gmc_screen_x :screen_x unless $@
def screen_x(*args, &block)
return iss017_gmc_screen_x(*args, &block) + @sox
end
#--------------------------------------------------------------------------#
# * alias-method :screen_y
#--------------------------------------------------------------------------#
alias :iss017_gmc_screen_y :screen_y unless $@
def screen_y(*args, &block)
return iss017_gmc_screen_y(*args, &block) + @soy
end
#--------------------------------------------------------------------------#
# * alias-method :screen_z
#--------------------------------------------------------------------------#
alias :iss017_gmc_screen_z :screen_z unless $@
def screen_z(*args, &block)
return iss017_gmc_screen_z(*args, &block) + @soz
end
end
#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#
| Java |
# mozaik-ext-sheets
List rows from Google Sheets in Mozaïk dashboard. The extension can be handy for various
use cases where data is maintained in Google Sheets:
- List events (including dates etc)
- Show game results
- Show event participants, company vacation listing
- Etc.

- The widget tries to provide a generic but easy-to-use way to show content in dashboard.
- You can also utilise the Sheets functions as the outcome is shown in widget
- Use format functions to format some cell data
- Use filter function to leave out some results
## Setup
- Install module
```bash
npm install --save mozaik-ext-sheets
```
- Create a project and service account in Google Developer Console
- Enable API: Drive API
- Collect service email and .p12 file
- Convert .p12 file into .PEM
- Configure service key and .PEM file into dashboard ``config.js`` file and
environment variables / ``.env`` file:
```javascript
api: {
sheets: {
googleServiceEmail: process.env.GOOGLE_SERVICE_EMAIL,
googleServiceKeypath: process.env.GOOGLE_SERVICE_KEYPATH
}
}
```
- Done.
## Widget: List
Show cell contents in a listing. Use dashboard theme to customize the outcome to match with your requirements.
### parameters
key | required | description
--------------|----------|---------------
`documentId` | yes | *Sheets document id, taken form web UI*
`sheetNo` | no | *Sheet order number, starting from 0. Defaults to first: `0`*
`range` | no | *Range from where to list data. Example: `A2:C10` or `A2:`. Defaults to full sheet*
`fields` | no | *Columns to list, using advanced formatting*
`format` | no | *Custom formating functions in object, where key is name of the formatter and used like {COLUMNLETTER!formatter}. See usage for examples*
`filter` | no | *Filter some rows out of the outcome by implementing the function. See usage for examples*
### usage
Imaginary example of Google Sheet document cells:
```
| A | B | C | D |
1 | 2015-01-28 | React.js Conf | Facebook HQ | |
2 | 2015-07-02 | ReactEurope | Paris, France | |
```
One widget in dashboard config:
```javascript
// widget in config.js
{
type: 'sheets.list',
// You can find the documentId in sheet URL
documentId: 'abasdfsdfafsd123123',
range: 'A1:D10',
// Values (cells) to show on each row. Use one or multiple column letters:
// Uses https://www.npmjs.com/package/string-format for formatting
fields: [
'Event date: {A!date}',
'{B!uppercase}',
'{C} {D}'
],
// Custom formatter functions, name must match with the usage: !method
// NOTE: Call method.toString() to every function!
// NOTE: `moment` is available
format: {
// !date formatter
date: function(s){
return new moment(s).format('YYYY-MM-DD');
}.toString(),
// !uppercase formatter
uppercase: function(s) {
return s.toUpperCase();
}.toString()
},
// Custom function to filter some results rows
// If defined, each row is processed through it.
// Return `false` if you want to filter the row out and `true`
// for inclusion.
// NOTE: Only one variable is passed, containing all columns from current row
// NOTE: Variable `columns` does not contain the columns out of the range
// NOTE: Call method.toString() to every function!
filter: function(columns){
var eventStart = moment(columns.B, ['YYYY-MM-DD']);
// Filter out the results that are in past
if (eventStart.isBefore(new moment())) {
return false;
}
return true;
}.toString(),
columns: 1, rows: 2,
x: 0, y: 0
}
```
## License
Module is MIT -licensed
## Credit
Module is backed by:
<a href="http://sc5.io">
<img src="http://logo.sc5.io/78x33.png" style="padding: 4px 0;">
</a>
| Java |
function* generatorFn() {
yield 'foo';
yield 'bar';
return 'baz';
}
let generatorObject1 = generatorFn();
let generatorObject2 = generatorFn();
console.log(generatorObject1.next()); // { done: false, value: 'foo' }
console.log(generatorObject2.next()); // { done: false, value: 'foo' }
console.log(generatorObject2.next()); // { done: false, value: 'bar' }
console.log(generatorObject1.next()); // { done: false, value: 'bar' }
GeneratorYieldExample03.js
| Java |
<div class="four wide column center aligned votes">
<div class="ui statistic">
<div class="value">
{{ article.votes }}
</div>
<div class="label">
Points
</div>
</div>
</div>
<div class="twelve wide column">
<a class="ui large header" href="{{ article.link }}">
{{ article.title }}
</a>
<div class="meta">({{ article.domain() }})</div>
<ul class="ui big horizontal list votes">
<li class="item">
<a href="" (click)="voteUp()">
<i class="arrow up icon"></i>
upvote
</a>
<li class="item">
<a href="" (click)="voteDown()">
<i class="arrow up icon"></i>
downvote
</a>
</li>
</ul>
</div>
| Java |
#pragma once
#include "animations/display.h"
#include "animations/AnimationProgram.h"
#include "animations/PaintPixel.h"
#include "blewiz/BLECharacteristic.h"
#include "freertos/task.h"
class BadgeService : public BLEService {
public:
BadgeService(Display &display, AnimationProgram &animationProgram);
virtual ~BadgeService();
void init();
void setPaintPixel(PaintPixel *paintPixel) { this->paintPixel = paintPixel; }
void onStarted() override;
void onConnect() override;
void onDisconnect() override;
private:
Display &display;
AnimationProgram &animationProgram;
PaintPixel *paintPixel;
BLECharacteristic batteryCharacteristic;
BLEDescriptor batteryNotifyDesciptor;
BLECharacteristic brightnessCharacteristic;
BLECharacteristic programCharacteristic;
BLECharacteristic downloadCharacteristic;
BLECharacteristic paintPixelCharacteristic;
BLECharacteristic paintFrameCharacteristic;
BLECharacteristic appVersionCharacteristic;
BLECharacteristic frameDumpCharacteristic;
static void batteryTask(void *parameters);
TaskHandle_t taskHandle;
std::vector<uint8_t> paintFrame;
};
| Java |
/*
Document : colors
Author : Little Neko
Description: template colors
*/
/* Table of Content
==================================================
#BOOSTRAP CUSTOMIZATION
#TYPOGRAPHY
#LINKS AND BUTTONS
#HEADER
#MAIN MENU
#FOOTER
#SLIDERS
#PORTFOLIO
#MISCELANIOUS
#NEKO CSS FRAMEWORK
*/
/* BOOSTRAP CUSTOMIZATION
================================================== */
/** tabs **/
.panel-default>.panel-heading {background:#EB7F37; }
.panel-default>.panel-heading:hover {background:#fff; }
.panel-default>.panel-heading:hover a {color:#EB7F37; }
.panel-title>a {color:#fff;}
.panel-title>a:hover {text-decoration: none;}
/* END BOOSTRAP CUSTOMIZATION
================================================== */
/* TYPOGRAPHY
================================================== */
body {
color:#777;
background: #fff;
}
blockquote small {
color:inherit;
}
h1, h2, h3, h4, h5, h6 {
color:#222;
}
h2 {
color:#888;
}
h2 i {color:#999}
h2.subTitle:after, h1.noSubtitle:after{
background-color:#EB7F37;
}
/*** parallax sections ***/
.paralaxText blockquote:before, .paralaxText blockquote:after {
color:#fff;
}
#home, #paralaxSlice1, #paralaxSlice2, #paralaxSlice3, #paralaxSlice4 {
background-color:#EB7F37;
}
#home {
background-image:url('../images/theme-pics/paralax-grey-3.jpg');
}
#paralaxSlice1 {
background-image: url('../images/theme-pics/paralax-1.jpg');
}
#paralaxSlice2 {
background-image: url('../images/theme-pics/paralax-grey-2.jpg');
}
#paralaxSlice3 {
background-image: url('../images/theme-pics/paralax-grey-3.jpg');
}
#paralaxSlice4 {
background-image: url('../images/theme-pics/paralax-4.jpg');
}
.paralaxText blockquote, .paralaxText h1, .paralaxText h2, .paralaxText h3, .paralaxText p, .paralaxText i{
color:#fff;
}
/* END TYPOGRAPHY
================================================== */
/* LINKS AND BUTTONS
================================================== */
a {
color:#EB7F37;
}
a:hover, .scrollspyNav .active a {
color:#EB7F37;
}
ul.iconsList li a {
color:#555
}
ul.iconsList li a:hover, ul.iconsList i {
color:#EB7F37
}
/*** buttons ***/
.btn {
background:#EB7F37;
color:#fff;
border:2px solid #fff;
}
.btn:hover {
color:#EB7F37;
border-color:#eee;
text-shadow:none;
background:#fff
}
.btn-primary {
background: #006dcc;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .btn-primary.disabled, .btn-primary[disabled] {
background: #555;
}
.btn-info {
background: #49AFCD;
}
.btn-success {
background: #5BB75B;
}
.btn-warning {
background: #FAA732;
}
.btn-danger {
background: #DA4F49;
}
.btn-link, .btn-link:active, .btn-link[disabled], .btn-link:hover {
background:none;
border:none;
-moz-box-shadow: none;
-webkit-box-shadow:none;
box-shadow: none;
color:#49AFCD;
}
.btnWrapper {
border:1px solid #ccc;
}
/* END LINKS AND BUTTONS
================================================== */
/* MAIN MENU
================================================== */
#mainHeader{
background-color: white;
-webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}
#mainMenu ul li a, #resMainMenu ul li a {
color:#444;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:focus, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus {
background: #EB7F37;
color:#fff;
}
/* END MAIN MENU
================================================== */
/* FOOTER
================================================== */
footer {
color:#777;
background:#eee;
}
#footerRights {
background-color:#fff;
color:#999;
}
p.credits {
color:#555;
}
p.credits a {
color:#EB7F37;
}
/* END FOOTER
================================================== */
/* HOME
================================================== */
#home h1 {color:#FFFFFF;}
/* END HOME
================================================== */
/* SLIDERS
================================================== */
/*** FLEX ***/
.flexslider {
box-shadow:none;
}
.slides .txt div {
background:#444;
color:#FFFFFF;
}
.flexslider .flex-direction-nav a {
background-color:#EB7F37;
}
.flexslider .flex-control-paging li a:hover, #sliderWrapper .flex-control-paging li a.flex-active{
background: #fff;
border:2px solid #fff;
}
.flexslider .flex-control-paging li a {
background: transparent;
border:2px solid rgba(255,255,255,0.5);
}
.flexslider .flex-control-nav {
background:transparent;
}
.flexslider h1 {
color:#fff;
background-color:#EB7F37;
}
.flexslider h2 {
color:#fff;
background-color:#333;
}
.flexslider .caption p {
background-color:#fff;
color:#555
}
/*** flexHome ***/
#flexHome h1 { color:#fff;
background:none;
}
#flexHome h2 { color:#fff;
background:none;
}
/*** END FLEX SLIDER ***/
/* END SLIDERS
================================================== */
/* PORTFOLIO
================================================== */
nav#filter a {
background-color: #EEE;
color:#555;
}
nav#filter a:hover, nav#filter a.current {
background-color: #EB7F37;
color:#fff;
}
li.filterTitle {
color:#4F6266;
}
section#projectDescription {
background-color:#F8F8F8
}
.mask{background-color: #EB7F37;}
/* END PORTFOLIO
================================================== */
/* MISCELANIOUS
================================================== */
/*** hover images ***/
.iconLinks a span {color:#fff;}
/*** pricing table ***/
.pricingBloc {
background-color:#fff;
border:1px solid rgba(0, 0, 0, 0.2);
}
.pricingBloc ul li {
border-bottom:1px solid #ddd;
color:#444!important;
}
.pricingBloc ul li:last-child {
border-bottom:none;
}
.pricingBloc h2 {
background-color:#555;
color:#888!important;
border:none;
}
.pricingBloc h3 {
background-color:#777;
color:#fff!important;
}
.pricingBloc p {
background-color:#eee;
color:#444!important;
}
.pricingBloc.focusPlan {
margin-top:0;
border-color:#D1D1D1;
}
.pricingBloc.focusPlan h2{
background-color:#333;
color:#fff!important;
}
.pricingBloc.focusPlan h3 {
background-color:#EB7F37;
padding:1.25em;
color:#fff!important;
}
/*** Form ***/
.form-control:focus{
border: none;
background-color:#ddd;
box-shadow:none;
-webkit-box-shadow:none;
-moz-box-shadow:none;
}
.form-control {
color: #444;
background-color:#ededed;
border:none;
}
.error {color: #B94A48;
background-color: #F2DEDE;
border-color: #EED3D7;}
label.error {color:#fff;
background-color: #B94A48;
border:none}
#projectQuote, #projectQuote h3{background:#ddd;color:#444;}
/* END MISCELANIOUS
================================================== */
/* NEKO CSS FRAMEWORK
================================================== */
/*** Feature box **/
.boxFeature i{color:#EB7F37;}
/*** slices ***/
.slice{
background-color:#fff;
}
/*** call to action ***/
.ctaBox {border:2px solid rgba(0,0,0,0.05);}
.ctaBoxFullwidth{border:none}
.ctaBox blockquote {
color:#fff;
}
/*color1*/
.color1, .slice.color1, .bulle.color1, .ctaBox.color1{
background-color:#F7F7F7;
color:#444;
}
.color1 h1, .color1 h2, .color1 h3, .color1 h4, .color1 blockquote, .color1 a{
color:#444;
}
.color1 a.btn{color:#fff;}
.color1 a.btn:hover{color:#EB7F37;}
/*color4*/
.color4, .slice.color4, .bulle.color4, .ctaBox.color4{
background-color:#EB7F37;
color:#fff;
}
.color4 h1, .color4 h2, .color4 h3, .color4 h4, .color4 blockquote, .color4 a {
color:#fff;
}
.color4 h2.subTitle:after, .color4 h1.noSubtitle:after {
background:#fff;
}
/*** icons ***/
.iconRounded {border:2px solid #EB7F37;color:#EB7F37;background-color:#fff;}
.iconRounded:hover, .color1 .iconRounded:hover{background-color:#EB7F37;color:#fff;}
.color1 .iconRounded {color:#EB7F37;}
.color4 .iconRounded {background-color:#FFF;color:#EB7F37;}
/* END NEKO CSS FRAMEWORK
================================================== */
| Java |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>bitcoinlite</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The bitcoinlite developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Tạo một địa chỉ mới</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your bitcoinlite addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+35"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-58"/>
<source>bitcoinlite will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+280"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+242"/>
<source>Synchronizing with network...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-308"/>
<source>&Overview</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Show information about bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+250"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-247"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Send coins to a bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Modify configuration options for bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-200"/>
<source>bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+178"/>
<source>&About bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>&File</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>bitcoinlite client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+70"/>
<source>%n active connection(s) to bitcoinlite network</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="-284"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+288"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid bitcoinlite address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+76"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. bitcoinlite can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid bitcoinlite address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+420"/>
<location line="+12"/>
<source>bitcoinlite-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start bitcoinlite after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start bitcoinlite on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the bitcoinlite client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the bitcoinlite network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting bitcoinlite.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show bitcoinlite addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting bitcoinlite.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the bitcoinlite network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-108"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+113"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+348"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the bitcoinlite-Qt help message to get a list with possible bitcoinlite command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>bitcoinlite - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>bitcoinlite Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the bitcoinlite debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-33"/>
<source>Welcome to the bitcoinlite RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>123.456 BC</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>WARNING: Invalid bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<location filename="../sendcoinsentry.cpp" line="+25"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified bitcoinlite address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a bitcoinlite address (e.g. B8gZqgY4r2RoEdqYk3QsAqFckyf9pRHN6i)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter bitcoinlite signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 20 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+226"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>bitcoinlite version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or bitcoinlited</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: bitcoinlite.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: bitcoinlited.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 21347 or testnet: 31347)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 21348 or testnet: 31348)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong bitcoinlite will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=bitcoinliterpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "bitcoinlite Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. bitcoinlite is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of bitcoinlite</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart bitcoinlite to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. bitcoinlite is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | Java |
// var isWaiting = false;
// var isRunning = false;
// var seconds = 10;
// var countdownTimer;
// var finalCountdown = false;
function GameTimer(game) {
this.seconds = game.timelimit;
this.secondPassed = function() {
if (this.seconds === 0 && !game.gameOver) {
game.endGame();
} else if (!game.gameOver) {
this.seconds--;
$("#timer_num").html(this.seconds);
}
}
var countdownTimer = setInterval('t.secondPassed()', 1000);
}
| Java |
Click With Me Now
==============
This is an integration between Interactive Intelligence's CIC platform and Click With Me Now.
See the [wiki](https://github.com/InteractiveIntelligence/ClickWithMeNow/wiki) for more information.
Visit CWMN at http://clickwithmenow.com
| Java |
package uk.gov.prototype.vitruvius.parser.validator;
import java.util.List;
public class ValidationMessage {
private String message;
private ValidationType type;
public ValidationMessage() {
}
public ValidationMessage(String message, ValidationType type) {
this.message = message;
this.type = type;
}
public String getMessage() {
return message;
}
public ValidationType getType() {
return type;
}
@Override
public String toString() {
return "ValidationMessage{" +
"message='" + message + '\'' +
", type=" + type +
'}';
}
public enum ValidationType {
ERROR,
WARNING
}
public static ValidationMessage createErrorMessage(String message) {
return new ValidationMessage(message, ValidationType.ERROR);
}
public static ValidationMessage createWarning(String message) {
return new ValidationMessage(message, ValidationType.WARNING);
}
public static boolean hasErrors(List<ValidationMessage> messages) {
for (ValidationMessage validationMessage : messages) {
if (validationMessage.getType() == ValidationType.ERROR) {
return true;
}
}
return false;
}
}
| Java |
/* global Cervus */
const material = new Cervus.materials.PhongMaterial({
requires: [
Cervus.components.Render,
Cervus.components.Transform
],
texture: Cervus.core.image_loader('../textures/4.png'),
normal_map: Cervus.core.image_loader('../textures/normal2.jpg')
});
const phong_material = new Cervus.materials.PhongMaterial({
requires: [
Cervus.components.Render,
Cervus.components.Transform
]
});
const game = new Cervus.core.Game({
width: window.innerWidth,
height: window.innerHeight,
// clear_color: 'f0f'
// fps: 1
});
game.camera.get_component(Cervus.components.Move).keyboard_controlled = true;
// game.camera.get_component(Cervus.components.Move).mouse_controlled = true;
// By default all entities face the user.
// Rotate the camera to see the scene.
const camera_transform = game.camera.get_component(Cervus.components.Transform);
camera_transform.position = [0, 2, 5];
camera_transform.rotate_rl(Math.PI);
// game.camera.keyboard_controlled = true;
const plane = new Cervus.shapes.Plane();
const plane_transform = plane.get_component(Cervus.components.Transform);
const plane_render = plane.get_component(Cervus.components.Render);
plane_transform.scale = [100, 1, 100];
plane_render.material = phong_material;
plane_render.color = "#eeeeee";
game.add(plane);
const cube = new Cervus.shapes.Box();
const cube_transform = cube.get_component(Cervus.components.Transform);
const cube_render = cube.get_component(Cervus.components.Render);
cube_render.material = material;
cube_render.color = "#00ff00";
cube_transform.position = [0, 0.5, -1];
const group = new Cervus.core.Entity({
components: [
new Cervus.components.Transform()
]
});
game.add(group);
group.add(cube);
//
game.on('tick', () => {
// group.get_component(Cervus.components.Transform).rotate_rl(16/1000);
game.light.get_component(Cervus.components.Transform).position = game.camera.get_component(Cervus.components.Transform).position;
});
| Java |
#!/bin/mksh
# (c) alexh 2016
set -eu
printf "%s\n\n" 'Content-type: text/plain'
# Optional with use of 'check_interval'
WANTED_INTERVAL='10'
USER="$( /usr/bin/whoami )"
HOMES_DIR='/home'
WWW_DIR="/var/www/virtual/${USER}"
HOME="${HOMES_DIR}/${USER}"
VAR_DIR="${HOME}/var/git-publish"
SRC_DIR="${HOME}/git"
function identify_service {
case "${HTTP_USER_AGENT}" in
send_post_manual)
printf "%s\n" 'Service identified as send_post_manual. Hi!'
. "${VAR_DIR}"/read_post_manual
;;
GitHub-Hookshot/*)
printf "%s\n" 'Service identified as GitHub.'
. "${VAR_DIR}"/read_post_github
;;
*)
printf "%s\n" "I don't know service ${HTTP_USER_AGENT}."
exit 73
;;
esac
}
POST="$(cat)"
if [ -z "${POST}" ]; then
printf "%s\n" 'POST empty'
exit 70
fi
function check_signature {
get_sig
if [ "${SIGNATURE}" == "${POST_SIG}" ]; then
printf "%s\n" 'POST body: Good signature'
else
printf "%s\n" 'POST body: Wrong signature'
exit 79
fi
}
function id_values {
ID_VALUES="$( /bin/grep -E "^${ID}\ " "${VAR_DIR}"/list.txt )"
REPO="$( /bin/awk '{print $1}'<<<"${ID_VALUES}" )"
BRANCH="$( /bin/awk '{print $2}'<<<"${ID_VALUES}" )"
BUILD_FUNCTION="$( /bin/awk '{print $3}'<<<"${ID_VALUES}" )"
URL="$( /bin/awk '{print $4}'<<<"${ID_VALUES}" )"
SECRET_TOKEN="$( /bin/awk '{print $5}'<<<"${ID_VALUES}" )"
REPO_DIR="${VAR_DIR}/${REPO}"
if [ ! -d "${REPO_DIR}" ]; then
mkdir -p "${REPO_DIR}"
fi
}
function check_interval {
CALLTIME="$( /bin/date +%s )"
if [ ! -f "${REPO_DIR}"/last.txt ];then
printf "%d\n" '0' >"${REPO_DIR}"/last.txt
fi
LAST_CALLTIME="$( <"${REPO_DIR}"/last.txt )"
INTERVAL="$(( ${CALLTIME} - ${LAST_CALLTIME} ))"
TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))"
if [ ! -f "${REPO_DIR}"/waiting.txt ];then
printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt
fi
WAITING="$( <"${REPO_DIR}"/waiting.txt )"
if [ "${WAITING}" == 1 ]; then
CASE='waiting'
else
if (( "${INTERVAL}" > "${WANTED_INTERVAL}" )); then
CASE='ready'
else
CASE='too_soon'
fi
fi
}
function update {
cd "${SRC_DIR}"/"${REPO}"
printf "%s" "Git checkout: "
/usr/bin/git checkout "${BRANCH}"
printf "%s" "Git pull: "
/usr/bin/git pull
. "${VAR_DIR}"/"${BUILD_FUNCTION}"
build
rsync -qaP --del --exclude-from='.gitignore' dest/ "${WWW_DIR}"/"${URL}"/
printf "%s\n" 'Synced'
}
function update_stuff {
case "${CASE}" in
waiting)
printf "Update in queue. %d seconds left.\n" "${TIME_LEFT}"
exit 72
;;
ready)
printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt
;;
too_soon)
printf "%d\n" '1' >"${REPO_DIR}"/waiting.txt
TIME_LEFT="$(( ${WANTED_INTERVAL} - ${INTERVAL} ))"
printf "Waiting for %d seconds.\n" "${TIME_LEFT}"
sleep "${TIME_LEFT}"
;;
esac
if [ ! -f "${REPO_DIR}"/progress.txt ]; then
printf "%d\n" '0' >"${REPO_DIR}"/progress.txt
fi
progress="$(<"${REPO_DIR}"/progress.txt)"
while (( "${progress}" == '1' )); do
progress="$(<"${REPO_DIR}"/last.txt)"
printf "%s\n" 'Earlier update in progress. Waiting...'
sleep 1
done
printf "%s\n" 'Ready'
printf "%d\n" '1' >"${REPO_DIR}"/progress.txt
update
printf "%s\n" "${CALLTIME}" >"${REPO_DIR}"/last.txt
printf "%d\n" '0' >"${REPO_DIR}"/progress.txt
printf "%d\n" '0' >"${REPO_DIR}"/waiting.txt
}
identify_service
read_post
id_values
check_signature
CASE='ready'
check_interval
update_stuff
| Java |
#!/usr/bin/env python
import pygame
pygame.display.init()
pygame.font.init()
modes_list = pygame.display.list_modes()
#screen = pygame.display.set_mode(modes_list[0], pygame.FULLSCREEN) # the highest resolution with fullscreen
screen = pygame.display.set_mode(modes_list[-1]) # the lowest resolution
background_color = (255, 255, 255)
screen.fill(background_color)
font = pygame.font.Font(pygame.font.get_default_font(), 22)
text_surface = font.render("Hello world!", True, (0,0,0))
screen.blit(text_surface, (0,0)) # paste the text at the top left corner of the window
pygame.display.flip() # display the image
while True: # main loop (event loop)
event = pygame.event.wait()
if(event.type == pygame.QUIT or (event.type == pygame.KEYDOWN and event.key == pygame.K_ESCAPE)):
break
| Java |
//
// Copyright(c) 2017-2018 Paweł Księżopolski ( pumexx )
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#pragma once
#include <memory>
#include <vector>
#include <mutex>
#include <vulkan/vulkan.h>
#include <pumex/Export.h>
#include <pumex/PerObjectData.h>
namespace pumex
{
class Descriptor;
class RenderContext;
struct PUMEX_EXPORT DescriptorValue
{
enum Type { Undefined, Image, Buffer };
DescriptorValue();
DescriptorValue(VkBuffer buffer, VkDeviceSize offset, VkDeviceSize range);
DescriptorValue(VkSampler sampler, VkImageView imageView, VkImageLayout imageLayout);
Type vType;
union
{
VkDescriptorBufferInfo bufferInfo;
VkDescriptorImageInfo imageInfo;
};
};
// Resource is an object stored in a descriptor ( SampledImage, UniformBuffer, etc. )
class PUMEX_EXPORT Resource : public std::enable_shared_from_this<Resource>
{
public:
Resource(PerObjectBehaviour perObjectBehaviour, SwapChainImageBehaviour swapChainImageBehaviour);
virtual ~Resource();
void addDescriptor(std::shared_ptr<Descriptor> descriptor);
void removeDescriptor(std::shared_ptr<Descriptor> descriptor);
// invalidateDescriptors() is called to inform the scenegraph that validate() needs to be called
virtual void invalidateDescriptors();
// notifyDescriptors() is called from within validate() when some serious change in resource occured
// ( getDescriptorValue() will return new values, so vkUpdateDescriptorSets must be called by DescriptorSet ).
virtual void notifyDescriptors(const RenderContext& renderContext);
virtual std::pair<bool,VkDescriptorType> getDefaultDescriptorType();
virtual void validate(const RenderContext& renderContext) = 0;
virtual DescriptorValue getDescriptorValue(const RenderContext& renderContext) = 0;
protected:
mutable std::mutex mutex;
std::vector<std::weak_ptr<Descriptor>> descriptors;
PerObjectBehaviour perObjectBehaviour;
SwapChainImageBehaviour swapChainImageBehaviour;
uint32_t activeCount;
};
}
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `from_u32_unchecked` fn in crate `std`.">
<meta name="keywords" content="rust, rustlang, rust-lang, from_u32_unchecked">
<title>std::char::from_u32_unchecked - Rust</title>
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
<link rel="shortcut icon" href="https://doc.rust-lang.org/favicon.ico">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<a href='../../std/index.html'><img src='https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png' alt='logo' width='100'></a>
<p class='location'><a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a></p><script>window.sidebarCurrent = {name: 'from_u32_unchecked', ty: 'fn', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content fn">
<h1 class='fqn'><span class='in-band'>Function <a href='../index.html'>std</a>::<wbr><a href='index.html'>char</a>::<wbr><a class='fn' href=''>from_u32_unchecked</a></span><span class='out-of-band'><span class='since' title='Stable since Rust version 1.5.0'>1.5.0</span><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>−</span>]
</a>
</span><a id='src-34245' class='srclink' href='https://doc.rust-lang.org/nightly/core/char/fn.from_u32_unchecked.html?gotosrc=34245' title='goto source code'>[src]</a></span></h1>
<pre class='rust fn'>pub unsafe fn from_u32_unchecked(i: <a class='primitive' href='../primitive.u32.html'>u32</a>) -> <a class='primitive' href='../primitive.char.html'>char</a></pre><div class='docblock'><p>Converts a <code>u32</code> to a <code>char</code>, ignoring validity.</p>
<p>Note that all <a href="../../std/primitive.char.html"><code>char</code></a>s are valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s, and can be casted to one with
<a href="../../book/casting-between-types.html#as"><code>as</code></a>:</p>
<span class='rusttest'>fn main() {
let c = '💯';
let i = c as u32;
assert_eq!(128175, i);
}</span><pre class='rust rust-example-rendered'>
<span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='string'>'💯'</span>;
<span class='kw'>let</span> <span class='ident'>i</span> <span class='op'>=</span> <span class='ident'>c</span> <span class='kw'>as</span> <span class='ident'>u32</span>;
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='number'>128175</span>, <span class='ident'>i</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre>
<p>However, the reverse is not true: not all valid <a href="../../std/primitive.u32.html"><code>u32</code></a>s are valid
<a href="../../std/primitive.char.html"><code>char</code></a>s. <code>from_u32_unchecked()</code> will ignore this, and blindly cast to
<a href="../../std/primitive.char.html"><code>char</code></a>, possibly creating an invalid one.</p>
<h1 id='safety' class='section-header'><a href='#safety'>Safety</a></h1>
<p>This function is unsafe, as it may construct invalid <code>char</code> values.</p>
<p>For a safe version of this function, see the <a href="fn.from_u32.html"><code>from_u32()</code></a> function.</p>
<h1 id='examples' class='section-header'><a href='#examples'>Examples</a></h1>
<p>Basic usage:</p>
<span class='rusttest'>fn main() {
use std::char;
let c = unsafe { char::from_u32_unchecked(0x2764) };
assert_eq!('❤', c);
}</span><pre class='rust rust-example-rendered'>
<span class='kw'>use</span> <span class='ident'>std</span>::<span class='ident'>char</span>;
<span class='kw'>let</span> <span class='ident'>c</span> <span class='op'>=</span> <span class='kw'>unsafe</span> { <span class='ident'>char</span>::<span class='ident'>from_u32_unchecked</span>(<span class='number'>0x2764</span>) };
<span class='macro'>assert_eq</span><span class='macro'>!</span>(<span class='string'>'❤'</span>, <span class='ident'>c</span>);<a class='test-arrow' target='_blank' href=''>Run</a></pre>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>⇤</dt>
<dd>Move up in search results</dd>
<dt>⇥</dt>
<dd>Move down in search results</dd>
<dt>⏎</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "std";
window.playgroundUrl = "https://play.rust-lang.org/";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script src="../../playpen.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html> | Java |
/*! normalize.css v2.1.2 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
/* line 11, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
/**
* Correct `inline-block` display not defined in IE 8/9.
*/
/* line 30, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
audio,
canvas,
video {
display: inline-block;
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
/* line 41, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9.
* Hide the `template` element in IE, Safari, and Firefox < 22.
*/
/* line 51, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
[hidden],
template {
display: none;
}
/* line 56, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
script {
display: none !important;
}
/* ==========================================================================
Base
========================================================================== */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS text size adjust after orientation change, without disabling
* user zoom.
*/
/* line 70, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
html {
font-family: sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/**
* Remove default margin.
*/
/* line 80, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
body {
margin: 0;
}
/* ==========================================================================
Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
/* line 92, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a {
background: transparent;
}
/**
* Address `outline` inconsistency between Chrome and other browsers.
*/
/* line 100, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a:focus {
outline: thin dotted;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
/* line 108, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
a:active,
a:hover {
outline: 0;
}
/* ==========================================================================
Typography
========================================================================== */
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari 5, and Chrome.
*/
/* line 122, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9, Safari 5, and Chrome.
*/
/* line 131, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
*/
/* line 139, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari 5 and Chrome.
*/
/* line 148, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
dfn {
font-style: italic;
}
/**
* Address differences between Firefox and other browsers.
*/
/* line 156, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
/**
* Address styling not present in IE 8/9.
*/
/* line 166, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
mark {
background: #ff0;
color: #000;
}
/**
* Correct font family set oddly in Safari 5 and Chrome.
*/
/* line 175, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
/**
* Improve readability of pre-formatted text in all browsers.
*/
/* line 187, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
pre {
white-space: pre-wrap;
}
/**
* Set consistent quote types.
*/
/* line 195, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
/**
* Address inconsistent and variable font size in all browsers.
*/
/* line 203, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
/* line 211, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
/* line 219, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sup {
top: -0.5em;
}
/* line 223, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
sub {
bottom: -0.25em;
}
/* ==========================================================================
Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9.
*/
/* line 235, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
img {
border: 0;
}
/**
* Correct overflow displayed oddly in IE 9.
*/
/* line 243, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
svg:not(:root) {
overflow: hidden;
}
/* ==========================================================================
Figures
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari 5.
*/
/* line 255, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
figure {
margin: 0;
}
/* ==========================================================================
Forms
========================================================================== */
/**
* Define consistent border, margin, and padding.
*/
/* line 267, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
/* line 278, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
legend {
border: 0;
/* 1 */
padding: 0;
/* 2 */
}
/**
* 1. Correct font family not being inherited in all browsers.
* 2. Correct font size not being inherited in all browsers.
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
*/
/* line 289, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
input,
select,
textarea {
font-family: inherit;
/* 1 */
font-size: 100%;
/* 2 */
margin: 0;
/* 3 */
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
/* line 303, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
input {
line-height: normal;
}
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
* Correct `select` style inheritance in Firefox 4+ and Opera.
*/
/* line 315, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
/* line 328, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
/* 2 */
cursor: pointer;
/* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
/* line 340, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* 1. Address box sizing set to `content-box` in IE 8/9.
* 2. Remove excess padding in IE 8/9.
*/
/* line 350, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
/* line 362, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="search"] {
-webkit-appearance: textfield;
/* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
/* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
/* line 374, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
/* line 383, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 8/9.
* 2. Improve readability and alignment in all browsers.
*/
/* line 394, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
textarea {
overflow: auto;
/* 1 */
vertical-align: top;
/* 2 */
}
/* ==========================================================================
Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
/* line 407, D:/Ruby21/lib/ruby/gems/2.1.0/gems/zurb-foundation-4.3.2/lib/../scss/normalize.scss */
table {
border-collapse: collapse;
border-spacing: 0;
}
| Java |
yii-lazy-image
==============
Lazy image loader for the Yii framework. It is implemented as a static class which leverages [jQuery Unveil](http://luis-almeida.github.io/unveil/) to load images lazily. The interface is the same as `CHtml::image()` so existing code can easily be adapted to use it.
## Usage
Require the project in your `composer.json`, then use it like this:
```php
echo \yiilazyimage\components\LazyImage::image($url, $alt, $htmlOptions);
```
## License
This project is licensed under the MIT license
| Java |
/* Zepto v1.1.4 - zepto event ajax form ie - zeptojs.com/license */
var Zepto = (function() {
var undefined, key, $, classList, emptyArray = [], slice = emptyArray.slice, filter = emptyArray.filter,
document = window.document,
elementDisplay = {}, classCache = {},
cssNumber = { 'column-count': 1, 'columns': 1, 'font-weight': 1, 'line-height': 1,'opacity': 1, 'z-index': 1, 'zoom': 1 },
fragmentRE = /^\s*<(\w+|!)[^>]*>/,
singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
rootNodeRE = /^(?:body|html)$/i,
capitalRE = /([A-Z])/g,
// special attributes that should be get/set via method calls
methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],
adjacencyOperators = [ 'after', 'prepend', 'before', 'append' ],
table = document.createElement('table'),
tableRow = document.createElement('tr'),
containers = {
'tr': document.createElement('tbody'),
'tbody': table, 'thead': table, 'tfoot': table,
'td': tableRow, 'th': tableRow,
'*': document.createElement('div')
},
readyRE = /complete|loaded|interactive/,
simpleSelectorRE = /^[\w-]*$/,
class2type = {},
toString = class2type.toString,
zepto = {},
camelize, uniq,
tempParent = document.createElement('div'),
propMap = {
'tabindex': 'tabIndex',
'readonly': 'readOnly',
'for': 'htmlFor',
'class': 'className',
'maxlength': 'maxLength',
'cellspacing': 'cellSpacing',
'cellpadding': 'cellPadding',
'rowspan': 'rowSpan',
'colspan': 'colSpan',
'usemap': 'useMap',
'frameborder': 'frameBorder',
'contenteditable': 'contentEditable'
},
isArray = Array.isArray ||
function(object){ return object instanceof Array }
zepto.matches = function(element, selector) {
if (!selector || !element || element.nodeType !== 1) return false
var matchesSelector = element.webkitMatchesSelector || element.mozMatchesSelector ||
element.oMatchesSelector || element.matchesSelector
if (matchesSelector) return matchesSelector.call(element, selector)
// fall back to performing a selector:
var match, parent = element.parentNode, temp = !parent
if (temp) (parent = tempParent).appendChild(element)
match = ~zepto.qsa(parent, selector).indexOf(element)
temp && tempParent.removeChild(element)
return match
}
function type(obj) {
return obj == null ? String(obj) :
class2type[toString.call(obj)] || "object"
}
function isFunction(value) { return type(value) == "function" }
function isWindow(obj) { return obj != null && obj == obj.window }
function isDocument(obj) { return obj != null && obj.nodeType == obj.DOCUMENT_NODE }
function isObject(obj) { return type(obj) == "object" }
function isPlainObject(obj) {
return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype
}
function likeArray(obj) { return typeof obj.length == 'number' }
function compact(array) { return filter.call(array, function(item){ return item != null }) }
function flatten(array) { return array.length > 0 ? $.fn.concat.apply([], array) : array }
camelize = function(str){ return str.replace(/-+(.)?/g, function(match, chr){ return chr ? chr.toUpperCase() : '' }) }
function dasherize(str) {
return str.replace(/::/g, '/')
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
.replace(/([a-z\d])([A-Z])/g, '$1_$2')
.replace(/_/g, '-')
.toLowerCase()
}
uniq = function(array){ return filter.call(array, function(item, idx){ return array.indexOf(item) == idx }) }
function classRE(name) {
return name in classCache ?
classCache[name] : (classCache[name] = new RegExp('(^|\\s)' + name + '(\\s|$)'))
}
function maybeAddPx(name, value) {
return (typeof value == "number" && !cssNumber[dasherize(name)]) ? value + "px" : value
}
function defaultDisplay(nodeName) {
var element, display
if (!elementDisplay[nodeName]) {
element = document.createElement(nodeName)
document.body.appendChild(element)
display = getComputedStyle(element, '').getPropertyValue("display")
element.parentNode.removeChild(element)
display == "none" && (display = "block")
elementDisplay[nodeName] = display
}
return elementDisplay[nodeName]
}
function children(element) {
return 'children' in element ?
slice.call(element.children) :
$.map(element.childNodes, function(node){ if (node.nodeType == 1) return node })
}
// `$.zepto.fragment` takes a html string and an optional tag name
// to generate DOM nodes nodes from the given html string.
// The generated DOM nodes are returned as an array.
// This function can be overriden in plugins for example to make
// it compatible with browsers that don't support the DOM fully.
zepto.fragment = function(html, name, properties) {
var dom, nodes, container
// A special case optimization for a single tag
if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1))
if (!dom) {
if (html.replace) html = html.replace(tagExpanderRE, "<$1></$2>")
if (name === undefined) name = fragmentRE.test(html) && RegExp.$1
if (!(name in containers)) name = '*'
container = containers[name]
container.innerHTML = '' + html
dom = $.each(slice.call(container.childNodes), function(){
container.removeChild(this)
})
}
if (isPlainObject(properties)) {
nodes = $(dom)
$.each(properties, function(key, value) {
if (methodAttributes.indexOf(key) > -1) nodes[key](value)
else nodes.attr(key, value)
})
}
return dom
}
// `$.zepto.Z` swaps out the prototype of the given `dom` array
// of nodes with `$.fn` and thus supplying all the Zepto functions
// to the array. Note that `__proto__` is not supported on Internet
// Explorer. This method can be overriden in plugins.
zepto.Z = function(dom, selector) {
dom = dom || []
dom.__proto__ = $.fn
dom.selector = selector || ''
return dom
}
// `$.zepto.isZ` should return `true` if the given object is a Zepto
// collection. This method can be overriden in plugins.
zepto.isZ = function(object) {
return object instanceof zepto.Z
}
// `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and
// takes a CSS selector and an optional context (and handles various
// special cases).
// This method can be overriden in plugins.
zepto.init = function(selector, context) {
var dom
// If nothing given, return an empty Zepto collection
if (!selector) return zepto.Z()
// Optimize for string selectors
else if (typeof selector == 'string') {
selector = selector.trim()
// If it's a html fragment, create nodes from it
// Note: In both Chrome 21 and Firefox 15, DOM error 12
// is thrown if the fragment doesn't begin with <
if (selector[0] == '<' && fragmentRE.test(selector))
dom = zepto.fragment(selector, RegExp.$1, context), selector = null
// If there's a context, create a collection on that context first, and select
// nodes from there
else if (context !== undefined) return $(context).find(selector)
// If it's a CSS selector, use it to select nodes.
else dom = zepto.qsa(document, selector)
}
// If a function is given, call it when the DOM is ready
else if (isFunction(selector)) return $(document).ready(selector)
// If a Zepto collection is given, just return it
else if (zepto.isZ(selector)) return selector
else {
// normalize array if an array of nodes is given
if (isArray(selector)) dom = compact(selector)
// Wrap DOM nodes.
else if (isObject(selector))
dom = [selector], selector = null
// If it's a html fragment, create nodes from it
else if (fragmentRE.test(selector))
dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null
// If there's a context, create a collection on that context first, and select
// nodes from there
else if (context !== undefined) return $(context).find(selector)
// And last but no least, if it's a CSS selector, use it to select nodes.
else dom = zepto.qsa(document, selector)
}
// create a new Zepto collection from the nodes found
return zepto.Z(dom, selector)
}
// `$` will be the base `Zepto` object. When calling this
// function just call `$.zepto.init, which makes the implementation
// details of selecting nodes and creating Zepto collections
// patchable in plugins.
$ = function(selector, context){
return zepto.init(selector, context)
}
function extend(target, source, deep) {
for (key in source)
if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
if (isPlainObject(source[key]) && !isPlainObject(target[key]))
target[key] = {}
if (isArray(source[key]) && !isArray(target[key]))
target[key] = []
extend(target[key], source[key], deep)
}
else if (source[key] !== undefined) target[key] = source[key]
}
// Copy all but undefined properties from one or more
// objects to the `target` object.
$.extend = function(target){
var deep, args = slice.call(arguments, 1)
if (typeof target == 'boolean') {
deep = target
target = args.shift()
}
args.forEach(function(arg){ extend(target, arg, deep) })
return target
}
// `$.zepto.qsa` is Zepto's CSS selector implementation which
// uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.
// This method can be overriden in plugins.
zepto.qsa = function(element, selector){
var found,
maybeID = selector[0] == '#',
maybeClass = !maybeID && selector[0] == '.',
nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked
isSimple = simpleSelectorRE.test(nameOnly)
return (isDocument(element) && isSimple && maybeID) ?
( (found = element.getElementById(nameOnly)) ? [found] : [] ) :
(element.nodeType !== 1 && element.nodeType !== 9) ? [] :
slice.call(
isSimple && !maybeID ?
maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class
element.getElementsByTagName(selector) : // Or a tag
element.querySelectorAll(selector) // Or it's not simple, and we need to query all
)
}
function filtered(nodes, selector) {
return selector == null ? $(nodes) : $(nodes).filter(selector)
}
$.contains = document.documentElement.contains ?
function(parent, node) {
return parent !== node && parent.contains(node)
} :
function(parent, node) {
while (node && (node = node.parentNode))
if (node === parent) return true
return false
}
function funcArg(context, arg, idx, payload) {
return isFunction(arg) ? arg.call(context, idx, payload) : arg
}
function setAttribute(node, name, value) {
value == null ? node.removeAttribute(name) : node.setAttribute(name, value)
}
// access className property while respecting SVGAnimatedString
function className(node, value){
var klass = node.className,
svg = klass && klass.baseVal !== undefined
if (value === undefined) return svg ? klass.baseVal : klass
svg ? (klass.baseVal = value) : (node.className = value)
}
// "true" => true
// "false" => false
// "null" => null
// "42" => 42
// "42.5" => 42.5
// "08" => "08"
// JSON => parse if valid
// String => self
function deserializeValue(value) {
var num
try {
return value ?
value == "true" ||
( value == "false" ? false :
value == "null" ? null :
!/^0/.test(value) && !isNaN(num = Number(value)) ? num :
/^[\[\{]/.test(value) ? $.parseJSON(value) :
value )
: value
} catch(e) {
return value
}
}
$.type = type
$.isFunction = isFunction
$.isWindow = isWindow
$.isArray = isArray
$.isPlainObject = isPlainObject
$.isEmptyObject = function(obj) {
var name
for (name in obj) return false
return true
}
$.inArray = function(elem, array, i){
return emptyArray.indexOf.call(array, elem, i)
}
$.camelCase = camelize
$.trim = function(str) {
return str == null ? "" : String.prototype.trim.call(str)
}
// plugin compatibility
$.uuid = 0
$.support = { }
$.expr = { }
$.map = function(elements, callback){
var value, values = [], i, key
if (likeArray(elements))
for (i = 0; i < elements.length; i++) {
value = callback(elements[i], i)
if (value != null) values.push(value)
}
else
for (key in elements) {
value = callback(elements[key], key)
if (value != null) values.push(value)
}
return flatten(values)
}
$.each = function(elements, callback){
var i, key
if (likeArray(elements)) {
for (i = 0; i < elements.length; i++)
if (callback.call(elements[i], i, elements[i]) === false) return elements
} else {
for (key in elements)
if (callback.call(elements[key], key, elements[key]) === false) return elements
}
return elements
}
$.grep = function(elements, callback){
return filter.call(elements, callback)
}
if (window.JSON) $.parseJSON = JSON.parse
// Populate the class2type map
$.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
class2type[ "[object " + name + "]" ] = name.toLowerCase()
})
// Define methods that will be available on all
// Zepto collections
$.fn = {
// Because a collection acts like an array
// copy over these useful array functions.
forEach: emptyArray.forEach,
reduce: emptyArray.reduce,
push: emptyArray.push,
sort: emptyArray.sort,
indexOf: emptyArray.indexOf,
concat: emptyArray.concat,
// `map` and `slice` in the jQuery API work differently
// from their array counterparts
map: function(fn){
return $($.map(this, function(el, i){ return fn.call(el, i, el) }))
},
slice: function(){
return $(slice.apply(this, arguments))
},
ready: function(callback){
// need to check if document.body exists for IE as that browser reports
// document ready when it hasn't yet created the body element
if (readyRE.test(document.readyState) && document.body) callback($)
else document.addEventListener('DOMContentLoaded', function(){ callback($) }, false)
return this
},
get: function(idx){
return idx === undefined ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length]
},
toArray: function(){ return this.get() },
size: function(){
return this.length
},
remove: function(){
return this.each(function(){
if (this.parentNode != null)
this.parentNode.removeChild(this)
})
},
each: function(callback){
emptyArray.every.call(this, function(el, idx){
return callback.call(el, idx, el) !== false
})
return this
},
filter: function(selector){
if (isFunction(selector)) return this.not(this.not(selector))
return $(filter.call(this, function(element){
return zepto.matches(element, selector)
}))
},
add: function(selector,context){
return $(uniq(this.concat($(selector,context))))
},
is: function(selector){
return this.length > 0 && zepto.matches(this[0], selector)
},
not: function(selector){
var nodes=[]
if (isFunction(selector) && selector.call !== undefined)
this.each(function(idx){
if (!selector.call(this,idx)) nodes.push(this)
})
else {
var excludes = typeof selector == 'string' ? this.filter(selector) :
(likeArray(selector) && isFunction(selector.item)) ? slice.call(selector) : $(selector)
this.forEach(function(el){
if (excludes.indexOf(el) < 0) nodes.push(el)
})
}
return $(nodes)
},
has: function(selector){
return this.filter(function(){
return isObject(selector) ?
$.contains(this, selector) :
$(this).find(selector).size()
})
},
eq: function(idx){
return idx === -1 ? this.slice(idx) : this.slice(idx, + idx + 1)
},
first: function(){
var el = this[0]
return el && !isObject(el) ? el : $(el)
},
last: function(){
var el = this[this.length - 1]
return el && !isObject(el) ? el : $(el)
},
find: function(selector){
var result, $this = this
if (!selector) result = []
else if (typeof selector == 'object')
result = $(selector).filter(function(){
var node = this
return emptyArray.some.call($this, function(parent){
return $.contains(parent, node)
})
})
else if (this.length == 1) result = $(zepto.qsa(this[0], selector))
else result = this.map(function(){ return zepto.qsa(this, selector) })
return result
},
closest: function(selector, context){
var node = this[0], collection = false
if (typeof selector == 'object') collection = $(selector)
while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector)))
node = node !== context && !isDocument(node) && node.parentNode
return $(node)
},
parents: function(selector){
var ancestors = [], nodes = this
while (nodes.length > 0)
nodes = $.map(nodes, function(node){
if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {
ancestors.push(node)
return node
}
})
return filtered(ancestors, selector)
},
parent: function(selector){
return filtered(uniq(this.pluck('parentNode')), selector)
},
children: function(selector){
return filtered(this.map(function(){ return children(this) }), selector)
},
contents: function() {
return this.map(function() { return slice.call(this.childNodes) })
},
siblings: function(selector){
return filtered(this.map(function(i, el){
return filter.call(children(el.parentNode), function(child){ return child!==el })
}), selector)
},
empty: function(){
return this.each(function(){ this.innerHTML = '' })
},
// `pluck` is borrowed from Prototype.js
pluck: function(property){
return $.map(this, function(el){ return el[property] })
},
show: function(){
return this.each(function(){
this.style.display == "none" && (this.style.display = '')
if (getComputedStyle(this, '').getPropertyValue("display") == "none")
this.style.display = defaultDisplay(this.nodeName)
})
},
replaceWith: function(newContent){
return this.before(newContent).remove()
},
wrap: function(structure){
var func = isFunction(structure)
if (this[0] && !func)
var dom = $(structure).get(0),
clone = dom.parentNode || this.length > 1
return this.each(function(index){
$(this).wrapAll(
func ? structure.call(this, index) :
clone ? dom.cloneNode(true) : dom
)
})
},
wrapAll: function(structure){
if (this[0]) {
$(this[0]).before(structure = $(structure))
var children
// drill down to the inmost element
while ((children = structure.children()).length) structure = children.first()
$(structure).append(this)
}
return this
},
wrapInner: function(structure){
var func = isFunction(structure)
return this.each(function(index){
var self = $(this), contents = self.contents(),
dom = func ? structure.call(this, index) : structure
contents.length ? contents.wrapAll(dom) : self.append(dom)
})
},
unwrap: function(){
this.parent().each(function(){
$(this).replaceWith($(this).children())
})
return this
},
clone: function(){
return this.map(function(){ return this.cloneNode(true) })
},
hide: function(){
return this.css("display", "none")
},
toggle: function(setting){
return this.each(function(){
var el = $(this)
;(setting === undefined ? el.css("display") == "none" : setting) ? el.show() : el.hide()
})
},
prev: function(selector){ return $(this.pluck('previousElementSibling')).filter(selector || '*') },
next: function(selector){ return $(this.pluck('nextElementSibling')).filter(selector || '*') },
html: function(html){
return 0 in arguments ?
this.each(function(idx){
var originHtml = this.innerHTML
$(this).empty().append( funcArg(this, html, idx, originHtml) )
}) :
(0 in this ? this[0].innerHTML : null)
},
text: function(text){
return 0 in arguments ?
this.each(function(idx){
var newText = funcArg(this, text, idx, this.textContent)
this.textContent = newText == null ? '' : ''+newText
}) :
(0 in this ? this[0].textContent : null)
},
attr: function(name, value){
var result
return (typeof name == 'string' && !(1 in arguments)) ?
(!this.length || this[0].nodeType !== 1 ? undefined :
(!(result = this[0].getAttribute(name)) && name in this[0]) ? this[0][name] : result
) :
this.each(function(idx){
if (this.nodeType !== 1) return
if (isObject(name)) for (key in name) setAttribute(this, key, name[key])
else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)))
})
},
removeAttr: function(name){
return this.each(function(){ this.nodeType === 1 && setAttribute(this, name) })
},
prop: function(name, value){
name = propMap[name] || name
return (1 in arguments) ?
this.each(function(idx){
this[name] = funcArg(this, value, idx, this[name])
}) :
(this[0] && this[0][name])
},
data: function(name, value){
var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase()
var data = (1 in arguments) ?
this.attr(attrName, value) :
this.attr(attrName)
return data !== null ? deserializeValue(data) : undefined
},
val: function(value){
return 0 in arguments ?
this.each(function(idx){
this.value = funcArg(this, value, idx, this.value)
}) :
(this[0] && (this[0].multiple ?
$(this[0]).find('option').filter(function(){ return this.selected }).pluck('value') :
this[0].value)
)
},
offset: function(coordinates){
if (coordinates) return this.each(function(index){
var $this = $(this),
coords = funcArg(this, coordinates, index, $this.offset()),
parentOffset = $this.offsetParent().offset(),
props = {
top: coords.top - parentOffset.top,
left: coords.left - parentOffset.left
}
if ($this.css('position') == 'static') props['position'] = 'relative'
$this.css(props)
})
if (!this.length) return null
var obj = this[0].getBoundingClientRect()
return {
left: obj.left + window.pageXOffset,
top: obj.top + window.pageYOffset,
width: Math.round(obj.width),
height: Math.round(obj.height)
}
},
css: function(property, value){
if (arguments.length < 2) {
var element = this[0], computedStyle = getComputedStyle(element, '')
if(!element) return
if (typeof property == 'string')
return element.style[camelize(property)] || computedStyle.getPropertyValue(property)
else if (isArray(property)) {
var props = {}
$.each(isArray(property) ? property: [property], function(_, prop){
props[prop] = (element.style[camelize(prop)] || computedStyle.getPropertyValue(prop))
})
return props
}
}
var css = ''
if (type(property) == 'string') {
if (!value && value !== 0)
this.each(function(){ this.style.removeProperty(dasherize(property)) })
else
css = dasherize(property) + ":" + maybeAddPx(property, value)
} else {
for (key in property)
if (!property[key] && property[key] !== 0)
this.each(function(){ this.style.removeProperty(dasherize(key)) })
else
css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';'
}
return this.each(function(){ this.style.cssText += ';' + css })
},
index: function(element){
return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0])
},
hasClass: function(name){
if (!name) return false
return emptyArray.some.call(this, function(el){
return this.test(className(el))
}, classRE(name))
},
addClass: function(name){
if (!name) return this
return this.each(function(idx){
classList = []
var cls = className(this), newName = funcArg(this, name, idx, cls)
newName.split(/\s+/g).forEach(function(klass){
if (!$(this).hasClass(klass)) classList.push(klass)
}, this)
classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "))
})
},
removeClass: function(name){
return this.each(function(idx){
if (name === undefined) return className(this, '')
classList = className(this)
funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass){
classList = classList.replace(classRE(klass), " ")
})
className(this, classList.trim())
})
},
toggleClass: function(name, when){
if (!name) return this
return this.each(function(idx){
var $this = $(this), names = funcArg(this, name, idx, className(this))
names.split(/\s+/g).forEach(function(klass){
(when === undefined ? !$this.hasClass(klass) : when) ?
$this.addClass(klass) : $this.removeClass(klass)
})
})
},
scrollTop: function(value){
if (!this.length) return
var hasScrollTop = 'scrollTop' in this[0]
if (value === undefined) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset
return this.each(hasScrollTop ?
function(){ this.scrollTop = value } :
function(){ this.scrollTo(this.scrollX, value) })
},
scrollLeft: function(value){
if (!this.length) return
var hasScrollLeft = 'scrollLeft' in this[0]
if (value === undefined) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset
return this.each(hasScrollLeft ?
function(){ this.scrollLeft = value } :
function(){ this.scrollTo(value, this.scrollY) })
},
position: function() {
if (!this.length) return
var elem = this[0],
// Get *real* offsetParent
offsetParent = this.offsetParent(),
// Get correct offsets
offset = this.offset(),
parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset()
// Subtract element margins
// note: when an element has margin: auto the offsetLeft and marginLeft
// are the same in Safari causing offset.left to incorrectly be 0
offset.top -= parseFloat( $(elem).css('margin-top') ) || 0
offset.left -= parseFloat( $(elem).css('margin-left') ) || 0
// Add offsetParent borders
parentOffset.top += parseFloat( $(offsetParent[0]).css('border-top-width') ) || 0
parentOffset.left += parseFloat( $(offsetParent[0]).css('border-left-width') ) || 0
// Subtract the two offsets
return {
top: offset.top - parentOffset.top,
left: offset.left - parentOffset.left
}
},
offsetParent: function() {
return this.map(function(){
var parent = this.offsetParent || document.body
while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css("position") == "static")
parent = parent.offsetParent
return parent
})
}
}
// for now
$.fn.detach = $.fn.remove
// Generate the `width` and `height` functions
;['width', 'height'].forEach(function(dimension){
var dimensionProperty =
dimension.replace(/./, function(m){ return m[0].toUpperCase() })
$.fn[dimension] = function(value){
var offset, el = this[0]
if (value === undefined) return isWindow(el) ? el['inner' + dimensionProperty] :
isDocument(el) ? el.documentElement['scroll' + dimensionProperty] :
(offset = this.offset()) && offset[dimension]
else return this.each(function(idx){
el = $(this)
el.css(dimension, funcArg(this, value, idx, el[dimension]()))
})
}
})
function traverseNode(node, fun) {
fun(node)
for (var i = 0, len = node.childNodes.length; i < len; i++)
traverseNode(node.childNodes[i], fun)
}
// Generate the `after`, `prepend`, `before`, `append`,
// `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.
adjacencyOperators.forEach(function(operator, operatorIndex) {
var inside = operatorIndex % 2 //=> prepend, append
$.fn[operator] = function(){
// arguments can be nodes, arrays of nodes, Zepto objects and HTML strings
var argType, nodes = $.map(arguments, function(arg) {
argType = type(arg)
return argType == "object" || argType == "array" || arg == null ?
arg : zepto.fragment(arg)
}),
parent, copyByClone = this.length > 1
if (nodes.length < 1) return this
return this.each(function(_, target){
parent = inside ? target : target.parentNode
// convert all methods to a "before" operation
target = operatorIndex == 0 ? target.nextSibling :
operatorIndex == 1 ? target.firstChild :
operatorIndex == 2 ? target :
null
var parentInDocument = $.contains(document.documentElement, parent)
nodes.forEach(function(node){
if (copyByClone) node = node.cloneNode(true)
else if (!parent) return $(node).remove()
parent.insertBefore(node, target)
if (parentInDocument) traverseNode(node, function(el){
if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' &&
(!el.type || el.type === 'text/javascript') && !el.src)
window['eval'].call(window, el.innerHTML)
})
})
})
}
// after => insertAfter
// prepend => prependTo
// before => insertBefore
// append => appendTo
$.fn[inside ? operator+'To' : 'insert'+(operatorIndex ? 'Before' : 'After')] = function(html){
$(html)[operator](this)
return this
}
})
zepto.Z.prototype = $.fn
// Export internal API functions in the `$.zepto` namespace
zepto.uniq = uniq
zepto.deserializeValue = deserializeValue
$.zepto = zepto
return $
})()
window.Zepto = Zepto
window.$ === undefined && (window.$ = Zepto)
;(function($){
var _zid = 1, undefined,
slice = Array.prototype.slice,
isFunction = $.isFunction,
isString = function(obj){ return typeof obj == 'string' },
handlers = {},
specialEvents={},
focusinSupported = 'onfocusin' in window,
focus = { focus: 'focusin', blur: 'focusout' },
hover = { mouseenter: 'mouseover', mouseleave: 'mouseout' }
specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = 'MouseEvents'
function zid(element) {
return element._zid || (element._zid = _zid++)
}
function findHandlers(element, event, fn, selector) {
event = parse(event)
if (event.ns) var matcher = matcherFor(event.ns)
return (handlers[zid(element)] || []).filter(function(handler) {
return handler
&& (!event.e || handler.e == event.e)
&& (!event.ns || matcher.test(handler.ns))
&& (!fn || zid(handler.fn) === zid(fn))
&& (!selector || handler.sel == selector)
})
}
function parse(event) {
var parts = ('' + event).split('.')
return {e: parts[0], ns: parts.slice(1).sort().join(' ')}
}
function matcherFor(ns) {
return new RegExp('(?:^| )' + ns.replace(' ', ' .* ?') + '(?: |$)')
}
function eventCapture(handler, captureSetting) {
return handler.del &&
(!focusinSupported && (handler.e in focus)) ||
!!captureSetting
}
function realEvent(type) {
return hover[type] || (focusinSupported && focus[type]) || type
}
function add(element, events, fn, data, selector, delegator, capture){
var id = zid(element), set = (handlers[id] || (handlers[id] = []))
events.split(/\s/).forEach(function(event){
if (event == 'ready') return $(document).ready(fn)
var handler = parse(event)
handler.fn = fn
handler.sel = selector
// emulate mouseenter, mouseleave
if (handler.e in hover) fn = function(e){
var related = e.relatedTarget
if (!related || (related !== this && !$.contains(this, related)))
return handler.fn.apply(this, arguments)
}
handler.del = delegator
var callback = delegator || fn
handler.proxy = function(e){
e = compatible(e)
if (e.isImmediatePropagationStopped()) return
e.data = data
var result = callback.apply(element, e._args == undefined ? [e] : [e].concat(e._args))
if (result === false) e.preventDefault(), e.stopPropagation()
return result
}
handler.i = set.length
set.push(handler)
if ('addEventListener' in element)
element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))
})
}
function remove(element, events, fn, selector, capture){
var id = zid(element)
;(events || '').split(/\s/).forEach(function(event){
findHandlers(element, event, fn, selector).forEach(function(handler){
delete handlers[id][handler.i]
if ('removeEventListener' in element)
element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture))
})
})
}
$.event = { add: add, remove: remove }
$.proxy = function(fn, context) {
var args = (2 in arguments) && slice.call(arguments, 2)
if (isFunction(fn)) {
var proxyFn = function(){ return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments) }
proxyFn._zid = zid(fn)
return proxyFn
} else if (isString(context)) {
if (args) {
args.unshift(fn[context], fn)
return $.proxy.apply(null, args)
} else {
return $.proxy(fn[context], fn)
}
} else {
throw new TypeError("expected function")
}
}
$.fn.bind = function(event, data, callback){
return this.on(event, data, callback)
}
$.fn.unbind = function(event, callback){
return this.off(event, callback)
}
$.fn.one = function(event, selector, data, callback){
return this.on(event, selector, data, callback, 1)
}
var returnTrue = function(){return true},
returnFalse = function(){return false},
ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$)/,
eventMethods = {
preventDefault: 'isDefaultPrevented',
stopImmediatePropagation: 'isImmediatePropagationStopped',
stopPropagation: 'isPropagationStopped'
}
function compatible(event, source) {
if (source || !event.isDefaultPrevented) {
source || (source = event)
$.each(eventMethods, function(name, predicate) {
var sourceMethod = source[name]
event[name] = function(){
this[predicate] = returnTrue
return sourceMethod && sourceMethod.apply(source, arguments)
}
event[predicate] = returnFalse
})
if (source.defaultPrevented !== undefined ? source.defaultPrevented :
'returnValue' in source ? source.returnValue === false :
source.getPreventDefault && source.getPreventDefault())
event.isDefaultPrevented = returnTrue
}
return event
}
function createProxy(event) {
var key, proxy = { originalEvent: event }
for (key in event)
if (!ignoreProperties.test(key) && event[key] !== undefined) proxy[key] = event[key]
return compatible(proxy, event)
}
$.fn.delegate = function(selector, event, callback){
return this.on(event, selector, callback)
}
$.fn.undelegate = function(selector, event, callback){
return this.off(event, selector, callback)
}
$.fn.live = function(event, callback){
$(document.body).delegate(this.selector, event, callback)
return this
}
$.fn.die = function(event, callback){
$(document.body).undelegate(this.selector, event, callback)
return this
}
$.fn.on = function(event, selector, data, callback, one){
var autoRemove, delegator, $this = this
if (event && !isString(event)) {
$.each(event, function(type, fn){
$this.on(type, selector, data, fn, one)
})
return $this
}
if (!isString(selector) && !isFunction(callback) && callback !== false)
callback = data, data = selector, selector = undefined
if (isFunction(data) || data === false)
callback = data, data = undefined
if (callback === false) callback = returnFalse
return $this.each(function(_, element){
if (one) autoRemove = function(e){
remove(element, e.type, callback)
return callback.apply(this, arguments)
}
if (selector) delegator = function(e){
var evt, match = $(e.target).closest(selector, element).get(0)
if (match && match !== element) {
evt = $.extend(createProxy(e), {currentTarget: match, liveFired: element})
return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)))
}
}
add(element, event, callback, data, selector, delegator || autoRemove)
})
}
$.fn.off = function(event, selector, callback){
var $this = this
if (event && !isString(event)) {
$.each(event, function(type, fn){
$this.off(type, selector, fn)
})
return $this
}
if (!isString(selector) && !isFunction(callback) && callback !== false)
callback = selector, selector = undefined
if (callback === false) callback = returnFalse
return $this.each(function(){
remove(this, event, callback, selector)
})
}
$.fn.trigger = function(event, args){
event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)
event._args = args
return this.each(function(){
// items in the collection might not be DOM elements
if('dispatchEvent' in this) this.dispatchEvent(event)
else $(this).triggerHandler(event, args)
})
}
// triggers event handlers on current element just as if an event occurred,
// doesn't trigger an actual event, doesn't bubble
$.fn.triggerHandler = function(event, args){
var e, result
this.each(function(i, element){
e = createProxy(isString(event) ? $.Event(event) : event)
e._args = args
e.target = element
$.each(findHandlers(element, event.type || event), function(i, handler){
result = handler.proxy(e)
if (e.isImmediatePropagationStopped()) return false
})
})
return result
}
// shortcut methods for `.bind(event, fn)` for each event type
;('focusin focusout load resize scroll unload click dblclick '+
'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+
'change select keydown keypress keyup error').split(' ').forEach(function(event) {
$.fn[event] = function(callback) {
return callback ?
this.bind(event, callback) :
this.trigger(event)
}
})
;['focus', 'blur'].forEach(function(name) {
$.fn[name] = function(callback) {
if (callback) this.bind(name, callback)
else this.each(function(){
try { this[name]() }
catch(e) {}
})
return this
}
})
$.Event = function(type, props) {
if (!isString(type)) props = type, type = props.type
var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true
if (props) for (var name in props) (name == 'bubbles') ? (bubbles = !!props[name]) : (event[name] = props[name])
event.initEvent(type, bubbles, true)
return compatible(event)
}
})(Zepto)
;(function($){
var jsonpID = 0,
document = window.document,
key,
name,
rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
scriptTypeRE = /^(?:text|application)\/javascript/i,
xmlTypeRE = /^(?:text|application)\/xml/i,
jsonType = 'application/json',
htmlType = 'text/html',
blankRE = /^\s*$/
// trigger a custom event and return false if it was cancelled
function triggerAndReturn(context, eventName, data) {
var event = $.Event(eventName)
$(context).trigger(event, data)
return !event.isDefaultPrevented()
}
// trigger an Ajax "global" event
function triggerGlobal(settings, context, eventName, data) {
if (settings.global) return triggerAndReturn(context || document, eventName, data)
}
// Number of active Ajax requests
$.active = 0
function ajaxStart(settings) {
if (settings.global && $.active++ === 0) triggerGlobal(settings, null, 'ajaxStart')
}
function ajaxStop(settings) {
if (settings.global && !(--$.active)) triggerGlobal(settings, null, 'ajaxStop')
}
// triggers an extra global event "ajaxBeforeSend" that's like "ajaxSend" but cancelable
function ajaxBeforeSend(xhr, settings) {
var context = settings.context
if (settings.beforeSend.call(context, xhr, settings) === false ||
triggerGlobal(settings, context, 'ajaxBeforeSend', [xhr, settings]) === false)
return false
triggerGlobal(settings, context, 'ajaxSend', [xhr, settings])
}
function ajaxSuccess(data, xhr, settings, deferred) {
var context = settings.context, status = 'success'
settings.success.call(context, data, status, xhr)
if (deferred) deferred.resolveWith(context, [data, status, xhr])
triggerGlobal(settings, context, 'ajaxSuccess', [xhr, settings, data])
ajaxComplete(status, xhr, settings)
}
// type: "timeout", "error", "abort", "parsererror"
function ajaxError(error, type, xhr, settings, deferred) {
var context = settings.context
settings.error.call(context, xhr, type, error)
if (deferred) deferred.rejectWith(context, [xhr, type, error])
triggerGlobal(settings, context, 'ajaxError', [xhr, settings, error || type])
ajaxComplete(type, xhr, settings)
}
// status: "success", "notmodified", "error", "timeout", "abort", "parsererror"
function ajaxComplete(status, xhr, settings) {
var context = settings.context
settings.complete.call(context, xhr, status)
triggerGlobal(settings, context, 'ajaxComplete', [xhr, settings])
ajaxStop(settings)
}
// Empty function, used as default callback
function empty() {}
$.ajaxJSONP = function(options, deferred){
if (!('type' in options)) return $.ajax(options)
var _callbackName = options.jsonpCallback,
callbackName = ($.isFunction(_callbackName) ?
_callbackName() : _callbackName) || ('jsonp' + (++jsonpID)),
script = document.createElement('script'),
originalCallback = window[callbackName],
responseData,
abort = function(errorType) {
$(script).triggerHandler('error', errorType || 'abort')
},
xhr = { abort: abort }, abortTimeout
if (deferred) deferred.promise(xhr)
$(script).on('load error', function(e, errorType){
clearTimeout(abortTimeout)
$(script).off().remove()
if (e.type == 'error' || !responseData) {
ajaxError(null, errorType || 'error', xhr, options, deferred)
} else {
ajaxSuccess(responseData[0], xhr, options, deferred)
}
window[callbackName] = originalCallback
if (responseData && $.isFunction(originalCallback))
originalCallback(responseData[0])
originalCallback = responseData = undefined
})
if (ajaxBeforeSend(xhr, options) === false) {
abort('abort')
return xhr
}
window[callbackName] = function(){
responseData = arguments
}
script.src = options.url.replace(/\?(.+)=\?/, '?$1=' + callbackName)
document.head.appendChild(script)
if (options.timeout > 0) abortTimeout = setTimeout(function(){
abort('timeout')
}, options.timeout)
return xhr
}
$.ajaxSettings = {
// Default type of request
type: 'GET',
// Callback that is executed before request
beforeSend: empty,
// Callback that is executed if the request succeeds
success: empty,
// Callback that is executed the the server drops error
error: empty,
// Callback that is executed on request complete (both: error and success)
complete: empty,
// The context for the callbacks
context: null,
// Whether to trigger "global" Ajax events
global: true,
// Transport
xhr: function () {
return new window.XMLHttpRequest()
},
// MIME types mapping
// IIS returns Javascript as "application/x-javascript"
accepts: {
script: 'text/javascript, application/javascript, application/x-javascript',
json: jsonType,
xml: 'application/xml, text/xml',
html: htmlType,
text: 'text/plain'
},
// Whether the request is to another domain
crossDomain: false,
// Default timeout
timeout: 0,
// Whether data should be serialized to string
processData: true,
// Whether the browser should be allowed to cache GET responses
cache: true
}
function mimeToDataType(mime) {
if (mime) mime = mime.split(';', 2)[0]
return mime && ( mime == htmlType ? 'html' :
mime == jsonType ? 'json' :
scriptTypeRE.test(mime) ? 'script' :
xmlTypeRE.test(mime) && 'xml' ) || 'text'
}
function appendQuery(url, query) {
if (query == '') return url
return (url + '&' + query).replace(/[&?]{1,2}/, '?')
}
// serialize payload and append it to the URL for GET requests
function serializeData(options) {
if (options.processData && options.data && $.type(options.data) != "string")
options.data = $.param(options.data, options.traditional)
if (options.data && (!options.type || options.type.toUpperCase() == 'GET'))
options.url = appendQuery(options.url, options.data), options.data = undefined
}
$.ajax = function(options){
var settings = $.extend({}, options || {}),
deferred = $.Deferred && $.Deferred()
for (key in $.ajaxSettings) if (settings[key] === undefined) settings[key] = $.ajaxSettings[key]
ajaxStart(settings)
if (!settings.crossDomain) settings.crossDomain = /^([\w-]+:)?\/\/([^\/]+)/.test(settings.url) &&
RegExp.$2 != window.location.host
if (!settings.url) settings.url = window.location.toString()
serializeData(settings)
var dataType = settings.dataType, hasPlaceholder = /\?.+=\?/.test(settings.url)
if (hasPlaceholder) dataType = 'jsonp'
if (settings.cache === false || (
(!options || options.cache !== true) &&
('script' == dataType || 'jsonp' == dataType)
))
settings.url = appendQuery(settings.url, '_=' + Date.now())
if ('jsonp' == dataType) {
if (!hasPlaceholder)
settings.url = appendQuery(settings.url,
settings.jsonp ? (settings.jsonp + '=?') : settings.jsonp === false ? '' : 'callback=?')
return $.ajaxJSONP(settings, deferred)
}
var mime = settings.accepts[dataType],
headers = { },
setHeader = function(name, value) { headers[name.toLowerCase()] = [name, value] },
protocol = /^([\w-]+:)\/\//.test(settings.url) ? RegExp.$1 : window.location.protocol,
xhr = settings.xhr(),
nativeSetHeader = xhr.setRequestHeader,
abortTimeout
if (deferred) deferred.promise(xhr)
if (!settings.crossDomain) setHeader('X-Requested-With', 'XMLHttpRequest')
setHeader('Accept', mime || '*/*')
if (mime = settings.mimeType || mime) {
if (mime.indexOf(',') > -1) mime = mime.split(',', 2)[0]
xhr.overrideMimeType && xhr.overrideMimeType(mime)
}
if (settings.contentType || (settings.contentType !== false && settings.data && settings.type.toUpperCase() != 'GET'))
setHeader('Content-Type', settings.contentType || 'application/x-www-form-urlencoded')
if (settings.headers) for (name in settings.headers) setHeader(name, settings.headers[name])
xhr.setRequestHeader = setHeader
xhr.onreadystatechange = function(){
if (xhr.readyState == 4) {
xhr.onreadystatechange = empty
clearTimeout(abortTimeout)
var result, error = false
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304 || (xhr.status == 0 && protocol == 'file:')) {
dataType = dataType || mimeToDataType(settings.mimeType || xhr.getResponseHeader('content-type'))
result = xhr.responseText
try {
// http://perfectionkills.com/global-eval-what-are-the-options/
if (dataType == 'script') (1,eval)(result)
else if (dataType == 'xml') result = xhr.responseXML
else if (dataType == 'json') result = blankRE.test(result) ? null : $.parseJSON(result)
} catch (e) { error = e }
if (error) ajaxError(error, 'parsererror', xhr, settings, deferred)
else ajaxSuccess(result, xhr, settings, deferred)
} else {
ajaxError(xhr.statusText || null, xhr.status ? 'error' : 'abort', xhr, settings, deferred)
}
}
}
if (ajaxBeforeSend(xhr, settings) === false) {
xhr.abort()
ajaxError(null, 'abort', xhr, settings, deferred)
return xhr
}
if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]
var async = 'async' in settings ? settings.async : true
xhr.open(settings.type, settings.url, async, settings.username, settings.password)
for (name in headers) nativeSetHeader.apply(xhr, headers[name])
if (settings.timeout > 0) abortTimeout = setTimeout(function(){
xhr.onreadystatechange = empty
xhr.abort()
ajaxError(null, 'timeout', xhr, settings, deferred)
}, settings.timeout)
// avoid sending empty string (#319)
xhr.send(settings.data ? settings.data : null)
return xhr
}
// handle optional data/success arguments
function parseArguments(url, data, success, dataType) {
if ($.isFunction(data)) dataType = success, success = data, data = undefined
if (!$.isFunction(success)) dataType = success, success = undefined
return {
url: url
, data: data
, success: success
, dataType: dataType
}
}
$.get = function(/* url, data, success, dataType */){
return $.ajax(parseArguments.apply(null, arguments))
}
$.post = function(/* url, data, success, dataType */){
var options = parseArguments.apply(null, arguments)
options.type = 'POST'
return $.ajax(options)
}
$.getJSON = function(/* url, data, success */){
var options = parseArguments.apply(null, arguments)
options.dataType = 'json'
return $.ajax(options)
}
$.fn.load = function(url, data, success){
if (!this.length) return this
var self = this, parts = url.split(/\s/), selector,
options = parseArguments(url, data, success),
callback = options.success
if (parts.length > 1) options.url = parts[0], selector = parts[1]
options.success = function(response){
self.html(selector ?
$('<div>').html(response.replace(rscript, "")).find(selector)
: response)
callback && callback.apply(self, arguments)
}
$.ajax(options)
return this
}
var escape = encodeURIComponent
function serialize(params, obj, traditional, scope){
var type, array = $.isArray(obj), hash = $.isPlainObject(obj)
$.each(obj, function(key, value) {
type = $.type(value)
if (scope) key = traditional ? scope :
scope + '[' + (hash || type == 'object' || type == 'array' ? key : '') + ']'
// handle data in serializeArray() format
if (!scope && array) params.add(value.name, value.value)
// recurse into nested objects
else if (type == "array" || (!traditional && type == "object"))
serialize(params, value, traditional, key)
else params.add(key, value)
})
}
$.param = function(obj, traditional){
var params = []
params.add = function(k, v){ this.push(escape(k) + '=' + escape(v)) }
serialize(params, obj, traditional)
return params.join('&').replace(/%20/g, '+')
}
})(Zepto)
;(function($){
$.fn.serializeArray = function() {
var result = [], el
$([].slice.call(this.get(0).elements)).each(function(){
el = $(this)
var type = el.attr('type')
if (this.nodeName.toLowerCase() != 'fieldset' &&
!this.disabled && type != 'submit' && type != 'reset' && type != 'button' &&
((type != 'radio' && type != 'checkbox') || this.checked))
result.push({
name: el.attr('name'),
value: el.val()
})
})
return result
}
$.fn.serialize = function(){
var result = []
this.serializeArray().forEach(function(elm){
result.push(encodeURIComponent(elm.name) + '=' + encodeURIComponent(elm.value))
})
return result.join('&')
}
$.fn.submit = function(callback) {
if (callback) this.bind('submit', callback)
else if (this.length) {
var event = $.Event('submit')
this.eq(0).trigger(event)
if (!event.isDefaultPrevented()) this.get(0).submit()
}
return this
}
})(Zepto)
;(function($){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector){
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
dom.__Z = true
return dom
},
// this is a kludge but works
isZ: function(object){
return $.type(object) === 'array' && '__Z' in object
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})(Zepto)
// Zepto.js
// (c) 2010-2014 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function($){
var touch = {},
touchTimeout, tapTimeout, swipeTimeout, longTapTimeout,
longTapDelay = 750,
gesture
function swipeDirection(x1, x2, y1, y2) {
return Math.abs(x1 - x2) >=
Math.abs(y1 - y2) ? (x1 - x2 > 0 ? 'Left' : 'Right') : (y1 - y2 > 0 ? 'Up' : 'Down')
}
function longTap() {
longTapTimeout = null
if (touch.last) {
touch.el.trigger('longTap')
touch = {}
}
}
function cancelLongTap() {
if (longTapTimeout) clearTimeout(longTapTimeout)
longTapTimeout = null
}
function cancelAll() {
if (touchTimeout) clearTimeout(touchTimeout)
if (tapTimeout) clearTimeout(tapTimeout)
if (swipeTimeout) clearTimeout(swipeTimeout)
if (longTapTimeout) clearTimeout(longTapTimeout)
touchTimeout = tapTimeout = swipeTimeout = longTapTimeout = null
touch = {}
}
function isPrimaryTouch(event){
return (event.pointerType == 'touch' ||
event.pointerType == event.MSPOINTER_TYPE_TOUCH)
&& event.isPrimary
}
function isPointerEventType(e, type){
return (e.type == 'pointer'+type ||
e.type.toLowerCase() == 'mspointer'+type)
}
$(document).ready(function(){
var now, delta, deltaX = 0, deltaY = 0, firstTouch, _isPointerType
if ('MSGesture' in window) {
gesture = new MSGesture()
gesture.target = document.body
}
$(document)
.bind('MSGestureEnd', function(e){
var swipeDirectionFromVelocity =
e.velocityX > 1 ? 'Right' : e.velocityX < -1 ? 'Left' : e.velocityY > 1 ? 'Down' : e.velocityY < -1 ? 'Up' : null;
if (swipeDirectionFromVelocity) {
touch.el.trigger('swipe')
touch.el.trigger('swipe'+ swipeDirectionFromVelocity)
}
})
.on('touchstart MSPointerDown pointerdown', function(e){
if((_isPointerType = isPointerEventType(e, 'down')) &&
!isPrimaryTouch(e)) return
firstTouch = _isPointerType ? e : e.touches[0]
if (e.touches && e.touches.length === 1 && touch.x2) {
// Clear out touch movement data if we have it sticking around
// This can occur if touchcancel doesn't fire due to preventDefault, etc.
touch.x2 = undefined
touch.y2 = undefined
}
now = Date.now()
delta = now - (touch.last || now)
touch.el = $('tagName' in firstTouch.target ?
firstTouch.target : firstTouch.target.parentNode)
touchTimeout && clearTimeout(touchTimeout)
touch.x1 = firstTouch.pageX
touch.y1 = firstTouch.pageY
if (delta > 0 && delta <= 250) touch.isDoubleTap = true
touch.last = now
longTapTimeout = setTimeout(longTap, longTapDelay)
// adds the current touch contact for IE gesture recognition
if (gesture && _isPointerType) gesture.addPointer(e.pointerId);
})
.on('touchmove MSPointerMove pointermove', function(e){
if((_isPointerType = isPointerEventType(e, 'move')) &&
!isPrimaryTouch(e)) return
firstTouch = _isPointerType ? e : e.touches[0]
cancelLongTap()
touch.x2 = firstTouch.pageX
touch.y2 = firstTouch.pageY
deltaX += Math.abs(touch.x1 - touch.x2)
deltaY += Math.abs(touch.y1 - touch.y2)
})
.on('touchend MSPointerUp pointerup', function(e){
if((_isPointerType = isPointerEventType(e, 'up')) &&
!isPrimaryTouch(e)) return
cancelLongTap()
// swipe
if ((touch.x2 && Math.abs(touch.x1 - touch.x2) > 30) ||
(touch.y2 && Math.abs(touch.y1 - touch.y2) > 30))
swipeTimeout = setTimeout(function() {
touch.el.trigger('swipe')
touch.el.trigger('swipe' + (swipeDirection(touch.x1, touch.x2, touch.y1, touch.y2)))
touch = {}
}, 0)
// normal tap
else if ('last' in touch)
// don't fire tap when delta position changed by more than 30 pixels,
// for instance when moving to a point and back to origin
if (deltaX < 30 && deltaY < 30) {
// delay by one tick so we can cancel the 'tap' event if 'scroll' fires
// ('tap' fires before 'scroll')
tapTimeout = setTimeout(function() {
// trigger universal 'tap' with the option to cancelTouch()
// (cancelTouch cancels processing of single vs double taps for faster 'tap' response)
var event = $.Event('tap')
event.cancelTouch = cancelAll
touch.el.trigger(event)
// trigger double tap immediately
if (touch.isDoubleTap) {
if (touch.el) touch.el.trigger('doubleTap')
touch = {}
}
// trigger single tap after 250ms of inactivity
else {
touchTimeout = setTimeout(function(){
touchTimeout = null
if (touch.el) touch.el.trigger('singleTap')
touch = {}
}, 250)
}
}, 0)
} else {
touch = {}
}
deltaX = deltaY = 0
})
// when the browser window loses focus,
// for example when a modal dialog is shown,
// cancel all ongoing events
.on('touchcancel MSPointerCancel pointercancel', cancelAll)
// scrolling the window indicates intention of the user
// to scroll, not tap or swipe, so cancel all ongoing events
$(window).on('scroll', cancelAll)
})
;['swipe', 'swipeLeft', 'swipeRight', 'swipeUp', 'swipeDown',
'doubleTap', 'tap', 'singleTap', 'longTap'].forEach(function(eventName){
$.fn[eventName] = function(callback){ return this.on(eventName, callback) }
})
})(Zepto) | Java |
import asyncio
import asyncio.subprocess
import datetime
import logging
from collections import OrderedDict, defaultdict
from typing import Any, Awaitable, Dict, List, Optional, Union # noqa
from urllib.parse import urlparse
from aiohttp import web
import yacron.version
from yacron.config import (
JobConfig,
parse_config,
ConfigError,
parse_config_string,
WebConfig,
)
from yacron.job import RunningJob, JobRetryState
from crontab import CronTab # noqa
logger = logging.getLogger("yacron")
WAKEUP_INTERVAL = datetime.timedelta(minutes=1)
def naturaltime(seconds: float, future=False) -> str:
assert future
if seconds < 120:
return "in {} second{}".format(
int(seconds), "s" if seconds >= 2 else ""
)
minutes = seconds / 60
if minutes < 120:
return "in {} minute{}".format(
int(minutes), "s" if minutes >= 2 else ""
)
hours = minutes / 60
if hours < 48:
return "in {} hour{}".format(int(hours), "s" if hours >= 2 else "")
days = hours / 24
return "in {} day{}".format(int(days), "s" if days >= 2 else "")
def get_now(timezone: Optional[datetime.tzinfo]) -> datetime.datetime:
return datetime.datetime.now(timezone)
def next_sleep_interval() -> float:
now = get_now(datetime.timezone.utc)
target = now.replace(second=0) + WAKEUP_INTERVAL
return (target - now).total_seconds()
def create_task(coro: Awaitable) -> asyncio.Task:
return asyncio.get_event_loop().create_task(coro)
def web_site_from_url(runner: web.AppRunner, url: str) -> web.BaseSite:
parsed = urlparse(url)
if parsed.scheme == "http":
assert parsed.hostname is not None
assert parsed.port is not None
return web.TCPSite(runner, parsed.hostname, parsed.port)
elif parsed.scheme == "unix":
return web.UnixSite(runner, parsed.path)
else:
logger.warning(
"Ignoring web listen url %s: scheme %r not supported",
url,
parsed.scheme,
)
raise ValueError(url)
class Cron:
def __init__(
self, config_arg: Optional[str], *, config_yaml: Optional[str] = None
) -> None:
# list of cron jobs we /want/ to run
self.cron_jobs = OrderedDict() # type: Dict[str, JobConfig]
# list of cron jobs already running
# name -> list of RunningJob
self.running_jobs = defaultdict(
list
) # type: Dict[str, List[RunningJob]]
self.config_arg = config_arg
if config_arg is not None:
self.update_config()
if config_yaml is not None:
# config_yaml is for unit testing
config, _, _ = parse_config_string(config_yaml, "")
self.cron_jobs = OrderedDict((job.name, job) for job in config)
self._wait_for_running_jobs_task = None # type: Optional[asyncio.Task]
self._stop_event = asyncio.Event()
self._jobs_running = asyncio.Event()
self.retry_state = {} # type: Dict[str, JobRetryState]
self.web_runner = None # type: Optional[web.AppRunner]
self.web_config = None # type: Optional[WebConfig]
async def run(self) -> None:
self._wait_for_running_jobs_task = create_task(
self._wait_for_running_jobs()
)
startup = True
while not self._stop_event.is_set():
try:
web_config = self.update_config()
await self.start_stop_web_app(web_config)
except ConfigError as err:
logger.error(
"Error in configuration file(s), so not updating "
"any of the config.:\n%s",
str(err),
)
except Exception: # pragma: nocover
logger.exception("please report this as a bug (1)")
await self.spawn_jobs(startup)
startup = False
sleep_interval = next_sleep_interval()
logger.debug("Will sleep for %.1f seconds", sleep_interval)
try:
await asyncio.wait_for(self._stop_event.wait(), sleep_interval)
except asyncio.TimeoutError:
pass
logger.info("Shutting down (after currently running jobs finish)...")
while self.retry_state:
cancel_all = [
self.cancel_job_retries(name) for name in self.retry_state
]
await asyncio.gather(*cancel_all)
await self._wait_for_running_jobs_task
if self.web_runner is not None:
logger.info("Stopping http server")
await self.web_runner.cleanup()
def signal_shutdown(self) -> None:
logger.debug("Signalling shutdown")
self._stop_event.set()
def update_config(self) -> Optional[WebConfig]:
if self.config_arg is None:
return None
config, web_config = parse_config(self.config_arg)
self.cron_jobs = OrderedDict((job.name, job) for job in config)
return web_config
async def _web_get_version(self, request: web.Request) -> web.Response:
return web.Response(text=yacron.version.version)
async def _web_get_status(self, request: web.Request) -> web.Response:
out = []
for name, job in self.cron_jobs.items():
running = self.running_jobs.get(name, None)
if running:
out.append(
{
"job": name,
"status": "running",
"pid": [
runjob.proc.pid
for runjob in running
if runjob.proc is not None
],
}
)
else:
crontab = job.schedule # type: Union[CronTab, str]
now = get_now(job.timezone)
out.append(
{
"job": name,
"status": "scheduled",
"scheduled_in": (
crontab.next(now=now, default_utc=job.utc)
if isinstance(crontab, CronTab)
else str(crontab)
),
}
)
if request.headers.get("Accept") == "application/json":
return web.json_response(out)
else:
lines = []
for jobstat in out: # type: Dict[str, Any]
if jobstat["status"] == "running":
status = "running (pid: {pid})".format(
pid=", ".join(str(pid) for pid in jobstat["pid"])
)
else:
status = "scheduled ({})".format(
(
jobstat["scheduled_in"]
if type(jobstat["scheduled_in"]) is str
else naturaltime(
jobstat["scheduled_in"], future=True
)
)
)
lines.append(
"{name}: {status}".format(
name=jobstat["job"], status=status
)
)
return web.Response(text="\n".join(lines))
async def _web_start_job(self, request: web.Request) -> web.Response:
name = request.match_info["name"]
try:
job = self.cron_jobs[name]
except KeyError:
raise web.HTTPNotFound()
await self.maybe_launch_job(job)
return web.Response()
async def start_stop_web_app(self, web_config: Optional[WebConfig]):
if self.web_runner is not None and (
web_config is None or web_config != self.web_config
):
# assert self.web_runner is not None
logger.info("Stopping http server")
await self.web_runner.cleanup()
self.web_runner = None
if (
web_config is not None
and web_config["listen"]
and self.web_runner is None
):
app = web.Application()
app.add_routes(
[
web.get("/version", self._web_get_version),
web.get("/status", self._web_get_status),
web.post("/jobs/{name}/start", self._web_start_job),
]
)
self.web_runner = web.AppRunner(app)
await self.web_runner.setup()
for addr in web_config["listen"]:
site = web_site_from_url(self.web_runner, addr)
logger.info("web: started listening on %s", addr)
try:
await site.start()
except ValueError:
pass
self.web_config = web_config
async def spawn_jobs(self, startup: bool) -> None:
for job in self.cron_jobs.values():
if self.job_should_run(startup, job):
await self.launch_scheduled_job(job)
@staticmethod
def job_should_run(startup: bool, job: JobConfig) -> bool:
if (
startup
and isinstance(job.schedule, str)
and job.schedule == "@reboot"
):
logger.debug(
"Job %s (%s) is scheduled for startup (@reboot)",
job.name,
job.schedule_unparsed,
)
return True
elif isinstance(job.schedule, CronTab):
crontab = job.schedule # type: CronTab
if crontab.test(get_now(job.timezone).replace(second=0)):
logger.debug(
"Job %s (%s) is scheduled for now",
job.name,
job.schedule_unparsed,
)
return True
else:
logger.debug(
"Job %s (%s) not scheduled for now",
job.name,
job.schedule_unparsed,
)
return False
else:
return False
async def launch_scheduled_job(self, job: JobConfig) -> None:
await self.cancel_job_retries(job.name)
assert job.name not in self.retry_state
retry = job.onFailure["retry"]
logger.debug("Job %s retry config: %s", job.name, retry)
if retry["maximumRetries"]:
retry_state = JobRetryState(
retry["initialDelay"],
retry["backoffMultiplier"],
retry["maximumDelay"],
)
self.retry_state[job.name] = retry_state
await self.maybe_launch_job(job)
async def maybe_launch_job(self, job: JobConfig) -> None:
if self.running_jobs[job.name]:
logger.warning(
"Job %s: still running and concurrencyPolicy is %s",
job.name,
job.concurrencyPolicy,
)
if job.concurrencyPolicy == "Allow":
pass
elif job.concurrencyPolicy == "Forbid":
return
elif job.concurrencyPolicy == "Replace":
for running_job in self.running_jobs[job.name]:
await running_job.cancel()
else:
raise AssertionError # pragma: no cover
logger.info("Starting job %s", job.name)
running_job = RunningJob(job, self.retry_state.get(job.name))
await running_job.start()
self.running_jobs[job.name].append(running_job)
logger.info("Job %s spawned", job.name)
self._jobs_running.set()
# continually watches for the running jobs, clean them up when they exit
async def _wait_for_running_jobs(self) -> None:
# job -> wait task
wait_tasks = {} # type: Dict[RunningJob, asyncio.Task]
while self.running_jobs or not self._stop_event.is_set():
try:
for jobs in self.running_jobs.values():
for job in jobs:
if job not in wait_tasks:
wait_tasks[job] = create_task(job.wait())
if not wait_tasks:
try:
await asyncio.wait_for(self._jobs_running.wait(), 1)
except asyncio.TimeoutError:
pass
continue
self._jobs_running.clear()
# wait for at least one task with timeout
done_tasks, _ = await asyncio.wait(
wait_tasks.values(),
timeout=1.0,
return_when=asyncio.FIRST_COMPLETED,
)
done_jobs = set()
for job, task in list(wait_tasks.items()):
if task in done_tasks:
done_jobs.add(job)
for job in done_jobs:
task = wait_tasks.pop(job)
try:
task.result()
except Exception: # pragma: no cover
logger.exception("please report this as a bug (2)")
jobs_list = self.running_jobs[job.config.name]
jobs_list.remove(job)
if not jobs_list:
del self.running_jobs[job.config.name]
fail_reason = job.fail_reason
logger.info(
"Job %s exit code %s; has stdout: %s, "
"has stderr: %s; fail_reason: %r",
job.config.name,
job.retcode,
str(bool(job.stdout)).lower(),
str(bool(job.stderr)).lower(),
fail_reason,
)
if fail_reason is not None:
await self.handle_job_failure(job)
else:
await self.handle_job_success(job)
except asyncio.CancelledError:
raise
except Exception: # pragma: no cover
logger.exception("please report this as a bug (3)")
await asyncio.sleep(1)
async def handle_job_failure(self, job: RunningJob) -> None:
if self._stop_event.is_set():
return
if job.stdout:
logger.info(
"Job %s STDOUT:\n%s", job.config.name, job.stdout.rstrip()
)
if job.stderr:
logger.info(
"Job %s STDERR:\n%s", job.config.name, job.stderr.rstrip()
)
await job.report_failure()
# Handle retries...
state = job.retry_state
if state is None or state.cancelled:
await job.report_permanent_failure()
return
logger.debug(
"Job %s has been retried %i times", job.config.name, state.count
)
if state.task is not None:
if state.task.done():
await state.task
else:
state.task.cancel()
retry = job.config.onFailure["retry"]
if (
state.count >= retry["maximumRetries"]
and retry["maximumRetries"] != -1
):
await self.cancel_job_retries(job.config.name)
await job.report_permanent_failure()
else:
retry_delay = state.next_delay()
state.task = create_task(
self.schedule_retry_job(
job.config.name, retry_delay, state.count
)
)
async def schedule_retry_job(
self, job_name: str, delay: float, retry_num: int
) -> None:
logger.info(
"Cron job %s scheduled to be retried (#%i) " "in %.1f seconds",
job_name,
retry_num,
delay,
)
await asyncio.sleep(delay)
try:
job = self.cron_jobs[job_name]
except KeyError:
logger.warning(
"Cron job %s was scheduled for retry, but "
"disappeared from the configuration",
job_name,
)
await self.maybe_launch_job(job)
async def handle_job_success(self, job: RunningJob) -> None:
await self.cancel_job_retries(job.config.name)
await job.report_success()
async def cancel_job_retries(self, name: str) -> None:
try:
state = self.retry_state.pop(name)
except KeyError:
return
state.cancelled = True
if state.task is not None:
if state.task.done():
await state.task
else:
state.task.cancel()
| Java |
---
layout: single
title: "将数组分成和相等的三个部分"
date: 2018-10-10 21:30:00 +0800
categories: [Leetcode]
tags: [Greedy, Array]
permalink: /problems/partition-array-into-three-parts-with-equal-sum/
---
## 1013. 将数组分成和相等的三个部分 (Easy)
{% raw %}
<p>给你一个整数数组 <code>arr</code>,只有可以将其划分为三个和相等的 <strong>非空</strong> 部分时才返回 <code>true</code>,否则返回 <code>false</code>。</p>
<p>形式上,如果可以找出索引 <code>i + 1 < j</code> 且满足 <code>(arr[0] + arr[1] + ... + arr[i] == arr[i + 1] + arr[i + 2] + ... + arr[j - 1] == arr[j] + arr[j + 1] + ... + arr[arr.length - 1])</code> 就可以将数组三等分。</p>
<p> </p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong>arr = [0,2,1,-6,6,-7,9,1,2,0,1]
<strong>输出:</strong>true
<strong>解释:</strong>0 + 2 + 1 = -6 + 6 - 7 + 9 + 1 = 2 + 0 + 1
</pre>
<p><strong>示例 2:</strong></p>
<pre>
<strong>输入:</strong>arr = [0,2,1,-6,6,7,9,-1,2,0,1]
<strong>输出:</strong>false
</pre>
<p><strong>示例 3:</strong></p>
<pre>
<strong>输入:</strong>arr = [3,3,6,5,-2,2,5,1,-9,4]
<strong>输出:</strong>true
<strong>解释:</strong>3 + 3 = 6 = 5 - 2 + 2 + 5 + 1 - 9 + 4
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>3 <= arr.length <= 5 * 10<sup>4</sup></code></li>
<li><code>-10<sup>4</sup> <= arr[i] <= 10<sup>4</sup></code></li>
</ul>
{% endraw %}
### 相关话题
[[贪心](https://github.com/awesee/leetcode/tree/main/tag/greedy/README.md)]
[[数组](https://github.com/awesee/leetcode/tree/main/tag/array/README.md)]
---
## [解法](https://github.com/awesee/leetcode/tree/main/problems/partition-array-into-three-parts-with-equal-sum)
| Java |
const SELECTOR_BOOK_IMAGE = '#default > div > div > div > div > section > div:nth-child(2) > ol > li:nth-child(1) > article > div.image_container > a > img';
const puppeteer = require('puppeteer');
let scrapeSite1 = async (browser) => {
const page = await browser.newPage();
await page.goto('http://books.toscrape.com/');
await page.waitFor(1000);
await page.click(SELECTOR_BOOK_IMAGE);
await page.waitFor(2000);
const result = await page.evaluate(() => {
let title = document.querySelector('h1').innerText;
let price = document.querySelector('.price_color').innerText;
return {
title,
price
}
});
return result;
}
let scrape = async () => {
const browser = await puppeteer.launch({ headless: false });
const result = await Promise.all([
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser),
scrapeSite1(browser)
]);
await browser.close();
return result;
};
scrape().then((value) => {
console.log(value); // Success!
});
| Java |
# Command Bus
- [Introduction](#introduction)
- [Creating Commamnds](#creating-commands)
- [Dispatching Commamnds](#dispatching-commands)
- [Queued Commands](#queued-commands)
<a name="introduction"></a>
## Introduction
The Laravel command bus provides a convenient method of encapsulating tasks your application needs to perform into simple, easy to understand "commands". To help us understand the purpose of commands, let's pretend we are building an application that allows users to purchase podcasts.
When a user purchases a podcast, there are a variety of things that need to happen. For example, we may need to charge the user's credit card, add a record to our database that represents the purchase, and send a confirmation e-mail of the purchase. Perhaps we also need to perform some kind of validation as to whether the user is allowed to purchase podcasts.
We could put all of this logic inside a controller method; however, this has several disadvantages. The first disadvantage is that our controller probably handles several other incoming HTTP actions, and including complicated logic in each controller method will soon bloat our controller and make it harder to read. Secondly, it is difficult to re-use the purchase podcast logic outside of the controller context. Thirdly, it is more difficult to unit-test the command as we must also generate a stub HTTP request and make a full request to the application to test the purchase podcast logic.
Instead of putting this logic in the controller, we may choose to encapsulte it within a "command" object, such as a `PurchasePodcast` command.
<a name="creating-commands"></a>
## Creating Commands
The Artisan CLI can generate new command classes using the `make:command` command:
php artisan make:command PurchasePodcast
The newly generated class will be placed in the `app/Commands` directory. By default, the command contains two methods: the constructor and the `handle` method. Of course, the constructor allows you to pass any relevant objects to the command, while the `handle` method executes the command. For example:
class PurchasePodcast extends Command implements SelfHandling {
protected $user, $podcast;
/**
* Create a new command instance.
*
* @return void
*/
public function __construct(User $user, Podcast $pocast)
{
$this->user = $user;
$this->podcast = $podcast;
}
/**
* Execute the command.
*
* @return void
*/
public function handle()
{
// Handle the logic to purchase the podcast...
event(new PodcastWasPurchased($this->user, $this->podcast));
}
}
The `handle` method may also type-hint dependencies, and they will be automatically injected by the [IoC container](/docs/master/container). For example:
/**
* Execute the command.
*
* @return void
*/
public function handle(BillingGateway $billing)
{
// Handle the logic to purchase the podcast...
}
<a name="dispatching-commands"></a>
## Dispatching Commands
So, once we have created a command, how do we dispatch it? Of course, we could call the `handle` method directly; however, dispatching the command through the Laravel "command bus" has several advantages which we will discuss later.
If you glance at your application's base controller, you will see the `DispatchesCommands` trait. This trait allows us to call the `dispatch` method from any of our controllers. For example:
public function purchasePodcast($podcastId)
{
$this->dispatch(
new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId))
);
}
The command bus will take care of executing the command and calling the IoC container to inject any needed dependencies into the `handle` method.
You may add the `Illuminate\Foundation\Bus\DispatchesCommands` trait to any class you wish. If you would like to receive a command bus instance through the constructor of any of your classes, you may type-hint the `Illuminate\Contracts\Bus\Dispatcher` interface. Finally, you may also use the `Bus` facade to quickly dispatch commands:
Bus::dispatch(
new PurchasePodcast(Auth::user(), Podcast::findOrFail($podcastId))
);
### Mapping Command Properties From Requests
It is very common to map HTTP request variables into commands. So, instead of forcing you to do this manually for each request, Laravel provides some helper methods to make it a cinch. Let's take a look at the `dispatchFrom` method available on the `DispatchesCommands` trait:
$this->dispatchFrom('Command\Class\Name', $request);
This method will examine the constructor of the command class it is given, and then extract variables from the HTTP request (or any other `ArrayAccess` object) to fill the needed constructor parameters of the command. So, if our command class accepts a `firstName` variable in its constructor, the command bus will attempt to pull the `firstName` parameter from the HTTP request.
You may also pass an array as the third argument to the `dispatchFrom` method. This array will be used to fill any constructor parameters that are not available on the request:
$this->dispatchFrom('Command\Class\Name', $request, [
'firstName' => 'Taylor',
]);
<a name="queued-commands"></a>
## Queued Commands
The command bus is not just for synchronous jobs that run during the current request cycle, but also serves as the primary way to build queued jobs in Laravel. So, how do we instruct command bus to queue our job for background processing instead of running it synchronously? It's easy. Firstly, when generating a new command, just add the `--queued` flag to the command:
php artisan make:command PurchasePodcast --queued
As you will see, this adds a few more features to the command, namely the `Illuminate\Contracts\Queue\ShouldBeQueued` interface and the `SerializesModels` trait. These instruct the command bus to queue the command, as well as gracefully serialize and deserialize any Eloquent models your command stores as properties.
If you would like to convert an existing command into a queued command, simply implement the `Illuminate\Contracts\Queue\ShouldBeQueued` interface on the class manually. It contains no methods, and merely serves as a "marker interface" for the dispatcher.
Then, just write your command normally. When you dispatch it to the bus that bus will automatically queue the command for background processing. It doesn't get any easier than that.
For more information on interacting with queued commands, view the full [queue documentation](/docs/master/queues).
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Soluble\FlexStore\Source\QueryableSourceInterface | Soluble API</title>
<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../../../css/sami.css">
<script src="../../../js/jquery-1.11.1.min.js"></script>
<script src="../../../js/bootstrap.min.js"></script>
<script src="../../../js/typeahead.min.js"></script>
<script src="../../../sami.js"></script>
</head>
<body id="class" data-name="class:Soluble_FlexStore_Source_QueryableSourceInterface" data-root-path="../../../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../../../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../index.html">Soluble API</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../../../classes.html">Classes</a></li>
<li><a href="../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../traits.html">Traits</a></li>
<li><a href="../../../doc-index.html">Index</a></li>
<li><a href="../../../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">interface</span></li>
<li><a href="../../../Soluble.html">Soluble</a></li>
<li><a href="../../../Soluble/FlexStore.html">FlexStore</a></li>
<li><a href="../../../Soluble/FlexStore/Source.html">Source</a></li>
<li>QueryableSourceInterface</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>QueryableSourceInterface</h1>
</div>
<p> interface
<strong>QueryableSourceInterface</strong></p>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
string
</div>
<div class="col-md-8 type">
<a href="#method_getQueryString">getQueryString</a>()
<p>Return underlying query (sql) string</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_getQueryString">
<div class="location">at line 10</div>
<code> string
<strong>getQueryString</strong>()</code>
</h3>
<div class="details">
<div class="method-description">
<p>Return underlying query (sql) string</p> </div>
<div class="tags">
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>
| Java |
<?php
class Symfony2EpamCi_Sniffs_Functions_DisallowedFunctionsSniff implements PHP_CodeSniffer_Sniff
{
private static $disallowedFunctionNames = array(
'var_dump',
'print_r',
'var_export',
'trigger_error',
'header',
'fastcgi_finish_request',
'xdebug_debug_zval',
'xdebug_debug_zval_stdout',
'xdebug_var_dump',
'xdebug_break',
'set_error_handler',
'set_exception_handler',
);
/**
* Returns an array of tokens this test wants to listen for.
*
* @return array
*/
public function register()
{
return array(
T_STRING,
);
}
/**
* Processes this test, when one of its tokens is encountered.
*
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
* @param int $stackPtr The position of the current token in
* the stack passed in $tokens.
*
* @return void
*/
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
$tokens = $phpcsFile->getTokens();
$content = $tokens[$stackPtr]['content'];
if (in_array(strtolower($content), self::$disallowedFunctionNames)) {
//Checking previous token as it could be a static method or object method
$previousTokenPtr = $phpcsFile->findPrevious(PHP_CodeSniffer_Tokens::$emptyTokens, $stackPtr - 1, null, true);
if (!is_null($previousTokenPtr)) {
switch($tokens[$previousTokenPtr]['code']) {
case T_OBJECT_OPERATOR:
case T_DOUBLE_COLON:
return;
}
}
$error = 'Disallowed function "%s" was called';
$data = array($content);
$phpcsFile->addError($error, $stackPtr, 'DisallowedFunctionCalled', $data);
}
}
}
| Java |
using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
namespace MailUI.Converters
{
[ValueConversion(typeof(DirectoryInfo), typeof(FileInfo[]))]
public class FilesInDirectoryConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return null;
}
if (value is DirectoryInfo)
{
return ((DirectoryInfo) value).GetFiles();
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
| Java |
#region Lock Object against files
#region Initial File Creation
$File = 'C:\users\proxb\desktop\test.log'
'1,2,3,4' | Out-File $File
#endregion Initial File Creation
#region Take lock and attempt to update file in runspace
$LockTaken = $null
[System.Threading.Monitor]::TryEnter($File, [ref]$LockTaken)
If ($LockTaken) {
[powershell]::Create().AddScript({
Param($File,$RSHost)
$LockTaken = $Null
[System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken)
If ($LockTaken) {
'5,6,7,8' | Out-File $File -Append
} Else {
$RSHost.ui.WriteWarningLine("[RUNSPACE1] Unable to take lock and update file!")
}
}).AddArgument($File).AddArgument($Host).Invoke()
[System.Threading.Monitor]::Exit($File)
}
#endregion Take lock and attempt to update file in runspace
#region Take lock in Runspace and update file
[powershell]::Create().AddScript({
Param($File,$RSHost)
$LockTaken = $Null
[System.Threading.Monitor]::TryEnter($File,[ref]$LockTaken)
If ($LockTaken) {
'9,10,11,12' | Out-File $File -Append
} Else {
$RSHost.ui.WriteWarningLine("[RUNSPACE2] Unable to take lock and update file!")
}
}).AddArgument($File).AddArgument($Host).Invoke()
$LockTaken = $null
[System.Threading.Monitor]::TryEnter($File,1000,[ref]$LockTaken)
If ($LockTaken) {
'13,14,15,16' | Out-File $File -Append
} Else {
Write-Warning "[HOST] Unable to take lock and update file!"
}
#endregion Take lock in Runspace and update file
#endregion Lock Object against files | Java |
<?php
namespace GS\UsuarioBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Lecturaconproposito
*
* @ORM\Table(name="lecturaconproposito", indexes={@ORM\Index(name="bibliografia_lecturaConProposito_idx", columns={"bibliografia"})})
* @ORM\Entity
*/
class Lecturaconproposito
{
/**
* @var string
*
* @ORM\Column(name="idlecturaConProposito", type="string", length=10, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idlecturaconproposito;
/**
* @var string
*
* @ORM\Column(name="propositoGeneral", type="text", nullable=false)
*/
private $propositogeneral;
/**
* @var string
*
* @ORM\Column(name="tituloSubcapitulos", type="text", nullable=true)
*/
private $titulosubcapitulos;
/**
* @var boolean
*
* @ORM\Column(name="resumen", type="boolean", nullable=false)
*/
private $resumen;
/**
* @var boolean
*
* @ORM\Column(name="preguntasFinalCapitulo", type="boolean", nullable=false)
*/
private $preguntasfinalcapitulo;
/**
* @var boolean
*
* @ORM\Column(name="glosario", type="boolean", nullable=false)
*/
private $glosario;
/**
* @var string
*
* @ORM\Column(name="secciones", type="text", nullable=true)
*/
private $secciones;
/**
* @var string
*
* @ORM\Column(name="descripcionIlustraciones", type="text", nullable=true)
*/
private $descripcionilustraciones;
/**
* @var string
*
* @ORM\Column(name="resumenLectura", type="text", nullable=true)
*/
private $resumenlectura;
/**
* @var string
*
* @ORM\Column(name="lecturaProposito", type="text", nullable=true)
*/
private $lecturaproposito;
/**
* @var string
*
* @ORM\Column(name="resumenSeccion", type="text", nullable=true)
*/
private $resumenseccion;
/**
* @var string
*
* @ORM\Column(name="preguntas", type="text", nullable=true)
*/
private $preguntas;
/**
* @var string
*
* @ORM\Column(name="recomendaciones", type="text", nullable=true)
*/
private $recomendaciones;
/**
* @var \DateTime
*
* @ORM\Column(name="fechaRegistro", type="datetime", nullable=false)
*/
private $fecharegistro;
/**
* @var \Bibliografia
*
* @ORM\ManyToOne(targetEntity="Bibliografia")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="bibliografia", referencedColumnName="idbibliografia")
* })
*/
private $bibliografia;
/**
* Get idlecturaconproposito
*
* @return string
*/
public function getIdlecturaconproposito()
{
return $this->idlecturaconproposito;
}
/**
* Set propositogeneral
*
* @param string $propositogeneral
* @return Lecturaconproposito
*/
public function setPropositogeneral($propositogeneral)
{
$this->propositogeneral = $propositogeneral;
return $this;
}
/**
* Get propositogeneral
*
* @return string
*/
public function getPropositogeneral()
{
return $this->propositogeneral;
}
/**
* Set titulosubcapitulos
*
* @param string $titulosubcapitulos
* @return Lecturaconproposito
*/
public function setTitulosubcapitulos($titulosubcapitulos)
{
$this->titulosubcapitulos = $titulosubcapitulos;
return $this;
}
/**
* Get titulosubcapitulos
*
* @return string
*/
public function getTitulosubcapitulos()
{
return $this->titulosubcapitulos;
}
/**
* Set resumen
*
* @param boolean $resumen
* @return Lecturaconproposito
*/
public function setResumen($resumen)
{
$this->resumen = $resumen;
return $this;
}
/**
* Get resumen
*
* @return boolean
*/
public function getResumen()
{
return $this->resumen;
}
/**
* Set preguntasfinalcapitulo
*
* @param boolean $preguntasfinalcapitulo
* @return Lecturaconproposito
*/
public function setPreguntasfinalcapitulo($preguntasfinalcapitulo)
{
$this->preguntasfinalcapitulo = $preguntasfinalcapitulo;
return $this;
}
/**
* Get preguntasfinalcapitulo
*
* @return boolean
*/
public function getPreguntasfinalcapitulo()
{
return $this->preguntasfinalcapitulo;
}
/**
* Set glosario
*
* @param boolean $glosario
* @return Lecturaconproposito
*/
public function setGlosario($glosario)
{
$this->glosario = $glosario;
return $this;
}
/**
* Get glosario
*
* @return boolean
*/
public function getGlosario()
{
return $this->glosario;
}
/**
* Set secciones
*
* @param string $secciones
* @return Lecturaconproposito
*/
public function setSecciones($secciones)
{
$this->secciones = $secciones;
return $this;
}
/**
* Get secciones
*
* @return string
*/
public function getSecciones()
{
return $this->secciones;
}
/**
* Set descripcionilustraciones
*
* @param string $descripcionilustraciones
* @return Lecturaconproposito
*/
public function setDescripcionilustraciones($descripcionilustraciones)
{
$this->descripcionilustraciones = $descripcionilustraciones;
return $this;
}
/**
* Get descripcionilustraciones
*
* @return string
*/
public function getDescripcionilustraciones()
{
return $this->descripcionilustraciones;
}
/**
* Set resumenlectura
*
* @param string $resumenlectura
* @return Lecturaconproposito
*/
public function setResumenlectura($resumenlectura)
{
$this->resumenlectura = $resumenlectura;
return $this;
}
/**
* Get resumenlectura
*
* @return string
*/
public function getResumenlectura()
{
return $this->resumenlectura;
}
/**
* Set lecturaproposito
*
* @param string $lecturaproposito
* @return Lecturaconproposito
*/
public function setLecturaproposito($lecturaproposito)
{
$this->lecturaproposito = $lecturaproposito;
return $this;
}
/**
* Get lecturaproposito
*
* @return string
*/
public function getLecturaproposito()
{
return $this->lecturaproposito;
}
/**
* Set resumenseccion
*
* @param string $resumenseccion
* @return Lecturaconproposito
*/
public function setResumenseccion($resumenseccion)
{
$this->resumenseccion = $resumenseccion;
return $this;
}
/**
* Get resumenseccion
*
* @return string
*/
public function getResumenseccion()
{
return $this->resumenseccion;
}
/**
* Set preguntas
*
* @param string $preguntas
* @return Lecturaconproposito
*/
public function setPreguntas($preguntas)
{
$this->preguntas = $preguntas;
return $this;
}
/**
* Get preguntas
*
* @return string
*/
public function getPreguntas()
{
return $this->preguntas;
}
/**
* Set recomendaciones
*
* @param string $recomendaciones
* @return Lecturaconproposito
*/
public function setRecomendaciones($recomendaciones)
{
$this->recomendaciones = $recomendaciones;
return $this;
}
/**
* Get recomendaciones
*
* @return string
*/
public function getRecomendaciones()
{
return $this->recomendaciones;
}
/**
* Set fecharegistro
*
* @param \DateTime $fecharegistro
* @return Lecturaconproposito
*/
public function setFecharegistro($fecharegistro)
{
$this->fecharegistro = $fecharegistro;
return $this;
}
/**
* Get fecharegistro
*
* @return \DateTime
*/
public function getFecharegistro()
{
return $this->fecharegistro;
}
/**
* Set bibliografia
*
* @param \GS\UsuarioBundle\Entity\Bibliografia $bibliografia
* @return Lecturaconproposito
*/
public function setBibliografia(\GS\UsuarioBundle\Entity\Bibliografia $bibliografia = null)
{
$this->bibliografia = $bibliografia;
return $this;
}
/**
* Get bibliografia
*
* @return \GS\UsuarioBundle\Entity\Bibliografia
*/
public function getBibliografia()
{
return $this->bibliografia;
}
}
| Java |
import pytest
@pytest.fixture
def genetic_modification(testapp, lab, award):
item = {
'award': award['@id'],
'lab': lab['@id'],
'modified_site_by_coordinates': {
'assembly': 'GRCh38',
'chromosome': '11',
'start': 20000,
'end': 21000
},
'purpose': 'repression',
'category': 'deletion',
'method': 'CRISPR',
'zygosity': 'homozygous'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def genetic_modification_RNAi(testapp, lab, award):
item = {
'award': award['@id'],
'lab': lab['@id'],
'modified_site_by_coordinates': {
'assembly': 'GRCh38',
'chromosome': '11',
'start': 20000,
'end': 21000
},
'purpose': 'repression',
'category': 'deletion',
'method': 'RNAi'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def genetic_modification_source(testapp, lab, award, source, gene):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'introduced_gene': gene['@id'],
'purpose': 'expression',
'method': 'CRISPR',
'reagents': [
{
'source': source['@id'],
'identifier': 'sigma:ABC123'
}
]
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def crispr_deletion(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'CRISPR'
}
@pytest.fixture
def crispr_deletion_1(testapp, lab, award, target):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'CRISPR',
'modified_site_by_target_id': target['@id'],
'guide_rna_sequences': ['ACCGGAGA']
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def tale_deletion(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'deletion',
'purpose': 'repression',
'method': 'TALEN',
'zygosity': 'heterozygous'
}
@pytest.fixture
def crispr_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'CRISPR'
}
@pytest.fixture
def bombardment_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'nucleic_acid_delivery_method': ['bombardment']
}
@pytest.fixture
def recomb_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'site-specific recombination'
}
@pytest.fixture
def transfection_tag(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'nucleic_acid_delivery_method': ['stable transfection']
}
@pytest.fixture
def crispri(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'CRISPR'
}
@pytest.fixture
def rnai(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi'
}
@pytest.fixture
def mutagen(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'mutagenesis',
'purpose': 'repression',
'method': 'mutagen treatment'
}
@pytest.fixture
def tale_replacement(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'replacement',
'purpose': 'characterization',
'method': 'TALEN',
'zygosity': 'heterozygous'
}
@pytest.fixture
def mpra(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'nucleic_acid_delivery_method': ['transduction']
}
@pytest.fixture
def starr_seq(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'episome',
'purpose': 'characterization',
'nucleic_acid_delivery_method': ['transient transfection']
}
@pytest.fixture
def introduced_elements(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'episome',
'purpose': 'characterization',
'nucleic_acid_delivery_method': ['transient transfection'],
'introduced_elements': 'genomic DNA regions'
}
@pytest.fixture
def crispr_tag_1(testapp, lab, award, ctcf):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'CRISPR',
'modified_site_by_gene_id': ctcf['@id'],
'introduced_tags': [{'name': 'mAID-mClover', 'location': 'C-terminal'}]
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def mpra_1(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'nucleic_acid_delivery_method': ['transduction'],
'introduced_elements': 'synthesized DNA',
'modified_site_nonspecific': 'random'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def recomb_tag_1(testapp, lab, award, target, treatment_5, document):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'tagging',
'method': 'site-specific recombination',
'modified_site_by_target_id': target['@id'],
'modified_site_nonspecific': 'random',
'category': 'insertion',
'treatments': [treatment_5['@id']],
'documents': [document['@id']],
'introduced_tags': [{'name': 'eGFP', 'location': 'C-terminal'}]
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def rnai_1(testapp, lab, award, source, target):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi',
'reagents': [{'source': source['@id'], 'identifier': 'addgene:12345'}],
'rnai_sequences': ['ATTACG'],
'modified_site_by_target_id': target['@id']
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def genetic_modification_1(lab, award):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'modifiction_description': 'some description'
}
@pytest.fixture
def genetic_modification_2(lab, award):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'modification_description': 'some description',
'modification_zygocity': 'homozygous',
'modification_purpose': 'tagging',
'modification_treatments': [],
'modification_genome_coordinates': [{
'chromosome': '11',
'start': 5309435,
'end': 5309451
}]
}
@pytest.fixture
def crispr_gm(lab, award, source):
return {
'lab': lab['uuid'],
'award': award['uuid'],
'source': source['uuid'],
'guide_rna_sequences': [
"ACA",
"GCG"
],
'insert_sequence': 'TCGA',
'aliases': ['encode:crispr_technique1'],
'@type': ['Crispr', 'ModificationTechnique', 'Item'],
'@id': '/crisprs/79c1ec08-c878-4419-8dba-66aa4eca156b/',
'uuid': '79c1ec08-c878-4419-8dba-66aa4eca156b'
}
@pytest.fixture
def genetic_modification_5(lab, award, crispr_gm):
return {
'modification_type': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
'zygosity': 'homozygous',
'treatments': [],
'source': 'sigma',
'product_id': '12345',
'modification_techniques': [crispr_gm],
'modified_site': [{
'assembly': 'GRCh38',
'chromosome': '11',
'start': 5309435,
'end': 5309451
}]
}
@pytest.fixture
def genetic_modification_6(lab, award, crispr_gm, source):
return {
'purpose': 'validation',
'category': 'deeltion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "placeholder_id",
"source": source['uuid']
}
]
}
@pytest.fixture
def genetic_modification_7_invalid_reagent(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "placeholder_id",
"source": "/sources/sigma/"
}
]
}
@pytest.fixture
def genetic_modification_7_valid_reagent(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "ABC123",
"source": "/sources/sigma/"
}
]
}
@pytest.fixture
def genetic_modification_7_addgene_source(testapp):
item = {
'name': 'addgene',
'title': 'Addgene',
'status': 'released'
}
return testapp.post_json('/source', item).json['@graph'][0]
@pytest.fixture
def genetic_modification_7_multiple_matched_identifiers(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "12345",
"source": "/sources/addgene/"
}
]
}
@pytest.fixture
def genetic_modification_7_multiple_reagents(lab, award, crispr_gm):
return {
'purpose': 'characterization',
'category': 'deletion',
'award': award['uuid'],
'lab': lab['uuid'],
'description': 'blah blah description blah',
"method": "CRISPR",
"modified_site_by_target_id": "/targets/FLAG-ZBTB43-human/",
"reagents": [
{
"identifier": "12345",
"source": "/sources/addgene/",
"url": "http://www.addgene.org"
},
{
"identifier": "67890",
"source": "/sources/addgene/",
"url": "http://www.addgene.org"
}
]
}
@pytest.fixture
def genetic_modification_8(lab, award):
return {
'purpose': 'analysis',
'category': 'interference',
'award': award['uuid'],
'lab': lab['uuid'],
"method": "CRISPR",
}
@pytest.fixture
def construct_genetic_modification(
testapp,
lab,
award,
document,
target_ATF5_genes,
target_promoter):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'insertion',
'purpose': 'tagging',
'nucleic_acid_delivery_method': ['stable transfection'],
'introduced_tags': [{'name':'eGFP', 'location': 'C-terminal', 'promoter_used': target_promoter['@id']}],
'modified_site_by_target_id': target_ATF5_genes['@id']
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def construct_genetic_modification_N(
testapp,
lab,
award,
document,
target):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'insertion',
'purpose': 'tagging',
'nucleic_acid_delivery_method': ['stable transfection'],
'introduced_tags': [{'name':'eGFP', 'location': 'N-terminal'}],
'modified_site_by_target_id': target['@id']
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def interference_genetic_modification(
testapp,
lab,
award,
document,
target):
item = {
'award': award['@id'],
'documents': [document['@id']],
'lab': lab['@id'],
'category': 'interference',
'purpose': 'repression',
'method': 'RNAi',
'modified_site_by_target_id': target['@id']
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def crispr_knockout(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def recombination_knockout(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'repression',
'method': 'site-specific recombination',
'modified_site_by_coordinates': {
"assembly": "GRCh38",
"chromosome": "11",
"start": 60000,
"end": 62000
}
}
@pytest.fixture
def characterization_insertion_transfection(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'nucleic_acid_delivery_method': ['stable transfection'],
'modified_site_nonspecific': 'random',
'introduced_elements': 'synthesized DNA'
}
@pytest.fixture
def characterization_insertion_CRISPR(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'characterization',
'method': 'CRISPR',
'modified_site_nonspecific': 'random',
'introduced_elements': 'synthesized DNA'
}
@pytest.fixture
def disruption_genetic_modification(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPR cutting',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def activation_genetic_modification(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPRa',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def binding_genetic_modification(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'CRISPR dCas',
'purpose': 'characterization',
'method': 'CRISPR'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def HR_knockout(lab, award, target):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'knockout',
'purpose': 'repression',
'method': 'homologous recombination',
'modified_site_by_target_id': target['@id']
}
@pytest.fixture
def CRISPR_introduction(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'nucleic_acid_delivery_method': ['transient transfection']
}
@pytest.fixture
def genetic_modification_9(lab, award, human_donor_1):
return {
'lab': lab['@id'],
'award': award['@id'],
'donor': human_donor_1['@id'],
'category': 'insertion',
'purpose': 'expression',
'method': 'transient transfection'
}
@pytest.fixture
def transgene_insertion(testapp, lab, award, ctcf):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'in vivo enhancer characterization',
'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'],
'modified_site_by_gene_id': ctcf['@id'],
'introduced_sequence': 'ATCGTA'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def guides_transduction_GM(testapp, lab, award):
item = {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'nucleic_acid_delivery_method': ['transduction'],
'introduced_elements': 'gRNAs and CRISPR machinery',
'MOI': 'high',
'guide_type': 'sgRNA'
}
return testapp.post_json('/genetic_modification', item).json['@graph'][0]
@pytest.fixture
def genetic_modification_10(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'insertion',
'purpose': 'expression',
'nucleic_acid_delivery_method': ['transduction'],
'introduced_elements': 'gRNAs and CRISPR machinery',
}
@pytest.fixture
def genetic_modification_11(lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'disruption',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def transgene_insertion_2(testapp, lab, award, ctcf):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'transgene insertion',
'purpose': 'in vivo enhancer characterization',
'nucleic_acid_delivery_method': ['mouse pronuclear microinjection'],
'modified_site_by_gene_id': ctcf['@id'],
'introduced_sequence': 'ATCGTA'
}
@pytest.fixture
def activation_genetic_modification_2(testapp, lab, award):
return{
'lab': lab['@id'],
'award': award['@id'],
'category': 'activation',
'purpose': 'characterization',
'method': 'CRISPR'
}
@pytest.fixture
def binding_genetic_modification_2(testapp, lab, award):
return {
'lab': lab['@id'],
'award': award['@id'],
'category': 'binding',
'purpose': 'characterization',
'method': 'CRISPR'
}
| Java |
---
layout: page
title: Poole 20th Anniversary
date: 2016-05-24
author: Austin Wilkerson
tags: weekly links, java
status: published
summary: Mauris efficitur orci ac volutpat congue.
banner: images/banner/meeting-01.jpg
booking:
startDate: 07/19/2017
endDate: 07/24/2017
ctyhocn: RIFUTHX
groupCode: P2A
published: true
---
In consectetur luctus diam sed ultrices. Etiam commodo dui in mauris congue, id facilisis velit pulvinar. Quisque scelerisque est purus, sed volutpat urna ornare sit amet. Duis ac mauris erat. Ut scelerisque a turpis non laoreet. Morbi ac mauris et nisl vehicula semper vel at lectus. Mauris ornare vestibulum nisl in consequat. Duis non mi eu arcu luctus tempus eget at velit. Nulla in sapien et mauris egestas pellentesque eget a ligula. Pellentesque convallis ipsum a diam tincidunt tempor. Sed ut pellentesque ligula. Suspendisse fermentum massa sapien, ac aliquam enim maximus sit amet. Vestibulum ligula odio, efficitur sit amet quam nec, imperdiet tempor tortor. Etiam porta sem vel dolor fringilla interdum at vitae augue. Cras finibus nisl sed tempor condimentum.
Praesent ultrices est sed laoreet porta. Vestibulum convallis nulla in erat egestas, vel dignissim ipsum aliquam. Nam congue ipsum vitae elit iaculis malesuada. Nullam vel ex dignissim, varius metus nec, mollis mauris. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus pharetra mattis scelerisque. Nam in dapibus sem. Vestibulum ac libero arcu. Mauris nec dolor sagittis, placerat nisi id, tempor risus. Ut commodo, mauris eget feugiat aliquet, lacus tortor fringilla ligula, quis ullamcorper metus leo ac lorem. Maecenas aliquet mi in dapibus consequat. Nulla malesuada dui metus, non cursus urna mollis ac. Maecenas efficitur nisl ut hendrerit imperdiet.
* Duis at velit consequat, pellentesque leo non, lobortis nisi
* In tincidunt ante ultricies quam pharetra molestie
* Duis egestas neque in magna iaculis, mattis vestibulum justo ornare
* Maecenas semper lorem ut turpis vulputate mollis
* Proin eget eros tincidunt, porta orci eget, egestas magna.
Maecenas hendrerit, nunc in eleifend tincidunt, urna libero dignissim ipsum, ut condimentum odio lorem vel mauris. Praesent a vehicula dui. Pellentesque elementum efficitur urna in ultricies. Etiam ultricies purus nec mauris sagittis, quis faucibus elit elementum. Vestibulum volutpat sapien et ullamcorper auctor. Vivamus porttitor eu lacus eget sollicitudin. Pellentesque eleifend consequat ullamcorper. Nullam egestas, justo id tempor finibus, tellus purus pretium lacus, vel convallis dolor neque vitae lorem. Pellentesque mollis interdum neque, sed rhoncus ante scelerisque in.
| Java |
---
layout: page
title: River Shadow Logistics Seminar
date: 2016-05-24
author: Julia Hogan
tags: weekly links, java
status: published
summary: Phasellus ac lacus tincidunt, euismod nulla sed.
banner: images/banner/leisure-03.jpg
booking:
startDate: 08/28/2016
endDate: 08/29/2016
ctyhocn: CLECCHX
groupCode: RSLS
published: true
---
Ut aliquet lorem justo, nec tempor metus tempor eu. Maecenas dapibus, dui ut consectetur iaculis, nulla urna iaculis eros, sed faucibus arcu augue nec sapien. Nam volutpat ante eget fringilla suscipit. Suspendisse pharetra mattis nunc a ullamcorper. Praesent a nisl eget dui sodales rutrum at eget nibh. Aliquam volutpat nisi sem, quis sollicitudin ipsum bibendum sit amet. Aliquam quis vestibulum tellus. Nam sit amet sodales neque, ac commodo enim. Nullam eget bibendum libero, id lobortis dolor. Aliquam elit odio, lacinia ac erat ac, ultricies ultricies est. Sed consequat leo odio, in aliquet quam eleifend quis.
* Mauris sollicitudin orci eget diam venenatis ultricies
* Nunc at leo ut sem dapibus aliquet.
Vivamus vitae faucibus nisl, ut imperdiet libero. Suspendisse eu venenatis lectus, eget ullamcorper eros. Etiam at erat sit amet nisl sodales sollicitudin vitae et lacus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse a facilisis felis. Nulla vestibulum mattis nisl in porttitor. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer lobortis, elit hendrerit commodo molestie, arcu ante aliquam odio, porta tempor eros quam at neque. Donec rutrum sed eros et vehicula. Aenean augue odio, condimentum eu arcu dapibus, sagittis sollicitudin metus. Etiam a risus ligula. Nullam orci felis, tempor nec euismod a, congue sed magna. In et congue dui, ac laoreet est. Praesent nec tempor velit, non dictum sapien.
Quisque rhoncus auctor consequat. Nunc vehicula mollis mi, vitae pretium arcu tincidunt nec. Vestibulum tellus justo, fringilla vel ipsum vel, consequat pretium nibh. Sed diam felis, blandit ut vestibulum ut, sollicitudin in arcu. Etiam ut tellus et augue dapibus interdum in non diam. Nunc iaculis suscipit ex id sagittis. Cras efficitur maximus arcu et finibus. Quisque sed neque velit. Vestibulum aliquam vestibulum nulla molestie hendrerit. Suspendisse maximus mauris ligula, a elementum urna molestie fermentum. Sed lacinia lorem vitae enim faucibus cursus.
| Java |
---
layout: page
title: Schmitt Llc. Dinner
date: 2016-05-24
author: Gerald Golden
tags: weekly links, java
status: published
summary: Sed hendrerit, dui a ullamcorper dignissim.
banner: images/banner/office-01.jpg
booking:
startDate: 03/17/2016
endDate: 03/22/2016
ctyhocn: YQLLEHX
groupCode: SLD
published: true
---
Nullam in maximus sapien. Quisque congue imperdiet eros, fermentum pharetra lorem euismod non. Ut iaculis leo vitae massa maximus, ut malesuada nibh ornare. Suspendisse vehicula mollis nunc ut tincidunt. Mauris imperdiet mattis nunc, et tempor est euismod vel. Nulla et erat a lectus iaculis ultricies. Morbi vestibulum velit sem, vitae porttitor urna vestibulum a. Nullam mattis ut odio eget feugiat. Aliquam convallis lectus quis magna tempor, quis ultricies ligula faucibus. Fusce ut diam iaculis, varius felis nec, pulvinar turpis. Donec nisl ligula, ullamcorper vel risus eu, vehicula tristique tortor. Etiam feugiat ante in nunc lacinia bibendum nec ac arcu. Aenean in viverra dui, non tincidunt nibh. Nullam neque felis, laoreet quis ex non, pulvinar ultrices ex. Duis eu lacus vitae dolor euismod dapibus nec sit amet arcu. Curabitur id mauris sit amet mi feugiat imperdiet in eget risus.
1 Integer iaculis ante ut metus pellentesque viverra
1 Sed a nisi at urna condimentum dapibus a at eros
1 Mauris non arcu tincidunt, gravida nulla in, facilisis diam
1 Aliquam rhoncus ante vel fringilla interdum.
In hac habitasse platea dictumst. Fusce in dictum orci. Nullam lacinia in mi nec accumsan. Mauris condimentum mi lorem, ac pharetra massa scelerisque scelerisque. Proin mattis euismod ipsum sit amet accumsan. Suspendisse ut ipsum non velit sollicitudin dictum. Etiam quis ligula vitae neque placerat ultrices ac et dolor. Vestibulum convallis orci vestibulum iaculis dapibus. Sed maximus mauris sed augue consequat, ac ornare orci egestas. Cras dictum, quam at sollicitudin tempor, urna lorem porta sapien, id faucibus mi libero a libero. Sed ut est ut lectus sollicitudin gravida sit amet vel orci. Sed consectetur tortor vel sollicitudin maximus. Suspendisse ut ornare quam. Suspendisse lobortis tortor id mi venenatis, in ornare libero lacinia. In diam libero, sollicitudin et consectetur et, vehicula ac velit. Sed in nulla orci.
| Java |
class SessionsController < ApplicationController
def new
end
def create
user = User.find_by(email: params[:session][:email])
if user && user.authenticate(params[:session][:password])
log_in(user)
redirect_to user
else
render :new
end
end
def destroy
log_out
redirect_to root_url
end
end
| Java |
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8"/>
</head>
<body>
<div id="wrapper">
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">实习教师分配 -
<small>批量分配</small>
<small class="pull-right">
<button type="button" class="btn btn-primary" id="page_back">返回</button>
</small>
</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12 col-md-12">
<form id="demoform" role="form">
<div class="form-group" id="valid_organize">
<label>班级</label>
<select multiple="multiple" size="10" name="duallistbox_demo1[]" id="select_organize">
</select>
<p class="text-danger hidden" id="organize_error_msg"></p>
</div>
<div class="form-group" id="valid_teacher">
<label>教职工</label>
<select multiple="multiple" size="10" name="duallistbox_demo2[]" id="select_teacher">
</select>
<p class="text-danger hidden" id="teacher_error_msg"></p>
</div>
<div class="form-group" id="valid_exclude_internship_release">
<label>排除以下实习中已分配学生</label>
<select multiple="multiple" size="10" name="duallistbox_demo3[]" id="exclude_internship_release">
</select>
<p class="text-danger hidden" id="exclude_internship_release_error_msg"></p>
</div>
<br/>
<div class="text-center">
<button type="button" id="save" class="btn btn-default btn-block">确认分配</button>
</div>
</form>
</div>
</div>
<!-- /.row -->
<footer class="footer" th:include="footer::footer">
<p class="text-muted">© Company 2016</p>
</footer>
<!-- /.footer -->
<script id="organize-template" type="text/x-handlebars-template">
{{#each listResult}}
<option value="{{organize_value}}">{{organize_name}}</option>
{{/each}}
</script>
<script id="teacher-template" type="text/x-handlebars-template">
{{#each listResult}}
<option value="{{teacher_value}}">{{teacher_name}}</option>
{{/each}}
</script>
<script id="exclude-internship-release-template" type="text/x-handlebars-template">
{{#each listResult}}
<option value="{{internshipReleaseId}}">{{internship_title}}</option>
{{/each}}
</script>
<script th:inline="javascript">
/*页面参数*/
var init_page_param = {
'internshipReleaseId': /*[[${internshipReleaseId}]]*/ ''
};
</script>
<input type="hidden" class="dy_script" value="/js/internship/distribution/internship_batch_distribution.js"/>
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
</body>
</html> | Java |
package com.longluo.demo.widget.swipelistview;
import android.content.Context;
import android.content.res.TypedArray;
import android.database.DataSetObserver;
import android.support.v4.view.MotionEventCompat;
import android.support.v4.view.ViewConfigurationCompat;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.widget.ListAdapter;
import android.widget.ListView;
import com.longluo.demo.R;
import java.util.List;
/**
* ListView subclass that provides the swipe functionality
*/
public class SwipeListView extends ListView {
/**
* log tag
*/
public final static String TAG = "SwipeListView";
/**
* whether debug
*/
public final static boolean DEBUG = false;
/**
* Used when user want change swipe list mode on some rows
*/
public final static int SWIPE_MODE_DEFAULT = -1;
/**
* Disables all swipes
*/
public final static int SWIPE_MODE_NONE = 0;
/**
* Enables both left and right swipe
*/
public final static int SWIPE_MODE_BOTH = 1;
/**
* Enables right swipe
*/
public final static int SWIPE_MODE_RIGHT = 2;
/**
* Enables left swipe
*/
public final static int SWIPE_MODE_LEFT = 3;
/**
* Binds the swipe gesture to reveal a view behind the row (Drawer style)
*/
public final static int SWIPE_ACTION_REVEAL = 0;
/**
* Dismisses the cell when swiped over
*/
public final static int SWIPE_ACTION_DISMISS = 1;
/**
* Marks the cell as checked when swiped and release
*/
public final static int SWIPE_ACTION_CHOICE = 2;
/**
* No action when swiped
*/
public final static int SWIPE_ACTION_NONE = 3;
/**
* Default ids for front view
*/
public final static String SWIPE_DEFAULT_FRONT_VIEW = "swipelist_frontview";
/**
* Default id for back view
*/
public final static String SWIPE_DEFAULT_BACK_VIEW = "swipelist_backview";
/**
* Indicates no movement
*/
private final static int TOUCH_STATE_REST = 0;
/**
* State scrolling x position
*/
private final static int TOUCH_STATE_SCROLLING_X = 1;
/**
* State scrolling y position
*/
private final static int TOUCH_STATE_SCROLLING_Y = 2;
private int touchState = TOUCH_STATE_REST;
private float lastMotionX;
private float lastMotionY;
private int touchSlop;
int swipeFrontView = 0;
int swipeBackView = 0;
/**
* Internal listener for common swipe events
*/
private SwipeListViewListener swipeListViewListener;
/**
* Internal touch listener
*/
private SwipeListViewTouchListener touchListener;
/**
* If you create a View programmatically you need send back and front identifier
*
* @param context Context
* @param swipeBackView Back Identifier
* @param swipeFrontView Front Identifier
*/
public SwipeListView(Context context, int swipeBackView, int swipeFrontView) {
super(context);
this.swipeFrontView = swipeFrontView;
this.swipeBackView = swipeBackView;
init(null);
}
/**
* @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet)
*/
public SwipeListView(Context context, AttributeSet attrs) {
super(context, attrs);
init(attrs);
}
/**
* @see android.widget.ListView#ListView(android.content.Context, android.util.AttributeSet, int)
*/
public SwipeListView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
init(attrs);
}
/**
* Init ListView
*
* @param attrs AttributeSet
*/
private void init(AttributeSet attrs) {
int swipeMode = SWIPE_MODE_BOTH;
boolean swipeOpenOnLongPress = true;
boolean swipeCloseAllItemsWhenMoveList = true;
long swipeAnimationTime = 0;
float swipeOffsetLeft = 0;
float swipeOffsetRight = 0;
int swipeDrawableChecked = 0;
int swipeDrawableUnchecked = 0;
int swipeActionLeft = SWIPE_ACTION_REVEAL;
int swipeActionRight = SWIPE_ACTION_REVEAL;
if (attrs != null) {
TypedArray styled = getContext().obtainStyledAttributes(attrs, R.styleable.SwipeListView);
swipeMode = styled.getInt(R.styleable.SwipeListView_swipeMode, SWIPE_MODE_BOTH);
swipeActionLeft = styled.getInt(R.styleable.SwipeListView_swipeActionLeft, SWIPE_ACTION_REVEAL);
swipeActionRight = styled.getInt(R.styleable.SwipeListView_swipeActionRight, SWIPE_ACTION_REVEAL);
swipeOffsetLeft = styled.getDimension(R.styleable.SwipeListView_swipeOffsetLeft, 0);
swipeOffsetRight = styled.getDimension(R.styleable.SwipeListView_swipeOffsetRight, 0);
swipeOpenOnLongPress = styled.getBoolean(R.styleable.SwipeListView_swipeOpenOnLongPress, true);
swipeAnimationTime = styled.getInteger(R.styleable.SwipeListView_swipeAnimationTime, 0);
swipeCloseAllItemsWhenMoveList = styled.getBoolean(R.styleable.SwipeListView_swipeCloseAllItemsWhenMoveList, true);
swipeDrawableChecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableChecked, 0);
swipeDrawableUnchecked = styled.getResourceId(R.styleable.SwipeListView_swipeDrawableUnchecked, 0);
swipeFrontView = styled.getResourceId(R.styleable.SwipeListView_swipeFrontView, 0);
swipeBackView = styled.getResourceId(R.styleable.SwipeListView_swipeBackView, 0);
styled.recycle();
}
if (swipeFrontView == 0 || swipeBackView == 0) {
swipeFrontView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_FRONT_VIEW, "id", getContext().getPackageName());
swipeBackView = getContext().getResources().getIdentifier(SWIPE_DEFAULT_BACK_VIEW, "id", getContext().getPackageName());
if (swipeFrontView == 0 || swipeBackView == 0) {
throw new RuntimeException(String.format("You forgot the attributes swipeFrontView or swipeBackView. You can add this attributes or use '%s' and '%s' identifiers", SWIPE_DEFAULT_FRONT_VIEW, SWIPE_DEFAULT_BACK_VIEW));
}
}
final ViewConfiguration configuration = ViewConfiguration.get(getContext());
touchSlop = ViewConfigurationCompat.getScaledPagingTouchSlop(configuration);
touchListener = new SwipeListViewTouchListener(this, swipeFrontView, swipeBackView);
if (swipeAnimationTime > 0) {
touchListener.setAnimationTime(swipeAnimationTime);
}
touchListener.setRightOffset(swipeOffsetRight);
touchListener.setLeftOffset(swipeOffsetLeft);
touchListener.setSwipeActionLeft(swipeActionLeft);
touchListener.setSwipeActionRight(swipeActionRight);
touchListener.setSwipeMode(swipeMode);
touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList);
touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress);
touchListener.setSwipeDrawableChecked(swipeDrawableChecked);
touchListener.setSwipeDrawableUnchecked(swipeDrawableUnchecked);
setOnTouchListener(touchListener);
setOnScrollListener(touchListener.makeScrollListener());
}
/**
* Recycle cell. This method should be called from getView in Adapter when use SWIPE_ACTION_CHOICE
*
* @param convertView parent view
* @param position position in list
*/
public void recycle(View convertView, int position) {
touchListener.reloadChoiceStateInView(convertView.findViewById(swipeFrontView), position);
touchListener.reloadSwipeStateInView(convertView.findViewById(swipeFrontView), position);
// Clean pressed state (if dismiss is fire from a cell, to this cell, with a press drawable, in a swipelistview
// when this cell will be recycle it will still have his pressed state. This ensure the pressed state is
// cleaned.
for (int j = 0; j < ((ViewGroup) convertView).getChildCount(); ++j) {
View nextChild = ((ViewGroup) convertView).getChildAt(j);
nextChild.setPressed(false);
}
}
/**
* Get if item is selected
*
* @param position position in list
* @return
*/
public boolean isChecked(int position) {
return touchListener.isChecked(position);
}
/**
* Get positions selected
*
* @return
*/
public List<Integer> getPositionsSelected() {
return touchListener.getPositionsSelected();
}
/**
* Count selected
*
* @return
*/
public int getCountSelected() {
return touchListener.getCountSelected();
}
/**
* Unselected choice state in item
*/
public void unselectedChoiceStates() {
touchListener.unselectedChoiceStates();
}
/**
* @see android.widget.ListView#setAdapter(android.widget.ListAdapter)
*/
@Override
public void setAdapter(ListAdapter adapter) {
super.setAdapter(adapter);
touchListener.resetItems();
if (null != adapter) {
adapter.registerDataSetObserver(new DataSetObserver() {
@Override
public void onChanged() {
super.onChanged();
onListChanged();
touchListener.resetItems();
}
});
}
}
/**
* Dismiss item
*
* @param position Position that you want open
*/
public void dismiss(int position) {
int height = touchListener.dismiss(position);
if (height > 0) {
touchListener.handlerPendingDismisses(height);
} else {
int[] dismissPositions = new int[1];
dismissPositions[0] = position;
onDismiss(dismissPositions);
touchListener.resetPendingDismisses();
}
}
/**
* Dismiss items selected
*/
public void dismissSelected() {
List<Integer> list = touchListener.getPositionsSelected();
int[] dismissPositions = new int[list.size()];
int height = 0;
for (int i = 0; i < list.size(); i++) {
int position = list.get(i);
dismissPositions[i] = position;
int auxHeight = touchListener.dismiss(position);
if (auxHeight > 0) {
height = auxHeight;
}
}
if (height > 0) {
touchListener.handlerPendingDismisses(height);
} else {
onDismiss(dismissPositions);
touchListener.resetPendingDismisses();
}
touchListener.returnOldActions();
}
/**
* Open ListView's item
*
* @param position Position that you want open
*/
public void openAnimate(int position) {
touchListener.openAnimate(position);
}
/**
* Close ListView's item
*
* @param position Position that you want open
*/
public void closeAnimate(int position) {
touchListener.closeAnimate(position);
}
/**
* Notifies onDismiss
*
* @param reverseSortedPositions All dismissed positions
*/
protected void onDismiss(int[] reverseSortedPositions) {
if (swipeListViewListener != null) {
swipeListViewListener.onDismiss(reverseSortedPositions);
}
}
/**
* Start open item
*
* @param position list item
* @param action current action
* @param right to right
*/
protected void onStartOpen(int position, int action, boolean right) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onStartOpen(position, action, right);
}
}
/**
* Start close item
*
* @param position list item
* @param right
*/
protected void onStartClose(int position, boolean right) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onStartClose(position, right);
}
}
/**
* Notifies onClickFrontView
*
* @param position item clicked
*/
protected void onClickFrontView(int position) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onClickFrontView(position);
}
}
/**
* Notifies onClickBackView
*
* @param position back item clicked
*/
protected void onClickBackView(int position) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onClickBackView(position);
}
}
/**
* Notifies onOpened
*
* @param position Item opened
* @param toRight If should be opened toward the right
*/
protected void onOpened(int position, boolean toRight) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onOpened(position, toRight);
}
}
/**
* Notifies onClosed
*
* @param position Item closed
* @param fromRight If open from right
*/
protected void onClosed(int position, boolean fromRight) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onClosed(position, fromRight);
}
}
/**
* Notifies onChoiceChanged
*
* @param position position that choice
* @param selected if item is selected or not
*/
protected void onChoiceChanged(int position, boolean selected) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onChoiceChanged(position, selected);
}
}
/**
* User start choice items
*/
protected void onChoiceStarted() {
if (swipeListViewListener != null) {
swipeListViewListener.onChoiceStarted();
}
}
/**
* User end choice items
*/
protected void onChoiceEnded() {
if (swipeListViewListener != null) {
swipeListViewListener.onChoiceEnded();
}
}
/**
* User is in first item of list
*/
protected void onFirstListItem() {
if (swipeListViewListener != null) {
swipeListViewListener.onFirstListItem();
}
}
/**
* User is in last item of list
*/
protected void onLastListItem() {
if (swipeListViewListener != null) {
swipeListViewListener.onLastListItem();
}
}
/**
* Notifies onListChanged
*/
protected void onListChanged() {
if (swipeListViewListener != null) {
swipeListViewListener.onListChanged();
}
}
/**
* Notifies onMove
*
* @param position Item moving
* @param x Current position
*/
protected void onMove(int position, float x) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
swipeListViewListener.onMove(position, x);
}
}
protected int changeSwipeMode(int position) {
if (swipeListViewListener != null && position != ListView.INVALID_POSITION) {
return swipeListViewListener.onChangeSwipeMode(position);
}
return SWIPE_MODE_DEFAULT;
}
/**
* Sets the Listener
*
* @param swipeListViewListener Listener
*/
public void setSwipeListViewListener(SwipeListViewListener swipeListViewListener) {
this.swipeListViewListener = swipeListViewListener;
}
/**
* Resets scrolling
*/
public void resetScrolling() {
touchState = TOUCH_STATE_REST;
}
/**
* Set offset on right
*
* @param offsetRight Offset
*/
public void setOffsetRight(float offsetRight) {
touchListener.setRightOffset(offsetRight);
}
/**
* Set offset on left
*
* @param offsetLeft Offset
*/
public void setOffsetLeft(float offsetLeft) {
touchListener.setLeftOffset(offsetLeft);
}
/**
* Set if all items opened will be closed when the user moves the ListView
*
* @param swipeCloseAllItemsWhenMoveList
*/
public void setSwipeCloseAllItemsWhenMoveList(boolean swipeCloseAllItemsWhenMoveList) {
touchListener.setSwipeClosesAllItemsWhenListMoves(swipeCloseAllItemsWhenMoveList);
}
/**
* Sets if the user can open an item with long pressing on cell
*
* @param swipeOpenOnLongPress
*/
public void setSwipeOpenOnLongPress(boolean swipeOpenOnLongPress) {
touchListener.setSwipeOpenOnLongPress(swipeOpenOnLongPress);
}
/**
* Set swipe mode
*
* @param swipeMode
*/
public void setSwipeMode(int swipeMode) {
touchListener.setSwipeMode(swipeMode);
}
/**
* Return action on left
*
* @return Action
*/
public int getSwipeActionLeft() {
return touchListener.getSwipeActionLeft();
}
/**
* Set action on left
*
* @param swipeActionLeft Action
*/
public void setSwipeActionLeft(int swipeActionLeft) {
touchListener.setSwipeActionLeft(swipeActionLeft);
}
/**
* Return action on right
*
* @return Action
*/
public int getSwipeActionRight() {
return touchListener.getSwipeActionRight();
}
/**
* Set action on right
*
* @param swipeActionRight Action
*/
public void setSwipeActionRight(int swipeActionRight) {
touchListener.setSwipeActionRight(swipeActionRight);
}
/**
* Sets animation time when user drops cell
*
* @param animationTime milliseconds
*/
public void setAnimationTime(long animationTime) {
touchListener.setAnimationTime(animationTime);
}
/**
* @see android.widget.ListView#onInterceptTouchEvent(android.view.MotionEvent)
*/
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
int action = MotionEventCompat.getActionMasked(ev);
final float x = ev.getX();
final float y = ev.getY();
if (isEnabled() && touchListener.isSwipeEnabled()) {
if (touchState == TOUCH_STATE_SCROLLING_X) {
return touchListener.onTouch(this, ev);
}
switch (action) {
case MotionEvent.ACTION_MOVE:
checkInMoving(x, y);
return touchState == TOUCH_STATE_SCROLLING_Y;
case MotionEvent.ACTION_DOWN:
super.onInterceptTouchEvent(ev);
touchListener.onTouch(this, ev);
touchState = TOUCH_STATE_REST;
lastMotionX = x;
lastMotionY = y;
return false;
case MotionEvent.ACTION_CANCEL:
touchState = TOUCH_STATE_REST;
break;
case MotionEvent.ACTION_UP:
touchListener.onTouch(this, ev);
return touchState == TOUCH_STATE_SCROLLING_Y;
default:
break;
}
}
return super.onInterceptTouchEvent(ev);
}
/**
* Check if the user is moving the cell
*
* @param x Position X
* @param y Position Y
*/
private void checkInMoving(float x, float y) {
final int xDiff = (int) Math.abs(x - lastMotionX);
final int yDiff = (int) Math.abs(y - lastMotionY);
final int touchSlop = this.touchSlop;
boolean xMoved = xDiff > touchSlop;
boolean yMoved = yDiff > touchSlop;
if (xMoved) {
touchState = TOUCH_STATE_SCROLLING_X;
lastMotionX = x;
lastMotionY = y;
}
if (yMoved) {
touchState = TOUCH_STATE_SCROLLING_Y;
lastMotionX = x;
lastMotionY = y;
}
}
/**
* Close all opened items
*/
public void closeOpenedItems() {
touchListener.closeOpenedItems();
}
}
| Java |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Hisabo – Borker dot co</title>
<meta name="description" content="A note about my involvement with Hisabo">
<meta name="keywords" content="Hisabo">
<link rel="canonical" href="http://borker.co/project-hisabo/">
<!-- Twitter Cards -->
<meta name="twitter:title" content="Hisabo">
<meta name="twitter:description" content="A note about my involvement with Hisabo">
<meta name="twitter:site" content="@borker">
<meta name="twitter:creator" content="@borker">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://borker.co/assets/img/logo-new.png">
<!-- Open Graph -->
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="Hisabo">
<meta property="og:description" content="A note about my involvement with Hisabo">
<meta property="og:url" content="http://borker.co/project-hisabo/">
<meta property="og:site_name" content="Borker dot co">
<meta property="og:image" content="http://borker.co/assets/img/logo-new.png">
<!-- Handheld -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicons -->
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://borker.co/assets/img/favicon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://borker.co/assets/img/favicon/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://borker.co/assets/img/favicon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://borker.co/assets/img/favicon/apple-touch-icon-144x144.png">
<link rel="icon" type="image/png" href="http://borker.co/assets/img/favicon/favicon.png">
<link rel="shortcut icon" href="http://borker.co/assets/img/favicon/favicon.ico">
<!-- Feed -->
<link rel="alternate" type="application/rss+xml" title="Borker dot co" href="http://borker.co/feed.xml" />
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="http://borker.co/assets/css/main.css">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-86377416-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<nav class="nav">
<ul class="list">
<li class="item"><a class="link" href="http://borker.co/" >Home</a></li>
<li class="item"><a class="link" href="http://borker.co/projects" >Projects</a></li>
<li class="item"><a class="link" href="http://borker.co/about" >About</a></li>
<li class="item"><a class="link" href="http://borker.co/writing" >Writing</a></li>
<li class="item"><a class="link" href="http://borker.co/thoughts" >Thoughts</a></li>
<li class="item"><a class="link" href="http://borker.co/design" >Design</a></li>
</ul>
</nav>
<div class="wrapper">
<div class="title">
<h1>Hisabo</h1>
<h4>23 Jul 2015</h4>
</div>
<div class="article">
<h2 id="hisabo">Hisabo</h2>
<p>I founded and ran <a href="http://www.hisabo.com">Hisabo Tea Company</a> for a few months as a side project.</p>
<p>Through Hisabo, we sold hard to find or unique teas to a list of email subscribers (similar to Garagiste for wines).</p>
<p>We sourced each tea through a network of connections in Japan, Taiwan, China and Nepal.</p>
<p>I stopped working on Hisabo to focus exclusively on Shortlist.</p>
</div>
</div>
<div class="footer">
Borker dot co © 2019 <a href="http://borker.co/feed.xml" target="_blank"><i class="fa fa-fw fa-feed"></i></a>
</div>
<script src="http://borker.co/assets/js/jquery-1.12.2.min.js"></script>
<script src="http://borker.co/assets/js/jquery.goup.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$.goup({
trigger: 500,
bottomOffset: 10,
locationOffset: 20,
containerRadius: 0,
containerColor: '#fff',
arrowColor: '#000',
goupSpeed: 'normal'
});
});
</script>
<!-- Asynchronous Google Analytics snippet -->
<script>
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', 'UA-86377416-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
| Java |
---
title: padding-line-between-statements - Rules
layout: doc
---
<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->
# Require or disallow padding lines between statements (padding-line-between-statements)
(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.
This rule requires or disallows blank lines between the given 2 kinds of statements.
Properly blank lines help developers to understand the code.
For example, the following configuration requires a blank line between a variable declaration and a `return` statement.
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: "var", next: "return" }
]*/
function foo() {
var a = 1;
return a;
}
```
## Rule Details
This rule does nothing if no configuration.
A configuration is an object which has 3 properties; `blankLine`, `prev` and `next`. For example, `{ blankLine: "always", prev: "var", next: "return" }` is meaning "it requires one or more blank lines between a variable declaration and a `return` statement."
You can supply any number of configurations. If an statement pair matches multiple configurations, the last matched configuration will be used.
```json
{
"padding-line-between-statements": [
"error",
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
{ "blankLine": LINEBREAK_TYPE, "prev": STATEMENT_TYPE, "next": STATEMENT_TYPE },
...
]
}
```
- `LINEBREAK_TYPE` is one of the following.
- `"any"` just ignores the statement pair.
- `"never"` disallows blank lines.
- `"always"` requires one or more blank lines. Note it does not count lines that comments exist as blank lines.
- `STATEMENT_TYPE` is one of the following, or an array of the following.
- `"*"` is wildcard. This matches any statements.
- `"block"` is lonely blocks.
- `"block-like"` is block like statements. This matches statements that the last token is the closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`.
- `"break"` is `break` statements.
- `"case"` is `case` labels.
- `"cjs-export"` is `export` statements of CommonJS; e.g. `module.exports = 0`, `module.exports.foo = 1`, and `exports.foo = 2`. This is the special cases of assignment.
- `"cjs-import"` is `import` statements of CommonJS; e.g. `const foo = require("foo")`. This is the special cases of variable declarations.
- `"class"` is `class` declarations.
- `"const"` is `const` variable declarations.
- `"continue"` is `continue` statements.
- `"debugger"` is `debugger` statements.
- `"default"` is `default` labels.
- `"directive"` is directive prologues. This matches directives; e.g. `"use strict"`.
- `"do"` is `do-while` statements. This matches all statements that the first token is `do` keyword.
- `"empty"` is empty statements.
- `"export"` is `export` declarations.
- `"expression"` is expression statements.
- `"for"` is `for` loop families. This matches all statements that the first token is `for` keyword.
- `"function"` is function declarations.
- `"if"` is `if` statements.
- `"import"` is `import` declarations.
- `"let"` is `let` variable declarations.
- `"multiline-block-like"` is block like statements. This is the same as `block-like` type, but only the block is multiline.
- `"return"` is `return` statements.
- `"switch"` is `switch` statements.
- `"throw"` is `throw` statements.
- `"try"` is `try` statements.
- `"var"` is `var` variable declarations.
- `"while"` is `while` loop statements.
- `"with"` is `with` statements.
## Examples
This configuration would require blank lines before all `return` statements, like the [newline-before-return] rule.
Examples of **incorrect** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: "*", next: "return" }
]*/
function foo() {
bar();
return;
}
```
Examples of **correct** code for the `[{ blankLine: "always", prev: "*", next: "return" }]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: "*", next: "return" }
]*/
function foo() {
bar();
return;
}
function foo() {
return;
}
```
----
This configuration would require blank lines after every sequence of variable declarations, like the [newline-after-var] rule.
Examples of **incorrect** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: ["const", "let", "var"], next: "*"},
{ blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}
]*/
function foo() {
var a = 0;
bar();
}
function foo() {
let a = 0;
bar();
}
function foo() {
const a = 0;
bar();
}
```
Examples of **correct** code for the `[{ blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: ["const", "let", "var"], next: "*"},
{ blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]}
]*/
function foo() {
var a = 0;
var b = 0;
bar();
}
function foo() {
let a = 0;
const b = 0;
bar();
}
function foo() {
const a = 0;
const b = 0;
bar();
}
```
----
This configuration would require blank lines after all directive prologues, like the [lines-around-directive] rule.
Examples of **incorrect** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: "directive", next: "*" },
{ blankLine: "any", prev: "directive", next: "directive" }
]*/
"use strict";
foo();
```
Examples of **correct** code for the `[{ blankLine: "always", prev: "directive", next: "*" }, { blankLine: "any", prev: "directive", next: "directive" }]` configuration:
```js
/*eslint padding-line-between-statements: [
"error",
{ blankLine: "always", prev: "directive", next: "*" },
{ blankLine: "any", prev: "directive", next: "directive" }
]*/
"use strict";
"use asm";
foo();
```
## Compatibility
- **JSCS:** [requirePaddingNewLineAfterVariableDeclaration]
- **JSCS:** [requirePaddingNewLinesAfterBlocks]
- **JSCS:** [disallowPaddingNewLinesAfterBlocks]
- **JSCS:** [requirePaddingNewLinesAfterUseStrict]
- **JSCS:** [disallowPaddingNewLinesAfterUseStrict]
- **JSCS:** [requirePaddingNewLinesBeforeExport]
- **JSCS:** [disallowPaddingNewLinesBeforeExport]
- **JSCS:** [requirePaddingNewlinesBeforeKeywords]
- **JSCS:** [disallowPaddingNewlinesBeforeKeywords]
## When Not To Use It
If you don't want to notify warnings about linebreaks, then it's safe to disable this rule.
[lines-around-directive]: http://eslint.org/docs/rules/lines-around-directive
[newline-after-var]: http://eslint.org/docs/rules/newline-after-var
[newline-before-return]: http://eslint.org/docs/rules/newline-before-return
[requirePaddingNewLineAfterVariableDeclaration]: http://jscs.info/rule/requirePaddingNewLineAfterVariableDeclaration
[requirePaddingNewLinesAfterBlocks]: http://jscs.info/rule/requirePaddingNewLinesAfterBlocks
[disallowPaddingNewLinesAfterBlocks]: http://jscs.info/rule/disallowPaddingNewLinesAfterBlocks
[requirePaddingNewLinesAfterUseStrict]: http://jscs.info/rule/requirePaddingNewLinesAfterUseStrict
[disallowPaddingNewLinesAfterUseStrict]: http://jscs.info/rule/disallowPaddingNewLinesAfterUseStrict
[requirePaddingNewLinesBeforeExport]: http://jscs.info/rule/requirePaddingNewLinesBeforeExport
[disallowPaddingNewLinesBeforeExport]: http://jscs.info/rule/disallowPaddingNewLinesBeforeExport
[requirePaddingNewlinesBeforeKeywords]: http://jscs.info/rule/requirePaddingNewlinesBeforeKeywords
[disallowPaddingNewlinesBeforeKeywords]: http://jscs.info/rule/disallowPaddingNewlinesBeforeKeywords
## Version
This rule was introduced in ESLint 4.0.0-beta.0.
## Resources
* [Rule source](https://github.com/eslint/eslint/tree/master/lib/rules/padding-line-between-statements.js)
* [Documentation source](https://github.com/eslint/eslint/tree/master/docs/rules/padding-line-between-statements.md)
| Java |
[](http://demijs.enytc.com)
# Demi.js Logger [](http://travis-ci.org/chrisenytc/demi-logger) [](http://badges.enytc.com/for/npm/demi-logger) [](https://bitdeli.com/free "Bitdeli Badge")
Demi.js middleware for advanced logging
## Getting Started
Install the module with: `npm install demi-logger`
```javascript
var logger = require('demi-logger');
//Express example.js
app.configure(function() {
app.use(express.logger(logger));
});
```
## Screenshort
[](http://demijs.enytc.com)
## Contributing
Please submit all issues and pull requests to the [chrisenytc/demi-logger](http://github.com/chrisenytc/demi-logger) repository!
## Support
If you have any problem or suggestion please open an issue [here](https://github.com/chrisenytc/demi-logger/issues).
## License
The MIT License
Copyright (c) 2014 Christopher EnyTC
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
| Java |
## Prerequisites
[Node.js](http://nodejs.org/) >= 6 must be installed.
## Installation
- Running `npm install` in the component's root directory will install everything you need for development.
## Demo Development Server
- `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading.
## Running Tests
- `npm test` will run the tests once.
- `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`.
- `npm run test:watch` will run the tests on every change.
## Building
- `npm run build` will build the component for publishing to npm and also bundle the demo app.
- `npm run clean` will delete built resources.
| Java |
<?php
declare(strict_types=1);
namespace DiContainerBenchmarks\Fixture\C;
class FixtureC846
{
public function __construct(FixtureC845 $dependency)
{
}
}
| Java |
var five = require("../lib/johnny-five.js");
var board = new five.Board();
board.on("ready", function() {
var gyro = new five.Gyroscope({
pins: ["I0", "I1"],
freq: 200,
extent: 4
});
gyro.on("acceleration", function(data) {
console.log(data.position);
});
});
| Java |
---
layout: null
section-type: contact
title: Contact
---
## Contact
Nothing to say! | Java |
// "horizontalaxis" : {
// "id" : STRING, "type" : DATATYPE(number), "length" : RELLEN(1.0), "base" : POINT(-1,1), "anchor" : DOUBLE(-1), "position" : POINT(0,0),
// "min" : DATAVALUEORAUTO(auto), "max" : DATAVALUEORAUTO(auto), "minposition" : RELPOS(-1.0), "maxposition" : RELPOS(1.0), "color" : COLOR(black), "linewidth" : INTEGER(1),
// "tickmin" : INTEGER(-3), "tickmax" : INTEGER(3), "tickcolor" : COLOR(black),
// "labels" : {
// "format" : STRING, "start" : DATAVALUE(0), "angle" : DOUBLE(0), "position" : POINT,
// "anchor" : POINT, "color" : COLOR(black), "spacing" : STRING, "densityfactor" : DOUBLE(1.0),
// "label" : [
// { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE },
// { "format" : STRING, "start" : STRING, "angle" : DOUBLE, "position" : POINT, "anchor" : POINT, "spacing" : STRING, "densityfactor" : DOUBLE },
// ...
// ]
// }
// "title" : { "base" : DOUBLE(0), "anchor" : POINT, "position" : POINT, "angle" : DOUBLE(0), "text" : "TITLETEXT", "font": STRING },
// "grid" : { "color" : COLOR(0xeeeeee), "visible" : BOOLEAN(false) },
// "pan" : { "allowed" : BOOLEAN(yes), "min" : DATAVALUE, "max" : DATAVALUE },
// "zoom" : { "allowed" : BOOLEAN(yes), "min" : DATAMEASURE, "max" : DATAMEASURE, "anchor" : DATAVALUE },
// "binding" : { "id" : STRING!, "min" : DATAVALUE!, "max" : DATAVALUE! }
// "visible" : BOOLEAN(true)
// }
// these are needed so that their .parseJSON methods will be defined when called below:
require('./labeler.js');
require('./axis_title.js');
require('./grid.js');
require('./pan.js');
require('./zoom.js');
var Axis = require('../../core/axis.js'),
pF = require('../../util/parsingFunctions.js'),
vF = require('../../util/validationFunctions.js'),
uF = require('../../util/utilityFunctions.js');
var parseLabels = function (json, axis) {
var spacings,
labelers = axis.labelers(),
Labeler = require('../../core/labeler.js'),
DataValue = require('../../core/data_value.js'),
i;
spacings = [];
if (json !== undefined) {
if (json.spacing !== undefined) {
spacings = vF.typeOf(json.spacing) === 'array' ? json.spacing : [ json.spacing ];
}
}
if (spacings.length > 0) {
// If there was a spacing attr on the <labels> tag, create a new labeler for
// each spacing present in it, using the other values from the <labels> tag
for (i = 0; i < spacings.length; ++i) {
labelers.add(Labeler.parseJSON(json, axis, undefined, spacings[i]));
}
} else if (json !== undefined && json.label !== undefined && json.label.length > 0) {
// If there are <label> tags, parse the <labels> tag to get default values
var defaults = Labeler.parseJSON(json, axis, undefined, null);
// And loop over each <label> tag, creating labelers for each, splitting multiple
// spacings on the same <label> tag into multiple labelers:
json.label.forEach(function(e) {
var spacing = [];
if (e.spacing !== undefined) {
spacing = vF.typeOf(e.spacing) === 'array' ? e.spacing : [ e.spacing ];
}
spacing.forEach(function(s) {
labelers.add( Labeler.parseJSON(e, axis, defaults, s) );
});
});
} else {
// Otherwise create labelers using the default spacing, with the other values
// from the <labels> tag
var defaultValues = (uF.getDefaultValuesFromXSD()).horizontalaxis.labels;
var defaultSpacings = axis.type() === DataValue.NUMBER ?
defaultValues.defaultNumberSpacing :
defaultValues.defaultDatetimeSpacing;
for (i = 0; i < defaultSpacings.length; ++i) {
labelers.add(Labeler.parseJSON(json, axis, undefined, defaultSpacings[i]));
}
}
};
Axis.parseJSON = function (json, orientation, messageHandler, multigraph) {
var DataValue = require('../../core/data_value.js'),
Point = require('../../math/point.js'),
RGBColor = require('../../math/rgb_color.js'),
Displacement = require('../../math/displacement.js'),
AxisTitle = require('../../core/axis_title.js'),
Grid = require('../../core/grid.js'),
Pan = require('../../core/pan.js'),
Zoom = require('../../core/zoom.js'),
AxisBinding = require('../../core/axis_binding.js'),
axis = new Axis(orientation),
parseAttribute = pF.parseAttribute,
parseDisplacement = Displacement.parse,
parseJSONPoint = function(p) { return new Point(p[0], p[1]); },
parseRGBColor = RGBColor.parse,
attr, child,
value;
if (json) {
parseAttribute(json.id, axis.id);
parseAttribute(json.type, axis.type, DataValue.parseType);
parseAttribute(json.length, axis.length, parseDisplacement);
//
// The following provides support for the deprecated "positionbase" axis attribute;
// MUGL files should use the "base" attribute instead. When we're ready to remove
// support for the deprecated attribute, delete this block of code:
//
(function () {
var positionbase = json.positionbase;
if (positionbase) {
messageHandler.warning('Use of deprecated axis attribute "positionbase"; use "base" attribute instead');
if ((positionbase === "left") || (positionbase === "bottom")) {
axis.base(new Point(-1, -1));
} else if (positionbase === "right") {
axis.base(new Point(1, -1));
} else if (positionbase === "top") {
axis.base(new Point(-1, 1));
}
}
}());
//
// End of code to delete when removing support for deprecated "positionbase"
// attribute.
//
attr = json.position;
if (attr !== undefined) {
if (vF.typeOf(attr) === 'array') {
axis.position(parseJSONPoint(attr));
} else {
// If position is not an array, and if it can be interpreted
// as a number, construct the position point by interpreting that
// number as an offset from the 0 location along the perpendicular
// direction.
if (vF.isNumberNotNaN(attr)) {
if (orientation === Axis.HORIZONTAL) {
axis.position(new Point(0, attr));
} else {
axis.position(new Point(attr, 0));
}
} else {
throw new Error("axis position '"+attr+"' is of the wrong type; it should be a number or a point");
}
}
}
// Note: we coerce the min and max values to strings here, because the "min" and "max" attrs
// of the Axis object require strings. See the comments about these properties in src/core/axis.js
// for a discussion of why this is the case.
if ("min" in json) {
axis.min(uF.coerceToString(json.min));
}
if (axis.min() !== "auto") {
axis.dataMin(DataValue.parse(axis.type(), axis.min()));
}
if ("max" in json) {
axis.max(uF.coerceToString(json.max));
}
if (axis.max() !== "auto") {
axis.dataMax(DataValue.parse(axis.type(), axis.max()));
}
parseAttribute(json.pregap, axis.pregap);
parseAttribute(json.postgap, axis.postgap);
parseAttribute(json.anchor, axis.anchor);
parseAttribute(json.base, axis.base, parseJSONPoint);
parseAttribute(json.minposition, axis.minposition, parseDisplacement);
parseAttribute(json.maxposition, axis.maxposition, parseDisplacement);
parseAttribute(json.minoffset, axis.minoffset);
parseAttribute(json.maxoffset, axis.maxoffset);
parseAttribute(json.color, axis.color, parseRGBColor);
parseAttribute(json.tickcolor, axis.tickcolor, parseRGBColor);
parseAttribute(json.tickwidth, axis.tickwidth);
parseAttribute(json.tickmin, axis.tickmin);
parseAttribute(json.tickmax, axis.tickmax);
parseAttribute(json.highlightstyle, axis.highlightstyle);
parseAttribute(json.linewidth, axis.linewidth);
if ("title" in json) {
if (typeof(json.title) === 'boolean') {
if (json.title) {
axis.title(new AxisTitle(axis));
} else {
axis.title(AxisTitle.parseJSON({}, axis));
}
} else {
axis.title(AxisTitle.parseJSON(json.title, axis));
}
} else {
axis.title(new AxisTitle(axis));
}
if (json.grid) {
axis.grid(Grid.parseJSON(json.grid));
}
if (json.visible !== undefined) {
axis.visible(json.visible);
}
if ("pan" in json) {
axis.pan(Pan.parseJSON(json.pan, axis.type()));
}
if ("zoom" in json) {
axis.zoom(Zoom.parseJSON(json.zoom, axis.type()));
}
if (json.labels) {
parseLabels(json.labels, axis);
}
if (json.binding) {
var bindingMinDataValue = DataValue.parse(axis.type(), json.binding.min),
bindingMaxDataValue = DataValue.parse(axis.type(), json.binding.max);
if (typeof(json.binding.id) !== "string") {
throw new Error("invalid axis binding id: '" + json.binding.id + "'");
}
if (! DataValue.isInstance(bindingMinDataValue)) {
throw new Error("invalid axis binding min: '" + json.binding.min + "'");
}
if (! DataValue.isInstance(bindingMaxDataValue)) {
throw new Error("invalid axis binding max: '" + json.binding.max + "'");
}
AxisBinding.findByIdOrCreateNew(json.binding.id).addAxis(axis, bindingMinDataValue, bindingMaxDataValue, multigraph);
}
}
return axis;
};
module.exports = Axis;
| Java |
namespace Todo.ViewModel
{
public sealed class NewTodoItem
{
public string Text { get; set; }
}
} | Java |
<?xml version="1.0" encoding="utf-8"?>
<!-- This comment will force IE7 to go into quirks mode. -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link>
<script type="text/javascript" src="../../JS/Common.js"></script>
<title>Zips.Zip<T, U, V> Method</title>
</head>
<body>
<div id="Header">
<div id="ProjectTitle">Documentation Project</div>
<div id="PageTitle">Zips.Zip<T, U, V> Method</div>
<div id="HeaderShortcuts">
<a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Overload List</a>
</div>
<div class="DarkLine"></div>
<div class="LightLine"></div>
<div id="HeaderToolbar">
<img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" />
<span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span>
</div>
</div>
<div id="Contents">
<a id="ContentsAnchor"> </a>
Zip a paired stream with a third stream.
<div id="ItemLocation">
<b>Declaring type:</b> <a href="../../Contents/2/287.html">Zips</a><br />
<b>Namespace:</b> <a href="../../Contents/1/212.html">Sasa.Linq</a><br />
<b>Assembly:</b> <a href="../../Contents/1/1.html">Sasa</a>
</div>
<div id="SectionHeader0" class="SectionHeader">
<img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);">
Overload List
</span>
</span>
</div>
<div id="SectionContainerDiv0" class="SectionContainer">
<table class="MembersTable">
<col width="7%" />
<col width="38%" />
<col width="55%" />
<tr>
<th> </th>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td class="IconColumn">
<img src="../../GFX/PublicMethod.gif" alt="Public Method" /> <img src="../../GFX/Static.gif" alt="Static" /></td>
<td><a href="../../Contents/2/316.html">Zips.Zip<T, U, V> (IEnumerable<T>, IEnumerable<U>, IEnumerable<V>)</a></td>
<td>Zip the elements of three streams.</td>
</tr>
<tr>
<td class="IconColumn">
<img src="../../GFX/PublicMethod.gif" alt="Public Method" /> <img src="../../GFX/Static.gif" alt="Static" /></td>
<td><a href="../../Contents/2/317.html">Zips.Zip<T, U, V> (IEnumerable<Pair<T, U>>, IEnumerable<V>)</a></td>
<td>Zip a paired stream with a third stream.</td>
</tr>
</table>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
</div>
<div id="Footer">
<span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>.
</div>
</body>
</html>
| Java |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$lang = array(
'img_module_name' =>
'Img',
'img_module_description' =>
'PHPImageWorkshop for EE',
'module_home' => 'Img Home',
// Start inserting custom language keys/values here
);
/* End of file lang.img.php */
/* Location: /system/expressionengine/third_party/img/language/english/lang.img.php */
| Java |
module WoopleTheme
class Configuration
attr_accessor :profile_helper, :menu_helper, :impersonation_banner_helper, :layout_javascript
def profile_helper
@profile_helper || :profile_helper
end
def menu_helper
@menu_helper || :menu_helper
end
def impersonation_banner_helper
@impersonation_banner_helper || :impersonation_banner_helper
end
end
class << self
attr_accessor :configuration
end
def self.configure
self.configuration ||= Configuration.new
yield(configuration)
end
end
| Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.