code stringlengths 4 1.01M | language stringclasses 2 values |
|---|---|
/**
* 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; | Java |
[](https://travis-ci.org/mircoc/cordova-plugin-settings-hook)
[](https://badge.fury.io/js/cordova-plugin-settings-hook)
[](https://www.npmjs.com/package/cordova-plugin-settings-hook)
# cordova-plugin-settings-hook
Cordova plugin helpful to modify Android and iOS settings with config.xml parameters.
Based on the work of [Devin Jett](https://github.com/djett) and [Diego Netto](https://github.com/diegonetto) on [generator-ionic](https://github.com/diegonetto/generator-ionic) with hook [update_platform_config.js](https://github.com/diegonetto/generator-ionic/blob/master/templates/hooks/after_prepare/update_platform_config.js)
Removed dependency to other npm packages, so it can be installed as a Cordova plugin adding it to your config.xml:
```
<plugin name="cordova-plugin-settings-hook" spec="~0" />
```
This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
## Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform
3. Platform preferences take precedence over common preferences
4. The preferenceMappingData object contains all of the possible custom preferences to date including the
target file they belong to, parent element, and destination element or attribute
Config Files
1. config-file elements MUST be defined inside a platform element, otherwise they will be ignored.
2. config-file target attributes specify the target file to update. (AndroidManifest.xml or *-Info.plist)
3. config-file parent attributes specify the parent element (AndroidManifest.xml) or parent key (*-Info.plist)
that the child data will replace or be appended to.
4. config-file elements are uniquely indexed by target AND parent for each platform.
5. If there are multiple config-file's defined with the same target AND parent, the last config-file will be used
6. Elements defined WITHIN a config-file will replace or be appended to the same elements relative to the parent element
7. If a unique config-file contains multiples of the same elements (other than uses-permssion elements which are
selected by by the uses-permission name attribute), the last defined element will be retrieved.
## Examples of config.xml:
You have to add some of the following configuration options inside your Cordova project _config.xml_ in the <platform> tag for Android or iOS.
### Android
These configuration will update the generated AndroidManifest.xml for Android platform.
NOTE: For possible manifest values see (http://developer.android.com/guide/topics/manifest/manifest-intro.html)
```
<platform name="android">
//These preferences are actually available in Cordova by default although not currently documented
<preference name="android-minSdkVersion" value="8" />
<preference name="android-maxSdkVersion" value="19" />
<preference name="android-targetSdkVersion" value="19" />
//custom preferences examples
<preference name="android-windowSoftInputMode" value="stateVisible" />
<preference name="android-installLocation" value="auto" />
<preference name="android-launchMode" value="singleTop" />
<preference name="android-activity-hardwareAccelerated" value="false" />
<preference name="android-manifest-hardwareAccelerated" value="false" />
<preference name="android-configChanges" value="orientation" />
<preference name="android-applicationName" value="MyApplication" />
<preference name="android-theme" value="@android:style/Theme.Black.NoTitleBar" />
<config-file target="AndroidManifest.xml" parent="/*">
<supports-screens
android:xlargeScreens="false"
android:largeScreens="false"
android:smallScreens="false" />
<uses-permission android:name="android.permission.READ_CONTACTS" android:maxSdkVersion="15" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
</config-file>
</platform>
```
#### Android config-file requirements
If you specify something in the ```<config-file target="AndroidManifest.xml"...```, you need to add android namespace to the xml root, like this:
```
<widget xmlns:android="http://schemas.android.com/apk/res/android" ... >
```
If don't do this you'll get a build error: ```error: Error parsing XML: unbound prefix```.
### iOS
These configuration will update the generated *-Info.plist for iOS platform.
```
<platform name="ios">
<config-file platform="ios" target="*-Info.plist" parent="UISupportedInterfaceOrientations">
<array>
<string>UIInterfaceOrientationLandscapeOmg</string>
</array>
</config-file>
<config-file platform="ios" target="*-Info.plist" parent="SomeOtherPlistKey">
<string>someValue</string>
</config-file>
</platform>
```
## Execution
After you added the plugin you can execute `cordova prepare` to change the platform config.
```
$ cordova prepare
Processing settings for platform: android
Wrote AndroidManifest.xml: ../platforms/android/AndroidManifest.xml
Processing settings for platform: ios
Wrote iOS Plist: ../platforms/ios/GamifiveBrazil/MyApp-Info.plist
```
## Note
NOTE: Currently, items aren't removed from the platform config files if you remove them from config.xml.
For example, if you add a custom permission, build the remove it, it will still be in the manifest.
If you make a mistake, for example adding an element to the wrong parent, you may need to remove and add your platform,
or revert to your previous manifest/plist file.
## Todo
TODO: We may need to capture all default manifest/plist elements/keys created by Cordova along with any plugin elements/keys to compare against custom elements to remove.
| Java |
---
layout: post
title: "计算机网络IO模型原理性解析"
category: Linux
tags: [net]
---
  本文旨在原理性的揭示计算机网络IO模型以及select、epoll的区别,而并不探讨实现细节,另外,讨论阻塞与非阻塞、同步和异步时往往是上下文相关的,本文的上下文就是Linux IO,下文中IO操作就以read为例。
首先明确一点,一次IO操作分为两个阶段:
1. 等待数据准备就绪
2. 将数据从内核拷贝到用户进程空间
* **阻塞IO:**
  首先用户进程发起read系统调用,内核开始准备数据,一般的,对于网络IO来说,大部分情况下当用户进程发起read系统调用的时候数据尚未到达,这个时候内核一直等待数据到达,在用户进程这一侧,整个进程会被阻塞。当数据到达后,内核就把准备妥当的数据从内核空间拷贝用户进程空间,然后内核返回,用户进程被唤醒,因此,阻塞IO在一次IO操作的两个阶段均被阻塞了。
* **非阻塞IO:**
  当用户进程发起read系统调用时,如果内核还没收到数据,则此次系统调用立即返回一个错误而不是阻塞整个进程,用户进程需要通过此次调用的返回值判断是否读到了数据,如果没有则隔一段时间再次发起read调用,如此不断轮询,在用户进程轮询期间,内核一直在等待数据到达,当数据准备妥当后,当用户进程发起当read系统调用时,内核负责将数据拷贝到用户进程空间,直到拷贝完成,read操作返回,也就是在这一阶段(第二阶段),非阻塞IO表现出的其实是一个同步操作,因此,从内核拷贝数据到用户进程空间的这段时间内read调用是一直等待直到完成的,所以,非阻塞IO是属于同步IO,也就是说非阻塞IO操作在第一阶段是不阻塞的,在第二阶段是阻塞的。
* **同步IO:**
  一个同步IO操作会导致进程阻塞直到IO操作完成,所以,阻塞IO、非阻塞IO以及本文未提及到的IO多路复用都属于同步IO。
* **异步IO:**
  一个异步IO操作不会引起进程的阻塞。
>   这里面大家可能分不清阻塞和非阻塞IO,甚至会认为非阻塞就是同步了,其实不是的,回到本文开头,我们说一次IO操作分两个阶段,第一阶段是等待数据,第二阶段拷贝数据(内核到用户空间),非阻塞IO操作在数据还没有到达时是立即返回到,这一点表现的跟异步一样,但是,在第二阶段,当数据准备妥当的时候,非阻塞IO是阻塞的,直到数据拷贝完成,这一点表现的与同步IO完全不一样,异步操作根本不关心你的数据是否到达以及你的数据是否拷贝完成,异步发起一次操作后就去干别的事儿了,直到内核发出一个信号通知这一事件,它才会转回来继续处理。
* **select与epoll**
  select与epoll都是IO多路复用模型,它们都是监视一组文件描述符(在本文就是socket)上是否有数据准备就绪,select和epoll会一直阻塞直到它们监视的一个或多个套接字描述符上数据准备就绪,当在某个或某几个套接字描述符上有数据到达时,对select而言,它需要遍历这组描述符以确定到底是哪一个描述符上面有数据到达了,所以时间复杂度是O(n),而对于epoll而言,它不是通过遍历或者叫轮询的方式来确定数据准备妥当的描述符,而是通过事件的方式,以事件的方式通知epoll是哪个描述符上数据到达来,因此,时间复杂度是O(1)。
>   可能说的很啰嗦,只是想尽量的把原理讲清楚,原理清楚来再看实现细节才能做到游刃有余。
* **参考文章:**
  [http://blog.csdn.net/historyasamirror/article/details/5778378](http://blog.csdn.net/historyasamirror/article/details/5778378)
  [http://yaocoder.blog.51cto.com/2668309/888374](http://yaocoder.blog.51cto.com/2668309/888374)
| Java |
## Bookmarks tagged [[ngrx]](https://www.codever.land/search?q=[ngrx])
_<sup><sup>[www.codever.land/bookmarks/t/ngrx](https://www.codever.land/bookmarks/t/ngrx)</sup></sup>_
---
#### [Managing State in Angular 2 - Kyle Cordes - Oct 2016 - 46min](https://www.youtube.com/watch?v=eBLTz8QRg4Q)
_<sup>https://www.youtube.com/watch?v=eBLTz8QRg4Q</sup>_
This month at the St. Lewis Angular Lunch, Kyle spoke about managing state in Angular 2 applications. The crying baby thumbnail accurately reflects how many developers have come to experience state ma...
* :calendar: **published on**: 2016-10-20
* **tags**: [angular](../tagged/angular.md), [state-management](../tagged/state-management.md), [ngrx](../tagged/ngrx.md), [redux](../tagged/redux.md)
---
#### [Ngrx Store - An Architecture Guide](https://blog.angular-university.io/angular-ngrx-store-and-effects-crash-course/)
_<sup>https://blog.angular-university.io/angular-ngrx-store-and-effects-crash-course/</sup>_
Using a store architecture represents a big architectural shift: with the arrival of single page applications, we moved the Model to View transformation from the server to the client.
Store architect...
* **tags**: [angular](../tagged/angular.md), [flux](../tagged/flux.md), [ngrx](../tagged/ngrx.md), [architecture](../tagged/architecture.md)
---
#### [Communication Patterns in Angular - BB Tutorials & Thoughts - Medium](https://medium.com/bb-tutorials-and-thoughts/communication-patterns-in-angular-9b0a829aa916)
_<sup>https://medium.com/bb-tutorials-and-thoughts/communication-patterns-in-angular-9b0a829aa916</sup>_
Angular follows a two-way data flow pattern, meaning you can send data up and down the component tree. As everything in the Angular is a component, understanding communication between components is cr...
* :calendar: **published on**: 2019-05-30
* **tags**: [angular](../tagged/angular.md), [ngrx](../tagged/ngrx.md)
* :octocat: **[source code](https://github.com/bbachi/angular-communication)**
---
#### [NGXS Home Page](https://www.ngxs.io/)
_<sup>https://www.ngxs.io/</sup>_
NGXS is a state management pattern + library for Angular. It acts as a single source of truth for your application's state, providing simple rules for predictable state mutations.
NGXS is modeled aft...
* **tags**: [angular](../tagged/angular.md), [rxjs](../tagged/rxjs.md), [redux](../tagged/redux.md), [ngrx](../tagged/ngrx.md), [cqrs](../tagged/cqrs.md)
* :octocat: **[source code](https://github.com/ngxs/store)**
---
#### [GitHub - johnpapa/angular-ngrx-data: Angular with ngRx and experimental ngrx-data helperAsset 1Asset 1](https://github.com/johnpapa/angular-ngrx-data)
_<sup>https://github.com/johnpapa/angular-ngrx-data</sup>_
Angular with ngRx and experimental ngrx-data helper
* **tags**: [angular](../tagged/angular.md), [ngrx](../tagged/ngrx.md)
* :octocat: **[source code](https://github.com/johnpapa/angular-ngrx-data)**
---
#### [GitHub - ngrx/platform: Monorepo for ngrx codebase](https://github.com/ngrx/platform)
_<sup>https://github.com/ngrx/platform</sup>_
Monorepo for ngrx codebase
* **tags**: [angular](../tagged/angular.md), [ngrx](../tagged/ngrx.md), [redux](../tagged/redux.md)
* :octocat: **[source code](https://github.com/ngrx/platform)**
---
| Java |
#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();
}
| Java |
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);
| Java |
# Copyright (c) 2016 nVentiveUX
#
# 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.
"""Application configuration"""
from django.apps import AppConfig
class ShowcaseConfig(AppConfig):
name = 'mystartupmanager.showcase'
| Java |
---
author: viviworld
comments: true
date: 2014-06-01 10:07:00+00:00
layout: post
link: http://www.labazhou.net/2014/06/the-makings-of-a-great-logo/
slug: the-makings-of-a-great-logo
title: 伟大Logo的要素
wordpress_id: 724
categories:
- 设计
tags:
- Amazon
- Disney
- logo
- Path
- Pinterest
- 字体
---
## 在设计品牌时要问自己的6个问题
公司logo是业务品牌的重要基础。它很可能是你和客户之间的首次互动。一个有效的logo能够建立合适的基调、设定正确的气质。我为不同的项目设计了数年的logo之后,在交付一个新logo之前我经常问自己一系列问题。
### 1.logo要唤起什么情感?
所有设计指导方针之上,最重要的准则是logo能否反映公司的性格。logo唤起的情感应该体现出公司价值。比如,迪斯尼logo唤起幸福和乐观的感觉。曲线优美、充满趣味的字体与为儿童制作卡通和动画片的公司相得益彰。然而,相似logo样式出现在销售平台上就不太合适了。
设计师应该理解颜色心理学以及字体在伟大logo设计上的效果。例如,绿色通常体现了成长、健康和环境。它促进了放松和精神焕发的情感。另一方面,红色或许引起危险和激烈的情感。对于字体也是一样,Garamond,Helvetica,和 Comic Sans都会带来非常不同的柔情。Garamond 之类的Serif字体促进了尊重和传统的想法,因此更加适合对于正直有要求的环境,比如大学或新闻机构。像Helvetica之类的Sans Serif字体简洁、现代,非常适合高科技企业,比如计算机或媒体公司。像Comic Sans之类的Casual Script字体很可能最适合娱乐或动画公司了,比如玩具公司。较好地理解颜色心理学、字体和形状是创作伟大logo的重要组成部分。
[](http://www.labazhou.net/wp-content/uploads/2014/06/disney-logo.png)
### 2.logo背后的意义
<blockquote>每个伟大logo的背后都有一个故事。</blockquote>
一个伟大的logo不是把你的业务名字拍在通用形状上,这就是为什么选择现成logo是糟糕的想法。确保一个logo不是一般的极好方式就是logo背后有一个富有意义的故事。好的设计师在开始把想法应用在logo之前,首先要非常理解公司文化、产品基调和业务愿景。高质量logo的最终结果就是公司哲学和价值的体现。
[](http://www.labazhou.net/wp-content/uploads/2014/06/amazon-logo.png)
### 3.logo能够经得起时间的考验吗?
logo在未来2年、10年、20年内看起来如何?设计师应该避免引入红极一时的趋势。像极细字体和扁平阴影就是那些经不起未来时间考验的设计样式。简单远胜复杂。一个简单且容易记住的logo能够在未来20年内使用,而不用担心过期。
考验logo的一个好方法就是在发布之前让它和你‘待’一会儿。一些logo随着你成长------你看它越多,你就越喜欢它。一些logo在一段时间后开始感到厌烦------你看它越多,你就越讨厌它。在你和logo共处了数周之后,如果你发现它是厌烦的,那么这个logo很可能不够好,或不是永恒的。
[](http://www.labazhou.net/wp-content/uploads/2014/06/apple-logo.png)
### 4.它是独一无二的?可以瞬间被识别吗?
伟大的logo是有特色的、容易记住的和可识别的。甚至你只看了一次,在很长时间之后你仍然应当能够记住它的样子。测试的好方法是向你的朋友展示logo,然后合上,在一周后让你朋友描述这个logo。一双毫无经验的眼睛在描述logo最容易记住的部分上面是非常有效的。
另外,如果logo让你想起了你曾经见过的其它logo,那么它就不是足够有特色的,很可能是要让这个logo更加易识别的信号。
[](http://www.labazhou.net/wp-content/uploads/2014/06/pinterest.png)
### 5.黑白的logo效果如何?
当我开始设计logo时,我总是从黑白开始。这个限制下的设计首先要求你确保logo纯粹靠其形状和轮廓被识别出来、而不是其颜色。一个健壮logo仅仅通过其轮廓仍然是易于记住的。
单色logo还有个好处,让你的品牌轻松应用在有不同背景和材质的多个媒体上。
[](http://www.labazhou.net/wp-content/uploads/2014/06/National-Geography-logo.png)
### 6.小尺寸下的logo是清晰的、明显的?
确保logo简单、可识别的另一个方法就是大幅缩小尺寸。甚至在低分辨率下,健壮的logo应该还是一眼就能看出来的。这也是确保logo没有因为不必要的设计装饰而过度复杂的一种较好测试。
[](http://www.labazhou.net/wp-content/uploads/2014/06/tiny-logo.png)
这些不是一成不变的规则,而是制作一个有效果logo的优秀指导方针。即使它是复杂的,但是理解这样决定的权衡对于设计一个健壮的logo,仍然是有可能的。因此,下次你发现自己设计或挑选一个新logo时,问自己这些问题。它们有助于你选定正确的logo。
原文地址:[https://bold.pixelapse.com/minming/the-makings-of-a-great-logo](https://bold.pixelapse.com/minming/the-makings-of-a-great-logo)
| Java |
<?php
namespace Algolia\SearchBundle;
use Algolia\SearchBundle\TestApp\Entity\Comment;
use Algolia\SearchBundle\TestApp\Entity\Image;
use Algolia\SearchBundle\TestApp\Entity\Post;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
class BaseTest extends KernelTestCase
{
public function setUp(): void
{
self::bootKernel();
}
protected function createPost($id = null): Post
{
$post = new Post();
$post->setTitle('Test');
$post->setContent('Test content');
if (!is_null($id)) {
$post->setId($id);
}
return $post;
}
protected function createSearchablePost(): SearchableEntity
{
$post = $this->createPost(random_int(100, 300));
return new SearchableEntity(
$this->getPrefix() . 'posts',
$post,
$this->get('doctrine')->getManager()->getClassMetadata(Post::class),
$this->get('serializer')
);
}
protected function createComment($id = null): Comment
{
$comment = new Comment();
$comment->setContent('Comment content');
$comment->setPost(new Post(['title' => 'What a post!', 'content' => 'my content']));
if (!is_null($id)) {
$comment->setId($id);
}
return $comment;
}
protected function createImage($id = null): Image
{
$image = new Image();
if (!is_null($id)) {
$image->setId($id);
}
return $image;
}
protected function createSearchableImage(): SearchableEntity
{
$image = $this->createImage(random_int(100, 300));
return new SearchableEntity(
$this->getPrefix() . 'image',
$image,
$this->get('doctrine')->getManager()->getClassMetadata(Image::class),
null
);
}
protected function getPrefix(): ?string
{
return $this->get('search.service')->getConfiguration()['prefix'];
}
protected function get($id): ?object
{
return self::$kernel->getContainer()->get($id);
}
protected function refreshDb($application): void
{
$inputs = [
new ArrayInput([
'command' => 'doctrine:schema:drop',
'--full-database' => true,
'--force' => true,
'--quiet' => true,
]),
new ArrayInput([
'command' => 'doctrine:schema:create',
'--quiet' => true,
]),
];
$application->setAutoExit(false);
foreach ($inputs as $input) {
$application->run($input, new ConsoleOutput());
}
}
protected function getFileName($indexName, $type): string
{
return sprintf(
'%s/%s-%s.json',
$this->get('search.service')->getConfiguration()['settingsDirectory'],
$indexName,
$type
);
}
protected function getDefaultConfig(): array
{
return [
'hitsPerPage' => 20,
'maxValuesPerFacet' => 100,
];
}
}
| Java |
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
| Java |
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;
}
}
| Java |
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"><!-- Begin Jekyll SEO tag v2.5.0 -->
<title>Jalil Butrón | Shanghai-based cinematographer</title>
<meta name="generator" content="Jekyll v3.7.4" />
<meta property="og:title" content="Jalil Butrón" />
<meta property="og:locale" content="en_US" />
<meta name="description" content="Shanghai-based cinematographer" />
<meta property="og:description" content="Shanghai-based cinematographer" />
<link rel="canonical" href="http://localhost:4000/404.html" />
<meta property="og:url" content="http://localhost:4000/404.html" />
<meta property="og:site_name" content="Jalil Butrón" />
<script type="application/ld+json">
{"description":"Shanghai-based cinematographer","@type":"WebPage","url":"http://localhost:4000/404.html","headline":"Jalil Butrón","@context":"http://schema.org"}</script>
<!-- End Jekyll SEO tag -->
<link rel="stylesheet" href="/assets/main.css"><link type="application/atom+xml" rel="alternate" href="http://localhost:4000/feed.xml" title="Jalil Butrón" /><!-- Favicon -->
<link rel="shortcut icon" type="image/png" href="/assets/favicon.png">
<link rel="shortcut icon" sizes="196x196" href="/assets/favicon.png">
<link rel="apple-touch-icon" href="/assets/favicon.png">
<!-- Font Awesome -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
</head>
<body>
<div class="body-container"><header class="site-header" role="banner">
<div class="wrapper"><div class="site-title">
<a rel="author" href="/">
<strong>Jalil Butrón</strong> <span>Cinematographer</span>
</a>
</div><nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>
<div class="trigger"><a class="page-link" href="/stills/">Stills</a><a class="page-link" href="/contact">Contact</a></div>
</nav></div>
</header>
<main class="page-wrapper" aria-label="Content">
<div class="wrapper">
<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>
<div class="container">
<h1>404</h1>
<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
</div>
</main><footer class="site-footer h-card">
<data class="u-url" href="/"></data>
<div class="wrapper"><div class="footer-social">
<a class="no-underline" href="https://instagram.com/jalilbutron" target="_blank"><i class="fab fa-instagram fa-lg"></i></a>
<a class="no-underline" href="https://vimeo.com/jalilbutron" target="_blank"><i class="fab fa-vimeo-v fa-lg"></i></a>
</div><h5>
© Jalil Butrón. All rights reserved. 2020
</h5>
</div>
</footer>
</div>
<script>
</script>
</body>
</html>
| Java |
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 | Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>qarith: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.5.0 / qarith - 8.9.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
qarith
<small>
8.9.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-13 20:16:59 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-13 20:16:59 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.5.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.03.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.03.0 Official 4.03.0 release
ocaml-config 1 OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/qarith"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/QArith"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: Q"
"keyword: arithmetic"
"keyword: rational numbers"
"keyword: setoid"
"keyword: ring"
"category: Mathematics/Arithmetic and Number Theory/Rational numbers"
"category: Miscellaneous/Extracted Programs/Arithmetic"
]
authors: [
"Pierre Letouzey"
]
bug-reports: "https://github.com/coq-contribs/qarith/issues"
dev-repo: "git+https://github.com/coq-contribs/qarith.git"
synopsis: "A Library for Rational Numbers (QArith)"
description: """
This contribution is a proposition of a library formalizing
rational number in Coq."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/qarith/archive/v8.9.0.tar.gz"
checksum: "md5=dbb5eb51a29032589cd351ea9eaf49a0"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-qarith.8.9.0 coq.8.5.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.5.0).
The following dependencies couldn't be met:
- coq-qarith -> coq >= 8.9 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-qarith.8.9.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-finmap: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">dev / mathcomp-finmap - 1.3.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
mathcomp-finmap
<small>
1.3.1
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-20 06:05:22 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-20 06:05:22 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq dev Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.10.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Cyril Cohen <cyril.cohen@inria.fr>"
homepage: "https://github.com/math-comp/finmap"
bug-reports: "https://github.com/math-comp/finmap/issues"
dev-repo: "git+https://github.com/math-comp/finmap.git"
license: "CeCILL-B"
build: [ make "-j" "%{jobs}%" ]
install: [ make "install" ]
depends: [
"coq" { (>= "8.7" & < "8.11~") }
"coq-mathcomp-ssreflect" { (>= "1.8.0" & < "1.10~") }
"coq-mathcomp-bigenough" { (>= "1.0.0" & < "1.1~") }
]
tags: [ "keyword:finmap" "keyword:finset" "keyword:multiset" "keyword:order" "date:2019-06-13" "logpath:mathcomp.finmap"]
authors: [ "Cyril Cohen <cyril.cohen@inria.fr>" "Kazuhiko Sakaguchi <sakaguchi@coins.tsukuba.ac.jp>" ]
synopsis: "Finite sets, finite maps, finitely supported functions, orders"
description: """
This library is an extension of mathematical component in order to
support finite sets and finite maps on choicetypes (rather that finite
types). This includes support for functions with finite support and
multisets. The library also contains a generic order and set libary,
which will be used to subsume notations for finite sets, eventually."""
url {
src: "https://github.com/math-comp/finmap/archive/1.3.1.tar.gz"
checksum: "sha256=5b90b4dbb1c851be7a835493ef81471238260580e2d1b340dc4cf40668c6a15b"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-mathcomp-finmap.1.3.1 coq.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
- coq-mathcomp-finmap -> coq < 8.11~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-finmap.1.3.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| Java |
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using P03_FootballBetting.Data.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace P03_FootballBetting.Data.EntitiesConfiguration
{
public class PositionConfig : IEntityTypeConfiguration<Position>
{
public void Configure(EntityTypeBuilder<Position> builder)
{
builder.Property(x => x.Name)
.IsRequired()
.IsUnicode();
builder.HasMany(x => x.Players)
.WithOne(x => x.Position)
.HasForeignKey(x => x.PositionId);
}
}
}
| Java |
/**
* @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 */
| Java |
# v0.6.10
* Original: [Release atom-shell v0.6.10 - electron/electron](https://github.com/electron/electron/releases/tag/v0.6.10)
Changelog:
* Build binary for Mac on OS X 10.8.5.
* OS X 10.8.5 Mac 向けバイナリーをビルドしました
* Mountain Lion 向け
* Fix a possible dead lock when quitting.
* アプリ終了時にデッド ロックする可能性のある問題を修正しました
* 安定性の向上
* Enable setting window icons when creating window.
* ウィンドウ生成時にウィンドウ アイコン設定を有効にしました
* Electron v0.6.9 のウィンドウ アイコン設定を受けての対応
| Java |
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
| Java |
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
| Java |
# 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
| Java |
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
| Java |
/*
* ***** 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);
};
| Java |
/*
* ***** 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;
}
}
| Java |
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.
}
} | Java |
ActiveRecord::Schema.define(:version => 1) do
create_table :notes, :force => true do |t|
t.string :title
t.text :body
end
end
| Java |
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');
});
} | Java |
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'
});
}); | Java |
export * from './alert.service';
export * from './authentication.service';
export * from './user.service';
export * from './serviceRequest.service'; | Java |
---
title: play on playa (part deux)
date: 2007-01-14 00:00:00 Z
permalink: "/2007/01/14/20070114play-on-playa-part-deux/"
categories:
- Baby E
- Uncategorized
author: Jennifer
layout: post
---
Yes, we had a fun filled [play date](http://www.flickr.com/photos/jenniferandJennifers_photos/?saved=1 "play date")! Oliver and Noah were reacquainted under the tantalizing play mat and enjoyed every minute of it!
<img id="image115" alt="pod_011207.jpg" src="http://static.squarespace.com/static/50db6bb3e4b015296cd43789/50dfa5b1e4b0dc6320e0b5ea/50dfa5b1e4b0dc6320e0b652/1168806613000/?format=original" />
| Java |
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) {
}
}; | Java |
<html><img border=0 src=70786-65-1.txt alt=70786-65-1.txt></img><body>
"x"
"1" "KAZIUS, J, MCGUIRE, R AND BURSI, R. DERIVATION AND VALIDATION OF TOXICOPHORES FOR MUTAGENICITY PREDICTION. J. MED. CHEM. 48: 312-320, 2005"
</body></html>
| Java |
//
// MultibandBank.c
// FxDSP
//
// Created by Hamilton Kibbe on 11/24/13.
// Copyright (c) 2013 Hamilton Kibbe. All rights reserved.
//
#include "MultibandBank.h"
#include "LinkwitzRileyFilter.h"
#include "RBJFilter.h"
#include "FilterTypes.h"
#include <stdlib.h>
// Sqrt(2)/2
#define FILT_Q (0.70710681186548)
/*******************************************************************************
MultibandFilter */
struct MultibandFilter
{
LRFilter* LPA;
LRFilter* HPA;
LRFilter* LPB;
LRFilter* HPB;
RBJFilter* APF;
float lowCutoff;
float highCutoff;
float sampleRate;
};
struct MultibandFilterD
{
LRFilterD* LPA;
LRFilterD* HPA;
LRFilterD* LPB;
LRFilterD* HPB;
RBJFilterD* APF;
double lowCutoff;
double highCutoff;
double sampleRate;
};
/*******************************************************************************
MultibandFilterInit */
MultibandFilter*
MultibandFilterInit(float lowCutoff,
float highCutoff,
float sampleRate)
{
MultibandFilter* filter = (MultibandFilter*) malloc(sizeof(MultibandFilter));
filter->lowCutoff = lowCutoff;
filter->highCutoff = highCutoff;
filter->sampleRate = sampleRate;
filter->LPA = LRFilterInit(LOWPASS, filter->lowCutoff, FILT_Q, filter->sampleRate);
filter->HPA = LRFilterInit(HIGHPASS, filter->lowCutoff, FILT_Q, filter->sampleRate);
filter->LPB = LRFilterInit(LOWPASS, filter->highCutoff, FILT_Q, filter->sampleRate);
filter->HPB = LRFilterInit(HIGHPASS, filter->highCutoff, FILT_Q, filter->sampleRate);
filter->APF = RBJFilterInit(ALLPASS, filter->sampleRate/2.0, filter->sampleRate);
RBJFilterSetQ(filter->APF, 0.5);
return filter;
}
MultibandFilterD*
MultibandFilterInitD(double lowCutoff,
double highCutoff,
double sampleRate)
{
MultibandFilterD* filter = (MultibandFilterD*) malloc(sizeof(MultibandFilterD));
filter->lowCutoff = lowCutoff;
filter->highCutoff = highCutoff;
filter->sampleRate = sampleRate;
filter->LPA = LRFilterInitD(LOWPASS, filter->lowCutoff, FILT_Q, filter->sampleRate);
filter->HPA = LRFilterInitD(HIGHPASS, filter->lowCutoff, FILT_Q, filter->sampleRate);
filter->LPB = LRFilterInitD(LOWPASS, filter->highCutoff, FILT_Q, filter->sampleRate);
filter->HPB = LRFilterInitD(HIGHPASS, filter->highCutoff, FILT_Q, filter->sampleRate);
filter->APF = RBJFilterInitD(ALLPASS, filter->sampleRate/2.0, filter->sampleRate);
RBJFilterSetQD(filter->APF, 0.5);
return filter;
}
/*******************************************************************************
MultibandFilterFree */
Error_t
MultibandFilterFree(MultibandFilter* filter)
{
LRFilterFree(filter->LPA);
LRFilterFree(filter->LPB);
LRFilterFree(filter->HPA);
LRFilterFree(filter->HPB);
RBJFilterFree(filter->APF);
if (filter)
{
free(filter);
filter = NULL;
}
return NOERR;
}
Error_t
MultibandFilterFreeD(MultibandFilterD* filter)
{
LRFilterFreeD(filter->LPA);
LRFilterFreeD(filter->LPB);
LRFilterFreeD(filter->HPA);
LRFilterFreeD(filter->HPB);
RBJFilterFreeD(filter->APF);
if (filter)
{
free(filter);
filter = NULL;
}
return NOERR;
}
/*******************************************************************************
MultibandFilterFlush */
Error_t
MultibandFilterFlush(MultibandFilter* filter)
{
LRFilterFlush(filter->LPA);
LRFilterFlush(filter->LPB);
LRFilterFlush(filter->HPA);
LRFilterFlush(filter->HPB);
RBJFilterFlush(filter->APF);
return NOERR;
}
Error_t
MultibandFilterFlushD(MultibandFilterD* filter)
{
LRFilterFlushD(filter->LPA);
LRFilterFlushD(filter->LPB);
LRFilterFlushD(filter->HPA);
LRFilterFlushD(filter->HPB);
RBJFilterFlushD(filter->APF);
return NOERR;
}
/*******************************************************************************
MultibandFilterSetLowCutoff */
Error_t
MultibandFilterSetLowCutoff(MultibandFilter* filter, float lowCutoff)
{
filter->lowCutoff = lowCutoff;
LRFilterSetParams(filter->LPA, LOWPASS, lowCutoff, FILT_Q);
LRFilterSetParams(filter->HPA, HIGHPASS, lowCutoff, FILT_Q);
return NOERR;
}
Error_t
MultibandFilterSetLowCutoffD(MultibandFilterD* filter, double lowCutoff)
{
filter->lowCutoff = lowCutoff;
LRFilterSetParamsD(filter->LPA, LOWPASS, lowCutoff, FILT_Q);
LRFilterSetParamsD(filter->HPA, HIGHPASS, lowCutoff, FILT_Q);
return NOERR;
}
/*******************************************************************************
MultibandFilterSetHighCutoff */
Error_t
MultibandFilterSetHighCutoff(MultibandFilter* filter, float highCutoff)
{
filter->highCutoff = highCutoff;
LRFilterSetParams(filter->LPB, LOWPASS, highCutoff, FILT_Q);
LRFilterSetParams(filter->HPB, HIGHPASS, highCutoff, FILT_Q);
return NOERR;
}
Error_t
MultibandFilterSetHighCutoffD(MultibandFilterD* filter, double highCutoff)
{
filter->highCutoff = highCutoff;
LRFilterSetParamsD(filter->LPB, LOWPASS, highCutoff, FILT_Q);
LRFilterSetParamsD(filter->HPB, HIGHPASS, highCutoff, FILT_Q);
return NOERR;
}
/*******************************************************************************
MultibandFilterUpdate */
Error_t
MultibandFilterUpdate(MultibandFilter* filter,
float lowCutoff,
float highCutoff)
{
filter->lowCutoff = lowCutoff;
filter->highCutoff = highCutoff;
LRFilterSetParams(filter->LPA, LOWPASS, lowCutoff, FILT_Q);
LRFilterSetParams(filter->HPA, HIGHPASS, lowCutoff, FILT_Q);
LRFilterSetParams(filter->LPB, LOWPASS, highCutoff, FILT_Q);
LRFilterSetParams(filter->HPB, HIGHPASS, highCutoff, FILT_Q);
return NOERR;
}
Error_t
MultibandFilterUpdateD(MultibandFilterD* filter,
double lowCutoff,
double highCutoff)
{
filter->lowCutoff = lowCutoff;
filter->highCutoff = highCutoff;
LRFilterSetParamsD(filter->LPA, LOWPASS, lowCutoff, FILT_Q);
LRFilterSetParamsD(filter->HPA, HIGHPASS, lowCutoff, FILT_Q);
LRFilterSetParamsD(filter->LPB, LOWPASS, highCutoff, FILT_Q);
LRFilterSetParamsD(filter->HPB, HIGHPASS, highCutoff, FILT_Q);
return NOERR;
}
/*******************************************************************************
MultibandFilterProcess */
Error_t
MultibandFilterProcess(MultibandFilter* filter,
float* lowOut,
float* midOut,
float* highOut,
const float* inBuffer,
unsigned n_samples)
{
float tempLow[n_samples];
float tempHi[n_samples];
LRFilterProcess(filter->LPA, tempLow, inBuffer, n_samples);
LRFilterProcess(filter->HPA, tempHi, inBuffer, n_samples);
RBJFilterProcess(filter->APF, lowOut, tempLow, n_samples);
LRFilterProcess(filter->LPB, midOut, tempHi, n_samples);
LRFilterProcess(filter->HPB, highOut, tempHi, n_samples);
return NOERR;
}
Error_t
MultibandFilterProcessD(MultibandFilterD* filter,
double* lowOut,
double* midOut,
double* highOut,
const double* inBuffer,
unsigned n_samples)
{
double tempLow[n_samples];
double tempHi[n_samples];
LRFilterProcessD(filter->LPA, tempLow, inBuffer, n_samples);
LRFilterProcessD(filter->HPA, tempHi, inBuffer, n_samples);
RBJFilterProcessD(filter->APF, lowOut, tempLow, n_samples);
LRFilterProcessD(filter->LPB, midOut, tempHi, n_samples);
LRFilterProcessD(filter->HPB, highOut, tempHi, n_samples);
return NOERR;
}
| Java |
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>();
}
}
} | Java |
'use strict';
/* jasmine specs for filters go here */
describe('filter', function() {
}); | Java |
<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>
| Java |
!function(n){}(jQuery);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5iYWRyYWZ0LnNjcmlwdC5qcyJdLCJuYW1lcyI6WyIkIiwialF1ZXJ5Il0sIm1hcHBpbmdzIjoiQ0FJQSxTQUFBQSxLQUVBQyIsImZpbGUiOiJuYmFkcmFmdC5zY3JpcHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBmaWxlXG4gKiBDdXN0b20gc2NyaXB0cyBmb3IgdGhlbWUuXG4gKi9cbihmdW5jdGlvbiAoJCkge1xuICBcbn0pKGpRdWVyeSk7XG4iXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
| Java |
/*
* 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
| Java |
require "fog"
module RedmineObjectStorage
module AttachmentPatch
def self.included(base) # :nodoc:
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
base.class_eval do
unloadable
cattr_accessor :context_obj, :objectstorage_bucket_instance, :__objectstorage_config
after_validation :save_to_objectstorage
before_destroy :delete_from_objectstorage
def readable?
!!Attachment.objectstorage_bucket.get(self.objectstorage_path) rescue false
end
end
end
module ClassMethods
def set_context(context)
@@context_obj = context
end
def get_context
@@context_obj
end
def objectstorage_config
unless Attachment.__objectstorage_config
yaml = ERB.new(File.read(Rails.root.join("config", "objectstorage.yml"))).result
@@__objectstorage_config = YAML.load(yaml).fetch(Rails.env)
end
return @@__objectstorage_config
end
def objectstorage_bucket
unless Attachment.objectstorage_bucket_instance
config = Attachment.objectstorage_config
@@objectstorage_bucket_instance = Fog::Storage.new(
provider: :aws,
aws_access_key_id: config["access_key_id"],
aws_secret_access_key: config["secret_access_key"],
host: config["endpoint"],
aws_signature_version: config["signature_version"]
).directories.get(config["bucket"])
end
@@objectstorage_bucket_instance
end
def objectstorage_absolute_path(filename, project_id)
ts = DateTime.now.strftime("%y%m%d%H%M%S")
[project_id, ts, filename].compact.join("/")
end
end
module InstanceMethods
def objectstorage_filename
if self.new_record?
timestamp = DateTime.now.strftime("%y%m%d%H%M%S")
self.disk_filename = [timestamp, filename].join("/")
end
self.disk_filename.blank? ? filename : self.disk_filename
end
# path on objectstorage to the file, defaulting the instance's disk_filename
def objectstorage_path(fn = objectstorage_filename)#, ctx = nil, pid = nil)
context = self.container || self.class.get_context
project = context.is_a?(Hash) ? Project.find(context[:project]) : context.project
ctx = context.is_a?(Hash) ? context[:class] : context.class.name
# XXX s/WikiPage/Wiki
ctx = "Wiki" if ctx == "WikiPage"
pid = project.identifier
[pid, fn].compact.join("/")
end
def save_to_objectstorage
if @temp_file && !@temp_file.empty?
logger.debug "[redmine_objectstorage_attachments] Uploading #{objectstorage_filename}"
file = Attachment.objectstorage_bucket.files.create(
key: objectstorage_path,
body: @temp_file.is_a?(String) ? @temp_file : @temp_file.read
)
self.digest = file.etag
end
# set the temp file to nil so the model's original after_save block
# skips writing to the filesystem
@temp_file = nil
end
def delete_from_objectstorage
logger.debug "[redmine_objectstorage_attachments] Deleting #{objectstorage_filename}"
Attachment.objectstorage_bucket.files.get(objectstorage_path(objectstorage_filename)).destroy
end
end
end
end
| Java |
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;
}
}
} | Java |
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();
}
}
} | Java |
# ts3
TeamSpeak 3 ServerQuery API implementation for Node.js
| Java |
^^^^^^^^^^^^^CS171 2015 Homework Assignments
===
Homework assignments for Harvard's [CS171](http://www.cs171.org/2015/index.html) 2015. To receive homework updates on your local machine run:
```
git pull homework master
```
For details on how to submit your work, take a look at [Section 1](https://github.com/CS171/2015-cs171-homework/tree/master/section1).
---
**Name**:Yi Mao
**Email**:yim833@mail.harvard.edu
| Java |
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
| Java |
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();
}
}
| Java |
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;
| Java |
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"
] | Java |
/**
* 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
};
| Java |
#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ÌfoCXñ˶Ìú»ðÇÁ
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úðÇÁ
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ÌðÇÁ
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:±±ÉfoCX˶\[Xú»ðÇÁ
if (SUCCEEDED(hresult)){ m_entityDebugInfoLayer.OnCreateDeviceResources(&m_d2d1Manager); }
if (SUCCEEDED(hresult)){ m_entitySceneContainer.OnCreateDeviceResources(&m_d2d1Manager); }
if (SUCCEEDED(hresult))
{
m_d2d1Manager.BeginDraw();
//TODO:±±É`æðÇÁ
m_entitySceneContainer.OnRender(&m_d2d1Manager);
m_entityDebugInfoLayer.OnRender(&m_d2d1Manager);
hresult = m_d2d1Manager.EndDraw();
}
if (FAILED(hresult))
{
//TODO:±±É\[XÌðúðÇÁ
m_entityDebugInfoLayer.OnDiscardDeviceResources();
m_entitySceneContainer.OnDiscardDeviceResources();
m_d2d1Manager.DiscardDeviceResources();
}
}
void ActalogicApp::OnPostRender()
{
//TODO:±±É`æOÌðÇÁ
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));
} | Java |
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'
})
]
}
]
}
]
};
}
}
| Java |
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)));
}
}
}
| Java |
<html><body>
<h4>Windows 10 x64 (18362.449)</h4><br>
<h2>FEATURE_CHANGE_TIME</h2>
<font face="arial"> FEATURE_CHANGE_TIME_READ = 0n0<br>
FEATURE_CHANGE_TIME_MODULE_RELOAD = 0n1<br>
FEATURE_CHANGE_TIME_SESSION = 0n2<br>
FEATURE_CHANGE_TIME_REBOOT = 0n3<br>
FEATURE_CHANGE_TIME_USER_FLAG = 0n128<br>
</font></body></html> | Java |
module Rake
class << self
def verbose?
ENV.include? "VERBOSE" and ["1", "true", "yes"].include? ENV["VERBOSE"]
end
end
end
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/favicon.ico" />
<link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/iosicon.png" />
<!-- DEVELOPMENT LESS -->
<!-- <link rel="stylesheet/less" href="css/photon.less" media="all" />
<link rel="stylesheet/less" href="css/photon-responsive.less" media="all" />
--> <!-- PRODUCTION CSS -->
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/css/css_compiled/photon-min.css?v1.1" media="all" />
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/css/css_compiled/photon-min-part2.css?v1.1" media="all" />
<link rel="stylesheet" href="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/css/css_compiled/photon-responsive-min.css?v1.1" media="all" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" />
<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" />
<script type="text/javascript" src="js/plugins/excanvas.js"></script>
<script type="text/javascript" src="js/plugins/html5shiv.js"></script>
<script type="text/javascript" src="js/plugins/respond.min.js"></script>
<script type="text/javascript" src="js/plugins/fixFontIcons.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/modernizr.custom.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.pnotify.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/less-1.3.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/xbreadcrumbs.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.autotab-1.1b.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/charCount.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/elrte.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/elrte.en.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/select2.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery-picklist.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/additional-methods.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.metadata.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.mockjax.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.rating.pack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/farbtastic.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.jstree.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.mCustomScrollbar.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.flot.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.flot.stack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.flot.pie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.flot.resize.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/justgage.1.0.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.clock.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.countdown.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.jqtweet.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/prettify/prettify.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/bootstrapSwitch.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/plugins/mfupload.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/js/common.js"></script>
</head>
<body class="body-login">
<div class="nav-fixed-topright" style="visibility: hidden">
<ul class="nav nav-user-menu">
<li class="user-sub-menu-container">
<a href="javascript:;">
<i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i>
</a>
<ul class="nav user-sub-menu">
<li class="light">
<a href="javascript:;">
<i class='icon-photon stop'></i>Light Version
</a>
</li>
<li class="dark">
<a href="javascript:;">
<i class='icon-photon stop'></i>Dark Version
</a>
</li>
</ul>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon mail"></i>
</a>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon comment_alt2_stroke"></i>
<div class="notification-count">12</div>
</a>
</li>
</ul>
</div>
<script>
$(function(){
setTimeout(function(){
$('.nav-fixed-topright').removeAttr('style');
}, 300);
$(window).scroll(function(){
if($('.breadcrumb-container').length){
var scrollState = $(window).scrollTop();
if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released');
else $('.nav-fixed-topright').removeClass('nav-released')
}
});
$('.user-sub-menu-container').on('click', function(){
$(this).toggleClass('active-user-menu');
});
$('.user-sub-menu .light').on('click', function(){
if ($('body').is('.light-version')) return;
$('body').addClass('light-version');
setTimeout(function() {
$.cookie('themeColor', 'light', {
expires: 7,
path: '/'
});
}, 500);
});
$('.user-sub-menu .dark').on('click', function(){
if ($('body').is('.light-version')) {
$('body').removeClass('light-version');
$.cookie('themeColor', 'dark', {
expires: 7,
path: '/'
});
}
});
});
</script>
<div class="container-login">
<div class="form-centering-wrapper">
<div class="form-window-login">
<div class="form-window-login-logo">
<div class="login-logo">
<img src="http://photonui.orangehilldev.com/css/css_compiled/@%7BphotonImagePath%7Dplugins/elrte/css/css_compiled/js/js/plugins/prettify/js/plugins/images/photon/login-logo@2x.png" alt="Photon UI"/>
</div>
<h2 class="login-title">Welcome to Photon UI!</h2>
<div class="login-member">Not a Member? <a href="raphael.2.1.0.min.js.html#">Sign Up »</a>
<a href="raphael.2.1.0.min.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a>
</div>
<div class="login-or">Or</div>
<div class="login-input-area">
<form method="POST" action="dashboard.php">
<span class="help-block">Login With Your Photon Account</span>
<input type="text" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<button type="submit" class="btn btn-large btn-success btn-login">Login</button>
</form>
<a href="raphael.2.1.0.min.js.html#" class="forgot-pass">Forgot Your Password?</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1936460-27']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
| Java |
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('/');
});
} | Java |
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)));;
}
| Java |
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)
| Java |
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;
}
}
} | Java |
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 ) ;
}
}
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.0">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
<link rel="mask-icon" href="/images/logo.svg" color="#222">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">
<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {
hostname: new URL('https://iaanuzik.com').hostname,
root: '/',
scheme: 'Mist',
version: '7.6.0',
exturl: false,
sidebar: {"position":"right","width":300,"display":"always","padding":80,"offset":12,"onmobile":false},
copycode: {"enable":true,"show_result":true,"style":"flat"},
back2top: {"enable":true,"sidebar":true,"scrollpercent":true},
bookmark: {"enable":true,"color":"#222","save":"auto"},
fancybox: false,
mediumzoom: false,
lazyload: false,
pangu: false,
comments: {"style":"tabs","active":null,"storage":true,"lazyload":true,"nav":null},
algolia: {
appID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
},
localsearch: {"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},
path: '',
motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}
};
</script>
<meta property="og:type" content="website">
<meta property="og:title" content="KAZE">
<meta property="og:url" content="https://iaanuzik.com/archives/2019/04/index.html">
<meta property="og:site_name" content="KAZE">
<meta property="og:locale" content="en_US">
<meta property="article:author" content="神楽坂 川風">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://iaanuzik.com/archives/2019/04/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome: false,
isPost: false
};
</script>
<title>Archive | KAZE</title>
<noscript>
<style>
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>
</head>
<body itemscope itemtype="http://schema.org/WebPage">
<div class="container use-motion">
<div class="headband"></div>
<header class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-meta">
<div>
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">KAZE</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
</div>
<div class="site-nav-toggle">
<div class="toggle" aria-label="Toggle navigation bar">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section"><i class="fa fa-fw fa-home"></i>Home</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>Archives</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>Categories</a>
</li>
</ul>
</nav>
</div>
</header>
<div class="reading-progress-bar"></div>
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
<main class="main">
<div class="main-inner">
<div class="content-wrap">
<div class="content">
<div class="post-block">
<div class="posts-collapse">
<div class="collection-title">
<span class="collection-header">Um..! 5 posts in total. Keep on posting.</span>
</div>
<div class="collection-year">
<h1 class="collection-header">2019</h1>
</div>
<article itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<div class="post-meta">
<time itemprop="dateCreated"
datetime="2019-04-21T16:02:02+00:00"
content="2019-04-21">
04-21
</time>
</div>
<h2 class="post-title">
<a class="post-title-link" href="/2019/04/21/first-fixed-oom/" itemprop="url">
<span itemprop="name">处女OOM</span>
</a>
</h2>
</header>
</article>
</div>
</div>
</div>
<script>
window.addEventListener('tabs:register', () => {
let activeClass = CONFIG.comments.activeClass;
if (CONFIG.comments.storage) {
activeClass = localStorage.getItem('comments_active') || activeClass;
}
if (activeClass) {
let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
if (activeTab) {
activeTab.click();
}
}
});
if (CONFIG.comments.storage) {
window.addEventListener('tabs:click', event => {
if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
let commentClass = event.target.classList[1];
localStorage.setItem('comments_active', commentClass);
});
}
</script>
</div>
<div class="toggle sidebar-toggle">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
<aside class="sidebar">
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc">
Table of Contents
</li>
<li class="sidebar-nav-overview">
Overview
</li>
</ul>
<!--noindex-->
<div class="post-toc-wrap sidebar-panel">
</div>
<!--/noindex-->
<div class="site-overview-wrap sidebar-panel">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" alt="神楽坂 川風"
src="/images/avatar.jpeg">
<p class="site-author-name" itemprop="name">神楽坂 川風</p>
<div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
<nav class="site-state">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">posts</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/">
<span class="site-state-item-count">5</span>
<span class="site-state-item-name">categories</span></a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/">
<span class="site-state-item-count">6</span>
<span class="site-state-item-name">tags</span></a>
</div>
</nav>
</div>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/yue-litam" title="GitHub → https://github.com/yue-litam" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i></a>
</span>
<span class="links-of-author-item">
<a href="mailto:ia.anuzik@gmail.com" title="E-Mail → mailto:ia.anuzik@gmail.com" rel="noopener" target="_blank"><i class="fa fa-fw fa-envelope"></i></a>
</span>
<span class="links-of-author-item">
<a href="https://stackoverflow.com/users/12023030" title="StackOverflow → https://stackoverflow.com/users/12023030" rel="noopener" target="_blank"><i class="fa fa-fw fa-stack-overflow"></i></a>
</span>
<span class="links-of-author-item">
<a href="https://twitter.com/ia_anuzik" title="Twitter → https://twitter.com/ia_anuzik" rel="noopener" target="_blank"><i class="fa fa-fw fa-twitter"></i></a>
</span>
<span class="links-of-author-item">
<a href="/atom.xml" title="RSS → /atom.xml"><i class="fa fa-fw fa-rss"></i></a>
</span>
</div>
</div>
<div class="back-to-top motion-element">
<i class="fa fa-arrow-up"></i>
<span>0%</span>
</div>
</div>
</aside>
<div id="sidebar-dimmer"></div>
</div>
</main>
<footer class="footer">
<div class="footer-inner">
<div class="beian"><a href="http://www.beian.miit.gov.cn/" rel="noopener" target="_blank">粤ICP-19060337号-1 </a>
</div>
<div class="copyright">
© 2016 –
<span itemprop="copyrightYear">2019</span>
<span class="with-love">
<i class="fa fa-user"></i>
</span>
<span class="author" itemprop="copyrightHolder">神楽坂 川風</span>
</div>
<div class="powered-by">Powered by <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> v4.2.0
</div>
<span class="post-meta-divider">|</span>
<div class="theme-info">Theme – <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> v7.6.0
</div>
</div>
</footer>
</div>
<script src="/lib/anime.min.js"></script>
<script src="/lib/velocity/velocity.min.js"></script>
<script src="/lib/velocity/velocity.ui.min.js"></script>
<script src="/js/utils.js"></script>
<script src="/js/motion.js"></script>
<script src="/js/schemes/muse.js"></script>
<script src="/js/next-boot.js"></script>
<script src="/js/bookmark.js"></script>
</body>
</html>
| Java |
/*
* $QNXLicenseC:
* Copyright 2009, QNX Software Systems.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You
* may not reproduce, modify or distribute this software 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 OF ANY KIND, either express or implied.
*
* This file may contain contributions from others, either as
* contributors under the License or as licensors under other terms.
* Please review this entire file for other proprietary rights or license
* notices, as well as the QNX Development Suite License Guide at
* http://licensing.qnx.com/license-guide/ for other information.
* $
*/
#ifndef __BEAGLEBONE_H_INCLUDED
#define __BEAGLEBONE_H_INCLUDED
#define RGMII 1
#define GMII 2
#define RMII 3
#define AM335X_I2C0_CPLD 0x35
#define AM335X_I2C0_BBID 0x50
#define AM335X_I2C0_CAPE0 0x54
#define AM335X_I2C0_MAXCAPES 4
#define AM335X_BDID_HEADER_LEN 4
#define AM335X_BDID_BDNAME_LEN 8
#define AM335X_BDID_VERSION_LEN 4
#define AM335X_BDID_SERIAL_LEN 12
#define AM335X_BDID_CONFIG_LEN 32
#define AM335X_BDID_MAC_LEN 6
#define AM335X_BDID_BDNAME_OFFSET (AM335X_BDID_HEADER_LEN)
#define AM335X_BDID_VERSION_OFFSET (AM335X_BDID_BDNAME_OFFSET +AM335X_BDID_BDNAME_LEN)
#define AM335X_BDID_SERIAL_OFFSET (AM335X_BDID_VERSION_OFFSET +AM335X_BDID_VERSION_LEN)
#define AM335X_BDID_CONFIG_OFFSET (AM335X_BDID_SERIAL_OFFSET +AM335X_BDID_SERIAL_LEN)
#define AM335X_BDID_MAC1_OFFSET (AM335X_BDID_CONFIG_OFFSET +AM335X_BDID_CONFIG_LEN)
#define AM335X_BDID_MAC2_OFFSET (AM335X_BDID_MAC1_OFFSET +AM335X_BDID_MAC_LEN)
#define AM335X_MACS 3
#define BOARDID_I2C_DEVICE "/dev/i2c0"
typedef struct board_identity
{
unsigned int header;
char bdname [AM335X_BDID_BDNAME_LEN+1];
char version[AM335X_BDID_VERSION_LEN+1];
char serial [AM335X_BDID_SERIAL_LEN+1];
char config [AM335X_BDID_CONFIG_LEN+1];
uint8_t macaddr[AM335X_MACS][AM335X_BDID_MAC_LEN];
} BDIDENT;
enum enum_basebd_type
{
bb_not_detected = 0,
bb_BeagleBone = 1, /* BeagleBone Base Board */
bb_unknown = 99,
};
enum enum_cape_type
{
ct_not_detected = 0,
ct_unknown = 99,
};
typedef struct beaglebone_id
{
/* Base board */
enum enum_basebd_type basebd_type;
/* Daughter board, they're called cape. */
enum enum_cape_type cape_type[4];
} BEAGLEBONE_ID;
#endif
| Java |
/**
@Generated Pin Manager Header File
@Company:
Microchip Technology Inc.
@File Name:
pin_manager.h
@Summary:
This is the Pin Manager file generated using MPLAB® Code Configurator
@Description:
This header file provides implementations for pin APIs for all pins selected in the GUI.
Generation Information :
Product Revision : MPLAB® Code Configurator - v2.25
Device : PIC18F45K22
Version : 1.01
The generated drivers are tested against the following:
Compiler : XC8 v1.34
MPLAB : MPLAB X v2.35 or v3.00
*/
/*
Copyright (c) 2013 - 2015 released Microchip Technology Inc. All rights reserved.
Microchip licenses to you the right to use, modify, copy and distribute
Software only when embedded on a Microchip microcontroller or digital signal
controller that is integrated into your product or third party product
(pursuant to the sublicense terms in the accompanying license agreement).
You should refer to the license agreement accompanying this Software for
additional information regarding your rights and obligations.
SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
*/
#ifndef PIN_MANAGER_H
#define PIN_MANAGER_H
#define INPUT 1
#define OUTPUT 0
#define HIGH 1
#define LOW 0
#define TOGGLE 2
#define ANALOG 1
#define DIGITAL 0
#define PULL_UP_ENABLED 1
#define PULL_UP_DISABLED 0
// get/set Volume aliases
#define Volume_TRIS TRISA5
#define Volume_LAT LATA5
#define Volume_PORT PORTAbits.RA5
#define Volume_ANS ANSA5
#define Volume_SetHigh() do { LATA5 = 1; } while(0)
#define Volume_SetLow() do { LATA5 = 0; } while(0)
#define Volume_Toggle() do { LATA5 = ~LATA5; } while(0)
#define Volume_GetValue() PORTAbits.RA5
#define Volume_SetDigitalInput() do { TRISA5 = 1; } while(0)
#define Volume_SetDigitalOutput() do { TRISA5 = 0; } while(0)
#define Volume_SetAnalogMode() do { ANSA5 = 1; } while(0)
#define Volume_SetDigitalMode() do { ANSA5 = 0; } while(0)
// get/set INDICATOR aliases
#define INDICATOR_TRIS TRISA3
#define INDICATOR_LAT LATA3
#define INDICATOR_PORT PORTAbits.RA3
#define INDICATOR_ANS ANSA3
#define INDICATOR_SetHigh() do { LATA3 = 1; } while(0)
#define INDICATOR_SetLow() do { LATA3 = 0; } while(0)
#define INDICATOR_Toggle() do { LATA3 = ~LATA3; } while(0)
#define INDICATOR_GetValue() PORTAbits.RA3
#define INDICATOR_SetDigitalInput() do { TRISA3 = 1; } while(0)
#define INDICATOR_SetDigitalOutput() do { TRISA3 = 0; } while(0)
#define INDICATOR_SetAnalogMode() do { ANSA3 = 1; } while(0)
#define INDICATOR_SetDigitalMode() do { ANSA3 = 0; } while(0)
// get/set Button8 aliases
#define Button8_TRIS TRISA2
#define Button8_LAT LATA2
#define Button8_PORT PORTAbits.RA2
#define Button8_ANS ANSA2
#define Button8_SetHigh() do { LATA2 = 1; } while(0)
#define Button8_SetLow() do { LATA2 = 0; } while(0)
#define Button8_Toggle() do { LATA2 = ~LATA2; } while(0)
#define Button8_GetValue() PORTAbits.RA2
#define Button8_SetDigitalInput() do { TRISA2 = 1; } while(0)
#define Button8_SetDigitalOutput() do { TRISA2 = 0; } while(0)
#define Button8_SetAnalogMode() do { ANSA2 = 1; } while(0)
#define Button8_SetDigitalMode() do { ANSA2 = 0; } while(0)
// get/set Button7 aliases
#define Button7_TRIS TRISA1
#define Button7_LAT LATA1
#define Button7_PORT PORTAbits.RA1
#define Button7_ANS ANSA1
#define Button7_SetHigh() do { LATA1 = 1; } while(0)
#define Button7_SetLow() do { LATA1 = 0; } while(0)
#define Button7_Toggle() do { LATA1 = ~LATA1; } while(0)
#define Button7_GetValue() PORTAbits.RA1
#define Button7_SetDigitalInput() do { TRISA1 = 1; } while(0)
#define Button7_SetDigitalOutput() do { TRISA1 = 0; } while(0)
#define Button7_SetAnalogMode() do { ANSA1 = 1; } while(0)
#define Button7_SetDigitalMode() do { ANSA1 = 0; } while(0)
// get/set Button6 aliases
#define Button6_TRIS TRISA0
#define Button6_LAT LATA0
#define Button6_PORT PORTAbits.RA0
#define Button6_ANS ANSA0
#define Button6_SetHigh() do { LATA0 = 1; } while(0)
#define Button6_SetLow() do { LATA0 = 0; } while(0)
#define Button6_Toggle() do { LATA0 = ~LATA0; } while(0)
#define Button6_GetValue() PORTAbits.RA0
#define Button6_SetDigitalInput() do { TRISA0 = 1; } while(0)
#define Button6_SetDigitalOutput() do { TRISA0 = 0; } while(0)
#define Button6_SetAnalogMode() do { ANSA0 = 1; } while(0)
#define Button6_SetDigitalMode() do { ANSA0 = 0; } while(0)
// get/set LED1 aliases
#define LED1_TRIS TRISB5
#define LED1_LAT LATB5
#define LED1_PORT PORTBbits.RB5
#define LED1_WPU WPUB5
#define LED1_ANS ANSB5
#define LED1_SetHigh() do { LATB5 = 1; } while(0)
#define LED1_SetLow() do { LATB5 = 0; } while(0)
#define LED1_Toggle() do { LATB5 = ~LATB5; } while(0)
#define LED1_GetValue() PORTBbits.RB5
#define LED1_SetDigitalInput() do { TRISB5 = 1; } while(0)
#define LED1_SetDigitalOutput() do { TRISB5 = 0; } while(0)
#define LED1_SetPullup() do { WPUB5 = 1; } while(0)
#define LED1_ResetPullup() do { WPUB5 = 0; } while(0)
#define LED1_SetAnalogMode() do { ANSB5 = 1; } while(0)
#define LED1_SetDigitalMode() do { ANSB5 = 0; } while(0)
// get/set Button5 aliases
#define Button5_TRIS TRISB4
#define Button5_LAT LATB4
#define Button5_PORT PORTBbits.RB4
#define Button5_WPU WPUB4
#define Button5_ANS ANSB4
#define Button5_SetHigh() do { LATB4 = 1; } while(0)
#define Button5_SetLow() do { LATB4 = 0; } while(0)
#define Button5_Toggle() do { LATB4 = ~LATB4; } while(0)
#define Button5_GetValue() PORTBbits.RB4
#define Button5_SetDigitalInput() do { TRISB4 = 1; } while(0)
#define Button5_SetDigitalOutput() do { TRISB4 = 0; } while(0)
#define Button5_SetPullup() do { WPUB4 = 1; } while(0)
#define Button5_ResetPullup() do { WPUB4 = 0; } while(0)
#define Button5_SetAnalogMode() do { ANSB4 = 1; } while(0)
#define Button5_SetDigitalMode() do { ANSB4 = 0; } while(0)
// get/set LED0 aliases
#define LED0_TRIS TRISB3
#define LED0_LAT LATB3
#define LED0_PORT PORTBbits.RB3
#define LED0_WPU WPUB3
#define LED0_ANS ANSB3
#define LED0_SetHigh() do { LATB3 = 1; } while(0)
#define LED0_SetLow() do { LATB3 = 0; } while(0)
#define LED0_Toggle() do { LATB3 = ~LATB3; } while(0)
#define LED0_GetValue() PORTBbits.RB3
#define LED0_SetDigitalInput() do { TRISB3 = 1; } while(0)
#define LED0_SetDigitalOutput() do { TRISB3 = 0; } while(0)
#define LED0_SetPullup() do { WPUB3 = 1; } while(0)
#define LED0_ResetPullup() do { WPUB3 = 0; } while(0)
#define LED0_SetAnalogMode() do { ANSB3 = 1; } while(0)
#define LED0_SetDigitalMode() do { ANSB3 = 0; } while(0)
// get/set Button4 aliases
#define Button4_TRIS TRISB2
#define Button4_LAT LATB2
#define Button4_PORT PORTBbits.RB2
#define Button4_WPU WPUB2
#define Button4_ANS ANSB2
#define Button4_SetHigh() do { LATB2 = 1; } while(0)
#define Button4_SetLow() do { LATB2 = 0; } while(0)
#define Button4_Toggle() do { LATB2 = ~LATB2; } while(0)
#define Button4_GetValue() PORTBbits.RB2
#define Button4_SetDigitalInput() do { TRISB2 = 1; } while(0)
#define Button4_SetDigitalOutput() do { TRISB2 = 0; } while(0)
#define Button4_SetPullup() do { WPUB2 = 1; } while(0)
#define Button4_ResetPullup() do { WPUB2 = 0; } while(0)
#define Button4_SetAnalogMode() do { ANSB2 = 1; } while(0)
#define Button4_SetDigitalMode() do { ANSB2 = 0; } while(0)
// get/set Button3 aliases
#define Button3_TRIS TRISB1
#define Button3_LAT LATB1
#define Button3_PORT PORTBbits.RB1
#define Button3_WPU WPUB1
#define Button3_ANS ANSB1
#define Button3_SetHigh() do { LATB1 = 1; } while(0)
#define Button3_SetLow() do { LATB1 = 0; } while(0)
#define Button3_Toggle() do { LATB1 = ~LATB1; } while(0)
#define Button3_GetValue() PORTBbits.RB1
#define Button3_SetDigitalInput() do { TRISB1 = 1; } while(0)
#define Button3_SetDigitalOutput() do { TRISB1 = 0; } while(0)
#define Button3_SetPullup() do { WPUB1 = 1; } while(0)
#define Button3_ResetPullup() do { WPUB1 = 0; } while(0)
#define Button3_SetAnalogMode() do { ANSB1 = 1; } while(0)
#define Button3_SetDigitalMode() do { ANSB1 = 0; } while(0)
// get/set Button2 aliases
#define Button2_TRIS TRISB0
#define Button2_LAT LATB0
#define Button2_PORT PORTBbits.RB0
#define Button2_WPU WPUB0
#define Button2_ANS ANSB0
#define Button2_SetHigh() do { LATB0 = 1; } while(0)
#define Button2_SetLow() do { LATB0 = 0; } while(0)
#define Button2_Toggle() do { LATB0 = ~LATB0; } while(0)
#define Button2_GetValue() PORTBbits.RB0
#define Button2_SetDigitalInput() do { TRISB0 = 1; } while(0)
#define Button2_SetDigitalOutput() do { TRISB0 = 0; } while(0)
#define Button2_SetPullup() do { WPUB0 = 1; } while(0)
#define Button2_ResetPullup() do { WPUB0 = 0; } while(0)
#define Button2_SetAnalogMode() do { ANSB0 = 1; } while(0)
#define Button2_SetDigitalMode() do { ANSB0 = 0; } while(0)
// get/set RX1 aliases
#define RX1_TRIS TRISC7
#define RX1_LAT LATC7
#define RX1_PORT PORTCbits.RC7
#define RX1_ANS ANSC7
#define RX1_SetHigh() do { LATC7 = 1; } while(0)
#define RX1_SetLow() do { LATC7 = 0; } while(0)
#define RX1_Toggle() do { LATC7 = ~LATC7; } while(0)
#define RX1_GetValue() PORTCbits.RC7
#define RX1_SetDigitalInput() do { TRISC7 = 1; } while(0)
#define RX1_SetDigitalOutput() do { TRISC7 = 0; } while(0)
#define RX1_SetAnalogMode() do { ANSC7 = 1; } while(0)
#define RX1_SetDigitalMode() do { ANSC7 = 0; } while(0)
// get/set TX1 aliases
#define TX1_TRIS TRISC6
#define TX1_LAT LATC6
#define TX1_PORT PORTCbits.RC6
#define TX1_ANS ANSC6
#define TX1_SetHigh() do { LATC6 = 1; } while(0)
#define TX1_SetLow() do { LATC6 = 0; } while(0)
#define TX1_Toggle() do { LATC6 = ~LATC6; } while(0)
#define TX1_GetValue() PORTCbits.RC6
#define TX1_SetDigitalInput() do { TRISC6 = 1; } while(0)
#define TX1_SetDigitalOutput() do { TRISC6 = 0; } while(0)
#define TX1_SetAnalogMode() do { ANSC6 = 1; } while(0)
#define TX1_SetDigitalMode() do { ANSC6 = 0; } while(0)
// get/set Talk aliases
#define Talk_TRIS TRISC5
#define Talk_LAT LATC5
#define Talk_PORT PORTCbits.RC5
#define Talk_ANS ANSC5
#define Talk_SetHigh() do { LATC5 = 1; } while(0)
#define Talk_SetLow() do { LATC5 = 0; } while(0)
#define Talk_Toggle() do { LATC5 = ~LATC5; } while(0)
#define Talk_GetValue() PORTCbits.RC5
#define Talk_SetDigitalInput() do { TRISC5 = 1; } while(0)
#define Talk_SetDigitalOutput() do { TRISC5 = 0; } while(0)
#define Talk_SetAnalogMode() do { ANSC5 = 1; } while(0)
#define Talk_SetDigitalMode() do { ANSC5 = 0; } while(0)
// get/set SDA1 aliases
#define SDA1_TRIS TRISC4
#define SDA1_LAT LATC4
#define SDA1_PORT PORTCbits.RC4
#define SDA1_ANS ANSC4
#define SDA1_SetHigh() do { LATC4 = 1; } while(0)
#define SDA1_SetLow() do { LATC4 = 0; } while(0)
#define SDA1_Toggle() do { LATC4 = ~LATC4; } while(0)
#define SDA1_GetValue() PORTCbits.RC4
#define SDA1_SetDigitalInput() do { TRISC4 = 1; } while(0)
#define SDA1_SetDigitalOutput() do { TRISC4 = 0; } while(0)
#define SDA1_SetAnalogMode() do { ANSC4 = 1; } while(0)
#define SDA1_SetDigitalMode() do { ANSC4 = 0; } while(0)
// get/set SCL1 aliases
#define SCL1_TRIS TRISC3
#define SCL1_LAT LATC3
#define SCL1_PORT PORTCbits.RC3
#define SCL1_ANS ANSC3
#define SCL1_SetHigh() do { LATC3 = 1; } while(0)
#define SCL1_SetLow() do { LATC3 = 0; } while(0)
#define SCL1_Toggle() do { LATC3 = ~LATC3; } while(0)
#define SCL1_GetValue() PORTCbits.RC3
#define SCL1_SetDigitalInput() do { TRISC3 = 1; } while(0)
#define SCL1_SetDigitalOutput() do { TRISC3 = 0; } while(0)
#define SCL1_SetAnalogMode() do { ANSC3 = 1; } while(0)
#define SCL1_SetDigitalMode() do { ANSC3 = 0; } while(0)
// get/set Button1 aliases
#define Button1_TRIS TRISD5
#define Button1_LAT LATD5
#define Button1_PORT PORTDbits.RD5
#define Button1_ANS ANSD5
#define Button1_SetHigh() do { LATD5 = 1; } while(0)
#define Button1_SetLow() do { LATD5 = 0; } while(0)
#define Button1_Toggle() do { LATD5 = ~LATD5; } while(0)
#define Button1_GetValue() PORTDbits.RD5
#define Button1_SetDigitalInput() do { TRISD5 = 1; } while(0)
#define Button1_SetDigitalOutput() do { TRISD5 = 0; } while(0)
#define Button1_SetAnalogMode() do { ANSD5 = 1; } while(0)
#define Button1_SetDigitalMode() do { ANSD5 = 0; } while(0)
// get/set LED2 aliases
#define LED2_TRIS TRISD1
#define LED2_LAT LATD1
#define LED2_PORT PORTDbits.RD1
#define LED2_ANS ANSD1
#define LED2_SetHigh() do { LATD1 = 1; } while(0)
#define LED2_SetLow() do { LATD1 = 0; } while(0)
#define LED2_Toggle() do { LATD1 = ~LATD1; } while(0)
#define LED2_GetValue() PORTDbits.RD1
#define LED2_SetDigitalInput() do { TRISD1 = 1; } while(0)
#define LED2_SetDigitalOutput() do { TRISD1 = 0; } while(0)
#define LED2_SetAnalogMode() do { ANSD1 = 1; } while(0)
#define LED2_SetDigitalMode() do { ANSD1 = 0; } while(0)
// get/set LED3 aliases
#define LED3_TRIS TRISE2
#define LED3_LAT LATE2
#define LED3_PORT PORTEbits.RE2
#define LED3_ANS ANSE2
#define LED3_SetHigh() do { LATE2 = 1; } while(0)
#define LED3_SetLow() do { LATE2 = 0; } while(0)
#define LED3_Toggle() do { LATE2 = ~LATE2; } while(0)
#define LED3_GetValue() PORTEbits.RE2
#define LED3_SetDigitalInput() do { TRISE2 = 1; } while(0)
#define LED3_SetDigitalOutput() do { TRISE2 = 0; } while(0)
#define LED3_SetAnalogMode() do { ANSE2 = 1; } while(0)
#define LED3_SetDigitalMode() do { ANSE2 = 0; } while(0)
// get/set LED4 aliases
#define LED4_TRIS TRISE1
#define LED4_LAT LATE1
#define LED4_PORT PORTEbits.RE1
#define LED4_ANS ANSE1
#define LED4_SetHigh() do { LATE1 = 1; } while(0)
#define LED4_SetLow() do { LATE1 = 0; } while(0)
#define LED4_Toggle() do { LATE1 = ~LATE1; } while(0)
#define LED4_GetValue() PORTEbits.RE1
#define LED4_SetDigitalInput() do { TRISE1 = 1; } while(0)
#define LED4_SetDigitalOutput() do { TRISE1 = 0; } while(0)
#define LED4_SetAnalogMode() do { ANSE1 = 1; } while(0)
#define LED4_SetDigitalMode() do { ANSE1 = 0; } while(0)
// get/set LED5 aliases
#define LED5_TRIS TRISE0
#define LED5_LAT LATE0
#define LED5_PORT PORTEbits.RE0
#define LED5_ANS ANSE0
#define LED5_SetHigh() do { LATE0 = 1; } while(0)
#define LED5_SetLow() do { LATE0 = 0; } while(0)
#define LED5_Toggle() do { LATE0 = ~LATE0; } while(0)
#define LED5_GetValue() PORTEbits.RE0
#define LED5_SetDigitalInput() do { TRISE0 = 1; } while(0)
#define LED5_SetDigitalOutput() do { TRISE0 = 0; } while(0)
#define LED5_SetAnalogMode() do { ANSE0 = 1; } while(0)
#define LED5_SetDigitalMode() do { ANSE0 = 0; } while(0)
/**
* @Param
none
* @Returns
none
* @Description
GPIO and peripheral I/O initialization
* @Example
PIN_MANAGER_Initialize();
*/
void PIN_MANAGER_Initialize (void);
/**
* @Param
none
* @Returns
none
* @Description
Interrupt on Change Handling routine
* @Example
PIN_MANAGER_IOC();
*/
void PIN_MANAGER_IOC(void);
#endif // PIN_MANAGER_H
/**
End of File
*/ | Java |
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;
}
}
}
}
| Java |
#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
| Java |
<?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><b>Babylonian</b> 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>&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>&Copy Address</source>
<translation>کپی آدرس</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>نمایش &کد 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 &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>&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>&Verify Message</source>
<translation>شناسایی پیام</translation>
</message>
<message>
<location line="+14"/>
<source>&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 &Label</source>
<translation>کپی و برچسب گذاری</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>ویرایش</translation>
</message>
<message>
<location line="+1"/>
<source>Send &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.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>وارد کنید..&lt;br/&gt عبارت عبور نو در پنجره
10 یا بیشتر کاراکتورهای تصادفی استفاده کنید &lt;b&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 <b>LOSE ALL OF YOUR QUARKCOINS</b>!</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 &message...</source>
<translation>امضا و پیام</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>همگام سازی با شبکه ...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>بررسی اجمالی</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>نمای کلی پنجره نشان بده</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&معاملات</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&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 &Qt</source>
<translation>درباره &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>نمایش اطلاعات درباره Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>تنظیمات...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>رمزگذاری wallet</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>پشتیبان گیری از wallet</translation>
</message>
<message>
<location line="+2"/>
<source>&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>&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>&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>&Send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>&About Babylonian</source>
<translation>در مورد Babylonian</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&نمایش/ عدم نمایش</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>&File</source>
<translation>فایل</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>تنظیمات</translation>
</message>
<message>
<location line="+6"/>
<source>&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 <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>زمایش شبکهه</translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></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>&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>&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 "%1" is already in the address book.</source>
<translation>%1آدرس وارد شده دیگر در دفتر آدرس است</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" 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 "de_DE" (default: system locale)</source>
<translation>زبان را تنظیم کنید برای مثال "de_DE" (پیش فرض: 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>&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 &fee</source>
<translation>دستمزد&پر داخت معامله</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>&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>&Reset Options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>&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 &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>&Connect through SOCKS proxy:</source>
<translation>اتصال با پراکسی SOCKS</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &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>&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 &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>&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>&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&inimize on close</source>
<translation>کوچک کردن صفحه در زمان بستن</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>نمایش</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &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>&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>&Display addresses in transaction list</source>
<translation>نمایش آدرسها در فهرست تراکنش</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>تایید</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>رد</translation>
</message>
<message>
<location line="+10"/>
<source>&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><b>Recent transactions</b></source>
<translation>اخرین معاملات&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>&Save As...</source>
<translation>&ذخیره به عنوان...</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>&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>&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>&Show</source>
<translation>نمایش</translation>
</message>
<message>
<location line="+24"/>
<source>&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 <b>Ctrl-L</b> to clear screen.</source>
<translation>دکمه های بالا و پایین برای مرور تاریخچه و Ctrl-L برای پاکسازی صفحه</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> 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 &Recipient</source>
<translation>اضافه کردن دریافت کننده</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>پاک کردن تمام ستونهای تراکنش</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &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&end</source>
<translation>&;ارسال</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation>(%3) تا <b>%1</b> درصد%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&mount:</source>
<translation>A&مبلغ :</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>به&پر داخت :</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>&Label:</source>
<translation>&بر چسب </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>&Sign Message</source>
<translation>&امضای پیام</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 &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 &All</source>
<translation>پاکسازی همه</translation>
</message>
<message>
<location line="-87"/>
<source>&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 &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 "Sign Message" to generate signature</source>
<translation>با کلیک بر "امضای پیام" شما یک امضای جدید درست می کنید</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 "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>سکه های ایجاد شده باید 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>>محدوده</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>&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 <port> (default: 8333 or testnet: 18333)</source>
<translation>برای اتصالات به <port> (پیشفرض: 8333 یا تستنت: 18333) گوش کنید</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>حداکثر <n> اتصال با همکاران برقرار داشته باشید (پیشفرض: 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 <port> (default: 8332 or testnet: 18332)</source>
<translation>( 8332پیش فرض :) &lt;poort&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 "Babylonian Alert" 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'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, <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: '%s'</source>
<translation>آدرس نرم افزار تور غلط است %s</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</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, <n>*1000 bytes (default: 5000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 1000 بایت (پیش فرض:5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>حداکثر بافر دریافت شده بر اساس اتصال <n>* 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 <net> (IPv4, IPv6 or Tor)</source>
<translation>تنها =به گره ها در شبکه متصا شوید <net> (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 <ip> (default: 127.0.0.1)</source>
<translation>(127.0.0.1پیش فرض: ) &lt;ip&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 <n> (default: 100)</source>
<translation> (100پیش فرض:)&lt;n&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: '%s'</source>
<translation>آدرس پراکسی اشتباه %s</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: '%s'</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: '%s'</source>
<translation>آدرس قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>میزان وجه اشتباه برای paytxfee=<میزان وجه>: %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=<password> 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> | Java |
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."
| Java |
namespace TraverseDirectory
{
using System;
using System.IO;
using System.Text;
using System.Xml;
class Program
{
static void Main()
{
using (XmlTextWriter writer = new XmlTextWriter("../../dir.xml", Encoding.UTF8))
{
writer.Formatting = Formatting.Indented;
writer.IndentChar = ' ';
writer.Indentation = 4;
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
writer.WriteStartDocument();
writer.WriteStartElement("Desktop");
Traverse(desktopPath, writer);
writer.WriteEndDocument();
}
Console.WriteLine("result saved as dir.xml");
}
static void Traverse(string dir, XmlTextWriter writer)
{
foreach (var directory in Directory.GetDirectories(dir))
{
writer.WriteStartElement("dir");
writer.WriteAttributeString("path", directory);
Traverse(directory, writer);
writer.WriteEndElement();
}
foreach (var file in Directory.GetFiles(dir))
{
writer.WriteStartElement("file");
writer.WriteAttributeString("name", Path.GetFileNameWithoutExtension(file));
writer.WriteAttributeString("ext", Path.GetExtension(file));
writer.WriteEndElement();
}
}
}
}
| Java |
__history = [{"date":"Fri, 12 Jul 2013 08:56:55 GMT","sloc":9,"lloc":7,"functions":0,"deliveredBugs":0.05805500935039566,"maintainability":67.90674087790423,"lintErrors":3,"difficulty":5.3076923076923075}] | Java |
/**!
*
* Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file.
*/
/* eslint-disable */
'use strict';
var path = require('path');
module.exports = function configGrunt(grunt, p) {
grunt.registerTask('test', []);
};
| Java |
// 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);
} | Java |
require File.expand_path('../boot', __FILE__)
require 'rails'
# Pick the frameworks you want:
require 'active_model/railtie'
require 'active_job/railtie'
require 'active_record/railtie'
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'action_view/railtie'
require 'sprockets/railtie'
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module LazyCat
class Application < Rails::Application
# Use the responders controller from the responders gem
config.app_generators.scaffold_controller :responders_controller
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
end
end
| Java |
{{<govuk_template}}
{{$head}}
{{>includes/elements_head}}
{{>includes/elements_scripts}}
{{/head}}
{{$propositionHeader}}
{{>includes/propositional_navigation3}}
{{/propositionHeader}}
{{$headerClass}}with-proposition{{/headerClass}}
{{$content}}
<header class="page-header">
</header>
<main id="page-container" role="main">
<div class="phase-banner">
<p><strong class="phase-tag">ALPHA</strong><span>This is a new service – your <a href="#">feedback</a> will help us to improve it.</span>
</p>
</div>
<form action="medical-form" method="get" class="form inline">
<div class="grid-row" id="q1">
<div class="column-full">
<h4 class="heading-large">Does your cancer affect your ability to drive?</h4>
</div>
</div>
<div class="grid-row" id="q1">
<div class="column-two-thirds">
<div class="form-group" id="question">
<legend>
<span class="error-message" style="display: none;">
Please select a valid option
</span>
</legend>
<label class="block-label" for="q1-a1" id="q1-a1-label">
<input id="q1-a1" type="radio" name="q1-answer" value="Y" onclick="">Yes
</label>
<label class="block-label" for="q1-a2" id="q1-a2-label">
<input id="q1-a2" type="radio" name="q1-answer" value="N" onclick="">No
</label>
</div>
</div>
</div>
<div class="form-group">
<input id="continue" name="continue" type="button" class="button" value="Continue" onclick="validate()">
</div>
</form>
<form action="">
<a class="back-to-previous" href="javascript:history.go(-1);">
<i class="fa fa-angle-left"></i> Back <span class="visuallyhidden"> to the previous question</span>
</a>
</form>
<script>
function validate() {
var value = $('input[name=q1-answer]:checked').val();
if (value == 'Y') {
localStorage.G = true;
window.location.href = 'V-CONDITION';
} else if (value == 'N') {
window.location.href = 'V-CONDITION';
} else {
$('#question').addClass('error');
$('.error-message').show();
}
}
</script>
</main>
{{/content}}
{{$bodyEnd}}
{{/bodyEnd}}
{{/govuk_template}} | Java |
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; }
}
} | Java |
<?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> <button onclick="open_menu('area_form',{action:'edit',code:'<?php echo $line[0]; ?>'});">Edit</button></td></tr>
<?php }?>
</tbody>
</table>
<br />
<br />
<div>
| Java |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class Shop_currency_model</title>
<link rel="stylesheet" href="resources/bootstrap.min.css?08b23951ef4599ca9cbf1f902d0e8290c9653ddd">
<link rel="stylesheet" href="resources/style.css?062e9e59e0b8c44fbaaded5b7ffc21f907b78669">
</head>
<body>
<div id="navigation" class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a href="index.html" class="brand">Overview</a>
<div class="nav-collapse">
<ul class="nav">
<li>
<a href="namespace-None.html" title="Summary of None"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
</div>
</div>
</div>
</div>
<div id="left">
<div id="menu">
<form id="search" class="form-search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" class="search-query" placeholder="Search">
</form>
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li>
<a href="namespace-Nails.html">
Nails<span></span>
</a>
<ul>
<li>
<a href="namespace-Nails.Admin.html">
Admin<span></span>
</a>
<ul>
<li>
<a href="namespace-Nails.Admin.Admin.html">
Admin </a>
</li>
<li>
<a href="namespace-Nails.Admin.Auth.html">
Auth </a>
</li>
<li>
<a href="namespace-Nails.Admin.Blog.html">
Blog </a>
</li>
<li>
<a href="namespace-Nails.Admin.Cdn.html">
Cdn </a>
</li>
<li>
<a href="namespace-Nails.Admin.Cms.html">
Cms </a>
</li>
<li>
<a href="namespace-Nails.Admin.Email.html">
Email </a>
</li>
<li>
<a href="namespace-Nails.Admin.Shop.html">
Shop </a>
</li>
<li>
<a href="namespace-Nails.Admin.Testimonial.html">
Testimonial </a>
</li>
</ul></li></ul></li>
<li class="active">
<a href="namespace-None.html">
None </a>
</li>
</ul>
</div>
<div id="elements">
<h3>Classes</h3>
<ul>
<li><a href="class-Admin.html">Admin</a></li>
<li><a href="class-Admin_changelog_model.html">Admin_changelog_model</a></li>
<li><a href="class-Admin_help_model.html">Admin_help_model</a></li>
<li><a href="class-Admin_model.html">Admin_model</a></li>
<li><a href="class-Admin_sitelog_model.html">Admin_sitelog_model</a></li>
<li><a href="class-AdminController.html">AdminController</a></li>
<li><a href="class-AdminRouter.html">AdminRouter</a></li>
<li><a href="class-Api.html">Api</a></li>
<li><a href="class-App_notification_model.html">App_notification_model</a></li>
<li><a href="class-App_setting_model.html">App_setting_model</a></li>
<li><a href="class-Asset.html">Asset</a></li>
<li><a href="class-Auth.html">Auth</a></li>
<li><a href="class-Auth_model.html">Auth_model</a></li>
<li><a href="class-Aws_local_CDN.html">Aws_local_CDN</a></li>
<li><a href="class-Barcode.html">Barcode</a></li>
<li><a href="class-Barcode_generator.html">Barcode_generator</a></li>
<li><a href="class-Basket.html">Basket</a></li>
<li><a href="class-Blank_avatar.html">Blank_avatar</a></li>
<li><a href="class-Blog.html">Blog</a></li>
<li><a href="class-Blog_category_model.html">Blog_category_model</a></li>
<li><a href="class-Blog_model.html">Blog_model</a></li>
<li><a href="class-Blog_post_model.html">Blog_post_model</a></li>
<li><a href="class-Blog_skin_model.html">Blog_skin_model</a></li>
<li><a href="class-Blog_tag_model.html">Blog_tag_model</a></li>
<li><a href="class-Blog_widget_model.html">Blog_widget_model</a></li>
<li><a href="class-Cdn.html">Cdn</a></li>
<li><a href="class-Cdnapi.html">Cdnapi</a></li>
<li><a href="class-Checkout.html">Checkout</a></li>
<li><a href="class-CI.html" class="invalid">CI</a></li>
<li><a href="class-CI_Model.html">CI_Model</a></li>
<li><a href="class-Cms.html">Cms</a></li>
<li><a href="class-Cms_block_model.html">Cms_block_model</a></li>
<li><a href="class-Cms_menu_model.html">Cms_menu_model</a></li>
<li><a href="class-Cms_page_model.html">Cms_page_model</a></li>
<li><a href="class-Cms_slider_model.html">Cms_slider_model</a></li>
<li><a href="class-Comment.html">Comment</a></li>
<li><a href="class-CORE_NAILS_App.html">CORE_NAILS_App</a></li>
<li><a href="class-CORE_NAILS_Calendar.html">CORE_NAILS_Calendar</a></li>
<li><a href="class-CORE_NAILS_Controller.html">CORE_NAILS_Controller</a></li>
<li><a href="class-CORE_NAILS_Deploy.html">CORE_NAILS_Deploy</a></li>
<li><a href="class-CORE_NAILS_ErrorHandler.html">CORE_NAILS_ErrorHandler</a></li>
<li><a href="class-CORE_NAILS_ErrorHandler_Rollbar.html">CORE_NAILS_ErrorHandler_Rollbar</a></li>
<li><a href="class-CORE_NAILS_Exceptions.html">CORE_NAILS_Exceptions</a></li>
<li><a href="class-CORE_NAILS_Form_validation.html">CORE_NAILS_Form_validation</a></li>
<li><a href="class-CORE_NAILS_Hooks.html">CORE_NAILS_Hooks</a></li>
<li><a href="class-CORE_NAILS_Install.html">CORE_NAILS_Install</a></li>
<li><a href="class-CORE_NAILS_Lang.html">CORE_NAILS_Lang</a></li>
<li><a href="class-CORE_NAILS_Loader.html">CORE_NAILS_Loader</a></li>
<li><a href="class-CORE_NAILS_Log.html">CORE_NAILS_Log</a></li>
<li><a href="class-CORE_NAILS_Migrate.html">CORE_NAILS_Migrate</a></li>
<li><a href="class-CORE_NAILS_Model.html">CORE_NAILS_Model</a></li>
<li><a href="class-CORE_NAILS_Pagination.html">CORE_NAILS_Pagination</a></li>
<li><a href="class-CORE_NAILS_Profiler.html">CORE_NAILS_Profiler</a></li>
<li><a href="class-CORE_NAILS_Router.html">CORE_NAILS_Router</a></li>
<li><a href="class-CORE_NAILS_Session.html">CORE_NAILS_Session</a></li>
<li><a href="class-CORE_NAILS_URI.html">CORE_NAILS_URI</a></li>
<li><a href="class-CORE_NAILS_User_agent.html">CORE_NAILS_User_agent</a></li>
<li><a href="class-Country_model.html">Country_model</a></li>
<li><a href="class-Curl.html">Curl</a></li>
<li><a href="class-Datetime_model.html">Datetime_model</a></li>
<li><a href="class-Deploy.html">Deploy</a></li>
<li><a href="class-Emailer.html">Emailer</a></li>
<li><a href="class-Enquire.html">Enquire</a></li>
<li><a href="class-Event.html">Event</a></li>
<li><a href="class-Faux_session.html">Faux_session</a></li>
<li><a href="class-Feed.html">Feed</a></li>
<li><a href="class-Forgotten_Password.html">Forgotten_Password</a></li>
<li><a href="class-Geo_ip.html">Geo_ip</a></li>
<li><a href="class-Geo_ip_driver_Nails_ip_services.html">Geo_ip_driver_Nails_ip_services</a></li>
<li><a href="class-Home.html">Home</a></li>
<li><a href="class-Language_model.html">Language_model</a></li>
<li><a href="class-Local_CDN.html">Local_CDN</a></li>
<li><a href="class-Logger.html">Logger</a></li>
<li><a href="class-Login.html">Login</a></li>
<li><a href="class-Logout.html">Logout</a></li>
<li><a href="class-Maintenance.html">Maintenance</a></li>
<li><a href="class-Manager.html">Manager</a></li>
<li><a href="class-Mfa_device.html">Mfa_device</a></li>
<li><a href="class-Mfa_question.html">Mfa_question</a></li>
<li><a href="class-Modules.html">Modules</a></li>
<li><a href="class-Mustache.html">Mustache</a></li>
<li><a href="class-MX_Config.html">MX_Config</a></li>
<li><a href="class-MX_Controller.html">MX_Controller</a></li>
<li><a href="class-MX_Lang.html">MX_Lang</a></li>
<li><a href="class-MX_Loader.html">MX_Loader</a></li>
<li><a href="class-MX_Router.html">MX_Router</a></li>
<li><a href="class-NAILS_Admin.html">NAILS_Admin</a></li>
<li><a href="class-NAILS_Admin_changelog_model.html">NAILS_Admin_changelog_model</a></li>
<li><a href="class-NAILS_Admin_Controller.html">NAILS_Admin_Controller</a></li>
<li><a href="class-NAILS_Admin_help_model.html">NAILS_Admin_help_model</a></li>
<li><a href="class-NAILS_Admin_Model.html">NAILS_Admin_Model</a></li>
<li><a href="class-NAILS_Admin_sitelog_model.html">NAILS_Admin_sitelog_model</a></li>
<li><a href="class-NAILS_Api.html">NAILS_Api</a></li>
<li><a href="class-NAILS_API_Controller.html">NAILS_API_Controller</a></li>
<li><a href="class-NAILS_App_notification_model.html">NAILS_App_notification_model</a></li>
<li><a href="class-NAILS_App_setting_model.html">NAILS_App_setting_model</a></li>
<li><a href="class-NAILS_Auth.html">NAILS_Auth</a></li>
<li><a href="class-NAILS_Auth_Controller.html">NAILS_Auth_Controller</a></li>
<li><a href="class-NAILS_Auth_Mfa_Controller.html">NAILS_Auth_Mfa_Controller</a></li>
<li><a href="class-NAILS_Auth_model.html">NAILS_Auth_model</a></li>
<li><a href="class-NAILS_Barcode.html">NAILS_Barcode</a></li>
<li><a href="class-NAILS_Basket.html">NAILS_Basket</a></li>
<li><a href="class-NAILS_Blank_avatar.html">NAILS_Blank_avatar</a></li>
<li><a href="class-NAILS_Blog.html" class="invalid">NAILS_Blog</a></li>
<li><a href="class-NAILS_Blog_category_model.html">NAILS_Blog_category_model</a></li>
<li><a href="class-NAILS_Blog_Controller.html">NAILS_Blog_Controller</a></li>
<li><a href="class-NAILS_Blog_model.html">NAILS_Blog_model</a></li>
<li><a href="class-NAILS_Blog_post_model.html">NAILS_Blog_post_model</a></li>
<li><a href="class-NAILS_Blog_skin_model.html">NAILS_Blog_skin_model</a></li>
<li><a href="class-NAILS_Blog_tag_model.html">NAILS_Blog_tag_model</a></li>
<li><a href="class-NAILS_Blog_widget_model.html">NAILS_Blog_widget_model</a></li>
<li><a href="class-NAILS_CDN_Controller.html">NAILS_CDN_Controller</a></li>
<li><a href="class-NAILS_Cdnapi.html">NAILS_Cdnapi</a></li>
<li><a href="class-NAILS_Checkout.html">NAILS_Checkout</a></li>
<li><a href="class-NAILS_Cms.html" class="invalid">NAILS_Cms</a></li>
<li><a href="class-NAILS_Cms_block_model.html">NAILS_Cms_block_model</a></li>
<li><a href="class-NAILS_CMS_Controller.html">NAILS_CMS_Controller</a></li>
<li><a href="class-NAILS_Cms_menu_model.html">NAILS_Cms_menu_model</a></li>
<li><a href="class-NAILS_Cms_page_model.html">NAILS_Cms_page_model</a></li>
<li><a href="class-NAILS_Cms_slider_model.html">NAILS_Cms_slider_model</a></li>
<li><a href="class-Nails_CMS_Template.html">Nails_CMS_Template</a></li>
<li><a href="class-Nails_CMS_Template_fullwidth.html">Nails_CMS_Template_fullwidth</a></li>
<li><a href="class-NAILS_CMS_Template_redirect.html">NAILS_CMS_Template_redirect</a></li>
<li><a href="class-Nails_CMS_Template_sidebar_left.html">Nails_CMS_Template_sidebar_left</a></li>
<li><a href="class-Nails_CMS_Template_sidebar_right.html">Nails_CMS_Template_sidebar_right</a></li>
<li><a href="class-NAILS_CMS_Widget.html">NAILS_CMS_Widget</a></li>
<li><a href="class-NAILS_CMS_Widget_html.html">NAILS_CMS_Widget_html</a></li>
<li><a href="class-NAILS_CMS_Widget_image.html">NAILS_CMS_Widget_image</a></li>
<li><a href="class-NAILS_CMS_Widget_richtext.html">NAILS_CMS_Widget_richtext</a></li>
<li><a href="class-NAILS_CMS_Widget_slider.html">NAILS_CMS_Widget_slider</a></li>
<li><a href="class-NAILS_CMS_Widget_table.html">NAILS_CMS_Widget_table</a></li>
<li><a href="class-NAILS_Controller.html">NAILS_Controller</a></li>
<li><a href="class-NAILS_Country_model.html">NAILS_Country_model</a></li>
<li><a href="class-NAILS_Cron_Controller.html">NAILS_Cron_Controller</a></li>
<li><a href="class-NAILS_Datetime_model.html">NAILS_Datetime_model</a></li>
<li><a href="class-NAILS_Deploy.html">NAILS_Deploy</a></li>
<li><a href="class-NAILS_Email.html">NAILS_Email</a></li>
<li><a href="class-NAILS_Email_Controller.html">NAILS_Email_Controller</a></li>
<li><a href="class-NAILS_Enquire.html">NAILS_Enquire</a></li>
<li><a href="class-NAILS_Exceptions.html">NAILS_Exceptions</a></li>
<li><a href="class-NAILS_Feed.html">NAILS_Feed</a></li>
<li><a href="class-NAILS_Forgotten_Password.html">NAILS_Forgotten_Password</a></li>
<li><a href="class-NAILS_Geo_ip_driver.html">NAILS_Geo_ip_driver</a></li>
<li><a href="class-NAILS_Hooks.html">NAILS_Hooks</a></li>
<li><a href="class-NAILS_Lang.html">NAILS_Lang</a></li>
<li><a href="class-NAILS_Language_model.html">NAILS_Language_model</a></li>
<li><a href="class-NAILS_Loader.html">NAILS_Loader</a></li>
<li><a href="class-NAILS_Log.html">NAILS_Log</a></li>
<li><a href="class-NAILS_Login.html">NAILS_Login</a></li>
<li><a href="class-NAILS_Logout.html">NAILS_Logout</a></li>
<li><a href="class-NAILS_Logs.html">NAILS_Logs</a></li>
<li><a href="class-NAILS_Maintenance.html">NAILS_Maintenance</a></li>
<li><a href="class-NAILS_Manager.html">NAILS_Manager</a></li>
<li><a href="class-NAILS_Mfa_device.html">NAILS_Mfa_device</a></li>
<li><a href="class-NAILS_Mfa_question.html">NAILS_Mfa_question</a></li>
<li><a href="class-NAILS_Model.html">NAILS_Model</a></li>
<li><a href="class-NAILS_Notify.html">NAILS_Notify</a></li>
<li><a href="class-NAILS_Orders.html">NAILS_Orders</a></li>
<li><a href="class-NAILS_Override.html">NAILS_Override</a></li>
<li><a href="class-NAILS_Pagination.html">NAILS_Pagination</a></li>
<li><a href="class-NAILS_Placeholder.html">NAILS_Placeholder</a></li>
<li><a href="class-NAILS_Register.html">NAILS_Register</a></li>
<li><a href="class-NAILS_Render.html">NAILS_Render</a></li>
<li><a href="class-NAILS_Reset_Password.html">NAILS_Reset_Password</a></li>
<li><a href="class-NAILS_Router.html">NAILS_Router</a></li>
<li><a href="class-NAILS_Routes_model.html">NAILS_Routes_model</a></li>
<li><a href="class-NAILS_Scale.html">NAILS_Scale</a></li>
<li><a href="class-NAILS_Serve.html">NAILS_Serve</a></li>
<li><a href="class-NAILS_Shop.html" class="invalid">NAILS_Shop</a></li>
<li><a href="class-NAILS_Shop_attribute_model.html">NAILS_Shop_attribute_model</a></li>
<li><a href="class-NAILS_Shop_basket_model.html">NAILS_Shop_basket_model</a></li>
<li><a href="class-NAILS_Shop_brand_model.html">NAILS_Shop_brand_model</a></li>
<li><a href="class-NAILS_Shop_category_model.html">NAILS_Shop_category_model</a></li>
<li><a href="class-NAILS_Shop_collection_model.html">NAILS_Shop_collection_model</a></li>
<li><a href="class-NAILS_Shop_Controller.html">NAILS_Shop_Controller</a></li>
<li><a href="class-NAILS_Shop_currency_model.html">NAILS_Shop_currency_model</a></li>
<li><a href="class-NAILS_Shop_feed_model.html">NAILS_Shop_feed_model</a></li>
<li><a href="class-NAILS_Shop_inform_product_available_model.html">NAILS_Shop_inform_product_available_model</a></li>
<li><a href="class-NAILS_Shop_model.html">NAILS_Shop_model</a></li>
<li><a href="class-NAILS_Shop_order_model.html">NAILS_Shop_order_model</a></li>
<li><a href="class-NAILS_Shop_order_payment_model.html">NAILS_Shop_order_payment_model</a></li>
<li><a href="class-NAILS_Shop_payment_gateway_model.html">NAILS_Shop_payment_gateway_model</a></li>
<li><a href="class-NAILS_Shop_product_model.html">NAILS_Shop_product_model</a></li>
<li><a href="class-NAILS_Shop_product_type_meta_model.html">NAILS_Shop_product_type_meta_model</a></li>
<li><a href="class-NAILS_Shop_product_type_model.html">NAILS_Shop_product_type_model</a></li>
<li><a href="class-NAILS_Shop_range_model.html">NAILS_Shop_range_model</a></li>
<li><a href="class-NAILS_Shop_sale_model.html">NAILS_Shop_sale_model</a></li>
<li><a href="class-NAILS_Shop_shipping_driver_model.html">NAILS_Shop_shipping_driver_model</a></li>
<li><a href="class-NAILS_Shop_skin_checkout_model.html">NAILS_Shop_skin_checkout_model</a></li>
<li><a href="class-NAILS_Shop_skin_front_model.html">NAILS_Shop_skin_front_model</a></li>
<li><a href="class-NAILS_Shop_tag_model.html">NAILS_Shop_tag_model</a></li>
<li><a href="class-NAILS_Shop_tax_rate_model.html">NAILS_Shop_tax_rate_model</a></li>
<li><a href="class-NAILS_Shop_voucher_model.html">NAILS_Shop_voucher_model</a></li>
<li><a href="class-NAILS_Sitemap.html">NAILS_Sitemap</a></li>
<li><a href="class-NAILS_Sitemap_model.html">NAILS_Sitemap_model</a></li>
<li><a href="class-NAILS_System.html">NAILS_System</a></li>
<li><a href="class-NAILS_System_startup.html">NAILS_System_startup</a></li>
<li><a href="class-NAILS_Testimonial_model.html">NAILS_Testimonial_model</a></li>
<li><a href="class-NAILS_Thumb.html">NAILS_Thumb</a></li>
<li><a href="class-NAILS_Tracker.html">NAILS_Tracker</a></li>
<li><a href="class-NAILS_Unsubscribe.html">NAILS_Unsubscribe</a></li>
<li><a href="class-NAILS_URI.html">NAILS_URI</a></li>
<li><a href="class-NAILS_User_group_model.html">NAILS_User_group_model</a></li>
<li><a href="class-NAILS_User_model.html">NAILS_User_model</a></li>
<li><a href="class-NAILS_User_password_model.html">NAILS_User_password_model</a></li>
<li><a href="class-NAILS_Verify.html">NAILS_Verify</a></li>
<li><a href="class-NAILS_View_Online.html">NAILS_View_Online</a></li>
<li><a href="class-NAILS_Zip.html">NAILS_Zip</a></li>
<li><a href="class-Notify.html">Notify</a></li>
<li><a href="class-Orders.html">Orders</a></li>
<li><a href="class-Override.html">Override</a></li>
<li><a href="class-Pdf.html">Pdf</a></li>
<li><a href="class-Placeholder.html">Placeholder</a></li>
<li><a href="class-Register.html">Register</a></li>
<li><a href="class-Render.html">Render</a></li>
<li><a href="class-Reset_Password.html">Reset_Password</a></li>
<li><a href="class-Routes_model.html">Routes_model</a></li>
<li><a href="class-Scale.html">Scale</a></li>
<li><a href="class-Serve.html">Serve</a></li>
<li><a href="class-Shop.html" class="invalid">Shop</a></li>
<li><a href="class-Shop_attribute_model.html">Shop_attribute_model</a></li>
<li><a href="class-Shop_basket_model.html">Shop_basket_model</a></li>
<li><a href="class-Shop_brand_model.html">Shop_brand_model</a></li>
<li><a href="class-Shop_category_model.html">Shop_category_model</a></li>
<li><a href="class-Shop_collection_model.html">Shop_collection_model</a></li>
<li class="active"><a href="class-Shop_currency_model.html">Shop_currency_model</a></li>
<li><a href="class-Shop_feed_model.html">Shop_feed_model</a></li>
<li><a href="class-Shop_inform_product_available_model.html">Shop_inform_product_available_model</a></li>
<li><a href="class-Shop_model.html">Shop_model</a></li>
<li><a href="class-Shop_order_model.html">Shop_order_model</a></li>
<li><a href="class-Shop_order_payment_model.html">Shop_order_payment_model</a></li>
<li><a href="class-Shop_payment_gateway_model.html">Shop_payment_gateway_model</a></li>
<li><a href="class-Shop_product_model.html">Shop_product_model</a></li>
<li><a href="class-Shop_product_type_meta_model.html">Shop_product_type_meta_model</a></li>
<li><a href="class-Shop_product_type_model.html">Shop_product_type_model</a></li>
<li><a href="class-Shop_range_model.html">Shop_range_model</a></li>
<li><a href="class-Shop_sale_model.html">Shop_sale_model</a></li>
<li><a href="class-Shop_shipping_driver_flatrate.html">Shop_shipping_driver_flatrate</a></li>
<li><a href="class-Shop_shipping_driver_model.html">Shop_shipping_driver_model</a></li>
<li><a href="class-Shop_skin_checkout_model.html">Shop_skin_checkout_model</a></li>
<li><a href="class-Shop_skin_front_model.html">Shop_skin_front_model</a></li>
<li><a href="class-Shop_tag_model.html">Shop_tag_model</a></li>
<li><a href="class-Shop_tax_rate_model.html">Shop_tax_rate_model</a></li>
<li><a href="class-Shop_voucher_model.html">Shop_voucher_model</a></li>
<li><a href="class-Sitemap.html">Sitemap</a></li>
<li><a href="class-Sitemap_model.html">Sitemap_model</a></li>
<li><a href="class-Social_signon.html">Social_signon</a></li>
<li><a href="class-System.html">System</a></li>
<li><a href="class-System_startup.html">System_startup</a></li>
<li><a href="class-Testimonial_model.html">Testimonial_model</a></li>
<li><a href="class-Thumb.html">Thumb</a></li>
<li><a href="class-Tracker.html">Tracker</a></li>
<li><a href="class-Unsubscribe.html">Unsubscribe</a></li>
<li><a href="class-User_group_model.html">User_group_model</a></li>
<li><a href="class-User_model.html">User_model</a></li>
<li><a href="class-User_password_model.html">User_password_model</a></li>
<li><a href="class-Verify.html">Verify</a></li>
<li><a href="class-View_online.html">View_online</a></li>
<li><a href="class-Zip.html">Zip</a></li>
</ul>
<h3>Interfaces</h3>
<ul>
<li><a href="class-Cdn_driver.html">Cdn_driver</a></li>
<li><a href="class-CORE_NAILS_ErrorHandler_Interface.html">CORE_NAILS_ErrorHandler_Interface</a></li>
<li><a href="class-Shop_shipping_driver.html">Shop_shipping_driver</a></li>
</ul>
<h3>Traits</h3>
<ul>
<li><a href="class-NAILS_COMMON_TRAIT_CACHING.html">NAILS_COMMON_TRAIT_CACHING</a></li>
<li><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html">NAILS_COMMON_TRAIT_ERROR_HANDLING</a></li>
<li><a href="class-NAILS_COMMON_TRAIT_GETCOUNT_COMMON.html">NAILS_COMMON_TRAIT_GETCOUNT_COMMON</a></li>
</ul>
<h3>Functions</h3>
<ul>
<li><a href="function-_db_flush_caches.html">_db_flush_caches</a></li>
<li><a href="function-_db_reset_active_record.html">_db_reset_active_record</a></li>
<li><a href="function-_genderise.html">_genderise</a></li>
<li><a href="function-_LOG.html">_LOG</a></li>
<li><a href="function-_LOG_DUMMY_MODE.html">_LOG_DUMMY_MODE</a></li>
<li><a href="function-_LOG_FILE.html">_LOG_FILE</a></li>
<li><a href="function-_LOG_MUTE_OUTPUT.html">_LOG_MUTE_OUTPUT</a></li>
<li><a href="function-_NAILS_ERROR.html">_NAILS_ERROR</a></li>
<li><a href="function-_NAILS_GET_COMPONENTS.html">_NAILS_GET_COMPONENTS</a></li>
<li><a href="function-_NAILS_GET_DRIVERS.html">_NAILS_GET_DRIVERS</a></li>
<li><a href="function-_NAILS_GET_MODULES.html">_NAILS_GET_MODULES</a></li>
<li><a href="function-_NAILS_GET_SKINS.html">_NAILS_GET_SKINS</a></li>
<li><a href="function-_NAILS_MIN_PHP_VERSION.html">_NAILS_MIN_PHP_VERSION</a></li>
<li><a href="function-active_user.html">active_user</a></li>
<li><a href="function-addTrailingSlash.html">addTrailingSlash</a></li>
<li><a href="function-app_notification.html">app_notification</a></li>
<li><a href="function-app_notification_notify.html">app_notification_notify</a></li>
<li><a href="function-app_setting.html">app_setting</a></li>
<li><a href="function-array_search_multi.html">array_search_multi</a></li>
<li><a href="function-array_sort_multi.html">array_sort_multi</a></li>
<li><a href="function-array_unique_multi.html">array_unique_multi</a></li>
<li><a href="function-blog_latest_posts.html">blog_latest_posts</a></li>
<li><a href="function-blog_posts_with_association.html">blog_posts_with_association</a></li>
<li><a href="function-blog_posts_with_category.html">blog_posts_with_category</a></li>
<li><a href="function-blog_posts_with_tag.html">blog_posts_with_tag</a></li>
<li><a href="function-calculate_age.html">calculate_age</a></li>
<li><a href="function-camelcase_to_underscore.html">camelcase_to_underscore</a></li>
<li><a href="function-cdn_avatar.html">cdn_avatar</a></li>
<li><a href="function-cdn_blank_avatar.html">cdn_blank_avatar</a></li>
<li><a href="function-cdn_expiring_url.html">cdn_expiring_url</a></li>
<li><a href="function-cdn_placeholder.html">cdn_placeholder</a></li>
<li><a href="function-cdn_scale.html">cdn_scale</a></li>
<li><a href="function-cdn_serve.html">cdn_serve</a></li>
<li><a href="function-cdn_serve_zipped.html">cdn_serve_zipped</a></li>
<li><a href="function-cdn_thumb.html">cdn_thumb</a></li>
<li><a href="function-cdnManageUrl.html">cdnManageUrl</a></li>
<li><a href="function-clean.html">clean</a></li>
<li><a href="function-cmsBlock.html">cmsBlock</a></li>
<li><a href="function-cmsMenu.html">cmsMenu</a></li>
<li><a href="function-cmsSlider.html">cmsSlider</a></li>
<li><a href="function-create_event.html">create_event</a></li>
<li><a href="function-datepicker.html">datepicker</a></li>
<li><a href="function-dropdown_days.html">dropdown_days</a></li>
<li><a href="function-dropdown_hours.html">dropdown_hours</a></li>
<li><a href="function-dropdown_minutes.html">dropdown_minutes</a></li>
<li><a href="function-dropdown_months.html">dropdown_months</a></li>
<li><a href="function-dropdown_years.html">dropdown_years</a></li>
<li><a href="function-dump.html">dump</a></li>
<li><a href="function-dumpanddie.html">dumpanddie</a></li>
<li><a href="function-form_email.html">form_email</a></li>
<li><a href="function-form_field.html">form_field</a></li>
<li><a href="function-form_field_boolean.html">form_field_boolean</a></li>
<li><a href="function-form_field_checkbox.html">form_field_checkbox</a></li>
<li><a href="function-form_field_date.html">form_field_date</a></li>
<li><a href="function-form_field_datetime.html">form_field_datetime</a></li>
<li><a href="function-form_field_dropdown.html">form_field_dropdown</a></li>
<li><a href="function-form_field_dropdown_multiple.html">form_field_dropdown_multiple</a></li>
<li><a href="function-form_field_email.html">form_field_email</a></li>
<li><a href="function-form_field_mm.html">form_field_mm</a></li>
<li><a href="function-form_field_mm_image.html">form_field_mm_image</a></li>
<li><a href="function-form_field_multiimage.html">form_field_multiimage</a></li>
<li><a href="function-form_field_password.html">form_field_password</a></li>
<li><a href="function-form_field_radio.html">form_field_radio</a></li>
<li><a href="function-form_field_submit.html">form_field_submit</a></li>
<li><a href="function-form_field_text.html">form_field_text</a></li>
<li><a href="function-form_field_textarea.html">form_field_textarea</a></li>
<li><a href="function-form_field_wysiwyg.html">form_field_wysiwyg</a></li>
<li><a href="function-form_open.html">form_open</a></li>
<li><a href="function-format_bytes.html">format_bytes</a></li>
<li><a href="function-genderise.html">genderise</a></li>
<li><a href="function-get_basket.html">get_basket</a></li>
<li><a href="function-get_basket_count.html">get_basket_count</a></li>
<li><a href="function-get_basket_total.html">get_basket_total</a></li>
<li><a href="function-get_ext_from_mime.html">get_ext_from_mime</a></li>
<li><a href="function-get_mime_from_ext.html">get_mime_from_ext</a></li>
<li><a href="function-get_mime_from_file.html">get_mime_from_file</a></li>
<li><a href="function-get_userobject.html">get_userobject</a></li>
<li><a href="function-getControllerData.html">getControllerData</a></li>
<li><a href="function-getDomainFromUrl.html">getDomainFromUrl</a></li>
<li><a href="function-getRelativePath.html">getRelativePath</a></li>
<li><a href="function-gravatar.html">gravatar</a></li>
<li><a href="function-here.html">here</a></li>
<li><a href="function-img.html">img</a></li>
<li><a href="function-in_array_multi.html">in_array_multi</a></li>
<li><a href="function-is_clean.html">is_clean</a></li>
<li><a href="function-isIpInRange.html">isIpInRange</a></li>
<li><a href="function-isModuleEnabled.html">isModuleEnabled</a></li>
<li><a href="function-isPageSecure.html">isPageSecure</a></li>
<li><a href="function-keyValueSection.html">keyValueSection</a></li>
<li><a href="function-lang.html">lang</a></li>
<li><a href="function-last_query.html">last_query</a></li>
<li><a href="function-lastquery.html">lastquery</a></li>
<li><a href="function-link_tag.html">link_tag</a></li>
<li><a href="function-list_first_last.html">list_first_last</a></li>
<li><a href="function-map.html">map</a></li>
<li><a href="function-niceTime.html">niceTime</a></li>
<li><a href="function-possessionise.html">possessionise</a></li>
<li><a href="function-readFileChunked.html">readFileChunked</a></li>
<li><a href="function-redirect.html">redirect</a></li>
<li><a href="function-return_bytes.html">return_bytes</a></li>
<li><a href="function-secure_site_url.html">secure_site_url</a></li>
<li><a href="function-sendDeveloperMail.html">sendDeveloperMail</a></li>
<li><a href="function-set_app_setting.html">set_app_setting</a></li>
<li><a href="function-setControllerData.html">setControllerData</a></li>
<li><a href="function-show_401.html">show_401</a></li>
<li><a href="function-showFatalError.html">showFatalError</a></li>
<li><a href="function-site_url.html">site_url</a></li>
<li><a href="function-special_chars.html">special_chars</a></li>
<li><a href="function-str_lreplace.html">str_lreplace</a></li>
<li><a href="function-stringToBoolean.html">stringToBoolean</a></li>
<li><a href="function-tel.html">tel</a></li>
<li><a href="function-title_case.html">title_case</a></li>
<li><a href="function-toNailsDate.html">toNailsDate</a></li>
<li><a href="function-toNailsDatetime.html">toNailsDatetime</a></li>
<li><a href="function-toUserDate.html">toUserDate</a></li>
<li><a href="function-toUserDatetime.html">toUserDatetime</a></li>
<li><a href="function-unauthorised.html">unauthorised</a></li>
<li><a href="function-underscore_to_camelcase.html">underscore_to_camelcase</a></li>
<li><a href="function-userHasPermission.html">userHasPermission</a></li>
<li><a href="function-valid_email.html">valid_email</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<div id="content" class="class">
<h1>Class Shop_currency_model</h1>
<div class="description">
<p>OVERLOADING NAILS' MODELS</p>
<p>Note the name of this class; done like this to allow apps to extend this class.
Read full explanation at the bottom of this file.</p>
</div>
<dl class="tree well">
<dd style="padding-left:0px">
<a href="class-CI_Model.html"><span>CI_Model</span></a>
</dd>
<dd style="padding-left:30px">
<img src="resources/inherit.png" alt="Extended by">
<a href="class-CORE_NAILS_Model.html"><span>CORE_NAILS_Model</span></a>
uses
<a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html"><span>NAILS_COMMON_TRAIT_ERROR_HANDLING</span></a>,
<a href="class-NAILS_COMMON_TRAIT_CACHING.html"><span>NAILS_COMMON_TRAIT_CACHING</span></a>,
<a href="class-NAILS_COMMON_TRAIT_GETCOUNT_COMMON.html"><span>NAILS_COMMON_TRAIT_GETCOUNT_COMMON</span></a>
</dd>
<dd style="padding-left:60px">
<img src="resources/inherit.png" alt="Extended by">
<a href="class-NAILS_Model.html"><span>NAILS_Model</span></a>
</dd>
<dd style="padding-left:90px">
<img src="resources/inherit.png" alt="Extended by">
<a href="class-NAILS_Shop_currency_model.html"><span>NAILS_Shop_currency_model</span></a>
</dd>
<dd style="padding-left:120px">
<img src="resources/inherit.png" alt="Extended by">
<b><span>Shop_currency_model</span></b>
</dd>
</dl>
<div class="alert alert-info">
<b>Located at</b> <a href="source-class-Shop_currency_model.html#730-732" title="Go to source code">module-shop/shop/models/shop_currency_model.php</a>
<br>
</div>
<h2>Methods summary</h2>
<h3>Methods inherited from <a href="class-NAILS_Shop_currency_model.html#methods">NAILS_Shop_currency_model</a></h3>
<p class="elementList">
<code><a href="class-NAILS_Shop_currency_model.html#___construct">__construct()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_convert">convert()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_convert_base_to_user">convert_base_to_user()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_format">format()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_format_base">format_base()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_format_user">format_user()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_all">get_all()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_all_flat">get_all_flat()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_all_supported">get_all_supported()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_all_supported_flat">get_all_supported_flat()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_by_code">get_by_code()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_get_exchange_rate">get_exchange_rate()</a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#_sync">sync()</a></code>
</p>
<h3>Methods inherited from <a href="class-CORE_NAILS_Model.html#methods">CORE_NAILS_Model</a></h3>
<p class="elementList">
<code><a href="class-CORE_NAILS_Model.html#___destruct">__destruct()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#__format_object">_format_object()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#__generate_slug">_generate_slug()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_count_all">count_all()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_create">create()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_delete">delete()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_destroy">destroy()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_by_id">get_by_id()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_by_id_or_slug">get_by_id_or_slug()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_by_ids">get_by_ids()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_by_slug">get_by_slug()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_by_slugs">get_by_slugs()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_property_table">get_property_table()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_get_property_table_prefix">get_property_table_prefix()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_restore">restore()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_setUserObject">setUserObject()</a></code>,
<code><a href="class-CORE_NAILS_Model.html#_update">update()</a></code>
</p>
<h3>Methods used from <a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#methods">NAILS_COMMON_TRAIT_ERROR_HANDLING</a></h3>
<p class="elementList">
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#__set_error">_set_error()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#_clear_errors">clear_errors()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#_clear_last_error">clear_last_error()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#_get_errors">get_errors()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#_last_error">last_error()</a></code>
</p>
<h3>Methods used from <a href="class-NAILS_COMMON_TRAIT_CACHING.html#methods">NAILS_COMMON_TRAIT_CACHING</a></h3>
<p class="elementList">
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#__cache_prefix">_cache_prefix()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#__get_cache">_get_cache()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#__set_cache">_set_cache()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#__unset_cache">_unset_cache()</a></code>
</p>
<h3>Methods used from <a href="class-NAILS_COMMON_TRAIT_GETCOUNT_COMMON.html#methods">NAILS_COMMON_TRAIT_GETCOUNT_COMMON</a></h3>
<p class="elementList">
<code><a href="class-NAILS_COMMON_TRAIT_GETCOUNT_COMMON.html#__getcount_common">_getcount_common()</a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_GETCOUNT_COMMON.html#__getcount_common_parse_sort">_getcount_common_parse_sort()</a></code>
</p>
<h3>Magic methods summary</h3>
<h2>Properties summary</h2>
<h3>Properties inherited from <a href="class-NAILS_Shop_currency_model.html#properties">NAILS_Shop_currency_model</a></h3>
<p class="elementList">
<code><a href="class-NAILS_Shop_currency_model.html#$_oer_url"><var>$_oer_url</var></a></code>,
<code><a href="class-NAILS_Shop_currency_model.html#$_rates"><var>$_rates</var></a></code>
</p>
<h3>Properties inherited from <a href="class-CORE_NAILS_Model.html#properties">CORE_NAILS_Model</a></h3>
<p class="elementList">
<code><a href="class-CORE_NAILS_Model.html#$_deleted_flag"><var>$_deleted_flag</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_destructive_delete"><var>$_destructive_delete</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_per_page"><var>$_per_page</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table"><var>$_table</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table_auto_set_timestamps"><var>$_table_auto_set_timestamps</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table_id_column"><var>$_table_id_column</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table_label_column"><var>$_table_label_column</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table_prefix"><var>$_table_prefix</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$_table_slug_column"><var>$_table_slug_column</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$data"><var>$data</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$user"><var>$user</var></a></code>,
<code><a href="class-CORE_NAILS_Model.html#$user_model"><var>$user_model</var></a></code>
</p>
<h3>Properties used from <a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#properties">NAILS_COMMON_TRAIT_ERROR_HANDLING</a></h3>
<p class="elementList">
<code><a href="class-NAILS_COMMON_TRAIT_ERROR_HANDLING.html#$_errors"><var>$_errors</var></a></code>
</p>
<h3>Properties used from <a href="class-NAILS_COMMON_TRAIT_CACHING.html#properties">NAILS_COMMON_TRAIT_CACHING</a></h3>
<p class="elementList">
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#$_cache_keys"><var>$_cache_keys</var></a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#$_cache_method"><var>$_cache_method</var></a></code>,
<code><a href="class-NAILS_COMMON_TRAIT_CACHING.html#$_cache_values"><var>$_cache_values</var></a></code>
</p>
</div>
</div>
<div id="footer">
API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html>
| Java |
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
| Java |
#PDF Finish
PDF finishing touches tool to add metadata and table of contents.
Generated PDF files, from various programs, may not have complete metadata
and may not have the desired content in the navigation table of contents
available in online readers.
##Usage
There are two usage modes, show and update.
###Show mode
Show mode displays the metadata, table of contents, and fonts used for a PDF
document. The command is,
java -jar pdf-finish -s -i example.pdf
###Update mode
Update mode uses a configuration file to generate a new PDF file. An example
command is,
java -jar pdf-finish -i input.pdf -o output.pdf -c config.json
The input PDF will not be changed.
The output PDF will contain the changes based on the configuration options. If
a file with the same name already exists, it will be overwritten.
The configuration file is a JSON file, containing the following fields that
are used to add/update the metadata.
- title: document title, and table of contents header on most viewers
- author: document author
- subject: document subject, useful for search
- keywords: comma separated list of keywords, useful for search
The next section of the configuration file is the "toc" section, which
contains an array of font objects. These are used to find the elements to
place in the table of contents. This is independent of any table of contents
that may exist within the PDF document. Each font object contains,
- font: font name
- size: font size (floating point accepted)
- level: TOC hierarchy level to assign the element to
The font names and sizes can be determined by using the show mode, which
shows all font name/size combinations used in the PDF document.
###Example Configuration File
The following is an example, showing the metadata updates and a three level
table of contents.
{
"title":"Mousetrap Building",
"author":"Jane Doe",
"subject":"Building a better mousetrap",
"keywords":"mousetrap, mouse, cheese",
"toc":[
{ "font":"Optima-Bold", "size":24.0, "level":1 },
{ "font":"Optima-Bold", "size":16.0, "level":2 },
{ "font":"Optima-Bold", "size":14.0, "level":3 }
]
}
##License
MIT
| Java |
<?php
use Guzzle\Plugin\Mock\MockPlugin;
use OpenTok\Archive;
use OpenTok\Util\Client;
class ArchiveTest extends PHPUnit_Framework_TestCase {
// Fixtures
protected $archiveData;
protected $API_KEY;
protected $API_SECRET;
protected $archive;
protected $client;
protected static $mockBasePath;
public static function setUpBeforeClass()
{
self::$mockBasePath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'mock' . DIRECTORY_SEPARATOR;
}
public function setUp()
{
// Set up fixtures
$this->archiveData = array(
'createdAt' => 1394394801000,
'duration' => 0,
'id' => '063e72a4-64b4-43c8-9da5-eca071daab89',
'name' => 'showtime',
'partnerId' => 854511,
'reason' => '',
'sessionId' => '2_MX44NTQ1MTF-flR1ZSBOb3YgMTIgMDk6NDA6NTkgUFNUIDIwMTN-MC43NjU0Nzh-',
'size' => 0,
'status' => 'started',
'url' => null,
'hasVideo' => false,
'hasAudio' => true,
'outputMode' => 'composed'
);
$this->API_KEY = defined('API_KEY') ? API_KEY : '12345678';
$this->API_SECRET = defined('API_SECRET') ? API_SECRET : '0123456789abcdef0123456789abcdef0123456789';
$this->client = new Client();
$this->archive = new Archive($this->archiveData, array(
'apiKey' => $this->API_KEY,
'apiSecret' => $this->API_SECRET,
'client' => $this->client
));
}
public function testInitializes()
{
// Arrange
// Act
// Assert
$this->assertInstanceOf('OpenTok\Archive', $this->archive);
}
public function testReadsProperties()
{
$this->assertEquals($this->archiveData['createdAt'], $this->archive->createdAt);
$this->assertEquals($this->archiveData['duration'], $this->archive->duration);
$this->assertEquals($this->archiveData['id'], $this->archive->id);
$this->assertEquals($this->archiveData['name'], $this->archive->name);
$this->assertEquals($this->archiveData['partnerId'], $this->archive->partnerId);
$this->assertEquals($this->archiveData['reason'], $this->archive->reason);
$this->assertEquals($this->archiveData['sessionId'], $this->archive->sessionId);
$this->assertEquals($this->archiveData['size'], $this->archive->size);
$this->assertEquals($this->archiveData['status'], $this->archive->status);
$this->assertEquals($this->archiveData['url'], $this->archive->url);
$this->assertEquals($this->archiveData['hasVideo'], $this->archive->hasVideo);
$this->assertEquals($this->archiveData['hasAudio'], $this->archive->hasAudio);
$this->assertEquals($this->archiveData['outputMode'], $this->archive->outputMode);
}
public function testStopsArchive()
{
// Arrange
$mock = new MockPlugin();
$response = MockPlugin::getMockFile(
self::$mockBasePath . 'v2/partner/APIKEY/archive/ARCHIVEID/stop'
);
$mock->addResponse($response);
$this->client->addSubscriber($mock);
// Act
$this->archive->stop();
// Assert
$requests = $mock->getReceivedRequests();
$this->assertCount(1, $requests);
$request = $requests[0];
$this->assertEquals('POST', strtoupper($request->getMethod()));
$this->assertEquals('/v2/partner/'.$this->API_KEY.'/archive/'.$this->archiveData['id'].'/stop', $request->getPath());
$this->assertEquals('api.opentok.com', $request->getHost());
$this->assertEquals('https', $request->getScheme());
$contentType = $request->getHeader('Content-Type');
$this->assertNotEmpty($contentType);
$this->assertEquals('application/json', $contentType);
$authString = $request->getHeader('X-TB-PARTNER-AUTH');
$this->assertNotEmpty($authString);
$this->assertEquals($this->API_KEY.':'.$this->API_SECRET, $authString);
// TODO: test the dynamically built User Agent string
$userAgent = $request->getHeader('User-Agent');
$this->assertNotEmpty($userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/2.3.2', $userAgent->__toString());
// TODO: test the properties of the actual archive object
$this->assertEquals('stopped', $this->archive->status);
}
public function testDeletesArchive()
{
// Arrange
$mock = new MockPlugin();
$response = MockPlugin::getMockFile(
self::$mockBasePath . 'v2/partner/APIKEY/archive/ARCHIVEID/delete'
);
$mock->addResponse($response);
$this->client->addSubscriber($mock);
// Act
// TODO: should this test be run on an archive object whose fixture has status 'available'
// instead of 'started'?
$success = $this->archive->delete();
// Assert
$requests = $mock->getReceivedRequests();
$this->assertCount(1, $requests);
$request = $requests[0];
$this->assertEquals('DELETE', strtoupper($request->getMethod()));
$this->assertEquals('/v2/partner/'.$this->API_KEY.'/archive/'.$this->archiveData['id'], $request->getPath());
$this->assertEquals('api.opentok.com', $request->getHost());
$this->assertEquals('https', $request->getScheme());
$contentType = $request->getHeader('Content-Type');
$this->assertNotEmpty($contentType);
$this->assertEquals('application/json', $contentType);
$authString = $request->getHeader('X-TB-PARTNER-AUTH');
$this->assertNotEmpty($authString);
$this->assertEquals($this->API_KEY.':'.$this->API_SECRET, $authString);
// TODO: test the dynamically built User Agent string
$userAgent = $request->getHeader('User-Agent');
$this->assertNotEmpty($userAgent);
$this->assertStringStartsWith('OpenTok-PHP-SDK/2.3.2', $userAgent->__toString());
$this->assertTrue($success);
// TODO: assert that all properties of the archive object were cleared
}
public function testAllowsUnknownProperties()
{
// Set up fixtures
$archiveData = array(
'createdAt' => 1394394801000,
'duration' => 0,
'id' => '063e72a4-64b4-43c8-9da5-eca071daab89',
'name' => 'showtime',
'partnerId' => 854511,
'reason' => '',
'sessionId' => '2_MX44NTQ1MTF-flR1ZSBOb3YgMTIgMDk6NDA6NTkgUFNUIDIwMTN-MC43NjU0Nzh-',
'size' => 0,
'status' => 'started',
'url' => null,
'notarealproperty' => 'not a real value'
);
$apiKey = defined('API_KEY') ? API_KEY : '12345678';
$apiSecret = defined('API_SECRET') ? API_SECRET : '0123456789abcdef0123456789abcdef0123456789';
$client = new Client();
$archive = new Archive($archiveData, array(
'apiKey' => $this->API_KEY,
'apiSecret' => $this->API_SECRET,
'client' => $this->client
));
$this->assertInstanceOf('OpenTok\Archive', $archive);
}
/**
* @expectedException InvalidArgumentException
*/
public function testRejectsBadArchiveData() {
// Set up fixtures
$badArchiveData = array(
'createdAt' => 'imnotanumber',
'duration' => 0,
'id' => '063e72a4-64b4-43c8-9da5-eca071daab89',
'name' => 'showtime',
'partnerId' => 854511,
'reason' => '',
'sessionId' => '2_MX44NTQ1MTF-flR1ZSBOb3YgMTIgMDk6NDA6NTkgUFNUIDIwMTN-MC43NjU0Nzh-',
'size' => 0,
'status' => 'started',
'url' => null
);
$apiKey = defined('API_KEY') ? API_KEY : '12345678';
$apiSecret = defined('API_SECRET') ? API_SECRET : '0123456789abcdef0123456789abcdef0123456789';
$client = new Client();
$archive = new Archive($badArchiveData, array(
'apiKey' => $this->API_KEY,
'apiSecret' => $this->API_SECRET,
'client' => $this->client
));
}
public function testAllowsPausedStatus() {
// Set up fixtures
$archiveData = array(
'createdAt' => 1394394801000,
'duration' => 0,
'id' => '063e72a4-64b4-43c8-9da5-eca071daab89',
'name' => 'showtime',
'partnerId' => 854511,
'reason' => '',
'sessionId' => '2_MX44NTQ1MTF-flR1ZSBOb3YgMTIgMDk6NDA6NTkgUFNUIDIwMTN-MC43NjU0Nzh-',
'size' => 0,
'status' => 'paused',
'url' => null,
);
$apiKey = defined('API_KEY') ? API_KEY : '12345678';
$apiSecret = defined('API_SECRET') ? API_SECRET : '0123456789abcdef0123456789abcdef0123456789';
$client = new Client();
$archive = new Archive($archiveData, array(
'apiKey' => $this->API_KEY,
'apiSecret' => $this->API_SECRET,
'client' => $this->client
));
$this->assertInstanceOf('OpenTok\Archive', $archive);
$this->assertEquals($archiveData['status'], $archive->status);
}
public function testSerializesToJson() {
// Arrange
// Act
$archiveJson = $this->archive->toJson();
// Assert
$this->assertInternalType('string', $archiveJson);
$this->assertNotNull(json_encode($archiveJson));
}
public function testSerializedToArray()
{
// Arrange
// Act
$archiveArray = $this->archive->toArray();
// Assert
$this->assertInternalType('array', $archiveArray);
$this->assertEquals($this->archiveData, $archiveArray);
}
// TODO: test deleted archive can not be stopped or deleted again
}
/* vim: set ts=4 sw=4 tw=100 sts=4 et :*/
| Java |
package ca.uwo.eng.sel.cepsim.placement
import java.util.{List => JavaList, Set => JavaSet}
import ca.uwo.eng.sel.cepsim.query._
import scala.collection.JavaConversions._
import scala.collection.mutable
/** Companion Placement object */
object Placement {
// ----------------------- for java usage
def apply(vertices: JavaSet[Vertex], vmId: Int): Placement = new Placement(asScalaSet(vertices).toSet, vmId)
def withQueries(queries: JavaSet[Query], vmId: Int, iterationList:JavaList[Vertex]): Placement =
Placement.withQueries(asScalaSet(queries).toSet, vmId, iterableAsScalaIterable(iterationList))
def withQueries(queries: JavaSet[Query], vmId: Int): Placement =
Placement.withQueries(asScalaSet(queries).toSet, vmId)
// ----------------------------------------------------------------------------------------
def withQueries(queries: Set[Query], vmId: Int, iterationOrder: Iterable[Vertex] = List.empty): Placement =
new Placement(queries.flatMap(_.vertices), vmId, iterationOrder)
def apply(q: Query, vmId: Int): Placement = new Placement(q.vertices, vmId)
def apply(vertices: Set[Vertex], vmId: Int, iterationOrder: Iterable[Vertex] = List.empty): Placement =
new Placement(vertices, vmId, iterationOrder)
}
/** *
* Represents a placement of query vertices into a virtual machine.
* @param vertices Set of vertices from this placement.
* @param vmId Id of the Virtual machine to which the vertices are assigned.
* @param itOrder Order on which vertices should be traversed. If not specified, vertices
* are traversed according to a topological sorting of the query graphs.
*/
class Placement(val vertices: Set[Vertex], val vmId: Int, itOrder: Iterable[Vertex] = List.empty)
extends Iterable[Vertex] {
/** Map of queries to all vertices in this placement */
var queryVerticesMap: Map[Query, Set[Vertex]] = Map.empty withDefaultValue Set.empty
vertices foreach {(v) =>
v.queries foreach {(q) =>
queryVerticesMap = queryVerticesMap updated (q, queryVerticesMap(q) + v)
}
}
val inPlacementSuccessors = vertices.map((v) => { (v,
v.successors.filter((succ) => vertices.contains(succ)))
}).toMap
val notInPlacementSuccessors = vertices.map((v) => { (v,
v.successors.filter((succ) => !vertices.contains(succ)))
}).toMap
/**
* Get all queries that have at least one vertex in this placement.
* @return queries that have at least one vertex in this placement.
*/
val queries: Set[Query] = queryVerticesMap.keySet
/**
* Get all event producers in this placement.
* @return all event producers in this placement.
*/
val producers: Set[EventProducer] = vertices collect { case ep: EventProducer => ep }
/**
* Get all event consumers in this placement.
* @return all event consumers in this placement.
*/
val consumers: Set[EventConsumer] = vertices collect { case ec: EventConsumer => ec }
/**
* Get the execution duration of this placement (in seconds). It is calculated
* as the maximum duration of all queries that belong to this placement.
* @return Execution duration of this placement
*/
val duration: Long = queries.foldLeft(0L){(max, query) =>
(query.duration.max(max))
}
/**
* Add a new vertex to the placement.
* @param v Vertex to be added.
* @return New placement with the vertex added.
*/
def addVertex(v: Vertex): Placement = new Placement(vertices + v, vmId)
/**
* Return successors of a vertex that are in this placement.
* @param v Vertex from which the successors are returned.
* @return successors of a vertex in this placement.
*/
def successorsInPlacement(v: Vertex): Set[InputVertex] = inPlacementSuccessors(v)
/**
* Return successors of a vertex that are not in this placement.
* @param v Vertex from which the successors are returned.
* @return successors of a vertex not in this placement.
*/
def successorsNotInPlacement(v: Vertex): Set[InputVertex] = notInPlacementSuccessors(v)
/**
* Get the query with the informed id.
* @param id Id of the query.
* @return Optional of a query with the informed id.
*/
def query(id: String): Option[Query] = queries.find(_.id == id)
/**
* Get all vertices in this placement from a specific query.
* @param q query to which the vertices belong.
* @return all vertices in this placement from a specific query.
*/
def vertices(q: Query): Set[Vertex] = queryVerticesMap(q)
/**
* Find all vertices from the placement that are producers, or do not have predecessors
* that are in this same placement.
* @return All start vertices.
*/
def findStartVertices(): Set[Vertex] = {
vertices.filter{(v) =>
val predecessors = v.predecessors.asInstanceOf[Set[Vertex]]
predecessors.isEmpty || predecessors.intersect(vertices).isEmpty
}
}
private def buildOrder: Iterable[Vertex] = {
var index = 0
var iterationOrder = Vector.empty[Vertex]
if (!vertices.isEmpty) {
var toProcess: Vector[Vertex] = Vector(findStartVertices().toSeq.sorted(Vertex.VertexIdOrdering):_*)
var neighbours: mutable.Set[Vertex] = mutable.LinkedHashSet[Vertex]()
while (index < toProcess.length) {
val v = toProcess(index)
iterationOrder = iterationOrder :+ v
// processing neighbours (vertices that are still not in the list, but belong to this placement)
v.successors.foreach { (successor) =>
if ((!toProcess.contains(successor)) && (vertices.contains(successor))) neighbours.add(successor)
}
val toBeMoved = neighbours.filter((neighbour) => neighbour.predecessors.forall(toProcess.contains(_)))
neighbours = neighbours -- toBeMoved
toProcess = toProcess ++ toBeMoved
index += 1
}
}
iterationOrder
}
val iterationOrder = if (!itOrder.isEmpty) itOrder else buildOrder
/**
* An iterator for this placement that traverse the vertices from the producers to consumers
* in breadth-first manner.
* @return Iterator that traverses all vertices from this placement.
*/
override def iterator: Iterator[Vertex] = {
class VertexIterator extends Iterator[Vertex] {
val it = iterationOrder.iterator
def hasNext(): Boolean = it.hasNext
def next(): Vertex = it.next
}
new VertexIterator
}
} | Java |
"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);
};
},
};
| Java |
var express = require('express');
var bodyParser = require('body-parser');
var path = require('path');
var url = require('url');
var log4js = require('log4js');
var stashBoxConfig = require('./lib/config');
var pkg = require('./package.json');
var proxy = require('express-http-proxy');
var fileDriver = require('./drivers/file-driver');
var envDriver = require('./drivers/env-driver');
var mantaDriver = require('./drivers/manta-driver');
var s3compatibleDriver = require('./drivers/s3compatible-driver');
var pgkcloudDriver = require('./drivers/pkgcloud-driver');
// Process command line params
//
var commander = require('commander');
commander.version(pkg.version);
commander.option('-p, --port <n>', 'The port on which the StashBox server will listen', parseInt);
commander.option('-c, --config <value>', 'Use the specified configuration file');
commander.parse(process.argv);
var overrides = {};
if (commander.port)
{
overrides.PORT = commander.port;
}
var config = stashBoxConfig.getConfig(commander.config, overrides);
log4js.configure(config.get('LOG4JS_CONFIG'));
var logger = log4js.getLogger("app");
logger.info("StashBox server v%s loading - %s", pkg.version, config.configDetails);
var app = express();
app.use(bodyParser.raw(
{
type: function(type) {
// This is required (setting */* doesn't work when sending client doesn't specify c/t)
return true;
},
verify: function(req, res, buf, encoding) {
// This is a way to get a shot at the raw body (some people store it in req.rawBody for later use)
}
}));
function handleError(req, res)
{
logger.error("%s error in request for: %s, details: %s", req.method, req.url, JSON.stringify(err));
res.sendStatus(500);
}
function handleUnsupported(driver, req, res)
{
if (driver)
{
logger.error("Unsupported method, '%s' driver doesn't support method: %s", driver.provider, req.method);
}
else
{
logger.error("Unsupported method:", req.method);
}
res.sendStatus(403); // Method Not Allowed
}
function getDriverMiddleware(driver)
{
return function(req, res)
{
logger.info("Processing %s of %s using '%s' driver", req.method, req.originalUrl, driver.provider);
if (req.method === "GET") // All drivers support GET
{
driver.getObject(req.url, function(err, contents)
{
if (err)
{
handleError(req, res);
}
else if (contents === null)
{
// null response from driver means not found...
//
res.status(404).send('Not found');
}
else
{
res.send(contents);
}
});
}
else if (req.method === "HEAD")
{
if (driver.doesObjectExist)
{
driver.doesObjectExist(req.url, function(err, exists)
{
if (err)
{
handleError(req, res);
}
else
{
res.sendStatus(exists ? 200 : 404);
}
});
}
else
{
handleUnsupported(driver, req, res);
}
}
else if (req.method === "PUT")
{
if (driver.putObject)
{
driver.putObject(req.url, req.body, function(err)
{
if (err)
{
handleError(req, res);
}
else
{
res.sendStatus(200);
}
});
}
else
{
handleUnsupported(driver, req, res);
}
}
else if (req.method === "DELETE")
{
if (driver.deleteObject)
{
driver.deleteObject(req.url, function(err)
{
if (err)
{
handleError(req, res);
}
else
{
res.sendStatus(200);
}
});
}
else
{
handleUnsupported(driver, req, res);
}
}
else
{
handleUnsupported(null, req, res);
}
}
}
function addMountPoint(mount)
{
logger.debug("Mount point: %s, mount: %s", mount.mount, JSON.stringify(mount));
if (mount.provider === "proxy")
{
logger.info("Adding proxy mount for:", mount.mount);
app.use(mount.mount, proxy(mount.host,
{
forwardPath: function(req, res)
{
var path = url.parse(req.url).path;
logger.info("Processing proxy request for:", path);
return mount.basePath + path;
}
}));
}
else
{
var driver;
if (mount.provider === "file")
{
logger.info("Adding file mount for:", mount.mount);
driver = new fileDriver(mount);
}
else if (mount.provider === "env")
{
logger.info("Adding env mount for:", mount.mount);
driver = new envDriver(mount);
}
else if (mount.provider === "manta")
{
logger.info("Adding manta mount for:", mount.mount);
driver = new mantaDriver(mount);
}
else if (mount.provider === "s3compatible")
{
logger.info("Adding S3 Compatible mount for:", mount.mount);
driver = new s3compatibleDriver(mount);
}
else
{
logger.info("Adding pkgcloud mount for:", mount.mount);
driver = new pgkcloudDriver(mount);
}
app.use(mount.mount, getDriverMiddleware(driver));
}
}
// We are going to apply the mounts in the order they are defined - the first qualifying mount point will be
// applied, so more specific mount points should be defined before less specific ones.
//
// The default behavior is a file mount point on "/" pointing to "stash".
//
var mounts = config.get('mounts');
for (var i = 0; i < mounts.length; i++)
{
if (mounts[i])
{
addMountPoint(mounts[i]);
}
}
// This is our catch-all to handle requests that didn't match any mount point. We do this so we can control
// the 404 response (and maybe log if desired).
//
app.all('*', function(req, res)
{
res.status(404).send('Not found');
});
app.listen(config.get('PORT'), function ()
{
logger.info('StashBox listening on port:', this.address().port);
});
process.on('SIGTERM', function ()
{
logger.info('SIGTERM - preparing to exit.');
process.exit();
});
process.on('SIGINT', function ()
{
logger.info('SIGINT - preparing to exit.');
process.exit();
});
process.on('exit', function (code)
{
logger.info('Process exiting with code:', code);
});
| Java |
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
| Java |
#!/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')
| Java |
//
// NSDate+WT.h
// lchSDK
//
// Created by lch on 16/1/12.
// Copyright © 2015年 lch. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (WT)
- (BOOL)isThisYear; /** 判断某个时间是否为今年 */
- (BOOL)isYesterday; /** 判断某个时间是否为昨天 */
- (BOOL)isToday; /** 判断某个时间是否为今天 */
/** 字符串时间戳。 */
@property (nonatomic, copy, readonly) NSString *timeStamp;
/**
* 长型时间戳
*/
//@property (nonatomic, assign, readonly) long timeStamp;
/**
* 时间成分
*/
@property (nonatomic, strong, readonly) NSDateComponents *components;
/**
* 两个时间比较
*
* @param unit 成分单元
* @param fromDate 起点时间
* @param toDate 终点时间
*
* @return 时间成分对象
*/
+ (NSDateComponents *)dateComponents:(NSCalendarUnit)unit fromDate:(NSDate *)fromDate toDate:(NSDate *)toDate;
/**
*@Description:根据年份、月份、日期、小时数、分钟数、秒数返回NSDate
*@Params:
* year:年份
* month:月份
* day:日期
* hour:小时数
* minute:分钟数
* second:秒数
*@Return:
*/
+ (NSDate *)dateWithYear:(NSUInteger)year
Month:(NSUInteger)month
Day:(NSUInteger)day
Hour:(NSUInteger)hour
Minute:(NSUInteger)minute
Second:(NSUInteger)second;
/**
*@Description:实现dateFormatter单例方法
*@Params:nil
*Return:相应格式的NSDataFormatter对象
*/
+ (NSDateFormatter *)defaultDateFormatterWithFormatYYYYMMddHHmmss;
+ (NSDateFormatter *)defaultDateFormatterWithFormatYYYYMMdd;
+ (NSDateFormatter *)defaultDateFormatterWithFormatMMddHHmm;
+ (NSDateFormatter *)defaultDateFormatterWithFormatYYYYMMddHHmmInChinese;
+ (NSDateFormatter *)defaultDateFormatterWithFormatMMddHHmmInChinese;
/**
*@Description:获取当天的包括“年”,“月”,“日”,“周”,“时”,“分”,“秒”的NSDateComponents
*@Params:nil
*@Return:当天的包括“年”,“月”,“日”,“周”,“时”,“分”,“秒”的NSDateComponents
*/
- (NSDateComponents *)componentsOfDay;
/**
*@Description:获得NSDate对应的年份
*@Params:nil
*@Return:NSDate对应的年份
**/
- (NSUInteger)year;
/**
*@Description:获得NSDate对应的月份
*@Params:nil
*@Return:NSDate对应的月份
*/
- (NSUInteger)month;
/**
*@Description:获得NSDate对应的日期
*@Params:nil
*@Return:NSDate对应的日期
*/
- (NSUInteger)day;
/**
*@Description:获得NSDate对应的小时数
*@Params:nil
*@Return:NSDate对应的小时数
*/
- (NSUInteger)hour;
/**
*@Description:获得NSDate对应的分钟数
*@Params:nil
*@Return:NSDate对应的分钟数
*/
- (NSUInteger)minute;
/**
*@Description:获得NSDate对应的秒数
*@Params:nil
*@Return:NSDate对应的秒数
*/
- (NSUInteger)second;
/**
*@Description:获得NSDate对应的星期
*@Params:nil
*@Return:NSDate对应的星期
*/
- (NSUInteger)weekday;
/**
*@Description:获取当天是当年的第几周
*@Params:nil
*@Return:当天是当年的第几周
*/
- (NSUInteger)weekOfDayInYear;
/**
*@Description:获得一般当天的工作开始时间
*@Params:nil
*@Return:一般当天的工作开始时间
*/
- (NSDate *)workBeginTime;
/**
*@Description:获得一般当天的工作结束时间
*@Params:nil
*@Return:一般当天的工作结束时间
*/
- (NSDate *)workEndTime;
/**
*@Description:获取一小时后的时间
*@Params:nil
*@Return:一小时后的时间
**/
- (NSDate *)oneHourLater;
/**
*@Description:获得某一天的这个时刻
*@Params:nil
*@Return:某一天的这个时刻
*/
- (NSDate *)sameTimeOfDate;
/**
*@Description:判断与某一天是否为同一天
*@Params:
* otherDate:某一天
*@Return:YES-同一天;NO-不同一天
*/
- (BOOL)sameDayWithDate:(NSDate *)otherDate;
/**
*@Description:判断与某一天是否为同一周
*@Params:
* otherDate:某一天
*@Return:YES-同一周;NO-不同一周
*/
- (BOOL)sameWeekWithDate:(NSDate *)otherDate;
/**
*@Description:判断与某一天是否为同一月
*@Params:
* otherDate:某一天
*@Return:YES-同一月;NO-不同一月
*/
- (BOOL)sameMonthWithDate:(NSDate *)otherDate;
- (NSString *)whatTimeAgo; /** 多久以前呢 ? 1分钟内 X分钟前 X天前 */
- (NSString *)whatTimeBefore; /** 前段某时间日期的描述 上午?? 星期二 下午?? */
- (NSString *)whatDayTheWeek; /** 今天星期几来着?*/
/** YYYY-MM-dd HH:mm:ss */
- (NSString *)WT_YYYYMMddHHmmss;
/** YYYY.MM.dd */
- (NSString *)WT_YYYYMMdd;
/** YYYY-MM-dd */
- (NSString *)WT_YYYYMMdd__;
/** HH:mm */
- (NSString *)WT_HHmm;
- (NSString *)MMddHHmm;
- (NSString *)YYYYMMddHHmmInChinese;
- (NSString *)MMddHHmmInChinese;
@end
| Java |
/**
*
*/
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();
}
}
| Java |
<!DOCTYPE html>
<html lang="en-us" ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Scope and Interpolation</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- load bootstrap and fontawesome via CDN -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="app.js"></script>
</head>
<body>
<header>
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="/">AngularJS</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="/"><i class="fa fa-home"></i> Home</a></li>
</ul>
</div>
</nav>
</header>
<div class="container">
<div ng-controller="mainController">
<h1>AngularJS</h1>
<h3>Hello {{ name }}</h3>
</div>
<div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" ></script>
</body>
</html>
| Java |
// 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("", 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();
});
});
});
}); | Java |
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);
| Java |
.page-content .navbar-fixed-bottom,.page-content .navbar-fixed-top{position:relative}.page-content .card-block{padding-left:0;padding-right:0}.page-content .card-block .card-link+.card-link{margin-left:0}.scrollspy-example{position:relative;height:200px;padding:0 20px;overflow:auto;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.08);box-shadow:0 2px 4px rgba(0,0,0,.08)}.example-fixed{height:400px;line-height:400px;text-align:center}.example-grid .example-col{margin-bottom:10px;word-break:break-all} | Java |
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))
}
};
| Java |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_20) on Mon Nov 01 20:33:53 CET 2010 -->
<TITLE>
Uses of Class play.libs.WS (Play! API)
</TITLE>
<META NAME="date" CONTENT="2010-11-01">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class play.libs.WS (Play! API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../play/libs/WS.html" title="class in play.libs"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?play/libs//class-useWS.html" target="_top"><B>FRAMES</B></A>
<A HREF="WS.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>play.libs.WS</B></H2>
</CENTER>
No usage of play.libs.WS
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../play/libs/WS.html" title="class in play.libs"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?play/libs//class-useWS.html" target="_top"><B>FRAMES</B></A>
<A HREF="WS.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<a href="http://guillaume.bort.fr">Guillaume Bort</a> & <a href="http://www.zenexity.fr">zenexity</a> - Distributed under <a href="http://www.apache.org/licenses/LICENSE-2.0.html">Apache 2 licence</a>, without any warrantly
</BODY>
</HTML>
| Java |
import React from 'react';
import { createStore } from 'redux';
import { createBrowserHistory } from 'history';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import rootReducer from '../../src/reducers';
import Routes from '../../src/Routes';
import App from '../../src/containers/App';
const configureStore = initialState => createStore(
rootReducer,
initialState,
);
describe('Container | App', () => {
it('renders Routes component', () => {
const wrapper = shallow(<App history={createBrowserHistory()} store={configureStore()}/>);
expect(wrapper.find(Routes)).to.have.lengthOf(1);
});
});
| Java |
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
int main(){
int pid1,pid2,pid3,pid4;
int p1[2],p2[2];
char bufr[30],rev[30];
int countL=0,countU=0,i=-1,j=0,countV=0,len;
pipe(p1);
pipe(p2);
if(pid1=fork()==0){
if(pid2=fork()==0){
read(p2[0],bufr,sizeof(bufr));
len=strlen(bufr);
for(i=len-1,j=0;j<len;i--,j++)
rev[j]=bufr[i];
rev[j]='\0';
printf("Proccess D---- Reverse = %s \n",rev);
exit(1);
}
else{
read(p1[0],bufr,sizeof(bufr));
write(p2[1],bufr,sizeof(bufr));
if(pid3=fork()==0){
printf("Poccess C--- ID of B = %d and ID of C = %d \n",getppid(),getpid());
exit(1);
}
else{
while(bufr[++i]!='\0')
if(bufr[i]>='A' && bufr[i]<='Z')
countU++;
i=-1;
while(bufr[++i]!='\0')
if(bufr[i]>='a' && bufr[i]<='z')
countL++;
printf("Poccess B--- No of UpperCase letters = %d \n",countU);
printf("Poccess B--- No of LowerCase letters = %d \n",countL);
waitpid(pid2,NULL,0);
waitpid(pid3,NULL,0);
}
}
exit(1);
}
else{
printf("Poccess A--- Enter a sentence ");
gets(bufr);
write(p1[1],bufr,sizeof(bufr));
while(bufr[++i]!='\0')
if(bufr[i]=='a' || bufr[i]=='e' || bufr[i]=='i' || bufr[i]=='o' || bufr[i]=='u' ||
bufr[i]=='A' || bufr[i]=='E' || bufr[i]=='I' || bufr[i]=='O' || bufr[i]=='U' )
countV++;
printf("Poccess A--- No of Vowels = %d \n",countV);
waitpid(pid1,NULL,0);
}
close(p1[0]);
close(p1[1]);
return 0;
}
| Java |
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'
| Java |
<link data-turbolinks-track="true" href="http://zebra.easybird.cn//assets/application-9f674e9fd925ff3aca42c05a9a21bdaad56211d8ce90de12ecd1924966593d71.css" media="all" rel="stylesheet">
<script data-turbolinks-track="true" src="http://zebra.easybird.cn//assets/assets/application-ae2722ac77e8668d4e05ad6a5bdd5abd8220833c7bb38200313301a36ec98e35.js"></script>
<meta content="authenticity_token" name="csrf-param">
<meta content="mk1Ai+vY08JqtoxuMElcDjZKO5sRDbvm0H/ZVbwHjvZcB9/S3C2YJYVAByaoQx/mJo/dt5aN81+OB+hS/CIJKw==" name="csrf-token">
<div class="row-fluid">
<div class="col-sm-12 well" style="margin-bottom: 0px; border-bottom-width: 0px;">
<form class="form-horizontal">
<div class="col-sm-3">
<div class="form-group">
<label class="col-sm-5 control-label">商家</label>
<div class="col-sm-7">
<select class="form-control">
<option>商家1</option>
<option>商家2</option>
</select>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<label class="col-sm-5 control-label">二维码</label>
<div class="col-sm-7">
<input type="text" class="form-control">
</div>
</div>
</div>
<div class="col-sm-2">
<div class="col-sm-1 col-sm-offset-1" style="margin-right: 0;">
<button type="submit" class="btn btn-info">查询</button>
</div>
<div class="col-sm-1 col-sm-offset-3">
<button type="submit" class="btn btn-warning">重置</button>
</div>
</div>
</form>
</div>
<div class="col-sm-12" style="padding-left: 0px; padding-right: 0px;">
<table class="table table-bordered table-hover" style="border-top-width: 0px;">
<thead>
<tr>
<th>#</th>
<th>商家</th>
<th>二维码</th>
<th>产品名称</th>
<th>产品编号</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>商家1</td>
<td>11111111</td>
<td>产品名称1</td>
<td>pt111111</td>
</tr>
<tr>
<td>2</td>
<td>商家2</td>
<td>22222222</td>
<td>产品名称2</td>
<td>pt222222</td>
</tr>
</tbody>
</table>
</div>
</div>
| Java |
package info.yongli.statistic.table;
/**
* Created by yangyongli on 25/04/2017.
*/
public class ColumnTransformer {
}
| Java |
#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; } }
}
}
| Java |
# ProductAccess_server
start ```npm run start```
| Java |
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);
| Java |
/*
Title: Behavioral Finance and Market Behavior
layout: chapter
*/
## Chapter Learning Objectives
### Section 1 - Investor Behavior
- Identify and describe the biases that can affect investor decision making.
- Explain how framing errors can influence investor decision making.
- Identify the factors that can influence investor profiles.
### Section 2 - Market Behavior
- Define the role of arbitrage in market efficiency.
- Describe the limits of arbitrage that may perpetuate market inefficiency.
- Identify the economic and cultural factors that can allow market inefficiencies to persist.
- Explain the role of feedback as reinforcement of market inefficiencies.
### Section 3 - Extreme Market Behavior
- Trace the typical pattern of a financial crisis.
- Identify and define the factors that contribute to a financial crisis.
### Section 4 - Behavioral Finance and Investment Strategies
- Identify the factors that make successful market timing difficult.
- Explain how technical analysis is used as an investment strategy.
- Identify the factors that encourage investor fraud in an asset bubble.
| Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.