code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
define(['js/util'], function (util) { "use strict"; var sf2 = {}; sf2.createFromArrayBuffer = function(ab) { var that = { riffHeader: null, sfbk: {} }; var ar = util.ArrayReader(ab); var sfGenerator = [ "startAddrsOffset", // 0 "endAddrsOffset", // 1 "startloopAddrsOffset", // 2 "endloopAddrsOffset", // 3 "startAddrsCoarseOffset", // 4 "modLfoToPitch", // 5 "vibLfoToPitch", // 6 "modEnvToPitch", // 7 "initialFilterFc", // 8 "initialFilterQ", // 9 "modLfoToFilterFc", // 10 "modEnvToFilterFc", // 11 "endAddrsCoarseOffset", // 12 "modLfoToVolume", // 13 "unused1", "chorusEffectsSend", // 15 "reverbEffectsSend", // 16 "pan", // 17 "unused2", "unused3", "unused4", "delayModLFO", // 21 "freqModLFO", // 22 "delayVibLFO", // 23 "freqVibLFO", // 24 "delayModEnv", // 25 "attackModEnv", // 26 "holdModEnv", // 27 "decayModEnv", // 28 "sustainModEnv", // 29 "releaseModEnv", // 30 "keynumToModEnvHold", // 31 "keynumToModEnvDecay", // 32 "delayVolEnv", // 33 "attackVolEnv", // 34 "holdVolEnv", // 35 "decayVolEnv", // 36 "sustainVolEnv", // 37 "releaseVolEnv", // 38 "keynumToVolEnvHold", // 39 "keynumToVolEnvDecay", // 40 "instrument", // 41: PGEN Terminator "reserved1", "keyRange", // 43 "velRange", // 44 "startloopAddrsCoarseOffset", // 45 "keynum", // 46 "velocity", // 47 "initialAttenuation", // 48 "reserved2", "endloopAddrsCoarseOffset", // 50 "coarseTune", // 51 "fineTune", // 52 "sampleID", // 53: IGEN Terminator "sampleModes", // 54 "reserved3", "scaleTuning", // 56 "exclusiveClass", // 57 "overridingRootKey", // 58 "unused5", "endOper" ]; that.parseHeader = function () { // read RIFF header that.riffHeader = parseHeader(); that.size = that.riffHeader.length + 8; // read level1 header ar.seek(that.riffHeader.headPosition); that.sfbk = {}; that.sfbk.ID = ar.readStringF(4); // read level2 header that.sfbk.INFO = parseHeader(); // read level3 header // 3.1 INFO ar.seek(that.sfbk.INFO.headPosition); that.sfbk.INFO.ID = ar.readStringF(4); that.sfbk.INFO.child = {}; while(ar.position() < that.sfbk.INFO.headPosition + that.sfbk.INFO.length) { var head = parseHeader(); that.sfbk.INFO.child[head.ID] = head; } // 3.2 sdta ar.seek(that.sfbk.INFO.headPosition + that.sfbk.INFO.padLength); that.sfbk.sdta = parseHeader(); ar.seek(that.sfbk.sdta.headPosition); that.sfbk.sdta.ID = ar.readStringF(4); that.sfbk.sdta.child = {}; while(ar.position() < that.sfbk.sdta.headPosition + that.sfbk.sdta.length) { head = parseHeader(); that.sfbk.sdta.child[head.ID] = head; } // 3.3 pdta ar.seek(that.sfbk.sdta.headPosition + that.sfbk.sdta.padLength); that.sfbk.pdta = parseHeader(); ar.seek(that.sfbk.pdta.headPosition); that.sfbk.pdta.ID = ar.readStringF(4); that.sfbk.pdta.child = {}; while(ar.position() < that.sfbk.pdta.headPosition + that.sfbk.pdta.length) { head = parseHeader(); that.sfbk.pdta.child[head.ID] = head; } // read level4 data // 4.1 PHDR data var phdr = that.sfbk.pdta.child.phdr; phdr.data = []; ar.seek(phdr.headPosition); while(ar.position() < phdr.headPosition + phdr.length) { var data = {}; data.presetName = ar.readStringF(20); data.preset = ar.readUInt16(); data.bank = ar.readUInt16(); data.presetBagNdx = ar.readUInt16(); data.library = ar.readUInt32(); data.genre = ar.readUInt32(); data.morphology = ar.readUInt32(); phdr.data.push(data); } // set placeholder that.sfbk.pdta.child.pbag.data = []; that.sfbk.pdta.child.pgen.data = []; that.sfbk.pdta.child.pmod.data = []; that.sfbk.pdta.child.inst.data = []; that.sfbk.pdta.child.ibag.data = []; that.sfbk.pdta.child.igen.data = []; that.sfbk.pdta.child.imod.data = []; that.sfbk.pdta.child.shdr.data = []; }; that.readPreset = function(n) { var phdr = that.sfbk.pdta.child.phdr; var pbag = that.sfbk.pdta.child.pbag; var r = { presetName: phdr.data[n].presetName, preset: phdr.data[n].preset, bank: phdr.data[n].bank, gen: [], mod: [] } // PBAGs var pgen_global = { keyRange: { lo: 0, hi: 127 }, velRange: { lo: 1, hi: 127 } }; var pmod_global = []; for(var i = phdr.data[n].presetBagNdx; i < phdr.data[n + 1].presetBagNdx; i++) { var pbag0 = parsePBAG1(ar, pbag, i); var pbag1 = parsePBAG1(ar, pbag, i + 1); var pmod = readPMOD1(pbag0.modNdx, pbag1.modNdx, pmod_global); var pmod_local = Array.prototype.concat(pmod_global, pmod); var pgen = readPGEN1(pbag0.genNdx, pbag1.genNdx, pgen_global, pmod_local); if(pgen["instrument"] === undefined) { pgen_global = pgen; pmod_global = pmod; } else { r.gen = Array.prototype.concat(r.gen, pgen.instrument.ibag.igen); r.mod = Array.prototype.concat(r.mod, pgen.instrument.ibag.imod); } // r.mod.push(readPMOD1(pbag0.modNdx, pbag1.modNdx)); } return r; }; that.enumPresets = function() { var p = []; var phdr = that.sfbk.pdta.child.phdr; phdr.data.forEach(function(ph) { p.push(ph.presetName); }); return p; }; that.readSDTA = function(pos) { ar.seek(that.sfbk.sdta.child.smpl.headPosition + pos * 2); return ar.readInt16() / 32768; } that.readSDTAChunk = function(b, e) { return new Int16Array(new Uint8Array(ar.subarray( that.sfbk.sdta.child.smpl.headPosition + b * 2, that.sfbk.sdta.child.smpl.headPosition + e * 2 )).buffer); } var readPGEN1 = function(b, e, g, gm) { var pgen = that.sfbk.pdta.child.pgen; var global = _.O(g, true); var global_m = _.O(gm, true); var result = _.O(g, true); if(b != e) { for(var i = b; i < e; i++) { var r = parsePGEN1(ar, pgen, i); if(r.inst == "instrument") { global = _.O(result, true); result[r.inst] = readINST1(r.genAmount, global, global_m); } else { result[r.inst] = r.genAmount; } } } return result; }; var readPMOD1 = function(b, e, g) { var pmod = that.sfbk.pdta.child.pmod; var result = _.O(g, true); if(b != e) { for(var i = b; i < e; i++) { result.push(parseMOD1(ar, pmod, i)); } } return result; }; var readINST1 = function(i, g, gm) { var inst = that.sfbk.pdta.child.inst; var ibag = that.sfbk.pdta.child.ibag; var inst0 = parseINST1(ar, inst, i); var inst1 = parseINST1(ar, inst, i + 1); var r = { "instName": inst0.instName }; var global = _.O(g, true); var global_m = _.O(gm, true); // IBAGs r.ibag = { igen: [], imod: [] }; for(var i = inst0.instBagNdx; i < inst1.instBagNdx; i++) { var ibag0 = parseIBAG1(ar, ibag, i); var ibag1 = parseIBAG1(ar, ibag, i + 1); var igen = readIGEN1(ibag0.instGenNdx, ibag1.instGenNdx, global); var imod = readIMOD1(ibag0.instModNdx, ibag1.instModNdx, global_m); if(igen["sampleID"] === undefined) { // global parameter global = igen; global_m = imod; } else { r.ibag.igen.push(igen); r.ibag.imod.push(imod); } } return r; } var readIGEN1 = function(b, e, g) { var igen = that.sfbk.pdta.child.igen; var result = _.O(g, true); for(var i = b; i < e; i++) { var r = parseIGEN1(ar, igen, i); result[r.inst] = r.genAmount; if(r.inst == "sampleID") { result.shdr = readSHDR1(r.genAmount); } } return result; }; var readIMOD1 = function(b, e, g) { var imod = that.sfbk.pdta.child.imod; var result = _.O(g, true); if(b != e) { for(var i = b; i < e; i++) { result.push(parseMOD1(ar, imod, i)); } } return result; }; var readSHDR1 = function(i) { var shdr = that.sfbk.pdta.child.shdr; var r = parseSHDR1(ar, shdr, i); r.end -= r.start; r.startloop -= r.start; r.endloop -= r.start; r.sample = new Float32Array(r.end); ar.seek(that.sfbk.sdta.child.smpl.headPosition + r.start * 2) for(var j = 0; j < r.end; j++) { r.sample[j] = ar.readInt16() / 32768; } r.start = 0; return r; }; var parseHeader = function(){ var h = {}; h.ID = ar.readStringF(4); h.length = ar.readUInt32(); h.padLength = h.length % 2 == 1 ? h.length + 1 : h.length; h.headPosition = ar.position(); ar.seek(ar.position() + h.padLength); return h; }; var parsePBAG1 = function(ar, root, i) { ar.seek(root.headPosition + i * 4); var data = {}; data.genNdx = ar.readUInt16(); data.modNdx = ar.readUInt16(); root.data[i] = data; return data; }; var parsePGEN1 = function(ar, root, i) { ar.seek(root.headPosition + i * 4); var data = {}; data.genOper = ar.readUInt16(); data.inst = sfGenerator[data.genOper]; if(data.inst == 'keyRange' || data.inst == 'velRange' || data.inst == 'keynum' || data.inst == 'velocity') { data.genAmount = {}; data.genAmount.lo = ar.readUInt8(); data.genAmount.hi = ar.readUInt8(); } else { data.genAmount = ar.readInt16(); } root.data[i] = data; return data; }; var parseMOD1 = function(ar, root, i) { ar.seek(root.headPosition + i * 10); var data = {}; data.modSrcOper = { }; data.modSrcOper.index = ar.readUInt8(); data.modSrcOper.type = ar.readUInt8(); data.modDestOper = ar.readUInt16(); data.modDestInst = sfGenerator[data.modDestOper]; data.modAmount = ar.readInt16(); data.modAmtSrcOper = {}; data.modAmtSrcOper.index = ar.readUInt8(); data.modAmtSrcOper.type = ar.readUInt8(); data.modTransOper = ar.readUInt16(); root.data[i] = data; return data; }; var parseINST1 = function(ar, root, i) { ar.seek(root.headPosition + i * 22); var data = {}; data.instName = ar.readStringF(20); data.instBagNdx = ar.readUInt16(); root.data.push(data); return data; }; var parseIBAG1 = function(ar, root, i) { ar.seek(root.headPosition + i * 4); var data = {}; data.instGenNdx = ar.readUInt16(); data.instModNdx = ar.readUInt16(); root.data.push(data); return data; }; var parseIGEN1 = function(ar, root, i) { ar.seek(root.headPosition + i * 4); var data = {}; data.genOper = ar.readUInt16(); data.inst = sfGenerator[data.genOper]; if(data.inst == 'keyRange' || data.inst == 'velRange' || data.inst == 'keynum' || data.inst == 'velocity') { data.genAmount = {}; data.genAmount.lo = ar.readUInt8(); data.genAmount.hi = ar.readUInt8(); } else { data.genAmount = ar.readInt16(); } root.data.push(data); return data; }; var parseSHDR1 = function(ar, root, i) { ar.seek(root.headPosition + i * 46); var data = {}; data.sampleName = ar.readStringF(20); data.start = ar.readUInt32(); data.end = ar.readUInt32(); data.startloop = ar.readUInt32(); data.endloop = ar.readUInt32(); data.sampleRate = ar.readUInt32(); data.originalPitch = ar.readUInt8(); data.pitchCorrection = ar.readInt8(); data.sampleLink = ar.readUInt16(); data.sampleType = ar.readUInt16(); root.data.push(data); return data; }; return that; } return sf2; });
ruly-rudel/tipsound
js/sf2.js
JavaScript
mit
16,386
=begin <recording pid="" cookie="" stamp="" agent=""> <record id="" stamp="" status="" method="" url="" request-time=""> <header name="" value=""/> <body><![CDATA[HTML OR WHATEVER HERE]]></body> <param name="" value=""/> <multipart-reference name="" file-path=""/> </record> </recording> =end module DejaVuNS class Recording def self.find_by_identifier(ident) DejaVuNS.root.recording.each do |rec| return rec if rec.cookie == ident end nil end def self.find_by_pid(pid) rec = nil DejaVuNS.transaction do rec = DejaVuNS.root.recording[pid] end rec end def self.all_recordings recordings = [] DejaVuNS.transaction do DejaVuNS.root.recording.each do |rec| recordings << rec end end recordings end end end
kuccello/deja-vu
lib/deja-vu/model/recording.rb
Ruby
mit
982
package org.softlang.service.company; import java.io.Serializable; import java.util.LinkedList; import java.util.List; /** * A department has a name, a manager, employees, and subdepartments. */ public class Department implements Serializable { private static final long serialVersionUID = -2008895922177165250L; private String name; private Employee manager; private List<Department> subdepts = new LinkedList<Department>(); private List<Employee> employees = new LinkedList<Employee>(); public String getName() { return name; } public void setName(String name) { this.name = name; } public Employee getManager() { return manager; } public void setManager(Employee manager) { this.manager = manager; } public List<Department> getSubdepts() { return subdepts; } public List<Employee> getEmployees() { return employees; } public double total() { double total = 0; total += getManager().getSalary(); for (Department s : getSubdepts()) total += s.total(); for (Employee e : getEmployees()) total += e.getSalary(); return total; } public void cut() { getManager().cut(); for (Department s : getSubdepts()) s.cut(); for (Employee e : getEmployees()) e.cut(); } }
amritbhat786/DocIT
101repo/contributions/javawsServer/OneOhOneCompanies/src/org/softlang/service/company/Department.java
Java
mit
1,240
/** * Contains methods for extracting/selecting final multiword candidates. * @author Valeria Quochi @author Francesca Frontini @author Francesco Rubino * Istituto di linguistica Computazionale "A. Zampolli" - CNR Pisa - Italy * */ package multiword;
francescafrontini/MWExtractor
src/multiword/package-info.java
Java
mit
262
#include "PerformanceSpriteTest.h" enum { kMaxNodes = 50000, kNodesIncrease = 250, TEST_COUNT = 7, }; enum { kTagInfoLayer = 1, kTagMainLayer = 2, kTagMenuLayer = (kMaxNodes + 1000), }; static int s_nSpriteCurCase = 0; //////////////////////////////////////////////////////// // // SubTest // //////////////////////////////////////////////////////// SubTest::~SubTest() { if (batchNode) { batchNode->release(); batchNode = NULL; } } void SubTest::initWithSubTest(int nSubTest, CCNode* p) { subtestNumber = nSubTest; parent = p; batchNode = NULL; /* * Tests: * 1: 1 (32-bit) PNG sprite of 52 x 139 * 2: 1 (32-bit) PNG Batch Node using 1 sprite of 52 x 139 * 3: 1 (16-bit) PNG Batch Node using 1 sprite of 52 x 139 * 4: 1 (4-bit) PVRTC Batch Node using 1 sprite of 52 x 139 * 5: 14 (32-bit) PNG sprites of 85 x 121 each * 6: 14 (32-bit) PNG Batch Node of 85 x 121 each * 7: 14 (16-bit) PNG Batch Node of 85 x 121 each * 8: 14 (4-bit) PVRTC Batch Node of 85 x 121 each * 9: 64 (32-bit) sprites of 32 x 32 each *10: 64 (32-bit) PNG Batch Node of 32 x 32 each *11: 64 (16-bit) PNG Batch Node of 32 x 32 each *12: 64 (4-bit) PVRTC Batch Node of 32 x 32 each */ // purge textures CCTextureCache *mgr = CCTextureCache::sharedTextureCache(); // [mgr removeAllTextures]; mgr->removeTexture(mgr->addImage("Images/grossinis_sister1.png")); mgr->removeTexture(mgr->addImage("Images/grossini_dance_atlas.png")); mgr->removeTexture(mgr->addImage("Images/spritesheet1.png")); switch ( subtestNumber) { case 1: case 4: case 7: break; /// case 2: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA8888); batchNode = CCSpriteBatchNode::create("Images/grossinis_sister1.png", 100); p->addChild(batchNode, 0); break; case 3: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA4444); batchNode = CCSpriteBatchNode::create("Images/grossinis_sister1.png", 100); p->addChild(batchNode, 0); break; /// case 5: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA8888); batchNode = CCSpriteBatchNode::create("Images/grossini_dance_atlas.png", 100); p->addChild(batchNode, 0); break; case 6: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA4444); batchNode = CCSpriteBatchNode::create("Images/grossini_dance_atlas.png", 100); p->addChild(batchNode, 0); break; /// case 8: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA8888); batchNode = CCSpriteBatchNode::create("Images/spritesheet1.png", 100); p->addChild(batchNode, 0); break; case 9: CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA4444); batchNode = CCSpriteBatchNode::create("Images/spritesheet1.png", 100); p->addChild(batchNode, 0); break; default: break; } if (batchNode) { batchNode->retain(); } CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_Default); } CCSprite* SubTest::createSpriteWithTag(int tag) { // create CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA8888); CCSprite* sprite = NULL; switch (subtestNumber) { case 1: { sprite = CCSprite::create("Images/grossinis_sister1.png"); parent->addChild(sprite, 0, tag+100); break; } case 2: case 3: { sprite = CCSprite::createWithTexture(batchNode->getTexture(), CCRectMake(0, 0, 52, 139)); batchNode->addChild(sprite, 0, tag+100); break; } case 4: { int idx = (CCRAScutOM_0_1() * 1400 / 100) + 1; char str[32] = {0}; sprintf(str, "Images/grossini_dance_%02d.png", idx); sprite = CCSprite::create(str); parent->addChild(sprite, 0, tag+100); break; } case 5: case 6: { int y,x; int r = (CCRAScutOM_0_1() * 1400 / 100); y = r / 5; x = r % 5; x *= 85; y *= 121; sprite = CCSprite::createWithTexture(batchNode->getTexture(), CCRectMake(x,y,85,121)); batchNode->addChild(sprite, 0, tag+100); break; } case 7: { int y,x; int r = (CCRAScutOM_0_1() * 6400 / 100); y = r / 8; x = r % 8; char str[40] = {0}; sprintf(str, "Images/sprites_test/sprite-%d-%d.png", x, y); sprite = CCSprite::create(str); parent->addChild(sprite, 0, tag+100); break; } case 8: case 9: { int y,x; int r = (CCRAScutOM_0_1() * 6400 / 100); y = r / 8; x = r % 8; x *= 32; y *= 32; sprite = CCSprite::createWithTexture(batchNode->getTexture(), CCRectMake(x,y,32,32)); batchNode->addChild(sprite, 0, tag+100); break; } default: break; } CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_Default); return sprite; } void SubTest::removeByTag(int tag) { switch (subtestNumber) { case 1: case 4: case 7: parent->removeChildByTag(tag+100, true); break; case 2: case 3: case 5: case 6: case 8: case 9: batchNode->removeChildAtIScutex(tag, true); // [batchNode removeChildByTag:tag+100 cleanup:YES]; break; default: break; } } //////////////////////////////////////////////////////// // // SpriteMenuLayer // //////////////////////////////////////////////////////// void SpriteMenuLayer::showCurrentTest() { SpriteMainScene* pScene = NULL; SpriteMainScene* pPreScene = (SpriteMainScene*) getParent(); int nSubTest = pPreScene->getSubTestNum(); int nNodes = pPreScene->getNodesNum(); switch (m_nCurCase) { case 0: pScene = new SpritePerformTest1; break; case 1: pScene = new SpritePerformTest2; break; case 2: pScene = new SpritePerformTest3; break; case 3: pScene = new SpritePerformTest4; break; case 4: pScene = new SpritePerformTest5; break; case 5: pScene = new SpritePerformTest6; break; case 6: pScene = new SpritePerformTest7; break; } s_nSpriteCurCase = m_nCurCase; if (pScene) { pScene->initWithSubTest(nSubTest, nNodes); CCDirector::sharedDirector()->replaceScene(pScene); pScene->release(); } } //////////////////////////////////////////////////////// // // SpriteMainScene // //////////////////////////////////////////////////////// void SpriteMainScene::initWithSubTest(int asubtest, int nNodes) { //sraScutom(0); subtestNumber = asubtest; m_pSubTest = new SubTest; m_pSubTest->initWithSubTest(asubtest, this); CCSize s = CCDirector::sharedDirector()->getWinSize(); lastRenderedCount = 0; quantityNodes = 0; CCMenuItemFont::setFontSize(65); CCMenuItemFont *decrease = CCMenuItemFont::create(" - ", this, menu_selector(SpriteMainScene::oScutecrease)); decrease->setColor(ccc3(0,200,20)); CCMenuItemFont *increase = CCMenuItemFont::create(" + ", this, menu_selector(SpriteMainScene::onIncrease)); increase->setColor(ccc3(0,200,20)); CCMenu *menu = CCMenu::create(decrease, increase, NULL); menu->alignItemsHorizontally(); menu->setPosition(ccp(s.width/2, s.height-65)); addChild(menu, 1); CCLabelTTF *infoLabel = CCLabelTTF::create("0 nodes", "Marker Felt", 30); infoLabel->setColor(ccc3(0,200,20)); infoLabel->setPosition(ccp(s.width/2, s.height-90)); addChild(infoLabel, 1, kTagInfoLayer); // add menu SpriteMenuLayer* pMenu = new SpriteMenuLayer(true, TEST_COUNT, s_nSpriteCurCase); addChild(pMenu, 1, kTagMenuLayer); pMenu->release(); // Sub Tests CCMenuItemFont::setFontSize(32); CCMenu* pSubMenu = CCMenu::create(); for (int i = 1; i <= 9; ++i) { char str[10] = {0}; sprintf(str, "%d ", i); CCMenuItemFont* itemFont = CCMenuItemFont::create(str, this, menu_selector(SpriteMainScene::testNCallback)); itemFont->setTag(i); pSubMenu->addChild(itemFont, 10); if( i<= 3) itemFont->setColor(ccc3(200,20,20)); else if(i <= 6) itemFont->setColor(ccc3(0,200,20)); else itemFont->setColor(ccc3(0,20,200)); } pSubMenu->alignItemsHorizontally(); pSubMenu->setPosition(ccp(s.width/2, 80)); addChild(pSubMenu, 2); // add title label CCLabelTTF *label = CCLabelTTF::create(title().c_str(), "Arial", 40); addChild(label, 1); label->setPosition(ccp(s.width/2, s.height-32)); label->setColor(ccc3(255,255,40)); while(quantityNodes < nNodes) onIncrease(this); } std::string SpriteMainScene::title() { return "No title"; } SpriteMainScene::~SpriteMainScene() { if (m_pSubTest) { delete m_pSubTest; m_pSubTest = NULL; } } void SpriteMainScene::testNCallback(CCObject* pSender) { subtestNumber = ((CCMenuItemFont*) pSender)->getTag(); SpriteMenuLayer* pMenu = (SpriteMenuLayer*)getChildByTag(kTagMenuLayer); pMenu->restartCallback(pSender); } void SpriteMainScene::updateNodes() { if( quantityNodes != lastRenderedCount ) { CCLabelTTF *infoLabel = (CCLabelTTF *) getChildByTag(kTagInfoLayer); char str[16] = {0}; sprintf(str, "%u nodes", quantityNodes); infoLabel->setString(str); lastRenderedCount = quantityNodes; } } void SpriteMainScene::onIncrease(CCObject* pSender) { if( quantityNodes >= kMaxNodes) return; for( int i=0;i< kNodesIncrease;i++) { CCSprite *sprite = m_pSubTest->createSpriteWithTag(quantityNodes); doTest(sprite); quantityNodes++; } updateNodes(); } void SpriteMainScene::oScutecrease(CCObject* pSender) { if( quantityNodes <= 0 ) return; for( int i=0;i < kNodesIncrease;i++) { quantityNodes--; m_pSubTest->removeByTag(quantityNodes); } updateNodes(); } //////////////////////////////////////////////////////// // // For test functions // //////////////////////////////////////////////////////// void performanceActions(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); float period = 0.5f + (raScut() % 1000) / 500.0f; CCRotateBy* rot = CCRotateBy::create(period, 360.0f * CCRAScutOM_0_1()); CCActionInterval* rot_back = rot->reverse(); CCAction *permanentRotation = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL)); pSprite->runAction(permanentRotation); float growDuration = 0.5f + (raScut() % 1000) / 500.0f; CCActionInterval *grow = CCScaleBy::create(growDuration, 0.5f, 0.5f); CCAction *permanentScaleLoop = CCRepeatForever::create(CCSequence::create(grow, grow->reverse(), NULL)); pSprite->runAction(permanentScaleLoop); } void performanceActions20(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); if( CCRAScutOM_0_1() < 0.2f ) pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); else pSprite->setPosition(ccp( -1000, -1000)); float period = 0.5f + (raScut() % 1000) / 500.0f; CCRotateBy* rot = CCRotateBy::create(period, 360.0f * CCRAScutOM_0_1()); CCActionInterval* rot_back = rot->reverse(); CCAction *permanentRotation = CCRepeatForever::create(CCSequence::create(rot, rot_back, NULL)); pSprite->runAction(permanentRotation); float growDuration = 0.5f + (raScut() % 1000) / 500.0f; CCActionInterval *grow = CCScaleBy::create(growDuration, 0.5f, 0.5f); CCAction *permanentScaleLoop = CCRepeatForever::create(CCSequence::createWithTwoActions(grow, grow->reverse())); pSprite->runAction(permanentScaleLoop); } void performanceRotationScale(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); pSprite->setRotation(CCRAScutOM_0_1() * 360); pSprite->setScale(CCRAScutOM_0_1() * 2); } void performancePosition(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); } void performanceout20(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); if( CCRAScutOM_0_1() < 0.2f ) pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); else pSprite->setPosition(ccp( -1000, -1000)); } void performanceOut100(CCSprite* pSprite) { pSprite->setPosition(ccp( -1000, -1000)); } void performanceScale(CCSprite* pSprite) { CCSize size = CCDirector::sharedDirector()->getWinSize(); pSprite->setPosition(ccp((raScut() % (int)size.width), (raScut() % (int)size.height))); pSprite->setScale(CCRAScutOM_0_1() * 100 / 50); } //////////////////////////////////////////////////////// // // SpritePerformTest1 // //////////////////////////////////////////////////////// std::string SpritePerformTest1::title() { char str[32] = {0}; sprintf(str, "A (%d) position", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest1::doTest(CCSprite* sprite) { performancePosition(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest2 // //////////////////////////////////////////////////////// std::string SpritePerformTest2::title() { char str[32] = {0}; sprintf(str, "B (%d) scale", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest2::doTest(CCSprite* sprite) { performanceScale(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest3 // //////////////////////////////////////////////////////// std::string SpritePerformTest3::title() { char str[32] = {0}; sprintf(str, "C (%d) scale + rot", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest3::doTest(CCSprite* sprite) { performanceRotationScale(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest4 // //////////////////////////////////////////////////////// std::string SpritePerformTest4::title() { char str[32] = {0}; sprintf(str, "D (%d) 100%% out", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest4::doTest(CCSprite* sprite) { performanceOut100(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest5 // //////////////////////////////////////////////////////// std::string SpritePerformTest5::title() { char str[32] = {0}; sprintf(str, "E (%d) 80%% out", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest5::doTest(CCSprite* sprite) { performanceout20(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest6 // //////////////////////////////////////////////////////// std::string SpritePerformTest6::title() { char str[32] = {0}; sprintf(str, "F (%d) actions", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest6::doTest(CCSprite* sprite) { performanceActions(sprite); } //////////////////////////////////////////////////////// // // SpritePerformTest7 // //////////////////////////////////////////////////////// std::string SpritePerformTest7::title() { char str[32] = {0}; sprintf(str, "G (%d) actions 80%% out", subtestNumber); std::string strRet = str; return strRet; } void SpritePerformTest7::doTest(CCSprite* sprite) { performanceActions20(sprite); } void runSpriteTest() { SpriteMainScene* pScene = new SpritePerformTest1; pScene->initWithSubTest(1, 50); CCDirector::sharedDirector()->replaceScene(pScene); pScene->release(); }
wenhulove333/ScutServer
Sample/ClientSource/samples/Cpp/TestCpp/Classes/PerformanceTest/PerformanceSpriteTest.cpp
C++
mit
17,742
class SparseVector { unordered_map<int, int> repr; int size = 0; public: SparseVector(vector<int> &nums) { size = nums.size(); for (int i=0; i<nums.size(); i++) { if (nums[i] == 0) { continue; } repr[i] = nums[i]; } } // Return the dotProduct of two sparse vectors int dotProduct(SparseVector& vec) { if (size != vec.size) {return 0;} // incompatible int dp=0; for (const auto& kv : vec.repr) { if (repr.find(kv.first) == repr.end()) continue; dp += kv.second * repr[kv.first]; } return dp; } }; // Your SparseVector object will be instantiated and called as such: // SparseVector v1(nums1); // SparseVector v2(nums2); // int ans = v1.dotProduct(v2);
cbrghostrider/Hacking
leetcode/_001570_dotProdSparseVectors.cpp
C++
mit
807
module PrintSquare class CommandRunner class << self def run(args) validate_args(args) print_square(args[0].to_i) end def print_square(number) size = Math.sqrt(number).to_i n = number x = PrintSquare::Vector.new size.even? ? 1 : -1, size, size.even? ? 1 : 0 y = PrintSquare::Vector.new 0, size print = PrintSquare::Printer.new size x.turn = proc do y.offset += 1 if x.direction == 1 y.direction = x.direction x.direction = 0 end y.turn = proc do if y.direction == -1 x.size -= 1 y.size -= 1 x.offset += 1 end x.direction = y.direction * -1 y.direction = 0 end until n == 0 print.set x, y, n y.direction == 0 ? x.next : y.next n -= 1 end print.out end def validate_args(args) usage(:no_args) if args.count == 0 usage(:too_many_args) if args.count > 1 usage(:invalid_arg) unless (Integer(args[0]) rescue false) usage(:not_square) unless is_square?(args[0].to_i) end def is_square?(number) return true if number == 1 position = 2 spread = 1 until spread == 0 current_square = position*position return true if current_square == number if number < current_square spread >>= 1 position -= spread else spread <<= 1 position += spread end end false end def usage(error_type) error = case error_type when :no_args then 'Missing argument' when :invalid_arg then 'Argument must be a number' when :too_many_args then 'Too many arguments' when :not_square then "Argument is not a square number" end puts <<-USAGE #{error} print_square [square_number] USAGE exit(-1) end end end end
AktionLab/print_square
lib/print_square/command_runner.rb
Ruby
mit
2,057
package com.ripplargames.meshio.meshformats.ply; import com.ripplargames.meshio.vertices.VertexType; public class PlyVertexDataType { private final VertexType vertexType; private final PlyDataType plyDataType; public PlyVertexDataType(VertexType vertexType, PlyDataType plyDataType) { this.vertexType = vertexType; this.plyDataType = plyDataType; } public VertexType vertexType() { return vertexType; } public PlyDataType plyDataType() { return plyDataType; } }
NathanJAdams/MeshIO
src/com/ripplargames/meshio/meshformats/ply/PlyVertexDataType.java
Java
mit
531
require 'multi_xml' require 'ostruct' require 'roxml' module WxHelper module XmlHelper class Message def initialize(xml) hash = parse_xml xml @source = OpenStruct.new(hash['xml']) end def method_missing(method, *args, &block) @source.send(method.to_s.classify, *args, &block) end def parse_xml xml MultiXml.parse(xml) end end # <xml> # <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId> # <Package><![CDATA[a=1&url=http%3A%2F%2Fwww.qq.com]]></Package> # <TimeStamp> 1369745073</TimeStamp> # <NonceStr><![CDATA[iuytxA0cH6PyTAVISB28]]></NonceStr> # <RetCode>0</RetCode> # <RetErrMsg><![CDATA[ok]]></ RetErrMsg> # <AppSignature><![CDATA[53cca9d47b883bd4a5c85a9300df3da0cb48565c]]> # </AppSignature> # <SignMethod><![CDATA[sha1]]></ SignMethod > # </xml> PackageMessage = Class.new(Message) # <xml> # <OpenId><![CDATA[111222]]></OpenId> # <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId> # <IsSubscribe>1</IsSubscribe> # <TimeStamp> 1369743511</TimeStamp> # <NonceStr><![CDATA[jALldRTHAFd5Tgs5]]></NonceStr> # <AppSignature><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]> # </AppSignature> # <SignMethod><![CDATA[sha1]]></ SignMethod > # </xml> NotifyMessage = Class.new(Message) # <xml> # <OpenId><![CDATA[111222]]></OpenId> # <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId> # <TimeStamp> 1369743511</TimeStamp> # <MsgType><![CDATA[request]]></MsgType> # <FeedBackId><![CDATA[5883726847655944563]]></FeedBackId> # <TransId><![CDATA[10123312412321435345]]></TransId> # <Reason><![CDATA[商品质量有问题]]></Reason> # <Solution><![CDATA[补发货给我]]></Solution> # <ExtInfo><![CDATA[明天六点前联系我 18610847266]]></ExtInfo> # <AppSignature><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]> # </AppSignature> # <SignMethod><![CDATA[sha1]]></ SignMethod > # </xml> # <xml> # <OpenId><![CDATA[111222]]></OpenId> # <AppId><![CDATA[wwwwb4f85f3a797777]]></AppId> # <TimeStamp> 1369743511</TimeStamp> # <MsgType><![CDATA[confirm/reject]]></MsgType> # <FeedBackId><![CDATA[5883726847655944563]]></FeedBackId> # <Reason><![CDATA[商品质量有问题]]></Reason> # <AppSignature><![CDATA[bafe07f060f22dcda0bfdb4b5ff756f973aecffa]]> # </AppSignature> # <SignMethod><![CDATA[sha1]]></ SignMethod > # </xml> PayFeedbackMessage = Class.new(Message) # <xml> # <AppId><![CDATA[wxf8b4f85f3a794e77]]></AppId> # <ErrorType>1001</ErrorType> # <Description><![CDATA[错识描述]]></Description> # <AlarmContent><![CDATA[错误详情]]></AlarmContent> # <TimeStamp>1393860740</TimeStamp> # <AppSignature><![CDATA[f8164781a303f4d5a944a2dfc68411a8c7e4fbea]]></AppSignature> # <SignMethod><![CDATA[sha1]]></SignMethod> # </xml> WarningMessage = Class.new(Message) class ResponseMessage include ROXML xml_name :xml xml_convention :camelcase xml_accessor :app_id, :cdata => true xml_accessor :package, :cdata => true xml_accessor :nonce_str, :cdata => true xml_accessor :ret_err_msg, :cdata => true xml_accessor :app_signature, :cdata => true xml_accessor :sign_method, :cdata => true xml_accessor :time_stamp, :as => Integer xml_accessor :ret_code, :as => Integer def initialize @sign_method = "sha1" end def to_xml super.to_xml(:encoding => 'UTF-8', :indent => 0, :save_with => 0) end end end end
sforce100/wxpay
lib/wxpay/helpers/xml_helper.rb
Ruby
mit
3,671
/** * @file * @author Mamadou Babaei <info@babaei.net> * @version 0.1.0 * * @section LICENSE * * (The MIT License) * * Copyright (c) 2016 - 2021 Mamadou Babaei * * 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. * * @section DESCRIPTION * * Provides zlib, gzip and bzip2 comprission / decompression algorithms. */ #ifndef CORELIB_COMPRESSION_HPP #define CORELIB_COMPRESSION_HPP #include <string> #include <vector> namespace CoreLib { class Compression; } class CoreLib::Compression { public: typedef std::vector<char> Buffer; public: enum class Algorithm : unsigned char { Zlib, Gzip, Bzip2 }; public: static void Compress(const char *data, const size_t size, Buffer &out_compressedBuffer, const Algorithm &algorithm); static void Compress(const std::string &dataString, Buffer &out_compressedBuffer, const Algorithm &algorithm); static void Compress(const Buffer &dataBuffer, Buffer &out_compressedBuffer, const Algorithm &algorithm); static void Decompress(const Buffer &dataBuffer, std::string &out_uncompressedString, const Algorithm &algorithm); static void Decompress(const Buffer &dataBuffer, Buffer &out_uncompressedBuffer, const Algorithm &algorithm); }; #endif /* CORELIB_COMPRESSION_HPP */
NuLL3rr0r/blog-subscription-service
CoreLib/Compression.hpp
C++
mit
2,563
import asyncio import email.utils import json import sys from cgi import parse_header from collections import namedtuple from http.cookies import SimpleCookie from urllib.parse import parse_qs, unquote, urlunparse from httptools import parse_url from sanic.exceptions import InvalidUsage from sanic.log import error_logger, logger try: from ujson import loads as json_loads except ImportError: if sys.version_info[:2] == (3, 5): def json_loads(data): # on Python 3.5 json.loads only supports str not bytes return json.loads(data.decode()) else: json_loads = json.loads DEFAULT_HTTP_CONTENT_TYPE = "application/octet-stream" # HTTP/1.1: https://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html#sec7.2.1 # > If the media type remains unknown, the recipient SHOULD treat it # > as type "application/octet-stream" class RequestParameters(dict): """Hosts a dict with lists as values where get returns the first value of the list and getlist returns the whole shebang """ def get(self, name, default=None): """Return the first value, either the default or actual""" return super().get(name, [default])[0] def getlist(self, name, default=None): """Return the entire list""" return super().get(name, default) class StreamBuffer: def __init__(self, buffer_size=100): self._queue = asyncio.Queue(buffer_size) async def read(self): """ Stop reading when gets None """ payload = await self._queue.get() self._queue.task_done() return payload async def put(self, payload): await self._queue.put(payload) def is_full(self): return self._queue.full() class Request(dict): """Properties of an HTTP request such as URL, headers, etc.""" __slots__ = ( "__weakref__", "_cookies", "_ip", "_parsed_url", "_port", "_remote_addr", "_socket", "app", "body", "endpoint", "headers", "method", "parsed_args", "parsed_files", "parsed_form", "parsed_json", "raw_url", "stream", "transport", "uri_template", "version", ) def __init__(self, url_bytes, headers, version, method, transport): self.raw_url = url_bytes # TODO: Content-Encoding detection self._parsed_url = parse_url(url_bytes) self.app = None self.headers = headers self.version = version self.method = method self.transport = transport # Init but do not inhale self.body_init() self.parsed_json = None self.parsed_form = None self.parsed_files = None self.parsed_args = None self.uri_template = None self._cookies = None self.stream = None self.endpoint = None def __repr__(self): return "<{0}: {1} {2}>".format( self.__class__.__name__, self.method, self.path ) def __bool__(self): if self.transport: return True return False def body_init(self): self.body = [] def body_push(self, data): self.body.append(data) def body_finish(self): self.body = b"".join(self.body) @property def json(self): if self.parsed_json is None: self.load_json() return self.parsed_json def load_json(self, loads=json_loads): try: self.parsed_json = loads(self.body) except Exception: if not self.body: return None raise InvalidUsage("Failed when parsing body as json") return self.parsed_json @property def token(self): """Attempt to return the auth header token. :return: token related to request """ prefixes = ("Bearer", "Token") auth_header = self.headers.get("Authorization") if auth_header is not None: for prefix in prefixes: if prefix in auth_header: return auth_header.partition(prefix)[-1].strip() return auth_header @property def form(self): if self.parsed_form is None: self.parsed_form = RequestParameters() self.parsed_files = RequestParameters() content_type = self.headers.get( "Content-Type", DEFAULT_HTTP_CONTENT_TYPE ) content_type, parameters = parse_header(content_type) try: if content_type == "application/x-www-form-urlencoded": self.parsed_form = RequestParameters( parse_qs(self.body.decode("utf-8")) ) elif content_type == "multipart/form-data": # TODO: Stream this instead of reading to/from memory boundary = parameters["boundary"].encode("utf-8") self.parsed_form, self.parsed_files = parse_multipart_form( self.body, boundary ) except Exception: error_logger.exception("Failed when parsing form") return self.parsed_form @property def files(self): if self.parsed_files is None: self.form # compute form to get files return self.parsed_files @property def args(self): if self.parsed_args is None: if self.query_string: self.parsed_args = RequestParameters( parse_qs(self.query_string) ) else: self.parsed_args = RequestParameters() return self.parsed_args @property def raw_args(self): return {k: v[0] for k, v in self.args.items()} @property def cookies(self): if self._cookies is None: cookie = self.headers.get("Cookie") if cookie is not None: cookies = SimpleCookie() cookies.load(cookie) self._cookies = { name: cookie.value for name, cookie in cookies.items() } else: self._cookies = {} return self._cookies @property def ip(self): if not hasattr(self, "_socket"): self._get_address() return self._ip @property def port(self): if not hasattr(self, "_socket"): self._get_address() return self._port @property def socket(self): if not hasattr(self, "_socket"): self._get_address() return self._socket def _get_address(self): self._socket = self.transport.get_extra_info("peername") or ( None, None, ) self._ip = self._socket[0] self._port = self._socket[1] @property def remote_addr(self): """Attempt to return the original client ip based on X-Forwarded-For. :return: original client ip. """ if not hasattr(self, "_remote_addr"): forwarded_for = self.headers.get("X-Forwarded-For", "").split(",") remote_addrs = [ addr for addr in [addr.strip() for addr in forwarded_for] if addr ] if len(remote_addrs) > 0: self._remote_addr = remote_addrs[0] else: self._remote_addr = "" return self._remote_addr @property def scheme(self): if ( self.app.websocket_enabled and self.headers.get("upgrade") == "websocket" ): scheme = "ws" else: scheme = "http" if self.transport.get_extra_info("sslcontext"): scheme += "s" return scheme @property def host(self): # it appears that httptools doesn't return the host # so pull it from the headers return self.headers.get("Host", "") @property def content_type(self): return self.headers.get("Content-Type", DEFAULT_HTTP_CONTENT_TYPE) @property def match_info(self): """return matched info after resolving route""" return self.app.router.get(self)[2] @property def path(self): return self._parsed_url.path.decode("utf-8") @property def query_string(self): if self._parsed_url.query: return self._parsed_url.query.decode("utf-8") else: return "" @property def url(self): return urlunparse( (self.scheme, self.host, self.path, None, self.query_string, None) ) File = namedtuple("File", ["type", "body", "name"]) def parse_multipart_form(body, boundary): """Parse a request body and returns fields and files :param body: bytes request body :param boundary: bytes multipart boundary :return: fields (RequestParameters), files (RequestParameters) """ files = RequestParameters() fields = RequestParameters() form_parts = body.split(boundary) for form_part in form_parts[1:-1]: file_name = None content_type = "text/plain" content_charset = "utf-8" field_name = None line_index = 2 line_end_index = 0 while not line_end_index == -1: line_end_index = form_part.find(b"\r\n", line_index) form_line = form_part[line_index:line_end_index].decode("utf-8") line_index = line_end_index + 2 if not form_line: break colon_index = form_line.index(":") form_header_field = form_line[0:colon_index].lower() form_header_value, form_parameters = parse_header( form_line[colon_index + 2 :] ) if form_header_field == "content-disposition": field_name = form_parameters.get("name") file_name = form_parameters.get("filename") # non-ASCII filenames in RFC2231, "filename*" format if file_name is None and form_parameters.get("filename*"): encoding, _, value = email.utils.decode_rfc2231( form_parameters["filename*"] ) file_name = unquote(value, encoding=encoding) elif form_header_field == "content-type": content_type = form_header_value content_charset = form_parameters.get("charset", "utf-8") if field_name: post_data = form_part[line_index:-4] if file_name is None: value = post_data.decode(content_charset) if field_name in fields: fields[field_name].append(value) else: fields[field_name] = [value] else: form_file = File( type=content_type, name=file_name, body=post_data ) if field_name in files: files[field_name].append(form_file) else: files[field_name] = [form_file] else: logger.debug( "Form-data field does not have a 'name' parameter " "in the Content-Disposition header" ) return fields, files
lixxu/sanic
sanic/request.py
Python
mit
11,420
require 'stringio' require 'highline/import' module RailsZen class ChosenAttr attr_accessor :name, :type, :validator, :type_based_validators, :scope_attr def initialize(name, type) @name = name @type = type @scope_attr = [] end def get_user_inputs get_presence_req get_type_based_validations end def get_presence_req say "\n\nShould :#{name} be present always in your record?\n" say"--------------------------------------------------------------" inp = agree("Reply with y or n") if inp @validator = "validates_presence_of" #say "What should be the default value? If there is no default value enter n" #val = $stdin.gets.strip #if val != 'n' #@default_value = val #end get_uniqueness_req else @validator = nil end end def get_uniqueness_req say "Should :#{name} be an unique column?\n" say "-------------------------------------\n\n" say "Reply with \n 0 if it is not unique \n 1 if it is just unique \n 2 if it is unique with respect to another attr \n\n" inp = ask("Please enter", Integer) { |q| q.in = 0..2 } if inp == 2 #say "Setting presence true in your models and migrations" say "\n#{name} is unique along with ?\n Reply with attr name\n " if is_relation? @scope_attr << "#{name}_id" unless name.end_with? "_id" end say("if it is a relation reply along with id: eg: user_id \n\n $->") @scope_attr << ask("Enter (comma sep list) ", lambda { |str| str.split(/,\s*/) }) @scope_attr = @scope_attr.flatten.map(&:to_sym) @validator = "validates_uniqueness_scoped_to" elsif inp == 1 @validator = "validates_uniqueness_of" end end def get_type_based_validations if(type == "integer" || type == "decimal") @validator_line = "#@validator_line, numericality: true" say "#{name} is an integer do you want to check \n 1 just the numericality? \n 2 check if it is only integer\n\n $-> " input = ask("Please enter", Integer) { |q| q.in = 1..2} map_input = { 1 => "validate_numericality", 2 => "validate_integer" #"3" => "validate_greater_than", "4" => "validate_lesser_than" } @type_based_validators = map_input[input] elsif(is_relation?) @type_based_validators = "validate_belongs_to" end end def is_relation? type =="belongs_to" || type == "references" || (type.end_with? "_id") end end end
vysakh0/rails_zen
lib/rails_zen/chosen_attr.rb
Ruby
mit
2,712
# frozen_string_literal: true RSpec::Matchers.define :enforce_authorization_api do expected_error = { 'error' => 'User is not authorized to access this resource.' } match do |actual| expect(actual).to have_http_status(403) expect(JSON.parse(actual.body)).to eq(expected_error) end failure_message do |actual| "expected to receive 403 status code (forbidden) and '#{expected_error}' " \ "as the response body. Received #{actual.status} status and "\ "'#{JSON.parse(actual.body)}' response body instead." end failure_message_when_negated do "expected not to receive 403 status (forbidden) or '#{expected_error}' "\ 'in the response body, but it did.' end description do 'enforce authorization policies when accessing API resources.' end end
brunofacca/zen-rails-base-app
spec/support/matchers/enforce_authorization_api.rb
Ruby
mit
804
from .tile import Split, Stack, TileStack class Tile(Split): class left(Stack): weight = 3 priority = 0 limit = 1 class right(TileStack): pass class Max(Split): class main(Stack): tile = False class InstantMsg(Split): class left(TileStack): # or maybe not tiled ? weight = 3 class roster(Stack): limit = 1 priority = 0 # probably roster created first class Gimp(Split): class toolbox(Stack): limit = 1 size = 184 class main(Stack): weight = 4 priority = 0 class dock(Stack): limit = 1 size = 324
tailhook/tilenol
tilenol/layout/examples.py
Python
mit
657
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Web Client * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ /** * @overview */ /** * Creates a folder properties dialog. * @class * This class represents a folder properties dialog. * * @param {DwtControl} parent the parent * @param {String} className the class name * * @extends DwtDialog */ ZmFolderPropsDialog = function(parent, className) { className = className || "ZmFolderPropsDialog"; var extraButtons; if (appCtxt.get(ZmSetting.SHARING_ENABLED)) { extraButtons = [ new DwtDialog_ButtonDescriptor(ZmFolderPropsDialog.ADD_SHARE_BUTTON, ZmMsg.addShare, DwtDialog.ALIGN_LEFT) ]; } DwtDialog.call(this, {parent:parent, className:className, title:ZmMsg.folderProperties, extraButtons:extraButtons, id:"FolderProperties"}); this._tabViews = []; this._tabKeys = []; this._tabInUse = []; this._tabKeyMap = {}; if (appCtxt.get(ZmSetting.SHARING_ENABLED)) { this.registerCallback(ZmFolderPropsDialog.ADD_SHARE_BUTTON, this._handleAddShareButton, this); } this.setButtonListener(DwtDialog.OK_BUTTON, new AjxListener(this, this._handleOkButton)); this.setButtonListener(DwtDialog.CANCEL_BUTTON, new AjxListener(this, this._handleCancelButton)); this._folderChangeListener = new AjxListener(this, this._handleFolderChange); this._createView(); }; ZmFolderPropsDialog.prototype = new DwtDialog; ZmFolderPropsDialog.prototype.constructor = ZmFolderPropsDialog; // Constants ZmFolderPropsDialog.ADD_SHARE_BUTTON = ++DwtDialog.LAST_BUTTON; ZmFolderPropsDialog.SHARES_HEIGHT = "9em"; // Tab identifiers ZmFolderPropsDialog.TABKEY_PROPERTIES = "PROPERTIES_TAB"; ZmFolderPropsDialog.TABKEY_RETENTION = "RETENTION_TAB"; // Public methods ZmFolderPropsDialog.prototype.toString = function() { return "ZmFolderPropsDialog"; }; ZmFolderPropsDialog.prototype.getTabKey = function(id) { var index = this._tabKeyMap[id]; return this._tabKeys[index]; }; /** * Pops-up the properties dialog. * * @param {ZmOrganizer} organizer the organizer */ ZmFolderPropsDialog.prototype.popup = function(organizer) { this._organizer = organizer; for (var i = 0; i < this._tabViews.length; i++) { this._tabViews[i].setOrganizer(organizer); } // On popup, make the property view visible var tabKey = this.getTabKey(ZmFolderPropsDialog.TABKEY_PROPERTIES); this._tabContainer.switchToTab(tabKey, true); organizer.addChangeListener(this._folderChangeListener); this._handleFolderChange(); if (appCtxt.get(ZmSetting.SHARING_ENABLED)) { var isShareable = ZmOrganizer.SHAREABLE[organizer.type]; var isVisible = (!organizer.link || organizer.isAdmin()); this.setButtonVisible(ZmFolderPropsDialog.ADD_SHARE_BUTTON, isVisible && isShareable); } DwtDialog.prototype.popup.call(this); }; ZmFolderPropsDialog.prototype.popdown = function() { if (this._organizer) { this._organizer.removeChangeListener(this._folderChangeListener); this._organizer = null; } DwtDialog.prototype.popdown.call(this); }; // Protected methods ZmFolderPropsDialog.prototype._getSeparatorTemplate = function() { return ""; }; ZmFolderPropsDialog.prototype._handleEditShare = function(event, share) { share = share || Dwt.getObjectFromElement(DwtUiEvent.getTarget(event)); var sharePropsDialog = appCtxt.getSharePropsDialog(); sharePropsDialog.popup(ZmSharePropsDialog.EDIT, share.object, share); return false; }; ZmFolderPropsDialog.prototype._handleRevokeShare = function(event, share) { share = share || Dwt.getObjectFromElement(DwtUiEvent.getTarget(event)); var revokeShareDialog = appCtxt.getRevokeShareDialog(); revokeShareDialog.popup(share); return false; }; ZmFolderPropsDialog.prototype._handleResendShare = function(event, share) { AjxDispatcher.require("Share"); share = share || Dwt.getObjectFromElement(DwtUiEvent.getTarget(event)); // create share info var tmpShare = new ZmShare({object:share.object}); tmpShare.grantee.id = share.grantee.id; tmpShare.grantee.email = (share.grantee.type == "guest") ? share.grantee.id : share.grantee.name; tmpShare.grantee.name = share.grantee.name; if (tmpShare.object.isRemote()) { tmpShare.grantor.id = tmpShare.object.zid; tmpShare.grantor.email = tmpShare.object.owner; tmpShare.grantor.name = tmpShare.grantor.email; tmpShare.link.id = tmpShare.object.rid; } else { tmpShare.grantor.id = appCtxt.get(ZmSetting.USERID); tmpShare.grantor.email = appCtxt.get(ZmSetting.USERNAME); tmpShare.grantor.name = appCtxt.get(ZmSetting.DISPLAY_NAME) || tmpShare.grantor.email; tmpShare.link.id = tmpShare.object.id; } tmpShare.link.name = share.object.name; tmpShare.link.view = ZmOrganizer.getViewName(share.object.type); tmpShare.link.perm = share.link.perm; if (share.grantee.type == "guest") { // Pass action as ZmShare.NEW even for resend for external user tmpShare._sendShareNotification(tmpShare.grantee.email, tmpShare.link.id, "", ZmShare.NEW); } else { tmpShare.sendMessage(ZmShare.NEW); } appCtxt.setStatusMsg(ZmMsg.resentShareMessage); return false; }; ZmFolderPropsDialog.prototype._handleAddShareButton = function(event) { var sharePropsDialog = appCtxt.getSharePropsDialog(); sharePropsDialog.popup(ZmSharePropsDialog.NEW, this._organizer, null); }; ZmFolderPropsDialog.prototype._handleOkButton = function(event) { // New batch command, stop on error var batchCommand = new ZmBatchCommand(null, null, true); var saveState = { commandCount: 0, errorMessage: [] }; for (var i = 0; i < this._tabViews.length; i++) { if (this._tabInUse[i]) { // Save all in use tabs this._tabViews[i].doSave(batchCommand, saveState); } } if (saveState.errorMessage.length > 0) { var msg = saveState.errorMessage.join("<br>"); var dialog = appCtxt.getMsgDialog(); dialog.reset(); dialog.setMessage(msg, DwtMessageDialog.WARNING_STYLE); dialog.popup(); } else if (saveState.commandCount > 0) { var callback = new AjxCallback(this, this.popdown); batchCommand.run(callback); } else { this.popdown(); } }; ZmFolderPropsDialog.prototype._handleError = function(response) { // Returned 'not handled' so that the batch command will preform the default // ZmController._handleException return false; }; ZmFolderPropsDialog.prototype._handleCancelButton = function(event) { this.popdown(); }; ZmFolderPropsDialog.prototype._handleFolderChange = function(event) { var organizer = this._organizer; // Get the components that will be hidden or displayed var tabBar = this._tabContainer.getTabBar(); var tabKey = this.getTabKey(ZmFolderPropsDialog.TABKEY_RETENTION); var retentionTabButton = this._tabContainer.getTabButton(tabKey); var retentionIndex = this._tabKeyMap[ZmFolderPropsDialog.TABKEY_RETENTION]; if ((organizer.type != ZmOrganizer.FOLDER) || organizer.link) { // Not a folder, or shared - hide the retention view (and possibly the toolbar) this._tabInUse[retentionIndex] = false; if (this._tabViews.length > 2) { // More than two tabs, hide the retention tab, leave the toolbar intact tabBar.setVisible(true); retentionTabButton.setVisible(false); } else { // Two or fewer tabs. Hide the toolbar, just let the properties view display standalone // (On popup, the display defaults to the property view) tabBar.setVisible(false); } } else { // Using the retention tab view - show the toolbar and all tabs this._tabInUse[retentionIndex] = true; retentionTabButton.setVisible(true); tabBar.setVisible(true); } for (var i = 0; i < this._tabViews.length; i++) { if (this._tabInUse[i]) { // Update all in use tabs to use the specified folder this._tabViews[i]._handleFolderChange(event); } } if (appCtxt.get(ZmSetting.SHARING_ENABLED)) { this._populateShares(organizer); } }; ZmFolderPropsDialog.prototype._populateShares = function(organizer) { this._sharesGroup.setContent(""); var displayShares = this._getDisplayShares(organizer); var getFolder = false; if (displayShares.length) { for (var i = 0; i < displayShares.length; i++) { var share = displayShares[i]; if (!(share.grantee && share.grantee.name)) { getFolder = true; } } } if (getFolder) { var respCallback = new AjxCallback(this, this._handleResponseGetFolder, [displayShares]); organizer.getFolder(respCallback); } else { this._handleResponseGetFolder(displayShares); } this._sharesGroup.setVisible(displayShares.length > 0); }; ZmFolderPropsDialog.prototype._getDisplayShares = function(organizer) { var shares = organizer.shares; var displayShares = []; if ((!organizer.link || organizer.isAdmin()) && shares && shares.length > 0) { AjxDispatcher.require("Share"); var userZid = appCtxt.accountList.mainAccount.id; // if a folder was shared with us with admin rights, a share is created since we could share it; // don't show any share that's for us in the list for (var i = 0; i < shares.length; i++) { var share = shares[i]; if (share.grantee) { var granteeId = share.grantee.id; if ((share.grantee.type != ZmShare.TYPE_USER) || (share.grantee.id != userZid)) { displayShares.push(share); } } } } return displayShares; }; ZmFolderPropsDialog.prototype._handleResponseGetFolder = function(displayShares, organizer) { if (organizer) { displayShares = this._getDisplayShares(organizer); } if (displayShares.length) { var table = document.createElement("TABLE"); table.className = "ZPropertySheet"; table.cellSpacing = "6"; for (var i = 0; i < displayShares.length; i++) { var share = displayShares[i]; var row = table.insertRow(-1); var nameEl = row.insertCell(-1); nameEl.style.paddingRight = "15px"; var nameText = share.grantee && share.grantee.name; if (share.isAll()) { nameText = ZmMsg.shareWithAll; } else if (share.isPublic()) { nameText = ZmMsg.shareWithPublic; } else if (share.isGuest()){ nameText = nameText || (share.grantee && share.grantee.id); } nameEl.innerHTML = AjxStringUtil.htmlEncode(nameText); var roleEl = row.insertCell(-1); roleEl.style.paddingRight = "15px"; roleEl.innerHTML = ZmShare.getRoleName(share.link.role); this.__createCmdCells(row, share); } this._sharesGroup.setElement(table); var width = Dwt.DEFAULT; var height = displayShares.length > 5 ? ZmFolderPropsDialog.SHARES_HEIGHT : Dwt.CLEAR; var insetElement = this._sharesGroup.getInsetHtmlElement(); Dwt.setScrollStyle(insetElement, Dwt.SCROLL); Dwt.setSize(insetElement, width, height); } this._sharesGroup.setVisible(displayShares.length > 0); }; ZmFolderPropsDialog.prototype.__createCmdCells = function(row, share) { var type = share.grantee.type; if (type == ZmShare.TYPE_DOMAIN || !share.link.role) { var cell = row.insertCell(-1); cell.colSpan = 3; cell.innerHTML = ZmMsg.configureWithAdmin; return; } var actions = [ZmShare.EDIT, ZmShare.REVOKE, ZmShare.RESEND]; var handlers = [this._handleEditShare, this._handleRevokeShare, this._handleResendShare]; for (var i = 0; i < actions.length; i++) { var action = actions[i]; var cell = row.insertCell(-1); // public shares have no editable fields, and sent no mail var isAllShare = share.grantee && (share.grantee.type == ZmShare.TYPE_ALL); if (((isAllShare || share.isPublic() || share.isGuest()) && (action == ZmShare.EDIT)) || ((isAllShare || share.isPublic()) && action == ZmShare.RESEND)) { continue; } var link = document.createElement("A"); link.href = "#"; link.innerHTML = ZmShare.ACTION_LABEL[action]; Dwt.setHandler(link, DwtEvent.ONCLICK, handlers[i]); Dwt.associateElementWithObject(link, share); cell.appendChild(link); } }; ZmFolderPropsDialog.prototype.addTab = function(index, id, tabViewPage) { if (!this._tabContainer || !tabViewPage) { return null; } this._tabViews[index] = tabViewPage; this._tabKeys[index] = this._tabContainer.addTab(tabViewPage.getTitle(), tabViewPage); this._tabInUse[index] = true; this._tabKeyMap[id] = index; return this._tabKeys[index]; }; ZmFolderPropsDialog.prototype._initializeTabView = function(view) { this._tabContainer = new DwtTabView(view, null, Dwt.STATIC_STYLE); //ZmFolderPropertyView handle things such as color and type. (in case you're searching for "color" and can't find in this file. I know I did) this.addTab(0, ZmFolderPropsDialog.TABKEY_PROPERTIES, new ZmFolderPropertyView(this, this._tabContainer)); this.addTab(1, ZmFolderPropsDialog.TABKEY_RETENTION, new ZmFolderRetentionView(this, this._tabContainer)); // setup shares group if (appCtxt.get(ZmSetting.SHARING_ENABLED)) { this._sharesGroup = new DwtGrouper(view, "DwtGrouper ZmFolderPropSharing"); this._sharesGroup.setLabel(ZmMsg.folderSharing); this._sharesGroup.setVisible(false); this._sharesGroup.setScrollStyle(Dwt.SCROLL); view.getHtmlElement().appendChild(this._sharesGroup.getHtmlElement()); } }; // This creates the tab views managed by this dialog, the tabToolbar, and // the share buttons and view components ZmFolderPropsDialog.prototype._createView = function() { this._baseContainerView = new DwtComposite({parent:this, className:"ZmFolderPropertiesDialog-container "}); this._initializeTabView(this._baseContainerView); this.setView(this._baseContainerView); };
nico01f/z-pec
ZimbraWebClient/WebRoot/js/zimbraMail/share/view/dialog/ZmFolderPropsDialog.js
JavaScript
mit
14,081
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2006, 2007, 2008, 2009, 2010 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.cs.util; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.Iterator; import java.util.Properties; import javax.mail.BodyPart; import javax.mail.MessagingException; import javax.mail.Part; import javax.mail.Session; import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMultipart; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.GnuParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import org.apache.commons.httpclient.Cookie; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.protocol.Protocol; import com.zimbra.common.account.Key.AccountBy; import com.zimbra.common.httpclient.HttpClientUtil; import com.zimbra.common.localconfig.LC; import com.zimbra.common.service.ServiceException; import com.zimbra.common.soap.AccountConstants; import com.zimbra.common.soap.AdminConstants; import com.zimbra.common.soap.Element; import com.zimbra.common.soap.MailConstants; import com.zimbra.common.soap.SoapFaultException; import com.zimbra.common.soap.SoapHttpTransport; import com.zimbra.common.util.BufferStream; import com.zimbra.common.util.ByteUtil; import com.zimbra.common.util.CliUtil; import com.zimbra.common.util.Log; import com.zimbra.common.util.LogFactory; import com.zimbra.common.util.ZimbraCookie; import com.zimbra.common.zmime.ZMimeMessage; import com.zimbra.common.zmime.ZSharedFileInputStream; import com.zimbra.cs.account.Account; import com.zimbra.cs.account.Config; import com.zimbra.cs.account.Provisioning; import com.zimbra.cs.account.Server; import com.zimbra.cs.service.mail.ItemAction; public class SpamExtract { private static Log mLog = LogFactory.getLog(SpamExtract.class); private static Options mOptions = new Options(); static { mOptions.addOption("s", "spam", false, "extract messages from configured spam mailbox"); mOptions.addOption("n", "notspam", false, "extract messages from configured notspam mailbox"); mOptions.addOption("m", "mailbox", true, "extract messages from specified mailbox"); mOptions.addOption("d", "delete", false, "delete extracted messages (default is to keep)"); mOptions.addOption("o", "outdir", true, "directory to store extracted messages"); mOptions.addOption("a", "admin", true, "admin user name for auth (default is zimbra_ldap_userdn)"); mOptions.addOption("p", "password", true, "admin password for auth (default is zimbra_ldap_password)"); mOptions.addOption("u", "url", true, "admin SOAP service url (default is target mailbox's server's admin service port)"); mOptions.addOption("q", "query", true, "search query whose results should be extracted (default is in:inbox)"); mOptions.addOption("r", "raw", false, "extract raw message (default: gets message/rfc822 attachments)"); mOptions.addOption("h", "help", false, "show this usage text"); mOptions.addOption("D", "debug", false, "enable debug level logging"); mOptions.addOption("v", "verbose", false, "be verbose while running"); } private static void usage(String errmsg) { if (errmsg != null) { mLog.error(errmsg); } HelpFormatter formatter = new HelpFormatter(); formatter.printHelp("zmspamextract [options] ", "where [options] are one of:", mOptions, "SpamExtract retrieve messages that may have been marked as spam or not spam in the Zimbra Web Client."); System.exit((errmsg == null) ? 0 : 1); } private static CommandLine parseArgs(String args[]) { CommandLineParser parser = new GnuParser(); CommandLine cl = null; try { cl = parser.parse(mOptions, args); } catch (ParseException pe) { usage(pe.getMessage()); } if (cl.hasOption("h")) { usage(null); } return cl; } private static boolean mVerbose = false; public static void main(String[] args) throws ServiceException, HttpException, SoapFaultException, IOException { CommandLine cl = parseArgs(args); if (cl.hasOption('D')) { CliUtil.toolSetup("DEBUG"); } else { CliUtil.toolSetup("INFO"); } if (cl.hasOption('v')) { mVerbose = true; } boolean optDelete = cl.hasOption('d'); if (!cl.hasOption('o')) { usage("must specify directory to extract messages to"); } String optDirectory = cl.getOptionValue('o'); File outputDirectory = new File(optDirectory); if (!outputDirectory.exists()) { mLog.info("Creating directory: " + optDirectory); outputDirectory.mkdirs(); if (!outputDirectory.exists()) { mLog.error("could not create directory " + optDirectory); System.exit(2); } } String optAdminUser; if (cl.hasOption('a')) { optAdminUser = cl.getOptionValue('a'); } else { optAdminUser = LC.zimbra_ldap_user.value(); } String optAdminPassword; if (cl.hasOption('p')) { optAdminPassword = cl.getOptionValue('p'); } else { optAdminPassword = LC.zimbra_ldap_password.value(); } String optQuery = "in:inbox"; if (cl.hasOption('q')) { optQuery = cl.getOptionValue('q'); } Account account = getAccount(cl); if (account == null) { System.exit(1); } boolean optRaw = cl.hasOption('r'); if (mVerbose) mLog.info("Extracting from account " + account.getName()); Server server = Provisioning.getInstance().getServer(account); String optAdminURL; if (cl.hasOption('u')) { optAdminURL = cl.getOptionValue('u'); } else { optAdminURL = getSoapURL(server, true); } String adminAuthToken = getAdminAuthToken(optAdminURL, optAdminUser, optAdminPassword); String authToken = getDelegateAuthToken(optAdminURL, account, adminAuthToken); extract(authToken, account, server, optQuery, outputDirectory, optDelete, optRaw); } public static final String TYPE_MESSAGE = "message"; private static void extract(String authToken, Account account, Server server, String query, File outdir, boolean delete, boolean raw) throws ServiceException, HttpException, SoapFaultException, IOException { String soapURL = getSoapURL(server, false); URL restURL = getServerURL(server, false); HttpClient hc = new HttpClient(); // CLI only, don't need conn mgr HttpState state = new HttpState(); GetMethod gm = new GetMethod(); gm.setFollowRedirects(true); Cookie authCookie = new Cookie(restURL.getHost(), ZimbraCookie.COOKIE_ZM_AUTH_TOKEN, authToken, "/", -1, false); state.addCookie(authCookie); hc.setState(state); hc.getHostConfiguration().setHost(restURL.getHost(), restURL.getPort(), Protocol.getProtocol(restURL.getProtocol())); gm.getParams().setSoTimeout(60000); if (mVerbose) mLog.info("Mailbox requests to: " + restURL); SoapHttpTransport transport = new SoapHttpTransport(soapURL); transport.setRetryCount(1); transport.setTimeout(0); transport.setAuthToken(authToken); int totalProcessed = 0; boolean haveMore = true; int offset = 0; while (haveMore) { Element searchReq = new Element.XMLElement(MailConstants.SEARCH_REQUEST); searchReq.addElement(MailConstants.A_QUERY).setText(query); searchReq.addAttribute(MailConstants.A_SEARCH_TYPES, TYPE_MESSAGE); searchReq.addAttribute(MailConstants.A_QUERY_OFFSET, offset); try { if (mLog.isDebugEnabled()) mLog.debug(searchReq.prettyPrint()); Element searchResp = transport.invoke(searchReq, false, true, account.getId()); if (mLog.isDebugEnabled()) mLog.debug(searchResp.prettyPrint()); StringBuilder deleteList = new StringBuilder(); for (Iterator<Element> iter = searchResp.elementIterator(MailConstants.E_MSG); iter.hasNext();) { offset++; Element e = iter.next(); String mid = e.getAttribute(MailConstants.A_ID); if (mid == null) { mLog.warn("null message id SOAP response"); continue; } String path = "/service/user/" + account.getName() + "/?id=" + mid; if (extractMessage(hc, gm, path, outdir, raw)) { deleteList.append(mid).append(','); } totalProcessed++; } haveMore = false; String more = searchResp.getAttribute(MailConstants.A_QUERY_MORE); if (more != null && more.length() > 0) { try { int m = Integer.parseInt(more); if (m > 0) { haveMore = true; } } catch (NumberFormatException nfe) { mLog.warn("more flag from server not a number: " + more, nfe); } } if (delete && deleteList.length() > 0) { deleteList.deleteCharAt(deleteList.length()-1); // -1 removes trailing comma Element msgActionReq = new Element.XMLElement(MailConstants.MSG_ACTION_REQUEST); Element action = msgActionReq.addElement(MailConstants.E_ACTION); action.addAttribute(MailConstants.A_ID, deleteList.toString()); action.addAttribute(MailConstants.A_OPERATION, ItemAction.OP_HARD_DELETE); if (mLog.isDebugEnabled()) mLog.debug(msgActionReq.prettyPrint()); Element msgActionResp = transport.invoke(msgActionReq, false, true, account.getId()); if (mLog.isDebugEnabled()) mLog.debug(msgActionResp.prettyPrint()); } } finally { gm.releaseConnection(); } } mLog.info("Total messages processed: " + totalProcessed); } private static Session mJMSession; private static String mOutputPrefix; static { Properties props = new Properties(); props.setProperty("mail.mime.address.strict", "false"); mJMSession = Session.getInstance(props); mOutputPrefix = Long.toHexString(System.currentTimeMillis()); } private static boolean extractMessage(HttpClient hc, GetMethod gm, String path, File outdir, boolean raw) { try { extractMessage0(hc, gm, path, outdir, raw); return true; } catch (MessagingException me) { mLog.warn("exception occurred fetching message", me); } catch (IOException ioe) { mLog.warn("exception occurred fetching message", ioe); } return false; } private static int mExtractIndex; private static final int MAX_BUFFER_SIZE = 10 * 1024 * 1024; private static void extractMessage0(HttpClient hc, GetMethod gm, String path, File outdir, boolean raw) throws IOException, MessagingException { gm.setPath(path); if (mLog.isDebugEnabled()) mLog.debug("Fetching " + path); HttpClientUtil.executeMethod(hc, gm); if (gm.getStatusCode() != HttpStatus.SC_OK) { throw new IOException("HTTP GET failed: " + gm.getPath() + ": " + gm.getStatusCode() + ": " + gm.getStatusText()); } if (raw) { // Write the message as-is. File file = new File(outdir, mOutputPrefix + "-" + mExtractIndex++); OutputStream os = null; try { os = new BufferedOutputStream(new FileOutputStream(file)); ByteUtil.copy(gm.getResponseBodyAsStream(), true, os, false); if (mVerbose) mLog.info("Wrote: " + file); } catch (java.io.IOException e) { String fileName = outdir + "/" + mOutputPrefix + "-" + mExtractIndex; mLog.error("Cannot write to " + fileName, e); } finally { if (os != null) os.close(); } return; } // Write the attached message to the output directory. BufferStream buffer = new BufferStream(gm.getResponseContentLength(), MAX_BUFFER_SIZE); buffer.setSequenced(false); MimeMessage mm = null; InputStream fis = null; try { ByteUtil.copy(gm.getResponseBodyAsStream(), true, buffer, false); if (buffer.isSpooled()) { fis = new ZSharedFileInputStream(buffer.getFile()); mm = new ZMimeMessage(mJMSession, fis); } else { mm = new ZMimeMessage(mJMSession, buffer.getInputStream()); } writeAttachedMessages(mm, outdir, gm.getPath()); } finally { ByteUtil.closeStream(fis); } } private static void writeAttachedMessages(MimeMessage mm, File outdir, String msgUri) throws IOException, MessagingException { // Not raw - ignore the spam report and extract messages that are in attachments... if (!(mm.getContent() instanceof MimeMultipart)) { mLog.warn("Spam/notspam messages must have attachments (skipping " + msgUri + ")"); return; } MimeMultipart mmp = (MimeMultipart)mm.getContent(); int nAttachments = mmp.getCount(); boolean foundAtleastOneAttachedMessage = false; for (int i = 0; i < nAttachments; i++) { BodyPart bp = mmp.getBodyPart(i); if (!bp.isMimeType("message/rfc822")) { // Let's ignore all parts that are not messages. continue; } foundAtleastOneAttachedMessage = true; Part msg = (Part) bp.getContent(); // the actual message File file = new File(outdir, mOutputPrefix + "-" + mExtractIndex++); OutputStream os = null; try { os = new BufferedOutputStream(new FileOutputStream(file)); msg.writeTo(os); } finally { os.close(); } if (mVerbose) mLog.info("Wrote: " + file); } if (!foundAtleastOneAttachedMessage) { String msgid = mm.getHeader("Message-ID", " "); mLog.warn("message uri=" + msgUri + " message-id=" + msgid + " had no attachments"); } } public static URL getServerURL(Server server, boolean admin) throws ServiceException { String host = server.getAttr(Provisioning.A_zimbraServiceHostname); if (host == null) { throw ServiceException.FAILURE("invalid " + Provisioning.A_zimbraServiceHostname + " in server " + server.getName(), null); } String protocol = "http"; String portAttr = Provisioning.A_zimbraMailPort; if (admin) { protocol = "https"; portAttr = Provisioning.A_zimbraAdminPort; } else { String mode = server.getAttr(Provisioning.A_zimbraMailMode); if (mode == null) { throw ServiceException.FAILURE("null " + Provisioning.A_zimbraMailMode + " in server " + server.getName(), null); } if (mode.equalsIgnoreCase("https")) { protocol = "https"; portAttr = Provisioning.A_zimbraMailSSLPort; } if (mode.equalsIgnoreCase("redirect")) { protocol = "https"; portAttr = Provisioning.A_zimbraMailSSLPort; } } int port = server.getIntAttr(portAttr, -1); if (port < 1) { throw ServiceException.FAILURE("invalid " + portAttr + " in server " + server.getName(), null); } try { return new URL(protocol, host, port, ""); } catch (MalformedURLException mue) { throw ServiceException.FAILURE("exception creating url (protocol=" + protocol + " host=" + host + " port=" + port + ")", mue); } } public static String getSoapURL(Server server, boolean admin) throws ServiceException { String url = getServerURL(server, admin).toString(); String file = admin ? AdminConstants.ADMIN_SERVICE_URI : AccountConstants.USER_SERVICE_URI; return url + file; } public static String getAdminAuthToken(String adminURL, String adminUser, String adminPassword) throws ServiceException { SoapHttpTransport transport = new SoapHttpTransport(adminURL); transport.setRetryCount(1); transport.setTimeout(0); Element authReq = new Element.XMLElement(AdminConstants.AUTH_REQUEST); authReq.addAttribute(AdminConstants.E_NAME, adminUser, Element.Disposition.CONTENT); authReq.addAttribute(AdminConstants.E_PASSWORD, adminPassword, Element.Disposition.CONTENT); try { if (mVerbose) mLog.info("Auth request to: " + adminURL); if (mLog.isDebugEnabled()) mLog.debug(authReq.prettyPrint()); Element authResp = transport.invokeWithoutSession(authReq); if (mLog.isDebugEnabled()) mLog.debug(authResp.prettyPrint()); String authToken = authResp.getAttribute(AdminConstants.E_AUTH_TOKEN); return authToken; } catch (Exception e) { throw ServiceException.FAILURE("admin auth failed url=" + adminURL, e); } } public static String getDelegateAuthToken(String adminURL, Account account, String adminAuthToken) throws ServiceException { SoapHttpTransport transport = new SoapHttpTransport(adminURL); transport.setRetryCount(1); transport.setTimeout(0); transport.setAuthToken(adminAuthToken); Element daReq = new Element.XMLElement(AdminConstants.DELEGATE_AUTH_REQUEST); Element acctElem = daReq.addElement(AdminConstants.E_ACCOUNT); acctElem.addAttribute(AdminConstants.A_BY, AdminConstants.BY_ID); acctElem.setText(account.getId()); try { if (mVerbose) mLog.info("Delegate auth request to: " + adminURL); if (mLog.isDebugEnabled()) mLog.debug(daReq.prettyPrint()); Element daResp = transport.invokeWithoutSession(daReq); if (mLog.isDebugEnabled()) mLog.debug(daResp.prettyPrint()); String authToken = daResp.getAttribute(AdminConstants.E_AUTH_TOKEN); return authToken; } catch (Exception e) { throw ServiceException.FAILURE("Delegate auth failed url=" + adminURL, e); } } private static Account getAccount(CommandLine cl) throws ServiceException { Provisioning prov = Provisioning.getInstance(); Config conf; try { conf = prov.getConfig(); } catch (ServiceException e) { throw ServiceException.FAILURE("Unable to connect to LDAP directory", e); } String name = null; if (cl.hasOption('s')) { if (cl.hasOption('n') || cl.hasOption('m')) { mLog.error("only one of s, n or m options can be specified"); return null; } name = conf.getAttr(Provisioning.A_zimbraSpamIsSpamAccount); if (name == null || name.length() == 0) { mLog.error("no account configured for spam"); return null; } } else if (cl.hasOption('n')) { if (cl.hasOption('m')) { mLog.error("only one of s, n, or m options can be specified"); return null; } name = conf.getAttr(Provisioning.A_zimbraSpamIsNotSpamAccount); if (name == null || name.length() == 0) { mLog.error("no account configured for ham"); return null; } } else if (cl.hasOption('m')) { name = cl.getOptionValue('m'); if (name.length() == 0) { mLog.error("illegal argument to m option"); return null; } } else { mLog.error("one of s, n or m options must be specified"); return null; } Account account = prov.get(AccountBy.name, name); if (account == null) { mLog.error("can not find account " + name); return null; } return account; } }
nico01f/z-pec
ZimbraServer/src/java/com/zimbra/cs/util/SpamExtract.java
Java
mit
21,891
using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace BookReviews.UI.Saga { public class OrderDetailsRequestSaga : SagaStateMachine<OrderDetailsRequestSaga>, ISaga { static OrderDetailsRequestSaga() { Define(Saga); } private static void Saga() { Correlate(RequestReceived) .By((saga, message) => saga.CustomerId == message.CustomerId && saga.OrderId == message.OrderId && saga.CurrentState == WaitingForResponse); Correlate(ResponseReceived) .By((saga, message) => saga.CustomerId == message.CustomerId && saga.OrderId == message.OrderId && saga.CurrentState == WaitingForResponse); public static State Initial { get; set; } public static State WaitingForResponse { get; set; } public static State Completed { get; set; } public static Event<RetrieveOrderDetails> RequestReceived { get; set; } public static Event<OrderDetailsResponse> ResponseReceived { get; set; } public static Event<OrderDetailsRequestFailed> RequestFailed { get; set; } Initially( When(RequestReceived) .Then((saga, request) => { saga.OrderId = request.OrderId; saga.CustomerId = request.CustomerId; }) .Publish((saga, request) => new SendOrderDetailsRequest { RequestId = saga.CorrelationId, CustomerId = saga.CustomerId, OrderId = saga.OrderId, }) .TransitionTo(WaitingForResponse)); During(WaitingForResponse, When(ResponseReceived) .Then((saga, response) => { saga.OrderCreated = response.Created; saga.OrderStatus = response.Status; }) .Publish((saga, request) => new OrderDetails { CustomerId = saga.CustomerId, OrderId = saga.OrderId, Created = saga.OrderCreated.Value, Status = saga.OrderStatus, }) .TransitionTo(Completed)); } public OrderDetailsRequestSaga(Guid correlationId) { CorrelationId = correlationId; } protected OrderDetailsRequestSaga() { } public virtual string CustomerId { get; set; } public virtual string OrderId { get; set; } public virtual OrderStatus OrderStatus { get; set; } public virtual DateTime? OrderCreated { get; set; } public virtual Guid CorrelationId { get; set; } public virtual IServiceBus Bus { get; set; } } //The rest of the saga class is shown above for completeness. //The properties are part of the saga and get saved when the saga is persisted //(using the NHibernate saga persister, or in the case of the sample the in-memory implementation). //The constructor with the Guid is used to initialize the saga when a new one is created, //the protected one is there for NHibernate to be able to persist the saga. } }
bob2000/BookReviews
BookReviews.UI/Saga/OrderDetailsRequestSaga.cs
C#
mit
3,007
ActiveRecord::Schema.define(:version => 1) do create_table :notes, :force => true do |t| t.string :title t.text :body end end
relax4u/jpvalidator
spec/schema.rb
Ruby
mit
139
var coords; var directionsDisplay; var map; var travelMode; var travelModeElement = $('#mode_travel'); // Order of operations for the trip planner (each function will have detailed notes): // 1) Calculate a user's route, with directions. // 2) Run a query using the route's max and min bounds to narrow potential results. // 3) Just because a marker is in the area of the route, it doesn't mean that it's on the route. // Use RouteBoxer to map sections of the route to markers, if applicable. Display only those markers on the map. // 4) The directions panel also isn't linked to a section of the route. // Use RouteBoxer to map a direction (turn left, right, etc) to part of the route. // 5) Build the custom directions panel by looping though each leg of the trip, finding the corresponding RouteBoxer // section, and use that to get markers for that section only. $(document).ready(function () { $('.active').toggleClass('active'); $('#trip-planner').toggleClass('active'); }); // Run these functions after setting geolocation. All except setFormDateTime() are dependent on geolocation to run. initGeolocation().then(function (coords) { map = mapGenerator(coords); setDirectionsDisplay(map); formListener(); }); // Instantiate directions methods on map. function setDirectionsDisplay(map) { directionsDisplay = new google.maps.DirectionsRenderer(); directionsDisplay.setMap(map); } // Listener for if the mode of travel is changed from an empty default to either bicycling or walking. function formListener() { travelModeElement.change(function(){ // Launch route calculation, markers, and directions panel. calcRoute(); }); } // Once the mode of travel is selected, start calculating routes and get marker data. function calcRoute() { var directionsService = new google.maps.DirectionsService(); var start = $('#start').val(); var end = $('#end').val(); travelMode = travelModeElement.val(); var request = { origin: start, destination: end, travelMode: google.maps.TravelMode[travelMode] }; directionsService.route(request, function (response, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(response); // Remove existing markers from the map and map object. removeMarkers(true); queryResults = getMarkers(response); // Check if results are along the route. if (queryResults.objects.length > 0) { // Filter the query results further by comparing coords with each route section. narrowResults(queryResults.objects, response); // If no query results, set the marker count to 0 and generate the directions panel. } else { response.routes[0].legs[0]['marker_count'] = 0; generateDirectionsPanel(response); } } }); } // Get markers near a route. This is done by getting the boundaries for the route as a whole and using those // as query params. function getMarkers(response){ var userType; if (travelMode == "BICYCLING") { userType = 1; } else { userType = 2; } // Build the query string, limiting the results for cyclists and pedestrians. var queryString = '/api/v1/hazard/?format=json&?user_type=' + userType; // Get the maximum and minimum lat/lon bounds for the route. // This will narrow the query to a box around the route as a whole. var routeBounds = getBounds(response.routes[0].bounds); // TODO(zemadi): Look up alternatives for building the querystring. //Build the querystring. Negative numbers require different greater/less than logic, // so testing for that here. if (routeBounds.lat1 >= 0 && routeBounds.lat2 >= 0) { queryString += '&lat__gte=' + routeBounds.lat1 + '&lat__lte=' + routeBounds.lat2; } else { queryString += '&lat__gte=' + routeBounds.lat2 + '&lat__lte=' + routeBounds.lat1; } if (routeBounds.lon1 >= 0 && routeBounds.lon2 >= 0) { queryString += '&lon__gte=' + routeBounds.lon1 + '&lon__lte=' + routeBounds.lon2; } else { queryString += '&lon__gte=' + routeBounds.lon2 + '&lon__lte=' + routeBounds.lon1; } return httpGet(queryString); } // Function to get coordinate boundaries from the Directions route callback. function getBounds(data) { var coordinateBounds = {}; var keyByIndex = Object.keys(data); coordinateBounds['lat1'] = data[keyByIndex[0]]['k']; coordinateBounds['lat2'] = data[keyByIndex[0]]['j']; coordinateBounds['lon1'] = data[keyByIndex[1]]['k']; coordinateBounds['lon2'] = data[keyByIndex[1]]['j']; return coordinateBounds; } // Reduce the query results further by checking if they're actually along a route. // In order for a data point to be on the route, the coordinates need to be between the values of a box in routeBoxer. // RouteBoxer chops up a route into sections and returns the upper and lower boundaries for that section of the route. // Refer to: http://google-maps-utility-library-v3.googlecode.com/svn/trunk/routeboxer/docs/examples.html function narrowResults(queryResults, directionsResponse) { // Variables needed for routeBoxer. var path = directionsResponse.routes[0].overview_path; var rboxer = new RouteBoxer(); var boxes = rboxer.box(path, .03); // Second param is a boundary in km from the route path. //Variables to hold mapData and match a marker to a specific section of the route. var mapData = {'objects': []}; // Object to hold routeBoxer index to markers map. var mapBoxesAndMarkers = {}; // For each section of the route, look through markers to see if any fit in the section's boundaries. // Using a for loop here because routeBoxer returns an array. for (var j = 0, b=boxes.length; j < b; j++) { // For each section of the route, record the index as a key and create an empty array to hold marker values. mapBoxesAndMarkers[j] = []; queryResults.forEach(function(result) { // If a marker is between the latitude and longitude bounds of the route, add it to the map and // the route-marker dict. var currentResult = new google.maps.LatLng(result.lat, result.lon); if (boxes[j].contains(currentResult)) { mapData.objects.push(result); mapBoxesAndMarkers[j].push(result); } }); } if (mapData.objects.length > 0) { // Add new markers to the map. markerGenerator(map, mapData); // Add the count of valid markers to the directionsResponse object, which is used to generate // the directions panel. If there are no markers, add 'None'. directionsResponse.routes[0].legs[0]['marker_count'] = mapData.objects.length; } else { directionsResponse.routes[0].legs[0]['marker_count'] = 'None'; } mapDirectionsToBoxes(boxes, directionsResponse, mapBoxesAndMarkers); } // Directions information also needs to be mapped to a section of the route. function mapDirectionsToBoxes(boxes, directionsResponse, mapBoxesAndMarkers){ var directions = directionsResponse.routes[0].legs[0].steps; // go through each step and set of lat lngs per step. directions.forEach(function(direction) { var routeBoxesinDirection = []; for (var l = 0, b=boxes.length; l < b; l++) { direction.lat_lngs.forEach(function(lat_lng) { // If the index isn't already in the array and the box contains the current route's lat and long, add the // index. if (routeBoxesinDirection.indexOf(l) === -1 && boxes[l].contains(lat_lng)) { routeBoxesinDirection.push(l); } }); } // Once we're done looping over route boxes for the current direction, lookup markers that have the same bounds. // A direction can have multiple route boxes so a list is being used here. direction['markers'] = []; routeBoxesinDirection.forEach(function(box) { if (mapBoxesAndMarkers[box].length > 0) { // Use the route box to look up arrays of markers to add to the directions object. direction['markers'].push.apply(direction['markers'], mapBoxesAndMarkers[box]); } }); }); generateDirectionsPanel(directionsResponse); } function generateDirectionsPanel(directionsResponse) { var directionsPanel = $('#directions-panel'); var directionsPanelHtml = $('#directions-panel-template').html(); var newSearchTrigger = $('#new-search-trigger'); var template = Handlebars.compile(directionsPanelHtml); var compiledDirectionsPanel = template(directionsResponse.routes[0].legs[0]); if (directionsPanel[0].children.length > 0) { directionsPanel[0].innerHTML = compiledDirectionsPanel; } else { directionsPanel.append(compiledDirectionsPanel); } // Close the trip planner form and display the directions panel. $('#trip-planner-form').addClass('closed'); directionsPanel.removeClass('closed'); newSearchTrigger.removeClass('hidden'); // Listen for a new search event, which shows the form and closes the directions panel. newSearchTrigger.click(function(){ directionsPanel.addClass('closed'); newSearchTrigger.addClass('hidden'); $('#trip-planner-form').removeClass('closed'); }); }
codeforsanjose/CycleSafe
app/static/js/trip_planner.js
JavaScript
mit
9,596
define(['backbone', 'marionette', 'mustache', 'jquery', 'text!templates/ctrldialog.html'], function(Backbone, Marionette, Mustache, $, template) { return Marionette.ItemView.extend({ initialize: function(options) { if (!options.icon_name) { options.icon_name = 'bird'; } this.model = new Backbone.Model( options ); this.render(); }, template: function(serialized_model) { return Mustache.render(template, serialized_model); }, ui: { 'ok': '.btn-ok', 'cancel': '.btn-cancel', 'dialog': '.dialog', 'close': '.dialog-close' }, events: { 'tap @ui.ok': 'onOk', 'tap @ui.cancel': 'onCancel', 'tap @ui.close': 'onCancel' }, onOk: function(ev) { this.trigger('ok'); this.destroy(); }, onCancel: function(ev) { this.trigger('cancel'); this.destroy(); }, onRender: function() { $('body').append(this.$el); this.ui.dialog.css({ 'marginTop': 0 - this.ui.dialog.height()/2 }); this.ui.dialog.addClass('bounceInDown animated'); }, onDestory: function() { this.$el.remove(); this.model.destroy(); }, className: 'dialogContainer' }); });
yoniji/ApeRulerDemo
app/modules/ctrls/CtrlDialogView.js
JavaScript
mit
1,645
export * from './alert.service'; export * from './authentication.service'; export * from './user.service'; export * from './serviceRequest.service';
JacksonLee2019/CS341-VolunteerSchedule
app/_services/index.ts
TypeScript
mit
151
import { InvalidArgumentError } from '../errors/InvalidArgumentError'; import { NotImplementedError } from '../errors/NotImplementedError'; import mustache from 'mustache'; import '../utils/Function'; // The base class for a control export class Control { // The constructor of a control // id: The id of the control // template: The template used for rendering the control // localCSS: An object whose properties are CSS class names and whose values are the localized CSS class names // The control will change the matching CSS class names in the templates. constructor(id, template, localCSS) { if (typeof id !== 'string' || !isNaN(id)) { throw new InvalidArgumentError('Cannot create the control because the id is not a string'); } if (id.length < 1) { throw new InvalidArgumentError('Cannot create the control because the id is not a non-empty string'); } if (null === template || undefined === template) { throw new InvalidArgumentError('Cannot create the control because the template cannot be null or undefined'); } if (typeof template !== 'string') { throw new InvalidArgumentError('Cannot create the control because the template is not a string'); } this.id = id; this.template = template; if (template && localCSS) { // localize the CSS class names in the templates for (const oCN in localCSS) { const nCN = localCSS[oCN]; this.template = this.template .replace(new RegExp(`class="${oCN}"`, 'gi'), `class="${nCN}"`) .replace(new RegExp(`class='${oCN}'`, 'gi'), `class='${nCN}'`); } } this.controls = {}; } // Adds a child control to the control // control: The Control instance addControl(control) { if (!(control instanceof Control)) { throw new InvalidArgumentError('Cannot add sub-control because it is invalid'); } this.controls[control.id] = control; } // Removes a child control from the control // val: Either a controlId or a Control instance removeControl(val) { if (val instanceof Control) { delete this.controls[val.id]; } else { delete this.controls[val]; } } // Renders the control (and all its contained controls) // data: The object that contains the data to substitute into the template // eventObj: Event related data for the event that caused the control to render render(data, eventObj) { if (this.controls) { const controlData = {}; for (let controlId in this.controls) { const control = this.controls[controlId]; controlData[control.constructor.getConstructorName()] = {}; controlData[control.constructor.getConstructorName()][control.id] = control.render(data, eventObj); } for (let key in controlData) { data[key] = controlData[key]; } } return mustache.render(this.template, data); } // This method is invoked so the control can bind events after the DOM has been updated // domContainerElement: The DOM container element into which the control was rendered // eventObj: Event related data for the event that caused the control to render onDOMUpdated(domContainerElement, eventObj) { if (this.onDOMUpdatedNotification) { this.onDOMUpdatedNotification(domContainerElement, eventObj); } if (this.controls) { for (let controlId in this.controls) { const control = this.controls[controlId]; control.onDOMUpdated(domContainerElement, eventObj); } } } // The Control classes that extend this type can add custom logic here to be executed after the domContainerElement // has been updated // domContainerElement: The DOM container element into which the control was rendered // eventObj: Event related data for the event that caused the control to render onDOMUpdatedNotification(domContainerElement, eventObj) { } };
kmati/affront
lib/Control/index.js
JavaScript
mit
3,736
using System.Collections.Generic; using System.Diagnostics; using System.Runtime.Serialization; namespace AutoHelp.domain.Models { [DebuggerDisplay("{Fullname}")] [DataContract] public class Method : CodeCommentBase { [DataMember] public string ReturnType { get; set; } [DataMember] public string ReturnTypeFullName { get; set; } public Method() { Parameters = new List<Parameter>(); } } }
RaynaldM/autohelp
AutoHelp.domain/Models/Method.cs
C#
mit
482
'use strict'; /* jasmine specs for filters go here */ describe('filter', function() { });
LeoAref/angular-seed
test/unit/filtersSpec.js
JavaScript
mit
93
<div id="contenido"> <div class="bloque"> <h2 class="titulo"><strong>Contacto</strong></h2> <p>Rellene el siguiente formulario si desea ponerse en contacto.</p> <?php if(!empty($estado)){ echo $estado; } ?> <form action="contacto/" method="post"> <fieldset> <legend>Datos</legend> <p> <label for="nombre" title="Nombre"><strong>Nombre </strong></label> <input id="nombre" name="nombre" type="text" value="<?php echo $nombre; ?>" size="50" maxlength="40" /> <em>Ejemplo: Pepe</em> </p> <p> <label for="email" title="Email"><strong>Email </strong></label> <input id="email" name="email" type="text" value="<?php echo $email; ?>" size="50" maxlength="320" /> <em>Ejemplo: ejemplo@ejemplo.es</em> </p> <p> <label for="asunto" title="Asunto"><strong>Asunto </strong></label> <input id="asunto" name="asunto" type="text" value="<?php echo $asunto; ?>" size="50" maxlength="50" /> </p> <p> <label for="mensaje" title="Mensaje"><strong>Mensaje </strong></label> <textarea id="mensaje" name="mensaje" rows="7" cols="40"><?php echo $mensaje; ?></textarea> </p> <p> <label for="humano" title="Humano ó Maquina"><strong>¿Eres humano? </strong></label> <input id="humano" name="humano" type="text" value="0" size="5" maxlength="5" /> <?php echo $captcha["pregunta"]; ?> </p> <p><input id="enviar" name="enviar" type="submit" value="Enviar" /></p> </fieldset> </form> </div> </div>
jh2odo/mfp5-mvc
demo/app/vistas/inicio/contacto.php
PHP
mit
1,496
/* * Copyright (c) 2015 Cryptonomex, Inc., and contributors. * * The MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include <graphene/chain/account_object.hpp> #include <graphene/chain/asset_object.hpp> #include <graphene/chain/market_object.hpp> #include <graphene/chain/market_evaluator.hpp> #include <graphene/chain/database.hpp> #include <graphene/chain/exceptions.hpp> #include <graphene/chain/hardfork.hpp> #include <graphene/chain/is_authorized_asset.hpp> #include <graphene/chain/protocol/market.hpp> #include <fc/uint128.hpp> namespace graphene { namespace chain { void_result limit_order_create_evaluator::do_evaluate(const limit_order_create_operation& op) { try { // Disable Operation Temporary FC_ASSERT( false, "Limit order create operation is not supported for now."); const database& d = db(); FC_ASSERT( d.head_block_time() < HARDFORK_1_TIME ); FC_ASSERT( op.expiration >= d.head_block_time() ); _seller = this->fee_paying_account; _sell_asset = &op.amount_to_sell.asset_id(d); _receive_asset = &op.min_to_receive.asset_id(d); if( _sell_asset->options.whitelist_markets.size() ) FC_ASSERT( _sell_asset->options.whitelist_markets.find(_receive_asset->id) != _sell_asset->options.whitelist_markets.end() ); if( _sell_asset->options.blacklist_markets.size() ) FC_ASSERT( _sell_asset->options.blacklist_markets.find(_receive_asset->id) == _sell_asset->options.blacklist_markets.end() ); FC_ASSERT( is_authorized_asset( d, *_seller, *_sell_asset ) ); FC_ASSERT( is_authorized_asset( d, *_seller, *_receive_asset ) ); FC_ASSERT( d.get_balance( *_seller, *_sell_asset ) >= op.amount_to_sell, "insufficient balance", ("balance",d.get_balance(*_seller,*_sell_asset))("amount_to_sell",op.amount_to_sell) ); return void_result(); } FC_CAPTURE_AND_RETHROW( (op) ) } void limit_order_create_evaluator::pay_fee() { _deferred_fee = core_fee_paid; } object_id_type limit_order_create_evaluator::do_apply(const limit_order_create_operation& op) { try { const auto& seller_stats = _seller->statistics(db()); db().modify(seller_stats, [&](account_statistics_object& bal) { if( op.amount_to_sell.asset_id == asset_id_type() ) { bal.total_core_in_orders += op.amount_to_sell.amount; } }); db().adjust_balance(op.seller, -op.amount_to_sell); const auto& new_order_object = db().create<limit_order_object>([&](limit_order_object& obj){ obj.seller = _seller->id; obj.for_sale = op.amount_to_sell.amount; obj.sell_price = op.get_price(); obj.expiration = op.expiration; obj.deferred_fee = _deferred_fee; }); limit_order_id_type order_id = new_order_object.id; // save this because we may remove the object by filling it bool filled = db().apply_order(new_order_object); FC_ASSERT( !op.fill_or_kill || filled ); return order_id; } FC_CAPTURE_AND_RETHROW( (op) ) } void_result limit_order_cancel_evaluator::do_evaluate(const limit_order_cancel_operation& o) { try { database& d = db(); FC_ASSERT( d.head_block_time() < HARDFORK_1_TIME ); _order = &o.order(d); FC_ASSERT( _order->seller == o.fee_paying_account ); return void_result(); } FC_CAPTURE_AND_RETHROW( (o) ) } asset limit_order_cancel_evaluator::do_apply(const limit_order_cancel_operation& o) { try { database& d = db(); auto base_asset = _order->sell_price.base.asset_id; auto quote_asset = _order->sell_price.quote.asset_id; auto refunded = _order->amount_for_sale(); d.cancel_order(*_order, false /* don't create a virtual op*/); // Possible optimization: order can be called by canceling a limit order iff the canceled order was at the top of the book. // Do I need to check calls in both assets? d.check_call_orders(base_asset(d)); d.check_call_orders(quote_asset(d)); return refunded; } FC_CAPTURE_AND_RETHROW( (o) ) } void_result call_order_update_evaluator::do_evaluate(const call_order_update_operation& o) { try { database& d = db(); FC_ASSERT( d.head_block_time() < HARDFORK_1_TIME ); _paying_account = &o.funding_account(d); _debt_asset = &o.delta_debt.asset_id(d); FC_ASSERT( _debt_asset->is_market_issued(), "Unable to cover ${sym} as it is not a collateralized asset.", ("sym", _debt_asset->symbol) ); _bitasset_data = &_debt_asset->bitasset_data(d); /// if there is a settlement for this asset, then no further margin positions may be taken and /// all existing margin positions should have been closed va database::globally_settle_asset FC_ASSERT( !_bitasset_data->has_settlement() ); FC_ASSERT( o.delta_collateral.asset_id == _bitasset_data->options.short_backing_asset ); if( _bitasset_data->is_prediction_market ) FC_ASSERT( o.delta_collateral.amount == o.delta_debt.amount ); else if( _bitasset_data->current_feed.settlement_price.is_null() ) FC_THROW_EXCEPTION(insufficient_feeds, "Cannot borrow asset with no price feed."); if( o.delta_debt.amount < 0 ) { FC_ASSERT( d.get_balance(*_paying_account, *_debt_asset) >= o.delta_debt, "Cannot cover by ${c} when payer only has ${b}", ("c", o.delta_debt.amount)("b", d.get_balance(*_paying_account, *_debt_asset).amount) ); } if( o.delta_collateral.amount > 0 ) { FC_ASSERT( d.get_balance(*_paying_account, _bitasset_data->options.short_backing_asset(d)) >= o.delta_collateral, "Cannot increase collateral by ${c} when payer only has ${b}", ("c", o.delta_collateral.amount) ("b", d.get_balance(*_paying_account, o.delta_collateral.asset_id(d)).amount) ); } return void_result(); } FC_CAPTURE_AND_RETHROW( (o) ) } void_result call_order_update_evaluator::do_apply(const call_order_update_operation& o) { try { FC_ASSERT( false, "Call order update operation is not supported for now."); database& d = db(); if( o.delta_debt.amount != 0 ) { d.adjust_balance( o.funding_account, o.delta_debt ); // Deduct the debt paid from the total supply of the debt asset. d.modify(_debt_asset->dynamic_asset_data_id(d), [&](asset_dynamic_data_object& dynamic_asset) { dynamic_asset.current_supply += o.delta_debt.amount; assert(dynamic_asset.current_supply >= 0); }); } if( o.delta_collateral.amount != 0 ) { d.adjust_balance( o.funding_account, -o.delta_collateral ); // Adjust the total core in orders accodingly if( o.delta_collateral.asset_id == asset_id_type() ) { d.modify(_paying_account->statistics(d), [&](account_statistics_object& stats) { stats.total_core_in_orders += o.delta_collateral.amount; }); } } auto& call_idx = d.get_index_type<call_order_index>().indices().get<by_account>(); auto itr = call_idx.find( boost::make_tuple(o.funding_account, o.delta_debt.asset_id) ); const call_order_object* call_obj = nullptr; if( itr == call_idx.end() ) { FC_ASSERT( o.delta_collateral.amount > 0 ); FC_ASSERT( o.delta_debt.amount > 0 ); call_obj = &d.create<call_order_object>( [&](call_order_object& call ){ call.borrower = o.funding_account; call.collateral = o.delta_collateral.amount; call.debt = o.delta_debt.amount; call.call_price = price::call_price(o.delta_debt, o.delta_collateral, _bitasset_data->current_feed.maintenance_collateral_ratio); }); } else { call_obj = &*itr; d.modify( *call_obj, [&]( call_order_object& call ){ call.collateral += o.delta_collateral.amount; call.debt += o.delta_debt.amount; if( call.debt > 0 ) { call.call_price = price::call_price(call.get_debt(), call.get_collateral(), _bitasset_data->current_feed.maintenance_collateral_ratio); } }); } auto debt = call_obj->get_debt(); if( debt.amount == 0 ) { FC_ASSERT( call_obj->collateral == 0 ); d.remove( *call_obj ); return void_result(); } FC_ASSERT(call_obj->collateral > 0 && call_obj->debt > 0); // then we must check for margin calls and other issues if( !_bitasset_data->is_prediction_market ) { call_order_id_type call_order_id = call_obj->id; // check to see if the order needs to be margin called now, but don't allow black swans and require there to be // limit orders available that could be used to fill the order. if( d.check_call_orders( *_debt_asset, false ) ) { const auto call_obj = d.find(call_order_id); // if we filled at least one call order, we are OK if we totally filled. GRAPHENE_ASSERT( !call_obj, call_order_update_unfilled_margin_call, "Updating call order would trigger a margin call that cannot be fully filled", ("a", ~call_obj->call_price )("b", _bitasset_data->current_feed.settlement_price) ); } else { const auto call_obj = d.find(call_order_id); FC_ASSERT( call_obj, "no margin call was executed and yet the call object was deleted" ); //edump( (~call_obj->call_price) ("<")( _bitasset_data->current_feed.settlement_price) ); // We didn't fill any call orders. This may be because we // aren't in margin call territory, or it may be because there // were no matching orders. In the latter case, we throw. GRAPHENE_ASSERT( ~call_obj->call_price < _bitasset_data->current_feed.settlement_price, call_order_update_unfilled_margin_call, "Updating call order would trigger a margin call that cannot be fully filled", ("a", ~call_obj->call_price )("b", _bitasset_data->current_feed.settlement_price) ); } } return void_result(); } FC_CAPTURE_AND_RETHROW( (o) ) } } } // graphene::chain
bitsuperlab/cpp-play2
libraries/chain/market_evaluator.cpp
C++
mit
11,139
using System; using System.Collections.Generic; using System.Linq; using System.Reactive.Linq; using System.Threading.Tasks; using Chromamboo.Contracts; using Newtonsoft.Json.Linq; namespace Chromamboo.Providers.Notification { public class AtlassianCiSuiteBuildStatusNotificationProvider : INotificationProvider<string> { private readonly IBitbucketApi bitbucketApi; private readonly IBambooApi bambooApi; private readonly IPresentationService presentationService; public AtlassianCiSuiteBuildStatusNotificationProvider(IBitbucketApi bitbucketApi, IBambooApi bambooApi, IPresentationService presentationService) { this.bitbucketApi = bitbucketApi; this.bambooApi = bambooApi; this.presentationService = presentationService; } public enum NotificationType { Build, PullRequest } public void Register(string planKey) { Observable .Timer(DateTimeOffset.MinValue, TimeSpan.FromSeconds(5)) .Subscribe(async l => { await this.PerformPollingAction(planKey); }); } private async Task PerformPollingAction(string planKey) { List<BuildDetail> buildsDetails; try { var latestHistoryBuild = this.bambooApi.GetLatestBuildResultsInHistoryAsync(planKey); var branchesListing = this.bambooApi.GetLastBuildResultsWithBranchesAsync(planKey); var isDevelopSuccessful = JObject.Parse(latestHistoryBuild.Result)["results"]["result"].First()["state"].Value<string>() == "Successful"; var lastBuiltBranches = JObject.Parse(branchesListing.Result); buildsDetails = lastBuiltBranches["branches"]["branch"].Where(b => b["enabled"].Value<bool>()).Select(this.GetBuildDetails).ToList(); if (!isDevelopSuccessful) { var developDetails = this.bambooApi.GetBuildResultsAsync(JObject.Parse(latestHistoryBuild.Result)["results"]["result"].First()["planResultKey"]["key"].Value<string>()); var developBuildDetails = this.ConstructBuildDetails(developDetails.Result); buildsDetails.Add(developBuildDetails); } } catch (Exception e) { this.presentationService.MarkAsInconclusive(NotificationType.Build); Console.WriteLine(e.GetType() + ": " + e.Message); return; } this.presentationService.Update(buildsDetails); } private BuildDetail GetBuildDetails(JToken jsonToken) { var key = jsonToken["key"].Value<string>(); var latestBuildKeyInPlan = JObject.Parse(this.bambooApi.GetLastBuildFromBranchPlan(key).Result)["results"]["result"].First()["buildResultKey"].Value<string>(); var buildDetailsString = this.bambooApi.GetBuildDetailsAsync(latestBuildKeyInPlan).Result; var buildDetails = this.ConstructBuildDetails(buildDetailsString); buildDetails.BranchName = jsonToken["shortName"].Value<string>(); return buildDetails; } private BuildDetail ConstructBuildDetails(string buildDetailsString) { var details = JObject.Parse(buildDetailsString); var buildDetails = new BuildDetail(); buildDetails.CommitHash = details["vcsRevisionKey"].Value<string>(); buildDetails.Successful = details["successful"].Value<bool>(); buildDetails.BuildResultKey = details["buildResultKey"].Value<string>(); buildDetails.PlanResultKey = details["planResultKey"]["key"].Value<string>(); var commitDetails = JObject.Parse(this.bitbucketApi.GetCommitDetails(buildDetails.CommitHash).Result); buildDetails.JiraIssue = commitDetails["properties"]?["jira-key"].Values<string>().Aggregate((s1, s2) => s1 + ", " + s2); buildDetails.AuthorEmailAddress = commitDetails["author"]["emailAddress"].Value<string>(); buildDetails.AuthorName = commitDetails["author"]["name"].Value<string>(); buildDetails.AuthorDisplayName = commitDetails["author"]["displayName"]?.Value<string>() ?? buildDetails.AuthorName; return buildDetails; } } }
duvaneljulien/chromamboo
src/Chromamboo/Providers/Notification/AtlassianCiSuiteBuildStatusNotificationProvider.cs
C#
mit
4,569
namespace SupermarketsChainDB.Data.Migrations { using System; using System.Collections.Generic; using System.Linq; using Oracle.DataAccess.Client; using SupermarketsChainDB.Data; using SupermarketsChainDB.Models; public static class OracleToSqlDb { private static string ConnectionString = Connection.GetOracleConnectionString(); private static OracleConnection con; public static void MigrateToSql() { MigrateMeasures(); MigrateVendors(); MigrateProducts(); } private static void Connect() { var con = new OracleConnection(); if (OracleConnection.IsAvailable) { con.ConnectionString = "context connection=true"; } else { con = new OracleConnection { ConnectionString = ConnectionString }; con.Open(); Console.WriteLine("Connected to Oracle" + con.ServerVersion); } } private static void MigrateMeasures() { SupermarketSystemData data = new SupermarketSystemData(); con = new OracleConnection { ConnectionString = ConnectionString }; con.Open(); OracleCommand cmd = con.CreateCommand(); cmd.CommandText = "SELECT M_ID, MEASURE_NAME FROM MEASURE_UNITS"; using (OracleDataReader reader = cmd.ExecuteReader()) { var lastMeasure = data.Measures.All().OrderByDescending(v => v.Id).FirstOrDefault(); int dataId = 0; if (lastMeasure != null) { dataId = lastMeasure.Id; } while (reader.Read()) { int measureId = int.Parse(reader["M_ID"].ToString()); if (dataId < measureId) { Measure measure = new Measure(); measure.Id = measureId; measure.MeasureName = (string)reader["MEASURE_NAME"]; data.Measures.Add(measure); } } data.SaveChanges(); } Close(); } private static void MigrateVendors() { SupermarketSystemData data = new SupermarketSystemData(); con = new OracleConnection { ConnectionString = ConnectionString }; con.Open(); OracleCommand cmd = con.CreateCommand(); cmd.CommandText = "SELECT V_ID,VENDOR_NAME FROM VENDORS"; using (OracleDataReader reader = cmd.ExecuteReader()) { var lastVendor = data.Vendors.All().OrderByDescending(v => v.Id).FirstOrDefault(); int dataId = 0; if (lastVendor != null) { dataId = lastVendor.Id; } while (reader.Read()) { int vendorId = int.Parse(reader["V_ID"].ToString()); if (dataId < vendorId) { Vendor vendor = new Vendor(); vendor.Id = vendorId; vendor.VendorName = (string)reader["VENDOR_NAME"]; data.Vendors.Add(vendor); } } data.SaveChanges(); } Close(); } private static void MigrateProducts() { SupermarketSystemData data = new SupermarketSystemData(); con = new OracleConnection { ConnectionString = ConnectionString }; con.Open(); OracleCommand cmd = con.CreateCommand(); cmd.CommandText = "SELECT P_ID, " + "VENDOR_ID," + "PRODUCT_NAME, " + "MEASURE_ID, " + "PRICE, " + "PRODUCT_TYPE " + "FROM PRODUCTS"; using (OracleDataReader reader = cmd.ExecuteReader()) { var lastProduct = data.Products.All().OrderByDescending(p => p.Id).FirstOrDefault(); int dataId = 0; if (lastProduct != null) { dataId = lastProduct.Id; } while (reader.Read()) { int productId = int.Parse(reader["P_ID"].ToString()); if (dataId < productId) { Product product = new Product(); // for debugging product.Id = productId; product.VendorId = int.Parse(reader["VENDOR_ID"].ToString()); product.ProductName = reader["PRODUCT_NAME"].ToString(); product.MeasureId = int.Parse(reader["MEASURE_ID"].ToString()); product.Price = decimal.Parse(reader["PRICE"].ToString()); product.ProductType = (ProductType)Enum.Parse(typeof(ProductType), reader["PRODUCT_TYPE"].ToString()); data.Products.Add(product); } } data.SaveChanges(); } Close(); } private static void Close() { con.Close(); con.Dispose(); } } }
ttittoOrg/SupermarketsChainDB
SupermarketsChainDB/SupermarketsChainDB.Data/Migrations/OracleToSqlDb.cs
C#
mit
5,619
class ApplicationController < ActionController::Base protect_from_forgery with: :exception helper_method :current_user def current_user @current_user ||= User.find(session[:user_id]) if session[:user_id] end def require_login render_404 unless current_user end private def render_404 raise ActionController::RoutingError.new('Not Found') end end
mk12/great-reads
app/controllers/application_controller.rb
Ruby
mit
380
import { Injectable } from '@angular/core'; import { SyncResult } from 'app/model/syncResult' import { Log } from 'app/model/log' import { LogItem } from 'app/model/logItem' @Injectable() export class SyncResultService { syncResultService : any; constructor() { this.syncResultService = (window as any).syncResultService; } // TODO cache // TODO should be ab // TODO shouldnt be needed, drop isSuccess() : boolean { var success; var syncResults = this.syncResultService.getResults(); if (syncResults.length > 0) { success = true; for (var i = 0; i < syncResults.length; i++) { var syncResult = syncResults[i]; success &= syncResult.success; } } else { success = false; } return success; } // TODO cache // TODO move translation into shared service getResults() : SyncResult[] { var results = []; var syncResults = this.syncResultService.getResults(); // Translate each result for (var i = 0; i < syncResults.length; i++) { var syncResult = syncResults[i]; var result = new SyncResult(); result.profileId = syncResult.getProfileId(); result.hostName = syncResult.getHostName(); // Translate merge log var log = syncResult.getLog(); if (log != null) { var logItems = log.getLogItems(); // Translate log items of each result var jsonLog = new Log(); var items = []; for (var j = 0; j < logItems.length; j++) { var logItem = logItems[j]; var item = new LogItem(); item.level = logItem.getLevel().toString(); item.local = logItem.isLocal(); item.text = logItem.getText(); items.push(item); } jsonLog.items = items; result.log = jsonLog; } results.push(result); } return results; } clear() { this.syncResultService.clear(); } getResultsAsText() { return this.syncResultService.getResultsAsText(); } }
limpygnome/parrot-manager
parrot-manager-frontend/src/app/service/syncResult.service.ts
TypeScript
mit
2,422
import * as React from 'react'; import { StandardProps } from '..'; export interface TableProps extends StandardProps<TableBaseProps, TableClassKey> { component?: React.ReactType<TableBaseProps>; } export type TableBaseProps = React.TableHTMLAttributes<HTMLTableElement>; export type TableClassKey = 'root'; declare const Table: React.ComponentType<TableProps>; export default Table;
cherniavskii/material-ui
packages/material-ui/src/Table/Table.d.ts
TypeScript
mit
391
hmm = [ "https://media3.giphy.com/media/TPl5N4Ci49ZQY/giphy.gif", "https://media0.giphy.com/media/l14qxlCgJ0zUk/giphy.gif", "https://media4.giphy.com/media/MsWnkCVSXz73i/giphy.gif", "https://media1.giphy.com/media/l2JJEIMLgrXPEbDGM/giphy.gif", "https://media0.giphy.com/media/dgK22exekwOLm/giphy.gif" ]
garr741/mr_meeseeks
rtmbot/plugins/hmm.py
Python
mit
322
/** * Most of this code is adapated from https://github.com/qimingweng/react-modal-dialog */ import React from 'react'; import ReactDOM from 'react-dom'; import EventStack from './EventStack'; import PropTypes from 'prop-types'; const ESCAPE = 27; /** * Get the keycode from an event * @param {Event} event The browser event from which we want the keycode from * @returns {Number} The number of the keycode */ const getKeyCodeFromEvent = event => event.which || event.keyCode || event.charCode; // Render into subtree is necessary for parent contexts to transfer over // For example, for react-router const renderSubtreeIntoContainer = ReactDOM.unstable_renderSubtreeIntoContainer; export class ModalContent extends React.Component { constructor(props) { super(props); this.handleGlobalClick = this.handleGlobalClick.bind(this); this.handleGlobalKeydown = this.handleGlobalKeydown.bind(this); } componentWillMount() { /** * This is done in the componentWillMount instead of the componentDidMount * because this way, a modal that is a child of another will have register * for events after its parent */ this.eventToken = EventStack.addListenable([ ['click', this.handleGlobalClick], ['keydown', this.handleGlobalKeydown] ]); } componentWillUnmount() { EventStack.removeListenable(this.eventToken); } shouldClickDismiss(event) { const { target } = event; // This piece of code isolates targets which are fake clicked by things // like file-drop handlers if (target.tagName === 'INPUT' && target.type === 'file') { return false; } if (!this.props.dismissOnBackgroundClick) { if (target !== this.refs.self || this.refs.self.contains(target)) { return false; } } else { if (target === this.refs.self || this.refs.self.contains(target)) { return false; } } return true; } handleGlobalClick(event) { if (this.shouldClickDismiss(event)) { if (typeof this.props.onClose === 'function') { this.props.onClose(event); } } } handleGlobalKeydown(event) { if (getKeyCodeFromEvent(event) === ESCAPE) { if (typeof this.props.onClose === 'function') { this.props.onClose(event); } } } render() { return ( <div ref="self" className={'liq_modal-content'}> {this.props.showButton && this.props.onClose ? ( <button onClick={this.props.onClose} className={'liq_modal-close'} data-test="close_modal_button"> <span aria-hidden="true">{'×'}</span> </button> ) : null} {this.props.children} </div> ); } } ModalContent.propTypes = { showButton: PropTypes.bool, onClose: PropTypes.func, // required for the close button className: PropTypes.string, children: PropTypes.node, dismissOnBackgroundClick: PropTypes.bool }; ModalContent.defaultProps = { dismissOnBackgroundClick: true, showButton: true }; export class ModalPortal extends React.Component { componentDidMount() { // disable scrolling on body document.body.classList.add('liq_modal-open'); // Create a div and append it to the body this._target = document.body.appendChild(document.createElement('div')); // Mount a component on that div this._component = renderSubtreeIntoContainer( this, this.props.children, this._target ); // A handler call in case you want to do something when a modal opens, like add a class to the body or something if (typeof this.props.onModalDidMount === 'function') { this.props.onModalDidMount(); } } componentDidUpdate() { // When the child component updates, we have to make sure the content rendered to the DOM is updated to this._component = renderSubtreeIntoContainer( this, this.props.children, this._target ); } componentWillUnmount() { /** * Let this be some discussion about fading out the components on unmount. * Right now, there is the issue that if a stack of components are layered * on top of each other, and you programmatically dismiss the bottom one, * it actually takes some time for the animation to catch up to the top one, * because each modal doesn't send a dismiss signal to its children until * it itself is totally gone... */ // TODO: REMOVE THIS - THINK OUT OF THE BOX const done = () => { // Modal will unmount now // Call a handler, like onModalDidMount if (typeof this.props.onModalWillUnmount === 'function') { this.props.onModalWillUnmount(); } // Remove the node and clean up after the target ReactDOM.unmountComponentAtNode(this._target); document.body.removeChild(this._target); document.body.classList.remove('liq_modal-open'); }; // A similar API to react-transition-group if ( this._component && typeof this._component.componentWillLeave === 'function' ) { // Pass the callback to be called on completion this._component.componentWillLeave(done); } else { // Call completion immediately done(); } } render() { return null; } // This doesn't actually return anything to render } ModalPortal.propTypes = { onClose: PropTypes.func, // This is called when the dialog should close children: PropTypes.node, onModalDidMount: PropTypes.func, // optional, called on mount onModalWillUnmount: PropTypes.func // optional, called on unmount }; export class ModalBackground extends React.Component { constructor(props) { super(props); this.state = { // This is set to false as soon as the component has mounted // This allows the component to change its css and animate in transparent: true }; } componentDidMount() { // Create a delay so CSS will animate requestAnimationFrame(() => this.setState({ transparent: false })); } componentWillLeave(callback) { this.setState({ transparent: true, componentIsLeaving: true }); // There isn't a good way to figure out what the duration is exactly, // because parts of the animation are carried out in CSS... setTimeout(() => { callback(); }, this.props.duration); } render() { const { transparent } = this.state; const overlayStyle = { opacity: transparent ? 0 : 0.6 }; const containerStyle = { opacity: transparent ? 0 : 1 }; return ( <div className={'liq_modal-background'} style={{ zIndex: this.props.zIndex }}> <div style={overlayStyle} className={'liq_modal-background__overlay'} /> <div style={containerStyle} className={'liq_modal-background__container'}> {this.props.children} </div> </div> ); } } ModalBackground.defaultProps = { duration: 300, zIndex: 1100 // to lay above tooltips and the website header }; ModalBackground.propTypes = { onClose: PropTypes.func, duration: PropTypes.number.isRequired, zIndex: PropTypes.number.isRequired, children: PropTypes.node }; export default { ModalPortal, ModalBackground, ModalContent };
LIQIDTechnology/liqid-react-components
src/components/Modal/Components.js
JavaScript
mit
8,193
#include "pch.h" #include "ActalogicApp.h" TCHAR ActalogicApp::m_szWindowClass[] = _T("Actalogic"); TCHAR ActalogicApp::m_szTitle[] = _T("Actalogic"); ActalogicApp::ActalogicApp(): m_hWnd(NULL), m_hInstance(NULL), m_d2d1Manager(), m_entityFPS(), m_entityDebugInfoLayer(), m_entitySceneContainer(this), m_inputHelper() { m_entityDebugInfoLayer.SetApp(this); } ActalogicApp::~ActalogicApp() { } HRESULT ActalogicApp::Initialize(HINSTANCE hInstance, int nCmdShow) { HRESULT hresult; hresult = m_d2d1Manager.CreateDeviceIndependentResources(); if (FAILED(hresult)) {return hresult;} //TODO:‚±‚±‚ÉEntity‚̃fƒoƒCƒX”ñˆË‘¶‚̏‰Šú‰»ˆ—‚ð’ljÁ hresult = m_entityDebugInfoLayer.OnCreateDeviceIndependentResources(&m_d2d1Manager); if (FAILED(hresult)) { return hresult; } hresult = m_entityFPS.OnCreateDeviceIndependentResources(&m_d2d1Manager); if (FAILED(hresult)) { return hresult; } hresult = m_entitySceneContainer.OnCreateDeviceIndependentResources(&m_d2d1Manager); if (FAILED(hresult)) { return hresult; } m_hInstance = hInstance; m_hWnd = InitializeWindow(hInstance, nCmdShow, 800.0F, 600.0F); return m_hWnd==NULL ? E_FAIL : S_OK; } HWND ActalogicApp::InitializeWindow(HINSTANCE hInstance, int nCmdShow, FLOAT width, FLOAT height) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = ActalogicApp::WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_APPLICATION)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wcex.lpszMenuName = NULL; wcex.lpszClassName = m_szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_APPLICATION)); if (!RegisterClassEx(&wcex)) { MessageBox(NULL, _T("Call to RegisterClassEx failed!"), m_szTitle, NULL); return NULL; } FLOAT dpiX, dpiY; m_d2d1Manager.GetDesktopDpi(&dpiX, &dpiY); UINT desktopWidth = static_cast<UINT>(ceil(width * dpiX / 96.f)); UINT desktopHeight = static_cast<UINT>(ceil(height * dpiY / 96.f)); HWND hWnd = CreateWindow( m_szWindowClass, m_szTitle, WS_OVERLAPPEDWINDOW & ~WS_MAXIMIZEBOX & ~WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, desktopWidth, desktopHeight, NULL, NULL, hInstance, this ); if (!hWnd) { MessageBox(NULL, _T("Call to CreateWindow failed!"), m_szTitle, NULL); return NULL; } SetClientSize(hWnd, desktopWidth, desktopHeight); if (nCmdShow == SW_MAXIMIZE) { ShowWindow(hWnd, SW_RESTORE); } else { ShowWindow(hWnd, nCmdShow); } UpdateWindow(hWnd); return hWnd; } int ActalogicApp::Run() { MSG msg; for (;;) { if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) { if (!GetMessage(&msg, NULL, 0, 0)) { return msg.wParam; } TranslateMessage(&msg); DispatchMessage(&msg); } else { if (m_isActive) { OnTick(); } else { Sleep(1); } } } } void ActalogicApp::Dispose() { //TODO:‚±‚±‚ÉEntity‚ÌƒŠƒ\[ƒX‚ÌŠJ•úˆ—‚ð’ljÁ m_entityDebugInfoLayer.OnDiscardAllResources(); m_entitySceneContainer.OnDiscardAllResources(); m_d2d1Manager.DiscardAllResources(); } void ActalogicApp::Exit() { PostMessage(m_hWnd, WM_DESTROY, 0, 0); } /////////////////////////////////////////////////////////////////////////////// void ActalogicApp::OnTick() { m_inputHelper.OnTick(); OnPreRender(); OnRender(); OnPostRender(); } void ActalogicApp::OnPreRender() { //TODO:‚±‚±‚É•`‰æ‘O‚̏ˆ—‚ð’ljÁ m_entityDebugInfoLayer.OnPreRender(&m_inputHelper); m_entityFPS.OnPreRender(&m_inputHelper); m_entitySceneContainer.OnPreRender(&m_inputHelper); } void ActalogicApp::OnRender() { HRESULT hresult = S_OK; hresult = m_d2d1Manager.CreateDeviceResources(m_hWnd); //TODO:‚±‚±‚ɃfƒoƒCƒXˆË‘¶ƒŠƒ\[ƒX‰Šú‰»ˆ—‚ð’ljÁ if (SUCCEEDED(hresult)){ m_entityDebugInfoLayer.OnCreateDeviceResources(&m_d2d1Manager); } if (SUCCEEDED(hresult)){ m_entitySceneContainer.OnCreateDeviceResources(&m_d2d1Manager); } if (SUCCEEDED(hresult)) { m_d2d1Manager.BeginDraw(); //TODO:‚±‚±‚É•`‰æˆ—‚ð’ljÁ m_entitySceneContainer.OnRender(&m_d2d1Manager); m_entityDebugInfoLayer.OnRender(&m_d2d1Manager); hresult = m_d2d1Manager.EndDraw(); } if (FAILED(hresult)) { //TODO:‚±‚±‚ÉƒŠƒ\[ƒX‚̉ð•úˆ—‚ð’ljÁ m_entityDebugInfoLayer.OnDiscardDeviceResources(); m_entitySceneContainer.OnDiscardDeviceResources(); m_d2d1Manager.DiscardDeviceResources(); } } void ActalogicApp::OnPostRender() { //TODO:‚±‚±‚É•`‰æ‘O‚̏ˆ—‚ð’ljÁ m_entityDebugInfoLayer.OnPostRender(); m_entitySceneContainer.OnPostRender(); } void ActalogicApp::OnResize(WORD width, WORD height, BOOL isActive) { m_isActive = isActive; } /////////////////////////////////////////////////////////////////////////////// LRESULT CALLBACK ActalogicApp::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { if (message == WM_CREATE) { LPCREATESTRUCT pcs = (LPCREATESTRUCT)lParam; ActalogicApp *pApp = (ActalogicApp *)pcs->lpCreateParams; SetWindowLongPtrW(hWnd, GWLP_USERDATA, PtrToUlong(pApp)); } else { ActalogicApp *pApp = reinterpret_cast<ActalogicApp *>(static_cast<LONG_PTR>( ::GetWindowLongPtrW(hWnd, GWLP_USERDATA))); switch (message) { case WM_DISPLAYCHANGE: InvalidateRect(hWnd, NULL, FALSE); case WM_PAINT: pApp->OnRender(); ValidateRect(hWnd, NULL); break; case WM_SIZE: { BOOL isActive = wParam == SIZE_MINIMIZED ? FALSE : TRUE; WORD width = lParam & 0xFFFF; WORD height = (lParam >> 16) & 0xFFFF; pApp->OnResize(width, height, isActive); break; } case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); break; } } return S_OK; } VOID ActalogicApp::SetClientSize(HWND hWnd, LONG sx, LONG sy) { RECT rc1; RECT rc2; GetWindowRect(hWnd, &rc1); GetClientRect(hWnd, &rc2); sx += ((rc1.right - rc1.left) - (rc2.right - rc2.left)); sy += ((rc1.bottom - rc1.top) - (rc2.bottom - rc2.top)); SetWindowPos(hWnd, NULL, 0, 0, sx, sy, (SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE)); }
iwa-yuki/Actalogic
Actalogic/Actalogic/ActalogicApp.cpp
C++
mit
6,115
import * as React from 'react'; import * as ReactDom from 'react-dom'; import * as strings from 'BarChartDemoWebPartStrings'; import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, IPropertyPaneConfiguration, } from '@microsoft/sp-webpart-base'; import { PropertyPaneWebPartInformation } from '@pnp/spfx-property-controls/lib/PropertyPaneWebPartInformation'; import BarChartDemo from './components/BarChartDemo'; import { IBarChartDemoProps } from './components/IBarChartDemo.types'; export interface IBarChartDemoWebPartProps { description: string; } /** * This web part retrieves data asynchronously and renders a bar chart once loaded * It mimics a "real-life" scenario by loading (random) data asynchronously * and rendering the chart once the data has been retrieved. * To keep the demo simple, we don't specify custom colors. */ export default class BarChartDemoWebPart extends BaseClientSideWebPart<IBarChartDemoWebPartProps> { public render(): void { const element: React.ReactElement<IBarChartDemoProps > = React.createElement( BarChartDemo, { // there are no properties to pass for this demo } ); ReactDom.render(element, this.domElement); } protected onDispose(): void { ReactDom.unmountComponentAtNode(this.domElement); } protected get dataVersion(): Version { return Version.parse('1.0'); } protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { return { pages: [ { groups: [ { groupFields: [ PropertyPaneWebPartInformation({ description: strings.WebPartDescription, moreInfoLink: strings.MoreInfoLinkUrl, key: 'webPartInfoId' }) ] } ] } ] }; } }
rgarita/sp-dev-fx-webparts
samples/react-chartcontrol/src/webparts/barChartDemo/BarChartDemoWebPart.ts
TypeScript
mit
1,881
package ca.wescook.wateringcans.events; import ca.wescook.wateringcans.potions.ModPotions; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.client.event.FOVUpdateEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class EventFOV { @SubscribeEvent public void fovUpdates(FOVUpdateEvent event) { // Get player object EntityPlayer player = event.getEntity(); if (player.getActivePotionEffect(ModPotions.inhibitFOV) != null) { // Get player data double playerSpeed = player.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).getAttributeValue(); float capableSpeed = player.capabilities.getWalkSpeed(); float fov = event.getFov(); // Disable FOV change event.setNewfov((float) (fov / ((playerSpeed / capableSpeed + 1.0) / 2.0))); } } }
WesCook/WateringCans
src/main/java/ca/wescook/wateringcans/events/EventFOV.java
Java
mit
1,001
module Rake class << self def verbose? ENV.include? "VERBOSE" and ["1", "true", "yes"].include? ENV["VERBOSE"] end end end
chetan/test_guard
lib/test_guard/rake.rb
Ruby
mit
142
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; var util = require('util'); var session = require('express-session'); var passport = require('passport'); module.exports = (app, url, appEnv, User) => { app.use(session({ secret: process.env.SESSION_SECRET, name: 'freelancalot', proxy: true, resave: true, saveUninitialized: true })); app.use(passport.initialize()); app.use(passport.session()); passport.serializeUser((user, done) => { var id = user.get('id'); console.log('serializeUser: ' + id) done(null, id); }); passport.deserializeUser((id, done) => { User.findById(id).then((user) => { done(null, user); }) }); var googleOAuth = appEnv.getService('googleOAuth'), googleOAuthCreds = googleOAuth.credentials; passport.use(new GoogleStrategy({ clientID: googleOAuthCreds.clientID, clientSecret: googleOAuthCreds.clientSecret, callbackURL: util.format("http://%s%s", url, googleOAuthCreds.callbackPath) }, (token, refreshToken, profile, done) => { process.nextTick(() => { User.findOrCreate({ where: { googleId: profile.id }, defaults: { name: profile.displayName, email: profile.emails[0].value, photo: profile.photos[0].value } }) .spread((user, created) => { done(null, user); }) }); })); app.get('/auth/google', passport.authenticate('google', { scope: ['profile', 'email'] })); app.get('/auth/google/callback', passport.authenticate('google', { successRedirect: '/' })); app.get('/logout', (req, res) => { req.logout(); res.redirect('/'); }); }
lorentzlasson/node-angular-starter
auth.js
JavaScript
mit
2,087
const path = require('path'); const express = require('express'); const bodyParser = require('body-parser'); const auth = require('http-auth'); // const basicAuth = require('basic-auth-connect'); const apiHandler = require('./api-handler') /** * Installs routes that serve production-bundled client-side assets. * It is set up to allow for HTML5 mode routing (404 -> /dist/index.html). * This should be the last router in your express server's chain. */ console.log('running node-app-server.js'); module.exports = (app) => { const distPath = path.join(__dirname, '../dist'); const indexFileName = 'index.html'; console.log('Setting up Express'); console.log(' distPath=%s',distPath); console.log(' indexFileName=%s',indexFileName); // configure app to use bodyParser() // this will let us get the data from a POST // app.use(bodyParser.urlencoded({ extended: true })); // app.use(bodyParser.json()); // basic authentication. not production-ready // TODO: add more robust authentication after POC console.log ("__dirname = " + __dirname); var basic = auth.basic({ realm: "Project NLS.", file: __dirname + "/users.htpasswd" // username === "nielsen" && password === "W@ts0n16" } ); app.use( auth.connect(basic)); // var router = express.Router(); // middleware to use for all requests app.use(function(req, res, next) { // do logging console.log('Router request %s',req.url); next(); // make sure we go to the next routes and don't stop here }); // app.get() app.get(/localapi\/.*$/, (req, res) => apiHandler(req, res) ); app.post(/localapi\/.*$/, (req, res) => apiHandler(req, res) ); // note: this regex exludes API app.use( express.static(distPath)); app.get('*', (req, res) =>res.sendFile(path.join(distPath, indexFileName)));; }
codycoggins/angular2-starter-cody
server/node-app-server.js
JavaScript
mit
1,845
from djblets.cache.backend import cache_memoize class BugTracker(object): """An interface to a bug tracker. BugTracker subclasses are used to enable interaction with different bug trackers. """ def get_bug_info(self, repository, bug_id): """Get the information for the specified bug. This should return a dictionary with 'summary', 'description', and 'status' keys. This is cached for 60 seconds to reduce the number of queries to the bug trackers and make things seem fast after the first infobox load, but is still a short enough time to give relatively fresh data. """ return cache_memoize(self.make_bug_cache_key(repository, bug_id), lambda: self.get_bug_info_uncached(repository, bug_id), expiration=60) def get_bug_info_uncached(self, repository, bug_id): """Get the information for the specified bug (implementation). This should be implemented by subclasses, and should return a dictionary with 'summary', 'description', and 'status' keys. If any of those are unsupported by the given bug tracker, the unknown values should be given as an empty string. """ return { 'summary': '', 'description': '', 'status': '', } def make_bug_cache_key(self, repository, bug_id): """Returns a key to use when caching fetched bug information.""" return 'repository-%s-bug-%s' % (repository.pk, bug_id)
reviewboard/reviewboard
reviewboard/hostingsvcs/bugtracker.py
Python
mit
1,633
using System; using System.Linq; namespace TypeScriptDefinitionsGenerator.Common.Extensions { public static class StringExtensions { public static string ToCamelCase(this string value) { return value.Substring(0, 1).ToLower() + value.Substring(1); } public static string ToPascalCase(this string value) { return value.Substring(0, 1).ToUpper() + value.Substring(1); } public static string[] GetTopLevelNamespaces(this string typeScriptType) { var startIndex = typeScriptType.IndexOf("<") + 1; var count = typeScriptType.Length; if (startIndex > 0) count = typeScriptType.LastIndexOf(">") - startIndex; typeScriptType = typeScriptType.Substring(startIndex, count); var parts = typeScriptType.Split(','); return parts .Where(p => p.Split('.').Length > 1) .Select(p => p.Split('.')[0]) .Select(p => p.Trim()) .ToArray(); } public static string ReplaceLastOccurrence(this string source, string find, string replace) { var index = source.LastIndexOf(find); if (index > -1) { return source.Remove(index, find.Length).Insert(index, replace); } return source; } public static int GetSecondLastIndexOf(this string source, string value) { return source.Substring(0, source.LastIndexOf(value, StringComparison.Ordinal)).LastIndexOf(value, StringComparison.Ordinal) + 1; } } }
slovely/TypeScriptDefinitionsGenerator
src/TypeScriptDefinitionsGenerator.Common/Extensions/StringExtensions.cs
C#
mit
1,661
package net.zer0bandwidth.android.lib.content.querybuilder; import android.content.ContentResolver; import android.support.test.runner.AndroidJUnit4; import android.test.ProviderTestCase2; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import static junit.framework.Assert.assertNull; /** * Exercises {@link DeletionBuilder}. * @since zer0bandwidth-net/android 0.1.7 (#39) */ @RunWith( AndroidJUnit4.class ) public class DeletionBuilderTest extends ProviderTestCase2<MockContentProvider> { protected QueryBuilderTest.MockContext m_mockery = new QueryBuilderTest.MockContext() ; @SuppressWarnings( "unused" ) // sAuthority is intentionally ignored public DeletionBuilderTest() { super( MockContentProvider.class, QueryBuilderTest.MockContext.AUTHORITY ) ; } @Override @Before public void setUp() throws Exception { super.setUp() ; } /** Exercises {@link DeletionBuilder#deleteAll} */ @Test public void testDeleteAll() { DeletionBuilder qb = new DeletionBuilder( m_mockery.ctx, m_mockery.uri ) ; qb.m_sExplicitWhereFormat = "qarnflarglebarg" ; qb.m_asExplicitWhereParams = new String[] { "foo", "bar", "baz" } ; qb.deleteAll() ; assertNull( qb.m_sExplicitWhereFormat ) ; assertNull( qb.m_asExplicitWhereParams ) ; } /** Exercises {@link DeletionBuilder#executeQuery}. */ @Test public void testExecuteQuery() throws Exception // Any uncaught exception is a failure. { ContentResolver rslv = this.getMockContentResolver() ; int nDeleted = QueryBuilder.deleteFrom( rslv, m_mockery.uri ).execute(); assertEquals( MockContentProvider.EXPECTED_DELETE_COUNT, nDeleted ) ; } }
zerobandwidth-net/android
libZeroAndroid/src/androidTest/java/net/zer0bandwidth/android/lib/content/querybuilder/DeletionBuilderTest.java
Java
mit
1,665
using System; namespace DD.Cloud.WebApi.TemplateToolkit { /// <summary> /// Factory methods for creating value providers. /// </summary> /// <typeparam name="TContext"> /// The type used as a context for each request. /// </typeparam> public static class ValueProvider<TContext> { /// <summary> /// Create a value provider from the specified selector function. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the selector. /// </typeparam> /// <param name="selector"> /// A selector function that, when given an instance of <typeparamref name="TContext"/>, and returns a well-known value of type <typeparamref name="TValue"/> derived from the context. /// </param> /// <returns> /// The value provider. /// </returns> public static IValueProvider<TContext, TValue> FromSelector<TValue>(Func<TContext, TValue> selector) { if (selector == null) throw new ArgumentNullException("selector"); return new SelectorValueProvider<TValue>(selector); } /// <summary> /// Create a value provider from the specified function. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the function. /// </typeparam> /// <param name="getValue"> /// A function that returns a well-known value of type <typeparamref name="TValue"/>. /// </param> /// <returns> /// The value provider. /// </returns> public static IValueProvider<TContext, TValue> FromFunction<TValue>(Func<TValue> getValue) { if (getValue == null) throw new ArgumentNullException("getValue"); return new FunctionValueProvider<TValue>(getValue); } /// <summary> /// Create a value provider from the specified constant value. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the provider. /// </typeparam> /// <param name="value"> /// A constant value that is returned by the provider. /// </param> /// <returns> /// The value provider. /// </returns> public static IValueProvider<TContext, TValue> FromConstantValue<TValue>(TValue value) { if (value == null) throw new ArgumentNullException("value"); return new ConstantValueProvider<TValue>(value); } /// <summary> /// Value provider that invokes a selector function on the context to extract its value. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the provider. /// </typeparam> class SelectorValueProvider<TValue> : IValueProvider<TContext, TValue> { /// <summary> /// The selector function that extracts a value from the context. /// </summary> readonly Func<TContext, TValue> _selector; /// <summary> /// Create a new selector-based value provider. /// </summary> /// <param name="selector"> /// The selector function that extracts a value from the context. /// </param> public SelectorValueProvider(Func<TContext, TValue> selector) { _selector = selector; } /// <summary> /// Extract the value from the specified context. /// </summary> /// <param name="source"> /// The TContext instance from which the value is to be extracted. /// </param> /// <returns> /// The value. /// </returns> public TValue Get(TContext source) { if (source == null) throw new InvalidOperationException("The current request template has one more more deferred parameters that refer to its context; the context parameter must therefore be supplied."); return _selector(source); } } /// <summary> /// Value provider that invokes a function to extract its value. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the provider. /// </typeparam> class FunctionValueProvider<TValue> : IValueProvider<TContext, TValue> { /// <summary> /// The function that is invoked to provide a value. /// </summary> readonly Func<TValue> _getValue; /// <summary> /// Create a new function-based value provider. /// </summary> /// <param name="getValue"> /// The function that is invoked to provide a value. /// </param> public FunctionValueProvider(Func<TValue> getValue) { _getValue = getValue; } /// <summary> /// Extract the value from the specified context. /// </summary> /// <param name="source"> /// The TContext instance from which the value is to be extracted. /// </param> /// <returns> /// The value. /// </returns> public TValue Get(TContext source) { if (source == null) return default(TValue); // AF: Is this correct? return _getValue(); } } /// <summary> /// Value provider that returns a constant value. /// </summary> /// <typeparam name="TValue"> /// The type of value returned by the provider. /// </typeparam> class ConstantValueProvider<TValue> : IValueProvider<TContext, TValue> { /// <summary> /// The constant value returned by the provider. /// </summary> readonly TValue _value; /// <summary> /// Create a new constant value provider. /// </summary> /// <param name="value"> /// The constant value returned by the provider. /// </param> public ConstantValueProvider(TValue value) { _value = value; } /// <summary> /// Extract the value from the specified context. /// </summary> /// <param name="source"> /// The TContext instance from which the value is to be extracted. /// </param> /// <returns> /// The value. /// </returns> public TValue Get(TContext source) { if (source == null) return default(TValue); // AF: Is this correct? return _value; } } } }
DimensionDataCBUSydney/Watt
Watt/ValueProvider.cs
C#
mit
5,719
#ifndef COBALT_UTILITY_HPP_INCLUDED #define COBALT_UTILITY_HPP_INCLUDED #pragma once #include <cobalt/utility/compare_floats.hpp> #include <cobalt/utility/enum_traits.hpp> #include <cobalt/utility/enumerator.hpp> #include <cobalt/utility/factory.hpp> #include <cobalt/utility/hash.hpp> #include <cobalt/utility/type_index.hpp> #include <cobalt/utility/identifier.hpp> #include <cobalt/utility/intrusive.hpp> #include <cobalt/utility/throw_error.hpp> #include <cobalt/utility/overload.hpp> #endif // COBALT_UTILITY_HPP_INCLUDED
mzhirnov/cobalt
include/cobalt/utility.hpp
C++
mit
530
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Babylonian</source> <translation>در مورد Babylonian</translation> </message> <message> <location line="+39"/> <source>&lt;b&gt;Babylonian&lt;/b&gt; version</source> <translation>نسخه Babylonian</translation> </message> <message> <location line="+57"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation>⏎ ⏎ این نسخه نرم افزار آزمایشی است⏎ ⏎ نرم افزار تحت لیسانس MIT/X11 منتشر شده است. به فایل coping یا آدرس http://www.opensource.org/licenses/mit-license.php. مراجعه شود⏎ ⏎ این محصول شامل نرم افزاری است که با OpenSSL برای استفاده از OpenSSL Toolkit (http://www.openssl.org/) و نرم افزار نوشته شده توسط اریک یانگ (eay@cryptsoft.com ) و UPnP توسط توماس برنارد طراحی شده است.</translation> </message> <message> <location filename="../aboutdialog.cpp" line="+14"/> <source>Copyright</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The Babylonian developers</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation>فهرست آدرس</translation> </message> <message> <location line="+19"/> <source>Double-click to edit address or label</source> <translation>برای ویرایش آدرس یا بر چسب دو بار کلیک کنید</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>آدرس جدید ایجاد کنید</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation>آدرس جدید</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+63"/> <source>These are your Babylonian addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation>این آدرسها، آدرسهای Babylonian شما برای دریافت وجوه هستند. شما ممکن است آدرسهای متفاوت را به هر گیرنده اختصاص دهید که بتوانید مواردی که پرداخت می کنید را پیگیری نمایید</translation> </message> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>&amp;Copy Address</source> <translation>کپی آدرس</translation> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation>نمایش &amp;کد QR</translation> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a Babylonian address</source> <translation>پیام را برای اثبات آدرس Babylonian خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation>امضا و پیام</translation> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دا حذف</translation> </message> <message> <location line="+27"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+3"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Verify a message to ensure it was signed with a specified Babylonian address</source> <translation>یک پیام را برای حصول اطمینان از ورود به سیستم با آدرس Babylonian مشخص، شناسایی کنید</translation> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation>شناسایی پیام</translation> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>حذف</translation> </message> <message> <location filename="../addressbookpage.cpp" line="-5"/> <source>These are your Babylonian addresses for sending payments. Always check the amount and the receiving address before sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Copy &amp;Label</source> <translation>کپی و برچسب گذاری</translation> </message> <message> <location line="+1"/> <source>&amp;Edit</source> <translation>ویرایش</translation> </message> <message> <location line="+1"/> <source>Send &amp;Coins</source> <translation type="unfinished"/> </message> <message> <location line="+260"/> <source>Export Address Book Data</source> <translation>آدرس انتخاب شده در سیستم تخته رسم گیره دار کپی کنید</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma separated file (*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation>خطای صدور</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>بر چسب</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>آدرس</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>بدون برچسب</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation>دیالوگ Passphrase </translation> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>وارد عبارت عبور</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>عبارت عبور نو</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+33"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>وارد کنید..&amp;lt;br/&amp;gt عبارت عبور نو در پنجره 10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &amp;lt;b&amp;gt لطفا عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>این عملیت نیاز عبارت عبور پنجره شما دارد برای رمز گشایی آن</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>تکرار عبارت عبور نو</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>این عملیت نیاز عبارت عبور شما دارد برای رمز بندی آن</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>رمز بندی پنجره</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>تایید رمز گذاری</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR QUARKCOINS&lt;/b&gt;!</source> <translation>هشدار: اگر wallet رمزگذاری شود و شما passphrase را گم کنید شما همه اطلاعات Babylonian را از دست خواهید داد.</translation> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation>آیا اطمینان دارید که می خواهید wallet رمزگذاری شود؟</translation> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation>هشدار: Caps lock key روشن است</translation> </message> <message> <location line="-130"/> <location line="+58"/> <source>Wallet encrypted</source> <translation>تغییر عبارت عبور</translation> </message> <message> <location line="-56"/> <source>Babylonian will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your quarkcoins from being stolen by malware infecting your computer.</source> <translation>Biticon هم اکنون بسته می‌شود تا فرایند رمزگذاری را تمام کند. به خاطر داشته باشید که رمزگذاری کیف پولتان نمی‌تواند به طور کامل بیتیکون‌های شما را در برابر دزدیده شدن توسط بدافزارهایی که رایانه شما را آلوده می‌کنند، محافظت نماید.</translation> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+42"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>عبارت عبور نو و قدیم در پنجره وارد کنید</translation> </message> <message> <location line="-54"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>تنا موفق رمز بندی پنجره ناشی از خطای داخل شد. پنجره شما مرز بندی نشده است</translation> </message> <message> <location line="+7"/> <location line="+48"/> <source>The supplied passphrases do not match.</source> <translation>عبارت عبور عرضه تطابق نشد</translation> </message> <message> <location line="-37"/> <source>Wallet unlock failed</source> <translation>نجره رمز گذار شد</translation> </message> <message> <location line="+1"/> <location line="+11"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>اموفق رمز بندی پنجر</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>ناموفق رمز بندی پنجره</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation>wallet passphrase با موفقیت تغییر یافت</translation> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+233"/> <source>Sign &amp;message...</source> <translation>امضا و پیام</translation> </message> <message> <location line="+280"/> <source>Synchronizing with network...</source> <translation>همگام سازی با شبکه ...</translation> </message> <message> <location line="-349"/> <source>&amp;Overview</source> <translation>بررسی اجمالی</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>نمای کلی پنجره نشان بده</translation> </message> <message> <location line="+20"/> <source>&amp;Transactions</source> <translation>&amp;معاملات</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>نمایش تاریخ معاملات</translation> </message> <message> <location line="+7"/> <source>Edit the list of stored addresses and labels</source> <translation>ویرایش لیست آدرسها و بر چسب های ذخیره ای</translation> </message> <message> <location line="-14"/> <source>Show the list of addresses for receiving payments</source> <translation>نمایش لیست آدرس ها برای در یافت پر داخت ها</translation> </message> <message> <location line="+31"/> <source>E&amp;xit</source> <translation>خروج</translation> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>خروج از برنامه </translation> </message> <message> <location line="+4"/> <source>Show information about Babylonian</source> <translation>نمایش اطلاعات در مورد بیتکویین</translation> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation>درباره &amp;Qt</translation> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation>نمایش اطلاعات درباره Qt</translation> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>تنظیمات...</translation> </message> <message> <location line="+6"/> <source>&amp;Encrypt Wallet...</source> <translation>رمزگذاری wallet</translation> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation>پشتیبان گیری از wallet</translation> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation>تغییر Passphrase</translation> </message> <message> <location line="+285"/> <source>Importing blocks from disk...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Reindexing blocks on disk...</source> <translation type="unfinished"/> </message> <message> <location line="-347"/> <source>Send coins to a Babylonian address</source> <translation>سکه ها را به آدرس bitocin ارسال کن</translation> </message> <message> <location line="+49"/> <source>Modify configuration options for Babylonian</source> <translation>انتخابهای پیکربندی را برای Babylonian اصلاح کن</translation> </message> <message> <location line="+9"/> <source>Backup wallet to another location</source> <translation>نسخه پیشتیبان wallet را به محل دیگر انتقال دهید</translation> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>عبارت عبور رمز گشایی پنجره تغییر کنید</translation> </message> <message> <location line="+6"/> <source>&amp;Debug window</source> <translation>اشکال زدایی از صفحه</translation> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation>کنسول اشکال زدایی و تشخیص را باز کنید</translation> </message> <message> <location line="-4"/> <source>&amp;Verify message...</source> <translation>بازبینی پیام</translation> </message> <message> <location line="-165"/> <location line="+530"/> <source>Babylonian</source> <translation>یت کویین </translation> </message> <message> <location line="-530"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+101"/> <source>&amp;Send</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Receive</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Addresses</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>&amp;About Babylonian</source> <translation>در مورد Babylonian</translation> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation>&amp;نمایش/ عدم نمایش</translation> </message> <message> <location line="+1"/> <source>Show or hide the main Window</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Encrypt the private keys that belong to your wallet</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Sign messages with your Babylonian addresses to prove you own them</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Verify messages to ensure they were signed with specified Babylonian addresses</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>&amp;File</source> <translation>فایل</translation> </message> <message> <location line="+7"/> <source>&amp;Settings</source> <translation>تنظیمات</translation> </message> <message> <location line="+6"/> <source>&amp;Help</source> <translation>کمک</translation> </message> <message> <location line="+9"/> <source>Tabs toolbar</source> <translation>نوار ابزار زبانه ها</translation> </message> <message> <location line="+17"/> <location line="+10"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> <message> <location line="+47"/> <source>Babylonian client</source> <translation>مشتری Babylonian</translation> </message> <message numerus="yes"> <location line="+141"/> <source>%n active connection(s) to Babylonian network</source> <translation><numerusform>در صد ارتباطات فعال بیتکویین با شبکه %n</numerusform></translation> </message> <message> <location line="+22"/> <source>No block source available...</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Processed %1 of %2 (estimated) blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Processed %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+20"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n week(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>%1 behind</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Last received block was generated %1 ago.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transactions after this will not yet be visible.</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+70"/> <source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source> <translation type="unfinished"/> </message> <message> <location line="-140"/> <source>Up to date</source> <translation>تا تاریخ</translation> </message> <message> <location line="+31"/> <source>Catching up...</source> <translation>ابتلا به بالا</translation> </message> <message> <location line="+113"/> <source>Confirm transaction fee</source> <translation>هزینه تراکنش را تایید کنید</translation> </message> <message> <location line="+8"/> <source>Sent transaction</source> <translation>معامله ارسال شده</translation> </message> <message> <location line="+0"/> <source>Incoming transaction</source> <translation>معامله در یافت شده</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation>تاریخ %1 مبلغ%2 نوع %3 آدرس %4</translation> </message> <message> <location line="+33"/> <location line="+23"/> <source>URI handling</source> <translation>مدیریت URI</translation> </message> <message> <location line="-23"/> <location line="+23"/> <source>URI can not be parsed! This can be caused by an invalid Babylonian address or malformed URI parameters.</source> <translation>URI قابل تحلیل نیست. این خطا ممکن است به دلیل ادرس Babylonian اشتباه یا پارامترهای اشتباه URI رخ داده باشد</translation> </message> <message> <location line="+17"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>زمایش شبکهه</translation> </message> <message> <location line="+8"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>زمایش شبکه</translation> </message> <message> <location filename="../bitcoin.cpp" line="+111"/> <source>A fatal error occurred. Babylonian can no longer continue safely and will quit.</source> <translation>خطا روی داده است. Babylonian نمی تواند بدون مشکل ادامه دهد و باید بسته شود</translation> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+104"/> <source>Network Alert</source> <translation>پیام شبکه</translation> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>اصلاح آدرس</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>بر چسب</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation>بر چسب با دفتر آدرس ورود مرتبط است</translation> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>آدرس</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation>آدرس با دفتر آدرس ورودی مرتبط است. این فقط در مورد آدرسهای ارسال شده است</translation> </message> <message> <location filename="../editaddressdialog.cpp" line="+21"/> <source>New receiving address</source> <translation>آدرس در یافت نو</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>آدرس ارسال نو</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>اصلاح آدرس در یافت</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>اصلاح آدرس ارسال</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid Babylonian address.</source> <translation>آدرس وارد شده %1 یک ادرس صحیح Babylonian نیست</translation> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>رمز گشایی پنجره امکان پذیر نیست</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>کلید نسل جدید ناموفق است</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+424"/> <location line="+12"/> <source>Babylonian-Qt</source> <translation>Babylonian-Qt</translation> </message> <message> <location line="-12"/> <source>version</source> <translation>نسخه</translation> </message> <message> <location line="+2"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="+1"/> <source>command-line options</source> <translation>انتخابها برای خطوط دستور command line</translation> </message> <message> <location line="+4"/> <source>UI options</source> <translation>انتخابهای UI </translation> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation>زبان را تنظیم کنید برای مثال &quot;de_DE&quot; (پیش فرض: system locale)</translation> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation>شروع حد اقل</translation> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation>نمایش صفحه splash در STARTUP (پیش فرض:1)</translation> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>اصلی</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation>اصلی</translation> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation>دستمزد&amp;پر داخت معامله</translation> </message> <message> <location line="+31"/> <source>Automatically start Babylonian after logging in to the system.</source> <translation>در زمان ورود به سیستم به صورت خودکار Babylonian را اجرا کن</translation> </message> <message> <location line="+3"/> <source>&amp;Start Babylonian on system login</source> <translation>اجرای Babylonian در زمان ورود به سیستم</translation> </message> <message> <location line="+35"/> <source>Reset all client options to default.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Reset Options</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>&amp;Network</source> <translation>شبکه</translation> </message> <message> <location line="+6"/> <source>Automatically open the Babylonian client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation>اتوماتیک باز کردن بندر بیتکویین در روتر . این فقط در مواردی می باشد که روتر با کمک یو پ ن پ کار می کند</translation> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation>درگاه با استفاده از</translation> </message> <message> <location line="+7"/> <source>Connect to the Babylonian network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation>اتصال به شبکه Babylonian از طریق پراکسی ساکس (برای مثال وقتی از طریق نرم افزار TOR متصل می شوید)</translation> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation>اتصال با پراکسی SOCKS</translation> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation>پراکسی و آی.پی.</translation> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation>درس پروکسی</translation> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation>درگاه</translation> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation>درگاه پراکسی (مثال 9050)</translation> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation>SOCKS و نسخه</translation> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation>نسخه SOCKS از پراکسی (مثال 5)</translation> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation>صفحه</translation> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation>tray icon را تنها بعد از کوچک کردن صفحه نمایش بده</translation> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation>حد اقل رساندن در جای نوار ابزار ها</translation> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation>حد اقل رساندن در جای خروج بر نامه وقتیکه پنجره بسته است.وقتیکه این فعال است برنامه خاموش می شود بعد از انتخاب دستور خاموش در منیو</translation> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation>کوچک کردن صفحه در زمان بستن</translation> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation>نمایش</translation> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation>میانجی کاربر و زبان</translation> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting Babylonian.</source> <translation>زبان میانجی کاربر می تواند در اینجا تنظیم شود. این تنظیمات بعد از شروع دوباره RESTART در Babylonian اجرایی خواهند بود.</translation> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation>واحد برای نمایش میزان وجوه در:</translation> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation>بخش فرعی پیش فرض را برای نمایش میانجی و زمان ارسال سکه ها مشخص و انتخاب نمایید</translation> </message> <message> <location line="+9"/> <source>Whether to show Babylonian addresses in the transaction list or not.</source> <translation>تا آدرسهای bITCOIN در فهرست تراکنش نمایش داده شوند یا نشوند.</translation> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation>نمایش آدرسها در فهرست تراکنش</translation> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation>تایید</translation> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation>رد</translation> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation>انجام</translation> </message> <message> <location filename="../optionsdialog.cpp" line="+53"/> <source>default</source> <translation>پیش فرض</translation> </message> <message> <location line="+130"/> <source>Confirm options reset</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Some settings may require a client restart to take effect.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Do you want to proceed?</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <location line="+9"/> <source>Warning</source> <translation>هشدار</translation> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting Babylonian.</source> <translation>این تنظیمات پس از اجرای دوباره Babylonian اعمال می شوند</translation> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation>آدرس پراکسی داده شده صحیح نیست</translation> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+50"/> <location line="+166"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Babylonian network after a connection is established, but this process has not completed yet.</source> <translation>اطلاعات نمایش داده شده روزآمد نیستند.wallet شما به صورت خودکار با شبکه Babylonian بعد از برقراری اتصال روزآمد می شود اما این فرایند هنوز کامل نشده است.</translation> </message> <message> <location line="-124"/> <source>Balance:</source> <translation>راز:</translation> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation>تایید نشده</translation> </message> <message> <location line="-78"/> <source>Wallet</source> <translation>wallet</translation> </message> <message> <location line="+107"/> <source>Immature:</source> <translation>نابالغ</translation> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation>بالانس/تتمه حساب استخراج شده، نابالغ است /تکمیل نشده است</translation> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>اخرین معاملات&amp;lt</translation> </message> <message> <location line="-101"/> <source>Your current balance</source> <translation>تزار جاری شما</translation> </message> <message> <location line="+29"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation>تعداد معاملات که تایید شده ولی هنوز در تزار جاری شما بر شمار نرفته است</translation> </message> <message> <location filename="../overviewpage.cpp" line="+116"/> <location line="+1"/> <source>out of sync</source> <translation>روزآمد نشده</translation> </message> </context> <context> <name>PaymentServer</name> <message> <location filename="../paymentserver.cpp" line="+107"/> <source>Cannot start Babylonian: click-to-pay handler</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation>دیالوگ QR CODE</translation> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation>درخواست پرداخت</translation> </message> <message> <location line="+56"/> <source>Amount:</source> <translation>مقدار:</translation> </message> <message> <location line="-44"/> <source>Label:</source> <translation>برچسب:</translation> </message> <message> <location line="+19"/> <source>Message:</source> <translation>پیام</translation> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation>&amp;ذخیره به عنوان...</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation>خطا در زمان رمزدار کردن URI در کد QR</translation> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation>میزان وجه وارد شده صحیح نیست، لطفا بررسی نمایید</translation> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation>URI ذکر شده بسیار طولانی است، متن برچسب/پیام را کوتاه کنید</translation> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation>ذخیره کد QR</translation> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation>تصاویر با فرمت PNG (*.png)</translation> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation>نام مشتری</translation> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+339"/> <source>N/A</source> <translation>-</translation> </message> <message> <location line="-217"/> <source>Client version</source> <translation>نسخه مشتری</translation> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation>اطلاعات</translation> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation>استفاده از نسخه OPENSSL</translation> </message> <message> <location line="+49"/> <source>Startup time</source> <translation>زمان آغاز STARTUP</translation> </message> <message> <location line="+29"/> <source>Network</source> <translation>شبکه</translation> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation>تعداد اتصالات</translation> </message> <message> <location line="+23"/> <source>On testnet</source> <translation>در testnetکها</translation> </message> <message> <location line="+23"/> <source>Block chain</source> <translation>زنجیره بلاک</translation> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation>تعداد کنونی بلاکها</translation> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation>تعداد تخمینی بلاکها</translation> </message> <message> <location line="+23"/> <source>Last block time</source> <translation>زمان آخرین بلاک</translation> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation>باز کردن</translation> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation>گزینه های command-line</translation> </message> <message> <location line="+7"/> <source>Show the Babylonian-Qt help message to get a list with possible Babylonian command-line options.</source> <translation>پیام راهنمای Babylonian-Qt را برای گرفتن فهرست گزینه های command-line نشان بده</translation> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation>نمایش</translation> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation>کنسول</translation> </message> <message> <location line="-260"/> <source>Build date</source> <translation>ساخت تاریخ</translation> </message> <message> <location line="-104"/> <source>Babylonian - Debug window</source> <translation>صفحه اشکال زدایی Babylonian </translation> </message> <message> <location line="+25"/> <source>Babylonian Core</source> <translation> هسته Babylonian </translation> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation>فایلِ لاگِ اشکال زدایی</translation> </message> <message> <location line="+7"/> <source>Open the Babylonian debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation>فایلِ لاگِ اشکال زدایی Babylonian را از دایرکتوری جاری داده ها باز کنید. این عملیات ممکن است برای فایلهای لاگِ حجیم طولانی شود.</translation> </message> <message> <location line="+102"/> <source>Clear console</source> <translation>پاکسازی کنسول</translation> </message> <message> <location filename="../rpcconsole.cpp" line="-30"/> <source>Welcome to the Babylonian RPC console.</source> <translation>به کنسول Babylonian RPC خوش آمدید</translation> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation>با تایپ عبارت HELP دستورهای در دسترس را مرور خواهید کرد</translation> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+124"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> <message> <location line="+50"/> <source>Send to multiple recipients at once</source> <translation>ارسال چندین در یافت ها فورا</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation>اضافه کردن دریافت کننده</translation> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation>پاک کردن تمام ستون‌های تراکنش</translation> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="+22"/> <source>Balance:</source> <translation>تزار :</translation> </message> <message> <location line="+10"/> <source>123.456 BTC</source> <translation>123.456 بتس</translation> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>عملیت دوم تایید کنید</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation>&amp;;ارسال</translation> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-59"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation>(%3) تا &lt;b&gt;%1&lt;/b&gt; درصد%2</translation> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>ارسال سکه ها تایید کنید</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation> %1شما متماینید که می خواهید 1% ارسال کنید ؟</translation> </message> <message> <location line="+0"/> <source> and </source> <translation>و</translation> </message> <message> <location line="+23"/> <source>The recipient address is not valid, please recheck.</source> <translation>آدرس گیرنده نادرست است، لطفا دوباره بررسی کنید.</translation> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>مبلغ پر داخت باید از 0 بیشتر باشد </translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation>میزان وجه از بالانس/تتمه حساب شما بیشتر است</translation> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation>کل میزان وجه از بالانس/تتمه حساب شما بیشتر می شود وقتی %1 هزینه تراکنش نیز به ین میزان افزوده می شود</translation> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation>آدرس تکراری یافت شده است، در زمان انجام عملیات به هر آدرس تنها یکبار می توانید اطلاعات ارسال کنید</translation> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed!</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation>خطا: تراکنش تایید نشد. این پیام زمانی روی می دهد که مقداری از سکه های WALLET شما استفاده شده اند برای مثال اگر شما از WALLET.DAT استفاده کرده اید، ممکن است سکه ها استفاده شده باشند اما در اینجا نمایش داده نشوند</translation> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation>تراز</translation> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>A&amp;مبلغ :</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>به&amp;پر داخت :</translation> </message> <message> <location line="+34"/> <source>The address to send the payment to (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <location filename="../sendcoinsentry.cpp" line="+26"/> <source>Enter a label for this address to add it to your address book</source> <translation>برای آدرس بر پسب وارد کنید که در دفتر آدرس اضافه شود</translation> </message> <message> <location line="-78"/> <source>&amp;Label:</source> <translation>&amp;بر چسب </translation> </message> <message> <location line="+28"/> <source>Choose address from address book</source> <translation>اآدرسن ازدفتر آدرس انتخاب کنید</translation> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>آدرس از تخته رسم گیره دار پست کنید </translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation>بر داشتن این در یافت کننده</translation> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a Babylonian address (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation>امضا - امضا کردن /شناسایی یک پیام</translation> </message> <message> <location line="+13"/> <source>&amp;Sign Message</source> <translation>&amp;امضای پیام</translation> </message> <message> <location line="+6"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation>شما می توانید پیامها را با آدرس خودتان امضا نمایید تا ثابت شود متعلق به شما هستند. مواظب باشید تا چیزی که بدان مطمئن نیستنید را امضا نکنید زیرا حملات فیشینگ در زمان ورود شما به سیستم فریبنده هستند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند را امضا کنید</translation> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="+10"/> <location line="+213"/> <source>Choose an address from the address book</source> <translation>یک آدرس را از فهرست آدرسها انتخاب کنید</translation> </message> <message> <location line="-203"/> <location line="+213"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-203"/> <source>Paste address from clipboard</source> <translation>آدرس از تخته رسم گیره دار پست کنید </translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation>پیامی را که می‌خواهید امضا کنید در اینجا وارد کنید</translation> </message> <message> <location line="+7"/> <source>Signature</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Copy the current signature to the system clipboard</source> <translation>این امضا را در system clipboard کپی کن</translation> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this Babylonian address</source> <translation>پیام را برای اثبات آدرس Babylonian خود امضا کنید</translation> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all sign message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام</translation> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation>پاکسازی همه</translation> </message> <message> <location line="-87"/> <source>&amp;Verify Message</source> <translation>تایید پیام</translation> </message> <message> <location line="+6"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation>آدرس/پیام خود را وارد کنید (مطمئن شوید که فاصله بین خطوط، فاصله ها، تب ها و ... را دقیقا کپی می کنید) و سپس امضا کنید تا پیام تایید شود. مراقب باشید که پیام را بیشتر از مطالب درون امضا مطالعه نمایید تا فریب شخص سوم/دزدان اینترنتی را نخورید.</translation> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>آدرس برای امضا کردن پیام با (برای مثال Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified Babylonian address</source> <translation>پیام را برای اطمنان از ورود به سیستم با آدرس Babylonian مشخص خود،تایید کنید</translation> </message> <message> <location line="+3"/> <source>Verify &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Reset all verify message fields</source> <translation>تنظیم دوباره تمامی فیلدهای پیام تایید شده</translation> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a Babylonian address (e.g. Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</source> <translation>آدرس بیتکویین وارد کنید (bijvoorbeeld: Qi1NooNjQySQLDJ643HWfZZ7UN2EmLEvix)</translation> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation>با کلیک بر &quot;امضای پیام&quot; شما یک امضای جدید درست می کنید</translation> </message> <message> <location line="+3"/> <source>Enter Babylonian signature</source> <translation>امضای BITOCOIN خود را وارد کنید</translation> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation>آدرس وارد شده صحیح نیست</translation> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation>اطفا آدرس را بررسی کرده و دوباره امتحان کنید</translation> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation>آدرس وارد شده با کلید وارد شده مرتبط نیست</translation> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation>قفل کردن wallet انجام نشد</translation> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation>کلید شخصی برای آدرس وارد شده در دسترس نیست</translation> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation>پیام امضا کردن انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation>پیام امضا شد</translation> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation>امضا نمی تواند رمزگشایی شود</translation> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation>لطفا امضا را بررسی و دوباره تلاش نمایید</translation> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation>امضا با تحلیلِ پیام مطابقت ندارد</translation> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation>عملیات شناسایی پیام انجام نشد</translation> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation>پیام شناسایی شد</translation> </message> </context> <context> <name>SplashScreen</name> <message> <location filename="../splashscreen.cpp" line="+22"/> <source>The Babylonian developers</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>[testnet]</source> <translation>آزمایش شبکه</translation> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+20"/> <source>Open until %1</source> <translation>باز کردن تا%1</translation> </message> <message> <location line="+6"/> <source>%1/offline</source> <translation>%1 آفلاین</translation> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1 تایید نشده </translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>ایید %1 </translation> </message> <message> <location line="+18"/> <source>Status</source> <translation>وضعیت</translation> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation><numerusform>انتشار از طریق n% گره انتشار از طریق %n گره</numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+7"/> <source>Source</source> <translation>منبع</translation> </message> <message> <location line="+0"/> <source>Generated</source> <translation>تولید شده</translation> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation>فرستنده</translation> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation>گیرنده</translation> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation>آدرس شما</translation> </message> <message> <location line="-2"/> <source>label</source> <translation>برچسب</translation> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation>بدهی </translation> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation><numerusform>بلوغ در n% از بیشتر بلاکها بلوغ در %n از بیشتر بلاکها</numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation>غیرقابل قبول</translation> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation>اعتبار</translation> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation>هزینه تراکنش</translation> </message> <message> <location line="+16"/> <source>Net amount</source> <translation>هزینه خالص</translation> </message> <message> <location line="+6"/> <source>Message</source> <translation>پیام</translation> </message> <message> <location line="+2"/> <source>Comment</source> <translation>نظر</translation> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation>شناسه کاربری برای تراکنش</translation> </message> <message> <location line="+3"/> <source>Generated coins must mature 240 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation>سکه های ایجاد شده باید 240 بلاک را قبل از استفاده بالغ کنند. در هنگام ایجاد بلاک، آن بلاک در شبکه منتشر می شود تا به زنجیره بلاکها بپیوندد. اگر در زنجیره قرار نگیرد، پیام وضعیت به غیرقابل قبول تغییر می بپیابد و قابل استفاده نیست. این مورد معمولا زمانی پیش می آید که گره دیگری به طور همزمان بلاکی را با فاصل چند ثانیه ای از شما ایجاد کند.</translation> </message> <message> <location line="+7"/> <source>Debug information</source> <translation>اشکال زدایی طلاعات</translation> </message> <message> <location line="+8"/> <source>Transaction</source> <translation>تراکنش</translation> </message> <message> <location line="+3"/> <source>Inputs</source> <translation>درونداد</translation> </message> <message> <location line="+23"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>true</source> <translation>صحیح</translation> </message> <message> <location line="+0"/> <source>false</source> <translation>نادرست</translation> </message> <message> <location line="-209"/> <source>, has not been successfully broadcast yet</source> <translation>هنوز با مو فقیت ارسال نشده</translation> </message> <message numerus="yes"> <location line="-35"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+70"/> <source>unknown</source> <translation>مشخص نیست </translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>جزییات معاملات</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>در این قاب شیشه توصیف دقیق معامله نشان می شود</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+225"/> <source>Date</source> <translation>تاریخ</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>نوع</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message numerus="yes"> <location line="+57"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform></translation> </message> <message> <location line="+3"/> <source>Open until %1</source> <translation>از شده تا 1%1</translation> </message> <message> <location line="+3"/> <source>Offline (%1 confirmations)</source> <translation>افلایین (%1)</translation> </message> <message> <location line="+3"/> <source>Unconfirmed (%1 of %2 confirmations)</source> <translation>تایید نشده (%1/%2)</translation> </message> <message> <location line="+3"/> <source>Confirmed (%1 confirmations)</source> <translation>تایید شده (%1)</translation> </message> <message numerus="yes"> <location line="+8"/> <source>Mined balance will be available when it matures in %n more block(s)</source> <translation><numerusform>بالانس/تتمه حساب استخراج شده زمانی که %n از بیشتر بلاکها بالغ شدند در دسترس خواهد بود بالانس/تتمه حساب استخراج شده زمانی که n% از بیشتر بلاکها بالغ شدند در دسترس خواهد بود</numerusform></translation> </message> <message> <location line="+5"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>این بلوک از دیگر گره ها در یافت نشده بدین دلیل شاید قابل قابول نیست</translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>تولید شده ولی قبول نشده</translation> </message> <message> <location line="+43"/> <source>Received with</source> <translation>در یافت با :</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation>دریافتی از</translation> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>ارسال به :</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>پر داخت به خودتان</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(کاربرد ندارد)</translation> </message> <message> <location line="+199"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation>وضعیت معالمه . عرصه که تعداد تایید نشان می دهد</translation> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation>تاریخ و ساعت در یافت معامله</translation> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation>نوع معاملات</translation> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation>آدرس مقصود معاملات </translation> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation>مبلغ از تزار شما خارج یا وارد شده</translation> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+52"/> <location line="+16"/> <source>All</source> <translation>همه</translation> </message> <message> <location line="-15"/> <source>Today</source> <translation>امروز</translation> </message> <message> <location line="+1"/> <source>This week</source> <translation>این هفته</translation> </message> <message> <location line="+1"/> <source>This month</source> <translation>این ماه</translation> </message> <message> <location line="+1"/> <source>Last month</source> <translation>ماه گذشته</translation> </message> <message> <location line="+1"/> <source>This year</source> <translation>امسال</translation> </message> <message> <location line="+1"/> <source>Range...</source> <translation>محدوده </translation> </message> <message> <location line="+11"/> <source>Received with</source> <translation>در یافت با</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>ارسال به</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation>به خودتان </translation> </message> <message> <location line="+1"/> <source>Mined</source> <translation>استخراج</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation>یگر </translation> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation>برای جست‌‌وجو نشانی یا برچسب را وارد کنید</translation> </message> <message> <location line="+7"/> <source>Min amount</source> <translation>حد اقل مبلغ </translation> </message> <message> <location line="+34"/> <source>Copy address</source> <translation>کپی آدرس </translation> </message> <message> <location line="+1"/> <source>Copy label</source> <translation>کپی بر چسب</translation> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation>روگرفت مقدار</translation> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation>اصلاح بر چسب</translation> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation>جزئیات تراکنش را نمایش بده</translation> </message> <message> <location line="+139"/> <source>Export Transaction Data</source> <translation>صادرات تاریخ معامله</translation> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Comma فایل جدا </translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation>تایید شده</translation> </message> <message> <location line="+1"/> <source>Date</source> <translation>تاریخ </translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>نوع </translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>ر چسب</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>ایل جدا </translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>مبلغ</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation>آی دی</translation> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation>خطای صادرت</translation> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation>تا فایل %1 نمی شود نوشت</translation> </message> <message> <location line="+100"/> <source>Range:</source> <translation>&gt;محدوده</translation> </message> <message> <location line="+8"/> <source>to</source> <translation>به</translation> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+193"/> <source>Send Coins</source> <translation>ارسال سکه ها</translation> </message> </context> <context> <name>WalletView</name> <message> <location filename="../walletview.cpp" line="+42"/> <source>&amp;Export</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Export the data in the current tab to a file</source> <translation>داده ها نوارِ جاری را به فایل انتقال دهید</translation> </message> <message> <location line="+193"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Backup Successful</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The wallet data was successfully saved to the new location.</source> <translation type="unfinished"/> </message> </context> <context> <name>Babylonian-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+94"/> <source>Babylonian version</source> <translation>سخه بیتکویین</translation> </message> <message> <location line="+102"/> <source>Usage:</source> <translation>ستفاده :</translation> </message> <message> <location line="-29"/> <source>Send command to -server or quarkcoind</source> <translation>ارسال فرمان به سرور یا باتکویین</translation> </message> <message> <location line="-23"/> <source>List commands</source> <translation>لیست فومان ها</translation> </message> <message> <location line="-12"/> <source>Get help for a command</source> <translation>کمک برای فرمان </translation> </message> <message> <location line="+24"/> <source>Options:</source> <translation>تنظیمات</translation> </message> <message> <location line="+24"/> <source>Specify configuration file (default: Babylonian.conf)</source> <translation>(: Babylonian.confپیش فرض: )فایل تنظیمی خاص </translation> </message> <message> <location line="+3"/> <source>Specify pid file (default: quarkcoind.pid)</source> <translation>(quarkcoind.pidپیش فرض : ) فایل پید خاص</translation> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation>دایرکتور اطلاعاتی خاص</translation> </message> <message> <location line="-9"/> <source>Set database cache size in megabytes (default: 25)</source> <translation>سایز کَش بانک داده را بر حسب مگابایت تنظیم کنید (پیش فرض:25)</translation> </message> <message> <location line="-28"/> <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source> <translation>برای اتصالات به &lt;port&gt; (پیش‌فرض: 8333 یا تست‌نت: 18333) گوش کنید</translation> </message> <message> <location line="+5"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation>حداکثر &lt;n&gt; اتصال با همکاران برقرار داشته باشید (پیش‌فرض: 125)</translation> </message> <message> <location line="-48"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation>اتصال به گره برای دریافت آدرسهای قرینه و قطع اتصال</translation> </message> <message> <location line="+82"/> <source>Specify your own public address</source> <translation>آدرس عمومی خود را ذکر کنید</translation> </message> <message> <location line="+3"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation>آستانه برای قطع ارتباط با همکاران بدرفتار (پیش‌فرض: 100)</translation> </message> <message> <location line="-134"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation>مدت زمان به ثانیه برای جلوگیری از همکاران بدرفتار برای اتصال دوباره (پیش‌فرض: 86400)</translation> </message> <message> <location line="-29"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation>در زمان تنظیم درگاه RPX %u در فهرست کردن %s اشکالی رخ داده است</translation> </message> <message> <location line="+27"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source> <translation>( 8332پیش فرض :) &amp;lt;poort&amp;gt; JSON-RPC شنوایی برای ارتباطات</translation> </message> <message> <location line="+37"/> <source>Accept command line and JSON-RPC commands</source> <translation>JSON-RPC قابل فرمانها و</translation> </message> <message> <location line="+76"/> <source>Run in the background as a daemon and accept commands</source> <translation>اجرای در پس زمینه به عنوان شبح و قبول فرمان ها</translation> </message> <message> <location line="+37"/> <source>Use the test network</source> <translation>استفاده شبکه آزمایش</translation> </message> <message> <location line="-112"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation> </message> <message> <location line="-80"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=quarkcoinrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;Babylonian Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Cannot obtain a lock on data directory %s. Babylonian is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation>حجم حداکثر تراکنشهای با/کم اهمیت را به بایت تنظیم کنید (پیش فرض:27000)</translation> </message> <message> <location line="+6"/> <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation>هشدار:paytxfee بسیار بالا تعریف شده است! این هزینه تراکنش است که باید در زمان ارسال تراکنش بپردازید</translation> </message> <message> <location line="+3"/> <source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source> <translation>هشدار: تراکنش نمایش داده شده ممکن است صحیح نباشد! شما/یا یکی از گره ها به روزآمد سازی نیاز دارید </translation> </message> <message> <location line="+3"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Babylonian will not work properly.</source> <translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد Babylonian ممکن است صحیح کار نکند</translation> </message> <message> <location line="+3"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Block creation options:</source> <translation>بستن گزینه ایجاد</translation> </message> <message> <location line="+5"/> <source>Connect only to the specified node(s)</source> <translation>تنها در گره (های) مشخص شده متصل شوید</translation> </message> <message> <location line="+3"/> <source>Corrupted block database detected</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation> </message> <message> <location line="+1"/> <source>Do you want to rebuild the block database now?</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error initializing block database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error initializing wallet database environment %s!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading block database</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error opening block database</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: Wallet locked, unable to create transaction!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error: system error: </source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0 برای اینکار استفاده کیند.</translation> </message> <message> <location line="+1"/> <source>Failed to read block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to read block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to sync block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write block</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write file info</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write to coin database</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write transaction index</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Failed to write undo data</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Find peers using DNS lookup (default: 1 unless -connect)</source> <translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation> </message> <message> <location line="+1"/> <source>Generate coins (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 288, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-4, default: 3)</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Not enough file descriptors available.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Rebuild block chain index from current blk000??.dat files</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Set the number of threads to service RPC calls (default: 4)</source> <translation type="unfinished"/> </message> <message> <location line="+26"/> <source>Verifying blocks...</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Verifying wallet...</source> <translation type="unfinished"/> </message> <message> <location line="-69"/> <source>Imports blocks from external blk000??.dat file</source> <translation type="unfinished"/> </message> <message> <location line="-76"/> <source>Set the number of script verification threads (up to 16, 0 = auto, &lt;0 = leave that many cores free, default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Information</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation>آدرس نرم افزار تور غلط است %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Maintain a full transaction index (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:5000)</translation> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;* 1000 بایت (پیش فرض:1000)</translation> </message> <message> <location line="+2"/> <source>Only accept block chain matching built-in checkpoints (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation>تنها =به گره ها در شبکه متصا شوید &lt;net&gt; (IPv4, IPv6 or Tor)</translation> </message> <message> <location line="+2"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation>برونداد اطلاعات اشکال زدایی اضافی. گزینه های اشکال زدایی دیگر رفع شدند</translation> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation>برونداد اطلاعات اشکال زدایی اضافی برای شبکه</translation> </message> <message> <location line="+2"/> <source>Prepend debug output with timestamp</source> <translation>به خروجی اشکال‌زدایی برچسب زمان بزنید</translation> </message> <message> <location line="+5"/> <source>SSL options: (see the Babylonian Wiki for SSL setup instructions)</source> <translation>گزینه ssl (به ویکیquarkcoin برای راهنمای راه اندازی ssl مراجعه شود)</translation> </message> <message> <location line="+1"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation>نسخه ای از پراکسی ساکس را برای استفاده انتخاب کنید (4-5 پیش فرض:5)</translation> </message> <message> <location line="+3"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation>اطلاعات ردگیری/اشکال‌زدایی را به اشکال‌زدا بفرستید</translation> </message> <message> <location line="+5"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation>حداکثر سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 250000)</translation> </message> <message> <location line="+1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation> </message> <message> <location line="+2"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation>فایل debug.log را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation> </message> <message> <location line="+1"/> <source>Signing transaction failed</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation>(میلی ثانیه )فاصله ارتباط خاص</translation> </message> <message> <location line="+4"/> <source>System error: </source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Transaction amount too small</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction amounts must be positive</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transaction too large</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation> </message> <message> <location line="+1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation>از UPnP برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation> </message> <message> <location line="+1"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation>برای دستیابی به سرویس مخفیانه نرم افزار تور از پراکسی استفاده کنید (پیش فرض:same as -proxy)</translation> </message> <message> <location line="+2"/> <source>Username for JSON-RPC connections</source> <translation>JSON-RPC شناسه برای ارتباطات</translation> </message> <message> <location line="+4"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation> </message> <message> <location line="+1"/> <source>You need to rebuild the databases using -reindex to change -txindex</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-50"/> <source>Password for JSON-RPC connections</source> <translation>JSON-RPC عبارت عبور برای ارتباطات</translation> </message> <message> <location line="-67"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation> </message> <message> <location line="+76"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation>(127.0.0.1پیش فرض: ) &amp;lt;ip&amp;gt; دادن فرمانها برای استفاده گره ها روی</translation> </message> <message> <location line="-120"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation> </message> <message> <location line="+147"/> <source>Upgrade wallet to latest format</source> <translation>wallet را به جدیدترین فرمت روزآمد کنید</translation> </message> <message> <location line="-21"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation> (100پیش فرض:)&amp;lt;n&amp;gt; گذاشتن اندازه کلید روی </translation> </message> <message> <location line="-12"/> <source>Rescan the block chain for missing wallet transactions</source> <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation> </message> <message> <location line="+35"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation>JSON-RPCبرای ارتباطات استفاده کنید OpenSSL (https)</translation> </message> <message> <location line="-26"/> <source>Server certificate file (default: server.cert)</source> <translation> (server.certپیش فرض: )گواهی نامه سرور</translation> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation> </message> <message> <location line="-151"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation>رمز های قابل قبول( TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation> </message> <message> <location line="+165"/> <source>This help message</source> <translation>پیام کمکی</translation> </message> <message> <location line="+6"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation> </message> <message> <location line="-91"/> <source>Connect through socks proxy</source> <translation>اتصال از طریق پراکسی ساکس</translation> </message> <message> <location line="-10"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation> </message> <message> <location line="+55"/> <source>Loading addresses...</source> <translation>بار گیری آدرس ها</translation> </message> <message> <location line="-35"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation> </message> <message> <location line="+1"/> <source>Error loading wallet.dat: Wallet requires newer version of Babylonian</source> <translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation> </message> <message> <location line="+93"/> <source>Wallet needed to be rewritten: restart Babylonian to complete</source> <translation>سلام</translation> </message> <message> <location line="-95"/> <source>Error loading wallet.dat</source> <translation>خطا در بارگیری wallet.dat</translation> </message> <message> <location line="+28"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation>آدرس پراکسی اشتباه %s</translation> </message> <message> <location line="+56"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: &apos;%s&apos;</translation> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation>نسخه پراکسی ساکس غیرقابل شناسایی درخواست شده است: %i</translation> </message> <message> <location line="-96"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation>آدرس قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+1"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation> </message> <message> <location line="+44"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation> </message> <message> <location line="+1"/> <source>Invalid amount</source> <translation>میزان وجه اشتباه</translation> </message> <message> <location line="-6"/> <source>Insufficient funds</source> <translation>بود جه نا کافی </translation> </message> <message> <location line="+10"/> <source>Loading block index...</source> <translation>بار گیری شاخص بلوک</translation> </message> <message> <location line="-57"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation>به اتصال یک گره اضافه کنید و اتصال را باز نگاه دارید</translation> </message> <message> <location line="-25"/> <source>Unable to bind to %s on this computer. Babylonian is probably already running.</source> <translation>اتصال به %s از این رایانه امکان پذیر نیست. Babylonian احتمالا در حال اجراست.</translation> </message> <message> <location line="+64"/> <source>Fee per KB to add to transactions you send</source> <translation>پر داجت برای هر کیلو بیت برای اضافه به معامله ارسال</translation> </message> <message> <location line="+19"/> <source>Loading wallet...</source> <translation>بار گیری والت</translation> </message> <message> <location line="-52"/> <source>Cannot downgrade wallet</source> <translation>امکان تنزل نسخه در wallet وجود ندارد</translation> </message> <message> <location line="+3"/> <source>Cannot write default address</source> <translation>آدرس پیش فرض قابل ذخیره نیست</translation> </message> <message> <location line="+64"/> <source>Rescanning...</source> <translation>اسکان مجدد</translation> </message> <message> <location line="-57"/> <source>Done loading</source> <translation>بار گیری انجام شده است</translation> </message> <message> <location line="+82"/> <source>To use the %s option</source> <translation>برای استفاده از %s از انتخابات</translation> </message> <message> <location line="-74"/> <source>Error</source> <translation>خطا</translation> </message> <message> <location line="-31"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation>%s، شما باید یک rpcpassword را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید. </translation> </message> </context> </TS>
bblonian/Babylonian
src/qt/locale/bitcoin_fa.ts
TypeScript
mit
119,341
import sys from stack import Stack def parse_expression_into_parts(expression): """ Parse expression into list of parts :rtype : list :param expression: str # i.e. "2 * 3 + ( 2 - 3 )" """ raise NotImplementedError("complete me!") def evaluate_expression(a, b, op): raise NotImplementedError("complete me!") def evaluate_postfix(parts): raise NotImplementedError("complete me!") if __name__ == "__main__": expr = None if len(sys.argv) > 1: expr = sys.argv[1] parts = parse_expression_into_parts(expr) print "Evaluating %s == %s" % (expr, evaluate_postfix(parts)) else: print 'Usage: python postfix.py "<expr>" -- i.e. python postfix.py "9 1 3 + 2 * -"' print "Spaces are required between every term."
tylerprete/evaluate-math
postfix.py
Python
mit
792
// Preprocessor Directives #define STB_IMAGE_IMPLEMENTATION // Local Headers #include "glitter.hpp" #include "shader.h" #include "camera.h" // Console Color #include "consoleColor.hpp" // System Headers #include <glad/glad.h> #include <GLFW/glfw3.h> #include <glm/gtc/matrix_transform.hpp> // Standard Headers //#include <cstdio> //#include <cstdlib> #include <iostream> // ÉùÃ÷°´¼üº¯Êý void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); void do_movement(); void mouse_callback(GLFWwindow* window, double xpos, double ypos); void scroll_callback(GLFWwindow* window, double xoffset, double yoffset); // Ïà»ú Camera camera(glm::vec3(0.0f, 0.0f, 3.0f)); bool keys[1024]; GLfloat lastX = 400, lastY = 300; bool firstMouse = true; // ʱ¼äÔöÁ¿Deltatime GLfloat deltaTime = 0.0f; // Time between current frame and last frame GLfloat lastFrame = 0.0f; // Time of last frame int main(int argc, char * argv[]) { // glfw³õʼ»¯ glfwInit(); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // ´ËÐÐÓÃÀ´¸øMac OS Xϵͳ×ö¼æÈÝ glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // ´´½¨´°¿Ú,»ñÈ¡´°¿ÚÉÏÉÏÏÂÎÄ GLFWwindow* window = glfwCreateWindow(mWidth, mHeight, "LearnOpenGL", nullptr, nullptr); if (window == nullptr) { std::cout << "Failed to create GLFW window" << std::endl; glfwTerminate(); return -1; } glfwMakeContextCurrent(window); // ͨ¹ýglfw×¢²áʼþ»Øµ÷ glfwSetKeyCallback(window, key_callback); glfwSetCursorPosCallback(window, mouse_callback); glfwSetScrollCallback(window, scroll_callback); // Load OpenGL Functions gladLoadGL(); // fprintf(stderr, "OpenGL %s\n", glGetString(GL_VERSION)); std::cout << BLUE << "OpenGL " << glGetString(GL_VERSION) << RESET << std::endl; // ²éѯGPU×î´óÖ§³Ö¶¥µã¸öÊý // GLint nrAttributes; // glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &nrAttributes); // std::cout << GREEN << "Maximum nr of vertex attributes supported: " << nrAttributes << RESET << std::endl; // »ñÈ¡ÊÓ¿Ú int width, height; glfwGetFramebufferSize(window, &width, &height); glViewport(0, 0, width, height); // ÉèÖÃOpenGL¿ÉÑ¡Ïî glEnable(GL_DEPTH_TEST); // ¿ªÆôÉî¶È²âÊÔ glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); // ±àÒë×ÅÉ«Æ÷³ÌÐò Shader ourShader("vert.vert", "frag.frag"); // ¶¥µãÊäÈë GLfloat vertices[] = { 4.77E-09,1.20595,-0.03172, -4.77E-09,1.21835,-0.03041, 0.0203,1.20699,-0.02182, 0.0203,1.20699,-0.02182, -4.77E-09,1.21835,-0.03041, 0.01984,1.2199,-0.02031, 0.02003,1.23105,-0.02186, 0.02721,1.23366,-0.00837, 0.01984,1.2199,-0.02031, 0.01984,1.2199,-0.02031, 0.02721,1.23366,-0.00837, 0.02645,1.21863,-0.00141, -4.77E-09,1.21835,-0.03041, 0,1.22734,-0.03069, 0.01984,1.2199,-0.02031, 0.01984,1.2199,-0.02031, 0,1.22734,-0.03069, 0.02003,1.23105,-0.02186, 0.01468,1.22309,0.01994, -4.77E-09,1.21742,0.02325, 0.01567,1.21306,0.01439, 0.01567,1.21306,0.01439, -4.77E-09,1.21742,0.02325, 0,1.20973,0.0205, 0,1.1706,0.01972, 0.01756,1.17823,0.0107, -9.54E-09,1.19759,0.01869, -9.54E-09,1.19759,0.01869, 0.01756,1.17823,0.0107, 0.01641,1.19993,0.01229, 0.01756,1.17823,0.0107, 0.02891,1.19263,-0.00685, 0.01641,1.19993,0.01229, 0.01641,1.19993,0.01229, 0.02891,1.19263,-0.00685, 0.02695,1.20501,-0.00425, 0.02695,1.20501,-0.00425, 0.02891,1.19263,-0.00685, 0.0203,1.20699,-0.02182, 0.0203,1.20699,-0.02182, 0.02891,1.19263,-0.00685, 0.02235,1.18587,-0.02614, 9.55E-09,1.1844,-0.03646, 4.77E-09,1.20595,-0.03172, 0.02235,1.18587,-0.02614, 0.02235,1.18587,-0.02614, 4.77E-09,1.20595,-0.03172, 0.0203,1.20699,-0.02182, 0.01567,1.21306,0.01439, 0,1.20973,0.0205, 0.01641,1.19993,0.01229, 0.01641,1.19993,0.01229, 0,1.20973,0.0205, -9.54E-09,1.19759,0.01869, 0.0203,1.20699,-0.02182, 0.01984,1.2199,-0.02031, 0.02695,1.20501,-0.00425, 0.02695,1.20501,-0.00425, 0.01984,1.2199,-0.02031, 0.02645,1.21863,-0.00141, 0.02645,1.21863,-0.00141, 0.01567,1.21306,0.01439, 0.02695,1.20501,-0.00425, 0.02695,1.20501,-0.00425, 0.01567,1.21306,0.01439, 0.01641,1.19993,0.01229, -0.01984,1.2199,-0.02031, -4.77E-09,1.21835,-0.03041, -0.0203,1.20699,-0.02182, -0.0203,1.20699,-0.02182, -4.77E-09,1.21835,-0.03041, 4.77E-09,1.20595,-0.03172, -0.02003,1.23105,-0.02186, -0.01984,1.2199,-0.02031, -0.02721,1.23366,-0.00837, -0.02721,1.23366,-0.00837, -0.01984,1.2199,-0.02031, -0.02645,1.21863,-0.00141, -4.77E-09,1.21835,-0.03041, -0.01984,1.2199,-0.02031, 0,1.22734,-0.03069, 0,1.22734,-0.03069, -0.01984,1.2199,-0.02031, -0.02003,1.23105,-0.02186, 0,1.20973,0.0205, -4.77E-09,1.21742,0.02325, -0.01567,1.21306,0.01439, -0.01567,1.21306,0.01439, -4.77E-09,1.21742,0.02325, -0.01468,1.22309,0.01994, -0.01641,1.19993,0.01229, -0.01756,1.17823,0.0107, -9.54E-09,1.19759,0.01869, -9.54E-09,1.19759,0.01869, -0.01756,1.17823,0.0107, 0,1.1706,0.01972, -0.01756,1.17823,0.0107, -0.01641,1.19993,0.01229, -0.02891,1.19263,-0.00685, -0.02891,1.19263,-0.00685, -0.01641,1.19993,0.01229, -0.02695,1.20501,-0.00425, -0.02235,1.18587,-0.02614, -0.02891,1.19263,-0.00685, -0.0203,1.20699,-0.02182, -0.0203,1.20699,-0.02182, -0.02891,1.19263,-0.00685, -0.02695,1.20501,-0.00425, -0.0203,1.20699,-0.02182, 4.77E-09,1.20595,-0.03172, -0.02235,1.18587,-0.02614, -0.02235,1.18587,-0.02614, 4.77E-09,1.20595,-0.03172, 9.55E-09,1.1844,-0.03646, -9.54E-09,1.19759,0.01869, 0,1.20973,0.0205, -0.01641,1.19993,0.01229, -0.01641,1.19993,0.01229, 0,1.20973,0.0205, -0.01567,1.21306,0.01439, -0.0203,1.20699,-0.02182, -0.02695,1.20501,-0.00425, -0.01984,1.2199,-0.02031, -0.01984,1.2199,-0.02031, -0.02695,1.20501,-0.00425, -0.02645,1.21863,-0.00141, -0.01641,1.19993,0.01229, -0.01567,1.21306,0.01439, -0.02695,1.20501,-0.00425, -0.02695,1.20501,-0.00425, -0.01567,1.21306,0.01439, -0.02645,1.21863,-0.00141, 0.01567,1.21306,0.01439, 0.02503,1.23017,0.00403, 0.01468,1.22309,0.01994, 0.01567,1.21306,0.01439, 0.02645,1.21863,-0.00141, 0.02503,1.23017,0.00403, 0.02503,1.23017,0.00403, 0.02645,1.21863,-0.00141, 0.02721,1.23366,-0.00837, -0.01567,1.21306,0.01439, -0.01468,1.22309,0.01994, -0.02503,1.23017,0.00403, -0.01567,1.21306,0.01439, -0.02503,1.23017,0.00403, -0.02645,1.21863,-0.00141, -0.02503,1.23017,0.00403, -0.02721,1.23366,-0.00837, -0.02645,1.21863,-0.00141, 0.03139,1.3603,0.07762, 0.04587,1.36008,0.07223, 0.03149,1.37552,0.0749, 0.03149,1.37552,0.0749, 0.04587,1.36008,0.07223, 0.04652,1.37396,0.06917, 0.07023,1.27958,0.03767, 0.0723,1.28971,0.038, 0.06858,1.27965,0.0514, 0.06858,1.27965,0.0514, 0.0723,1.28971,0.038, 0.07096,1.29082,0.0514, 0.01638,1.25964,0.08754, 0.01459,1.25007,0.08622, 0.02834,1.25692,0.08309, 0.02834,1.25692,0.08309, 0.01459,1.25007,0.08622, 0.02647,1.2487,0.08191, 0.0061,1.21616,0.06352, 0.0124,1.21815,0.06233, 0.00641,1.21884,0.06702, 0.00641,1.21884,0.06702, 0.0124,1.21815,0.06233, 0.01268,1.2208,0.0666, 0.01261,1.21771,0.05502, 0.0124,1.21815,0.06233, 0.00648,1.21591,0.05586, 0.00648,1.21591,0.05586, 0.0124,1.21815,0.06233, 0.0061,1.21616,0.06352, 0.05295,1.24491,0.06126, 0.05363,1.24466,0.05153, 0.05795,1.25184,0.06138, 0.05795,1.25184,0.06138, 0.05363,1.24466,0.05153, 0.0591,1.25166,0.05157, 0.02235,1.22209,0.06108, 0.02252,1.2218,0.05414, 0.03282,1.22791,0.0613, 0.03282,1.22791,0.0613, 0.02252,1.2218,0.05414, 0.0333,1.22787,0.05316, 0.02252,1.2218,0.05414, 0.02235,1.22209,0.06108, 0.01261,1.21771,0.05502, 0.01261,1.21771,0.05502, 0.02235,1.22209,0.06108, 0.0124,1.21815,0.06233, 0.02894,1.22811,0.0672, 0.03093,1.22799,0.06463, 0.0362,1.23491,0.06981, 0.0362,1.23491,0.06981, 0.03093,1.22799,0.06463, 0.03978,1.23434,0.06523, 0.05434,1.25252,0.06685, 0.04685,1.25365,0.07409, 0.05024,1.24555,0.06635, 0.05024,1.24555,0.06635, 0.04685,1.25365,0.07409, 0.04379,1.24654,0.07316, 0.0735,1.28922,0.02501, 0.0723,1.28971,0.038, 0.07095,1.27964,0.02588, 0.07095,1.27964,0.02588, 0.0723,1.28971,0.038, 0.07023,1.27958,0.03767, 0.05134,1.24564,0.01876, 0.0536,1.24468,0.02831, 0.04519,1.2403,0.02048, 0.04519,1.2403,0.02048, 0.0536,1.24468,0.02831, 0.04799,1.23945,0.02951, 0.0595,1.25156,0.0393, 0.05957,1.25153,0.02703, 0.06331,1.25887,0.03872, 0.06331,1.25887,0.03872, 0.05957,1.25153,0.02703, 0.06318,1.25883,0.02643, 0.05957,1.25153,0.02703, 0.0595,1.25156,0.0393, 0.0536,1.24468,0.02831, 0.0536,1.24468,0.02831, 0.0595,1.25156,0.0393, 0.05402,1.24445,0.04027, 0.04692,1.24657,0.00995, 0.05342,1.25298,0.00928, 0.05134,1.24564,0.01876, 0.05134,1.24564,0.01876, 0.05342,1.25298,0.00928, 0.05723,1.2522,0.01787, 0.04194,1.23381,0.04234, 0.04066,1.2338,0.03086, 0.04878,1.23893,0.04124, 0.04878,1.23893,0.04124, 0.04066,1.2338,0.03086, 0.04799,1.23945,0.02951, 0.07095,1.27964,0.02588, 0.07023,1.27958,0.03767, 0.06646,1.26648,0.02626, 0.06646,1.26648,0.02626, 0.07023,1.27958,0.03767, 0.06571,1.26606,0.03842, 0.02345,1.22239,0.04425, 0.02252,1.2218,0.05414, 0.01466,1.21907,0.0448, 0.01466,1.21907,0.0448, 0.02252,1.2218,0.05414, 0.01261,1.21771,0.05502, 0.04206,1.2795,0.07332, 0.03143,1.28117,0.07577, 0.04158,1.27434,0.07525, 0.04158,1.27434,0.07525, 0.03143,1.28117,0.07577, 0.03085,1.27622,0.0786, 0.06246,1.25878,0.0519, 0.06331,1.25887,0.03872, 0.06464,1.26573,0.05144, 0.06464,1.26573,0.05144, 0.06331,1.25887,0.03872, 0.06571,1.26606,0.03842, 0.05705,1.25905,0.06705, 0.04882,1.25987,0.07409, 0.05434,1.25252,0.06685, 0.05434,1.25252,0.06685, 0.04882,1.25987,0.07409, 0.04685,1.25365,0.07409, 0.00896,1.28062,0.0836, 0.0086,1.28722,0.08112, 0,1.28235,0.08499, 0,1.28235,0.08499, 0.0086,1.28722,0.08112, 0,1.2891,0.08302, 0.04061,1.26738,0.07744, 0.03032,1.26928,0.08152, 0.03952,1.26106,0.0782, 0.03952,1.26106,0.0782, 0.03032,1.26928,0.08152, 0.02943,1.26329,0.08302, 0.00949,1.26841,0.09069, 0.0179,1.26613,0.08729, 0.00942,1.27385,0.08785, 0.00942,1.27385,0.08785, 0.0179,1.26613,0.08729, 0.01921,1.27166,0.0853, 0.01254,1.35949,0.0839, 0.03139,1.3603,0.07762, 0.01352,1.37449,0.0805, 0.01352,1.37449,0.0805, 0.03139,1.3603,0.07762, 0.03149,1.37552,0.0749, 0.02173,1.31709,0.07831, 0.03247,1.32076,0.0765, 0.02158,1.32687,0.07898, 0.02158,1.32687,0.07898, 0.03247,1.32076,0.0765, 0.0331,1.33154,0.07653, 0.06019,1.27317,0.06641, 0.06462,1.27315,0.06051, 0.05984,1.28019,0.06589, 0.05984,1.28019,0.06589, 0.06462,1.27315,0.06051, 0.06572,1.2798,0.06003, 0.04519,1.23945,0.06554, 0.04016,1.2401,0.07158, 0.03978,1.23434,0.06523, 0.03978,1.23434,0.06523, 0.04016,1.2401,0.07158, 0.0362,1.23491,0.06981, 0.02432,1.24212,0.08008, 0.02647,1.2487,0.08191, 0.01386,1.2431,0.08354, 0.01386,1.2431,0.08354, 0.02647,1.2487,0.08191, 0.01459,1.25007,0.08622, 0.04066,1.2338,0.03086, 0.04194,1.23381,0.04234, 0.03154,1.22797,0.03229, 0.03154,1.22797,0.03229, 0.04194,1.23381,0.04234, 0.03257,1.22766,0.04363, 0.04066,1.2338,0.03086, 0.03154,1.22797,0.03229, 0.03809,1.23448,0.02291, 0.03809,1.23448,0.02291, 0.03154,1.22797,0.03229, 0.02885,1.22882,0.02475, 0.0357,1.24758,0.07746, 0.02647,1.2487,0.08191, 0.0329,1.24107,0.07576, 0.0329,1.24107,0.07576, 0.02647,1.2487,0.08191, 0.02432,1.24212,0.08008, 0.03817,1.25507,0.07805, 0.02834,1.25692,0.08309, 0.0357,1.24758,0.07746, 0.0357,1.24758,0.07746, 0.02834,1.25692,0.08309, 0.02647,1.2487,0.08191, 0.03085,1.27622,0.0786, 0.03143,1.28117,0.07577, 0.02007,1.27859,0.08134, 0.02007,1.27859,0.08134, 0.03143,1.28117,0.07577, 0.02062,1.28425,0.07855, 0.02834,1.25692,0.08309, 0.02943,1.26329,0.08302, 0.01638,1.25964,0.08754, 0.01638,1.25964,0.08754, 0.02943,1.26329,0.08302, 0.0179,1.26613,0.08729, 0.04611,1.34741,0.07345, 0.03228,1.34693,0.07827, 0.04568,1.34193,0.07366, 0.04568,1.34193,0.07366, 0.03228,1.34693,0.07827, 0.03255,1.34161,0.07752, 0.0086,1.28722,0.08112, 0.00896,1.28062,0.0836, 0.02062,1.28425,0.07855, 0.02062,1.28425,0.07855, 0.00896,1.28062,0.0836, 0.02007,1.27859,0.08134, 0.06877,1.37605,0.04344, 0.0588,1.38544,0.05528, 0.06907,1.36504,0.05375, 0.06907,1.36504,0.05375, 0.0588,1.38544,0.05528, 0.0591,1.37122,0.06388, 0.04651,1.38985,0.06161, 0.03157,1.39284,0.06592, 0.04652,1.37396,0.06917, 0.04652,1.37396,0.06917, 0.03157,1.39284,0.06592, 0.03149,1.37552,0.0749, 0.01352,1.37449,0.0805, 0.03149,1.37552,0.0749, 0.01383,1.39434,0.07041, 0.01383,1.39434,0.07041, 0.03149,1.37552,0.0749, 0.03157,1.39284,0.06592, 0.00942,1.27385,0.08785, 0.00896,1.28062,0.0836, 0,1.27583,0.08966, 0,1.27583,0.08966, 0.00896,1.28062,0.0836, 0,1.28235,0.08499, 0.00896,1.28062,0.0836, 0.00942,1.27385,0.08785, 0.02007,1.27859,0.08134, 0.02007,1.27859,0.08134, 0.00942,1.27385,0.08785, 0.01921,1.27166,0.0853, 0.03085,1.27622,0.0786, 0.02007,1.27859,0.08134, 0.03032,1.26928,0.08152, 0.03032,1.26928,0.08152, 0.02007,1.27859,0.08134, 0.01921,1.27166,0.0853, 0.04158,1.27434,0.07525, 0.03085,1.27622,0.0786, 0.04061,1.26738,0.07744, 0.04061,1.26738,0.07744, 0.03085,1.27622,0.0786, 0.03032,1.26928,0.08152, 0.05919,1.26579,0.06679, 0.06294,1.26572,0.06097, 0.06019,1.27317,0.06641, 0.06019,1.27317,0.06641, 0.06294,1.26572,0.06097, 0.06462,1.27315,0.06051, 0.05196,1.27963,0.0702, 0.04206,1.2795,0.07332, 0.05151,1.27351,0.07187, 0.05151,1.27351,0.07187, 0.04206,1.2795,0.07332, 0.04158,1.27434,0.07525, 0.05151,1.27351,0.07187, 0.04158,1.27434,0.07525, 0.05076,1.26639,0.07326, 0.05076,1.26639,0.07326, 0.04158,1.27434,0.07525, 0.04061,1.26738,0.07744, 0.0723,1.28971,0.038, 0.07385,1.29993,0.03892, 0.07096,1.29082,0.0514, 0.07096,1.29082,0.0514, 0.07385,1.29993,0.03892, 0.07238,1.30016,0.05146, 0.0735,1.28922,0.02501, 0.07524,1.29924,0.02406, 0.0723,1.28971,0.038, 0.0723,1.28971,0.038, 0.07524,1.29924,0.02406, 0.07385,1.29993,0.03892, 0.04222,1.28399,0.07212, 0.04321,1.30286,0.07431, 0.03165,1.28557,0.07493, 0.03165,1.28557,0.07493, 0.04321,1.30286,0.07431, 0.03212,1.3029,0.07701, 0.02172,1.30279,0.07802, 0.02113,1.28909,0.07723, 0.03212,1.3029,0.07701, 0.03212,1.3029,0.07701, 0.02113,1.28909,0.07723, 0.03165,1.28557,0.07493, 0.05192,1.28491,0.06885, 0.04222,1.28399,0.07212, 0.05196,1.27963,0.0702, 0.05196,1.27963,0.0702, 0.04222,1.28399,0.07212, 0.04206,1.2795,0.07332, 0.03165,1.28557,0.07493, 0.03143,1.28117,0.07577, 0.04222,1.28399,0.07212, 0.04222,1.28399,0.07212, 0.03143,1.28117,0.07577, 0.04206,1.2795,0.07332, 0.00832,1.29269,0.08068, 0.0086,1.28722,0.08112, 0.02113,1.28909,0.07723, 0.02113,1.28909,0.07723, 0.0086,1.28722,0.08112, 0.02062,1.28425,0.07855, 0.00641,1.21884,0.06702, 0.01268,1.2208,0.0666, 0.00625,1.22817,0.07456, 0.00625,1.22817,0.07456, 0.01268,1.2208,0.0666, 0.0123,1.22821,0.07384, 0.0735,1.28922,0.02501, 0.07406,1.28893,0.01498, 0.07524,1.29924,0.02406, 0.07524,1.29924,0.02406, 0.07406,1.28893,0.01498, 0.07573,1.29881,0.01441, 0.06318,1.25883,0.02643, 0.05957,1.25153,0.02703, 0.0609,1.25604,0.01715, 0.0609,1.25604,0.01715, 0.05957,1.25153,0.02703, 0.05723,1.2522,0.01787, 0.04519,1.2403,0.02048, 0.04799,1.23945,0.02951, 0.03809,1.23448,0.02291, 0.03809,1.23448,0.02291, 0.04799,1.23945,0.02951, 0.04066,1.2338,0.03086, 0.04379,1.24654,0.07316, 0.0357,1.24758,0.07746, 0.04016,1.2401,0.07158, 0.04016,1.2401,0.07158, 0.0357,1.24758,0.07746, 0.0329,1.24107,0.07576, 0.04685,1.25365,0.07409, 0.03817,1.25507,0.07805, 0.04379,1.24654,0.07316, 0.04379,1.24654,0.07316, 0.03817,1.25507,0.07805, 0.0357,1.24758,0.07746, 0.03952,1.26106,0.0782, 0.04882,1.25987,0.07409, 0.04061,1.26738,0.07744, 0.04061,1.26738,0.07744, 0.04882,1.25987,0.07409, 0.05076,1.26639,0.07326, 0.0362,1.23491,0.06981, 0.02972,1.23563,0.07368, 0.02894,1.22811,0.0672, 0.02894,1.22811,0.0672, 0.02972,1.23563,0.07368, 0.02368,1.22846,0.07047, 0.06646,1.26648,0.02626, 0.06571,1.26606,0.03842, 0.06318,1.25883,0.02643, 0.06318,1.25883,0.02643, 0.06571,1.26606,0.03842, 0.06331,1.25887,0.03872, 0.05919,1.26579,0.06679, 0.05076,1.26639,0.07326, 0.05705,1.25905,0.06705, 0.05705,1.25905,0.06705, 0.05076,1.26639,0.07326, 0.04882,1.25987,0.07409, 0.02943,1.26329,0.08302, 0.02834,1.25692,0.08309, 0.03952,1.26106,0.0782, 0.03952,1.26106,0.0782, 0.02834,1.25692,0.08309, 0.03817,1.25507,0.07805, 0.03032,1.26928,0.08152, 0.01921,1.27166,0.0853, 0.02943,1.26329,0.08302, 0.02943,1.26329,0.08302, 0.01921,1.27166,0.0853, 0.0179,1.26613,0.08729, 0.03817,1.25507,0.07805, 0.04685,1.25365,0.07409, 0.03952,1.26106,0.0782, 0.03952,1.26106,0.0782, 0.04685,1.25365,0.07409, 0.04882,1.25987,0.07409, 0.0536,1.24468,0.02831, 0.05402,1.24445,0.04027, 0.04799,1.23945,0.02951, 0.04799,1.23945,0.02951, 0.05402,1.24445,0.04027, 0.04878,1.23893,0.04124, 0.05363,1.24466,0.05153, 0.05295,1.24491,0.06126, 0.04843,1.23908,0.05175, 0.04843,1.23908,0.05175, 0.05295,1.24491,0.06126, 0.04773,1.23921,0.06125, 0.05024,1.24555,0.06635, 0.04379,1.24654,0.07316, 0.04519,1.23945,0.06554, 0.04519,1.23945,0.06554, 0.04379,1.24654,0.07316, 0.04016,1.2401,0.07158, 0.01315,1.23656,0.08006, 0.02085,1.23626,0.07781, 0.01386,1.2431,0.08354, 0.01386,1.2431,0.08354, 0.02085,1.23626,0.07781, 0.02432,1.24212,0.08008, 0.02085,1.23626,0.07781, 0.02972,1.23563,0.07368, 0.02432,1.24212,0.08008, 0.02432,1.24212,0.08008, 0.02972,1.23563,0.07368, 0.0329,1.24107,0.07576, 0.02972,1.23563,0.07368, 0.0362,1.23491,0.06981, 0.0329,1.24107,0.07576, 0.0329,1.24107,0.07576, 0.0362,1.23491,0.06981, 0.04016,1.2401,0.07158, 0.05705,1.25905,0.06705, 0.06076,1.25889,0.06133, 0.05919,1.26579,0.06679, 0.05919,1.26579,0.06679, 0.06076,1.25889,0.06133, 0.06294,1.26572,0.06097, 0.05434,1.25252,0.06685, 0.05795,1.25184,0.06138, 0.05705,1.25905,0.06705, 0.05705,1.25905,0.06705, 0.05795,1.25184,0.06138, 0.06076,1.25889,0.06133, 0.01459,1.25007,0.08622, 0.01638,1.25964,0.08754, 0.0076,1.25064,0.088, 0.0076,1.25064,0.088, 0.01638,1.25964,0.08754, 0.00879,1.26171,0.09069, 0,1.21802,0.06771, 0,1.21473,0.06443, 0.00641,1.21884,0.06702, 0.00641,1.21884,0.06702, 0,1.21473,0.06443, 0.0061,1.21616,0.06352, 0,1.21473,0.06443, 0,1.21446,0.05669, 0.0061,1.21616,0.06352, 0.0061,1.21616,0.06352, 0,1.21446,0.05669, 0.00648,1.21591,0.05586, 0.00648,1.21591,0.05586, 0.00723,1.21695,0.04555, 0.01261,1.21771,0.05502, 0.01261,1.21771,0.05502, 0.00723,1.21695,0.04555, 0.01466,1.21907,0.0448, 0.0123,1.22821,0.07384, 0.01315,1.23656,0.08006, 0.00625,1.22817,0.07456, 0.00625,1.22817,0.07456, 0.01315,1.23656,0.08006, 0.00675,1.23669,0.08119, 0.01315,1.23656,0.08006, 0.01386,1.2431,0.08354, 0.00675,1.23669,0.08119, 0.00675,1.23669,0.08119, 0.01386,1.2431,0.08354, 0.00689,1.24354,0.08499, 0,1.22807,0.07536, 0,1.21802,0.06771, 0.00625,1.22817,0.07456, 0.00625,1.22817,0.07456, 0,1.21802,0.06771, 0.00641,1.21884,0.06702, 0.01478,1.22193,0.02696, 0.01477,1.22046,0.03429, -9.54E-09,1.21815,0.02846, -9.54E-09,1.21815,0.02846, 0.01477,1.22046,0.03429, 0,1.21761,0.03547, 0.01386,1.2431,0.08354, 0.01459,1.25007,0.08622, 0.00689,1.24354,0.08499, 0.00689,1.24354,0.08499, 0.01459,1.25007,0.08622, 0.0076,1.25064,0.088, 0.00832,1.29269,0.08068, 0.00805,1.30202,0.08029, 0,1.29425,0.08259, 0,1.29425,0.08259, 0.00805,1.30202,0.08029, 0,1.30203,0.08279, 0.00879,1.26171,0.09069, 0.00949,1.26841,0.09069, 0,1.26362,0.09341, 0,1.26362,0.09341, 0.00949,1.26841,0.09069, 0,1.27174,0.09502, 0.00625,1.22817,0.07456, 0.00675,1.23669,0.08119, 0,1.22807,0.07536, 0,1.22807,0.07536, 0.00675,1.23669,0.08119, 0,1.23682,0.08214, 0.00675,1.23669,0.08119, 0.00689,1.24354,0.08499, 0,1.23682,0.08214, 0,1.23682,0.08214, 0.00689,1.24354,0.08499, 0,1.24385,0.08592, 0.00949,1.26841,0.09069, 0.00942,1.27385,0.08785, 0,1.27174,0.09502, 0,1.27174,0.09502, 0.00942,1.27385,0.08785, 0,1.27583,0.08966, 0,1.32051,0.08428, 0.00931,1.32109,0.08153, 0,1.33386,0.08582, 0,1.33386,0.08582, 0.00931,1.32109,0.08153, 0.0113,1.33435,0.08343, 0.01383,1.39434,0.07041, 0,1.39425,0.07381, 0.01352,1.37449,0.0805, 0.01352,1.37449,0.0805, 0,1.39425,0.07381, 0,1.37428,0.08327, 0.01352,1.37449,0.0805, 0,1.37428,0.08327, 0.01254,1.35949,0.0839, 0.01254,1.35949,0.0839, 0,1.37428,0.08327, 0,1.3588,0.08654, 0.0119,1.34577,0.08461, 0,1.34487,0.08687, 0.0113,1.33435,0.08343, 0.0113,1.33435,0.08343, 0,1.34487,0.08687, 0,1.33386,0.08582, 0.0086,1.28722,0.08112, 0.00832,1.29269,0.08068, 0,1.2891,0.08302, 0,1.2891,0.08302, 0.00832,1.29269,0.08068, 0,1.29425,0.08259, 0.01254,1.35949,0.0839, 0,1.3588,0.08654, 0.0119,1.34577,0.08461, 0.0119,1.34577,0.08461, 0,1.3588,0.08654, 0,1.34487,0.08687, 0.00689,1.24354,0.08499, 0.0076,1.25064,0.088, 0,1.24385,0.08592, 0,1.24385,0.08592, 0.0076,1.25064,0.088, 0,1.25112,0.08923, 0,1.30796,0.08302, 0.00789,1.31027,0.08043, 0,1.32051,0.08428, 0,1.32051,0.08428, 0.00789,1.31027,0.08043, 0.00931,1.32109,0.08153, 0.0119,1.34577,0.08461, 0.01861,1.34091,0.08232, 0.03188,1.35226,0.07853, 0.03188,1.35226,0.07853, 0.01861,1.34091,0.08232, 0.03228,1.34693,0.07827, 0.01638,1.25964,0.08754, 0.0179,1.26613,0.08729, 0.00879,1.26171,0.09069, 0.00879,1.26171,0.09069, 0.0179,1.26613,0.08729, 0.00949,1.26841,0.09069, 0.0553,1.32054,0.06849, 0.05697,1.33119,0.0684, 0.04407,1.32169,0.07304, 0.04407,1.32169,0.07304, 0.05697,1.33119,0.0684, 0.04535,1.3333,0.0733, 0.03143,1.28117,0.07577, 0.03165,1.28557,0.07493, 0.02062,1.28425,0.07855, 0.02062,1.28425,0.07855, 0.03165,1.28557,0.07493, 0.02113,1.28909,0.07723, 0.07847,1.32401,0.02407, 0.07697,1.31061,0.02391, 0.07878,1.32355,0.01812, 0.07878,1.32355,0.01812, 0.07697,1.31061,0.02391, 0.0777,1.31122,0.01351, 0.05876,1.35078,0.06779, 0.05924,1.35889,0.06756, 0.04625,1.35276,0.07318, 0.04625,1.35276,0.07318, 0.05924,1.35889,0.06756, 0.04587,1.36008,0.07223, 0.03139,1.3603,0.07762, 0.03188,1.35226,0.07853, 0.04587,1.36008,0.07223, 0.04587,1.36008,0.07223, 0.03188,1.35226,0.07853, 0.04625,1.35276,0.07318, 0.0119,1.34577,0.08461, 0.03188,1.35226,0.07853, 0.01254,1.35949,0.0839, 0.01254,1.35949,0.0839, 0.03188,1.35226,0.07853, 0.03139,1.3603,0.07762, 0.06822,1.34604,0.06187, 0.06715,1.34033,0.06291, 0.07509,1.33874,0.05462, 0.07509,1.33874,0.05462, 0.06715,1.34033,0.06291, 0.07308,1.334,0.0574, 0.05849,1.34513,0.06759, 0.05876,1.35078,0.06779, 0.04611,1.34741,0.07345, 0.04611,1.34741,0.07345, 0.05876,1.35078,0.06779, 0.04625,1.35276,0.07318, 0.03228,1.34693,0.07827, 0.04611,1.34741,0.07345, 0.03188,1.35226,0.07853, 0.03188,1.35226,0.07853, 0.04611,1.34741,0.07345, 0.04625,1.35276,0.07318, 0.03247,1.32076,0.0765, 0.04407,1.32169,0.07304, 0.0331,1.33154,0.07653, 0.0331,1.33154,0.07653, 0.04407,1.32169,0.07304, 0.04535,1.3333,0.0733, 0.06715,1.34033,0.06291, 0.06566,1.33482,0.06396, 0.07308,1.334,0.0574, 0.07308,1.334,0.0574, 0.06566,1.33482,0.06396, 0.07028,1.32903,0.06039, 0.06566,1.33482,0.06396, 0.06281,1.32678,0.0652, 0.07028,1.32903,0.06039, 0.07028,1.32903,0.06039, 0.06281,1.32678,0.0652, 0.06632,1.32308,0.0629, 0.05697,1.33119,0.0684, 0.05815,1.33938,0.06792, 0.04535,1.3333,0.0733, 0.04535,1.3333,0.0733, 0.05815,1.33938,0.06792, 0.04568,1.34193,0.07366, 0.06572,1.2798,0.06003, 0.06858,1.27965,0.0514, 0.06782,1.29159,0.05893, 0.06782,1.29159,0.05893, 0.06858,1.27965,0.0514, 0.07096,1.29082,0.0514, 0.06294,1.26572,0.06097, 0.06464,1.26573,0.05144, 0.06462,1.27315,0.06051, 0.06462,1.27315,0.06051, 0.06464,1.26573,0.05144, 0.0667,1.27327,0.05123, 0.06076,1.25889,0.06133, 0.06246,1.25878,0.0519, 0.06294,1.26572,0.06097, 0.06294,1.26572,0.06097, 0.06246,1.25878,0.0519, 0.06464,1.26573,0.05144, 0.05795,1.25184,0.06138, 0.0591,1.25166,0.05157, 0.06076,1.25889,0.06133, 0.06076,1.25889,0.06133, 0.0591,1.25166,0.05157, 0.06246,1.25878,0.0519, 0.04843,1.23908,0.05175, 0.04773,1.23921,0.06125, 0.04179,1.234,0.05217, 0.04179,1.234,0.05217, 0.04773,1.23921,0.06125, 0.0414,1.23409,0.06121, 0.03282,1.22791,0.0613, 0.0333,1.22787,0.05316, 0.0414,1.23409,0.06121, 0.0414,1.23409,0.06121, 0.0333,1.22787,0.05316, 0.04179,1.234,0.05217, 0.05795,1.25184,0.06138, 0.05434,1.25252,0.06685, 0.05295,1.24491,0.06126, 0.05295,1.24491,0.06126, 0.05434,1.25252,0.06685, 0.05024,1.24555,0.06635, 0.04519,1.23945,0.06554, 0.04773,1.23921,0.06125, 0.05024,1.24555,0.06635, 0.05024,1.24555,0.06635, 0.04773,1.23921,0.06125, 0.05295,1.24491,0.06126, 0.03093,1.22799,0.06463, 0.03282,1.22791,0.0613, 0.03978,1.23434,0.06523, 0.03978,1.23434,0.06523, 0.03282,1.22791,0.0613, 0.0414,1.23409,0.06121, 0.03978,1.23434,0.06523, 0.0414,1.23409,0.06121, 0.04519,1.23945,0.06554, 0.04519,1.23945,0.06554, 0.0414,1.23409,0.06121, 0.04773,1.23921,0.06125, 0.05196,1.27963,0.0702, 0.05984,1.28019,0.06589, 0.05192,1.28491,0.06885, 0.05192,1.28491,0.06885, 0.05984,1.28019,0.06589, 0.0579,1.28663,0.06556, 0.05151,1.27351,0.07187, 0.06019,1.27317,0.06641, 0.05196,1.27963,0.0702, 0.05196,1.27963,0.0702, 0.06019,1.27317,0.06641, 0.05984,1.28019,0.06589, 0.05076,1.26639,0.07326, 0.05919,1.26579,0.06679, 0.05151,1.27351,0.07187, 0.05151,1.27351,0.07187, 0.05919,1.26579,0.06679, 0.06019,1.27317,0.06641, 0.06464,1.26573,0.05144, 0.06571,1.26606,0.03842, 0.0667,1.27327,0.05123, 0.0667,1.27327,0.05123, 0.06571,1.26606,0.03842, 0.07023,1.27958,0.03767, 0.06858,1.27965,0.0514, 0.06572,1.2798,0.06003, 0.0667,1.27327,0.05123, 0.0667,1.27327,0.05123, 0.06572,1.2798,0.06003, 0.06462,1.27315,0.06051, 0.06242,1.29301,0.06351, 0.06782,1.29159,0.05893, 0.06398,1.3,0.06301, 0.06398,1.3,0.06301, 0.06782,1.29159,0.05893, 0.06962,1.3,0.05828, 0.06398,1.3,0.06301, 0.06962,1.3,0.05828, 0.06391,1.30679,0.06338, 0.06391,1.30679,0.06338, 0.06962,1.3,0.05828, 0.06977,1.30839,0.05889, 0.06391,1.30679,0.06338, 0.06977,1.30839,0.05889, 0.06239,1.31339,0.06486, 0.06239,1.31339,0.06486, 0.06977,1.30839,0.05889, 0.06885,1.31663,0.06067, 0.05924,1.35889,0.06756, 0.05876,1.35078,0.06779, 0.07054,1.35545,0.05999, 0.07054,1.35545,0.05999, 0.05876,1.35078,0.06779, 0.06822,1.34604,0.06187, 0.06715,1.34033,0.06291, 0.06822,1.34604,0.06187, 0.05849,1.34513,0.06759, 0.05849,1.34513,0.06759, 0.06822,1.34604,0.06187, 0.05876,1.35078,0.06779, 0.06566,1.33482,0.06396, 0.06715,1.34033,0.06291, 0.05815,1.33938,0.06792, 0.05815,1.33938,0.06792, 0.06715,1.34033,0.06291, 0.05849,1.34513,0.06759, 0.06281,1.32678,0.0652, 0.06566,1.33482,0.06396, 0.05697,1.33119,0.0684, 0.05697,1.33119,0.0684, 0.06566,1.33482,0.06396, 0.05815,1.33938,0.06792, 0.03212,1.3029,0.07701, 0.04321,1.30286,0.07431, 0.03247,1.32076,0.0765, 0.03247,1.32076,0.0765, 0.04321,1.30286,0.07431, 0.04407,1.32169,0.07304, 0.02172,1.30279,0.07802, 0.03212,1.3029,0.07701, 0.02173,1.31709,0.07831, 0.02173,1.31709,0.07831, 0.03212,1.3029,0.07701, 0.03247,1.32076,0.0765, 0.01492,1.3025,0.0785, 0.02172,1.30279,0.07802, 0.01438,1.31283,0.07895, 0.01438,1.31283,0.07895, 0.02172,1.30279,0.07802, 0.02173,1.31709,0.07831, 0.00805,1.30202,0.08029, 0.01492,1.3025,0.0785, 0.00789,1.31027,0.08043, 0.00789,1.31027,0.08043, 0.01492,1.3025,0.0785, 0.01438,1.31283,0.07895, 0,1.30203,0.08279, 0.00805,1.30202,0.08029, 0,1.30796,0.08302, 0,1.30796,0.08302, 0.00805,1.30202,0.08029, 0.00789,1.31027,0.08043, 0.05322,1.30294,0.07019, 0.04321,1.30286,0.07431, 0.05192,1.28491,0.06885, 0.05192,1.28491,0.06885, 0.04321,1.30286,0.07431, 0.04222,1.28399,0.07212, 0.01438,1.31283,0.07895, 0.02173,1.31709,0.07831, 0.00931,1.32109,0.08153, 0.00931,1.32109,0.08153, 0.02173,1.31709,0.07831, 0.02158,1.32687,0.07898, 0.0331,1.33154,0.07653, 0.04535,1.3333,0.0733, 0.03255,1.34161,0.07752, 0.03255,1.34161,0.07752, 0.04535,1.3333,0.0733, 0.04568,1.34193,0.07366, 0.0731,1.30975,0.0524, 0.06977,1.30839,0.05889, 0.07238,1.30016,0.05146, 0.07238,1.30016,0.05146, 0.06977,1.30839,0.05889, 0.06962,1.3,0.05828, 0.06782,1.29159,0.05893, 0.07096,1.29082,0.0514, 0.06962,1.3,0.05828, 0.06962,1.3,0.05828, 0.07096,1.29082,0.0514, 0.07238,1.30016,0.05146, 0.04611,1.34741,0.07345, 0.04568,1.34193,0.07366, 0.05849,1.34513,0.06759, 0.05849,1.34513,0.06759, 0.04568,1.34193,0.07366, 0.05815,1.33938,0.06792, 0.04652,1.37396,0.06917, 0.04587,1.36008,0.07223, 0.0591,1.37122,0.06388, 0.0591,1.37122,0.06388, 0.04587,1.36008,0.07223, 0.05924,1.35889,0.06756, 0.04651,1.38985,0.06161, 0.04652,1.37396,0.06917, 0.0588,1.38544,0.05528, 0.0588,1.38544,0.05528, 0.04652,1.37396,0.06917, 0.0591,1.37122,0.06388, -9.54E-09,1.21815,0.02846, -4.77E-09,1.21742,0.02325, 0.01478,1.22193,0.02696, 0.01478,1.22193,0.02696, -4.77E-09,1.21742,0.02325, 0.01468,1.22309,0.01994, 0.02721,1.23366,-0.00837, 0.02003,1.23105,-0.02186, 0.03316,1.23991,-0.01178, 0.03316,1.23991,-0.01178, 0.02003,1.23105,-0.02186, 0.0228,1.23744,-0.02778, 0,1.23344,-0.03937, 0.0228,1.23744,-0.02778, 0,1.22734,-0.03069, 0,1.22734,-0.03069, 0.0228,1.23744,-0.02778, 0.02003,1.23105,-0.02186, 0.07549,1.35591,0.04042, 0.07662,1.34467,0.04784, 0.0794,1.3395,0.02451, 0.0794,1.3395,0.02451, 0.07662,1.34467,0.04784, 0.07767,1.32552,0.03517, 0.06907,1.36504,0.05375, 0.07054,1.35545,0.05999, 0.07549,1.35591,0.04042, 0.07549,1.35591,0.04042, 0.07054,1.35545,0.05999, 0.07662,1.34467,0.04784, 0.07594,1.31054,0.03424, 0.07767,1.32552,0.03517, 0.07447,1.31052,0.04458, 0.07447,1.31052,0.04458, 0.07767,1.32552,0.03517, 0.07591,1.32547,0.04546, 0.07767,1.32552,0.03517, 0.07594,1.31054,0.03424, 0.07847,1.32401,0.02407, 0.07847,1.32401,0.02407, 0.07594,1.31054,0.03424, 0.07697,1.31061,0.02391, 0.07697,1.31061,0.02391, 0.07594,1.31054,0.03424, 0.07524,1.29924,0.02406, 0.07524,1.29924,0.02406, 0.07594,1.31054,0.03424, 0.07385,1.29993,0.03892, 0.06331,1.25887,0.03872, 0.06246,1.25878,0.0519, 0.0595,1.25156,0.0393, 0.0595,1.25156,0.0393, 0.06246,1.25878,0.0519, 0.0591,1.25166,0.05157, 0.0595,1.25156,0.0393, 0.0591,1.25166,0.05157, 0.05402,1.24445,0.04027, 0.05402,1.24445,0.04027, 0.0591,1.25166,0.05157, 0.05363,1.24466,0.05153, 0.04843,1.23908,0.05175, 0.04878,1.23893,0.04124, 0.05363,1.24466,0.05153, 0.05363,1.24466,0.05153, 0.04878,1.23893,0.04124, 0.05402,1.24445,0.04027, 0.04878,1.23893,0.04124, 0.04843,1.23908,0.05175, 0.04194,1.23381,0.04234, 0.04194,1.23381,0.04234, 0.04843,1.23908,0.05175, 0.04179,1.234,0.05217, 0.0333,1.22787,0.05316, 0.03257,1.22766,0.04363, 0.04179,1.234,0.05217, 0.04179,1.234,0.05217, 0.03257,1.22766,0.04363, 0.04194,1.23381,0.04234, 0.03257,1.22766,0.04363, 0.0333,1.22787,0.05316, 0.02345,1.22239,0.04425, 0.02345,1.22239,0.04425, 0.0333,1.22787,0.05316, 0.02252,1.2218,0.05414, 0,1.21446,0.05669, 0,1.21552,0.04637, 0.00648,1.21591,0.05586, 0.00648,1.21591,0.05586, 0,1.21552,0.04637, 0.00723,1.21695,0.04555, 0.0536,1.24468,0.02831, 0.05134,1.24564,0.01876, 0.05957,1.25153,0.02703, 0.05957,1.25153,0.02703, 0.05134,1.24564,0.01876, 0.05723,1.2522,0.01787, 0.02885,1.22882,0.02475, 0.03154,1.22797,0.03229, 0.01478,1.22193,0.02696, 0.01478,1.22193,0.02696, 0.03154,1.22797,0.03229, 0.01477,1.22046,0.03429, 0.03809,1.23448,0.02291, 0.02885,1.22882,0.02475, 0.03478,1.23507,0.01392, 0.03478,1.23507,0.01392, 0.02885,1.22882,0.02475, 0.02579,1.22936,0.01621, 0.03809,1.23448,0.02291, 0.03478,1.23507,0.01392, 0.04519,1.2403,0.02048, 0.04519,1.2403,0.02048, 0.03478,1.23507,0.01392, 0.04196,1.24137,0.01174, 0.05134,1.24564,0.01876, 0.04519,1.2403,0.02048, 0.04692,1.24657,0.00995, 0.04692,1.24657,0.00995, 0.04519,1.2403,0.02048, 0.04196,1.24137,0.01174, 0.03862,1.24182,-0.00035, 0.03204,1.23539,0.0016, 0.03316,1.23991,-0.01178, 0.03316,1.23991,-0.01178, 0.03204,1.23539,0.0016, 0.02721,1.23366,-0.00837, 0.02579,1.22936,0.01621, 0.02885,1.22882,0.02475, 0.01468,1.22309,0.01994, 0.01468,1.22309,0.01994, 0.02885,1.22882,0.02475, 0.01478,1.22193,0.02696, 0.06724,1.26686,0.01577, 0.06646,1.26648,0.02626, 0.06332,1.25867,0.01678, 0.06332,1.25867,0.01678, 0.06646,1.26648,0.02626, 0.06318,1.25883,0.02643, 0.07177,1.28009,0.01507, 0.07095,1.27964,0.02588, 0.06724,1.26686,0.01577, 0.06724,1.26686,0.01577, 0.07095,1.27964,0.02588, 0.06646,1.26648,0.02626, 0.07406,1.28893,0.01498, 0.0735,1.28922,0.02501, 0.07177,1.28009,0.01507, 0.07177,1.28009,0.01507, 0.0735,1.28922,0.02501, 0.07095,1.27964,0.02588, 0.0777,1.31122,0.01351, 0.07697,1.31061,0.02391, 0.07573,1.29881,0.01441, 0.07573,1.29881,0.01441, 0.07697,1.31061,0.02391, 0.07524,1.29924,0.02406, -0.04652,1.37396,0.06917, -0.04587,1.36008,0.07223, -0.03149,1.37552,0.0749, -0.03149,1.37552,0.0749, -0.04587,1.36008,0.07223, -0.03139,1.3603,0.07762, -0.07023,1.27958,0.03767, -0.06858,1.27965,0.0514, -0.0723,1.28971,0.038, -0.0723,1.28971,0.038, -0.06858,1.27965,0.0514, -0.07096,1.29082,0.0514, -0.01638,1.25964,0.08754, -0.02834,1.25692,0.08309, -0.01459,1.25007,0.08622, -0.01459,1.25007,0.08622, -0.02834,1.25692,0.08309, -0.02647,1.2487,0.08191, -0.0061,1.21616,0.06352, -0.00641,1.21884,0.06702, -0.01248,1.21797,0.06233, -0.01248,1.21797,0.06233, -0.00641,1.21884,0.06702, -0.01271,1.22073,0.0666, -0.0061,1.21616,0.06352, -0.01248,1.21797,0.06233, -0.00648,1.21591,0.05586, -0.00648,1.21591,0.05586, -0.01248,1.21797,0.06233, -0.01261,1.21771,0.05502, -0.0591,1.25166,0.05157, -0.05363,1.24466,0.05153, -0.05795,1.25184,0.06138, -0.05795,1.25184,0.06138, -0.05363,1.24466,0.05153, -0.05295,1.24491,0.06126, -0.0333,1.22787,0.05316, -0.02252,1.2218,0.05414, -0.03282,1.22791,0.0613, -0.03282,1.22791,0.0613, -0.02252,1.2218,0.05414, -0.02235,1.22209,0.06108, -0.01248,1.21797,0.06233, -0.02235,1.22209,0.06108, -0.01261,1.21771,0.05502, -0.01261,1.21771,0.05502, -0.02235,1.22209,0.06108, -0.02252,1.2218,0.05414, -0.03978,1.23434,0.06523, -0.03093,1.22799,0.06463, -0.0362,1.23491,0.06981, -0.0362,1.23491,0.06981, -0.03093,1.22799,0.06463, -0.02894,1.22811,0.0672, -0.04379,1.24654,0.07316, -0.04685,1.25365,0.07409, -0.05024,1.24555,0.06635, -0.05024,1.24555,0.06635, -0.04685,1.25365,0.07409, -0.05434,1.25252,0.06685, -0.07023,1.27958,0.03767, -0.0723,1.28971,0.038, -0.07095,1.27964,0.02588, -0.07095,1.27964,0.02588, -0.0723,1.28971,0.038, -0.0735,1.28922,0.02501, -0.04799,1.23945,0.02951, -0.0536,1.24468,0.02831, -0.04519,1.2403,0.02048, -0.04519,1.2403,0.02048, -0.0536,1.24468,0.02831, -0.05134,1.24564,0.01876, -0.06318,1.25883,0.02643, -0.05957,1.25153,0.02703, -0.06331,1.25887,0.03872, -0.06331,1.25887,0.03872, -0.05957,1.25153,0.02703, -0.0595,1.25156,0.0393, -0.05957,1.25153,0.02703, -0.0536,1.24468,0.02831, -0.0595,1.25156,0.0393, -0.0595,1.25156,0.0393, -0.0536,1.24468,0.02831, -0.05402,1.24445,0.04027, -0.04692,1.24657,0.00995, -0.05134,1.24564,0.01876, -0.05342,1.25298,0.00928, -0.05342,1.25298,0.00928, -0.05134,1.24564,0.01876, -0.05723,1.2522,0.01787, -0.04799,1.23945,0.02951, -0.04066,1.2338,0.03086, -0.04878,1.23893,0.04124, -0.04878,1.23893,0.04124, -0.04066,1.2338,0.03086, -0.04194,1.23381,0.04234, -0.06571,1.26606,0.03842, -0.07023,1.27958,0.03767, -0.06646,1.26648,0.02626, -0.06646,1.26648,0.02626, -0.07023,1.27958,0.03767, -0.07095,1.27964,0.02588, -0.02345,1.22239,0.04425, -0.01466,1.21907,0.0448, -0.02252,1.2218,0.05414, -0.02252,1.2218,0.05414, -0.01466,1.21907,0.0448, -0.01261,1.21771,0.05502, -0.03085,1.27622,0.0786, -0.03143,1.28117,0.07577, -0.04158,1.27434,0.07525, -0.04158,1.27434,0.07525, -0.03143,1.28117,0.07577, -0.04206,1.2795,0.07332, -0.06571,1.26606,0.03842, -0.06331,1.25887,0.03872, -0.06464,1.26573,0.05144, -0.06464,1.26573,0.05144, -0.06331,1.25887,0.03872, -0.06246,1.25878,0.0519, -0.04685,1.25365,0.07409, -0.04882,1.25987,0.07409, -0.05434,1.25252,0.06685, -0.05434,1.25252,0.06685, -0.04882,1.25987,0.07409, -0.05705,1.25905,0.06705, 0,1.2891,0.08302, -0.0086,1.28722,0.08112, 0,1.28235,0.08499, 0,1.28235,0.08499, -0.0086,1.28722,0.08112, -0.00896,1.28062,0.0836, -0.02943,1.26329,0.08302, -0.03032,1.26928,0.08152, -0.03952,1.26106,0.0782, -0.03952,1.26106,0.0782, -0.03032,1.26928,0.08152, -0.04061,1.26738,0.07744, -0.00949,1.26841,0.09069, -0.00942,1.27385,0.08785, -0.0179,1.26613,0.08729, -0.0179,1.26613,0.08729, -0.00942,1.27385,0.08785, -0.01921,1.27166,0.0853, -0.03149,1.37552,0.0749, -0.03139,1.3603,0.07762, -0.01352,1.37449,0.0805, -0.01352,1.37449,0.0805, -0.03139,1.3603,0.07762, -0.01254,1.35949,0.0839, -0.02173,1.31709,0.07831, -0.02158,1.32687,0.07898, -0.03247,1.32076,0.0765, -0.03247,1.32076,0.0765, -0.02158,1.32687,0.07898, -0.0331,1.33154,0.07653, -0.06019,1.27317,0.06641, -0.05984,1.28019,0.06589, -0.06462,1.27315,0.06051, -0.06462,1.27315,0.06051, -0.05984,1.28019,0.06589, -0.06572,1.2798,0.06003, -0.0362,1.23491,0.06981, -0.04016,1.2401,0.07158, -0.03978,1.23434,0.06523, -0.03978,1.23434,0.06523, -0.04016,1.2401,0.07158, -0.04519,1.23945,0.06554, -0.02432,1.24212,0.08008, -0.01386,1.2431,0.08354, -0.02647,1.2487,0.08191, -0.02647,1.2487,0.08191, -0.01386,1.2431,0.08354, -0.01459,1.25007,0.08622, -0.04066,1.2338,0.03086, -0.03154,1.22797,0.03229, -0.04194,1.23381,0.04234, -0.04194,1.23381,0.04234, -0.03154,1.22797,0.03229, -0.03257,1.22766,0.04363, -0.02885,1.22882,0.02475, -0.03154,1.22797,0.03229, -0.03809,1.23448,0.02291, -0.03809,1.23448,0.02291, -0.03154,1.22797,0.03229, -0.04066,1.2338,0.03086, -0.02432,1.24212,0.08008, -0.02647,1.2487,0.08191, -0.0329,1.24107,0.07576, -0.0329,1.24107,0.07576, -0.02647,1.2487,0.08191, -0.0357,1.24758,0.07746, -0.02647,1.2487,0.08191, -0.02834,1.25692,0.08309, -0.0357,1.24758,0.07746, -0.0357,1.24758,0.07746, -0.02834,1.25692,0.08309, -0.03817,1.25507,0.07805, -0.03085,1.27622,0.0786, -0.02007,1.27859,0.08134, -0.03143,1.28117,0.07577, -0.03143,1.28117,0.07577, -0.02007,1.27859,0.08134, -0.02062,1.28425,0.07855, -0.0179,1.26613,0.08729, -0.02943,1.26329,0.08302, -0.01638,1.25964,0.08754, -0.01638,1.25964,0.08754, -0.02943,1.26329,0.08302, -0.02834,1.25692,0.08309, -0.04611,1.34741,0.07345, -0.04568,1.34193,0.07366, -0.03228,1.34693,0.07827, -0.03228,1.34693,0.07827, -0.04568,1.34193,0.07366, -0.03255,1.34161,0.07752, -0.02007,1.27859,0.08134, -0.00896,1.28062,0.0836, -0.02062,1.28425,0.07855, -0.02062,1.28425,0.07855, -0.00896,1.28062,0.0836, -0.0086,1.28722,0.08112, -0.06877,1.37605,0.04344, -0.06907,1.36504,0.05375, -0.0588,1.38544,0.05528, -0.0588,1.38544,0.05528, -0.06907,1.36504,0.05375, -0.0591,1.37122,0.06388, -0.04606,1.38991,0.06157, -0.04652,1.37396,0.06917, -0.03157,1.39284,0.06592, -0.03157,1.39284,0.06592, -0.04652,1.37396,0.06917, -0.03149,1.37552,0.0749, -0.03157,1.39284,0.06592, -0.03149,1.37552,0.0749, -0.01383,1.39434,0.07041, -0.01383,1.39434,0.07041, -0.03149,1.37552,0.0749, -0.01352,1.37449,0.0805, 0,1.28235,0.08499, -0.00896,1.28062,0.0836, 0,1.27583,0.08966, 0,1.27583,0.08966, -0.00896,1.28062,0.0836, -0.00942,1.27385,0.08785, -0.01921,1.27166,0.0853, -0.00942,1.27385,0.08785, -0.02007,1.27859,0.08134, -0.02007,1.27859,0.08134, -0.00942,1.27385,0.08785, -0.00896,1.28062,0.0836, -0.01921,1.27166,0.0853, -0.02007,1.27859,0.08134, -0.03032,1.26928,0.08152, -0.03032,1.26928,0.08152, -0.02007,1.27859,0.08134, -0.03085,1.27622,0.0786, -0.03032,1.26928,0.08152, -0.03085,1.27622,0.0786, -0.04061,1.26738,0.07744, -0.04061,1.26738,0.07744, -0.03085,1.27622,0.0786, -0.04158,1.27434,0.07525, -0.05919,1.26579,0.06679, -0.06019,1.27317,0.06641, -0.06294,1.26572,0.06097, -0.06294,1.26572,0.06097, -0.06019,1.27317,0.06641, -0.06462,1.27315,0.06051, -0.04158,1.27434,0.07525, -0.04206,1.2795,0.07332, -0.05151,1.27351,0.07187, -0.05151,1.27351,0.07187, -0.04206,1.2795,0.07332, -0.05196,1.27963,0.0702, -0.04061,1.26738,0.07744, -0.04158,1.27434,0.07525, -0.05076,1.26639,0.07326, -0.05076,1.26639,0.07326, -0.04158,1.27434,0.07525, -0.05151,1.27351,0.07187, -0.07238,1.30016,0.05146, -0.07385,1.29993,0.03892, -0.07096,1.29082,0.0514, -0.07096,1.29082,0.0514, -0.07385,1.29993,0.03892, -0.0723,1.28971,0.038, -0.0735,1.28922,0.02501, -0.0723,1.28971,0.038, -0.07524,1.29924,0.02406, -0.07524,1.29924,0.02406, -0.0723,1.28971,0.038, -0.07385,1.29993,0.03892, -0.03212,1.3029,0.07701, -0.04321,1.30286,0.07431, -0.03165,1.28557,0.07493, -0.03165,1.28557,0.07493, -0.04321,1.30286,0.07431, -0.04222,1.28399,0.07212, -0.03165,1.28557,0.07493, -0.02113,1.28909,0.07723, -0.03212,1.3029,0.07701, -0.03212,1.3029,0.07701, -0.02113,1.28909,0.07723, -0.02172,1.30279,0.07802, -0.04206,1.2795,0.07332, -0.04222,1.28399,0.07212, -0.05196,1.27963,0.0702, -0.05196,1.27963,0.0702, -0.04222,1.28399,0.07212, -0.05192,1.28491,0.06885, -0.04206,1.2795,0.07332, -0.03143,1.28117,0.07577, -0.04222,1.28399,0.07212, -0.04222,1.28399,0.07212, -0.03143,1.28117,0.07577, -0.03165,1.28557,0.07493, -0.02062,1.28425,0.07855, -0.0086,1.28722,0.08112, -0.02113,1.28909,0.07723, -0.02113,1.28909,0.07723, -0.0086,1.28722,0.08112, -0.00832,1.29269,0.08068, -0.0123,1.22821,0.07384, -0.01271,1.22073,0.0666, -0.00625,1.22817,0.07456, -0.00625,1.22817,0.07456, -0.01271,1.22073,0.0666, -0.00641,1.21884,0.06702, -0.07573,1.29881,0.01441, -0.07406,1.28893,0.01498, -0.07524,1.29924,0.02406, -0.07524,1.29924,0.02406, -0.07406,1.28893,0.01498, -0.0735,1.28922,0.02501, -0.05723,1.2522,0.01787, -0.05957,1.25153,0.02703, -0.0609,1.25604,0.01715, -0.0609,1.25604,0.01715, -0.05957,1.25153,0.02703, -0.06318,1.25883,0.02643, -0.04519,1.2403,0.02048, -0.03809,1.23448,0.02291, -0.04799,1.23945,0.02951, -0.04799,1.23945,0.02951, -0.03809,1.23448,0.02291, -0.04066,1.2338,0.03086, -0.0329,1.24107,0.07576, -0.0357,1.24758,0.07746, -0.04016,1.2401,0.07158, -0.04016,1.2401,0.07158, -0.0357,1.24758,0.07746, -0.04379,1.24654,0.07316, -0.0357,1.24758,0.07746, -0.03817,1.25507,0.07805, -0.04379,1.24654,0.07316, -0.04379,1.24654,0.07316, -0.03817,1.25507,0.07805, -0.04685,1.25365,0.07409, -0.03952,1.26106,0.0782, -0.04061,1.26738,0.07744, -0.04882,1.25987,0.07409, -0.04882,1.25987,0.07409, -0.04061,1.26738,0.07744, -0.05076,1.26639,0.07326, -0.02367,1.22848,0.07047, -0.02972,1.23563,0.07368, -0.02894,1.22811,0.0672, -0.02894,1.22811,0.0672, -0.02972,1.23563,0.07368, -0.0362,1.23491,0.06981, -0.06646,1.26648,0.02626, -0.06318,1.25883,0.02643, -0.06571,1.26606,0.03842, -0.06571,1.26606,0.03842, -0.06318,1.25883,0.02643, -0.06331,1.25887,0.03872, -0.05919,1.26579,0.06679, -0.05705,1.25905,0.06705, -0.05076,1.26639,0.07326, -0.05076,1.26639,0.07326, -0.05705,1.25905,0.06705, -0.04882,1.25987,0.07409, -0.03817,1.25507,0.07805, -0.02834,1.25692,0.08309, -0.03952,1.26106,0.0782, -0.03952,1.26106,0.0782, -0.02834,1.25692,0.08309, -0.02943,1.26329,0.08302, -0.0179,1.26613,0.08729, -0.01921,1.27166,0.0853, -0.02943,1.26329,0.08302, -0.02943,1.26329,0.08302, -0.01921,1.27166,0.0853, -0.03032,1.26928,0.08152, -0.04882,1.25987,0.07409, -0.04685,1.25365,0.07409, -0.03952,1.26106,0.0782, -0.03952,1.26106,0.0782, -0.04685,1.25365,0.07409, -0.03817,1.25507,0.07805, -0.0536,1.24468,0.02831, -0.04799,1.23945,0.02951, -0.05402,1.24445,0.04027, -0.05402,1.24445,0.04027, -0.04799,1.23945,0.02951, -0.04878,1.23893,0.04124, -0.04773,1.23921,0.06125, -0.05295,1.24491,0.06126, -0.04843,1.23908,0.05175, -0.04843,1.23908,0.05175, -0.05295,1.24491,0.06126, -0.05363,1.24466,0.05153, -0.04016,1.2401,0.07158, -0.04379,1.24654,0.07316, -0.04519,1.23945,0.06554, -0.04519,1.23945,0.06554, -0.04379,1.24654,0.07316, -0.05024,1.24555,0.06635, -0.02432,1.24212,0.08008, -0.02085,1.23626,0.07781, -0.01386,1.2431,0.08354, -0.01386,1.2431,0.08354, -0.02085,1.23626,0.07781, -0.01315,1.23656,0.08006, -0.0329,1.24107,0.07576, -0.02972,1.23563,0.07368, -0.02432,1.24212,0.08008, -0.02432,1.24212,0.08008, -0.02972,1.23563,0.07368, -0.02085,1.23626,0.07781, -0.04016,1.2401,0.07158, -0.0362,1.23491,0.06981, -0.0329,1.24107,0.07576, -0.0329,1.24107,0.07576, -0.0362,1.23491,0.06981, -0.02972,1.23563,0.07368, -0.06294,1.26572,0.06097, -0.06076,1.25889,0.06133, -0.05919,1.26579,0.06679, -0.05919,1.26579,0.06679, -0.06076,1.25889,0.06133, -0.05705,1.25905,0.06705, -0.06076,1.25889,0.06133, -0.05795,1.25184,0.06138, -0.05705,1.25905,0.06705, -0.05705,1.25905,0.06705, -0.05795,1.25184,0.06138, -0.05434,1.25252,0.06685, -0.00879,1.26171,0.09069, -0.01638,1.25964,0.08754, -0.0076,1.25064,0.088, -0.0076,1.25064,0.088, -0.01638,1.25964,0.08754, -0.01459,1.25007,0.08622, 0,1.21802,0.06771, -0.00641,1.21884,0.06702, 0,1.21473,0.06443, 0,1.21473,0.06443, -0.00641,1.21884,0.06702, -0.0061,1.21616,0.06352, -0.00648,1.21591,0.05586, 0,1.21446,0.05669, -0.0061,1.21616,0.06352, -0.0061,1.21616,0.06352, 0,1.21446,0.05669, 0,1.21473,0.06443, -0.01466,1.21907,0.0448, -0.00723,1.21695,0.04555, -0.01261,1.21771,0.05502, -0.01261,1.21771,0.05502, -0.00723,1.21695,0.04555, -0.00648,1.21591,0.05586, -0.00675,1.23669,0.08119, -0.01315,1.23656,0.08006, -0.00625,1.22817,0.07456, -0.00625,1.22817,0.07456, -0.01315,1.23656,0.08006, -0.0123,1.22821,0.07384, -0.00689,1.24354,0.08499, -0.01386,1.2431,0.08354, -0.00675,1.23669,0.08119, -0.00675,1.23669,0.08119, -0.01386,1.2431,0.08354, -0.01315,1.23656,0.08006, -0.00641,1.21884,0.06702, 0,1.21802,0.06771, -0.00625,1.22817,0.07456, -0.00625,1.22817,0.07456, 0,1.21802,0.06771, 0,1.22807,0.07536, 0,1.21761,0.03547, -0.01477,1.22046,0.03429, -9.54E-09,1.21815,0.02846, -9.54E-09,1.21815,0.02846, -0.01477,1.22046,0.03429, -0.01478,1.22193,0.02696, -0.0076,1.25064,0.088, -0.01459,1.25007,0.08622, -0.00689,1.24354,0.08499, -0.00689,1.24354,0.08499, -0.01459,1.25007,0.08622, -0.01386,1.2431,0.08354, 0,1.30203,0.08279, -0.00805,1.30202,0.08029, 0,1.29425,0.08259, 0,1.29425,0.08259, -0.00805,1.30202,0.08029, -0.00832,1.29269,0.08068, 0,1.27174,0.09502, -0.00949,1.26841,0.09069, 0,1.26362,0.09341, 0,1.26362,0.09341, -0.00949,1.26841,0.09069, -0.00879,1.26171,0.09069, 0,1.23682,0.08214, -0.00675,1.23669,0.08119, 0,1.22807,0.07536, 0,1.22807,0.07536, -0.00675,1.23669,0.08119, -0.00625,1.22817,0.07456, 0,1.24385,0.08592, -0.00689,1.24354,0.08499, 0,1.23682,0.08214, 0,1.23682,0.08214, -0.00689,1.24354,0.08499, -0.00675,1.23669,0.08119, 0,1.27583,0.08966, -0.00942,1.27385,0.08785, 0,1.27174,0.09502, 0,1.27174,0.09502, -0.00942,1.27385,0.08785, -0.00949,1.26841,0.09069, 0,1.32051,0.08428, 0,1.33386,0.08582, -0.00931,1.32109,0.08153, -0.00931,1.32109,0.08153, 0,1.33386,0.08582, -0.0113,1.33435,0.08343, 0,1.37428,0.08327, 0,1.39425,0.07381, -0.01352,1.37449,0.0805, -0.01352,1.37449,0.0805, 0,1.39425,0.07381, -0.01383,1.39434,0.07041, 0,1.3588,0.08654, 0,1.37428,0.08327, -0.01254,1.35949,0.0839, -0.01254,1.35949,0.0839, 0,1.37428,0.08327, -0.01352,1.37449,0.0805, 0,1.33386,0.08582, 0,1.34487,0.08687, -0.0113,1.33435,0.08343, -0.0113,1.33435,0.08343, 0,1.34487,0.08687, -0.0119,1.34577,0.08461, 0,1.29425,0.08259, -0.00832,1.29269,0.08068, 0,1.2891,0.08302, 0,1.2891,0.08302, -0.00832,1.29269,0.08068, -0.0086,1.28722,0.08112, 0,1.34487,0.08687, 0,1.3588,0.08654, -0.0119,1.34577,0.08461, -0.0119,1.34577,0.08461, 0,1.3588,0.08654, -0.01254,1.35949,0.0839, 0,1.25112,0.08923, -0.0076,1.25064,0.088, 0,1.24385,0.08592, 0,1.24385,0.08592, -0.0076,1.25064,0.088, -0.00689,1.24354,0.08499, 0,1.30796,0.08302, 0,1.32051,0.08428, -0.00789,1.31027,0.08043, -0.00789,1.31027,0.08043, 0,1.32051,0.08428, -0.00931,1.32109,0.08153, -0.03228,1.34693,0.07827, -0.01861,1.34091,0.08232, -0.03188,1.35226,0.07853, -0.03188,1.35226,0.07853, -0.01861,1.34091,0.08232, -0.0119,1.34577,0.08461, -0.01638,1.25964,0.08754, -0.00879,1.26171,0.09069, -0.0179,1.26613,0.08729, -0.0179,1.26613,0.08729, -0.00879,1.26171,0.09069, -0.00949,1.26841,0.09069, -0.04535,1.3333,0.0733, -0.05697,1.33119,0.0684, -0.04407,1.32169,0.07304, -0.04407,1.32169,0.07304, -0.05697,1.33119,0.0684, -0.0553,1.32054,0.06849, -0.02113,1.28909,0.07723, -0.03165,1.28557,0.07493, -0.02062,1.28425,0.07855, -0.02062,1.28425,0.07855, -0.03165,1.28557,0.07493, -0.03143,1.28117,0.07577, -0.07847,1.32401,0.02407, -0.07878,1.32355,0.01812, -0.07697,1.31061,0.02391, -0.07697,1.31061,0.02391, -0.07878,1.32355,0.01812, -0.0777,1.31122,0.01351, -0.05876,1.35078,0.06779, -0.04625,1.35276,0.07318, -0.05924,1.35889,0.06756, -0.05924,1.35889,0.06756, -0.04625,1.35276,0.07318, -0.04587,1.36008,0.07223, -0.04625,1.35276,0.07318, -0.03188,1.35226,0.07853, -0.04587,1.36008,0.07223, -0.04587,1.36008,0.07223, -0.03188,1.35226,0.07853, -0.03139,1.3603,0.07762, -0.03139,1.3603,0.07762, -0.03188,1.35226,0.07853, -0.01254,1.35949,0.0839, -0.01254,1.35949,0.0839, -0.03188,1.35226,0.07853, -0.0119,1.34577,0.08461, -0.07308,1.334,0.0574, -0.06715,1.34033,0.06291, -0.07509,1.33874,0.05462, -0.07509,1.33874,0.05462, -0.06715,1.34033,0.06291, -0.06822,1.34604,0.06187, -0.05849,1.34513,0.06759, -0.04611,1.34741,0.07345, -0.05876,1.35078,0.06779, -0.05876,1.35078,0.06779, -0.04611,1.34741,0.07345, -0.04625,1.35276,0.07318, -0.03228,1.34693,0.07827, -0.03188,1.35226,0.07853, -0.04611,1.34741,0.07345, -0.04611,1.34741,0.07345, -0.03188,1.35226,0.07853, -0.04625,1.35276,0.07318, -0.04535,1.3333,0.0733, -0.04407,1.32169,0.07304, -0.0331,1.33154,0.07653, -0.0331,1.33154,0.07653, -0.04407,1.32169,0.07304, -0.03247,1.32076,0.0765, -0.07028,1.32903,0.06039, -0.06566,1.33482,0.06396, -0.07308,1.334,0.0574, -0.07308,1.334,0.0574, -0.06566,1.33482,0.06396, -0.06715,1.34033,0.06291, -0.06632,1.32308,0.0629, -0.06281,1.32678,0.0652, -0.07028,1.32903,0.06039, -0.07028,1.32903,0.06039, -0.06281,1.32678,0.0652, -0.06566,1.33482,0.06396, -0.05697,1.33119,0.0684, -0.04535,1.3333,0.0733, -0.05815,1.33938,0.06792, -0.05815,1.33938,0.06792, -0.04535,1.3333,0.0733, -0.04568,1.34193,0.07366, -0.07096,1.29082,0.0514, -0.06858,1.27965,0.0514, -0.06782,1.29159,0.05893, -0.06782,1.29159,0.05893, -0.06858,1.27965,0.0514, -0.06572,1.2798,0.06003, -0.0667,1.27327,0.05123, -0.06464,1.26573,0.05144, -0.06462,1.27315,0.06051, -0.06462,1.27315,0.06051, -0.06464,1.26573,0.05144, -0.06294,1.26572,0.06097, -0.06464,1.26573,0.05144, -0.06246,1.25878,0.0519, -0.06294,1.26572,0.06097, -0.06294,1.26572,0.06097, -0.06246,1.25878,0.0519, -0.06076,1.25889,0.06133, -0.06246,1.25878,0.0519, -0.0591,1.25166,0.05157, -0.06076,1.25889,0.06133, -0.06076,1.25889,0.06133, -0.0591,1.25166,0.05157, -0.05795,1.25184,0.06138, -0.0414,1.23409,0.06121, -0.04773,1.23921,0.06125, -0.04179,1.234,0.05217, -0.04179,1.234,0.05217, -0.04773,1.23921,0.06125, -0.04843,1.23908,0.05175, -0.04179,1.234,0.05217, -0.0333,1.22787,0.05316, -0.0414,1.23409,0.06121, -0.0414,1.23409,0.06121, -0.0333,1.22787,0.05316, -0.03282,1.22791,0.0613, -0.05024,1.24555,0.06635, -0.05434,1.25252,0.06685, -0.05295,1.24491,0.06126, -0.05295,1.24491,0.06126, -0.05434,1.25252,0.06685, -0.05795,1.25184,0.06138, -0.05295,1.24491,0.06126, -0.04773,1.23921,0.06125, -0.05024,1.24555,0.06635, -0.05024,1.24555,0.06635, -0.04773,1.23921,0.06125, -0.04519,1.23945,0.06554, -0.0414,1.23409,0.06121, -0.03282,1.22791,0.0613, -0.03978,1.23434,0.06523, -0.03978,1.23434,0.06523, -0.03282,1.22791,0.0613, -0.03093,1.22799,0.06463, -0.04773,1.23921,0.06125, -0.0414,1.23409,0.06121, -0.04519,1.23945,0.06554, -0.04519,1.23945,0.06554, -0.0414,1.23409,0.06121, -0.03978,1.23434,0.06523, -0.0579,1.28663,0.06556, -0.05984,1.28019,0.06589, -0.05192,1.28491,0.06885, -0.05192,1.28491,0.06885, -0.05984,1.28019,0.06589, -0.05196,1.27963,0.0702, -0.05984,1.28019,0.06589, -0.06019,1.27317,0.06641, -0.05196,1.27963,0.0702, -0.05196,1.27963,0.0702, -0.06019,1.27317,0.06641, -0.05151,1.27351,0.07187, -0.05076,1.26639,0.07326, -0.05151,1.27351,0.07187, -0.05919,1.26579,0.06679, -0.05919,1.26579,0.06679, -0.05151,1.27351,0.07187, -0.06019,1.27317,0.06641, -0.07023,1.27958,0.03767, -0.06571,1.26606,0.03842, -0.0667,1.27327,0.05123, -0.0667,1.27327,0.05123, -0.06571,1.26606,0.03842, -0.06464,1.26573,0.05144, -0.06462,1.27315,0.06051, -0.06572,1.2798,0.06003, -0.0667,1.27327,0.05123, -0.0667,1.27327,0.05123, -0.06572,1.2798,0.06003, -0.06858,1.27965,0.0514, -0.06962,1.3,0.05828, -0.06782,1.29159,0.05893, -0.06398,1.3,0.06301, -0.06398,1.3,0.06301, -0.06782,1.29159,0.05893, -0.06242,1.29301,0.06351, -0.06977,1.30839,0.05889, -0.06962,1.3,0.05828, -0.06391,1.30679,0.06338, -0.06391,1.30679,0.06338, -0.06962,1.3,0.05828, -0.06398,1.3,0.06301, -0.06885,1.31663,0.06067, -0.06977,1.30839,0.05889, -0.06239,1.31339,0.06486, -0.06239,1.31339,0.06486, -0.06977,1.30839,0.05889, -0.06391,1.30679,0.06338, -0.06822,1.34604,0.06187, -0.05876,1.35078,0.06779, -0.07054,1.35545,0.05999, -0.07054,1.35545,0.05999, -0.05876,1.35078,0.06779, -0.05924,1.35889,0.06756, -0.05876,1.35078,0.06779, -0.06822,1.34604,0.06187, -0.05849,1.34513,0.06759, -0.05849,1.34513,0.06759, -0.06822,1.34604,0.06187, -0.06715,1.34033,0.06291, -0.05849,1.34513,0.06759, -0.06715,1.34033,0.06291, -0.05815,1.33938,0.06792, -0.05815,1.33938,0.06792, -0.06715,1.34033,0.06291, -0.06566,1.33482,0.06396, -0.05815,1.33938,0.06792, -0.06566,1.33482,0.06396, -0.05697,1.33119,0.0684, -0.05697,1.33119,0.0684, -0.06566,1.33482,0.06396, -0.06281,1.32678,0.0652, -0.04407,1.32169,0.07304, -0.04321,1.30286,0.07431, -0.03247,1.32076,0.0765, -0.03247,1.32076,0.0765, -0.04321,1.30286,0.07431, -0.03212,1.3029,0.07701, -0.03247,1.32076,0.0765, -0.03212,1.3029,0.07701, -0.02173,1.31709,0.07831, -0.02173,1.31709,0.07831, -0.03212,1.3029,0.07701, -0.02172,1.30279,0.07802, -0.02173,1.31709,0.07831, -0.02172,1.30279,0.07802, -0.01438,1.31283,0.07895, -0.01438,1.31283,0.07895, -0.02172,1.30279,0.07802, -0.01492,1.3025,0.0785, -0.01438,1.31283,0.07895, -0.01492,1.3025,0.0785, -0.00789,1.31027,0.08043, -0.00789,1.31027,0.08043, -0.01492,1.3025,0.0785, -0.00805,1.30202,0.08029, -0.00789,1.31027,0.08043, -0.00805,1.30202,0.08029, 0,1.30796,0.08302, 0,1.30796,0.08302, -0.00805,1.30202,0.08029, 0,1.30203,0.08279, -0.04222,1.28399,0.07212, -0.04321,1.30286,0.07431, -0.05192,1.28491,0.06885, -0.05192,1.28491,0.06885, -0.04321,1.30286,0.07431, -0.05322,1.30294,0.07019, -0.01438,1.31283,0.07895, -0.00931,1.32109,0.08153, -0.02173,1.31709,0.07831, -0.02173,1.31709,0.07831, -0.00931,1.32109,0.08153, -0.02158,1.32687,0.07898, -0.04568,1.34193,0.07366, -0.04535,1.3333,0.0733, -0.03255,1.34161,0.07752, -0.03255,1.34161,0.07752, -0.04535,1.3333,0.0733, -0.0331,1.33154,0.07653, -0.06962,1.3,0.05828, -0.06977,1.30839,0.05889, -0.07238,1.30016,0.05146, -0.07238,1.30016,0.05146, -0.06977,1.30839,0.05889, -0.0731,1.30975,0.0524, -0.07238,1.30016,0.05146, -0.07096,1.29082,0.0514, -0.06962,1.3,0.05828, -0.06962,1.3,0.05828, -0.07096,1.29082,0.0514, -0.06782,1.29159,0.05893, -0.05815,1.33938,0.06792, -0.04568,1.34193,0.07366, -0.05849,1.34513,0.06759, -0.05849,1.34513,0.06759, -0.04568,1.34193,0.07366, -0.04611,1.34741,0.07345, -0.04652,1.37396,0.06917, -0.0591,1.37122,0.06388, -0.04587,1.36008,0.07223, -0.04587,1.36008,0.07223, -0.0591,1.37122,0.06388, -0.05924,1.35889,0.06756, -0.0591,1.37122,0.06388, -0.04652,1.37396,0.06917, -0.0588,1.38544,0.05528, -0.0588,1.38544,0.05528, -0.04652,1.37396,0.06917, -0.04606,1.38991,0.06157, -9.54E-09,1.21815,0.02846, -0.01478,1.22193,0.02696, -4.77E-09,1.21742,0.02325, -4.77E-09,1.21742,0.02325, -0.01478,1.22193,0.02696, -0.01468,1.22309,0.01994, -0.02721,1.23366,-0.00837, -0.03316,1.23991,-0.01178, -0.02003,1.23105,-0.02186, -0.02003,1.23105,-0.02186, -0.03316,1.23991,-0.01178, -0.0228,1.23744,-0.02778, -0.02003,1.23105,-0.02186, -0.0228,1.23744,-0.02778, 0,1.22734,-0.03069, 0,1.22734,-0.03069, -0.0228,1.23744,-0.02778, 0,1.23344,-0.03937, -0.07549,1.35591,0.04042, -0.0794,1.3395,0.02451, -0.07662,1.34467,0.04784, -0.07662,1.34467,0.04784, -0.0794,1.3395,0.02451, -0.07767,1.32552,0.03517, -0.07662,1.34467,0.04784, -0.07054,1.35545,0.05999, -0.07549,1.35591,0.04042, -0.07549,1.35591,0.04042, -0.07054,1.35545,0.05999, -0.06907,1.36504,0.05375, -0.07594,1.31054,0.03424, -0.07447,1.31052,0.04458, -0.07767,1.32552,0.03517, -0.07767,1.32552,0.03517, -0.07447,1.31052,0.04458, -0.07591,1.32547,0.04546, -0.07767,1.32552,0.03517, -0.07847,1.32401,0.02407, -0.07594,1.31054,0.03424, -0.07594,1.31054,0.03424, -0.07847,1.32401,0.02407, -0.07697,1.31061,0.02391, -0.07385,1.29993,0.03892, -0.07594,1.31054,0.03424, -0.07524,1.29924,0.02406, -0.07524,1.29924,0.02406, -0.07594,1.31054,0.03424, -0.07697,1.31061,0.02391, -0.0591,1.25166,0.05157, -0.06246,1.25878,0.0519, -0.0595,1.25156,0.0393, -0.0595,1.25156,0.0393, -0.06246,1.25878,0.0519, -0.06331,1.25887,0.03872, -0.05363,1.24466,0.05153, -0.0591,1.25166,0.05157, -0.05402,1.24445,0.04027, -0.05402,1.24445,0.04027, -0.0591,1.25166,0.05157, -0.0595,1.25156,0.0393, -0.04843,1.23908,0.05175, -0.05363,1.24466,0.05153, -0.04878,1.23893,0.04124, -0.04878,1.23893,0.04124, -0.05363,1.24466,0.05153, -0.05402,1.24445,0.04027, -0.04179,1.234,0.05217, -0.04843,1.23908,0.05175, -0.04194,1.23381,0.04234, -0.04194,1.23381,0.04234, -0.04843,1.23908,0.05175, -0.04878,1.23893,0.04124, -0.0333,1.22787,0.05316, -0.04179,1.234,0.05217, -0.03257,1.22766,0.04363, -0.03257,1.22766,0.04363, -0.04179,1.234,0.05217, -0.04194,1.23381,0.04234, -0.02252,1.2218,0.05414, -0.0333,1.22787,0.05316, -0.02345,1.22239,0.04425, -0.02345,1.22239,0.04425, -0.0333,1.22787,0.05316, -0.03257,1.22766,0.04363, 0,1.21446,0.05669, -0.00648,1.21591,0.05586, 0,1.21552,0.04637, 0,1.21552,0.04637, -0.00648,1.21591,0.05586, -0.00723,1.21695,0.04555, -0.0536,1.24468,0.02831, -0.05957,1.25153,0.02703, -0.05134,1.24564,0.01876, -0.05134,1.24564,0.01876, -0.05957,1.25153,0.02703, -0.05723,1.2522,0.01787, -0.01477,1.22046,0.03429, -0.03154,1.22797,0.03229, -0.01478,1.22193,0.02696, -0.01478,1.22193,0.02696, -0.03154,1.22797,0.03229, -0.02885,1.22882,0.02475, -0.02579,1.22936,0.01621, -0.02885,1.22882,0.02475, -0.03478,1.23507,0.01392, -0.03478,1.23507,0.01392, -0.02885,1.22882,0.02475, -0.03809,1.23448,0.02291, -0.04196,1.24137,0.01174, -0.03478,1.23507,0.01392, -0.04519,1.2403,0.02048, -0.04519,1.2403,0.02048, -0.03478,1.23507,0.01392, -0.03809,1.23448,0.02291, -0.04196,1.24137,0.01174, -0.04519,1.2403,0.02048, -0.04692,1.24657,0.00995, -0.04692,1.24657,0.00995, -0.04519,1.2403,0.02048, -0.05134,1.24564,0.01876, -0.02721,1.23366,-0.00837, -0.03204,1.23539,0.0016, -0.03316,1.23991,-0.01178, -0.03316,1.23991,-0.01178, -0.03204,1.23539,0.0016, -0.03862,1.24182,-0.00035, -0.01478,1.22193,0.02696, -0.02885,1.22882,0.02475, -0.01468,1.22309,0.01994, -0.01468,1.22309,0.01994, -0.02885,1.22882,0.02475, -0.02579,1.22936,0.01621, -0.06318,1.25883,0.02643, -0.06646,1.26648,0.02626, -0.06332,1.25867,0.01678, -0.06332,1.25867,0.01678, -0.06646,1.26648,0.02626, -0.06724,1.26686,0.01577, -0.06646,1.26648,0.02626, -0.07095,1.27964,0.02588, -0.06724,1.26686,0.01577, -0.06724,1.26686,0.01577, -0.07095,1.27964,0.02588, -0.07177,1.28009,0.01507, -0.07095,1.27964,0.02588, -0.0735,1.28922,0.02501, -0.07177,1.28009,0.01507, -0.07177,1.28009,0.01507, -0.0735,1.28922,0.02501, -0.07406,1.28893,0.01498, -0.07524,1.29924,0.02406, -0.07697,1.31061,0.02391, -0.07573,1.29881,0.01441, -0.07573,1.29881,0.01441, -0.07697,1.31061,0.02391, -0.0777,1.31122,0.01351, 0.0591,1.37122,0.06388, 0.05924,1.35889,0.06756, 0.07054,1.35545,0.05999, 0.02503,1.23017,0.00403, 0.02579,1.22936,0.01621, 0.01468,1.22309,0.01994, 0.0465,1.25056,-0.00266, 0.04692,1.24657,0.00995, 0.03862,1.24182,-0.00035, 0.04692,1.24657,0.00995, 0.0465,1.25056,-0.00266, 0.05342,1.25298,0.00928, 0.03257,1.22766,0.04363, 0.02345,1.22239,0.04425, 0.03154,1.22797,0.03229, 0.01268,1.2208,0.0666, 0.02368,1.22846,0.07047, 0.0123,1.22821,0.07384, 0.02368,1.22846,0.07047, 0.02201,1.22309,0.06484, 0.02894,1.22811,0.0672, 0.02894,1.22811,0.0672, 0.02201,1.22309,0.06484, 0.03093,1.22799,0.06463, 0.0465,1.25056,-0.00266, 0.06285,1.26415,-0.00309, 0.05342,1.25298,0.00928, 0.07238,1.30016,0.05146, 0.07447,1.31052,0.04458, 0.0731,1.30975,0.0524, 0.06792,1.26025,0.00094, 0.0767,1.26597,-0.00501, 0.07484,1.2602,0.00476, 0.07484,1.2602,0.00476, 0.0767,1.26597,-0.00501, 0.08302,1.26481,-0.00194, 0.08186,1.2745,-0.00958, 0.08692,1.28517,-0.01328, 0.09014,1.27388,-0.0067, 0.09014,1.27388,-0.0067, 0.08692,1.28517,-0.01328, 0.09604,1.28501,-0.00966, 0.06332,1.25867,0.01678, 0.06045,1.25965,0.00845, 0.07484,1.2602,0.00476, 0.07484,1.2602,0.00476, 0.06045,1.25965,0.00845, 0.06792,1.26025,0.00094, 0.09742,1.31077,-0.00592, 0.09808,1.298,-0.00908, 0.09008,1.31005,-0.01032, 0.09008,1.31005,-0.01032, 0.09808,1.298,-0.00908, 0.09021,1.29688,-0.01302, 0.08611,1.31463,-0.00524, 0.07816,1.31599,0.00132, 0.08818,1.31783,0.00459, 0.08611,1.31463,-0.00524, 0.08818,1.31783,0.00459, 0.09493,1.31596,-0.00147, 0.02235,1.22209,0.06108, 0.02201,1.22309,0.06484, 0.0124,1.21815,0.06233, 0.0124,1.21815,0.06233, 0.02201,1.22309,0.06484, 0.01268,1.2208,0.0666, 0.0767,1.26597,-0.00501, 0.08186,1.2745,-0.00958, 0.08302,1.26481,-0.00194, 0.08302,1.26481,-0.00194, 0.08186,1.2745,-0.00958, 0.09014,1.27388,-0.0067, 0.02113,1.28909,0.07723, 0.01492,1.3025,0.0785, 0.00832,1.29269,0.08068, 0.00832,1.29269,0.08068, 0.01492,1.3025,0.0785, 0.00805,1.30202,0.08029, 0.06239,1.31339,0.06486, 0.05322,1.30294,0.07019, 0.06391,1.30679,0.06338, 0.02172,1.30279,0.07802, 0.01492,1.3025,0.0785, 0.02113,1.28909,0.07723, 0.0579,1.28663,0.06556, 0.05322,1.30294,0.07019, 0.05192,1.28491,0.06885, 0.07198,1.32098,0.05679, 0.06885,1.31663,0.06067, 0.0731,1.30975,0.0524, 0.0731,1.30975,0.0524, 0.06885,1.31663,0.06067, 0.06977,1.30839,0.05889, 0.09808,1.298,-0.00908, 0.09604,1.28501,-0.00966, 0.09021,1.29688,-0.01302, 0.09021,1.29688,-0.01302, 0.09604,1.28501,-0.00966, 0.08692,1.28517,-0.01328, 0.08611,1.31463,-0.00524, 0.09493,1.31596,-0.00147, 0.09008,1.31005,-0.01032, 0.09008,1.31005,-0.01032, 0.09493,1.31596,-0.00147, 0.09742,1.31077,-0.00592, 0.05342,1.25298,0.00928, 0.06045,1.25965,0.00845, 0.0609,1.25604,0.01715, 0.0609,1.25604,0.01715, 0.06045,1.25965,0.00845, 0.06332,1.25867,0.01678, 0.02972,1.23563,0.07368, 0.02085,1.23626,0.07781, 0.02368,1.22846,0.07047, 0.02368,1.22846,0.07047, 0.02085,1.23626,0.07781, 0.0123,1.22821,0.07384, 0.00879,1.26171,0.09069, 0,1.25884,0.09174, 0.0076,1.25064,0.088, 0.0076,1.25064,0.088, 0,1.25884,0.09174, 0,1.25112,0.08923, 0,1.21761,0.03547, 0.00723,1.21695,0.04555, 0,1.21552,0.04637, 0.07023,1.27958,0.03767, 0.06858,1.27965,0.0514, 0.0667,1.27327,0.05123, 0.01315,1.23656,0.08006, 0.0123,1.22821,0.07384, 0.02085,1.23626,0.07781, 0.05723,1.2522,0.01787, 0.05342,1.25298,0.00928, 0.0609,1.25604,0.01715, 0.06045,1.25965,0.00845, 0.06285,1.26415,-0.00309, 0.07262,1.27969,-0.00539, 0.0777,1.31122,0.01351, 0.07573,1.29881,0.01441, 0.08438,1.28612,0.00471, 0.09008,1.31005,-0.01032, 0.07882,1.29978,-0.00559, 0.08611,1.31463,-0.00524, 0.08438,1.28612,0.00471, 0.09014,1.27388,-0.0067, 0.09604,1.28501,-0.00966, 0.06724,1.26686,0.01577, 0.06332,1.25867,0.01678, 0.07484,1.2602,0.00476, 0.08438,1.28612,0.00471, 0.09808,1.298,-0.00908, 0.09742,1.31077,-0.00592, 0.07484,1.2602,0.00476, 0.08302,1.26481,-0.00194, 0.08438,1.28612,0.00471, 0.08438,1.28612,0.00471, 0.09493,1.31596,-0.00147, 0.08818,1.31783,0.00459, 0.07262,1.27969,-0.00539, 0.06792,1.26025,0.00094, 0.06045,1.25965,0.00845, 0.08692,1.28517,-0.01328, 0.08186,1.2745,-0.00958, 0.07262,1.27969,-0.00539, 0.0767,1.26597,-0.00501, 0.06792,1.26025,0.00094, 0.07262,1.27969,-0.00539, 0.08692,1.28517,-0.01328, 0.07262,1.27969,-0.00539, 0.09021,1.29688,-0.01302, 0.08438,1.28612,0.00471, 0.08818,1.31783,0.00459, 0.0777,1.31122,0.01351, 0.08818,1.31783,0.00459, 0.07816,1.31599,0.00132, 0.0777,1.31122,0.01351, 0.07262,1.27969,-0.00539, 0.07882,1.29978,-0.00559, 0.09008,1.31005,-0.01032, 0.08186,1.2745,-0.00958, 0.0767,1.26597,-0.00501, 0.07262,1.27969,-0.00539, 0.08438,1.28612,0.00471, 0.08302,1.26481,-0.00194, 0.09014,1.27388,-0.0067, 0.08438,1.28612,0.00471, 0.07573,1.29881,0.01441, 0.07406,1.28893,0.01498, 0.08438,1.28612,0.00471, 0.06724,1.26686,0.01577, 0.07484,1.2602,0.00476, 0.08438,1.28612,0.00471, 0.07406,1.28893,0.01498, 0.07177,1.28009,0.01507, 0.08438,1.28612,0.00471, 0.09604,1.28501,-0.00966, 0.09808,1.298,-0.00908, 0.07262,1.27969,-0.00539, 0.09008,1.31005,-0.01032, 0.09021,1.29688,-0.01302, 0.08438,1.28612,0.00471, 0.09742,1.31077,-0.00592, 0.09493,1.31596,-0.00147, 0.07882,1.29978,-0.00559, 0.07816,1.31599,0.00132, 0.08611,1.31463,-0.00524, 0.08438,1.28612,0.00471, 0.07177,1.28009,0.01507, 0.06724,1.26686,0.01577, 0,1.26362,0.09341, 0,1.25884,0.09174, 0.00879,1.26171,0.09069, 0.00931,1.32109,0.08153, 0.00789,1.31027,0.08043, 0.01438,1.31283,0.07895, 0.07198,1.32098,0.05679, 0.07426,1.32357,0.05277, 0.07308,1.334,0.0574, 0.06885,1.31663,0.06067, 0.07198,1.32098,0.05679, 0.06632,1.32308,0.0629, 0.06632,1.32308,0.0629, 0.07198,1.32098,0.05679, 0.07028,1.32903,0.06039, 0.07509,1.33874,0.05462, 0.07662,1.34467,0.04784, 0.07054,1.35545,0.05999, 0.0215,1.33679,0.08078, 0.0113,1.33435,0.08343, 0.00931,1.32109,0.08153, 0.03228,1.34693,0.07827, 0.01861,1.34091,0.08232, 0.03255,1.34161,0.07752, 0.0215,1.33679,0.08078, 0.01861,1.34091,0.08232, 0.0113,1.33435,0.08343, 0.03255,1.34161,0.07752, 0.02158,1.32687,0.07898, 0.0331,1.33154,0.07653, 0.07198,1.32098,0.05679, 0.07308,1.334,0.0574, 0.07028,1.32903,0.06039, 0.07426,1.32357,0.05277, 0.07447,1.31052,0.04458, 0.07591,1.32547,0.04546, 0.07308,1.334,0.0574, 0.07426,1.32357,0.05277, 0.07509,1.33874,0.05462, 0.03282,1.22791,0.0613, 0.03093,1.22799,0.06463, 0.02235,1.22209,0.06108, 0.02235,1.22209,0.06108, 0.03093,1.22799,0.06463, 0.02201,1.22309,0.06484, 0.0731,1.30975,0.0524, 0.07426,1.32357,0.05277, 0.07198,1.32098,0.05679, 0.0579,1.28663,0.06556, 0.05984,1.28019,0.06589, 0.06362,1.28358,0.06286, 0.0579,1.28663,0.06556, 0.06362,1.28358,0.06286, 0.06242,1.29301,0.06351, 0.06242,1.29301,0.06351, 0.06362,1.28358,0.06286, 0.06782,1.29159,0.05893, 0.06362,1.28358,0.06286, 0.06572,1.2798,0.06003, 0.06782,1.29159,0.05893, 0.05322,1.30294,0.07019, 0.06242,1.29301,0.06351, 0.06398,1.3,0.06301, 0.05322,1.30294,0.07019, 0.06398,1.3,0.06301, 0.06391,1.30679,0.06338, 0.05322,1.30294,0.07019, 0.0579,1.28663,0.06556, 0.06242,1.29301,0.06351, 0.0553,1.32054,0.06849, 0.06632,1.32308,0.0629, 0.06281,1.32678,0.0652, 0.06239,1.31339,0.06486, 0.0553,1.32054,0.06849, 0.05322,1.30294,0.07019, 0.05697,1.33119,0.0684, 0.0553,1.32054,0.06849, 0.06281,1.32678,0.0652, 0.04321,1.30286,0.07431, 0.05322,1.30294,0.07019, 0.04407,1.32169,0.07304, 0.04407,1.32169,0.07304, 0.05322,1.30294,0.07019, 0.0553,1.32054,0.06849, 0.01861,1.34091,0.08232, 0.0119,1.34577,0.08461, 0.0113,1.33435,0.08343, 0.0215,1.33679,0.08078, 0.03255,1.34161,0.07752, 0.01861,1.34091,0.08232, 0.00931,1.32109,0.08153, 0.02158,1.32687,0.07898, 0.0215,1.33679,0.08078, 0.03255,1.34161,0.07752, 0.0215,1.33679,0.08078, 0.02158,1.32687,0.07898, 0.07447,1.31052,0.04458, 0.07426,1.32357,0.05277, 0.0731,1.30975,0.0524, 0.07385,1.29993,0.03892, 0.07447,1.31052,0.04458, 0.07238,1.30016,0.05146, 0.06239,1.31339,0.06486, 0.06885,1.31663,0.06067, 0.06632,1.32308,0.0629, 0.06239,1.31339,0.06486, 0.06632,1.32308,0.0629, 0.0553,1.32054,0.06849, 0.03204,1.23539,0.0016, 0.03862,1.24182,-0.00035, 0.04196,1.24137,0.01174, 0.07591,1.32547,0.04546, 0.07509,1.33874,0.05462, 0.07426,1.32357,0.05277, 0.07591,1.32547,0.04546, 0.07662,1.34467,0.04784, 0.07509,1.33874,0.05462, 0.07662,1.34467,0.04784, 0.07591,1.32547,0.04546, 0.07767,1.32552,0.03517, 0.07385,1.29993,0.03892, 0.07594,1.31054,0.03424, 0.07447,1.31052,0.04458, 0.07767,1.32552,0.03517, 0.07847,1.32401,0.02407, 0.0794,1.3395,0.02451, 0.07549,1.35591,0.04042, 0.06877,1.37605,0.04344, 0.06907,1.36504,0.05375, 0.07549,1.35591,0.04042, 0.07521,1.36243,0.03473, 0.06877,1.37605,0.04344, 0.01477,1.22046,0.03429, 0.02345,1.22239,0.04425, 0.01466,1.21907,0.0448, 0.01477,1.22046,0.03429, 0.01466,1.21907,0.0448, 0.00723,1.21695,0.04555, 0.02503,1.23017,0.00403, 0.03204,1.23539,0.0016, 0.03478,1.23507,0.01392, 0.02721,1.23366,-0.00837, 0.03204,1.23539,0.0016, 0.02503,1.23017,0.00403, 0.03316,1.23991,-0.01178, 0.0465,1.25056,-0.00266, 0.03862,1.24182,-0.00035, 0.01477,1.22046,0.03429, 0.00723,1.21695,0.04555, 0,1.21761,0.03547, 0.03154,1.22797,0.03229, 0.02345,1.22239,0.04425, 0.01477,1.22046,0.03429, 0.02503,1.23017,0.00403, 0.03478,1.23507,0.01392, 0.02579,1.22936,0.01621, 0.03204,1.23539,0.0016, 0.04196,1.24137,0.01174, 0.03478,1.23507,0.01392, 0.03862,1.24182,-0.00035, 0.04692,1.24657,0.00995, 0.04196,1.24137,0.01174, 0.05342,1.25298,0.00928, 0.06285,1.26415,-0.00309, 0.06045,1.25965,0.00845, 0.0465,1.25056,-0.00266, 0.03316,1.23991,-0.01178, 0.0434,1.24935,-0.0162, 0.0434,1.24935,-0.0162, 0.06285,1.26415,-0.00309, 0.0465,1.25056,-0.00266, 0.03316,1.23991,-0.01178, 0.0228,1.23744,-0.02778, 0.0434,1.24935,-0.0162, 0.06362,1.28358,0.06286, 0.05984,1.28019,0.06589, 0.06572,1.2798,0.06003, 0.07509,1.33874,0.05462, 0.07054,1.35545,0.05999, 0.06822,1.34604,0.06187, 0.0591,1.37122,0.06388, 0.07054,1.35545,0.05999, 0.06907,1.36504,0.05375, 0.0609,1.25604,0.01715, 0.06332,1.25867,0.01678, 0.06318,1.25883,0.02643, 0.07878,1.32355,0.01812, 0.0794,1.3395,0.02451, 0.07847,1.32401,0.02407, 0.0794,1.3395,0.02451, 0.07521,1.36243,0.03473, 0.07549,1.35591,0.04042, 0.01268,1.2208,0.0666, 0.02201,1.22309,0.06484, 0.02368,1.22846,0.07047, -0.0591,1.37122,0.06388, -0.07054,1.35545,0.05999, -0.05924,1.35889,0.06756, -0.02503,1.23017,0.00403, -0.01468,1.22309,0.01994, -0.02579,1.22936,0.01621, -0.0465,1.25056,-0.00266, -0.03862,1.24182,-0.00035, -0.04692,1.24657,0.00995, -0.04692,1.24657,0.00995, -0.05342,1.25298,0.00928, -0.0465,1.25056,-0.00266, -0.03257,1.22766,0.04363, -0.03154,1.22797,0.03229, -0.02345,1.22239,0.04425, -0.01271,1.22073,0.0666, -0.0123,1.22821,0.07384, -0.02367,1.22848,0.07047, -0.02367,1.22848,0.07047, -0.02894,1.22811,0.0672, -0.02201,1.22309,0.06484, -0.02894,1.22811,0.0672, -0.03093,1.22799,0.06463, -0.02201,1.22309,0.06484, -0.0465,1.25056,-0.00266, -0.05342,1.25298,0.00928, -0.06285,1.26415,-0.00309, -0.07238,1.30016,0.05146, -0.0731,1.30975,0.0524, -0.07447,1.31052,0.04458, -0.06792,1.26025,0.00094, -0.07484,1.2602,0.00476, -0.0767,1.26597,-0.00501, -0.07484,1.2602,0.00476, -0.08302,1.26481,-0.00194, -0.0767,1.26597,-0.00501, -0.08186,1.2745,-0.00958, -0.09014,1.27388,-0.0067, -0.08692,1.28517,-0.01328, -0.09014,1.27388,-0.0067, -0.09604,1.28501,-0.00966, -0.08692,1.28517,-0.01328, -0.06332,1.25867,0.01678, -0.07484,1.2602,0.00476, -0.06045,1.25965,0.00845, -0.07484,1.2602,0.00476, -0.06792,1.26025,0.00094, -0.06045,1.25965,0.00845, -0.09742,1.31077,-0.00592, -0.09008,1.31005,-0.01032, -0.09808,1.298,-0.00908, -0.09008,1.31005,-0.01032, -0.09021,1.29688,-0.01302, -0.09808,1.298,-0.00908, -0.08611,1.31463,-0.00524, -0.08818,1.31783,0.00459, -0.07816,1.31599,0.00132, -0.08611,1.31463,-0.00524, -0.09493,1.31596,-0.00147, -0.08818,1.31783,0.00459, -0.02235,1.22209,0.06108, -0.01248,1.21797,0.06233, -0.02201,1.22309,0.06484, -0.01248,1.21797,0.06233, -0.01271,1.22073,0.0666, -0.02201,1.22309,0.06484, -0.0767,1.26597,-0.00501, -0.08302,1.26481,-0.00194, -0.08186,1.2745,-0.00958, -0.08302,1.26481,-0.00194, -0.09014,1.27388,-0.0067, -0.08186,1.2745,-0.00958, -0.02113,1.28909,0.07723, -0.00832,1.29269,0.08068, -0.01492,1.3025,0.0785, -0.00832,1.29269,0.08068, -0.00805,1.30202,0.08029, -0.01492,1.3025,0.0785, -0.06239,1.31339,0.06486, -0.06391,1.30679,0.06338, -0.05322,1.30294,0.07019, -0.02172,1.30279,0.07802, -0.02113,1.28909,0.07723, -0.01492,1.3025,0.0785, -0.0579,1.28663,0.06556, -0.05192,1.28491,0.06885, -0.05322,1.30294,0.07019, -0.07198,1.32098,0.05679, -0.0731,1.30975,0.0524, -0.06885,1.31663,0.06067, -0.0731,1.30975,0.0524, -0.06977,1.30839,0.05889, -0.06885,1.31663,0.06067, -0.09808,1.298,-0.00908, -0.09021,1.29688,-0.01302, -0.09604,1.28501,-0.00966, -0.09021,1.29688,-0.01302, -0.08692,1.28517,-0.01328, -0.09604,1.28501,-0.00966, -0.08611,1.31463,-0.00524, -0.09008,1.31005,-0.01032, -0.09493,1.31596,-0.00147, -0.09008,1.31005,-0.01032, -0.09742,1.31077,-0.00592, -0.09493,1.31596,-0.00147, -0.05342,1.25298,0.00928, -0.0609,1.25604,0.01715, -0.06045,1.25965,0.00845, -0.0609,1.25604,0.01715, -0.06332,1.25867,0.01678, -0.06045,1.25965,0.00845, -0.02972,1.23563,0.07368, -0.02367,1.22848,0.07047, -0.02085,1.23626,0.07781, -0.02367,1.22848,0.07047, -0.0123,1.22821,0.07384, -0.02085,1.23626,0.07781, -0.00879,1.26171,0.09069, -0.0076,1.25064,0.088, 0,1.25884,0.09174, -0.0076,1.25064,0.088, 0,1.25112,0.08923, 0,1.25884,0.09174, 0,1.21761,0.03547, 0,1.21552,0.04637, -0.00723,1.21695,0.04555, -0.07023,1.27958,0.03767, -0.0667,1.27327,0.05123, -0.06858,1.27965,0.0514, -0.01315,1.23656,0.08006, -0.02085,1.23626,0.07781, -0.0123,1.22821,0.07384, -0.05723,1.2522,0.01787, -0.0609,1.25604,0.01715, -0.05342,1.25298,0.00928, -0.06045,1.25965,0.00845, -0.07262,1.27969,-0.00539, -0.06285,1.26415,-0.00309, -0.0777,1.31122,0.01351, -0.08438,1.28612,0.00471, -0.07573,1.29881,0.01441, -0.09008,1.31005,-0.01032, -0.08611,1.31463,-0.00524, -0.07882,1.29978,-0.00559, -0.08438,1.28612,0.00471, -0.09604,1.28501,-0.00966, -0.09014,1.27388,-0.0067, -0.06724,1.26686,0.01577, -0.07484,1.2602,0.00476, -0.06332,1.25867,0.01678, -0.08438,1.28612,0.00471, -0.09742,1.31077,-0.00592, -0.09808,1.298,-0.00908, -0.07484,1.2602,0.00476, -0.08438,1.28612,0.00471, -0.08302,1.26481,-0.00194, -0.08438,1.28612,0.00471, -0.08818,1.31783,0.00459, -0.09493,1.31596,-0.00147, -0.07262,1.27969,-0.00539, -0.06045,1.25965,0.00845, -0.06792,1.26025,0.00094, -0.08692,1.28517,-0.01328, -0.07262,1.27969,-0.00539, -0.08186,1.2745,-0.00958, -0.0767,1.26597,-0.00501, -0.07262,1.27969,-0.00539, -0.06792,1.26025,0.00094, -0.08692,1.28517,-0.01328, -0.09021,1.29688,-0.01302, -0.07262,1.27969,-0.00539, -0.08438,1.28612,0.00471, -0.0777,1.31122,0.01351, -0.08818,1.31783,0.00459, -0.08818,1.31783,0.00459, -0.0777,1.31122,0.01351, -0.07816,1.31599,0.00132, -0.07262,1.27969,-0.00539, -0.09008,1.31005,-0.01032, -0.07882,1.29978,-0.00559, -0.08186,1.2745,-0.00958, -0.07262,1.27969,-0.00539, -0.0767,1.26597,-0.00501, -0.08438,1.28612,0.00471, -0.09014,1.27388,-0.0067, -0.08302,1.26481,-0.00194, -0.08438,1.28612,0.00471, -0.07406,1.28893,0.01498, -0.07573,1.29881,0.01441, -0.08438,1.28612,0.00471, -0.07484,1.2602,0.00476, -0.06724,1.26686,0.01577, -0.08438,1.28612,0.00471, -0.07177,1.28009,0.01507, -0.07406,1.28893,0.01498, -0.08438,1.28612,0.00471, -0.09808,1.298,-0.00908, -0.09604,1.28501,-0.00966, -0.07262,1.27969,-0.00539, -0.09021,1.29688,-0.01302, -0.09008,1.31005,-0.01032, -0.08438,1.28612,0.00471, -0.09493,1.31596,-0.00147, -0.09742,1.31077,-0.00592, -0.07882,1.29978,-0.00559, -0.08611,1.31463,-0.00524, -0.07816,1.31599,0.00132, -0.08438,1.28612,0.00471, -0.06724,1.26686,0.01577, -0.07177,1.28009,0.01507, 0,1.26362,0.09341, -0.00879,1.26171,0.09069, 0,1.25884,0.09174, -0.00931,1.32109,0.08153, -0.01438,1.31283,0.07895, -0.00789,1.31027,0.08043, -0.07198,1.32098,0.05679, -0.07308,1.334,0.0574, -0.07426,1.32357,0.05277, -0.06885,1.31663,0.06067, -0.06632,1.32308,0.0629, -0.07198,1.32098,0.05679, -0.06632,1.32308,0.0629, -0.07028,1.32903,0.06039, -0.07198,1.32098,0.05679, -0.07509,1.33874,0.05462, -0.07054,1.35545,0.05999, -0.07662,1.34467,0.04784, -0.0215,1.33679,0.08078, -0.00931,1.32109,0.08153, -0.0113,1.33435,0.08343, -0.03228,1.34693,0.07827, -0.03255,1.34161,0.07752, -0.01861,1.34091,0.08232, -0.0215,1.33679,0.08078, -0.0113,1.33435,0.08343, -0.01861,1.34091,0.08232, -0.03255,1.34161,0.07752, -0.0331,1.33154,0.07653, -0.02158,1.32687,0.07898, -0.07198,1.32098,0.05679, -0.07028,1.32903,0.06039, -0.07308,1.334,0.0574, -0.07426,1.32357,0.05277, -0.07591,1.32547,0.04546, -0.07447,1.31052,0.04458, -0.07308,1.334,0.0574, -0.07509,1.33874,0.05462, -0.07426,1.32357,0.05277, -0.03282,1.22791,0.0613, -0.02235,1.22209,0.06108, -0.03093,1.22799,0.06463, -0.02235,1.22209,0.06108, -0.02201,1.22309,0.06484, -0.03093,1.22799,0.06463, -0.0731,1.30975,0.0524, -0.07198,1.32098,0.05679, -0.07426,1.32357,0.05277, -0.0579,1.28663,0.06556, -0.06362,1.28358,0.06286, -0.05984,1.28019,0.06589, -0.0579,1.28663,0.06556, -0.06242,1.29301,0.06351, -0.06362,1.28358,0.06286, -0.06242,1.29301,0.06351, -0.06782,1.29159,0.05893, -0.06362,1.28358,0.06286, -0.06362,1.28358,0.06286, -0.06782,1.29159,0.05893, -0.06572,1.2798,0.06003, -0.05322,1.30294,0.07019, -0.06398,1.3,0.06301, -0.06242,1.29301,0.06351, -0.05322,1.30294,0.07019, -0.06391,1.30679,0.06338, -0.06398,1.3,0.06301, -0.05322,1.30294,0.07019, -0.06242,1.29301,0.06351, -0.0579,1.28663,0.06556, -0.0553,1.32054,0.06849, -0.06281,1.32678,0.0652, -0.06632,1.32308,0.0629, -0.06239,1.31339,0.06486, -0.05322,1.30294,0.07019, -0.0553,1.32054,0.06849, -0.05697,1.33119,0.0684, -0.06281,1.32678,0.0652, -0.0553,1.32054,0.06849, -0.04321,1.30286,0.07431, -0.04407,1.32169,0.07304, -0.05322,1.30294,0.07019, -0.04407,1.32169,0.07304, -0.0553,1.32054,0.06849, -0.05322,1.30294,0.07019, -0.01861,1.34091,0.08232, -0.0113,1.33435,0.08343, -0.0119,1.34577,0.08461, -0.0215,1.33679,0.08078, -0.01861,1.34091,0.08232, -0.03255,1.34161,0.07752, -0.00931,1.32109,0.08153, -0.0215,1.33679,0.08078, -0.02158,1.32687,0.07898, -0.03255,1.34161,0.07752, -0.02158,1.32687,0.07898, -0.0215,1.33679,0.08078, -0.07447,1.31052,0.04458, -0.0731,1.30975,0.0524, -0.07426,1.32357,0.05277, -0.07385,1.29993,0.03892, -0.07238,1.30016,0.05146, -0.07447,1.31052,0.04458, -0.06239,1.31339,0.06486, -0.06632,1.32308,0.0629, -0.06885,1.31663,0.06067, -0.06239,1.31339,0.06486, -0.0553,1.32054,0.06849, -0.06632,1.32308,0.0629, -0.03204,1.23539,0.0016, -0.04196,1.24137,0.01174, -0.03862,1.24182,-0.00035, -0.07591,1.32547,0.04546, -0.07426,1.32357,0.05277, -0.07509,1.33874,0.05462, -0.07591,1.32547,0.04546, -0.07509,1.33874,0.05462, -0.07662,1.34467,0.04784, -0.07662,1.34467,0.04784, -0.07767,1.32552,0.03517, -0.07591,1.32547,0.04546, -0.07385,1.29993,0.03892, -0.07447,1.31052,0.04458, -0.07594,1.31054,0.03424, -0.07767,1.32552,0.03517, -0.0794,1.3395,0.02451, -0.07847,1.32401,0.02407, -0.07549,1.35591,0.04042, -0.06907,1.36504,0.05375, -0.06877,1.37605,0.04344, -0.07549,1.35591,0.04042, -0.06877,1.37605,0.04344, -0.07521,1.36243,0.03473, -0.01477,1.22046,0.03429, -0.01466,1.21907,0.0448, -0.02345,1.22239,0.04425, -0.01477,1.22046,0.03429, -0.00723,1.21695,0.04555, -0.01466,1.21907,0.0448, -0.02503,1.23017,0.00403, -0.03478,1.23507,0.01392, -0.03204,1.23539,0.0016, -0.02721,1.23366,-0.00837, -0.02503,1.23017,0.00403, -0.03204,1.23539,0.0016, -0.03316,1.23991,-0.01178, -0.03862,1.24182,-0.00035, -0.0465,1.25056,-0.00266, -0.01477,1.22046,0.03429, 0,1.21761,0.03547, -0.00723,1.21695,0.04555, -0.03154,1.22797,0.03229, -0.01477,1.22046,0.03429, -0.02345,1.22239,0.04425, -0.02503,1.23017,0.00403, -0.02579,1.22936,0.01621, -0.03478,1.23507,0.01392, -0.03204,1.23539,0.0016, -0.03478,1.23507,0.01392, -0.04196,1.24137,0.01174, -0.03862,1.24182,-0.00035, -0.04196,1.24137,0.01174, -0.04692,1.24657,0.00995, -0.05342,1.25298,0.00928, -0.06045,1.25965,0.00845, -0.06285,1.26415,-0.00309, -0.0465,1.25056,-0.00266, -0.0434,1.24935,-0.0162, -0.03316,1.23991,-0.01178, -0.0434,1.24935,-0.0162, -0.0465,1.25056,-0.00266, -0.06285,1.26415,-0.00309, -0.03316,1.23991,-0.01178, -0.0434,1.24935,-0.0162, -0.0228,1.23744,-0.02778, -0.06362,1.28358,0.06286, -0.06572,1.2798,0.06003, -0.05984,1.28019,0.06589, -0.07509,1.33874,0.05462, -0.06822,1.34604,0.06187, -0.07054,1.35545,0.05999, -0.0591,1.37122,0.06388, -0.06907,1.36504,0.05375, -0.07054,1.35545,0.05999, -0.0609,1.25604,0.01715, -0.06318,1.25883,0.02643, -0.06332,1.25867,0.01678, -0.07878,1.32355,0.01812, -0.07847,1.32401,0.02407, -0.0794,1.3395,0.02451, -0.0794,1.3395,0.02451, -0.07549,1.35591,0.04042, -0.07521,1.36243,0.03473, -0.01271,1.22073,0.0666, -0.02367,1.22848,0.07047, -0.02201,1.22309,0.06484, }; // ¶¥µãÊý×é¶ÔÏó Vertex Array Object, VAO // ¶¥µã»º³å¶ÔÏó Vertex Buffer Object£¬VBO // Ë÷Òý»º³å¶ÔÏó£ºElement Buffer Object£¬EBO»òIndex Buffer Object£¬IBO GLuint VBO, VAO; glGenVertexArrays(1, &VAO); glGenBuffers(1, &VBO); // !!! Bind the Vertex Array Object first, then bind and set vertex buffer(s) and attribute pointer(s). glBindVertexArray(VAO); // °Ñ¶¥µãÊý×鏴֯µ½»º³åÖй©OpenGLʹÓà glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); // ÉèÖö¥µãpositionÊôÐÔÖ¸Õë glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 3 * sizeof(GLfloat), (GLvoid*)0); glEnableVertexAttribArray(0); // ÉèÖö¥µãTexCoordÊôÐÔÖ¸Õë //glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, 5 * sizeof(GLfloat), (GLvoid*)(3 * sizeof(GLfloat))); //glEnableVertexAttribArray(1); glBindVertexArray(0); // ʹÓÃÏß¿òģʽ½øÐÐäÖȾ glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // ¶ÁÈ¡²¢´´½¨Ìùͼ GLuint texture; glGenTextures(1, &texture); glBindTexture(GL_TEXTURE_2D, texture); // Ö®ºó¶ÔGL_TEXTURE_2DµÄËùÒÔ²Ù×÷¶¼×÷ÓÃÔÚtexture¶ÔÏóÉÏ // ÉèÖÃÎÆÀí»·ÈÆ·½Ê½ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); // ÉèÖÃÎÆÀí¹ýÂË·½Ê½ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // äÖȾ while (!glfwWindowShouldClose(window)) { // Calculate deltatime of current frame GLfloat currentFrame = glfwGetTime(); deltaTime = currentFrame - lastFrame; lastFrame = currentFrame; // ¼ì²éʼþ glfwPollEvents(); do_movement(); // äÖȾָÁî glClearColor(0.2f, 0.3f, 0.3f, 1.0f); // glClear(GL_COLOR_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // °ó¶¨texture glBindTexture(GL_TEXTURE_2D, texture); // »æÍ¼ ourShader.Use(); glBindVertexArray(VAO); // ÉèÖÃÏà»ú²ÎÊý //glm::mat4 model; glm::mat4 view; glm::mat4 projection; view = camera.GetViewMatrix(); projection = glm::perspective(camera.Zoom, (GLfloat)mWidth / (GLfloat)mHeight, 0.1f, 1000.0f); // Get their uniform location GLint modelLoc = glGetUniformLocation(ourShader.Program, "model"); GLint viewLoc = glGetUniformLocation(ourShader.Program, "view"); GLint projLoc = glGetUniformLocation(ourShader.Program, "projection"); // Pass them to the shaders glm::mat4 model; model = glm::translate(model, glm::vec3(0.0f, -13.0f, 0.0f)); //model = glm::rotate(model, (GLfloat)glfwGetTime() * 1.0f, glm::vec3(0.5f, 1.0f, 0.0f)); model = glm::scale(model, glm::vec3(10.0f, 10.0f, 10.0f)); glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model)); glDrawArrays(GL_TRIANGLES, 0, 9108); glBindVertexArray(0); glUniformMatrix4fv(viewLoc, 1, GL_FALSE, glm::value_ptr(view)); // Note: currently we set the projection matrix each frame, but since the projection matrix rarely changes it's often best practice to set it outside the main loop only once. glUniformMatrix4fv(projLoc, 1, GL_FALSE, glm::value_ptr(projection)); // ½»»»»º³å glfwSwapBuffers(window); } // ÊÍ·ÅVAO,VBO glDeleteVertexArrays(1, &VAO); glDeleteBuffers(1, &VBO); // ÊÍ·ÅGLFW·ÖÅäµÄÄÚ´æ glfwTerminate(); return 0; } void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { // µ±Óû§°´ÏÂESC¼ü,ÎÒÃÇÉèÖÃwindow´°¿ÚµÄWindowShouldCloseÊôÐÔΪtrue // ¹Ø±ÕÓ¦ÓóÌÐò if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); if (key >= 0 && key < 1024) { if (action == GLFW_PRESS) keys[key] = true; else if (action == GLFW_RELEASE) keys[key] = false; } } void do_movement() { // ÉãÏñ»ú¿ØÖÆ GLfloat cameraSpeed = 5.0f * deltaTime; if (keys[GLFW_KEY_W] || keys[GLFW_KEY_UP]) camera.ProcessKeyboard(FORWARD, deltaTime); if (keys[GLFW_KEY_S] || keys[GLFW_KEY_DOWN]) camera.ProcessKeyboard(BACKWARD, deltaTime); if (keys[GLFW_KEY_A] || keys[GLFW_KEY_LEFT]) camera.ProcessKeyboard(LEFT, deltaTime); if (keys[GLFW_KEY_D] || keys[GLFW_KEY_RIGHT]) camera.ProcessKeyboard(RIGHT, deltaTime); } void mouse_callback(GLFWwindow* window, double xpos, double ypos) { if (firstMouse) { lastX = xpos; lastY = ypos; firstMouse = false; } GLfloat xoffset = xpos - lastX; GLfloat yoffset = lastY - ypos; // ×¢ÒâÕâÀïÊÇÏà·´µÄ£¬ÒòΪy×ø±êÊǴӵײ¿Íù¶¥²¿ÒÀ´ÎÔö´óµÄ lastX = xpos; lastY = ypos; camera.ProcessMouseMovement(xoffset, yoffset); } void scroll_callback(GLFWwindow* window, double xoffset, double yoffset) { camera.ProcessMouseScroll(yoffset); }
THISISAGOODNAME/learnopengl-glitter
other/renderDoc reverse engineering/main.cpp
C++
mit
88,752
using System.ComponentModel.DataAnnotations; namespace ContosoUniversity.Web.ViewModels { public class TokenViewModel { [Required] [EmailAddress] public string Email { get; set; } [Required] [DataType(DataType.Password)] public string Password { get; set; } } }
alimon808/contoso-university
ContosoUniversity.Web/ViewModels/TokenViewModel.cs
C#
mit
326
<?php session_start(); include_once "base.php"; $rowsPerPage=10; $offset=2; $sql = "SELECT area_code,area_desc,active FROM `area` ORDER BY area_code "; $query = mysql_query($sql); if(!$query) die('MySQL Error: '.mysql_error()); ?> <div class='form'> <button onclick="open_menu('area_form');"><span><a>+ Add New</a></span></button><br /><br /> <div class='browse tbody'> <table width="100%" cellspacing="0" cellpadding="0"> <thead> <tr><td width="150px">Code</td><td width="300px">Description</td><td></td></tr> <thead> <tbody> <?php while($line=mysql_fetch_array($query)){ ?> <tr><td><?php echo $line[0] ?></td><td><?php echo $line[1] ?></td><td><button onclick="open_menu('area_form',{action:'view',code:'<?php echo $line[0]; ?>'});">View</button>&nbsp;<button onclick="open_menu('area_form',{action:'edit',code:'<?php echo $line[0]; ?>'});">Edit</button></td></tr> <?php }?> </tbody> </table> <br /> <br /> <div>
StarkLiew/AtOfis
callback/area_browse.php
PHP
mit
1,048
require "spec_helper" describe Time do describe ".beginning_of_timehop_day" do subject { time.beginning_of_timehop_day } context "after 5am" do let(:time) { Time.parse("2011-11-07 15:15:33") } let(:beginning_of_timehop_day) { Time.parse("2011-11-07 5:00:00") } it { should be_within(1.second).of(beginning_of_timehop_day) } end context "before 5am" do let(:time) { Time.parse("2011-11-07 3:15:33") } let(:beginning_of_timehop_day) { Time.parse("2011-11-06 5:00:00") } it { should be_within(1.second).of(beginning_of_timehop_day) } end end describe ".end_of_timehop_day" do subject { time.end_of_timehop_day } context "after 5am" do let(:time) { Time.parse("2011-11-07 15:15:33") } let(:end_of_timehop_day) { Time.parse("2011-11-08 4:59:59") } it { should be_within(1.second).of(end_of_timehop_day) } end context "before 5am" do let(:time) { Time.parse("2011-11-07 3:15:33") } let(:end_of_timehop_day) { Time.parse("2011-11-07 4:59:59") } it { should be_within(1.second).of(end_of_timehop_day) } end end end
timehop/timehop_time
spec/timehop_time/time_spec.rb
Ruby
mit
1,128
"use strict"; const util = require("util"); const colors = require("colors"); const consoleLog = console.log; const consoleWarn = console.warn; const consoleError = console.error; const EError = require("../eerror"); function padd(str, length = process.stdout.columns) { return str + " ".repeat(length - str.length % length); } /** * Terminal output formatter that makes output colorful and organized. */ const Formatter = module.exports = { /** * Adds tabs to the given text. * * @param {string} str * The text to tab. * @param {number} x * Amount of tabs to add. * * @returns {string} * Tabbed text. */ tab(str = "", x = 1) { let tab = " ".repeat(x); let cols = process.stdout.columns - tab.length; let match = str.match(new RegExp(`.{1,${cols}}|\n`, "g")); str = match ? match.join(tab) : str; return tab + str; }, /** * Formats given text into a heading. * * @param {string} str * The heading text. * @param {string} marker * Heading character. * @param {string} color2 * The color of the heading. */ heading(str, marker = "»".blue, color2 = "cyan") { consoleLog(); consoleLog(marker + " " + str.toUpperCase()[color2]); consoleLog(" " + "¨".repeat(process.stdout.columns - 3)[color2]); }, /** * Prints given items in list format. * * @param {Array|Object|string} items * The items to print. * @param {number} inset * The tabbing. * @param {string} color * Color of the item text. */ list(items, inset = 0, color = "green") { const insetTab = " ".repeat(inset) + "• "[color]; if (Array.isArray(items)) { items.forEach((item) => { consoleLog(this.tab(item).replace(/ /, insetTab)); }); } else if (typeof items === "object") { for (let [key, text] of Object.entries(items)) { consoleLog(insetTab + key[color]); if (typeof text !== "string") { this.list(text, (inset || 0) + 1, color); } else { consoleLog(this.tab(text, inset + 2)); } } } else if (typeof items === "string") { consoleLog(insetTab + items); } }, /** * Prints formatted errors. * * @param {Error|string} error * The error to print. */ error(error) { consoleLog(); // Handling extended errors which provided in better format error data. if (error instanceof EError) { consoleLog(); consoleLog("!! ERROR ".red + "& STACK".yellow); consoleLog(" ¨¨¨¨¨¨ ".red + "¨".yellow.repeat(process.stdout.columns - " ¨¨¨¨¨¨ ".length) + "\n"); let messageNum = 0; error.getStackedErrors().forEach((error) => { error.messages.forEach((message, i) => { console.log((i === 0 ? (" #" + (++messageNum)).red : " ") + " " + message) }); error.stacks.forEach((stack) => console.log(" • ".yellow + stack.gray)); console.log(); }); return; } // Handling for default errors. Formatter.heading("ERROR", "!!".red, "red"); if (!(error instanceof Error)) { return consoleError(error); } let firstBreak = error.message.indexOf("\n"); if (firstBreak === -1) { firstBreak = error.message.length; } let errorBody = error.message.substr(firstBreak).replace(/\n(.)/g, "\n • ".red + "$1"); consoleError(error.message.substr(0, firstBreak)); consoleError(errorBody); Formatter.heading("STACK TRACE", ">>".yellow, "yellow"); consoleError(error.stack.substr(error.stack.indexOf(" at ")).replace(/ /g, " • ".yellow)); }, /** * Prints formatted warning. * * @param {string} str * Warning text. */ warn(str) { Formatter.heading("WARNING", "!".yellow, "yellow"); consoleWarn(str); }, /** * Registers listeners for formatting text from recognized tags. */ infect() { console.log = function(str, ...args) { str = str || ""; if (typeof str === "string") { if (args) { str = util.format(str, ...args); } const headingMatch = str.match(/.{2}/); if (str.length > 2 && headingMatch[0] === "--") { Formatter.heading(str.substr(headingMatch.index + 2)); return; } } consoleLog(str); }; console.error = function(str, ...args) { str = str || ""; if (typeof str === "string" && args) { str = util.format(str, ...args); } Formatter.error(str); // Used for exit codes. Errors can specify error codes. if (str instanceof Error && Number.isInteger(str.code)) { return str.code; } // If not an error object then default to 1. return 1; }; console.warn = function(str, ...args) { str = str || ""; if (typeof str === "string" && args) { str = util.format(str, ...args); } Formatter.warn(str); }; }, };
archfz/drup
src/terminal-utils/formatter.js
JavaScript
mit
5,026
require 'active_support/core_ext/array/conversions' require 'delegate' module ServiceObject # Provides a customized +Array+ to contain errors that happen in service layer. # Also provides a utility APIs to handle errors well in controllers. # (All array methods are available by delegation, too.) # errs = ServiceObject::Errors.new # errs.add 'Something is wrong.' # errs.add 'Another is wrong.' # errs.messages # => ['Something is wrong.','Another is wrong.'] # errs.full_messages # => ['Something is wrong.','Another is wrong.'] # errs.to_xml # => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<errors>\n <error>Something is wrong.</error>\n # <error>Another is wrong.</error>\n</errors>\n" # errs.empty? # => false # errs.clear # => [] # errs.empty? # => true class Errors < Delegator # @return [Array<String>] Messages of the current errors attr_reader :messages def initialize @messages = [] end # @private def __getobj__ # :nodoc: @messages end # Returns all the current error messages # @return [Array<String>] Messages of the current errors def full_messages messages end # Adds a new error message to the current error messages # @param message [String] New error message to add def add(message) @messages << message end # Generates XML format errors # errs = ServiceObject::Errors.new # errs.add 'Something is wrong.' # errs.add 'Another is wrong.' # errs.to_xml # => # <?xml version=\"1.0\" encoding=\"UTF-8\"?> # <errors> # <error>Something is wrong.</error> # <error>Another is wrong.</error> # </errors> # @return [String] XML format string def to_xml(options={}) super({ root: "errors", skip_types: true }.merge!(options)) end # Generates duplication of the message # @return [Array<String>] def as_json messages.dup end end end
untidy-hair/service_object
lib/service_object/errors.rb
Ruby
mit
2,021
#!/usr/bin/python # -*- coding: utf-8 -*- # @author victor li nianchaoli@msn.cn # @date 2015/10/07 import baseHandler class MainHandler(baseHandler.RequestHandler): def get(self): self.redirect('/posts/last')
lncwwn/woniu
routers/mainHandler.py
Python
mit
224
/** * */ package me.dayler.ai.ami.conn; import javax.net.SocketFactory; import javax.net.ssl.SSLSocketFactory; import java.io.*; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.util.NoSuchElementException; import java.util.Scanner; import java.util.regex.Pattern; /** * Default implementation of the SocketConnectionFacade interface using java.io. * * @author srt, asalazar * @version $Id: SocketConnectionFacadeImpl.java 1377 2009-10-17 03:24:49Z srt $ */ public class SocketConnectionFacadeImpl implements SocketConnectionFacade { static final Pattern CRNL_PATTERN = Pattern.compile("\r\n"); static final Pattern NL_PATTERN = Pattern.compile("\n"); private Socket socket; private Scanner scanner; private BufferedWriter writer; /** * Creates a new instance for use with the Manager API that uses CRNL ("\r\n") as line delimiter. * * @param host the foreign host to connect to. * @param port the foreign port to connect to. * @param ssl <code>true</code> to use SSL, <code>false</code> otherwise. * @param timeout 0 incidcates default * @param readTimeout see {@link Socket#setSoTimeout(int)} * @throws IOException if the connection cannot be established. */ public SocketConnectionFacadeImpl(String host, int port, boolean ssl, int timeout, int readTimeout) throws IOException { Socket socket; if (ssl) { socket = SSLSocketFactory.getDefault().createSocket(); } else { socket = SocketFactory.getDefault().createSocket(); } socket.setSoTimeout(readTimeout); socket.connect(new InetSocketAddress(host, port), timeout); initialize(socket, CRNL_PATTERN); } /** * Creates a new instance for use with FastAGI that uses NL ("\n") as line delimiter. * * @param socket the underlying socket. * @throws IOException if the connection cannot be initialized. */ SocketConnectionFacadeImpl(Socket socket) throws IOException { initialize(socket, NL_PATTERN); } private void initialize(Socket socket, Pattern pattern) throws IOException { this.socket = socket; InputStream inputStream = socket.getInputStream(); OutputStream outputStream = socket.getOutputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); this.scanner = new Scanner(reader); this.scanner.useDelimiter(pattern); this.writer = new BufferedWriter(new OutputStreamWriter(outputStream)); } public String readLine() throws IOException { String line; try { line = scanner.next(); } catch (IllegalStateException e) { if (scanner.ioException() != null) { throw scanner.ioException(); } else { // throw new IOException("No more lines available", e); // JDK6 throw new IOException("No more lines available: " + e.getMessage()); } } catch (NoSuchElementException e) { if (scanner.ioException() != null) { throw scanner.ioException(); } else { // throw new IOException("No more lines available", e); // JDK6 throw new IOException("No more lines available: " + e.getMessage()); } } return line; } public void write(String s) throws IOException { writer.write(s); } public void flush() throws IOException { writer.flush(); } public void close() throws IOException { socket.close(); scanner.close(); } public boolean isConnected() { return socket.isConnected(); } public InetAddress getLocalAddress() { return socket.getLocalAddress(); } public int getLocalPort() { return socket.getLocalPort(); } public InetAddress getRemoteAddress() { return socket.getInetAddress(); } public int getRemotePort() { return socket.getPort(); } }
dayler/AsteriskInterface
src/me/dayler/ai/ami/conn/SocketConnectionFacadeImpl.java
Java
mit
4,154
// test/main.js var Parser = require('../src/markdown-parser'); var parser = new Parser(); var parserOptions = new Parser(); var assert = require("assert"); describe('tests', function() { describe('parsing', function() { it('bold', function(done) { parser.parse("**b** __b__", function(err, result) { assert.equal(result.bolds.length, 2); done(); }); }); it('code', function(done) { parser.parse("```js \n var a; \n ```", function(err, result) { assert.equal(result.codes.length, 1); done(); }); }); it('headings', function(done) { parser.parse("#header1 \n#header2", function(err, result) { assert.equal(result.headings.length, 2); done(); }); }); it('italics', function(done) { parser.parse("*iiiii*\nother\n\n *iiiii*", function(err, result) { assert.equal(result.italics.length, 2); done(); }); }); it('list', function(done) { parser.parse("- item1 \n- item2 \nother\n*item1\nitem2", function(err, result) { assert.equal(result.lists[0].length, 2); done(); }); }); it('headings', function(done) { parser.parse("#header1 \n#header2", function(err, result) { assert.equal(result.headings.length, 2); done(); }); }); it('images full no options', function(done) { parser.parse("[google](http://www.google.com)", function(err, result) { assert.equal(result.references.length, 1); done(); }); }); it('images full', function(done) { parserOptions.parse("[google](http://www.google.com)", function(err, result) { assert.equal(result.references.length, 1); done(); }); }); it('images relative', function(done) { parserOptions.options = {html_url: "https://github.com/darul75/markdown-parser"}; parserOptions.parse("[zoubida](./images/zoubida.png)", function(err, result) { assert.equal(result.references.length, 1); assert.equal(result.references[0].href, parserOptions.options.html_url+'/blob/master/images/zoubida.png'); parserOptions.options.html_url = "https://github.com/CMBJS/NodeBots"; var res = parserOptions.parse("![Alt text](poster.jpg)", function(err, result) { assert.equal(result.references.length, 1); assert.equal(result.references[0].href, parserOptions.options.html_url+'/blob/master/poster.jpg'); done(); }); }); }); it('images relative not needed', function(done) { parserOptions.options = {html_url: "https://github.com/darul75/markdown-parser"}; parserOptions.parse("[zoubida](http://www.google.com/images/zoubida.png)", function(err, result) { assert.equal(result.references.length, 1); assert.equal(result.references[0].href, 'http://www.google.com/images/zoubida.png'); done(); }); }); }); });
darul75/markdown-parser
test/main.js
JavaScript
mit
3,107
import React from "react"; import { connect } from "react-redux"; import { withRouter, Route } from "react-router"; import { Link } from "react-router-dom"; import { Entry } from "../../pages/entry"; class BlogCard extends React.Component { render() { return ( <div> <h2>{this.props.title}</h2> <p>{this.props.content}</p> <Link to={`/blog/${this.props.slug}`}>Read more..</Link> </div> ); } } export default withRouter(BlogCard);
relhtml/prologue
components/BlogCard/index.js
JavaScript
mit
481
module.exports = { stores: process.env.STORES ? process.env.STORES.split(',') : [ 'elasticsearch', 'postgresql', 'leveldb' ], postgresql: { host: process.env.POSTGRESQL_HOST || 'localhost', port: process.env.POSTGRESQL_PORT || '5432', username: process.env.POSTGRESQL_USER || 'postgres', password: process.env.POSTGRESQL_PASSWORD || 'postgres' }, elasticsearch: { hosts: [ process.env.ELASTICSEARCH_HOST || 'http://localhost:9200' ] }, level: { path: process.env.LEVEL_PATH || '/tmp/level' }, queue: { client: process.env.QUEUE_CLIENT || 'kue', kue: { port: process.env.QUEUE_KUE_PORT ? Number(process.env.QUEUE_KUE_PORT) : 3000 }, rabbitmq: { connectionString: process.env.QUEUE_RABBITMQ_CONNECTIONSTRING } }, project: { client: process.env.PROJECT_CLIENT || 'file', file: { path: process.env.PROJECT_FILE_PATH || '/tmp/dstore' } }, api: { port: (process.env.API_PORT ? Number(process.env.API_PORT) : (process.env.PORT ? process.env.PORT : 2020)) } };
trappsnl/dstore
config.js
JavaScript
mit
1,089
import appActions from './application' import todosActions from './todos' import filterActions from './filter' import commentsActions from './comments' import userActions from './user' export { appActions, todosActions, filterActions, commentsActions, userActions } export * from './application' export * from './todos' export * from './filter' export * from './comments' export * from './user'
Angarsk8/elixir-cowboy-react-spa
client/src/actions/index.js
JavaScript
mit
407
package info.yongli.statistic.table; /** * Created by yangyongli on 25/04/2017. */ public class ColumnTransformer { }
yongli82/dsl
src/main/java/info/yongli/statistic/table/ColumnTransformer.java
Java
mit
123
#region License // Copyright (c) 2009 Sander van Rossen // // 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. #endregion using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace HyperGraph { public abstract class NodeConnector : IElement { public NodeConnector(NodeItem item, bool enabled) { Item = item; Enabled = enabled; } // The Node that owns this NodeConnector public Node Node { get { return Item.Node; } } // The NodeItem that owns this NodeConnector public NodeItem Item { get; private set; } // Set to true if this NodeConnector can be connected to public bool Enabled { get; internal set; } // Iterates through all the connectors connected to this connector public IEnumerable<NodeConnection> Connectors { get { if (!Enabled) yield break; var parentNode = Node; if (parentNode == null) yield break; foreach (var connection in parentNode.Connections) { if (connection.From == this) yield return connection; if (connection.To == this) yield return connection; } } } // Returns true if connector has any connection attached to it public bool HasConnection { get { if (!Enabled) return false; var parentNode = Node; if (parentNode == null) return false; foreach (var connection in parentNode.Connections) { if (connection.From == this) return true; if (connection.To == this) return true; } return false; } } internal PointF Center { get { return new PointF((bounds.Left + bounds.Right) / 2.0f, (bounds.Top + bounds.Bottom) / 2.0f); } } internal RectangleF bounds; internal RenderState state; public abstract ElementType ElementType { get; } } public sealed class NodeInputConnector : NodeConnector { public NodeInputConnector(NodeItem item, bool enabled) : base(item, enabled) { } public override ElementType ElementType { get { return ElementType.InputConnector; } } } public sealed class NodeOutputConnector : NodeConnector { public NodeOutputConnector(NodeItem item, bool enabled) : base(item, enabled) { } public override ElementType ElementType { get { return ElementType.OutputConnector; } } } }
xlgames-inc/XLE
Tools/HyperGraph/NodeConnector.cs
C#
mit
3,299
import * as R_drop from '../ramda/dist/src/drop'; declare const number: number; declare const string: string; declare const boolean_array: boolean[]; // @dts-jest:pass R_drop(number, string); // @dts-jest:pass R_drop(number, boolean_array);
ikatyang/types-ramda
tests/drop.ts
TypeScript
mit
243
function browserSupportsHtml5HistoryApi() { return !! (history && history.replaceState && history.pushState); } $(document).ready(function() { //_gaq.push(['_trackEvent', 'Citizen-Format-Smartanswer', 'Load']); if(browserSupportsHtml5HistoryApi()) { var formSelector = ".current form"; initializeHistory(); var getCurrentPosition = function () { var slugArray = document.URL.split('/'); return slugArray.splice(3, slugArray.length).join('/'); }; // events // get new questions on submit $(formSelector).live('submit', function(event) { $('input[type=submit]', this).attr('disabled', 'disabled'); var form = $(this); var postData = form.serializeArray(); reloadQuestions(form.attr('action'), postData); event.preventDefault(); return false; }); // Track when a user clicks on 'Start again' link $('.start-right').live('click', function() { window._gaq && window._gaq.push(['_trackEvent', 'MS_smart_answer', getCurrentPosition(), 'Start again']); reloadQuestions($(this).attr('href')); return false; }); // Track when a user clicks on a 'Change Answer' link $('.link-right a').live('click', function() { var href = $(this).attr('href'); window._gaq && window._gaq.push(['_trackEvent', 'MS_smart_answer', href, 'Change Answer']); reloadQuestions(href); return false; }); // manage next/back by tracking popstate event window.onpopstate = function (event) { if(event.state !== null) { updateContent(event.state['html_fragment']); } else { return false; } }; } $('#current-error').focus(); // helper functions function toJsonUrl(url) { var parts = url.split('?'); var json_url = parts[0].replace(/\/$/, "") + ".json"; if (parts[1]) { json_url += "?"; json_url += parts[1]; } return window.location.protocol + "//" + window.location.host + json_url; } function fromJsonUrl(url) { return url.replace(/\.json$/, ""); } function redirectToNonAjax(url) { window.location = url; } // replace all the questions currently in the page with whatever is returned for given url function reloadQuestions(url, params) { var url = toJsonUrl(url); addLoading('<p class="next-step">Loading next step&hellip;</p>'); $.ajax(url, { type: 'GET', dataType:'json', data: params, timeout: 10000, error: function(jqXHR, textStatus, errorStr) { var paramStr = $.param(params); redirectToNonAjax(url.replace('.json', '?' + paramStr).replace('??', '?')); }, success: function(data, textStatus, jqXHR) { addToHistory(data); updateContent(data['html_fragment']); } }); } // manage the URL function addToHistory(data) { history.pushState(data, data['title'], data['url']); window._gaq && window._gaq.push(['_trackPageview', data['url']]); } // add an indicator of loading function addLoading(fragment){ $('#content .step.current') .addClass('loading') .find('form .next-question') .append(fragment); $.event.trigger('smartanswerAnswer'); }; // update the content (i.e. plonk in the html fragment) function updateContent(fragment){ $('.smart_answer #js-replaceable').html(fragment); $.event.trigger('smartanswerAnswer'); if ($(".outcome").length !== 0) { $.event.trigger('smartanswerOutcome'); } } function initializeHistory(data) { if (! browserSupportsHtml5HistoryApi() && window.location.pathname.match(/\/.*\//) ) { addToHistory({url: window.location.pathname}); } data = { html_fragment: $('.smart_answer #js-replaceable').html(), title: "Question", url: window.location.toString() }; history.replaceState(data, data['title'], data['url']); } var contentPosition = { latestQuestionTop : 0, latestQuestionIsOffScreen: function($latestQuestion) { var top_of_view = $(window).scrollTop(); this.latestQuestionTop = $latestQuestion.offset().top; return (this.latestQuestionTop < top_of_view); }, correctOffscreen: function() { $latestQuestion = $('.smart_answer .done-questions li.done:last-child'); if (!$latestQuestion.length) { $latestQuestion = $('body'); } if(this.latestQuestionIsOffScreen($latestQuestion)) { $(window).scrollTop(this.latestQuestionTop); } }, init: function() { var self = this; $(document).bind('smartanswerAnswer', function() { self.correctOffscreen(); $('.meta-wrapper').show(); }); // Show feedback form in outcomes $(document).bind('smartanswerOutcome', function() { $('.report-a-problem-container form #url').val(window.location.href); $('.meta-wrapper').show(); }); } }; contentPosition.init(); });
ministryofjustice/smart-answers
app/assets/javascripts/smart-answers.js
JavaScript
mit
4,962
Ext.define('CustomIcons.view.Main', { extend: 'Ext.tab.Panel', xtype: 'main', requires: [ 'Ext.TitleBar', 'Ext.Video' ], config: { tabBarPosition: 'bottom', items: [ { title: 'Welcome', iconCls: 'headphones', styleHtmlContent: true, scrollable: true, items: { docked: 'top', xtype: 'titlebar', title: 'Welcome to Sencha Touch 2' }, html: [ "You've just generated a new Sencha Touch 2 project. What you're looking at right now is the ", "contents of <a target='_blank' href=\"app/view/Main.js\">app/view/Main.js</a> - edit that file ", "and refresh to change what's rendered here." ].join("") }, { title: 'Get Started', iconCls: 'facebook2', items: [ { docked: 'top', xtype: 'titlebar', title: 'Getting Started' }, { xtype: 'video', url: 'http://av.vimeo.com/64284/137/87347327.mp4?token=1330978144_f9b698fea38cd408d52a2393240c896c', posterUrl: 'http://b.vimeocdn.com/ts/261/062/261062119_640.jpg' } ] } ] } });
joshuamorony/CustomIcons
app/view/Main.js
JavaScript
mit
1,564
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _index = require('../../../_lib/setUTCDay/index.js'); var _index2 = _interopRequireDefault(_index); var _index3 = require('../../../_lib/setUTCISODay/index.js'); var _index4 = _interopRequireDefault(_index3); var _index5 = require('../../../_lib/setUTCISOWeek/index.js'); var _index6 = _interopRequireDefault(_index5); var _index7 = require('../../../_lib/setUTCISOWeekYear/index.js'); var _index8 = _interopRequireDefault(_index7); var _index9 = require('../../../_lib/startOfUTCISOWeek/index.js'); var _index10 = _interopRequireDefault(_index9); var _index11 = require('../../../_lib/startOfUTCISOWeekYear/index.js'); var _index12 = _interopRequireDefault(_index11); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var MILLISECONDS_IN_MINUTE = 60000; function setTimeOfDay(hours, timeOfDay) { var isAM = timeOfDay === 0; if (isAM) { if (hours === 12) { return 0; } } else { if (hours !== 12) { return 12 + hours; } } return hours; } var units = { twoDigitYear: { priority: 10, set: function set(dateValues, value) { var century = Math.floor(dateValues.date.getUTCFullYear() / 100); var year = century * 100 + value; dateValues.date.setUTCFullYear(year, 0, 1); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, year: { priority: 10, set: function set(dateValues, value) { dateValues.date.setUTCFullYear(value, 0, 1); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, isoYear: { priority: 10, set: function set(dateValues, value, options) { dateValues.date = (0, _index12.default)((0, _index8.default)(dateValues.date, value, options), options); return dateValues; } }, quarter: { priority: 20, set: function set(dateValues, value) { dateValues.date.setUTCMonth((value - 1) * 3, 1); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, month: { priority: 30, set: function set(dateValues, value) { dateValues.date.setUTCMonth(value, 1); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, isoWeek: { priority: 40, set: function set(dateValues, value, options) { dateValues.date = (0, _index10.default)((0, _index6.default)(dateValues.date, value, options), options); return dateValues; } }, dayOfWeek: { priority: 50, set: function set(dateValues, value, options) { dateValues.date = (0, _index2.default)(dateValues.date, value, options); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, dayOfISOWeek: { priority: 50, set: function set(dateValues, value, options) { dateValues.date = (0, _index4.default)(dateValues.date, value, options); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, dayOfMonth: { priority: 50, set: function set(dateValues, value) { dateValues.date.setUTCDate(value); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, dayOfYear: { priority: 50, set: function set(dateValues, value) { dateValues.date.setUTCMonth(0, value); dateValues.date.setUTCHours(0, 0, 0, 0); return dateValues; } }, timeOfDay: { priority: 60, set: function set(dateValues, value, options) { dateValues.timeOfDay = value; return dateValues; } }, hours: { priority: 70, set: function set(dateValues, value, options) { dateValues.date.setUTCHours(value, 0, 0, 0); return dateValues; } }, timeOfDayHours: { priority: 70, set: function set(dateValues, value, options) { var timeOfDay = dateValues.timeOfDay; if (timeOfDay != null) { value = setTimeOfDay(value, timeOfDay); } dateValues.date.setUTCHours(value, 0, 0, 0); return dateValues; } }, minutes: { priority: 80, set: function set(dateValues, value) { dateValues.date.setUTCMinutes(value, 0, 0); return dateValues; } }, seconds: { priority: 90, set: function set(dateValues, value) { dateValues.date.setUTCSeconds(value, 0); return dateValues; } }, milliseconds: { priority: 100, set: function set(dateValues, value) { dateValues.date.setUTCMilliseconds(value); return dateValues; } }, timezone: { priority: 110, set: function set(dateValues, value) { dateValues.date = new Date(dateValues.date.getTime() - value * MILLISECONDS_IN_MINUTE); return dateValues; } }, timestamp: { priority: 120, set: function set(dateValues, value) { dateValues.date = new Date(value); return dateValues; } } }; exports.default = units; module.exports = exports['default'];
lucionei/chamadotecnico
chamadosTecnicosFinal-app/node_modules/date-fns/parse/_lib/units/index.js
JavaScript
mit
4,996
<script src='<?php echo base_url()?>assets/js/tinymce/tinymce.min.js'></script> <script> tinymce.init({ selector: '#myartikel' }); </script> <form action="<?php echo base_url('admin/Cartikel_g/proses_add_artikel') ?>" method="post" enctype="multipart/form-data"> <div class="col-md-8 whitebox"> <h3 class="container">Tambah Artikel</h3> <hr/> <input type="hidden" name="id_user" value=""> <div class="form-group bts-ats"> <label class="col-sm-2 control-label">Judul</label> <div class="col-sm-10"> <input type="text" name="judul_artikel" class="form-control" placeholder="judul"> </div> <div class="sambungfloat"></div> </div> <div class="col-md-12"> <textarea id="myartikel" name="isi_artikel" rows="15"></textarea> </div> <button type="submit" name="submit" value="submit" class="btn kanan bts-ats btn-primary">Publish</button> </div> <div class="col-md-4 whitebox"> <div class=" form-group artikelkat"> <div class="form-group bts-ats"> <label class="col-sm-3 control-label">Kategori</label> <div class="col-sm-8"> <select name="id_kategori" class="form-control"> <?php foreach ($getkategori as $kat): ?> <option value="<?php echo $kat->id_kategori; ?>"><?php echo $kat->judul_kategori; ?></option> <?php endforeach ?> </select> </div> <div class="sambungfloat"></div> </div> <div class="form-group bts-ats"> <label class="col-sm-3 control-label">Tanggal</label> <div class="col-sm-8"> <input type="date" name="tgl_artikel" class="form-control" value="<?php echo date('Y-m-d'); ?>"> </div> <div class="sambungfloat"></div> </div> <div class="form-group bts-ats"> <label class="col-sm-3 control-label">Gambar</label> <div class="col-sm-8"> <form> <img id="preview" class="imgbox" src="<?php echo base_url('assets/img/artikel/default.jpg') ?>" alt="preview gambar"> <input id="filedata" type="file" name="photo" accept="image/*" /> </form> </div> <div class="sambungfloat"></div> </div> </div> </div> </form> <script> function readURL(input) { if (input.files && input.files[0]) { var reader = new FileReader(); reader.onload = function (e) { $('#preview').attr('src', e.target.result); } reader.readAsDataURL(input.files[0]); } } $('#filedata').change(function(){ readURL(this); }); </script>
afifhidayat24/minunew
application/views/admin/add-guru-artikel-v.php
PHP
mit
2,940
# frozen_string_literal: true module ArrayUtil def self.insert_before(array, new_element, element) idx = array.index(element) || -1 array.insert(idx, new_element) end def self.insert_after(array, new_element, element) idx = array.index(element) || -2 array.insert(idx + 1, new_element) end end
tablexi/nucore-open
lib/array_util.rb
Ruby
mit
322
// get params function getParams() { var params = { initial_amount: parseInt($('#initial_amount').val(), 10) || 0, interest_rate_per_annum: parseFloat($('#interest_rate_per_annum').val()) / 100 || 0, monthly_amount: parseFloat($('#monthly_amount').val()), num_months: parseInt($('#num_months').val(), 10) }; params.method = $('#by_monthly_amount').is(':checked') ? 'by_monthly_amount' : 'by_num_months'; return params; } function updateUI() { var params = getParams(); var data = computeLoanData(params); updatePaymentTable(data); console.log(data); } function computeLoanData(params) { var total_paid = 0, num_months = 0, remainder = Math.floor(params.initial_amount * 100), monthly_interest_rate = params.interest_rate_per_annum / 12, monthly_amount, months = []; if (params.method == 'by_num_months') { var pow = Math.pow(1 + monthly_interest_rate, params.num_months); monthly_amount = remainder * monthly_interest_rate * pow / (pow - 1); } else { monthly_amount = params.monthly_amount * 100; } monthly_amount = Math.ceil(monthly_amount); // compute by amount first while (remainder > 0) { var interest = Math.floor(remainder * monthly_interest_rate); remainder += interest; var to_pay = remainder > monthly_amount ? monthly_amount : remainder; total_paid += to_pay; remainder -= to_pay; months.push({ interest: interest / 100, repayment: to_pay / 100, remainder: remainder / 100 }); } $('#monthly_amount').val((monthly_amount / 100).toFixed(2)); $('#num_months').val(months.length); return { total_paid: total_paid / 100, interest_paid: (total_paid - params.initial_amount * 100) / 100, months: months }; } function updatePaymentTable(data) { $('#total_repayment').text(data.total_paid.toFixed(2)); $('#total_interested_paid').text(data.interest_paid.toFixed(2)); var rows = $('#monthly_breakdown').empty(); for (var idx=0; idx < data.months.length; idx++) { var month_num = idx+1; var is_new_year = (idx % 12) === 0; var tr = $('<tr />') .append($('<td />').text(month_num)) .append($('<td />').text(data.months[idx].interest.toFixed(2))) .append($('<td />').text(data.months[idx].repayment.toFixed(2))) .append($('<td />').text(data.months[idx].remainder.toFixed(2))) .addClass(is_new_year ? 'jan' : '') .appendTo(rows); } } // initiatilize listeners $('#initial_amount').on('change', updateUI); $('#interest_rate_per_annum').on('change', updateUI); $('#monthly_amount').on('change', updateUI); $('#num_months').on('change', updateUI); $('#by_monthly_amount').on('change', updateUI); $('#by_num_months').on('change', updateUI);
timotheeg/html_loan_calculator
js/main.js
JavaScript
mit
2,663
using Lidgren.Network; namespace Gem.Network.Handlers { public class DummyHandler : IMessageHandler { public void Handle(NetConnection sender, object args) { } } }
gmich/Gem
Gem.Network/Handlers/DummyHandler.cs
C#
mit
195
define([ "dojo/_base/declare", "dojo/_base/fx", "dojo/_base/lang", "dojo/dom-style", "dojo/mouse", "dojo/on", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dojo/text!./templates/TGPrdItem.html", "dijit/_OnDijitClickMixin", "dijit/_WidgetsInTemplateMixin", "dijit/form/Button" ], function(declare, baseFx, lang, domStyle, mouse, on, _WidgetBase, _TemplatedMixin, template,_OnDijitClickMixin,_WidgetsInTemplateMixin,Button){ return declare([_WidgetBase, _OnDijitClickMixin,_TemplatedMixin,_WidgetsInTemplateMixin], { // Some default values for our author // These typically map to whatever you're passing to the constructor // 产品名称 rtzzhmc: "No Name", // Using require.toUrl, we can get a path to our AuthorWidget's space // and we want to have a default avatar, just in case // 产品默认图片 rimg: require.toUrl("./images/defaultAvatar.png"), // //起点金额 // code5:"", // //投资风格 // code7: "", // //收益率 // code8:"", // //产品经理 // code3:"", // //产品ID // rprid:"", // Our template - important! templateString: template, // A class to be applied to the root node in our template baseClass: "TGPrdWidget", // A reference to our background animation mouseAnim: null, // Colors for our background animation baseBackgroundColor: "#fff", // mouseBackgroundColor: "#def", postCreate: function(){ // Get a DOM node reference for the root of our widget var domNode = this.domNode; // Run any parent postCreate processes - can be done at any point this.inherited(arguments); // Set our DOM node's background color to white - // smoothes out the mouseenter/leave event animations domStyle.set(domNode, "backgroundColor", this.baseBackgroundColor); }, //设置属性 _setRimgAttr: function(imagePath) { // We only want to set it if it's a non-empty string if (imagePath != "") { // Save it on our widget instance - note that // we're using _set, to support anyone using // our widget's Watch functionality, to watch values change // this._set("avatar", imagePath); // Using our avatarNode attach point, set its src value this.imgNode.src = HTTP+imagePath; } } }); });
MingXingTeam/dojo-mobile-test
contactsList/widgets/TGPrdWidget/TGPrdWidget.js
JavaScript
mit
2,307
const { ipcRenderer, remote } = require('electron'); const mainProcess = remote.require('./main'); const currentWindow = remote.getCurrentWindow(); const $name = $('.name-input'); const $servings = $('.servings-input'); const $time = $('.time-input'); const $ingredients = $('.ingredients-input'); const $directions = $('.directions-input'); const $notes = $('.notes-input'); const $saveButton = $('.save-recipe-button'); const $seeAllButton = $('.see-all-button'); const $homeButton = $('.home-button'); const $addRecipeButton = $('.add-button'); let pageNav = (page) => { currentWindow.loadURL(`file://${__dirname}/${page}`); }; $saveButton.on('click', () => { let name = $name.val(); let servings = $servings.val(); let time = $time.val(); let ingredients = $ingredients.val(); let directions = $directions.val(); let notes = $notes.val(); let recipe = { name, servings, time, ingredients, directions, notes}; mainProcess.saveRecipe(recipe); pageNav('full-recipe.html'); }); $seeAllButton.on('click', () => { mainProcess.getRecipes(); pageNav('all-recipes.html'); }); $homeButton.on('click', () => { pageNav('index.html'); }); $addRecipeButton.on('click', () => { pageNav('add-recipe.html'); });
mjvalade/electron-recipes
app/renderer.js
JavaScript
mit
1,232
require 'spec_helper' module Sexpr::Matcher describe Rule, "eat" do let(:rule){ Rule.new :hello, self } def eat(seen) @seen = seen end it 'delegates to the defn' do rule.eat([:foo]) @seen.should eq([:foo]) end end end
blambeau/sexpr
spec/unit/matcher/rule/test_eat.rb
Ruby
mit
264
/* * Store drawing on server */ function saveDrawing() { var drawing = $('#imagePaint').wPaint('image'); var imageid = $('#imageTarget').data('imageid'); var creatormail = $('input[name=creatorMail]').val(); //Add spinning wheel var spin = $(document.createElement('div')); spin.addClass('spin'); $('#dialog-content').html(spin); $.ajax({ type: 'POST', url: 'savedrawing', dataType: 'json', data: {drawing: drawing, imageid: imageid, creatormail: creatormail}, success: function (resp) { if (resp.kind == 'success') popup("<p>Die Zeichnung wurde erfolgreich gespeichert.</p><p>Sie wird jedoch zuerst überprüft bevor sie in der Galerie zu sehen ist.</p>"); if (resp.kind == 'error') popup("<p>Die Zeichnung konnte leider nicht gespeichert werden.</p><p>Der Fehler wird untersucht.</p>"); }, fail: function() { popup("<p>Die Zeichnung konnte leider nicht gespeichert werden.</p><p>Der Fehler wird untersucht.</p>"); } }); } function saveDrawingLocal() { var imageid = $('img#imageTarget').data('imageid'); var drawingid = $('img#drawingTarget').data('drawingid'); window.location.href = 'getfile?drawingid=' + drawingid + '&imageid=' + imageid; } /* * Popup message */ function popup(message) { // get the screen height and width var maskHeight = $(document).height(); var maskWidth = $(window).width(); // calculate the values for center alignment var dialogTop = (maskHeight/2) - ($('#dialog-box').height()/2); var dialogLeft = (maskWidth/2) - ($('#dialog-box').width()/2); // assign values to the overlay and dialog box $('#dialog-overlay').css({height:maskHeight, width:maskWidth}).show(); $('#dialog-box').css({top:dialogTop, left:dialogLeft}).show(); // display the message $('#dialog-content').html(message); } $(document).ready(function() { /*********************************************** * Encrypt Email script- Please keep notice intact * Tool URL: http://www.dynamicdrive.com/emailriddler/ * **********************************************/ var emailriddlerarray=[104,111,115,116,109,97,115,116,101,114,64,109,97,99,104,100,105,101,115,116,114,97,115,115,101,98,117,110,116,46,99,111,109] var encryptedemail_id65='' //variable to contain encrypted email for (var i=0; i<emailriddlerarray.length; i++) encryptedemail_id65+=String.fromCharCode(emailriddlerarray[i]) $('#mailMaster').attr('href', 'mailto:' + encryptedemail_id65 ); var emailriddlerarray=[105,110,102,111,64,109,97,99,104,100,105,101,115,116,114,97,115,115,101,98,117,110,116,46,99,111,109] var encryptedemail_id23='' //variable to contain encrypted email for (var i=0; i<emailriddlerarray.length; i++) encryptedemail_id23+=String.fromCharCode(emailriddlerarray[i]) $('#mailInfo').attr('href', 'mailto:' + encryptedemail_id23 ); /* * Change image */ $(".imageSmallContainer").click(function(evt){ var imageid = $(this).data('imageid'); var drawingid = $(this).data('drawingid'); var ids = {imageid : imageid, drawingid : drawingid}; $.get('changeimage', ids) .done(function(data){ var imageContainer = $('#imageContainer'); //Hide all images in container imageContainer.children('.imageRegular').hide(); //Add spinning wheel var spin = $(document.createElement('div')); spin.addClass('spin'); imageContainer.prepend(spin); //Remove hidden old image $('#imageTarget').remove(); //Create new hidden image var imageNew = $(document.createElement('img')); imageNew.attr('id', 'imageTarget'); imageNew.addClass('imageRegular'); imageNew.attr('data-imageid', imageid); imageNew.data('imageid', imageid); imageNew.attr('src', data.imagefile); imageNew.css('display', 'none'); //Prepend new Image to container imageContainer.prepend(imageNew); //For Admin and Gallery also change Drawing if (typeof drawingid != 'undefined') { var drawing = $('#drawingTarget'); drawing.attr('src', data.drawingfile); drawing.attr('data-drawingid', drawingid); drawing.data('drawingid', drawingid); drawing.attr('drawingid', drawingid); } // If newImage src is loaded, remove spin and fade all imgs // Fires too early in FF imageContainer.imagesLoaded(function() { spin.remove(); imageContainer.children('.imageRegular').fadeIn(); }); }); }); /* * Change the class of moderated images */ $('.imageSmallContainerOuter input').change(function(evt){ var container = $(this).parent(); var initial = container.data('initialstate'); var checked = $(this).prop('checked'); container.removeClass('notApproved'); container.removeClass('approved'); container.removeClass('changed'); if (checked && initial == 'approved') container.addClass('approved'); else if ((checked && initial == 'notApproved') || (!checked && initial == 'approved')) container.addClass('changed'); else if (!checked && initial == 'notApproved') container.addClass('notApproved') }); $('#dialog-box .close, #dialog-overlay').click(function () { $('#dialog-overlay, #dialog-box').hide(); return false; }); $('#drawingDialogBtn').click(function(evt){ popup("<p>Aus den besten eingeschickten Zeichnungen werden Freecards gedruckt.</p> \ <p>Mit dem Klick auf den Speicherbutton erklärst du dich dafür bereit, dass dein Bild vielleicht veröffentlicht wird.</p> \ <p>Wenn du deine Email-Adresse angibst können wir dich informieren falls wir deine Zeichnung ausgewählt haben.</p> \ <input type='text' name='creatorMail' placeholder='Email Adresse'> \ <a id='drawingSaveBtn' href='javascript:saveDrawing();' class='btn'>Speichern</a>"); }); });
lukpueh/Mach-die-strasse-bunt
static/js/main.js
JavaScript
mit
6,075
'use strict' //Globals will be the stage which is the parrent of all graphics, canvas object for resizing and the renderer which is pixi.js framebuffer. var stage = new PIXI.Container(); var canvas = document.getElementById("game");; var renderer = PIXI.autoDetectRenderer(1024, 570, {view:document.getElementById("game")}); var graphics = new PIXI.Graphics(); // Create or grab the application var app = app || {}; function init(){ resize(); renderer = PIXI.autoDetectRenderer(1024, 570, {view:document.getElementById("game")} ); renderer.backgroundColor = 0x50503E; //level(); canvas.focus(); app.Game.init(renderer, window, canvas, stage); } function resize(){ var gameWidth = window.innerWidth; var gameHeight = window.innerHeight; var scaleToFitX = gameWidth / 1000; var scaleToFitY = gameHeight / 500; // Scaling statement belongs to: https://www.davrous.com/2012/04/06/modernizing-your-html5-canvas-games-part-1-hardware-scaling-css3/ var optimalRatio = Math.min(scaleToFitX, scaleToFitY); var currentScreenRatio = gameWidth / gameHeight; if(currentScreenRatio >= 1.77 && currentScreenRatio <= 1.79) { canvas.style.width = gameWidth + "px"; canvas.style.height = gameHeight + "px"; }else{ canvas.style.width = 1000 * optimalRatio + "px"; canvas.style.height = 500 * optimalRatio + "px"; } } //do not REMOVE /* //takes two arrays // the w_array is an array of column width values [w1, w2, w3, ...], y_array is //3d array setup as such [[row 1], [row 2], [row3]] and the rows are arrays // that contain pairs of y,l values where y is the fixed corner of the //rectangle and L is the height of the rectangle. function level(){ // drawRect( xstart, ystart, x size side, y size side) app.levelData = { w_array: [102 * 2, 102 * 2, 102 * 2, 102 * 2, 102 * 2], y_array: [ [ [0 * 2, 90 * 2], [0 * 2, 90 * 2], [0 * 2, 90 * 2], [0 * 2, 90 * 2], [0 * 2, 90 * 2], ], [ [90 * 2, 90 * 2], [90 * 2, 90 * 2], [90 * 2, 90 * 2], [90 * 2, 90 * 2], [90 * 2, 90 * 2], ], [ [180 * 2, 90 * 2], [180 * 2, 90 * 2], [180 * 2, 90 * 2], [180 * 2, 90 * 2], [180 * 2, 90 * 2], ], [ [270 * 2, 90 * 2], [270 * 2, 90 * 2], [270 * 2, 90 * 2], [270 * 2, 90 * 2], [270 * 2, 90 * 2], ] ], p_array: [ [50,50,50,50], [50,450,50,50], [920,50,50,50], [920,450,50,50], ] }; // set a fill and a line style again and draw a rectangle graphics.lineStyle(2, 0x995702, 1); graphics.beginFill(0x71FF33, 1); var x = 0; //reset the x x = 0; //post fence post for(var h = 0, hlen = app.levelData.y_array.length; h < hlen; h++){ for( var i = 0, len = app.levelData.w_array.length; i < len; i++){ //setup the y value graphics.drawRect(x, app.levelData.y_array[h][i][0], app.levelData.w_array[i], app.levelData.y_array[h][i][1]); x += app.levelData.w_array[i]; } //reset the x x = 0; } graphics.lineStyle(2, 0x3472D8, 1); graphics.beginFill(0x3472D8, 1); for(var i = 0, len = app.levelData.p_array.length; i < len; i++){ graphics.drawRect(app.levelData.p_array[i][0], app.levelData.p_array[i][1], app.levelData.p_array[i][2], app.levelData.p_array[i][3]); } stage.addChild(graphics); } // Reads in a JSON object with data function readJSONFile( filePath ){ $.getJSON( filePath, function(){} ) .done( function( data ){ console.log( "SUCCESS: File read from " + filePath ); app.levelData = data; } ) .fail( function( ){ console.log( "FAILED: File at " + filePath ); } ); } */ window.addEventListener('resize', resize, false); window.addEventListener('orientationchange', resize, false);
Sanguinary/Poolhopper
bin/init.js
JavaScript
mit
4,385
import React, {Component} from 'react'; import {connect} from 'react-redux'; class MapFull extends Component { constructor() { super(); this.state = { htmlContent: null }; } componentDidMount() { this.getMapHtml(); } componentDidUpdate(prevProps, prevState) { if (!this.props.map || this.props.map.filehash !== prevProps.map.filehash) { this.getMapHtml(); } } getMapHtml() { const path = this.props.settings.html_url + this.props.map.filehash; fetch(path).then(response => { return response.text(); }).then(response => { this.setState({ htmlContent: response }); }); } getMarkup() { return {__html: this.state.htmlContent} } render() { return ( <div className="MapFull layoutbox"> <h3>{this.props.map.titlecache}</h3> <div id="overDiv" style={{position: 'fixed', visibility: 'hide', zIndex: 1}}></div> <div> {this.state.htmlContent ? <div> <div dangerouslySetInnerHTML={this.getMarkup()}></div> </div> : null} </div> </div> ) } } function mapStateToProps(state) { return {settings: state.settings} } export default connect(mapStateToProps)(MapFull);
howardjones/network-weathermap
websrc/cacti-user/src/components/MapFull.js
JavaScript
mit
1,270
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Queues extends CI_Controller { public function __construct() { parent::__construct(); date_default_timezone_set('Asia/Kolkata'); $this->is_logged_in(); } public function index() { $data['pageName']='Queues'; $data['pageLink']='queues'; $data['username']=$this->session->userdata('username'); $this->load->view('header',$data); $this->load->view('menu',$data); $this->load->view('breadcrump_view',$data); $this->load->model('Queue_model'); $data['queryresult'] = $this->Queue_model->getAllCustomerAppointments(); $data['checkedin']= array(); $data['inservice']= array(); $data['paymentdue']= array(); $data['complete']= array(); $data['appointments'] = array(); foreach ($data['queryresult'] as $row) { if($row['maxstatus']!=NULL) { if($row['maxstatus'] == 100) { array_push($data['checkedin'],$row); } else if($row['maxstatus'] == 200) { array_push($data['inservice'],$row); } else if($row['maxstatus'] == 300) { array_push($data['paymentdue'],$row); } else if($row['maxstatus'] == 400) { array_push($data['complete'],$row); } else { array_push($data['appointments'],$row); } } else { array_push($data['appointments'],$row); } } $this->load->view('queues_view',$data); $this->load->view('footer',$data); } public function updateAppointments() { $appntId = $_POST['appointmentId']; $status = $_POST['status']; $this->load->model('Queue_model'); $data = array( 'appointment_id' => $appntId , 'status' => $status ); $this->Queue_model->updateQueueDetails($data); if($status == 100){ $this->session->set_flashdata('flashSuccess', 'Customer moved to Check-In Q successfully !'); } if($status == 200){ $this->session->set_flashdata('flashSuccess', 'Customer moved to Service Q successfully !'); } if($status == 300){ $this->session->set_flashdata('flashSuccess', 'Customer moved to Payment Q successfully !'); } if($status == 400){ $this->session->set_flashdata('flashSuccess', 'All services done !!!'); } } function is_logged_in(){ $is_logged_in = $this->session->userdata('is_logged_in'); if(!isset($is_logged_in) || $is_logged_in!= true){ redirect ('/login', 'refresh'); } } public function add(){ $this->_validate(); $data = array( 'title' => $this->input->post('customer_name'), 'start' => $this->input->post('start_time'), 'end' => $this->input->post('end_time'), 'allDay' => 'false', ); $insert = $this->appointments->add_appointments($data); $insert2 = $this->queues->add($data); echo json_encode(array("status" => TRUE)); } private function _validate() { $data = array(); $data['error_string'] = array(); $data['inputerror'] = array(); $data['status'] = TRUE; if($this->input->post('customer_name') == '') { $data['inputerror'][] = 'customer_name'; $data['error_string'][] = 'Customer Name is required'; $data['status'] = FALSE; } if($this->input->post('start_time') == '') { $data['inputerror'][] = 'start_time'; $data['error_string'][] = 'Start Time is required'; $data['status'] = FALSE; } if($this->input->post('end_time') == '') { $data['inputerror'][] = 'end_time'; $data['error_string'][] = 'End Time is required'; $data['status'] = FALSE; } if($data['status'] === FALSE) { echo json_encode($data); exit(); } } }
dazal/dazlive
application/controllers/Queues_old.php
PHP
mit
3,814
<?php namespace Todohelpist\Console\Commands; use Illuminate\Console\Command; use Illuminate\Foundation\Inspiring; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputArgument; class Inspire extends Command { /** * The console command name. * * @var string */ protected $name = 'inspire'; /** * The console command description. * * @var string */ protected $description = 'Display an inspiring quote'; /** * Execute the console command. * * @return mixed */ public function handle() { $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL); } }
Swader/todohelpist
app/Console/Commands/Inspire.php
PHP
mit
619
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.10.21 at 02:36:24 PM CEST // package nl.wetten.bwbng.toestand; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementRefs; import javax.xml.bind.annotation.XmlMixed; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;choice maxOccurs="unbounded" minOccurs="0"> * &lt;group ref="{}tekst.minimaal"/> * &lt;element ref="{}nootref"/> * &lt;element ref="{}noot"/> * &lt;/choice> * &lt;element ref="{}meta-data" minOccurs="0"/> * &lt;/sequence> * &lt;attGroup ref="{}attlist.intitule"/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "content" }) @XmlRootElement(name = "intitule") public class Intitule { @XmlElementRefs({ @XmlElementRef(name = "nadruk", type = Nadruk.class, required = false), @XmlElementRef(name = "omissie", type = Omissie.class, required = false), @XmlElementRef(name = "sup", type = JAXBElement.class, required = false), @XmlElementRef(name = "noot", type = Noot.class, required = false), @XmlElementRef(name = "unl", type = JAXBElement.class, required = false), @XmlElementRef(name = "meta-data", type = MetaData.class, required = false), @XmlElementRef(name = "nootref", type = Nootref.class, required = false), @XmlElementRef(name = "ovl", type = JAXBElement.class, required = false), @XmlElementRef(name = "inf", type = JAXBElement.class, required = false) }) @XmlMixed protected List<Object> content; @XmlAttribute(name = "id") @XmlSchemaType(name = "anySimpleType") protected String id; @XmlAttribute(name = "status") protected String status; @XmlAttribute(name = "terugwerking") @XmlSchemaType(name = "anySimpleType") protected String terugwerking; @XmlAttribute(name = "label-id") @XmlSchemaType(name = "anySimpleType") protected String labelId; @XmlAttribute(name = "stam-id") @XmlSchemaType(name = "anySimpleType") protected String stamId; @XmlAttribute(name = "versie-id") @XmlSchemaType(name = "anySimpleType") protected String versieId; @XmlAttribute(name = "publicatie") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String publicatie; /** * Gets the value of the content property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the content property. * * <p> * For example, to add a new item, do as follows: * <pre> * getContent().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Nadruk } * {@link Omissie } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link Noot } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link MetaData } * {@link Nootref } * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link String } * * */ public List<Object> getContent() { if (content == null) { content = new ArrayList<Object>(); } return this.content; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the status property. * * @return * possible object is * {@link String } * */ public String getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link String } * */ public void setStatus(String value) { this.status = value; } /** * Gets the value of the terugwerking property. * * @return * possible object is * {@link String } * */ public String getTerugwerking() { return terugwerking; } /** * Sets the value of the terugwerking property. * * @param value * allowed object is * {@link String } * */ public void setTerugwerking(String value) { this.terugwerking = value; } /** * Gets the value of the labelId property. * * @return * possible object is * {@link String } * */ public String getLabelId() { return labelId; } /** * Sets the value of the labelId property. * * @param value * allowed object is * {@link String } * */ public void setLabelId(String value) { this.labelId = value; } /** * Gets the value of the stamId property. * * @return * possible object is * {@link String } * */ public String getStamId() { return stamId; } /** * Sets the value of the stamId property. * * @param value * allowed object is * {@link String } * */ public void setStamId(String value) { this.stamId = value; } /** * Gets the value of the versieId property. * * @return * possible object is * {@link String } * */ public String getVersieId() { return versieId; } /** * Sets the value of the versieId property. * * @param value * allowed object is * {@link String } * */ public void setVersieId(String value) { this.versieId = value; } /** * Gets the value of the publicatie property. * * @return * possible object is * {@link String } * */ public String getPublicatie() { return publicatie; } /** * Sets the value of the publicatie property. * * @param value * allowed object is * {@link String } * */ public void setPublicatie(String value) { this.publicatie = value; } }
digitalheir/java-wetten-nl-library
src/main/java/nl/wetten/bwbng/toestand/Intitule.java
Java
mit
7,834
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("DnDGen.Web.Tests.Integration")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DnDGen.Web.Tests.Integration")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("722de08a-3185-48fd-b1c7-78eb3a1cde4d")] // 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")]
DnDGen/DNDGenSite
DnDGen.Web.Tests.Integration/Properties/AssemblyInfo.cs
C#
mit
1,432
// Copyright © 2014-2016 Ryan Leckey, All Rights Reserved. // Distributed under the MIT License // See accompanying file LICENSE #ifndef ARROW_PASS_H #define ARROW_PASS_H #include <memory> #include <string> #include "arrow/generator.hpp" namespace arrow { class Pass { public: explicit Pass(GContext& ctx) : _ctx(ctx) { } Pass(const Pass& other) = delete; Pass(Pass&& other) = delete; Pass& operator=(const Pass& other) = delete; Pass& operator=(Pass&& other) = delete; protected: GContext& _ctx; }; } // namespace arrow #endif // ARROW_PASS_H
arrow-lang/arrow
include/arrow/pass.hpp
C++
mit
572
/* =========================================================== * bootstrap-modal.js v2.1 * =========================================================== * Copyright 2012 Jordan Schroter * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ========================================================== */ !function ($) { "use strict"; // jshint ;_; /* MODAL CLASS DEFINITION * ====================== */ var Modal = function (element, options) { this.init(element, options); }; Modal.prototype = { constructor: Modal, init: function (element, options) { this.options = options; this.$element = $(element) .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)); this.options.remote && this.$element.find('.modal-body').load(this.options.remote); var manager = typeof this.options.manager === 'function' ? this.options.manager.call(this) : this.options.manager; manager = manager.appendModal ? manager : $(manager).modalmanager().data('modalmanager'); manager.appendModal(this); }, toggle: function () { return this[!this.isShown ? 'show' : 'hide'](); }, show: function () { var e = $.Event('show'); if (this.isShown) return; this.$element.triggerHandler(e); if (e.isDefaultPrevented()) return; this.escape(); this.tab(); this.options.loading && this.loading(); }, hide: function (e) { e && e.preventDefault(); e = $.Event('hide'); this.$element.triggerHandler(e); if (!this.isShown || e.isDefaultPrevented()) return (this.isShown = false); this.isShown = false; this.escape(); this.tab(); this.isLoading && this.loading(); $(document).off('focusin.modal'); this.$element .removeClass('in') .removeClass('animated') .removeClass(this.options.attentionAnimation) .removeClass('modal-overflow') .attr('aria-hidden', true); $.support.transition && this.$element.hasClass('fade') ? this.hideWithTransition() : this.hideModal(); }, layout: function () { var prop = this.options.height ? 'height' : 'max-height', value = this.options.height || this.options.maxHeight; if (this.options.width){ this.$element.css('width', this.options.width); var that = this; this.$element.css('margin-left', function () { if (/%/ig.test(that.options.width)){ return -(parseInt(that.options.width) / 2) + '%'; } else { return -($(this).width() / 2) + 'px'; } }); } else { this.$element.css('width', ''); this.$element.css('margin-left', ''); } this.$element.find('.modal-body') .css('overflow', '') .css(prop, ''); var modalOverflow = $(window).height() - 10 < this.$element.height(); if (value){ this.$element.find('.modal-body') .css('overflow', 'auto') .css(prop, value); } if (modalOverflow || this.options.modalOverflow) { this.$element .css('margin-top', 0) .addClass('modal-overflow'); } else { this.$element .css('margin-top', 0 - this.$element.height() / 2) .removeClass('modal-overflow'); } }, tab: function () { var that = this; if (this.isShown && this.options.consumeTab) { this.$element.on('keydown.tabindex.modal', '[data-tabindex]', function (e) { if (e.keyCode && e.keyCode == 9){ var $next = $(this), $rollover = $(this); that.$element.find('[data-tabindex]:enabled:not([readonly])').each(function (e) { if (!e.shiftKey){ $next = $next.data('tabindex') < $(this).data('tabindex') ? $next = $(this) : $rollover = $(this); } else { $next = $next.data('tabindex') > $(this).data('tabindex') ? $next = $(this) : $rollover = $(this); } }); $next[0] !== $(this)[0] ? $next.focus() : $rollover.focus(); e.preventDefault(); } }); } else if (!this.isShown) { this.$element.off('keydown.tabindex.modal'); } }, escape: function () { var that = this; if (this.isShown && this.options.keyboard) { if (!this.$element.attr('tabindex')) this.$element.attr('tabindex', -1); this.$element.on('keyup.dismiss.modal', function (e) { e.which == 27 && that.hide(); }); } else if (!this.isShown) { this.$element.off('keyup.dismiss.modal') } }, hideWithTransition: function () { var that = this , timeout = setTimeout(function () { that.$element.off($.support.transition.end); that.hideModal(); }, 500); this.$element.one($.support.transition.end, function () { clearTimeout(timeout); that.hideModal(); }); }, hideModal: function () { this.$element .hide() .triggerHandler('hidden'); var prop = this.options.height ? 'height' : 'max-height'; var value = this.options.height || this.options.maxHeight; if (value){ this.$element.find('.modal-body') .css('overflow', '') .css(prop, ''); } }, removeLoading: function () { this.$loading.remove(); this.$loading = null; this.isLoading = false; }, loading: function (callback) { callback = callback || function () {}; var animate = this.$element.hasClass('fade') ? 'fade' : ''; if (!this.isLoading) { var doAnimate = $.support.transition && animate; this.$loading = $('<div class="loading-mask ' + animate + '">') .append(this.options.spinner) .appendTo(this.$element); if (doAnimate) this.$loading[0].offsetWidth; // force reflow this.$loading.addClass('in'); this.isLoading = true; doAnimate ? this.$loading.one($.support.transition.end, callback) : callback(); } else if (this.isLoading && this.$loading) { this.$loading.removeClass('in'); var that = this; $.support.transition && this.$element.hasClass('fade')? this.$loading.one($.support.transition.end, function () { that.removeLoading() }) : that.removeLoading(); } else if (callback) { callback(this.isLoading); } }, focus: function () { var $focusElem = this.$element.find(this.options.focusOn); $focusElem = $focusElem.length ? $focusElem : this.$element; $focusElem.focus(); }, attention: function (){ // NOTE: transitionEnd with keyframes causes odd behaviour if (this.options.attentionAnimation){ this.$element .removeClass('animated') .removeClass(this.options.attentionAnimation); var that = this; setTimeout(function () { that.$element .addClass('animated') .addClass(that.options.attentionAnimation); }, 0); } this.focus(); }, destroy: function () { var e = $.Event('destroy'); this.$element.triggerHandler(e); if (e.isDefaultPrevented()) return; this.teardown(); }, teardown: function () { if (!this.$parent.length){ this.$element.remove(); this.$element = null; return; } if (this.$parent !== this.$element.parent()){ this.$element.appendTo(this.$parent); } this.$element.off('.modal'); this.$element.removeData('modal'); this.$element .removeClass('in') .attr('aria-hidden', true); } }; /* MODAL PLUGIN DEFINITION * ======================= */ $.fn.modal = function (option, args) { return this.each(function () { var $this = $(this), data = $this.data('modal'), options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option); if (!data) $this.data('modal', (data = new Modal(this, options))); if (typeof option == 'string') data[option].apply(data, [].concat(args)); else if (options.show) data.show() }) }; $.fn.modal.defaults = { keyboard: true, backdrop: true, loading: false, show: true, width: null, height: null, maxHeight: null, modalOverflow: false, consumeTab: true, focusOn: null, replace: false, resize: false, attentionAnimation: 'shake', manager: 'body', spinner: '<div class="loading-spinner" style="width: 200px; margin-left: -100px;"><div class="progress progress-striped active"><div class="bar" style="width: 100%;"></div></div></div>' }; $.fn.modal.Constructor = Modal; /* MODAL DATA-API * ============== */ $(function () { $(document).off('.modal').on('click.modal.data-api', '[data-toggle="modal"]', function (e) { var $this = $(this), href = $this.attr('href'), $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))), //strip for ie7 option = $target.data('modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()); e.preventDefault(); $target .modal(option) .one('hide', function () { $this.focus(); }) }); }); }(window.jQuery);
ner0tic/landmarxApp
src/Landmarx/UtilityBundle/Resources/public/js/bootstrap-modal.js
JavaScript
mit
9,265
using System.Collections.Generic; using System.Data.Common; using System.Linq; namespace Affixx.Core.Database.Generator { internal class SqlServerSchemaReader : SchemaReader { private DbConnection _connection; public override Tables ReadSchema(DbConnection connection) { var result = new Tables(); _connection = connection; using (var command = _connection.CreateCommand()) { command.CommandText = TABLE_SQL; using (var reader = command.ExecuteReader()) { while (reader.Read()) { var table = new Table(); table.Name = reader["TABLE_NAME"].ToString(); table.Schema = reader["TABLE_SCHEMA"].ToString(); table.IsView = string.Compare(reader["TABLE_TYPE"].ToString(), "View", true) == 0; table.CleanName = CleanUp(table.Name); table.ClassName = Inflector.MakeSingular(table.CleanName); result.Add(table); } } } //pull the tables in a reader foreach (var table in result) { table.Columns = LoadColumns(table); // Mark the primary key string primaryKey = GetPK(table.Name); var pkColumn = table.Columns.SingleOrDefault(x => x.Name.ToLower().Trim() == primaryKey.ToLower().Trim()); if (pkColumn != null) { pkColumn.IsPK = true; } } return result; } private List<Column> LoadColumns(Table tbl) { using (var command = _connection.CreateCommand()) { command.Connection = _connection; command.CommandText = COLUMN_SQL; var p = command.CreateParameter(); p.ParameterName = "@tableName"; p.Value = tbl.Name; command.Parameters.Add(p); p = command.CreateParameter(); p.ParameterName = "@schemaName"; p.Value = tbl.Schema; command.Parameters.Add(p); var result = new List<Column>(); using (var reader = command.ExecuteReader()) { while (reader.Read()) { var column = new Column(); column.Name = reader["ColumnName"].ToString(); column.PropertyName = CleanUp(column.Name); column.PropertyType = GetPropertyType(reader["DataType"].ToString()); column.IsNullable = reader["IsNullable"].ToString() == "YES"; column.IsAutoIncrement = ((int)reader["IsIdentity"]) == 1; result.Add(column); } } return result; } } string GetPK(string table) { string sql = @" SELECT c.name AS ColumnName FROM sys.indexes AS i INNER JOIN sys.index_columns AS ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id INNER JOIN sys.objects AS o ON i.object_id = o.object_id LEFT OUTER JOIN sys.columns AS c ON ic.object_id = c.object_id AND c.column_id = ic.column_id WHERE (i.type = 1) AND (o.name = @tableName) "; using (var command = _connection.CreateCommand()) { command.CommandText = sql; var p = command.CreateParameter(); p.ParameterName = "@tableName"; p.Value = table; command.Parameters.Add(p); var result = command.ExecuteScalar(); if (result != null) return result.ToString(); } return ""; } string GetPropertyType(string sqlType) { string sysType = "string"; switch (sqlType) { case "bigint": sysType = "long"; break; case "smallint": sysType = "short"; break; case "int": sysType = "int"; break; case "uniqueidentifier": sysType = "Guid"; break; case "smalldatetime": case "datetime": case "date": case "time": sysType = "DateTime"; break; case "float": sysType = "double"; break; case "real": sysType = "float"; break; case "numeric": case "smallmoney": case "decimal": case "money": sysType = "decimal"; break; case "tinyint": sysType = "byte"; break; case "bit": sysType = "bool"; break; case "image": case "binary": case "varbinary": case "timestamp": sysType = "byte[]"; break; case "geography": sysType = "Microsoft.SqlServer.Types.SqlGeography"; break; case "geometry": sysType = "Microsoft.SqlServer.Types.SqlGeometry"; break; } return sysType; } const string TABLE_SQL = @" SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW' "; const string COLUMN_SQL = @" SELECT TABLE_CATALOG AS [Database], TABLE_SCHEMA AS Owner, TABLE_NAME AS TableName, COLUMN_NAME AS ColumnName, ORDINAL_POSITION AS OrdinalPosition, COLUMN_DEFAULT AS DefaultSetting, IS_NULLABLE AS IsNullable, DATA_TYPE AS DataType, CHARACTER_MAXIMUM_LENGTH AS MaxLength, DATETIME_PRECISION AS DatePrecision, COLUMNPROPERTY(object_id('[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']'), COLUMN_NAME, 'IsIdentity') AS IsIdentity, COLUMNPROPERTY(object_id('[' + TABLE_SCHEMA + '].[' + TABLE_NAME + ']'), COLUMN_NAME, 'IsComputed') as IsComputed FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME=@tableName AND TABLE_SCHEMA=@schemaName ORDER BY OrdinalPosition ASC "; } }
Affixx/affixx
Affixx.Core/Database/Generator/SqlServerSchemaReader.cs
C#
mit
4,940
var AWS = require('aws-sdk'); var Policy = require("./s3post").Policy; var helpers = require("./helpers"); var POLICY_FILE = "policy.json"; var schedule = require('node-schedule'); var Worker = function(sqsCommnad, s3Object, simpleData){ var queue = sqsCommnad; var s3 = s3Object; var simpleDataAuth = simpleData; var policyData = helpers.readJSONFile(POLICY_FILE); var policy = new Policy(policyData); var bucket_name = policy.getConditionValueByKey("bucket"); Worker.prototype.job = function(){ var run = schedule.scheduleJob('*/4 * * * * *', function(){ queue.recv(function(err, data){ if (err) { console.log(err); return; } console.log({Body : data.Body, MD5OfBody : data.MD5OfBody}); params = { Bucket: bucket_name, Key: data.Body } s3.getObject(params, function(err, data) { if (err) { console.log(err, err.stack); } else { var request = require('request'); var mime = require('mime'); var gm = require('gm').subClass({ imageMagick: true }); var src = 'http://s3-us-west-2.amazonaws.com/'+params.Bucket+'/'+params.Key; gm(request(src, params.Key)) .rotate('black', 15) .stream(function(err, stdout, stderr) { var buf = new Buffer(''); stdout.on('data', function(res) { buf = Buffer.concat([buf, res]); }); stdout.on('end', function(data) { var atr = { Bucket: params.Bucket, Key: params.Key, Body: buf, ACL: 'public-read', Metadata: { "username" : "Szymon Glowacki", "ip" : "192.168.1.10" } }; s3.putObject(atr, function(err, res) { console.log("done"); }); }); }); } }); }); }); } } module.exports = Worker;
GlowackiHolak/awsWorker
worker.js
JavaScript
mit
1,975
# TODO When raising an exception pass a lambda function, the function being the module/path/name thing ERROR = {'default': "Unknown engine error ({0})", 400: "Bad request sent to search API ({0})", 401: "Incorrect API Key ({0})", 403: "Correct API but request refused ({0})", 404: "Bad request sent to search API ({0})"} class SearchException(Exception): """ Abstract class representing an ifind search exception. """ def __init__(self, module, message): """ SearchException constructor. Args: module (str): name of module/class that's raising exception message (str): exception message to be displayed Usage: raise SearchException("Test", "this is an error") """ message = "{0} - {1}".format(module, message) Exception.__init__(self, message) class EngineConnectionException(SearchException): """ Thrown when an Engine connectivity error occurs. Returns specific response message if status code specified. """ def __init__(self, engine, message, code=None): """ EngineException constructor. Args: engine (str): name of engine that's raising exception message (str): exception message to be displayed (ignored usually here) Kwargs: code (int): response status code of issued request Usage: raise EngineException("Bing", "", code=200) """ self.message = message self.code = code if code: self.message = ERROR.get(code, ERROR['default']).format(self.code) SearchException.__init__(self, engine, self.message) class EngineLoadException(SearchException): """ Thrown when an Engine can't be dynamically loaded. """ pass class EngineAPIKeyException(SearchException): """ Thrown when an Engine's API key hasn't been provided. """ pass class QueryParamException(SearchException): """ Thrown when a query parameters incompatible or missing. """ pass class CacheConnectionException(SearchException): """ Thrown when cache connectivity error occurs. """ pass class InvalidQueryException(SearchException): """ Thrown when an invalid query is passed to engine's search method. """ pass class RateLimitException(SearchException): """ Thrown when an engine's request rate limit has been exceeded. """ pass
leifos/ifind
ifind/search/exceptions.py
Python
mit
2,524
import React, { Component } from 'react' import { Form, Grid, Image, Transition } from 'shengnian-ui-react' const transitions = [ 'scale', 'fade', 'fade up', 'fade down', 'fade left', 'fade right', 'horizontal flip', 'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', 'swing left', 'swing right', 'swing up', 'swing down', 'browse', 'browse right', 'slide down', 'slide up', 'slide right', ] const options = transitions.map(name => ({ key: name, text: name, value: name })) export default class TransitionExampleSingleExplorer extends Component { state = { animation: transitions[0], duration: 500, visible: true } handleChange = (e, { name, value }) => this.setState({ [name]: value }) handleVisibility = () => this.setState({ visible: !this.state.visible }) render() { const { animation, duration, visible } = this.state return ( <Grid columns={2}> <Grid.Column as={Form}> <Form.Select label='Choose transition' name='animation' onChange={this.handleChange} options={options} value={animation} /> <Form.Input label={`Duration: ${duration}ms `} min={100} max={2000} name='duration' onChange={this.handleChange} step={100} type='range' value={duration} /> <Form.Button content={visible ? 'Unmount' : 'Mount'} onClick={this.handleVisibility} /> </Grid.Column> <Grid.Column> <Transition.Group animation={animation} duration={duration}> {visible && <Image centered size='small' src='/assets/images/leaves/4.png' />} </Transition.Group> </Grid.Column> </Grid> ) } }
shengnian/shengnian-ui-react
docs/app/Examples/modules/Transition/Explorers/TransitionExampleGroupExplorer.js
JavaScript
mit
1,810
export class Guest { constructor(public name: String, public quantity: number){ } }
vnaranjo/wedding-seating-chart
client/controllers/guest/guest.ts
TypeScript
mit
95
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Dosen extends MY_Controller { public $data = array( 'breadcrumb' => 'Dosen', 'pesan' => '', 'subtitle' => '', 'main_view' => 'viewDosen', ); public function __construct(){ parent::__construct(); $this->load->model('Dosen_model','dosen',TRUE); $this->load->model('Prodi_model','prodi',TRUE); } public function index(){ $this->data['prodi'] = $this->prodi->get_datatables(); $this->load->view('template',$this->data); } public function ajax_list() { $list = $this->dosen->get_datatables(); $data = array(); $no = $_POST['start']; foreach ($list as $dosen) { $no++; $row = array( "id_dosen" => $dosen['id_dosen'], "nama_dosen" => $dosen['nama_dosen'], "nama_prodi" => $dosen['nama_prodi'] ); $data[] = $row; } $output = array( "draw" => $_POST['draw'], "recordsTotal" => $this->dosen->count_all(), "recordsFiltered" => $this->dosen->count_filtered(), "data" => $data, ); //output to json format echo json_encode($output); } public function ajax_edit($id) { $data = $this->dosen->get_by_id($id); echo json_encode($data); } public function ajax_add() { $this->_validate(); $data = array( 'id_dosen' => $this->input->post('id'), 'nama_dosen' => $this->input->post('nama_dosen'), 'id_prodi' => $this->input->post('id_prodi') ); $insert = $this->dosen->save($data); echo json_encode(array("status" => TRUE)); } public function ajax_update() { $this->_validate(); $data = array( 'id_dosen' => $this->input->post('id'), 'nama_dosen' => $this->input->post('nama_dosen'), 'id_prodi' => $this->input->post('id_prodi') ); $this->dosen->update($data); echo json_encode(array("status" => TRUE)); } public function ajax_delete($id) { $this->dosen->delete_by_id($id); echo json_encode(array("status" => TRUE)); } private function _validate() { $data = array(); $data['error_string'] = array(); $data['inputerror'] = array(); $data['status'] = TRUE; if($this->input->post('nama_dosen') == '') { $data['inputerror'][] = 'nama_dosen'; $data['error_string'][] = 'Nama Dosen Belum Diisi'; $data['status'] = FALSE; } if($this->input->post('id_prodi') == '') { $data['inputerror'][] = 'id_prodi'; $data['error_string'][] = 'Program Studi Belum Dipilih'; $data['status'] = FALSE; } if($data['status'] === FALSE) { echo json_encode($data); exit(); } } } ?>
dhena201/tadev
application/controllers/Dosen.php
PHP
mit
3,127
import {server} from './initializers' module.exports = function startServer(){ server.listen(8080) }
klirix/ThunderCloudServer
src/app.ts
TypeScript
mit
105
using System; using System.ServiceModel; namespace SoapCore.Tests.Wsdl.Services { [ServiceContract] public interface INullableEnumService { [OperationContract] NulEnum? GetEnum(string text); } public class NullableEnumService : INullableEnumService { public NulEnum? GetEnum(string text) { throw new NotImplementedException(); } } }
DigDes/SoapCore
src/SoapCore.Tests/Wsdl/Services/INullableEnumService.cs
C#
mit
355
var Game = { map: { width: 980, height: 62 * 12 }, tiles: { size: 62, count: [100, 12] }, sprite: { 8: 'LAND_LEFT', 2: 'LAND_MID', 10: 'LAND_RIGHT', 9: 'LAND', 5: 'WATER_TOP', 12: 'WATER', 4: 'STONE_WITH_MONEY', 11: 'STONE', 6: 'CACTUS', 13: 'GRASS', 7: 'START', 1: 'END' } }; Crafty.init(Game.map.width, Game.map.height, document.getElementById('game')); Crafty.background('url(./assets/images/bg.png)'); Crafty.scene('Loading');
luin/Love-and-Peace
src/game.js
JavaScript
mit
508
'use strict'; import _ from 'lodash'; import bluebird from 'bluebird'; import fs from 'fs'; import requireDir from 'require-dir'; import Logger from '../../logger'; bluebird.promisifyAll(fs); function main() { const imports = _.chain(requireDir('./importers')) .map('default') .map((importer) => importer.run()) .value(); return Promise.all(imports); } Logger.info('base.data.imports.imports: Running...'); main() .then(() => { Logger.info('base.data.imports.imports: Done!'); process.exit(0); }) .catch((error) => { Logger.error('base.data.imports.imports:', error); process.exit(1); });
mehmetbajin/gt-course-surveys
server/src/server/base/data/imports/imports.js
JavaScript
mit
635
// FriendlyNameAttribute.cs created with MonoDevelop // User: ben at 1:31 P 19/03/2008 // // To change standard headers go to Edit->Preferences->Coding->Standard Headers // using System; namespace EmergeTk.Model { public class FriendlyNameAttribute : Attribute { string name; public string Name { get { return name; } set { name = value; } } public string[] FieldNames { get { return fieldNames; } set { fieldNames = value; } } //field names are used for generating friendly names for vector types, such as enums. string[] fieldNames; public FriendlyNameAttribute() { } public FriendlyNameAttribute( string name ) { this.name = name; } } }
bennidhamma/EmergeTk
server/Model/FriendlyNameAttribute.cs
C#
mit
736
Ext.define('Category.view.GenericList', { extend: 'Ext.grid.Panel', alias: 'widget.genericlist', store: 'Generic', title: Raptor.getTag('category_header'), iconCls:'', initComponent: function() { this.columns = [{ header:Raptor.getTag('category_name'), dataIndex: 'name', flex: 1 }]; this.dockedItems = [{ dock: 'top', xtype: 'toolbar', items: [{ xtype: 'button', text: Raptor.getTag('add'), privilegeName:'insert', action:'addAction', iconCls:'icon-add' },{ xtype: 'button', text: Raptor.getTag('edit'), disabled:true, privilegeName:'edit/:id', action:'editAction', iconCls:'icon-edit' },{ xtype: 'button', text: Raptor.getTag('delete'), disabled:true, privilegeName:'delete/:id', action:'deleteAction', iconCls:'icon-del' }] }]; this.callParent(); } });
williamamed/Raptor.js
@raptorjs-production/troodon/Resources/category/js/app/view/GenericList.js
JavaScript
mit
1,321
using System; using static LanguageExt.Prelude; namespace LanguageExt.UnitsOfMeasure { /// <summary> /// Numeric VelocitySquared value /// Handles unit conversions automatically /// </summary> public struct VelocitySq : IComparable<VelocitySq>, IEquatable<VelocitySq> { readonly double Value; internal VelocitySq(double length) { Value = length; } public override string ToString() => Value + " m/s²"; public bool Equals(VelocitySq other) => Value.Equals(other.Value); public bool Equals(VelocitySq other, double epsilon) => Math.Abs(other.Value - Value) < epsilon; public override bool Equals(object obj) => obj == null ? false : obj is Length ? Equals((Length)obj) : false; public override int GetHashCode() => Value.GetHashCode(); public int CompareTo(VelocitySq other) => Value.CompareTo(other.Value); public VelocitySq Append(VelocitySq rhs) => new VelocitySq(Value + rhs.Value); public VelocitySq Subtract(VelocitySq rhs) => new VelocitySq(Value - rhs.Value); public VelocitySq Multiply(double rhs) => new VelocitySq(Value * rhs); public VelocitySq Divide(double rhs) => new VelocitySq(Value / rhs); public static VelocitySq operator *(VelocitySq lhs, double rhs) => lhs.Multiply(rhs); public static VelocitySq operator *(double lhs, VelocitySq rhs) => rhs.Multiply(lhs); public static VelocitySq operator +(VelocitySq lhs, VelocitySq rhs) => lhs.Append(rhs); public static VelocitySq operator -(VelocitySq lhs, VelocitySq rhs) => lhs.Subtract(rhs); public static VelocitySq operator /(VelocitySq lhs, double rhs) => lhs.Divide(rhs); public static double operator /(VelocitySq lhs, VelocitySq rhs) => lhs.Value / rhs.Value; public static bool operator ==(VelocitySq lhs, VelocitySq rhs) => lhs.Equals(rhs); public static bool operator !=(VelocitySq lhs, VelocitySq rhs) => !lhs.Equals(rhs); public static bool operator >(VelocitySq lhs, VelocitySq rhs) => lhs.Value > rhs.Value; public static bool operator <(VelocitySq lhs, VelocitySq rhs) => lhs.Value < rhs.Value; public static bool operator >=(VelocitySq lhs, VelocitySq rhs) => lhs.Value >= rhs.Value; public static bool operator <=(VelocitySq lhs, VelocitySq rhs) => lhs.Value <= rhs.Value; public Velocity Sqrt() => new Velocity(Math.Sqrt(Value)); public VelocitySq Round() => new VelocitySq(Math.Round(Value)); public VelocitySq Abs() => new VelocitySq(Math.Abs(Value)); public VelocitySq Min(VelocitySq rhs) => new VelocitySq(Math.Min(Value, rhs.Value)); public VelocitySq Max(VelocitySq rhs) => new VelocitySq(Math.Max(Value, rhs.Value)); public double MetresPerSecond2 => Value; } }
slantstack/Slant
src/Slant/DataTypes/UnitsOfMeasure/VelocitySq.cs
C#
mit
3,292
// // Lexer.cpp // lut-lang // // Created by Mehdi Kitane on 13/03/2015. // Copyright (c) 2015 H4314. All rights reserved. // #include "Lexer.h" #include <string> #include <regex> #include <iostream> #include "TokenType.h" #include "ErrorHandler.h" using std::cout; using std::endl; using std::smatch; using std::string; using std::regex_search; using std ::smatch; // Regexs const char keyword_str[] = "^(const |var |ecrire |lire )"; const char identifier_str[] = "^([a-zA-Z][a-zA-Z0-9]*)"; const char number_str[] = "^([0-9]*\\.?[0-9]+)"; const char single_operators_str[] = "^(\\+|-|\\*|\\/|\\(|\\)|;|=|,)"; const char affectation_str[] = "^(:=)"; const std::regex keyword(keyword_str); const std::regex identifier(identifier_str); const std::regex number(number_str); const std::regex single_operators(single_operators_str); const std::regex affectation(affectation_str); int Lexer::find_first_not_of(string str) { string::iterator it; int index = 0; for (it = str.begin(); it < str.end(); it++, index++) { switch ( str.at(index) ) { case ' ': this->column++; break; case '\t': break; case '\n': this->line++; this->column = 0; break; case '\r': break; case '\f': break; case '\v': default: return index; break; } } return -1; } string& Lexer::ltrim(string& s) { s.erase(0, find_first_not_of(s)); return s; } Lexer::Lexer(string inString) : inputString(inString) { this->currentToken = new ASTTokenNode(TokenType::INVALID_SYMBOL); this->line = 0; this->column = 0; this->column_next_incrementation = 0; } bool Lexer::has_next() { // remove spaces before analyzing // we remove left spaces and not right to handle cases like "const " ltrim(inputString); if ( inputString.length() <= 0 ) { currentToken = new ASTTokenNode(TokenType::ENDOFFILE); return false; } return true; } ASTTokenNode* Lexer::top() { return currentToken; } void Lexer::shift() { if ( !has_next() ) return; this->column += this->column_next_incrementation; std::smatch m; if ( !analyze(inputString, m) ) { ErrorHandler::getInstance().LexicalError(this->getLine(), this->getColumn(), inputString.at(0)); ErrorHandler::getInstance().outputErrors(); currentToken = new ASTTokenNode(TokenType::INVALID_SYMBOL); inputString.erase(0, 1); // not sure return; } this->column_next_incrementation = (int)m.length(); inputString = m.suffix().str(); } bool Lexer::analyze(string s, smatch &m) { if ( std::regex_search(inputString, m, keyword) ) { std::string currentTokenValue = m.str(); switch (currentTokenValue[0]) { case 'c': currentToken = new ASTTokenNode(TokenType::CONST); break; case 'v': currentToken = new ASTTokenNode(TokenType::VAR); break; case 'e': currentToken = new ASTTokenNode(TokenType::WRITE); break; case 'l': currentToken = new ASTTokenNode(TokenType::READ); break; default: #warning "symbole non reconnu" return false; } } else if ( std::regex_search(inputString, m, identifier) ) { std::string currentTokenValue = m.str(); currentToken = new ASTTokenNode(TokenType::ID, currentTokenValue); } else if ( std::regex_search(inputString, m, number) ) { std::string currentTokenValue = m.str(); currentToken = new ASTTokenNode(TokenType::VAL, currentTokenValue); } else if ( std::regex_search(inputString, m, single_operators) ) { std::string currentTokenValue = m.str(); switch (currentTokenValue[0]) { case '+': currentToken = new ASTTokenNode(TokenType::ADD, "+"); break; case '-': currentToken = new ASTTokenNode(TokenType::SUB, "-"); break; case '*': currentToken = new ASTTokenNode(TokenType::MUL, "*"); break; case '/': currentToken = new ASTTokenNode(TokenType::DIV, "/"); break; case '(': currentToken = new ASTTokenNode(TokenType::PO); break; case ')': currentToken = new ASTTokenNode(TokenType::PF); break; case ';': currentToken = new ASTTokenNode(TokenType::PV); break; case '=': currentToken = new ASTTokenNode(TokenType::EQ); break; case ',': currentToken = new ASTTokenNode(TokenType::V); break; default: #warning "symbole non reconnu" return false; } } else if ( std::regex_search(inputString, m, affectation) ) { currentToken = new ASTTokenNode(TokenType::AFF); } else { #warning "symbole non reconnu" return false; } return true; } int Lexer::getLine() { return this->line+1; } int Lexer::getColumn() { return this->column+1; }
hexa2/lut-lang
src/Lexer.cpp
C++
mit
4,860
<?php /** * This file is part of the Redsys package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @license MIT License */ namespace Redsys\Tests\Api; use Redsys\Api\Titular; class TitularTest extends \PHPUnit_Framework_TestCase { public function testGetValueShouldReturnValue() { $titular = new Titular("Lorem ipsum"); $this->assertEquals("Lorem ipsum", $titular->getValue()); } public function testToStringShouldReturnString() { $titular = new Titular("Lorem ipsum"); $this->assertEquals("Lorem ipsum", (string)$titular); } /** * @expectedException \LengthException */ public function testTooLongValueShouldThrowException() { new Titular(str_repeat("abcdefghij", 6) . "z"); } }
rmhdev/redsys
tests/Redsys/Tests/Api/TitularTest.php
PHP
mit
866
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("KnowledgeCenter.Domain")] [assembly: AssemblyDescription("")] [assembly: Guid("34163851-767a-42f4-9f09-7d1c6af2bd11")]
Socres/KnowledgeCenter
src/Domain/KnowledgeCenter.Domain/Properties/AssemblyInfo.cs
C#
mit
212
<?php namespace XeroPHP\Reports; class AgedReceivablesByContact { /** * @var string[] */ private $headers; /** * @var mixed[] */ private $rows; /** * @param string[] $headers * @param mixed[] $rows */ public function __construct(array $headers, array $rows = []) { $this->headers = $headers; $this->rows = $rows; } /** * @return string[] */ public function getHeaders() { return $this->headers; } /** * @return mixed[] */ public function getRows() { return $this->rows; } }
cosmic-beacon/xero-php
src/XeroPHP/Reports/AgedReceivablesByContact.php
PHP
mit
630
<?php namespace Mastercel\ChartBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Solicitudespagos * * @ORM\Table(name="SolicitudesPagos", indexes={@ORM\Index(name="Indice_1", columns={"DteSolicitud", "TmeSolicitud"}), @ORM\Index(name="Indice_2", columns={"DteActualizacion"}), @ORM\Index(name="Indice_3", columns={"NumEstadoComunicacion"})}) * @ORM\Entity */ class Solicitudespagos { /** * @var integer * * @ORM\Column(name="NumSolicitud_id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") */ private $numsolicitudId = '0'; /** * @var integer * * @ORM\Column(name="NumAlmacenSolicitud_id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="NONE") */ private $numalmacensolicitudId = '0'; /** * @var \DateTime * * @ORM\Column(name="DteSolicitud", type="datetime", nullable=true) */ private $dtesolicitud; /** * @var \DateTime * * @ORM\Column(name="TmeSolicitud", type="datetime", nullable=true) */ private $tmesolicitud; /** * @var \DateTime * * @ORM\Column(name="DteVencimiento", type="datetime", nullable=true) */ private $dtevencimiento; /** * @var integer * * @ORM\Column(name="NumEmpresa_id", type="integer", nullable=true) */ private $numempresaId = '0'; /** * @var integer * * @ORM\Column(name="NumMoneda_id", type="integer", nullable=true) */ private $nummonedaId = '0'; /** * @var integer * * @ORM\Column(name="NumEjecutivo_id", type="integer", nullable=true) */ private $numejecutivoId = '0'; /** * @var integer * * @ORM\Column(name="NumProveedor_id", type="integer", nullable=true) */ private $numproveedorId = '0'; /** * @var integer * * @ORM\Column(name="NumCategoria_id", type="integer", nullable=true) */ private $numcategoriaId = '0'; /** * @var integer * * @ORM\Column(name="NumAutorizador_id", type="integer", nullable=true) */ private $numautorizadorId = '0'; /** * @var integer * * @ORM\Column(name="NumCreadoPor_id", type="integer", nullable=true) */ private $numcreadoporId = '0'; /** * @var \DateTime * * @ORM\Column(name="DteCreacion", type="datetime", nullable=true) */ private $dtecreacion; /** * @var integer * * @ORM\Column(name="NumActualizadoPor_id", type="integer", nullable=true) */ private $numactualizadoporId = '0'; /** * @var \DateTime * * @ORM\Column(name="DteActualizacion", type="datetime", nullable=true) */ private $dteactualizacion; /** * @var integer * * @ORM\Column(name="NumTipoEstado", type="integer", nullable=true) */ private $numtipoestado = '0'; /** * @var integer * * @ORM\Column(name="NumEstadoComunicacion", type="integer", nullable=true) */ private $numestadocomunicacion = '0'; /** * Set numsolicitudId * * @param integer $numsolicitudId * @return Solicitudespagos */ public function setNumsolicitudId($numsolicitudId) { $this->numsolicitudId = $numsolicitudId; return $this; } /** * Get numsolicitudId * * @return integer */ public function getNumsolicitudId() { return $this->numsolicitudId; } /** * Set numalmacensolicitudId * * @param integer $numalmacensolicitudId * @return Solicitudespagos */ public function setNumalmacensolicitudId($numalmacensolicitudId) { $this->numalmacensolicitudId = $numalmacensolicitudId; return $this; } /** * Get numalmacensolicitudId * * @return integer */ public function getNumalmacensolicitudId() { return $this->numalmacensolicitudId; } /** * Set dtesolicitud * * @param \DateTime $dtesolicitud * @return Solicitudespagos */ public function setDtesolicitud($dtesolicitud) { $this->dtesolicitud = $dtesolicitud; return $this; } /** * Get dtesolicitud * * @return \DateTime */ public function getDtesolicitud() { return $this->dtesolicitud; } /** * Set tmesolicitud * * @param \DateTime $tmesolicitud * @return Solicitudespagos */ public function setTmesolicitud($tmesolicitud) { $this->tmesolicitud = $tmesolicitud; return $this; } /** * Get tmesolicitud * * @return \DateTime */ public function getTmesolicitud() { return $this->tmesolicitud; } /** * Set dtevencimiento * * @param \DateTime $dtevencimiento * @return Solicitudespagos */ public function setDtevencimiento($dtevencimiento) { $this->dtevencimiento = $dtevencimiento; return $this; } /** * Get dtevencimiento * * @return \DateTime */ public function getDtevencimiento() { return $this->dtevencimiento; } /** * Set numempresaId * * @param integer $numempresaId * @return Solicitudespagos */ public function setNumempresaId($numempresaId) { $this->numempresaId = $numempresaId; return $this; } /** * Get numempresaId * * @return integer */ public function getNumempresaId() { return $this->numempresaId; } /** * Set nummonedaId * * @param integer $nummonedaId * @return Solicitudespagos */ public function setNummonedaId($nummonedaId) { $this->nummonedaId = $nummonedaId; return $this; } /** * Get nummonedaId * * @return integer */ public function getNummonedaId() { return $this->nummonedaId; } /** * Set numejecutivoId * * @param integer $numejecutivoId * @return Solicitudespagos */ public function setNumejecutivoId($numejecutivoId) { $this->numejecutivoId = $numejecutivoId; return $this; } /** * Get numejecutivoId * * @return integer */ public function getNumejecutivoId() { return $this->numejecutivoId; } /** * Set numproveedorId * * @param integer $numproveedorId * @return Solicitudespagos */ public function setNumproveedorId($numproveedorId) { $this->numproveedorId = $numproveedorId; return $this; } /** * Get numproveedorId * * @return integer */ public function getNumproveedorId() { return $this->numproveedorId; } /** * Set numcategoriaId * * @param integer $numcategoriaId * @return Solicitudespagos */ public function setNumcategoriaId($numcategoriaId) { $this->numcategoriaId = $numcategoriaId; return $this; } /** * Get numcategoriaId * * @return integer */ public function getNumcategoriaId() { return $this->numcategoriaId; } /** * Set numautorizadorId * * @param integer $numautorizadorId * @return Solicitudespagos */ public function setNumautorizadorId($numautorizadorId) { $this->numautorizadorId = $numautorizadorId; return $this; } /** * Get numautorizadorId * * @return integer */ public function getNumautorizadorId() { return $this->numautorizadorId; } /** * Set numcreadoporId * * @param integer $numcreadoporId * @return Solicitudespagos */ public function setNumcreadoporId($numcreadoporId) { $this->numcreadoporId = $numcreadoporId; return $this; } /** * Get numcreadoporId * * @return integer */ public function getNumcreadoporId() { return $this->numcreadoporId; } /** * Set dtecreacion * * @param \DateTime $dtecreacion * @return Solicitudespagos */ public function setDtecreacion($dtecreacion) { $this->dtecreacion = $dtecreacion; return $this; } /** * Get dtecreacion * * @return \DateTime */ public function getDtecreacion() { return $this->dtecreacion; } /** * Set numactualizadoporId * * @param integer $numactualizadoporId * @return Solicitudespagos */ public function setNumactualizadoporId($numactualizadoporId) { $this->numactualizadoporId = $numactualizadoporId; return $this; } /** * Get numactualizadoporId * * @return integer */ public function getNumactualizadoporId() { return $this->numactualizadoporId; } /** * Set dteactualizacion * * @param \DateTime $dteactualizacion * @return Solicitudespagos */ public function setDteactualizacion($dteactualizacion) { $this->dteactualizacion = $dteactualizacion; return $this; } /** * Get dteactualizacion * * @return \DateTime */ public function getDteactualizacion() { return $this->dteactualizacion; } /** * Set numtipoestado * * @param integer $numtipoestado * @return Solicitudespagos */ public function setNumtipoestado($numtipoestado) { $this->numtipoestado = $numtipoestado; return $this; } /** * Get numtipoestado * * @return integer */ public function getNumtipoestado() { return $this->numtipoestado; } /** * Set numestadocomunicacion * * @param integer $numestadocomunicacion * @return Solicitudespagos */ public function setNumestadocomunicacion($numestadocomunicacion) { $this->numestadocomunicacion = $numestadocomunicacion; return $this; } /** * Get numestadocomunicacion * * @return integer */ public function getNumestadocomunicacion() { return $this->numestadocomunicacion; } }
pablo28jg/ejemplosgraficas
src/Mastercel/ChartBundle/Entity/Solicitudespagos.php
PHP
mit
10,419
const moment = require('moment') const expect = require('chai').expect const sinon = require('sinon') const proxyquire = require('proxyquire') const breadcrumbHelper = require('../../helpers/breadcrumb-helper') const orgUnitConstant = require('../../../app/constants/organisation-unit.js') const activeStartDate = moment('25-12-2017', 'DD-MM-YYYY').toDate() // 2017-12-25T00:00:00.000Z const activeEndDate = moment('25-12-2018', 'DD-MM-YYYY').toDate() // 2018-12-25T00:00:00.000Z const breadcrumbs = breadcrumbHelper.TEAM_BREADCRUMBS const expectedReductionExport = [ { offenderManager: 'Test_Forename Test_Surname', reason: 'Disability', amount: 5, startDate: activeStartDate, endDate: activeEndDate, status: 'ACTIVE', additionalNotes: 'New Test Note' }] let getReductionsData let exportReductionService let getBreadcrumbsStub beforeEach(function () { getReductionsData = sinon.stub() getBreadcrumbsStub = sinon.stub().resolves(breadcrumbs) exportReductionService = proxyquire('../../../app/services/get-reductions-export', { './data/get-reduction-notes-export': getReductionsData, './get-breadcrumbs': getBreadcrumbsStub }) }) describe('services/get-reductions-export', function () { it('should return the expected reductions exports for team level', function () { getReductionsData.resolves(expectedReductionExport) return exportReductionService(1, orgUnitConstant.TEAM.name) .then(function (result) { expect(getReductionsData.calledWith(1, orgUnitConstant.TEAM.name)).to.be.eql(true) expect(getBreadcrumbsStub.calledWith(1, orgUnitConstant.TEAM.name)).to.be.eql(true) expect(result.reductionNotes[0].offenderManager).to.be.eql(expectedReductionExport[0].offenderManager) expect(result.reductionNotes[0].reason).to.be.eql(expectedReductionExport[0].reason) expect(result.reductionNotes[0].amount).to.be.eql(expectedReductionExport[0].amount) expect(result.reductionNotes[0].startDate).to.be.eql('25 12 2017, 00:00') expect(result.reductionNotes[0].endDate).to.be.eql('25 12 2018, 00:00') expect(result.reductionNotes[0].status).to.be.eql(expectedReductionExport[0].status) expect(result.reductionNotes[0].additionalNotes).to.be.eql(expectedReductionExport[0].additionalNotes) }) }) })
ministryofjustice/wmt-web
test/unit/services/test-get-reduction-export.js
JavaScript
mit
2,361
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using ProjectData; using Tools; using ProjectBLL; using System.Data; using Approve.RuleCenter; using System.Text; using System.Collections; using Approve.RuleApp; public partial class JSDW_DesignDoc_Report : Page { ProjectDB db = new ProjectDB(); RCenter rc = new RCenter(); protected void Page_Load(object sender, EventArgs e) { pageTool tool = new pageTool(this.Page); tool.ExecuteScript("tab();"); if (Session["FIsApprove"] != null && Session["FIsApprove"].ToString() == "1") { this.RegisterStartupScript(Guid.NewGuid().ToString(), "<script>FIsApprove();</script>"); } if (!IsPostBack) { btnSave.Attributes["onclick"] = "return checkInfo();"; BindControl(); showInfo(); } } //绑定 private void BindControl() { //备案部门 string deptId = ComFunction.GetDefaultDept(); StringBuilder sb = new StringBuilder(); sb.Append("select case FLevel when 1 then FFullName when 2 then FName when 3 then FName end FName,"); sb.Append("FNumber from cf_Sys_ManageDept "); sb.Append("where fnumber like '" + deptId + "%' "); sb.Append("and fname<>'市辖区' "); sb.Append("order by left(FNumber,4),flevel"); DataTable dt = rc.GetTable(sb.ToString()); p_FManageDeptId.DataSource = dt; p_FManageDeptId.DataSource = dt; p_FManageDeptId.DataTextField = "FName"; p_FManageDeptId.DataValueField = "FNumber"; p_FManageDeptId.DataBind(); } //显示 private void showInfo() { string FAppId = EConvert.ToString(Session["FAppId"]); var app = (from t in db.CF_App_List where t.FId == FAppId select new { t.FName, t.FYear, t.FLinkId, t.FBaseName, t.FPrjId, t.FState, }).FirstOrDefault(); pageTool tool = new pageTool(this.Page, "p_"); if (app != null) { t_FName.Text = app.FName; //已提交不能修改 if (app.FState == 1 || app.FState == 6) { tool.ExecuteScript("btnEnable();"); } //显示工程信息 CF_Prj_BaseInfo prj = db.CF_Prj_BaseInfo.Where(t => t.FId == app.FPrjId).FirstOrDefault(); if (prj != null) { tool.fillPageControl(prj); } } } /// <summary> /// 验证附件是否上传 /// </summary> /// <returns></returns> bool IsUploadFile(int? FMTypeId, string FAppId) { CF_Prj_BaseInfo prj = (from p in db.CF_Prj_BaseInfo join a in db.CF_App_List on p.FId equals a.FPrjId where a.FId == FAppId select p).FirstOrDefault(); var v =false ; if (prj != null) { v = db.CF_Sys_PrjList.Count(t => t.FIsMust == 1 && t.FManageType == FMTypeId && t.FIsPrjType.Contains(prj.FType.ToString()) && db.CF_AppPrj_FileOther.Count(o => o.FPrjFileId == t.FId && o.FAppId == FAppId) < 1) > 0; } return v; } public void Report() { RCenter rc = new RCenter(); pageTool tool = new pageTool(this.Page); string fDeptNumber = ComFunction.GetDefaultDept(); if (fDeptNumber == null || fDeptNumber == "") { tool.showMessage("系统出错,请配置默认管理部门"); return; } string FAppId = EConvert.ToString(Session["FAppId"]); var app = (from t in db.CF_App_List where t.FId == FAppId select t).FirstOrDefault(); SortedList[] sl = new SortedList[1]; if (app != null) { //验证必需的附件是否上传 if (IsUploadFile(app.FManageTypeId, FAppId)) { tool.showMessage("“上传行政批文、上传设计文件”菜单中存在未上传的附件(必需上传的),请先上传!"); return; } CF_Prj_BaseInfo prj = db.CF_Prj_BaseInfo.Where(t => t.FId == app.FPrjId).FirstOrDefault(); if (prj != null) { sl[0] = new SortedList(); sl[0].Add("FID", app.FId); sl[0].Add("FAppId", app.FId); sl[0].Add("FBaseInfoId", app.FBaseinfoId); sl[0].Add("FManageTypeId", app.FManageTypeId); sl[0].Add("FListId", "19301"); sl[0].Add("FTypeId", "1930100"); sl[0].Add("FLevelId", "1930100"); sl[0].Add("FIsPrime", 0); //sl.Add("FAppDeptId", row["FAppDeptId"].ToString()); //sl.Add("FAppDeptName", row["FAppDeptName"].ToString()); sl[0].Add("FAppTime", DateTime.Now); sl[0].Add("FIsNew", 0); sl[0].Add("FIsBase", 0); sl[0].Add("FIsTemp", 0); sl[0].Add("FUpDept", p_FManageDeptId.SelectedValue); sl[0].Add("FEmpId", prj.FId); sl[0].Add("FEmpName", prj.FPrjName); //存设计单位 var s = (from t in db.CF_Prj_Ent join a in db.CF_App_List on t.FAppId equals a.FId where a.FPrjId == app.FPrjId && a.FManageTypeId == 291 && t.FEntType == 155 && a.FState == 6 select new { t.FId, t.FBaseInfoId, t.FName, t.FLevelName, t.FCertiNo, t.FMoney, t.FPlanDate, t.FAppId }).FirstOrDefault(); if (s != null) { sl[0].Add("FLeadId", s.FBaseInfoId); sl[0].Add("FLeadName", s.FName); } StringBuilder sb = new StringBuilder(); sb.Append("update CF_App_List set FUpDeptId=" + p_FManageDeptId.SelectedValue + ","); sb.Append("ftime=getdate() where fid = '" + FAppId + "'"); rc.PExcute(sb.ToString()); string fsystemid = CurrentEntUser.SystemId; RApp ra = new RApp(); if (ra.EntStartProcessKCSJ(app.FBaseinfoId, FAppId, app.FYear.ToString(), DateTime.Now.Month.ToString(), fsystemid, fDeptNumber, p_FManageDeptId.SelectedValue, sl)) { sb.Remove(0, sb.Length); this.Session["FIsApprove"] = 1; tool.showMessageAndRunFunction("上报成功!", "location.href=location.href"); } } } } //保存按钮 protected void btnSave_Click(object sender, EventArgs e) { Report(); } }
coojee2012/pm3
SurveyDesign/JSDW/DesignDoc/Report.aspx.cs
C#
mit
7,357