language stringclasses 15
values | src_encoding stringclasses 34
values | length_bytes int64 6 7.85M | score float64 1.5 5.69 | int_score int64 2 5 | detected_licenses listlengths 0 160 | license_type stringclasses 2
values | text stringlengths 9 7.85M |
|---|---|---|---|---|---|---|---|
Markdown | UTF-8 | 1,875 | 3.34375 | 3 | [
"MIT"
] | permissive | ---
layout: project
type: project
image: images/starwars.png
title: Star Wars Dodgeball
permalink: projects/starwarsdodgeball
# All dates must be YYYY-MM-DD format!
date: 2018-09-13
labels:
- Java
- EZ
- Graphics
- Game Design
summary: A space-themed computer game I designed for ICS 111.
---
<div class="ui large rounded images">
<img class="ui image" src="../images/starwars1.png">
<img class="ui image" src="../images/starwars2.png">
</div>
Star Wars Dodgeball is a computer-based, space themed game designed as one of my projects for ICS 111. It places players at the controls of an X-Wing fighter, and presents them with a challenge: dodge the incoming missiles of the Empire! Fireballs, lasers, tie-fighters, asteroids and even a death star will attack the X-Wing, and the player must do their best to avoid them. If the X-Wing is impacted three times, the game will end with an ominous message from Darth Vader himself. Players must be extra careful, as the speed of the missiles will increase the longer they manage to stay alive!
The game uses basic elements of EZ Java to create a simple, yet fun-to-play 2-dimensional game. Players control their X-Wing using the arrow keys, and must stay clear of missiles for as long as possible. The graphics are simplistic, but leverage the abilities of third party artists by utilizing previously created clip art of vehicles, backgrounds, etc. The game also includes a decent soundtrack, providing background music, collision effects, collision warnings, game over tone, as well as the ominous message of Darth Vader himself. While simple, the game has the ability to be expanded, and the code provides a baseline for any similar dodgeball game.
Watch the full gameplay on [YouTube](https://www.youtube.com/watch?v=PifG8UwMESg)
View the repository on [GitHub](https://github.com/calebjc3/Star-Wars-Dodgeball)
|
Markdown | UTF-8 | 623 | 3.609375 | 4 | [
"MIT"
] | permissive | # [itp-w1] Basic Calculator
Our second group project will be to create a program that acts as a basic four function calculator.
If the operation is not `add`, `subtract`, `multiply`, or `divide`, it needs to return 'Invalid operation'
All students will fork this repo and set up their cloud9 for this project individually with guidance from the mentor.
We will want the following interface:
```python
>>> basic_calculator(1, 7, 'add')
8
>>> basic_calculator(5, 2, 'subtract')
3
>>> basic_calculator(3, 4, 'multiply')
12
>>> basic_calculator(12, 3, 'divide')
4
>>> basic_calculator(3, 4, 'what')
'Invalid operation'
```
|
Shell | UTF-8 | 468 | 2.78125 | 3 | [] | no_license | #!/bin/bash
# create/run the container, or if it already exists, restart the existing one
# use 'docker container rm ottwatch-dev' to reset from the beginning
echo ""
echo ""
echo "cd ottwatch; bin/rails db:setup"
echo "/etc/init.d/mysql start"
echo "alias m='mysql ottwatch_dev'"
echo "mysql ottwatch_dev < db/ottwatch_v1_snapshot.sql"
echo ""
docker run --name ottwatch-dev -p 33000:3000 -v `pwd`:/ottwatch -i -t ottwatch-dev || \
docker start -i ottwatch-dev
|
SQL | UTF-8 | 164 | 3.25 | 3 | [] | no_license | select e.*
from recursos.empleado e
where e.sueldo >= (
select max( x.sueldo)
from recursos.empleado x
where x.iddepartamento = e.iddepartamento
); |
Ruby | UTF-8 | 2,962 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | #
# Cookbook Name:: sys
# File:: libraries/sys_harry.rb
#
# Copyright 2016-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#
# Authors:
# Matthias Pausch <m.pausch@gsi.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
module Sys
module Harry
def generate_harry_config(sections, indent=1, flags={})
if flags[:sections].nil?
flags[:sections] = true
end
unless flags[:indentation]
flags[:indentation] = ''
8.times{flags[:indentation] << ' '}
end
flags[:separator] ||= '='
flags[:separator]
if flags[:spaces_around_separator].nil?
flags[:spaces_around_separator] = true
end
if flags[:alignment].nil?
flags[:alignment] = true
end
if flags[:separator].length == 0
flags[:separator] = ' '
end
if flags[:spaces_around_separator]
flags[:separator].prepend(' ') << ' '
end
# Should not be set by user
flags[:align] = ''
file = ''
sections.each do |name, section|
file << "[#{name}]\n" if flags[:sections]
max_key_length = section.keys.max_by {|e| e.length}.length
section.each do |k, v|
flags[:align] = ''
if flags[:alignment]
(max_key_length - k.length).times { flags[:align] << ' '}
end
render_harry_config(file, k, v, indent, flags)
end
file << "\n"
end
return file.strip
end
def render_harry_config(config, key, value, indent, flags)
indentation = ''
indent.times { indentation << flags[:indentation] }
case value
when Array
value.each do |elt|
render_harry_config(config, key, elt, indent, flags)
end
when Hash
max_key_length = value.keys.max_by {|e| e.length}.length
# Strictly speaking, flags[:align] should not be reset, but
# that yields slightly less readable config-files
flags[:align] = ''
config << "#{indentation}#{key}#{flags[:align]}#{flags[:separator]}{\n"
value.each do |k, v|
flags[:align] = ''
if flags[:alignment]
(max_key_length - k.length).times { flags[:align] << ' '}
end
render_harry_config(config, k, v, indent + 1, flags)
end
config << "#{indentation}}\n"
else
config << "#{indentation}#{key}#{flags[:align]}#{flags[:separator]}#{value}\n"
end
end
end
end
|
C | WINDOWS-1250 | 351 | 3.375 | 3 | [] | no_license | #include<stdio.h>
#include<stdlib.h>
#include<conio.h>
main()
{
system("color f9");
//Ttulo del programa y para que sirve
printf("Programa 7: \"Programa para cuenta ascendiente\"");
int a;
//Se aplica un for para que cuente e imprima valores del 1 al 10
for (a=1;a<=10;a++)
printf("\n\n El contador va en %i",a);
getch();
}
|
Java | UTF-8 | 324 | 2.609375 | 3 | [] | no_license | package java.security.cert;
public abstract class CRL {
private String type;
public abstract boolean isRevoked(Certificate certificate);
public abstract String toString();
protected CRL(String type) {
this.type = type;
}
public final String getType() {
return this.type;
}
}
|
PHP | UTF-8 | 747 | 2.515625 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
require_once '../negocio/Colaborador.php';
require_once '../util/funciones/Funciones.clase.php';
$dni = $_POST["dni"];
$nombres = $_POST["nombres"];
$apellidos = $_POST["apellidos"];
$estado = $_POST["estado"];
try {
$obj = new Colaborador();
$obj->setDni($dni);
$obj->setNombres($nombres);
$obj->setApellidos($apellidos);
$obj->setEstado($estado);
$resultado = $obj->editar();
if ($resultado) {
Funciones::imprimeJSON(200, "Registro Satisfactorio", "");
}else{
Funciones::imprimeJSON(500, $exc->getMessage(), "");
}
} catch (Exception $exc) {
//Funciones::imprimeJSON(500, $exc->getMessage(), "");
echo $exc->getMessage();
}
|
JavaScript | UTF-8 | 570 | 2.515625 | 3 | [] | no_license | console.log('test')
console.log('test')
var fs = require('fs')
var proto = require('proto')
console.log(fs.readdirSync('.'))
var Class = proto(function() {
this.init = function(x) {
this.x = x
}
this.mate = function() {
console.log(this.x)
}
})
var x = Class(5)
x.mate()
var extension = require('hello');
console.log(extension.hello());
/*
var Fiber = require('fibers')
var Future = require('fibers/future')
Fiber(function() {
var f = new Future
f.return(2)
console.log(f.wait())
}).run()
*/
console.log('te')
var hello = require('hello')
hello()
|
Python | UTF-8 | 1,230 | 3.109375 | 3 | [] | no_license | from console.console_class import Console
from common.inuyasha_symbols import INVALID_CHOICE_VALUE,\
ERROR_INVALID_MAIN_MENU_CHOICE
from common.banner import Banner
class MainMenu(object):
@staticmethod
def Show():
Console.Clear()
Banner.Print()
print(" *** Main Menu *** ")
print()
print("Pick an option:")
print()
print(" 1) List CPU info")
print(" 2) List Directory Contents")
print(" 3) Kill a Process")
print(" 4) Exit")
print()
print("*************************************************************************")
nValue = INVALID_CHOICE_VALUE
while nValue == INVALID_CHOICE_VALUE:
try:
nValue = int(input("> Choice (1/2/3/4): > "))
if nValue < 1 or nValue > 4:
nValue = INVALID_CHOICE_VALUE
print(ERROR_INVALID_MAIN_MENU_CHOICE)
continue
except KeyboardInterrupt as e:
raise e
except:
nValue = INVALID_CHOICE_VALUE
print(ERROR_INVALID_MAIN_MENU_CHOICE)
return nValue
|
C++ | ISO-8859-2 | 877 | 3.359375 | 3 | [] | no_license | #pragma once
// Name: ThreadSignaler.h
// Author: Jrmi Panneton
// Description: Thread signaling class
#include <condition_variable>
#include <mutex>
/// @brief Signaler that allows communication between different organs
/// @author Jeremi Panneton
/// @ingroup engine
class ThreadSignaler
{
public:
/// @brief Default constructor
ThreadSignaler() = default;
/// @brief Notify waiting thread to execute
void notify();
/// @brief Put thread to sleep while waiting for a signal
void wait();
private:
/// @brief Mutex to allow safe usage of the condition variable
std::mutex m_mutex;
/// @brief Condition variable to wait and notify (monitor equivalent)
std::condition_variable m_conditionVariable;
/// @brief If a notification has been sent from the current instance
/// @note Prevent spurious wakeups
bool m_ready = false;
}; |
PHP | UTF-8 | 1,791 | 3.1875 | 3 | [] | no_license | <?php
$pronouns = array ('I', 'You', 'He/She','We', 'You', 'They');
foreach($pronouns as $pronouns){
if($pronouns != 'He/She'){
echo $pronouns." code<br>";
} else {
echo $pronouns." codes<br>";
}
}
$cpt = 0;
while ($cpt<120){
echo $cpt;
$cpt++;
}
for ($cpt=0;$cpt<120;$cpt++){
echo ($cpt+1);
}
$names=["adrien","Angélique","Antoine","Audric","baysaa","Corentin","Corentine","El Thomas","Eva","Iris","Julien","Laurent","Lisa","Luca","Jérémy","Naim","Stephanie","Thomas","Tibo","William","Yassine","Yves","Zoé"];
foreach($names as $name){
echo $name;
}
$countries = ["Belgium","France","Luxembourg","Pays-Bas","Allemagne","Estonie","Hongrie","Angleterre","Lybie","Canada","Japon"];
$templateFirstHalf = "
<form method='GET' action='#'>
<label for='select'>Choose a country my lad<br></label>
<select id='select'>
<option value=''>--Please choose an option--</option>";
$templateSecondHalf = "
</select>
</form>
";
echo $templateFirstHalf;
foreach($countries as $country){
echo "<option id='pickedCountry' value='$country'>$country</option>";
};
echo $templateSecondHalf;
$pays = array(
'BE'=>'Belgique',
'FR'=>'France',
'LU'=>'Luxembourg',
'NL'=>'Pays-Bas',
'DE'=>'Allemagne',
'ES'=>'Estonie',
'HU'=>'Hongrie',
'UK'=>'Angleterre',
'LY'=>'Lybie',
'CA'=>'Canada',
'JP'=>'Japon'
);
echo $templateFirstHalf;
foreach($pays as $key => $data){
echo "<option id='pickedCountry' value='$key'>$data</option>";
}
echo $templateSecondHalf;
?> |
C# | UTF-8 | 2,687 | 3.359375 | 3 | [] | no_license | using System;
namespace SpanskTest
{
class Program
{
static string word = "Hablar";
static string[] ending = new string[6];
static bool continuation = true;
static int slecetion;
static void Main(string[] args)
{
Console.Title = "Fremtid";
ending[0] = "Hablaré";
ending[1] = "Hablarás";
ending[2] = "Hablará";
ending[3] = "Hablaremos";
ending[4] = "Hablaréis";
ending[5] = "Hablarán";
Random rng = new Random();
while (continuation == true)
{
slecetion = rng.Next(0, 6);
if (slecetion == 0)
{
Console.WriteLine($"Hvad er den 1st per. sing. af {word}");
Checker(slecetion);
}
else if (slecetion == 1)
{
Console.WriteLine($"Hvad er den 2st per. sing. af {word}");
Checker(slecetion);
}
else if (slecetion == 2)
{
Console.WriteLine($"Hvad er den 3st per. sing. af {word}");
Checker(slecetion);
}
else if(slecetion == 3)
{
Console.WriteLine($"Hvad er den 1st per. plur. af {word}");
Checker(slecetion);
}
else if (slecetion == 4)
{
Console.WriteLine($"Hvad er den 2st per. plur. af {word}");
Checker(slecetion);
}
else if (slecetion == 5)
{
Console.WriteLine($"Hvad er den 3st per. plur. af {word}");
Checker(slecetion);
}
else
{
Console.WriteLine("Yo WHAT THE FUCK");
}
}
Console.ReadLine();
}
public static void Checker(int slection)
{
string userWord = Console.ReadLine();
if (userWord.ToLower() == ending[slecetion].ToLower())
{
Console.WriteLine("--------------------------\n" +
" Correct\n" +
"--------------------------");
}
else
{
Console.WriteLine("--------------------------\n" +
" Wrong\n" +
"--------------------------\n");
}
}
}
} |
Markdown | UTF-8 | 2,139 | 3.265625 | 3 | [
"MIT"
] | permissive | # Animation
This library was originally created as part of my blog series, Dynamic Animation:
- [Part 1](http://theliquidfire.com/2015/01/02/dynamic-animation-part-1/)
- [Part 2](http://theliquidfire.com/2015/01/09/dynamic-animation-part-2/)
It has since been used in several of my [tutorial projects](http://theliquidfire.com/projects/) and has changed a little over time.
## Features
- Dynamic animation
- Lots of easing equations to pick from
- Choose between delta time, unscaled delta time, and fixed delta time for updates
- Loop, however many times you like, including forever with a simple repeat or ping-pong style
- Callback events for each Update Step, State Change, Looping and Completion
- Extensions make common animations (like moving a Transform) as simple as a single line of code
- Subclass different types of `Tweener` to add functionality where needed
## Usage
Import the namespace where required:
```csharp
using TheLiquidFire.Animation;
```
Utilize extensions to initiate an animation. Animate using default duration and easing curve:
```csharp
transform.MoveTo(new Vector3(1, 2, 3));
```
The duration and easing curve are optional:
```csharp
transform.MoveTo(new Vector3(1, 2, 3), 1f, EasingEquations.EaseOutBounce);
```
To customize an animation, just keep a reference to the returned `Tweener`:
```csharp
var tweener = transform.MoveTo(end.position, duration, curve);
// Modifiy any other property such as loop type, etc
tweener.loopType = EasingControl.LoopType.PingPong;
// Register for completion callback
tweener.completedEvent += Tweener_completedEvent;
```
## Built-in Extensions
- RectTransform
- AnchorTo: animate the anchored position
- Transform:
- MoveTo: animate the world position
- MoveToLocal: animate the local position
- RotateTo: animate the rotation quaternion
- RotateToLocal: animate the local euler angles
- ScaleToLocal: animate the local scale
## Custom Animation
- Subclass `Tweener` for any `float` related animation
- Subclass `Vector3Tweener` for any `Vector3` related animation
- Subclass `QuaternionTweener` for any `Quaternion` related animation
|
Java | UTF-8 | 843 | 2.1875 | 2 | [] | no_license | package ru.sysout;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.transaction.annotation.Transactional;
import ru.sysout.model.City;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@SpringBootTest
class SecondLevelCacheTest {
@PersistenceContext
private EntityManager em;
@Test
@Transactional
public void find1() {
City city=em.find(City.class,1l);
System.out.println("select1");
Assertions.assertEquals("city1", city.getName());
}
@Test
@Transactional
public void find2() {
City city=em.find(City.class,1l);
System.out.println("select2");
Assertions.assertEquals("city1", city.getName());
}
}
|
Python | UTF-8 | 325 | 3.03125 | 3 | [] | no_license | import threading
from time import sleep
def wait():
sleep(2)
t1 = threading.Thread(
target=wait,
name='Wait-Deamon',
daemon=True
)
t2 = threading.Thread(
target=wait,
name='Wait',
daemon=False
)
t1.start()
t2.start()
print(t1.is_alive())
print(t1.name)
print(t2.is_alive())
print(t2.name)
|
PHP | UTF-8 | 1,564 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Constants;
class MessageModel extends Model
{
//定义表名
protected $table = 'message';
//去掉时间戳维护
public $timestamps = false;
/**
* 添加留言
* @param $content 留言内容
* @param $email 邮箱地址
* @param $uid 用户id
* @param $time 留言时间
*/
public function addMessage($content, $email, $uid, $time){
$this->user_id = $uid;
$this->content = $content;
$this->email = $email;
$this->publish_time = $time;
$res = $this->save();
if(empty($res)){
return false;
}
return true;
}
/**
* 获取更多的留言
* @param $last_id 上次获取的最后一条记录id
*/
public function getMoreMessage($last_id = 0){
$where = array();
$where[] = ['status','=',Constants::MESSAGE_STATUS_ENABLE];
if(!empty($last_id)){
$where[] = ['id', '<', $last_id];
}
$messages = $this->select('id','user_id','content','publish_time')->where($where)->orderBy('id','desc')->limit(11)->get()->toArray();
if(empty($messages)){
return array();
}
return $messages;
}
/**
* 根据id获取留言的信息
* @param $id
*/
public function getMessageById($id){
$message = $this->where('id',$id)->first();
if(empty($message)){
return array();
}
return $message;
}
}
|
Markdown | UTF-8 | 7,401 | 3.3125 | 3 | [] | no_license | ---
title: Hello Git
date: 2017-10-20 14:01:31
categories: Hello World
tags:
- Hello World
- Git
---
Git 入门
<!-- more -->
# 安装
Ubuntu :通过执行 `sudo apt-get install git`
Windows :从 [https://git-for-windows.github.io](https://git-for-windows.github.io) 下载
安装完成后,设置名字和 Email:
```git
$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"
```
# 初始化
1. 创建一个版本库,在目录下执行:
```git
$ git init
```
2. 新建一个 abc.txt ,然后把文件添加到版本库中:
```git
$ git add abc.txt
```
3. 把文件提交到仓库:
```git
$ git commit -m "提交说明"
```
# 基本操作
修改 abc.txt 文件,加入以下文字:
```text
aaaaaaaa
```
然后运行:
```git
$ git status
```
`git status` 命令可以查看仓库当前的状态,可查看到 abc.txt 已经被修改,但还没有准备提交。
需要查看具体修改了什么内容,可运行:
```git
$ git diff adb.txt
```
最后提交修改:
```git
$ git add
```
```git
$ git commit -m "修改了abc.txt"
```
# 版本回退
使用 `git log` 命令查看历史记录,可以使用 `git log --pretty=oneline` 减少输出信息。
要把当前的版本回退到上一个版本: `git reset --hard HEAD^` ,上上一个版本只需要把 **HEAD^** 改成 **HEAD^^** 以此类推。
如果往上100个版本可以写成 **HEAD~100**
恢复到新版本 `git reset --hard 版本号` , 查看命令历史 `git reflog` 可查看到版本号。
# 工作区与暂存区
工作区就是我们初始化仓库的目录。
版本库就是初始化后生成的 **.git** 这个隐藏目录,里面包含:**暂存区(stage)**和 Git 自动创建的第一个分支 **master**,以及指向 **master** 的一个指针叫 **HEAD**。
当我们 `git add` 时,实际上就是把文件修改添加到暂存区,`git commit` 时,实际上就是把暂存区的所有内容提交到当前分支。
# 撤销修改和删除文件
使用 `git checkout -- abc.txt` 把 abc.txt 文件在工作区的修改全部撤销。
使用 `git reset HEAD abc.txt` 把暂存区的修改撤销掉,重新放回工作区。
使用 `git rm abc.txt` 删除一个文件。
# 远程仓库
使用 [GitHub][github] 作为远程仓库。
GitHub提供两种远程方式,如果要使用 SSH 认证,则需要:
1. 创建 SSH Key : 在用户主目录下查看是否存在 **.ssh** 目录,再查看这个目录下是否有 **id_rsa** 和 **id_rsa.pub** 这两个文件, 如果不存在,执行命令
```
$ ssh-keygen -t rsa -C "youremail@example.com"
```
2. 登录 GitHub 在 Settings 里面的 SSH and GPG keys 页面,点击 New SSH key 把 **id_rsa.pub** 的内容粘贴到 Key 文本框里。
把本地仓库与远程仓库关联,在本地仓库运行命令:
```
$ git remote add origin https://github.com/punkvv/yuqi.git
```
下一步,就可以把本地库的所有内容推送到远程库上:
```
$ git push -u origin master
```
由于远程库是空的,我们第一次推送 master 分支时,加上了 **-u** 参数,Git 不但会把本地的 master 分支内容推送的远程新的 master 分支,还会把本地的 master 分支和远程的 master 分支关联起来,在以后的推送或者拉取时就可以简化命令。
```
$ git push origin master
```
从远程克隆库:
```
$ git clone https://github.com/punkvv/yuqi.git
```
# 分支管理
创建 **dev** 分支,并切换到 **dev** 分支:
```
$ git checkout -b dev
```
**-b** 参数表示创建并切换,相当于:
```
$ git branch dev
$ git checkout dev
```
用 `git branch` 查看当前分支:
```
$ git branch
```
合并指定分支到当前分支:
```
$ git merge dev
```
删除分支:
```
$ git branch -d dev
```
当合并分支有冲突时 Git 用 **<<<<<<<**,**=======**,**>>>>>>>** 标记出不同分支的内容:
```
<<<<<<< HEAD
aaa
=======
bbb
>>>>>>> dev
```
当 Git 无法自动合并分支时,就必须首先解决冲突。解决冲突后,再提交,合并完成。
用 `git log --graph` 命令可以看到分支合并图。
合并分支时,加上 **--no-ff** 参数就可以用普通模式合并,合并后的历史有分支,能看出来曾经做过合并,而 fast forward 合并就看不出来曾经做过合并。
```
$ git merge --no-ff -m "merge with no-ff" dev
```
存储工作现场:
```
$ git stash
```
查看:
```
$ git stash list
```
恢复:
```
$ git stash apply
```
删除:
```
$ git stash drop
```
恢复并删除:
```
$ git stash pop
```
可以多次 stash ,恢复的时候,先用 `git stash list` 查看,然后恢复指定的 stash :
```
$ git stash apply stash@{0}
```
开发一个新 feature ,最好新建一个分支;
如果要丢弃一个没有被合并过的分支,可以通过 `git branch -D <name>` 强行删除。
查看远程库信息,使用 `git remote -v`。
本地新建的分支如果不推送到远程,对其他人就是不可见的。
从本地推送分支,使用 `git push origin branch-name` ,如果推送失败,先用 `git pull` 抓取远程的新提交。
在本地创建和远程分支对应的分支,使用 `git checkout -b branch-name origin/branch-name`,本地和远程分支的名称最好一致;
建立本地分支和远程分支的关联,使用 `git branch --set-upstream branch-name origin/branch-name`。
从远程抓取分支,使用 `git pull`,如果有冲突,要先处理冲突。
# 标签管理
首先,切换到需要打标签的分支上:
```
$ git checkout master
```
然后,使用命令:
```
$git tag v1.0
```
就可以打一个新标签。
可以使用 `git tag` 查看所有标签。
默认标签是打在最新提交的commit上的。
如果需要对特定 commit 打标签,则需要找到历史提交的 commit id:
```
$ git log --pretty=oneline --abbrev-commit
```
然后:
```
$ git tag v0.9 <commit id>
```
使用:
```
$ git show <tagname>
```
查看标签信息。
还可以创建带有说明的标签,用 **-a** 指定标签名,**-m** 指定说明文字:
```
$ git tag -a v0.1 -m "version 0.1 released" <commit id>
```
删除标签:
```
$ git tag -d <tagname>
```
推送标签到远程:
```
$ git push origin <tagname>
```
把本地标签全部推送到远程:
```
$ git push origin --tags
```
如果标签已经推送到远程,需要删除远程标签,要先从本地删除:
```
$ git tag -d <tagname>
```
然后,从远程删除:
```
$ git push origin :refs/tags/<tagname>
```
# 自定义 Git
忽略特殊文件,通过添加 **.gitignore** 文件,然后配置忽略规则 [.gitignore][.gitignore]
可以使用:
```
$ git config --global alias.<别名> <命令>
```
来使命令简写。
配置个性化 log:
```
$ git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
```
每个仓库的配置文件在 **.git/config** 文件中。
当前用户的配置文件在用户主目录下的一个隐藏文件 **.gitconfig** 中。
参考 [Git教程][gitjc]、[GitHub][github]、[Git][git]
[gitjc]: https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000
[github]: https://github.com
[.gitignore]: https://github.com/github/gitignore
[git]: https://git-scm.com
|
Python | UTF-8 | 396 | 2.515625 | 3 | [
"Unlicense"
] | permissive | from util import dbman
def enbl(ctx) -> bool:
"""
>>> RETURNS TRUE IF THE COMMAND IS ENABLED <<<
CTX [CTX] - Context, just used for the command name
"""
try:
if ctx.guild:
return dbman.get('com', ctx.command.name, id=int(ctx.guild.id)) # Command is en/disabled
else: # In DMs
return True
except: # Just in case
return True
|
Markdown | UTF-8 | 6,013 | 3.15625 | 3 | [] | no_license | # Javascript의 비동기 프로그래밍 방식
> 이 글의 타이틀은 'Javascript의' 비동기 프로그래밍 방식이다. 하지만 비동기 프로그래밍은 Javascript 엔진을 위한 것이 아니라 **브라우저** 를 위한 것이라는 관점을 잊지 않았으면 한다.
## 동기와 비동기의 차이점
- **동기적** 실행 예시
```
console.log("hello");
function foo(){
console.log("happy")
}
foo();
console.log("world!");
// hello
// happy
// world!
```
- **비동기적** 실행 예시
```
console.log("hello");
function foo(){
console.log("happy")
}
setTimeout(foo, 1000);
console.log("world!");
// hello
// world!
// undefined
// happy
```
`console.log("hello");`와 `console.log("world!");` 사이에 어떤 함수를 호출했을 뿐인데, 두 코드의 실행 순서가 다른 것을 확인할 수 있다. **foo()**는 JS engine이 실행하는 *일반적인 함수*일 뿐이고, **setTimeout()**은 JS engine이 Web API에게 넘겨 *비동기식으로 처리하는 콜백 함수*이기 때문이다.
---
지금은 동기적으로 실행되는 코드 중 foo()의 기능이 얼마 없지만, 만약 foo()의 기능이 동기적이라는 가정하에 httprequest를 요청하거나 복잡한 이미지 프로세싱을 처리하는등 시간이 오래 걸리는 작업이라면 `console.log("world!");`가 너무 늦게 실행될 것이다.
---
**JS engine**에 있는 Call Stack은 한 번에 하나의 일밖에 처리할 수 없고, **브라우저**는 Call Stack에 있는 함수가 실행될 동안 렌더링 등의 아무 일도 하지 못한다. 심지어 클릭도 못한다. (이런 경우 브라우저는 **_block_**이 발생했다고 생각한다.) ~~따라서 브라우저는 JS engine이 해야할 일을 빨리 처리하고, 자신이 할 수 있는 일을 가능한 빨리 실행하기를 바랄 수 밖에 없다.~~ **_노드나 브라우저의 API가 거의 비동기식으로 처리되도록 만들어진 이유이다._**
- 콜백함수는 비동기로 처리되는 대표적인 함수의 종류이다.
## 그래서 비동기식으로 어떻게 동작하는데?
javascript는 브라우저안에서 되는 언어라는 걸 들어본 적 있을 것 이다. JS engine이 js코드를 어떤 일이 발생하는지 살펴보자. (아래의 이미지는 모든 처리 과정을 자세히 나타내고 있지 않습니다.)
<img width="994" alt="JS engine" src="https://user-images.githubusercontent.com/18614517/56194008-f1bde800-606c-11e9-836d-0f0e06ff2cc1.png">
1. **JS engine이 실행 컨텍스트를 만들어서 Call Stack에 push한다.**
(참고로 각각의 실행 컨텍스트는 this등으로 연결된다.)
2. Call Stack에 있는 함수를 순서대로 실행하다가, **콜백 함수가 있다면 JS engine은 이 함수를 js 런타임 환경 외부에서 Web API가 처리하도록 넘긴다.**
3. 넘겨진 콜백 함수가 불려지는 시점이 되면 **Event queue**로 이동한다.
4. **Event Loop**가 Call Stack이 비어있는지 계속 검사하다가 비어 있다면, **Event queue에 있는 콜백 함수를 Call Stack으로 push한다.**
## 계속 봐야 할 실행 예시
**1. 비동기 상황 예 - var 변수 선언**
```
const baseData = [1,2,3,4,5,6,100];
const asyncRun = (arr, fn) => {
for(var i=0; i<arr.length; i++) {
setTimeout( () => fn(i), 1000);
}
}
asyncRun(baseData, idx =>console.log(idx));
```
- 변수 i는 for문 내에서 var로 선언했기 때문에 **_스코프를 가지고 있지 않다._**
- for문과 asyncRun()이 끝난 뒤에, setTimeout()으로 넘겨진 callback함수들이 callstack으로 올라와 하나씩 실행된다.
- asyncRun()이 끝났지만 fn()과 i는 클로저(?)에 남아 있기 때문에 접근할 수 있다. 하지만 i는 스코프가 없는 상태여서 마지막 값인 7이 들어있게 된다.
**2. 비동기 상황 예 - let 변수 선언**
```
const baseData = [1,2,3,4,5,6,100];
const asyncRun = (arr, fn) => {
for(let i=0; i<arr.length; i++) {
setTimeout( () => fn(i), 1000);
}
}
asyncRun(baseData, idx =>console.log(idx));
```
- 변수 i는 for문 내에서 let로 선언했기 때문에 **_블록 스코프를 가진다._**
- for문과 asyncRun()이 끝난 뒤에, setTimeout()으로 넘겨진 callback함수들이 callstack으로 올라와 하나씩 실행된다.
- asyncRun()이 끝났지만 fn()는 클로저에 남아있고, i는 스코프를 가지고 있는 상태기 때문에 우리가 원하는 결과를 얻을 수 있다.
**3. 비동기 상황 예 - 1.을 forEach로 변경**
```
const baseData = [1,2,3,4,5,6,100];
const asyncRun = (arr, fn) => {
arr.forEach((v,i) => {
setTimeout( () => fn(i), 1000);
});
}
asyncRun(baseData, idx =>console.log(idx))
```
- 1.의 예시에서는 asyncRun()안에서 바로 for문이 실행되지만, 3.에서는 asyncRun()안에서 forEach가 실행 될 때 callback으로 익명 함수를 받는다. **_따라서 v, i는 함수 스코프를 가진다._**
- asyncRun()이 끝났지만 fn()는 클로저에 남아있고, i는 스코프를 가지고 있는 상태기 때문에 우리가 원하는 결과를 얻을 수 있다.
**4. 비동기 상황 예 - 비동기 + 비동기**
```
const baseData = [1,2,3,4,5,6,100];
const asyncRun = (arr, fn) => {
arr.forEach((v,i) => {
setTimeout(() => {
setTimeout(() => {
console.log("cb 2");
fn(i)
},1000);
console.log("cb 1");
}, 1000);
});
console.log("end");
}
asyncRun(baseData, idx => console.log(idx))
```
- setTimeout()은 callback 함수를 비동기적으로 실행하지만 forEach()는 callback 함수를 동기적으로 실행한다.
- setTimeout()도 callstack에 올라오며, callback으로 받은 함수를 WEB API에 넘긴 후, setTimeout()은 callstack에서 사라진다.
- forEach()와 asyncRun()가 callstack에서 빠졌음에도 `fn(i)`을 실행했을 때 참조할 수 있는 이유는 scope, closure? 때문이라고 함
|
Java | UTF-8 | 1,628 | 2.296875 | 2 | [] | no_license | package com.example.block;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.NumberPicker;
import android.widget.Toast;
public class block7 extends AppCompatActivity {
//web pages
NumberPicker picker;
WebView webView;
Button next;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.block7);
picker = findViewById(R.id.numberpicker);
webView = findViewById(R.id.webview);
String []choices = {"Coursera",
"Pinterest",
"GeeksforGeeks"};
picker.setDisplayedValues(choices);
picker.setMinValue(0);
picker.setMaxValue(choices.length-1);
}
public void navigate(View view) {
int ch = picker.getValue();
Toast.makeText(this, "click", Toast.LENGTH_SHORT).show();
webView.setWebViewClient(new WebViewClient());
if(ch==0)
{
Toast.makeText(this, "clickkkk", Toast.LENGTH_SHORT).show();
webView.loadUrl("http://www.coursera.org");
}
else if (ch==1)
webView.loadUrl("http://www.pinterest.com");
else if (ch == 2)
webView.loadUrl("http://www.geeksforgeeks.org");
}
public void next(View view) {
Intent intent = new Intent(block7.this,block8.class);
startActivity(intent);
}
} |
JavaScript | UTF-8 | 638 | 2.859375 | 3 | [] | no_license | const counter = (numberPlace, plusButton, restButton, hiddenInput) => {
if (numberPlace != null) {
let counter = 0;
numberPlace.innerText = 0;
hiddenInput.value = counter;
plusButton.addEventListener("click", () => {
counter += 1;
numberPlace.innerText = counter;
hiddenInput.value = counter;
});
restButton.addEventListener("click", () => {
if (counter > 0) {
counter -= 1;
numberPlace.innerText = counter;
hiddenInput.value = counter;
} else {
numberPlace.innerText = 0;
hiddenInput.value = 0;
};
});
};
}
export { counter };
|
C++ | UTF-8 | 896 | 2.78125 | 3 | [] | no_license | #include "stdafx.h"
#include <assert.h>
#include "CNodeTester.h"
#include "CNode.h"
/**********************************
Tester
**********************************
Input : nothing
Required : nothing
Output : nothing
Consequence : a serie of test is made one the class CNode
**********************************/
void CNodeTester::NODTmakeTest() {
CNode * NODtest = new CNode(1);
NODtest->NODaddArcIn(1);
NODtest->NODaddArcIn(2);
NODtest->NODaddArcOut(3);
NODtest->NODaddArcOut(4);
assert(NODtest->NODgetInArcsCount() == 2);
assert(NODtest->NODgetInArcByIndex(0)->ARCgetNodeDestId() == 1);
assert(NODtest->NODgetInArcByIndex(1)->ARCgetNodeDestId() == 2);
assert(NODtest->NODgetOutArcsCount() == 2);
assert(NODtest->NODgetOutArcByIndex(0)->ARCgetNodeDestId() == 3);
assert(NODtest->NODgetOutArcByIndex(1)->ARCgetNodeDestId() == 4);
cout << "CNode tests successfully passed" << endl;
} |
Markdown | UTF-8 | 1,225 | 3.484375 | 3 | [
"MIT"
] | permissive | ### 1. If you had to describe semantic HTML to the next cohort of students, what would you say?
##### Semantic HTML is HTML that uses tag names that are more specific about what is contained within them. For example, when using a <div> tag, there is no way of knowing what is contained in that tag based on the tag itself. Whereas using a semantic tag, such as ```<nav>```, ```<header>```, ```<section>```, or ```<footer>```, gives a little bit more information about what is contained inside of the tag.
***
### 2. Describe some differences between display: block; and display: inline;.
##### An element with display: block; will take up the entire width of its container. An element that has display: inline; will only take up as much horizontal space as it's content needs. This allows other elements to be on the same line.
***
### 3. What are the 4 areas of the box model?
##### content, padding, border, margin
***
### 4. While using flexbox, what axis are you using when you use the property: align-items: center?
##### You are centering the items on the cross-axis.
***
### 5. What is the git command to commit staged changes as well as write a message?
##### git commit -m "ADD MESSAGE HERE" |
Java | UTF-8 | 623 | 2.078125 | 2 | [] | no_license | package com.newer.category.web.servlet;
/**
* 分类模块WEB层
* @author qdmmy6
*
*/
public class CategoryServlet {// extends BaseServlet
// private CategoryService categoryService = new CategoryService();
//
// /**
// * 查询所有分类
// */
// public String findAll(HttpServletRequest req, HttpServletResponse resp)
// throws ServletException, IOException {
// /*
// * 1. 通过service得到所有的分类
// * 2. 保存到request中,转发到left.jsp
// */
// List<Category> parents = categoryService.findAll();
// req.setAttribute("parents", parents);
// return "f:/jsps/left.jsp";
// }
}
|
Rust | UTF-8 | 1,399 | 3 | 3 | [
"Apache-2.0"
] | permissive | use std::{
io::{Error, ErrorKind},
path::PathBuf,
};
use filenamify::filenamify;
use serde::Deserialize;
use crate::path::{config_file, repositories_dir};
#[derive(Deserialize, Default)]
pub struct Config {
#[serde(default)]
pub repositories: Vec<Repository>,
#[serde(default)]
pub experimental: Experimental,
}
#[derive(Deserialize, Default)]
pub struct Experimental {
#[serde(default = "default_as_false")]
pub enable_prompt_rewrite: bool,
}
impl Config {
pub fn load() -> Result<Self, Error> {
let file = serdeconv::from_toml_file(crate::path::config_file().as_path());
file.map_err(|err| {
Error::new(
ErrorKind::InvalidData,
format!(
"Config {:?} doesn't exist or is not valid: `{:?}`",
config_file(),
err
),
)
})
}
}
#[derive(Deserialize)]
pub struct Repository {
pub git_url: String,
}
impl Repository {
pub fn dir(&self) -> PathBuf {
repositories_dir().join(filenamify(&self.git_url))
}
}
fn default_as_false() -> bool {
false
}
#[cfg(test)]
mod tests {
use super::Config;
#[test]
fn it_parses_empty_config() {
let config = serdeconv::from_toml_str::<Config>("");
debug_assert!(config.is_ok(), "{}", config.err().unwrap());
}
}
|
C++ | UTF-8 | 260 | 3.25 | 3 | [] | no_license | #include <iostream>
#include <string>
using namespace std;
int main(){
string animals[7] = {"長頸鹿", "獅子", "老虎", "河馬", "熊", "兔子", "斑馬"};
for(int i = 0; i < 7; i++){
cout << animals[i] << endl;
}
return 0;
}
|
Python | UTF-8 | 3,137 | 3.390625 | 3 | [] | no_license | # importing useful libraries (you may need more)
import numpy as np # numerical package
import matplotlib.pyplot as plt # plotting package
from matplotlib import rc
rc('font',**{'family':'serif'}) # This is for Latex writing
# definition of constants and variables
k = 8.61734e-5 # Boltzmann constant
# add all constants here so you do not need to put them in every function
'''
# definition of functions
def name_function(parameters):
statements
statements
return output_parameters
def another_function(another_params):
statements
return another_output
# Main part calling the functions to do things
name_function(parameters)
another_function(another_params)
'''
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
chiion = np.array([7, 16, 31, 51]) # Schadee ionization energies into numpy array
k = 8.61734e-5 # Boltzmann constant in eV/deg
temp = 5000. # the decimal point here also makes it a float
u = np.zeros(4) # declare a 4 zero-element array
for r in range(4):
for s in range(chiion[r]):
u[r] = u[r] + np.exp(-s / k / temp)
print(u) # prints all the values of u array (now is not zeros)
def partfunc_E(temp):
chiion = np.array([7, 16, 31, 51]) # Schadee ionization energies into numpy array
k = 8.61734e-5 # Boltzmann constant in eV/deg
u = np.zeros(4) # declare a 4 zero-element array
for r in range(4):
for s in range(chiion[r]):
u[r] = u[r] + np.exp(-s / k / temp)
return u # returns all the values of u array
# Notice that the variable temp is not inside the function since it will be called when calling
# the function using the command
def boltz_E(temp, r, s):
u = partfunc_E(temp)
KeV = 8.61734e-5 # This constant does need to be defined here again if it was before
relnrs = 1. / u[r - 1] * np.exp(-(s - 1) / (KeV * temp))
return relnrs
for s in range(1,11): # now the loop starts at 1 and finishes at 10
print (boltz_E(5000., 1., s))
def saha_E(temp, elpress, ionstage):
kerg = 1.380658e-16
kev =8.61734e-5
h = 6.62607e-27 #erg/s
elmass = 9.109390e-28 #gram
kevT = kev * temp
kergT = kerg * temp
eldens = elpress / kergT
chiion = np.array([7, 16, 31, 51 ])
u = partfunc_E(temp)
u = np.append(u, 2) # With this command we are adding a new element to the array
sahaconst = (2. * np.pi * elmass * kergT / (h**2))**1.5 * 2. / eldens
nstage = np.zeros(5)
nstage[0] = 1. # We set the first element of the array to a value 1
for r in range(4):
nstage[r + 1] = nstage[r] * sahaconst * u[r + 1] / u[r] * np.exp(-chiion[r] / kevT)
ntotal = np.sum(nstage)
nstagerel = nstage / ntotal
return nstagerel[ionstage - 1]
temp= 5000.
partfunc_E(temp)
# So, the variable temp has to be defined before executing this command (outside the function)
plt.plot(temp)
for r in range(1,6):
print (saha_E(20000,1e3,r))
for r in range(1,6):
print ((saha_E(20000,1e1,r)))
|
Python | UTF-8 | 168 | 2.78125 | 3 | [] | no_license | for t in range(int(input())):
x=input();l=len(x)
a=[0 for i in range(10)]
for i in range(l):a[int(x[i])]+=1
print(f'#{t+1}', sum([1 for i in a if i>0])) |
SQL | UHC | 11,266 | 3.578125 | 4 | [] | no_license |
select*from COMIC_EMPLOYEE;
desc COMIC_EMPLOYEE;
drop table COMIC_EMPLOYEE CASCADE CONSTRAINTS;
drop table COMIC_WORKINGHOUR;
drop table COMIC_PRODUCTORDER;
drop table COMIC_PRODUCTSTOCK;
drop table COMIC_BOOK;
drop table COMIC_ROOM CASCADE CONSTRAINTS;
drop table COMIC_ROOMUSE;
drop table COMIC_ORDER;
drop table COMIC_PRODUCTSALES;
drop table COMIC_ROOMSALES CASCADE CONSTRAINTS;
drop table COMIC_CHAT;
drop table COMIC_LOSS;
drop table COMIC_COMMENTS;
drop table COMIC_PAY;
drop table COMIC_BOARD;
drop table COMIC_MEMBER CASCADE CONSTRAINTS;
CREATE TABLE COMIC_MEMBER (--ȸ
MEMBER_ID VARCHAR2(20) PRIMARY KEY, --̵
MEMBER_PWD VARCHAR2(30) NOT NULL, --йȣ
MEMBER_NAME VARCHAR2(30) NOT NULL, --̸
MEMBER_EMAIL VARCHAR2(30) UNIQUE, --̸
MEMBER_PHONE_NUMBER VARCHAR2(30) NOT NULL --ó
);
--
CREATE TABLE COMIC_EMPLOYEE (
EMPLOYEE_NUM NUMBER DEFAULT 1000 PRIMARY KEY, --
EMPLOYEE_PWD VARCHAR(30) NOT NULL, -- йȣ
EMPLOYEE_NAME VARCHAR2(30) NOT NULL, --̸
EMPLOYEE_PHONE VARCHAR2(30) NOT NULL, --ó
EMPLOYEE_ACCOUNT VARCHAR2(30) NOT NULL, --¹ȣ
EMPLOYEE_STARTDAY DATE NOT NULL, --Ի
EMPLOYEE_POSITION VARCHAR2(50) NOT NULL, --å
EMPLOYEE_PAY NUMBER NOT NULL--ñ/
);
CREATE TABLE COMIC_EMP_ATTACH (
UUID VARCHAR2(100) NOT NULL,
UPLOADPATH VARCHAR2(200) NOT NULL,
FILENAME VARCHAR2(100) NOT NULL,
FILETYPE CHAR(1) DEFAULT 'I',
EMPLOYEE_NUM NUMBER
);
select*from COMIC_EMP_ATTACH;
commit;
select*From comic_employee;
update comic_employee set employee_pay=8750;
commit;
select * from comic_employee order by employee_num;
select roomuse_id,roomuse_num,roomuse_status,to_char(roomuse_starttime,'hh24:mi:ss')
"starttime" from comic_roomuse;
--
drop table comic_pay;
CREATE TABLE COMIC_PAY (
-- PAY_NUM NUMBER, --ȣ
PAY_WORKMONTH varchar2(30),--ٹ 1910(,)̷
PAY_EMP_NUM NUMBER, --ȣ
PAY_DATE DATE, --
PAY_TOTALTIME NUMBER, -- ð(úʿ ÷) 30 ݿøؼ ÿ ߰ϰ
CONSTRAINT COMIC_EMPLOYEE_NUM_FK FOREIGN KEY (PAY_EMP_NUM)
REFERENCES COMIC_EMPLOYEE (EMPLOYEE_NUM) ON DELETE CASCADE
);
select*from comic_pay;
commit;
create table tmpdate(
tmp_date date
);
select TO_CHAR(tmp_date, 'hh24:mi:ss')from tmpdate;
INSERT INTO tmpdate(tmp_date) VALUES ( TO_DATE('191123','YYMMDD'));
INSERT INTO tmpdate(tmp_date) VALUES ( TO_DATE('191123','YYMMDD'));
INSERT INTO tmpdate(tmp_date) VALUES ( TO_DATE('191123','YYMMdd'));
INSERT INTO tmpdate(tmp_date) VALUES ( TO_DATE('11-23-2012 10:26:11','MM-DD-YYYY HH24:MI:SS') );
-- ̺
CREATE TABLE COMIC_WORKINGHOUR(
WORKINGHOUR_EMP_NUM NUMBER, -- ȣ
WORKINGHOUR_STARTTIME DATE, -- ٽð
WORKINGHOUR_ENDTIME DATE, -- ٽð
WORKINGHOUR_workday DATE, --
CONSTRAINT COMIC_EMPLOYEE_NUM_FK_2 FOREIGN KEY (WORKINGHOUR_EMP_NUM)
REFERENCES COMIC_EMPLOYEE (EMPLOYEE_NUM) ON DELETE CASCADE
);
insert into comic_workinghour (workinghour_emp_num,workinghour_starttime,workinghour_workday)
values(1001,sysdate,sysdate);
select*from comic_workinghour;
select*from comic_workinghour where workinghour_starttime='19/10/08';
select*from comic_workinghour where workinghour_starttime=sysdate;
SELECT * FROM comic_workinghour
WHERE TO_CHAR(workinghour_workday, 'YYMMDD') = '191008' and workingHour_emp_num=1001;
SELECT TO_CHAR(workinghour_starttime, 'hh:mi:ss'),TO_CHAR(workinghour_ENDtime, 'hh:mi:ss')
FROM comic_workinghour
WHERE TO_CHAR(workinghour_workday, 'YYMMDD') = '191008' and workingHour_emp_num=1001;
select*from comic_employee;
select TO_CHAR( workinghour_workday,'yyyymmdd')"workday"
,TO_CHAR(workinghour_starttime, 'hh24:mi:ss')"starttime"
,TO_CHAR(workinghour_ENDtime, 'hh24:mi:ss')"endtime"
from comic_workinghour where workinghour_workday > '191001'
and workinghour_workday < '191030' and workinghour_emp_num=1001;
select*from comic_employee where employee_num='1001';
update COMIC_EMPLOYEE set employee_name='',employee_pwd=4500
,employee_phone=1124
,employee_account=010554,employee_position='',
employee_pay=450 where employee_num=1005;
commit;
update comic_workinghour set workinghour_endtime=sysdate where workingHour_emp_num=1001;
select*from comic_workinghour ;
DELETE FROM comic_workinghour WHERE workingHour_emp_num=1001;
commit;
desc COMIC_WORKINGHOUR;
-- ǰ̺
CREATE TABLE COMIC_PRODUCTSTOCK (
PRODUCT_NUM NUMBER PRIMARY KEY, -- ǰ ȣ
PRODUCT_NAME VARCHAR2(20) NOT NULL, -- ǰ̸
PRODUCT_PRICE NUMBER NOT NULL, -- ǰ ǸŰ
PRODUCT_QTY NUMBER NOT NULL, -- ǰ
PRODUCT_CATEGORY VARCHAR2(20) NOT NULL -- ǰ
);
-- ǰ̺
CREATE TABLE COMIC_PRODUCTORDER (
PRODUCTORDER_NUM NUMBER, -- ֹȣ
PRODUCTORDER_PRODUCT_NUM NUMBER, -- ǰȣ
-- productorder_name varchar(20), -- ֻǰ̸
-- productorder_category varchar(20), -- ֻǰ
PRODUCTORDER_COST NUMBER, -- Ű
PRODUCTORDER_QTY NUMBER, --
PRODUCT_DATE DATE, -- ¥
CONSTRAINT COMIC_PRODUCTSTOCK_NUM_FK FOREIGN KEY (PRODUCTORDER_PRODUCT_NUM )
REFERENCES COMIC_PRODUCTSTOCK (PRODUCT_NUM) ON DELETE CASCADE
);
-- å ̺ (api Ȯ ʿ )
CREATE TABLE COMIC_BOOK (
BOOK_NAME VARCHAR2(50),--å̸
BOOK_LOC VARCHAR2(50),--åġ
BOOK_PUBLISHER VARCHAR2(50),--åǻ
-- book_serialnumber varchar2(50)--åøȣ
BOOK_WRITER VARCHAR2(20), --å
BOOK_CONTENT VARCHAR(500) , --å Ұ
BOOK_CATEGORY VARCHAR(50), -- å з
BOOK_LASTBOOK NUMBER, --
BOOK_STATUS VARCHAR(20) --
);
select*from comic_order;
-- ̺
CREATE TABLE COMIC_ROOM(
ROOM_NUM NUMBER PRIMARY KEY, -- ȣ
ROOM_PRICE NUMBER NOT NULL, --
ROOM_PPL NUMBER NOT NULL -- ο
);
insert into comic_room values (7,200,6);
delete comic_room where room_num=7;
select *from comic_room;
-- ̺
-- off ش ڵ
CREATE TABLE COMIC_ROOMUSE(
ROOMUSE_ID VARCHAR2(20), -- ̵
ROOMUSE_NUM NUMBER, -- ȣ
ROOMUSE_STARTTIME DATE, -- ۽ð
ROOMUSE_ENDTIME DATE, -- ð
ROOMUSE_STATUS VARCHAR(5) DEFAULT 'off', -- on/off
CONSTRAINT COMIC_ROOM_NUM_FK FOREIGN KEY (ROOMUSE_NUM)
REFERENCES COMIC_ROOM(ROOM_NUM) ON DELETE CASCADE--comic_room̺ (room_num) ɶ
);
select*from COMIC_ROOMUSE;
insert into comic_roomuse (ROOMUSE_id,ROOMUSE_num,ROOMUSE_starttime,ROOMUSE_status)
values ('anonymous',7,sysdate,'on');
update comic_roomuse set roomuse_status='off' where roomuse_num=7;
update comic_roomuse set roomuse_status='on' where roomuse_num=7;
delete comic_roomuse where roomuse_num=7;
select*from comic_roomuse order by 2;
select roomuse_starttime from comic_roomuse;
select to_date('mi',roomuse_starttime) from comic_roomuse;
desc comic_roomuse;
commit;
delete comic_roomuse where roomuse_num=1;
select to_char(roomuse_starttime,'yyyy-mm-dd hh24:mi:ss') from comic_roomuse order by 1;
desc comic_roomuse;
select roomuse_id,roomuse_num,roomuse_status,to_char(roomuse_starttime,'hh24:mi:ss')
"starttime" from comic_roomuse;
-- Ϻ ֹ ̺(ǽð)
-- ʱȭ
CREATE TABLE COMIC_ORDER(
ORDER_NUM NUMBER , -- ֹ ȣ
ORDER_ID VARCHAR2(20), -- ֹ ̵
ORDER_ROOMNUM NUMBER,-- ֹ ȣ
ORDER_TIME DATE, -- ֹ ð
ORDER_PRODUCT_NUM NUMBER, -- ǰ ȣ
ORDER_QTY NUMBER -- ֹ
);
SELECT*fROM COMIC_ORDER;
insert into comic_order (order_num,order_id,order_roomnum,order_time)values(
11,'tmehfld',2,sysdate);
insert into comic_order (order_num,order_id,order_roomnum,order_time)values(
11,'tmehfld',2,to_date(sysdate,'yyyy.mm.dd hh24:mi'));
insert into comic_order (order_num,order_id,order_roomnum,order_time)values(
11,'tmehfld',3,sysdate);
select order_id,to_char(order_time,'hh24:mi:ss')"۽ð" from comic_order where order_roomnum=3;
--dateŸԿ ð
select*from comic_order where order_roomnum=2;
SELECT TO_CHAR(SYSDATE, 'RRRR-MM-DD HH24:MI:SS') AS "ð" FROM DUAL;
desc comic_order;
-- ̺(ǰ, ̺) ΰ ߾!
-- ǰ ̺
CREATE TABLE COMIC_PRODUCTSALES (
PRODUCTSALES_ID VARCHAR2(20) NOT NULL, -- ̵
PRODUCTSALES_QTY NUMBER NOT NULL, --
PRODUCTSALES_TIME DATE NOT NULL, -- ð( Ǹ)
PRODUCTSALES_PRODUCT VARCHAR2(20) NOT NULL, -- ǰ
PRODUCTSALES_ORDER_PRICE NUMBER NOT NULL --
); -- ֹ ǰ ڵ ϳ
-- ̺
CREATE TABLE COMIC_ROOMSALES(
-- å ...
ROOMSALES_NUM NUMBER NOT NULL, -- ȣ
ROOMSALES_TOTALPRICE NUMBER NOT NULL,--
ROOMSALES_TIME DATE NOT NULL-- ð
);
-- ä ̺
CREATE TABLE COMIC_CHAT (
CHAT_NUM NUMBER, -- ä ȣ
CHAT_ID VARCHAR(20), -- ä ̵ fk()
CHAT_TIME DATE, -- ä ð
CHAT_CONTENT VARCHAR(500) -- äó
);
-- ս̺
CREATE TABLE COMIC_LOSS (
LOSS_NUM NUMBER DEFAULT 1, -- ν ȣ
LOSS_CATEGORY VARCHAR(20), --ν /
LOSS_QTY NUMBER, -- ν
LOSS_PAY NUMBER, --ν ,
LOSS_PRODUCT VARCHAR(20), --ν ǰ
LOSS_DATE DATE --ν ¥
);
-- ̺
CREATE TABLE COMIC_COMMENTS(
CMNT_NUM NUMBER, -- ۹ȣ
CMNT_BOARDNUM NUMBER, -- ۹ȣ
CMNT_CONTENT VARCHAR2(2000) NOT NULL,
CMNT_ID VARCHAR2(30),
CMNT_DATE DATE,
CONSTRAINT CMNT_FK_ID FOREIGN KEY(CMNT_ID)
REFERENCES COMIC_MEMBER(MEMBER_ID) ON DELETE CASCADE
);
-- Խ ̺
CREATE TABLE COMIC_BOARD(
BOARD_NUM NUMBER PRIMARY KEY,
BOARD_ID VARCHAR2(30) NOT NULL,
BOARD_CONTENT VARCHAR2(2000) NOT NULL,
BOARD_DATE DATE,
BOARD_TITLE VARCHAR2(50) NOT NULL,
CONSTRAINT BOARD_FK_ID FOREIGN KEY(BOARD_ID)
REFERENCES COMIC_MEMBER(MEMBER_ID) ON DELETE CASCADE
);
--ǰֹ ̺
CREATE TABLE COMIC_ORDERVIEW(
ORDERVIEW_NUM NUMBER PRIMARY KEY,
ORDERVIEW_CATEGORY VARCHAR2(30) NOT NULL,
ORDERVIEW_PRODUCT_NUM NUMBER NOT NULL,
);
-- ǰ̺
CREATE TABLE COMIC_ORDERVIEW_PRODUCT(
ORDERVIEW_NUM NUMBER PRIMARY KEY,
ORDERVIEW_PRODUCT_NUM NUMBER,
CONSTRAINT COMIC_PRODUCTSTOCK_NUM_FK2 FOREIGN KEY (ORDERVIEW_PRODUCT_NUM)
REFERENCES COMIC_PRODUCTSTOCK (PRODUCT_NUM) ON DELETE CASCADE
);
insert into comic_productstock (product_num, product_name, product_price, product_qty, product_category)
values (1, 'īī', 2200, 9999, 'Ŀ');
insert into comic_productstock (product_num, product_name, product_price, product_qty, product_category)
values ((select max(product_num) from comic_productstock)+1, 'īī', 2200, 9999, 'Ŀ');
commit; |
Markdown | UTF-8 | 9,568 | 3.28125 | 3 | [] | no_license | ## Cards
1. A card is a piece of paper with unique related data that serves as an entry point to more detailed information. For example, a card could contain a photo, text, and a link about a single subject.
2. Cards have a constant width and variable height. The maximum height is limited to the height of the available space on a platform, but it can temporarily expand (for example, to display a comment field). Cards do not flip over to reveal information on the back.
### Usage
1. Definition
1. Cards are a convenient means of displaying content composed of different elements. They’re also well-suited for showcasing elements whose size or supported actions vary, like photos with captions of variable length.
2. A card collection is coplanar, or a layout of cards on the same plane.
2. When to use - Use a card layout when displaying content that:
1. As a collection, comprises multiple data types (for example, the card collection consists of images, movies, and text).
2. Does not require direct comparison (a user is not directly comparing images or text strings).
3. Supports content of highly variable length, such as comments.
4. Consists of rich content or interaction, such as +1 buttons or comments.
5. Would otherwise be in a list but needs to display more than three lines of text.
6. Would otherwise be in a grid list but needs to display more text to supplement the image.
### Content
1. Card content type and quantity can vary greatly. Cards within a card collection can each contain a unique data set. For example, various cards within a card collection might contain a checklist with an action, a note with an action, and a note with a photo.
2. Cards provide context and an entry point to more robust information and views. Don't overload cards with extraneous information or actions.
3. Content hierarchy
1. Use hierarchy within the card to direct users’ attention to the most important information. For example, place primary content at the top of the card, or use typography to emphasize primary content.
4. Images can help users easily compare and contrast content between cards. However, their size and placement within the card depends on whether images are the primary content or being used to supplement other content on the card.
5. Background images
1. Text is most legible when placed on a solid color background with a sufficient contrast ratio to the text. Text placed on image backgrounds should preserve text legibility.
### Actions
1. The primary action in a card is typically the card itself.
2. Supplemental actions can vary from card to card in a collection, depending on the content type and expected outcome; for example, playing a movie versus opening a book. Within cards in a collection, position actions consistently.
3. Supplemental actions
1. Supplemental actions within the card are explicitly called out using icons, text, and UI controls, typically placed at the bottom of the card.
2. Limit supplemental actions to two actions, in addition to an overflow menu.
4. UI controls
1. UI controls, like a slider, placed inline with primary content can modify the view of the primary content. For example, a slider to choose a day, stars to rate content, or a segmented button to select a date range.
5. Overflow menu
1. An overflow menu (optional) is typically placed in the upper-right corner of cards, but can be in the lower right if the placement improves content layout and legibility.
2. Take care not to overload an overflow menu with too many actions.
6. Considerations
1. Inline links within text content are strongly discouraged.
2. Although cards can support multiple actions, UI controls, and an overflow menu, use restraint and remember that cards are entry points to more complex and detailed information.
### Content blocks
1. Cards are constructed using blocks of content which include:
1. An optional header
2. A primary title
3. Rich media
4. Supporting text
5. Actions
2. These content blocks can be combined to create visual hierarchy within a card.
3. Content block types
1. Rich media
1. 16:9 or 1:1 aspect ratio (recommended)
2. Actions
1. Padding: 8dp
3. Primary title/text
1. Title: 24sp or 14sp
2. Subtitle: 14sp
3. Left and right padding: 16dp
4. Top padding: 16dp or 24dp (when a large primary title is present)
5. Bottom padding: 16dp (if there are additional actions or supporting text) or 24dp (no actions or supporting text)
4. Supporting text
1. Supporting text: 14sp
2. Left and right padding: 16dp
3. Top padding: 16dp
4. Bottom padding: 24dp (16dp if there are additional actions or text below)
5. Bullet points (but not their text), images, and buttons may extend outside of the 16dp padding.
5. Card margins on mobile
1. Padding from edge of screen to card: 8dp
2. Space between cards: 8dp
6. Elevation
1. Card resting elevation: 2dp
2. Card raised elevation: 8dp
4. Content block combinations
1. The following examples illustrate some possible combinations of content blocks.
1. Example 1
1. Media area - 16:9 ratio
3. Supporting text
1. Text: 14sp
2. Padding: 16dp
2. Example 2
1. Avatar, Title, and Subtitle area - 72dp
2. Media area - 16:9 ratio
3. Supporting text
1. Text: 14sp
2. Padding: 16dp
4. Actions - Padding: 8dp
3. Example 3
1. Avatar, Title, and Subtitle area - 72dp
2. Media area - 16:9 ratio
3. Actions
1. Padding: 8dp
2. Padding between actions: 4dp
4. Example 4
1. Media area - 16:9 ratio
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Bottom padding: 16dp
3. Subtext
1. Text: 14sp
2. Bottom padding: 16dp
4. Actions - Padding: 8dp
5. Example 5
1. Media area - 16:9 ratio
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Bottom padding: 16dp
3. Subtext
1. Text: 14sp
2. Bottom padding: 16dp
4. Actions - Padding: 8dp
5. Expanded supporting text
1. Text: 14sp
2. Top padding: 16dp
3. Bottom padding: 24dp
6. Example 6
1. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Bottom padding: 16dp
2. Subtext
1. Text: 14sp
2. Bottom padding: 16dp
3. Supporting text
1. Text: 14sp
2. Top padding: 16dp
3. Bottom padding: 16dp
4. Actions - Padding: 8dp
7. Example 7
1. Media area - 16:9 ratio
2. Actions - Padding: 8dp
8. Example 8
1. Media area - 1:1 ratio
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Subtext
1. Text: 14sp
2. Bottom padding: 16dp
4. Actions - Padding: 8dp
9. Example 9
1. Media area - 1:1 ratio
2. Primary text - Text: 24sp
3. Actions - Padding: 8dp
10. Example 10
1. Media area
1. 1x
2. Top padding: 16dp
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Subtext - Text: 14sp
4. Actions - Padding: 8dp
11. Example 11
1. Media area
1. 3/8x
2. Top padding: 16dp
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Subtext - Text: 14sp
4. Actions - Padding: 8dp
12. Example 12
1. Media area
1. 2x
2. Top padding: 16dp
2. Primary text
1. Text: 24sp
2. Top padding: 24dp
3. Subtext - Text: 14sp
4. Actions - Padding: 8dp
13. Example 13
1. Media area
1. 3x
2. Padding: 16dp
2. Actions - All around padding: 8dp + 16dp
### Behavior
1. Supported gestures
1. The swipe gesture is supported on a per-card basis. Card gestures should be consistently implemented within a card collection.
2. Limit swipe gestures within a view so that they don’t overlap with one another. For example, a swipeable card should not contain a swipeable image carousel so that only a single action occurs when the card is swiped.
3. The pick-up-and-move gesture is also supported. However, consider whether it is important for the user to be able to sort cards within the collection, or if the content would be better organized using programmatic filtering or sorting.
2. Card collection filtering and sorting
1. Card collections can be programmatically sorted or filtered by date, file size, alphabetical order, or other parameters. The first item in the collection is positioned at the top left of the collection, and the order proceeds left to right and top to bottom.
3. Scrolling
1. Card collections only scroll vertically. Card content that exceeds the maximum card height is truncated and does not scroll.
2. Cards with truncated content can be expanded, which means the card height may exceed the maximum height of the view. In this case, the card will scroll with the card collection.
4. Card focus
1. When traversing through focus points on a card, all focusable elements are visited before moving to the next card.
2. For interfaces that depend on focus traversal for navigation (D-pad and keyboard), cards should have either a primary action or open a new view containing primary and supplemental actions.
|
Python | UTF-8 | 537 | 3.8125 | 4 | [] | no_license | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 22 15:29:39 2021
@author: Pipe
"""
# Escribir un programa que solicite por teclado 10 notas de alumnos y nos
# informe cuántos tienen notas mayores o iguales a 7 y cuántos menores.
aprobados = 0
reprobados = 0
for i in range(10):
nota = int(input("Ingrese la nota:"))
if nota >=7:
aprobados = aprobados + 1
else:
reprobados = reprobados + 1
print("Cantidad de aprobados", aprobados)
print("Cantidad de reprobados:", reprobados)
|
Java | UTF-8 | 2,121 | 2.15625 | 2 | [] | no_license | package br.com.unipar.alissonchagasaare;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
public class MainActivity extends AppCompatActivity {
private EditText edAtivo, edlucro_Liquido, edPatrimonio_Liquido, edN_Acoes_emitidas_na_Bolsa, edPreco_Atual;
Double LPA, PL, ROE, VPA, PVP;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void calcularResult(View view){
calcular();
telaResult(view);
}
public void calcular() {
//Recuperar os valores
edAtivo = findViewById(R.id.edAtivo);
edlucro_Liquido = findViewById(R.id.edlucro_Liquido);
edPatrimonio_Liquido = findViewById(R.id.edPatrimonio_Liquido);
edN_Acoes_emitidas_na_Bolsa = findViewById(R.id.edN_Acoes_emitidas_na_Bolsa);
edPreco_Atual = findViewById(R.id.edPreco_Atual);
//Converter valores
Double lucroLiquido = Double.parseDouble(edlucro_Liquido.getText().toString());
Double patrimonioLiquido = Double.parseDouble(edPatrimonio_Liquido.getText().toString());
Long numeroAcoesEmitidasNaBolsa = Long.parseLong(edN_Acoes_emitidas_na_Bolsa.getText().toString());
Double precoAtual = Double.parseDouble(edPreco_Atual.getText().toString());
// Calcular valores
LPA = lucroLiquido / numeroAcoesEmitidasNaBolsa;
PL = precoAtual / LPA;
ROE = (lucroLiquido / patrimonioLiquido)*100;
VPA = patrimonioLiquido / numeroAcoesEmitidasNaBolsa;
PVP = precoAtual / VPA;
}
public void telaResult(View view){
Intent intent = new Intent(this,Result.class);
Bundle x = new Bundle();
x.putDouble("LPA", LPA);
x.putDouble("PL", PL);
x.putDouble("ROE", ROE);
x.putDouble("VPA", VPA);
x.putDouble("PVP", PVP);
intent.putExtras(x);
startActivity(intent);
finish();
}
}
|
Java | UTF-8 | 6,123 | 1.960938 | 2 | [] | no_license | package com.example.dss.project.Fragment;
import android.app.DatePickerDialog;
import android.app.TimePickerDialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TimePicker;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import com.example.dss.R;
import com.example.dss.project.Activity.MapsActivity;
import java.text.SimpleDateFormat;
import java.util.Calendar;
public class ViewHistory extends Fragment {
EditText searchFrom, searchTo;
Button showSchedule, xemlichtrinh, chiduong;
String timeFrom, timeTo, speed, stringchiduong;
LinearLayout linearViewHistory, linearViewButton;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_view_history, container, false);
showSchedule = view.findViewById(R.id.show_schedule);
xemlichtrinh = view.findViewById(R.id.schedule);
chiduong = view.findViewById(R.id.get_me_there);
searchFrom = view.findViewById(R.id.edit_from);
searchTo = view.findViewById(R.id.edit_to);
linearViewHistory = view.findViewById(R.id.linear_view_history);
linearViewButton = view.findViewById(R.id.linear_view_button);
searchFrom.setInputType(InputType.TYPE_NULL);
searchTo.setInputType(InputType.TYPE_NULL);
Calendar calendar = Calendar.getInstance();
String date = calendar.get(Calendar.YEAR) + "-"+ calendar.get(Calendar.MONTH)+ "-"+ calendar.get(Calendar.DAY_OF_MONTH) ;
String time = calendar.get(Calendar.HOUR_OF_DAY) + ":" + calendar.get(Calendar.MINUTE)+ ":" + calendar.get(Calendar.SECOND);
searchFrom.setText(date + " " + time);
searchTo.setText(date + " " + time);
linearViewHistory.setVisibility(View.GONE);
xemlichtrinh.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
linearViewButton.setVisibility(View.GONE);
linearViewHistory.setVisibility(View.VISIBLE);
}
});
chiduong.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MapsActivity activity = (MapsActivity) getActivity();
stringchiduong = "chiduong";
String strUri = "https://www.google.com/maps/dir/" + activity.getChosingCarLat() + "," + activity.getChosingCarLog() + "/" + activity.getMyLat() + "," + activity.getMyLog();
Intent intent = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(strUri));
intent.putExtra("chiduong", stringchiduong);
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
startActivity(intent);
}
});
searchFrom.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showDateTimeDialog(searchFrom);
System.out.println("Chọn ngày giờ khởi hành");
}
});
searchTo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showDateTimeDialog(searchTo);
System.out.println("Chọn ngày giờ kết thúc");
}
});
showSchedule.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
MapsActivity activity = (MapsActivity) getActivity();
String carSignFromActivity = activity.getChosingCarSign();
speed = "showSpeedSeekBar";
Intent intent = new Intent(getActivity(), MapsActivity.class);
timeFrom = searchFrom.getText().toString();
timeTo = searchTo.getText().toString();
intent.putExtra("car", carSignFromActivity);
intent.putExtra("timeFrom", timeFrom);
intent.putExtra("timeTo", timeTo);
intent.putExtra("speedCar", speed);
startActivity(intent);
//getActivity().onBackPressed();
}
});
return view;
}
public void showDateTimeDialog(final EditText edit_fromOrTo){
final Calendar c = Calendar.getInstance();
DatePickerDialog.OnDateSetListener dateSetListener = new DatePickerDialog.OnDateSetListener() {
@Override
public void onDateSet(DatePicker datePicker, int year, int month, int dayOfMonth) {
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month);
c.set(Calendar.DAY_OF_MONTH, dayOfMonth);
TimePickerDialog.OnTimeSetListener timeSetListener = new TimePickerDialog.OnTimeSetListener() {
@Override
public void onTimeSet(TimePicker timePicker, int hourOfDay, int minute) {
c.set(Calendar.HOUR_OF_DAY, hourOfDay);
c.set(Calendar.MINUTE, minute);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd-MM-yy HH:mm:ss");
edit_fromOrTo.setText(simpleDateFormat.format(c.getTime()));
}
};
new TimePickerDialog(getContext(), timeSetListener, c.get(Calendar.HOUR_OF_DAY), c.get(Calendar.MINUTE), false).show();
}
};
new DatePickerDialog(getContext(), dateSetListener, c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH)).show();
}
}
|
Markdown | UTF-8 | 2,904 | 2.578125 | 3 | [
"MIT"
] | permissive | ---
title: "だから、これはゆうくんと私についてです。"
date: 2019-12-29 13:30:19
categories:
- General
tags:
- "祐くん"
header:
image: /assets/images/20191229132657.jpg
og_image: /assets/images/20191229132657.jpg
---
だから、これはゆうくんと私についてです。」「あなた…私…私も彼と話をしました。私は彼に、私だけが持っている人生に満足するだろうと言った。同時に、私は彼に、私はおそらく女の子の世界では決して成長しないことを理解したと語った。私だけにとどまらないような決断をすることが重要だと思いました。ゆうくんもこの方法を見つけたに違いない。現実に頼ることなく孤独な存在から脱出するという考えを思いついたのは珍しいことではない」と語った。微笑、状況も理解していませんでした。恋人のいない少女も同じように考えるべきです。二人が話していたことは非常に奇妙でした。マキと私は異なる意見を持ちました。彼女はまた友情にも強い信念を持っていました。私も友情に強い信念を持っていましたが、それでもこの状況で、もし私たちが本当に話をしたなら、マキは同意するでしょう。 tは私が理解できなかったことを意味します。しかし、私は間違っていたのです。間違いはないと思います。マキは、その日の初日はそのような状況だと思っていたに違いありません。マキは真剣な表情で答えました。私たちのクラに入ったとき、私の表情を見たとき、彼女は強い気持ちでしたトイレ。クラスを止めて「今日参加しなくても大丈夫だよ」と言ったとき、彼女はそれに気付いていたに違いありません。そうだった。それが私が不安を感じる最初の理由でした。彼女が他の先生が恐ろしい人だと思っていたなら、私はレッスンを受けることに緊張しなかったでしょう。しかし、彼女はそれを言う以上のことはしませんでした。私は彼女が助けるつもりはないと感じました。それでした。彼女がそれを言ったばかりなら、どうして私は不安を感じないでしょうか?マキは、おそらくすべてのクラスに参加したとき、私は疑わしいと思っていました。しかし、もしそうなら、彼女は私がクラスについて単純に彼女に尋ねたとき、私が疑っているとは思わなかった。彼女は私に状況を説明するのが恥ずかしいと感じました、そして、私に説明する能力がなかったとき、彼女も不安を感じたことがわかりました。 「なるほど、ゆうくん、それは
|
JavaScript | UTF-8 | 1,507 | 3.34375 | 3 | [
"MIT"
] | permissive | /**
*
*/
var n = 0;
function count(){
n = n+1;
document.getElementById("number").innerHTML=n;
zero();
}
function zero(){
if(document.getElementById("number").innerHTML=="0"){
document.getElementById("count").style.display="none";
}else{
document.getElementById("count").style.display="block";
}
}
//how many time left
//showDiff();
function showDiff(X,id){
//alert("time :"+X+" id :"+id);
var date1 = new Date();
var date2 = new Date(''+X+'');
//Customise date2 for your required future time
var diff = (date1 - date2)/1000;
var diff = Math.abs(Math.floor(diff));
var days = Math.floor(diff/(24*60*60));
var leftSec = diff - days * 24*60*60;
var hrs = Math.floor(leftSec/(60*60));
var leftSec = leftSec - hrs * 60*60;
var min = Math.floor(leftSec/(60));
var leftSec = leftSec - min * 60;
if( days < 1){
if(hrs < 1 ){
if( min < 1){
document.getElementById(id).innerHTML = leftSec+" seconds a go ";
}else{
document.getElementById(id).innerHTML = min+" minute a go";
}
}else{
document.getElementById(id).innerHTML = hrs+" hours a go";
}
} else if (days >= 1){
document.getElementById(id).innerHTML = days+" days a go";
}
//setTimeout(showDiff,1000);
}
function none(){
document.getElementById("count").style.display="none";
}
|
TypeScript | UTF-8 | 633 | 2.515625 | 3 | [] | no_license | import { RedisClient } from "redis";
import { Request, Response, NextFunction } from "express";
class Authorization {
constructor(private redis: RedisClient) {
this.redis = redis;
}
isAuthorized = (req: Request, res: Response, next: NextFunction) => {
const { authorization } = req.headers;
if (!authorization) {
return res.status(401).json("Unauthorized");
}
return this.redis.get(authorization, (err, reply) => {
if (err || !reply) {
return res.status(401).json("Unauthorized");
}
return next();
});
};
}
export default Authorization;
|
Python | UTF-8 | 897 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | import requests
import json
import pprint
import sys
def hit_url(url, data_dict):
res = requests.get(url).text.split("\n")
for each_key in res:
new_url= url+"/"+each_key
if each_key.endswith('/'):
another_key = each_key.split('/')[-2]
final_meta[another_key]={}
hit_url(new_url, final_meta[another_key])
else:
res = requests.get(new_url)
try:
data_dict[each_key] = json.loads(res.text)
except:
# pass
data_dict[each_key] = res.text
return data_dict
base_url = "http://169.254.169.254/latest/meta-data"
final_meta = {}
hit_url(base_url,final_meta)
if len(sys.argv)>1:
for each_key in sys.argv[1:]:
pprint.pprint("Requested Key Name and Value {}:{}".format(each_key,final_meta.get(each_key)))
else:
pprint.pprint(final_meta)
|
Python | UTF-8 | 7,340 | 2.65625 | 3 | [] | no_license | #!/usr/local/bin/python3
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.relativelayout import RelativeLayout
from kivy.uix.label import Label
from kivy.properties import ListProperty, ObjectProperty, \
NumericProperty, StringProperty
from kivy.uix.button import Button
from kivy.uix.popup import Popup
from blackjack_1 import Controller
from copy import deepcopy
class WelcomeScreen(Popup):
pass
class CardView(RelativeLayout):
pass
class PointsLabel(Label):
pass
class InsuranceButtons(BoxLayout):
def yes(self):
c.buy_insurance()
s.game_controller()
def no(self):
c.decline_insurance()
s.game_controller()
class PostEvaluationButtons(BoxLayout):
def deal(self):
if s.welcome:
s.welcome.dismiss()
s.bet_size.disabled = False
c.player.bet = s.bet_size.value
c.run()
s.game_controller()
def start_over(self):
pass
class PlayActionButtons(BoxLayout):
active_options = ListProperty([1, 1, 1, 1])
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.active_options = c.options
def stand(self):
c.stand(c.player_hand)
s.game_controller()
def split(self):
c.split(c.player_hand)
s.game_controller()
def double(self):
c.double(c.player_hand)
s.game_controller()
def hit(self):
c.hit(c.player_hand)
s.game_controller()
class Screen(BoxLayout):
playerhands = ListProperty()
dealercards = ListProperty()
player_screen = ObjectProperty()
dealer_screen = ObjectProperty()
buttonstrip = ObjectProperty()
cash_label = ObjectProperty()
bet_size = ObjectProperty()
result_message = StringProperty()
shoe = ObjectProperty()
pos_para = NumericProperty(.4)
pos_para_dealer = NumericProperty(.4)
hand_spacing = NumericProperty(100)
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.x_card_offset = 35
self.y_card_offset = 6
self.no_cash_text = {
'button_text': 'Close',
'label_text': "You don't have enough cash for this bet",
'title': 'No Cash'
}
self.start_over_text = {
'button_text': 'Play Again',
'label_text': "You lost all your money!!!\n\nYou make me sick you STUPID FUCK.",
'title': 'Stupid Fuck'
}
self.popup = None
self.start_screen()
def game_controller(self):
self.bet_size.min = min(25, c.player.cash)
self.buttonstrip.clear_widgets()
self.update_screen()
self.bet_size.disabled = True
if c.no_cash and not c.game_over:
self.no_cash_popup(self.no_cash_text)
c.no_cash = False
if c.game_over:
self.no_cash_popup(self.start_over_text)
return
if c.insurance_option:
self.buttonstrip.add_widget(InsuranceButtons())
else:
c.player_input(c.player_hand)
self.update_screen()
if c.player_hand.played:
self.bet_size.disabled = False
self.update_screen()
self.buttonstrip.add_widget(PostEvaluationButtons())
else:
self.buttonstrip.add_widget(PlayActionButtons())
def update_screen(self):
self.playerhands = deepcopy(c.player.hands)
self.dealercards = c.dealer.hand.cards
self.cash_label.text = '{:,.0f}'.format(c.player.cash)
self.shoe.text = 'Shoe: {cards}\n({decks:,.1f} decks)\nCut: {cut_card:,.0f}\n({cut_card_decks:,.1f} decks)\n{shuffle}'.format(
cards=len(c.shoe.contents), decks=len(c.shoe.contents)/52,
cut_card=c.shoe.cut_card, cut_card_decks=c.shoe.cut_card/52,
shuffle = c.shoe.will_shuffle)
def k_play(self, screen, hand):
screen.clear_widgets()
x = 0
y = 0
for i in hand.cards:
screen.add_widget(Image(source=
'./Cards/'+i.rank.lower()+'_'+ i.suit.lower()+'.png',
pos=(x,y), size_hint_x=1.1))
x += self.x_card_offset
y += self.y_card_offset
if len(hand.cards) > 1:
screen.add_widget(PointsLabel(text=str(hand.get_value()),
pos=(x + 52, 0)
))
return screen
def on_playerhands(self, *args):
self.player_screen.clear_widgets()
# determines space between multiple hands
self.hand_spacing = max(150 - max(len(self.playerhands)-3, 0)
* 65, 15)
# determines left margin
self.pos_para = max(.4 - len(self.playerhands)/10, 0)
if len(self.playerhands) > 2:
self.x_card_offset = 18
self.y_card_offset = 23
else:
self.x_card_offset = 35
self.y_card_offset = 6
for hand in self.playerhands:
cardview = CardView()
screen = self.update_player_hand(cardview, hand)
self.player_screen.add_widget(screen)
def update_player_hand(self, screen, hand):
self.k_play(screen, hand)
screen.add_widget(Label(
text = hand.result_message,
font_size = '25dp',
pos_hint = {'center_x': .5, 'center_y': .1}
))
self.cash_label.text = '{:,.0f}'.format(c.player.cash)
return screen
def on_dealercards(self, *args):
self.x_card_offset = 35
self.y_card_offset = 0
if len(c.dealer.hand.cards) > 6:
self.pos_para_dealer = 0.2
self.k_play(self.dealer_screen, c.dealer.hand)
def no_cash_popup(self, t):
def action_post_dismiss(instance):
if c.game_over:
self.play_again()
else:
pass
btnclose = Button(text=t['button_text'], size_hint_y=None, height='40sp')
content = BoxLayout(orientation='vertical')
content.add_widget(Label(text=t['label_text'], halign='center', font_size='20sp'))
content.add_widget(btnclose)
self.popup = Popup(title = t['title'],
content = content, size_hint = (.5, .5),
auto_dismiss=False, title_align='center')
btnclose.bind(on_release=self.popup.dismiss)
self.popup.bind(on_dismiss=action_post_dismiss)
self.popup.open()
def play_again(self):
c.start_over()
self.start_screen()
def start_screen(self):
self.dealer_screen.clear_widgets()
self.player_screen.clear_widgets()
self.buttonstrip.clear_widgets()
self.bet_size.disabled = False
c.no_cash = False
self.buttonstrip.add_widget(PostEvaluationButtons())
self.cash_label.text = '{:,.0f}'.format(c.player.cash)
self.welcome = WelcomeScreen()
self.welcome.open()
class Bj7App(App):
def build(self):
global s
s = Screen()
return s
if __name__ == '__main__':
c = Controller()
Bj7App().run()
|
PHP | UTF-8 | 1,772 | 2.640625 | 3 | [] | no_license | <?php
function hiba($hibakod){
header('Location: index.php?hiba=' . $hibakod);
die;
}
require_once('adatkezeles.php');
session_start();
$fn = trim($_POST['fnev']);
$j1 = trim($_POST['jszo1']);
$j2 = trim($_POST['jszo2']);
if(felhasznaloLetezik($fn)) hiba('fletezik');
if(strlen($fn) < 5 || strlen($fn) > 15) hiba('fhossz');
if( !preg_match('/^[a-zöüóőúéáűíA-ZÖÜÓŐÚÉÁŰÍ0-9]*$/', $fn) ) hiba('fkomplex');
if($j1 != $j2) hiba('jszokul');
if(strlen($j1) < 8) hiba('jhossz');
if(
!preg_match('/[a-z]/', $j1) ||
!preg_match('/[A-Z]/', $j1) ||
!preg_match('/[0-9]/', $j1) ||
!preg_match('/[\.\-\,\?\!\+]/', $j1)
) hiba('jkomplex');
regisztral($fn, $j1);
$_SESSION['fnev'] = $fn;
header('Location: index.php');
/*
if(!felhasznaloLetezik($fn)){
if(strlen($fn) >= 5 && strlen($fn) <= 15){
if( preg_match('/^[a-zöüóőúéáűíA-ZÖÜÓŐÚÉÁŰÍ0-9]*$/', $fn) ){
if($j1 == $j2){
if(strlen($j1) >= 8){
if(
preg_match('/[a-z]/', $j1) &&
preg_match('/[A-Z]/', $j1) &&
preg_match('/[0-9]/', $j1) &&
preg_match('/[\.\-\,\?\!\+]/', $j1)
){
regisztral($fn, $j1);
$_SESSION['fnev'] = $fn;
header('Location: index.php');
}else{
hiba('jkomplex');
}
}else{
hiba('jhossz');
}
}else{
hiba('jszokul');
}
}else{
hiba('fkomplex');
}
}else{
hiba('fhossz');
}
}else{
hiba('fletezik');
}
*/ |
Java | UTF-8 | 669 | 2.515625 | 3 | [] | no_license | package shared.communication.params.move;
/**
*
* Defines an accept trade command for the server.
*
*/
public class AcceptTrade_Params {
private final String type = "acceptTrade";
private int playerIndex;
private boolean willAccept;
public AcceptTrade_Params(int playerIndex, boolean willAccept) {
this.willAccept = willAccept;
this.playerIndex = playerIndex;
}
public boolean isWillAccept() {
return willAccept;
}
public void setWillAccept(boolean willAccept) {
this.willAccept = willAccept;
}
public int getPlayerIndex() {
return playerIndex;
}
public void setPlayerIndex(int playerIndex) {
this.playerIndex = playerIndex;
}
}
|
C++ | UTF-8 | 3,041 | 2.65625 | 3 | [
"MIT"
] | permissive | #pragma once
#include <stdint.h>
#include <vector>
#include <array>
#include <ostream>
#include "USBDevice.h"
#include "crazyflieLinkCpp/utils.hpp"
namespace bitcraze {
namespace crazyflieLinkCpp {
#define ACK_MAXSIZE 33
class Crazyradio
: public USBDevice
{
public:
enum Datarate
{
Datarate_250KPS = 0,
Datarate_1MPS = 1,
Datarate_2MPS = 2,
};
enum Power
{
Power_M18DBM = 0,
Power_M12DBM = 1,
Power_M6DBM = 2,
Power_0DBM = 3,
};
class Ack
{
friend class Crazyradio;
public:
Ack()
: data_()
, size_(0)
{
data_[0] = 0;
}
bool ack() const
{
return getBitBieldValue<uint8_t, 0, 1>(data_[0]);
}
operator bool() const
{
return ack();
}
bool powerDet() const
{
return getBitBieldValue<uint8_t, 1, 1>(data_[0]);
}
uint8_t retry() const
{
return getBitBieldValue<uint8_t, 2, 4>(data_[0]);
}
const uint8_t* data() const
{
return &data_[1];
}
uint8_t size() const
{
return size_;
}
friend std::ostream &operator<<(std::ostream &out, const Ack &a)
{
out << "Ack(";
out << "ack=" << a.ack();
out << ",powerDet=" << a.powerDet();
out << ",retry=" << (int)a.retry();
out << ",data=";
for (size_t i = 0; i < a.size_; ++i)
{
out << (int)a.data()[i] << " ";
}
out << ")";
return out;
}
private:
std::array<uint8_t, ACK_MAXSIZE> data_;
size_t size_;
};
public:
Crazyradio(libusb_device *dev);
virtual ~Crazyradio();
// float version() const {
// return m_version;
// }
void setChannel(
uint8_t channel);
uint8_t channel() const {
return channel_;
}
void setAddress(
uint64_t address);
uint64_t address() const {
return address_;
}
void setDatarate(
Datarate datarate);
Datarate datarate() const {
return datarate_;
}
void setPower(
Power power);
void setArc(
uint8_t arc);
void setArdTime(
uint8_t us);
void setArdBytes(
uint8_t nbytes);
void setAckEnabled(
bool enable);
bool ackEnabled() const {
return ackEnabled_;
}
void setContCarrier(
bool active);
Ack sendPacket(
const uint8_t* data,
uint32_t length);
void sendPacketNoAck(
const uint8_t* data,
uint32_t length);
void send2PacketsNoAck(
const uint8_t* data,
uint32_t totalLength);
private:
uint8_t channel_;
uint64_t address_;
Datarate datarate_;
bool ackEnabled_;
};
} // namespace crazyflieLinkCpp
} // namespace bitcraze |
C | UTF-8 | 1,352 | 3.25 | 3 | [] | no_license | #include<stdio.h>
#include<ctype.h>
#include "calc.h"
int getop(char s[])
{
int i, c;
int c1, c2;
while ((s[0] = c = getch()) == ' ' || c == '\t');
s[1] = '\0';
if (!isdigit(c) && c != '.' && c != '-' && c != 's' && c != 'p' && c != 'e')
return c;
i = 0;
switch (c) {
case '-':
if (isdigit(c = getch()) || c == '.')
{
s[++i] = c;
}
else {
if (c != EOF)
ungetch(c);
return '-';
} break;
case 's':
if ((c1 = getch()) == 'i' && (c2 = getch()) == 'n')
return 's';
else {
ungetch(c2); ungetch(c1);
return 'u';
}
break;
case 'p':
if ((c1 = getch()) == 'o' && (c2 = getch()) == 'w')
return 'p';
else {
ungetch(c2); ungetch(c1);
return 'u';
}
break;
case 'e':
if ((c1 = getch()) == 'x' && (c2 = getch()) == 'p')
return 'e';
else {
ungetch(c2); ungetch(c1);
return 'u';
}
break;
default : break;
}
if (isdigit(c))
while (isdigit(s[++i] = c = getch()));
if (c == '.')
while (isdigit(s[++i] = c = getch()));
s[i] = '\0';
if (c != EOF)
ungetch(c);
return NUMBER;
} |
Python | UTF-8 | 1,538 | 3.28125 | 3 | [] | no_license | from heapq import heappush, heappop, heappushpop, heapify
class Log(object):
"""Neatly formated and accessable Log"""
def __init__(self, raw_line):
"""Log variables kept as string rep for simplicity"""
aux = raw_line.split(" ")
bytes = 0 if aux[-1] == "-\n" else aux[-1]
self.host = aux[0]
self.timestamp = aux[3]+aux[4]
self.http_req = raw_line.split("\"")[1]
self.reply = aux[-2]
self.bytes = int(bytes.rstrip()) if type(bytes) == type('') else bytes
#helpful values
self.success = False if (self.reply[0] == '5' or self.reply[0] == '4') else True
self.isGet = True if self.http_req.split(" ")[0] == "GET" else False
self.resource = self.http_req.split(" ")[1] if self.success else None
def __str__(self):
return self.host + '**' + self.timestamp + '**' + self.http_req + '**' + self.reply + '**' + str(self.bytes)
class Heap_Manager(object):
""" Responsible for storing the largest max_n of a stream of elements. Does not store more values than max_n.
elements in heap are tuples with the following structure: (count, name)
- where 'count' is an int and represents the count of the element
- where 'name' is a string and represents the name of the element
"""
def __init__(self, max_n):
self.heap = []
self.max = max_n
def process(self, element):
if len(self.heap) < self.max:
heappush(self.heap, element)
else:
if element[0] > self.get_min_count():
heappushpop(self.heap, element)
def get_min_count(self):
if len(self.heap) == 0: return 0
return self.heap[0][0]
|
Markdown | UTF-8 | 770 | 2.875 | 3 | [] | no_license | ---
title: messageRange
description: Indicates a range of chat messages
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: messageRange
[Back to constructors index](index.md)
Indicates a range of chat messages
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
|min\_id|[int](../types/int.md) | Yes|Start of range (message ID)|
|max\_id|[int](../types/int.md) | Yes|End of range (message ID)|
### Type: [MessageRange](../types/MessageRange.md)
### Example:
```php
$messageRange = ['_' => 'messageRange', 'min_id' => int, 'max_id' => int];
```
Or, if you're into Lua:
```lua
messageRange={_='messageRange', min_id=int, max_id=int}
```
|
C++ | UTF-8 | 3,062 | 2.8125 | 3 | [] | no_license | #ifndef TRANSFORMTOOL_H
#define TRANSFORMTOOL_H
#include <ngl/Mat4.h>
#include "config.h"
/// TODO: need serious refactoring NO COMMENT :(
class TransformTool
{
public:
TransformTool() { reset(); }
void reset()
{
m_angle0 = m_angle1 = m_angle2 = 0;
m_scale = 1;
m_translation.set(0,0,0);
m_matrix.identity();
}
ngl::Mat4 getMatrix()
{
ngl::Mat4 rotX;
ngl::Mat4 rotY;
ngl::Mat4 scale;
// create the rotation matrices
rotX.rotateX(m_angle1);
rotY.rotateY(m_angle0);
scale.scale(m_scale, m_scale, m_scale);
// multiply the rotations
ngl::Mat4 m = rotY * rotX * scale;
m_matrix.translate(m_translation[0], m_translation[1], m_translation[2]);
return m * m_matrix;
}
void setTransform(const mg::Matrix4D& m)
{
m_matrix.m_00 = m(0,0);
m_matrix.m_01 = m(1,0);
m_matrix.m_02 = m(2,0);
m_matrix.m_03 = m(3,0);
m_matrix.m_10 = m(0,1);
m_matrix.m_11 = m(1,1);
m_matrix.m_12 = m(2,1);
m_matrix.m_13 = m(3,1);
m_matrix.m_20 = m(0,2);
m_matrix.m_21 = m(1,2);
m_matrix.m_22 = m(2,2);
m_matrix.m_23 = m(3,2);
m_matrix.m_30 = m(0,3);
m_matrix.m_31 = m(1,3);
m_matrix.m_32 = m(2,3);
m_matrix.m_33 = m(3,3);
m_translation.set(m(0,3), m(1,3), m(2,3));
}
mg::Matrix4D getTransform()
{
ngl::Mat4 m = getMatrix();
mg::Matrix4D transform;
transform(0,0) = m.m_00;
transform(1,0) = m.m_01;
transform(2,0) = m.m_02;
transform(3,0) = m.m_03;
transform(0,1) = m.m_10;
transform(1,1) = m.m_11;
transform(2,1) = m.m_12;
transform(3,1) = m.m_13;
transform(0,2) = m.m_20;
transform(1,2) = m.m_21;
transform(2,2) = m.m_22;
transform(3,2) = m.m_23;
transform(0,3) = m.m_30;
transform(1,3) = m.m_31;
transform(2,3) = m.m_32;
transform(3,3) = m.m_33;
return transform;
}
mg::Real m_angle0;
mg::Real m_angle1;
mg::Real m_angle2;
mg::Real m_scale;
mg::Vec3D m_translation;
ngl::Mat4 m_matrix;
};
class Transformation
{
public:
Transformation() { reset(); }
void reset() { m_matrix.identity(); }
const ngl::Mat4& getMatrix() const { return m_matrix; }
void setMatrix(const mg::Matrix4D& m)
{
m_matrix.m_00 = m(0,0);
m_matrix.m_01 = m(1,0);
m_matrix.m_02 = m(2,0);
m_matrix.m_03 = m(3,0);
m_matrix.m_10 = m(0,1);
m_matrix.m_11 = m(1,1);
m_matrix.m_12 = m(2,1);
m_matrix.m_13 = m(3,1);
m_matrix.m_20 = m(0,2);
m_matrix.m_21 = m(1,2);
m_matrix.m_22 = m(2,2);
m_matrix.m_23 = m(3,2);
m_matrix.m_30 = m(0,3);
m_matrix.m_31 = m(1,3);
m_matrix.m_32 = m(2,3);
m_matrix.m_33 = m(3,3);
}
private:
ngl::Mat4 m_matrix;
};
#endif // TRANSFORMTOOL_H
|
Java | UTF-8 | 151,632 | 1.601563 | 2 | [] | no_license | package TokenNamepackage
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
svg TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
FloatValue TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
RGBColorValue TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
StringValue TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
Value TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
engine TokenNameIdentifier
. TokenNameDOT
value TokenNameIdentifier
. TokenNameDOT
ValueConstants TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
apache TokenNameIdentifier
. TokenNameDOT
batik TokenNameIdentifier
. TokenNameDOT
util TokenNameIdentifier
. TokenNameDOT
CSSConstants TokenNameIdentifier
; TokenNameSEMICOLON
import TokenNameimport
org TokenNameIdentifier
. TokenNameDOT
w3c TokenNameIdentifier
. TokenNameDOT
dom TokenNameIdentifier
. TokenNameDOT
css TokenNameIdentifier
. TokenNameDOT
CSSPrimitiveValue TokenNameIdentifier
; TokenNameSEMICOLON
public TokenNamepublic
interface TokenNameinterface
SVGValueConstants TokenNameIdentifier
extends TokenNameextends
ValueConstants TokenNameIdentifier
{ TokenNameLBRACE
Value TokenNameIdentifier
ZERO_DEGREE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_DEG TokenNameIdentifier
, TokenNameCOMMA
0 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_1 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
1 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_4 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
4 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_11 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
11 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_19 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
19 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_20 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
20 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_21 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
21 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_25 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
25 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_30 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
30 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_32 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
32 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_34 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
34 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_35 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
35 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_42 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
42 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_43 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
43 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_45 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
45 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_46 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
46 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_47 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
47 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_50 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
50 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_60 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
60 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_61 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
61 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_63 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
63 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_64 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
64 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_65 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
65 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_69 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
69 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_70 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
70 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_71 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
71 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_72 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
72 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_75 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
75 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_79 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
79 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_80 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
80 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_82 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
82 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_85 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
85 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_87 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
87 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_90 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
90 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_91 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
91 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_92 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
92 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_95 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
95 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_96 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
96 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_99 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
99 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_102 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
102 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_104 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
104 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_105 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
105 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_106 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
106 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_107 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
107 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_112 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
112 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_113 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
113 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_114 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
114 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_119 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
119 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_122 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
122 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_123 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
123 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_124 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
124 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_127 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
127 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_130 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
130 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_133 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
133 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_134 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
134 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_135 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
135 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_136 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
136 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_138 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
138 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_139 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
139 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_140 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
140 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_142 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
142 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_143 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
143 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_144 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
144 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_147 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
147 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_148 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
148 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_149 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
149 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_150 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
150 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_152 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
152 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_153 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
153 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_154 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
154 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_158 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
158 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_160 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
160 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_164 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
164 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_165 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
165 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_169 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
169 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_170 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
170 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_173 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
173 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_175 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
175 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_176 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
176 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_178 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
178 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_179 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
179 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_180 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
180 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_181 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
181 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_182 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
182 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_183 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
183 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_184 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
184 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_185 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
185 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_186 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
186 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_188 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
188 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_189 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
189 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_191 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
191 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_193 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
193 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_196 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
196 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_199 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
199 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_203 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
203 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_204 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
204 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_205 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
205 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_206 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
206 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_208 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
208 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_209 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
209 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_210 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
210 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_211 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
211 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_212 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
212 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_213 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
213 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_214 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
214 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_215 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
215 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_216 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
216 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_218 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
218 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_219 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
219 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_220 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
220 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_221 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
221 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_222 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
222 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_224 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
224 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_225 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
225 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_226 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
226 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_228 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
228 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_230 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
230 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_232 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
232 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_233 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
233 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_235 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
235 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_237 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
237 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_238 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
238 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_239 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
239 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_240 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
240 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_244 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
244 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_245 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
245 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_248 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
248 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_250 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
250 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_251 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
251 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_252 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
252 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NUMBER_253 TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
FloatValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_NUMBER TokenNameIdentifier
, TokenNameCOMMA
253 TokenNameIntegerLiteral
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ACCUMULATE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ACCUMULATE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
AFTER_EDGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_AFTER_EDGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ALPHABETIC_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ALPHABETIC_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BASELINE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BASELINE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BEFORE_EDGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BEFORE_EDGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BEVEL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BEVEL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BUTT_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BUTT_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CENTRAL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CENTRAL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CURRENTCOLOR_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CURRENTCOLOR_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
END_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_END_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
EVENODD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_EVENODD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FILL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_FILL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FILLSTROKE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_FILLSTROKE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GEOMETRICPRECISION_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GEOMETRICPRECISION_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
HANGING_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_HANGING_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
IDEOGRAPHIC_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_IDEOGRAPHIC_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LINEARRGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LINEARRGB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LR_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LR_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LR_TB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LR_TB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MATHEMATICAL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MATHEMATICAL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MIDDLE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MIDDLE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NEW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_NEW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MITER_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MITER_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NO_CHANGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_NO_CHANGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NONZERO_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_NONZERO_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OPTIMIZELEGIBILITY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_OPTIMIZELEGIBILITY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OPTIMIZEQUALITY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_OPTIMIZEQUALITY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OPTIMIZESPEED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_OPTIMIZESPEED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
RESET_SIZE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_RESET_SIZE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
RL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_RL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
RL_TB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_RL_TB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ROUND_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ROUND_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SQUARE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SQUARE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SRGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SRGB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
START_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_START_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SUB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SUB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SUPER_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SUPER_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TB_RL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TB_RL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TEXT_AFTER_EDGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TEXT_AFTER_EDGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TEXT_BEFORE_EDGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TEXT_BEFORE_EDGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TEXT_BOTTOM_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TEXT_BOTTOM_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TEXT_TOP_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TEXT_TOP_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
USE_SCRIPT_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_USE_SCRIPT_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VISIBLEFILL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_VISIBLEFILL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VISIBLEFILLSTROKE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_VISIBLEFILLSTROKE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VISIBLEPAINTED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_VISIBLEPAINTED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VISIBLESTROKE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_VISIBLESTROKE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ALICEBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ALICEBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ANTIQUEWHITE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ANTIQUEWHITE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
AQUAMARINE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_AQUAMARINE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
AZURE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_AZURE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BEIGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BEIGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BISQUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BISQUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BLANCHEDALMOND_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BLANCHEDALMOND_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BLUEVIOLET_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BLUEVIOLET_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BROWN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BROWN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BURLYWOOD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_BURLYWOOD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CADETBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CADETBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CHARTREUSE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CHARTREUSE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CHOCOLATE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CHOCOLATE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORAL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CORAL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORNFLOWERBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CORNFLOWERBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORNSILK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CORNSILK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CRIMSON_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CRIMSON_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CYAN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_CYAN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKCYAN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKCYAN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGOLDENROD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKGOLDENROD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKKHAKI_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKKHAKI_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKMAGENTA_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKMAGENTA_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKOLIVEGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKOLIVEGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKORANGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKORANGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKORCHID_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKORCHID_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKRED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKRED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSALMON_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKSALMON_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSEAGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKSEAGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKSLATEBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKSLATEGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKSLATEGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKTURQUOISE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKTURQUOISE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKVIOLET_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DARKVIOLET_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DEEPPINK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DEEPPINK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DEEPSKYBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DEEPSKYBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DIMGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DIMGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DIMGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DIMGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DODGERBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_DODGERBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FIREBRICK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_FIREBRICK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FLORALWHITE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_FLORALWHITE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FORESTGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_FORESTGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GAINSBORO_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GAINSBORO_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GHOSTWHITE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GHOSTWHITE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GOLD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GOLD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GOLDENROD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GOLDENROD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GREENYELLOW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GREENYELLOW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_GREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
HONEYDEW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_HONEYDEW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
HOTPINK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_HOTPINK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
INDIANRED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_INDIANRED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
INDIGO_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_INDIGO_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
IVORY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_IVORY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
KHAKI_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_KHAKI_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAVENDER_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LAVENDER_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAVENDERBLUSH_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LAVENDERBLUSH_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAWNGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LAWNGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LEMONCHIFFON_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LEMONCHIFFON_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTCORAL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTCORAL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTCYAN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTCYAN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGOLDENRODYELLOW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTGOLDENRODYELLOW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTPINK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTPINK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSALMON_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSALMON_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSEAGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSEAGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSKYBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSKYBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSLATEGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSLATEGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSLATEGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSLATEGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSTEELBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTSTEELBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTYELLOW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIGHTYELLOW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIMEGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LIMEGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LINEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_LINEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MAGENTA_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MAGENTA_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMAQUAMARINE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMAQUAMARINE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMORCHID_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMORCHID_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMPURPLE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMPURPLE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSEAGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMSEAGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSLATEBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMSLATEBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSPRINGGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMSPRINGGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMTURQUOISE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMTURQUOISE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMVIOLETRED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MEDIUMVIOLETRED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MIDNIGHTBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MIDNIGHTBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MINTCREAM_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MINTCREAM_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MISTYROSE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MISTYROSE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MOCCASIN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_MOCCASIN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NAVAJOWHITE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_NAVAJOWHITE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OLDLACE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_OLDLACE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OLIVEDRAB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_OLIVEDRAB_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORANGE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ORANGE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORANGERED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ORANGERED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORCHID_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ORCHID_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEGOLDENROD_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PALEGOLDENROD_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PALEGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALETURQUOISE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PALETURQUOISE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEVIOLETRED_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PALEVIOLETRED_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PAPAYAWHIP_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PAPAYAWHIP_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PEACHPUFF_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PEACHPUFF_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PERU_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PERU_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PINK_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PINK_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PLUM_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PLUM_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
POWDERBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_POWDERBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PURPLE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_PURPLE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ROSYBROWN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ROSYBROWN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ROYALBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_ROYALBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SADDLEBROWN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SADDLEBROWN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SALMON_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SALMON_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SANDYBROWN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SANDYBROWN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SEAGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SEAGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SEASHELL_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SEASHELL_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SIENNA_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SIENNA_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SKYBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SKYBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SLATEBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEGRAY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SLATEGRAY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEGREY_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SLATEGREY_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SNOW_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SNOW_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SPRINGGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_SPRINGGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
STEELBLUE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_STEELBLUE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TAN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TAN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
THISTLE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_THISTLE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TOMATO_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TOMATO_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TURQUOISE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_TURQUOISE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VIOLET_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_VIOLET_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
WHEAT_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_WHEAT_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
WHITESMOKE_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_WHITESMOKE_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
YELLOWGREEN_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
StringValue TokenNameIdentifier
( TokenNameLPAREN
CSSPrimitiveValue TokenNameIdentifier
. TokenNameDOT
CSS_IDENT TokenNameIdentifier
, TokenNameCOMMA
CSSConstants TokenNameIdentifier
. TokenNameDOT
CSS_YELLOWGREEN_VALUE TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ALICEBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_248 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ANTIQUEWHITE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_235 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_215 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
AQUAMARINE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_127 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_212 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
AZURE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BEIGE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_220 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BISQUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_228 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_196 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BLANCHEDALMOND_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_235 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BLUEVIOLET_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_138 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_43 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_226 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BROWN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_165 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_42 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_42 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
BURLYWOOD_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_222 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_184 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_135 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CADETBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_95 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_158 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_160 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CHARTREUSE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_127 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CHOCOLATE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_210 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_30 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORAL_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_127 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_80 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORNFLOWERBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_100 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_149 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_237 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CORNSILK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_248 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_220 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CRIMSON_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_220 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_20 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_60 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
CYAN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKCYAN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGOLDENROD_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_184 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_134 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_11 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_169 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_169 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_169 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_100 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_169 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_169 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_169 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKKHAKI_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_189 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_183 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_107 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKMAGENTA_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKOLIVEGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_85 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_107 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_47 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKORANGE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_140 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKORCHID_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_153 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_50 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_204 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKRED_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSALMON_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_233 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_150 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_122 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSEAGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_143 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_188 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_143 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_72 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_61 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_47 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_79 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_79 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKSLATEGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_47 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_79 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_79 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKTURQUOISE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_206 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_209 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DARKVIOLET_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_148 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DEEPPINK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_20 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_147 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DEEPSKYBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_191 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DIMGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DIMGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
DODGERBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_30 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_144 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FIREBRICK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_178 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_34 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_34 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FLORALWHITE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_240 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
FORESTGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_34 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_34 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GAINSBORO_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_220 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_200 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_200 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GHOSTWHITE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_248 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_248 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GOLD_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_215 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GOLDENROD_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_218 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_165 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_32 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_128 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
GREENYELLOW_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_173 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_47 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
HONEYDEW_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_240 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
HOTPINK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_180 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
INDIANRED_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_205 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_92 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_92 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
INDIGO_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_75 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_130 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
IVORY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_240 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
KHAKI_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_140 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAVENDER_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_230 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAVENDERBLUSH_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LAWNGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_124 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_252 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LEMONCHIFFON_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_173 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_216 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTCORAL_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTCYAN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_224 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGOLDENRODYELLOW_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_210 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_211 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_144 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_144 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_211 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTPINK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_182 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_193 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSALMON_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_160 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_122 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSEAGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_32 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_178 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_170 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSKYBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_135 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_206 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSLATEGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_119 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_136 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_153 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSLATEGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_119 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_136 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_153 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTSTEELBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_176 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_196 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_222 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIGHTYELLOW_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_224 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LIMEGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_50 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_50 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
LINEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_240 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MAGENTA_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMAQUAMARINE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_102 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_170 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMORCHID_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_186 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_85 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_211 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMPURPLE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_147 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_112 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_219 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSEAGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_60 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_179 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_113 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSLATEBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_123 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_104 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMSPRINGGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_154 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMTURQUOISE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_72 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_209 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_204 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MEDIUMVIOLETRED_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_199 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_21 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_133 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MIDNIGHTBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_25 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_25 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_112 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MINTCREAM_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MISTYROSE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_228 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_225 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
MOCCASIN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_228 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_181 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
NAVAJOWHITE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_222 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_173 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OLDLACE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_253 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
OLIVEDRAB_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_107 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_142 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_35 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORANGE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_165 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORANGERED_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_69 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_0 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ORCHID_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_218 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_112 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_214 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEGOLDENROD_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_238 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_232 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_170 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_152 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_251 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_152 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALETURQUOISE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_175 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PALEVIOLETRED_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_219 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_112 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_147 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PAPAYAWHIP_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_239 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_213 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PEACHPUFF_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_218 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_185 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PERU_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_205 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_133 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_63 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PINK_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_192 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_203 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
PLUM_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_221 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_160 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_221 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
POWDERBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_176 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_224 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_230 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ROSYBROWN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_188 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_143 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_143 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
ROYALBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_65 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_105 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_225 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SADDLEBROWN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_69 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_19 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SALMON_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_69 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_114 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SANDYBROWN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_244 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_164 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_96 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SEAGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_46 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_139 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_87 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SEASHELL_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SIENNA_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_160 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_82 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_45 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SKYBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_135 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_206 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_235 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_106 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_90 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEGRAY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_112 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_144 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SLATEGREY_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_112 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_128 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_144 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SNOW_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_250 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
SPRINGGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_0 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_127 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
STEELBLUE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_70 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_130 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_180 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TAN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_210 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_180 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_140 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
THISTLE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_216 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_91 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_216 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TOMATO_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_255 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_99 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_71 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
TURQUOISE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_64 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_224 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_208 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
VIOLET_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_238 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_130 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_238 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
WHEAT_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_222 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_179 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
WHITESMOKE_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_245 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_245 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
Value TokenNameIdentifier
YELLOWGREEN_RGB_VALUE TokenNameIdentifier
= TokenNameEQUAL
new TokenNamenew
RGBColorValue TokenNameIdentifier
( TokenNameLPAREN
NUMBER_154 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_205 TokenNameIdentifier
, TokenNameCOMMA
NUMBER_50 TokenNameIdentifier
) TokenNameRPAREN
; TokenNameSEMICOLON
} TokenNameRBRACE
|
Java | UTF-8 | 1,303 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | package lambdify.apigateway;
import lombok.val;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
public class URLTokenizerTest {
@DisplayName("Can tokenize the root path")
@Test void test1(){
val tokens = URL.tokenize("/");
assertFalse( tokens.isEmpty() );
assertEquals( 1, tokens.size() );
assertEquals( "/", tokens.get(0) );
}
@DisplayName( "Can tokenize the a multi-level path" )
@Test void test2(){
val tokens = URL.tokenize("/multi/level/path");
assertFalse( tokens.isEmpty() );
assertEquals( 3, tokens.size() );
assertEquals( "/multi", tokens.get(0) );
assertEquals( "/level", tokens.get(1) );
assertEquals( "/path", tokens.get(2) );
}
@DisplayName( "Can tokenize the a multi-level path that ends with /" )
@Test
void test3(){
val tokens = URL.tokenize("/multi/level/path");
assertFalse( tokens.isEmpty() );
assertEquals( 3, tokens.size() );
assertEquals( "/multi", tokens.get(0) );
assertEquals( "/level", tokens.get(1) );
assertEquals( "/path", tokens.get(2) );
}
}
|
JavaScript | UTF-8 | 7,127 | 2.640625 | 3 | [] | no_license | const request = require("request");
const util = require("util");
const rp = util.promisify(request);
const sleep = util.promisify(setTimeout);
const cheerio = require('cheerio');
const { URL } = require('url');
let seenLinks = {};
let rootNode = {};
let currentNode = {};
let linksQueue = [];
let printList = [];
let previousDepth = 0;
let maxCrawlingDepth = 5;
let options = null;
let mainDomain = null;
let mainParsedUrl = null;
class CreateLink {
constructor(linkURL, depth, parent) {
this.url = linkURL;
this.depth = depth;
this.parent = parent;
this.children = [];
}
}
//your scraping bot credentials
//create a free account on https://www.scraping-bot.io/register/
let username = process.env.USERNAME || "yourUsername",
apiKey = process.env.API_KEY || "yourApiKey",
apiEndPoint = process.env.END_POINT || "http://api.scraping-bot.io/scrape/raw-html",
auth = "Basic " + Buffer.from(username + ":" + apiKey).toString("base64");
let requestOptions = {
method: 'POST',
url: apiEndPoint,
json: {
url: "this will be replaced in the findLinks function",
//scraing-bot options
options: {
useChrome:false, //if you want to use headless chrome WARNING two api calls wiil be consumed for this option
premiumProxy:false, //if you want to use premium proxies Unblock Amazon,linkedIn (consuming 10 calls)
}
},
headers: {
Accept: 'application/json',
Authorization : auth
}
}
//Start Application put here the adress where you want to start your crawling with
//second parameter is depth with 1 it will scrape all the links found on the first page but not the ones found on other pages
//if you put 2 it will scrape all links on first page and all links found on second level pages be careful with this on a huge website it will represent tons of pages to scrape
// it is recommanded to limit to 5 levels
crawlBFS("https://www.scraping-bot.io/crawler/index.html", 1);
async function crawlBFS(startURL, maxDepth = 5) {
try {
mainParsedUrl = new URL(startURL);
} catch (e) {
console.log("URL is not valid", e);
return;
}
mainDomain = mainParsedUrl.hostname;
maxCrawlingDepth = maxDepth;
startLinkObj = new CreateLink(startURL, 0, null);
rootNode = currentNode = startLinkObj;
addToLinkQueue(currentNode);
await findLinks(currentNode);
}
//
async function crawl(linkObj) {
//Add logs here if needed!
//console.log(`Checking URL: ${options.url}`);
await findLinks(linkObj);
}
//The goal is to get the HTML and look for the links inside the page.
async function findLinks(linkObj) {
//lets set the url we wnt to scrape
requestOptions.json.url = linkObj.url
console.log("Scraping URL : " + linkObj.url);
let response
try {
response = await rp(requestOptions);
if (response.statusCode !== 200) {
if (response.statusCode === 401 || response.statusCode === 405) {
console.log("autentication failed check your credentials");
} else {
console.log("an error occurred check the URL" + response.statusCode, response.body);
}
return
}
//response.body is the whole content of the page if you want to store some kind of data from the web page you should do it here
let $ = cheerio.load(response.body);
let links = $('body').find('a').filter(function (i, el) {
return $(this).attr('href') != null;
}).map(function (i, x) {
return $(this).attr('href');
});
if (links.length > 0) {
links.map(function (i, x) {
let reqLink = checkDomain(x);
if (reqLink) {
if (reqLink !== linkObj.url) {
newLinkObj = new CreateLink(reqLink, linkObj.depth + 1, linkObj);
addToLinkQueue(newLinkObj);
}
}
});
} else {
console.log("No more links found for " + requestOptions.url);
}
let nextLinkObj = getNextInQueue();
if (nextLinkObj && nextLinkObj.depth <= maxCrawlingDepth) {
//random sleep
//It is very important to make this long enough to avoid spamming the website you want to scrape
//if you choose a short time you will potentially be blocked or kill the website you want to crawl
//time is in milliseconds here
let minimumWaitTime = 500; //half a second these values are very low on a real worl example you should use at least 30000 (30 seconds between each call)
let maximumWaitTime = 5000 //max five seconds
let waitTime = Math.round(minimumWaitTime + (Math.random() * (maximumWaitTime-minimumWaitTime)));
console.log("wait for " + waitTime + " milliseconds");
await sleep(waitTime);
//next url scraping
await crawl(nextLinkObj);
} else {
setRootNode();
printTree();
}
} catch (err) {
console.log("Something Went Wrong...", err);
}
}
//Go all the way up and set RootNode to the parent node
function setRootNode() {
while (currentNode.parent != null) {
currentNode = currentNode.parent;
}
rootNode = currentNode;
}
function printTree() {
addToPrintDFS(rootNode);
console.log(printList.join("\n|"));
}
function addToPrintDFS(node) {
let spaces = Array(node.depth * 3).join("-");
printList.push(spaces + node.url);
if (node.children) {
node.children.map(function (i, x) {
{
addToPrintDFS(i);
}
});
}
}
//Check if the domain belongs to the site being checked
function checkDomain(linkURL) {
let parsedUrl;
let fullUrl = true;
try {
parsedUrl = new URL(linkURL);
} catch (error) {
fullUrl = false;
}
if (fullUrl === false) {
if (linkURL.indexOf("/") === 0) {
//relative to domain url
return mainParsedUrl.protocol + "//" + mainParsedUrl.hostname + linkURL.split("#")[0];
} else if (linkURL.indexOf("#") === 0) {
//anchor avoid link
return
} else {
//relative url
let path = currentNode.url.match('.*\/')[0]
return path + linkURL;
}
}
let mainHostDomain = parsedUrl.hostname;
if (mainDomain === mainHostDomain) {
//console.log("returning Full Link: " + linkURL);
parsedUrl.hash = "";
return parsedUrl.href;
} else {
return;
}
}
function addToLinkQueue(linkobj) {
if (!linkInSeenListExists(linkobj)) {
if (linkobj.parent != null) {
linkobj.parent.children.push(linkobj);
}
linksQueue.push(linkobj);
addToSeen(linkobj);
}
}
function getNextInQueue() {
let nextLink = linksQueue.shift();
if (nextLink && nextLink.depth > previousDepth) {
previousDepth = nextLink.depth;
console.log(`------- CRAWLING ON DEPTH LEVEL ${previousDepth} --------`);
}
return nextLink;
}
//Adds links we've visited to the seenList
function addToSeen(linkObj) {
seenLinks[linkObj.url] = linkObj;
}
//Returns whether the link has been seen.
function linkInSeenListExists(linkObj) {
return seenLinks[linkObj.url] != null;
} |
SQL | UTF-8 | 560 | 3.953125 | 4 | [] | no_license | WITH t1 AS (SELECT (c.city || ', ' || co.country) city_country, DATE_TRUNC('month',p.payment_date) AS month, SUM(p.amount) total_usd
FROM payment p
JOIN staff s
ON s.staff_id = p.staff_id
JOIN store st
ON st.store_id = s.store_id
JOIN address a
ON a.address_id = st.address_id
JOIN city c
ON c.city_id = a.city_id
JOIN country co
ON co.country_id = c.country_id
GROUP BY 1,2
ORDER BY 2),
t2 AS (SELECT t1.month AS month, MAX(t1.total_usd) max_month
FROM t1
GROUP BY 1
ORDER BY 1)
SELECT t2.*, t1.city_country
FROM t2
JOIN t1
ON t1.total_usd = t2.max_month;
|
Markdown | UTF-8 | 897 | 3.15625 | 3 | [] | no_license | # Information-Extraction-of-Football-players
Information extraction in Python
This project consists of 6 Tasks:
Task 1: Creating a function that takes each document and performs: 1) sentence segmentation 2) tokenization 3) part-of-speech tagging
Task 2:Creating a function that will take the list of tokens with POS tags for each sentence and returns the named entities (NE)
Task 3: Using the named_entity_finding() function to extract all NEs for each document
Task 4: Creating a functions to extract the name of the player, country of origin and date of birth as well as the following relations: team(s) of the player and position(s) of the player
Task 5: Creating a function using the outputs from the previous functions to generate JSON-LD output
Task 6: Identifying one other relation (besides team and player) and write a function to extract this. Also extending the JSON-LD output.
|
PHP | UTF-8 | 1,662 | 2.90625 | 3 | [] | no_license | <?php
// Import the "Grab Bag"
require("common.php");
// Open an (OO) MySQL Connection
$conn = new mysqli($GLOBALS["dbhost"], $GLOBALS["dbuser"], $GLOBALS["dbpass"], $GLOBALS["dbname"]);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Get the values from the POST parameters
$username = $_GET['username'];
$new_password = $_GET['password'];
$recovery = $_GET['email'];
$reset_hash = $_GET['hash'];
// Get the other user data
$query = "SELECT * FROM Users WHERE Username = '$username';";
$result = $conn->query($query);
if ($result->num_rows < 1) {
die("User \"$username\" not found!");
}
$user_data = $result->fetch_assoc();
// And use it to generate a hash
$firstname = $user_data["FirstName"];
$lastname = $user_data["LastName"];
$hash = hash('ripemd160', "$firstname $lastname $password");
// If we were given a valid hash and new password
if ($reset_hash == $hash && $new_password) {
// change the password
die(change_user_password($conn, $username, $new_password));
} else if ($reset_hash) {
die("Cannot change password for user $username.");
}
// Otherwise, send a recovery email
$text = "We have received your request to reset your password, please follow this link to proceed:
http://baker.valpo.edu/scheduler/change-password?username=$username&hash=$hash";
$text = str_replace("\n.", "\n..", $text);
if (mail($recovery, "Recover Your LIMTS Password", $text)) {
die("Successfully sent recovery message to $recovery.");
} else {
die("Uknown Failure.");
}
?>
|
JavaScript | UTF-8 | 1,123 | 2.640625 | 3 | [] | no_license | var express = require('express');
var router = express.Router();
const api = require('../DAL/api');
const logger = require('../logger');
const {validateData} = require('../utilities/validations')
const catchAsync = fn => {
return (req, res, next) => {
fn(req, res, next).catch(next);
};
};
//Get all orders from the last day
router.get('/', catchAsync(async (req, res, next) => {
logger.info("incoming request on route /orders method = GET")
const response = await api.getLastDayOrders()
logger.info(`response DATA ${JSON.stringify(response)}`)
res.status(200).json({
status: 'success',
data: response,
});
}));
//Save new order
router.post('/', validateData, catchAsync (async (req, res, next) => {
logger.info(`incoming request on route /orders method = POST attached DATA: ${JSON.stringify(req.body)}`)
const response = await api.postOrder(req.body)
logger.info(`response DATA ${JSON.stringify(response)}`)
res.status(200).json({
status: 'success',
data: response,
});
}))
module.exports = router; |
Go | UTF-8 | 534 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | // (c) 2021, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package compression
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestNoCompressor(t *testing.T) {
data := []byte{1, 2, 3}
compressor := NewNoCompressor()
compressedBytes, err := compressor.Compress(data)
assert.NoError(t, err)
assert.EqualValues(t, data, compressedBytes)
decompressedBytes, err := compressor.Decompress(compressedBytes)
assert.NoError(t, err)
assert.EqualValues(t, data, decompressedBytes)
}
|
C++ | GB18030 | 19,955 | 2.65625 | 3 | [] | no_license | #include "Definition.h"
using namespace std;
extern int MaxCustSingleLine; //˿
extern int MaxLine; //λжУ
extern int MaxSeqLen; //ȴȣ
extern int MaxCustCheck; //ڶȣ
extern int MinCheckTime; //һΰʱ
extern int MaxCheckTime; //һΰʱ
extern int MinRestTimeLen; //һϢʱ
extern int MaxRestTimeLen; //һϢʱ
extern int OffdutyTime; //°ʱ 1 ~ Max
extern bool IsAutoGenerate; //ǷԶ˿ͣ
extern int Speed; //˿ƶٶȣ
extern double CurrentTime; //¼ǰʱ䣻
extern FILE * out; //Initģ鶨ļָʵֳйжļĶ̬д룻
extern vector<Passenger> buffer;
extern CheckPoint checkpoint[9];
extern int SystemState; //¼ǰϵͳ״̬
int BufferLineNum = 1; //¼ǰζ
int EXIT_X[] = { 345,505,670,830 }; //Xꣻ
int PassengerNum = 1; //˿ͱţ
double gaussrand() //Box-Muller㷨ṩϱֲ̬
{
static double U, V;
static int phase = 0;
double z;
if (phase == 0)
{
U = randomf();
V = randomf();
z = sqrt(-2.0 * log(U))* sin(2.0 * PI * V);
}
else
{
z = sqrt(-2.0 * log(U)) * cos(2.0 * PI * V);
}
phase = 1 - phase;
return z;
}
int CheckPointNum() //صǰŵİ
{
int cnt = 0;
for (int i = 1; i <= 8; i++)
if (checkpoint[i].state == SPARE || checkpoint[i].state == WORKING)
cnt++;
return cnt;
}
int ProperPointID() //صǰڹŶٵİڵıţ
{
int MinID;
for (int i = 1; i <= 8; i++) //Ԥ
{
if (checkpoint[i].state == SPARE || checkpoint[i].state == WORKING)
{
MinID = i;
break; //ĵ֤ضеһ
}
}
for (int i = 1; i <= 8; i++)
{
if (checkpoint[i].state != SPARE && checkpoint[i].state != WORKING)
continue;
if (checkpoint[i].CheckQueue.size() < checkpoint[MinID].CheckQueue.size())
MinID = i;
}
return MinID;
}
bool BufferFull() //жϻǷ
{
return buffer.size() >= MaxCustSingleLine * BufferLineNum + BufferLineNum - 1;
}
bool CheckPointFull() //жϰǷ
{
for (int i = 1; i <= 8; i++)
{
if (checkpoint[i].state == SPARE || (checkpoint[i].state == WORKING && checkpoint[i].CheckQueue.size() < MaxCustCheck))
return false;
}
return true;
}
bool CheckPointEmpty() //жаǷΪգ
{
for (int i = 0; i < 9; i++)
{
if (!checkpoint[i].CheckQueue.empty())
return false;
}
return true;
}
bool IsInExit(Passenger * cus) //жϳ˿Ƿﻺڣ
{
return abs(cus->x - EXIT_X[BufferLineNum / 2]) <= 10 && abs(cus->y - BUFFER_UP_Y) <= 10;
}
void CheckPointEnqueue(Passenger * cus, int num) //˿Ӧŵİڣ
{
if (num == 0) //
{
if (!checkpoint[0].CheckQueue.empty() && checkpoint[0].CheckQueue.back().x > 1240)
cus->x = checkpoint[0].CheckQueue.back().x + PASSENGER_WIDTH;
else
cus->x = 1280;
cus->y = 380;
}
checkpoint[num].CheckQueue.push_back(*cus);
}
void NewCusEnqueue() //³˿
{
if (SystemState != BEONDUTY) //ʱǹ״̬Ӧ
return;
Passenger tmp;
tmp.x = ENTRANCE_X; //ʼ˿ꣻ
if (buffer.empty())
tmp.y = ENTRANCE_Y;
else
{
Passenger tail = buffer.back();
if (abs(tail.x - ENTRANCE_X) < 1e-6 && tail.y > ENTRANCE_Y - PASSENGER_HEIGHT)
tmp.y = tail.y + PASSENGER_HEIGHT;
else
tmp.y = ENTRANCE_Y;
}
tmp.pic = newimage(); //ʼ˿ͼָ룻
tmp.ID = PassengerNum++; //ʼ˿ID;
tmp.dir = UP; //˿ͳʼУƶϣ
tmp.LastDir = UP;
tmp.LastLineX = ENTRANCE_X;
int type = random(5); //egeṩ0~4֮˿ͣ
switch (type)
{
case 0: getimage(tmp.pic, "official.png"); break;
case 1: getimage(tmp.pic, "youngman.png"); break;
case 2: getimage(tmp.pic, "middle-aged.png"); break;
case 3: getimage(tmp.pic, "lady1.png"); break;
case 4: getimage(tmp.pic, "lady2.png"); break;
default: break;
}
tmp.CheckTime = (MinCheckTime + MaxCheckTime) / 2 + gaussrand(); //ֲ̬ģÿλ˿͵ļʱ䣻
if (tmp.CheckTime < MinCheckTime) tmp.CheckTime = MinCheckTime; //Χ
if (tmp.CheckTime > MaxCheckTime) tmp.CheckTime = MaxCheckTime;
bool IsEmergent = (randomf() > 0.95); //randomf()0.0~1.0ģÿλ˿Ϊ͵ĸΪ5%
if (IsEmergent && checkpoint[0].CheckQueue.size() < MaxCustCheck) //Ϊҽͨδֱӽڣ
{
fprintf(out, "%.2f:%dų˿͵,ͽ\n",CurrentTime, tmp.ID);
CheckPointEnqueue(&tmp, 0);
}
else if (!BufferFull()) //δ뻺
{
fprintf(out, "%.2f:%dų˿͵,뻺\n",CurrentTime, tmp.ID);
buffer.push_back(tmp); //²˿ӣ
}
else //ʧܣ˿ԭ
PassengerNum--;
}
void BufferDequeue() //Ԫسӣ
{
if (!buffer.empty() && IsInExit(&buffer[0])) //׳˿͵λ
{
if (CheckPointFull()) //ʱʹ˿͵ȴ
{
if (buffer[0].dir != STILL)
{
buffer[0].LastDir = buffer[0].dir;
buffer[0].dir = STILL;
}
}
else //˿ͳӦİڶУ
{
int num = ProperPointID();
CheckPointEnqueue(&buffer[0], num);
fprintf(out, "%.2f:%dų˿ͳ,ѡ%dŰ\n", CurrentTime, buffer[0].ID,num);
buffer.erase(buffer.begin());
}
}
}
void MoveInDir(Passenger * cus) //ݵǰ˶ٶȸı˿͵
{
switch (cus->dir)
{
case UP: cus->y -= Speed; break;
case DOWN: cus->y += Speed; break;
case LEFT: cus->x -= Speed; break;
case RIGHT: cus->x += Speed; break;
default: break;
}
}
void TransPosInBuffer() //ı˿ڻڵλ;
{
for (int i = 0; i < buffer.size(); i++)
{
switch (buffer[i].dir) //߽ת
{
case UP:
if (buffer[i].y - 5 < BUFFER_UP_Y)
buffer[i].dir = RIGHT;
break;
case DOWN:
if (buffer[i].y + 5 > BUFFER_DOWN_Y)
buffer[i].dir = RIGHT;
break;
case RIGHT:
if (buffer[i].x - buffer[i].LastLineX > BUFFER_LINE_WIDTH)
{
buffer[i].LastLineX = buffer[i].x;
if (buffer[i].y - 5 < BUFFER_UP_Y)
buffer[i].dir = DOWN;
else
buffer[i].dir = UP;
}
default: break;
}
if (i > 0 && buffer[i - 1].dir == STILL) //ƶתֹжϴ
{
if (buffer[i].dir == UP && abs(buffer[i].x - buffer[i - 1].x) < PASSENGER_WIDTH && buffer[i].y - Speed - PASSENGER_HEIGHT < buffer[i - 1].y)
{
buffer[i].dir = STILL; buffer[i].LastDir = UP;
continue;
}
if (buffer[i].dir == DOWN && abs(buffer[i].x - buffer[i - 1].x) < PASSENGER_WIDTH && buffer[i].y + Speed + PASSENGER_HEIGHT > buffer[i - 1].y)
{
buffer[i].dir = STILL; buffer[i].LastDir = DOWN;
continue;
}
if (buffer[i].dir == RIGHT && abs(buffer[i].y - buffer[i - 1].y) < PASSENGER_HEIGHT && buffer[i].x + Speed + PASSENGER_WIDTH > buffer[i - 1].x)
{
buffer[i].dir = STILL; buffer[i].LastDir = RIGHT;
continue;
}
}
if (buffer[i].dir == STILL) //ֹתƶжϴ
{
if (i == 0 && !IsInExit(&buffer[i])) //Ԫ
buffer[i].dir = buffer[i].LastDir;
if (i > 0 && buffer[i].LastDir == UP && !(abs(buffer[i].x - buffer[i - 1].x) < PASSENGER_WIDTH && buffer[i].y - 10 - PASSENGER_HEIGHT < buffer[i - 1].y))
buffer[i].dir = UP;
if (i > 0 && buffer[i].LastDir == DOWN && !(abs(buffer[i].x - buffer[i - 1].x) < PASSENGER_WIDTH && buffer[i].y + 10 + PASSENGER_HEIGHT > buffer[i - 1].y))
buffer[i].dir = DOWN;
if (i > 0 && buffer[i].LastDir == RIGHT && !(abs(buffer[i].y - buffer[i - 1].y) < PASSENGER_HEIGHT && buffer[i].x + 10 + PASSENGER_WIDTH > buffer[i - 1].x))
buffer[i].dir = RIGHT;
}
MoveInDir(&buffer[i]); //Ѹı˶ı˿͵ꣻ
}
}
void TransPosInCheckPoint() //ı˿ڰڶλã
{
for (int i = 0; i < checkpoint[0].CheckQueue.size(); i++) //ƽڳ˿ƶڳ˿͵Ϊͨ˿͵
{
if (checkpoint[0].CheckQueue[i].x - Speed * 2 >= checkpoint[0].x)
{
checkpoint[0].CheckQueue[i].x -= Speed * 2;
continue;
}
if (i == 0 && checkpoint[0].CheckQueue[i].y - Speed * 2 >= CHECK_LINE_Y)
checkpoint[0].CheckQueue[i].y -= Speed * 2;
else if (i > 0 && checkpoint[0].CheckQueue[i].y - Speed * 2 - PASSENGER_HEIGHT >= checkpoint[0].CheckQueue[i - 1].y)
checkpoint[0].CheckQueue[i].y -= Speed * 2;
if (abs(checkpoint[0].CheckQueue[i].x - checkpoint[0].x) < 2 * Speed) //СSpeedλ,ֱӶ
checkpoint[0].CheckQueue[i].x = checkpoint[0].x;
if (abs(checkpoint[0].CheckQueue[i].y - CHECK_LINE_Y) < 2 * Speed)
checkpoint[0].CheckQueue[i].y = CHECK_LINE_Y;
}
for (int i = 1; i <= 8; i++) //ͨڳ˿ƶ
{
for (int j = 0; j < checkpoint[i].CheckQueue.size(); j++)
{
if (checkpoint[i].CheckQueue[j].y > 370) //δתƶ
checkpoint[i].CheckQueue[j].y -= Speed;
else if (abs(checkpoint[i].CheckQueue[j].x - checkpoint[i].x) >= Speed) //δڶӦƶ
checkpoint[i].CheckQueue[j].x += (checkpoint[i].CheckQueue[j].x < checkpoint[i].x ? 1 : -1) * Speed; //ݳ˿ͼxλʹ˿ͺƶ
else if (j == 0 && checkpoint[i].CheckQueue[j].y > CHECK_LINE_Y) //Ϊ׳˿λδﰲ,ƶ
checkpoint[i].CheckQueue[j].y -= Speed;
else if(j > 0 && checkpoint[i].CheckQueue[j].y - Speed - PASSENGER_HEIGHT >= checkpoint[i].CheckQueue[j-1].y) //Ƕ׳˿ϲᷢײ,ƶ
checkpoint[i].CheckQueue[j].y -= Speed;
if (abs(checkpoint[i].CheckQueue[j].x - checkpoint[i].x) < Speed) //СһSpeedλ,ֱӶ
checkpoint[i].CheckQueue[j].x = checkpoint[i].x;
if (abs(checkpoint[i].CheckQueue[j].y - CHECK_LINE_Y) < Speed)
checkpoint[i].CheckQueue[j].y = CHECK_LINE_Y;
if (abs(checkpoint[i].CheckQueue[j].y - 370) < Speed)
checkpoint[i].CheckQueue[j].y = 370;
if (j > 0 && checkpoint[i].CheckQueue[j].x == checkpoint[i].x && checkpoint[i].CheckQueue[j].y - PASSENGER_HEIGHT - checkpoint[i].CheckQueue[j - 1].y < Speed)
checkpoint[i].CheckQueue[j].y = PASSENGER_HEIGHT + checkpoint[i].CheckQueue[j - 1].y;
}
}
}
void TransCheckPointState() //ı䰲ڵ״̬
{
if (SystemState == BEONDUTY && (CheckPointNum() == 0 || buffer.size() / CheckPointNum() >= MaxSeqLen)) //̬һڣ
{
for (int i = 1; i <= 8; i++)
{
if (checkpoint[i].state == NOTOPEN)
{
fprintf(out, "%.2f:,%dŰ\n", CurrentTime, i);
checkpoint[i].state = SPARE;
break;
}
}
}
for (int i = 1; i <= 8; i++)
{
if (checkpoint[i].state == WORKING && checkpoint[i].CheckQueue.empty())
checkpoint[i].state = SPARE;
if (checkpoint[i].state == SPARE && !checkpoint[i].CheckQueue.empty())
checkpoint[i].state = WORKING;
if (checkpoint[i].state == RESTING)
{
checkpoint[i].RestTime -= 1.0 / 60; //Ϣʱһ֡Ӧʱ
if (checkpoint[i].RestTime <= 0) //ϢϣתΪ״̬
{
checkpoint[i].state = NOTOPEN;
fprintf(out, "%.2f:%dŰϢ,תΪ״̬", CurrentTime, i);
}
}
if (checkpoint[i].state == WAITING && checkpoint[i].CheckQueue.empty())
{
checkpoint[i].state = RESTING;
checkpoint[i].RestTime = (MinRestTimeLen + MaxRestTimeLen) / 2 + gaussrand() * 2; //ֲ̬ģÿڵϢʱ䣻
if (checkpoint[i].RestTime < MinRestTimeLen) checkpoint[i].RestTime = MinRestTimeLen; //Χ
if (checkpoint[i].RestTime > MaxRestTimeLen) checkpoint[i].RestTime = MaxRestTimeLen;
if(SystemState == BEONDUTY)
fprintf(out, "%.2f:%dŰתΪϢ״̬,ϢʱΪ%.2f\n",CurrentTime, i, checkpoint[i].RestTime);
}
}
if (SystemState != BEONDUTY && buffer.empty()) //ǹ״̬һ
{
for (int i = 1; i <= 8; i++)
{
if (checkpoint[i].state == SPARE || checkpoint[i].state == RESTING || checkpoint[i].state == NOTOPEN)
{
checkpoint[i].state = CLOSED;
fprintf(out, "%.2f:%dŰתΪ°״̬\n",CurrentTime, i, checkpoint[i].RestTime);
}
}
}
}
void CheckPointDequeue()
{
for (int i = 0; i <= 8; i++)
{
if (!checkpoint[i].CheckQueue.empty()) //ڶзǿգ
{
if (abs(checkpoint[i].CheckQueue[0].y == CHECK_LINE_Y)) //׳˿ѵﰲ
checkpoint[i].CheckQueue[0].CheckTime -= 1.0 / 60; //ڰʱһ֡Ӧʱ
if (checkpoint[i].CheckQueue[0].CheckTime <= 0) //ʱ䵽
{
if(i == 0)
fprintf(out, "%.2f:ڶ%dų˿Ͱ\n", CurrentTime, checkpoint[i].CheckQueue[0].ID);
else
fprintf(out, "%.2f:%dŰڶ%dų˿Ͱ\n", CurrentTime, i, checkpoint[i].CheckQueue[0].ID);
delimage(checkpoint[i].CheckQueue[0].pic);
checkpoint[i].CheckQueue.erase(checkpoint[i].CheckQueue.begin());
}
}
}
}
void NewOpenAdjust() //ʵʱٽڳ˿ͶеĶ̬
{
if (checkpoint[1].state == SPARE) //߽簲¿ʱֻҲలڶ
{
for (int i = 2; i < checkpoint[2].CheckQueue.size(); i++)
{
fprintf(out, "%.2f:2Ű%dų˿Ͷ̬1Ű\n", CurrentTime, checkpoint[2].CheckQueue[i].ID);
checkpoint[1].CheckQueue.push_back(checkpoint[2].CheckQueue[i]);
}
for (int i = checkpoint[2].CheckQueue.size() - 1; i >= 2; i--)
checkpoint[2].CheckQueue.erase(checkpoint[2].CheckQueue.begin() + i);
}
if (checkpoint[8].state == SPARE) //Ҳ߽簲¿ʱֻలڶ
{
for (int i = 2; i < checkpoint[7].CheckQueue.size(); i++)
{
fprintf(out, "%.2f:7Ű%dų˿Ͷ̬8Ű\n", CurrentTime, checkpoint[7].CheckQueue[i].ID);
checkpoint[8].CheckQueue.push_back(checkpoint[7].CheckQueue[i]);
}
for (int i = checkpoint[7].CheckQueue.size() - 1; i >= 2; i--)
checkpoint[7].CheckQueue.erase(checkpoint[7].CheckQueue.begin() + i);
}
for (int i = 2; i <= 7; i++) //༰Ҳలڶ
{
if (checkpoint[i].state == SPARE)
{
int todel1[5] = { 0 }, todel2[5] = { 0 }; //ڼ¼Ҫɾڽڵij˿
int idx1 = 0, idx2 = 0;
for (int j = 2; j < max(checkpoint[i - 1].CheckQueue.size(), checkpoint[i + 1].CheckQueue.size()); j++) //లڶӦ˿ͽ¿
{
int ID1 = j < checkpoint[i - 1].CheckQueue.size() ? checkpoint[i - 1].CheckQueue[j].ID : INT_MAX;
int ID2 = j < checkpoint[i + 1].CheckQueue.size() ? checkpoint[i + 1].CheckQueue[j].ID : INT_MAX;
if (ID1 < ID2)
{
fprintf(out, "%.2f:%dŰ%dų˿Ͷ̬%dŰ\n", CurrentTime,i-1, checkpoint[i-1].CheckQueue[j].ID,i);
checkpoint[i].CheckQueue.push_back(checkpoint[i - 1].CheckQueue[j]);
todel1[idx1++] = j;
}
else
{
fprintf(out, "%.2f:%dŰ%dų˿Ͷ̬%dŰ\n", CurrentTime, i+1, checkpoint[i+1].CheckQueue[j].ID, i);
checkpoint[i].CheckQueue.push_back(checkpoint[i + 1].CheckQueue[j]);
todel2[idx2++] = j;
}
}
for (int j = idx1 - 1; j >= 0; j--) //ɾలڶжӦ˿
checkpoint[i - 1].CheckQueue.erase(checkpoint[i - 1].CheckQueue.begin() + todel1[j]);
for (int j = idx2 - 1; j >= 0; j--)
checkpoint[i + 1].CheckQueue.erase(checkpoint[i + 1].CheckQueue.begin() + todel2[j]);
}
}
}
void BufferControl() //ʵֶԻ
{
if (BufferFull() && BufferLineNum < MaxLine)
{
fprintf(out, "%.2f:,ζж̬\n", CurrentTime);
BufferLineNum += 2;
}
BufferDequeue(); //жϴԪسӲ
if (IsAutoGenerate && SystemState == BEONDUTY) //Զģʽҹ״̬²³˿ͽ뻺
{
if (randomf() < 0.05 + gaussrand() / 100) //ֲ̬ģÿһ֡˿ͳֵĸʣƽÿ˿ͣ
NewCusEnqueue();
}
TransPosInBuffer(); //ı˿꣬ʵֶЧ
}
void CheckPointControl() //ʵֶڵ
{
CheckPointDequeue();
TransCheckPointState();
NewOpenAdjust();
TransPosInCheckPoint();
}
void SystemControl() //ϵͳƣʵļ;
{
CurrentTime = fclock(); //һ֡Ӧʱ䣻
CheckPointControl();
BufferControl();
if ((int)(CurrentTime + 1.0 / 60) > (int)CurrentTime) //ÿµһ룬عؼ
{
fprintf(out, "\nе%d:\n", (int)(CurrentTime + 1.0 / 60) );
fprintf(out, "ǰ: %d\n", buffer.size());
if (BufferFull() && BufferLineNum == MaxLine)
fprintf(out, "\n");
if (checkpoint[0].CheckQueue.size() > 0)
fprintf(out, "ڹ,ǰ: %d,%dų˿ʣలʱ%.2fs\n", checkpoint[0].CheckQueue.size(), checkpoint[0].CheckQueue[0].ID, checkpoint[0].CheckQueue[0].CheckTime);
else
fprintf(out, "ڿ\n");
for (int i = 1; i <= 8; i++)
{
fprintf(out, "%dŰڵǰ״̬: ", i);
switch (checkpoint[i].state)
{
case SPARE: fprintf(out, "\n"); break;
case WORKING: fprintf(out, ",ǰ: %d,%dų˿ʣలʱ%.2fs\n", checkpoint[i].CheckQueue.size(), checkpoint[i].CheckQueue[0].ID, checkpoint[i].CheckQueue[0].CheckTime); break;
case WAITING: fprintf(out, "Ϣ,ǰ: %d,%dų˿ʣలʱ%.2fs\n", checkpoint[i].CheckQueue.size(), checkpoint[i].CheckQueue[0].ID, checkpoint[i].CheckQueue[0].CheckTime); break;
case RESTING: fprintf(out, "Ϣ,ʣϢʱ%.2fs\n", checkpoint[i].RestTime); break;
case NOTOPEN: fprintf(out, "δ\n"); break;
case CLOSED: fprintf(out, "°\n"); break;
}
}
}
if (CurrentTime >= OffdutyTime && SystemState == BEONDUTY) //ıϵͳ״̬ ° °ࣻ
{
SystemState = TOOFFDUTY;
fprintf(out, "%.2f:°ʱѵ,°\n",CurrentTime);
}
if (SystemState == TOOFFDUTY && buffer.empty() && CheckPointEmpty())
{
SystemState = BEOFFDUTY;
fprintf(out, "%.2f:˿ʹ,°\n",CurrentTime);
}
} |
Shell | UTF-8 | 7,383 | 4.125 | 4 | [
"WTFPL"
] | permissive | #!/bin/bash
#--------------------------------------------------------------------------------
# CONSTANTS
#--------------------------------------------------------------------------------
CONFFILE="${0/.sh/.conf}" # readCSVFields.conf where separator is defined
#AWK="/usr/local/bin/gawk" # the MAC AWK version (gawk if regex filter is enabled)
#AWK="/usr/bin/gawk" # the AWK version (gawk if regex filter is enabled)
AWK="/usr/bin/awk" # the AWK version
DEBUG=0 # log level : 0 = no log (used with -d switch option)
# 1 = log on stdout output & low verbose
# 2 = log on stderr output & very verbose
#--------------------------------------------------------------------------------
# variables
#--------------------------------------------------------------------------------
csvFile="" # the file to read
fields="" # the fields to display
filter="" # the value of key to filter lines in CSV file
key="" # field key number
options="" # the switches starting with - or -- that change behavior of our script
#--------------------------------------------------------------------------------
# OPTIONS
#--------------------------------------------------------------------------------
alternateSeparator=0
noFirst=0
#--------------------------------------------------------------------------------
# functions
#--------------------------------------------------------------------------------
# default functions (log, getDate, quit, help)
function isDigit() {
printf "%s" "$1" | grep -qE "^[0-9]+$"
}
function contains() {
log "contains\n1:$1\n2:$2" 2
echo -e "$1" | grep -qE "$2"
}
function getDate() {
date "+%Y-%m-%d %H:%M:%S"
}
function debug() {
local ret=0
if [ -z "$1" ] ; then
[ $DEBUG -gt 0 ]
ret=$?
else
[ $DEBUG -ne 0 -a $DEBUG -ge $1 ]
ret=$?
fi
return $ret
}
function log() {
if [ $2 -eq 0 ] ; then
echo -e "[`getDate`] $1"
else
if (debug) ; then
if (debug $2) ; then
echo -e "[`getDate`] $1" >&$2
fi
fi
fi
return $2
}
function quit() {
log "$1\n" 0
helpMe $2 >&2
exit $2
}
function helpMe() {
if [ -z "$1" ] || [ $1 -eq 0 ] ; then
echo
echo -e "HELP INVOKED"
echo -e "This script based on $AWK command, is used to read and filter a CSV file"
echo -e "arguments given are field list, filter key name, filename"
echo
fi
echo -e "usage : $0 key [options...] field [fields...] filterFieldValue fileName"
echo -e "\twhere"
echo -e "\t\"key\"\t\t\tis first field number used as key"
echo -e "\t\"field\"\t\t\tis second field number to display (note key and field will be displayed)"
echo -e "\t\"fields\"\t\tthe other fields number that you want display"
#echo -e "\t\"filterFieldValue\"\tthe value of key that you want filter (can be a regex)"
echo -e "\t\"filterFieldValue\"\tthe value of key that you want filter"
echo -e "\t\t\t\t(regex not yet implemented : use gawk instead awk if you need regex implementation)"
echo -e "\t\"options\"\t\tswitches for change behavior or display or our script"
echo -e "\t\t\t\t-h|--help\tthis message"
echo -e "\t\t\t\t-d|--no-debug\tdisable debug log (you can also change DEBUG variable directly into script)"
echo -e "\t\t\t\t-s|--separator\tchange output default separator by a space"
echo -e "\t\t\t\t-1|--no-first\tdon't print the key column (first field number given)"
echo
if [ -z "$1" ] || [ $1 -eq 0 ] ; then
exit
fi
}
function isOption() {
printf "%s" "$1" | grep -qE "^--?"
}
function defineOptions() {
local ret=0
while [ $# -ne 0 ] ; do
if (isOption $1) ; then
log "'$1' seems to be an option... define it" 2
if [ $# -le 2 ] ; then
defineOption $1
quit "$1 is misplaced : options have to be given before filterFieldValue & fileName" 1
else
defineOption $1 \
|| let ret++
fi
fi
shift
done
return $ret
}
function isMultipleOption() {
printf "%s" "$1" | grep -qE "^-[0-9a-zA-Z]{2,}"
}
function defineOption() {
local option="$1"
local ret=0
local count=1
log "defineOption: $1" 1
if (isMultipleOption "$1") ; then
while [ $count -ne ${#1} ] ; do
defineOption "-${1:$count:1}"
let count++
done
else
case $option in
-h|--help) helpMe 0 ;;
-s|--separator) alternateSeparator=1 ;;
-1|--no-first) noFirst=1 ;;
-d|--no-debug) DEBUG=0 ;;
*) quit "unvalid option given : \"$option\"" 1 ; ret=$? ;;
esac
fi
options="$options $option"
return $ret
}
# get args
function defineArgs() {
local count=0
while [ $# -ne 0 ] ; do
if (!(isOption "$1")) ; then
log "'$1' is not an option" 2
if [ $# -eq 1 ] ; then # last arg is the file name
log "'$1' last arg is the file name" 2
csvFile=$1
elif [ $# -eq 2 ] ; then # penultimate arg is the filter
log "'$1' penultimate arg is the filter" 2
filter="$1"
else # everything else is field number
if [ -z "$key" ] ; then # first field given is key number
log "'$1' first field given is key number" 2
key="$1"
if [ $noFirst -eq 0 ] ; then
log "'$1' add key to fields" 2
fields="$1"
fi
else
log "'$1' add to fields" 2
if [ -z "$fields" ] ; then
fields="$1"
else
fields="$fields $1"
fi
fi
fi
fi
shift # erase arg from args ($@)
let count++
done
[ $count -ne 0 ]
return $?
}
# test args
function testVariables() {
local arg=""
local count="0"
local field=""
for arg in CONFFILE AWK key fields filter csvFile ; do
eval "var=\"\$$arg\""
log "$arg: $var" 1
if [ ! -z "$var" ] ; then
case $arg in
filter) : DO NOTHING ;;
AWK)
[ -e "$var" -a -x "$var" ] \
|| quit "$var is not valid AWK version (don't exits or not executable)" 1
;;
csvFile|CONFFILE)
[ -e "$var" -a -r "$var" ] \
|| quit "$var is not valid $arg (don't exists or is not readable)" 1
;;
fields)
count=`echo "$var" | wc -w`
if [ "$count" -lt 1 ] ; then
quit "I need 2 or more fields number to display as argument (only $count given : \"$var\")" 1
else
for field in $var ; do
if (!(isDigit $field)) ; then
quit "an argument passed as field number is not a digit ($field) !" 1
fi
done
fi
;;
key)
if (!(isDigit "$var")) ; then
quit "the first argument passed as key field is not a digit ($var) !" 1
fi
;;
*) quit "WTF \"$arg\" ($var) !!!" 1
;;
esac
else
quit "$arg is empty !!!" 1
fi
done
}
function runAWK() {
. $CONFFILE
[ -z "$separator" ] && quit "separator is not defined in $CONFFILE !!!" 1
[ -z "$delimiter" ] && quit "delimiter is not defined in $CONFFILE !!!" 1
[ $delimiter == '"' ] && delimiter="\\\""
local printAwkValues=""
local field=""
for field in $fields ; do
if [ -z "$printAwkValues" ] ; then
printAwkValues="\$$field"
else
printAwkValues="$printAwkValues, \$$field"
fi
done
awkCmd="BEGIN { \
FS=\"$separator\" ; \
OFS=\"$separator\" ; \
} \
\$$key ~ /$filter/ \
{ \
gsub (\"$delimiter\", \"\"); \
print $printAwkValues \
}"
log "awk cmd: ${awkCmd// /}" 2
$AWK "$awkCmd" $csvFile
}
#--------------------------------------------------------------------------------
# RUN SCRIPT
#--------------------------------------------------------------------------------
debug && echo >&2
defineOptions $@ \
&& defineArgs $@ \
&& testVariables \
&& runAWK \
|| quit "error encountered !!!" $?
|
Markdown | UTF-8 | 3,208 | 2.609375 | 3 | [] | no_license | ### 「推荐细读」给Rust提交PR全记录
该文记录了作者从发现问题,解决问题,到给Rust提PR的全过程,非常推荐大家仔细阅读一遍。
[原文](https://blog.dend.ro/rust-and-the-case-of-the-redundant-comparison)
---
### 「推荐仔细品味」「油管」从C到Rust的一些模式
该视频是GUADEC 2018(可能是什么大会)上面第一个主题分享,主要内容是介绍了如何将遗留的C语言的系统用Rust进行重构。视频中给出了一些模式和技巧,比如如何给C语言暴露Rust迭代器等,推荐仔细看看。
[原文](https://www.reddit.com/r/rust/comments/94rp03/guadec_2018_federico_mena_quintero_patterns_of/)
---
### intl_pluralrules:一个用CLDR复数规则处理复数的Rust库
通过利用Unicode语言复数规则和Unicode CLDR中的多个规则来确定数字输入的CLDR复数类别。该库对于Rust实现i18n和l10n至关重要。
> 复数的翻译是一个开发全球化应用程序时常见的问题。复数是用来表示一个“不是一”的数。比如说在英文中的 hour 跟 hours,单数跟复数会是不一样的单词。单复数的变化型态在每个语言里面都不一样,最普遍的复数型态用来表示二或更大的数字。在某些语言中,也有用来表示分数、零、负数或者二。
>Unicode Common Locale Data Repository (CLDR) 包含大量语言专属的资料,其中也包含所有语言的复数表现形态。CLDR 使用方便记忆的短标签给不同的复数类别,这些标签会被用在大多数的全球化 APIs:
- Zero:表示零。
- one (singular) :表示一 ( 单数 )
- two (dual) :表示两个
- few (paucal):表示少数
- many:用来表示多数或者分数
- other:必备,如果该语言只有一种表示方式的话还是一样会使用到
[原文](https://blog.mozilla.org/l10n/2018/08/03/intl_pluralrules-a-rust-crate-for-handling-plural-forms-with-cldr-plural-rules/)
---
如何在OpenFaaS上面运行Rust
OpenFaaS是函数即服务的开源实现(Function as a Service),可以自行部署。
[原文](https://booyaa.wtf/2018/run-rust-in-openfaas/)
---
### Rust编写的用来分析S3 Bucket信息的库
[原文](https://whitfin.io/analyzing-your-buckets-with-s3-meta/)
---
### 「通告」嵌入式工程师jamesmunns准备为Rust嵌入式Book贡献内容
来自Rust社区的jamesmunns承诺2018年剩下的日子里每两周为Rust嵌入式Book写一章内容,预计9章
[原文](https://jamesmunns.com/blog/working-on-the-book/)
---
### ElasticSearch Rest API的Rust客户端
[rs-es](https://github.com/benashford/rs-es)
---
### Weld:为数据分析准备的高性能运行时
Weld是一种用于提高数据密集型应用程序性能的语言和运行时。 它通过使用公共中间表示在库中表达核心计算,并为每个框架优化库和函数。
[weld](https://github.com/weld-project/weld)
---
### 用于测试HTTP server的库gabira
[gabira](https://github.com/ersenal/gabira)
---
- ( 每日新闻[备份地址](https://github.com/RustStudy/rust_daily_news) )
- [Telgram Channel : https://t.me/rust_daily_news ](https://t.me/rust_daily_news )
|
Java | UTF-8 | 924 | 2 | 2 | [] | no_license | package top.fzqblog.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.fzqblog.mapper.LoginLogMapper;
import top.fzqblog.po.model.LoginLog;
import top.fzqblog.po.query.LoginLogQuery;
import top.fzqblog.service.LoginLogService;
@Service
public class LoginLogServiceImpl implements LoginLogService {
@Autowired
private LoginLogMapper<LoginLog, LoginLogQuery> loginLogMapper;
@Override
public void addLoginLog(LoginLog loginLog) {
loginLogMapper.insert(loginLog);
}
@Override
public List<LoginLog> findLoginLog() {
LoginLogQuery loginLogQuery = new LoginLogQuery();
return loginLogMapper.selectList(loginLogQuery);
}
@Override
public List<LoginLog> findLoginLogGroupByIp() {
LoginLogQuery loginLogQuery = new LoginLogQuery();
return loginLogMapper.selectListGroupByIp(loginLogQuery);
}
}
|
Markdown | UTF-8 | 38 | 3.40625 | 3 | [] | no_license | # Markup-for-PHP-C-developers_Homework |
C# | UTF-8 | 472 | 2.5625 | 3 | [] | no_license | using System;
namespace ComponentEngine
{
public class Component
{
public Component() {}
virtual public void SetArguments(ComponentArguments arguments) {}
virtual public void Boot() {
HasBooted = true;
}
public bool HasBooted {
get;
set;
}
virtual public void Update() {
if (! HasBooted)
throw new ComponentNotBooted();
}
}
}
|
Java | UTF-8 | 838 | 1.945313 | 2 | [] | no_license | package com.jianfei.d.base.filter.xss;
import java.io.IOException;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.filter.OncePerRequestFilter;
/**
* 特殊字符过滤
* @author ZhangBo
* @date 2015年5月26日 下午6:14:54
*/
//@WebFilter(urlPatterns="/*",filterName="filter0")
public class XssFilter extends OncePerRequestFilter{
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
filterChain.doFilter(new XssRequestWrapper(request), response);
}
}
|
C++ | UTF-8 | 4,634 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | #include "gtexture.hpp"
GTexture::GTexture() {
}
GTexture::GTexture(SDL_Renderer *renderer, std::string filename, float angle) {
SDL_Surface *tmpSurface = IMG_Load(filename.c_str());
if (tmpSurface == NULL) {
std::cout << "Could not load image " << filename << " : " << IMG_GetError() << std::endl;
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_VERBOSE, "Could not load image ", IMG_GetError());
#endif
} else {
if (tmpSurface->format->Amask) {
} else {
SDL_SetColorKey(tmpSurface, SDL_TRUE, SDL_MapRGB(tmpSurface->format, 0xFF, 0x00, 0xFF));
}
//Create texture from surface pixels
this->tex = SDL_CreateTextureFromSurface(renderer, tmpSurface);
if (this->tex == NULL) {
std::cout << "Could not create texture from " << filename << " : " << SDL_GetError()
<< std::endl;
#ifdef __ANDROID__
__android_log_print(ANDROID_LOG_VERBOSE, "Could not create texture from ",
SDL_GetError());
#endif
} else {
this->width = tmpSurface->w;
this->height = tmpSurface->h;
this->x = 0;
this->y = 0;
this->texRect = {x, y, width, height};
}
SDL_FreeSurface(tmpSurface);
}
}
void GTexture::setupRect(int x, int y, int w, int h) {
this->texRect.x = x;
this->texRect.y = y;
this->texRect.w = w;
this->texRect.h = h;
}
void GTexture::destroyTex() {
SDL_DestroyTexture(this->tex);
this->tex = NULL;
this->width = 0;
this->height = 0;
}
void GTexture::setColor(Uint8 red, Uint8 green, Uint8 blue) {
//Modulate texture rgb
SDL_SetTextureColorMod(this->tex, red, green, blue);
}
void GTexture::setBlendMode(SDL_BlendMode blending) {
//Set blending function
SDL_SetTextureBlendMode(this->tex, blending);
}
void GTexture::setAlpha(Uint8 alpha) {
//Modulate texture alpha
SDL_SetTextureAlphaMod(this->tex, alpha);
}
void GTexture::setPos(int x, int y) {
this->texRect.x = x;
this->texRect.y = y;
}
void GTexture::setPos(SDL_Vector pos) {
this->texRect.x = pos.x;
this->texRect.y = pos.y;
}
void GTexture::setRect(SDL_Rect rect) {
this->texRect = rect;
}
int GTexture::getTextureW() {
return this->width;
}
int GTexture::getTextureH() {
return this->height;
}
SDL_Rect *GTexture::getTexRect() {
return &this->texRect;
}
SDL_Texture *GTexture::getTex() {
return this->tex;
}
GTexture::~GTexture() {
}
void GTexture::draw(SDL_Renderer *renderer, SDL_Rect *sprRect, SDL_Rect *camRect, float angle) {
SDL_Rect drawingRect = {sprRect->x - camRect->x, sprRect->y - camRect->y, sprRect->w,
sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, NULL, &drawingRect, angle, nullptr, SDL_FLIP_NONE);
}
void GTexture::draw(SDL_Renderer *renderer, int _x, int _y, SDL_Rect *sprRect, SDL_Rect *camRect) {
SDL_Rect drawingRect = {_x - camRect->x, _y - camRect->y, sprRect->w, sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, NULL, &drawingRect, 0.0f, nullptr, SDL_FLIP_NONE);
}
void GTexture::draw(SDL_Renderer *renderer, SDL_Rect *sprRect, SDL_Rect *camRect, float angle,
SDL_RendererFlip flip) {
SDL_Rect drawingRect = {sprRect->x - camRect->x, sprRect->y - camRect->y, sprRect->w,
sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, NULL, &drawingRect, angle, nullptr, flip);
}
void GTexture::draw(SDL_Renderer *renderer, SDL_Rect *srcRect, SDL_Rect *sprRect, SDL_Rect *camRect,
float angle) {
SDL_Rect drawingRect = {sprRect->x - camRect->x, sprRect->y - camRect->y, sprRect->w,
sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, srcRect, &drawingRect, angle, nullptr, SDL_FLIP_NONE);
}
void GTexture::draw(SDL_Renderer *renderer, int x, int y, SDL_Rect *srcRect, SDL_Rect *sprRect,
SDL_Rect *camRect) {
SDL_Rect drawingRect = {sprRect->x - camRect->x, sprRect->y - camRect->y, sprRect->w,
sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, srcRect, &drawingRect, 0.0f, nullptr, SDL_FLIP_NONE);
}
void GTexture::draw(SDL_Renderer *renderer, SDL_Rect *srcRect, SDL_Rect *sprRect, SDL_Rect *camRect,
float angle, SDL_RendererFlip flip) {
SDL_Rect drawingRect = {sprRect->x - camRect->x, sprRect->y - camRect->y, sprRect->w,
sprRect->h};
SDL_RenderCopyEx(renderer, this->tex, srcRect, &drawingRect, angle, nullptr, flip);
}
|
C++ | UTF-8 | 1,969 | 3.625 | 4 | [] | no_license | #pragma once
class CPoint
{
public:
int x, y;
CPoint()
{
this->initialize(0, 0);
}
CPoint(int component)
{
this->initialize(component, component);
}
CPoint(int x, int y)
{
this->initialize(x, y);
}
void initialize(int x, int y)
{
this->x = x;
this->y = y;
}
CPoint operator + (const CPoint &other)
{
return CPoint(this->x + other.x, this->y + other.y);
}
CPoint operator + (int component)
{
return CPoint(this->x + component, this->y + component);
}
CPoint operator - (const CPoint &other)
{
return CPoint(this->x - other.x, this->y - other.y);
}
CPoint operator - (int component)
{
return CPoint(this->x - component, this->y - component);
}
CPoint operator / (const CPoint &other)
{
return CPoint(this->x / other.x, this->y / other.y);
}
CPoint operator / (int component)
{
return CPoint(this->x / component, this->y / component);
}
CPoint operator * (const CPoint &other)
{
return CPoint(this->x * other.x, this->y * other.y);
}
CPoint operator * (int component)
{
return CPoint(this->x * component, this->y * component);
}
CPoint &operator += (const CPoint &other)
{
this->x += other.x;
this->y += other.y;
return *this;
}
CPoint &operator += (int component)
{
this->x += component;
this->y += component;
return *this;
}
CPoint &operator -= (const CPoint &other)
{
this->x -= other.x;
this->y -= other.y;
return *this;
}
CPoint &operator -= (int component)
{
this->x -= component;
this->y -= component;
return *this;
}
CPoint &operator /= (const CPoint &other)
{
this->x /= other.x;
this->y /= other.y;
return *this;
}
CPoint &operator /= (int component)
{
this->x /= component;
this->y /= component;
return *this;
}
CPoint &operator *= (const CPoint &other)
{
this->x *= other.x;
this->y *= other.y;
return *this;
}
CPoint &operator *= (int component)
{
this->x *= component;
this->y *= component;
return *this;
}
}; |
Java | UTF-8 | 4,477 | 2.171875 | 2 | [] | no_license | package com.zhang.ddd.presentation.facade;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.zhang.ddd.domain.aggregate.post.entity.Answer;
import com.zhang.ddd.domain.aggregate.post.repository.QuestionRepository;
import com.zhang.ddd.domain.aggregate.user.entity.User;
import com.zhang.ddd.domain.aggregate.user.repository.UserRepository;
import com.zhang.ddd.domain.aggregate.vote.entity.valueobject.Vote;
import com.zhang.ddd.domain.aggregate.vote.entity.valueobject.VoteResourceType;
import com.zhang.ddd.domain.aggregate.vote.entity.valueobject.VoteType;
import com.zhang.ddd.domain.aggregate.vote.repository.VoteRepository;
import com.zhang.ddd.presentation.facade.assembler.QuestionAssembler;
import com.zhang.ddd.presentation.facade.assembler.UserAssembler;
import com.zhang.ddd.presentation.facade.dto.post.AnswerDto;
import com.zhang.ddd.presentation.facade.dto.post.QuestionDto;
import com.zhang.ddd.presentation.facade.dto.user.UserDto;
import com.zhang.ddd.presentation.web.security.LoginUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class FacadeHelper {
@Autowired
QuestionRepository questionRepository;
@Autowired
UserRepository userRepository;
@Autowired
VoteRepository voteRepository;
public List<QuestionDto> wrapAnswerQuestion(List<AnswerDto> answerDtos) {
Map<Long, QuestionDto> questionDtos = questionRepository
.findByIds(answerDtos.stream().map(AnswerDto::getParentId).collect(Collectors.toList()))
.stream().map(QuestionAssembler::toDTO).collect(Collectors.toMap(QuestionDto::getId, e -> e,
(e1, e2) -> {
return e1;
}));
fillQuestionUsers(questionDtos.values().stream().collect(Collectors.toList()));
List<QuestionDto> res = answerDtos.stream().map(e -> {
QuestionDto q = questionDtos.get(e.getParentId());
q = q.copy();
q.setCover(e);
return q;
}).collect(Collectors.toList());
return res;
}
public void fillQuestionUsers(List<QuestionDto> questionDtos) {
Map<Long, UserDto> users = getUserIdMapping(questionDtos.stream()
.map(QuestionDto::getAuthorId).collect(Collectors.toList()));
questionDtos.stream().forEach(e -> e.setAuthor(users.get(e.getAuthorId())));
}
public void fillAnswerUsers(List<AnswerDto> answerDtos) {
Map<Long, UserDto> users = getUserIdMapping(answerDtos.stream()
.map(AnswerDto::getAuthorId).collect(Collectors.toList()));
answerDtos.stream().forEach(e -> e.setAuthor(users.get(e.getAuthorId())));
}
public void fillQuestionVotes(List<QuestionDto> questionDtos) {
UserDto me = LoginUtil.getCurrentUser();
if (me == null){
return;
}
Map<Long, QuestionDto> qm = questionDtos
.stream().collect(Collectors.toMap(QuestionDto::getId, e -> e));
List<Vote> votes = voteRepository.findByResourceIds(me.getId(),
questionDtos.stream().map(QuestionDto::getId).collect(Collectors.toList()),
VoteResourceType.QUESTION);
votes.stream().forEach(e -> {
QuestionDto questionDto = qm.get(e.getResourceId());
questionDto.setUpvoted(e.getVoteType() == VoteType.UPVOTE);
});
}
public void fillAnswerVotes(List<AnswerDto> answerDtos) {
UserDto me = LoginUtil.getCurrentUser();
if (me == null){
return;
}
Map<Long, AnswerDto> am = answerDtos
.stream().collect(Collectors.toMap(AnswerDto::getId, e -> e));
List<Vote> votes = voteRepository.findByResourceIds(me.getId(),
answerDtos.stream().map(AnswerDto::getId).collect(Collectors.toList()),
VoteResourceType.ANSWER);
votes.stream().forEach(e -> {
AnswerDto answerDto = am.get(e.getResourceId());
answerDto.setUpvoted(e.getVoteType() == VoteType.UPVOTE);
answerDto.setDownvoted(e.getVoteType() == VoteType.DOWNVOTE);
});
}
public Map<Long, UserDto> getUserIdMapping(List<Long> ids) {
return userRepository.findByIds(ids)
.stream()
.collect(Collectors.toMap(User::getId, e -> UserAssembler.toDTO(e)));
}
}
|
Python | UTF-8 | 92 | 3.296875 | 3 | [
"MIT"
] | permissive | l = []
l.insert(-1,'a')
print(l)
l.insert(-1,'b')
print(l)
l.insert(-1,'c')
print(l)
|
Java | UTF-8 | 5,685 | 1.945313 | 2 | [] | no_license | package com.example.siddharth.khelkhelo;
import android.app.ProgressDialog;
import android.media.ExifInterface;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.ClearCacheRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import com.example.siddharth.khelkhelo.Adapters.*;
import com.example.siddharth.khelkhelo.Modelclasses.*;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
/**
* Created by siddharth on 17/5/18.
*/
public class Photo extends AppCompatActivity implements SwipeRefreshLayout.OnRefreshListener{
private String URL_DATA = "https://siddharthsoni020.000webhostapp.com/photodata.php";
private RecyclerView recyclerView;
String url;
private Adapter_for_photo adapter;
private SwipeRefreshLayout swipeRefreshLayout;
private ArrayList<com.example.siddharth.khelkhelo.Modelclasses.ModelClass> modelClass;
public static final String PHOTO = "photo";
public static final String NAME = "name";
public static final String DESCRIPTION = "description";
private int offSet = 0;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.photo);
setTitle("Photo");
swipeRefreshLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_layout);
recyclerView = findViewById(R.id.recycle_view_photo);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new GridLayoutManager(Photo.this,2));
modelClass = new ArrayList<>();
swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeColors(
getResources().getColor(android.R.color.holo_blue_bright),
getResources().getColor(android.R.color.holo_green_light),
getResources().getColor(android.R.color.holo_orange_light),
getResources().getColor(android.R.color.holo_red_light)
);
swipeRefreshLayout.post(new Runnable() {
@Override
public final void run() {
if (swipeRefreshLayout !=null) {
swipeRefreshLayout.setRefreshing(true);
}
loadData();
}
}
);
}
@Override
public void onRefresh() {
// swipeRefreshLayout.setOnRefreshListener(this);
// swipeRefreshLayout.post(new Runnable() {
// @Override
// public void run() {
modelClass.clear();
adapter.notifyDataSetChanged();
loadData();
// }
// });
}
private void loadData() {
swipeRefreshLayout.setRefreshing(true);
// final ProgressDialog progressDialog = new ProgressDialog(this);
// progressDialog.setMessage("Loading...");
// progressDialog.show();
StringRequest stringRequest=new StringRequest(Request.Method.POST, URL_DATA,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
Log.i("info",response);
// progressDialog.dismiss();
try {
JSONObject jsonObject=new JSONObject(response);
JSONArray jsonArray=jsonObject.getJSONArray("data");
for(int i=0;i<jsonArray.length();i++)
{
JSONObject jObj=jsonArray.getJSONObject(i);
com.example.siddharth.khelkhelo.Modelclasses.ModelClass mymodel=
new com.example.siddharth.khelkhelo.Modelclasses.ModelClass(jObj.getString("photo"),jObj.getString("name")
,jObj.getString("description"));
modelClass.add(mymodel);
}
adapter=new Adapter_for_photo(modelClass,Photo.this);
recyclerView.setAdapter(adapter);
swipeRefreshLayout.setRefreshing(false);
// adapter.setOnItemClickListener(Photo.this);
} catch (JSONException e) {
e.printStackTrace();
}
}
},
new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
Log.i("info",String.valueOf(error));
Toast.makeText(Photo.this, "Error" + error.toString(), Toast.LENGTH_SHORT).show();
}
});
RequestQueue requestQueue= Volley.newRequestQueue(this);
requestQueue.add(stringRequest);
}
}
|
Shell | UTF-8 | 131 | 3.015625 | 3 | [] | no_license | #!/bin/bash
echo "enter the 1st num"
read num1
echo "enter the 2nd num"
read num2
sum=$(($num1+$num2))
echo "sum is : $sum"
|
C | UTF-8 | 1,333 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | /*
* debug.c
*
* Created on: 08.03.2019
* Author: Alexey Adadurov
*/
#include "stm32f1xx_hal.h"
#include "usbd_def.h"
#include <stdlib.h>
static UART_HandleTypeDef *debugUart;
static unsigned int debugCounter;
extern void trace_write_init(UART_HandleTypeDef *huart)
{
debugUart = huart;
debugCounter = 0;
}
void trace_write_string(const char* string)
{
uint32_t len = 0;
const char* pTermChar = string;
while( *pTermChar != 0 )
{
++len;
++pTermChar;
}
HAL_UART_Transmit(debugUart, string, len /* chars to transmit */, len /* milliseconds*/);
}
void trace_write_int(uint32_t value)
{
char buffer[10];
utoa(value, buffer, 16);
buffer[8] = 0;
trace_write_string(buffer);
}
void trace_write_counter()
{
debugCounter += 1;
trace_write_int(debugCounter);
trace_write_string(": ");
}
void trace_write_newline()
{
trace_write_string("\r\n");
}
void usb_debug_usb_setup_trace(const char *source, USBD_SetupReqTypedef *req)
{
trace_write_counter();
trace_write_string(source);
trace_write_string(" ");
trace_write_int(req->bmRequest);
trace_write_string(" ");
trace_write_int(req->bRequest);
trace_write_string(" ");
trace_write_int(req->wValue);
trace_write_string(" ");
trace_write_int(req->wIndex);
trace_write_string(" ");
trace_write_int(req->wLength);
trace_write_newline();
}
|
TypeScript | UTF-8 | 3,488 | 2.875 | 3 | [
"MIT"
] | permissive | import { parseL1, parseL1Exp, Exp, makePrimOp, makeBoolExp } from "../../src/L1/L1-ast";
import { evalL1program, makeEnv, makeEmptyEnv, evalSequence } from '../../src/L1/L1-eval';
import { bind, makeOk, isFailure } from '../../src/shared/result';
import { parse as p } from "../../src/shared/parser";
describe('L1 Eval', () => {
it('Evaluates a program without an explicit environment', () => {
expect(bind(parseL1(`(L1 (define x 3) + #t (+ (* x x) (+ x x)))`), evalL1program)).toEqual(makeOk(15));
expect(bind(parseL1(`(L1 (define x 3) + #t (/ (* x x) (- (+ x x) x)))`), evalL1program)).toEqual(makeOk(3));
});
it('Evaluates all arithmetic primitives', () => {
expect(bind(parseL1(`(L1 *)`), evalL1program)).toEqual(makeOk(makePrimOp('*')));
expect(bind(parseL1(`(L1 (- 6 3))`), evalL1program)).toEqual(makeOk(3));
expect(bind(parseL1(`(L1 (/ 6 3))`), evalL1program)).toEqual(makeOk(2));
expect(bind(parseL1(`(L1 (+ 6 3))`), evalL1program)).toEqual(makeOk(9));
expect(bind(parseL1(`(L1 (+ -1 1))`), evalL1program)).toEqual(makeOk(0));
expect(bind(parseL1(`(L1 (* 6 3))`), evalL1program)).toEqual(makeOk(18));
expect(bind(parseL1(`(L1 (/ -3 0.5))`), evalL1program)).toEqual(makeOk(-6));
});
it('Evaluates all boolean primitives', () => {
expect(bind(parseL1(`(L1 (> 6 3))`), evalL1program)).toEqual(makeOk(true));
expect(bind(parseL1(`(L1 (< 6 3))`), evalL1program)).toEqual(makeOk(false));
expect(bind(parseL1(`(L1 (= 6 6))`), evalL1program)).toEqual(makeOk(true));
expect(bind(parseL1(`(L1 (= 6 3))`), evalL1program)).toEqual(makeOk(false));
expect(bind(parseL1(`(L1 (not #t))`), evalL1program)).toEqual(makeOk(false));
});
it('Evaluates a program with an explicit environment', () => {
const env1 = makeEnv("x", 1, makeEmptyEnv());
const result1 = bind(bind(p("(+ x 2)"), parseL1Exp),
(exp: Exp) => evalSequence([exp], env1));
expect(result1).toEqual(makeOk(3));
const env2 = makeEnv("x", 1, makeEnv("y", 2, makeEmptyEnv()));
const result2 = bind(bind(p("(+ y 2)"), parseL1Exp),
(exp: Exp) => evalSequence([exp], env2));
expect(result2).toEqual(makeOk(4));
});
describe("Failures", () => {
it("returns a Failure when accessing a variable in an empty env", () => {
const env = makeEmptyEnv();
const result = bind(bind(p("(+ y 2)"), parseL1Exp),
(exp: Exp) => evalSequence([exp], env));
expect(result).toSatisfy(isFailure);
});
it("returns a Failure when accessing a variable not present in the env", () => {
const env = makeEnv("x", 1, makeEmptyEnv());
const result = bind(bind(p("(+ y 2)"), parseL1Exp),
(exp: Exp) => evalSequence([exp], env));
expect(result).toSatisfy(isFailure);
});
it("returns a Failure when evaluating an empty sequence of Exps", () => {
expect(evalL1program({ tag: "Program", exps: []})).toSatisfy(isFailure);
});
it("returns a Failure for an unknown primitive op", () => {
expect(bind(bind(p("(eq? 1 1)"), parseL1Exp), exp => evalSequence([exp], makeEmptyEnv()))).toSatisfy(isFailure);
})
});
});
|
C# | UTF-8 | 5,054 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | using System.Linq.Expressions;
using commercetools.Sdk.Linq.Query.Visitors;
namespace commercetools.Sdk.Linq.Query.Converters
{
// | ||
// & &&
public class BinaryLogicalPredicateVisitorConverter : IQueryPredicateVisitorConverter
{
public int Priority { get; } = 4;
public bool CanConvert(Expression expression)
{
return Mapping.LogicalOperators.ContainsKey(expression.NodeType);
}
public IPredicateVisitor Convert(Expression expression, IPredicateVisitorFactory predicateVisitorFactory)
{
BinaryExpression binaryExpression = expression as BinaryExpression;
if (binaryExpression == null)
{
return null;
}
string operatorSign = Mapping.GetOperator(expression.NodeType, Mapping.LogicalOperators);
IPredicateVisitor predicateVisitorLeft = predicateVisitorFactory.Create(binaryExpression.Left);
IPredicateVisitor predicateVisitorRight = predicateVisitorFactory.Create(binaryExpression.Right);
// c => c.Parent.Id == "some id" || c.Parent.Id == "some other id"
if (CanCombinePredicateVisitors(predicateVisitorLeft, predicateVisitorRight))
{
return CombinePredicateVisitors(predicateVisitorLeft, operatorSign, predicateVisitorRight);
}
return new BinaryPredicateVisitor(predicateVisitorLeft, operatorSign, predicateVisitorRight);
}
private static bool CanCombinePredicateVisitors(IPredicateVisitor left, IPredicateVisitor right)
{
return HasSameParents(left, right);
}
private static bool HasSameParents(IPredicateVisitor left, IPredicateVisitor right)
{
bool result = false;
while (left is ContainerPredicateVisitor containerLeft && right is ContainerPredicateVisitor containerRight)
{
result = ArePropertiesEqual(containerLeft, containerRight);
left = containerLeft.Inner;
right = containerRight.Inner;
}
return result;
}
private static bool ArePropertiesEqual(ContainerPredicateVisitor left, ContainerPredicateVisitor right)
{
ConstantPredicateVisitor constantLeft = left.Parent as ConstantPredicateVisitor;
ConstantPredicateVisitor constantRight = right.Parent as ConstantPredicateVisitor;
if (constantLeft != null && constantRight != null)
{
return constantLeft.Constant == constantRight.Constant;
}
return false;
}
private static IPredicateVisitor CombinePredicateVisitors(IPredicateVisitor left, string operatorSign, IPredicateVisitor right)
{
IPredicateVisitor innerLeft = left;
IPredicateVisitor innerRight = right;
ContainerPredicateVisitor container = null;
while (innerLeft is ContainerPredicateVisitor containerLeft && innerRight is ContainerPredicateVisitor containerRight)
{
innerLeft = containerLeft.Inner;
innerRight = containerRight.Inner;
container = new ContainerPredicateVisitor(containerLeft.Parent, container);
}
if (innerLeft is BinaryPredicateVisitor binaryLeft && innerRight is BinaryPredicateVisitor binaryRight)
{
BinaryPredicateVisitor binaryPredicateVisitor = new BinaryPredicateVisitor(innerLeft, operatorSign, innerRight);
return CombinePredicates(container, binaryPredicateVisitor);
}
return null;
}
// When there is more than one property accessor, the last accessor needs to be taken out and added to the binary logical predicate.
// property(property(property operator value)
private static IPredicateVisitor CombinePredicates(IPredicateVisitor left, IPredicateVisitor right)
{
var containerLeft = (ContainerPredicateVisitor)left;
IPredicateVisitor parent = containerLeft;
if (parent == null)
{
return new ContainerPredicateVisitor(right, left);
}
IPredicateVisitor innerContainer = right;
ContainerPredicateVisitor combinedContainer = null;
while (parent != null)
{
if (CanBeCombined(parent))
{
var container = (ContainerPredicateVisitor)parent;
innerContainer = new ContainerPredicateVisitor(innerContainer, container.Inner);
combinedContainer = new ContainerPredicateVisitor(innerContainer, container.Parent);
parent = container.Parent;
}
}
return combinedContainer;
}
private static bool CanBeCombined(IPredicateVisitor left)
{
return left is ContainerPredicateVisitor;
}
}
}
|
Java | UTF-8 | 2,262 | 2.78125 | 3 | [] | no_license | package com.nixsolutions.platform.service.impl;
import com.nixsolutions.platform.persistence.entity.Company;
import com.nixsolutions.platform.persistence.repository.CompanyRepository;
import com.nixsolutions.platform.service.CompanyService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@Service
public class CompanyServiceImpl implements CompanyService {
private static final Logger log = LoggerFactory.getLogger("log");
private final CompanyRepository companyRepository;
public CompanyServiceImpl(CompanyRepository companyRepository) {
this.companyRepository = companyRepository;
}
@Override
public void create(Company company) {
if (!companyRepository.existsByCompanyName(company.getCompanyName())) {
log.info("Creating of company with name - " + company.getCompanyName());
companyRepository.save(company);
log.info("The company was created!");
} else
throw new RuntimeException("Company with name - " + company.getCompanyName() + " already exists!");
}
@Override
public void update(Company company) {
if (companyRepository.existsById(company.getId())) {
log.info("Updating of company with name - " + company.getCompanyName());
companyRepository.save(company);
log.info("The company was updated!");
} else
throw new RuntimeException("Company with name - " + company.getCompanyName() + " does not exist!");
}
@Override
public void delete(Integer id) {
if (companyRepository.existsById(id)) {
log.warn("Deleting of company with id - " + id);
companyRepository.deleteById(id);
log.warn("The company was deleted!");
} else
throw new RuntimeException("Company with id - " + id + " does not exist!");
}
@Override
public Company find(Integer id) {
if (companyRepository.existsById(id)) {
log.info("Finding of company with id - " + id);
return companyRepository.getById(id);
} else
throw new RuntimeException("Company with id - " + id + " does not exist!");
}
}
|
Markdown | UTF-8 | 1,982 | 2.96875 | 3 | [] | no_license | # Simple_Password_Manager_v1.0
Software Development of: "Simple Password Manager v1.0". Programmed by Rizky Khapidsyah. Built and developed with Visual Basic 6 programming. The target has been applied for basic learning of VB programming.
For the first use of the program, please follow the steps below: <br>
1. Please register activex (.ocx) in the following locations: <br> https://github.com/RizkyKhapidsyah/Simple_Password_Manager_v1.0/tree/master/activex <br>
2. Please register the following file: <a href="https://github.com/RizkyKhapidsyah/Simple_Password_Manager_v1.0/blob/master/first_set/DefaultSetting.reg">"DefaultSetting.reg"</a> into Windows registry. <br>
If an error occurs when registering the activex library (.ocx) and Windows cannot register the ocx, please improve it yourself by manually changes the ocx control to a general IDE controls which is the default standard for the environment or other method.
<br>
________________________________________________________________________________________________________________________________
Pengembangan Perangkat Lunak : "Simple Password Manager v1.0. Diprogram oleh Rizky Khapidsyah. Dibangun dan dikembangkan menggunakan pemrograman Visual Basic 6. Dengan tujuan pembelajaran.
Untuk penggunaan pertama pada program, silahkan ikuti langkah berikut : <br>
1. Silahkan register activex (.ocx) pada lokasi berikut ini : <br> https://github.com/RizkyKhapidsyah/Simple_Password_Manager_v1.0/tree/master/activex <br>
2. Registrasi file <a href="https://github.com/RizkyKhapidsyah/Simple_Password_Manager_v1.0/blob/master/first_set/DefaultSetting.reg">"DefaultSetting.reg"</a> ke dalam registry Windows. <br>
Jika terjadi kesalahan saat registrasi activex library (.ocx) dan Windows tidak dapat meregister ocx tersebut, silahkan improve sendiri apakah dengan mengganti control ocx tersebut menjadi control yang merupakan standar bawaan environment atau cara lain.
<br><br>
Copyright © 2018 by Rizky Khapidsyah. <br>
All Right Reserved.
|
TypeScript | UTF-8 | 4,812 | 3.4375 | 3 | [] | no_license | import { buildActionsBuilder } from '../buildActionsBuilder'
import { TExpression, IDictionary } from '../types'
type TPredicate<T> = (value: T) => boolean
interface IPeriod<T> {
start: T
end: T
}
function evaluate<T> (handler: any, value: T) {
return typeof handler === 'function' ? handler(value) : handler
}
function getDateTime (key: string, dictionary: IDictionary<number>) {
switch (key) {
case 'time':
return new Date(0, 0, 1, dictionary['hour'], dictionary['minute'])
case 'date':
return new Date(0, dictionary['month'], dictionary['day'])
default:
return new Date(dictionary['year'], dictionary['month'], dictionary['day'], dictionary['hour'], dictionary['minute'])
}
}
const operations = {
inc (step: number, value: number) {
return value + step
},
sum (...numbers: number[]) {
return numbers.reduce((sum, value) => sum + value, 0)
},
case<T> (predicate: TPredicate<T>, handler: any, next: (value: T) => any, value: T) {
return predicate(value) ? evaluate(handler, value) : next(value)
},
default<T> (handler: any, value: T) {
return evaluate(handler, value)
},
in<T> ({ start, end }: IPeriod<T>, value: T) {
return start <= value && value <= end
},
or<T> (predicate: TPredicate<T>, next: (value: T) => any, value: T) {
if (value !== undefined) {
return evaluate(predicate, value) || evaluate(next, value)
}
return evaluate(predicate, next)
},
and<T> (predicate: TPredicate<T>, next: (value: T) => any, value: T) {
if (value !== undefined) {
return evaluate(predicate, value) && evaluate(next, value)
}
return evaluate(predicate, next)
},
not (handler: any, value: any) {
return !evaluate(handler, value)
},
equal (expected: any, actual: any) {
return expected === actual
},
includes (array: any[], value: any) {
return array.indexOf(value) > -1
},
get<T> (key: string, dictionary: IDictionary<T>) {
return dictionary[key]
},
dateTime (key: string, dictionary: IDictionary<number>) {
return getDateTime(key, dictionary).getTime()
},
'+': (a: number, b: number) => a + b,
'-': (a: number, b: number) => a - b,
'/': (a: number, b: number) => a / b,
'*': (a: number, b: number) => a * b,
'=': (a: number, b: number) => a === b,
'%': (a: number, b: number) => a % b,
'!': (operand: any) => !operand,
condition (value: number) {
return value > 10
},
}
const actionsBuilder = buildActionsBuilder(operations)
function buildAction (expression: TExpression) {
return actionsBuilder(expression)[0]
}
test('Map action', () => {
const expression = [ '$map', [1, 2, 3], '@inc', [3] ]
const action = buildAction(expression)
expect(action).toEqual([4, 5, 6])
})
test('Eval action', () => {
const expression = [ '$eval', '@sum', [1, 2, 3] ]
const action = buildAction(expression)
expect(action).toBe(6)
})
test('Simple arithmetic', () => {
const expression = [ '@-', [ 2, 1 ] ]
const action = buildAction(expression)
expect(action()).toBe(1)
})
test('Arithmetic with variable', () => {
const expression = [ '@/', [ 20 ] ]
const action = buildAction(expression)
expect(action(4)).toBe(5)
})
test('Logical expression', () => {
const expression = [ '@or', [ false, '@and', [ '@condition', [], true ] ] ]
const action = buildAction(expression)
expect(action(11)).toBe(true)
})
test('Case operation', () => {
const expression = [
'$>>', '@dateTime', ['time'],
"@case", ["@in", [{ "start": -2208969017000, "end": -2208963617000 }], 1,
"@case", ["@in", [{ "start": -2208963017000, "end": -2208957617000 }], 2,
"@case", ["@in", [{ "start": -2208957017000, "end": -2208951617000 }], 3,
"@case", ["@in", [{ "start": -2208948017000, "end": -2208942617000 }], 4,
"@case", ["@in", [{ "start": -2208942017000, "end": -2208936617000 }], 5,
"@case", ["@in", [{ "start": -2208936017000, "end": -2208930617000 }], 6,
"@case", ["@in", [{ "start": -2208930017000, "end": -2208924617000 }], 7,
"@case", ["@in", [{ "start": -2208924017000, "end": -2208918617000 }], 8,
"@default", [false] ] ] ] ] ] ] ] ]
]
const action = buildAction(expression)
const date = { minute: 0, hour: 18, day: 6, month: 4, year: 2019 }
expect(action(date)).toBe(6)
})
test('Should decode object properties', () => {
const expression = [{
exp1: [ '@-', [ 2, 1 ] ],
exp2: [ '@/', [ 20 ] ],
exp3: [ '@or', [ false, '@and', [ '@condition', [], true ] ] ],
}]
const args = [ [], [ 4 ], [ 11 ] ]
const action = buildAction(expression)
const values = Object.keys(action)
.map(key => action[key])
.map(([handler], i) => handler(...args[i]))
expect(values).toEqual([ 1, 5, true ])
}) |
Markdown | UTF-8 | 2,418 | 3.125 | 3 | [] | no_license | # Frontend Mentor - Order summary card solution
This is a solution to the [Order summary card challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/order-summary-component-QlPmajDUj). Frontend Mentor challenges help you improve your coding skills by building realistic projects.
## Table of contents
- [Overview](#overview)
- [The challenge](#the-challenge)
- [Screenshot](#screenshot)
- [Links](#links)
- [My process](#my-process)
- [Built with](#built-with)
- [What I learned](#what-i-learned)
- [Continued development](#continued-development)
- [Useful resources](#useful-resources)
- [Author](#author)
## Overview
### The challenge
Users should be able to:
- See hover states for interactive elements
### Screenshot

### Links
- Solution URL: [Order Summary Card](https://github.com/chetanhaobijam/Order_Summary_Component_Main)
- Live Site URL: [Order Summary Card](https://chetanhaobijam.github.io/Order_Summary_Component_Main/)
## My process
### Built with
- Semantic HTML5 markup
- SASS
- Flexbox
- CSS Grid
- Mobile-first workflow
### What I learned
I learned how to write styles in SASS instead of normal CSS. I get to learn how can we can use Nesting, inheritance, Variables and Import in SASS. Instead of using CSS Variables I use SASS Variables which are more easy to use, in my opinion. After writing all the styles in SASS I compile them in regular CSS by using VS Code Live SASS Compiler Extension.
I also get to learn how we can use svg images instead of normal jpg/png images in our webpages. They are more dynamic and useful. They don't break their resolution when we increase or decrease their size.
### Continued development
I want to learn more about SASS and other CSS properties by doing further Frontend Mentor Challenges. Looking forward for next challenge.
### Useful resources
- [SASS Docs](https://sass-lang.com/) - It contains all the information about SASS and it helps me a lot while learning and writing SASS.
- [SASS Crash Course - Traversy Media](https://www.youtube.com/watch?v=nu5mdN2JIwM) - Since I learned better from Videos this YouTube Video by Traversy Media helped me a lot while learning how to write SASS.
## Author
- Frontend Mentor - [@chetanhaobijam](https://www.frontendmentor.io/profile/chetanhaobijam)
- Twitter - [@chetanhaobijam](https://www.twitter.com/chetanhaobijam)
|
C++ | UTF-8 | 2,126 | 3.8125 | 4 | [
"MIT"
] | permissive | /**
A Discrete Mathematics professor has a class of N students. Frustrated with their lack of discipline, he decides to cancel class if fewer than K students are present when class starts.
Given the arrival time of each student, determine if the class is canceled.
Input Format
The first line of input contains T, the number of test cases.
Each test case consists of two lines. The first line has two space-separated integers, N (students in the class) and K (the cancelation threshold).
The second line contains N space-separated integers (a1,a2,...,aN) describing the arrival times for each student.
Note: Non-positive arrival times (ai <= 0) indicate the student arrived early or on time; positive arrival times (ai>0) indicate the student arrived ai minutes late.
Output Format
For each test case, print the word YES if the class is canceled or NO if it is not.
Constraints
1 <= T <= 10
1 <= N <= 1000
1 <= K <= N
−100 <= ai <= 100,where i in [1,N]
Note
If a student arrives exactly on time (ai=0), the student is considered to have entered before the class started.
Sample Input
2
4 3
-1 -3 4 2
4 2
0 -1 2 1
Sample Output
YES
NO
Explanation
For the first test case, K=3. The professor wants at least 3 students in attendance, but only 2 have arrived on time (−3 and −1). Thus, the class is canceled.
For the second test case, K=2. The professor wants at least 2 students in attendance, and there are 2 who have arrived on time (0 and −1). Thus, the class is not canceled.
**/
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
int t;
cin >> t;
for(int a0 = 0; a0 < t; a0++){
int n;
int k;
cin >> n >> k;
vector<int> a(n);
unsigned ontime = 0;
for(int a_i = 0;a_i < n;a_i++){
cin >> a[a_i];
if(a[a_i] <= 0 && a[a_i] >= -100 && a[a_i] <= 100)
ontime++;
}
if (ontime < k && ontime > 0)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
return 0;
}
|
C++ | UTF-8 | 1,042 | 3.421875 | 3 | [] | no_license | /** PxGrp Class
* Represents groups of pixels in the program.
*
* Methods defined in PxGrp.cpp
*
* @author Andy Blackmore <axb803@bham.ac.uk>
*/
#include <string>
using namespace std;
class PxGrp {
private: // Functions and vars usable only by the class
int value; // How many pixels in this group are on.
int size; // sqrt of many pixels this group contains.
int** data; // Variable to hold each individual pixel's state.
public: // Functions and vars usable by any external object
PxGrp(); // Constructor
void invert(); // Swap on pixels for off pixels
void setPxSize(int); // Resize the group
int getValue(); // Retrieve the amount of on pixels in this group
int getData(int, int); // Retrieve the state of a single pixel.
void setData(int, int, int); // Set a single pixel manually.
void setValue(int); // Set the group's value
string getLine(int); // Retrieve a line of pixels.
void checkValue(); // Make sure that the amount of on pixels
// corresponds to the group's value
};
// EOF
|
Markdown | UTF-8 | 536 | 2.796875 | 3 | [] | no_license | # AnalogSea Signup Form
This is a hypothetical project for a front-end web-dev exercise.
The Scenario: AnalogSea Signup Form
- Code up the first version (aka, v1) of a simple account creation page
- The client wants clean, SEO and accessibility friendly HTML.
- Deliver a live version of the page they can preview on GitHub pages.
welcome.html is where you want to start:
https://github.com/JoeyKat/analogsea/blob/master/welcome.html
The live version can be found here:
fabricelectronica.net/CodePractice/analogsea/signup.html
|
C# | UTF-8 | 3,742 | 2.5625 | 3 | [] | no_license | using ChickenFarm.GrainContracts;
using Microsoft.Extensions.Logging;
using Orleans;
using Orleans.Configuration;
using Orleans.Runtime;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading.Tasks;
namespace ChickenFarm.ClientConsole
{
class Program
{
static int Main(string[] args)
{
return RunMainAsync().Result;
}
private static async Task<int> RunMainAsync()
{
try
{
using (var client = await StartClientWithRetries())
{
Console.WriteLine("Press any key to start the app.");
Console.ReadKey();
await LoopThroughGrains(client);
Console.ReadKey();
}
return 0;
}
catch (Exception e)
{
Console.WriteLine(e);
Console.ReadKey();
return 1;
}
}
private static async Task LoopThroughGrains(IClusterClient client)
{
var rnd = new Random();
var sw = new Stopwatch();
var farmList = client.GetGrain<IPropertyList>(Guid.Empty);
var farmIds = await farmList.GetList();
foreach (var farmId in farmIds)
{
sw.Restart();
var farm = client.GetGrain<IProperty>(farmId);
var name = await farm.GetName();
sw.Stop();
Console.WriteLine($"{name} in {sw.ElapsedMilliseconds}ms!");
//await Task.Delay(rnd.Next(5, 50));
}
}
private static async Task<IClusterClient> StartClientWithRetries(int initializeAttemptsBeforeFailing = 5)
{
int attempt = 0;
IClusterClient client;
while (true)
{
try
{
client = new ClientBuilder()
.UseLocalhostClustering()
.Configure<ClusterOptions>(options =>
{
options.ClusterId = "orleans-docker";
options.ServiceId = "HelloWorldApp";
})
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IPropertyList).Assembly).WithReferences())
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IProperty).Assembly).WithReferences())
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IChickenHouse).Assembly).WithReferences())
.ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(IChicken).Assembly).WithReferences())
.ConfigureLogging(logging => logging.AddConsole())
.Build();
await client.Connect();
Console.WriteLine("Client successfully connect to silo host");
break;
}
catch (SiloUnavailableException)
{
attempt++;
Console.ForegroundColor = ConsoleColor.DarkCyan;
Console.WriteLine($"Attempt {attempt} of {initializeAttemptsBeforeFailing} failed to initialize the Orleans client.");
Console.ResetColor();
if (attempt > initializeAttemptsBeforeFailing)
{
throw;
}
await Task.Delay(TimeSpan.FromSeconds(4));
}
}
return client;
}
}
}
|
C# | UTF-8 | 15,309 | 2.65625 | 3 | [] | no_license | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static ANTOTOLib.DataModel;
namespace ANTOTOLib
{
public partial class Company
{
public class CompanyInfo
{
public int? CompanyId { get; set; }
public string CompanyCode { get; set; }
public string CompanyName { get; set; }
public string CompanyDescription { get; set; }
}
public static CompanyInfo getCompanyInfoByCode(string CompanyCode)
{
antoto_dbDataContext db = new antoto_dbDataContext();
CompanyInfo result = null;
var list = db.tfnCompanyGetByCode(CompanyCode);
if (list != null)
{
foreach(var item in list)
{
result = new CompanyInfo();
result.CompanyId = item.CompanyId;
result.CompanyCode = item.CompanyCode;
result.CompanyName = item.CompanyName;
result.CompanyDescription = item.CompanyDescription;
break;
}
}
return result;
}
public static CompanyInfo getCompanyInfoById (int CompanyId)
{
antoto_dbDataContext db = new antoto_dbDataContext();
CompanyInfo result = null;
var list = db.tfnCompanyGetById(CompanyId);
if (list != null)
{
foreach (var item in list)
{
result = new CompanyInfo();
result.CompanyId = item.CompanyId;
result.CompanyCode = item.CompanyCode;
result.CompanyName = item.CompanyName;
result.CompanyDescription = item.CompanyDescription;
break;
}
}
return result;
}
public class CompanyFromAddress
{
public string ContactName { get; set; }
public string ContactLastName { get; set; }
public string ContactPhoneNumber { get; set; }
public int? ContactPhoneCountryId { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Zip { get; set; }
public int? CountryId { get; set; }
public bool? DefaultShipping { get; set; }
public bool? Available { get; set; }
public int? CompanyFromAddressId { get; set; }
public int? CompanyId { get; set; }
}
public static List<CompanyFromAddress> GetCompanyFromAddressList(int CompanyId)
{
List<CompanyFromAddress> result = new List<CompanyFromAddress>();
antoto_dbDataContext db = new antoto_dbDataContext();
var list = db.tfnCompanyAddressGet(CompanyId);
if (list != null)
{
foreach (var item in list)
{
CompanyFromAddress temp = new CompanyFromAddress();
temp.CompanyFromAddressId = item.CompanyFromAddressId;
temp.CompanyId = item.CompanyId;
temp.State = item.State;
temp.Zip = item.Zip;
temp.CountryId = item.CountryId;
temp.ContactPhoneNumber = item.ContactPersonPhoneNumber;
temp.ContactPhoneCountryId = item.ContactPersonPhoneNumberCountryId;
temp.ContactName = item.ContactPersonFirstName;
temp.ContactLastName = item.ContactPersonLastName;
temp.City = item.City;
temp.Address2 = item.Address2;
temp.Address1 = item.Address1;
temp.DefaultShipping = item.DefaultShipping;
result.Add(temp);
}
}
return result;
}
public static CompanyFromAddress GetCompanyFromAddressById(int CustomerAddressId)
{
CompanyFromAddress result = new CompanyFromAddress();
antoto_dbDataContext db = new antoto_dbDataContext();
var list = db.tfnCompanyAddressGetById(CustomerAddressId);
if (list != null)
{
foreach (var item in list)
{
result.CompanyFromAddressId = item.CompanyFromAddressId;
result.CompanyId = item.CompanyId;
result.State = item.State;
result.Zip = item.Zip;
result.CountryId = item.CountryId;
result.ContactPhoneNumber = item.ContactPersonPhoneNumber;
result.ContactPhoneCountryId = item.ContactPersonPhoneNumberCountryId;
result.ContactName = item.ContactPersonFirstName;
result.ContactLastName = item.ContactPersonLastName;
result.City = item.City;
result.Address2 = item.Address2;
result.Address1 = item.Address1;
result.DefaultShipping = item.DefaultShipping;
break;
}
}
return result;
}
public static CompanyFromAddress companyFromAddressCreateUpdate(CompanyFromAddress companyFromAddress, int? CompanyId, int? UserId)
{
CompanyFromAddress result = null;
antoto_dbDataContext db = new antoto_dbDataContext();
int? CompanyFromAddressId = companyFromAddress.CompanyFromAddressId == null ? 0 : companyFromAddress.CompanyFromAddressId;
db.sp_CompanyFromAddressSubmitUpdate(CompanyId, companyFromAddress.ContactName, companyFromAddress.ContactLastName,
companyFromAddress.ContactPhoneNumber, companyFromAddress.ContactPhoneCountryId, companyFromAddress.Address1,
companyFromAddress.Address2, companyFromAddress.City, companyFromAddress.State, companyFromAddress.Zip,
companyFromAddress.CountryId, companyFromAddress.DefaultShipping, companyFromAddress.Available, UserId, ref CompanyFromAddressId);
if (CompanyFromAddressId > 0)
{
result = GetCompanyFromAddressById(CompanyFromAddressId.Value);
}
return result;
}
public static List<ShippingOrder.ShippingChannel> getAvailableShippingChannelList(int CompanyId)
{
antoto_dbDataContext db = new antoto_dbDataContext();
List<ShippingOrder.ShippingChannel> result = new List<ShippingOrder.ShippingChannel>();
var list = db.tfnCompanyShippingChannelListGet(CompanyId);
if (list != null)
{
foreach(var item in list)
{
ShippingOrder.ShippingChannel temp = new ShippingOrder.ShippingChannel();
temp.ShippingChannelId = item.ShippingChannelId;
temp.ShippingChannelName = item.ShippingChannelName;
temp.ShippingChannelCode = item.ShippingChannelCode;
result.Add(temp);
}
}
return result;
}
public static ParaDataModel.ParaLogisticCompany LogisticCustomerCompanySetup(ParaDataModel.ParaLogisticCompany CompanyUser, int? CompanyId, int? UserId)
{
ParaDataModel.ParaLogisticCompany result = new ParaDataModel.ParaLogisticCompany();
antoto_dbDataContext db = new antoto_dbDataContext();
int? CustomerCompanyId = 0;
db.sp_LogisticCompanyUserCreate(CompanyId, CompanyUser.CompanyName, CompanyUser.FirstName, CompanyUser.LastName,
CompanyUser.CustomerCode, CompanyUser.PhoneNumber, CompanyUser.PhoneNumberCountryId, CompanyUser.Email, CompanyUser.Fax,
CompanyUser.Address1, CompanyUser.Address2, CompanyUser.City, CompanyUser.District, CompanyUser.State,
CompanyUser.Zip, CompanyUser.CountryId, CompanyUser.LoginName, StringCipher.HashPassword(CompanyUser.Password),
ref CustomerCompanyId, UserId);
result = GetLogisticCompanyInfo(CustomerCompanyId);
return result;
}
public static ParaDataModel.ParaLogisticCompany LogisticCustomerCompanyUpdate(ParaDataModel.ParaLogisticCompany CompanyUser, int? CompanyId, int? UserId)
{
ParaDataModel.ParaLogisticCompany result = new ParaDataModel.ParaLogisticCompany();
antoto_dbDataContext db = new antoto_dbDataContext();
int? CustomerCompanyId = CompanyUser.CompanyId;
db.sp_LogisticCompanyUserUpdate(CompanyId, CompanyUser.CompanyName, CompanyUser.FirstName, CompanyUser.LastName,
CompanyUser.CustomerCode, CompanyUser.PhoneNumber, CompanyUser.PhoneNumberCountryId, CompanyUser.Email, CompanyUser.Fax,
CompanyUser.Address1, CompanyUser.Address2, CompanyUser.City, CompanyUser.District, CompanyUser.State,
CompanyUser.Zip, CompanyUser.CountryId, CompanyUser.LoginName, StringCipher.HashPassword(CompanyUser.Password), CompanyUser.Available,
ref CustomerCompanyId, UserId);
result = GetLogisticCompanyInfo(CustomerCompanyId);
return result;
}
public static ParaDataModel.ParaLogisticCompany GetLogisticCompanyInfo(int? CompanyId)
{
ParaDataModel.ParaLogisticCompany result = new ParaDataModel.ParaLogisticCompany();
antoto_dbDataContext db = new antoto_dbDataContext();
var list = db.tfnLogisticCompanyInfoGet(CompanyId);
if (list != null)
{
foreach(var item in list)
{
result.CompanyId = item.CompanyId;
result.CompanyName = item.CompanyName;
result.CustomerCode = item.CompanyCode;
result.City = item.City;
result.Address1 = item.Address1;
result.Address2 = item.Address2;
result.CountryId = item.CountryId;
result.District = item.District;
result.Email = item.Email;
result.Fax = item.Fax;
result.FirstName = item.ContactFirstName;
result.LastName = item.ContactLastName;
result.LoginName = item.UserLoginName;
result.PhoneNumber = item.PhoneNumber;
result.PhoneNumberCountryId = item.PhoneNumberCountryId;
result.State = item.State;
result.Zip = item.Zip;
break;
}
}
return result;
}
public static ResultPageResult LogisticCompanyListSearch(ParaDataModel.ParaLogisticCompanySearch CompanySearch, int? CompanyId, int? UserId)
{
antoto_dbDataContext db = new antoto_dbDataContext();
int? total = 0;
int? totalPage = 0;
int? Page = CompanySearch.Page;
int? NextPage = 0;
DataModel.ResultPageResult result = new DataModel.ResultPageResult();
var list = db.sp_CompanyLogisticCompanySearch(CompanySearch.Name, CompanySearch.CustomerCode, CompanySearch.Email,
UserId, CompanyId, CompanySearch.PageSize, ref Page, ref total, ref totalPage);
if (list != null)
{
NextPage = Page < totalPage ? Page + 1 : totalPage;
foreach (var item in list)
{
var currentobject = new ParaDataModel.ParaLogisticCompany
{
CompanyId = item.CompanyId,
CompanyName = item.CompanyName,
CustomerCode = item.CompanyCode,
City = item.City,
Address1 = item.Address1,
Address2 = item.Address2,
CountryId = item.CountryId,
District = item.District,
Email = item.Email,
Fax = item.Fax,
FirstName = item.ContactFirstName,
LastName = item.ContactLastName,
LoginName = item.UserLoginName,
PhoneNumber = item.PhoneNumber,
PhoneNumberCountryId = item.PhoneNumberCountryId,
State = item.State,
Zip = item.Zip,
Available = item.Available
};
if (result.records == null)
{
result.records = new List<Object>();
}
result.records.Add(currentobject);
}
result.TotalPage = totalPage;
result.TotalRecords = total;
result.CurrentPage = Page;
result.NextPage = NextPage;
}
return result;
}
public static ParaDataModel.ParaLogisticCompany LogisticCompanyListSearchOne(string CompanyCode, int? CompanyId, int? UserId)
{
ParaDataModel.ParaLogisticCompany result = new ParaDataModel.ParaLogisticCompany();
antoto_dbDataContext db = new antoto_dbDataContext();
int? total = 0;
int? totalPage = 0;
int? Page = 1;
int? NextPage = 0;
var list = db.sp_CompanyLogisticCompanySearch("", CompanyCode, "",
UserId, CompanyId, 1, ref Page, ref total, ref totalPage);
if (list != null)
{
NextPage = Page < totalPage ? Page + 1 : totalPage;
foreach (var item in list)
{
var currentobject = new ParaDataModel.ParaLogisticCompany
{
CompanyId = item.CompanyId,
CompanyName = item.CompanyName,
CustomerCode = item.CompanyCode,
City = item.City,
Address1 = item.Address1,
Address2 = item.Address2,
CountryId = item.CountryId,
District = item.District,
Email = item.Email,
Fax = item.Fax,
FirstName = item.ContactFirstName,
LastName = item.ContactLastName,
LoginName = item.UserLoginName,
PhoneNumber = item.PhoneNumber,
PhoneNumberCountryId = item.PhoneNumberCountryId,
State = item.State,
Zip = item.Zip,
Available = item.Available
};
result = currentobject;
break;
}
}
return result;
}
}
}
|
Python | UTF-8 | 1,073 | 2.625 | 3 | [
"MIT"
] | permissive | from predict_api import load_data, preprocess, predict
# File locations
features = "feature_data/feature_values.h5"
job_desc = "feature_data/job_descriptions.h5"
glove_file = "feature_data/GloVe/glove.6B.50d.txt"
model_file = "model/neural_network.h5"
# User profile
major_input = "Computer Science"
degree_type_input = "Master's"
managed_others_input = "Yes"
years_exp_input = 2
k = 100
# Load data to memory
df_features, df_job_desc, word_to_index, degree_type_full, managed_others_full, years_exp_full, model = \
load_data(features, job_desc, glove_file, model_file)
# Preprocess inputs
major, title, degree_type, managed_others, years_exp, df_jobs_unique = \
preprocess(df_features, df_job_desc, word_to_index, degree_type_full, managed_others_full, years_exp_full,
major_input, degree_type_input, managed_others_input, years_exp_input)
# Get predictions
recommendations = predict(major, title, degree_type, managed_others, years_exp, df_jobs_unique, model, k)
print(recommendations)
# print(recommendations.to_json(orient='index'))
|
Java | UTF-8 | 12,202 | 1.523438 | 2 | [] | no_license | /*
* eGovFrame LDAP조직도관리
* Copyright The eGovFrame Open Community (http://open.egovframe.go.kr)).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @author 전우성(슈퍼개발자K3)
*/
package egovframework.com.dash.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import egovframework.com.cmm.EgovMessageSource;
import egovframework.com.cmm.LoginVO;
import egovframework.com.cmm.annotation.IncludedInfo;
import egovframework.com.cmm.util.EgovUserDetailsHelper;
import egovframework.com.dash.service.EgovDashManageService;
import egovframework.com.ext.ldapumt.service.EgovOrgManageLdapService;
import egovframework.com.ext.ldapumt.service.UcorgVO;
import egovframework.com.ext.ldapumt.service.UserVO;
import egovframework.com.uss.ion.ecc.service.EgovEventCmpgnService;
import egovframework.com.uss.ion.ecc.service.EventCmpgnVO;
import egovframework.com.vm.service.VmApiService;
import egovframework.rte.fdl.property.EgovPropertyService;
import egovframework.rte.ptl.mvc.tags.ui.pagination.PaginationInfo;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class EgovDashManageController {
@Resource(name = "EgovEventCmpgnService")
private EgovEventCmpgnService egovEventCmpgnService;
@Resource(name = "EgovDashManageService")
private EgovDashManageService egovDashManageService;
@Resource(name = "propertiesService")
protected EgovPropertyService propertiesService;
@Resource(name = "VmApiService")
protected VmApiService vmApiService;
@RequestMapping(value="/dash/DashboardTraining.do")
public String selectEventCmpgnList(ModelMap model) throws Exception {
List<?> sampleList = egovEventCmpgnService.selectEventCmpgnListForMonitor();
model.addAttribute("resultList", sampleList);
return "egovframework/com/dash/DashboardTraining";
}
@RequestMapping(value = "/dash/DashboardView.do")
public String selectDashManageView(@RequestParam(value = "trainingId") String trainingId, ModelMap model) throws Exception {
List<?> trainingTeams = egovDashManageService.selectTrainingTeams(trainingId);
List<?> rankList = egovDashManageService.selectDashTable(trainingId);
model.addAttribute("training_name", egovDashManageService.selectTrainingName(trainingId));
model.addAttribute("training_id", trainingId);
model.addAttribute("rankList", rankList);
return "egovframework/com/dash/Dashboard";
}
@RequestMapping(value = "/dash/Dashboard.do")
public ModelAndView selectDashManage(@RequestParam(value = "trainingId") String trainingId) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
modelAndView = egovDashManageService.selectDashGragh(trainingId, modelAndView);
modelAndView.addObject("rankList", egovDashManageService.selectDashTable(trainingId));
return modelAndView;
}
@RequestMapping(value = "/dash/EgovDashbordTrainingView.do")
public String selectEgovDashManageView(@ModelAttribute("searchVO") EventCmpgnVO searchVO, ModelMap model) throws Exception {
/** EgovPropertyService.sample */
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
searchVO.setPageSize(propertiesService.getInt("pageSize"));
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
// LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
// String userId = user.getId();
// searchVO.setLastUpdusrId(userId);
//
// List<?> sampleList = egovEventCmpgnService.selectEventCmpgnListForScoreView(searchVO);
List<?> sampleList = egovEventCmpgnService.selectEventCmpgnList(searchVO);
model.addAttribute("resultList", sampleList);
int totCnt = egovEventCmpgnService.selectEventCmpgnListCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
return "egovframework/com/dash/EgovDashbordTraining";
}
@RequestMapping(value = "/dash/EgovDashboardView.do")
public String selectEgovDashManageView(@RequestParam(value = "trainingId") String trainingId, ModelMap model) throws Exception {
List<?> trainingTeams = egovDashManageService.selectTrainingTeams(trainingId);
model.addAttribute("training_name", egovDashManageService.selectTrainingName(trainingId));
model.addAttribute("training_id", trainingId);
model.addAttribute("rankList", egovDashManageService.selectDashTable(trainingId));
return "egovframework/com/dash/EgovDashboard";
}
@RequestMapping(value = "/dash/EgovScoreView.do")
public String selectEgovScoreView(@ModelAttribute("searchVO") EventCmpgnVO searchVO,
// @RequestParam(value = "userId") String userId,
ModelMap model) throws Exception {
LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String userId = user.getId();
searchVO.setLastUpdusrId(userId);
/** EgovPropertyService.sample */
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
searchVO.setPageSize(propertiesService.getInt("pageSize"));
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
List<?> sampleList = egovEventCmpgnService.selectEventCmpgnListForScoreView(searchVO);
model.addAttribute("resultList", sampleList);
int totCnt = egovEventCmpgnService.selectEventCmpgnListCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
return "egovframework/com/dash/EgovScoreView";
}
@RequestMapping(value = "/dash/EgovScoreDetailView.do")
public String selectEgovScoreDetailView(@RequestParam(value = "trainingId") String trainingId,
ModelMap model) throws Exception {
final LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
final String userId = user.getId();
final String teamId = egovDashManageService.selectTeamIdByUserId(userId);
final String trainingName = egovDashManageService.selectTrainingName(trainingId);
//스코어 로그 리스트 불러오기
final List<Map> scoreLogList = egovDashManageService.selectScoreLogList(trainingId, teamId);
//스코어 현재 스코어 불러오기
final Map currentScore = egovDashManageService.selectCurrentScore(trainingId, teamId);
model.addAttribute("scoreLogList", scoreLogList);
model.addAttribute("currentScore", currentScore);
model.addAttribute("training_name", trainingName);
return "egovframework/com/dash/EgovScoreDetail";
}
@RequestMapping(value = "/dash/EgovDeductionScoreView.do")
public String selectEgovDeductionScoreView(@ModelAttribute("searchVO") EventCmpgnVO searchVO,
ModelMap model) throws Exception {
LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
String userId = user.getId();
searchVO.setLastUpdusrId(userId);
/** EgovPropertyService.sample */
searchVO.setPageUnit(propertiesService.getInt("pageUnit"));
searchVO.setPageSize(propertiesService.getInt("pageSize"));
/** pageing */
PaginationInfo paginationInfo = new PaginationInfo();
paginationInfo.setCurrentPageNo(searchVO.getPageIndex());
paginationInfo.setRecordCountPerPage(searchVO.getPageUnit());
paginationInfo.setPageSize(searchVO.getPageSize());
searchVO.setFirstIndex(paginationInfo.getFirstRecordIndex());
searchVO.setLastIndex(paginationInfo.getLastRecordIndex());
searchVO.setRecordCountPerPage(paginationInfo.getRecordCountPerPage());
List<?> sampleList = egovEventCmpgnService.selectEventCmpgnListForScoreView(searchVO);
model.addAttribute("resultList", sampleList);
int totCnt = egovEventCmpgnService.selectEventCmpgnListCnt(searchVO);
paginationInfo.setTotalRecordCount(totCnt);
model.addAttribute("paginationInfo", paginationInfo);
return "egovframework/com/dash/EgovDeductionScoreView";
}
@RequestMapping(value = "/dash/EgovDeductionScoreDetail.do")
public String selectEgovDeductionScoreDetail(@RequestParam(value = "trainingId") String trainingId,
ModelMap model) throws Exception {
final LoginVO user = (LoginVO)EgovUserDetailsHelper.getAuthenticatedUser();
final String userId = user.getId();
final String teamId = egovDashManageService.selectTeamIdByUserId(userId);
final String trainingName = egovDashManageService.selectTrainingName(trainingId);
// 훈련에 참여팀 목록 불러오기
final List<Map> teamList = egovDashManageService.selectTrainingTeams(trainingId);
//스코어 로그 리스트 불러오기
final List<Map> scoreLogList = egovDashManageService.selectScoreLogListForDeduction(trainingId);
model.addAttribute("trainingId", trainingId);
model.addAttribute("teamList", teamList);
model.addAttribute("scoreLogList", scoreLogList);
model.addAttribute("training_name", trainingName);
return "egovframework/com/dash/EgovDeductionScoreDetail";
}
@RequestMapping(value = "/dash/EgovDeductionScoreInsert.do")
public ModelAndView insertEgovDeductionScore(@RequestParam(value = "trainingId") String trainingId,
@RequestParam(value = "teamId") String teamId,
@RequestParam(value = "score") String score,
ModelMap model) throws Exception {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("jsonView");
egovDashManageService.insertEgovDeductionScore(trainingId, teamId, score);
return modelAndView;
}
@RequestMapping(value = "/dash/test.do")
public void test(HashMap model) throws Exception {
String trainingId = "EVENT_00000000000181";
egovDashManageService.insertDashScore(trainingId, model);
}
@RequestMapping(value = "/dash/aaaa.do")
public void aaaa() throws Exception {
// egovDashManageService.plcTimerOn();
egovDashManageService.readyForParamByPlcApi("EVENT_00000000000181");
// Timer timer = new Timer();
// TimerTask timerTask = new TimerTask() {
// int cnt = 0;
// @Override
// public void run() {
// if(cnt++ < 5){
// System.out.println("task...");
// }else{
// timer.cancel();
// }
// }
// };
// timer.schedule(timerTask,0,1000*60);
}
}
|
Go | UTF-8 | 707 | 2.96875 | 3 | [
"MIT"
] | permissive | // Link - https://leetcode.com/problems/top-k-frequent-elements/
func topKFrequent(nums []int, k int) []int {
if k == len(nums) {return nums;}
countMap := make(map[int]int);
for _, value := range nums {
count,_ := countMap[value];
countMap[value] = count+1;
}
bucket := make([][]int,len(nums)+1);
for num,count := range countMap {
bucket[count] = append(bucket[count],num);
}
res := make([]int,0,k);
for i:=len(bucket)-1; i>=0; i-- {
for j := 0; j < len(bucket[i]) && k > 0; j++ {
res = append(res,bucket[i][j]);
k--;
}
}
return res;
}
// Time - 12ms(beats 97.44%)
// Memory - 5.4MB(beats 98.85%)
|
JavaScript | UTF-8 | 3,755 | 2.65625 | 3 | [] | no_license | import React, { useState } from 'react';
import { StyleSheet, Text, View, TextInput, TouchableOpacity } from 'react-native';
import ResultScreen from '../ResultScreen/'
function TimeKeeper() {
const [minutes, setMinutes] = useState(0)
const [hours, setHours] = useState(0)
const [result, setResult] = useState([])
function calculate(hour, min) {
if (parseInt(hour) >= 25) {
alert('Insira um valor válido', 'Erro', {text: 'Ok'}, {cancelable: false})
hour = 0
min = 0
}
let results = [parseInt(hour) - 6, parseInt(hour) - 7, parseInt(hour) - 9]
for (let index = 0; index < results.length; index++) {
if (results[index] <= 0) {
results[index] = results[index] + 12
}
}
if (min == 0) {
results[0] = results[0] + ':00'
results[1] = (results[1] - 1) + ':30'
results[2] = results[2] + ':00'
}
if (min > 0 && min < 10) {
results[0] = results[0] + ':0' + min
results[2] = results[2] + ':0' + min
}
if (min >=10) {
results[0] = results[0] + ':' + min
results[2] = results[2] + ':' + min
}
if (min < 30 && min != 0) {
results[1] = (results[1] - 1) + ':' + (parseInt(min) + 30)
}
if (min > 30 && min < 40) {
results[1] = results[1] + ':0' + (min - 30)
}
if (min == 30) {
results[1] = results[1] + ':00'
}
if (min >= 40) {
results[1] = results[1] + ':' + (min - 30)
}
if (min == '' && min != 0) {
results[1] = (results[1] - 1) + ':30'
}
setResult(results)
}
return (
<View style={styles.mainContainer}>
<View style={styles.inputContainer}>
<TextInput
placeholder='horas'
keyboardType='numeric'
style={styles.inputNumber}
maxLength={2}
placeholderTextColor='#e8e9f3'
onChangeText={setHours}/>
<Text style={styles.dots}>:</Text>
<TextInput
placeholder='minutos'
keyboardType='numeric'
style={styles.inputNumber}
maxLength={2}
placeholderTextColor='#e8e9f3'
onChangeText={setMinutes}/>
</View>
<TouchableOpacity style={styles.inputButton} onPressOut={ () => calculate(hours, minutes)}>
<Text style={styles.inputButtonText}>Calcular</Text>
</TouchableOpacity>
<ResultScreen resultValue={result}/>
</View>
)
}
const styles = StyleSheet.create({
mainContainer: {
alignItems: 'center',
flexDirection: 'column',
padding: 30,
},
inputContainer:{
flexDirection: 'row',
},
inputNumber:{
backgroundColor: '#272d2d',
fontSize: 25,
padding: 10,
borderRadius: 5,
color: '#e8e9f3',
margin: 5,
},
inputButton:{
backgroundColor: '#85c7f2',
marginTop: 30,
fontSize: 25,
padding: 15,
borderRadius: 5,
color: '#85c7f2',
margin: 5,
},
inputButtonText:{
fontSize: 20,
color: 'white',
},
dots: {
color: '#e8e9f3',
fontSize: 40,
}
})
export default TimeKeeper |
Java | UTF-8 | 2,719 | 3.25 | 3 | [] | no_license | import java.util.ArrayList;
public class arraylist {
public static void main(String[] args) {
// System.out.println(gss("abc"));
// System.out.println(gsswithascii("ab"));
System.out.println(getkpc("367"));
}
// public static ArrayList<String> gss1(String str) {
// if(str.length()==0) {
// ArrayList<String> br=new ArrayList<String>();
// br.add(" ");
// return br;
// }
// int c = str.charAt(0)-'0';
// String ros = str.substring(1);
// ArrayList<String> rr = gss(ros);
// ArrayList<String> mr=new ArrayList<String>();
// for(String rstr:rr) {
// mr.add(rstr);
// mr.add(ch+rstr);
// }
// return mr;
public static ArrayList<String> gss(String str) {
if (str.length() == 1) {
ArrayList<String> br = new ArrayList<String>();
br.add(str);
br.add("_");
return br;
}
char ch = str.charAt(0);
String ros = str.substring(1);
ArrayList<String> rr = gss(ros);
ArrayList<String> mr = new ArrayList<String>();
for (String rstr : rr) {
mr.add(rstr);
mr.add(ch + rstr);
}
return mr;
}
public static ArrayList<String> gsswithascii(String str) {
if (str.length() == 0) {
ArrayList<String> br = new ArrayList<String>();
br.add("");
return br;
}
char ch = str.charAt(0);
String ros = str.substring(1);
ArrayList<String> rr = gsswithascii(ros);
ArrayList<String> mr = new ArrayList<String>();
for (String rstr : rr) {
mr.add(rstr);
mr.add(ch+rstr);
mr.add((int) ch + rstr);
}
return mr;
}
// static String[] codes= {".;","abc","def","ghi","jkl","mno","pqrs","tu","vwx","yz"};
// public static ArrayList<String> getkpc(String str){
// if (str.length() == 0) {
// ArrayList<String> bresult = new ArrayList<>();
// bresult.add("");
// return bresult;
// }
// int c = str.charAt(0) - '0';
// String ros = str.substring(1);
// ArrayList<String> rresult = getkpc(ros);
// ArrayList<String> mresult = new ArrayList<>();
// String ch = codes[c];
// for (String r : rresult) {
//
// for (int i = 0; i < ch.length(); i++) {
// mresult.add(ch.charAt(i) + r);
// }
// }
// return mresult;
// }
static String[] codes= {".;","abc","def","ghi","jkl","mno","pqrs","tu","vwx","yz"};
public static ArrayList<String> getkpc(String str){
if (str.length() == 0) {
ArrayList<String> bresult = new ArrayList<>();
bresult.add("");
return bresult;
}
char ch=str.charAt(0);
String ros = str.substring(1);
ArrayList<String> rresult = getkpc(ros);
ArrayList<String> mresult = new ArrayList<>();
String code=codes[ch-'0'];
for (String r : rresult) {
for (int i = 0; i < code.length(); i++) {
mresult.add(code.charAt(i) + r);
}
}
return mresult;
}
}
|
JavaScript | UTF-8 | 466 | 4.40625 | 4 | [] | no_license | // Negative Outlook
// Given an array, create and return a new one containing all the
// values of the provided array, made negative
// (not simply multiplied by -1). Given [1,-3,5], return [-1,-3,-5].
function negOutlook(arr)
{
var newArr = [];
for(var i = 0; i < arr.length; i++)
{
if(arr[i] > 0)
{
arr[i] *= -1;
}
newArr.push(arr[i]);
}
return newArr;
}
console.log(negOutlook([1,-3,5])); |
JavaScript | UTF-8 | 2,290 | 2.96875 | 3 | [
"MIT"
] | permissive | (function( root, factory ) {
if( typeof exports === "object" && typeof exports.nodeName !== "string" ) {
// CommonJS
module.exports = factory( require( "characterset" ) );
} else {
// Browser
root.GlyphHanger = factory( root.CharacterSet );
}
}( this, function( CharacterSet ) {
var GH = function() {
this.set = new CharacterSet();
if( typeof window !== "undefined" ) {
this.win = window;
}
};
GH.prototype.setEnv = function(win) {
this.win = win;
};
GH.prototype.init = function( parentNode ) {
if( parentNode ) {
this.findTextNodes( parentNode ).filter(function( node ) {
// only non-empty values
return this.hasValue( node );
}.bind( this )).forEach( function( node ) {
this.saveGlyphs( this.getNodeValue( node ) );
}.bind( this ));
}
}
GH.prototype.fakeInnerText = function( node ) {
var value = node.nodeValue;
if( node.nodeType !== 3 ) {
return "";
}
if( node.parentNode ) {
var textTransform = this.win.getComputedStyle( node.parentNode ).getPropertyValue( "text-transform" );
switch (textTransform) {
case "uppercase":
return value.toUpperCase();
case "lowercase":
return value.toLowerCase();
case "capitalize":
// workaround language specific rules with text-transform
// "ß".toUpperCase() => "SS" in german, for example
return value.toUpperCase() + value.toLowerCase();
}
}
return value;
};
GH.prototype.getNodeValue = function( node ) {
return node.innerText || this.fakeInnerText( node ) || "";
};
GH.prototype.hasValue = function( node ) {
return (node.innerText || node.nodeValue).trim().length > 0;
};
GH.prototype.findTextNodes = function( node ) {
// via http://stackoverflow.com/questions/10730309/find-all-text-nodes-in-html-page
var all = [];
for( node = node.firstChild; node; node = node.nextSibling ) {
if( node.nodeType == 3 ) {
all.push( node );
} else {
all = all.concat( this.findTextNodes( node ) );
}
}
return all;
};
GH.prototype.saveGlyphs = function( text ) {
this.set = this.set.union( new CharacterSet( text ) );
};
GH.prototype.getGlyphs = function() {
return this.set.toArray();
};
GH.prototype.toString = function() {
return this.set.toString();
};
return GH;
})); |
Java | UTF-8 | 351 | 1.859375 | 2 | [] | no_license | package com.example.administrator.demo2018.injection.scope;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import javax.inject.Scope;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Created by Administrator on 2018\4\22 0022.
*/
@Scope
@Retention(RUNTIME)
public @interface PerActivityScop {
}
|
JavaScript | UTF-8 | 3,150 | 2.71875 | 3 | [
"MIT"
] | permissive | // tested
import sinonMock from './../src/sinon-mock';
// services
import utils from './../src/utils';
jest.mock('./../src/utils');
describe('sinonMock', () => {
const mocks = {};
let testSpecificMocks;
beforeAll(() => {
mocks.value = function () {/*impl*/};
mocks.value.isSinonProxy = true;
mocks.value.displayName = 'spy';
});
beforeEach(() => {
testSpecificMocks = {};
});
describe('print', () => {
afterEach(() => {
utils.print.mockClear();
});
it('should print using an empty string when value is a sinon mock', () => {
sinonMock.print(mocks.value);
expect(utils.print).toHaveBeenCalledWith('');
});
it('should print using an empty string when value is not a sinon mock (displayName prop has falsy value)', () => {
testSpecificMocks.value = () => {/*impl*/};
sinonMock.print(testSpecificMocks.value);
expect(utils.print).toHaveBeenCalledWith('');
});
it('should print using specific string when value is not a sinon mock', () => {
testSpecificMocks.value = () => {/*impl*/};
testSpecificMocks.value.displayName = 'specific-mock-name';
sinonMock.print(testSpecificMocks.value);
expect(utils.print).toHaveBeenCalledWith('specific-mock-name');
});
});
describe('testFunction', () => {
it('should return true when function is a mocked function (has truthy value for `isSinonProxy` prop)', () => {
expect(sinonMock.testFunction(mocks.value)).toBe(true);
});
it('should return false when function does not have desired property', () => {
expect(sinonMock.testFunction(()=> ({}))).toBe(false);
});
it('should return false when function has desired property with falsy value', () => {
testSpecificMocks.value = function () {/*impl*/};
testSpecificMocks.value.isSinonProxy = false;
expect(sinonMock.testFunction(testSpecificMocks.value)).toBe(false);
});
});
describe('test', () => {
beforeAll(() => {
jest.spyOn(sinonMock, 'testFunction').mockReturnValue(true);
});
afterEach(() => {
utils.test.mockClear();
sinonMock.testFunction.mockClear();
});
afterAll(() => {
sinonMock.testFunction.mockRestore();
});
it('will use utility tester to check if value is a function', () => {
sinonMock.test(mocks.value);
expect(utils.test).toHaveBeenCalledWith(mocks.value);
});
it('will use own tester to check if value has desired property with truthy value', () => {
sinonMock.test(mocks.value);
expect(sinonMock.testFunction).toHaveBeenCalledWith(mocks.value);
});
it('returns true if utility tester and own tester returns true', () => {
expect(sinonMock.test(mocks.value)).toBe(true);
});
it('returns false if utility tester returns false', () => {
utils.test.mockReturnValueOnce(false);
expect(sinonMock.test(mocks.value)).toBe(false);
});
it('returns false if own tester returns false', () => {
sinonMock.testFunction.mockReturnValueOnce(false);
expect(sinonMock.test(mocks.value)).toBe(false);
});
});
});
|
JavaScript | UTF-8 | 1,494 | 2.734375 | 3 | [] | no_license | define(['text!./templates/task.html'], function (template) {
var taskView = Backbone.View.extend({
// Properties
template: _.template(template),
// Backbone
tagName: 'li',
initialize: function () {
_.bindAll(this);
this.listenTo(this.model, 'change', this.onModelChange);
this.listenTo(this.model, 'destroy', this.onModelDestroy);
},
events: {
'change .complete-task': 'onCompleteTaskChange',
'click .delete-task': 'onDeleteTaskClick'
},
// Bootstrap
bootstrap: function () {
this.render();
},
// Rendering
render: function () {
// This could be solved differently! It's to show how you can shim your model easily with default values!
var data = _.extend({ complete: false }, this.model.toJSON());
this.$el.html(this.template(data));
},
// UI Events
onCompleteTaskChange: function () {
this.completeTask();
},
onDeleteTaskClick: function (e) {
e.preventDefault();
this.deleteTask();
},
// Backbone Events
onModelChange: function () {
this.render();
},
onModelDestroy: function () {
this.$el.fadeOut('slow', _.bind(function () {
this.remove();
}, this));
},
// Methods
completeTask: function () { // No longer needs to find by ID
return this.model.save({ complete: true });
},
deleteTask: function () { // No longer needs to find by ID
if (confirm("Are you sure you want to delete this task?")) {
this.model.destroy();
}
}
});
return taskView;
}); |
Swift | UTF-8 | 1,588 | 2.78125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT",
"Unlicense"
] | permissive | //
// 🦠 Corona-Warn-App
//
import Foundation
enum DCCPublicKeyRegistrationError: LocalizedError, Equatable {
case badRequest
case tokenNotAllowed
case tokenDoesNotExist
case tokenAlreadyAssigned
case internalServerError
case unhandledResponse(Int)
case noNetworkConnection
// MARK: - Protocol LocalizedError
var errorDescription: String? {
switch self {
case .badRequest:
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.clientErrorCallHotline, "PKR_400")
case .tokenNotAllowed:
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.e2eErrorCallHotline, "PKR_403")
case .tokenDoesNotExist:
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.e2eErrorCallHotline, "PKR_404")
case .tokenAlreadyAssigned:
// Not returned to the user, next request is started automatically
return nil
case .internalServerError:
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.tryAgain, "PKR_500")
case .unhandledResponse(let code):
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.tryAgain, "PKR_FAILED (\(code)")
case .noNetworkConnection:
return String(format: AppStrings.HealthCertificate.Overview.TestCertificateRequest.Error.noNetwork, "PKR_NO_NETWORK")
}
}
// MARK: - Protocol Equatable
static func == (lhs: DCCPublicKeyRegistrationError, rhs: DCCPublicKeyRegistrationError) -> Bool {
lhs.localizedDescription == rhs.localizedDescription
}
}
|
Markdown | UTF-8 | 9,184 | 2.71875 | 3 | [
"LicenseRef-scancode-unknown",
"EPL-1.0",
"CC-BY-SA-4.0",
"BSD-3-Clause",
"CC-BY-SA-3.0",
"CC-BY-4.0",
"GPL-1.0-only",
"ICU",
"LGPL-3.0-only",
"MPL-1.0",
"CDDL-1.0",
"GPL-2.0-only",
"GPL-1.0-or-later",
"MPL-2.0",
"Apache-2.0",
"LGPL-2.0-only",
"BSD-2-Clause"
] | permissive | # openapi-java-client
Service Catalog APIs
- API version: 1.0
This specifies a **RESTful API** for Service Catalog.
# Authentication
Our REST APIs are protected using OAuth2 and access control is achieved through scopes. Before you start invoking
the the API you need to obtain an access token with the required scopes. This guide will walk you through the steps
that you will need to follow to obtain an access token.
First you need to obtain the consumer key/secret key pair by calling the dynamic client registration (DCR) endpoint. You can add your preferred grant types
in the payload. A Sample payload is shown below.
```
{
\"callbackUrl\":\"www.google.lk\",
\"clientName\":\"rest_api_service_catalog\",
\"owner\":\"admin\",
\"grantType\":\"client_credentials password refresh_token\",
\"saasApp\":true
}
```
Create a file (payload.json) with the above sample payload, and use the cURL shown bellow to invoke the DCR endpoint. Authorization header of this should contain the
base64 encoded admin username and password.
**Format of the request**
```
curl -X POST -H \"Authorization: Basic Base64(admin_username:admin_password)\" -H \"Content-Type: application/json\"
\\ -d @payload.json https://<host>:<servlet_port>/client-registration/v0.17/register
```
**Sample request**
```
curl -X POST -H \"Authorization: Basic YWRtaW46YWRtaW4=\" -H \"Content-Type: application/json\"
\\ -d @payload.json https://localhost:9443/client-registration/v0.17/register
```
Following is a sample response after invoking the above curl.
```
{
\"clientId\": \"fOCi4vNJ59PpHucC2CAYfYuADdMa\",
\"clientName\": \"rest_api_service_catalog\",
\"callBackURL\": \"www.google.lk\",
\"clientSecret\": \"a4FwHlq0iCIKVs2MPIIDnepZnYMa\",
\"isSaasApplication\": true,
\"appOwner\": \"admin\",
\"jsonString\": \"{\\\"grant_types\\\":\\\"client_credentials password refresh_token\\\",\\\"redirect_uris\\\":\\\"www.google.lk\\\",\\\"client_name\\\":\\\"rest_api123\\\"}\",
\"jsonAppAttribute\": \"{}\",
\"tokenType\": null
}
```
Next you must use the above client id and secret to obtain the access token.
We will be using the password grant type for this, you can use any grant type you desire.
You also need to add the proper **scope** when getting the access token. All possible scopes for Service Catalog REST API can be viewed in **OAuth2 Security** section
of this document and scope for each resource is given in **authorization** section of resource documentation.
Following is the format of the request if you are using the password grant type.
```
curl -k -d \"grant_type=password&username=<admin_username>&password=<admin_passowrd>&scope=<scopes seperated by space>\"
\\ -H \"Authorization: Basic base64(cliet_id:client_secret)\"
\\ https://<host>:<servlet_port>/oauth2/token
```
**Sample request**
```
curl https://localhost:9443/oauth2/token -k \\
-H \"Authorization: Basic Zk9DaTR2Tko1OVBwSHVjQzJDQVlmWXVBRGRNYTphNEZ3SGxxMGlDSUtWczJNUElJRG5lcFpuWU1h\" \\
-d \"grant_type=password&username=admin&password=admin&scope=service_catalog:service_view service_catalog:service_write\"
```
Shown below is a sample response to the above request.
```
{
\"access_token\": \"e79bda48-3406-3178-acce-f6e4dbdcbb12\",
\"refresh_token\": \"a757795d-e69f-38b8-bd85-9aded677a97c\",
\"scope\": \"service_catalog:service_view service_catalog:service_write\",
\"token_type\": \"Bearer\",
\"expires_in\": 3600
}
```
Now you have a valid access token, which you can use to invoke an API.
Navigate through the API descriptions to find the required API, obtain an access token as described above and invoke the API with the authentication header.
If you use a different authentication mechanism, this process may change.
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
## Requirements
Building the API client library requires:
1. Java 1.7+
2. Maven/Gradle
## Installation
To install the API client library to your local Maven repository, simply execute:
```shell
mvn clean install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
mvn clean deploy
```
Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information.
### Maven users
Add this dependency to your project's POM:
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-java-client</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
```
### Gradle users
Add this dependency to your project's build file:
```groovy
compile "org.openapitools:openapi-java-client:1.0"
```
### Others
At first generate the JAR by executing:
```shell
mvn clean package
```
Then manually install the following JARs:
* `target/openapi-java-client-1.0.jar`
* `target/lib/*.jar`
## Getting Started
Please follow the [installation](#installation) instruction and execute the following Java code:
```java
// Import classes:
import org.wso2.am.integration.clients.service.catalog.api.ApiClient;
import org.wso2.am.integration.clients.service.catalog.api.ApiException;
import org.wso2.am.integration.clients.service.catalog.api.Configuration;
import org.wso2.am.integration.clients.service.catalog.api.auth.*;
import org.wso2.am.integration.clients.service.catalog.api.models.*;
import org.wso2.am.integration.clients.service.catalog.api.v1.ServicesApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://apis.wso2.com/api/service-catalog/v1");
// Configure OAuth2 access token for authorization: OAuth2Security
OAuth OAuth2Security = (OAuth) defaultClient.getAuthentication("OAuth2Security");
OAuth2Security.setAccessToken("YOUR ACCESS TOKEN");
ServicesApi apiInstance = new ServicesApi(defaultClient);
ServiceDTO serviceMetadata = new ServiceDTO(); // ServiceDTO |
File definitionFile = new File("/path/to/file"); // File |
String inlineContent = "inlineContent_example"; // String | Inline content of the document
try {
ServiceDTO result = apiInstance.addService(serviceMetadata, definitionFile, inlineContent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ServicesApi#addService");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
## Documentation for API Endpoints
All URIs are relative to *https://apis.wso2.com/api/service-catalog/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ServicesApi* | [**addService**](docs/ServicesApi.md#addService) | **POST** /services | Add a new service to Service Catalog
*ServicesApi* | [**deleteService**](docs/ServicesApi.md#deleteService) | **DELETE** /services/{serviceId} | Delete a service
*ServicesApi* | [**exportService**](docs/ServicesApi.md#exportService) | **GET** /services/export | Export a service
*ServicesApi* | [**getServiceById**](docs/ServicesApi.md#getServiceById) | **GET** /services/{serviceId} | Get details of a service
*ServicesApi* | [**getServiceDefinition**](docs/ServicesApi.md#getServiceDefinition) | **GET** /services/{serviceId}/definition | Retrieve a service definition
*ServicesApi* | [**getServiceUsage**](docs/ServicesApi.md#getServiceUsage) | **GET** /services/{serviceId}/usage | Retrieve the API Info that use the given service
*ServicesApi* | [**importService**](docs/ServicesApi.md#importService) | **POST** /services/import | Import a service
*ServicesApi* | [**searchServices**](docs/ServicesApi.md#searchServices) | **GET** /services | Retrieve/search services
*ServicesApi* | [**updateService**](docs/ServicesApi.md#updateService) | **PUT** /services/{serviceId} | Update a service
*SettingsApi* | [**getSettings**](docs/SettingsApi.md#getSettings) | **GET** /settings | Retrieve service catalog API settings
## Documentation for Models
- [APIInfoDTO](docs/APIInfoDTO.md)
- [APIListDTO](docs/APIListDTO.md)
- [ErrorDTO](docs/ErrorDTO.md)
- [ErrorListItemDTO](docs/ErrorListItemDTO.md)
- [PaginationDTO](docs/PaginationDTO.md)
- [ServiceDTO](docs/ServiceDTO.md)
- [ServiceInfoDTO](docs/ServiceInfoDTO.md)
- [ServiceInfoListDTO](docs/ServiceInfoListDTO.md)
- [ServiceListDTO](docs/ServiceListDTO.md)
- [ServiceListExpandedDTO](docs/ServiceListExpandedDTO.md)
- [ServiceSchemaDTO](docs/ServiceSchemaDTO.md)
- [SettingsDTO](docs/SettingsDTO.md)
- [VerifierDTO](docs/VerifierDTO.md)
## Documentation for Authorization
Authentication schemes defined for the API:
### OAuth2Security
- **Type**: OAuth
- **Flow**: password
- **Authorization URL**:
- **Scopes**:
- service_catalog:service_view: view access to services in service catalog
- service_catalog:service_write: write access to services in service catalog
- apim:api_view: view access to services for read only users
## Recommendation
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author
|
PHP | UTF-8 | 90,232 | 2.890625 | 3 | [] | no_license | <?php
class Product
{
// property declaration
public $id = 0;
public $acct = '';
public $eventCode = '';
public $code = '';
public $categoryPrefix = '';
public $description = '';
public $description2 = '';
public $price = 0;
public $value = 0;
public $linkData = '';
public $status = 0;
public $img1 = ''; // small icon - should be uploaded as 64x64.
public $img2 = '';
public $qty = 0;
public $total = 0;
public $totalAvailable = 0;
public $dateAvailableStart = '';
public $dateAvailableEnd = '';
public $pahSmallLine1 = '';
public $pahSmallLine2 = '';
public $pahLine1 = '';
public $pahLine2 = '';
public $pahLine3 = '';
public $pahInstructions = '';
public function retrieveListFromDb ($acct, $eventCode){
$products = array();
$sql = "SELECT * FROM products WHERE acct = ? AND event_code = ? AND list_on_site=1 order by listing_order";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('ss',$acct, $eventCode);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
$product = new Product();
$product->id = $row['id'];
$product->acct = $row['acct'];
$product->eventCode = $row['event_code'];
$product->categoryPrefix = $row['category_prefix'];
$product->code = $row['code'];
$product->description = $row['description'];
$product->description2 = $row['description2'];
$product->price = $row['price'];
$product->value = $row['value'];
$product->linkData = $row['link_data'];
$product->img1 = $row['img1'];
$product->img2 = $row['img2'];
$product->status = $row['status'];
$product->totalAvailable = $row['total_available'];
$product->dateAvailableStart = $row['date_available_start'];
$product->dateAvailableEnd = $row['date_available_end'];
$product->pahSmallLine1 = $row['pah_small_line1'];
$product->pahSmallLine2 = $row['pah_small_line2'];
$product->pahLine1 = $row['pah_small_line1'];
$product->pahLine2 = $row['pah_small_line2'];
$product->pahLine3 = $row['pah_small_line3'];
$product->pahInstructions = $row['pah_instructions'];
//echo '<!-- product: ';
//print_r($product);
//echo '-->';
array_push($products,$product);
//echo '<!-- products: ';
//print_r($products);
//echo '-->';
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . mysql_error()) ;
}
$mysqli->close();
return $products;
}
public function retrieveActiveListFromDb ($acct, $eventCode){
$products = array();
$sql = "SELECT * FROM products WHERE acct = ? AND event_code = ? AND status = 1 AND list_on_site=1 order by listing_order";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('ss',$acct, $eventCode);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
$product = new Product();
$product->id = $row['id'];
$product->acct = $row['acct'];
$product->eventCode = $row['event_code'];
$product->categoryPrefix = $row['category_prefix'];
$product->code = $row['code'];
$product->description = $row['description'];
$product->description2 = $row['description2'];
$product->price = $row['price'];
$product->value = $row['value'];
$product->linkData = $row['link_data'];
$product->img1 = $row['img1'];
$product->img2 = $row['img2'];
$product->status = $row['status'];
$product->totalAvailable = $row['total_available'];
$product->dateAvailableStart = $row['date_available_start'];
$product->dateAvailableEnd = $row['date_available_end'];
$product->pahSmallLine1 = $row['pah_small_line1'];
$product->pahSmallLine2 = $row['pah_small_line2'];
$product->pahLine1 = $row['pah_line1'];
$product->pahLine2 = $row['pah_line2'];
$product->pahLine3 = $row['pah_line3'];
$product->pahInstructions = $row['pah_instructions'];
//echo '<!-- product: ';
//print_r($product);
//echo '-->';
array_push($products,$product);
//echo '<!-- products: ';
//print_r($products);
//echo '-->';
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . mysql_error()) ;
}
$mysqli->close();
return $products;
}
public function retrieveActiveListFromDbTemp ($acct, $eventCode){
$products = array();
$sql = "SELECT * FROM products WHERE acct = ? AND event_code = ? AND status = 1 order by listing_order";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('ss',$acct, $eventCode);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
$product = new Product();
$product->id = $row['id'];
$product->acct = $row['acct'];
$product->eventCode = $row['event_code'];
$product->categoryPrefix = $row['category_prefix'];
$product->code = $row['code'];
$product->description = $row['description'];
$product->description2 = $row['description2'];
$product->price = $row['price'];
$product->value = $row['value'];
$product->linkData = $row['link_data'];
$product->img1 = $row['img1'];
$product->img2 = $row['img2'];
$product->status = $row['status'];
$product->totalAvailable = $row['total_available'];
$product->dateAvailableStart = $row['date_available_start'];
$product->dateAvailableEnd = $row['date_available_end'];
$product->pahSmallLine1 = $row['pah_small_line1'];
$product->pahSmallLine2 = $row['pah_small_line2'];
$product->pahLine1 = $row['pah_small_line1'];
$product->pahLine2 = $row['pah_small_line2'];
$product->pahLine3 = $row['pah_small_line3'];
$product->pahInstructions = $row['pah_instructions'];
//echo '<!-- product: ';
//print_r($product);
//echo '-->';
array_push($products,$product);
//echo '<!-- products: ';
//print_r($products);
//echo '-->';
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . mysql_error()) ;
}
$mysqli->close();
return $products;
}
public function loadFromDbUsingId ($id){
$sql = "SELECT * FROM products WHERE id = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('d',$id);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
//echo '<!-- found row: ';
//print_r($row);
//echo '-->';
$this->id = $row['id'];
$this->acct = $row['acct'];
$this->eventCode = $row['event_code'];
$this->categoryPrefix = $row['category_prefix'];
$this->code = $row['code'];
$this->description = $row['description'];
$this->description2 = $row['description2'];
$this->price = $row['price'];
$this->value = $row['value'];
$this->linkData = $row['link_data'];
$this->img1 = $row['img1'];
$this->img2 = $row['img2'];
$this->status = $row['status'];
$this->totalAvailable = $row['total_available'];
$this->dateAvailableStart = $row['date_available_start'];
$this->dateAvailableEnd = $row['date_available_end'];
$this->pahSmallLine1 = $row['pah_small_line1'];
$this->pahSmallLine2 = $row['pah_small_line2'];
$this->pahLine1 = $row['pah_line1'];
$this->pahLine2 = $row['pah_line2'];
$this->pahLine3 = $row['pah_line3'];
$this->pahInstructions = $row['pah_instructions'];
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . mysql_error()) ;
}
$mysqli->close();
return;
}
public function loadFromDb ($acct, $eventCode, $code){
$sql = "SELECT * FROM products WHERE acct = ? AND event_code = ? AND code = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('sss',$acct, $eventCode, $code);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
//echo '<!-- found row: ';
//print_r($row);
//echo '-->';
$this->id = $row['id'];
$this->acct = $row['acct'];
$this->eventCode = $row['event_code'];
$this->categoryPrefix = $row['category_prefix'];
$this->code = $row['code'];
$this->description = $row['description'];
$this->description2 = $row['description2'];
$this->price = $row['price'];
$this->value = $row['value'];
$this->linkData = $row['link_data'];
$this->img1 = $row['img1'];
$this->img2 = $row['img2'];
$this->status = $row['status'];
$this->totalAvailable = $row['total_available'];
$this->dateAvailableStart = $row['date_available_start'];
$this->dateAvailableEnd = $row['date_available_end'];
$this->pahSmallLine1 = $row['pah_small_line1'];
$this->pahSmallLine2 = $row['pah_small_line2'];
$this->pahLine1 = $row['pah_small_line1'];
$this->pahLine2 = $row['pah_small_line2'];
$this->pahLine3 = $row['pah_small_line3'];
$this->pahInstructions = $row['pah_instructions'];
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . mysql_error()) ;
}
$mysqli->close();
return;
}
public function loadFromDbUsingPrefix ($acct, $eventCode, $prefix){
//echo '<!-- Product->loadFromDbUsingPrefix(): acct: ' . $acct . ' eventCode: ' . $eventCode . ' code: ' . $prefix . '-->';
$sql = "SELECT * FROM products WHERE acct = ? AND event_code = ? AND category_prefix = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();
}
if ($stmt = $mysqli->prepare($sql)){
$stmt->bind_param('sss',$acct, $eventCode, $prefix);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);exit;}
$stmt->store_result();
$variables = array();
$data = array();
$meta = $stmt->result_metadata();
while($field = $meta->fetch_field()){
$variables[] = &$data[$field->name]; // pass by reference
}
call_user_func_array(array($stmt, 'bind_result'), $variables);
while($stmt->fetch())
{
$row = array();
foreach($data as $k=>$v)
$row[$k] = $v;
//echo '<!-- found row: ';
//print_r($row);
//echo '-->';
$this->id = $row['id'];
$this->acct = $row['acct'];
$this->eventCode = $row['event_code'];
$this->categoryPrefix = $row['category_prefix'];
$this->code = $row['code'];
$this->description = $row['description'];
$this->description2 = $row['description2'];
$this->price = $row['price'];
$this->value = $row['value'];
$this->linkData = $row['link_data'];
$this->img1 = $row['img1'];
$this->img2 = $row['img2'];
$this->status = $row['status'];
$this->totalAvailable = $row['total_available'];
$this->dateAvailableStart = $row['date_available_start'];
$this->dateAvailableEnd = $row['date_available_end'];
$this->pahSmallLine1 = $row['pah_small_line1'];
$this->pahSmallLine2 = $row['pah_small_line2'];
$this->pahLine1 = $row['pah_small_line1'];
$this->pahLine2 = $row['pah_small_line2'];
$this->pahLine3 = $row['pah_small_line3'];
$this->pahInstructions = $row['pah_instructions'];
}
$stmt->close();
} else {
exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
}
$mysqli->close();
return;
}
public function isActive (){
$status = 0;
// determine if the event is active based on status.
$sql = "SELECT status FROM products WHERE id = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();}
$stmt = $mysqli->prepare($sql) or exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
$stmt->bind_param('s',$this->id);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);}
$stmt->bind_result($status);
while ($stmt->fetch()) {
// do nothing.
}
$stmt->close();
$mysqli->close();
echo "<!-- Product->isActive().. id: " . $id . " status: " . $status . " -->";
return $status;
}
function orderedAtLeastOneOfTheseProducts($prodCode){
foreach($_SESSION['products'] as $product){
if ($product->code == $prodCode){
if ($product->qty > 0){
return true;
}
}
}
return false;
}
function updateProductsInSession(){
// update all product quantities.
// if there is no task, initialize, because we are on step 1.
if (empty($_REQUEST['task'])){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDb($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
if ($_REQUEST['task'] == 'step1'){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDb($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
$allKeysAndValues = '';
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'prodQty_')){
// get the idx.
$idx = substr($key,8);
$productQty = $val;
if ($productQty == ""){
$productQty = 0;
}
//exit('found. ' . $key . '=' . $val . '<br> idx: ' . $idx);
$productCode = $_REQUEST['prodCode_' . $idx];
for($i=0;$i < count($_SESSION['products']); $i++){
if ($productCode == $_SESSION['products'][$i]->code){
$_SESSION['products'][$i]->qty = $productQty;
$_SESSION['products'][$i]->total = sprintf("%.2f",$productQty * $_SESSION['products'][$i]->price);
}
}
}
}
if (!empty($_POST['seasonPassFirst_0'])){
$_SESSION['seasonPassNames'] = array();
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'seasonPassFirst_')){
// get the idx.
$idx = substr($key,16);
$_SESSION['seasonPassNames'][$idx]['first'] = $_POST['seasonPassFirst_' . $idx];
$_SESSION['seasonPassNames'][$idx]['last'] = $_POST['seasonPassLast_' . $idx];
}
}
}
}
}
$this->buildProductHash();
$_SESSION['seasonPassQty'] = 0;
if ($this->orderedAtLeastOneOfTheseProducts('SEAS')){
$this->buildSeasonPassNameHash();
}
if ($this->orderedAtLeastOneOfTheseProducts('ADVSEA')){
$this->buildSeasonPassNameHash();
}
}
function updateProductsInSessionForEventbrite(){
// update all product quantities.
// if there is no task, initialize, because we are on step 1.
if (empty($_REQUEST['task'])){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDb($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
if ($_REQUEST['task'] == 'step1'){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDb($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
$allKeysAndValues = '';
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'prodQty_')){
// get the idx.
$idx = substr($key,8);
$productQty = $val;
if ($productQty == ""){
$productQty = 0;
}
//exit('found. ' . $key . '=' . $val . '<br> idx: ' . $idx);
$productCode = $_REQUEST['prodCode_' . $idx];
$productPrice = $_REQUEST['prodPrice_' . $idx];
for($i=0;$i < count($_SESSION['products']); $i++){
if ($productCode == $_SESSION['products'][$i]->code){
$_SESSION['products'][$i]->qty = $productQty;
$_SESSION['products'][$i]->price = $productPrice;
$_SESSION['products'][$i]->total = sprintf("%.2f",$productQty * $_SESSION['products'][$i]->price);
}
}
}
}
if (!empty($_POST['seasonPassFirst_0'])){
$_SESSION['seasonPassNames'] = array();
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'seasonPassFirst_')){
// get the idx.
$idx = substr($key,16);
$_SESSION['seasonPassNames'][$idx]['first'] = $_POST['seasonPassFirst_' . $idx];
$_SESSION['seasonPassNames'][$idx]['last'] = $_POST['seasonPassLast_' . $idx];
}
}
}
}
}
$this->buildProductHash();
$_SESSION['seasonPassQty'] = 0;
if ($this->orderedAtLeastOneOfTheseProducts('SEAS')){
$this->buildSeasonPassNameHash();
}
if ($this->orderedAtLeastOneOfTheseProducts('ADVSEA')){
$this->buildSeasonPassNameHash();
}
}
function updateProductsInSessionTemp(){
// update all product quantities.
// if there is no task, initialize, because we are on step 1.
if (empty($_REQUEST['task'])){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDbTemp($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
if ($_REQUEST['task'] == 'step1'){
$_SESSION['products'] = new Product();
$_SESSION['products'] = $_SESSION['products']->retrieveActiveListFromDbTemp($_SESSION['account']->acct, $_SESSION['event']->code);
} else {
$allKeysAndValues = '';
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'prodQty_')){
// get the idx.
$idx = substr($key,8);
$productQty = $val;
if ($productQty == ""){
$productQty = 0;
}
//exit('found. ' . $key . '=' . $val . '<br> idx: ' . $idx);
$productCode = $_REQUEST['prodCode_' . $idx];
for($i=0;$i < count($_SESSION['products']); $i++){
if ($productCode == $_SESSION['products'][$i]->code){
$_SESSION['products'][$i]->qty = $productQty;
$_SESSION['products'][$i]->total = sprintf("%.2f",$productQty * $_SESSION['products'][$i]->price);
}
}
}
}
if (!empty($_POST['seasonPassFirst_0'])){
$_SESSION['seasonPassNames'] = array();
foreach($_POST as $key => $val){
$allKeysAndValues .= $key . '=' . $val . '<br>';
if (strstr($key,'seasonPassFirst_')){
// get the idx.
$idx = substr($key,16);
$_SESSION['seasonPassNames'][$idx]['first'] = $_POST['seasonPassFirst_' . $idx];
$_SESSION['seasonPassNames'][$idx]['last'] = $_POST['seasonPassLast_' . $idx];
}
}
}
}
}
$this->buildProductHash();
$_SESSION['seasonPassQty'] = 0;
if ($this->orderedAtLeastOneOfTheseProducts('SEAS')){
$this->buildSeasonPassNameHash();
}
if ($this->orderedAtLeastOneOfTheseProducts('ADVSEA')){
$this->buildSeasonPassNameHash();
}
}
function checkPassNames(){
// if at anytime, we don't have enough names, we need to start over.
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->code == 'SEAS' || $oneProduct->code == 'ADVSEA'){
for($i = 0;$i < $oneProduct->qty;$i++){
if (empty($_SESSION['seasonPassNames'][$i]['first']) || empty($_SESSION['seasonPassNames'][$i]['first']) ){
return false;
}
if (strlen($_SESSION['seasonPassNames'][$i]['first']) < 2 || strlen($_SESSION['seasonPassNames'][$i]['first']) < 2){
return false;
}
}
}
}
return true;
}
function convertSeasonPassHashToList($seasonPassHash){
// if at anytime, we don't have enough names, we need to start over.
$seasonPassList = array();
$i = 0;
$seasonPassLines = explode("\n",$seasonPassHash);
foreach($seasonPassLines as $oneSeasonPassLine){
$keysAndValues = explode("&",$oneSeasonPassLine);
foreach ($keysAndValues as $oneProductKeyAndValue){
$words = explode("=",$oneProductKeyAndValue);
if ($words[0] == 'first'){
$seasonPassList[$i]['first'] = $words[1];
} else if ($words[0] == 'last'){
$seasonPassList[$i]['last'] = $words[1];
}
}
$i++;
}
return $seasonPassList;
}
function buildProductContentsTableForEventbrite(){
//echo "<pre>";
//print_r($_SESSION);
//echo "</pre>";
//exit;
$_SESSION['productTotal'] = 0.00;
$productSubTotal = 0;
//$discount = 0;
$productContentsHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 11pt;font-weight: bold;color: #000000;background-color:#eeeeee;"';
$productContentsDetailStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#ffffff;"';
$productContentsTotalStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesOutputStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 12pt;font-weight:normal;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;font-weight:normal;color: #000000;background-color:#cccccc;"';
$productContentsTable = '
<center><table bgcolor=#FFFFFF width=98% style="border: 1px solid black">
<tr valign=bottom bgcolor=#dddddd>
<td ' . $productContentsHeaderStyle . ' width=50% align=left>Selected Products</td>
<td ' . $productContentsHeaderStyle . 'align=center valign=bottom>Unit Price</td>
<td ' . $productContentsHeaderStyle . ' align=center valign=bottom>Qty</td>
<td ' . $productContentsHeaderStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>Total Cost</td>
</tr>
';
// $_SESSION['products'] contains all the products and a quantity of each.
// the ->qty contains the quantity. We only want a product to appear if the qty > 0.
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
$productSubTotal += $oneProduct->total;
$productContentsTable .= '
<tr>
<td ' . $productContentsDetailStyle . ' align=left>' . $oneProduct->description . '</td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom><nobr>$' . $oneProduct->price . '</nobr></td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom>
' . $oneProduct->qty . '
</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
$' . $oneProduct->total . '
</td>
</tr>
';
}
}
$productSubTotal = sprintf ("%.2f", $productSubTotal); // make sure there are only 2 decimals
if (!empty($_SESSION['discount'])){
$_SESSION['discount'] = sprintf ("%.2f", $_SESSION['discount']);
} else {
$_SESSION['discount'] = 0.00;
}
$total = sprintf("%.2f",$productSubTotal + $_SESSION['discount']); // discount is negative.
$_SESSION['productTotal'] = $total;
//exit('discount:' . $_SESSION['discount']);
$productContentsTable .= '
<tr>
<td ' . $productContentsDetailStyle . ' align=left colspan=3>Product Tax</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom><nobr>
$ ' . $_SESSION['tax'] . '</nobr>
</td>
</tr>
<tr>
<td ' . $productContentsDetailStyle . ' align=left colspan=2>Shipping</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom><nobr>
' . $_SESSION['shippingMethod'] . '</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom><nobr>
$ ' . $_SESSION['shipping'] . '</nobr>
</td>
</tr>
<tr>
<td ' . $productContentsDetailStyle . ' align=left colspan=3>Shipping Tax</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom><nobr>
$ ' . $_SESSION['shippingTax'] . '</nobr>
</td>
</tr>
';
$productSubTotal = sprintf ("%.2f", $productSubTotal); // make sure there are only 2 decimals
$total = sprintf("%.2f",$productSubTotal + $_SESSION['tax'] + $_SESSION['shipping'] + $_SESSION['shippingTax']); // discount is negative.
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><b>Total</b></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<input type=hidden name=productTotal value="' . $total . '">
<nobr><font size=+1><b>$ ' . $total . '</b></font></nobr>
</td>
</tr>
</table></center>';
return $productContentsTable;
}
function buildProductContentsTable(){
/*$_SESSION['threeDollarDiscounts'] = array(
'EE2013HLT',
'EE2013HN',
'EE2013CHB',
'EE2013HT',
'EE2013VHL',
'EE2013HST',
'EE2013HT',
'EE2013FL',
'EE2013PC',
'EE2013PH','
EE2013PAE');
$_SESSION['fiveDollarDiscounts'] = array('EE2013SS');
*/
//echo "<pre>";
//print_r($_SESSION);
//echo "</pre>";
//exit;
$_SESSION['productTotal'] = 0.00;
$productSubTotal = 0;
//$discount = 0;
$productContentsHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 11pt;font-weight: bold;color: #000000;background-color:#eeeeee;"';
$productContentsDetailStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#ffffff;"';
$productContentsTotalStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesOutputStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 12pt;font-weight:normal;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;font-weight:normal;color: #000000;background-color:#cccccc;"';
$productContentsTable = '
<center><table bgcolor=#FFFFFF width=98% style="border: 1px solid black">
<tr valign=bottom bgcolor=#dddddd>
<td ' . $productContentsHeaderStyle . ' width=50% align=left>Selected Products</td>
<td ' . $productContentsHeaderStyle . 'align=center valign=bottom>Unit Price</td>
<td ' . $productContentsHeaderStyle . ' align=center valign=bottom>Qty</td>
<td ' . $productContentsHeaderStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>Total Cost</td>
</tr>
';
// $_SESSION['products'] contains all the products and a quantity of each.
// the ->qty contains the quantity. We only want a product to appear if the qty > 0.
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
$productSubTotal += $oneProduct->total;
$productContentsTable .= '
<tr>
<td ' . $productContentsDetailStyle . ' align=left>' . $oneProduct->description . '</td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom><nobr>$' . $oneProduct->price . '</nobr></td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom>
' . $oneProduct->qty . '
</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
$' . $oneProduct->total . '
</td>
</tr>
';
/*if ($_SESSION['event']->code == '2013EE'){
if (strstr($oneProduct->code,"ADULT")){
foreach($_SESSION['threeDollarDiscounts'] as $oneThreeDollarDiscount){
if (trim(strtolower($oneThreeDollarDiscount)) == trim(strtolower($_SESSION['promoCode']))){
$discount += (3.00 * $oneProduct->qty);
}
}
foreach($_SESSION['fiveDollarDiscounts'] as $oneFiveDollarDiscount){
if (trim(strtolower($oneFiveDollarDiscount)) == trim(strtolower($_SESSION['promoCode']))){
$discount += (5.00 * $oneProduct->qty);
}
}
}
} */
// handle promo. 5.00 * qty. with a maximum of 30.00.
if ($oneProduct->code == 'SEAS' || $oneProduct->code == 'ADVSEA'){
//if ($_SESSION['promoCode'] == 'blueribbon158'){
// $discount += (5.00 * $oneProduct->qty);
// if ($discount > 30.00){
// $discount = 30.00;
// }
// }
if ($oneProduct->qty > 0){
// loop through all passes and show the names.
$productContentsTable .= '
<tr>
<td colspan=4>
<center>
<table cellspacing=0>
<tr>
<td colspan=4 ' . $seasonPassNamesHeaderStyle . '>
<center>
<font size=-1>
<b>SEASON PASS NAMES</b><br>
(A picture ID will be required for admission of each season pass.)
</font>
</center>
</td>
</tr>
';
for($i = 0;$i < $oneProduct->qty;$i++){
$productContentsTable .='
<tr>
<td colspan=4 ' . $seasonPassNamesOutputStyle . '>
<center>' . $_SESSION['seasonPassNames'][$i]['first'] . ' ' . $_SESSION['seasonPassNames'][$i]['last'] . '</center>
</td>
</tr>';
}
$productContentsTable .='
</table>
<br>
</center>
</td>
</tr>
';
}
}
}
}
$productSubTotal = sprintf ("%.2f", $productSubTotal); // make sure there are only 2 decimals
$_SESSION['discount'] = sprintf ("%.2f", $_SESSION['discount']);
$total = sprintf("%.2f",$productSubTotal + $_SESSION['discount']); // discount is negative.
$_SESSION['productTotal'] = $total;
//exit('discount:' . $_SESSION['discount']);
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><b>Product Sub Total...</b></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom><nobr>
$ ' . $productSubTotal . '</nobr>
</td>
</tr>
';
if ($_SESSION['discount'] < 0){
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3>Discounts...</td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<font color=red><nobr>
$ ' . $_SESSION['discount'] . '</nobr>
</font>
</td>
</tr>
';
}
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><font size=-1>' . $_SESSION['salesTaxMessage'] . '</font></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<font size=-1><nobr>$ 0.00</nobr></font>
</td>
</tr>
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><b>Total</b></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<input type=hidden name=productTotal value="' . $total . '">
<nobr><font size=+1><b>$ ' . $total . '</b></font></nobr>
</td>
</tr>
</table></center>';
return $productContentsTable;
}
function countNotSeasonPassOrderQty($products){
$notSeasonPassOrderQty = 0;
foreach($products as $oneProduct){
if ($oneProduct->qty > 0){
// handle promo. 5.00 * qty. with a maximum of 30.00.
if ($oneProduct->code != 'SEAS' && $oneProduct->code != 'ADVSEA'){
$notSeasonPassOrderQty = $oneProduct->qty;
}
}
}
return $notSeasonPassOrderQty;
}
function countSeasonPassOrderQty(){
$seasonPassOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
// handle promo. 5.00 * qty. with a maximum of 30.00.
if ($oneProduct->code == 'SEAS' || $oneProduct->code == 'ADVSEA'){
$seasonPassOrderQty = $oneProduct->qty;
}
}
}
return $seasonPassOrderQty;
}
function countAdultOrderQty(){
$adultOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
// handle promo. 5.00 * qty. with a maximum of 30.00.
if (strstr($oneProduct->code,'PAHAAA')){
$adultOrderQty = $oneProduct->qty;
}
}
}
return $adultOrderQty;
}
function countChildOrderQty(){
$childOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
// handle promo. 5.00 * qty. with a maximum of 30.00.
if (strstr($oneProduct->code,'PAHACS')){
$childOrderQty = $oneProduct->qty;
}
}
}
return $childOrderQty;
}
function buildProductContentsTableForAdmin($productTotal){
// calculates the discount based on $row['SUBTOTAL']
$productSubTotal = 0;
$discount = 0;
$productContentsHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 11pt;font-weight: bold;color: #000000;background-color:#eeeeee;"';
$productContentsDetailStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#ffffff;"';
$productContentsTotalStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesOutputStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 12pt;font-weight:normal;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;font-weight:normal;color: #000000;background-color:#cccccc;"';
$productContentsTable = '
<center><table bgcolor=#FFFFFF width=98% style="border: 1px solid black">
<tr valign=bottom bgcolor=#dddddd>
<td ' . $productContentsHeaderStyle . ' width=50% align=left>Selected Products</td>
<td ' . $productContentsHeaderStyle . 'align=center valign=bottom>Unit Price</td>
<td ' . $productContentsHeaderStyle . ' align=center valign=bottom>Qty</td>
<td ' . $productContentsHeaderStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>Total Cost</td>
</tr>
';
// $_SESSION['products'] contains all the products and a quantity of each.
// the ->qty contains the quantity. We only want a product to appear if the qty > 0.
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
$productSubTotal += $oneProduct->total;
$productContentsTable .= '
<tr>
<td ' . $productContentsDetailStyle . ' align=left>' . $oneProduct->description . '</td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom>$' . $oneProduct->price . '</td>
<td ' . $productContentsDetailStyle . ' align=center valign=bottom>
' . $oneProduct->qty . '
</td>
<td ' . $productContentsDetailStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
$' . $oneProduct->total . '
</td>
</tr>
';
if ($_SESSION['event']->code == '2013EE'){
if (strstr($oneProduct->code,"ADULT")){
foreach($_SESSION['threeDollarDiscounts'] as $oneThreeDollarDiscount){
if (trim(strtolower($oneThreeDollarDiscount)) == trim(strtolower($_SESSION['promoCode']))){
$discount += (3.00 * $oneProduct->qty);
}
}
foreach($_SESSION['fiveDollarDiscounts'] as $oneFiveDollarDiscount){
if (trim(strtolower($oneFiveDollarDiscount)) == trim(strtolower($_SESSION['promoCode']))){
$discount += (5.00 * $oneProduct->qty);
}
}
}
}
// handle promo. 5.00 * qty. with a maximum of 30.00.
if ($oneProduct->code == 'SEAS' || $oneProduct->code == 'ADVSEA'){
if ($oneProduct->qty > 0){
// loop through all passes and show the names.
$productContentsTable .= '
<tr>
<td colspan=4>
<center>
<table cellspacing=0>
<tr>
<td colspan=4 ' . $seasonPassNamesHeaderStyle . '>
<center>
<font size=-1>
<b>SEASON PASS NAMES</b><br>
(A picture ID will be required for admission of each season pass.)
</font>
</center>
</td>
</tr>
';
for($i = 0;$i < $oneProduct->qty;$i++){
$productContentsTable .='
<tr>
<td colspan=4 ' . $seasonPassNamesOutputStyle . '>
<center>' . $_SESSION['seasonPassNames'][$i]['first'] . ' ' . $_SESSION['seasonPassNames'][$i]['last'] . '</center>
</td>
</tr>';
}
$productContentsTable .='
</table>
<br>
</center>
</td>
</tr>
';
}
}
}
}
$productSubTotal = sprintf ("%.2f", $productSubTotal); // make sure there are only 2 decimals
$discount = sprintf ("%.2f", $productSubTotal - $productTotal);
$productTotal = sprintf("%.2f",$productTotal);
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><b>Product Sub Total...</b></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
$ ' . $productSubTotal . '
</td>
</tr>
';
if ($discount > 0){
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3>Discounts...</td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<font color=red>
- $ ' . $discount . '
</font>
</td>
</tr>
';
}
$productContentsTable .= '
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><font size=-1>' . $_SESSION['salesTaxMessage'] . '</font></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<font size=-1>$ 0.00</font>
</td>
</tr>
<tr>
<td ' . $productContentsTotalStyle . ' align=left colspan=3><b>Total</b></td>
<td ' . $productContentsTotalStyle . ' bgcolor="#e1e1e1" align=right valign=bottom>
<input type=hidden name=productTotal value="' . $productTotal . '">
<font size=+1><b>$ ' . $productTotal . '</b></font>
</td>
</tr>
</table></center>';
return $productContentsTable;
}
function buildProductTableForAdminSetup($acct, $eventCode){
$_SESSION['product'] = new Product();
$_SESSION['products'] = $_SESSION['product']->retrieveListFromDb($acct, $eventCode);
$productContentsHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 11pt;font-weight: bold;color: #000000;background-color:#eeeeee;"';
$productContentsDetailStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#ffffff;"';
$productContentsTotalStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesOutputStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 12pt;font-weight:normal;color: #000000;background-color:#eeeeee;"';
$seasonPassNamesHeaderStyle = 'style="font-family: Arial, Geneva, sans-serif;font-size: 10pt;font-weight:normal;color: #000000;background-color:#cccccc;"';
$productContentsTable = '
<center><table bgcolor=#FFFFFF width=98% style="border: 1px solid black">
<tr valign=bottom bgcolor=#dddddd>
<td width=200 ' . $productContentsHeaderStyle . ' align=left>Small Image</td>
<td width=50% ' . $productContentsHeaderStyle . ' align=left>Selected Products</td>
<td width=20% ' . $productContentsHeaderStyle . ' align=left>Start Date</td>
<td width=20% ' . $productContentsHeaderStyle . ' align=left>End Date</td>
<td width=200 ' . $productContentsHeaderStyle . 'align=center valign=bottom>Unit Price</td>
</tr>
';
// $_SESSION['products'] contains all the products and a quantity of each.
// the ->qty contains the quantity. We only want a product to appear if the qty > 0.
foreach($_SESSION['products'] as $oneProduct){
$img1 = '(no image)';
if ($oneProduct->img1 != null){
$img1 = '<img src="data:image/png;base64,' . base64_encode($oneProduct->img1) . '"/>';
}
$dateAvailableStart = strtotime($oneProduct->dateAvailableStart) + 3600;
$dateAvailableStart = date('Y-m-d h:i:s',$dateAvailableStart);
$dateAvailableEnd = strtotime($oneProduct->dateAvailableEnd) + 3600;
$dateAvailableEnd = date('Y-m-d h:i:s',$dateAvailableEnd);
$productContentsTable .= '
<tr>
<td valign=top ' . $productContentsDetailStyle . ' align=left>
<form action="?task=uploadImg1&eventCode=' . $eventCode . '&productCode=' . $oneProduct->code . '" method="post" enctype="multipart/form-data">
' . $img1 . '
<input type="file" name="file" id="file" onchange="this.form.submit()">
</form>
</td>
<td ' . $productContentsDetailStyle . ' align=left valign=top>' . $oneProduct->description . '</td>
<td ' . $productContentsDetailStyle . ' align=left valign=top>' . substr($dateAvailableStart,0,10) . '<br>' . date('h:i:s a T',strtotime($oneProduct->dateAvailableStart) + 3600) . '</td>
<td ' . $productContentsDetailStyle . ' align=left valign=top>' . substr($dateAvailableEnd,0,10) . '<br>' . date('h:i:s a T',strtotime($oneProduct->dateAvailableEnd) + 3600) . '</td>
<td ' . $productContentsDetailStyle . ' align=center valign=top>$' . $oneProduct->price . '</td>
</tr>
';
}
$productContentsTable .= '</table></center>';
return $productContentsTable;
}
function uploadImg1($acct, $eventCode, $productCode, $blobData){
//echo '<img src="data:image/png;base64,' . base64_encode($blobData) . '"/>';
//echo 'acct: ' . $acct . '<br>';
//echo 'eventCode: ' . $eventCode . '<br>';
//echo 'productCode: ' . $productCode . '<br>';
//exit;
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();}
$sql = "UPDATE products SET
img1=?
WHERE acct = ? AND event_code = ? AND code = ?;";
$stmt = $mysqli->prepare($sql) or exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
$stmt->bind_param(
'bsss',
$blobData,
$acct,
$eventCode,
$productCode
);
$stmt->send_long_data(0, $blobData);
if (!$stmt->execute()){
echo 'Invalid query: ' . $sql . '<br/><br/>';
printf("Errormessage: %s\n", $mysqli->error);
exit;
}
$stmt->close();
$mysqli->close();
}
function findProductFromCode($code, $code2){
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->code == $code || $oneProduct->code == $code2){
return $oneProduct;
}
}
return false;
}
// old school...
function buildProductHash(){
/*$prodNumbers = array();
foreach( $_POST as $pkey_request => $pval_request){
if (substr($pkey_request,0,9) == 'prodTotal'){
if ($pval_request > 0){
array_push($prodNumbers, substr($pkey_request,9,2));
}
}
if (substr($pkey_request,0,4) == 'prod'){
$productHash .= $pkey_request . '=' . $pval_request . '&';
}
}
$productHash = substr($productHash,0,-1); // get rid of the last &.
// needs to be key=value...*/
$productHash = '';
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
foreach($oneProduct as $key => $val){
if ($key != 'id' && $key != 'acct' && $key != 'eventCode' && $key!= 'img1'){
$productHash .= $key . '=' . $val . '&';
}
}
$productHash = substr($productHash,0,-1); // get rid of last &
$productHash .= "\n";
}
}
if (!empty($productHash)){
$_SESSION['productHash'] = substr($productHash,0,-1); // get rid of the last \n.
}
}
function buildSeasonPassNameHash(){
$_SESSION['seasonPassNameHash'] = '';
$oneProduct = $this->findProductFromCode('SEAS', 'ADVSEA');
$_SESSION['seasonPassQty'] = $oneProduct->qty;
if (!empty($_SESSION['seasonPassNames'])){
for($i = 0;$i < $oneProduct->qty;$i++){
$_SESSION['seasonPassNameHash'] .= 'first=' . $_SESSION['seasonPassNames'][$i]['first'] . '&last=' . $_SESSION['seasonPassNames'][$i]['last'] . "\n";
}
}
$_SESSION['seasonPassNameHash'] = trim($_SESSION['seasonPassNameHash']); // get rid of the last \n.
//exit('seasonPassNameHash: ' . "\n" . $_SESSION['seasonPassNameHash']);
}
function convertHashToObject($productHash){
$prodRows = explode("\n",$productHash);
$products = array();
foreach ($prodRows as $thisProdRow){
$productKeysAndValues = explode("&",$thisProdRow);
$oneProduct = new Product();
foreach ($productKeysAndValues as $thisProductKeyAndValue){
$productWords = explode("=",$thisProductKeyAndValue);
$oneProduct->$productWords[0] = $productWords[1];
}
array_push($products,$oneProduct);
}
return $products;
}
function calculateDiscount(){
$_SESSION['discount'] = 0.00;
$_SESSION['promoCode'] = '';
$_SESSION['promptForMemberNumber'] = false;
$promo = 0;
$promoCode = '';
// if (empty($_REQUEST['prodCode_6'])) {
// $_REQUEST['prodQty06'] = 0;
// }
$threeDollarDiscountOnOff = 0;
$fiveDollarDiscountOnOff = 0;
if (!empty($_REQUEST['promoCode'])){
$_SESSION['promoCode'] = $_REQUEST['promoCode'];
// first we need to confirm that it's a promo code that's part of this event.
// look it up in $_SESSION['promos']
$found = false;
$promo = new Promo();
foreach ($_SESSION['promos'] as $onePromo){
if (strtolower($_REQUEST['promoCode']) == strtolower($onePromo->promoCode)){
$promo = $onePromo;
$found = true;
break;
}
}
//echo "<pre>";
//print_r($_SESSION['promos']);
//echo "</pre>";
//echo "<pre>promoCode: " . $_REQUEST['promoCode'] . "</pre>";
//exit;
if ($found){
//csn 2/4/15
//Check to see how many are used for each promocode. And check to see if it is less than
//the total_available in the promos table. If so, then do the discount checks.
$countPromoCode = 0;
$sql = "SELECT COUNT(*) FROM assigned WHERE acct = ? and event_code = ? and promo_code = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();}
$stmt = $mysqli->prepare($sql) or exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
$stmt->bind_param('sss',$_SESSION['account']->acct, $_SESSION['event']->code, strtolower($_REQUEST['promoCode']));
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);}
$stmt->bind_result($countPromoCode);
while ($stmt->fetch()) {
}
$stmt->close();
$mysqli->close();
//exit('$countPromoCode: ' . $countPromoCode);
$totalAvailable = 0;
$sql = "SELECT total_available FROM promos WHERE acct = ? and event_code = ? and promo_code = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();}
$stmt = $mysqli->prepare($sql) or exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
$stmt->bind_param('sss',$_SESSION['account']->acct, $_SESSION['event']->code, strtolower($_REQUEST['promoCode']));
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);}
$stmt->bind_result($totalAvailable);
while ($stmt->fetch()) {
}
$stmt->close();
$mysqli->close();
//exit('$totalAvailable: ' . $totalAvailable);
//csn Do the discount checks if promo_code count is less than total_available
//or if total_available is null
if ($countPromoCode < $totalAvailable || $totalAvailable == null){
// fbmember promo code was onedollar1 until about 3 days before the fair.
// for fair. $1 off max. of 2 adult and 2 children. membership number required.
if (strtolower($promo->type) == 'onedollar1'){
$_SESSION['promptForMemberNumber'] = true;
if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$product = new Product();
$adultOrderQty = $product->countAdultOrderQty();
$childOrderQty = $product->countChildOrderQty();
$totalDiscount = (1.00 * ($adultOrderQty+$childOrderQty));
if ($totalDiscount > 6.00){
$totalDiscount = 6.00;
}
//$_SESSION['discount'] = $adultDiscount + $childDiscount;
$_SESSION['discount'] = $totalDiscount;
} else {
$_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
}
}
if (strtolower($promo->type) == 'twodollar1'){
$_SESSION['promptForMemberNumber'] = true;
if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
//$product = new Product();
//$carWeOrderQty = $product->countCarWeOrderQty();
//$carWdOrderQty = $product->countCarWdOrderQty();
//echo "<pre>";
//print_r($_REQUEST);
//echo "</pre>";
//exit;
$carWeOrderQty = 0;
$carWdOrderQty = 0;
$adultAdvOrderQty = 0;
$childAdvOrderQty = 0;
$adultOrderQty = 0;
$childOrderQty = 0;
$childweaOrderQty = 0;
$childwdaOrderQty = 0;
$seasonPassOrderQty = 0;
if ($_REQUEST['prodCode_0'] == 'CARWE' || $_REQUEST['prodCode_0'] == 'ADULTWEA'){
$carWeOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'CARWD' || $_REQUEST['prodCode_1'] == 'ADULTWDA'){
$carWdOrderQty = $_REQUEST['prodQty_1'];
}
if ($_REQUEST['prodCode_0'] == 'ADULTADV'){
$adultAdvOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'CHILDADV'){
$childAdvOrderQty = $_REQUEST['prodQty_1'];
}
if ($_REQUEST['prodCode_0'] == 'ADULT'){
$adultOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'CHILD'){
$childOrderQty = $_REQUEST['prodQty_1'];
}
if ($_REQUEST['prodCode_2'] == 'CHILDWEA'){
$childweaOrderQty = $_REQUEST['prodQty_2'];
}
if ($_REQUEST['prodCode_3'] == 'CHILDWDA'){
$childwdaOrderQty = $_REQUEST['prodQty_3'];
}
// look for SEAS in any of the products.
if (!empty($_REQUEST['prodCode_0'])){
if ($_REQUEST['prodCode_0'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_0'];
}
}
if (!empty($_REQUEST['prodCode_1'])){
if ($_REQUEST['prodCode_1'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_1'];
}
}
if (!empty($_REQUEST['prodCode_2'])){
if ($_REQUEST['prodCode_2'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_2'];
}
}
if (!empty($_REQUEST['prodCode_3'])){
if ($_REQUEST['prodCode_3'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_3'];
}
}
if (!empty($_REQUEST['prodCode_4'])){
if ($_REQUEST['prodCode_4'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_4'];
}
}
//$totalDiscount = (2.00 * ($carWeOrderQty + $carWdOrderQty));
$totalDiscount = (2.00 * ($carWeOrderQty + $carWdOrderQty + $adultAdvOrderQty + $childAdvOrderQty + $seasonPassOrderQty + $adultOrderQty + $childOrderQty + $childweaOrderQty + $childwdaOrderQty));
//if ($totalDiscount > 6.00){
// $totalDiscount = 6.00;
// }
//$_SESSION['discount'] = $adultDiscount + $childDiscount;
//exit('carWeOrderQty:' . $carWeOrderQty . '<br>carWdOrderQty:' . $carWdOrderQty);
$_SESSION['discount'] = $totalDiscount;
} else {
$_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
}
}
//Does not require membership number entry
if (strtolower($promo->type) == 'twodollar2'){
//$_SESSION['promptForMemberNumber'] = true;
//if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$adultAdvOrderQty = 0;
$childAdvOrderQty = 0;
$adultOrderQty = 0;
$childOrderQty = 0;
$carOrderQty = 0;
if (!empty($_REQUEST['prodCode_0'])){
if ($_REQUEST['prodCode_0'] == 'ADULTADV'){
$adultAdvOrderQty = $_REQUEST['prodQty_0'];
}
}
if (!empty($_REQUEST['prodCode_1'])){
if ($_REQUEST['prodCode_1'] == 'CHILDADV'){
$childAdvOrderQty = $_REQUEST['prodQty_1'];
}
}
if (!empty($_REQUEST['prodCode_0'])){
if ($_REQUEST['prodCode_0'] == 'ADULT'){
$adultOrderQty = $_REQUEST['prodQty_0'];
}
}
if (!empty($_REQUEST['prodCode_1'])){
if ($_REQUEST['prodCode_1'] == 'CHILD'){
$childOrderQty = $_REQUEST['prodQty_1'];
}
}
if (!empty($_REQUEST['prodCode_0'])) {
if ($_REQUEST['prodCode_0'] == 'CAR'){
$carOrderQty = $_REQUEST['prodQty_0'];
}
}
$totalDiscount = (2.00 * ($adultAdvOrderQty + $childAdvOrderQty + $adultOrderQty + $childOrderQty + $carOrderQty));
$_SESSION['discount'] = $totalDiscount;
//} else {
// $_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
// }
}
//Does not require membership number entry
if (strtolower($promo->type) == 'threedollar2'){
//$_SESSION['promptForMemberNumber'] = true;
//if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
// $adultAdvOrderQty = 0;
// if (!empty($_REQUEST['prodCode_0'])){
// if ($_REQUEST['prodCode_0'] == 'ADULT'){
// $adultAdvOrderQty = $_REQUEST['prodQty_0'];
// }
// }
$adultWeOrderQty = 0;
$adultWdOrderQty = 0;
$childWeOrderQty = 0;
$childWdOrderQty = 0;
$wristbandWeOrderQty = 0;
$wristbandWeOrderQty = 0;
if ($_REQUEST['prodCode_0'] == 'ADULTWE'){
$adultWeOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'ADULTWD'){
$adultWdOrderQty = $_REQUEST['prodQty_1'];
}
if ($_REQUEST['prodCode_2'] == 'CHILDWE'){
$childWeOrderQty = $_REQUEST['prodQty_2'];
}
if ($_REQUEST['prodCode_3'] == 'CHILDWD'){
$childWdOrderQty = $_REQUEST['prodQty_3'];
}
if ($_REQUEST['prodCode_4'] == 'WBWE'){
$wristbandWeOrderQty = $_REQUEST['prodQty_4'];
}
if ($_REQUEST['prodCode_5'] == 'WBWD'){
$wristbandWdOrderQty = $_REQUEST['prodQty_5'];
}
$totalDiscount = (3.00 * ($adultWeOrderQty + $adultWdOrderQty + $childWeOrderQty + $childWdOrderQty + $wristbandWeOrderQty + $wristbandWdOrderQty));
$_SESSION['discount'] = $totalDiscount;
//} else {
// $_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
// }
}
if (strtolower($promo->type) == 'fivedollar1'){
$_SESSION['promptForMemberNumber'] = true;
if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$seasonPassOrderQty = 0;
if ($_REQUEST['prodCode_4'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_4'];
} else if ($_REQUEST['prodCode_0'] == 'ADULT'){
$seasonPassOrderQty = $_REQUEST['prodQty_0'];
}
$totalDiscount = (5.00 * ($seasonPassOrderQty));
$_SESSION['discount'] = $totalDiscount;
} else {
$_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
}
}
//Does not require membership number entry
if (strtolower($promo->type) == 'fivedollar2'){
//$_SESSION['promptForMemberNumber'] = true;
//if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$seasonPassOrderQty = 0;
if ($_REQUEST['prodCode_2'] == 'SEAS'){
$seasonPassOrderQty = $_REQUEST['prodQty_2'];
} else if ($_REQUEST['prodCode_0'] == 'ADULTWEA'){
$seasonPassOrderQty = $_REQUEST['prodQty_0'];
// } else if ($_REQUEST['prodCode_6'] == 'SEAS'){
// $seasonPassOrderQty = $_REQUEST['prodQty_6'];
}
$totalDiscount = (5.00 * ($seasonPassOrderQty));
$_SESSION['discount'] = $totalDiscount;
//} else {
// $_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
// }
}
//$12 off up to 4 tickets, ADULT WE or ADULT WD advance tickets valid 8/3/15-8/10/15
//Does not require membership number entry
if (strtolower($promo->type) == 'fourfree'){
//$_SESSION['promptForMemberNumber'] = true;
//if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$adultweOrderQty = 0;
$adultwdOrderQty = 0;
if ($_REQUEST['prodCode_0'] == 'ADULTWEA'){
$adultweOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'ADULTWDA'){
$adultwdOrderQty = $_REQUEST['prodQty_1'];
}
if ($adultweOrderQty > 4) {
$adultweOrderQty = 4;
$adultwdOrderQty = 0;
} else if ($adultwdOrderQty > 4) {
$adultwdOrderQty = 4;
$adultweOrderQty = 0;
} else if ($adultweOrderQty + $adultwdOrderQty > 4) {
if ($adultweOrderQty == 1) {
$adultweOrderQty = 1;
$adultwdOrderQty = 3;
} else if ($adultweOrderQty == 2) {
$adultweOrderQty = 2;
$adultwdOrderQty = 2;
} else if ($adultweOrderQty == 3) {
$adultweOrderQty = 3;
$adultwdOrderQty = 1;
} else if ($adultweOrderQty == 4) {
$adultweOrderQty = 4;
$adultwdOrderQty = 0;
}
}
$totalDiscount = ((12.00 * $adultweOrderQty) + (9.00 * $adultwdOrderQty));
$_SESSION['discount'] = $totalDiscount;
//} else {
// $_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
// }
}
//Buy one get one free, ADULT WE or ADULT WD advance tickets valid 9/1/15-9/24/15
//Only one free ticket per transaction
//Does not require membership number entry
if (strtolower($promo->type) == 'bogofree'){
//$_SESSION['promptForMemberNumber'] = true;
//if (strlen($_REQUEST['memberNumber']) == 6){
//exit('here.');
$adultweOrderQty = 0;
$adultwdOrderQty = 0;
if ($_REQUEST['prodCode_0'] == 'ADULTWEA'){
$adultweOrderQty = $_REQUEST['prodQty_0'];
}
if ($_REQUEST['prodCode_1'] == 'ADULTWDA'){
$adultwdOrderQty = $_REQUEST['prodQty_1'];
}
if ($adultweOrderQty >= 2) {
$adultweOrderQty = 1;
$adultwdOrderQty = 0;
} else if ($adultwdOrderQty >= 2) {
$adultwdOrderQty = 1;
$adultweOrderQty = 0;
} else if ($adultweOrderQty > 0 && $adultwdOrderQty > 0) {
$adultweOrderQty = 0;
$adultwdOrderQty = 1;
} else if ($adultweOrderQty < 2) {
$adultwdOrderQty = 0;
$adultweOrderQty = 0;
} else if ($adultwdOrderQty < 2) {
$adultwdOrderQty = 0;
$adultweOrderQty = 0;
}
$totalDiscount = ((12.00 * $adultweOrderQty) + (9.00 * $adultwdOrderQty));
$_SESSION['discount'] = $totalDiscount;
//} else {
// $_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
// }
}
//We also then need the fbmember promo code to prompt the
// 6 character member number and they need to get
// $4 off the $15 - ADULTWE
// $3 off the $10 - CHILDWE
// $1 off the $12 - ADULTWD
// $1 OFF THE $8 - CHILDWD
if (strtolower($promo->type) == 'duringfair'){
$_SESSION['promptForMemberNumber'] = true;
if (strlen($_REQUEST['memberNumber']) == 6){
$adultWeOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
if (strstr($oneProduct->code,'ADULTWE')){
$adultWeOrderQty = $oneProduct->qty;
}
}
}
$childWeOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
if (strstr($oneProduct->code,'CHILDWE')){
$childWeOrderQty = $oneProduct->qty;
}
}
}
$adultWdOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
if (strstr($oneProduct->code,'ADULTWD')){
$adultWdOrderQty = $oneProduct->qty;
}
}
}
$childWdOrderQty = 0;
foreach($_SESSION['products'] as $oneProduct){
if ($oneProduct->qty > 0){
if (strstr($oneProduct->code,'CHILDWD')){
$childWdOrderQty = $oneProduct->qty;
}
}
}
//exit('here.');
$product = new Product();
$totalDiscount = (4.00 * ($adultWeOrderQty));
$totalDiscount = $totalDiscount + (3.00 * ($childWeOrderQty));
$totalDiscount = $totalDiscount + (1.00 * ($adultWdOrderQty));
$totalDiscount = $totalDiscount + (1.00 * ($childWdOrderQty));
if ($totalDiscount > 20.00){
$totalDiscount = 20.00;
}
//$_SESSION['discount'] = $adultDiscount + $childDiscount;
$_SESSION['discount'] = $totalDiscount;
} else {
$_REQUEST['task'] = 'step1'; // force the membership number entry to continue.
}
}
// season1 used for the fair. maximum of 6 per order. 5000 per event.
// is for a $5 discount.
if (strtolower($promo->type) == 'season1'){
// First, verify there are not already 5000 in the transactions table.
$seasonPasses = 0;
$sql = "SELECT SUM(season_pass_qty) FROM TRANSACTIONS WHERE CACCT = ? and event_code = ?";
$mysqli = new mysqli('localhost', $_SESSION['data']['user'], $_SESSION['data']['pass'], $_SESSION['data']['db']);
if (mysqli_connect_errno()) {printf("Connect failed: %s\n", mysqli_connect_error());exit();}
$stmt = $mysqli->prepare($sql) or exit('Failed prepare: ' . $sql . '<br/>' . $mysqli->error) ;
$stmt->bind_param('ss',$_SESSION['account']->acct, $_SESSION['event']->code);
if (!$stmt->execute()){echo 'Invalid query: ' . $sql . '<br/><br/>';printf("Errormessage: %s\n", $mysqli->error);}
$stmt->bind_result($seasonPasses);
while ($stmt->fetch()) {
}
$stmt->close();
$mysqli->close();
//exit('seasonPasses: ' . $seasonPasses);
if ($seasonPasses < 5000){
// multiply the number of season passes in this order by 5 for the discount.
// if the number of season passes in this order is 6 or more, just use 30 (max of 6 passes).
// need to know the number of season passes in this order....
$product = new Product();
$seasonPassOrderQty = $product->countSeasonPassOrderQty();
//exit('seasonPassOrderQty:' . $seasonPassOrderQty);
$_SESSION['discount'] += (5.00 * $seasonPassOrderQty);
//if ($_SESSION['discount'] > 30.00){
// $_SESSION['discount'] = 30.00;
//}
//exit('discount:' . $_SESSION['discount']);
}
}
}//csn
}
}
$_SESSION['discount'] = 0 - $_SESSION['discount'];
$_SESSION['discount'] = sprintf ("%.2f", $_SESSION['discount']);
}
}
?>
|
TypeScript | UTF-8 | 3,084 | 2.765625 | 3 | [] | no_license | import { HSlider } from "./HSlider";
import { VSlider } from "./VSlider";
import { Nentry } from "./Nentry";
import { Button } from "./Button";
import { Checkbox } from "./Checkbox";
import { Knob } from "./Knob";
import { Menu } from "./Menu";
import { Radio } from "./Radio";
import { Led } from "./Led";
import { Numerical } from "./Numerical";
import { HBargraph } from "./HBargraph";
import { VBargraph } from "./VBargraph";
import { HGroup } from "./HGroup";
import { VGroup } from "./VGroup";
import { TGroup } from "./TGroup";
import { AbstractItem } from "./AbstractItem";
import { AbstractGroup } from "./AbstractGroup";
import { TFaustUIItem, TLayoutType, TFaustUI } from "../types";
export class Layout {
/**
* Get the rendering type of an item by parsing its metadata
*/
static predictType(item: TFaustUIItem): TLayoutType {
if (item.type === "vgroup"
|| item.type === "hgroup"
|| item.type === "tgroup"
|| item.type === "button"
|| item.type === "checkbox"
) return item.type;
if (item.type === "hbargraph" || item.type === "vbargraph") {
if (item.meta && item.meta.find(meta => meta.style && meta.style.startsWith("led"))) return "led";
if (item.meta && item.meta.find(meta => meta.style && meta.style.startsWith("numerical"))) return "numerical";
return item.type;
}
if (item.type === "hslider" || item.type === "nentry" || item.type === "vslider") {
if (item.meta && item.meta.find(meta => meta.style && meta.style.startsWith("knob"))) return "knob";
if (item.meta && item.meta.find(meta => meta.style && meta.style.startsWith("menu"))) return "menu";
if (item.meta && item.meta.find(meta => meta.style && meta.style.startsWith("radio"))) return "radio";
}
return item.type;
}
/**
* Get the Layout class constructor of an item
*/
static getItem(item: TFaustUIItem): AbstractItem | AbstractGroup {
const Ctor = {
hslider: HSlider,
vslider: VSlider,
nentry: Nentry,
button: Button,
checkbox: Checkbox,
knob: Knob,
menu: Menu,
radio: Radio,
led: Led,
numerical: Numerical,
hbargraph: HBargraph,
vbargraph: VBargraph,
hgroup: HGroup,
vgroup: VGroup,
tgroup: TGroup
};
const layoutType = this.predictType(item);
return new Ctor[layoutType](item as any);
}
static getItems(items: TFaustUIItem[]) {
return items.map((item) => {
if ("items" in item) item.items = this.getItems(item.items);
return this.getItem(item);
});
}
static calc(ui: TFaustUI) {
const rootGroup = new VGroup({ items: this.getItems(ui), type: "vgroup", label: "" }, true);
rootGroup.adjust();
rootGroup.expand(0, 0);
rootGroup.offset();
return rootGroup;
}
}
|
Java | UTF-8 | 1,837 | 2.078125 | 2 | [] | no_license | package ng.bayue.backend.controller.basedata;
import java.util.List;
import ng.bayue.backend.ao.basedata.StrategyAO;
import ng.bayue.backend.util.ResultMessage;
import ng.bayue.base.domain.StrategyDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.alibaba.fastjson.JSONArray;
@Controller
@RequestMapping({"/basedata/strategy"})
public class StrategyController {
@Autowired
private StrategyAO strategyAO;
@RequestMapping({"/list"})
public String listStrategy(Model model){
return "/backend/basedata/strategy/list";
}
@RequestMapping({"/strategyJsonData"})
@ResponseBody
public JSONArray jsonData(){
JSONArray arr = strategyAO.strategyJsonData();
return arr;
}
@RequestMapping({"/add"})
public String add(Model model){
List<StrategyDO> listParents = strategyAO.selectParents();
model.addAttribute("listParents", listParents);
return "/backend/basedata/strategy/add";
}
@RequestMapping({"/save"})
@ResponseBody
public ResultMessage save(StrategyDO strategyDO){
ResultMessage msg = strategyAO.addStrategy(strategyDO);
return msg;
}
@RequestMapping({"/edit"})
public String edit(Model model,Long id){
StrategyDO strategyDO = strategyAO.selectById(id);
List<StrategyDO> listParents = strategyAO.selectParents();
model.addAttribute("strategyDO", strategyDO);
model.addAttribute("listParents", listParents);
return "/backend/basedata/strategy/edit";
}
@RequestMapping({"/update"})
@ResponseBody
public ResultMessage update(StrategyDO strategyDO){
ResultMessage msg = strategyAO.updateStrategy(strategyDO);
return msg;
}
}
|
Python | UTF-8 | 279 | 3.921875 | 4 | [] | no_license | numbers = map(int, input("numbers").split())
even_count=0
odd_count = 0
for num in numbers:
if num % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even numbers in the list: ", even_count)
print("Odd numbers in the list: ", odd_count)
|
C++ | UTF-8 | 498 | 2.53125 | 3 | [] | no_license | #pragma once
#include <iostream>
#include <SFML\Graphics.hpp>
#include <SFML\Audio.hpp>
class Bomb : public sf::CircleShape
{
public:
Bomb();
~Bomb();
bool isFlying();
void stopFlight();
void shoot();
void detonate();
bool isDetonated();
void draw(sf::RenderWindow &, double);
void revertDetonation();
private:
bool detonated = false;
bool inFlight = false;
sf::Texture detonationTexture;
sf::Texture noTexture;
sf::SoundBuffer detonationBuffer;
sf::Sound detonationSound;
};
|
Python | UTF-8 | 432 | 2.578125 | 3 | [] | no_license | #!/usr/bin/python3
# -*- coding: utf-8 -*
class Categorie:
"""class for object Categorie"""
def __init__(self):
self.id_categorie = 0
self.nom = ""
class Product:
"""class for object Product"""
def __init__(self):
self.ean_produit = 0
self.nom = ""
self.marque = ""
self.grade = ""
self.subtitution = ""
self.url = ""
self.categorie = ""
|
Markdown | UTF-8 | 841 | 2.671875 | 3 | [] | no_license | # React Contact List
## About this app
This app uses React, Create-react-app and Auth0 to authenticate users. It's a phone list that stores user input into the MongoDB.
## Starting the app locally
Start by installing front and backend dependencies. While in this directory, run the following command:
```
yarn install
```
This should install node modules within the server and the client folder.
After both installations complete, run the following command in your terminal:
```
yarn start
```
If you have MongoDB installed on you computer and want to run the database:
```
Mongod
```
Your app should now be running on <http://localhost:3000>. The Express server should intercept any AJAX requests from the client.
## Deployment (Heroku)
This app is deployed on Heroku. Check it out: https://vast-badlands-48861.herokuapp.com/
|
Rust | UTF-8 | 11,614 | 2.921875 | 3 | [] | no_license | use std::fs::File;
use std::io::{self, Read};
#[derive(PartialEq, Debug)]
enum Side {
White,
Black,
}
#[derive(Debug)]
struct Board {
fen: String,
units: i32, // relative size of a square
//board: usize, // = 8*units
corner_radius: i32,
margin: i32,
border: i32,
font: String,
font_size: i32,
pieces: String,
color_light: String,
color_dark: String,
show_coords: bool,
flip: bool,
show_indicator: bool,
grayscale: bool,
}
impl Default for Board {
fn default() -> Self {
let fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1".to_owned();
let units: i32 = 64;
let corner_radius: i32 = 0;
let margin: i32 = 48;
let border: i32 = 2;
let font = "sans-serif".to_owned();
let font_size: i32 = 20;
let pieces = "merida".to_owned();
let color_light = "a48c62".to_owned();
let color_dark = "846c40".to_owned();
let show_coords = false;
let flip = false;
let show_indicator = false;
let grayscale = false;
Board {
fen,
units,
corner_radius,
margin,
border,
font,
font_size,
pieces,
color_light,
color_dark,
show_coords,
flip,
show_indicator,
grayscale,
}
}
}
/// Read a file and dump its contents to stdout
fn cat(filename: &str) -> io::Result<()> {
let mut contents = String::new();
let mut f = File::open(filename)?;
f.read_to_string(&mut contents)?;
print!("{}", contents);
Ok(())
}
impl Board {
fn side_to_move(&self) -> Option<Side> {
// find first space in FEN, then first char after that
// is the side to move. Check if that char is 'w'.
let side_char_index = self.fen.find(' ')? + 1;
match self.fen.chars().nth(side_char_index) {
Some('w') => Some(Side::White),
Some('b') => Some(Side::Black),
_ => None,
}
}
fn white_to_move(&self) -> bool {
self.side_to_move().unwrap() == Side::White
}
fn black_to_move(&self) -> bool {
self.side_to_move().unwrap() == Side::Black
}
fn put_svg_header(&self) {
let nouter = self.units * 8 + 2 * self.margin;
println!(
"<?xml version='1.0' encoding='utf-8'?>\n\
<svg viewBox='0 0 {} {}' style='background-color:#ffffff00' version='1.1' \
xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' \
xml:space='preserve' x='0px' y='0px' width='{}' height='{}'>",
nouter, nouter, nouter, nouter
);
println!("<!-- Creator: Savage, Copyright 2020 David S. Smith <david.smith@gmail.com> -->");
println!("<!-- FEN: {} -->", self.fen);
}
fn put_squares(&mut self) {
let nouter = 8 * self.units;
println!("<!-- DARK SQUARES -->");
if self.grayscale {
// cross hatched:
let d = self.units / 12;
println!(
"<pattern id='crosshatch' width='{}' height='{}' \
patternTransform='rotate(45 0 0)' patternUnits='userSpaceOnUse'>\n\
<line x1='0' y1='0' x2='0' y2='{}' style='stroke:#000; stroke-width:1' />\n \
</pattern>",
d, d, d
);
//" <rect x='0' y='0' width='{}' height='{}' fill='#fff' />\n "
println!("<pattern id='diagonalHatch' patternUnits='userSpaceOnUse' width='4' height='4'>\n \
<path d='M-1,1 l2,-2 M0,4 l4,-4 M3,5 l2,-2'\n \
style='stroke:black; stroke-width:1' />\n \
</pattern>");
println!(
"<rect x='{}' y='{}' width='{}' height='{}' fill='url(#crosshatch)' />",
self.margin, self.margin, nouter, nouter
);
self.color_light = "fff".to_owned();
} else {
// shaded
println!(
"<rect x='{}' y='{}' width='{}' height='{}' fill='#{}' />",
self.margin, self.margin, nouter, nouter, self.color_dark
);
}
println!("<!-- LIGHT SQUARES -->");
println!("<pattern id='checkerboard' x='{}' y='{}' width='{}' height='{}' patternUnits='userSpaceOnUse'>",
self.margin, self.margin, 2*self.units, 2*self.units);
println!(
" <rect x='0' y='0' width='{}' height='{}' style='fill:#{};' />",
self.units, self.units, self.color_light
);
println!(
" <rect x='{}' y='{}' width='{}' height='{}' style='fill:#{};' />",
self.units, self.units, self.units, self.units, self.color_light
);
println!("</pattern>");
println!(
"<rect x='{}' y='{}' width='{}' height='{}' fill='url(#checkerboard)' />",
self.margin, self.margin, nouter, nouter
);
}
fn put_border(&self) {
let r = self.corner_radius;
let t = 0i32; //units / 32; // border gap thickness
println!("<!-- BORDER -->");
let mut n = self.margin - t;
let board = 8 * self.units;
let mut nouter = board + 2 * t;
println!(
"<rect x='{}' y='{}' width='{}' height='{}' fill='none' \
stroke-width='{}' stroke-location='outside' stroke='#fff' rx='{}' ry='{}' />",
n, n, nouter, nouter, t, r, r
);
if self.border == 1 {
n -= self.border;
nouter += 2 * self.border;
} else {
n -= self.border / 2;
nouter += self.border;
}
println!(
"<rect x='{}' y='{}' width='{}' height='{}' fill='none' \
stroke-width='{}' stroke-location='outside' stroke='#000' rx='{}' ry='{}' />",
n, n, nouter, nouter, self.border, r, r
);
}
fn put_piece(&self, c: char, x: i32, y: i32) -> io::Result<()> {
println!(
"<svg x='{}' y='{}' width='{}' height='{}'>",
x, y, self.units, self.units
);
if c.is_uppercase() {
let path = format!("svg/{}/w{}.svg", self.pieces, c);
cat(&path)?;
} else {
let path = format!("svg/{}/b{}.svg", self.pieces, c);
cat(&path)?;
}
println!("</svg>");
Ok(())
}
fn put_move_indicator(&self) {
let cx = self.units * 8 + 3 * self.margin / 2;
let mut cy = self.margin + self.units / 2;
let mut dy: i32 = self.units / 5;
let dx: i32 = self.units / 5;
let stroke = if self.white_to_move() { 2 } else { 1 };
if (self.white_to_move() && !self.flip) || (self.black_to_move() && self.flip) {
cy += 7 * self.units;
dy = -dy;
}
let fill = if self.white_to_move() { "fff" } else { "000" };
println!("<path d='M{} {} l{} {} l{} {} q{} {} {} {}' stroke='black' stroke-width='{}' fill='#{}' />",
cx-dx, cy-dy, dx, 2*dy, dx, -2*dy, -dx, dy, -2*dx, 0, stroke, fill);
}
fn put_coords(&self) {
let files: Vec<char> = vec!['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
let rank_y0 = self.margin + self.units / 2 + self.font_size / 2;
let rank_x0 = self.margin - self.font_size - self.border;
let file_x0 = self.margin + self.units / 2 - self.font_size / 4;
let file_y0 = self.margin + self.units * 8 + self.border + self.font_size;
println!("<svg>");
println!(
"<style> .small {{ font: normal {}px {}; }} </style>",
self.font_size, self.font
);
for file in 0..8 {
let i = if self.flip {
7 - file as usize
} else {
file as usize
};
println!(
"<text x=\"{}\" y=\"{}\" fill=\"#000\" class=\"small\">{}</text>",
file_x0 + self.units * file,
file_y0,
files[i]
);
}
for rank in 0..8 {
println!(
"<text x=\"{}\" y=\"{}\" fill=\"#000\" class=\"small\">{}</text>",
rank_x0,
rank * self.units + rank_y0,
if self.flip { rank + 1 } else { 8 - rank }
);
}
println!("</svg>");
}
fn build_board(&mut self) {
let _board = 8 * self.units;
let step: i32 = if self.flip { -self.units } else { self.units };
self.put_svg_header();
self.put_squares();
self.put_border();
if self.show_coords {
self.put_coords();
}
let mut x: i32 = self.margin;
let mut y: i32 = self.margin;
if self.flip {
x += 7 * self.units;
y += 7 * self.units;
}
print!("<!-- PIECES -->");
for f in self.fen.chars() {
if f.is_alphabetic() {
self.put_piece(f, x, y).unwrap();
x += step;
} else if f.is_numeric() {
x += step * f.to_digit(10).unwrap() as i32;
} else if f == '/' {
x = if self.flip {
7 * self.units + self.margin
} else {
self.margin
};
y += step;
} else if f == ' ' {
break;
} else {
panic!("Weird FEN received: {}", self.fen);
}
}
if self.show_indicator {
self.put_move_indicator();
}
println!("</svg>");
}
}
fn main() -> io::Result<()> {
use argparse::{ArgumentParser, Store, StoreTrue};
let mut b = Board::default();
let mut output = String::new();
{
let mut ap = ArgumentParser::new();
ap.set_description("SVG chess board creator");
ap.refer(&mut b.border)
.add_option(&["-b", "--border"], Store, "border width");
ap.refer(&mut b.show_coords)
.add_option(&["-c", "--coords"], StoreTrue, "display coordinates");
ap.refer(&mut b.color_dark)
.add_option(&["-d", "--color-dark"], Store, "RGB hex color of dark squares");
ap.refer(&mut b.font)
.add_option(&["-F", "--font"], Store, "font face");
ap.refer(&mut b.font_size)
.add_option(&["-f", "--font-size"], Store, "font size (pts)");
ap.refer(&mut b.grayscale)
.add_option(&["-g", "--grayscale"], StoreTrue, "grayscale");
ap.refer(&mut b.show_indicator)
.add_option(&["-i", "--indicator"], StoreTrue, "show move indicator");
ap.refer(&mut b.color_light)
.add_option(&["-l", "--color-light"], Store, "RGB hex color of light squares");
ap.refer(&mut b.margin)
.add_option(&["-m", "--margin"], Store, "margin width");
ap.refer(&mut b.pieces)
.add_option(&["-p", "--pieces"], Store, "pieces theme");
ap.refer(&mut b.flip)
.add_option(&["-r", "--flip"], StoreTrue, "flip board to black side down");
ap.refer(&mut b.units)
.add_option(&["-s", "--units"], Store, "length units, image scale");
ap.refer(&mut b.fen)
.add_argument("FEN", Store, "FEN board position (default: start position)");
ap.refer(&mut output)
.add_argument("output", Store, "output SVG file (default: stdout)");
ap.parse_args_or_exit();
}
//TODO: redirect output to file
b.build_board();
Ok(())
}
|
Markdown | UTF-8 | 4,951 | 3.0625 | 3 | [] | no_license | ###### Banyan
# Asian countries are at last abandoning zero-covid strategies
##### Despite the risks, they are right to do so

> Oct 7th 2021
FOR MUCH of the pandemic, many of the wealthier countries and territories in the Asia-Pacific region have pursued a “zero-covid” strategy, whether explicit or not. The success of the approach, involving closed borders, quarantine hotels and severe lockdowns, has generally been spectacular. Hong Kong has had no locally transmitted infections since mid-August. In the pandemic’s first year, Taiwan officially counted about a dozen deaths from covid-19. New Zealand is the standout zero-covid state, with just 27 deaths. Indeed, because fewer people died of things like flu or road accidents in lockdown, both countries recorded fewer overall deaths than in a normal year, according to The Economist’s excess-deaths tracker.
Yet those with a good first act are struggling in the second. The coronavirus, especially the highly infectious Delta variant, usually has the last word. In Taiwan cases leapt in May, and the official death toll has risen to nearly 850. In Singapore daily infections have risen from low double digits in early July to more than 3,000 now. Australia, with some 2,000-odd daily cases, is following a similar trajectory. Even in New Zealand, now with double-digit daily cases, the dam has broken.
“The Delta variant is already out there. It’s too late to stop it,” says Tikki Pangestu, the WHO’s former head of research policy, now at the National University of Singapore. It is therefore appropriate for countries to abandon zero-covid strategies. Singapore was the first. In June its government said it was time to live with the virus. Singapore’s vaccination programme is Asia’s most successful, with 82% of the population fully jabbed. That boosts the case for reopening.
In late August Scott Morrison, Australia’s prime minister, announced the end of his country’s “covid zero” approach. Cases would be allowed to rise, provided that hospitals could cope with them. Once vaccination rates top 80%, perhaps by the end of the year, most restrictions would be eased. “It is time”, as Mr Morrison puts it, “to give Australians their lives back.”
Vietnam ditched its zero-covid strategy last week. This week came New Zealand’s capitulation. Though the prime minister, Jacinda Ardern, won praise for her sure handling of the pandemic, the mood has soured. On October 2nd Auckland residents defied stay-at-home orders to protest against restrictions. Two days later Ms Ardern acknowledged, “The return to zero is incredibly difficult.” She announced a “new way of doing things” that included lifting lockdown restrictions.
It remains unclear what abandonment means in practice. In New Zealand less than half the population is fully jabbed. The vaccination programme is about to go into overdrive. Yet lockdowns will probably remain on the menu, and open borders are still a long way off. Ms Ardern seems to want it both ways, promising to continue a “very aggressive approach”.
Likewise, Australia’s ending of zero covid still leaves the full reopening of borders a distant prospect. The first goal, from next month, is to allow all citizens and permanent residents back in. Many of them, astonishingly, have struggled for 18 months to get home. The idea is to let vaccinated returnees quarantine at home rather than force them into hotels. Even for such small moves, Australians deliberate every detail. The country is a long way from accepting risk and getting on with living with the virus.
As for Singapore, jitters are growing with rising cases. A rare public petition calls for mandatory quarantine for all overseas travellers. The government has reimposed local restrictions, including home-based schooling for children. One innovation, “vaccinated travel lanes” allowing quarantine-free travel with certain countries, is likely to be expanded only slowly from the current jurisdictions of Germany and Brunei.
Yet if abandonment looks like no strategy at all, then consider the alternative. Hong Kong has stuck doggedly with zero covid. A harsh, mediocre government whose public-health messaging either goes unheard or is little trusted has meant a slow vaccination drive. Less than 15% of those over 80 have had at least one jab. Because the virus is not present (for now) in Hong Kong, no level of herd immunity has been bestowed by past infections there or in the other zero-covid countries. And the low risk of infection dissuades people from getting their shots. Hong Kong’s approach condemns the territory to endless limbo. Abandonment of zero covid—for all the inevitable hesitations and temporary reversals—is the way to go.
Dig deeper
All our stories relating to the pandemic and the vaccines can be found on our . You can also find trackers showing , and the virus’s spread across .
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.