code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
using System; using System.Numerics; class CatalanNumbers { static void Main() { BigInteger n = BigInteger.Parse(Console.ReadLine()); BigInteger NCheck = 2 * n; BigInteger NPlusOneCheck = n + 1; BigInteger twoTimesN = 2 * n; BigInteger nPlusOne = n + 1; BigInteger nFact = 1; BigInteger result = 1; if (n == 0) { Console.WriteLine(result); } else { for (int i = 1; i <= NCheck; i++) { if (i <= n) { nFact *= i; } if (i < NCheck) { twoTimesN *= i; } if (i < NPlusOneCheck) { nPlusOne *= i; } } result = twoTimesN / (nPlusOne * nFact); Console.WriteLine(result); } } }
ilievv/Telerik
Homework/C#/C# Part One/06. Loops/08. CatalanNumbers/CatalanNumbers.cs
C#
mit
977
import express from 'express'; import helpers from '../helpers'; import controller from '../controllers/voteController'; const router = express.Router(); router.get('/', helpers.isAuth, controller.initialize, controller.canVoteUT100, (req, res) => { res.locals.moduleTitle = 'Votar'; res.locals.module = () => 'vote'; res.locals.active = { vote: true }; res.render('index'); }); router.get('/ultratop100', controller.initialize, controller.verifyRewardUT100, controller.handleRewardUT100); export default router;
MaanuVazquez/MuWeb
src/routes/vote.js
JavaScript
mit
547
var dbm = global.dbm || require('db-migrate'); var type = dbm.dataType; var fs = require('fs'); var path = require('path'); exports.up = function(db, callback) { var filePath = path.join(__dirname + '/sqls/20160708081226-readme-in-versions-up.sql'); fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ if (err) return callback(err); console.log('received data: ' + data); db.runSql(data, function(err) { if (err) return callback(err); callback(); }); }); }; exports.down = function(db, callback) { var filePath = path.join(__dirname + '/sqls/20160708081226-readme-in-versions-down.sql'); fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){ if (err) return callback(err); console.log('received data: ' + data); db.runSql(data, function(err) { if (err) return callback(err); callback(); }); }); };
datacamp/rdocumentation-app
migrations/20160708081226-readme-in-versions.js
JavaScript
mit
894
package com.spring.example.concurrency.locks; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Semaphore; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.StampedLock; import java.util.stream.IntStream; import static java.lang.Thread.sleep; public class ReentrantReadWrite { private static int count; private static ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); private static StampedLock stampedLock = new StampedLock(); private void semaphore() { ExecutorService executor = Executors.newFixedThreadPool(10); Semaphore semaphore = new Semaphore(5); Runnable longRunningTask = () -> { boolean permit = false; try { permit = semaphore.tryAcquire(1, TimeUnit.SECONDS); if (permit) { System.out.println("Semaphore acquired"); sleep(5); } else { System.out.println("Could not acquire semaphore"); } } catch (InterruptedException e) { throw new IllegalStateException(e); } finally { if (permit) { semaphore.release(); } } }; IntStream.range(0, 10) .forEach(i -> executor.submit(longRunningTask)); } private void stampedLock() { long l = stampedLock.readLock(); stampedLock.unlockRead(l); l = stampedLock.writeLock(); stampedLock.unlockWrite(l); } public static void main(String[] args) { new Thread(() -> { for (int i = 0; i < 100; i++) { Lock lock = readWriteLock.writeLock(); lock.lock(); count++; System.out.println(count); lock.unlock(); } }).start(); new Thread(() -> { for (int i = 0; i < 100; i++) { Lock lock = readWriteLock.readLock(); lock.lock(); count++; lock.unlock(); } }).start(); } }
mmazurkevich/sping-examples
concurrency/src/main/java/com/spring/example/concurrency/locks/ReentrantReadWrite.java
Java
mit
2,352
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Jgcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef JGCOIN_DB_H #define JGCOIN_DB_H #include "serialize.h" #include "sync.h" #include "version.h" #include <map> #include <string> #include <vector> #include <boost/filesystem/path.hpp> #include <db_cxx.h> class CAddrMan; struct CBlockLocator; class CDiskBlockIndex; class COutPoint; extern unsigned int nWalletDBUpdated; void ThreadFlushWalletDB(const std::string& strWalletFile); class CDBEnv { private: bool fDbEnvInit; bool fMockDb; boost::filesystem::path path; void EnvShutdown(); public: mutable CCriticalSection cs_db; DbEnv dbenv; std::map<std::string, int> mapFileUseCount; std::map<std::string, Db*> mapDb; CDBEnv(); ~CDBEnv(); void MakeMock(); bool IsMock() { return fMockDb; } /* * Verify that database file strFile is OK. If it is not, * call the callback to try to recover. * This must be called BEFORE strFile is opened. * Returns true if strFile is OK. */ enum VerifyResult { VERIFY_OK, RECOVER_OK, RECOVER_FAIL }; VerifyResult Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile)); /* * Salvage data from a file that Verify says is bad. * fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation). * Appends binary key/value pairs to vResult, returns true if successful. * NOTE: reads the entire database into memory, so cannot be used * for huge databases. */ typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > KeyValPair; bool Salvage(std::string strFile, bool fAggressive, std::vector<KeyValPair>& vResult); bool Open(const boost::filesystem::path &path); void Close(); void Flush(bool fShutdown); void CheckpointLSN(std::string strFile); void CloseDb(const std::string& strFile); bool RemoveDb(const std::string& strFile); DbTxn *TxnBegin(int flags=DB_TXN_WRITE_NOSYNC) { DbTxn* ptxn = NULL; int ret = dbenv.txn_begin(NULL, &ptxn, flags); if (!ptxn || ret != 0) return NULL; return ptxn; } }; extern CDBEnv bitdb; /** RAII class that provides access to a Berkeley database */ class CDB { protected: Db* pdb; std::string strFile; DbTxn *activeTxn; bool fReadOnly; explicit CDB(const char* pszFile, const char* pszMode="r+"); ~CDB() { Close(); } public: void Flush(); void Close(); private: CDB(const CDB&); void operator=(const CDB&); protected: template<typename K, typename T> bool Read(const K& key, T& value) { if (!pdb) return false; // Key CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(1000); ssKey << key; Dbt datKey(&ssKey[0], ssKey.size()); // Read Dbt datValue; datValue.set_flags(DB_DBT_MALLOC); int ret = pdb->get(activeTxn, &datKey, &datValue, 0); memset(datKey.get_data(), 0, datKey.get_size()); if (datValue.get_data() == NULL) return false; // Unserialize value try { CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION); ssValue >> value; } catch (std::exception &e) { return false; } // Clear and free memory memset(datValue.get_data(), 0, datValue.get_size()); free(datValue.get_data()); return (ret == 0); } template<typename K, typename T> bool Write(const K& key, const T& value, bool fOverwrite=true) { if (!pdb) return false; if (fReadOnly) assert(!"Write called on database in read-only mode"); // Key CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(1000); ssKey << key; Dbt datKey(&ssKey[0], ssKey.size()); // Value CDataStream ssValue(SER_DISK, CLIENT_VERSION); ssValue.reserve(10000); ssValue << value; Dbt datValue(&ssValue[0], ssValue.size()); // Write int ret = pdb->put(activeTxn, &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE)); // Clear memory in case it was a private key memset(datKey.get_data(), 0, datKey.get_size()); memset(datValue.get_data(), 0, datValue.get_size()); return (ret == 0); } template<typename K> bool Erase(const K& key) { if (!pdb) return false; if (fReadOnly) assert(!"Erase called on database in read-only mode"); // Key CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(1000); ssKey << key; Dbt datKey(&ssKey[0], ssKey.size()); // Erase int ret = pdb->del(activeTxn, &datKey, 0); // Clear memory memset(datKey.get_data(), 0, datKey.get_size()); return (ret == 0 || ret == DB_NOTFOUND); } template<typename K> bool Exists(const K& key) { if (!pdb) return false; // Key CDataStream ssKey(SER_DISK, CLIENT_VERSION); ssKey.reserve(1000); ssKey << key; Dbt datKey(&ssKey[0], ssKey.size()); // Exists int ret = pdb->exists(activeTxn, &datKey, 0); // Clear memory memset(datKey.get_data(), 0, datKey.get_size()); return (ret == 0); } Dbc* GetCursor() { if (!pdb) return NULL; Dbc* pcursor = NULL; int ret = pdb->cursor(NULL, &pcursor, 0); if (ret != 0) return NULL; return pcursor; } int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags=DB_NEXT) { // Read at cursor Dbt datKey; if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) { datKey.set_data(&ssKey[0]); datKey.set_size(ssKey.size()); } Dbt datValue; if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) { datValue.set_data(&ssValue[0]); datValue.set_size(ssValue.size()); } datKey.set_flags(DB_DBT_MALLOC); datValue.set_flags(DB_DBT_MALLOC); int ret = pcursor->get(&datKey, &datValue, fFlags); if (ret != 0) return ret; else if (datKey.get_data() == NULL || datValue.get_data() == NULL) return 99999; // Convert to streams ssKey.SetType(SER_DISK); ssKey.clear(); ssKey.write((char*)datKey.get_data(), datKey.get_size()); ssValue.SetType(SER_DISK); ssValue.clear(); ssValue.write((char*)datValue.get_data(), datValue.get_size()); // Clear and free memory memset(datKey.get_data(), 0, datKey.get_size()); memset(datValue.get_data(), 0, datValue.get_size()); free(datKey.get_data()); free(datValue.get_data()); return 0; } public: bool TxnBegin() { if (!pdb || activeTxn) return false; DbTxn* ptxn = bitdb.TxnBegin(); if (!ptxn) return false; activeTxn = ptxn; return true; } bool TxnCommit() { if (!pdb || !activeTxn) return false; int ret = activeTxn->commit(0); activeTxn = NULL; return (ret == 0); } bool TxnAbort() { if (!pdb || !activeTxn) return false; int ret = activeTxn->abort(); activeTxn = NULL; return (ret == 0); } bool ReadVersion(int& nVersion) { nVersion = 0; return Read(std::string("version"), nVersion); } bool WriteVersion(int nVersion) { return Write(std::string("version"), nVersion); } bool static Rewrite(const std::string& strFile, const char* pszSkip = NULL); }; #endif // JGCOIN_DB_H
cptecdfi/jgcoins
src/db.h
C
mit
8,265
'use strict'; var Primus = require('primus') , emitter = require('../') , http = require('http').Server , expect = require('expect.js') , opts = { transformer: 'websockets' } , primus , srv; // creates the client function client(srv, primus, port){ var addr = srv.address(); var url = 'http://' + addr.address + ':' + (port || addr.port); return new primus.Socket(url); } // creates the server function server(srv, opts) { return Primus(srv, opts).use('emitter', emitter); } describe('primus-emitter', function () { beforeEach(function beforeEach(done) { srv = http(); primus = server(srv, opts); done(); }); afterEach(function afterEach(done) { primus.end(); done(); }); it('should have required methods', function (done) { //primus.save('testt.js'); srv.listen(function () { primus.on('connection', function (spark) { expect(spark.reserved).to.be.a('function'); expect(spark.send).to.be.a('function'); expect(spark.on).to.be.a('function'); done(); }); var cl = client(srv, primus); expect(cl.reserved).to.be.a('function'); }); }); it('should emit event from server', function (done) { srv.listen(function () { primus.on('connection', function (spark) { spark.send('news', 'data'); }); var cl = client(srv, primus); cl.on('news', function (data) { expect(data).to.be('data'); done(); }); }); }); it('should emit object from server', function (done) { var msg = { hi: 'hello', num: 123456 }; srv.listen(function () { primus.on('connection', function (spark) { spark.send('news', msg); }); var cl = client(srv, primus); cl.on('news', function (data) { expect(data).to.be.eql(msg); done(); }); }); }); it('should support ack from server', function (done) { var msg = { hi: 'hello', num: 123456 }; srv.listen(function () { primus.on('connection', function (spark) { spark.send('news', msg, function (err, res) { expect(res).to.be('received'); expect(err).to.be.eql(null); done(); }); }); var cl = client(srv, primus); cl.on('news', function (data, fn) { fn(null, 'received'); }); }); }); it('should emit event from client', function (done) { srv.listen(function () { primus.on('connection', function (spark) { spark.on('news', function (data) { expect(data).to.be('data'); done(); }); }); var cl = client(srv, primus); cl.send('news', 'data'); }); }); it('should emit object from client', function (done) { var msg = { hi: 'hello', num: 123456 }; srv.listen(function () { primus.on('connection', function (spark) { spark.on('news', function (data) { expect(data).to.be.eql(msg); done(); }); }); var cl = client(srv, primus); cl.send('news', msg); }); }); it('should support ack from client', function (done) { var msg = { hi: 'hello', num: 123456 }; srv.listen(function () { primus.on('connection', function (spark) { spark.on('news', function (data, fn) { fn(null, 'received'); }); }); var cl = client(srv, primus); cl.send('news', msg, function (err, res) { expect(res).to.be('received'); expect(err).to.be.eql(null); done(); }); }); }); it('should support broadcasting from server', function (done) { var total = 0; srv.listen(function () { primus.on('connection', function (spark) { if (3 === ++total) primus.send('news', 'hi'); }); var cl1 = client(srv, primus) , cl2 = client(srv, primus) , cl3 = client(srv, primus); cl1.on('news', function (msg) { expect(msg).to.be('hi'); finish(); }); cl2.on('news', function (msg) { expect(msg).to.be('hi'); finish(); }); cl3.on('news', function (msg) { expect(msg).to.be('hi'); finish(); }); function finish() { if (1 > --total) done(); } }); }); it('should return `Primus` instance when broadcasting from server', function () { expect(primus.send('news')).to.be.a(Primus); srv.listen(); }); it('`Client#send` should not trigger `Spark` reserved events', function (done) { var events = Object.keys(primus.Spark.prototype.reserved.events); srv.listen(function () { primus.on('connection', function (spark) { events.forEach(function (ev) { spark.on(ev, function (data) { if ('not ignored' === data) { done(new Error('should be ignored')); } }); }); }); }); var cl = client(srv, primus); cl.on('open', function () { events.forEach(function (ev) { cl.send(ev, 'not ignored'); }); done(); }); }); it('`Spark#send` should not trigger client reserved events', function (done) { srv.listen(function () { primus.on('connection', function (spark) { events.forEach(function (ev) { spark.send(ev, 'not ignored'); }); done(); }); }); var cl = client(srv, primus) , events = Object.keys(cl.reserved.events); events.forEach(function (ev) { cl.on(ev, function (data) { if ('not ignored' === data) { done(new Error('should be ignored')); } }); }); }); it('should only listen to event once when binding with `once`', function (done) { srv.listen(function () { primus.on('connection', function (spark) { spark.once('news', function (data) { expect(data).to.be('once'); done(); }); }); var cl = client(srv, primus); cl.send('news', 'once'); cl.send('news', 'once'); }); }); });
Xitstrategies/general
node_modules/feathers/node_modules/primus-emitter/test/test.js
JavaScript
mit
6,029
from math import floor, log10 def round_(x, n): """Round a float, x, to n significant figures. Caution should be applied when performing this operation. Significant figures are an implication of precision; arbitrarily truncating floats mid-calculation is probably not Good Practice in almost all cases. Rounding off a float to n s.f. results in a float. Floats are, in general, approximations of decimal numbers. The point here is that it is very possible to end up with an inexact number: >>> roundsf(0.0012395, 3) 0.00124 >>> roundsf(0.0012315, 3) 0.0012300000000000002 Basically, rounding in this way probably doesn't do what you want it to. """ n = int(n) x = float(x) if x == 0: return 0 e = floor(log10(abs(x)) - n + 1) # exponent, 10 ** e shifted_dp = x / (10 ** e) # decimal place shifted n d.p. return round(shifted_dp) * (10 ** e) # round and revert def string(x, n): """Convert a float, x, to a string with n significant figures. This function returns a decimal string representation of a float to a specified number of significant figures. >>> create_string(9.80665, 3) '9.81' >>> create_string(0.0120076, 3) '0.0120' >>> create_string(100000, 5) '100000' Note the last representation is, without context, ambiguous. This is a good reason to use scientific notation, but it's not always appropriate. Note ---- Performing this operation as a set of string operations arguably makes more sense than a mathematical operation conceptually. It's the presentation of the number that is being changed here, not the number itself (which is in turn only approximated by a float). """ n = int(n) x = float(x) if n < 1: raise ValueError("1+ significant digits required.") # retrieve the significand and exponent from the S.N. form s, e = ''.join(( '{:.', str(n - 1), 'e}')).format(x).split('e') e = int(e) # might as well coerce now if e == 0: # Significand requires no adjustment return s s = s.replace('.', '') if e < 0: # Placeholder zeros need creating return ''.join(('0.', '0' * (abs(e) - 1), s)) else: # Decimal place need shifting s += '0' * (e - n + 1) # s now has correct s.f. i = e + 1 sep = '' if i < n: sep = '.' if s[0] is '-': i += 1 return sep.join((s[:i], s[i:])) def scientific(x, n): """Represent a float in scientific notation. This function is merely a wrapper around the 'e' type flag in the formatting specification. """ n = int(n) x = float(x) if n < 1: raise ValueError("1+ significant digits required.") return ''.join(('{:.', str(n - 1), 'e}')).format(x) def general(x, n): """Represent a float in general form. This function is merely a wrapper around the 'g' type flag in the formatting specification. """ n = int(n) x = float(x) if n < 1: raise ValueError("1+ significant digits required.") return ''.join(('{:#.', str(n), 'g}')).format(x)
corriander/python-sigfig
sigfig/sigfig.py
Python
mit
2,902
// 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 namespace vc_attributes { #pragma pack(push, 4) template<> struct event_sourceAttribute { template<> typedef event_receiverAttribute::type_e type_e; template<> enum optimize_e { speed = 0x0, size = 0x1, }; type_e type; optimize_e optimize; bool decorate; }; #pragma pack(pop) }; // end namespace vc_attributes END_ATF_NAMESPACE
goodwinxp/Yorozuya
library/ATF/__event_sourceAttribute.hpp
C++
mit
700
<!DOCTYPE html> <html lang="ko-kr"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="generator" content="Hugo 0.15" /> <title>#Ludens</title> <meta property="og:site_name" content="#Ludens" /> <meta property="og:locale" content="ko-kr" /> <meta property="og:url" content="http://ludens.kr/tags/jekyll/" /> <meta property="fb:pages" content="1707155736233413"/> <meta property="fb:admins" content="100001662925065"/> <meta property="fb:app_id" content="326482430777833"/> <meta property="fb:article_style" content="default" /> <meta name="twitter:site" content="@ludensk" /> <meta name="twitter:creator" content="@ludensk" /> <meta name="google-site-verification" content="RPY_1Z0am0hoduGzENYtuwF3BBoE0x5l3UxhUplLWPU" /> <meta name="naver-site-verification" content="f84c50bc744edf7a543994325914265117555d53" /> <meta name="p:domain_verify" content="381496f2247c95edc614061bacd92e08" /> <meta name="msvalidate.01" content="9137E6F3A8C1C4AE6DC4809DEDB06FD9" /> <meta property="og:title" content="Jekyll" /> <meta property="og:type" content="website" /> <meta name="description" content="페이스북부터 심리학 그리고 워드프레스까지 온갖 잡지식을 가끔씩 끄적이고 있습니다." /> <meta name="twitter:card" content="summary" /> <link rel="author" href="humans.txt" /> <link rel="me" href="https://twitter.com/ludensk" /> <link rel="me" href="https://google.com/+ludensk" /> <link rel="me" href="https://github.com/ludens" /> <link rel="pingback" href="https://webmention.io/ludens.kr/xmlrpc" /> <link rel="webmention" href="https://webmention.io/ludens.kr/webmention" /> <link href="https://plus.google.com/+ludensk" rel="publisher"> <link rel="canonical" href="http://ludens.kr/tags/jekyll/" /> <link rel="alternate" type="application/rss+xml" title="#Ludens" href="http://ludens.kr/rss/" /> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="#Ludens"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#111111"> <meta name="msapplication-navbutton-color" content="#111111"> <meta name="msapplication-TileColor" content="#111111"> <meta name="application-name" content="#Ludens"> <meta name="msapplication-tooltip" content="페이스북부터 심리학 그리고 워드프레스까지 온갖 잡지식을 가끔씩 끄적이고 있습니다."> <meta name="msapplication-starturl" content="/"> <meta http-equiv="cleartype" content="on"> <meta name="msapplication-tap-highlight" content="no"> <link rel="apple-touch-icon" sizes="57x57" href="http://ludens.kr/favicon/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="http://ludens.kr/favicon/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="http://ludens.kr/favicon/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="http://ludens.kr/favicon/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="http://ludens.kr/favicon/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="http://ludens.kr/favicon/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="http://ludens.kr/favicon/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="http://ludens.kr/favicon/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="http://ludens.kr/favicon/apple-touch-icon-180x180.png"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-194x194.png" sizes="194x194"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-16x16.png" sizes="16x16"> <link rel="manifest" href="http://ludens.kr/favicon/manifest.json"> <link rel="mask-icon" href="http://ludens.kr/favicon/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileImage" content="/mstile-144x144.png"> <link rel="stylesheet" href="http://ludens.kr/css/pure/pure-min.css" /> <link rel="stylesheet" href="http://ludens.kr/css/pure/grids-responsive-min.css" /> <link rel='stylesheet' href='http://ludens.kr/font/fonts.css'> <link rel="stylesheet" href="http://ludens.kr/font/font-awesome.min.css"> <link rel="stylesheet" href="http://ludens.kr/css/style.css"/> <script src="http://ludens.kr/js/jquery-2.2.1.min.js"></script> </head> <body> <script> window.fbAsyncInit = function() { FB.init({ appId : '326482430777833', xfbml : true, version : 'v2.6' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ko_KR/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <header class="pure-g"> <div class="pure-u-1 pure-u-sm-1-3 center"> <h1><a href="http://ludens.kr">#LUDENS</a></h1> </div> <nav class="pure-u-1 pure-u-sm-2-3 center"> <a href="http://ludens.kr/" class="home" title="Home">HOME</a> <a href="http://ludens.kr/categories/" class="category" title="Category">CATEGORY</a> <a href="http://ludens.kr/post/" class="archive" title="Archive">ARCHIVE</a> <a href="http://ludens.kr/tags/" class="tag" title="Tag">TAG</a> <a href="http://ludens.kr/guestbook/" class="guestbook" title="Guestbook">GUESTBOOK</a> </nav> </header> <main class="list mainWrap"> <h2 class="ellipsis"><small>Posts about </small>Jekyll</h2> <h3 id="2016">2016</h3> <div class="pure-g"> <div class="pure-u-1 pure-u-sm-1-2"> <a href="http://ludens.kr/post/goodbye-tistory/" class="cover" style="background-image: url('/images/old/cfile8.uf.221FCD3C56A0D9C22E071A.png');"></a> <div class="category ubuntu300 grey"> <a class="grey" href="http://ludens.kr/categories/blog" title="Blog">Blog</a> at <time datetime="21 Jan 2016 17:00">2016/1/21</time> </div> <h3 class="ellipsis margintop0"><a href="http://ludens.kr/post/goodbye-tistory/" title="티스토리를 떠납니다">티스토리를 떠납니다</a></h3> </div> </div> </main> <footer> <div class="footerWrap pure-g"> <div class="pure-u-1 pure-u-md-2-5 copyright center"> ⓒ 2016 Ludens | Published with <a class="black dotline" href="http://gohugo.io" target="_blank" rel="nofollow">Hugo</a> </div> <nav class="pure-u-1 pure-u-md-3-5 center"> <a href="https://twitter.com/ludensk" class="twitter" title="Twitter"><i class='fa fa-twitter-square'></i></a> <a href="https://fb.com/ludensk" class="facebook" title="Facebook"><i class='fa fa-facebook-square'></i></a> <a href="https://instagr.am/ludensk" class="instagram" title="Instagram"><i class='fa fa-instagram'></i></a> <a href="https://pinterest.com/ludensk" class="pinterest" title="Pinterest"><i class='fa fa-pinterest-square'></i></a> <a href="https://www.youtube.com/user/ludensk" class="youtube" title="YouTube"><i class='fa fa-youtube-square'></i></a> <a href="https://ludensk.tumblr.com" class="tumblr" title="Tumblr"><i class='fa fa-tumblr-square'></i></a> <a href="https://linkedin.com/in/ludensk" class="linkedin" title="LinkedIn"><i class='fa fa-linkedin-square'></i></a> <a href="https://github.com/ludens" class="github" title="GitHub"><i class='fa fa-github-square'></i></a> <a href="http://ludens.kr/rss/" class="rss" title="RSS"><i class='fa fa-rss-square'></i></a> </nav> </div> </footer> <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-29269230-1', 'auto'); ga('send', 'pageview'); </script> <script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script> <script type="text/javascript"> if(!wcs_add) var wcs_add = {}; wcs_add["wa"] = "123cefa73667c5c"; wcs_do(); </script> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init','1143503702345044'); fbq('track',"PageView"); </script> <noscript><img height="1" width="1" style="display:none" src="//www.facebook.com/tr?id=1143503702345044&ev=PageView&noscript=1" /></noscript> <script src="//twemoji.maxcdn.com/twemoji.min.js"></script> <script>var emoji=document.getElementsByClassName("emoji");twemoji.parse(emoji[0],{size:16});</script> <script src="http://ludens.kr/js/jquery.keep-ratio.min.js"></script> <script type="text/javascript"> $(function() { $('.kofic-poster').keepRatio({ ratio: 27/40, calculate: 'height' }); $('.articleWrap .cover, .post_latest .cover,.articleWrap header figure').keepRatio({ ratio: 12/5, calculate: 'height' }); if ($(window).width() >= 568) { $('.futher .cover,.error .cover,.post_two .cover,.list .cover').keepRatio({ ratio: 4/3, calculate: 'height' }); $('.categories .cover').keepRatio({ ratio: 1/1, calculate: 'height' }); } else { $('.futher .cover,.error .cover,.post_two .cover,.list .cover,.categories .cover').keepRatio({ ratio: 12/5, calculate: 'height' }); } }); </script> </body> </html>
ludens/ludens.kr
tags/jekyll/index.html
HTML
mit
10,500
<template name="highFatPercentFood"> {{#each highFatPercentFood}} <a href="/food/{{_id}}"><img src="{{imageSource}}" class="imageSet"></a> {{/each}} </template>
quanbinn/healthygeek
client/templates/high_Fat_Percent_Food.html
HTML
mit
185
package main import ( "log" "net/http" restfulspec "github.com/emicklei/go-restful-openapi/v2" "github.com/emicklei/go-restful/v3" "github.com/go-openapi/spec" ) type UserResource struct { // normally one would use DAO (data access object) users map[string]User } func (u UserResource) WebService() *restful.WebService { ws := new(restful.WebService) ws. Path("/users"). Consumes(restful.MIME_XML, restful.MIME_JSON). Produces(restful.MIME_JSON, restful.MIME_XML) // you can specify this per route as well tags := []string{"users"} ws.Route(ws.GET("/").To(u.findAllUsers). // docs Doc("get all users"). Metadata(restfulspec.KeyOpenAPITags, tags). Writes([]User{}). Returns(200, "OK", []User{}). DefaultReturns("OK", []User{})) ws.Route(ws.GET("/{user-id}").To(u.findUser). // docs Doc("get a user"). Param(ws.PathParameter("user-id", "identifier of the user").DataType("integer").DefaultValue("1")). Metadata(restfulspec.KeyOpenAPITags, tags). Writes(User{}). // on the response Returns(200, "OK", User{}). Returns(404, "Not Found", nil). DefaultReturns("OK", User{})) ws.Route(ws.PUT("/{user-id}").To(u.updateUser). // docs Doc("update a user"). Param(ws.PathParameter("user-id", "identifier of the user").DataType("string")). Metadata(restfulspec.KeyOpenAPITags, tags). Reads(User{})) // from the request ws.Route(ws.PUT("").To(u.createUser). // docs Doc("create a user"). Metadata(restfulspec.KeyOpenAPITags, tags). Reads(User{})) // from the request ws.Route(ws.DELETE("/{user-id}").To(u.removeUser). // docs Doc("delete a user"). Metadata(restfulspec.KeyOpenAPITags, tags). Param(ws.PathParameter("user-id", "identifier of the user").DataType("string"))) return ws } // GET http://localhost:8080/users // func (u UserResource) findAllUsers(request *restful.Request, response *restful.Response) { list := []User{} for _, each := range u.users { list = append(list, each) } response.WriteEntity(list) } // GET http://localhost:8080/users/1 // func (u UserResource) findUser(request *restful.Request, response *restful.Response) { id := request.PathParameter("user-id") usr := u.users[id] if len(usr.ID) == 0 { response.WriteErrorString(http.StatusNotFound, "User could not be found.") } else { response.WriteEntity(usr) } } // PUT http://localhost:8080/users/1 // <User><Id>1</Id><Name>Melissa Raspberry</Name></User> // func (u *UserResource) updateUser(request *restful.Request, response *restful.Response) { usr := new(User) err := request.ReadEntity(&usr) if err == nil { u.users[usr.ID] = *usr response.WriteEntity(usr) } else { response.WriteError(http.StatusInternalServerError, err) } } // PUT http://localhost:8080/users/1 // <User><Id>1</Id><Name>Melissa</Name></User> // func (u *UserResource) createUser(request *restful.Request, response *restful.Response) { usr := User{ID: request.PathParameter("user-id")} err := request.ReadEntity(&usr) if err == nil { u.users[usr.ID] = usr response.WriteHeaderAndEntity(http.StatusCreated, usr) } else { response.WriteError(http.StatusInternalServerError, err) } } // DELETE http://localhost:8080/users/1 // func (u *UserResource) removeUser(request *restful.Request, response *restful.Response) { id := request.PathParameter("user-id") delete(u.users, id) } func main() { u := UserResource{map[string]User{}} restful.DefaultContainer.Add(u.WebService()) config := restfulspec.Config{ WebServices: restful.RegisteredWebServices(), // you control what services are visible APIPath: "/apidocs.json", PostBuildSwaggerObjectHandler: enrichSwaggerObject} restful.DefaultContainer.Add(restfulspec.NewOpenAPIService(config)) // Optionally, you can install the Swagger Service which provides a nice Web UI on your REST API // You need to download the Swagger HTML5 assets and change the FilePath location in the config below. // Open http://localhost:8080/apidocs/?url=http://localhost:8080/apidocs.json http.Handle("/apidocs/", http.StripPrefix("/apidocs/", http.FileServer(http.Dir("/Users/emicklei/Projects/swagger-ui/dist")))) // Optionally, you may need to enable CORS for the UI to work. cors := restful.CrossOriginResourceSharing{ AllowedHeaders: []string{"Content-Type", "Accept"}, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE"}, CookiesAllowed: false, Container: restful.DefaultContainer} restful.DefaultContainer.Filter(cors.Filter) log.Printf("Get the API using http://localhost:8080/apidocs.json") log.Printf("Open Swagger UI using http://localhost:8080/apidocs/?url=http://localhost:8080/apidocs.json") log.Fatal(http.ListenAndServe(":8080", nil)) } func enrichSwaggerObject(swo *spec.Swagger) { swo.Info = &spec.Info{ InfoProps: spec.InfoProps{ Title: "UserService", Description: "Resource for managing Users", Contact: &spec.ContactInfo{ Name: "john", Email: "john@doe.rp", URL: "http://johndoe.org", }, License: &spec.License{ Name: "MIT", URL: "http://mit.org", }, Version: "1.0.0", }, } swo.Tags = []spec.Tag{spec.Tag{TagProps: spec.TagProps{ Name: "users", Description: "Managing users"}}} } // User is just a sample type type User struct { ID string `json:"id" description:"identifier of the user"` Name string `json:"name" description:"name of the user" default:"john"` Age int `json:"age" description:"age of the user" default:"21"` }
emicklei/go-restful-openapi
examples/user-resource.go
GO
mit
5,503
import React from 'react'; import styled from 'styled-components'; const Emoji = ({ className, svg }) => ( <span className={className} dangerouslySetInnerHTML={{ __html: svg }} /> ); const StyledEmoji = styled(Emoji)` display: inline-block; width: 1.5em; `; export default StyledEmoji;
mucsi96/w3c-webdriver
packages/website/src/components/content/Emoji.js
JavaScript
mit
295
package com.is_gr8.imageprocessor.ui; import java.util.HashMap; import org.apache.log4j.Logger; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import com.is_gr8.imageprocessor.ImageEvent; import com.is_gr8.imageprocessor.ImageEventListener; /** * created May 24, 2013 * * @author Rocco Schulz <roccos@de.ibm.com> * */ public class ImageInfoComposite extends Composite implements ImageEventListener { private HashMap<String,String> imageinfo; private static Logger logger = Logger.getLogger(ImageInfoComposite.class); public ImageInfoComposite(Composite parent, int style, HashMap<String,String> info) { super(parent, style); this.imageinfo = info; this.init(); this.update(); } public ImageInfoComposite(Composite parent, int style) { super(parent, style); this.init(); } private void init(){ this.setLayout(new GridLayout(2, false)); this.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); } /** * Clears the composite and adds labels for the keys and values of the provided map. * @param imageinfo */ public void updateElements(HashMap<String,String> imageinfo){ for (Control control : this.getChildren()) { control.dispose(); } for(String label: imageinfo.keySet()){ //griddata GridData data = new GridData(); data.grabExcessHorizontalSpace = false; data.grabExcessVerticalSpace = false; data.horizontalAlignment = SWT.LEFT; //keys Label k = new Label(this, SWT.NONE); k.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1)); k.setText(label); //values Label v = new Label(this, SWT.NONE); v.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1)); String value = imageinfo.get(label); v.setText(value); logger.debug(value); } logger.debug("Updating tab contents."); this.layout(); this.pack(); this.getParent().layout(); } /* (non-Javadoc) * @see com.is_gr8.imageprocessor.ImageEventListener#imageOpened(com.is_gr8.imageprocessor.ImageEvent) */ public void imageOpened(ImageEvent e) { updateElements(e.getImage().getInfoMap()); } /* (non-Javadoc) * @see com.is_gr8.imageprocessor.ImageEventListener#imageSaved(com.is_gr8.imageprocessor.ImageEvent) */ public void imageSaved(ImageEvent e) { // can be ignored. } /* (non-Javadoc) * @see com.is_gr8.imageprocessor.ImageEventListener#imageHeaderChanged(com.is_gr8.imageprocessor.ImageEvent) */ public void imageHeaderChanged(ImageEvent e) { updateElements(e.getImage().getInfoMap()); } /* (non-Javadoc) * @see com.is_gr8.imageprocessor.ImageEventListener#imageBodyChanged(com.is_gr8.imageprocessor.ImageEvent) */ public void imageBodyChanged(ImageEvent e) { //can be ignored } }
schocco/pgm-processor
com.is-gr8.image-processing/src/main/java/com/is_gr8/imageprocessor/ui/ImageInfoComposite.java
Java
mit
2,925
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Kusto::Mgmt::V2020_09_18 module Models # # Defines values for State # module State Creating = "Creating" Unavailable = "Unavailable" Running = "Running" Deleting = "Deleting" Deleted = "Deleted" Stopping = "Stopping" Stopped = "Stopped" Starting = "Starting" Updating = "Updating" end end end
Azure/azure-sdk-for-ruby
management/azure_mgmt_kusto/lib/2020-09-18/generated/azure_mgmt_kusto/models/state.rb
Ruby
mit
549
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for CESA-2013:1034 # # Security announcement date: 2013-07-10 15:50:41 UTC # Script generation date: 2017-01-01 21:10:47 UTC # # Operating System: CentOS 5 # Architecture: x86_64 # # Vulnerable packages fix on version: # - kernel-doc.noarch:2.6.18-348.12.1.el5 # - kernel.x86_64:2.6.18-348.12.1.el5 # - kernel-debug.x86_64:2.6.18-348.12.1.el5 # - kernel-debug-devel.x86_64:2.6.18-348.12.1.el5 # - kernel-devel.x86_64:2.6.18-348.12.1.el5 # - kernel-headers.x86_64:2.6.18-348.12.1.el5 # - kernel-xen.x86_64:2.6.18-348.12.1.el5 # - kernel-xen-devel.x86_64:2.6.18-348.12.1.el5 # # Last versions recommanded by security team: # - kernel-doc.noarch:2.6.18-417.el5 # - kernel.x86_64:2.6.18-417.el5 # - kernel-debug.x86_64:2.6.18-417.el5 # - kernel-debug-devel.x86_64:2.6.18-417.el5 # - kernel-devel.x86_64:2.6.18-417.el5 # - kernel-headers.x86_64:2.6.18-417.el5 # - kernel-xen.x86_64:2.6.18-417.el5 # - kernel-xen-devel.x86_64:2.6.18-417.el5 # # CVE List: # - CVE-2012-6544 # - CVE-2012-6545 # - CVE-2013-0914 # - CVE-2013-1929 # - CVE-2013-3222 # - CVE-2013-3224 # - CVE-2013-3231 # - CVE-2013-3235 # # More details: # - https://www.cyberwatch.fr/vulnerabilites # # Licence: Released under The MIT License (MIT), See LICENSE FILE sudo yum install kernel-doc.noarch-2.6.18 -y sudo yum install kernel.x86_64-2.6.18 -y sudo yum install kernel-debug.x86_64-2.6.18 -y sudo yum install kernel-debug-devel.x86_64-2.6.18 -y sudo yum install kernel-devel.x86_64-2.6.18 -y sudo yum install kernel-headers.x86_64-2.6.18 -y sudo yum install kernel-xen.x86_64-2.6.18 -y sudo yum install kernel-xen-devel.x86_64-2.6.18 -y
Cyberwatch/cbw-security-fixes
CentOS_5/x86_64/2013/CESA-2013:1034.sh
Shell
mit
1,715
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data; using USTA.Model; using USTA.Dal; using USTA.Common; using System.Configuration; using USTA.PageBase; public partial class Administrator_EditNotifyInfo : CheckUserWithCommonPageBase { int notifyId = (HttpContext.Current.Request["adminNotifyInfoId"]==null)?0:int.Parse(HttpContext.Current.Request["adminNotifyInfoId"]); public int fileFolderType = (int)FileFolderType.adminNotify; //已经有的附件数,页面初始化时与前端JS进行交互 public int iframeCount = 0; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { int tryParseInt = 0; if (CommonUtility.SafeCheckByParams<string>(Request["adminNotifyInfoId"], ref tryParseInt)) { //获取Url中的参数 notifyId = tryParseInt; } InitialNotifyEdit(notifyId); } } //初始化编辑页面 public void InitialNotifyEdit(int notifyId) { DalOperationAboutAdminNotify doan = new DalOperationAboutAdminNotify(); AdminNotifyInfo notify = doan.FindNotifyByNo(notifyId); if (notify == null) { Javascript.AlertAndRedirect("要修改的信息不存在,请检查!", "/Administrator/NotifyInfoManage.aspx", Page); } else { //通知或办事流程 ddlNotifyType.SelectedValue = notify.notifyTypeId.ToString().Trim(); txtTitle.Text = notify.notifyTitle; this.Textarea1.Value = notify.notifyContent; hidAttachmentId.Value = notify.attachmentIds; if (notify.attachmentIds.Length > 0) { DalOperationAttachments dalOperationAttachments = new DalOperationAttachments(); ltlAttachment.Text = dalOperationAttachments.GetAttachmentsList(notify.attachmentIds, ref iframeCount, true,string.Empty); } } DalOperationAboutAdminNotifyType dalNotifyType = new DalOperationAboutAdminNotifyType(); DataTable dt = dalNotifyType.FindAllParentAdminNotifyType().Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { ListItem _item = new ListItem(dt.Rows[i]["notifyTypeName"].ToString().Trim(), dt.Rows[i]["notifyTypeId"].ToString().Trim()); ddlNotifyType.Items.Add(_item); } if (dalNotifyType.FindParentIdById(notify.notifyTypeId).Tables[0].Rows.Count > 0) { for (int i = 0; i < ddlNotifyType.Items.Count; i++) { if (ddlNotifyType.Items[i].Value.ToString().Trim() == dalNotifyType.FindParentIdById(notify.notifyTypeId).Tables[0].Rows[0]["parentId"].ToString().Trim()) { ddlNotifyType.SelectedIndex = i; } } DataTable _dt = dalNotifyType.FindAllAdminNotifyTypeByParentId(int.Parse(ddlNotifyType.SelectedValue)).Tables[0]; for (int j = 0; j < _dt.Rows.Count; j++) { ddlNotifyTypeChild.Items.Add(new ListItem(_dt.Rows[j]["notifyTypeName"].ToString().Trim(), _dt.Rows[j]["notifyTypeId"].ToString().Trim())); } } for (int i = 0; i < ddlNotifyTypeChild.Items.Count; i++) { if (ddlNotifyTypeChild.Items[i].Value.ToString().Trim() == notify.notifyTypeId.ToString().Trim()) { ddlNotifyTypeChild.SelectedIndex = i; } } } //第1个标签;开始 protected void ddlNotifyType_SelectedIndexChanged(object sender, EventArgs e) { while (ddlNotifyTypeChild.Items.Count > 0) { ddlNotifyTypeChild.Items.RemoveAt(0); } DalOperationAboutAdminNotifyType dalNotifyType = new DalOperationAboutAdminNotifyType(); DataTable _dt = dalNotifyType.FindAllAdminNotifyTypeByParentId(int.Parse(ddlNotifyType.SelectedValue)).Tables[0]; for (int j = 0; j < _dt.Rows.Count; j++) { ddlNotifyTypeChild.Items.Add(new ListItem(_dt.Rows[j]["notifyTypeName"].ToString().Trim(), _dt.Rows[j]["notifyTypeId"].ToString().Trim())); } } //修改 protected void btnUpdate_Click(object sender, EventArgs e) { if (ddlNotifyTypeChild.Items.Count == 0) { Javascript.GoHistory(-1, "请选择“" + ddlNotifyType.SelectedItem.Text + "”下的二级分类\n若无二级分类,请在文章类别管理页面添加相应地的二级分类", Page); return; } if (txtTitle.Text.Trim().Length == 0 || this.Textarea1.Value.Trim().Length == 0) { Javascript.GoHistory(-1, "标题和内容不能为空,请输入!", Page); } else { DalOperationAboutAdminNotify doan = new DalOperationAboutAdminNotify(); AdminNotifyInfo notify = new AdminNotifyInfo(); notify.adminNotifyInfoIds = notifyId.ToString(); notify.notifyTitle = txtTitle.Text.Trim(); notify.notifyContent = this.Textarea1.Value.Trim(); notify.notifyTypeId = int.Parse(ddlNotifyTypeChild.SelectedValue.ToString().Trim()); notify.attachmentIds = hidAttachmentId.Value; notify.updateTime = DateTime.Now; try { doan.UpdateNotifyInfo(notify);//修改 Javascript.RefreshParentWindow("修改成功!", "/Administrator/NotifyInfoManage.aspx", Page); } catch (Exception ex) { MongoDBLog.LogRecord(ex); Javascript.GoHistory(-1, "修改失败,请检查格式是否有误!", Page); } } } }
skyaspnet/usta
USTA.WebApplication/Administrator/EditNotifyInfo.aspx.cs
C#
mit
6,086
<?php namespace common\asset; use yii\web\AssetBundle; use yii\web\View; /** * AdminHui AssetBundle * @since 0.1 */ class AdminHuiAsset extends AssetBundle { public $sourcePath = '@common/asset/static/adminhui'; public $css = [ 'css/style.min862f.css', 'css/animate.css', ]; public $js = [ 'js/plugins/metisMenu/jquery.metisMenu.js', 'js/plugins/slimscroll/jquery.slimscroll.min.js', "js/plugins/layer/layer.min.js", "js/hplus.min.js", "js/contabs.min.js", "js/pace.min.js", ]; public $depends = [ 'yii\web\YiiAsset', 'yii\bootstrap\BootstrapAsset', 'yii\bootstrap\BootstrapPluginAsset', 'common\asset\FontAwesomeAsset', ]; public $jsOptions = [ 'position' => View::POS_HEAD, ]; }
JeanWolf/plat
common/asset/AdminHuiAsset.php
PHP
mit
830
var opener = require("opener"); module.exports = { run : function (){ opener(packageJson.docs); } }
fabiorogeriosj/mockapp
bin/command/command_docs.js
JavaScript
mit
117
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("UniversalApp")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("UniversalApp")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)]
imanushin/CheckContracts
NuGet/InstallTests/UniversalApp/Properties/AssemblyInfo.cs
C#
mit
1,044
/****************************************************************************** * Compilation: javac Queue.java * Execution: java Queue < input.txt * Dependencies: StdIn.java StdOut.java * Data files: http://algs4.cs.princeton.edu/13stacks/tobe.txt * * A generic queue, implemented using a linked list. * * % java Queue < tobe.txt * to be or not to be (2 left on queue) * ******************************************************************************/ import java.util.Iterator; import java.util.NoSuchElementException; /** * The <tt>Queue</tt> class represents a first-in-first-out (FIFO) * queue of generic items. * It supports the usual <em>enqueue</em> and <em>dequeue</em> * operations, along with methods for peeking at the first item, * testing if the queue is empty, and iterating through * the items in FIFO order. * <p> * This implementation uses a singly-linked list with a static nested class for * linked-list nodes. See {@link LinkedQueue} for the version from the * textbook that uses a non-static nested class. * The <em>enqueue</em>, <em>dequeue</em>, <em>peek</em>, <em>size</em>, and <em>is-empty</em> * operations all take constant time in the worst case. * <p> * For additional documentation, see <a href="http://algs4.cs.princeton.edu/13stacks">Section 1.3</a> of * <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne. * * @author Robert Sedgewick * @author Kevin Wayne * * @param <Item> the generic type of an item in this bag */ public class Queue<Item> implements Iterable<Item> { private Node<Item> first; // beginning of queue private Node<Item> last; // end of queue private int N; // number of elements on queue // helper linked list class private static class Node<Item> { private Item item; private Node<Item> next; } /** * Initializes an empty queue. */ public Queue() { first = null; last = null; N = 0; } /** * Returns true if this queue is empty. * * @return <tt>true</tt> if this queue is empty; <tt>false</tt> otherwise */ public boolean isEmpty() { return first == null; } /** * Returns the number of items in this queue. * * @return the number of items in this queue */ public int size() { return N; } /** * Returns the item least recently added to this queue. * * @return the item least recently added to this queue * @throws NoSuchElementException if this queue is empty */ public Item peek() { if (isEmpty()) throw new NoSuchElementException("Queue underflow"); return first.item; } /** * Adds the item to this queue. * * @param item the item to add */ public void enqueue(Item item) { Node<Item> oldlast = last; last = new Node<Item>(); last.item = item; last.next = null; if (isEmpty()) first = last; else oldlast.next = last; N++; } /** * Removes and returns the item on this queue that was least recently added. * * @return the item on this queue that was least recently added * @throws NoSuchElementException if this queue is empty */ public Item dequeue() { if (isEmpty()) throw new NoSuchElementException("Queue underflow"); Item item = first.item; first = first.next; N--; if (isEmpty()) last = null; // to avoid loitering return item; } /** * Returns a string representation of this queue. * * @return the sequence of items in FIFO order, separated by spaces */ public String toString() { StringBuilder s = new StringBuilder(); for (Item item : this) s.append(item + " "); return s.toString(); } /** * Returns an iterator that iterates over the items in this queue in FIFO order. * * @return an iterator that iterates over the items in this queue in FIFO order */ public Iterator<Item> iterator() { return new ListIterator<Item>(first); } // an iterator, doesn't implement remove() since it's optional private class ListIterator<Item> implements Iterator<Item> { private Node<Item> current; public ListIterator(Node<Item> first) { current = first; } public boolean hasNext() { return current != null; } public void remove() { throw new UnsupportedOperationException(); } public Item next() { if (!hasNext()) throw new NoSuchElementException(); Item item = current.item; current = current.next; return item; } } }
dkindler/School-Work
CS1501/dak160-Assignment4/Queue.java
Java
mit
4,848
declare var math: any; class Utils { static scopeClone(scope): any { var newScope = {}; _.each(scope, function (value, name) { if (value instanceof Function) { newScope[name] = value; } else { newScope[name] = math.clone(value); } }); return newScope; } } export = Utils;
arthot/calque
src/Calque/core/utils.ts
TypeScript
mit
386
package com.auto.test.controller; import java.io.File; import java.net.URLDecoder; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.ResourceUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.commons.CommonsMultipartFile; import org.springframework.web.servlet.ModelAndView; import com.auto.test.common.bean.AInterfaceCase; import com.auto.test.common.controller.BaseController; import com.auto.test.service.IApiInterfaceService; import com.auto.test.utils.ExcelUtil; @RestController @RequestMapping(value = "api/upload") public class ApiUploadController extends BaseController{ private static Logger logger = LoggerFactory.getLogger(ApiUploadController.class); @Resource private IApiInterfaceService interfaceService; @RequestMapping(value = "/fileUpload", method = RequestMethod.POST) public ModelAndView fileUpload(HttpServletRequest request, @RequestParam("file") CommonsMultipartFile file) throws Exception { if(file == null || file.isEmpty()){ logger.error("[Upload]==>批量导入接口[文件是空或者不存在!]"); return failMsg("文件是空或者不存在!", "api/setting"); } if(!file.getOriginalFilename().endsWith("xlsx")){ logger.error("[Upload]==>批量导入接口[文件不是Excel!]"); return failMsg("文件不是Excel!", "api/setting"); } try { List<AInterfaceCase> list = new ExcelUtil().readXls(file.getInputStream()); interfaceService.exportApiInterface(list); logger.info("[Upload]==>批量导入接口成功!"); return success("success", "redirect:/api/setting/list", getCurrentUserName(request)); } catch (Exception e) { logger.error("[Upload]==>批量导入接口失败![" + e.getMessage() + "]"); return success(URLDecoder.decode("Error" + e.getMessage(), "UTF-8"), "redirect:/api/setting/list", getCurrentUserName(request)); } } @RequestMapping(value = "/fileDownload", method = RequestMethod.GET) public ResponseEntity<byte[]> download(HttpServletRequest request) throws Exception { logger.info("[Upload]==>下载批量导入接口模板!"); File file = ResourceUtils.getFile("classpath:template/ExportIntetface.xlsx"); String fileName = new String("接口批量导入模板.xlsx".getBytes("UTF-8"),"iso-8859-1"); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_OCTET_STREAM); headers.setContentDispositionFormData("attachment", fileName); return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file), headers, HttpStatus.CREATED); } }
hackzhou/AutoPlatform
src/main/java/com/auto/test/controller/ApiUploadController.java
Java
mit
3,198
[![npm package](https://badge.fury.io/js/httpr.svg)](https://badge.fury.io/js/httpr) [![Build Status](https://travis-ci.org/RecuencoJones/httpr.png?branch=develop)](https://travis-ci.org/RecuencoJones/httpr) # httpr A simple library for working with HTTP requests in any environment, independent of the implementation. Httpr is not just another HTTP provider, in fact it is an abstraction from other HTTP providers like XHR, jquery, fetch, etc. Httpr provides a common interface to all of them, featuring also interceptors, which offer powerful options for managing HTTP requests, from adding headers and query parameters, to middleware caches or formatting requests and responses as needed. ## Import The library requires a peer of Lodash, and you should also include es6-promise polyfill if necessary. ### ES6 import ``` import {Httpr} from 'httpr'; const http = new Httpr(); ``` ### Commonjs ``` const Httpr = require('httpr').Httpr; const http = new Httpr(); ``` ### Browser ``` <script src="path/to/lodash.js"></script> <script src="path/to/dist/httpr[.min].js"></script> <script> var http = new httpr.Httpr(); </script> ``` ## Type Definitions For TypeScript usage, a file with type definitions is bundled in npm. This file is generated using [barrel-defgen](https://github.com/RecuencoJones/barrel-defgen). ## Building ``` npm install npm run build ``` These commands will setup the package and generate the distributable files as well as the type definitions. Other tasks: - `npm run build:umd` - generate library bundle. - `npm run build:min` - generate minified library bundle. - `npm run build:defs` - generate definitions from barrel to `defs` directory. - `npm run clean` - remove generated directories. - `npm run lint` - check style of source files. - `npm run doc` - generate documentation from sources to `doc` directory. - `npm run test` - run all test suites. - `npm run test:unit` - run unit tests only.
RecuencoJones/httpr
README.md
Markdown
mit
1,949
// // RITLTabBarItem.h // XiaoNongDingClient // // Created by YueWen on 2017/5/4. // Copyright © 2017年 ryden. All rights reserved. // #import "RITLButton.h" NS_ASSUME_NONNULL_BEGIN /// 自定义的UITabBarItem @interface RITLButtonItem : RITLButton /// 保证图片的带下,默认为(23,23) //保证最小的 @property (nonatomic, assign)CGSize imageSize; /// badge数量,默认为nil @property (nonatomic, copy) NSString *badgeValue; /// badge背景颜色,默认为(255,85,85) @property (nonatomic, strong) UIColor *badgeBarTintColor; /// badge文本颜色,默认为白色 @property (nonatomic, strong) UIColor *badgeTextColor; /// badge文本的字体,默认为systemFontOfSize:10 @property (nonatomic, strong) UIFont *badgeTextFont; /// badge文本大于99(99+)时的字体,默认为 badgeTextFont @property (nonatomic, strong) UIFont *badgeMaxTextFont; /// badge的大小范围,矩形,默认为(20,15) @property (nonatomic, assign) CGSize badgeSize; /// badge视图的偏移,默认为(2,0,0,2) @property (nonatomic, assign) UIEdgeInsets badgeInset; /*** image 属性 ***/ /// 正常状态下的image @property (nonatomic, strong) UIImage * normalImage; /// 正常状态下的image网络图的url @property (nonatomic, copy) NSString * normalImageURL; /// 选中状态下的image,默认normalImage @property (nonatomic, strong) UIImage * selectedImage; /// 选中状态下的image网络图url,默认normalImageURL @property (nonatomic, copy) NSString * selectedImageURL; /// 显示badge - (void)showBadge; /// 隐藏badge - (void)hiddenBadge; @end typedef RITLButtonItem RITLTabBarItem; NS_ASSUME_NONNULL_END
gs01md/ColorfulWoodUIBase
ColorfulWoodUIBase/Pods/RITLKit/RITLKit/View/Button/RITLButtonItem.h
C
mit
1,665
/* * This file is part of the TREZOR project. * * Copyright (C) 2014 Pavol Rusnak <stick@satoshilabs.com> * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include "signing.h" #include "transaction.h" #include "ecdsa.h" static uint32_t inputs_count; static uint32_t outputs_count; static const CoinType *coin; static const HDNode *root; static HDNode node; static bool signing = false; enum { STAGE_REQUEST_1_INPUT, STAGE_REQUEST_2_PREV_META, STAGE_REQUEST_2_PREV_INPUT, STAGE_REQUEST_2_PREV_OUTPUT, STAGE_REQUEST_3_INPUT, STAGE_REQUEST_3_OUTPUT, STAGE_REQUEST_4_OUTPUT } signing_stage; static uint32_t idx1i, idx2i, idx2o, idx3i, idx3o, idx4o; static TxRequest resp; static TxInputType input; static TxOutputBinType bin_output; static TxStruct to, tp, ti, tc; static uint8_t hash[32], hash_check[32], privkey[32], pubkey[33], sig[64]; static uint64_t to_spend, spending, change_spend; const uint32_t version = 1; const uint32_t lock_time = 0; static uint32_t progress, progress_total; /* Workflow of streamed signing I - input O - output foreach I: Request I STAGE_REQUEST_1_INPUT Calculate amount of I: Request prevhash I, META STAGE_REQUEST_2_PREV_META foreach prevhash I: STAGE_REQUEST_2_PREV_INPUT Request prevhash I foreach prevhash O: STAGE_REQUEST_2_PREV_OUTPUT Request prevhash O Store amount of I Calculate hash of streamed tx, compare to prevhash I foreach I: STAGE_REQUEST_3_INPUT Request I If I == I-to-be-signed: Fill scriptsig Add I to StreamTransactionSign foreach O: Request O STAGE_REQUEST_3_OUTPUT If I=0: Display output Ask for confirmation Add O to StreamTransactionSign If I=0: Check tx fee Calculate txhash else: Compare current hash with txhash If different: Failure Sign StreamTransactionSign Return signed chunk */ void send_req_1_input(void) { idx2i = idx2o = idx3i = idx3o = 0; signing_stage = STAGE_REQUEST_1_INPUT; resp.has_request_type = true; resp.request_type = RequestType_TXINPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx1i; } void send_req_2_prev_meta(void) { signing_stage = STAGE_REQUEST_2_PREV_META; resp.has_request_type = true; resp.request_type = RequestType_TXMETA; resp.has_details = true; resp.details.has_tx_hash = true; resp.details.tx_hash.size = input.prev_hash.size; memcpy(resp.details.tx_hash.bytes, input.prev_hash.bytes, input.prev_hash.size); } void send_req_2_prev_input(void) { signing_stage = STAGE_REQUEST_2_PREV_INPUT; resp.has_request_type = true; resp.request_type = RequestType_TXINPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx2i; resp.details.has_tx_hash = true; resp.details.tx_hash.size = input.prev_hash.size; memcpy(resp.details.tx_hash.bytes, input.prev_hash.bytes, resp.details.tx_hash.size); } void send_req_2_prev_output(void) { signing_stage = STAGE_REQUEST_2_PREV_OUTPUT; resp.has_request_type = true; resp.request_type = RequestType_TXOUTPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx2o; resp.details.has_tx_hash = true; resp.details.tx_hash.size = input.prev_hash.size; memcpy(resp.details.tx_hash.bytes, input.prev_hash.bytes, resp.details.tx_hash.size); } void send_req_3_input(void) { signing_stage = STAGE_REQUEST_3_INPUT; resp.has_request_type = true; resp.request_type = RequestType_TXINPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx3i; } void send_req_3_output(void) { signing_stage = STAGE_REQUEST_3_OUTPUT; resp.has_request_type = true; resp.request_type = RequestType_TXOUTPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx3o; } void send_req_4_output(void) { signing_stage = STAGE_REQUEST_4_OUTPUT; resp.has_request_type = true; resp.request_type = RequestType_TXOUTPUT; resp.has_details = true; resp.details.has_request_index = true; resp.details.request_index = idx4o; } void send_req_finished(void) { resp.has_request_type = true; resp.request_type = RequestType_TXFINISHED; } void signing_init(uint32_t _inputs_count, uint32_t _outputs_count, const CoinType *_coin, HDNode *_root) { inputs_count = _inputs_count; outputs_count = _outputs_count; coin = _coin; root = _root; idx1i = idx2i = idx2o = idx3i = idx3o = idx4o = 0; to_spend = 0; spending = 0; change_spend = 0; memset(&input, 0, sizeof(TxInputType)); memset(&resp, 0, sizeof(TxRequest)); signing = true; progress = 1; progress_total = inputs_count * (1 + inputs_count + outputs_count) + outputs_count; tx_init(&to, inputs_count, outputs_count, version, lock_time, false); send_req_1_input(); } void signing_txack(TransactionType *tx) { if (!signing) { //TODO: indicate failure return; } int co; memset(&resp, 0, sizeof(TxRequest)); switch (signing_stage) { case STAGE_REQUEST_1_INPUT: // layoutProgress("Preparing", 1000 * progress / progress_total, progress); progress++; memcpy(&input, tx->inputs, sizeof(TxInputType)); send_req_2_prev_meta(); return; case STAGE_REQUEST_2_PREV_META: tx_init(&tp, tx->inputs_cnt, tx->outputs_cnt, tx->version, tx->lock_time, false); send_req_2_prev_input(); return; case STAGE_REQUEST_2_PREV_INPUT: if (!tx_hash_input(&tp, tx->inputs)) { //TODO: indicate failure return; } if (idx2i < tp.inputs_len - 1) { idx2i++; send_req_2_prev_input(); } else { send_req_2_prev_output(); } return; case STAGE_REQUEST_2_PREV_OUTPUT: if (!tx_hash_output(&tp, tx->bin_outputs)) { //TODO: indicate failure return; } if (idx2o == input.prev_index) { to_spend += tx->bin_outputs[0].amount; } if (idx2o < tp.outputs_len - 1) { idx2o++; send_req_2_prev_output(); } else { tx_hash_final(&tp, hash, true); if (memcmp(hash, input.prev_hash.bytes, 32) != 0) { //TODO: indicate failure return; } tx_init(&ti, inputs_count, outputs_count, version, lock_time, true); tx_init(&tc, inputs_count, outputs_count, version, lock_time, true); memset(privkey, 0, 32); memset(pubkey, 0, 33); send_req_3_input(); } return; case STAGE_REQUEST_3_INPUT: // layoutProgress("Preparing", 1000 * progress / progress_total, progress); progress++; if (!tx_hash_input(&tc, tx->inputs)) { //TODO: indicate failure signing_abort(); return; } if (idx3i == idx1i) { memcpy(&node, root, sizeof(HDNode)); uint32_t k; for (k = 0; k < tx->inputs[0].address_n_count; k++) { hdnode_private_ckd(&node, tx->inputs[0].address_n[k]); } ecdsa_get_pubkeyhash(node.public_key, hash); tx->inputs[0].script_sig.size = compile_script_sig(coin->address_type, hash, tx->inputs[0].script_sig.bytes); if (tx->inputs[0].script_sig.size == 0) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to compile input"); signing_abort(); return; } memcpy(privkey, node.private_key, 32); memcpy(pubkey, node.public_key, 33); } else { tx->inputs[0].script_sig.size = 0; } if (!tx_hash_input(&ti, tx->inputs)) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to serialize input"); signing_abort(); return; } if (idx3i < inputs_count - 1) { idx3i++; send_req_3_input(); } else { send_req_3_output(); } return; case STAGE_REQUEST_3_OUTPUT: // layoutProgress("Signing", 1000 * progress / progress_total, progress); progress++; co = compile_output(coin, root, tx->outputs, &bin_output, idx1i == 0); if (co < 0) { // fsm_sendFailure(FailureType_Failure_Other, "Signing cancelled by user"); signing_abort(); return; } else if (co == 0) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to compile output"); signing_abort(); return; } if (!tx_hash_output(&tc, &bin_output)) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to serialize output"); signing_abort(); return; } if (!tx_hash_output(&ti, &bin_output)) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to serialize output"); signing_abort(); return; } if (idx1i == 0) { if (tx->outputs[0].address_n_count > 0) { // address_n set -> change address if (change_spend == 0) { // not set change_spend = tx->outputs[0].amount; } else { // fsm_sendFailure(FailureType_Failure_Other, "Only one change output allowed"); signing_abort(); return; } } spending += tx->outputs[0].amount; } if (idx3o < outputs_count - 1) { idx3o++; send_req_3_output(); } else { if (idx1i == 0) { tx_hash_final(&tc, hash_check, false); } else { tx_hash_final(&tc, hash, false); if (memcmp(hash, hash_check, 32) != 0) { // fsm_sendFailure(FailureType_Failure_Other, "Transaction has changed during signing"); signing_abort(); return; } } tx_hash_final(&ti, hash, false); resp.has_serialized = true; resp.serialized.has_signature_index = true; resp.serialized.signature_index = idx1i; resp.serialized.has_signature = true; resp.serialized.has_serialized_tx = true; ecdsa_sign_digest(privkey, hash, sig); resp.serialized.signature.size = ecdsa_sig_to_der(sig, resp.serialized.signature.bytes); input.script_sig.size = serialize_script_sig(resp.serialized.signature.bytes, resp.serialized.signature.size, pubkey, 33, input.script_sig.bytes); resp.serialized.serialized_tx.size = tx_serialize_input(&to, input.prev_hash.bytes, input.prev_index, input.script_sig.bytes, input.script_sig.size, input.sequence, resp.serialized.serialized_tx.bytes); if (idx1i < inputs_count - 1) { idx1i++; send_req_1_input(); } else { if (spending > to_spend) { // fsm_sendFailure(FailureType_Failure_NotEnoughFunds, "Not enough funds"); // layoutHome(); return; } uint64_t fee = to_spend - spending; uint32_t tx_est_size = transactionEstimateSizeKb(inputs_count, outputs_count); if (fee > (uint64_t)tx_est_size * coin->maxfee_kb) { // layoutFeeOverThreshold(coin, fee, tx_est_size); // if (!protectButton(ButtonRequestType_ButtonRequest_FeeOverThreshold, false)) { // fsm_sendFailure(FailureType_Failure_ActionCancelled, "Fee over threshold. Signing cancelled."); // layoutHome(); // return; // } } // last confirmation // layoutConfirmTx(coin, to_spend - change_spend - fee, fee); // if (!protectButton(ButtonRequestType_ButtonRequest_SignTx, false)) { // fsm_sendFailure(FailureType_Failure_ActionCancelled, "Signing cancelled by user"); // signing_abort(); // return; // } send_req_4_output(); } } return; case STAGE_REQUEST_4_OUTPUT: // layoutProgress("Signing", 1000 * progress / progress_total, progress); progress++; if (compile_output(coin, root, tx->outputs, &bin_output, false) <= 0) { // fsm_sendFailure(FailureType_Failure_Other, "Failed to compile output"); signing_abort(); return; } resp.has_serialized = true; resp.serialized.has_serialized_tx = true; resp.serialized.serialized_tx.size = tx_serialize_output(&to, bin_output.amount, bin_output.script_pubkey.bytes, bin_output.script_pubkey.size, resp.serialized.serialized_tx.bytes); if (idx4o < outputs_count - 1) { idx4o++; send_req_4_output(); } else { send_req_finished(); signing_abort(); } return; } // fsm_sendFailure(FailureType_Failure_Other, "Signing error"); signing_abort(); } void signing_abort(void) { if (signing) { // layoutHome(); signing = false; } }
ohadcn/embbededCoin
signing.c
C
mit
12,925
/******************************************************************************* * * MIT License * * Copyright 2017-2021 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * *******************************************************************************/ #include <gtest/gtest.h> #include <Tensile/KernelArguments.hpp> #include <cstddef> using namespace Tensile; TEST(KernelArguments, Simple) { KernelArguments args(true); std::vector<float> array(5); struct { void* d; const void* c; const void* a; const void* b; int x; double y; float z; char t; size_t k; } ref; // Padding bytes would be left uninitialized in the struct but will be // zero-filled by the KernelArguments class. Set them to zero to prevent a // test failure. The cast to void* is to avoid the warning about potential // invalid floating point configurations. memset((void*)&ref, 0, sizeof(ref)); ref.d = array.data(); ref.c = array.data() + 1; ref.a = array.data() + 2; ref.b = array.data() + 3; ref.x = 23; ref.y = 90.2; ref.z = 16.0f; ref.t = 'w'; ref.k = std::numeric_limits<size_t>::max(); args.append("d", ref.d); args.append("c", ref.c); args.append("a", ref.a); args.append("b", ref.b); args.append("x", ref.x); args.append("y", ref.y); args.append("z", ref.z); args.append("t", ref.t); args.append("k", ref.k); EXPECT_EQ(args.size(), sizeof(ref)); std::vector<uint8_t> reference(sizeof(ref), 0); memcpy(reference.data(), &ref, sizeof(ref)); std::vector<uint8_t> result(args.size()); memcpy(result.data(), args.data(), args.size()); EXPECT_EQ(result.size(), reference.size()); for(int i = 0; i < std::min(result.size(), reference.size()); i++) { EXPECT_EQ(static_cast<uint32_t>(result[i]), static_cast<uint32_t>(reference[i])) << "(" << i << ")"; } // std::cout << args << std::endl; } TEST(KernelArguments, Binding) { KernelArguments args(true); std::vector<float> array(5); struct { void* d; const void* c; const void* a; const void* b; int x; double y; float z; char t; size_t k; } ref; // Padding bytes would be left uninitialized in the struct but will be // zero-filled by the KernelArguments class. Set them to zero to prevent a // test failure. The cast to void* is to avoid the warning about potential // invalid floating point configurations. memset((void*)&ref, 0, sizeof(ref)); ref.d = array.data(); ref.c = array.data() + 1; ref.a = array.data() + 2; ref.b = array.data() + 3; ref.x = 23; ref.y = 90.2; ref.z = 16.0f; ref.t = 'w'; ref.k = std::numeric_limits<size_t>::max(); args.append("d", ref.d); args.append("c", ref.c); args.append("a", ref.a); args.append("b", ref.b); args.appendUnbound<int>("x"); args.append("y", ref.y); args.append("z", ref.z); args.append("t", ref.t); args.append("k", ref.k); EXPECT_EQ(args.size(), sizeof(ref)); // std::cout << args << std::endl; EXPECT_THROW(args.data(), std::runtime_error); args.bind("x", ref.x); std::vector<uint8_t> reference(sizeof(ref), 0); memcpy(reference.data(), &ref, sizeof(ref)); std::vector<uint8_t> result(args.size()); memcpy(result.data(), args.data(), args.size()); EXPECT_EQ(result.size(), reference.size()); for(int i = 0; i < std::min(result.size(), reference.size()); i++) { EXPECT_EQ(static_cast<uint32_t>(result[i]), static_cast<uint32_t>(reference[i])) << "(" << i << ")"; } // std::cout << args << std::endl; } TEST(KernelArguments, Iterator) { // Quick test for required m_log { KernelArguments args(false); EXPECT_THROW(args.begin(), std::runtime_error); } KernelArguments args(true); std::vector<float> array(5); struct RefT { void* d; const void* c; const void* a; const void* b; int x; double y; float z; char t; size_t k; bool operator==(RefT const& other) const { return d == other.d && c == other.c && a == other.a && b == other.b && x == other.x && y == other.y && z == other.z && t == other.t && k == other.k; } } ref; ref.d = array.data(); ref.c = array.data() + 1; ref.a = array.data() + 2; ref.b = array.data() + 3; ref.x = 23; ref.y = 90.2; ref.z = 16.0f; ref.t = 'w'; ref.k = std::numeric_limits<size_t>::max(); args.append("d", ref.d); args.append("c", ref.c); args.append("a", ref.a); args.append("b", ref.b); args.append("x", ref.x); args.append("y", ref.y); args.append("z", ref.z); args.append("t", ref.t); args.append("k", ref.k); EXPECT_EQ(args.size(), sizeof(ref)); // Check range based-iterator for(auto arg : args) { EXPECT_NE(arg.first, nullptr); EXPECT_NE(arg.second, 0); } auto begin = args.begin(); auto end = args.end(); // End EXPECT_NE(begin, end); EXPECT_EQ(end->first, nullptr); EXPECT_EQ(end->second, 0); // Pre and post fix operators auto postInc = begin++; EXPECT_NE(postInc, begin); EXPECT_EQ(postInc, args.begin()); auto preInc = ++postInc; EXPECT_EQ(preInc, begin); EXPECT_EQ(preInc, postInc); // Test logical order auto testIt = args.begin(); RefT reconstruct = { static_cast<void*>(testIt++), // d static_cast<void const*>(testIt++), // c static_cast<void const*>(testIt++), // a static_cast<void const*>(testIt++), // b static_cast<int>(testIt++), // x static_cast<double>(testIt++), // y static_cast<float>(testIt++), // z static_cast<char>(testIt++), // t static_cast<size_t>(testIt++) // k }; EXPECT_EQ(ref, reconstruct); EXPECT_EQ(testIt, end); // Test throws testIt.reset(); EXPECT_EQ(testIt, args.begin()); EXPECT_THROW(auto a = static_cast<char>(testIt), std::bad_cast); }
ROCmSoftwarePlatform/Tensile
HostLibraryTests/KernelArguments_test.cpp
C++
mit
7,393
# frozen_string_literal: true require 'spec_helper' describe Svelte::RestClient do let(:test_url) { 'http://example.com/' } let(:verb) { :get } let(:error_message) { 'This is an error message' } it 'should return an http response' do stub_request(verb, test_url) .to_return(status: 404, body: '', headers: {}) expect(described_class.call(verb: verb, url: test_url)) .to be_an_instance_of(Faraday::Response) end context 'when the remote service is very slow' do before do stub_request(verb, test_url) .to_raise(Faraday::TimeoutError.new(error_message)) end it 'returns a svelte error to indicate a timeout' do expect { described_class.call(verb: verb, url: test_url) } .to raise_error(Svelte::HTTPError, error_message) end end context 'when the remote service is not responding' do before do stub_request(verb, test_url) .to_raise(Faraday::ConnectionFailed.new(error_message)) end it 'returns a svelte error to indicate an http error' do expect { described_class.call(verb: verb, url: test_url) } .to raise_error(Svelte::HTTPError, error_message) end end context 'when the resource is not found' do before do stub_request(verb, test_url) .to_raise(Faraday::ResourceNotFound.new(error_message)) end it 'returns a svelte error to indicate a timeout' do expect { described_class.call(verb: verb, url: test_url) } .to raise_error(Svelte::HTTPError, error_message) end end context 'when passing a timeout option' do let(:options) { { timeout: timeout } } let(:timeout) { 5 } it 'sets up a timeout option on the request' do stub_request(verb, test_url) .to_return(status: 404, body: '', headers: {}) expect(described_class.call(verb: verb, url: test_url, options: options) .env.request.timeout) .to eq(timeout) end end end
notonthehighstreet/svelte
spec/lib/svelte/rest_client_spec.rb
Ruby
mit
2,027
import _curry3 from './internal/_curry3'; /** * `o` is a curried composition function that returns a unary function. * Like [`compose`](#compose), `o` performs right-to-left function composition. * Unlike [`compose`](#compose), the rightmost function passed to `o` will be * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is * limited to accepting only 2 unary functions. The name o was chosen because * of its similarity to the mathematical composition operator ∘. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (b -> c) -> (a -> b) -> a -> c * @param {Function} f * @param {Function} g * @return {Function} * @see R.compose, R.pipe * @example * * var classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last * var yellGreeting = R.o(R.toUpper, classyGreeting); * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" * * R.o(R.multiply(10), R.add(10))(-4) //=> 60 * * @symb R.o(f, g, x) = f(g(x)) */ var o = _curry3(function o(f, g, x) { return f(g(x)); }); export default o;
paldepind/ramda
source/o.js
JavaScript
mit
1,136
package fr.dopse.maildump.model; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; /** * Created by fr27a86n on 11/04/2017. */ @Entity @Table(name = "RECIPIENT") public class RecipientEntity implements Serializable { @Id @GeneratedValue private Long id; private String email; private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RecipientEntity that = (RecipientEntity) o; if (id != null ? !id.equals(that.id) : that.id != null) return false; if (email != null ? !email.equals(that.email) : that.email != null) return false; return name != null ? name.equals(that.name) : that.name == null; } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); return result; } }
dopse/maildump
src/main/java/fr/dopse/maildump/model/RecipientEntity.java
Java
mit
1,485
<?php /** * */ class Cprendascortadas extends CI_Controller { function __construct() { parent::__construct(); $this->load->model('Mpedidos'); } public function index(){ $nombres['nombres']=$this->session->userdata('nombres'); $this->load->view('layou/header',$nombres); $this->load->view('layou/menu',$nombres); $this->load->view('vlistaconfeccion'); $this->load->view('layou/footer'); } public function listacortes(){ $res=$this->Mpedidos->listacortes(); echo json_encode($res); } } ?>
javis920320/creaciones
application/controllers/Cprendascortadas.php
PHP
mit
550
class Solution { public List<String> addOperators(String num, int target) { List<String> results = new LinkedList<>(); if (num == null || num.length() == 0) { return results; } this.dfs(0, num, (long) target, 0l, 0l, new StringBuilder(), results); return results; } private void dfs(int index, String num, long target, long previous, long multi, StringBuilder sb, List<String> results) { if (index >= num.length()) { if (target == 0) { results.add(sb.toString()); } return; } for (int i = index; i < num.length(); i++) { if (num.charAt(index) == '0' && i > index) { break; } long number = Long.parseLong(num.substring(index, i + 1)); StringBuilder sb1 = new StringBuilder(sb); if (sb1.length() > 0) { sb1.append("+"); } sb1.append(number); this.dfs(i + 1, num, target - number, number, number, sb1, results); if (sb.length() > 0) { sb1 = new StringBuilder(sb); sb1.append("-").append(number); this.dfs(i + 1, num, target + number, -number, -number, sb1, results); sb1 = new StringBuilder(sb); sb1.append("*").append(number); long newNum = multi * number; this.dfs(i + 1, num, target + multi - newNum, number, newNum, sb1, results); } } } }
FeiZhan/Algo-Collection
answers/leetcode/Expression Add Operators/Expression Add Operators.java
Java
mit
1,571
module RestArea VERSION = "2.4.3" end
bguest/rest_area
lib/rest_area/version.rb
Ruby
mit
40
--- layout: post title: Python 환율 계산 Forex 라이브러리 알아보기 --- 오늘은 Python에서 환율을 계산할 수 있는 라이브러리인 Forex 패키지에 대하여 간단히 알아보려 합니다. ## Forex 설치 우선 virtualenv로 파이썬 환경을 분리해줍니다. ``` pip3 install virtualenv ``` ``` virtualenv -mvenv env ``` env라는 이름의 가상 환경을 생성합니다. ``` source env/bin/activate ``` 가상환경을 폴더에서 활성화합니다. ``` pip3 install --upgrade pip ``` pip의 업그레이드가 존재하는지 확인하고 진행합니다. ``` pip install forex-python ``` pip로 Forex를 설치합니다. ## 환율 예제 ```python import datetime from forex_python.converter import CurrencyRates from forex_python.converter import CurrencyCodes ``` forex_python과 datetime을 가져옵니다. ```python c = CurrencyRates() usd = c.get_rates('USD') print(usd) krw = c.get_rates('KRW') print(krw) ``` CurrencyRates 객체로 각 화폐 단위에 따른 환율을 구할 수 있습니다. ```python c = CurrencyRates() usd_krw = c.get_rates('USD')['KRW'] print(usd_krw) krw_usd = c.get_rates('KRW')['USD'] print(krw_usd) ``` 딕셔너리의 형태로 되어 있기 때문에 각각의 환율에 접근할 수 있습니다. ```python date = datetime.datetime(2018, 5, 5, 18, 0, 0, 151012) c = CurrencyRates() print(c.get_rates('USD', date)['KRW']) ``` 특정 날짜의 환율을 확인할 수 있습니다. ```python c = CurrencyRates() usd_to_krw = c.get_rate('USD', 'KRW') print(usd_to_krw) ``` 딕셔너리처럼 접근하는 것처럼 인자를 추가하여 알아낼 수 있습니다. ```python date = datetime.datetime(2018, 5, 5, 18, 0, 0, 151012) c = CurrencyRates() print(c.get_rate('USD','KRW', date)) ``` 특정 날짜의 지정한 화폐의 환율도 알 수 있습니다. ```python c = CurrencyRates() con = c.convert('USD', 'KRW', 100) print(con) ``` 100달러에 대한 원화를 환전한 금액을 출력할 수 있습니다. ```python date = datetime.datetime(2018, 5, 5, 18, 0, 0, 151012) c = CurrencyRates() print(c.convert('USD','KRW',100, date)) ``` 이전의 특정 날짜에 대해 100달러를 원화로 환전한 금액을 출력할 수 있습니다. ```python c = CurrencyCodes() sb = c.get_symbol('KRW') print(sb) ``` 원화의 기호를 출력할 수 있습니다.
minwook-shin/minwook-shin.github.com
_posts/2019-05-06-python-foreign-exchange-rates-using-forex.md
Markdown
mit
2,385
using System; using System.Threading; using System.Threading.Tasks; namespace GettingBackTheFreeLunch { class Program { static void Main() { Console.WriteLine($"Number of logical processor: {Environment.ProcessorCount}"); for (int concurrencyLevel = 1; concurrencyLevel <= Environment.ProcessorCount; ++concurrencyLevel) { const int timeInterval = 1000 * 10; long largetPrimeNumber = FindLargestPrimeNumberInTime(concurrencyLevel, timeInterval); Console.WriteLine("Result: {0} in {1} seconds using {2} logical processors", largetPrimeNumber, timeInterval / 1000, concurrencyLevel); } } static bool IsPrime(long number, long tickCountLimit) { if ((number & 1) == 0) return false; var limit = Math.Sqrt(number); for (long n = 3; n <= limit; n += 2) { if ((number % n == 0) || (Environment.TickCount > tickCountLimit)) return false; } return true; } private static long FindLargestPrimeNumberInTime(int concurrencyLevel, long timeInterval) { var parallelOption = new ParallelOptions { MaxDegreeOfParallelism = concurrencyLevel }; long dueTime = Environment.TickCount + timeInterval; var maxPrime = new ReductionVariable<long>(() => 3); const long slice = 8192; for (long range = 3; range < long.MaxValue; range += slice) { Parallel.For(range, range + slice, parallelOption, (n, loopState) => { if (loopState.IsStopped) return; if (IsPrime(n, dueTime)) maxPrime.Value = Math.Max(maxPrime.Value, n); if (Environment.TickCount > dueTime) loopState.Stop(); }); if (Environment.TickCount > dueTime) break; } long result = maxPrime.Reduce(Math.Max); return result; } } }
alonf/DevGeekWeek2016
DevGeekWeek2016Demos/TPL/GettingBackTheFreeLunch/Program.cs
C#
mit
2,722
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./10d2800d86b45f1d5406352d02c98b5fbb36e5d286e17081f0dd1791b32b17f4.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
simonmysun/praxis
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/8528105f5423529d5649326168b9b2b0369c23c88b635d46a5ac3e0dfb7c4c68.html
HTML
mit
550
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>18 --> 19</title> <link href="./../../assets/style.css" rel="stylesheet"> </head> <body> <h2>You have to be fast</h2> <a href="./6bf0a09c900b2ff17a0e51390b2e842f3db0fba2f4be7aad840d3a074919b07a.html">Teleport</a> <hr> <a href="./../../about.md">About</a> (Spoilers! ) <script src="./../../assets/md5.js"></script> <script> window.currentLevel = 7; </script> <script src="./../../assets/script.js"></script> </body> </html>
simonmysun/praxis
TAIHAO2019/pub/SmallGame/AsFastAsYouCan2/8a9a0c9b9fc17b874b7b4a3ba7271ba30c17a38742562dd1830ae732a5b628c5.html
HTML
mit
550
namespace YanZhiwei.DotNet.Core.WebApi { using System; using YanZhiwei.DotNet2.Utilities.Common; using YanZhiwei.DotNet2.Utilities.Encryptor; using YanZhiwei.DotNet2.Utilities.Result; /// <summary> /// WebApi 签名辅助类 /// </summary> public sealed class SignatureHelper { #region Methods /// <summary> /// 生成签名字符串 /// </summary> /// <param name="appSecret">签名加密键</param> /// <param name="timestamp">时间戳</param> /// <param name="nonce">随机数</param> public static string Create(string appSecret, string timestamp, string nonce) { string[] _array = { appSecret, timestamp, nonce }; Array.Sort(_array); string _signatureString = string.Join("", _array); _signatureString = MD5Encryptor.Encrypt(_signatureString); return _signatureString; } /// <summary> /// 验证WebApi签名 /// </summary> /// <param name="signature">签名</param> /// <param name="timestamp">时间戳</param> /// <param name="nonce">随机数</param> /// <param name="appSecret">签名加密键</param> /// <param name="signatureExpiredMinutes">签名过期分钟</param> /// <returns>CheckResult</returns> internal static CheckResult Validate(string signature, string timestamp, string nonce, string appSecret, int signatureExpiredMinutes) { string[] _arrayParamter = { appSecret, timestamp, nonce }; Array.Sort(_arrayParamter); string _signatureString = string.Join("", _arrayParamter); _signatureString = MD5Encryptor.Encrypt(_signatureString); if (signature.CompareIgnoreCase(_signatureString) && CheckHelper.IsNumber(timestamp)) { DateTime _timestampMillis = UnixEpochHelper.DateTimeFromUnixTimestampMillis(timestamp.ToDoubleOrDefault(0f)); double _minutes = DateTime.UtcNow.Subtract(_timestampMillis).TotalMinutes; if (_minutes > signatureExpiredMinutes) { return CheckResult.Fail("签名时间戳失效"); } } return CheckResult.Success(); } #endregion Methods } }
YanZhiwei/DotNet.Utilities
YanZhiwei.DotNet.Core.WebApi/SignatureHelper.cs
C#
mit
2,391
<html ng-app="tabsTest"> <head> <meta charset="utf-8"> <title>Tab Bars</title> <meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="../../../../dist/css/ionic.css"> <style> .fade-out > .ng-enter, .fade-out > .ng-leave, .fade-out > .ng-move { -webkit-transition: 0.2s linear all; transition: 0.4s ease-out all; position:relative; } .fade-out > .ng-enter { left:-10px; opacity:0; } .fade-out > .ng-enter.ng-enter-active { left:0; opacity:1; } .fade-out > .ng-leave { left:0; opacity:1; } .fade-out > .ng-leave.ng-leave-active { left:-10px; opacity:0; } .fade-out > .ng-move { opacity:0.5; } .fade-out > .ng-move.ng-move-active { opacity:1; } .completed { text-decoration: line-through; } </style> <script src="../../../../dist/js/ionic.js"></script> <script src="../../../../dist/js/angular/angular.js"></script> <script src="../../../../dist/js/angular/angular-animate.js"></script> <script src="../../../../dist/js/angular/angular-route.js"></script> <script src="../../../../dist/js/angular/angular-touch.js"></script> <script src="../../../../dist/js/angular/angular-sanitize.js"></script> <script src="../../../../dist/js/ionic-angular.js"></script> </head> <body ng-controller="RootCtrl"> <tabs animation="fade-in-out" tabs-type="tabs-icon-only" tabs-style="tabs-positive" controller-changed="onControllerChanged(oldController, oldIndex, newController, newIndex)"> <tab title="Home" icon-on="icon ion-ios7-filing" icon-off="icon ion-ios7-filing-outline" ng-controller="HomeCtrl"> <header class="bar bar-header bar-positive"> <button class="button button-clear button-primary" ng-click="newTask()">New</button> <h1 class="title">Tasks</h1> <button class="button button-clear button-primary" ng-click="isEditingItems = !isEditingItems">Edit</button> </header> <content has-header="true" has-tabs="true" on-refresh="onRefresh()"> <refresher></refresher> <list scroll="false" on-refresh="onRefresh()" on-reorder="onReorder(el, start, end)" is-editing="isEditingItems" animation="fade-out" delete-icon="icon ion-minus-circled" reorder-icon="icon ion-navicon"> <item ng-repeat="item in items" item="item" buttons="item.buttons" can-delete="true" can-reorder="true" can-swipe="true" on-delete="deleteItem(item)" ng-class="{completed: item.isCompleted}" > {{item.title}} <i class="{{item.icon}}"></i> </list-item> </list> </content> </tab> <tab title="About" icon-on="icon ion-ios7-clock" icon-off="icon ion-ios7-clock-outline"> <header class="bar bar-header bar-positive"> <h1 class="title">Deadlines</h1> </header> <content has-header="true"> <h1>Deadlines</h1> </content> </tab> <tab title="Settings" icon-on="icon ion-ios7-gear" icon-off="icon ion-ios7-gear-outline"> <header class="bar bar-header bar-positive"> <h1 class="title">Settings</h1> </header> <content has-header="true"> <h1>Settings</h1> </content> </tab> <tab title="Settings" icon-on="icon ion-ios7-gear" icon-off="icon ion-ios7-gear-outline"> <header class="bar bar-header bar-positive"> <h1 class="title">Settings</h1> </header> <content has-header="true"> <h1>Settings</h1> </content> </tab> <tab title="Settings" icon-on="icon ion-ios7-gear" icon-off="icon ion-ios7-gear-outline"> <header class="bar bar-header bar-positive"> <h1 class="title">Settings</h1> </header> <content has-header="true"> <h1>Settings</h1> </content> </tab> </tabs> <script id="newTask.html" type="text/ng-template"> <div id="task-view" class="modal slide-in-up" ng-controller="TaskCtrl"> <header class="bar bar-header bar-secondary"> <h1 class="title">New Task</h1> <button class="button button-clear button-primary" ng-click="close()">Done</button> </header> <main class="content padding has-header"> <input type="text" placeholder="I need to do this..."> </main> </div> </script> <script> angular.module('tabsTest', ['ionic']) .controller('RootCtrl', function($scope) { $scope.onControllerChanged = function(oldController, oldIndex, newController, newIndex) { console.log('Controller changed', oldController, oldIndex, newController, newIndex); console.log(arguments); }; }) .controller('HomeCtrl', function($scope, $timeout, Modal, ActionSheet) { $scope.items = []; Modal.fromTemplateUrl('newTask.html', function(modal) { $scope.settingsModal = modal; }); var removeItem = function(item, button) { ActionSheet.show({ buttons: [], destructiveText: 'Delete Task', cancelText: 'Cancel', cancel: function() { return true; }, destructiveButtonClicked: function() { $scope.items.splice($scope.items.indexOf(item), 1); return true; } }); }; var completeItem = function(item, button) { item.isCompleted = true; }; $scope.onReorder = function(el, start, end) { ionic.Utils.arrayMove($scope.items, start, end); }; $scope.onRefresh = function() { console.log('ON REFRESH'); $timeout(function() { $scope.$broadcast('scroll.refreshComplete'); }, 1000); } $scope.removeItem = function(item) { removeItem(item); }; $scope.newTask = function() { $scope.settingsModal.show(); }; // Create the items for(var i = 0; i < 25; i++) { $scope.items.push({ title: 'Task ' + (i + 1), buttons: [{ text: 'Done', type: 'button-success', onButtonClicked: completeItem, }, { text: 'Delete', type: 'button-danger', onButtonClicked: removeItem, }] }); } }) .controller('TaskCtrl', function($scope) { $scope.close = function() { $scope.modal.hide(); } }); </script> </body> </html>
Web5design/ionic
js/ext/angular/test/tabs.html
HTML
mit
6,973
/* * The MIT License (MIT) * * Copyright (c) 2014-2015 Christian Schudt * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package rocks.xmpp.extensions.muc; import org.testng.Assert; import org.testng.annotations.Test; import rocks.xmpp.core.XmlTest; import rocks.xmpp.core.stanza.model.Presence; import rocks.xmpp.core.stanza.model.client.ClientPresence; import rocks.xmpp.extensions.muc.model.Affiliation; import rocks.xmpp.extensions.muc.model.DiscussionHistory; import rocks.xmpp.extensions.muc.model.Muc; import rocks.xmpp.extensions.muc.model.Role; import javax.xml.bind.JAXBException; import javax.xml.stream.XMLStreamException; import java.time.Instant; /** * @author Christian Schudt */ public class MultiUserChatTest extends XmlTest { protected MultiUserChatTest() throws JAXBException, XMLStreamException { super(ClientPresence.class, Muc.class); } @Test public void testEnterRoom() throws JAXBException, XMLStreamException { Presence presence = new Presence(); presence.addExtension(Muc.empty()); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"></x></presence>"); } @Test public void testEnterRoomWithPassword() throws JAXBException, XMLStreamException { Presence presence = new Presence(); presence.addExtension(Muc.withPassword("cauldronburn")); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><password>cauldronburn</password></x></presence>"); } @Test public void testEnterRoomWithHistoryMaxChars() throws JAXBException, XMLStreamException { Presence presence = new Presence(); presence.addExtension(Muc.withHistory(DiscussionHistory.forMaxChars(65000))); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history maxchars=\"65000\"></history></x></presence>"); } @Test public void testEnterRoomWithHistoryMaxStanzas() throws JAXBException, XMLStreamException { Presence presence = new Presence(); presence.addExtension(Muc.withHistory(DiscussionHistory.forMaxMessages(20))); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history maxstanzas=\"20\"></history></x></presence>"); } @Test public void testEnterRoomWithHistorySeconds() throws JAXBException, XMLStreamException { Presence presence = new Presence(); presence.addExtension(Muc.withHistory(DiscussionHistory.forSeconds(180))); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history seconds=\"180\"></history></x></presence>"); } @Test public void testEnterRoomWithHistorySince() throws JAXBException, XMLStreamException { Instant now = Instant.now(); Presence presence = new Presence(); presence.addExtension(Muc.withHistory(DiscussionHistory.since(now))); String xml = marshal(presence); Assert.assertEquals(xml, "<presence><x xmlns=\"http://jabber.org/protocol/muc\"><history since=\"" + now.toString() + "\"></history></x></presence>"); } @Test public void testAffiliation() { Assert.assertTrue(Affiliation.OWNER.isHigherThan(Affiliation.ADMIN)); Assert.assertTrue(Affiliation.OWNER.isHigherThan(Affiliation.MEMBER)); Assert.assertTrue(Affiliation.ADMIN.isHigherThan(Affiliation.MEMBER)); Assert.assertTrue(Affiliation.MEMBER.isHigherThan(Affiliation.NONE)); Assert.assertTrue(Affiliation.NONE.isHigherThan(Affiliation.OUTCAST)); } @Test public void testRole() { Assert.assertTrue(Role.MODERATOR.isHigherThan(Role.PARTICIPANT)); Assert.assertTrue(Role.PARTICIPANT.isHigherThan(Role.VISITOR)); Assert.assertTrue(Role.VISITOR.isHigherThan(Role.NONE)); } }
jeozey/XmppServerTester
xmpp-extensions/src/test/java/rocks/xmpp/extensions/muc/MultiUserChatTest.java
Java
mit
5,192
<?php /* * This file is part of the Persian Framework. * * (c) Farhad Zandmoghadam <farhad.pd@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Core\MVC; use Core\PF\Lib\Database\Adapter; class BaseModel { /** * Database connection resource * * @var Object */ protected $database; public function __construct() { $this->database = Adapter::getInstance()->connect('model'); } }
zandfarhad/PF1
core/framework/src/Illuminate/Model/Model.php
PHP
mit
504
/* The MIT License (MIT) Copyright (c) 2015 Sebastian Schöner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ using System; using System.Reflection; using System.Runtime.InteropServices; using UnityEngine; namespace FineRoadHeights { /// <summary> /// Helper class to deal with detours. This version is for Unity 5 x64 on Windows. /// We provide three different methods of detouring. /// </summary> public static class RedirectionHelper { // Note: These two DllImports are really only used in the alternative methods // for detouring. [DllImport("mono.dll", CallingConvention = CallingConvention.FastCall, EntryPoint = "mono_domain_get")] private static extern IntPtr mono_domain_get(); [DllImport("mono.dll", CallingConvention = CallingConvention.FastCall, EntryPoint = "mono_method_get_header")] private static extern IntPtr mono_method_get_header(IntPtr method); /// <summary> /// Redirects all calls from method 'from' to method 'to'. /// </summary> /// <param name="from"></param> /// <param name="to"></param> public static void RedirectCalls(MethodInfo from, MethodInfo to) { // GetFunctionPointer enforces compilation of the method. var fptr1 = from.MethodHandle.GetFunctionPointer(); var fptr2 = to.MethodHandle.GetFunctionPointer(); Debug.Log("Patching from " + fptr1 + " to " + fptr2); PatchJumpTo(fptr1, fptr2); // We could also use: //RedirectCall(from, to); } /// <summary> /// Redirects all calls from method 'from' to method 'to'. This version works /// only if the 'from' method has already been compiled (use GetFunctionPointer to force /// this) but no function calling 'from' have already been compiled. In fact, this /// function forces compilation for 'to' and 'from'. 'to' and 'from' are assumed /// to be normal methods. /// After compilation, this method looks up the MonoJitInfo structs for both methods /// from domain->jit_info_hash and patches sets the pointer to native code to the code /// obtained from compiling 'to'. /// </summary> /// <param name="from"></param> /// <param name="to"></param> private static void RedirectCall(MethodInfo from, MethodInfo to) { /* We assume that we are only dealing with 'normal' functions (in Mono lingua). * This excludes in particular: * - generic functions * - PInvokes * - methods built at runtime */ IntPtr methodPtr1 = from.MethodHandle.Value; IntPtr methodPtr2 = to.MethodHandle.Value; // ensure that both methods are compiled from.MethodHandle.GetFunctionPointer(); to.MethodHandle.GetFunctionPointer(); // get domain->jit_code_hash IntPtr domain = mono_domain_get(); unsafe { byte* jitCodeHash = ((byte*)domain.ToPointer() + 0xE8); long** jitCodeHashTable = *(long***)(jitCodeHash + 0x20); uint tableSize = *(uint*)(jitCodeHash + 0x18); void* jitInfoFrom = null, jitInfoTo = null; // imitate the behavior of mono_internal_hash_table_lookup to get both MonoJitInfo ptrs long mptr1 = methodPtr1.ToInt64(); uint index1 = ((uint)mptr1) >> 3; for (long* value = jitCodeHashTable[index1 % tableSize]; value != null; value = *(long**)(value + 1)) { if (mptr1 == *value) { jitInfoFrom = value; break; } } long mptr2 = methodPtr2.ToInt64(); uint index2 = ((uint)mptr2) >> 3; for (long* value = jitCodeHashTable[index2 % tableSize]; value != null; value = *(long**)(value + 1)) { if (mptr2 == *value) { jitInfoTo = value; break; } } if (jitInfoFrom == null || jitInfoTo == null) { Debug.Log("Could not find methods"); return; } // copy over code_start, used_regs, code_size and ignore the rest for now. // code_start beings at +0x10, code_size goes til +0x20 ulong* fromPtr, toPtr; fromPtr = (ulong*)jitInfoFrom; toPtr = (ulong*)jitInfoTo; *(fromPtr + 2) = *(toPtr + 2); *(fromPtr + 3) = *(toPtr + 3); } } /// <summary> /// Primitive patching. Inserts a jump to 'target' at 'site'. Works even if both methods' /// callers have already been compiled. /// </summary> /// <param name="site"></param> /// <param name="target"></param> private static void PatchJumpTo(IntPtr site, IntPtr target) { // R11 is volatile. unsafe { byte* sitePtr = (byte*)site.ToPointer(); *sitePtr = 0x49; // mov r11, target *(sitePtr + 1) = 0xBB; *((ulong*)(sitePtr + 2)) = (ulong)target.ToInt64(); *(sitePtr + 10) = 0x41; // jmp r11 *(sitePtr + 11) = 0xFF; *(sitePtr + 12) = 0xE3; } } /// <summary> /// Redirects calls on MSIL level. Note that this does not work over assembly /// boundaries, severly limiting the uses of this approach. /// The main problem is that IL uses tokens to identify methods. These tokens /// are bound to methods in the assembly metadata. In order to add calls to /// completely new methods (i.e. from external assemblies), one must thus /// edit the metadata. This method does not do this and only works for /// normal methods. /// </summary> /// <param name="from"></param> /// <param name="to"></param> private static void RedirectCallIL(MethodInfo from, MethodInfo to) { /* We assume that we are only dealing with 'normal' functions (in Mono lingo). * This excludes in particular: * - generic functions * - PInvokes * - methods built at runtime */ IntPtr methodPtr1 = from.MethodHandle.Value; IntPtr methodPtr2 = to.MethodHandle.Value; // this ensures that the header of our 'to' method is loaded mono_method_get_header(methodPtr2); unsafe { byte* monoMethod1 = (byte*)methodPtr1.ToPointer(); byte* monoMethod2 = (byte*)methodPtr2.ToPointer(); /* * Normal methods have this setup: * struct _MonoMethodNormal { MonoMethod method; MonoMethodHeader *header; }; * For the x64 version of Unity, this has a size of 56 bytes. We will simply * change the method header pointer, which lives at +40. */ *((IntPtr*)(monoMethod1 + 40)) = *((IntPtr*)(monoMethod2 + 40)); // replace header ptr } } public static void RedirectCalls(Type from, Type to, string methodName, bool privateVar) { var srcMethod = privateVar ? from.GetMethod (methodName, BindingFlags.NonPublic | BindingFlags.Instance) : from.GetMethod (methodName); var destMethod = to.GetMethod (methodName); RedirectCalls(srcMethod, destMethod); } public static void RedirectCalls(Type from, Type to, string methodName, Type[] types, bool privateVar) { var srcMethod = privateVar ? from.GetMethod (methodName, BindingFlags.NonPublic | BindingFlags.Instance, null, types, null) : from.GetMethod (methodName, types); var destMethod = to.GetMethod (methodName, types); RedirectCalls(srcMethod, destMethod); } } }
JapaMala/Skylines-FineRoadHeights
Detour branch/FineRoadHeights/RedirectionHelper.cs
C#
mit
8,095
/* *-------------------------------------------------------------------- * jQuery-Plugin "lookupreferer -config.js-" * Version: 3.0 * Copyright (c) 2018 TIS * * Released under the MIT License. * http://tis2010.jp/license.txt * ------------------------------------------------------------------- */ jQuery.noConflict(); (function($,PLUGIN_ID){ "use strict"; var vars={ fieldtable:null, fieldinfos:{} }; var functions={ fieldsort:function(layout){ var codes=[]; $.each(layout,function(index,values){ switch (values.type) { case 'ROW': $.each(values.fields,function(index,values){ /* exclude spacer */ if (!values.elementId) codes.push(values.code); }); break; case 'GROUP': $.merge(codes,functions.fieldsort(values.layout)); break; case 'SUBTABLE': $.each(values.fields,function(index,values){ /* exclude spacer */ if (!values.elementId) codes.push(values.code); }); break; } }); return codes; } }; /*--------------------------------------------------------------- initialize fields ---------------------------------------------------------------*/ kintone.api(kintone.api.url('/k/v1/app/form/layout',true),'GET',{app:kintone.app.getId()},function(resp){ var sorted=functions.fieldsort(resp.layout); /* get fieldinfo */ kintone.api(kintone.api.url('/k/v1/app/form/fields',true),'GET',{app:kintone.app.getId()},function(resp){ var config=kintone.plugin.app.getConfig(PLUGIN_ID); vars.fieldinfos=$.fieldparallelize(resp.properties); $.each(sorted,function(index){ if (sorted[index] in vars.fieldinfos) { var fieldinfo=vars.fieldinfos[sorted[index]]; if (fieldinfo.lookup) $('select#field').append($('<option>').attr('value',fieldinfo.code).text(fieldinfo.label)); } }); /* initialize valiable */ vars.fieldtable=$('.fields').adjustabletable({ add:'img.add', del:'img.del' }); var add=false; var fields=[]; if (Object.keys(config).length!==0) { fields=JSON.parse(config['fields']); for (var i=0;i<fields.length;i++) { if (add) vars.fieldtable.addrow(); else add=true; $('select#field',vars.fieldtable.rows.last()).val(fields[i]); } } },function(error){}); },function(error){}); /*--------------------------------------------------------------- button events ---------------------------------------------------------------*/ $('button#submit').on('click',function(e){ var row=null; var config=[]; var fields=[]; /* check values */ for (var i=0;i<vars.fieldtable.rows.length;i++) { row=vars.fieldtable.rows.eq(i); if ($('select#field',row).val().length==0) continue; fields.push($('select#field',row).val()); } if (fields.length==0) { swal('Error!','ルックアップアプリ表示フィールドは1つ以上指定して下さい。','error'); return; } /* setup config */ config['fields']=JSON.stringify(fields); /* save config */ kintone.plugin.app.setConfig(config); }); $('button#cancel').on('click',function(e){ history.back(); }); })(jQuery,kintone.$PLUGIN_ID);
TIS2010/jslibs
kintone/plugins/lookupreferer/js/config.js
JavaScript
mit
3,267
#! /bin/bash if (($# > 1)) then echo "Usage: ${0##*/} [cscope-prefix]" fi if (($# == 1)) then NAME=$1 else NAME=cscope fi REPOSITORY=$(cat <CVS/Repository) if [ "${REPOSITORY##/}" = $REPOSITORY ] then # Make relative path absolute REPOSITORY=$(cat <CVS/Root)/$REPOSITORY fi if [ -z "$REPOSITORY" ] then echo 1>&2 "Not in a CVS subtree!" exit 1 fi (builtin cd $REPOSITORY; find . -name \*,v -print) | \ sed -e 's/,v$//' | sort -u > $NAME.files.cvs find . -follow \( -name '*.[chlyCGHLws]' -o -name '*.bp' -o \ -name '*.q[ch]' -o -name '*.sd' -o -name '*.mk' -o \ -name '[Mm]akefile' -o -name '*.cc' \) -print | \ sort -u > $NAME.files.local comm -12 $NAME.files.cvs $NAME.files.local >$NAME.files cscope -b -q -f $NAME.out -i $NAME.files
shindochan/bashenv
scripts/cvsmkcscope.bash
Shell
mit
751
<h2>My Heroes</h2> <div> <label>Hero name:</label> <input #heroName /> <button (click)="add(heroName.value); heroName.value=''"> Add </button> </div> <ul class="heroes"> <li *ngFor="let hero of heroes" [class.selected]="hero === selectedHero" (click)="onSelect(hero)"> <span class="badge">{{hero.id}}</span> {{hero.name}} <button class="delete" (click)="delete(hero); $event.stopPropagation()">x</button> </li> </ul> <my-hero-detail [hero]="selectedHero"></my-hero-detail> <div *ngIf="selectedHero"> <h2> {{selectedHero.name | uppercase}} is my hero </h2> <button (click)="gotoDetail()">View Details</button> </div>
prerial/angular2.nongo.myheroes
src/html/heroes.component.html
HTML
mit
672
class PagesController < ApplicationController before_action :build_referral, only: [:about] def about end end
raderj89/refcodes
app/controllers/pages_controller.rb
Ruby
mit
117
<?php include 'inc/array-to-csv.php'; if (!empty($_GET['json'])) { $json = $_GET['json']; echo '<pre>'; var_dump($json); echo '</pre>'; $data = json_decode($json,true); echo '<pre>'; var_dump($data); echo '</pre>'; str_putcsv($data); // Create an instace of the class $csv = new arrayToCsv(); // Convert array to csv (you probably want to create a file with this info) echo '<pre>'; echo $csv->convert($data); echo '</pre>'; } /** * Convert a multi-dimensional, associative array to CSV data * <a href="/param">@param</a> array $data the array of data * @return string CSV text */ function str_putcsv($data) { # Generate CSV data from array $fh = fopen('php://temp', 'rw'); # don't create a file, attempt # to use memory instead # write out the headers fputcsv($fh, array_keys(current($data))); # write out the data foreach ( $data as $row ) { fputcsv($fh, $row); } rewind($fh); $csv = stream_get_contents($fh); fclose($fh); return $csv; } ?>
simondahla/ab-test-calcu
app/csv.php
PHP
mit
1,129
#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test fee estimation code.""" from decimal import Decimal import random from test_framework.messages import CTransaction, CTxIn, CTxOut, COutPoint, ToHex, COIN from test_framework.script import CScript, OP_1, OP_DROP, OP_2, OP_HASH160, OP_EQUAL, hash160, OP_TRUE from test_framework.test_framework import DigiByteTestFramework from test_framework.util import ( assert_equal, assert_greater_than, assert_greater_than_or_equal, connect_nodes, satoshi_round, sync_blocks, sync_mempools, ) # Construct 2 trivial P2SH's and the ScriptSigs that spend them # So we can create many transactions without needing to spend # time signing. REDEEM_SCRIPT_1 = CScript([OP_1, OP_DROP]) REDEEM_SCRIPT_2 = CScript([OP_2, OP_DROP]) P2SH_1 = CScript([OP_HASH160, hash160(REDEEM_SCRIPT_1), OP_EQUAL]) P2SH_2 = CScript([OP_HASH160, hash160(REDEEM_SCRIPT_2), OP_EQUAL]) # Associated ScriptSig's to spend satisfy P2SH_1 and P2SH_2 SCRIPT_SIG = [CScript([OP_TRUE, REDEEM_SCRIPT_1]), CScript([OP_TRUE, REDEEM_SCRIPT_2])] def small_txpuzzle_randfee(from_node, conflist, unconflist, amount, min_fee, fee_increment): """Create and send a transaction with a random fee. The transaction pays to a trivial P2SH script, and assumes that its inputs are of the same form. The function takes a list of confirmed outputs and unconfirmed outputs and attempts to use the confirmed list first for its inputs. It adds the newly created outputs to the unconfirmed list. Returns (raw transaction, fee).""" # It's best to exponentially distribute our random fees # because the buckets are exponentially spaced. # Exponentially distributed from 1-128 * fee_increment rand_fee = float(fee_increment) * (1.1892 ** random.randint(0, 28)) # Total fee ranges from min_fee to min_fee + 127*fee_increment fee = min_fee - fee_increment + satoshi_round(rand_fee) tx = CTransaction() total_in = Decimal("0.00000000") while total_in <= (amount + fee) and len(conflist) > 0: t = conflist.pop(0) total_in += t["amount"] tx.vin.append(CTxIn(COutPoint(int(t["txid"], 16), t["vout"]), b"")) if total_in <= amount + fee: while total_in <= (amount + fee) and len(unconflist) > 0: t = unconflist.pop(0) total_in += t["amount"] tx.vin.append(CTxIn(COutPoint(int(t["txid"], 16), t["vout"]), b"")) if total_in <= amount + fee: raise RuntimeError("Insufficient funds: need %d, have %d" % (amount + fee, total_in)) tx.vout.append(CTxOut(int((total_in - amount - fee) * COIN), P2SH_1)) tx.vout.append(CTxOut(int(amount * COIN), P2SH_2)) # These transactions don't need to be signed, but we still have to insert # the ScriptSig that will satisfy the ScriptPubKey. for inp in tx.vin: inp.scriptSig = SCRIPT_SIG[inp.prevout.n] txid = from_node.sendrawtransaction(ToHex(tx), True) unconflist.append({"txid": txid, "vout": 0, "amount": total_in - amount - fee}) unconflist.append({"txid": txid, "vout": 1, "amount": amount}) return (ToHex(tx), fee) def split_inputs(from_node, txins, txouts, initial_split=False): """Generate a lot of inputs so we can generate a ton of transactions. This function takes an input from txins, and creates and sends a transaction which splits the value into 2 outputs which are appended to txouts. Previously this was designed to be small inputs so they wouldn't have a high coin age when the notion of priority still existed.""" prevtxout = txins.pop() tx = CTransaction() tx.vin.append(CTxIn(COutPoint(int(prevtxout["txid"], 16), prevtxout["vout"]), b"")) half_change = satoshi_round(prevtxout["amount"] / 2) rem_change = prevtxout["amount"] - half_change - Decimal("0.00001000") tx.vout.append(CTxOut(int(half_change * COIN), P2SH_1)) tx.vout.append(CTxOut(int(rem_change * COIN), P2SH_2)) # If this is the initial split we actually need to sign the transaction # Otherwise we just need to insert the proper ScriptSig if (initial_split): completetx = from_node.signrawtransactionwithwallet(ToHex(tx))["hex"] else: tx.vin[0].scriptSig = SCRIPT_SIG[prevtxout["vout"]] completetx = ToHex(tx) txid = from_node.sendrawtransaction(completetx, True) txouts.append({"txid": txid, "vout": 0, "amount": half_change}) txouts.append({"txid": txid, "vout": 1, "amount": rem_change}) def check_estimates(node, fees_seen): """Call estimatesmartfee and verify that the estimates meet certain invariants.""" delta = 1.0e-6 # account for rounding error last_feerate = float(max(fees_seen)) all_smart_estimates = [node.estimatesmartfee(i) for i in range(1, 26)] for i, e in enumerate(all_smart_estimates): # estimate is for i+1 feerate = float(e["feerate"]) assert_greater_than(feerate, 0) if feerate + delta < min(fees_seen) or feerate - delta > max(fees_seen): raise AssertionError("Estimated fee (%f) out of range (%f,%f)" % (feerate, min(fees_seen), max(fees_seen))) if feerate - delta > last_feerate: raise AssertionError("Estimated fee (%f) larger than last fee (%f) for lower number of confirms" % (feerate, last_feerate)) last_feerate = feerate if i == 0: assert_equal(e["blocks"], 2) else: assert_greater_than_or_equal(i + 1, e["blocks"]) class EstimateFeeTest(DigiByteTestFramework): def set_test_params(self): self.num_nodes = 3 def skip_test_if_missing_module(self): self.skip_if_no_wallet() def setup_network(self): """ We'll setup the network to have 3 nodes that all mine with different parameters. But first we need to use one node to create a lot of outputs which we will use to generate our transactions. """ self.add_nodes(3, extra_args=[["-maxorphantx=1000", "-whitelist=127.0.0.1"], ["-blockmaxweight=68000", "-maxorphantx=1000"], ["-blockmaxweight=32000", "-maxorphantx=1000"]]) # Use node0 to mine blocks for input splitting # Node1 mines small blocks but that are bigger than the expected transaction rate. # NOTE: the CreateNewBlock code starts counting block weight at 4,000 weight, # (68k weight is room enough for 120 or so transactions) # Node2 is a stingy miner, that # produces too small blocks (room for only 55 or so transactions) def transact_and_mine(self, numblocks, mining_node): min_fee = Decimal("0.00001") # We will now mine numblocks blocks generating on average 100 transactions between each block # We shuffle our confirmed txout set before each set of transactions # small_txpuzzle_randfee will use the transactions that have inputs already in the chain when possible # resorting to tx's that depend on the mempool when those run out for i in range(numblocks): random.shuffle(self.confutxo) for j in range(random.randrange(100 - 50, 100 + 50)): from_index = random.randint(1, 2) (txhex, fee) = small_txpuzzle_randfee(self.nodes[from_index], self.confutxo, self.memutxo, Decimal("0.005"), min_fee, min_fee) tx_kbytes = (len(txhex) // 2) / 1000.0 self.fees_per_kb.append(float(fee) / tx_kbytes) sync_mempools(self.nodes[0:3], wait=.1) mined = mining_node.getblock(mining_node.generate(1)[0], True)["tx"] sync_blocks(self.nodes[0:3], wait=.1) # update which txouts are confirmed newmem = [] for utx in self.memutxo: if utx["txid"] in mined: self.confutxo.append(utx) else: newmem.append(utx) self.memutxo = newmem def import_deterministic_coinbase_privkeys(self): self.start_nodes() super().import_deterministic_coinbase_privkeys() self.stop_nodes() def run_test(self): self.log.info("This test is time consuming, please be patient") self.log.info("Splitting inputs so we can generate tx's") # Start node0 self.start_node(0) self.txouts = [] self.txouts2 = [] # Split a coinbase into two transaction puzzle outputs split_inputs(self.nodes[0], self.nodes[0].listunspent(0), self.txouts, True) # Mine while (len(self.nodes[0].getrawmempool()) > 0): self.nodes[0].generate(1) # Repeatedly split those 2 outputs, doubling twice for each rep # Use txouts to monitor the available utxo, since these won't be tracked in wallet reps = 0 while (reps < 5): # Double txouts to txouts2 while (len(self.txouts) > 0): split_inputs(self.nodes[0], self.txouts, self.txouts2) while (len(self.nodes[0].getrawmempool()) > 0): self.nodes[0].generate(1) # Double txouts2 to txouts while (len(self.txouts2) > 0): split_inputs(self.nodes[0], self.txouts2, self.txouts) while (len(self.nodes[0].getrawmempool()) > 0): self.nodes[0].generate(1) reps += 1 self.log.info("Finished splitting") # Now we can connect the other nodes, didn't want to connect them earlier # so the estimates would not be affected by the splitting transactions self.start_node(1) self.start_node(2) connect_nodes(self.nodes[1], 0) connect_nodes(self.nodes[0], 2) connect_nodes(self.nodes[2], 1) self.sync_all() self.fees_per_kb = [] self.memutxo = [] self.confutxo = self.txouts # Start with the set of confirmed txouts after splitting self.log.info("Will output estimates for 1/2/3/6/15/25 blocks") for i in range(2): self.log.info("Creating transactions and mining them with a block size that can't keep up") # Create transactions and mine 10 small blocks with node 2, but create txs faster than we can mine self.transact_and_mine(10, self.nodes[2]) check_estimates(self.nodes[1], self.fees_per_kb) self.log.info("Creating transactions and mining them at a block size that is just big enough") # Generate transactions while mining 10 more blocks, this time with node1 # which mines blocks with capacity just above the rate that transactions are being created self.transact_and_mine(10, self.nodes[1]) check_estimates(self.nodes[1], self.fees_per_kb) # Finish by mining a normal-sized block: while len(self.nodes[1].getrawmempool()) > 0: self.nodes[1].generate(1) sync_blocks(self.nodes[0:3], wait=.1) self.log.info("Final estimates after emptying mempools") check_estimates(self.nodes[1], self.fees_per_kb) if __name__ == '__main__': EstimateFeeTest().main()
digibyte/digibyte
test/functional/feature_fee_estimation.py
Python
mit
11,548
// calculate the area of a circle based on its radius function calcCircleArea(r) { var area = Math.PI * Math.pow(r, 2); // area is pi times radius squared return area; } console.log(calcCircleArea(35))
GTC-JS/classExamples
ch7-oop/07a-math.js
JavaScript
mit
209
#pragma checksum "D:\Έγγαφα\Visual Studio 2015\Projects\SecureUWPChannel\SecureUWPChannel\MainPage.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "AF7F446B304564E65518E1A000E13F24" //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace SecureUWPChannel { partial class MainPage : global::Windows.UI.Xaml.Controls.Page, global::Windows.UI.Xaml.Markup.IComponentConnector, global::Windows.UI.Xaml.Markup.IComponentConnector2 { /// <summary> /// Connect() /// </summary> [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public void Connect(int connectionId, object target) { switch(connectionId) { case 1: { this.ScenarioFrame = (global::Windows.UI.Xaml.Controls.Frame)(target); } break; case 2: { this.StatusPanel = (global::Windows.UI.Xaml.Controls.StackPanel)(target); } break; case 3: { this.StatusLabel = (global::Windows.UI.Xaml.Controls.TextBlock)(target); } break; case 4: { this.InputTextBlock1 = (global::Windows.UI.Xaml.Controls.TextBlock)(target); } break; case 5: { this.Register = (global::Windows.UI.Xaml.Controls.Button)(target); #line 28 "..\..\..\MainPage.xaml" ((global::Windows.UI.Xaml.Controls.Button)this.Register).Click += this.Register_Click; #line default } break; case 6: { this.Unregister = (global::Windows.UI.Xaml.Controls.Button)(target); #line 29 "..\..\..\MainPage.xaml" ((global::Windows.UI.Xaml.Controls.Button)this.Unregister).Click += this.UnRegister_Click; #line default } break; case 7: { this.StatusBorder = (global::Windows.UI.Xaml.Controls.Border)(target); } break; case 8: { this.StatusBlock = (global::Windows.UI.Xaml.Controls.TextBlock)(target); } break; default: break; } this._contentLoaded = true; } [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Windows.UI.Xaml.Build.Tasks"," 14.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] public global::Windows.UI.Xaml.Markup.IComponentConnector GetBindingConnector(int connectionId, object target) { global::Windows.UI.Xaml.Markup.IComponentConnector returnValue = null; return returnValue; } } }
PanagiotisDrakatos/Universal-Encryption-Channel
SecureUWPChannel/SecureUWPChannel/obj/x64/Debug/MainPage.g.cs
C#
mit
3,471
/*jslint node: true */ 'use strict'; var dotenv = require ( 'dotenv' ).config(), Promise = require ( 'bluebird' ), _ = require ( 'lodash' ), sprintf = require ( 'sprintf' ), mysql = require ( 'mysql' ), chalk = require ( 'chalk' ); // //////////////////////////////////////////////////////////////////////////// // // common requirements, var constant_server_restapi = require ( '../common/constant_server_restapi' ); var _controllerBase = require ( './_controllerBase' )(); module.exports = function ( ) { var vm = this || {}; vm._service_name = 'account'; var api = { ctor : ctor }; function ctor ( central_relay, storage_agent, protect_agent, restapi_agent ) { return _controllerBase.bind_ctor ( vm, service_init, service_name, central_relay, storage_agent, protect_agent, restapi_agent ); } function service_name ( ) { return vm._service_name; } function service_init ( ) { return new Promise ( function ( resolve, reject ) { var express = vm.restapi_agent.express_get (); express.post ( '/v1/' + vm._service_name, on_restapi_post ); resolve ( true ); } ); } /** * * @param req.body.accountId */ function fetch ( req, res, next ) { var sp_script = sprintf ( 'CALL %s( %s );', 'sp_account_fetch', mysql.escape ( req.body.accountId ) ); return _controllerBase.sp_exec ( req, res, next, vm, sp_script ); } /** * * @param req.body.userName * @param req.body.password */ function write ( req, res, next ) { var account_salt = vm.protect_agent.compose_salt ( ); var account_hash = vm.protect_agent.encrypt_pass ( req.body.password, account_salt ); var sp_script; sp_script = sprintf ( 'CALL %s( %s );', 'sp_account_fetch_user', mysql.escape ( req.body.userName ) ); vm.storage_agent.connection_exec ( sp_script ).then ( function ( value ) { var result_len = value[0].length; if ( 0 < result_len ) { return value; } else { sp_script = sprintf ( 'CALL %s( %s, %s, %s );', 'sp_account_write', mysql.escape ( req.body.userName ), mysql.escape ( account_salt ), mysql.escape ( account_hash ) ); return vm.storage_agent.connection_exec ( sp_script ); } }, function ( error ) { throw ( error ); } ).then ( function ( value ) { var retval = _.omit ( value[0][0], [ 'accountId', 'salt', 'hash' ] ); return _controllerBase.request_status_send ( res, 200, retval ); }, function ( error ) { return _controllerBase.request_status_send ( res, 400, error ); } ); } function accountToken_verify ( token ) { return new Promise ( function ( resolve, reject ) { var retval = vm.protect_agent.token_verify ( token ); resolve ( retval ); } ); } function accountToken_write ( fetch_user_result ) { return new Promise ( function ( resolve, reject ) { var payload = { userName : fetch_user_result.userName }; var jwt_token = vm.protect_agent.token_sign ( payload ); var sp_script = sprintf ( 'CALL %s( %s, %s );', 'sp_accountToken_write', mysql.escape ( fetch_user_result.accountId ), mysql.escape ( jwt_token ) ); vm.storage_agent.connection_exec ( sp_script ).then ( function ( value ) { resolve ( value[0][0] ); }, function ( error ) { throw ( error ); } ).catch ( function ( ex ) { reject ( ex ); } ); } ); } function accountToken_fetch_account ( fetch_user_result ) { return new Promise ( function ( resolve, reject ) { var sp_script = sprintf ( 'CALL %s( %s );', 'sp_accountToken_fetch_account', mysql.escape ( fetch_user_result.accountId ) ); vm.storage_agent.connection_exec ( sp_script ).then ( function ( value ) { var result_len = value[0].length; if ( 1 > result_len ) { throw ( 'account token not found' ); } resolve ( value[0][0] ); }, function ( error ) { throw ( error ); } ).catch ( function ( ex ) { reject ( ex ); } ); } ); } /** * Login with userName & token * @param req.body.userName * @param req.body.token */ function login ( req, res, next ) { var account_salt = vm.protect_agent.compose_salt ( ); var account_hash = vm.protect_agent.encrypt_pass ( req.body.password, account_salt ); var sp_script = sprintf ( 'CALL %s( %s );', 'sp_account_fetch_user', mysql.escape ( req.body.userName ) ); var fetch_user_result; vm.storage_agent.connection_exec ( sp_script ).then ( function ( value ) { var result_len = value[0].length; if ( 1 > result_len ) { throw ( 'account not found' ); } fetch_user_result = value[0][0]; fetch_user_result.confirmed = vm.protect_agent.confirm_hash ( req.body.password, fetch_user_result.salt, fetch_user_result.hash ); if ( true !== fetch_user_result.confirmed ) { throw ( 'try again' ); } return accountToken_fetch_account ( fetch_user_result ); }, function ( error ) { throw ( error ); } ).then ( function ( value ) { // account already has an accountToken, return it. return value; }, function ( error ) { // no account token, make a token. return it return accountToken_write ( fetch_user_result ); } ).then ( function ( value ) { var retval = { userName : req.body.userName, success : fetch_user_result.confirmed, token : value.token }; return _controllerBase.request_status_send ( res, 200, retval ); }, function ( error ) { throw ( error ); } ).catch ( function ( error ) { return _controllerBase.request_status_send ( res, 400, error ); } ); } /** * Login with userName & password * @param req.body.userName * @param req.body.token */ function check ( req, res, next ) { if ( ! req.body.userName ) { return request_status_send ( res, 400, 'no' ); } if ( ! req.body.token ) { return request_status_send ( res, 400, 'no' ); } console.log ( vm._service_name, '::check', req.body.userName ); console.log ( vm._service_name, '::check', req.body.token ); accountToken_verify ( req.body.token ).then ( function ( value ) { // verify it is one of our tokens if ( ! value ) { throw ( 'account token verification failure' ); } console.log ( 'account token, ' ); console.log ( value ); console.log ( '' ); if ( value.userName !== req.body.userName ) { throw ( 'account token verification failure, token forgery' ); } // token is valid // confirm the user is valid var sp_script = sprintf ( 'CALL %s( %s );', 'sp_account_fetch_user', mysql.escape ( req.body.userName ) ); return vm.storage_agent.connection_exec ( sp_script ); }, function ( error ) { throw ( error ); } ).then ( function ( value ) { var result_len = value[0].length; if ( 1 > result_len ) { throw ( 'account not found' ); } return _controllerBase.request_status_send ( res, 200, 'ok' ); }, function ( error ) { throw ( error ); } ).catch ( function ( ex ) { return _controllerBase.request_status_send ( res, 400, ex ); } ); } function on_restapi_post ( req, res, next ) { if ( req.body.fetch ) return fetch ( req, res, next ); if ( req.body.write ) return write ( req, res, next ); if ( req.body.login ) return login ( req, res, next ); if ( req.body.check ) return check ( req, res, next ); return _controllerBase.request_status_send ( res, 400, { error : 'bad request' } ); } return api; };
gaccettola/mortis
server_restapi/source/controller/account.js
JavaScript
mit
10,594
#include "CoordinateSparseMatrix.h" #include <cassert> #include <algorithm> #include <mkl_spblas.h> #include "FloatMatrix.h" ////////////////////////////////////////////////////////////////////////// // Public ////////////////////////////////////////////////////////////////////////// template< typename T > CoordinateSparseMatrix< T >::CoordinateSparseMatrix() : m_nRows( 0 ), m_nCols( 0 ) { } template< typename T > CoordinateSparseMatrix< T >::CoordinateSparseMatrix( int initialCapacity ) : m_nRows( 0 ), m_nCols( 0 ) { reserve( initialCapacity ); } template< typename T > CoordinateSparseMatrix< T >::CoordinateSparseMatrix( const CoordinateSparseMatrix< T >& copy ) : m_nRows( copy.m_nRows ), m_nCols( copy.m_nCols ), m_rowIndices( copy.m_rowIndices ), m_colIndices( copy.m_colIndices ), m_values( copy.m_values ) { } template< typename T > CoordinateSparseMatrix< T >& CoordinateSparseMatrix< T >::operator = ( const CoordinateSparseMatrix< T >& copy ) { if( this != &copy ) { m_nRows = copy.m_nRows; m_nCols = copy.m_nCols; m_rowIndices = copy.m_rowIndices; m_colIndices = copy.m_colIndices; m_values = copy.m_values; } return( *this ); } template< typename T > int CoordinateSparseMatrix< T >::numNonZeroes() const { return static_cast< int >( m_values.size() ); } template< typename T > int CoordinateSparseMatrix< T >::numRows() const { return m_nRows; } template< typename T > int CoordinateSparseMatrix< T >::numCols() const { return m_nCols; } template< typename T > void CoordinateSparseMatrix< T >::append( int i, int j, const T& value ) { m_rowIndices.push_back( i ); m_colIndices.push_back( j ); m_values.push_back( value ); if( i >= m_nRows ) { m_nRows = i + 1; } if( j >= m_nCols ) { m_nCols = j + 1; } } template< typename T > void CoordinateSparseMatrix< T >::clear() { m_nRows = 0; m_nCols = 0; m_rowIndices.clear(); m_colIndices.clear(); m_values.clear(); } template< typename T > SparseMatrixTriplet< T > CoordinateSparseMatrix< T >::get( int k ) const { assert( k < m_values.size() ); SparseMatrixTriplet< T > t; t.i = m_rowIndices[ k ]; t.j = m_colIndices[ k ]; t.value = m_values[ k ]; return t; } template< typename T > void CoordinateSparseMatrix< T >::reserve( int nnz ) { m_rowIndices.reserve( nnz ); m_colIndices.reserve( nnz ); m_values.reserve( nnz ); } template< typename T > void CoordinateSparseMatrix< T >::transpose() { int nnz = numNonZeroes(); for( int k = 0; k < nnz; ++k ) { std::swap( m_rowIndices[ k ], m_colIndices[ k ] ); } std::swap( m_nRows, m_nCols ); } template< typename T > void CoordinateSparseMatrix< T >::transposed( CoordinateSparseMatrix< T >& f ) const { f = ( *this ); f.transpose(); } template< typename T > void CoordinateSparseMatrix< T >::compress( CompressedSparseMatrix< T >& output ) const { int m = numRows(); int n = numCols(); int nnz = numNonZeroes(); output.reset( m, n, nnz ); // copy the SparseMatrixTriplet< T > vector std::vector< SparseMatrixTriplet< T > > ijv( nnz ); for( int k = 0; k < nnz; ++k ) { SparseMatrixTriplet< T >& t = ijv[ k ]; t.i = m_rowIndices[ k ]; t.j = m_colIndices[ k ]; t.value = m_values[ k ]; } std::sort( ijv.begin(), ijv.end(), colMajorLess ); compressCore( ijv, output ); // populate structure map auto& structureMap = output.structureMap(); for( int k = 0; k < nnz; ++k ) { const SparseMatrixTriplet< T >& t = ijv[k]; structureMap[ std::make_pair( t.i, t.j ) ] = k; } } template< typename T > void CoordinateSparseMatrix< T >::compress( CompressedSparseMatrix< T >& output, std::vector< int >& indexMap ) const { compress( output ); const auto& structureMap = output.structureMap(); int nnz = numNonZeroes(); indexMap.resize( nnz ); for( int k = 0; k < nnz; ++k ) { auto ij = std::make_pair( m_rowIndices[k], m_colIndices[k] ); int l = structureMap.find( ij )->second; indexMap[ l ] = k; } } template< typename T > void CoordinateSparseMatrix< T >::compressTranspose( CompressedSparseMatrix< T >& outputAt ) const { int m = numRows(); int n = numCols(); int nnz = numNonZeroes(); outputAt.reset( n, m, nnz ); // copy the SparseMatrixTriplet< T > vector std::vector< SparseMatrixTriplet< T > > ijv( nnz ); // flip i and j for( int k = 0; k < nnz; ++k ) { SparseMatrixTriplet< T >& t = ijv[ k ]; t.i = m_colIndices[ k ]; t.j = m_rowIndices[ k ]; t.value = m_values[ k ]; } std::sort( ijv.begin(), ijv.end(), colMajorLess ); compressCore( ijv, outputAt ); // populate structure map auto& structureMap = outputAt.structureMap(); for( int k = 0; k < nnz; ++k ) { const SparseMatrixTriplet< T >& t = ijv[k]; structureMap[ std::make_pair( t.i, t.j ) ] = k; } } template< typename T > void CoordinateSparseMatrix< T >::compressTranspose( CompressedSparseMatrix< T >& outputAt, std::vector< int >& indexMap ) const { compressTranspose( outputAt ); const auto& structureMap = outputAt.structureMap(); int nnz = numNonZeroes(); indexMap.resize( nnz ); for( int k = 0; k < nnz; ++k ) { auto ji = std::make_pair( m_colIndices[k], m_rowIndices[k] ); int l = structureMap.find( ji )->second; indexMap[ l ] = k; } } template<> void CoordinateSparseMatrix< float >::multiplyVector( FloatMatrix& x, FloatMatrix& y ) { int m = numRows(); int n = numCols(); assert( x.numRows() == n ); assert( x.numCols() == 1 ); y.resize( m, 1 ); // TODO: implement doubles version char transa = 'n'; int nnz = numNonZeroes(); mkl_cspblas_scoogemv ( &transa, &m, m_values.data(), m_rowIndices.data(), m_colIndices.data(), &nnz, x.data(), y.data() ); } template<> void CoordinateSparseMatrix< float >::multiplyTransposeVector( FloatMatrix& x, FloatMatrix& y ) { int m = numRows(); int n = numCols(); assert( x.numRows() == m ); assert( x.numCols() == 1 ); y.resize( n, 1 ); // TODO: implement doubles version char transa = 't'; int nnz = numNonZeroes(); mkl_cspblas_scoogemv ( &transa, &n, m_values.data(), m_rowIndices.data(), m_colIndices.data(), &nnz, x.data(), y.data() ); } ////////////////////////////////////////////////////////////////////////// // Private ////////////////////////////////////////////////////////////////////////// template< typename T > void CoordinateSparseMatrix< T >::compressCore( std::vector< SparseMatrixTriplet< T > > ijvSorted, CompressedSparseMatrix< T >& output ) const { // TODO: if we want the output to be only symmetric or triangular //if( ( !upperTriangleOnly ) || // ( j >= i ) ) int nnz = numNonZeroes(); int innerIndex = 0; int outerIndexPointerIndex = 0; auto& values = output.values(); auto& innerIndices = output.innerIndices(); auto& outerIndexPointers = output.outerIndexPointers(); for( int k = 0; k < nnz; ++k ) { const SparseMatrixTriplet< T >& t = ijvSorted[k]; int i = t.i; int j = t.j; const T& value = t.value; values[ innerIndex ] = value; innerIndices[ innerIndex ] = i; if( j == outerIndexPointerIndex ) { outerIndexPointers[ outerIndexPointerIndex ] = innerIndex; ++outerIndexPointerIndex; } ++innerIndex; } outerIndexPointers[ outerIndexPointerIndex ] = innerIndex; ++outerIndexPointerIndex; } // static template< typename T > bool CoordinateSparseMatrix< T >::rowMajorLess( SparseMatrixTriplet< T >& a, SparseMatrixTriplet< T >& b ) { if( a.i < b.i ) { return true; } else if( a.i > b.i ) { return false; } else { return( a.j < b.j ); } } // static template< typename T > bool CoordinateSparseMatrix< T >::colMajorLess( SparseMatrixTriplet< T >& a, SparseMatrixTriplet< T >& b ) { if( a.j < b.j ) { return true; } else if( a.j > b.j ) { return false; } else { return( a.i < b.i ); } } template<> bool CoordinateSparseMatrix< float >::loadTXT( QString filename ) { FILE* fp = fopen( qPrintable( filename ), "r" ); bool succeeded = ( fp != NULL ); if( succeeded ) { int m; int n; int nnz; fscanf( fp, "%d\t%d\t%d\n", &m, &n, &nnz ); m_nRows = 0; m_nCols = 0; m_rowIndices.resize( nnz ); m_colIndices.resize( nnz ); m_values.resize( nnz ); for( size_t k = 0; k < nnz; ++k ) { int i; int j; float v; fscanf( fp, "%d\t%d\t%f\n", &i, &j, &v ); m_rowIndices[ k ] = i; m_colIndices[ k ] = j; m_values[ k ] = v; if( i >= m_nRows ) { m_nRows = i + 1; } if( j >= m_nCols ) { m_nCols = j + 1; } } fclose( fp ); } return succeeded; } template<> bool CoordinateSparseMatrix< double >::loadTXT( QString filename ) { FILE* fp = fopen( qPrintable( filename ), "r" ); bool succeeded = ( fp != NULL ); if( succeeded ) { int m; int n; int nnz; fscanf( fp, "%d\t%d\t%d\n", &m, &n, &nnz ); m_nRows = 0; m_nCols = 0; m_rowIndices.resize( nnz ); m_colIndices.resize( nnz ); m_values.resize( nnz ); for( size_t k = 0; k < nnz; ++k ) { int i; int j; double v; fscanf( fp, "%d\t%d\t%lf\n", &i, &j, &v ); m_rowIndices[ k ] = i; m_colIndices[ k ] = j; m_values[ k ] = v; if( i >= m_nRows ) { m_nRows = i + 1; } if( j >= m_nCols ) { m_nCols = j + 1; } } fclose( fp ); } return succeeded; } template<> bool CoordinateSparseMatrix< float >::saveTXT( QString filename ) { FILE* fp = fopen( qPrintable( filename ), "w" ); bool succeeded = ( fp != NULL ); if( succeeded ) { int nnz = numNonZeroes(); fprintf( fp, "%d\t%d\t%d\n", m_nRows, m_nCols, nnz ); for( int k = 0; k < nnz; ++k ) { fprintf( fp, "%d\t%d\t%f\n", m_rowIndices[k], m_colIndices[k], m_values[k] ); } fclose( fp ); } return succeeded; } template<> bool CoordinateSparseMatrix< double >::saveTXT( QString filename ) { FILE* fp = fopen( qPrintable( filename ), "w" ); bool succeeded = ( fp != NULL ); if( succeeded ) { int nnz = numNonZeroes(); fprintf( fp, "%d\t%d\t%d\n", m_nRows, m_nCols, nnz ); for( int k = 0; k < nnz; ++k ) { fprintf( fp, "%d\t%d\t%lf\n", m_rowIndices[k], m_colIndices[k], m_values[k] ); } fclose( fp ); } return succeeded; } ////////////////////////////////////////////////////////////////////////// // Instantiate Templates ////////////////////////////////////////////////////////////////////////// template CoordinateSparseMatrix< float >; //template //CoordinateSparseMatrix< double >;
jiawen/libcgt
math/src/CoordinateSparseMatrix.cpp
C++
mit
11,755
<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="UTF-8"> <title>redis &middot; Nice To Know IT</title> <link rel="stylesheet" href="https://nicetoknow.github.io/IT/css.css" type="text/css" > </head> <body > <nav class="breadcrumb"> <a href='https://nicetoknow.github.io'>Nice To Know</a><a href='https://nicetoknow.github.io/IT/'>IT</a> <a href='https://nicetoknow.github.io/IT/database--storage/Database%20&%20Storage/'>Database & Storage</a><a href='https://nicetoknow.github.io/IT/database--storage/key-value/Key-Value/'>Key-Value</a><a href='https://nicetoknow.github.io/IT/database--storage/key-value/redis/'>redis</a> </nav> <div class="topics"> </div> <div class="content"> <p><img src="http://redis.io/images/redis-white.png" alt="" /></p> <ul> <li>&ldquo;<em>re</em> mote <em>di</em> ctionary <em>s</em> erver&rdquo;</li> <li><a href="http://redis.io">http://redis.io</a></li> <li>in-memory database / cache / message broker</li> <li>key-value structure</li> </ul> </div> </body> </html>
NiceToKnow/IT
public/database--storage/key-value/redis/index.html
HTML
mit
1,352
The design is an homage to the Nuka-Cola beverage in the Fallout Universe. Nuka-Cola was invented in 2044 by John-Caleb Bradberton. Its unique taste gained widespread popularity, quickly becoming the most popular soft drink in the United States with an extremely dedicated following. The name of the Nuka-Cola creator is an amalgamation of the inventors of Coca-Cola (John Pemberton) and Pepsi-Cola (Caleb Bradham). Its logos, bottle designs, market crash, and even its name are heavily based on Coca-Cola.
nathanrosspowell/00keys
contents/keyinfo/nukacola.md
Markdown
mit
510
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="A fully featured admin theme which can be used to build CRM, CMS, etc."> <meta name="author" content="Coderthemes"> <link rel="shortcut icon" href="images/favicon_1.ico"> <title>GRYP - Admin Dashboard</title> <!-- Base Css Files --> <link href="css/bootstrap.min.css" rel="stylesheet" /> <!-- Font Icons --> <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" /> <link href="assets/ionicon/css/ionicons.min.css" rel="stylesheet" /> <link href="css/material-design-iconic-font.min.css" rel="stylesheet"> <!-- animate css --> <link href="css/animate.css" rel="stylesheet" /> <!-- Waves-effect --> <link href="css/waves-effect.css" rel="stylesheet"> <!-- sweet alerts --> <link href="assets/sweet-alert/sweet-alert.min.css" rel="stylesheet"> <!-- DataTables --> <link href="assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" /> <!-- Custom Files --> <link href="css/helper.css" rel="stylesheet" type="text/css" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <!-- 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.3.0/respond.min.js"></script> <![endif]--> <script src="js/modernizr.min.js"></script> </head> <body class="fixed-left"> <!-- Begin page --> <div id="wrapper"> <!-- Top Bar Start --> <div class="topbar"> <!-- LOGO --> <div class="topbar-left"> <div class="text-center"> <a href="index.html" class="logo"><i class="md md-terrain"></i> <span>User Admin </span></a> </div> </div> <!-- Button mobile view to collapse sidebar menu --> <div class="navbar navbar-default" role="navigation"> <div class="container"> <div class=""> <div class="pull-left"> <button class="button-menu-mobile open-left"> <i class="fa fa-bars"></i> </button> <span class="clearfix"></span> </div> <form class="navbar-form pull-left" role="search"> <div class="form-group"> <input type="text" class="form-control search-bar" placeholder="Type here for search..."> </div> <button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button> </form> <ul class="nav navbar-nav navbar-right pull-right"> <li class="dropdown hidden-xs"> <a href="#" data-target="#" class="dropdown-toggle waves-effect waves-light" data-toggle="dropdown" aria-expanded="true"> <i class="md md-notifications"></i> <span class="badge badge-xs badge-danger">3</span> </a> <ul class="dropdown-menu dropdown-menu-lg"> <li class="text-center notifi-title">Notification</li> <li class="list-group"> <!-- list item--> <a href="javascript:void(0);" class="list-group-item"> <div class="media"> <div class="pull-left"> <em class="fa fa-user-plus fa-2x text-info"></em> </div> <div class="media-body clearfix"> <div class="media-heading">New user registered</div> <p class="m-0"> <small>You have 10 unread messages</small> </p> </div> </div> </a> <!-- list item--> <a href="javascript:void(0);" class="list-group-item"> <div class="media"> <div class="pull-left"> <em class="fa fa-diamond fa-2x text-primary"></em> </div> <div class="media-body clearfix"> <div class="media-heading">New settings</div> <p class="m-0"> <small>There are new settings available</small> </p> </div> </div> </a> <!-- list item--> <a href="javascript:void(0);" class="list-group-item"> <div class="media"> <div class="pull-left"> <em class="fa fa-bell-o fa-2x text-danger"></em> </div> <div class="media-body clearfix"> <div class="media-heading">Updates</div> <p class="m-0"> <small>There are <span class="text-primary">2</span> new updates available</small> </p> </div> </div> </a> <!-- last list item --> <a href="javascript:void(0);" class="list-group-item"> <small>See all notifications</small> </a> </li> </ul> </li> <li class="hidden-xs"> <a href="#" id="btn-fullscreen" class="waves-effect waves-light"><i class="md md-crop-free"></i></a> </li> <li class="hidden-xs"> <a href="#" class="right-bar-toggle waves-effect waves-light"><i class="md md-chat"></i></a> </li> <li class="dropdown"> <a href="" class="dropdown-toggle profile" data-toggle="dropdown" aria-expanded="true"><img src="images/avatar-1.jpg" alt="user-img" class="img-circle"> </a> <ul class="dropdown-menu"> <li><a href="javascript:void(0)"><i class="md md-face-unlock"></i> Profile</a></li> <li><a href="javascript:void(0)"><i class="md md-settings"></i> Settings</a></li> <li><a href="javascript:void(0)"><i class="md md-lock"></i> Lock screen</a></li> <li><a href="javascript:void(0)"><i class="md md-settings-power"></i> Logout</a></li> </ul> </li> </ul> </div> <!--/.nav-collapse --> </div> </div> </div> <!-- Top Bar End --> <!-- ========== Left Sidebar Start ========== --> <div class="left side-menu"> <div class="sidebar-inner slimscrollleft"> <div class="user-details"> <div class="pull-left"> <img src="images/users/avatar-1.jpg" alt="" class="thumb-md img-circle"> </div> <div class="user-info"> <div class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Sean Vit <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href="javascript:void(0)"><i class="md md-face-unlock"></i> Profile<div class="ripple-wrapper"></div></a></li> <li><a href="javascript:void(0)"><i class="md md-settings"></i> Settings</a></li> <li><a href="javascript:void(0)"><i class="md md-lock"></i> Lock screen</a></li> <li><a href="javascript:void(0)"><i class="md md-settings-power"></i> Logout</a></li> </ul> </div> <p class="text-muted m-0">Administrator</p> </div> </div> <!--- Divider --> <div id="sidebar-menu"> <ul> <li> <a href="index.html" class="waves-effect active"><i class="md md-home"></i><span> Dashboard </span></a> </li> <li> <a href="#" class="waves-effect"><i class="md md-home"></i><span> Admin Panel </span></a> <ul class="list-unstyled"> <li><a href="manage_user.html"><i class="fa fa-arrow-circle-right"></i><span>Manage User</span></a></li> <li><a href="add_user.html"><i class="fa fa-arrow-circle-right"></i><span>Add New User</span></a></li> </ul> </li> <li class="has_sub"> <a href="#" class="waves-effect"><i class="md md-palette"></i> <span> Manage Depositor </span> <span class="pull-right"><i class="md md-add"></i></span></a> <ul class="list-unstyled"> <li><a href="all_depositor.html">All Depositor</a></li> <li><a href="add_deposit_money.html">Create Account</a></li> <!-- <li><a href="add_depositor.html">Add Depositor</a></li> <li><a href="deposit_money.html">Deposit Money</a></li> --> </ul> </li> <li class="has_sub"> <a href="#" class="waves-effect"><i class="md md-invert-colors-on"></i><span> Manage Student </span><span class="pull-right"><i class="md md-add"></i></span></a> <ul class="list-unstyled"> <li><a href="all_student.html">All Students</a></li> <li><a href="student_profile.html">Create Student</a></li> </ul> </li> <li class="has_sub"> <a href="#" class="waves-effect"><i class="md md-invert-colors-on"></i><span> Manage Lesson </span><span class="pull-right"><i class="md md-add"></i></span></a> <ul class="list-unstyled"> <li><a href="all_lesson.html">All Lesson</a></li> <li><a href="add_lesson_post.html">Add Lesson</a></li> <li><a href="add_category_lesson.html">Categories</a></li> </ul> </li> <li class="has_sub"> <a href="#" class="waves-effect"><i class="md md-redeem"></i> <span> Posts </span> <span class="pull-right"><i class="md md-add"></i></span></a> <ul class="list-unstyled"> <li><a href="all_posts.html">All Posts</a></li> <li><a href="add_new_post.html">Add New Post</a></li> <li><a href="add_category_post.html">Categories</a></li> <li><a href="add_tag.html">Tags</a></li> </ul> </li> <li class="has_sub"> <a href="#" class="waves-effect"><i class="md md-now-widgets"></i><span> Pages </span><span class="pull-right"><i class="md md-add"></i></span></a> <ul class="list-unstyled"> <li><a href="all_pages.html">All Pages</a></li> <li><a href="add_new_page.html">Add Page</a></li> </ul> </li> </ul> <div class="clearfix"></div> </div> <div class="clearfix"></div> </div> </div> <!-- Left Sidebar End --> <!-- ============================================================== --> <!-- Start right Content here --> <!-- ============================================================== --> <div class="content-page"> <!-- Start content --> <div class="content"> <div class="container"> <!-- ========== table Depositor ========== --> <div class="row"> <div class="col-lg-12"> <div class="panel panel-border panel-success"> <div class="panel-heading"> <h3 class="panel-title">List Pages</h3> </div> <div class="panel-body table-rep-plugin"> <div class="row"> <div class="col-sm-6"> <div class="m-b-30"> <a href="add_new_page.html"><button id="addToTable" class="btn btn-success waves-effect waves-light">Add New Page<i class="fa fa-plus"></i></button></a> </div> </div> </div> <div class="table-responsive" data-pattern="priority-columns"> <table id="datatable" class="table table-small-font table-bordered table-striped"> <thead> <tr> <th>Tittle</th> <th data-priority="1">Author</th> <th data-priority="3">Date</th> <th data-priority="4">Option</th> </tr> </thead> <tbody> <tr> <!--<th>GOOG <span class="co-name">Google Inc.</span></th>--> <td>About Us</td> <td>Admin</td> <td>12/12/2015</td> <td> <a href="add_new_page.html" class="btn btn-warning btn-xs">Edit</a> <a href="#" onclick="return confirm('Are you sure you want to perform this action?')" class="btn btn-danger btn-xs">Delete</a> </td> </tr> <tr> <td>Contact Us</td> <td>Admin</td> <td>12/12/2015</td> <td> <a href="add_new_page.html" class="btn btn-warning btn-xs">Edit</a> <a href="#" onclick="return confirm('Are you sure you want to perform this action?')" class="btn btn-danger btn-xs">Delete</a> </td> </tr> </tbody> </table> </div> </div> </div> </div> </div> <!-- end row --> </div> <!-- container --> </div> <!-- content --> <footer class="footer text-right"> 2015 © MTO IT SOLUTION. </footer> </div> <!-- ============================================================== --> <!-- End Right content here --> <!-- ============================================================== --> </div> <!-- END wrapper --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="js/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="js/waves.js"></script> <script src="js/wow.min.js"></script> <script src="js/jquery.nicescroll.js" type="text/javascript"></script> <script src="js/jquery.scrollTo.min.js"></script> <script src="assets/jquery-detectmobile/detect.js"></script> <script src="assets/fastclick/fastclick.js"></script> <script src="assets/jquery-slimscroll/jquery.slimscroll.js"></script> <script src="assets/jquery-blockui/jquery.blockUI.js"></script> <!-- CUSTOM JS --> <script src="js/jquery.app.js"></script> <script src="assets/datatables/jquery.dataTables.min.js"></script> <script src="assets/datatables/dataTables.bootstrap.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#datatable').dataTable(); } ); </script> </body> </html>
konzuk/BIS_Web_School_Version1
app/template/all_pages.html
HTML
mit
20,461
#import <UIKit/UIKit.h> @interface UIFont (Marvel) + (instancetype)marvelRegularFontOfSize:(CGFloat)size; + (instancetype)marvelItalicFontOfSize:(CGFloat)size; + (instancetype)marvelBoldFontOfSize:(CGFloat)size; + (instancetype)marvelBoldItalicFontOfSize:(CGFloat)size; @end
parakeety/GoogleFontsiOS
Pod/Classes/marvel/UIFont+Marvel.h
C
mit
278
insert into users (name, phone, address) values ('Brenda Cruz', '4-(274)217-6171', '4 Lake View Road'); insert into users (name, phone, address) values ('Sarah Perry', '1-(849)702-7373', '2951 Cambridge Plaza'); insert into users (name, phone, address) values ('Catherine Washington', '8-(997)439-0704', '03 Stang Circle'); insert into users (name, phone, address) values ('Jessica Perkins', '1-(750)268-9921', '59934 Colorado Center'); insert into users (name, phone, address) values ('Kenneth Jenkins', '9-(679)567-7416', '79579 Delladonna Place'); insert into users (name, phone, address) values ('Roy Ruiz', '0-(320)094-3091', '72 Meadow Ridge Alley'); insert into users (name, phone, address) values ('Tammy Medina', '8-(875)177-5749', '220 Ohio Place'); insert into users (name, phone, address) values ('Jacqueline Frazier', '3-(250)536-9769', '7080 Pond Terrace'); insert into users (name, phone, address) values ('Anna Murray', '6-(152)797-1819', '8862 Veith Center'); insert into users (name, phone, address) values ('Denise Austin', '7-(609)804-9214', '80805 Barnett Street'); insert into users (name, phone, address) values ('Anne Marshall', '8-(096)269-5422', '9200 Golf View Plaza'); insert into users (name, phone, address) values ('Sarah Cook', '7-(141)269-7639', '5 Loftsgordon Junction'); insert into users (name, phone, address) values ('Victor Ellis', '8-(269)629-6969', '211 Dovetail Way'); insert into users (name, phone, address) values ('Julia Lee', '7-(630)306-7455', '7 Sheridan Drive'); insert into users (name, phone, address) values ('Eric Watson', '7-(769)616-6981', '03 Jana Way'); insert into users (name, phone, address) values ('Lori Larson', '9-(742)026-3146', '86941 Ronald Regan Place'); insert into users (name, phone, address) values ('Lori Harper', '9-(076)723-1632', '18 Annamark Park'); insert into users (name, phone, address) values ('Kathryn Sanders', '9-(696)877-1523', '01163 Drewry Drive'); insert into users (name, phone, address) values ('Todd Reynolds', '1-(641)281-5061', '5 Hudson Avenue'); insert into users (name, phone, address) values ('Richard Ellis', '8-(391)573-4174', '5 5th Trail'); insert into users (name, phone, address) values ('Sharon Ramos', '5-(802)527-3666', '716 Eastwood Circle'); insert into users (name, phone, address) values ('Robin Garza', '9-(461)927-2674', '17255 Lerdahl Parkway'); insert into users (name, phone, address) values ('Martin Flores', '0-(333)176-8233', '7 Village Park'); insert into users (name, phone, address) values ('Adam Rodriguez', '7-(733)387-2318', '53 Luster Way'); insert into users (name, phone, address) values ('Sharon Jenkins', '4-(923)944-1431', '2338 Darwin Plaza'); insert into users (name, phone, address) values ('Doris Collins', '8-(702)004-4931', '9080 Coleman Park'); insert into users (name, phone, address) values ('Sara Jones', '7-(480)104-3449', '3 Stang Way'); insert into users (name, phone, address) values ('Kenneth Stanley', '0-(880)329-6190', '940 Eliot Crossing'); insert into users (name, phone, address) values ('Christopher Walker', '5-(127)993-0240', '78296 Fordem Drive'); insert into users (name, phone, address) values ('Joe Rogers', '1-(552)076-0666', '892 Green Ridge Hill'); insert into users (name, phone, address) values ('Paula Henderson', '7-(014)930-4949', '05 Hazelcrest Avenue'); insert into users (name, phone, address) values ('Harold Adams', '0-(774)185-8204', '936 Mayer Park'); insert into users (name, phone, address) values ('Deborah Little', '9-(478)964-8627', '04 Marcy Trail'); insert into users (name, phone, address) values ('Jonathan Brown', '9-(881)438-4241', '1449 Bonner Lane'); insert into users (name, phone, address) values ('Teresa Rivera', '6-(035)482-9925', '36664 Tennyson Street'); insert into users (name, phone, address) values ('Brian Oliver', '9-(234)829-4054', '92440 Alpine Trail'); insert into users (name, phone, address) values ('Louise Hart', '4-(314)540-3722', '7269 Sachtjen Lane'); insert into users (name, phone, address) values ('Harold Ross', '2-(509)324-1724', '87766 Lawn Crossing'); insert into users (name, phone, address) values ('Robin Dean', '5-(896)357-8950', '9 Upham Parkway'); insert into users (name, phone, address) values ('Kathryn Ramos', '3-(792)314-0091', '22170 North Park'); insert into users (name, phone, address) values ('Juan Perez', '7-(975)139-8668', '11 Southridge Park'); insert into users (name, phone, address) values ('Irene Wheeler', '4-(825)550-5838', '3682 Hanson Alley'); insert into users (name, phone, address) values ('Kenneth Ryan', '6-(468)467-2327', '2610 Union Junction'); insert into users (name, phone, address) values ('Harold Fernandez', '7-(782)048-9628', '4057 Marquette Drive'); insert into users (name, phone, address) values ('Wanda Cook', '9-(586)605-4045', '6 Luster Trail'); insert into users (name, phone, address) values ('Howard Banks', '7-(502)688-5049', '3 Sachs Avenue'); insert into users (name, phone, address) values ('Sandra Powell', '4-(181)913-4044', '3905 Old Shore Street'); insert into users (name, phone, address) values ('Kimberly Meyer', '3-(083)312-9262', '8312 Messerschmidt Circle'); insert into users (name, phone, address) values ('Robert Baker', '4-(440)227-5713', '4303 Main Parkway'); insert into users (name, phone, address) values ('Ryan Carroll', '4-(463)306-4165', '90 Hansons Terrace'); insert into users (name, phone, address) values ('Steve Arnold', '7-(591)722-1839', '07030 Lotheville Way'); insert into users (name, phone, address) values ('Raymond Ray', '5-(769)624-5898', '5775 Barnett Circle'); insert into users (name, phone, address) values ('Barbara Gonzalez', '3-(425)439-8959', '99296 Anhalt Crossing'); insert into users (name, phone, address) values ('Anna Scott', '7-(606)301-5880', '9421 Golf Course Circle'); insert into users (name, phone, address) values ('Kathryn Snyder', '4-(532)798-2473', '0717 Blaine Lane'); insert into users (name, phone, address) values ('Betty Perez', '0-(763)471-2624', '6 Hanover Alley'); insert into users (name, phone, address) values ('Dennis Reyes', '0-(198)510-5810', '98 Havey Park'); insert into users (name, phone, address) values ('Steve Morales', '5-(391)596-4247', '375 Coleman Alley'); insert into users (name, phone, address) values ('Nicole Daniels', '3-(183)097-9772', '93787 Sundown Junction'); insert into users (name, phone, address) values ('Eugene Ruiz', '5-(607)551-1796', '19687 Manley Crossing'); insert into users (name, phone, address) values ('Christopher Peterson', '5-(069)632-0280', '4239 Butterfield Crossing'); insert into users (name, phone, address) values ('Jimmy Peterson', '5-(284)607-7640', '0092 Basil Road'); insert into users (name, phone, address) values ('Julia Cole', '8-(501)252-8385', '0298 Cardinal Place'); insert into users (name, phone, address) values ('Andrew Fields', '7-(004)967-4560', '3 Mayer Court'); insert into users (name, phone, address) values ('George Hanson', '9-(951)273-5767', '472 Moland Trail'); insert into users (name, phone, address) values ('Jessica Freeman', '5-(414)362-4138', '77 Bay Way'); insert into users (name, phone, address) values ('Sara Mccoy', '1-(810)391-1979', '7047 Sage Crossing'); insert into users (name, phone, address) values ('Keith Anderson', '4-(151)024-7387', '4936 Arkansas Pass'); insert into users (name, phone, address) values ('Doris Perry', '9-(243)646-4506', '4 Darwin Plaza'); insert into users (name, phone, address) values ('Peter Ryan', '6-(298)011-2970', '49788 Stephen Pass'); insert into users (name, phone, address) values ('Bonnie Carpenter', '1-(060)583-2821', '6 Carioca Alley'); insert into users (name, phone, address) values ('Angela Ward', '6-(673)791-9509', '1292 Sauthoff Road'); insert into users (name, phone, address) values ('Kathryn Baker', '9-(730)759-4294', '4260 Linden Avenue'); insert into users (name, phone, address) values ('Judith Brooks', '8-(418)831-8422', '19 Thierer Lane'); insert into users (name, phone, address) values ('Stephen Hudson', '7-(038)656-1647', '0565 Montana Crossing'); insert into users (name, phone, address) values ('Ralph Porter', '3-(469)036-5198', '2877 2nd Hill'); insert into users (name, phone, address) values ('Ruth Harrison', '7-(697)767-6157', '299 Red Cloud Alley'); insert into users (name, phone, address) values ('Helen Franklin', '5-(750)480-0215', '6515 Briar Crest Circle'); insert into users (name, phone, address) values ('Maria Spencer', '3-(535)314-9374', '678 Pawling Way'); insert into users (name, phone, address) values ('Judy Gomez', '2-(071)100-2501', '5 Bultman Road'); insert into users (name, phone, address) values ('Diane Robinson', '5-(738)070-3755', '970 Vermont Avenue'); insert into users (name, phone, address) values ('Annie Lynch', '6-(912)576-2683', '8704 Schlimgen Way'); insert into users (name, phone, address) values ('Amanda Riley', '9-(893)995-8307', '34 Di Loreto Pass'); insert into users (name, phone, address) values ('Samuel Bradley', '5-(993)975-8780', '542 Arrowood Park'); insert into users (name, phone, address) values ('Joe Cooper', '1-(577)084-9922', '6 Brown Road'); insert into users (name, phone, address) values ('Willie Robertson', '4-(355)155-6900', '29749 Southridge Drive'); insert into users (name, phone, address) values ('Robert Rose', '8-(379)878-8605', '45 Brown Place'); insert into users (name, phone, address) values ('Shawn Vasquez', '5-(761)077-1428', '40 4th Park'); insert into users (name, phone, address) values ('Nicholas Riley', '5-(127)071-6985', '44787 Pleasure Street'); insert into users (name, phone, address) values ('Jessica Hanson', '2-(960)051-3962', '70 Heath Avenue'); insert into users (name, phone, address) values ('Earl Lane', '3-(366)527-3462', '57679 Randy Hill'); insert into users (name, phone, address) values ('Jeremy Adams', '3-(713)652-5893', '9 Merry Terrace'); insert into users (name, phone, address) values ('Donna Ward', '3-(409)398-0145', '1 Marquette Hill'); insert into users (name, phone, address) values ('Louis Torres', '5-(325)487-1425', '31 Lakeland Plaza'); insert into users (name, phone, address) values ('Terry Grant', '2-(131)498-3160', '948 Mendota Alley'); insert into users (name, phone, address) values ('Harry Hudson', '7-(357)228-0149', '7 Aberg Road'); insert into users (name, phone, address) values ('Dorothy Mitchell', '8-(997)723-7905', '70158 Golf Course Crossing'); insert into users (name, phone, address) values ('Christopher Richardson', '1-(611)695-5030', '36080 Texas Road'); insert into users (name, phone, address) values ('Andrew Schmidt', '9-(946)421-2300', '108 Dorton Trail'); insert into users (name, phone, address) values ('Charles Scott', '9-(718)732-7692', '500 Arapahoe Terrace'); insert into users (name, phone, address) values ('Kevin Williamson', '8-(135)541-9782', '6 Bunker Hill Circle'); insert into users (name, phone, address) values ('Ronald Bradley', '0-(517)376-9940', '55 Russell Park'); insert into users (name, phone, address) values ('Julie Alexander', '2-(732)089-0729', '8904 Division Terrace'); insert into users (name, phone, address) values ('Doris Riley', '9-(592)683-0762', '1 Harper Street'); insert into users (name, phone, address) values ('Cheryl Hunter', '2-(810)698-2015', '05 Nelson Way'); insert into users (name, phone, address) values ('Roy Lane', '9-(305)002-0522', '52 Oxford Park'); insert into users (name, phone, address) values ('Cheryl Griffin', '1-(353)605-9915', '6 Melby Parkway'); insert into users (name, phone, address) values ('Janet Marshall', '4-(144)089-9484', '85618 Corry Road'); insert into users (name, phone, address) values ('Emily Stephens', '6-(876)373-5667', '2356 Mockingbird Junction'); insert into users (name, phone, address) values ('Antonio Hughes', '8-(180)205-9200', '102 Mccormick Center'); insert into users (name, phone, address) values ('Carlos Oliver', '4-(045)239-0734', '519 Hoffman Trail'); insert into users (name, phone, address) values ('Margaret Hicks', '0-(393)049-7126', '9 Linden Lane'); insert into users (name, phone, address) values ('Jack George', '8-(654)601-7045', '29111 Emmet Drive'); insert into users (name, phone, address) values ('Clarence Burns', '6-(972)494-0853', '8 Oak Trail'); insert into users (name, phone, address) values ('Lois Little', '4-(874)078-2543', '0 Vera Pass'); insert into users (name, phone, address) values ('Margaret Evans', '2-(660)825-7540', '908 Mosinee Terrace'); insert into users (name, phone, address) values ('Theresa Gray', '3-(964)188-3281', '3 Utah Way'); insert into users (name, phone, address) values ('Larry Fields', '9-(770)882-0773', '2 Eastlawn Park'); insert into users (name, phone, address) values ('Susan Davis', '5-(238)857-2535', '937 Briar Crest Avenue'); insert into users (name, phone, address) values ('Matthew Boyd', '5-(786)249-6408', '3931 Mockingbird Avenue'); insert into users (name, phone, address) values ('Wanda Ford', '2-(460)083-0447', '8526 Lien Alley'); insert into users (name, phone, address) values ('Anna Reyes', '9-(831)685-1300', '58 Steensland Parkway'); insert into users (name, phone, address) values ('Melissa Collins', '0-(893)185-8344', '49137 Kim Circle'); insert into users (name, phone, address) values ('Raymond Gardner', '9-(389)563-7131', '846 Brown Avenue'); insert into users (name, phone, address) values ('Denise Wallace', '1-(687)951-3427', '3220 Thackeray Junction'); insert into users (name, phone, address) values ('Kelly Bowman', '3-(363)781-8517', '283 Melody Alley'); insert into users (name, phone, address) values ('Kimberly Warren', '1-(343)213-8915', '084 3rd Road'); insert into users (name, phone, address) values ('Carl Payne', '1-(400)953-4325', '65 Green Ridge Trail'); insert into users (name, phone, address) values ('Lillian Ward', '9-(995)549-4098', '64996 Farragut Avenue'); insert into users (name, phone, address) values ('Patricia Mendoza', '6-(160)391-6036', '78 Starling Circle'); insert into users (name, phone, address) values ('Carlos Romero', '8-(518)134-2652', '76 Graceland Terrace'); insert into users (name, phone, address) values ('Steve Jacobs', '4-(326)788-8107', '7 Carberry Hill'); insert into users (name, phone, address) values ('Theresa Garza', '8-(328)248-7148', '968 Aberg Point'); insert into users (name, phone, address) values ('Wayne Reyes', '7-(452)538-8314', '51 Donald Center'); insert into users (name, phone, address) values ('Nicholas Rodriguez', '3-(120)885-5828', '888 Pawling Trail'); insert into users (name, phone, address) values ('Philip Davis', '4-(691)566-1327', '02843 West Circle'); insert into users (name, phone, address) values ('Jose Jordan', '1-(605)034-5261', '64 Colorado Hill'); insert into users (name, phone, address) values ('Lillian Wilson', '3-(568)950-4339', '04 Lakewood Street'); insert into users (name, phone, address) values ('Gerald Gardner', '8-(545)182-8403', '5307 Meadow Vale Avenue'); insert into users (name, phone, address) values ('Tammy Howard', '8-(809)238-3016', '0 Kim Plaza'); insert into users (name, phone, address) values ('Maria Campbell', '7-(114)872-4239', '83 Carioca Circle'); insert into users (name, phone, address) values ('Frances Armstrong', '0-(672)400-5279', '782 Summit Hill'); insert into users (name, phone, address) values ('Melissa Gordon', '5-(098)586-2283', '78 Pankratz Circle'); insert into users (name, phone, address) values ('Ruth Moore', '7-(561)546-2122', '48 Rieder Drive'); insert into users (name, phone, address) values ('Christina Ryan', '1-(974)355-0303', '44 Hallows Alley'); insert into users (name, phone, address) values ('Lillian Hicks', '9-(016)546-3893', '3248 Blaine Park'); insert into users (name, phone, address) values ('Jeremy Warren', '7-(659)637-3551', '94099 Pankratz Trail'); insert into users (name, phone, address) values ('Brian Bell', '3-(609)031-6851', '30982 Manitowish Plaza'); insert into users (name, phone, address) values ('Earl Powell', '4-(394)567-4277', '244 Cordelia Avenue'); insert into users (name, phone, address) values ('Lisa Warren', '6-(345)903-3020', '94806 Utah Parkway'); insert into users (name, phone, address) values ('Dennis Ruiz', '0-(306)151-9017', '22 Jenna Place'); insert into users (name, phone, address) values ('Cynthia Dixon', '2-(759)065-5755', '630 Shelley Road'); insert into users (name, phone, address) values ('Howard Mccoy', '8-(855)469-9822', '99985 Merchant Park'); insert into users (name, phone, address) values ('Billy Lopez', '4-(475)701-0689', '1895 Pearson Avenue'); insert into users (name, phone, address) values ('Bonnie Weaver', '3-(000)312-2124', '7470 Sutteridge Pass'); insert into users (name, phone, address) values ('Ernest Harper', '4-(790)914-7535', '386 Golf Pass'); insert into users (name, phone, address) values ('Howard Henry', '3-(018)409-6468', '46769 Starling Court'); insert into users (name, phone, address) values ('Janet Simpson', '6-(852)803-5813', '6343 Drewry Avenue'); insert into users (name, phone, address) values ('Jonathan Roberts', '3-(488)768-6810', '2964 Westport Street'); insert into users (name, phone, address) values ('Louise Graham', '1-(340)556-3091', '1 Hoard Pass'); insert into users (name, phone, address) values ('Ronald Watkins', '7-(730)739-1148', '7 Porter Drive'); insert into users (name, phone, address) values ('Charles Marshall', '5-(554)679-7988', '23986 Sachtjen Court'); insert into users (name, phone, address) values ('Amy Morrison', '7-(389)584-5147', '424 Sunbrook Junction'); insert into users (name, phone, address) values ('Debra Chavez', '9-(975)280-7471', '797 Browning Pass'); insert into users (name, phone, address) values ('Bruce Bowman', '5-(173)740-3970', '30242 Dapin Park'); insert into users (name, phone, address) values ('Gloria Gardner', '7-(648)198-7920', '96638 Transport Plaza'); insert into users (name, phone, address) values ('Deborah Mason', '4-(469)986-9775', '40828 Blaine Terrace'); insert into users (name, phone, address) values ('Randy Reyes', '3-(324)055-3077', '767 Barby Place'); insert into users (name, phone, address) values ('Jerry Wagner', '9-(861)456-0303', '14621 Sachs Center'); insert into users (name, phone, address) values ('Andrea Mcdonald', '0-(763)562-2847', '93 Red Cloud Park'); insert into users (name, phone, address) values ('Raymond Washington', '5-(890)646-4966', '1 8th Avenue'); insert into users (name, phone, address) values ('Philip Carr', '3-(821)763-3213', '8 Walton Street'); insert into users (name, phone, address) values ('Brenda Fisher', '9-(502)241-0675', '864 Lerdahl Drive'); insert into users (name, phone, address) values ('Amanda Hill', '2-(234)370-1828', '684 Ilene Center'); insert into users (name, phone, address) values ('William Watkins', '1-(576)403-4683', '8798 Reinke Drive'); insert into users (name, phone, address) values ('Brian Holmes', '2-(206)614-5126', '528 Blaine Plaza'); insert into users (name, phone, address) values ('Tina West', '1-(839)112-3905', '56 Maple Wood Junction'); insert into users (name, phone, address) values ('Gloria Cook', '1-(887)102-9503', '523 Esker Terrace'); insert into users (name, phone, address) values ('Chris White', '8-(463)948-3537', '613 Anhalt Way'); insert into users (name, phone, address) values ('Sarah Thomas', '9-(505)318-3181', '45 Sullivan Point'); insert into users (name, phone, address) values ('Judy Burns', '0-(169)404-8058', '23705 Rowland Avenue'); insert into users (name, phone, address) values ('Juan Shaw', '4-(038)592-1235', '7574 Toban Street'); insert into users (name, phone, address) values ('Martin Simpson', '4-(010)592-0563', '84049 Corben Terrace'); insert into users (name, phone, address) values ('Billy Morris', '3-(131)164-1509', '5 Summer Ridge Parkway'); insert into users (name, phone, address) values ('Carl Holmes', '1-(699)285-4904', '5 Division Center'); insert into users (name, phone, address) values ('Bonnie Riley', '0-(854)450-7882', '0 Bay Plaza'); insert into users (name, phone, address) values ('Jesse Medina', '3-(230)287-6817', '73 Moland Court'); insert into users (name, phone, address) values ('Kathleen Burton', '9-(952)471-9646', '672 Shoshone Drive'); insert into users (name, phone, address) values ('Diane Franklin', '6-(381)595-7440', '82658 Green Ridge Road'); insert into users (name, phone, address) values ('Debra Day', '2-(443)909-6115', '44293 Fallview Point'); insert into users (name, phone, address) values ('Barbara Hudson', '6-(941)186-0007', '07097 Fremont Trail'); insert into users (name, phone, address) values ('Evelyn Ryan', '3-(567)754-2880', '51660 Laurel Road'); insert into users (name, phone, address) values ('Ann Reid', '6-(752)296-4370', '52 Oak Trail'); insert into users (name, phone, address) values ('Billy Taylor', '7-(638)181-3928', '9866 Hanover Trail'); insert into users (name, phone, address) values ('Sean Carter', '3-(682)457-1332', '94 Wayridge Place'); insert into users (name, phone, address) values ('Jose Hawkins', '6-(521)199-9430', '40 Porter Street'); insert into users (name, phone, address) values ('Brenda Lawson', '1-(894)816-5274', '773 Novick Drive'); insert into users (name, phone, address) values ('Frank Phillips', '0-(922)359-1694', '18 Westerfield Terrace'); insert into users (name, phone, address) values ('Kimberly Scott', '4-(425)589-6928', '64 Commercial Road'); insert into users (name, phone, address) values ('Kathryn Ferguson', '4-(254)536-1416', '62888 Summit Way'); insert into users (name, phone, address) values ('Sarah Hunt', '5-(760)237-9992', '872 Lyons Plaza'); insert into users (name, phone, address) values ('Sara Crawford', '9-(323)223-4385', '90161 Ruskin Plaza'); insert into users (name, phone, address) values ('Gerald Lawrence', '8-(862)081-8081', '852 Gateway Plaza'); insert into users (name, phone, address) values ('Jeffrey Washington', '6-(718)877-4860', '92 Anhalt Plaza'); insert into users (name, phone, address) values ('Lisa Reid', '2-(439)451-5909', '2785 Stone Corner Circle'); insert into users (name, phone, address) values ('Todd Stanley', '2-(726)789-0936', '62 Starling Way'); insert into users (name, phone, address) values ('Jerry Matthews', '3-(108)173-2449', '85 Kim Avenue'); insert into users (name, phone, address) values ('Gerald Marshall', '5-(938)654-7462', '818 Little Fleur Plaza'); insert into users (name, phone, address) values ('Joan Knight', '4-(838)907-2937', '8346 Pawling Circle'); insert into users (name, phone, address) values ('Adam Moore', '4-(612)734-4016', '5961 Michigan Parkway'); insert into users (name, phone, address) values ('William Sullivan', '6-(704)795-5268', '79906 Mallard Hill'); insert into users (name, phone, address) values ('Steven Campbell', '1-(868)194-6317', '3 Bashford Parkway'); insert into users (name, phone, address) values ('Billy Richardson', '3-(765)827-1387', '47 Crest Line Park'); insert into users (name, phone, address) values ('Raymond Brooks', '8-(514)157-6912', '286 Becker Road'); insert into users (name, phone, address) values ('Matthew Nichols', '1-(342)970-7074', '1242 Garrison Lane'); insert into users (name, phone, address) values ('Jennifer Rodriguez', '4-(608)251-9929', '23436 Red Cloud Drive'); insert into users (name, phone, address) values ('Christina Mcdonald', '9-(102)042-0374', '643 Stang Lane'); insert into users (name, phone, address) values ('Cheryl Simpson', '9-(241)154-8152', '74 Sutteridge Park'); insert into users (name, phone, address) values ('Lillian Edwards', '8-(566)925-4146', '82 Bunting Pass'); insert into users (name, phone, address) values ('Doris Hart', '8-(742)202-6161', '3 Rusk Street'); insert into users (name, phone, address) values ('Thomas Mitchell', '3-(942)453-0328', '073 Golf Court'); insert into users (name, phone, address) values ('Terry Sanders', '5-(200)478-9452', '7 Prairie Rose Point'); insert into users (name, phone, address) values ('Kathryn Crawford', '0-(997)974-2361', '47117 Becker Pass'); insert into users (name, phone, address) values ('Carlos Burns', '9-(864)837-7216', '40 Johnson Terrace'); insert into users (name, phone, address) values ('Gregory Stephens', '8-(318)726-9169', '8 Hollow Ridge Park'); insert into users (name, phone, address) values ('Joseph Griffin', '0-(115)617-0814', '5 Manley Center'); insert into users (name, phone, address) values ('Raymond Willis', '5-(717)083-7669', '6557 Fremont Road'); insert into users (name, phone, address) values ('Daniel Reed', '4-(221)882-2831', '62 Grim Pass'); insert into users (name, phone, address) values ('Nicole Cruz', '9-(949)058-7563', '7 6th Circle'); insert into users (name, phone, address) values ('Laura Hawkins', '5-(921)084-6710', '2458 Melby Center'); insert into users (name, phone, address) values ('Gerald Olson', '5-(109)212-1062', '1 Sycamore Lane'); insert into users (name, phone, address) values ('James Reyes', '7-(203)397-5650', '999 Arkansas Hill'); insert into users (name, phone, address) values ('Kevin Bowman', '3-(871)951-1795', '6 Independence Street'); insert into users (name, phone, address) values ('Ruth Wood', '6-(441)754-6821', '52219 Twin Pines Street'); insert into users (name, phone, address) values ('Deborah Banks', '8-(561)017-1521', '7953 Barnett Street'); insert into users (name, phone, address) values ('Debra Chavez', '5-(662)118-7335', '81 Donald Parkway'); insert into users (name, phone, address) values ('Louis Rodriguez', '6-(302)346-9009', '02792 Acker Trail'); insert into users (name, phone, address) values ('Juan Henderson', '8-(297)411-5975', '287 Northport Point'); insert into users (name, phone, address) values ('Daniel Watkins', '2-(439)442-5344', '35066 Dahle Road'); insert into users (name, phone, address) values ('Eugene Carpenter', '8-(383)554-2139', '5 Bluestem Avenue'); insert into users (name, phone, address) values ('Ruby Fowler', '5-(886)767-8316', '521 Fairfield Way'); insert into users (name, phone, address) values ('Christopher Griffin', '7-(479)741-0941', '1 Manley Terrace'); insert into users (name, phone, address) values ('Ralph Little', '7-(205)155-4317', '16 Morning Pass'); insert into users (name, phone, address) values ('Amy Armstrong', '0-(352)066-9825', '87 Dapin Court'); insert into users (name, phone, address) values ('Juan Dean', '0-(462)649-4313', '690 Esker Drive'); insert into users (name, phone, address) values ('Wayne Watkins', '1-(716)680-2977', '2 Sage Street'); insert into users (name, phone, address) values ('Andrew Torres', '4-(851)351-9470', '5 Sommers Drive'); insert into users (name, phone, address) values ('Anne Clark', '7-(433)848-6878', '5 Hudson Alley'); insert into users (name, phone, address) values ('Jerry Cole', '9-(025)735-3755', '393 Northridge Drive'); insert into users (name, phone, address) values ('Virginia Gardner', '0-(536)426-0455', '5713 Toban Terrace'); insert into users (name, phone, address) values ('Andrew Shaw', '2-(214)278-4301', '286 Lien Court'); insert into users (name, phone, address) values ('Daniel Mitchell', '9-(796)831-4230', '01939 Bellgrove Center'); insert into users (name, phone, address) values ('Sharon Spencer', '3-(256)604-4471', '507 Eastwood Alley'); insert into users (name, phone, address) values ('Matthew Johnston', '7-(068)442-5234', '1618 Park Meadow Crossing'); insert into users (name, phone, address) values ('Amanda Boyd', '2-(213)723-6832', '9 Fulton Lane'); insert into users (name, phone, address) values ('Tammy Matthews', '4-(868)664-2539', '1 Hagan Place'); insert into users (name, phone, address) values ('Benjamin Williams', '5-(949)489-6412', '20 Anniversary Drive'); insert into users (name, phone, address) values ('Raymond Simpson', '0-(971)979-2656', '47 Sunbrook Street'); insert into users (name, phone, address) values ('Marie Frazier', '6-(330)491-7691', '8 Union Trail'); insert into users (name, phone, address) values ('Todd Wagner', '6-(805)954-5679', '3 Ridgeway Drive'); insert into users (name, phone, address) values ('Wanda Ortiz', '8-(872)069-0464', '095 Village Junction'); insert into users (name, phone, address) values ('Carlos Ramirez', '2-(663)009-1141', '632 Evergreen Street'); insert into users (name, phone, address) values ('Lisa Arnold', '8-(756)832-6557', '33 Kensington Circle'); insert into users (name, phone, address) values ('Laura Bryant', '4-(117)538-5118', '7 Victoria Point'); insert into users (name, phone, address) values ('Dennis Ramirez', '0-(466)286-9023', '4548 John Wall Circle'); insert into users (name, phone, address) values ('Doris Cooper', '7-(413)293-8867', '2 Debra Crossing'); insert into users (name, phone, address) values ('Robin Perry', '6-(048)813-3543', '34 Hudson Point'); insert into users (name, phone, address) values ('Arthur Elliott', '3-(582)161-8882', '9792 Anzinger Parkway'); insert into users (name, phone, address) values ('Henry Ryan', '9-(502)568-6071', '36 Norway Maple Parkway'); insert into users (name, phone, address) values ('Kathy Reyes', '1-(646)357-4408', '314 Mcguire Alley'); insert into users (name, phone, address) values ('Robert Perkins', '8-(236)005-2889', '92 Main Parkway'); insert into users (name, phone, address) values ('Diane Ellis', '3-(451)349-3628', '4 Park Meadow Avenue'); insert into users (name, phone, address) values ('Judith Washington', '5-(238)533-5301', '97 Pearson Circle'); insert into users (name, phone, address) values ('Melissa Wells', '5-(411)741-4052', '71333 Wayridge Crossing'); insert into users (name, phone, address) values ('Carolyn Rivera', '8-(147)879-9395', '6 Vahlen Street'); insert into users (name, phone, address) values ('Lori Gordon', '9-(731)928-8006', '86 Sundown Court'); insert into users (name, phone, address) values ('Bonnie Mason', '6-(363)400-1992', '67745 Thackeray Parkway'); insert into users (name, phone, address) values ('Wayne Myers', '8-(567)468-6213', '948 Ramsey Hill'); insert into users (name, phone, address) values ('Melissa Murphy', '5-(680)532-1697', '053 Little Fleur Plaza'); insert into users (name, phone, address) values ('Emily Peterson', '8-(365)578-2632', '41351 Hoepker Crossing'); insert into users (name, phone, address) values ('Rebecca Baker', '9-(357)062-0620', '37 Westend Terrace'); insert into users (name, phone, address) values ('Walter Hall', '8-(839)164-6417', '546 American Crossing'); insert into users (name, phone, address) values ('Bruce Parker', '0-(704)307-6511', '2421 Mockingbird Parkway'); insert into users (name, phone, address) values ('Kathy Burke', '3-(756)397-0111', '29233 Burning Wood Lane'); insert into users (name, phone, address) values ('Timothy Stone', '8-(535)604-0116', '5197 Roxbury Alley'); insert into users (name, phone, address) values ('Earl Burton', '9-(730)566-8068', '045 Continental Hill'); insert into users (name, phone, address) values ('Kelly Garza', '8-(132)801-4529', '20196 Oak Alley'); insert into users (name, phone, address) values ('Nicole Fowler', '8-(729)351-0891', '4 Tennyson Lane'); insert into users (name, phone, address) values ('Paula Watson', '4-(610)288-5523', '2 Sachs Plaza'); insert into users (name, phone, address) values ('Sara Welch', '9-(132)133-5514', '52868 Vernon Point'); insert into users (name, phone, address) values ('Brandon Porter', '7-(659)266-8549', '3818 Cardinal Circle'); insert into users (name, phone, address) values ('Rachel Hawkins', '2-(435)871-3127', '3260 Mayfield Hill'); insert into users (name, phone, address) values ('Wayne Bowman', '3-(438)168-5074', '350 Haas Parkway'); insert into users (name, phone, address) values ('Ann Perez', '2-(562)609-4587', '50 Cottonwood Place'); insert into users (name, phone, address) values ('Earl Nguyen', '1-(639)650-1297', '16100 Amoth Circle'); insert into users (name, phone, address) values ('Brian Gibson', '6-(023)902-5099', '46950 Derek Park'); insert into users (name, phone, address) values ('Norma Howard', '1-(758)232-6437', '25782 Logan Plaza'); insert into users (name, phone, address) values ('Sean Carr', '6-(373)787-9365', '462 Doe Crossing Road'); insert into users (name, phone, address) values ('Marilyn Wagner', '2-(775)243-7814', '07 Center Lane'); insert into users (name, phone, address) values ('Eric Murphy', '8-(980)978-8580', '375 Lerdahl Junction'); insert into users (name, phone, address) values ('Cynthia Garcia', '9-(551)449-3558', '42 4th Plaza'); insert into users (name, phone, address) values ('Catherine Price', '5-(588)008-5388', '6 Lotheville Pass'); insert into users (name, phone, address) values ('Mildred Simmons', '5-(220)491-9278', '91 Magdeline Plaza'); insert into users (name, phone, address) values ('Alan Freeman', '7-(877)162-5553', '2874 Pepper Wood Court'); insert into users (name, phone, address) values ('Paula Franklin', '6-(162)004-8447', '0 Elgar Street'); insert into users (name, phone, address) values ('Jerry Bennett', '9-(962)541-3965', '4 Linden Terrace'); insert into users (name, phone, address) values ('Anna Reynolds', '4-(807)445-4340', '424 Hollow Ridge Drive'); insert into users (name, phone, address) values ('Ruby Morris', '1-(951)097-3468', '7826 Clarendon Hill'); insert into users (name, phone, address) values ('Jean Simmons', '4-(253)946-7116', '91294 8th Way'); insert into users (name, phone, address) values ('Jeffrey Washington', '8-(394)158-6672', '3317 Spenser Place'); insert into users (name, phone, address) values ('Ann Knight', '8-(158)746-5865', '020 Brickson Park Avenue'); insert into users (name, phone, address) values ('Ruth Adams', '8-(946)724-4146', '6 Dovetail Road'); insert into users (name, phone, address) values ('Ruby Hayes', '1-(029)653-7836', '09 Northview Circle'); insert into users (name, phone, address) values ('Louise Stone', '1-(275)556-8846', '39 Briar Crest Place'); insert into users (name, phone, address) values ('Barbara Brooks', '7-(267)562-1727', '2672 Lyons Parkway'); insert into users (name, phone, address) values ('Joyce Dunn', '2-(196)943-9291', '45 Sauthoff Pass'); insert into users (name, phone, address) values ('Anthony Kennedy', '4-(993)983-0689', '42 Dunning Street'); insert into users (name, phone, address) values ('Deborah Cruz', '7-(435)699-2655', '8 Continental Drive'); insert into users (name, phone, address) values ('Joseph Walker', '0-(719)133-7561', '22715 Kenwood Center'); insert into users (name, phone, address) values ('Debra Wilson', '3-(025)704-4123', '43337 Tony Point'); insert into users (name, phone, address) values ('Kathy Murphy', '8-(261)334-1864', '0 Bunting Lane'); insert into users (name, phone, address) values ('Craig Daniels', '8-(772)609-5066', '2476 Kenwood Alley'); insert into users (name, phone, address) values ('James Hawkins', '1-(608)053-6233', '9 Little Fleur Road'); insert into users (name, phone, address) values ('Ronald Bennett', '9-(573)464-9944', '9777 New Castle Plaza'); insert into users (name, phone, address) values ('Lillian Gilbert', '8-(633)027-8952', '51 Westend Plaza'); insert into users (name, phone, address) values ('Roy Butler', '0-(449)860-7229', '2746 Eagan Court'); insert into users (name, phone, address) values ('Henry Fuller', '3-(147)264-4998', '16 Doe Crossing Avenue'); insert into users (name, phone, address) values ('Joan Wagner', '7-(349)928-0401', '8671 Melrose Trail'); insert into users (name, phone, address) values ('Sharon Freeman', '7-(686)345-5658', '007 Carioca Drive'); insert into users (name, phone, address) values ('Ruth Fisher', '4-(119)694-4142', '091 Vernon Place'); insert into users (name, phone, address) values ('Edward Morrison', '1-(094)731-8924', '25422 Upham Trail'); insert into users (name, phone, address) values ('Judith Palmer', '1-(649)361-7398', '23622 Southridge Avenue'); insert into users (name, phone, address) values ('Clarence Watkins', '6-(698)060-3823', '15138 Merchant Trail'); insert into users (name, phone, address) values ('Ruby Martin', '5-(261)472-4405', '1486 Dahle Way'); insert into users (name, phone, address) values ('Nancy Mitchell', '4-(842)970-9296', '67760 Banding Parkway'); insert into users (name, phone, address) values ('Deborah Robertson', '1-(179)959-8481', '3011 Spaight Court'); insert into users (name, phone, address) values ('Ann Carroll', '4-(378)760-8413', '567 Ridgeway Trail'); insert into users (name, phone, address) values ('Lillian Lopez', '4-(575)344-0263', '79596 Maple Point'); insert into users (name, phone, address) values ('Rachel Barnes', '8-(371)661-1276', '00165 Elgar Center'); insert into users (name, phone, address) values ('Barbara Gray', '7-(024)234-3538', '8578 Transport Court'); insert into users (name, phone, address) values ('Aaron Mason', '7-(154)145-7330', '6 Cascade Lane'); insert into users (name, phone, address) values ('Nancy Nelson', '9-(296)320-1005', '69 Monument Plaza'); insert into users (name, phone, address) values ('Chris Snyder', '1-(302)337-9563', '7 Derek Point'); insert into users (name, phone, address) values ('Bruce Hall', '1-(305)471-5942', '812 Menomonie Plaza'); insert into users (name, phone, address) values ('Thomas Clark', '7-(999)210-4275', '5 Bunker Hill Way'); insert into users (name, phone, address) values ('Eric Kelley', '0-(720)268-9397', '4 Rockefeller Place'); insert into users (name, phone, address) values ('Barbara Snyder', '2-(404)850-4288', '5067 Hallows Point'); insert into users (name, phone, address) values ('Ernest Watson', '6-(171)383-9719', '66305 Kedzie Hill'); insert into users (name, phone, address) values ('Janice Hamilton', '8-(787)337-4821', '7637 Lindbergh Plaza'); insert into users (name, phone, address) values ('Anna Arnold', '1-(433)409-0641', '71993 Eastwood Avenue'); insert into users (name, phone, address) values ('Bruce Coleman', '0-(109)221-1300', '84 Spohn Street'); insert into users (name, phone, address) values ('Jean Morris', '2-(446)872-6418', '30277 Ruskin Circle'); insert into users (name, phone, address) values ('Ann Williams', '6-(960)382-5633', '1 Stang Road'); insert into users (name, phone, address) values ('Martha Snyder', '9-(635)137-4783', '4 Morningstar Lane'); insert into users (name, phone, address) values ('Gerald Alexander', '2-(968)628-5053', '819 David Drive'); insert into users (name, phone, address) values ('Henry Shaw', '0-(658)228-8457', '57 Hagan Crossing'); insert into users (name, phone, address) values ('Mark Robinson', '1-(145)483-4410', '7 Claremont Lane'); insert into users (name, phone, address) values ('Diane Jackson', '6-(777)942-5268', '93739 Texas Terrace'); insert into users (name, phone, address) values ('Ruby Webb', '0-(044)833-4224', '5 Westend Lane'); insert into users (name, phone, address) values ('Angela Black', '3-(956)821-5600', '814 Katie Hill'); insert into users (name, phone, address) values ('Melissa Carr', '1-(772)854-0440', '8 Merry Center'); insert into users (name, phone, address) values ('Jennifer Lopez', '6-(703)895-3715', '132 Browning Court'); insert into users (name, phone, address) values ('Susan Jordan', '9-(807)819-1753', '3184 Brentwood Trail'); insert into users (name, phone, address) values ('Joshua Walker', '7-(160)367-8624', '0473 Steensland Trail'); insert into users (name, phone, address) values ('Matthew Hanson', '8-(763)342-7769', '5642 Sommers Hill'); insert into users (name, phone, address) values ('Stephanie Wagner', '1-(053)390-1018', '36 Di Loreto Drive'); insert into users (name, phone, address) values ('Helen Mason', '3-(061)931-3562', '2 North Circle'); insert into users (name, phone, address) values ('Larry Little', '2-(233)275-6460', '1 Forster Circle'); insert into users (name, phone, address) values ('Chris Johnston', '7-(663)606-1544', '42 Chive Hill'); insert into users (name, phone, address) values ('Nicole Stanley', '2-(484)903-4977', '1474 Darwin Avenue'); insert into users (name, phone, address) values ('Sharon Collins', '1-(533)582-0185', '78277 Ronald Regan Drive'); insert into users (name, phone, address) values ('Pamela Davis', '1-(645)717-7812', '5892 Charing Cross Place'); insert into users (name, phone, address) values ('Jacqueline Sanders', '1-(410)614-1724', '2 Crowley Hill'); insert into users (name, phone, address) values ('Phillip Scott', '3-(272)220-3903', '660 Grim Park'); insert into users (name, phone, address) values ('Joan Murphy', '1-(850)886-4108', '4833 Pine View Pass'); insert into users (name, phone, address) values ('Gregory Thompson', '1-(864)368-6866', '4 Bluestem Trail'); insert into users (name, phone, address) values ('Deborah Cole', '7-(491)203-5852', '4588 Bunting Parkway'); insert into users (name, phone, address) values ('Stephanie Wright', '8-(755)963-3737', '4 American Court'); insert into users (name, phone, address) values ('Kathy Stone', '2-(759)588-1779', '69 Express Point'); insert into users (name, phone, address) values ('Diana Mason', '5-(619)243-5996', '222 Sage Point'); insert into users (name, phone, address) values ('Stephen Dunn', '1-(908)298-3752', '7085 Warner Circle'); insert into users (name, phone, address) values ('Sharon Howard', '6-(717)512-4677', '95200 Wayridge Crossing'); insert into users (name, phone, address) values ('Phyllis Sims', '1-(679)535-9979', '2 Meadow Ridge Alley'); insert into users (name, phone, address) values ('Michelle Olson', '3-(177)807-8139', '055 Katie Point'); insert into users (name, phone, address) values ('Catherine Stephens', '2-(448)867-1323', '2 Hoard Plaza'); insert into users (name, phone, address) values ('Judith Burns', '7-(100)067-4907', '5 Cardinal Trail'); insert into users (name, phone, address) values ('Lillian Richards', '4-(252)395-6920', '9501 Barby Lane'); insert into users (name, phone, address) values ('Kathleen Lee', '8-(604)972-3224', '5535 Del Mar Alley'); insert into users (name, phone, address) values ('Thomas Ramirez', '8-(642)148-7869', '1 Armistice Terrace'); insert into users (name, phone, address) values ('Angela Ward', '7-(548)536-8925', '19 Jenna Plaza'); insert into users (name, phone, address) values ('Heather Johnston', '7-(768)588-2841', '66 Northland Lane'); insert into users (name, phone, address) values ('Billy Graham', '2-(662)470-9158', '7596 Jana Pass'); insert into users (name, phone, address) values ('Albert Payne', '1-(634)270-7228', '4028 Ludington Parkway'); insert into users (name, phone, address) values ('Karen Jordan', '4-(466)841-7608', '744 Sheridan Crossing'); insert into users (name, phone, address) values ('Nancy Rivera', '4-(306)398-8171', '93067 New Castle Avenue'); insert into users (name, phone, address) values ('Mark Baker', '1-(180)798-7979', '37781 Morningstar Center'); insert into users (name, phone, address) values ('Cynthia Kim', '8-(309)364-9302', '3 Red Cloud Junction'); insert into users (name, phone, address) values ('Terry Wagner', '7-(122)068-2101', '3 Judy Center'); insert into users (name, phone, address) values ('Cheryl Sims', '5-(030)569-4927', '4189 Nova Road'); insert into users (name, phone, address) values ('Jimmy Morales', '2-(353)478-7738', '0188 4th Street'); insert into users (name, phone, address) values ('Jessica Knight', '4-(652)565-8182', '58 Emmet Street'); insert into users (name, phone, address) values ('Sean Alvarez', '5-(594)040-7575', '866 Cottonwood Circle'); insert into users (name, phone, address) values ('Angela Smith', '4-(875)527-0023', '803 Spaight Parkway'); insert into users (name, phone, address) values ('Annie Freeman', '8-(202)084-4689', '499 Westerfield Hill'); insert into users (name, phone, address) values ('Mary Lopez', '2-(665)424-1653', '6308 Hansons Avenue'); insert into users (name, phone, address) values ('John Bradley', '0-(104)671-7810', '20056 Melody Place'); insert into users (name, phone, address) values ('Rose Richards', '6-(446)795-5716', '06 Thackeray Way'); insert into users (name, phone, address) values ('Eugene Lewis', '7-(163)435-3404', '274 Hintze Hill'); insert into users (name, phone, address) values ('Beverly Gilbert', '7-(492)409-9002', '01385 Bashford Point'); insert into users (name, phone, address) values ('Shirley Perry', '2-(049)572-5243', '919 Redwing Park'); insert into users (name, phone, address) values ('Janice Hernandez', '6-(140)305-1832', '03943 Emmet Plaza'); insert into users (name, phone, address) values ('Alan Bishop', '7-(816)302-2734', '43 Northridge Plaza'); insert into users (name, phone, address) values ('Diane Ramos', '8-(802)666-5524', '72 Sachtjen Circle'); insert into users (name, phone, address) values ('John Murphy', '9-(644)648-0420', '499 Warner Place'); insert into users (name, phone, address) values ('Russell Marshall', '7-(045)865-5408', '47 Red Cloud Terrace'); insert into users (name, phone, address) values ('Denise Barnes', '1-(105)633-5115', '653 Stuart Road'); insert into users (name, phone, address) values ('Carolyn Washington', '2-(802)247-4276', '542 Dakota Trail'); insert into users (name, phone, address) values ('Ashley Williams', '9-(256)669-0290', '76 Victoria Avenue'); insert into users (name, phone, address) values ('Melissa Peters', '6-(033)283-4832', '7 Loeprich Junction'); insert into users (name, phone, address) values ('John Weaver', '0-(593)917-7761', '2 Mariners Cove Center'); insert into users (name, phone, address) values ('David Ellis', '1-(892)272-9366', '2 Northview Plaza'); insert into users (name, phone, address) values ('Irene Foster', '2-(553)378-4944', '0451 John Wall Court'); insert into users (name, phone, address) values ('Andrea Martinez', '8-(277)471-7340', '6 Tomscot Avenue'); insert into users (name, phone, address) values ('Ashley Wright', '2-(174)738-5932', '800 Redwing Drive'); insert into users (name, phone, address) values ('Sara Larson', '6-(763)835-0486', '1686 East Center'); insert into users (name, phone, address) values ('Elizabeth Fernandez', '7-(094)331-4948', '3 Bellgrove Alley'); insert into users (name, phone, address) values ('Gregory Ramos', '3-(025)938-7372', '42 Rieder Terrace'); insert into users (name, phone, address) values ('Marie Ross', '7-(475)168-1116', '3824 Upham Way'); insert into users (name, phone, address) values ('Ashley Bishop', '2-(445)203-9467', '30 Eastlawn Terrace'); insert into users (name, phone, address) values ('Jennifer Cox', '4-(774)758-0218', '907 Kedzie Way'); insert into users (name, phone, address) values ('Ernest Graham', '2-(813)380-3133', '88 Pepper Wood Lane'); insert into users (name, phone, address) values ('Katherine Daniels', '4-(407)483-6013', '4 Mcguire Hill'); insert into users (name, phone, address) values ('Sandra Alvarez', '3-(516)664-5101', '4 Barby Junction'); insert into users (name, phone, address) values ('Irene Hansen', '9-(337)962-6716', '1 Southridge Circle'); insert into users (name, phone, address) values ('Sarah Fernandez', '2-(941)899-2071', '05 Rockefeller Street'); insert into users (name, phone, address) values ('John Cole', '2-(753)892-0269', '2432 Corben Park'); insert into users (name, phone, address) values ('Lori Daniels', '2-(178)331-6015', '834 Crowley Court'); insert into users (name, phone, address) values ('Joe Jackson', '8-(869)371-1662', '6 Del Mar Road'); insert into users (name, phone, address) values ('Mildred Walker', '6-(454)406-3406', '51980 John Wall Avenue'); insert into users (name, phone, address) values ('Harold Ray', '5-(098)601-9342', '8536 Village Crossing'); insert into users (name, phone, address) values ('Catherine Moreno', '8-(797)506-2872', '6 Bobwhite Alley'); insert into users (name, phone, address) values ('Gerald Moore', '8-(621)284-7054', '50 Mallory Pass'); insert into users (name, phone, address) values ('Thomas Wood', '8-(127)804-7971', '703 Clyde Gallagher Trail'); insert into users (name, phone, address) values ('Carolyn Ortiz', '1-(956)341-0081', '944 Grover Place'); insert into users (name, phone, address) values ('Rose Phillips', '7-(492)925-1065', '994 Arizona Lane'); insert into users (name, phone, address) values ('Randy Palmer', '2-(185)008-5543', '82 Cambridge Road'); insert into users (name, phone, address) values ('Henry Clark', '9-(904)749-2796', '572 Clemons Crossing'); insert into users (name, phone, address) values ('Joe Wright', '2-(318)692-2619', '5 Melody Plaza'); insert into users (name, phone, address) values ('Laura Reynolds', '8-(576)935-5535', '58325 Lukken Trail'); insert into users (name, phone, address) values ('Janice Austin', '7-(153)141-0634', '76 Everett Circle'); insert into users (name, phone, address) values ('Dorothy Hart', '6-(413)009-5423', '073 Rigney Road'); insert into users (name, phone, address) values ('Betty Stevens', '1-(474)718-0503', '48784 Florence Terrace'); insert into users (name, phone, address) values ('Adam Fisher', '5-(352)777-7537', '1684 Oriole Trail'); insert into users (name, phone, address) values ('Ernest Duncan', '7-(918)572-2013', '8295 Fairview Center'); insert into users (name, phone, address) values ('Paul Phillips', '6-(236)234-4881', '088 Glacier Hill Street'); insert into users (name, phone, address) values ('Dorothy Mills', '2-(233)498-8054', '21 Mifflin Road'); insert into users (name, phone, address) values ('Brenda Banks', '6-(212)391-2696', '030 Bunker Hill Court'); insert into users (name, phone, address) values ('Shirley Reyes', '1-(647)755-8273', '8037 Del Mar Center'); insert into users (name, phone, address) values ('Ashley Anderson', '0-(684)931-8985', '9 Hintze Crossing'); insert into users (name, phone, address) values ('Chris Arnold', '2-(615)353-9650', '2846 Kim Avenue'); insert into users (name, phone, address) values ('Helen Evans', '9-(511)259-8562', '0795 American Pass'); insert into users (name, phone, address) values ('Karen Gardner', '8-(250)462-9929', '968 Elgar Hill'); insert into users (name, phone, address) values ('Ralph Nichols', '2-(930)697-0818', '2139 Service Plaza'); insert into users (name, phone, address) values ('Betty Cruz', '7-(859)015-9214', '8645 Florence Court'); insert into users (name, phone, address) values ('Paula Foster', '4-(918)258-0546', '496 Fremont Alley'); insert into users (name, phone, address) values ('Helen Ramos', '4-(510)726-0945', '4354 Lakeland Place'); insert into users (name, phone, address) values ('Amy Walker', '3-(060)095-6168', '9 Fairfield Place'); insert into users (name, phone, address) values ('Mildred Wallace', '8-(582)778-5850', '95 Shoshone Plaza'); insert into users (name, phone, address) values ('Jimmy Peters', '6-(870)810-7820', '08929 Stang Point'); insert into users (name, phone, address) values ('Joshua Burke', '9-(242)215-7969', '16 Kedzie Pass'); insert into users (name, phone, address) values ('Elizabeth Garcia', '4-(457)787-5155', '37883 Golf Way'); insert into users (name, phone, address) values ('Eric Jenkins', '3-(764)962-5267', '82505 Elmside Plaza'); insert into users (name, phone, address) values ('Jean Johnson', '9-(290)735-3547', '2577 Mayer Parkway'); insert into users (name, phone, address) values ('Diana Hawkins', '1-(357)374-1164', '8 Main Trail'); insert into users (name, phone, address) values ('Lisa Myers', '9-(090)828-8572', '8143 Kedzie Alley'); insert into users (name, phone, address) values ('Kathryn Wheeler', '8-(176)399-0062', '34194 Goodland Street'); insert into users (name, phone, address) values ('Shawn Andrews', '5-(336)208-8509', '41132 Tony Court'); insert into users (name, phone, address) values ('Norma Chapman', '5-(064)906-4120', '56058 Browning Hill'); insert into users (name, phone, address) values ('Ernest Henry', '9-(579)880-0720', '06 Killdeer Junction'); insert into users (name, phone, address) values ('Julia Rogers', '2-(762)719-6263', '4932 Buell Alley'); insert into users (name, phone, address) values ('Linda Murray', '4-(958)982-0733', '82925 Karstens Plaza'); insert into users (name, phone, address) values ('Diana Ray', '8-(058)557-3038', '6892 Delaware Trail'); insert into users (name, phone, address) values ('Robin Sanchez', '9-(785)843-2167', '33129 International Center'); insert into users (name, phone, address) values ('Ashley Peters', '0-(145)754-7475', '1439 Florence Parkway'); insert into users (name, phone, address) values ('Nicole Mcdonald', '1-(737)877-9455', '04439 Blue Bill Park Terrace'); insert into users (name, phone, address) values ('Ryan Tucker', '4-(784)690-0312', '7 Blue Bill Park Way'); insert into users (name, phone, address) values ('Timothy Weaver', '1-(121)893-6171', '15 Shopko Plaza'); insert into users (name, phone, address) values ('Wayne Carr', '6-(081)814-1120', '25 Emmet Place'); insert into users (name, phone, address) values ('Mary Garcia', '2-(789)474-0307', '14 Darwin Parkway'); insert into users (name, phone, address) values ('Carol Riley', '8-(080)999-7067', '84 School Alley'); insert into users (name, phone, address) values ('Ryan Hernandez', '8-(250)459-1573', '58 Westridge Center'); insert into users (name, phone, address) values ('Christopher Gutierrez', '8-(968)552-8207', '5857 Little Fleur Drive'); insert into users (name, phone, address) values ('Kathryn Ruiz', '1-(107)394-8908', '62 Burrows Terrace'); insert into users (name, phone, address) values ('Kimberly Jenkins', '5-(379)280-1513', '7456 Moulton Pass'); insert into users (name, phone, address) values ('Teresa Ellis', '2-(525)580-9143', '23222 Mitchell Junction'); insert into users (name, phone, address) values ('Jose Ellis', '6-(707)721-4469', '08 Grim Crossing'); insert into users (name, phone, address) values ('Jennifer Crawford', '0-(424)881-8933', '79586 Bay Hill'); insert into users (name, phone, address) values ('Antonio Gordon', '2-(314)741-9916', '2808 Fieldstone Circle'); insert into users (name, phone, address) values ('Shirley Mcdonald', '8-(816)587-6185', '7 Victoria Drive'); insert into users (name, phone, address) values ('Evelyn Fox', '7-(878)523-7873', '76 Clarendon Park'); insert into users (name, phone, address) values ('Russell Knight', '7-(794)295-6588', '3 Warrior Court'); insert into users (name, phone, address) values ('Diane Perez', '9-(642)106-6993', '91 Burning Wood Lane'); insert into users (name, phone, address) values ('Diana Dean', '7-(270)471-8237', '7 Sugar Alley'); insert into users (name, phone, address) values ('Patricia Thompson', '7-(560)533-8582', '1 Mockingbird Trail'); insert into users (name, phone, address) values ('Sandra Hart', '0-(572)659-2095', '870 Lyons Lane'); insert into users (name, phone, address) values ('Steven Parker', '2-(219)303-3502', '60256 Sunbrook Lane'); insert into users (name, phone, address) values ('Irene Crawford', '2-(184)684-7363', '08 Lillian Point'); insert into users (name, phone, address) values ('Phillip Long', '2-(698)279-4194', '062 Emmet Crossing'); insert into users (name, phone, address) values ('Lori Rodriguez', '9-(262)042-6693', '88 Arapahoe Park'); insert into users (name, phone, address) values ('Samuel Boyd', '8-(947)271-2370', '659 John Wall Place'); insert into users (name, phone, address) values ('Gregory Myers', '4-(127)880-8678', '263 Fallview Pass'); insert into users (name, phone, address) values ('Philip Wells', '6-(344)427-9217', '29268 West Crossing'); insert into users (name, phone, address) values ('Kimberly Foster', '3-(203)002-5979', '24239 Orin Hill'); insert into users (name, phone, address) values ('Lillian Williams', '6-(794)576-5033', '952 Grasskamp Crossing'); insert into users (name, phone, address) values ('Robert Cox', '4-(734)024-2059', '53329 Gerald Pass'); insert into users (name, phone, address) values ('Christopher Phillips', '8-(853)461-2232', '36 Havey Plaza'); insert into users (name, phone, address) values ('Kathleen Ward', '8-(486)634-4307', '68 Vahlen Lane'); insert into users (name, phone, address) values ('Peter Gordon', '2-(760)233-0455', '94862 Jenna Junction'); insert into users (name, phone, address) values ('Sean Reynolds', '1-(550)558-9767', '458 Washington Circle'); insert into users (name, phone, address) values ('Cheryl Banks', '8-(826)236-4009', '8 Laurel Circle'); insert into users (name, phone, address) values ('Bruce Davis', '0-(260)063-0107', '82436 Cardinal Circle'); insert into users (name, phone, address) values ('Theresa Austin', '3-(764)114-0942', '23 Lake View Alley'); insert into users (name, phone, address) values ('Susan Porter', '9-(357)101-3475', '40 Trailsway Place'); insert into users (name, phone, address) values ('Ronald Frazier', '9-(907)740-9947', '2515 Eastwood Alley'); insert into users (name, phone, address) values ('Frank Adams', '1-(137)230-1880', '408 Hayes Street'); insert into users (name, phone, address) values ('Willie Kim', '1-(289)835-4702', '0 6th Center'); insert into users (name, phone, address) values ('Ruth Wood', '0-(851)070-5223', '60178 Thompson Center'); insert into users (name, phone, address) values ('Jerry Kim', '4-(403)652-5252', '882 Prairie Rose Way'); insert into users (name, phone, address) values ('Susan Cole', '9-(987)595-6773', '09 Buell Alley'); insert into users (name, phone, address) values ('Nancy Lawson', '9-(749)506-6557', '9722 Holy Cross Court'); insert into users (name, phone, address) values ('Lillian Lee', '7-(583)217-3414', '687 Novick Road'); insert into users (name, phone, address) values ('Earl Boyd', '5-(665)792-3399', '6433 Ludington Hill'); insert into users (name, phone, address) values ('Carol Sanders', '6-(289)949-1490', '2 Annamark Junction'); insert into users (name, phone, address) values ('Katherine Fox', '4-(145)902-7993', '8 Prentice Place'); insert into users (name, phone, address) values ('Maria Medina', '1-(789)961-1275', '5970 Burning Wood Park'); insert into users (name, phone, address) values ('Larry Watkins', '0-(302)763-5717', '09 Bunker Hill Hill'); insert into users (name, phone, address) values ('Edward Ellis', '3-(235)667-6129', '5 Caliangt Lane'); insert into users (name, phone, address) values ('Roger Powell', '6-(075)770-1875', '740 Hoepker Avenue'); insert into users (name, phone, address) values ('Jesse Kennedy', '5-(072)607-5366', '723 Aberg Road'); insert into users (name, phone, address) values ('Jeffrey Franklin', '7-(237)312-3808', '07 Melody Plaza'); insert into users (name, phone, address) values ('Douglas Graham', '4-(542)285-9052', '86 Vera Court'); insert into users (name, phone, address) values ('Deborah Kennedy', '3-(935)397-5024', '688 Debs Trail'); insert into users (name, phone, address) values ('Ryan Boyd', '7-(355)934-6800', '0 Dovetail Parkway'); insert into users (name, phone, address) values ('Beverly Stephens', '2-(420)467-9177', '33 Mendota Plaza'); insert into users (name, phone, address) values ('Anne Davis', '8-(301)619-7217', '5 Graceland Pass'); insert into users (name, phone, address) values ('Aaron Morrison', '2-(594)208-0250', '0356 Brentwood Place'); insert into users (name, phone, address) values ('Victor Griffin', '4-(452)615-5353', '2 Thierer Court'); insert into users (name, phone, address) values ('Joshua Cruz', '6-(210)502-8257', '1491 Quincy Point'); insert into users (name, phone, address) values ('Eugene Turner', '2-(966)615-3145', '80534 Holmberg Circle'); insert into users (name, phone, address) values ('Carlos Stanley', '5-(163)530-9251', '0254 Briar Crest Road'); insert into users (name, phone, address) values ('Jose Ruiz', '8-(240)583-2902', '812 Washington Parkway'); insert into users (name, phone, address) values ('Jeremy Hunter', '9-(575)716-5039', '7863 Thierer Plaza'); insert into users (name, phone, address) values ('Anthony Wells', '4-(922)683-0897', '76 Loomis Junction'); insert into users (name, phone, address) values ('Evelyn Vasquez', '0-(056)234-9848', '564 Ronald Regan Point'); insert into users (name, phone, address) values ('Benjamin Fox', '8-(507)447-6757', '99119 Briar Crest Hill'); insert into users (name, phone, address) values ('Thomas Thomas', '5-(411)128-7616', '8 Sauthoff Lane'); insert into users (name, phone, address) values ('Justin Moreno', '7-(356)335-3299', '3 Emmet Trail'); insert into users (name, phone, address) values ('Stephanie Ford', '2-(576)253-8437', '79306 Acker Point'); insert into users (name, phone, address) values ('Jean Peterson', '2-(538)657-6764', '5 Hermina Lane'); insert into users (name, phone, address) values ('Donna Harvey', '2-(320)764-5354', '25533 Sommers Crossing'); insert into users (name, phone, address) values ('Christina Wood', '9-(350)727-0141', '20998 Delladonna Lane'); insert into users (name, phone, address) values ('Phillip Hall', '7-(790)276-8654', '8534 Debs Court'); insert into users (name, phone, address) values ('Phillip Tucker', '9-(941)920-4812', '5219 Charing Cross Terrace'); insert into users (name, phone, address) values ('Joan Hill', '3-(936)890-2078', '9596 Jenna Avenue'); insert into users (name, phone, address) values ('Andrea Williamson', '0-(123)840-3208', '6786 Weeping Birch Plaza'); insert into users (name, phone, address) values ('Harold Wright', '6-(041)746-0875', '7534 Shopko Street'); insert into users (name, phone, address) values ('Julia Payne', '3-(637)716-3142', '7225 Hagan Way'); insert into users (name, phone, address) values ('Doris Coleman', '1-(449)053-9201', '251 East Plaza'); insert into users (name, phone, address) values ('Kenneth Peters', '3-(400)981-6898', '847 Randy Street'); insert into users (name, phone, address) values ('Daniel Wells', '9-(260)792-8630', '8 Vidon Plaza'); insert into users (name, phone, address) values ('Dennis Mccoy', '9-(315)915-6809', '64802 Truax Park'); insert into users (name, phone, address) values ('Catherine Mendoza', '5-(409)198-3742', '9 Kropf Center'); insert into users (name, phone, address) values ('Christine Butler', '5-(344)466-4879', '062 Northview Alley'); insert into users (name, phone, address) values ('Justin Henry', '0-(204)479-6893', '921 Esker Lane'); insert into users (name, phone, address) values ('Henry Ferguson', '5-(022)879-8063', '19822 Westport Lane'); insert into users (name, phone, address) values ('Nicole Riley', '1-(815)643-3917', '520 Vernon Alley'); insert into users (name, phone, address) values ('Jesse Hudson', '8-(137)876-7585', '619 Warner Avenue'); insert into users (name, phone, address) values ('Lori Burke', '6-(260)810-7962', '794 Gerald Way'); insert into users (name, phone, address) values ('Debra Woods', '4-(594)138-6876', '1758 Crowley Parkway'); insert into users (name, phone, address) values ('Samuel Burns', '4-(813)805-5690', '43577 Corscot Court'); insert into users (name, phone, address) values ('Matthew Bell', '1-(382)714-1982', '6 Beilfuss Park'); insert into users (name, phone, address) values ('Walter Fields', '5-(968)238-9328', '87 Debs Circle'); insert into users (name, phone, address) values ('Norma Jones', '3-(108)030-7889', '49 Pine View Park'); insert into users (name, phone, address) values ('Adam Myers', '2-(867)449-4026', '9 Susan Trail'); insert into users (name, phone, address) values ('Deborah Medina', '7-(264)960-6644', '83978 Oxford Circle'); insert into users (name, phone, address) values ('Dorothy Sullivan', '8-(735)491-9131', '1303 Colorado Pass'); insert into users (name, phone, address) values ('Norma Elliott', '3-(678)126-0091', '805 Birchwood Road'); insert into users (name, phone, address) values ('Cheryl Moreno', '2-(080)075-2342', '201 Sauthoff Parkway'); insert into users (name, phone, address) values ('Bobby Hawkins', '4-(773)763-8629', '5328 Killdeer Avenue'); insert into users (name, phone, address) values ('Johnny Moreno', '6-(844)338-8403', '559 Ramsey Place'); insert into users (name, phone, address) values ('Julia Holmes', '9-(239)812-6739', '5831 International Plaza'); insert into users (name, phone, address) values ('Anthony Williamson', '8-(796)422-0000', '126 Commercial Point'); insert into users (name, phone, address) values ('Michelle Duncan', '5-(465)681-1226', '7900 Moulton Junction'); insert into users (name, phone, address) values ('Ruby Rivera', '6-(640)132-7673', '1519 Northland Hill'); insert into users (name, phone, address) values ('Annie Davis', '7-(362)797-6484', '8 Dapin Parkway'); insert into users (name, phone, address) values ('Billy Robertson', '4-(209)402-9301', '151 Transport Hill'); insert into users (name, phone, address) values ('Philip Reid', '5-(351)059-8057', '25 Scoville Lane'); insert into users (name, phone, address) values ('Michael Collins', '9-(552)183-6835', '5 Butternut Plaza'); insert into users (name, phone, address) values ('Melissa Garcia', '1-(928)630-6363', '955 Michigan Terrace'); insert into users (name, phone, address) values ('Paula Washington', '9-(324)233-3135', '744 Green Pass'); insert into users (name, phone, address) values ('Pamela Roberts', '5-(173)772-0467', '4 Westerfield Avenue'); insert into users (name, phone, address) values ('Diane Tucker', '6-(093)285-9946', '0758 Messerschmidt Place'); insert into users (name, phone, address) values ('Alan Moore', '8-(316)616-4617', '80941 Monterey Crossing'); insert into users (name, phone, address) values ('Irene Hunt', '7-(404)265-2966', '71 Lien Alley'); insert into users (name, phone, address) values ('Ralph Roberts', '2-(519)734-4777', '1 Everett Crossing'); insert into users (name, phone, address) values ('Katherine Bryant', '6-(276)968-5529', '2 Pepper Wood Park'); insert into users (name, phone, address) values ('Jeremy Montgomery', '8-(325)441-7361', '2 Forster Park'); insert into users (name, phone, address) values ('Marie Reed', '3-(579)478-4069', '4920 Crowley Street'); insert into users (name, phone, address) values ('Brandon Morris', '5-(993)359-7693', '24 Brown Pass'); insert into users (name, phone, address) values ('Anna Montgomery', '1-(598)346-4287', '18 Springview Center'); insert into users (name, phone, address) values ('Robin Davis', '2-(740)878-1201', '0 Carpenter Lane'); insert into users (name, phone, address) values ('Steven Gilbert', '0-(503)178-5165', '021 Maryland Crossing'); insert into users (name, phone, address) values ('Matthew Vasquez', '0-(885)251-8244', '9580 Menomonie Point'); insert into users (name, phone, address) values ('William Williamson', '4-(794)064-8727', '93811 Lien Terrace'); insert into users (name, phone, address) values ('Carlos Cole', '2-(464)109-2708', '0 Fieldstone Road'); insert into users (name, phone, address) values ('Eugene Frazier', '6-(324)184-2130', '7 Mccormick Circle'); insert into users (name, phone, address) values ('Juan Thomas', '4-(083)436-1488', '3925 Emmet Circle'); insert into users (name, phone, address) values ('Brandon Campbell', '4-(519)930-8229', '1 Debs Parkway'); insert into users (name, phone, address) values ('Doris Robertson', '6-(082)354-1077', '85 Westport Parkway'); insert into users (name, phone, address) values ('Melissa Vasquez', '2-(908)754-1075', '0020 Annamark Plaza'); insert into users (name, phone, address) values ('Nicole Moore', '0-(764)461-2224', '8 Dahle Way'); insert into users (name, phone, address) values ('Susan Williams', '3-(662)133-6785', '15394 Fairfield Center'); insert into users (name, phone, address) values ('Lillian Kim', '4-(249)478-8380', '1 Graedel Avenue'); insert into users (name, phone, address) values ('Jennifer Cox', '5-(700)785-3267', '3 Knutson Drive'); insert into users (name, phone, address) values ('Phillip Burns', '0-(163)165-4748', '1718 1st Road'); insert into users (name, phone, address) values ('Peter Lawson', '3-(463)090-3327', '9560 Transport Way'); insert into users (name, phone, address) values ('Sarah Thomas', '8-(197)000-7581', '1 Ridge Oak Pass'); insert into users (name, phone, address) values ('Mary Adams', '5-(417)121-2108', '6 Nancy Place'); insert into users (name, phone, address) values ('Frank Chapman', '3-(160)183-9365', '2 Porter Plaza'); insert into users (name, phone, address) values ('Stephanie Peterson', '7-(385)844-8929', '66551 Kropf Trail'); insert into users (name, phone, address) values ('Samuel Gilbert', '7-(334)084-7096', '0 Briar Crest Hill'); insert into users (name, phone, address) values ('Barbara Vasquez', '8-(742)393-4160', '581 Basil Alley'); insert into users (name, phone, address) values ('Bobby Berry', '9-(394)566-6010', '21 Mcbride Hill'); insert into users (name, phone, address) values ('Anne Carr', '6-(638)226-7153', '0117 Jenna Pass'); insert into users (name, phone, address) values ('Marie Carter', '1-(708)485-8154', '23602 Orin Park'); insert into users (name, phone, address) values ('Henry Harrison', '9-(176)228-2684', '63955 Dottie Junction'); insert into users (name, phone, address) values ('Julie Green', '5-(377)089-9638', '2 Kings Point'); insert into users (name, phone, address) values ('Martha Medina', '3-(844)226-3183', '397 Merry Pass'); insert into users (name, phone, address) values ('Shirley Hernandez', '2-(116)023-6252', '309 Utah Terrace'); insert into users (name, phone, address) values ('Kenneth Owens', '3-(065)720-4009', '5946 Logan Lane'); insert into users (name, phone, address) values ('Carlos Peterson', '3-(376)825-0251', '7 Welch Terrace'); insert into users (name, phone, address) values ('Cynthia Harper', '7-(204)026-2357', '38826 Judy Hill'); insert into users (name, phone, address) values ('Andrew Kelley', '3-(674)839-7457', '539 Crowley Junction'); insert into users (name, phone, address) values ('Stephanie Franklin', '1-(039)619-2531', '84 Hayes Drive'); insert into users (name, phone, address) values ('Paula Campbell', '9-(639)445-9957', '4 Mallory Park'); insert into users (name, phone, address) values ('Timothy White', '1-(488)366-2378', '66893 Sycamore Hill'); insert into users (name, phone, address) values ('Gerald Lane', '7-(113)297-7546', '70828 Judy Way'); insert into users (name, phone, address) values ('Eric Hanson', '8-(116)042-8639', '12900 Moose Road'); insert into users (name, phone, address) values ('Stephen Ortiz', '9-(434)077-5030', '7 Nova Circle'); insert into users (name, phone, address) values ('George Hawkins', '5-(440)890-8399', '0 Brentwood Crossing'); insert into users (name, phone, address) values ('Martha Robertson', '5-(417)267-5833', '34504 Derek Way'); insert into users (name, phone, address) values ('Marie Frazier', '5-(641)036-4906', '30287 Calypso Terrace'); insert into users (name, phone, address) values ('Terry Sims', '9-(902)961-7142', '94025 Veith Parkway'); insert into users (name, phone, address) values ('Debra Frazier', '8-(401)222-0288', '309 American Point'); insert into users (name, phone, address) values ('Antonio Hunter', '6-(231)396-0340', '43591 Porter Place'); insert into users (name, phone, address) values ('Brenda Tucker', '4-(503)513-4652', '59 Oak Hill'); insert into users (name, phone, address) values ('Juan Austin', '5-(391)536-7301', '462 Bunker Hill Place'); insert into users (name, phone, address) values ('Brenda Larson', '0-(268)567-2267', '7 Homewood Point'); insert into users (name, phone, address) values ('Gary Ferguson', '1-(758)224-0636', '383 6th Place'); insert into users (name, phone, address) values ('Angela Williamson', '3-(624)137-4954', '3 Grasskamp Crossing'); insert into users (name, phone, address) values ('Emily Alexander', '8-(870)209-4281', '227 Hintze Park'); insert into users (name, phone, address) values ('Wayne Rivera', '7-(515)980-1715', '9 Express Drive'); insert into users (name, phone, address) values ('Howard Hill', '9-(498)512-4124', '70 Wayridge Drive'); insert into users (name, phone, address) values ('Jimmy Marshall', '2-(751)791-5475', '47603 Waxwing Circle'); insert into users (name, phone, address) values ('Shawn Chapman', '3-(359)160-7426', '4859 Bowman Place'); insert into users (name, phone, address) values ('Thomas Henderson', '4-(415)108-8424', '090 Schmedeman Trail'); insert into users (name, phone, address) values ('Elizabeth Hayes', '3-(807)543-2618', '8769 Victoria Lane'); insert into users (name, phone, address) values ('Catherine James', '0-(231)212-2256', '81734 Nancy Hill'); insert into users (name, phone, address) values ('Amy Fisher', '0-(259)014-0930', '7494 Johnson Circle'); insert into users (name, phone, address) values ('Ann Rice', '1-(162)144-3326', '497 Eliot Place'); insert into users (name, phone, address) values ('Melissa Richards', '7-(489)985-7543', '8 Jay Place'); insert into users (name, phone, address) values ('Frank Cunningham', '4-(072)979-1749', '90 Comanche Road'); insert into users (name, phone, address) values ('Melissa Fox', '6-(931)127-2860', '99 5th Trail'); insert into users (name, phone, address) values ('Eric Cook', '6-(231)320-6748', '1 Elmside Alley'); insert into users (name, phone, address) values ('Thomas Meyer', '9-(830)061-7733', '659 Jackson Plaza'); insert into users (name, phone, address) values ('Christina Gibson', '6-(958)072-5340', '0357 Iowa Parkway'); insert into users (name, phone, address) values ('Anna Carroll', '4-(874)868-8133', '6 Cordelia Center'); insert into users (name, phone, address) values ('David Stone', '7-(405)748-2340', '783 Mockingbird Street'); insert into users (name, phone, address) values ('Anne Berry', '7-(784)178-2689', '8 Dixon Junction'); insert into users (name, phone, address) values ('Gerald Harvey', '6-(904)808-9320', '35 Mockingbird Street'); insert into users (name, phone, address) values ('Katherine Scott', '6-(099)402-5805', '0902 Knutson Court'); insert into users (name, phone, address) values ('Shawn Robinson', '6-(135)974-1958', '04 Maryland Junction'); insert into users (name, phone, address) values ('Arthur Mason', '3-(337)530-5889', '5202 North Parkway'); insert into users (name, phone, address) values ('Marilyn Palmer', '0-(588)288-0514', '3 Forest Junction'); insert into users (name, phone, address) values ('Roger Duncan', '6-(742)488-2065', '68409 Fairfield Junction'); insert into users (name, phone, address) values ('James Jenkins', '1-(085)199-9264', '66401 Farragut Trail'); insert into users (name, phone, address) values ('Kenneth Stone', '5-(713)993-3289', '99897 Florence Park'); insert into users (name, phone, address) values ('Stephen Young', '3-(974)483-4649', '0 Hazelcrest Junction'); insert into users (name, phone, address) values ('Howard Lynch', '4-(972)320-4435', '5366 Chive Terrace'); insert into users (name, phone, address) values ('Jane Ramos', '0-(544)739-5670', '03995 Blackbird Way'); insert into users (name, phone, address) values ('Wayne Gomez', '5-(411)153-7538', '0376 Trailsway Center'); insert into users (name, phone, address) values ('Wanda Hill', '0-(016)640-3238', '0501 Sauthoff Court'); insert into users (name, phone, address) values ('Bruce Lawrence', '5-(626)862-8218', '85270 Sunfield Center'); insert into users (name, phone, address) values ('Donna West', '8-(684)345-7901', '9548 Lakeland Court'); insert into users (name, phone, address) values ('Judith Morrison', '4-(128)273-6644', '704 Sherman Hill'); insert into users (name, phone, address) values ('Christopher Cunningham', '6-(500)704-8009', '43 Stone Corner Drive'); insert into users (name, phone, address) values ('Louis Morgan', '3-(564)443-0059', '59 Village Green Crossing'); insert into users (name, phone, address) values ('Samuel Collins', '9-(332)978-7294', '5 Nevada Point'); insert into users (name, phone, address) values ('Larry Franklin', '7-(261)638-7553', '99 Summerview Point'); insert into users (name, phone, address) values ('Gregory Simpson', '3-(338)449-6658', '586 Harper Way'); insert into users (name, phone, address) values ('Roy Mendoza', '9-(297)062-6371', '70 Hallows Way'); insert into users (name, phone, address) values ('Lori Washington', '0-(765)793-3996', '3 Southridge Place'); insert into users (name, phone, address) values ('Todd Burton', '4-(441)986-9979', '78624 Cordelia Way'); insert into users (name, phone, address) values ('Kathy Duncan', '8-(305)480-6769', '7 Memorial Avenue'); insert into users (name, phone, address) values ('Eric Hall', '3-(229)030-3341', '725 Meadow Ridge Junction'); insert into users (name, phone, address) values ('Diana Warren', '8-(356)844-9211', '2 Mendota Center'); insert into users (name, phone, address) values ('Carol Lopez', '9-(887)886-4206', '37564 Calypso Way'); insert into users (name, phone, address) values ('Julia Howell', '7-(238)165-7734', '40 Forest Junction'); insert into users (name, phone, address) values ('Scott Grant', '5-(496)439-4461', '6 Prairieview Circle'); insert into users (name, phone, address) values ('Stephen Myers', '0-(330)096-4490', '32 Kings Crossing'); insert into users (name, phone, address) values ('Jane Lewis', '9-(501)149-7545', '624 Chinook Drive'); insert into users (name, phone, address) values ('Donald Baker', '8-(562)640-9448', '647 Pine View Terrace'); insert into users (name, phone, address) values ('Jimmy Powell', '7-(812)977-1908', '72074 Heath Crossing'); insert into users (name, phone, address) values ('Rachel Taylor', '8-(130)944-3491', '7 Golf View Hill'); insert into users (name, phone, address) values ('Rachel Alvarez', '7-(666)214-6533', '00145 West Point'); insert into users (name, phone, address) values ('Anthony Austin', '4-(014)830-9429', '79880 Hallows Pass'); insert into users (name, phone, address) values ('Sarah Romero', '1-(220)558-6524', '54433 Utah Trail'); insert into users (name, phone, address) values ('Brenda Chapman', '4-(245)119-8117', '18 School Street'); insert into users (name, phone, address) values ('Steven Campbell', '3-(200)616-7619', '89550 Crownhardt Trail'); insert into users (name, phone, address) values ('Rose Richards', '4-(521)078-5993', '55 Lawn Lane'); insert into users (name, phone, address) values ('Deborah Castillo', '4-(191)227-1440', '3 Magdeline Street'); insert into users (name, phone, address) values ('Jimmy Evans', '4-(798)413-4450', '4 Stone Corner Circle'); insert into users (name, phone, address) values ('Emily Hill', '9-(472)330-0754', '32 Kenwood Avenue'); insert into users (name, phone, address) values ('Frances Nelson', '5-(549)431-5988', '24250 Hansons Point'); insert into users (name, phone, address) values ('Frances Bryant', '2-(018)835-5428', '6 Paget Center'); insert into users (name, phone, address) values ('Sean Daniels', '9-(481)056-8511', '7272 Gulseth Drive'); insert into users (name, phone, address) values ('Denise Carpenter', '0-(362)361-1310', '5 Kensington Lane'); insert into users (name, phone, address) values ('Bruce Jacobs', '3-(500)375-6437', '8 Merchant Drive'); insert into users (name, phone, address) values ('Kimberly Kelley', '4-(587)135-8332', '8037 Bonner Lane'); insert into users (name, phone, address) values ('Lois Walker', '8-(247)224-4001', '419 Fairfield Drive'); insert into users (name, phone, address) values ('Jerry Nelson', '0-(953)545-5924', '2 Hoard Avenue'); insert into users (name, phone, address) values ('Janet Wagner', '3-(358)381-0476', '373 Linden Plaza'); insert into users (name, phone, address) values ('Alan Watkins', '5-(563)394-4207', '88806 Portage Drive'); insert into users (name, phone, address) values ('Chris Castillo', '3-(082)542-8806', '9845 Dottie Trail'); insert into users (name, phone, address) values ('Harold Owens', '2-(280)291-2905', '9 Emmet Crossing'); insert into users (name, phone, address) values ('Carol Long', '2-(166)903-1660', '58319 Algoma Street'); insert into users (name, phone, address) values ('Kathleen Harrison', '5-(822)510-5769', '21 Fulton Plaza'); insert into users (name, phone, address) values ('Keith Banks', '9-(936)734-1741', '7 Roxbury Crossing'); insert into users (name, phone, address) values ('Betty Hernandez', '4-(685)528-6708', '0682 Maple Junction'); insert into users (name, phone, address) values ('Norma Perkins', '6-(545)413-1404', '5166 West Hill'); insert into users (name, phone, address) values ('Maria Hicks', '9-(040)801-1240', '5911 Longview Road'); insert into users (name, phone, address) values ('Pamela Jordan', '8-(030)844-4714', '42906 Northland Plaza'); insert into users (name, phone, address) values ('Patricia Hudson', '5-(462)247-9978', '260 Chive Court'); insert into users (name, phone, address) values ('Paul Duncan', '0-(761)376-9555', '67576 Mcbride Crossing'); insert into users (name, phone, address) values ('Tina Stanley', '0-(737)800-0301', '0333 Browning Alley'); insert into users (name, phone, address) values ('Chris Riley', '2-(984)844-2529', '9113 Gerald Circle'); insert into users (name, phone, address) values ('Kimberly Bryant', '8-(683)283-8071', '5 Annamark Hill'); insert into users (name, phone, address) values ('Ralph Ryan', '7-(509)209-8161', '4 Texas Lane'); insert into users (name, phone, address) values ('Louis Berry', '5-(537)948-3929', '47019 Hoepker Plaza'); insert into users (name, phone, address) values ('Christopher Long', '7-(502)585-9891', '31835 Vidon Way'); insert into users (name, phone, address) values ('Martha Hanson', '9-(549)058-5743', '30 Springs Trail'); insert into users (name, phone, address) values ('Mary Chavez', '6-(315)692-0026', '728 Kings Drive'); insert into users (name, phone, address) values ('Kathleen Brown', '7-(936)812-0038', '69543 Sullivan Plaza'); insert into users (name, phone, address) values ('Gloria Snyder', '5-(058)706-3724', '02940 High Crossing Parkway'); insert into users (name, phone, address) values ('Kathy Tucker', '9-(413)025-3163', '0680 Scott Road'); insert into users (name, phone, address) values ('Ryan Wagner', '8-(054)906-7585', '279 Sauthoff Place'); insert into users (name, phone, address) values ('Andrea Brown', '6-(686)088-1451', '19 Hooker Hill'); insert into users (name, phone, address) values ('Jason White', '2-(512)023-8010', '4 Michigan Way'); insert into users (name, phone, address) values ('Joan Allen', '9-(380)541-2099', '988 Evergreen Avenue'); insert into users (name, phone, address) values ('Beverly Reid', '8-(170)566-3467', '191 Browning Road'); insert into users (name, phone, address) values ('Beverly Lawrence', '2-(560)694-8336', '9903 Maple Wood Parkway'); insert into users (name, phone, address) values ('Samuel Carter', '3-(303)970-3571', '8 Utah Parkway'); insert into users (name, phone, address) values ('Ryan Reed', '6-(217)889-3690', '045 Brickson Park Junction'); insert into users (name, phone, address) values ('Terry Pierce', '4-(562)469-8467', '8473 Hagan Court'); insert into users (name, phone, address) values ('George Clark', '8-(347)027-9379', '4 Pawling Lane'); insert into users (name, phone, address) values ('Larry Perkins', '7-(389)268-3098', '2 Merry Alley'); insert into users (name, phone, address) values ('Melissa Robinson', '4-(472)441-9913', '0528 Buell Plaza'); insert into users (name, phone, address) values ('Susan Mason', '6-(205)292-9455', '3606 Prairieview Junction'); insert into users (name, phone, address) values ('Jacqueline Nelson', '8-(424)208-5309', '194 Forest Dale Court'); insert into users (name, phone, address) values ('Harold Hudson', '6-(951)266-3160', '208 Sutteridge Plaza'); insert into users (name, phone, address) values ('Bonnie Sanchez', '6-(497)463-2104', '23 South Trail'); insert into users (name, phone, address) values ('Lawrence Howard', '1-(024)027-3258', '8126 Russell Crossing'); insert into users (name, phone, address) values ('Kathleen Greene', '7-(042)002-3777', '06410 Springview Lane'); insert into users (name, phone, address) values ('Christina Gilbert', '5-(317)575-9463', '3369 Lyons Alley'); insert into users (name, phone, address) values ('Jeffrey Lawrence', '6-(701)912-5031', '51 Talmadge Junction'); insert into users (name, phone, address) values ('Charles Adams', '3-(725)412-2613', '297 Granby Circle'); insert into users (name, phone, address) values ('Karen Carroll', '5-(954)019-1220', '6682 Lighthouse Bay Hill'); insert into users (name, phone, address) values ('Frances Matthews', '8-(117)983-1129', '53466 Grover Road'); insert into users (name, phone, address) values ('Norma Long', '3-(681)921-9441', '719 Paget Parkway'); insert into users (name, phone, address) values ('Joyce Dean', '9-(508)457-4004', '4789 Kim Hill'); insert into users (name, phone, address) values ('James Owens', '8-(835)009-3171', '1 Gateway Crossing'); insert into users (name, phone, address) values ('Evelyn Wells', '6-(390)949-3683', '25250 South Pass'); insert into users (name, phone, address) values ('Bonnie Cooper', '4-(641)424-3769', '6030 Nova Plaza'); insert into users (name, phone, address) values ('Alan Reynolds', '1-(435)968-8914', '87 Sunnyside Center'); insert into users (name, phone, address) values ('Joshua Chapman', '6-(311)983-1143', '410 Lighthouse Bay Parkway'); insert into users (name, phone, address) values ('Sandra Morales', '8-(035)049-5818', '7 Roxbury Terrace'); insert into users (name, phone, address) values ('Willie Stephens', '4-(880)648-8089', '3 Colorado Parkway'); insert into users (name, phone, address) values ('James Burns', '9-(176)924-4659', '580 Bayside Point'); insert into users (name, phone, address) values ('Kevin Johnston', '0-(197)987-9332', '50 Pearson Point'); insert into users (name, phone, address) values ('Lois Dunn', '8-(361)469-1668', '88 Riverside Center'); insert into users (name, phone, address) values ('Benjamin Chapman', '5-(179)152-4355', '29660 Summit Hill'); insert into users (name, phone, address) values ('Justin Cunningham', '2-(062)017-7431', '79 Milwaukee Center'); insert into users (name, phone, address) values ('Victor Sims', '6-(088)627-3986', '86819 Grover Junction'); insert into users (name, phone, address) values ('Carol Long', '4-(225)950-3089', '103 Red Cloud Place'); insert into users (name, phone, address) values ('Robin Hayes', '0-(448)409-2259', '44034 Morrow Plaza'); insert into users (name, phone, address) values ('Raymond Scott', '5-(521)005-0367', '70 Mcguire Lane'); insert into users (name, phone, address) values ('Louis Stephens', '0-(681)816-0301', '94891 Becker Court'); insert into users (name, phone, address) values ('Heather Barnes', '2-(531)109-6021', '6259 Novick Lane'); insert into users (name, phone, address) values ('Louise Ford', '5-(632)040-9407', '988 Schurz Lane'); insert into users (name, phone, address) values ('Randy Walker', '7-(524)851-8724', '48 Eastlawn Point'); insert into users (name, phone, address) values ('Peter Andrews', '3-(740)060-9180', '9 Stephen Way'); insert into users (name, phone, address) values ('Susan Peters', '2-(403)192-5653', '39565 Southridge Road'); insert into users (name, phone, address) values ('Andrea Fox', '9-(971)425-7204', '236 Grim Alley'); insert into users (name, phone, address) values ('Nancy Kim', '2-(746)336-7806', '967 Sage Place'); insert into users (name, phone, address) values ('Virginia Richards', '2-(262)019-4699', '91 Union Pass'); insert into users (name, phone, address) values ('Shawn Simpson', '6-(291)590-1215', '98400 Melvin Way'); insert into users (name, phone, address) values ('Walter Rodriguez', '7-(610)184-3473', '3 Rigney Parkway'); insert into users (name, phone, address) values ('Nicole Morales', '8-(294)124-6823', '5200 Burrows Lane'); insert into users (name, phone, address) values ('Jeffrey Kim', '9-(737)261-6340', '4839 Gale Street'); insert into users (name, phone, address) values ('Jerry Barnes', '1-(835)795-0831', '2552 Petterle Center'); insert into users (name, phone, address) values ('Daniel Diaz', '8-(188)558-1924', '21717 Maywood Pass'); insert into users (name, phone, address) values ('Ruth Grant', '1-(382)748-4508', '48641 Columbus Alley'); insert into users (name, phone, address) values ('Debra Mendoza', '1-(416)902-8028', '9 Ryan Avenue'); insert into users (name, phone, address) values ('Annie Cruz', '2-(533)064-2846', '772 Hooker Place'); insert into users (name, phone, address) values ('Carlos Ellis', '1-(419)746-8172', '30 Shopko Center'); insert into users (name, phone, address) values ('Sean Bell', '1-(745)334-0170', '6 Starling Alley'); insert into users (name, phone, address) values ('Gerald Jordan', '7-(546)101-9974', '7705 Independence Trail'); insert into users (name, phone, address) values ('Irene Powell', '6-(488)906-0218', '348 Derek Drive'); insert into users (name, phone, address) values ('Louis Pierce', '5-(438)913-2384', '5 International Junction'); insert into users (name, phone, address) values ('Jessica Johnston', '6-(996)217-3086', '750 Rigney Street'); insert into users (name, phone, address) values ('Wayne Wagner', '9-(285)581-6467', '60 Reindahl Court'); insert into users (name, phone, address) values ('Martin Lee', '3-(582)870-2439', '61348 Dayton Place'); insert into users (name, phone, address) values ('Jason Burke', '5-(293)213-6316', '2 Helena Trail'); insert into users (name, phone, address) values ('Bruce Rice', '3-(602)452-4435', '577 Summerview Pass'); insert into users (name, phone, address) values ('Howard Armstrong', '1-(564)802-1039', '93 Graedel Junction'); insert into users (name, phone, address) values ('Jerry White', '2-(210)952-2577', '26 Lighthouse Bay Avenue'); insert into users (name, phone, address) values ('Jason Matthews', '9-(783)933-1704', '2042 Hollow Ridge Junction'); insert into users (name, phone, address) values ('Jose Gray', '4-(970)409-7074', '568 Eastwood Court'); insert into users (name, phone, address) values ('Timothy Morris', '1-(586)072-2071', '8329 Susan Pass'); insert into users (name, phone, address) values ('Stephen Richards', '6-(717)110-7851', '858 Derek Crossing'); insert into users (name, phone, address) values ('Kathy Hayes', '2-(391)456-8728', '3 Kipling Junction'); insert into users (name, phone, address) values ('Martha Jordan', '0-(900)161-6915', '4 Iowa Point'); insert into users (name, phone, address) values ('Dennis Richardson', '8-(793)671-3197', '3722 Dunning Plaza'); insert into users (name, phone, address) values ('Joseph Miller', '8-(060)476-8704', '96502 Maywood Road'); insert into users (name, phone, address) values ('Julie Vasquez', '2-(996)184-5178', '206 Sachtjen Plaza'); insert into users (name, phone, address) values ('Irene Jordan', '4-(683)634-1818', '07953 Upham Avenue'); insert into users (name, phone, address) values ('Kelly Simpson', '8-(467)153-7909', '8383 Union Drive'); insert into users (name, phone, address) values ('Wayne Carter', '5-(421)995-7213', '796 Cascade Park'); insert into users (name, phone, address) values ('Louis Grant', '3-(359)664-8952', '42861 Tennyson Junction'); insert into users (name, phone, address) values ('Ronald Pierce', '7-(875)475-6421', '5363 Hermina Pass'); insert into users (name, phone, address) values ('Chris Gilbert', '3-(379)077-0685', '5618 Alpine Avenue'); insert into users (name, phone, address) values ('Gloria Carter', '7-(324)298-9599', '0232 Muir Hill'); insert into users (name, phone, address) values ('Jean James', '0-(128)433-3364', '96 Wayridge Hill'); insert into users (name, phone, address) values ('Patrick Hunter', '6-(702)252-2889', '711 Burrows Place'); insert into users (name, phone, address) values ('Ronald Diaz', '2-(513)995-8868', '97977 Hudson Junction'); insert into users (name, phone, address) values ('Karen Chapman', '0-(191)557-3434', '8275 Del Mar Point'); insert into users (name, phone, address) values ('Deborah Mccoy', '1-(159)261-8087', '07796 Scofield Park'); insert into users (name, phone, address) values ('Thomas Alvarez', '2-(541)868-4307', '567 Parkside Avenue'); insert into users (name, phone, address) values ('Cheryl Matthews', '1-(043)614-2564', '8271 Lake View Junction'); insert into users (name, phone, address) values ('Ryan Gardner', '4-(934)010-2369', '3 Boyd Park'); insert into users (name, phone, address) values ('Paul Lynch', '6-(275)570-5307', '17 Grayhawk Parkway'); insert into users (name, phone, address) values ('Theresa Snyder', '4-(690)545-1105', '39423 Artisan Crossing'); insert into users (name, phone, address) values ('David Rodriguez', '0-(539)064-1541', '0 Anniversary Street'); insert into users (name, phone, address) values ('Henry Gutierrez', '8-(367)270-1751', '936 Twin Pines Point'); insert into users (name, phone, address) values ('Paula Lawson', '0-(645)381-8452', '90473 Loftsgordon Lane'); insert into users (name, phone, address) values ('Wanda Richards', '3-(282)331-3815', '9 Anhalt Circle'); insert into users (name, phone, address) values ('Antonio Castillo', '2-(669)894-6864', '7185 Cody Road'); insert into users (name, phone, address) values ('Samuel Thomas', '1-(446)014-9860', '168 Towne Lane'); insert into users (name, phone, address) values ('Sharon Jacobs', '6-(966)812-7619', '27054 Basil Parkway'); insert into users (name, phone, address) values ('Robin Washington', '8-(639)177-5728', '2 Bunker Hill Avenue'); insert into users (name, phone, address) values ('Ryan Chavez', '0-(126)912-6941', '6852 Fair Oaks Street'); insert into users (name, phone, address) values ('Phyllis Olson', '9-(301)318-1924', '1 Stephen Way'); insert into users (name, phone, address) values ('Amy Howard', '7-(834)836-2896', '3 Farragut Avenue'); insert into users (name, phone, address) values ('Sharon West', '8-(258)076-8222', '0 Grover Avenue'); insert into users (name, phone, address) values ('Albert Matthews', '3-(785)169-1727', '934 Hanson Road'); insert into users (name, phone, address) values ('Scott Torres', '3-(564)854-8609', '69259 Johnson Alley'); insert into users (name, phone, address) values ('Theresa Ferguson', '1-(296)944-2251', '3 Beilfuss Court'); insert into users (name, phone, address) values ('Ernest Ellis', '5-(642)421-4176', '8 Tony Point'); insert into users (name, phone, address) values ('Juan Gonzales', '1-(901)527-3938', '48509 Karstens Street'); insert into users (name, phone, address) values ('Rachel Myers', '3-(646)018-6400', '34 Starling Road'); insert into users (name, phone, address) values ('Donald Richards', '5-(660)670-7902', '9 Ridgeway Court'); insert into users (name, phone, address) values ('Michelle Schmidt', '1-(814)916-7616', '70 Morning Road'); insert into users (name, phone, address) values ('Martha Day', '2-(421)927-0666', '4 Northfield Road'); insert into users (name, phone, address) values ('Louise Burke', '6-(823)750-9894', '6 Westridge Pass'); insert into users (name, phone, address) values ('Ralph Franklin', '8-(879)314-0748', '21 Fairfield Drive'); insert into users (name, phone, address) values ('Ann Reed', '2-(607)227-3595', '547 Fallview Trail'); insert into users (name, phone, address) values ('Patricia Garcia', '3-(609)215-6759', '8344 Waubesa Drive'); insert into users (name, phone, address) values ('Martin Collins', '2-(061)423-9396', '46 5th Road'); insert into users (name, phone, address) values ('Harry Alvarez', '9-(888)439-6738', '062 5th Avenue'); insert into users (name, phone, address) values ('Paula Peters', '4-(390)157-8023', '8997 Commercial Circle'); insert into users (name, phone, address) values ('Nancy King', '9-(601)156-6319', '979 Glacier Hill Plaza'); insert into users (name, phone, address) values ('Andrea Wright', '6-(298)950-1027', '93220 Corry Court'); insert into users (name, phone, address) values ('Randy Owens', '0-(884)476-2296', '7 Utah Terrace'); insert into users (name, phone, address) values ('Gregory Shaw', '9-(069)122-0946', '24 Packers Avenue'); insert into users (name, phone, address) values ('Arthur Moreno', '1-(287)980-5168', '4 Kinsman Trail'); insert into users (name, phone, address) values ('Donald Hicks', '3-(149)824-2885', '776 Mayer Parkway'); insert into users (name, phone, address) values ('Amanda Jordan', '5-(811)956-5039', '05 Chinook Point'); insert into users (name, phone, address) values ('Cynthia Allen', '7-(497)902-9080', '311 Norway Maple Plaza'); insert into users (name, phone, address) values ('Carl Coleman', '9-(436)127-4326', '4701 Clarendon Junction'); insert into users (name, phone, address) values ('Billy Carter', '4-(157)418-5866', '0520 Walton Drive'); insert into users (name, phone, address) values ('Deborah Gonzalez', '5-(934)092-0466', '93544 Claremont Place'); insert into users (name, phone, address) values ('Ashley Murray', '4-(968)357-4398', '50 Briar Crest Circle'); insert into users (name, phone, address) values ('Christina Simmons', '7-(677)477-0421', '57 Michigan Drive'); insert into users (name, phone, address) values ('Heather Collins', '0-(845)660-9303', '92884 Arkansas Junction'); insert into users (name, phone, address) values ('James Rivera', '9-(546)143-2667', '852 Wayridge Junction'); insert into users (name, phone, address) values ('Steve Allen', '4-(012)314-1247', '7 Colorado Parkway'); insert into users (name, phone, address) values ('Terry Gutierrez', '3-(195)136-8951', '9 Dovetail Terrace'); insert into users (name, phone, address) values ('Cynthia Reynolds', '9-(013)567-1310', '84618 Dakota Junction'); insert into users (name, phone, address) values ('Karen Ford', '6-(051)122-1966', '4 Sheridan Way'); insert into users (name, phone, address) values ('Karen Evans', '3-(539)416-0243', '8 Bunting Hill'); insert into users (name, phone, address) values ('Rebecca Duncan', '6-(540)764-9408', '6953 New Castle Circle'); insert into users (name, phone, address) values ('George Welch', '4-(287)304-6595', '76 Mariners Cove Trail'); insert into users (name, phone, address) values ('Keith Barnes', '8-(000)187-8465', '4 Logan Pass'); insert into users (name, phone, address) values ('Katherine Riley', '0-(544)744-6604', '240 Continental Drive'); insert into users (name, phone, address) values ('Cheryl Garrett', '5-(766)203-4941', '9 Union Parkway'); insert into users (name, phone, address) values ('Nicole Simpson', '4-(439)419-8983', '40 Kipling Alley'); insert into users (name, phone, address) values ('Philip Fox', '7-(032)132-1941', '7 Trailsway Way'); insert into users (name, phone, address) values ('Mark Gilbert', '6-(392)453-7259', '920 Kennedy Road'); insert into users (name, phone, address) values ('Mark Ward', '5-(126)888-7757', '0581 Sage Park'); insert into users (name, phone, address) values ('Barbara Gordon', '0-(530)092-5134', '03860 Spohn Road'); insert into users (name, phone, address) values ('Donald Tucker', '8-(313)792-2775', '4815 Lawn Lane'); insert into users (name, phone, address) values ('Alice Miller', '5-(418)331-6355', '403 Grasskamp Park'); insert into users (name, phone, address) values ('Andrew White', '5-(837)023-5903', '37 Kings Center'); insert into users (name, phone, address) values ('Lois Adams', '3-(063)902-8899', '3338 Rowland Street'); insert into users (name, phone, address) values ('Bonnie Schmidt', '3-(661)211-8792', '38 Spenser Center'); insert into users (name, phone, address) values ('Jimmy Ortiz', '4-(676)734-5625', '63 Roth Place'); insert into users (name, phone, address) values ('Jason Dean', '2-(571)095-7764', '806 Stephen Park'); insert into users (name, phone, address) values ('James Johnston', '2-(109)814-7129', '43011 Thompson Trail'); insert into users (name, phone, address) values ('Michael Tucker', '8-(709)785-9408', '20172 Kennedy Parkway'); insert into users (name, phone, address) values ('Wanda Harper', '4-(143)699-4050', '3494 Dapin Trail'); insert into users (name, phone, address) values ('Norma Dunn', '8-(983)196-3860', '7 Spenser Drive'); insert into users (name, phone, address) values ('Brian Gordon', '4-(907)601-3524', '0259 Pennsylvania Circle'); insert into users (name, phone, address) values ('Albert Murray', '9-(674)208-4656', '97 Northview Avenue'); insert into users (name, phone, address) values ('Katherine Hanson', '7-(157)765-8300', '7 Ruskin Hill'); insert into users (name, phone, address) values ('Maria Black', '3-(707)938-1975', '54108 Gina Drive'); insert into users (name, phone, address) values ('Gary Ford', '2-(092)630-7767', '6 Dwight Parkway'); insert into users (name, phone, address) values ('Roger Gonzales', '9-(898)269-8367', '9 Merchant Street'); insert into users (name, phone, address) values ('Melissa Weaver', '1-(979)012-8570', '3 Esker Trail'); insert into users (name, phone, address) values ('Adam Wheeler', '4-(162)412-1838', '4831 Anthes Court'); insert into users (name, phone, address) values ('Annie Pierce', '2-(272)969-2181', '40778 Di Loreto Junction'); insert into users (name, phone, address) values ('Jesse Palmer', '4-(058)300-5636', '56944 Kedzie Plaza'); insert into users (name, phone, address) values ('Sandra Peterson', '6-(953)610-8387', '6896 Jay Circle'); insert into users (name, phone, address) values ('Annie Pierce', '1-(740)794-3787', '00 Maywood Plaza'); insert into users (name, phone, address) values ('Barbara Perez', '9-(134)707-8751', '8 Kim Place'); insert into users (name, phone, address) values ('Albert Washington', '1-(639)818-7554', '06 American Alley'); insert into users (name, phone, address) values ('Wayne Fuller', '8-(678)376-7196', '7 Rutledge Avenue'); insert into users (name, phone, address) values ('Donna Matthews', '5-(850)477-0709', '5 Milwaukee Terrace'); insert into users (name, phone, address) values ('Norma Gomez', '8-(393)291-2591', '616 Calypso Plaza'); insert into users (name, phone, address) values ('Craig Cook', '5-(794)549-9496', '3151 Armistice Junction'); insert into users (name, phone, address) values ('David Murphy', '4-(947)926-5016', '10293 Homewood Street'); insert into users (name, phone, address) values ('Todd Ray', '6-(916)736-7837', '6 Vahlen Crossing'); insert into users (name, phone, address) values ('Billy Morrison', '3-(814)364-4916', '390 Center Park'); insert into users (name, phone, address) values ('Martha Butler', '5-(229)209-3527', '7 Miller Center'); insert into users (name, phone, address) values ('Randy Spencer', '6-(498)077-9752', '4388 Lukken Drive'); insert into users (name, phone, address) values ('Cheryl Hill', '2-(339)286-3995', '88015 Gerald Road'); insert into users (name, phone, address) values ('Angela Barnes', '9-(565)529-3229', '730 Ramsey Alley'); insert into users (name, phone, address) values ('Cynthia Flores', '6-(931)900-4889', '8769 Bonner Lane'); insert into users (name, phone, address) values ('Dorothy Garcia', '1-(151)891-3307', '9159 Northport Court'); insert into users (name, phone, address) values ('Ruby Reyes', '1-(302)951-6480', '945 Moland Lane'); insert into users (name, phone, address) values ('Rose Taylor', '7-(596)415-5888', '990 Heffernan Point'); insert into users (name, phone, address) values ('Gary Jones', '8-(098)758-6576', '0420 Bartillon Trail'); insert into users (name, phone, address) values ('Brenda Ross', '2-(586)227-4034', '8703 Homewood Center'); insert into users (name, phone, address) values ('Carlos Kelly', '6-(428)523-8462', '497 Arapahoe Court'); insert into users (name, phone, address) values ('Martin Mendoza', '4-(906)315-3918', '4823 Mosinee Trail'); insert into users (name, phone, address) values ('Russell Kim', '5-(303)913-3064', '27760 Maple Court'); insert into users (name, phone, address) values ('Steve Long', '8-(152)563-2794', '001 La Follette Point'); insert into users (name, phone, address) values ('Bonnie Ramos', '6-(487)980-5382', '3 Melvin Way'); insert into users (name, phone, address) values ('Craig Hicks', '7-(410)974-3037', '8685 Golf Plaza'); insert into users (name, phone, address) values ('Cynthia Wagner', '3-(950)053-5261', '6 Huxley Court'); insert into users (name, phone, address) values ('Amanda Evans', '5-(087)272-1653', '46 Parkside Drive'); insert into users (name, phone, address) values ('Rebecca Gonzalez', '1-(866)422-2386', '49 Nobel Hill'); insert into users (name, phone, address) values ('Cheryl Garrett', '0-(396)593-6000', '34872 Larry Point'); insert into users (name, phone, address) values ('Fred Morgan', '3-(701)049-8943', '00784 Bartillon Street'); insert into users (name, phone, address) values ('Tina Ruiz', '6-(279)152-5181', '5 Logan Street'); insert into users (name, phone, address) values ('Bruce Martinez', '1-(257)886-3671', '92 Delladonna Pass'); insert into users (name, phone, address) values ('Catherine Welch', '8-(920)649-5557', '511 Chinook Hill'); insert into users (name, phone, address) values ('Roger Wallace', '8-(994)322-0011', '700 Reindahl Trail'); insert into users (name, phone, address) values ('Gregory Ward', '6-(577)499-7414', '33 Eagan Junction'); insert into users (name, phone, address) values ('Marilyn Owens', '4-(990)187-0918', '596 Mendota Pass'); insert into users (name, phone, address) values ('Jeremy Wright', '6-(712)876-2744', '9284 Clove Terrace'); insert into users (name, phone, address) values ('Robin Roberts', '7-(541)999-3391', '56817 Gulseth Pass'); insert into users (name, phone, address) values ('Anna Roberts', '1-(992)789-2733', '3426 Walton Hill'); insert into users (name, phone, address) values ('Deborah Hamilton', '8-(225)215-0020', '3109 Hayes Point'); insert into users (name, phone, address) values ('Justin Willis', '3-(459)964-8760', '7 Cottonwood Park'); insert into users (name, phone, address) values ('Rose Montgomery', '6-(764)173-6461', '60880 Warner Street'); insert into users (name, phone, address) values ('Henry Payne', '4-(558)322-6371', '24493 Stuart Trail'); insert into users (name, phone, address) values ('Brenda Miller', '9-(471)525-6821', '869 Calypso Street'); insert into users (name, phone, address) values ('Nicholas Bell', '7-(892)917-0907', '34987 Di Loreto Parkway'); insert into users (name, phone, address) values ('Albert Morrison', '5-(535)068-1960', '10 Hansons Center'); insert into users (name, phone, address) values ('Phyllis Hayes', '4-(395)139-7509', '1 Schiller Circle'); insert into users (name, phone, address) values ('Deborah Wilson', '4-(498)135-0963', '79516 Elgar Court'); insert into users (name, phone, address) values ('Chris Diaz', '8-(187)352-6356', '968 Pankratz Parkway'); insert into users (name, phone, address) values ('Justin Cole', '8-(548)005-1602', '01196 Lillian Trail'); insert into users (name, phone, address) values ('Ruby Shaw', '8-(158)854-8095', '55516 Basil Center'); insert into users (name, phone, address) values ('Ruth Warren', '6-(972)955-5216', '15542 Ruskin Court'); insert into users (name, phone, address) values ('Andrea Sanchez', '0-(599)723-6823', '75 Truax Point'); insert into users (name, phone, address) values ('Catherine Richards', '9-(538)678-6110', '65 Gulseth Street'); insert into users (name, phone, address) values ('Irene Simpson', '5-(465)188-8897', '51 Algoma Road'); insert into users (name, phone, address) values ('Debra King', '4-(233)304-8656', '484 Waywood Trail'); insert into users (name, phone, address) values ('George Fox', '0-(288)639-9552', '1 Rieder Road'); insert into users (name, phone, address) values ('Robert Kim', '7-(244)329-0332', '5 Michigan Junction'); insert into users (name, phone, address) values ('Julia Rose', '5-(748)904-6538', '729 Crescent Oaks Way'); insert into users (name, phone, address) values ('Samuel Richards', '3-(822)944-5409', '10634 Hoard Hill'); insert into users (name, phone, address) values ('Joshua Stone', '4-(335)309-7323', '71 Sloan Way'); insert into users (name, phone, address) values ('Douglas Alexander', '7-(100)364-2255', '47 Glendale Circle'); insert into users (name, phone, address) values ('Gloria Adams', '0-(359)237-2535', '51 Eagle Crest Trail'); insert into users (name, phone, address) values ('Clarence Mcdonald', '6-(875)279-0923', '97 Browning Junction'); insert into users (name, phone, address) values ('Julia Wallace', '9-(211)326-5227', '1 Maryland Pass'); insert into users (name, phone, address) values ('Kevin Gutierrez', '3-(539)237-9258', '3 Thompson Crossing'); insert into users (name, phone, address) values ('Harry Rogers', '0-(515)083-7880', '08 Cody Trail');
nguyentamvinhlong/ajax-rails-datatables-example
docs/users_30.sql
SQL
mit
107,248
<?php namespace Dotdigitalgroup\Email\Model\Sync; interface SyncInterface { /** * Run this sync * @param \DateTime|null $from A date to sync from (if supported) * @return void */ public function sync(\DateTime $from = null); }
dotmailer/dotmailer-magento2-extension
Model/Sync/SyncInterface.php
PHP
mit
259
package com.ignis.com.ignis.gui; public class ResourceStrings { public String imagePath(int ref){ String imagePath = ""; if(ref == 0){ imagePath = "C:\\Users\\Peter Hansen\\Pictures\\Resources\\Programs\\Ignis\\Login Screen\\loginBackgroundE.png"; } else if(ref == 1){ imagePath = "C:\\Users\\Peter Hansen\\Pictures\\Resources\\Programs\\Ignis\\Login Screen\\menuBackgroundE.png"; } else if(ref == 2){ imagePath = "C:\\Users\\Peter Hansen\\Pictures\\Resources\\Programs\\Ignis\\recordScreen.png"; } return imagePath; } }
peterhansen1198/Ignis
src/com/ignis/com/ignis/gui/ResourceStrings.java
Java
mit
633
package com.github.lunatrius.dod; import com.github.lunatrius.dod.reference.Reference; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.network.NetworkCheckHandler; import net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry; import net.minecraftforge.fml.common.registry.GameData; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.oredict.OreDictionary; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class DumpOreDictionary { public static final FMLControlledNamespacedRegistry<Block> BLOCK_REGISTRY = GameData.getBlockRegistry(); public static final FMLControlledNamespacedRegistry<Item> ITEM_REGISTRY = GameData.getItemRegistry(); public static final String DELIMITER = ","; public static final String NEWLINE = "\n"; @NetworkCheckHandler public boolean checkModList(final Map<String, String> versions, final Side side) { return true; } @Mod.EventHandler public void postInit(final FMLPostInitializationEvent event) { final Map<String, List<OreEntry>> dictionary = getDictionary(); final File dumpDirectory = new File(getDataDirectory(), "dumps"); if (!dumpDirectory.exists()) { if (!dumpDirectory.mkdirs()) { Reference.logger.warn("Could not create directory [{}]!", dumpDirectory.getAbsolutePath()); } } final File fileJson = new File(dumpDirectory, "OreDictionary.json"); final File fileCsv = new File(dumpDirectory, "OreDictionary.csv"); final String dictionaryJson = getDictionaryJson(dictionary); final String dictionaryCSV = getDictionaryCsv(dictionary); try { writeToFile(fileJson, dictionaryJson); writeToFile(fileCsv, dictionaryCSV); } catch (final IOException e) { Reference.logger.error("Failed to write to files!", e); } } private Map<String, List<OreEntry>> getDictionary() { final Map<String, List<OreEntry>> dictionary = new LinkedHashMap<String, List<OreEntry>>(); final String[] names = OreDictionary.getOreNames(); Arrays.sort(names); for (final String name : names) { final ArrayList<OreEntry> list = new ArrayList<OreEntry>(); for (final ItemStack itemStack : OreDictionary.getOres(name)) { final String stackName = getName(itemStack.getItem()); final int meta = itemStack.getItemDamage(); final String displayName = meta != OreDictionary.WILDCARD_VALUE ? itemStack.getItem().getItemStackDisplayName(itemStack) : "*"; final OreEntry entry = new OreEntry(stackName, meta, displayName); list.add(entry); } dictionary.put(name, list); } return dictionary; } private String getName(final Item item) { if (item instanceof ItemBlock) { return String.valueOf(BLOCK_REGISTRY.getNameForObject(((ItemBlock) item).block)); } return String.valueOf(ITEM_REGISTRY.getNameForObject(item)); } private String getDictionaryJson(Map<String, List<OreEntry>> dictionary) { final Gson gson = new GsonBuilder().setPrettyPrinting().create(); return gson.toJson(dictionary); } private String getDictionaryCsv(Map<String, List<OreEntry>> dictionary) { final StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("Ore Name").append(DELIMITER).append("Item ID").append(DELIMITER).append("Meta").append(DELIMITER).append("Display name").append(NEWLINE); for (final Map.Entry<String, List<OreEntry>> entry : dictionary.entrySet()) { for (OreEntry oreEntry : entry.getValue()) { stringBuilder.append(entry.getKey()); stringBuilder.append(DELIMITER); stringBuilder.append(oreEntry.name); stringBuilder.append(DELIMITER); stringBuilder.append(oreEntry.meta); stringBuilder.append(DELIMITER); stringBuilder.append(oreEntry.displayName); stringBuilder.append(NEWLINE); } } return stringBuilder.toString(); } private File getDataDirectory() { if (FMLCommonHandler.instance().getSide().isClient()) { return Minecraft.getMinecraft().mcDataDir; } return new File("."); } private void writeToFile(final File file, final String content) throws IOException { final FileWriter fileWriter = new FileWriter(file); final BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); try { bufferedWriter.write(content); } finally { bufferedWriter.close(); } } }
Lunatrius/Dump-OreDictionary
src/main/java/com/github/lunatrius/dod/DumpOreDictionary.java
Java
mit
5,485
package com.eulerian.android.demo.activity; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import com.eulerian.android.demo.R; import com.eulerian.android.sdk.Action; import com.eulerian.android.sdk.CurrencyISO; import com.eulerian.android.sdk.EACart; import com.eulerian.android.sdk.EAEstimate; import com.eulerian.android.sdk.EAOrder; import com.eulerian.android.sdk.EAProducts; import com.eulerian.android.sdk.EAProperties; import com.eulerian.android.sdk.EASearch; import com.eulerian.android.sdk.EAnalytics; import com.eulerian.android.sdk.Params; import com.eulerian.android.sdk.Product; import com.eulerian.android.sdk.SiteCentricCFlag; import com.eulerian.android.sdk.SiteCentricProperty; public class MainActivity extends AppCompatActivity { private static final String TAG = MainActivity.class.getSimpleName(); private double latitude = 48.871835; private double longitude = 2.382430; private Product pates = new Product.Builder("ref-rrr") .setParams(new Params.Builder() .addParam("marque", "pasta4ever") .addParam("categorie", "frais") .addParam("stock", 4) .build()) .setName("Pates fraiches") .build(); private Product lardons = new Product.Builder("ref-lll") .setParams(new Params.Builder() .addParam("marque", "Miam Lardons") .addParam("categorie", "viande") .addParam("stock", 98) .build()) .setName("Lardons Premium") .build(); private Product bonnet = new Product.Builder("ref-bonnet-rouge") .setName("spiderbonnet") .setParams(new Params.Builder() .addParam("origin", "Belgique") .addParam("tissu", "rouge") .addParam("fait", "machine") .build()) .build(); private Product moufle = new Product.Builder("ref-moufle-noire") .setName("aeromoufle") .setParams(new Params.Builder() .addParam("origin", "France") .addParam("tissu", "noir") .addParam("fait", "main") .build()) .build(); private Product product2 = new Product.Builder("test-reference2") .setName("test-name2") .setParams(new Params.Builder() .addParam("param1", "value") .addParam("param2", 3) .addParam("param3", "value-3") .addParam("param4", "value-4") .build()) .build(); ; private Product product1 = new Product.Builder("test-reference1") .setName("test-name1") .setParams(new Params.Builder() .addParam("marque", "mars1") .addParam("categorie", "comestique1") .addParam("stock", 1) .addParam("taille", "43-1") .build()) .build(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.v(TAG, "EUIDL : " + EAnalytics.getEuidl()); } public void onClickProperties(View v) { EAProperties properties = new EAProperties.Builder("the_path") .setNewCustomer(true) .setEmail("test-email") .setPageGroup("test-group") .setLocation(latitude, longitude) .setProfile("test-profile") .setUID("test-uid") .set("whatever", "...") .set("whatever1", "...") .set("whatever2", "...") .setAction(new Action.Builder() .setReference("test-ref-\"fefds$432`^") .setIn("in-test") .addOut(new String[]{"tata", "tutu", "tete"}) .build()) .setProperty(new SiteCentricProperty.Builder() .set("cle1", new String[]{"poisson", "viande"}) .set("cle2", "choucroute") .build()) .setCFlag(new SiteCentricCFlag.Builder() .set("categorie_1", "rolandgarros", "wimbledon") .set("categorie_2", "tennis") .set("categorie_3", "usopen") .build()) .build(); EAnalytics.getInstance().track(properties); } public void onClickProducts(View v) { EAProducts products = new EAProducts.Builder("test-path") .setEmail("prenom.nom@mail.com") .setLocation(latitude, longitude) .addProduct(product1) .addProduct(product2) .build(); EAnalytics.getInstance().track(products); } public void onClickSearch(View v) { EASearch search = new EASearch.Builder("search-path", "banane") .setParams(new Params.Builder() .addParam("provenance", "martinique") .addParam("couleur", "jaune") .build()) .setResults(432) .build(); EAnalytics.getInstance().track(search); } public void onClickCart(View v) { EACart monPanier = new EACart.Builder("path-cart") .setCartCumul(true) .addProduct(moufle, 2.52, 42) .addProduct(bonnet, 2.123, -4) .build(); EAnalytics.getInstance().track(monPanier); } public void onClickEstimate(View v) { EAEstimate monDevis = new EAEstimate.Builder("test-path", "test-ref") .setAmount(432) .setCurrency(CurrencyISO.EUR) .setType("test-type") .addProduct(pates, 32.111, 1) .addProduct(lardons, 3.99, 21) .build(); EAnalytics.getInstance().track(monDevis); } public void onClickSale(View v) { EAOrder maVente = new EAOrder.Builder("test-path", "test-ref") .setAmount(432) .setCurrency(CurrencyISO.EUR) .setType("test-type") .setPayment("test-payment") .setEstimateRef("test-estimate-ref") .addProduct(pates, 32.32, 1) .addProduct(lardons, 3.01, 21) .build(); EAnalytics.getInstance().track(maVente); } }
EulerianTechnologies/eanalytics-android
app/src/main/java/com/eulerian/android/demo/activity/MainActivity.java
Java
mit
6,738
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Function template read_info</title> <link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> <link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset"> <link rel="up" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp" title="Header &lt;boost/property_tree/info_parser.hpp&gt;"> <link rel="prev" href="read_info_id1098608.html" title="Function template read_info"> <link rel="next" href="write_info_id1098705.html" title="Function template write_info"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td> <td align="center"><a href="../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="read_info_id1098608.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_info_id1098705.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="refentry"> <a name="boost.property_tree.info_parser.read_info_id1098655"></a><div class="titlepage"></div> <div class="refnamediv"> <h2><span class="refentrytitle">Function template read_info</span></h2> <p>boost::property_tree::info_parser::read_info</p> </div> <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp" title="Header &lt;boost/property_tree/info_parser.hpp&gt;">boost/property_tree/info_parser.hpp</a>&gt; </span> <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Ptree<span class="special">&gt;</span> <span class="keyword">void</span> <span class="identifier">read_info</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="special">&amp;</span> filename<span class="special">,</span> <span class="identifier">Ptree</span> <span class="special">&amp;</span> pt<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">Ptree</span> <span class="special">&amp;</span> default_ptree<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span> <span class="special">&amp;</span> loc <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">locale</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></div> <div class="refsect1"> <a name="id2570708"></a><h2>Description</h2> <p>Read INFO from a the given file and translate it to a property tree. The tree's key type must be a string type, i.e. it must have a nested value_type typedef that is a valid parameter for basic_ifstream. </p> <div class="note"><table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../doc/src/images/note.png"></td> <th align="left">Note</th> </tr> <tr><td align="left" valign="top"><p>Replaces the existing contents. Strong exception guarantee. </p></td></tr> </table></div> <p> </p> <div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody><tr> <td><p><span class="term">Parameters:</span></p></td> <td><div class="variablelist"><table border="0"> <col align="left" valign="top"> <tbody><tr> <td><p><span class="term"><code class="computeroutput">default_ptree</code></span></p></td> <td><p>If parsing fails, pt is set to a copy of this tree. </p></td> </tr></tbody> </table></div></td> </tr></tbody> </table></div> </div> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright &#169; 2008 Marcin Kalicinski<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="read_info_id1098608.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../property_tree/reference.html#header.boost.property_tree.info_parser_hpp"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="write_info_id1098705.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>
djsedulous/namecoind
libs/boost_1_50_0/doc/html/boost/property_tree/info_parser/read_info_id1098655.html
HTML
mit
6,012
#!/bin/sh . ${BUILDPACK_TEST_RUNNER_HOME}/lib/test_utils.sh testSuccess() { capture ${BUILDPACK_HOME}/bin/release ${BUILD_DIR} assertCapturedSuccess }
andjosh/nchan-buildpack
test/release_test.sh
Shell
mit
163
package hu.kazocsaba.math.matrix; import hu.kazocsaba.math.matrix.backbone.VectorOp; /** * * @author Kazó Csaba */ class CoredVectorImpl extends CoredMatrixImpl implements Vector { CoredVectorImpl(MatrixCore core) { super(core); } @Override public int getDimension() { return getRowCount(); } @Override public double getCoord(int index) { return get(index, 0); } @Override public double getCoordQuick(int index) { return getQuick(index, 0); } @Override public void setCoord(int index, double value) { set(index, 0, value); } @Override public void setCoordQuick(int index, double value) { setQuick(index, 0, value); } @Override public double dot(Vector v) { return VectorOp.dot(this, v); } @Override public Vector plus(Matrix m) { return (Vector)VectorOp.plus(this, m); } @Override public Vector minus(Matrix m) { return (Vector)VectorOp.minus(this, m); } @Override public Vector times(double c) { return (Vector)VectorOp.times(this, c); } @Override public Vector normalized() { return (Vector)VectorOp.normalized(this); } @Override public Vector toHomogeneous() { return VectorOp.toHomogeneous(this); } @Override public Vector fromHomogeneous() { return VectorOp.fromHomogeneous(this); } }
kazocsaba/matrix
src/main/java/hu/kazocsaba/math/matrix/CoredVectorImpl.java
Java
mit
1,272
My try to recreate Atari's Asteroids. Done for trigonometry practice.
nikitindiz/asteroids-game
README.md
Markdown
mit
69
//============================================================================= // This file is part of The Scripps Research Institute's C-ME Application built // by InterKnowlogy. // // Copyright (C) 2006, 2007 Scripps Research Institute / InterKnowlogy, LLC. // All rights reserved. // // For information about this application contact Tim Huckaby at // TimHuck@InterKnowlogy.com or (760) 930-0075 x201. // // THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. //============================================================================= using System; using System.Collections.Generic; using System.Text; using System.Windows.Media; using System.Windows.Media.Media3D; namespace MoleculeViewer { /// <summary> /// Represents a residue in a molecule. /// </summary> /// <remarks> /// Sometimes referred to as an amino acid. Generates WPF content to display the /// residue in cartoon mode as well as in the identifier strip at the /// top of the screen. Aggregates all constituent atoms. /// </remarks> internal class Residue : HoverObject { /// <summary> /// /// </summary> internal enum SelectionType { None, Partial, Full }; private Molecule molecule; private string residueName; private string chainIdentifier; private int residueSequenceNumber; private string residueIdentifier; private Color residueColor; private Color structureColor; private Color color; private List<Atom> atoms; private bool isSheet; private bool isHelix; private bool isStructureStart; private bool isStructureEnd; private Residue previousResidue; private Residue nextResidue; private Point3D? cAlphaPosition; private Point3D? carbonylOxygenPosition; private Chain chain; private Ribbon ribbon; private List<ResidueStripItem> residueStripItems; private Model3DGroup model; private ColorScheme colorScheme; private SelectionType selection; private SelectionType showAsSelection; private bool updatingSelectionProperty; private Cartoon cartoon; /// <summary> /// Creates a new <see cref="Residue" /> object. /// </summary> /// <param name="molecule">The molecule this residue belongs to.</param> /// <param name="atom">An atom in the residue. This is needed to obtain residue properties /// since there is no corresponding PDB file record.</param> internal Residue(Molecule molecule, Atom atom) { this.molecule = molecule; this.molecule.ShowCartoonChanged += this.MoleculeShowCartoonChanged; this.residueName = atom.ResidueName; this.chainIdentifier = atom.ChainIdentifier; this.residueSequenceNumber = atom.ResidueSequenceNumber; this.atoms = new List<Atom>(); this.atoms.Add(atom); this.residueIdentifier = Residue.GetResidueIdentifier(this.residueName); this.residueColor = Residue.GetResidueColor(this.residueName); this.structureColor = this.residueIdentifier != "O" ? Colors.LightGray : Colors.Red; this.colorScheme = ColorScheme.Structure; this.residueStripItems = new List<ResidueStripItem>(); foreach (char character in this.residueIdentifier) { ResidueStripItem residueStripItem = new ResidueStripItem(character.ToString()); residueStripItem.Residue = this; this.residueStripItems.Add(residueStripItem); } this.model = new Model3DGroup(); this.UpdateColorView(); } /// <summary> /// Label used for atom tooltips. /// </summary> internal override string DisplayName { get { return "[" + this.residueSequenceNumber + "] " + this.residueName; } } /// <summary> /// The multi-character abbreviation for the residue. For chain-based amino acids, this is /// a three letter code. /// </summary> internal string ResidueName { get { return this.residueName; } } /// <summary> /// Alphanumeric chain identifier for the chain residue belongs to. /// </summary> internal string ChainIdentifier { get { return this.chainIdentifier; } } /// <summary> /// Index number for this amino acid. /// </summary> internal int ResidueSequenceNumber { get { return this.residueSequenceNumber; } } /// <summary> /// Shortened abbreviation for the residue. For chain-based amino acids, this is a single /// letter. /// </summary> internal string ResidueIdentifier { get { return this.residueIdentifier; } } /// <summary> /// The color used for this residue when using the residue-based coloring method. /// </summary> internal Color ResidueColor { get { return this.residueColor; } } /// <summary> /// The constituent atoms. /// </summary> internal List<Atom> Atoms { get { return this.atoms; } } /// <summary> /// The 3D model for this residue. /// </summary> internal Model3DGroup Model { get { return this.model; } } /// <summary> /// Gets and sets a boolean value indicating if this residue is part of a sheet. /// </summary> internal bool IsSheet { get { return this.isSheet; } set { this.isSheet = value; } } /// <summary> /// Gets and sets a boolean value indicating if this residue is part of a helix. /// </summary> internal bool IsHelix { get { return this.isHelix; } set { this.isHelix = value; } } /// <summary> /// Gets and sets a boolean value indicating if this residue is the first residue in a /// secondary structure. /// </summary> internal bool IsStructureStart { get { return this.isStructureStart; } set { this.isStructureStart = value; } } /// <summary> /// Gets and sets a boolean value indicating if this residue is the last residue in a /// secondary structure. /// </summary> internal bool IsStructureEnd { get { return this.isStructureEnd; } set { this.isStructureEnd = value; } } /// <summary> /// Reference to the previous residue in the current chain. /// </summary> internal Residue PreviousResidue { get { return this.previousResidue; } set { this.previousResidue = value; } } /// <summary> /// Reference to the next residue in the current chain. /// </summary> internal Residue NextResidue { get { return this.nextResidue; } set { this.nextResidue = value; } } /// <summary> /// If residue belongs to a standard protein amino acid this will contain the 3D location /// of the alpha carbon atom. /// </summary> internal Point3D? CAlphaPosition { get { return this.cAlphaPosition; } set { this.cAlphaPosition = value; } } /// <summary> /// If residue belongs to a standard protein amino acid this will contain the 3D location /// of the carbonyl oxygen atom. /// </summary> internal Point3D? CarbonylOxygenPosition { get { return this.carbonylOxygenPosition; } set { this.carbonylOxygenPosition = value; } } /// <summary> /// The chain this residue belongs to. /// </summary> internal Chain Chain { get { return this.chain; } set { this.chain = value; } } /// <summary> /// Reference to the <see cref="Ribbon" /> object that calculates spline paths for this /// residue. /// </summary> internal Ribbon Ribbon { get { return this.ribbon; } set { this.ribbon = value; } } /// <summary> /// The color to use for this residue when using the structure-based coloring method. /// </summary> internal Color StructureColor { get { return this.structureColor; } set { this.structureColor = value; this.UpdateColorView(); } } /// <summary> /// All of the <see cref="ResidueStripItem" /> controls for this residue. For protein /// amino acids, there is only one item in this list. /// </summary> internal List<ResidueStripItem> ResidueStripItems { get { return this.residueStripItems; } } /// <summary> /// Currently used coloring method. /// </summary> internal ColorScheme ColorScheme { get { return this.colorScheme; } set { if (this.colorScheme != value) { this.colorScheme = value; this.UpdateColorView(); } } } /// <summary> /// Gets and sets a <see cref="SelectionType" /> enumeration value indicating the current /// selection state. /// </summary> internal SelectionType Selection { get { return this.selection; } set { if (this.selection != value) { this.selection = value; this.showAsSelection = this.selection; this.UpdateView(); this.updatingSelectionProperty = true; foreach (Atom atom in this.atoms) { if (this.selection == SelectionType.None) atom.IsSelected = false; else if (this.selection == SelectionType.Full) atom.IsSelected = true; } this.updatingSelectionProperty = false; } } } /// <summary> /// Gets and sets a <see cref="SelectionType" /> enumeration value indicating if the /// residue is rendered as selected. For certain operations such as rubber-banding a /// residue might be rendered as though it were selected even though it's not. /// </summary> internal SelectionType ShowAsSelection { get { return this.showAsSelection; } set { if (this.showAsSelection != value) { this.showAsSelection = value; this.UpdateView(); this.updatingSelectionProperty = true; foreach (Atom atom in this.atoms) { if (this.showAsSelection == SelectionType.None) atom.ShowAsSelected = false; else if (this.showAsSelection == SelectionType.Partial) atom.ShowAsSelected = atom.IsSelected; else if (this.showAsSelection == SelectionType.Full) atom.ShowAsSelected = true; } this.updatingSelectionProperty = false; } } } /// <summary> /// Updates the selection state based on the selection states of the constituent atoms. /// </summary> internal void UpdateForAtomSelectionChange() { if (this.updatingSelectionProperty) return; bool dirty = false; bool fullSelected = true; bool partialSelected = false; foreach (Atom atom in this.atoms) { if (atom.IsSelected) partialSelected = true; else fullSelected = false; } if (fullSelected && this.selection != SelectionType.Full) { this.selection = SelectionType.Full; dirty = true; } else if (!fullSelected && partialSelected && this.selection != SelectionType.Partial) { this.selection = SelectionType.Partial; dirty = true; } else if (!partialSelected && this.selection != SelectionType.None) { this.selection = SelectionType.None; dirty = true; } bool fullShowAsSelected = true; bool partialShowAsSelected = false; foreach (Atom atom in this.atoms) { if (atom.ShowAsSelected) partialShowAsSelected = true; else fullShowAsSelected = false; } if (fullShowAsSelected && this.showAsSelection != SelectionType.Full) { this.showAsSelection = SelectionType.Full; dirty = true; } else if (!fullShowAsSelected && partialShowAsSelected && this.showAsSelection != SelectionType.Partial) { this.showAsSelection = SelectionType.Partial; dirty = true; } else if (!partialShowAsSelected && this.showAsSelection != SelectionType.None) { this.showAsSelection = SelectionType.None; dirty = true; } if (dirty) this.UpdateView(); } /// <summary> /// Performs hit testing for this residue. /// </summary> /// <param name="rayHitTestResult">A 3D mesh hit test result from the WPF visual tree hit /// testing framework</param> /// <returns>True if the mesh hit belongs to this residue, otherwise false.</returns> internal virtual bool HoverHitTest(RayMeshGeometry3DHitTestResult rayHitTestResult) { if (this.cartoon != null) return this.cartoon.HoverHitTest(rayHitTestResult); else return false; } /// <summary> /// Determines if a particular residue name refers to an amino acid. /// </summary> /// <param name="residueName">A multi-character residue abbreviation.</param> /// <returns>True if and only if the residue name refers to an amino acid.</returns> internal static bool IsAminoName(string residueName) { if (residueName == "ALA") return true; else if (residueName == "ARG") return true; else if (residueName == "ASP") return true; else if (residueName == "CYS") return true; else if (residueName == "GLN") return true; else if (residueName == "GLU") return true; else if (residueName == "GLY") return true; else if (residueName == "HIS") return true; else if (residueName == "ILE") return true; else if (residueName == "LEU") return true; else if (residueName == "LYS") return true; else if (residueName == "MET") return true; else if (residueName == "PHE") return true; else if (residueName == "PRO") return true; else if (residueName == "SER") return true; else if (residueName == "THR") return true; else if (residueName == "TRP") return true; else if (residueName == "TYR") return true; else if (residueName == "VAL") return true; else if (residueName == "ASN") return true; else return false; } /// <summary> /// Updates the 3D model to depict the correct hovered state. /// </summary> protected override void OnIsHoveredChanged() { this.UpdateView(); } /// <summary> /// Static method to obtain the single character abbreviation of an amino acid. /// </summary> /// <param name="residueName">A multi-character residue abbreviation.</param> /// <returns>A single character abbreviation if one is available, othewise return the input /// abbreviation.</returns> private static string GetResidueIdentifier(string residueName) { if (residueName == "HOH") return "O"; else if (residueName == "ALA") return "A"; else if (residueName == "ARG") return "R"; else if (residueName == "ASP") return "D"; else if (residueName == "CYS") return "C"; else if (residueName == "GLN") return "Q"; else if (residueName == "GLU") return "E"; else if (residueName == "GLY") return "G"; else if (residueName == "HIS") return "H"; else if (residueName == "ILE") return "I"; else if (residueName == "LEU") return "L"; else if (residueName == "LYS") return "K"; else if (residueName == "MET") return "M"; else if (residueName == "PHE") return "F"; else if (residueName == "PRO") return "P"; else if (residueName == "SER") return "S"; else if (residueName == "THR") return "T"; else if (residueName == "TRP") return "W"; else if (residueName == "TYR") return "Y"; else if (residueName == "VAL") return "V"; else if (residueName == "ASN") return "N"; else return residueName; } /// <summary> /// Selects a color based on the residue type. /// </summary> /// <param name="residueName">A multi-character residue abbreviation.</param> /// <returns>A color for the residue.</returns> private static Color GetResidueColor(string residueName) { if (residueName == "HOH") return Colors.Red; else if (residueName == "ALA") return Color.FromRgb(199, 199, 199); else if (residueName == "ARG") return Color.FromRgb(229, 10, 10); else if (residueName == "CYS") return Color.FromRgb(229, 229, 0); else if (residueName == "GLN") return Color.FromRgb(0, 229, 229); else if (residueName == "GLU") return Color.FromRgb(229, 10, 10); else if (residueName == "GLY") return Color.FromRgb(234, 234, 234); else if (residueName == "HIS") return Color.FromRgb(130, 130, 209); else if (residueName == "ILE") return Color.FromRgb(15, 130, 15); else if (residueName == "LEU") return Color.FromRgb(15, 130, 15); else if (residueName == "LYS") return Color.FromRgb(20, 90, 255); else if (residueName == "MET") return Color.FromRgb(229, 229, 0); else if (residueName == "PHE") return Color.FromRgb(50, 50, 169); else if (residueName == "PRO") return Color.FromRgb(219, 149, 130); else if (residueName == "SER") return Color.FromRgb(249, 149, 0); else if (residueName == "THR") return Color.FromRgb(249, 149, 0); else if (residueName == "TRP") return Color.FromRgb(179, 90, 179); else if (residueName == "TYR") return Color.FromRgb(50, 50, 169); else if (residueName == "VAL") return Color.FromRgb(15, 130, 15); else if (residueName == "ASN") return Color.FromRgb(0, 229, 229); else return Colors.Green; } /// <summary> /// Toggles visibility of 3D model components based on the /// <see cref="Molecule.ShowCartoon" /> property. /// </summary> /// <param name="sender">The molecule.</param> /// <param name="e">Empty event args.</param> private void MoleculeShowCartoonChanged(object sender, EventArgs e) { if (this.ribbon != null) { if (this.molecule.ShowCartoon && this.cartoon == null) { this.cartoon = new Cartoon(this, this.color); } if (this.molecule.ShowCartoon && !this.Model.Children.Contains(this.cartoon.Model)) { this.model.Children.Add(this.cartoon.Model); } else if (!this.molecule.ShowCartoon && this.model.Children.Contains(this.cartoon.Model)) { this.model.Children.Remove(this.cartoon.Model); } } } /// <summary> /// Selects the material color for this residue based on the coloring method. /// </summary> private void UpdateColorView() { if (this.colorScheme == ColorScheme.Structure) this.color = this.structureColor; else if (this.colorScheme == ColorScheme.Atom && this.residueIdentifier == "O") this.color = Colors.Red; else if (this.colorScheme == ColorScheme.Atom) this.color = Colors.LightGray; else if (this.colorScheme == ColorScheme.Residue) this.color = this.residueColor; else if (this.colorScheme == ColorScheme.Chain && this.chain != null) this.color = this.chain.ChainColor; else if (this.colorScheme == ColorScheme.Temperature) this.color = Atom.GetAverageTemperateColor(this.atoms); else this.color = Colors.LightGray; this.UpdateView(); } /// <summary> /// Updates the material color for this atom based on the coloring method and the current /// hover state. /// </summary> private void UpdateView() { Color actualColor = this.color; if (this.IsHovered) { byte r = (byte)(color.R + (255 - color.R) / 2); byte g = (byte)(color.G + (255 - color.G) / 2); byte b = (byte)(color.B + (255 - color.B) / 2); if (r == g && g == b) r = g = b = 255; actualColor = Color.FromRgb(r, g, b); } SolidColorBrush foreground = new SolidColorBrush(actualColor); SolidColorBrush background = Brushes.Transparent; if (this.showAsSelection == SelectionType.Partial) { foreground = new SolidColorBrush(actualColor); background = new SolidColorBrush( Color.FromArgb(96, actualColor.R, actualColor.G, actualColor.B)); } else if (this.showAsSelection == SelectionType.Full) { foreground = Brushes.Black; background = new SolidColorBrush(actualColor); } foreach (ResidueStripItem residueStripItem in this.residueStripItems) { residueStripItem.Label.Foreground = foreground; residueStripItem.Label.Background = background; } if (this.cartoon != null) this.cartoon.Color = actualColor; } } }
kobush/ModernMoleculeViewer
wpf/MoleculeViewer/Residue.cs
C#
mit
23,805
package cmcc.iot.onenet.javasdk.response.device; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; @JsonIgnoreProperties(ignoreUnknown = true) public class NewDeviceResponse { @JsonProperty(value="device_id") private String deviceId; @JsonProperty(value="psk") private String psk; public String getDeviceId() { return deviceId; } public void setDeviceId(String DeviceId) { this.deviceId = DeviceId; } public String getPsk() { return psk; } public void setPsk(String psk) { this.psk = psk; } }
cm-heclouds/JAVA-HTTP-SDK
javaSDK/src/main/java/cmcc/iot/onenet/javasdk/response/device/NewDeviceResponse.java
Java
mit
649
--- layout: post title: python 调用Linux的Shell命令 tags: - python - linux - shell - 研发实践 categories: - code - archives UUID: 201301251427 date: 2013-01-25 08:27:22 images: ["/assets/images/python/486px-Python_logo.png"] --- <a href="{{site.url}}/assets/images/python/486px-Python_logo.png" alt="python" target="_bank"> <img src="{{site.aliyun_oss}}/assets/images/python/486px-Python_logo.png" alt="python" width="380px" class="img-center"/> </a>   Python是一种即译式的,互动的,面向对象的编程语言,它包含了模组式的操作,异常处理,动态资料形态,十分高层次的动态资料结构,以及类别的使用。它具有很多优秀的脚本语言的特点:解释的,面向对象的,内建的高级数据结构,支持模块和包,支持多种平台,可扩展。而且它还支持交互式方式运行,图形方式运行。它拥有众多的编程界面支持各种操作系统平台以及众多的各类函数库。介绍下Python调用Linux的shell命令. ###os 模块 1、os模块的exec方法族。Python的exec系统方法同Unix的exec系统调用是一致的。这些方法适用于在子进程中调用外部程序的情况,因为外部程序会替换当前进程的代码,不会返回。 2、os.system(cmd) os模块的system方法。system方法会创建子进程运行外部程序,方法只返回外部程序的运行结果。这个方法比较适用于外部程序没有输出结果的情况。比如在Ubuntu下,使用下面命令在桌面上显示一条提示信息。 <pre id="bash"> denghp@denghp:~/temp$ python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.system('ls -lt') total 32 -rw-rw-r-- 1 denghp denghp 209 Jan 21 15:37 0752.tar.gz drwxrwxr-x 2 denghp denghp 4096 Jan 21 15:37 test -rw-rw-r-- 1 denghp denghp 5 Jan 17 17:43 0752.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:43 abc0752abc.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:43 abc0752.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:23 c.txt -rw-rw-r-- 1 denghp denghp 8 Jan 17 17:23 b.txt -rw-rw-r-- 1 denghp denghp 6 Jan 17 17:23 a.txt 0 </pre> 3、使用os模块的popen方法。当需要得到外部程序的输出结果时,本方法非常有用。比如使用urllib调用Web API时,需要对得到的数据进行处理。os.popen(cmd) 要得到命令的输出内容,只需再调用下read()或readlines()等 如a=os.popen(cmd).read() <pre id="bash"> >>> print os.popen('ls -lt').read() total 32 -rw-rw-r-- 1 denghp denghp 209 Jan 21 15:37 0752.tar.gz drwxrwxr-x 2 denghp denghp 4096 Jan 21 15:37 test -rw-rw-r-- 1 denghp denghp 5 Jan 17 17:43 0752.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:43 abc0752abc.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:43 abc0752.txt -rw-rw-r-- 1 denghp denghp 4 Jan 17 17:23 c.txt -rw-rw-r-- 1 denghp denghp 8 Jan 17 17:23 b.txt -rw-rw-r-- 1 denghp denghp 6 Jan 17 17:23 a.txt </pre> ###commands 模块 使用commands模块的getoutput方法,这种方法同popend的区别在于popen返回的是一个文件句柄,而本方法将外部程序的输出结果当作字符串返回,很多情况下用起来要更方便些。<br> <strong>主要方法:</strong> commands.getstatusoutput(cmd) 返回(status, output).<br> commands.getoutput(cmd) 只返回输出结果<br> commands.getstatus(file) 返回ls -ld file的执行结果字符串,调用了getoutput,不建议使用此方法.<br> <pre id="bash"> >>> import commands >>> commands.getstatusoutput('find -name "*.txt" ') (0, './abc0752.txt\n./a.txt\n./c.txt\n./0752.txt\n./test/abc0752.txt\n./test/0752.txt') >>> result = commands.getstatusoutput('find -name "*.txt"|head -n1') >>> print result (0, './abc0752.txt') </pre> ###使用subprocess模块 使用subprocess模块,这个模块比较复杂,可以对子进程做更多控制。根据Python官方文档说明,subprocess模块用于取代上面这些模块。有一个用Python实现的并行ssh工具—mssh,代码很简短,不过很有意思,它在线程中调用subprocess启动子进程来干活。
denghp/denghp.github.com
_posts/python/2013-01-25-python-shell-command.md
Markdown
mit
4,185
require 'gems' require 'highline/import' require 'clipboard' require 'rainbow/ext/string' require 'gems-cli/version.rb' require 'gems-cli/paginator.rb'
chaserx/gems-cli
lib/gems-cli.rb
Ruby
mit
152
#!/usr/bin/env python # -*- coding: utf-8 -*- import SocketServer import time HOST = '' PORT = 1234 ADDR = (HOST, PORT) class MyRequestHandler(SocketServer.StreamRequestHandler): def handle(self): print('...connected from: {}'.format(self.client_address)) self.wfile.write('[{}] {}'.format(time.ctime(), self.rfile.readline())) if __name__ == '__main__': tcpServ = SocketServer.TCPServer(ADDR, MyRequestHandler) print('waiting fro connection...') tcpServ.serve_forever()
Furzoom/learnpython
app/test/TsTservSS.py
Python
mit
553
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_05) on Thu Sep 30 22:15:56 GMT+01:00 2004 --> <TITLE> Uses of Package org.springframework.remoting.rmi (Spring Framework) </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Uses of Package org.springframework.remoting.rmi (Spring Framework)"; } </SCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Package<br>org.springframework.remoting.rmi</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Packages that use <A HREF="../../../../org/springframework/remoting/rmi/package-summary.html">org.springframework.remoting.rmi</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#org.springframework.remoting.rmi"><B>org.springframework.remoting.rmi</B></A></TD> <TD>Remoting classes for conventional RMI and transparent remoting via RMI invokers. &nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="org.springframework.remoting.rmi"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> Classes in <A HREF="../../../../org/springframework/remoting/rmi/package-summary.html">org.springframework.remoting.rmi</A> used by <A HREF="../../../../org/springframework/remoting/rmi/package-summary.html">org.springframework.remoting.rmi</A></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../../../../org/springframework/remoting/rmi/class-use/JndiRmiClientInterceptor.html#org.springframework.remoting.rmi"><B>JndiRmiClientInterceptor</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interceptor for accessing RMI services from JNDI. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../../../../org/springframework/remoting/rmi/class-use/RmiClientInterceptor.html#org.springframework.remoting.rmi"><B>RmiClientInterceptor</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interceptor for accessing conventional RMI services or RMI invokers. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../../../../org/springframework/remoting/rmi/class-use/RmiInvocationHandler.html#org.springframework.remoting.rmi"><B>RmiInvocationHandler</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interface for RMI invocation handlers instances on the server, wrapping exported services. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><B><A HREF="../../../../org/springframework/remoting/rmi/class-use/RmiServiceExporter.html#org.springframework.remoting.rmi"><B>RmiServiceExporter</B></A></B> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RMI exporter that exposes the specified service as RMI object with the specified name. </TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i>Copyright (C) 2003-2004 The Spring Framework Project.</i> </BODY> </HTML>
dachengxi/spring1.1.1_source
docs/api/org/springframework/remoting/rmi/package-use.html
HTML
mit
7,908
<div id="title"></div> <nav> <a routerLink="/dashboard">Dashboard</a> <a routerLink="/heroes">Heroes</a> <a routerLink="/about-me">About Me</a> </nav> <router-outlet></router-outlet>
LaurentColoma/urshi
src/app/html/app.component.html
HTML
mit
188
- [x] Folders-by-feature structure - [How to define a highly scalable folder structure for your Angular project](https://itnext.io/choosing-a-highly-scalable-folder-structure-in-angular-d987de65ec7) - [angular.io - Folders-by-feature structure](https://angular.io/guide/styleguide#folders-by-feature-structure) ## Use ng schematics instead of @ionic/angular-toolkit angular.json remove ``` "cli": { "defaultCollection": "@ionic/angular-toolkit" }, "schematics": { "@ionic/angular-toolkit:component": { "styleext": "scss" }, "@ionic/angular-toolkit:page": { } } ``` ## Make ng components Ionic compliant When create module imports IonicModule When create component add update html to include `ion-content` ## Update ng default style extension By default angular create component with css style file, if your Ionic project use scss run following cmd to update ng config ``` ng config schematics.@schematics/angular:component.styleext scss ``` [source](https://medium.com/@rageshchakkadath/migrate-your-existing-angular-6-application-from-css-to-scss-f555749d490e) should add following lines on your `angular.json` ``` "schematics": { "@schematics/angular:component": { "styleext": "scss" } } ```
meumobi/meumobi.github.io
_drafts/follow-angular-guidelines-ionic-project.md
Markdown
mit
1,261
// // GlossyButton.h // MarathonMegan // // Created by Jennifer Duffey on 2/23/13. // // #import <UIKit/UIKit.h> @interface GlossyButton : UIButton @property (nonatomic, strong) UIColor *buttonBackgroundColor, *buttonTextColor; @property (nonatomic, assign) MarathonMeganColor meganColor; - (id)initWithBackgroundColor:(UIColor *)backgroundColor andTextColor:(UIColor *)textColor; @end
jenduf/MarathonMegan
MarathonMegan/GlossyButton.h
C
mit
394
 using ChakraCore.NET.API; using System; using System.Collections.Generic; using System.Text; using System.Threading; namespace ChakraCore.NET { public class ContextSwitchService :ServiceBase, IContextSwitchService,IDisposable { JavaScriptContext context; public EventWaitHandle Handle { get; private set; } public ContextSwitchService(JavaScriptContext context,EventWaitHandle handle) { Handle = handle; this.context = context; context.AddRef(); } public bool IsCurrentContext => JavaScriptContext.Current==context; public bool Enter() { if (IsCurrentContext) { return false; } else { System.Diagnostics.Debug.WriteLine("Enter"); Handle.WaitOne(); JavaScriptContext.Current = context; return true; } } public void Leave() { JavaScriptContext.Current = JavaScriptContext.Invalid; Handle.Set(); System.Diagnostics.Debug.WriteLine("Leave"); } public void With(Action a) { if(Enter()) { try { a(); } finally { Leave(); } } else { a(); } } public T With<T>(Func<T> f) { T result; if (Enter()) { try { result = f(); } finally { Leave(); } } else { result = f(); } return result; } public void Dispose() { context.Release(); } } }
JohnMasen/ChakraCore.NET
source/ChakraCore.NET.Core/Service/ContextSwitchService.cs
C#
mit
2,056
<!DOCTYPE html> <html> <head> <title>submergence.submergence:Configuration.&quot;Links&quot;~summary documentation</title> <link rel="stylesheet" type="text/css" href="../../../../../../../../../../index.css" /> <link rel="stylesheet" type="text/css" href="../../../../../../../../../../highlight.css" /> <script type="text/javascript" src="../../../../../../../../../../index.js"></script> </head> <body class="spare" id="component_1275"> <div id="outer"> <div id="header"> <a class="ctype" href="../../../../../../../../../../index.html">spare</a> <span></span> <span class="breadcrumbs"> <span class="delimiter">:</span><a href="../../../../../../../../index.html" class="breadcrumb module">submergence</a><span class="delimiter">.</span><a href="../../../../../../index.html" class="breadcrumb property">submergence</a><span class="delimiter">.</span><a href="../../../../index.html" class="breadcrumb struct">Configuration</a><span class="delimiter">.</span><a href="../../index.html" class="breadcrumb property">&quot;Links&quot;</a><span class="delimiter">~</span><a href="index.html" class="breadcrumb spare">summary</a> </span> </div> <div id="content"> <!-- basic document info --> <div id="details"> <div class="markdown"><p>Database collection name for storing &quot;link tokens&quot; which are used to pass WebRTC connection traffic after the initial connection has been allowed.</p> </div> <div class="clear"></div> </div> <div class="children"> </div> </div> </div> <div id="footer"> This document was generated with <a href="https://github.com/shenanigans/node-doczar">doczar</a> at <span class="time">2:40pm</span> on <span class="date">8/11/2015</span> </div> </body> </html>
shenanigans/node-sublayer
static/docs/generated/module/submergence/property/submergence/module/configuration/property/_links_/spare/summary/index.html
HTML
mit
1,983
import uiRouter from 'angular-ui-router'; import ngRoute from 'angular-route'; import ContactController from './contact.controller'; import ContactResourceService from './contact-resource.service'; import ConfirmClick from '../directives/confirm-click'; export default angular.module('Contact', [ uiRouter, ngRoute ]) .controller('contactController', ContactController) .service('contactResourceService', ContactResourceService) .directive('confirmClick', ConfirmClick) .name;
SpookyCorridor/milton
client/app/contact/index.js
JavaScript
mit
504
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * * @category Zend * @package Zend_Pdf * @subpackage Fonts * @copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** Internally used classes */ // require_once 'Zend/Pdf/Element/Name.php'; /** Zend_Pdf_Resource_Font_Simple_Standard */ // require_once 'Zend/Pdf/Resource/Font/Simple/Standard.php'; /** * Implementation for the standard PDF font Times-Roman. * * This class was generated automatically using the font information and metric * data contained in the Adobe Font Metric (AFM) files, available here: * {@link http://partners.adobe.com/public/developer/en/pdf/Core14_AFMs.zip} * * The PHP script used to generate this class can be found in the /tools * directory of the framework distribution. If you need to make modifications to * this class, chances are the same modifications are needed for the rest of the * standard fonts. You should modify the script and regenerate the classes * instead of changing this class file by hand. * * @package Zend_Pdf * @subpackage Fonts * @copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Pdf_Resource_Font_Simple_Standard_TimesRoman extends Zend_Pdf_Resource_Font_Simple_Standard { /**** Public Interface ****/ /* Object Lifecycle */ /** * Object constructor */ public function __construct() { parent::__construct(); /* Object properties */ /* The font names are stored internally as Unicode UTF-16BE-encoded * strings. Since this information is static, save unnecessary trips * through iconv() and just use pre-encoded hexidecimal strings. */ $this->_fontNames[Zend_Pdf_Font::NAME_COPYRIGHT]['en'] = "\x00\x43\x00\x6f\x00\x70\x00\x79\x00\x72\x00\x69\x00\x67\x00\x68\x00" . "\x74\x00\x20\x00\x28\x00\x63\x00\x29\x00\x20\x00\x31\x00\x39\x00" . "\x38\x00\x35\x00\x2c\x00\x20\x00\x31\x00\x39\x00\x38\x00\x37\x00" . "\x2c\x00\x20\x00\x31\x00\x39\x00\x38\x00\x39\x00\x2c\x00\x20\x00" . "\x31\x00\x39\x00\x39\x00\x30\x00\x2c\x00\x20\x00\x31\x00\x39\x00" . "\x39\x00\x33\x00\x2c\x00\x20\x00\x31\x00\x39\x00\x39\x00\x37\x00" . "\x20\x00\x41\x00\x64\x00\x6f\x00\x62\x00\x65\x00\x20\x00\x53\x00" . "\x79\x00\x73\x00\x74\x00\x65\x00\x6d\x00\x73\x00\x20\x00\x49\x00" . "\x6e\x00\x63\x00\x6f\x00\x72\x00\x70\x00\x6f\x00\x72\x00\x61\x00" . "\x74\x00\x65\x00\x64\x00\x2e\x00\x20\x00\x20\x00\x41\x00\x6c\x00" . "\x6c\x00\x20\x00\x52\x00\x69\x00\x67\x00\x68\x00\x74\x00\x73\x00" . "\x20\x00\x52\x00\x65\x00\x73\x00\x65\x00\x72\x00\x76\x00\x65\x00" . "\x64\x00\x2e\x00\x54\x00\x69\x00\x6d\x00\x65\x00\x73\x00\x20\x00" . "\x69\x00\x73\x00\x20\x00\x61\x00\x20\x00\x74\x00\x72\x00\x61\x00" . "\x64\x00\x65\x00\x6d\x00\x61\x00\x72\x00\x6b\x00\x20\x00\x6f\x00" . "\x66\x00\x20\x00\x4c\x00\x69\x00\x6e\x00\x6f\x00\x74\x00\x79\x00" . "\x70\x00\x65\x00\x2d\x00\x48\x00\x65\x00\x6c\x00\x6c\x00\x20\x00" . "\x41\x00\x47\x00\x20\x00\x61\x00\x6e\x00\x64\x00\x2f\x00\x6f\x00" . "\x72\x00\x20\x00\x69\x00\x74\x00\x73\x00\x20\x00\x73\x00\x75\x00" . "\x62\x00\x73\x00\x69\x00\x64\x00\x69\x00\x61\x00\x72\x00\x69\x00" . "\x65\x00\x73\x00\x2e"; $this->_fontNames[Zend_Pdf_Font::NAME_FAMILY]['en'] = "\x00\x54\x00\x69\x00\x6d\x00\x65\x00\x73"; $this->_fontNames[Zend_Pdf_Font::NAME_STYLE]['en'] = "\x00\x52\x00\x6f\x00\x6d\x00\x61\x00\x6e"; $this->_fontNames[Zend_Pdf_Font::NAME_ID]['en'] = "\x00\x34\x00\x33\x00\x30\x00\x36\x00\x38"; $this->_fontNames[Zend_Pdf_Font::NAME_FULL]['en'] = "\x00\x54\x00\x69\x00\x6d\x00\x65\x00\x73\x00\x2d\x00\x52\x00\x6f\x00" . "\x6d\x00\x61\x00\x6e\x00\x20\x00\x52\x00\x6f\x00\x6d\x00\x61\x00" . "\x6e"; $this->_fontNames[Zend_Pdf_Font::NAME_VERSION]['en'] = "\x00\x30\x00\x30\x00\x32\x00\x2e\x00\x30\x00\x30\x00\x30"; $this->_fontNames[Zend_Pdf_Font::NAME_POSTSCRIPT]['en'] = "\x00\x54\x00\x69\x00\x6d\x00\x65\x00\x73\x00\x2d\x00\x52\x00\x6f\x00" . "\x6d\x00\x61\x00\x6e"; $this->_isBold = false; $this->_isItalic = false; $this->_isMonospaced = false; $this->_underlinePosition = -100; $this->_underlineThickness = 50; $this->_strikePosition = 225; $this->_strikeThickness = 50; $this->_unitsPerEm = 1000; $this->_ascent = 683; $this->_descent = -217; $this->_lineGap = 300; /* The glyph numbers assigned here are synthetic; they do not match the * actual glyph numbers used by the font. This is not a big deal though * since this data never makes it to the PDF file. It is only used * internally for layout calculations. */ $this->_glyphWidths = array( 0x00 => 0x01f4, 0x01 => 0xfa, 0x02 => 0x014d, 0x03 => 0x0198, 0x04 => 0x01f4, 0x05 => 0x01f4, 0x06 => 0x0341, 0x07 => 0x030a, 0x08 => 0x014d, 0x09 => 0x014d, 0x0a => 0x014d, 0x0b => 0x01f4, 0x0c => 0x0234, 0x0d => 0xfa, 0x0e => 0x014d, 0x0f => 0xfa, 0x10 => 0x0116, 0x11 => 0x01f4, 0x12 => 0x01f4, 0x13 => 0x01f4, 0x14 => 0x01f4, 0x15 => 0x01f4, 0x16 => 0x01f4, 0x17 => 0x01f4, 0x18 => 0x01f4, 0x19 => 0x01f4, 0x1a => 0x01f4, 0x1b => 0x0116, 0x1c => 0x0116, 0x1d => 0x0234, 0x1e => 0x0234, 0x1f => 0x0234, 0x20 => 0x01bc, 0x21 => 0x0399, 0x22 => 0x02d2, 0x23 => 0x029b, 0x24 => 0x029b, 0x25 => 0x02d2, 0x26 => 0x0263, 0x27 => 0x022c, 0x28 => 0x02d2, 0x29 => 0x02d2, 0x2a => 0x014d, 0x2b => 0x0185, 0x2c => 0x02d2, 0x2d => 0x0263, 0x2e => 0x0379, 0x2f => 0x02d2, 0x30 => 0x02d2, 0x31 => 0x022c, 0x32 => 0x02d2, 0x33 => 0x029b, 0x34 => 0x022c, 0x35 => 0x0263, 0x36 => 0x02d2, 0x37 => 0x02d2, 0x38 => 0x03b0, 0x39 => 0x02d2, 0x3a => 0x02d2, 0x3b => 0x0263, 0x3c => 0x014d, 0x3d => 0x0116, 0x3e => 0x014d, 0x3f => 0x01d5, 0x40 => 0x01f4, 0x41 => 0x014d, 0x42 => 0x01bc, 0x43 => 0x01f4, 0x44 => 0x01bc, 0x45 => 0x01f4, 0x46 => 0x01bc, 0x47 => 0x014d, 0x48 => 0x01f4, 0x49 => 0x01f4, 0x4a => 0x0116, 0x4b => 0x0116, 0x4c => 0x01f4, 0x4d => 0x0116, 0x4e => 0x030a, 0x4f => 0x01f4, 0x50 => 0x01f4, 0x51 => 0x01f4, 0x52 => 0x01f4, 0x53 => 0x014d, 0x54 => 0x0185, 0x55 => 0x0116, 0x56 => 0x01f4, 0x57 => 0x01f4, 0x58 => 0x02d2, 0x59 => 0x01f4, 0x5a => 0x01f4, 0x5b => 0x01bc, 0x5c => 0x01e0, 0x5d => 0xc8, 0x5e => 0x01e0, 0x5f => 0x021d, 0x60 => 0x014d, 0x61 => 0x01f4, 0x62 => 0x01f4, 0x63 => 0xa7, 0x64 => 0x01f4, 0x65 => 0x01f4, 0x66 => 0x01f4, 0x67 => 0x01f4, 0x68 => 0xb4, 0x69 => 0x01bc, 0x6a => 0x01f4, 0x6b => 0x014d, 0x6c => 0x014d, 0x6d => 0x022c, 0x6e => 0x022c, 0x6f => 0x01f4, 0x70 => 0x01f4, 0x71 => 0x01f4, 0x72 => 0xfa, 0x73 => 0x01c5, 0x74 => 0x015e, 0x75 => 0x014d, 0x76 => 0x01bc, 0x77 => 0x01bc, 0x78 => 0x01f4, 0x79 => 0x03e8, 0x7a => 0x03e8, 0x7b => 0x01bc, 0x7c => 0x014d, 0x7d => 0x014d, 0x7e => 0x014d, 0x7f => 0x014d, 0x80 => 0x014d, 0x81 => 0x014d, 0x82 => 0x014d, 0x83 => 0x014d, 0x84 => 0x014d, 0x85 => 0x014d, 0x86 => 0x014d, 0x87 => 0x014d, 0x88 => 0x014d, 0x89 => 0x03e8, 0x8a => 0x0379, 0x8b => 0x0114, 0x8c => 0x0263, 0x8d => 0x02d2, 0x8e => 0x0379, 0x8f => 0x0136, 0x90 => 0x029b, 0x91 => 0x0116, 0x92 => 0x0116, 0x93 => 0x01f4, 0x94 => 0x02d2, 0x95 => 0x01f4, 0x96 => 0x014d, 0x97 => 0x01bc, 0x98 => 0x01bc, 0x99 => 0x01f4, 0x9a => 0x01bc, 0x9b => 0x02d2, 0x9c => 0x0234, 0x9d => 0x02d2, 0x9e => 0x02d2, 0x9f => 0x01bc, 0xa0 => 0x02d2, 0xa1 => 0x01f4, 0xa2 => 0x0185, 0xa3 => 0x01bc, 0xa4 => 0x02d2, 0xa5 => 0x02d2, 0xa6 => 0x01bc, 0xa7 => 0x02d2, 0xa8 => 0x01f4, 0xa9 => 0x0263, 0xaa => 0x02d2, 0xab => 0xfa, 0xac => 0x02f8, 0xad => 0x0263, 0xae => 0x01bc, 0xaf => 0x01bc, 0xb0 => 0x02d2, 0xb1 => 0x0116, 0xb2 => 0x01bc, 0xb3 => 0x0263, 0xb4 => 0x029b, 0xb5 => 0x01bc, 0xb6 => 0x0263, 0xb7 => 0x0185, 0xb8 => 0x0185, 0xb9 => 0x0116, 0xba => 0x01d7, 0xbb => 0x029b, 0xbc => 0x02d2, 0xbd => 0x01f4, 0xbe => 0x01bc, 0xbf => 0x02d2, 0xc0 => 0x014d, 0xc1 => 0x01bc, 0xc2 => 0x0263, 0xc3 => 0x022c, 0xc4 => 0x02d2, 0xc5 => 0x029b, 0xc6 => 0x022c, 0xc7 => 0x024c, 0xc8 => 0x02d2, 0xc9 => 0x01f4, 0xca => 0x012c, 0xcb => 0x02d2, 0xcc => 0x02d2, 0xcd => 0x02d2, 0xce => 0x0234, 0xcf => 0x01f4, 0xd0 => 0x0263, 0xd1 => 0x01dc, 0xd2 => 0x01f4, 0xd3 => 0x02d2, 0xd4 => 0x0116, 0xd5 => 0x0263, 0xd6 => 0x01bc, 0xd7 => 0x01bc, 0xd8 => 0x01bc, 0xd9 => 0x01f4, 0xda => 0x01f4, 0xdb => 0x02d2, 0xdc => 0x014d, 0xdd => 0x0234, 0xde => 0xc8, 0xdf => 0x02f8, 0xe0 => 0x02d2, 0xe1 => 0x014d, 0xe2 => 0x0258, 0xe3 => 0x0263, 0xe4 => 0x014d, 0xe5 => 0x01f4, 0xe6 => 0x0263, 0xe7 => 0x0263, 0xe8 => 0x0225, 0xe9 => 0x02d2, 0xea => 0x029b, 0xeb => 0x0116, 0xec => 0x0146, 0xed => 0x01bc, 0xee => 0x02d2, 0xef => 0x02d2, 0xf0 => 0x02d2, 0xf1 => 0x01bc, 0xf2 => 0x01bc, 0xf3 => 0x0116, 0xf4 => 0x02d2, 0xf5 => 0x01f4, 0xf6 => 0x01bc, 0xf7 => 0x0185, 0xf8 => 0x0116, 0xf9 => 0x02d2, 0xfa => 0x02d2, 0xfb => 0x0264, 0xfc => 0x01f4, 0xfd => 0x012c, 0xfe => 0x02d2, 0xff => 0x01f4, 0x0100 => 0x0116, 0x0101 => 0x01f4, 0x0102 => 0x0263, 0x0103 => 0x01f4, 0x0104 => 0x02ee, 0x0105 => 0x022c, 0x0106 => 0x0158, 0x0107 => 0x02d2, 0x0108 => 0x0263, 0x0109 => 0x03d4, 0x010a => 0x01bc, 0x010b => 0x014d, 0x010c => 0x014d, 0x010d => 0x0263, 0x010e => 0x02ee, 0x010f => 0x0225, 0x0110 => 0x01f4, 0x0111 => 0x01f4, 0x0112 => 0x02d2, 0x0113 => 0x0263, 0x0114 => 0x01bc, 0x0115 => 0x01f4, 0x0116 => 0x02ee, 0x0117 => 0x022c, 0x0118 => 0x022c, 0x0119 => 0x02d2, 0x011a => 0x0190, 0x011b => 0x01f4, 0x011c => 0x029b, 0x011d => 0x01f4, 0x011e => 0x01c5, 0x011f => 0x02d2, 0x0120 => 0x014d, 0x0121 => 0x02d2, 0x0122 => 0x01f4, 0x0123 => 0x029b, 0x0124 => 0x0263, 0x0125 => 0x02d2, 0x0126 => 0x02d2, 0x0127 => 0x02d2, 0x0128 => 0x02d2, 0x0129 => 0x01bc, 0x012a => 0x0263, 0x012b => 0x014d, 0x012c => 0x01f4, 0x012d => 0x0234, 0x012e => 0x014d, 0x012f => 0x01f4, 0x0130 => 0x0116, 0x0131 => 0x0234, 0x0132 => 0x01f4, 0x0133 => 0x01f4, 0x0134 => 0x0225, 0x0135 => 0x01f4, 0x0136 => 0x01f4, 0x0137 => 0x01bc, 0x0138 => 0x01f4, 0x0139 => 0x012c, 0x013a => 0x0116, 0x013b => 0x01f4, ); /* The cmap table is similarly synthesized. */ $cmapData = array( 0x20 => 0x01, 0x21 => 0x02, 0x22 => 0x03, 0x23 => 0x04, 0x24 => 0x05, 0x25 => 0x06, 0x26 => 0x07, 0x2019 => 0x08, 0x28 => 0x09, 0x29 => 0x0a, 0x2a => 0x0b, 0x2b => 0x0c, 0x2c => 0x0d, 0x2d => 0x0e, 0x2e => 0x0f, 0x2f => 0x10, 0x30 => 0x11, 0x31 => 0x12, 0x32 => 0x13, 0x33 => 0x14, 0x34 => 0x15, 0x35 => 0x16, 0x36 => 0x17, 0x37 => 0x18, 0x38 => 0x19, 0x39 => 0x1a, 0x3a => 0x1b, 0x3b => 0x1c, 0x3c => 0x1d, 0x3d => 0x1e, 0x3e => 0x1f, 0x3f => 0x20, 0x40 => 0x21, 0x41 => 0x22, 0x42 => 0x23, 0x43 => 0x24, 0x44 => 0x25, 0x45 => 0x26, 0x46 => 0x27, 0x47 => 0x28, 0x48 => 0x29, 0x49 => 0x2a, 0x4a => 0x2b, 0x4b => 0x2c, 0x4c => 0x2d, 0x4d => 0x2e, 0x4e => 0x2f, 0x4f => 0x30, 0x50 => 0x31, 0x51 => 0x32, 0x52 => 0x33, 0x53 => 0x34, 0x54 => 0x35, 0x55 => 0x36, 0x56 => 0x37, 0x57 => 0x38, 0x58 => 0x39, 0x59 => 0x3a, 0x5a => 0x3b, 0x5b => 0x3c, 0x5c => 0x3d, 0x5d => 0x3e, 0x5e => 0x3f, 0x5f => 0x40, 0x2018 => 0x41, 0x61 => 0x42, 0x62 => 0x43, 0x63 => 0x44, 0x64 => 0x45, 0x65 => 0x46, 0x66 => 0x47, 0x67 => 0x48, 0x68 => 0x49, 0x69 => 0x4a, 0x6a => 0x4b, 0x6b => 0x4c, 0x6c => 0x4d, 0x6d => 0x4e, 0x6e => 0x4f, 0x6f => 0x50, 0x70 => 0x51, 0x71 => 0x52, 0x72 => 0x53, 0x73 => 0x54, 0x74 => 0x55, 0x75 => 0x56, 0x76 => 0x57, 0x77 => 0x58, 0x78 => 0x59, 0x79 => 0x5a, 0x7a => 0x5b, 0x7b => 0x5c, 0x7c => 0x5d, 0x7d => 0x5e, 0x7e => 0x5f, 0xa1 => 0x60, 0xa2 => 0x61, 0xa3 => 0x62, 0x2044 => 0x63, 0xa5 => 0x64, 0x0192 => 0x65, 0xa7 => 0x66, 0xa4 => 0x67, 0x27 => 0x68, 0x201c => 0x69, 0xab => 0x6a, 0x2039 => 0x6b, 0x203a => 0x6c, 0xfb01 => 0x6d, 0xfb02 => 0x6e, 0x2013 => 0x6f, 0x2020 => 0x70, 0x2021 => 0x71, 0xb7 => 0x72, 0xb6 => 0x73, 0x2022 => 0x74, 0x201a => 0x75, 0x201e => 0x76, 0x201d => 0x77, 0xbb => 0x78, 0x2026 => 0x79, 0x2030 => 0x7a, 0xbf => 0x7b, 0x60 => 0x7c, 0xb4 => 0x7d, 0x02c6 => 0x7e, 0x02dc => 0x7f, 0xaf => 0x80, 0x02d8 => 0x81, 0x02d9 => 0x82, 0xa8 => 0x83, 0x02da => 0x84, 0xb8 => 0x85, 0x02dd => 0x86, 0x02db => 0x87, 0x02c7 => 0x88, 0x2015 => 0x89, 0xc6 => 0x8a, 0xaa => 0x8b, 0x0141 => 0x8c, 0xd8 => 0x8d, 0x0152 => 0x8e, 0xba => 0x8f, 0xe6 => 0x90, 0x0131 => 0x91, 0x0142 => 0x92, 0xf8 => 0x93, 0x0153 => 0x94, 0xdf => 0x95, 0xcf => 0x96, 0xe9 => 0x97, 0x0103 => 0x98, 0x0171 => 0x99, 0x011b => 0x9a, 0x0178 => 0x9b, 0xf7 => 0x9c, 0xdd => 0x9d, 0xc2 => 0x9e, 0xe1 => 0x9f, 0xdb => 0xa0, 0xfd => 0xa1, 0x0219 => 0xa2, 0xea => 0xa3, 0x016e => 0xa4, 0xdc => 0xa5, 0x0105 => 0xa6, 0xda => 0xa7, 0x0173 => 0xa8, 0xcb => 0xa9, 0x0110 => 0xaa, 0xf6c3 => 0xab, 0xa9 => 0xac, 0x0112 => 0xad, 0x010d => 0xae, 0xe5 => 0xaf, 0x0145 => 0xb0, 0x013a => 0xb1, 0xe0 => 0xb2, 0x0162 => 0xb3, 0x0106 => 0xb4, 0xe3 => 0xb5, 0x0116 => 0xb6, 0x0161 => 0xb7, 0x015f => 0xb8, 0xed => 0xb9, 0x25ca => 0xba, 0x0158 => 0xbb, 0x0122 => 0xbc, 0xfb => 0xbd, 0xe2 => 0xbe, 0x0100 => 0xbf, 0x0159 => 0xc0, 0xe7 => 0xc1, 0x017b => 0xc2, 0xde => 0xc3, 0x014c => 0xc4, 0x0154 => 0xc5, 0x015a => 0xc6, 0x010f => 0xc7, 0x016a => 0xc8, 0x016f => 0xc9, 0xb3 => 0xca, 0xd2 => 0xcb, 0xc0 => 0xcc, 0x0102 => 0xcd, 0xd7 => 0xce, 0xfa => 0xcf, 0x0164 => 0xd0, 0x2202 => 0xd1, 0xff => 0xd2, 0x0143 => 0xd3, 0xee => 0xd4, 0xca => 0xd5, 0xe4 => 0xd6, 0xeb => 0xd7, 0x0107 => 0xd8, 0x0144 => 0xd9, 0x016b => 0xda, 0x0147 => 0xdb, 0xcd => 0xdc, 0xb1 => 0xdd, 0xa6 => 0xde, 0xae => 0xdf, 0x011e => 0xe0, 0x0130 => 0xe1, 0x2211 => 0xe2, 0xc8 => 0xe3, 0x0155 => 0xe4, 0x014d => 0xe5, 0x0179 => 0xe6, 0x017d => 0xe7, 0x2265 => 0xe8, 0xd0 => 0xe9, 0xc7 => 0xea, 0x013c => 0xeb, 0x0165 => 0xec, 0x0119 => 0xed, 0x0172 => 0xee, 0xc1 => 0xef, 0xc4 => 0xf0, 0xe8 => 0xf1, 0x017a => 0xf2, 0x012f => 0xf3, 0xd3 => 0xf4, 0xf3 => 0xf5, 0x0101 => 0xf6, 0x015b => 0xf7, 0xef => 0xf8, 0xd4 => 0xf9, 0xd9 => 0xfa, 0x2206 => 0xfb, 0xfe => 0xfc, 0xb2 => 0xfd, 0xd6 => 0xfe, 0xb5 => 0xff, 0xec => 0x0100, 0x0151 => 0x0101, 0x0118 => 0x0102, 0x0111 => 0x0103, 0xbe => 0x0104, 0x015e => 0x0105, 0x013e => 0x0106, 0x0136 => 0x0107, 0x0139 => 0x0108, 0x2122 => 0x0109, 0x0117 => 0x010a, 0xcc => 0x010b, 0x012a => 0x010c, 0x013d => 0x010d, 0xbd => 0x010e, 0x2264 => 0x010f, 0xf4 => 0x0110, 0xf1 => 0x0111, 0x0170 => 0x0112, 0xc9 => 0x0113, 0x0113 => 0x0114, 0x011f => 0x0115, 0xbc => 0x0116, 0x0160 => 0x0117, 0x0218 => 0x0118, 0x0150 => 0x0119, 0xb0 => 0x011a, 0xf2 => 0x011b, 0x010c => 0x011c, 0xf9 => 0x011d, 0x221a => 0x011e, 0x010e => 0x011f, 0x0157 => 0x0120, 0xd1 => 0x0121, 0xf5 => 0x0122, 0x0156 => 0x0123, 0x013b => 0x0124, 0xc3 => 0x0125, 0x0104 => 0x0126, 0xc5 => 0x0127, 0xd5 => 0x0128, 0x017c => 0x0129, 0x011a => 0x012a, 0x012e => 0x012b, 0x0137 => 0x012c, 0x2212 => 0x012d, 0xce => 0x012e, 0x0148 => 0x012f, 0x0163 => 0x0130, 0xac => 0x0131, 0xf6 => 0x0132, 0xfc => 0x0133, 0x2260 => 0x0134, 0x0123 => 0x0135, 0xf0 => 0x0136, 0x017e => 0x0137, 0x0146 => 0x0138, 0xb9 => 0x0139, 0x012b => 0x013a, 0x20ac => 0x013b); // require_once 'Zend/Pdf/Cmap.php'; $this->_cmap = Zend_Pdf_Cmap::cmapWithTypeData( Zend_Pdf_Cmap::TYPE_BYTE_ENCODING_STATIC, $cmapData); /* Resource dictionary */ /* The resource dictionary for the standard fonts is sparse because PDF * viewers already have all of the metrics data. We only need to provide * the font name and encoding method. */ $this->_resource->BaseFont = new Zend_Pdf_Element_Name('Times-Roman'); } }
ProfilerTeam/Profiler
protected/vendors/Zend/Pdf/Resource/Font/Simple/Standard/TimesRoman.php
PHP
mit
19,171
class Repositext class Subtitle class Operation # Represents a content change operation (not really a subtitle operation!) class ContentChange < Operation def inverse_operation Subtitle::Operation.new_from_hash( affected_stids: inverse_affected_stids, operation_id: '', operation_type: :content_change, ) end # Returns affected stids for inverse operation def inverse_affected_stids affected_stids.map { |e| before, after = e.tmp_attrs[:after], e.tmp_attrs[:before] e.tmp_attrs[:before] = before e.tmp_attrs[:after] = after e } end end end end end
imazen/repositext
lib/repositext/subtitle/operation/content_change.rb
Ruby
mit
746
// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "main.h" #include "bitcoinrpc.h" using namespace json_spirit; using namespace std; void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out); double GetDifficulty(const CBlockIndex* blockindex) { // Floating point number that is a multiple of the minimum difficulty, // minimum difficulty = 1.0. if (blockindex == NULL) { if (pindexBest == NULL) return 1.0; else blockindex = pindexBest; } int nShift = (blockindex->nBits >> 24) & 0xff; double dDiff = (double)0x0000ffff / (double)(blockindex->nBits & 0x00ffffff); while (nShift < 29) { dDiff *= 256.0; nShift++; } while (nShift > 29) { dDiff /= 256.0; nShift--; } return dDiff; } Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex) { Object result; result.push_back(Pair("hash", block.GetHash().GetHex())); CMerkleTx txGen(block.vtx[0]); txGen.SetMerkleBranch(&block); result.push_back(Pair("confirmations", (int)txGen.GetDepthInMainChain())); result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION))); result.push_back(Pair("height", blockindex->nHeight)); result.push_back(Pair("version", block.nVersion)); result.push_back(Pair("Value", ValueFromAmount(block.vtx[0].vout[0].nValue))); result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex())); Array txs; BOOST_FOREACH(const CTransaction&tx, block.vtx) txs.push_back(tx.GetHash().GetHex()); result.push_back(Pair("tx", txs)); result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime())); result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce)); result.push_back(Pair("bits", HexBits(block.nBits))); result.push_back(Pair("difficulty", GetDifficulty(blockindex))); if (blockindex->pprev) result.push_back(Pair("previousblockhash", blockindex->pprev->GetBlockHash().GetHex())); if (blockindex->pnext) result.push_back(Pair("nextblockhash", blockindex->pnext->GetBlockHash().GetHex())); return result; } Value getblockcount(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getblockcount\n" "Returns the number of blocks in the longest block chain."); return nBestHeight; } Value getbestblockhash(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getbestblockhash\n" "Returns the hash of the best (tip) block in the longest block chain."); return hashBestChain.GetHex(); } Value getdifficulty(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getdifficulty\n" "Returns the proof-of-work difficulty as a multiple of the minimum difficulty."); return GetDifficulty(); } Value settxfee(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 1) throw runtime_error( "settxfee <amount>\n" "<amount> is a real and is rounded to the nearest 0.00000001"); // Amount int64 nAmount = 0; if (params[0].get_real() != 0.0) nAmount = AmountFromValue(params[0]); // rejects 0.0 amounts nTransactionFee = nAmount; return true; } Value getrawmempool(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "getrawmempool\n" "Returns all transaction ids in memory pool."); vector<uint256> vtxid; mempool.queryHashes(vtxid); Array a; BOOST_FOREACH(const uint256& hash, vtxid) a.push_back(hash.ToString()); return a; } Value getblockhash(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getblockhash <index>\n" "Returns hash of block in best-block-chain at <index>."); int nHeight = params[0].get_int(); if (nHeight < 0 || nHeight > nBestHeight) throw runtime_error("Block number out of range."); CBlockIndex* pblockindex = FindBlockByHeight(nHeight); return pblockindex->phashBlock->GetHex(); } Value getblock(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "getblock <hash> [verbose=true]\n" "If verbose is false, returns a string that is serialized, hex-encoded data for block <hash>.\n" "If verbose is true, returns an Object with information about block <hash>." ); std::string strHash = params[0].get_str(); uint256 hash(strHash); bool fVerbose = true; if (params.size() > 1) fVerbose = params[1].get_bool(); if (mapBlockIndex.count(hash) == 0) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); CBlock block; CBlockIndex* pblockindex = mapBlockIndex[hash]; block.ReadFromDisk(pblockindex); if (!fVerbose) { CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION); ssBlock << block; std::string strHex = HexStr(ssBlock.begin(), ssBlock.end()); return strHex; } return blockToJSON(block, pblockindex); } Value getblockinfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 1) throw runtime_error( "getblockinfo <index>\n" "Returns info of block in best-block-chain at <index>."); int nHeight = params[0].get_int(); if (nHeight < 0 || nHeight > nBestHeight) throw runtime_error("Block number out of range."); CBlockIndex* pblockindex = FindBlockByHeight(nHeight); //return pblockindex->phashBlock->GetHex(); string str = pblockindex->phashBlock->GetHex(); if( str.size() ) { std::string strHash = str; uint256 hash(strHash); bool fVerbose = true; //if (params.size() > 1) //fVerbose = params[1].get_bool(); if (mapBlockIndex.count(hash) == 0) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found"); CBlock block; CBlockIndex* pblockindex = mapBlockIndex[hash]; block.ReadFromDisk(pblockindex); if (!fVerbose) { CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION); ssBlock << block; std::string strHex = HexStr(ssBlock.begin(), ssBlock.end()); return strHex; } return blockToJSON(block, pblockindex); } return str; } Value gettxoutsetinfo(const Array& params, bool fHelp) { if (fHelp || params.size() != 0) throw runtime_error( "gettxoutsetinfo\n" "Returns statistics about the unspent transaction output set."); Object ret; CCoinsStats stats; if (pcoinsTip->GetStats(stats)) { ret.push_back(Pair("height", (boost::int64_t)stats.nHeight)); ret.push_back(Pair("bestblock", stats.hashBlock.GetHex())); ret.push_back(Pair("transactions", (boost::int64_t)stats.nTransactions)); ret.push_back(Pair("txouts", (boost::int64_t)stats.nTransactionOutputs)); ret.push_back(Pair("bytes_serialized", (boost::int64_t)stats.nSerializedSize)); ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex())); ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount))); } return ret; } Value gettxout(const Array& params, bool fHelp) { if (fHelp || params.size() < 2 || params.size() > 3) throw runtime_error( "gettxout <txid> <n> [includemempool=true]\n" "Returns details about an unspent transaction output."); Object ret; std::string strHash = params[0].get_str(); uint256 hash(strHash); int n = params[1].get_int(); bool fMempool = true; if (params.size() > 2) fMempool = params[2].get_bool(); CCoins coins; if (fMempool) { LOCK(mempool.cs); CCoinsViewMemPool view(*pcoinsTip, mempool); if (!view.GetCoins(hash, coins)) return Value::null; mempool.pruneSpent(hash, coins); // TODO: this should be done by the CCoinsViewMemPool } else { if (!pcoinsTip->GetCoins(hash, coins)) return Value::null; } if (n<0 || (unsigned int)n>=coins.vout.size() || coins.vout[n].IsNull()) return Value::null; ret.push_back(Pair("bestblock", pcoinsTip->GetBestBlock()->GetBlockHash().GetHex())); if ((unsigned int)coins.nHeight == MEMPOOL_HEIGHT) ret.push_back(Pair("confirmations", 0)); else ret.push_back(Pair("confirmations", pcoinsTip->GetBestBlock()->nHeight - coins.nHeight + 1)); ret.push_back(Pair("value", ValueFromAmount(coins.vout[n].nValue))); Object o; ScriptPubKeyToJSON(coins.vout[n].scriptPubKey, o); ret.push_back(Pair("scriptPubKey", o)); ret.push_back(Pair("version", coins.nVersion)); ret.push_back(Pair("coinbase", coins.fCoinBase)); return ret; } Value verifychain(const Array& params, bool fHelp) { if (fHelp || params.size() > 2) throw runtime_error( "verifychain [check level] [num blocks]\n" "Verifies blockchain database."); int nCheckLevel = GetArg("-checklevel", 3); int nCheckDepth = GetArg("-checkblocks", 288); if (params.size() > 0) nCheckLevel = params[0].get_int(); if (params.size() > 1) nCheckDepth = params[1].get_int(); return VerifyDB(nCheckLevel, nCheckDepth); } std::string RollbackBlocks(int nBlocks) { std::string s; CValidationState state; int nHei = nBestHeight - nBlocks; try{ CBlockIndex* pindexNew = FindBlockByHeight(nHei); if( SetBestChain(state, pindexNew) ) { //RestartNets(); ClearNodes(); s = strprintf("Rollback to block %u", nHei); }else{ s = "RollbackBlocks false"; } } catch(std::runtime_error &e) { s = "Rollback to block error"; //s = strprintf("Rollback to block error: %s", e.what().c_str()); } return s; } Value rollbackblocks(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "rollbackblocks <nBlocks=150>\n" "Rollback N Blocks from current Block Chain\n" ); return RollbackBlocks(params.size() > 0 ? params[0].get_int() : 150); } Value rollbackto(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "rollbackto <nBlocks>\n" ); if( params.size() > 0 ) { int x = params[0].get_int(); if( nBestHeight > x ) { int n = nBestHeight - x; return RollbackBlocks(n); } } throw runtime_error("<nBlocks> must > Current blocks(nBestHeight)\n"); } Value clearnodes(const Array& params, bool fHelp) { if (fHelp || params.size() < 1 || params.size() > 2) throw runtime_error( "clearnodes <x=1>\n" "If x=1, reconnect to seed nodes\n" ); return ClearNodes(params.size() > 0 ? params[0].get_int() : 1); }
hotcoin/hotcoin
src/rpcblockchain.cpp
C++
mit
11,223
Compiled example ---------------- ![Example](2d-chi-squared-pdf.png)
MartinThoma/LaTeX-examples
tikz/2d-chi-squared-pdf/README.md
Markdown
mit
69
var common = require('../common'); var assert = common.assert; var SandboxedModule = require(common.dir.lib + '/sandboxed_module'); (function testRequire() { var foo = SandboxedModule.load('../fixture/foo').exports; assert.strictEqual(foo.foo, 'foo'); assert.strictEqual(foo.bar, 'bar'); })();
tristanls/node-sandboxed-module-strict-mode
test/integration/test-basic.js
JavaScript
mit
301
<html> <head> <title>Shingai Shoniwa's panel show appearances</title> <script type="text/javascript" src="../common.js"></script> <link rel="stylesheet" media="all" href="../style.css" type="text/css"/> <script type="text/javascript" src="../people.js"></script> <!--#include virtual="head.txt" --> </head> <body> <!--#include virtual="nav.txt" --> <div class="page"> <h1>Shingai Shoniwa's panel show appearances</h1> <p>Shingai Shoniwa (born 1981-09-01<sup><a href="https://en.wikipedia.org/wiki/Shingai_Shoniwa">[ref]</a></sup>) has appeared in <span class="total">2</span> episodes between 2009-2012. <a href="http://www.imdb.com/name/nm3518136">Shingai Shoniwa on IMDB</a>. <a href="https://en.wikipedia.org/wiki/Shingai_Shoniwa">Shingai Shoniwa on Wikipedia</a>.</p> <div class="performerholder"> <table class="performer"> <tr style="vertical-align:bottom;"> <td><div style="height:100px;" class="performances female" title="1"></div><span class="year">2009</span></td> <td><div style="height:0px;" class="performances female" title=""></div><span class="year">2010</span></td> <td><div style="height:0px;" class="performances female" title=""></div><span class="year">2011</span></td> <td><div style="height:100px;" class="performances female" title="1"></div><span class="year">2012</span></td> </tr> </table> </div> <ol class="episodes"> <li><strong>2012-11-12</strong> / <a href="../shows/never-mind-the-buzzcocks.html">Never Mind The Buzzcocks</a></li> <li><strong>2009-11-11</strong> / <a href="../shows/never-mind-the-buzzcocks.html">Never Mind The Buzzcocks</a></li> </ol> </div> </body> </html>
slowe/panelshows
people/qvfyfsq4.html
HTML
mit
1,645
<!DOCTYPE html> <html> <head> <title>[% title %]</title> <link href="/css/bootstrap.css" rel="stylesheet" media="screen"> <link href="/css/dev.css" rel="stylesheet" media="screen"> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="#">/\/073</a> </div> <ul class="nav navbar-nav"> [% INCLUDE layout/menu.html %] </ul> <p class="navbar-text"> <span class="label label-primary">[% user %]</span> </p> </div> </div> [% content %] <script src="/js/jquery-2.0.3.min.js"></script> <script src="/js/bootstrap.js"></script> <script src="/js/dev.js"></script> </body> </html>
mfrager/note-dev
template/layout/dev.html
HTML
mit
731
package ch.chrissharkman.accessibility.rcp.application.poc; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.apache.log4j.Logger; import org.eclipse.core.runtime.FileLocator; import org.eclipse.core.runtime.Platform; import org.osgi.framework.Bundle; import org.w3c.dom.Document; import org.xml.sax.InputSource; /** * Class to manage content which is meant do be displayed like text/html or xml. * @author ChristianHeimann * */ public class ContentManager { private static Logger logger = Logger.getLogger(ContentManager.class); private static ContentManager instance = null; private ContentManager() { // Exists only to defeat instantiation. } private String contentBundle; private String platformIndication = "platform:/plugin/"; /** * Function to get Singleton instance of ContentManager. * @return ContentManager instance. */ public static ContentManager instance() { if (instance == null) { instance = new ContentManager(); } return instance; } /** * Function to set the contentBundle name for the contentManager. * @param contentBundle the name of the content bundle. */ public void setContentBundle(String contentBundle) { this.contentBundle = contentBundle; logger.info("setContentBundle: " + this.contentBundle); } /** * Function to get the name of the content bundle. * @return String the name of the content bundle. */ public String getContentBundle() { return contentBundle; } /** * Function to get content of a file from given path. * The package from where the content is read is defined in the ContentManager.contentBundle object property. * An Exception is thrown when file cannot be read. * * @param path the path of the file to read. * @return the content of the file as a String. * @exception IOException if no file under the given path can be found and an empty String is returned. */ public String getContent(String path) { String content = new String(""); try { logger.info("get resource: " + this.platformIndication + this.contentBundle + "/" + path); File file = null; URI resolvedURI; String inputLine; StringBuilder sb = new StringBuilder(); Bundle bundle = Platform.getBundle(this.contentBundle); URL fileURL = bundle.getEntry(path); URL resolvedFileURL = FileLocator.toFileURL(fileURL); try { resolvedURI = new URI(resolvedFileURL.getProtocol(), resolvedFileURL.getPath(), null); file = new File(resolvedURI); } catch (URISyntaxException e) { logger.info("Resolved URI error: " + e, e); } BufferedReader br = new BufferedReader(new FileReader(file)); while ((inputLine = br.readLine()) != null) { sb.append(inputLine); } br.close(); content = sb.toString(); } catch (IOException e) { // nothing to do //e.printStackTrace(); logger.warn("Exception when trying to get: " + path); } return content; } /** * Method to get resolved file URI * @param contentBundle * @param path * @return URI or null */ public URI getResolvedFileURI(String contentBundle, String path) { URI resolvedURI = null; Bundle bundle = Platform.getBundle(contentBundle); URL fileURL = bundle.getEntry(path); try { URL resolvedFileURL = FileLocator.toFileURL(fileURL); resolvedURI = new URI(resolvedFileURL.getProtocol(), resolvedFileURL.getPath(), null); } catch (Exception e) { logger.info("Resolved URI error: " + e, e); } return resolvedURI; } public URL getResolvedFileURL(String contentBundle, String path) { URL resolvedURL = null; Bundle bundle = Platform.getBundle(contentBundle); URL fileURL = bundle.getEntry(path); try { resolvedURL = FileLocator.toFileURL(fileURL); } catch (Exception e) { logger.info("Resolved URL error: " + e, e); } return resolvedURL; } /** * Function to get an xml document. * @param path the path of the file to read. * @return Document an xml parsed document. * @exception Exception thrown if something went wrong and null object returned. */ public Document getXml(String path) { Document xmlDoc = null; try { String xmlString = ContentManager.instance().getContent(path); DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder dBuilder = dbFactory.newDocumentBuilder(); xmlDoc = dBuilder.parse(new InputSource(new StringReader(xmlString))); } catch (Exception e) { logger.info("getXml Exception: " + e, e); } return xmlDoc; } }
chrissharkman/accessibility
ch.chrissharkman.accessibility.rcp.application.poc/src/ch/chrissharkman/accessibility/rcp/application/poc/ContentManager.java
Java
mit
4,974
require 'ansible/vault/util' module Ansible class Vault # The module that decrypting an vault text module TextDecryptor # Decrypts the ciphertext # # @param text [String] The encrypted text # @param password [String] The password for the text # @return [String] The plaintext contents of the ciphertext. def decrypt(text:, password:) splited = text.split(/\R/) header = splited.shift body = splited.join() decoded = Util.decode(body) return text unless Util.encrypted?(header, decoded[:hmac]) keys = Util.derive_keys(decoded[:salt], password) unless Util.hmac_matches?(keys[:hmac_key], decoded[:ciphertext], decoded[:hmac]) raise HMACMismatch, 'HMAC encoded in the file does not match calculated one!' end Util.plaintext(decoded[:ciphertext], keys[:cipher_key], keys[:iv]) end module_function :decrypt end end end
tpickett66/ansible-vault-rb
lib/ansible/vault/text_decryptor.rb
Ruby
mit
969
// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angular-cli.json`. export const environment = { production: false, functionEndPoint: 'http://localhost:7071/api/SessionAttendeePhotos/api/SessionAttendeePhotos' };
joshdcar/session-success-gauge-azure-functions
session-gauge-web/src/environments/environment.ts
TypeScript
mit
484
{% extends "base.html" %} {% block content %} <div class='row' id='entry-list'> {% for entry in entry_list %} {% include "blog/_entry.html" %} {% endfor %} </div> {% endblock content %}
wlonk/django-basic-blog
blog/templates/blog/entry_list.html
HTML
mit
211
class HomeController < ApplicationController def index return redirect_to(social_contents_path) if @channel_type == 'social' result = cb_session.home_contents(context: [:channel, :sections], page: params[:page]) @contents = result[:result] @channel = result[:channel] @sections = result[:sections] @meta = result[:meta] @current_section = @sections.first end def robots render text: (@channel_type == 'website' ? '' : "User-agent: *\nDisallow: /"), layout: false, content_type: "text/plain" end end
contentbird/contentbirdme
app/controllers/home_controller.rb
Ruby
mit
545
# VERBOSE := 1 SINGLE_THREAD := 1 USE_PREBUILD := 1 EA_DIR := C:/Users/nari/AppData/Local/Arduino15/packages/esp8266/ HLIB_DIR := $(EA_DIR)/hardware/esp8266/2.3.0/libraries ULIB_DIR := C:/Users/nari/documents/Arduino/libraries LIBS := $(HLIB_DIR)/SPI LIBS += $(HLIB_DIR)/ESP8266WiFi LIBS += $(ULIB_DIR)/Adafruit-GFX-Library LIBS += $(ULIB_DIR)/Humblesoft_GFX/src LIBS += $(ULIB_DIR)/Humblesoft_ILI9341/src LIBS += $(ULIB_DIR)/Fontx include makeEspArduino.mk
h-nari/HSES_LCD24_Sample_programs
WiFiScan/Makefile
Makefile
mit
462
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_27) on Wed Nov 21 16:03:52 EST 2012 --> <TITLE> org.pentaho.di.trans.steps.mailinput </TITLE> <META NAME="date" CONTENT="2012-11-21"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../../../../../org/pentaho/di/trans/steps/mailinput/package-summary.html" target="classFrame">org.pentaho.di.trans.steps.mailinput</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Classes</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="MailInput.html" title="class in org.pentaho.di.trans.steps.mailinput" target="classFrame">MailInput</A> <BR> <A HREF="MailInputData.html" title="class in org.pentaho.di.trans.steps.mailinput" target="classFrame">MailInputData</A> <BR> <A HREF="MailInputField.html" title="class in org.pentaho.di.trans.steps.mailinput" target="classFrame">MailInputField</A> <BR> <A HREF="MailInputMeta.html" title="class in org.pentaho.di.trans.steps.mailinput" target="classFrame">MailInputMeta</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
ColFusion/PentahoKettle
kettle-data-integration/docs/api/org/pentaho/di/trans/steps/mailinput/package-frame.html
HTML
mit
1,324
// **************************************************************************** // <copyright file="LocationServicePosition.cs" company="Pedro Lamas"> // Copyright © Pedro Lamas 2013 // </copyright> // **************************************************************************** // <author>Pedro Lamas</author> // <email>pedrolamas@gmail.com</email> // <date>20-04-2013</date> // <project>Cimbalino.Phone.Toolkit.Location</project> // <web>http://www.pedrolamas.com</web> // <license> // See license.txt in this solution or http://www.pedrolamas.com/license_MIT.txt // </license> // **************************************************************************** using System; using System.Globalization; namespace Cimbalino.Phone.Toolkit.Services { /// <summary> /// Represents a location expressed as a geographic coordinate. /// </summary> public class LocationServicePosition : IEquatable<LocationServicePosition> { private const double DegToRad = 0.0174532925199433; /// <summary> /// Represents a <see cref="LocationServicePosition"/> object with unknown latitude and longitude fields. /// </summary> public static readonly LocationServicePosition Unknown = new LocationServicePosition(); #region Properties /// <summary> /// Gets the time at which the location was determined. /// </summary> /// <value>The time at which the location was determined.</value> public DateTimeOffset Timestamp { get; private set; } /// <summary> /// Gets the latitude in degrees. /// </summary> /// <value>The latitude in degrees.</value> public double Latitude { get; private set; } /// <summary> /// Gets the longitude in degrees. /// </summary> /// <value>The longitude in degrees.</value> public double Longitude { get; private set; } /// <summary> /// Gets the accuracy of the location in meters. /// </summary> /// <value>The accuracy of the location in meters.</value> public double Accuracy { get; private set; } /// <summary> /// Gets the altitude of the location, in meters. /// </summary> /// <value>The altitude of the location, in meters.</value> public double? Altitude { get; private set; } /// <summary> /// Gets the accuracy of the altitude, in meters. /// </summary> /// <value>The accuracy of the altitude, in meters.</value> public double? AltitudeAccuracy { get; private set; } /// <summary> /// Gets the current heading in degrees relative to true north. /// </summary> /// <value>The current heading in degrees relative to true north.</value> public double? Heading { get; private set; } /// <summary> /// Gets the speed in meters per second. /// </summary> /// <value>The speed in meters per second.</value> public double? Speed { get; private set; } /// <summary> /// Gets a value indicating whether the <see cref="LocationServicePosition" /> does not contain latitude or longitude data. /// </summary> /// <value>true if the <see cref="LocationServicePosition" /> does not contain latitude or longitude data; otherwise, false.</value> public bool IsUnknown { get { return this == Unknown; } } #endregion /// <summary> /// Initializes a new instance of the <see cref="LocationServicePosition"/> class. /// </summary> public LocationServicePosition() { } /// <summary> /// Initializes a new instance of the <see cref="LocationServicePosition"/> class. /// </summary> /// <param name="timestamp">The time at which the location was determined.</param> /// <param name="latitude">The latitude in degrees.</param> /// <param name="longitude">The longitude in degrees.</param> /// <param name="accuracy">The accuracy of the location in meters.</param> /// <param name="altitude">The altitude of the location, in meters.</param> /// <param name="altitudeAccuracy">The accuracy of the altitude, in meters.</param> /// <param name="heading">The current heading in degrees relative to true north.</param> /// <param name="speed">The speed in meters per second.</param> public LocationServicePosition(DateTimeOffset timestamp, double latitude, double longitude, double accuracy, double? altitude, double? altitudeAccuracy, double? heading, double? speed) { Timestamp = timestamp; Latitude = latitude; Longitude = longitude; Accuracy = accuracy; Altitude = altitude; AltitudeAccuracy = altitudeAccuracy; Heading = heading; Speed = speed; } /// <summary> /// Returns a string representation of the current <see cref="LocationServicePosition"/>. /// </summary> /// <returns>A string representation of the current <see cref="LocationServicePosition"/>.</returns> public override string ToString() { if (this == Unknown) { return "Unknown"; } return string.Format(CultureInfo.InvariantCulture, "{0:G}, {1:G}", Latitude, Longitude); } /// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns>A hash code for the current <see cref="LocationServicePosition"/>.</returns> public override int GetHashCode() { unchecked { return (Latitude.GetHashCode() * 397) ^ Longitude.GetHashCode(); } } /// <summary> /// Determines whether the specified object is a <see cref="LocationServicePosition"/> that has the same latitude and longitude values as this one. /// </summary> /// <param name="obj">The object to compare with the current instance.</param> /// <returns>true if the latitude and longitude properties of both objects have the same value.</returns> public override bool Equals(object obj) { if (!(obj is LocationServicePosition)) { return this.Equals(obj); } return this.Equals(obj as LocationServicePosition); } /// <summary> /// Determines whether the specified <see cref="LocationServicePosition"/> has the same latitude and longitude values as this one. /// </summary> /// <param name="other">The <see cref="LocationServicePosition"/> object to compare with the current instance.</param> /// <returns>true if the latitude and longitude properties of both objects have the same value; otherwise, false.</returns> public bool Equals(LocationServicePosition other) { if (ReferenceEquals(null, other)) { return false; } if (ReferenceEquals(this, other)) { return true; } return Latitude.Equals(other.Latitude) && Longitude.Equals(other.Longitude); } /// <summary> /// Returns the distance between the latitude and longitude coordinates that are specified by this <see cref="LocationServicePosition" /> and another specified <see cref="LocationServicePosition" />. /// </summary> /// <param name="other">The <see cref="LocationServicePosition" /> for the location to calculate the distance to.</param> /// <returns>The distance between the two coordinates, in meters.</returns> public double GetDistanceTo(LocationServicePosition other) { var latitude0 = Latitude * DegToRad; var longitude0 = Longitude * DegToRad; var latitude1 = other.Latitude * DegToRad; var longitude1 = other.Longitude * DegToRad; var deltaLatitude = latitude1 - latitude0; var deltaLongitude = longitude1 - longitude0; var r0 = Math.Pow(Math.Sin(deltaLatitude / 2), 2) + (Math.Pow(Math.Sin(deltaLongitude / 2), 2) * Math.Cos(latitude0) * Math.Cos(latitude1)); var r1 = 2 * Math.Atan2(Math.Sqrt(r0), Math.Sqrt(1 - r0)); return 6376500 * r1; } /// <summary> /// Determines whether two <see cref="LocationServicePosition"/> objects are not equal. /// </summary> /// <param name="left">The first <see cref="LocationServicePosition"/> to test for inequality.</param> /// <param name="right">The second <see cref="LocationServicePosition"/> to test for inequality.</param> /// <returns>true if the latitude and longitude values of both <see cref="LocationServicePosition"/> objects are not equal; otherwise, false.</returns> public static bool operator !=(LocationServicePosition left, LocationServicePosition right) { return !(left == right); } /// <summary> /// Determines whether two <see cref="LocationServicePosition"/> objects are equal. /// </summary> /// <param name="left">The first <see cref="LocationServicePosition"/> to test for equality.</param> /// <param name="right">The second <see cref="LocationServicePosition"/> to test for equality.</param> /// <returns>true if the latitude and longitude values of both <see cref="LocationServicePosition"/> objects are equal; otherwise, false.</returns> public static bool operator ==(LocationServicePosition left, LocationServicePosition right) { if (ReferenceEquals(left, null)) { return ReferenceEquals(right, null); } return left.Equals(right); } } }
Cimbalino/Cimbalino-Phone-Toolkit
src/Cimbalino.Phone.Toolkit.Location (WP71)/Services/LocationServicePosition.cs
C#
mit
10,056
package com.example.design.patterns.interpreter.xml; import java.util.ArrayList; import java.util.Collection; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.w3c.dom.Element; /** * 元素作为非终结符对应的解释器,解释并执行中间元素 */ public class ElementExpression extends AbstractElementExpression { private static final Logger LOGGER = LoggerFactory.getLogger(ElementExpression.class); /** * 用来记录组合的ReadXmlExpression元素 */ private Collection<AbstractElementExpression> elements = new ArrayList<AbstractElementExpression>(); /** * 元素的名称 */ private String elementName = ""; public ElementExpression(String elementName) { this.elementName = elementName; } public boolean addElement(AbstractElementExpression element) { this.elements.add(element); return true; } public boolean removeElement(AbstractElementExpression element) { this.elements.remove(element); return true; } @Override public String interpret(Context context) { // 先取出上下文里的当前元素作为父级元素 // 查找到当前元素名称所对应的xml元素,并设置回到上下文中 Element parentElement = context.getParentElement(); if (parentElement == null) { // 说明现在获取的是根元素 context.setParentElement(context.getDocument().getDocumentElement()); } else { // 根据父级元素和要查找的元素的名称来获取当前的元素 Element element = context.findElementFromParent(parentElement, elementName); LOGGER.info("find element : {}", element); // 把当前获取的元素放到上下文里面 context.setParentElement(element); } // 调用第一个子元素的interpret方法 for (AbstractElementExpression element : elements) { return element.interpret(context); } return null; } @Override public String toString() { return "ElementExpression{" + "elements=" + elements + ", elementName='" + elementName + '\'' + '}'; } }
yuweijun/learning-programming
design-patterns/src/main/java/com/example/design/patterns/interpreter/xml/ElementExpression.java
Java
mit
2,282
package com.linstid.energydashws.entities; import java.io.Serializable; import java.util.Date; import org.bson.types.ObjectId; import com.google.code.morphia.annotations.Entity; import com.google.code.morphia.annotations.Id; import com.google.code.morphia.annotations.Property; @Entity(value = "envir_reading", noClassnameStored = true) public class ReadingEntity implements Serializable { private static final long serialVersionUID = -6804237190960512885L; @Id private ObjectId id; @Property("reading_timestamp") private Date readingTimestamp; @Property("receiver_days_since_birth") private Integer receiverDaysSinceBirth; @Property("receiver_time") private String receiverTime; @Property("ch1_watts") private Integer ch1Watts; @Property("ch2_watts") private Integer ch2Watts; @Property("ch3_watts") private Integer ch3Watts; @Property("total_watts") private Integer totalWatts; @Property("temp_f") private Float tempF; public ObjectId getId() { return id; } public void setId(ObjectId id) { this.id = id; } public Date getReadingTimestamp() { return readingTimestamp; } public void setReadingTimestamp(Date readingTimestamp) { this.readingTimestamp = readingTimestamp; } public Integer getCh1Watts() { return ch1Watts; } public void setCh1Watts(Integer ch1Watts) { this.ch1Watts = ch1Watts; } public Integer getCh2Watts() { return ch2Watts; } public void setCh2Watts(Integer ch2Watts) { this.ch2Watts = ch2Watts; } public Integer getCh3Watts() { return ch3Watts; } public void setCh3Watts(Integer ch3Watts) { this.ch3Watts = ch3Watts; } public Integer getTotalWatts() { return totalWatts; } public void setTotalWatts(Integer totalWatts) { this.totalWatts = totalWatts; } public Float getTempF() { return tempF; } public void setTempF(Float tempF) { this.tempF = tempF; } }
clinstid/energydashws
src/main/java/com/linstid/energydashws/entities/ReadingEntity.java
Java
mit
1,891
<?php namespace BH\API\Entity; use DateTime; class Timeslot implements TimeslotInterface { /** * * @var int */ protected $id; /** * * @var DateTime */ protected $startsAt; /** * * @var DateTime */ protected $endsAt; /** * * @var CustomerInterface */ protected $customer; /** * * @var int */ protected $duration; /** * * @var bool */ protected $active; /** * * @var int */ protected $cost; public function getId() { return $this->id; } public function setId($id) { $this->id = (int) $id; return $this; } public function getStartsAt() { return $this->startsAt; } public function setStartsAt(DateTime $startsAt) { $this->startsAt = $startsAt; return $this; } public function getEndsAt() { return $this->endsAt; } public function setEndsAt(DateTime $endsAt) { $this->endsAt = $endsAt; return $this; } public function getCustomer() { return $this->customer; } public function setCustomer(CustomerInterface $customer) { $this->customer = $customer; return $this; } public function getDuration() { return $this->duration; } public function setDuration($duration) { $this->duration = (int) $duration; return $this; } public function getActive() { return $this->active; } public function setActive($flag) { $this->active = (bool) $flag; return $this; } public function getCost() { return $this->cost; } public function setCost($cost) { $this->cost = (int) $cost; return $this; } }
flemeur/bhapi-php-client
src/Entity/Timeslot.php
PHP
mit
1,535
import {{ NgModule }} from '@angular/core'; import {{ Routes, RouterModule }} from '@angular/router'; import {{ {Resource}EditComponent }} from './{resources}-edit.component'; const routes: Routes = [ {{ path: '', component: {Resource}EditComponent }} ]; @NgModule({{ imports: [RouterModule.forChild(routes)], exports: [RouterModule] }}) export class {Resource}EditRoutingModule {{ }}
Leo-g/Flask-Scaffold
scaffold/app/templates/module/edit/module-routing.module.ts
TypeScript
mit
411
'use strict'; /* global describe it */ // core modules var assert = require('assert'); // local modules var makeValueFullResult = require('../../lib/consumers/makeValueFullResult.js'); var single = require('../../lib/consumers/single.js'); var Stream = require('../../lib/streams/stream.js'); describe('makeValueFullResult', function() { it('makes value full result', function() { var stream = Stream('x'); var consumer = makeValueFullResult(single('x')); var parseResult = consumer.consume(stream); assert.equal(parseResult.value.name, '"x"'); assert.equal(parseResult.value.value, 'x'); assert.equal(parseResult.value.accepted, true); assert.equal(parseResult.value.valid, true); assert.equal(parseResult.value.invalidations.length, 0); assert.equal(parseResult.value.location.length, 2); }); });
voltrevo/parser
test/consumers/makeValueFullResult.js
JavaScript
mit
846
FROM ubuntu:latest ARG redis_version=5.0.8 ARG redis_home=/opt/redis WORKDIR ${redis_home} RUN mkdir -p ${redis_home} RUN cd /opt && \ apt-get update && \ apt-get install -y vim \ sudo \ curl \ gcc \ make && \ apt-get clean && \ curl -OL -s http://download.redis.io/releases/redis-${redis_version}.tar.gz && \ tar -xf redis-${redis_version}.tar.gz && \ mv redis-${redis_version} redis-src && \ cd redis-src && \ make && \ make PREFIX=${redis_home} install RUN adduser --disabled-login --gecos '' redis && \ usermod -G sudo redis RUN echo "Defaults:redis !requiretty" >> /etc/sudoers.d/redis && \ echo "redis ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/redis && \ chmod 440 /etc/sudoers.d/redis RUN chown -R redis.redis ${redis_home} && \ chown -R redis.redis /opt/redis-src RUN mkdir conf ADD redis.conf.template conf/redis.conf.template ADD docker-entrypoint.sh docker-entrypoint.sh RUN chown -R redis.redis docker-entrypoint.sh conf conf/redis.conf.template && \ chmod a+x docker-entrypoint.sh RUN chmod a+x docker-entrypoint.sh USER redis EXPOSE 6379 16379 ENTRYPOINT ["/opt/redis/docker-entrypoint.sh"]
kazuhira-r/dockerfiles
redis-cluster/Dockerfile
Dockerfile
mit
1,272
Version 0.2 =========== First stable version. * Add tests with 70% coverage * Add command line options (help & version) * Refactor internal variables and function names * Refactor error handling Version 0.1 =========== * First implementation with all the main gauges and informations display: host system, CPUs, BIOS, motherboard, memory and disks. * Temperature display place-holder (no actual temperature display yet).
miniwark/tyu
CHANGELOG.md
Markdown
mit
426
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <folly/portability/GMock.h> #include <quic/dsr/frontend/PacketBuilder.h> namespace quic::test { class MockDSRPacketBuilder : public DSRPacketBuilderBase { public: MOCK_METHOD((size_t), remainingSpaceNonConst, (), (noexcept)); size_t remainingSpace() const noexcept override { return const_cast<MockDSRPacketBuilder&>(*this).remainingSpaceNonConst(); } MOCK_METHOD2(addSendInstruction, void(SendInstruction&&, uint32_t)); }; } // namespace quic::test
facebookincubator/mvfst
quic/dsr/frontend/test/Mocks.h
C
mit
682
// *************************************************************************** // BamReader.h (c) 2009 Derek Barnett, Michael Str�mberg // Marth Lab, Department of Biology, Boston College // --------------------------------------------------------------------------- // Last modified: 18 November 2012 (DB) // --------------------------------------------------------------------------- // Provides read access to BAM files. // *************************************************************************** #ifndef BAMREADER_H #define BAMREADER_H #include <string> #include "api/BamAlignment.h" #include "api/BamIndex.h" #include "api/SamHeader.h" #include "api/api_global.h" namespace BamTools { namespace Internal { class BamReaderPrivate; } // namespace Internal class API_EXPORT BamReader { // constructor / destructor public: BamReader(); ~BamReader(); // public interface public: // ---------------------- // BAM file operations // ---------------------- // closes the current BAM file bool Close(); // returns filename of current BAM file const std::string GetFilename() const; // returns true if a BAM file is open for reading bool IsOpen() const; // performs random-access jump within BAM file bool Jump(int refID, int position = 0); // opens a BAM file bool Open(const std::string& filename); // returns internal file pointer to beginning of alignment data bool Rewind(); // sets the target region of interest bool SetRegion(const BamRegion& region); // sets the target region of interest bool SetRegion(const int& leftRefID, const int& leftPosition, const int& rightRefID, const int& rightPosition); int64_t Tell() const; // ---------------------- // access alignment data // ---------------------- // retrieves next available alignment bool GetNextAlignment(BamAlignment& alignment); // retrieves next available alignmnet (without populating the alignment's string data fields) bool GetNextAlignmentCore(BamAlignment& alignment); // ---------------------- // access header data // ---------------------- // returns a read-only reference to SAM header data const SamHeader& GetConstSamHeader() const; // returns an editable copy of SAM header data SamHeader GetHeader() const; // returns SAM header data, as SAM-formatted text std::string GetHeaderText() const; // ---------------------- // access reference data // ---------------------- // returns the number of reference sequences int GetReferenceCount() const; // returns all reference sequence entries const RefVector& GetReferenceData() const; // returns the ID of the reference with this name int GetReferenceID(const std::string& refName) const; // ---------------------- // BAM index operations // ---------------------- // creates an index file for current BAM file, using the requested index type bool CreateIndex(const BamIndex::IndexType& type = BamIndex::STANDARD); // returns true if index data is available bool HasIndex() const; // looks in BAM file's directory for a matching index file bool LocateIndex(const BamIndex::IndexType& preferredType = BamIndex::STANDARD); // opens a BAM index file bool OpenIndex(const std::string& indexFilename); // sets a custom BamIndex on this reader void SetIndex(BamIndex* index); // ---------------------- // error handling // ---------------------- // returns a human-readable description of the last error that occurred std::string GetErrorString() const; // private implementation private: Internal::BamReaderPrivate* d; }; } // namespace BamTools #endif // BAMREADER_H
pezmaster31/bamtools
src/api/BamReader.h
C
mit
3,806