hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
c7e6dd2366a172288c3918b66ff432ec716ed190
10,596
py
Python
handlers.py
hulingfeng211/sshwall
5369fd76b9f3e1540349bca61da86b11b22f536e
[ "MIT" ]
1
2018-02-18T16:20:30.000Z
2018-02-18T16:20:30.000Z
handlers.py
hulingfeng211/sshwall
5369fd76b9f3e1540349bca61da86b11b22f536e
[ "MIT" ]
null
null
null
handlers.py
hulingfeng211/sshwall
5369fd76b9f3e1540349bca61da86b11b22f536e
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import uuid import tornado.websocket from daemon import Bridge from data import ClientData from utils import check_ip, check_port from tornado.log import gen_log from tornado.gen import coroutine from tornado.web import escape,authenticated from models import * class BaseHandler(tornado.web.RequestHandler): @property def db(self): return self.application.db #@authenticated def prepare(self,*args,**kwargs): pass def get_current_user(self): user_id = self.get_secure_cookie("user_id") gen_log.info(user_id) if not user_id: return None user= self.db.query(User).get(int(user_id)) return user def send_client(self,data,status_code=0): self.set_header('content-type','application/json') self.write(escape.json_encode({'data':data,'status':status_code})) def has_login(self): return current_user!=None class UserServerHandler(BaseHandler): def post(self,*args,**kwargs): gen_log.info(self.request.body) user_id=self.get_argument('userid') server_id=self.get_argument('serverid') is_add=self.get_argument('is_add') if all([user_id,server_id,is_add]): user=self.db.query(User).get(int(user_id)) server=self.db.query(Server).get(int(server_id)) #gen_log.info(is_add) if is_add=='false': #gen_log.info('remove') user.servers.remove(server) else: user.servers.append(server) self.db.commit() self.send_client('ok') else: self.send_client('error',status_code=1) class UserHandler(BaseHandler): def get(self,*args,**kwargs): groups=self.db.query(Group).all() servers=self.db.query(Server).all() users=self.db.query(User).filter(User.is_super==False).all() self.render('user.mgt.html',groups=groups,servers=servers,users=users) def post(self,*args,**kwargs): userid=self.get_argument('id',None) servers=self.get_arguments('server') username=self.get_argument('username',None) password=self.get_argument('password',None) if all([username,password]): if userid: user=self.db.query(User).get(int(userid)) user.username=username user.password=password else: user=User(username=username,password=password) if servers: server_list=self.db.query(Server).filter(Server.id.in_([int(server_id) for server_id in servers])).all() user.servers=server_list self.db.add(user) self.db.commit() self.redirect(self.reverse_url('user')) else: self.flush('username and password are not allow empty.') def delete(self,*args,**kwargs): user_id=self.get_argument("userid",None) if user_id: user=self.db.query(User).get(int(user_id)) self.db.delete(user) self.db.commit() self.send_client('ok') else: self.send_client('error',status_code=1) class GroupHandler(BaseHandler): def get(self,*args,**kwargs): groups=self.db.query(Group).all() self.render('group.mgt.html',groups=groups) def post(self,*args,**kwargs): group_name=self.get_argument('groupname',None) if group_name: group=Group(name=group_name) self.db.add(group) self.db.commit() self.redirect(self.reverse_url('group')) def delete(self,*args,**kwargs): id=self.get_argument('id',None) if id: group=self.db.query(Group).get(int(id)) self.db.delete(group) self.db.commit() #self.redirect(self.reverse_url('group')) self.write('OK') class IndexHandler(BaseHandler): @coroutine def get(self): groups=self.db.query(Group).all() group_id=self.get_argument('group',None) if self.current_user is None: self.render('index.html',server_list=[],groups=groups) return if group_id: if self.current_user.is_super: servers=self.db.query(Server).filter(Server.group_id==int(group_id)) else: servers=[server for server in self.current_user.servers if server.group_id==int(group_id)] else: if self.current_user.is_super: servers=self.db.query(Server).all() else: servers=self.current_user.servers self.render("index.html",server_list=servers,groups=groups) class TerminalHandler(BaseHandler): def get(self,*args,**kwargs): id=self.get_argument('id',-1) server=self.db.query(Server).get(int(id)) #get_server(id) if server: self.render('server.html',server=server) else: self.write('Server {} is not exists'.format(id)); class ServerHandler(BaseHandler): def get(self,*args,**kwargs): id=self.get_argument('id',-1) server=self.db.query(Server).get(int(id)) #get_server(id) if server: self.write(escape.json_encode({ "id":server.id, "host":server.host, "port":server.port, "username":server.username, "secret":server.secret, "remark":server.remark, "name":server.name })) #self.write(escape.json_encode(server)) else: self.write({}) def delete(self,*args,**kwargs): server_id=self.get_argument('server',None) if server_id: server=self.db.query(Server).get(int(server_id)) self.db.delete(server) self.db.commit() self.write('ok') def post(self,*args,**kwargs): gen_log.info(self.request.body); server_id=self.get_argument('id',None) name=self.get_argument('name',None) host=self.get_argument('host',None) port=self.get_argument('port',None) username=self.get_argument('username',None) password=self.get_argument('password',None) group_id=self.get_argument('group',None) remark=self.get_argument('remark',None) if all([name,host,port,username,password]): if server_id:#do update #server=get_server(server_id) #server_list.remove(server) #server=Server(server_id,name,host,int(port),username,password,remark) #server_list.append(server) server=self.db.query(Server).get(int(server_id)) server.host=host server.port=port server.username=username server.secret=password if group_id: group=self.db.query(Group).get(int(group_id)) server.group=group self.db.commit() else: if group_id: group=self.db.query(Group).get(int(group_id)) server=Server(name=name,host=host,port=int(port),username=username,secret=password,remark=remark) server.group=group self.db.add(server) self.db.commit() #server=Server(uuid.uuid1().hex,name,host,int(port),username,password,remark) #server_list.append(server) #save data to pickle #save_server_list() else: self.write('Some argument are not allow empty,please check.!!') self.redirect(self.reverse_url('home')) class WSHandler(tornado.websocket.WebSocketHandler): clients = dict() def initialize(self): self.command_history=[] def get_client(self): return self.clients.get(self._id(), None) def put_client(self): bridge = Bridge(self) self.clients[self._id()] = bridge def remove_client(self): bridge = self.get_client() if bridge: bridge.destroy() del self.clients[self._id()] @staticmethod def _check_init_param(data): return 'server_id' in data #check_ip(data["server_id"]) and check_port(data["port"]) @staticmethod def _is_init_data(data): return data.get_type() == 'init' def _id(self): return id(self) def open(self): self.put_client() def on_message(self, message): bridge = self.get_client() gen_log.info(message) client_data = ClientData(message) if self._is_init_data(client_data): if self._check_init_param(client_data.data): server_id=client_data.data['server_id'] db=self.application.db user_id=self.get_secure_cookie('user_id') if user_id: user=db.query(User).get(int(user_id)) # todo if not user.is_super: servers=[server for server in user.servers if server.id==int(server_id)] assert len(servers)==1 bridge.open(client_data.data,servers[0]) else: server=db.query(Server).get(int(server_id)) bridge.open(client_data.data,server) gen_log.info('connection established from: %s' % self._id()) else: gen_log.warning('user is not valid') self.remove_client() else: self.remove_client() gen_log.warning('init param invalid: %s' % client_data.data) else: if bridge: self.command_history.append(client_data.data) if self.command_history[-1]=='\r': commmand=''.join(self.command_history) db=self.application.db server=db.query(Server).get(int(client_data.target))#get_server(client_data.target) gen_log.info('server {} run command {}'.format(server.host,commmand)) self.command_history.clear() bridge.trans_forward(client_data.data) def on_close(self): self.remove_client() gen_log.info('client close the connection: %s' % self._id())
35.086093
120
0.570781
0ee1c5a39901c5ba0d8a45d2524be4075d2be9b5
543
tsx
TypeScript
src/app/App.tsx
alicepetzinger/bergfest-music
781b4906d0b4ef61a67651e37ae73b2169a708f2
[ "MIT" ]
null
null
null
src/app/App.tsx
alicepetzinger/bergfest-music
781b4906d0b4ef61a67651e37ae73b2169a708f2
[ "MIT" ]
null
null
null
src/app/App.tsx
alicepetzinger/bergfest-music
781b4906d0b4ef61a67651e37ae73b2169a708f2
[ "MIT" ]
null
null
null
import React from 'react'; import styles from './App.module.css'; import Title from './Components/Title/Title'; function App(): JSX.Element { return ( <main className={styles.container}> <Title /> <h2 className={styles.h2}>Entry</h2> <div className={styles.card} /> <form className={styles.form}> <input type="text" placeholder="Hi, call me..." /> <input type="text" placeholder="...and my lastname" /> <input type="submit" /> </div> </form> </main> ); } export default App;
24.681818
62
0.598527
c8148a64323a597db9b0a0d10c8787bfb2067027
7,810
rs
Rust
rust/server/auth/src/lib.rs
tlowerison/tilings
0bd477da4e811aa7de39b58f90a3e86323bd6b23
[ "MIT" ]
1
2021-09-10T04:47:17.000Z
2021-09-10T04:47:17.000Z
rust/server/auth/src/lib.rs
tlowerison/tilings
0bd477da4e811aa7de39b58f90a3e86323bd6b23
[ "MIT" ]
null
null
null
rust/server/auth/src/lib.rs
tlowerison/tilings
0bd477da4e811aa7de39b58f90a3e86323bd6b23
[ "MIT" ]
null
null
null
pub const COOKIE_KEY: &'static str = "tilings_account_id"; #[cfg(not(target_arch = "wasm32"))] mod auth { use super::*; use argon2; use base64; use db_conn::DbConn; use diesel::{self, PgConnection, prelude::*}; use lazy_static::lazy_static; use models::*; use r2d2_redis::{r2d2::Pool, redis, RedisConnectionManager}; use result::{APIKeyError, Error, Result}; use rocket::{ http::Status, request::{Outcome, Request, FromRequest}, State, }; use schema::accountrole; use serde::{Deserialize, Serialize}; use std::{ collections::hash_set::HashSet, ops::DerefMut, }; pub const AUTHORIZATION_HEADER_KEY: &'static str = "Authorization"; pub const SECRET: &'static str = "JWT_TOKEN"; pub const TOKEN_DURATION_IN_SECONDS: i64 = 10 * 365 * 24 * 60 * 60; lazy_static! { static ref AUTHORIZATION_HEADER_VALUE_PREFIX_END_INDEX: usize = "Bearer ".len(); } pub struct AuthAccount { pub id: i32, account: Option<Account>, roles: Option<HashSet<RoleEnum>>, } impl<'a> AuthAccount { pub fn new(id: i32) -> AuthAccount { AuthAccount { id, account: None, roles: None } } pub fn allowed(&mut self, allowed_roles: &HashSet<RoleEnum>, conn: &PgConnection) -> Result<bool> { self.pull_roles(conn)?; if AuthAccount::has_intersection(self.roles.as_ref().unwrap(), allowed_roles) && self.verified(conn)? { Ok(true) } else { Err(Error::Unauthorized) } } pub fn can_edit(&mut self, owned: Owned, id: i32, conn: &PgConnection) -> Result<bool> { if let Ok(_) = self.allowed(&ALLOWED_ADMIN_ROLES, conn) { return Ok(true) } self.allowed(&ALLOWED_EDITOR_ROLES, conn).or(Err(Error::Unauthorized))?; let owner_id = owned.get_owner_id(id, conn)?; if let Some(owner_id) = owner_id { if owner_id == self.id { return Ok(true) } } Err(Error::Unauthorized) } pub fn get_account(&'a mut self, conn: &PgConnection) -> Result<&'a Account> { if let None = self.account { self.account = Some(Account::find(self.id, conn)?); } Ok(self.account.as_ref().unwrap()) } fn has_intersection(roles: &HashSet<RoleEnum>, allowed_roles: &HashSet<RoleEnum>) -> bool { for role in roles.iter() { if allowed_roles.contains(role) { return true } } return false } fn pull_roles(&mut self, conn: &PgConnection) -> Result<()> { if let Some(_) = &self.roles { return Ok(()) } let account_roles = accountrole::table.filter(accountrole::account_id.eq(&self.id)) .load(conn)?; self.roles = Some(account_roles .into_iter() .filter_map(AccountRole::as_role_enum) .collect() ); Ok(()) } fn verified(&mut self, conn: &PgConnection) -> Result<bool> { self.get_account(conn)?; if self.account.as_ref().unwrap().verified { Ok(true) } else { Err(Error::Unauthorized) } } } #[derive(Debug, Deserialize, Serialize)] pub struct APIKeyClaims { pub email: String, pub api_key: String, } impl APIKeyClaims { fn decode(encoded: &str) -> Result<APIKeyClaims> { let decoded = base64::decode(encoded).or(Err(Error::APIKey(APIKeyError::Invalid)))?; let decoded = std::str::from_utf8(decoded.as_slice()).or(Err(Error::APIKey(APIKeyError::Invalid)))?; serde_json::from_str::<APIKeyClaims>(decoded) .or(Err(Error::APIKey(APIKeyError::Invalid))) } pub fn encode(self) -> Result<String> { let serialized = serde_json::to_string(&self).or(Err(Error::Default))?; Ok(base64::encode(String::from(serialized))) } } #[rocket::async_trait] impl<'r> FromRequest<'r> for AuthAccount { type Error = Error; async fn from_request(req: &'r Request<'_>) -> Outcome<Self, Self::Error> { match req.headers().get_one(AUTHORIZATION_HEADER_KEY) { None => match req.cookies().get_private(COOKIE_KEY) { Some(cookie) => { let redis_pool = match req.guard::<&State<Pool<RedisConnectionManager>>>().await { Outcome::Success(redis_pool) => redis_pool, _ => return Outcome::Failure((Status::InternalServerError, Error::Default)), }; let mut redis_conn = match redis_pool.get() { Ok(redis_conn) => redis_conn, Err(err) => return Outcome::Failure((Status::InternalServerError, Error::from(err))), }; let cookie_key = cookie.value(); let cookie_value = match redis::cmd("GET") .arg(cookie_key) .query::<String>(redis_conn.deref_mut()) { Ok(cookie_value) => cookie_value, Err(err) => return Outcome::Failure((Status::InternalServerError, Error::from(err))), }; let account_id = cookie_value.parse::<i32>(); return match account_id { Ok(account_id) => Outcome::Success(AuthAccount::new(account_id)), _ => APIKeyError::Invalid.outcome(), } }, None => APIKeyError::Missing.outcome(), }, Some(key) => { let token = key .chars() .into_iter() .skip(*AUTHORIZATION_HEADER_VALUE_PREFIX_END_INDEX) .collect::<String>(); let api_key_claims = match APIKeyClaims::decode(&token) { Ok(api_key_claims) => api_key_claims, Err(_) => return APIKeyError::Invalid.outcome(), }; let email = api_key_claims.email; let api_key_content = api_key_claims.api_key; let db = match req.guard::<DbConn>().await { Outcome::Success(db) => db, _ => return Outcome::Failure((Status::InternalServerError, Error::Default)), }; let api_key = match db.run(move |conn| APIKey::find_by_email(email, conn)).await { Ok(api_key) => api_key, _ => return APIKeyError::Invalid.outcome(), }; let is_match = match argon2::verify_encoded(&api_key.content, api_key_content.as_bytes()) { Ok(is_match) => is_match, _ => return Outcome::Failure((Status::InternalServerError, Error::Default)), }; if is_match { Outcome::Success(AuthAccount::new(api_key.account_id)) } else { APIKeyError::Invalid.outcome() } }, } } } } #[cfg(not(target_arch = "wasm32"))] pub use self::auth::*;
37.729469
115
0.498976
571363e613aa13457f2955bb5f578222ad441927
1,093
h
C
HandScapeSDK.framework/Versions/A/Headers/UITouch+Synthesize.h
HandScapeIncDrive/HSFLballPod
be027ae76f455ae6c2b0d0ed4d9b0128224de3eb
[ "MIT" ]
null
null
null
HandScapeSDK.framework/Versions/A/Headers/UITouch+Synthesize.h
HandScapeIncDrive/HSFLballPod
be027ae76f455ae6c2b0d0ed4d9b0128224de3eb
[ "MIT" ]
null
null
null
HandScapeSDK.framework/Versions/A/Headers/UITouch+Synthesize.h
HandScapeIncDrive/HSFLballPod
be027ae76f455ae6c2b0d0ed4d9b0128224de3eb
[ "MIT" ]
null
null
null
// // TouchSynthesis.h // SelfTesting // // Created by Matt Gallagher on 23/11/08. // Copyright 2008 Matt Gallagher. All rights reserved. // // Permission is given to use this source code file, free of charge, in any // project, commercial or otherwise, entirely at your risk, with the condition // that any redistribution (in part or whole) of source code must retain // this copyright and permission notice. Attribution in compiled projects is // appreciated but not required. // #import <UIKit/UIKit.h> @class HSCTouch; // UITouch (Synthesize) // // Category to allow creation and modification of UITouch objects. // @interface UITouch (Synthesize) #ifndef DEBUG_NO_UITOUCH_HSSWD_44 - (id) initWithHSCTouch: (HSCTouch*) hscTouch; - (id) initInView: (UIView*) view; - (void) setPhase: (UITouchPhase) phase; - (void) setLocationInWindow: (CGPoint) location; #endif @end // UIEvent (Synthesize) // // A category to allow creation of a touch event. // @interface UIEvent (Synthesize) #ifndef DEBUG_NO_UITOUCH_HSSWD_44 - (id)initWithTouch: (UITouch*) touch; #endif @end
20.622642
79
0.729186
293a9e78383bfca880dd15e10e4a4690c4c7484a
1,608
kt
Kotlin
workflows/src/main/kotlin/com/sorda/flows/tokens/IssueSordaTokens.kt
fowlerrr/Sorda
b9fa92e8f15217c680ed44f490c2a0399e060f5f
[ "Apache-2.0" ]
null
null
null
workflows/src/main/kotlin/com/sorda/flows/tokens/IssueSordaTokens.kt
fowlerrr/Sorda
b9fa92e8f15217c680ed44f490c2a0399e060f5f
[ "Apache-2.0" ]
7
2021-03-10T06:34:29.000Z
2022-03-02T07:14:02.000Z
workflows/src/main/kotlin/com/sorda/flows/tokens/IssueSordaTokens.kt
fowlerrr/Sorda
b9fa92e8f15217c680ed44f490c2a0399e060f5f
[ "Apache-2.0" ]
1
2020-08-17T08:56:19.000Z
2020-08-17T08:56:19.000Z
package com.sorda.flows.tokens import co.paralleluniverse.fibers.Suspendable import com.r3.corda.lib.tokens.contracts.utilities.heldBy import com.r3.corda.lib.tokens.contracts.utilities.issuedBy import com.r3.corda.lib.tokens.contracts.utilities.of import com.r3.corda.lib.tokens.workflows.flows.rpc.IssueTokens import net.corda.core.flows.FinalityFlow import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.flows.StartableByRPC import net.corda.core.identity.Party import net.corda.core.transactions.SignedTransaction import net.corda.core.utilities.ProgressTracker import utils.SordaTokenType /** * This flow leverages Tokens-SDK in order to issue SORDA Tokens to an existing account. * * @property accountName the Name of the account * @property quantity the quantity of the SORDA Tokens to be issued * */ @StartableByRPC @InitiatingFlow class IssueSordaTokens ( private val quantity: Double ) : FlowLogic<SignedTransaction>() { override val progressTracker: ProgressTracker = IssueSordaTokens.tracker() companion object { object ISSUE : ProgressTracker.Step("Issue Token") object COMPLETE : ProgressTracker.Step("Complete Token Issuance") { override fun childProgressTracker() = FinalityFlow.tracker() } fun tracker() = ProgressTracker(ISSUE, COMPLETE) } @Suspendable override fun call() : SignedTransaction { val tokens = quantity of SordaTokenType issuedBy ourIdentity heldBy ourIdentity return subFlow(IssueTokens(listOf(tokens), emptyList())) } }
33.5
88
0.764303
3fb948761677fc2b752126fb1195528781ad1cca
22,619
sql
SQL
citys.sql
yhif/Provinces_citys_areas
b76eb2f9e8cf8f1125a8cdae349b9d74364074b1
[ "Apache-2.0" ]
16
2018-11-01T07:48:48.000Z
2021-03-15T15:48:21.000Z
citys.sql
yhif/Provinces_citys_areas
b76eb2f9e8cf8f1125a8cdae349b9d74364074b1
[ "Apache-2.0" ]
null
null
null
citys.sql
yhif/Provinces_citys_areas
b76eb2f9e8cf8f1125a8cdae349b9d74364074b1
[ "Apache-2.0" ]
8
2019-02-02T06:35:23.000Z
2021-03-15T15:48:11.000Z
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.6.20) # Database: dhweb # Generation Time: 2016-05-25 07:26:38 +0000 # ************************************************************ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; # Dump of table citys # ------------------------------------------------------------ DROP TABLE IF EXISTS `citys`; CREATE TABLE `citys` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `city_name` varchar(64) NOT NULL DEFAULT '' COMMENT '城市名称', `alias` varchar(64) NOT NULL DEFAULT '', `province_id` int(11) NOT NULL COMMENT '省份ID', `pinyin` varchar(64) NOT NULL DEFAULT '', `abbr` varchar(32) NOT NULL DEFAULT '', `zip` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; LOCK TABLES `citys` WRITE; /*!40000 ALTER TABLE `citys` DISABLE KEYS */; INSERT INTO `citys` (`id`, `city_name`, `alias`, `province_id`, `pinyin`, `abbr`, `zip`) VALUES (110100,'北京市','北京',110000,'BeiJing','BJ',100000), (120100,'天津市','天津',120000,'TianJin','TJ',300000), (310100,'上海市','上海',310000,'ShangHai','SH',200000), (500100,'重庆市','重庆',500000,'ZhongQing','ZQ',400000), (820100,'澳门','澳门',820000,'Macau','Mac',0), (130100,'石家庄市','石家庄',130000,'ShiJiaZhuang','SJZ',50000), (130200,'唐山市','唐山',130000,'TangShan','TS',63000), (130300,'秦皇岛市','秦皇岛',130000,'QinHuangDao','QHD',66000), (130400,'邯郸市','邯郸',130000,'HanDan','HD',56000), (130500,'邢台市','邢台',130000,'XingTai','XT',54000), (130600,'保定市','保定',130000,'BaoDing','BD',71000), (130700,'张家口市','张家口',130000,'ZhangJiaKou','ZJK',75000), (130800,'承德市','承德',130000,'ChengDe','CD',67000), (130900,'沧州市','沧州',130000,'CangZhou','CZ',61000), (131000,'廊坊市','廊坊',130000,'LangFang','LF',65000), (131100,'衡水市','衡水',130000,'HengShui','HS',53000), (140100,'太原市','太原',140000,'TaiYuan','TY',30000), (140200,'大同市','大同',140000,'DaTong','DT',37000), (140300,'阳泉市','阳泉',140000,'YangQuan','YQ',45000), (140400,'长治市','长治',140000,'ZhangZhi','ZZ',46000), (140500,'晋城市','晋城',140000,'JinCheng','JC',48000), (140600,'朔州市','朔州',140000,'ShuoZhou','SZ',36000), (140700,'晋中市','晋中',140000,'JinZhong','JZ',30600), (140800,'运城市','运城',140000,'YunCheng','YC',44000), (140900,'忻州市','忻州',140000,'XinZhou','XZ',34000), (141000,'临汾市','临汾',140000,'LinFen','LF',41000), (141100,'吕梁市','吕梁',140000,'LvLiang','LL',33000), (150100,'呼和浩特市','呼和浩特',150000,'HuHeHaoTe','HHHT',10000), (150200,'包头市','包头',150000,'BaoTou','BT',14000), (150300,'乌海市','乌海',150000,'WuHai','WH',16000), (150400,'赤峰市','赤峰',150000,'ChiFeng','CF',24000), (150500,'通辽市','通辽',150000,'TongLiao','TL',28000), (150600,'鄂尔多斯市','鄂尔多斯',150000,'EErDuoSi','EEDS',17004), (150700,'呼伦贝尔市','呼伦贝尔',150000,'HuLunBeiEr','HLBE',21008), (150800,'巴彦淖尔市','巴彦淖尔',150000,'BaYanNaoEr','BYNE',15001), (150900,'乌兰察布市','乌兰察布',150000,'WuLanChaBu','WLCB',12000), (152200,'兴安盟','兴安盟',150000,'XingAnMeng','XAM',137401), (152500,'锡林郭勒盟','锡林郭勒盟',150000,'XiLinGuoLeiMeng','XLGLM',26021), (152900,'阿拉善盟','阿拉善盟',150000,'ALaShanMeng','ALSM',750306), (210100,'沈阳市','沈阳',210000,'ChenYang','CY',110000), (210200,'大连市','大连',210000,'DaLian','DL',116000), (210300,'鞍山市','鞍山',210000,'AnShan','AS',114000), (210400,'抚顺市','抚顺',210000,'FuShun','FS',113000), (210500,'本溪市','本溪',210000,'BenXi','BX',117000), (210600,'丹东市','丹东',210000,'DanDong','DD',118000), (210700,'锦州市','锦州',210000,'JinZhou','JZ',121000), (210800,'营口市','营口',210000,'YingKou','YK',115000), (210900,'阜新市','阜新',210000,'FuXin','FX',123000), (211000,'辽阳市','辽阳',210000,'LiaoYang','LY',111000), (211100,'盘锦市','盘锦',210000,'PanJin','PJ',124000), (211200,'铁岭市','铁岭',210000,'TieLing','TL',112000), (211300,'朝阳市','朝阳',210000,'ChaoYang','CY',122000), (211400,'葫芦岛市','葫芦岛',210000,'HuLuDao','HLD',125000), (220100,'长春市','长春',220000,'ZhangChun','ZC',130000), (220200,'吉林市','吉林',220000,'JiLin','JL',132000), (220300,'四平市','四平',220000,'SiPing','SP',136000), (220400,'辽源市','辽源',220000,'LiaoYuan','LY',136200), (220500,'通化市','通化',220000,'TongHua','TH',134000), (220600,'白山市','白山',220000,'BaiShan','BS',134300), (220700,'松原市','松原',220000,'SongYuan','SY',138000), (220800,'白城市','白城',220000,'BaiCheng','BC',137000), (222400,'延边朝鲜族自治州','延边朝鲜族',220000,'YanBianChaoXianZu','YBCXZ',133000), (230100,'哈尔滨市','哈尔滨',230000,'HaErBin','HEB',150000), (230200,'齐齐哈尔市','齐齐哈尔',230000,'QiQiHaEr','QQHE',161000), (230300,'鸡西市','鸡西',230000,'JiXi','JX',158100), (230400,'鹤岗市','鹤岗',230000,'HeGang','HG',154100), (230500,'双鸭山市','双鸭山',230000,'ShuangYaShan','SYS',155100), (230600,'大庆市','大庆',230000,'DaQing','DQ',163000), (230700,'伊春市','伊春',230000,'YiChun','YC',153000), (230800,'佳木斯市','佳木斯',230000,'JiaMuSi','JMS',154000), (230900,'七台河市','七台河',230000,'QiTaiHe','QTH',154600), (231081,'绥芬河市','绥芬河',230000,'SuiFenHe','SFH',157300), (231100,'黑河市','黑河',230000,'HeiHe','HH',164300), (231200,'绥化市','绥化',230000,'SuiHua','SH',152000), (232700,'大兴安岭地区','大兴安岭地区',230000,'DaXingAnLingDeQu','DXALDQ',165000), (320100,'南京市','南京',320000,'NanJing','NJ',210000), (320200,'无锡市','无锡',320000,'WuXi','WX',214000), (320300,'徐州市','徐州',320000,'XuZhou','XZ',221000), (320400,'常州市','常州',320000,'ChangZhou','CZ',213000), (320500,'苏州市','苏州',320000,'SuZhou','SZ',215000), (320600,'南通市','南通',320000,'NanTong','NT',226000), (320700,'连云港市','连云港',320000,'LianYunGang','LYG',222000), (320800,'淮安市','淮安',320000,'HuaiAn','HA',223200), (320900,'盐城市','盐城',320000,'YanCheng','YC',224000), (321000,'扬州市','扬州',320000,'YangZhou','YZ',225000), (321100,'镇江市','镇江',320000,'ZhenJiang','ZJ',212000), (321300,'宿迁市','宿迁',320000,'SuQian','SQ',223800), (330100,'杭州市','杭州',330000,'HangZhou','HZ',310000), (330200,'宁波市','宁波',330000,'NingBo','NB',315000), (330300,'温州市','温州',330000,'WenZhou','WZ',325000), (330400,'嘉兴市','嘉兴',330000,'JiaXing','JX',314000), (330500,'湖州市','湖州',330000,'HuZhou','HZ',313000), (330600,'绍兴市','绍兴',330000,'ShaoXing','SX',312000), (330700,'金华市','金华',330000,'JinHua','JH',321000), (330800,'衢州市','衢州',330000,'QuZhou','QZ',324000), (330900,'舟山市','舟山',330000,'ZhouShan','ZS',316000), (331000,'台州市','台州',330000,'TaiZhou','TZ',318000), (331100,'丽水市','丽水',330000,'LiShui','LS',323000), (340100,'合肥市','合肥',340000,'HeFei','HF',230000), (340200,'芜湖市','芜湖',340000,'WuHu','WH',241000), (340300,'蚌埠市','蚌埠',340000,'BangBu','BB',233000), (340400,'淮南市','淮南',340000,'HuaiNan','HN',232000), (340500,'马鞍山市','马鞍山',340000,'MaAnShan','MAS',243000), (340600,'淮北市','淮北',340000,'HuaiBei','HB',235000), (340700,'铜陵市','铜陵',340000,'TongLing','TL',244000), (340800,'安庆市','安庆',340000,'AnQing','AQ',246000), (341000,'黄山市','黄山',340000,'HuangShan','HS',245000), (341100,'滁州市','滁州',340000,'ChuZhou','CZ',239000), (341200,'阜阳市','阜阳',340000,'FuYang','FY',236000), (341500,'六安市','六安',340000,'LiuAn','LA',237000), (341600,'亳州市','亳州',340000,'BoZhou','BZ',236800), (341700,'池州市','池州',340000,'ChiZhou','CZ',247000), (341800,'宣城市','宣城',340000,'XuanCheng','XC',242000), (350100,'福州市','福州',350000,'FuZhou','FZ',350000), (350200,'厦门市','厦门',350000,'ShaMen','SM',361000), (350300,'莆田市','莆田',350000,'PuTian','PT',351100), (350400,'三明市','三明',350000,'SanMing','SM',365000), (350500,'泉州市','泉州',350000,'QuanZhou','QZ',362000), (350600,'漳州市','漳州',350000,'ZhangZhou','ZZ',363000), (350700,'南平市','南平',350000,'NanPing','NP',353000), (350800,'龙岩市','龙岩',350000,'LongYan','LY',364000), (350900,'宁德市','宁德',350000,'NingDe','ND',352100), (360100,'南昌市','南昌',360000,'NanChang','NC',330000), (360200,'景德镇市','景德镇',360000,'JingDeZhen','JDZ',333000), (360300,'萍乡市','萍乡',360000,'PingXiang','PX',337000), (360400,'九江市','九江',360000,'JiuJiang','JJ',332000), (360500,'新余市','新余',360000,'XinYu','XY',338000), (360700,'赣州市','赣州',360000,'GanZhou','GZ',341000), (360800,'吉安市','吉安',360000,'JiAn','JA',343000), (360900,'宜春市','宜春',360000,'YiChun','YC',336000), (361000,'抚州市','抚州',360000,'FuZhou','FZ',344000), (361100,'上饶市','上饶',360000,'ShangRao','SR',334000), (370100,'济南市','济南',370000,'JiNan','JN',250000), (370200,'青岛市','青岛',370000,'QingDao','QD',266000), (370300,'淄博市','淄博',370000,'ZiBo','ZB',255000), (370400,'枣庄市','枣庄',370000,'ZaoZhuang','ZZ',277100), (370500,'东营市','东营',370000,'DongYing','DY',257000), (370600,'烟台市','烟台',370000,'YanTai','YT',264000), (370700,'潍坊市','潍坊',370000,'WeiFang','WF',261000), (370800,'济宁市','济宁',370000,'JiNing','JN',272100), (370900,'泰安市','泰安',370000,'TaiAn','TA',271000), (371000,'威海市','威海',370000,'WeiHai','WH',264200), (371100,'日照市','日照',370000,'RiZhao','RZ',276800), (371200,'莱芜市','莱芜',370000,'LaiWu','LW',271100), (371300,'临沂市','临沂',370000,'LinYi','LY',276000), (371400,'德州市','德州',370000,'DeZhou','DZ',253000), (371500,'聊城市','聊城',370000,'LiaoCheng','LC',252000), (371600,'滨州市','滨州',370000,'BinZhou','BZ',256600), (371700,'菏泽市','菏泽',370000,'HeZe','HZ',274000), (410100,'郑州市','郑州',410000,'ZhengZhou','ZZ',450000), (410200,'开封市','开封',410000,'KaiFeng','KF',475000), (410300,'洛阳市','洛阳',410000,'LuoYang','LY',471000), (410400,'平顶山市','平顶山',410000,'PingDingShan','PDS',467000), (410500,'安阳市','安阳',410000,'AnYang','AY',455000), (410600,'鹤壁市','鹤壁',410000,'HeBi','HB',458000), (410700,'新乡市','新乡',410000,'XinXiang','XX',453000), (410800,'焦作市','焦作',410000,'JiaoZuo','JZ',454000), (410900,'濮阳市','濮阳',410000,'PuYang','PY',457000), (411000,'许昌市','许昌',410000,'XuChang','XC',461000), (411200,'三门峡市','三门峡',410000,'SanMenXia','SMX',472000), (411300,'南阳市','南阳',410000,'NanYang','NY',473000), (411400,'商丘市','商丘',410000,'ShangQiu','SQ',476000), (411500,'信阳市','信阳',410000,'XinYang','XY',464000), (411600,'周口市','周口',410000,'ZhouKou','ZK',466000), (411700,'驻马店市','驻马店',410000,'ZhuMaDian','ZMD',463000), (419001,'济源市','济源',410000,'JiYuan','JY',454650), (420100,'武汉市','武汉',420000,'WuHan','WH',430000), (420200,'黄石市','黄石',420000,'HuangShi','HS',435000), (420300,'十堰市','十堰',420000,'ShiYan','SY',442000), (420500,'宜昌市','宜昌',420000,'YiChang','YC',443000), (420600,'襄阳市','襄阳',420000,'XiangYang','XY',441000), (420700,'鄂州市','鄂州',420000,'EZhou','EZ',436000), (420800,'荆门市','荆门',420000,'JingMen','JM',448000), (420900,'孝感市','孝感',420000,'XiaoGan','XG',432000), (421000,'荆州市','荆州',420000,'JingZhou','JZ',434000), (421100,'黄冈市','黄冈',420000,'HuangGang','HG',438000), (421200,'咸宁市','咸宁',420000,'XianNing','XN',437100), (421300,'随州市','随州',420000,'SuiZhou','SZ',441300), (422800,'恩施土家族苗族自治州','恩施土家族苗族',420000,'EnShiTuJiaZuMiaoZu','ESTJZMZ',445400), (429004,'仙桃市','仙桃',420000,'XianTao','XT',433000), (429005,'潜江市','潜江',420000,'QianJiang','QJ',433100), (429006,'天门市','天门',420000,'TianMen','TM',431700), (429021,'神农架林区','神农架林区',420000,'ShenNongJiaLinQu','SNJLQ',442400), (430100,'长沙市','长沙',430000,'ZhangSha','ZS',410000), (430200,'株洲市','株洲',430000,'ZhuZhou','ZZ',412000), (430300,'湘潭市','湘潭',430000,'XiangTan','XT',411100), (430400,'衡阳市','衡阳',430000,'HengYang','HY',421000), (430500,'邵阳市','邵阳',430000,'ShaoYang','SY',422000), (430600,'岳阳市','岳阳',430000,'YueYang','YY',414000), (430700,'常德市','常德',430000,'ChangDe','CD',415000), (430800,'张家界市','张家界',430000,'ZhangJiaJie','ZJJ',427000), (430900,'益阳市','益阳',430000,'YiYang','YY',413000), (431000,'郴州市','郴州',430000,'ChenZhou','CZ',423000), (431100,'永州市','永州',430000,'YongZhou','YZ',425000), (431200,'怀化市','怀化',430000,'HuaiHua','HH',418000), (431300,'娄底市','娄底',430000,'LouDi','LD',417000), (433100,'湘西土家族苗族自治州','湘西土家族苗族',430000,'XiangXiTuJiaZuMiaoZu','XXTJZMZ',416000), (440100,'广州市','广州',440000,'GuangZhou','GZ',510000), (440200,'韶关市','韶关',440000,'ShaoGuan','SG',512000), (440300,'深圳市','深圳',440000,'ShenZhen','SZ',518000), (440400,'珠海市','珠海',440000,'ZhuHai','ZH',519000), (440500,'汕头市','汕头',440000,'ShanTou','ST',515000), (440600,'佛山市','佛山',440000,'FuShan','FS',528000), (440700,'江门市','江门',440000,'JiangMen','JM',529000), (440800,'湛江市','湛江',440000,'ZhanJiang','ZJ',524000), (440900,'茂名市','茂名',440000,'MaoMing','MM',525000), (441200,'肇庆市','肇庆',440000,'ZhaoQing','ZQ',526000), (441300,'惠州市','惠州',440000,'HuiZhou','HZ',516000), (441400,'梅州市','梅州',440000,'MeiZhou','MZ',514000), (441500,'汕尾市','汕尾',440000,'ShanWei','SW',516600), (441600,'河源市','河源',440000,'HeYuan','HY',517000), (441602,'源城区','源城区',440000,'YuanChengQu','YCQ',517000), (441700,'阳江市','阳江',440000,'YangJiang','YJ',529500), (441800,'清远市','清远',440000,'QingYuan','QY',511500), (441900,'东莞市','东莞',440000,'DongGuan','DG',523000), (442000,'中山市','中山',440000,'ZhongShan','ZS',528400), (445100,'潮州市','潮州',440000,'ChaoZhou','CZ',521000), (445200,'揭阳市','揭阳',440000,'JieYang','JY',522000), (445300,'云浮市','云浮',440000,'YunFu','YF',527300), (450100,'南宁市','南宁',450000,'NanNing','NN',530000), (450200,'柳州市','柳州',450000,'LiuZhou','LZ',545000), (450300,'桂林市','桂林',450000,'GuiLin','GL',541000), (450400,'梧州市','梧州',450000,'WuZhou','WZ',543000), (450500,'北海市','北海',450000,'BeiHai','BH',536000), (450600,'防城港市','防城港',450000,'FangChengGang','FCG',538000), (450700,'钦州市','钦州',450000,'QinZhou','QZ',535000), (450800,'贵港市','贵港',450000,'GuiGang','GG',537100), (450900,'玉林市','玉林',450000,'YuLin','YL',537000), (451000,'百色市','百色',450000,'BaiSe','BS',533000), (451100,'贺州市','贺州',450000,'HeZhou','HZ',542800), (451200,'河池市','河池',450000,'HeChi','HC',547000), (451300,'来宾市','来宾',450000,'LaiBin','LB',546100), (451400,'崇左市','崇左',450000,'ChongZuo','CZ',532200), (460100,'海口市','海口',460000,'HaiKou','HK',570000), (460200,'三亚市','三亚',460000,'SanYa','SY',572000), (460300,'三沙市','三沙',460000,'SanSha','SS',0), (469001,'五指山市','五指山',460000,'WuZhiShan','WZS',572200), (469002,'琼海市','琼海',460000,'QiongHai','QH',571400), (469003,'儋州市','儋州',460000,'DanZhou','DZ',571700), (469005,'文昌市','文昌',460000,'WenChang','WC',571300), (469006,'万宁市','万宁',460000,'WanNing','WN',571500), (469007,'东方市','东方',460000,'DongFang','DF',572600), (469021,'定安县','定安',460000,'DingAn','DA',0), (469022,'屯昌县','屯昌',460000,'TunChang','TC',0), (469023,'澄迈县','澄迈',460000,'ChengMai','CM',0), (469024,'临高县','临高',460000,'LinGao','LG',0), (469025,'白沙黎族自治县','白沙黎族',460000,'BaiShaLiZu','BSLZ',571200), (469026,'昌江黎族自治县','昌江黎族',460000,'ChangJiangLiZu','CJLZ',571600), (469027,'乐东黎族自治县','乐东黎族',460000,'LeDongLiZu','LDLZ',571900), (469028,'陵水黎族自治县','陵水黎族',460000,'LingShuiLiZu','LSLZ',571800), (469029,'保亭黎族苗族自治县','保亭黎族苗族',460000,'BaoTingLiZuMiaoZu','BTLZMZ',0), (469030,'琼中黎族苗族自治县','琼中黎族苗族',460000,'QiongZhongLiZuMiaoZu','QZLZMZ',572800), (510100,'成都市','成都',510000,'ChengDou','CD',610000), (510300,'自贡市','自贡',510000,'ZiGong','ZG',643000), (510400,'攀枝花市','攀枝花',510000,'PanZhiHua','PZH',617000), (510500,'泸州市','泸州',510000,'LuZhou','LZ',646000), (510600,'德阳市','德阳',510000,'DeYang','DY',618000), (510700,'绵阳市','绵阳',510000,'MianYang','MY',621000), (510800,'广元市','广元',510000,'GuangYuan','GY',628000), (510900,'遂宁市','遂宁',510000,'SuiNing','SN',629000), (511000,'内江市','内江',510000,'NeiJiang','NJ',641000), (511100,'乐山市','乐山',510000,'LeShan','LS',614000), (511300,'南充市','南充',510000,'NanChong','NC',637000), (511400,'眉山市','眉山',510000,'MeiShan','MS',620000), (511500,'宜宾市','宜宾',510000,'YiBin','YB',644000), (511600,'广安市','广安',510000,'GuangAn','GA',638000), (511700,'达州市','达州',510000,'DaZhou','DZ',635000), (511800,'雅安市','雅安',510000,'YaAn','YA',625000), (511900,'巴中市','巴中',510000,'BaZhong','BZ',636000), (511902,'巴州区','巴州区',510000,'BaZhouQu','BZQ',636601), (512000,'资阳市','资阳',510000,'ZiYang','ZY',641300), (513200,'阿坝藏族羌族自治州','阿坝藏族羌族',510000,'ABaCangZuQiangZu','ABCZQZ',623000), (513300,'甘孜藏族自治州','甘孜藏族',510000,'GanZiCangZu','GZCZ',626000), (513400,'凉山彝族自治州','凉山彝族',510000,'LiangShanYiZu','LSYZ',615000), (520100,'贵阳市','贵阳',520000,'GuiYang','GY',550000), (520200,'六盘水市','六盘水',520000,'LiuPanShui','LPS',553000), (520300,'遵义市','遵义',520000,'ZunYi','ZY',563000), (520400,'安顺市','安顺',520000,'AnShun','AS',561000), (520500,'毕节市','毕节',520000,'BiJie','BJ',0), (520600,'铜仁市','铜仁',520000,'TongRen','TR',0), (522300,'黔西南布依族苗族自治州','黔西南布依族苗族',520000,'QianXiNanBuYiZuMiaoZu','QXNBYZMZ',562400), (522600,'黔东南苗族侗族自治州','黔东南苗族侗族',520000,'QianDongNanMiaoZuDongZu','QDNMZDZ',556000), (522700,'黔南布依族苗族自治州','黔南布依族苗族',520000,'QianNanBuYiZuMiaoZu','QNBYZMZ',558200), (530100,'昆明市','昆明',530000,'KunMing','KM',650000), (530300,'曲靖市','曲靖',530000,'QuJing','QJ',655000), (530400,'玉溪市','玉溪',530000,'YuXi','YX',653100), (530500,'保山市','保山',530000,'BaoShan','BS',678200), (530600,'昭通市','昭通',530000,'ZhaoTong','ZT',657000), (530700,'丽江市','丽江',530000,'LiJiang','LJ',674100), (530800,'普洱市','普洱',530000,'PuEr','PE',665000), (530900,'临沧市','临沧',530000,'LinCang','LC',677000), (532300,'楚雄彝族自治州','楚雄彝族',530000,'ChuXiongYiZu','CXYZ',675000), (532500,'红河哈尼族彝族自治州','红河哈尼族彝族',530000,'HongHeHaNiZuYiZu','HHHNZYZ',662200), (532600,'文山壮族苗族自治州','文山壮族苗族',530000,'WenShanZhuangZuMiaoZu','WSZZMZ',663200), (532800,'西双版纳傣族自治州','西双版纳傣族',530000,'XiShuangBanNaDaiZu','XSBNDZ',666100), (532900,'大理白族自治州','大理白族',530000,'DaLiBaiZu','DLBZ',671000), (533100,'德宏傣族景颇族自治州','德宏傣族景颇族',530000,'DeHongDaiZuJingPoZu','DHDZJPZ',678600), (533300,'怒江傈僳族自治州','怒江傈僳族',530000,'NuJiangLiSuZu','NJLSZ',673200), (533400,'迪庆藏族自治州','迪庆藏族',530000,'DiQingCangZu','DQCZ',674400), (540100,'拉萨市','拉萨',540000,'LaSa','LS',850000), (542100,'昌都地区','昌都地区',540000,'ChangDouDeQu','CDDQ',854000), (542200,'山南地区','山南地区',540000,'ShanNanDeQu','SNDQ',856100), (542300,'日喀则地区','日喀则地区',540000,'RiKaZeDeQu','RKZDQ',857400), (542400,'那曲地区','那曲地区',540000,'NaQuDeQu','NQDQ',852000), (542500,'阿里地区','阿里地区',540000,'ALiDeQu','ALDQ',859400), (542600,'林芝地区','林芝地区',540000,'LinZhiDeQu','LZDQ',860100), (610100,'西安市','西安',610000,'XiAn','XA',710000), (610200,'铜川市','铜川',610000,'TongChuan','TC',727000), (610300,'宝鸡市','宝鸡',610000,'BaoJi','BJ',721000), (610400,'咸阳市','咸阳',610000,'XianYang','XY',712000), (610500,'渭南市','渭南',610000,'WeiNan','WN',714000), (610600,'延安市','延安',610000,'YanAn','YA',716000), (610700,'汉中市','汉中',610000,'HanZhong','HZ',723000), (610800,'榆林市','榆林',610000,'YuLin','YL',719000), (610900,'安康市','安康',610000,'AnKang','AK',725000), (611000,'商洛市','商洛',610000,'ShangLuo','SL',726000), (620100,'兰州市','兰州',620000,'LanZhou','LZ',730000), (620200,'嘉峪关市','嘉峪关',620000,'JiaYuGuan','JYG',735100), (620300,'金昌市','金昌',620000,'JinChang','JC',737100), (620400,'白银市','白银',620000,'BaiYin','BY',730900), (620500,'天水市','天水',620000,'TianShui','TS',741000), (620600,'武威市','武威',620000,'WuWei','WW',733000), (620700,'张掖市','张掖',620000,'ZhangYe','ZY',734000), (620800,'平凉市','平凉',620000,'PingLiang','PL',744000), (620900,'酒泉市','酒泉',620000,'JiuQuan','JQ',735000), (621000,'庆阳市','庆阳',620000,'QingYang','QY',745000), (621100,'定西市','定西',620000,'DingXi','DX',743000), (621200,'陇南市','陇南',620000,'LongNan','LN',746000), (622900,'临夏回族自治州','临夏回族',620000,'LinXiaHuiZu','LXHZ',731100), (623000,'甘南藏族自治州','甘南藏族',620000,'GanNanCangZu','GNCZ',747000), (630100,'西宁市','西宁',630000,'XiNing','XN',810000), (630200,'海东市','海东市',630000,'HaiDongShi','HDS',810600), (632200,'海北藏族自治州','海北藏族',630000,'HaiBeiCangZu','HBCZ',810300), (632300,'黄南藏族自治州','黄南藏族',630000,'HuangNanCangZu','HNCZ',811300), (632500,'海南藏族自治州','海南藏族',630000,'HaiNanCangZu','HNCZ',813000), (632600,'果洛藏族自治州','果洛藏族',630000,'GuoLuoCangZu','GLCZ',814000), (632700,'玉树藏族自治州','玉树藏族',630000,'YuShuCangZu','YSCZ',815000), (632800,'海西蒙古族藏族自治州','海西蒙古族藏族',630000,'HaiXiMengGuZuCangZu','HXMGZCZ',816000), (640100,'银川市','银川',640000,'YinChuan','YC',750000), (640200,'石嘴山市','石嘴山',640000,'ShiZuiShan','SZS',753000), (640300,'吴忠市','吴忠',640000,'WuZhong','WZ',751100), (640400,'固原市','固原',640000,'GuYuan','GY',756000), (640500,'中卫市','中卫',640000,'ZhongWei','ZW',755000), (650100,'乌鲁木齐市','乌鲁木齐',650000,'WuLuMuQi','WLMQ',830000), (650200,'克拉玛依市','克拉玛依',650000,'KeLaMaYi','KLMY',834000), (652100,'吐鲁番地区','吐鲁番地区',650000,'TuLuFanDeQu','TLFDQ',838000), (652200,'哈密地区','哈密地区',650000,'HaMiDeQu','HMDQ',839000), (652300,'昌吉回族自治州','昌吉回族',650000,'ChangJiHuiZu','CJHZ',831100), (652700,'博尔塔拉蒙古自治州','博尔塔拉蒙古',650000,'BoErTaLaMengGu','BETLMG',833400), (652800,'巴音郭楞蒙古自治州','巴音郭楞蒙古',650000,'BaYinGuoLengMengGu','BYGLMG',841000), (652900,'阿克苏地区','阿克苏地区',650000,'AKeSuDeQu','AKSDQ',843000), (653000,'克孜勒苏柯尔克孜自治州','克孜勒苏柯尔克孜',650000,'KeZiLeiSuKeErKeZi','KZLSKEKZ',845350), (653100,'喀什地区','喀什地区',650000,'KaShenDeQu','KSDQ',844000), (653200,'和田地区','和田地区',650000,'HeTianDeQu','HTDQ',848000), (654000,'伊犁哈萨克自治州','伊犁哈萨克',650000,'YiLiHaSaKe','YLHSK',835000), (654200,'塔城地区','塔城地区',650000,'TaChengDeQu','TCDQ',834700), (654300,'阿勒泰地区','阿勒泰地区',650000,'ALeiTaiDeQu','ALTDQ',836500), (659001,'石河子市','石河子',650000,'ShiHeZi','SHZ',832000), (659002,'阿拉尔市','阿拉尔',650000,'ALaEr','ALE',843300), (659003,'图木舒克市','图木舒克',650000,'TuMuShuKe','TMSK',843806), (659004,'五家渠市','五家渠',650000,'WuJiaQu','WJQ',831300), (710100,'台北市','台北',710000,'TaiBei','TB',0), (710200,'高雄市','高雄',710000,'GaoXiong','GX',0), (710300,'台南市','台南',710000,'TaiNan','TN',0), (710400,'台中市','台中',710000,'TaiZhong','TZ',0), (710500,'金门县','金门',710000,'JinMen','JM',0), (710600,'南投县','南投',710000,'NanTou','NT',0), (710700,'基隆市','基隆',710000,'JiLong','JL',0), (710800,'新竹市','新竹',710000,'XinZhu','XZ',0), (710900,'嘉义市','嘉义',710000,'JiaYi','JY',0), (711100,'新北市','新北',710000,'XinBei','XB',0), (711200,'宜兰县','宜兰',710000,'YiLan','YL',0), (711300,'新竹县','新竹',710000,'XinZhu','XZ',0), (711400,'桃园县','桃园',710000,'TaoYuan','TY',0), (711500,'苗栗县','苗栗',710000,'MiaoLi','ML',0), (711700,'彰化县','彰化',710000,'ZhangHua','ZH',0), (711900,'嘉义县','嘉义',710000,'JiaYi','JY',0), (712100,'云林县','云林',710000,'YunLin','YL',0), (712400,'屏东县','屏东',710000,'PingDong','PD',0), (712500,'台东县','台东',710000,'TaiDong','TD',0), (712600,'花莲县','花莲',710000,'HuaLian','HL',0), (712700,'澎湖县','澎湖',710000,'PengHu','PH',0), (810100,'香港岛','香港岛',810000,'XiangGangDao','XGD',0), (810200,'九龙','九龙',810000,'JiuLong','JL',0), (810300,'新界','新界',810000,'XinJie','XJ',0), (231000,'牡丹江市','牡丹江',230000,'MuDanJiang','MDJ',157000), (321200,'泰州市','泰州',320000,'TaiZhou','TZ',225300), (360600,'鹰潭市','鹰潭',360000,'YingTan','YT',335000), (341300,'宿州市','宿州',340000,'SuZhou','SZ',234000), (411100,'漯河市','漯河',410000,'LuoHe','LH',462000); /*!40000 ALTER TABLE `citys` ENABLE KEYS */; UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
50.715247
88
0.643088
505d2cef1b5e31bbd0e1faae1dc2786873099062
5,926
go
Go
api/model_telegraf_all_of_links.gen.go
TwentyFiveSoftware/influx-cli
239a8cc4e9c1964993c51f59a910e83a02b1c9e6
[ "MIT" ]
23
2021-05-11T21:40:19.000Z
2022-03-17T15:46:36.000Z
api/model_telegraf_all_of_links.gen.go
TwentyFiveSoftware/influx-cli
239a8cc4e9c1964993c51f59a910e83a02b1c9e6
[ "MIT" ]
208
2021-04-12T16:02:16.000Z
2022-03-24T13:52:08.000Z
api/model_telegraf_all_of_links.gen.go
TwentyFiveSoftware/influx-cli
239a8cc4e9c1964993c51f59a910e83a02b1c9e6
[ "MIT" ]
5
2021-09-10T20:19:12.000Z
2022-03-25T10:04:43.000Z
/* * Subset of Influx API covered by Influx CLI * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package api import ( "encoding/json" ) // TelegrafAllOfLinks struct for TelegrafAllOfLinks type TelegrafAllOfLinks struct { // URI of resource. Self *string `json:"self,omitempty" yaml:"self,omitempty"` // URI of resource. Labels *string `json:"labels,omitempty" yaml:"labels,omitempty"` // URI of resource. Members *string `json:"members,omitempty" yaml:"members,omitempty"` // URI of resource. Owners *string `json:"owners,omitempty" yaml:"owners,omitempty"` } // NewTelegrafAllOfLinks instantiates a new TelegrafAllOfLinks object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed func NewTelegrafAllOfLinks() *TelegrafAllOfLinks { this := TelegrafAllOfLinks{} return &this } // NewTelegrafAllOfLinksWithDefaults instantiates a new TelegrafAllOfLinks object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set func NewTelegrafAllOfLinksWithDefaults() *TelegrafAllOfLinks { this := TelegrafAllOfLinks{} return &this } // GetSelf returns the Self field value if set, zero value otherwise. func (o *TelegrafAllOfLinks) GetSelf() string { if o == nil || o.Self == nil { var ret string return ret } return *o.Self } // GetSelfOk returns a tuple with the Self field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafAllOfLinks) GetSelfOk() (*string, bool) { if o == nil || o.Self == nil { return nil, false } return o.Self, true } // HasSelf returns a boolean if a field has been set. func (o *TelegrafAllOfLinks) HasSelf() bool { if o != nil && o.Self != nil { return true } return false } // SetSelf gets a reference to the given string and assigns it to the Self field. func (o *TelegrafAllOfLinks) SetSelf(v string) { o.Self = &v } // GetLabels returns the Labels field value if set, zero value otherwise. func (o *TelegrafAllOfLinks) GetLabels() string { if o == nil || o.Labels == nil { var ret string return ret } return *o.Labels } // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafAllOfLinks) GetLabelsOk() (*string, bool) { if o == nil || o.Labels == nil { return nil, false } return o.Labels, true } // HasLabels returns a boolean if a field has been set. func (o *TelegrafAllOfLinks) HasLabels() bool { if o != nil && o.Labels != nil { return true } return false } // SetLabels gets a reference to the given string and assigns it to the Labels field. func (o *TelegrafAllOfLinks) SetLabels(v string) { o.Labels = &v } // GetMembers returns the Members field value if set, zero value otherwise. func (o *TelegrafAllOfLinks) GetMembers() string { if o == nil || o.Members == nil { var ret string return ret } return *o.Members } // GetMembersOk returns a tuple with the Members field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafAllOfLinks) GetMembersOk() (*string, bool) { if o == nil || o.Members == nil { return nil, false } return o.Members, true } // HasMembers returns a boolean if a field has been set. func (o *TelegrafAllOfLinks) HasMembers() bool { if o != nil && o.Members != nil { return true } return false } // SetMembers gets a reference to the given string and assigns it to the Members field. func (o *TelegrafAllOfLinks) SetMembers(v string) { o.Members = &v } // GetOwners returns the Owners field value if set, zero value otherwise. func (o *TelegrafAllOfLinks) GetOwners() string { if o == nil || o.Owners == nil { var ret string return ret } return *o.Owners } // GetOwnersOk returns a tuple with the Owners field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafAllOfLinks) GetOwnersOk() (*string, bool) { if o == nil || o.Owners == nil { return nil, false } return o.Owners, true } // HasOwners returns a boolean if a field has been set. func (o *TelegrafAllOfLinks) HasOwners() bool { if o != nil && o.Owners != nil { return true } return false } // SetOwners gets a reference to the given string and assigns it to the Owners field. func (o *TelegrafAllOfLinks) SetOwners(v string) { o.Owners = &v } func (o TelegrafAllOfLinks) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Self != nil { toSerialize["self"] = o.Self } if o.Labels != nil { toSerialize["labels"] = o.Labels } if o.Members != nil { toSerialize["members"] = o.Members } if o.Owners != nil { toSerialize["owners"] = o.Owners } return json.Marshal(toSerialize) } type NullableTelegrafAllOfLinks struct { value *TelegrafAllOfLinks isSet bool } func (v NullableTelegrafAllOfLinks) Get() *TelegrafAllOfLinks { return v.value } func (v *NullableTelegrafAllOfLinks) Set(val *TelegrafAllOfLinks) { v.value = val v.isSet = true } func (v NullableTelegrafAllOfLinks) IsSet() bool { return v.isSet } func (v *NullableTelegrafAllOfLinks) Unset() { v.value = nil v.isSet = false } func NewNullableTelegrafAllOfLinks(val *TelegrafAllOfLinks) *NullableTelegrafAllOfLinks { return &NullableTelegrafAllOfLinks{value: val, isSet: true} } func (v NullableTelegrafAllOfLinks) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTelegrafAllOfLinks) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }
26.221239
109
0.71836
fcad758bf1b9b45e2b85af8718d37012e1af9626
366
css
CSS
resources/style.css
gabzon/info-handicap-1
6c65037123248e09ef5f41a1a5210cd0ceab6614
[ "MIT" ]
null
null
null
resources/style.css
gabzon/info-handicap-1
6c65037123248e09ef5f41a1a5210cd0ceab6614
[ "MIT" ]
null
null
null
resources/style.css
gabzon/info-handicap-1
6c65037123248e09ef5f41a1a5210cd0ceab6614
[ "MIT" ]
null
null
null
/* Theme Name: Info Handicap 1 Theme URI: https://info-handicap-ge.ch Description: Thème pour le site info handicap geneve Version: 0.0.1 Author: Gabriel Zambrano Author URI: https://zambrano.ch Text Domain: sage License: MIT License License URI: http://opensource.org/licenses/MIT */
28.153846
59
0.598361
a61da836fcbccbb71930f7c8a9876ad1af1cbaef
1,450
kt
Kotlin
src/main/kotlin/game/GameOfLife.kt
mr90/kotlin-game-of-life
fe41df28bb068e31825e6f6fd9084a573d28aef4
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/game/GameOfLife.kt
mr90/kotlin-game-of-life
fe41df28bb068e31825e6f6fd9084a573d28aef4
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/game/GameOfLife.kt
mr90/kotlin-game-of-life
fe41df28bb068e31825e6f6fd9084a573d28aef4
[ "Apache-2.0" ]
null
null
null
package game import java.awt.Color import javax.swing.JFrame import javax.swing.WindowConstants fun main() { with(JFrame()) { title = "Game Of Life" defaultCloseOperation = WindowConstants.EXIT_ON_CLOSE val boardWidth = 20 val boardHeight = 8 val settings = GameOfLifeSettings() add(GameOfLifeView(RandomGameOfLifeInitializer(boardWidth, boardHeight), settings)) val panelWidth = boardWidth*settings.cellSize + (boardWidth+1)*settings.cellMargin val panelHeight = boardHeight*settings.cellSize + (boardHeight+1)*settings.cellMargin + FRAME_HEADER_HEIGHT setSize(panelWidth, panelHeight) isResizable = false setLocationRelativeTo(null) isVisible = true } } private val FRAME_HEADER_HEIGHT = 36 private val FONT_NAME = "Arial" private val FONT_SIZE = 20 private val CELL_SIZE = 64 private val CELL_MARGIN = 16 private val BACKGROUND_COLOR = Color(0xDDDDDD) private val LIVE_COLOR = Color(0x000000) private val DEAD_COLOR = Color(0xFFFFFF) data class GameOfLifeSettings( val fontName : String = FONT_NAME, val fontSize : Int = FONT_SIZE, val cellSize : Int = CELL_SIZE, val cellMargin : Int = CELL_MARGIN, val backgroundColor : Color = BACKGROUND_COLOR, val liveColor : Color = LIVE_COLOR, val deadColor : Color = DEAD_COLOR)
30.208333
115
0.675172
98c4bd44d7e72b2f4a728ab63468c3ae26247d62
339
html
HTML
userpypi/templates/djangopypi/package_list.html
coordt/djangopypi
1f955a339feadcf177b61d4da147bf63b4fcac61
[ "BSD-3-Clause" ]
1
2015-11-04T16:25:03.000Z
2015-11-04T16:25:03.000Z
userpypi/templates/djangopypi/package_list.html
coordt/djangopypi
1f955a339feadcf177b61d4da147bf63b4fcac61
[ "BSD-3-Clause" ]
null
null
null
userpypi/templates/djangopypi/package_list.html
coordt/djangopypi
1f955a339feadcf177b61d4da147bf63b4fcac61
[ "BSD-3-Clause" ]
null
null
null
<html> <head> <title>Package Index</title> </head> <body> <h1>Package Index</h1> <ul> {% for package in package_list %} <li><a href="{{ package.get_absolute_url }}">{{ package.name }}</a>{% if package.latest and package.latest.summary %}: {{ package.latest.summary }}{% endif %}</li> {% endfor %} </ul> </body> </html>
26.076923
166
0.59882
2a5d2f0928b16a949c590d11035eefb2b4c8e602
3,448
java
Java
x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/expression/function/scalar/string/StringContainsFunctionPipe.java
SaiKai/elasticsearch
783d14d179e958fc54356191fa02532a893fb39e
[ "Apache-2.0" ]
1
2021-01-24T16:47:06.000Z
2021-01-24T16:47:06.000Z
x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/expression/function/scalar/string/StringContainsFunctionPipe.java
SaiKai/elasticsearch
783d14d179e958fc54356191fa02532a893fb39e
[ "Apache-2.0" ]
null
null
null
x-pack/plugin/eql/src/main/java/org/elasticsearch/xpack/eql/expression/function/scalar/string/StringContainsFunctionPipe.java
SaiKai/elasticsearch
783d14d179e958fc54356191fa02532a893fb39e
[ "Apache-2.0" ]
1
2021-06-12T11:34:52.000Z
2021-06-12T11:34:52.000Z
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ package org.elasticsearch.xpack.eql.expression.function.scalar.string; import org.elasticsearch.xpack.ql.execution.search.QlSourceBuilder; import org.elasticsearch.xpack.ql.expression.Expression; import org.elasticsearch.xpack.ql.expression.gen.pipeline.Pipe; import org.elasticsearch.xpack.ql.tree.NodeInfo; import org.elasticsearch.xpack.ql.tree.Source; import java.util.Arrays; import java.util.List; import java.util.Objects; public class StringContainsFunctionPipe extends Pipe { private final Pipe string, substring; private final boolean isCaseSensitive; public StringContainsFunctionPipe(Source source, Expression expression, Pipe string, Pipe substring, boolean isCaseSensitive) { super(source, expression, Arrays.asList(string, substring)); this.string = string; this.substring = substring; this.isCaseSensitive = isCaseSensitive; } @Override public final Pipe replaceChildren(List<Pipe> newChildren) { return replaceChildren(newChildren.get(0), newChildren.get(1)); } @Override public final Pipe resolveAttributes(AttributeResolver resolver) { Pipe newString = string.resolveAttributes(resolver); Pipe newSubstring = substring.resolveAttributes(resolver); if (newString == string && newSubstring == substring) { return this; } return replaceChildren(newString, newSubstring); } @Override public boolean supportedByAggsOnlyQuery() { return string.supportedByAggsOnlyQuery() && substring.supportedByAggsOnlyQuery(); } @Override public boolean resolved() { return string.resolved() && substring.resolved(); } protected StringContainsFunctionPipe replaceChildren(Pipe string, Pipe substring) { return new StringContainsFunctionPipe(source(), expression(), string, substring, isCaseSensitive); } @Override public final void collectFields(QlSourceBuilder sourceBuilder) { string.collectFields(sourceBuilder); substring.collectFields(sourceBuilder); } @Override protected NodeInfo<StringContainsFunctionPipe> info() { return NodeInfo.create(this, StringContainsFunctionPipe::new, expression(), string, substring, isCaseSensitive); } @Override public StringContainsFunctionProcessor asProcessor() { return new StringContainsFunctionProcessor(string.asProcessor(), substring.asProcessor(), isCaseSensitive); } public Pipe string() { return string; } public Pipe substring() { return substring; } protected boolean isCaseSensitive() { return isCaseSensitive; } @Override public int hashCode() { return Objects.hash(string(), substring()); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StringContainsFunctionPipe other = (StringContainsFunctionPipe) obj; return Objects.equals(string(), other.string()) && Objects.equals(substring(), other.substring()); } }
31.925926
131
0.697216
3e2aaa5fd8e7e8606bc5ad6b456ed7a81a8b9ea3
6,437
h
C
dependancies/include/gtkmm/pangomm/cairofontmap.h
Illation/synthesizer
da77d55c1c69829bbad76d0c14b9c56a5261b642
[ "MIT" ]
2
2020-03-24T09:46:35.000Z
2020-06-16T01:42:46.000Z
dependancies/include/gtkmm/pangomm/cairofontmap.h
Illation/synthesizer
da77d55c1c69829bbad76d0c14b9c56a5261b642
[ "MIT" ]
null
null
null
dependancies/include/gtkmm/pangomm/cairofontmap.h
Illation/synthesizer
da77d55c1c69829bbad76d0c14b9c56a5261b642
[ "MIT" ]
null
null
null
// Generated by gmmproc 2.49.5 -- DO NOT MODIFY! #ifndef _PANGOMM_CAIROFONTMAP_H #define _PANGOMM_CAIROFONTMAP_H #include <glibmm/ustring.h> #include <sigc++/sigc++.h> /* $Id: cairofontmap.hg,v 1.1 2006/05/30 17:14:21 murrayc Exp $ */ /* fontmap.h * * Copyright 2001 The gtkmm Development Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <glibmm/interface.h> #include <pangomm/context.h> #include <pango/pangocairo.h> #ifndef DOXYGEN_SHOULD_SKIP_THIS typedef struct _PangoCairoFontMapIface PangoCairoFontMapIface; #endif #ifndef DOXYGEN_SHOULD_SKIP_THIS using PangoCairoFontMap = struct _PangoCairoFontMap; using PangoCairoFontMapClass = struct _PangoCairoFontMapClass; #endif /* DOXYGEN_SHOULD_SKIP_THIS */ #ifndef DOXYGEN_SHOULD_SKIP_THIS namespace Pango { class CairoFontMap_Class; } // namespace Pango #endif // DOXYGEN_SHOULD_SKIP_THIS namespace Pango { class Context; /** A Pango::CairoFontMap represents the set of fonts available for a particular rendering system. */ class CairoFontMap : public Glib::Interface { #ifndef DOXYGEN_SHOULD_SKIP_THIS public: using CppObjectType = CairoFontMap; using CppClassType = CairoFontMap_Class; using BaseObjectType = PangoCairoFontMap; using BaseClassType = PangoCairoFontMapIface; // noncopyable CairoFontMap(const CairoFontMap&) = delete; CairoFontMap& operator=(const CairoFontMap&) = delete; private: friend class CairoFontMap_Class; static CppClassType cairofontmap_class_; #endif /* DOXYGEN_SHOULD_SKIP_THIS */ protected: /** * You should derive from this class to use it. */ CairoFontMap(); #ifndef DOXYGEN_SHOULD_SKIP_THIS /** Called by constructors of derived classes. Provide the result of * the Class init() function to ensure that it is properly * initialized. * * @param interface_class The Class object for the derived type. */ explicit CairoFontMap(const Glib::Interface_Class& interface_class); public: // This is public so that C++ wrapper instances can be // created for C instances of unwrapped types. // For instance, if an unexpected C type implements the C interface. explicit CairoFontMap(PangoCairoFontMap* castitem); protected: #endif /* DOXYGEN_SHOULD_SKIP_THIS */ public: CairoFontMap(CairoFontMap&& src) noexcept; CairoFontMap& operator=(CairoFontMap&& src) noexcept; ~CairoFontMap() noexcept override; static void add_interface(GType gtype_implementer); /** Get the GType for this class, for use with the underlying GObject type system. */ static GType get_type() G_GNUC_CONST; #ifndef DOXYGEN_SHOULD_SKIP_THIS static GType get_base_type() G_GNUC_CONST; #endif ///Provides access to the underlying C GObject. PangoCairoFontMap* gobj() { return reinterpret_cast<PangoCairoFontMap*>(gobject_); } ///Provides access to the underlying C GObject. const PangoCairoFontMap* gobj() const { return reinterpret_cast<PangoCairoFontMap*>(gobject_); } private: public: //_WRAP_METHOD(static Glib::RefPtr<PangoFontMap> get_default(), pango_cairo_font_map_get_default) //TODO: ref this? /** Sets a default Pango::CairoFontMap to use with Cairo. * * This can be used to change the Cairo font backend that the * default fontmap uses for example. The old default font map * is unreffed and the new font map referenced. * * Note that since Pango 1.32.6, the default fontmap is per-thread. * This function only changes the default fontmap for * the current thread. Default fontmaps of exisiting threads * are not changed. Default fontmaps of any new threads will * still be created using new(). * * A value of <tt>nullptr</tt> for @a fontmap will cause the current default * font map to be released and a new default font * map to be created on demand, using new(). * * @newin{1,22} */ void set_default(); /** Gets the type of Cairo font backend that @a fontmap uses. * * @newin{1,18} * * @return The #cairo_font_type_t cairo font backend type. */ Cairo::FontType get_font_type() const; /** Sets the resolution for the fontmap. This is a scale factor between * points specified in a Pango::FontDescription and Cairo units. The * default value is 96, meaning that a 10 point font will be 13 * units high. (10 * 96. / 72. = 13.3). * * @newin{1,10} * * @param dpi The resolution in "dots per inch". (Physical inches aren't actually * involved; the terminology is conventional.). */ void set_resolution(double dpi); /** Gets the resolution for the fontmap. See set_resolution() * * @newin{1,10} * * @return The resolution in "dots per inch". */ double get_resolution() const; // TODO: Remove this when we can break ABI. /** Create a Pango::Context for the given fontmap. * * @newin{1,10} * * Deprecated: 1.22: Use Pango::FontMap::create_context() instead. * * @return The newly created context; free with Glib::object_unref(). */ Glib::RefPtr<Context> create_context(); public: public: //C++ methods used to invoke GTK+ virtual functions: protected: //GTK+ Virtual Functions (override these to change behaviour): //Default Signal Handlers:: }; } // namespace Pango namespace Glib { /** A Glib::wrap() method for this object. * * @param object The C instance. * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. * @result A C++ instance that wraps this C instance. * * @relates Pango::CairoFontMap */ Glib::RefPtr<Pango::CairoFontMap> wrap(PangoCairoFontMap* object, bool take_copy = false); } // namespace Glib #endif /* _PANGOMM_CAIROFONTMAP_H */
28.232456
124
0.720367
3f5b35f73b2b7de228a0d09bdee452db28660845
437
sql
SQL
02-Joins/5-Composite_primary_key.sql
ramapinnimty/SQL-Vault
ebe08e5cd24efa71b231c6b4a29d11d6481c28bf
[ "MIT" ]
null
null
null
02-Joins/5-Composite_primary_key.sql
ramapinnimty/SQL-Vault
ebe08e5cd24efa71b231c6b4a29d11d6481c28bf
[ "MIT" ]
null
null
null
02-Joins/5-Composite_primary_key.sql
ramapinnimty/SQL-Vault
ebe08e5cd24efa71b231c6b4a29d11d6481c28bf
[ "MIT" ]
null
null
null
-- There will be times when we cannot uniquely identify records in a given table (i.e, where there is no primary key). -- Thus, in such scenarios, we use a combination of these columns to uniquely identify records. -- This is called a "Composite Primary Key" that contains more than one column. USE sql_store; SELECT * FROM order_items oi JOIN order_item_notes oin ON oi.order_id = oin.order_id AND oi.product_id = oin.product_id;
39.727273
118
0.76659
8d0ad64076043165e891d27ab42589724f3a2a91
424
lua
Lua
Un-identified/3/Programs/arun.lua
RamiLego4Game/LIKO-12-Projects
846ccc1d95f98d1b5ec791003438ea309300a116
[ "MIT" ]
3
2017-08-02T10:11:03.000Z
2017-11-06T20:52:45.000Z
Appdata/Programs/arun.lua
Rami-Sabbagh/BatteryMan
3dc86c294c3f12077ad72d83744becbaf8961041
[ "MIT" ]
null
null
null
Appdata/Programs/arun.lua
Rami-Sabbagh/BatteryMan
3dc86c294c3f12077ad72d83744becbaf8961041
[ "MIT" ]
null
null
null
local term = require("terminal") term.execute("save") flip() term.execute("tileset") flip() clear(0) printCursor(0,0,0) while true do cam() pal() palt() printCursor(false,false,0) color(7) print("Press any key to run") for event, key in pullEvent do if event == "keypressed" then if key == "escape" then return end break end end term.execute("tiled") flip() term.execute("run") end
18.434783
40
0.641509
bedc8c7c8435174ff581ad69ffcd04e681f7025d
102
kt
Kotlin
flank-scripts/src/main/kotlin/flank/scripts/utils/FileUtils.kt
jan-gogo/flank
9d1ba8db43e76807ffd1578122005eef60490a08
[ "Apache-2.0" ]
null
null
null
flank-scripts/src/main/kotlin/flank/scripts/utils/FileUtils.kt
jan-gogo/flank
9d1ba8db43e76807ffd1578122005eef60490a08
[ "Apache-2.0" ]
1
2020-12-11T14:04:24.000Z
2020-12-11T14:04:50.000Z
flank-scripts/src/main/kotlin/flank/scripts/utils/FileUtils.kt
jan-gogo/flank
9d1ba8db43e76807ffd1578122005eef60490a08
[ "Apache-2.0" ]
null
null
null
package flank.scripts.utils internal fun String.withNewLineAtTheEnd() = plus(System.lineSeparator())
25.5
72
0.813725
75e456b76dbcade9447d541d54c53e98f98f364c
1,312
php
PHP
resources/views/front/partials/emoje/about.blade.php
NohaElMandoh/genenaMall
6fba23011ef3323d077090c7210db3e93dd92dbd
[ "MIT" ]
null
null
null
resources/views/front/partials/emoje/about.blade.php
NohaElMandoh/genenaMall
6fba23011ef3323d077090c7210db3e93dd92dbd
[ "MIT" ]
null
null
null
resources/views/front/partials/emoje/about.blade.php
NohaElMandoh/genenaMall
6fba23011ef3323d077090c7210db3e93dd92dbd
[ "MIT" ]
null
null
null
<div class="emojabout"> <div class="container"> <div class="emojaboutcontent"> <div class="row"> <div class="col-lg-7 col-md-7 col-sm-6 col-xs-12"> <div class="emojaboutdetparg"> {{-- <p>Let your children have an unforgettable spring break with our endless entertainment offerings, fascinating quests, educational and physical activities.</p> <p>Say goodbye to the boredom of the school classroom. At Emoji, every day will start with a workout, breakfast at the Foodmama restaurant, and games with camp leaders.</p> <p>Then the children have a rich program: active games, ice skating, children's yoga, flying in a wind tunnel and much more useful and exciting. In the afternoon, the guys are fed a delicious lunch, afternoon snack and dinner.</p> --}} <p> {!!$emoje->desc!!} </p> </div> </div> <div class="col-lg-5 col-md-5 col-sm-6 col-xs-12"> <div class="images"> <img src="{{asset('front/images/slider/logotype.svg')}}"> </div> </div> </div> </div> </div> </div>
59.636364
242
0.528201
177a15b293d206ee9b00073a2623875d0e632ecf
283
kt
Kotlin
src/commonMain/kotlin/com/bkahlert/kommons/io/InMemoryFile.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
7
2020-12-20T10:47:06.000Z
2021-08-03T14:21:57.000Z
src/commonMain/kotlin/com/bkahlert/kommons/io/InMemoryFile.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
42
2021-08-25T16:22:09.000Z
2022-03-21T16:22:37.000Z
src/commonMain/kotlin/com/bkahlert/kommons/io/InMemoryFile.kt
bkahlert/koodies
35e2ac1c4246decdf7e7a1160bfdd5c9e28fd066
[ "MIT" ]
null
null
null
package com.bkahlert.kommons.io /** * A file stored purely in-memory. */ public interface InMemoryFile { /** * Name of this in-memory file. */ public val name: String /** * Data this in-memory file consists of. */ public val data: ByteArray }
16.647059
44
0.607774
8a0f3e046ba90c73b3a136ed380bf6f69d51ed23
885
rs
Rust
dsf_precompile/src/structs.rs
saveriomiroddi/dwarf_seeks_fortune-dev
651b7970da38cabeac223b775dd293ed265e680d
[ "BlueOak-1.0.0" ]
null
null
null
dsf_precompile/src/structs.rs
saveriomiroddi/dwarf_seeks_fortune-dev
651b7970da38cabeac223b775dd293ed265e680d
[ "BlueOak-1.0.0" ]
null
null
null
dsf_precompile/src/structs.rs
saveriomiroddi/dwarf_seeks_fortune-dev
651b7970da38cabeac223b775dd293ed265e680d
[ "BlueOak-1.0.0" ]
null
null
null
use amethyst::{ animation::AnimationSetPrefab, assets::{PrefabData, ProgressCounter}, derive::PrefabData, ecs::{ prelude::{Component, Entity}, DenseVecStorage, }, error::Error, renderer::sprite::{prefab::SpriteScenePrefab, SpriteRender}, }; use serde::{Deserialize, Serialize}; /// Animation ids used in a AnimationSet #[derive(Eq, PartialOrd, PartialEq, Hash, Debug, Copy, Clone, Deserialize, Serialize)] pub enum AnimationId { Fly, } /// Loading data for one entity #[derive(Debug, Clone, Deserialize, PrefabData)] pub struct MyPrefabData { /// Information for rendering a scene with sprites sprite_scene: SpriteScenePrefab, /// Аll animations that can be run on the entity animation_set: AnimationSetPrefab<AnimationId, SpriteRender>, } impl Component for MyPrefabData { type Storage = DenseVecStorage<Self>; }
27.65625
86
0.708475
7ff7033d4d2e6edb87d7aa49bb130ff4316c2e04
731
go
Go
routes/routes.go
tjtaill/gin-gonic-spike
3ff7b70b952ce10928cdf369b355001c9a3c3902
[ "MIT" ]
null
null
null
routes/routes.go
tjtaill/gin-gonic-spike
3ff7b70b952ce10928cdf369b355001c9a3c3902
[ "MIT" ]
null
null
null
routes/routes.go
tjtaill/gin-gonic-spike
3ff7b70b952ce10928cdf369b355001c9a3c3902
[ "MIT" ]
null
null
null
package routes import ( _ "github.com/ElementAI/gin-gonic-spike/docs" "github.com/ElementAI/gin-gonic-spike/middleware" "github.com/gin-gonic/gin" "github.com/jinzhu/gorm" ginSwagger "github.com/swaggo/gin-swagger" "github.com/swaggo/gin-swagger/swaggerFiles" ) func Register(router *gin.Engine, db *gorm.DB) error { authMiddleware, rbacMiddleware, err := middleware.Create(db) if err != nil { return err } url := ginSwagger.URL("http://localhost:8080/docs/doc.json") router.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler, url)) loginRoutes(router, authMiddleware) api := router.Group("/api/v1") api.Use(authMiddleware.MiddlewareFunc()) api.Use(*rbacMiddleware) userRoutes(api, db) return nil }
28.115385
76
0.744186
8260583008770db666cf01cc04a49da723c4b3b2
229
sql
SQL
app/lib/db_query/sql/profilesMostFollowers.sql
MichaelCurrin/twitterverse
9629f848377e4346be833db70f11c593cc0d7b6c
[ "MIT" ]
10
2019-03-22T07:07:41.000Z
2022-01-26T00:57:45.000Z
app/lib/db_query/sql/profilesMostFollowers.sql
MichaelCurrin/twitterverse
9629f848377e4346be833db70f11c593cc0d7b6c
[ "MIT" ]
70
2017-07-12T19:49:38.000Z
2020-09-02T10:03:28.000Z
app/lib/db_query/sql/profilesMostFollowers.sql
MichaelCurrin/twitterverse
9629f848377e4346be833db70f11c593cc0d7b6c
[ "MIT" ]
2
2017-06-30T07:13:39.000Z
2020-12-04T00:39:12.000Z
/** * Twitter Profiles, ordered by highest followers first. */ SELECT screen_name, name, verified, followers_count, statuses_count, location, description FROM Profile ORDER BY followers_count DESC;
15.266667
56
0.694323
21c0f4fcee6c878e01201d4660ade4e1b49402bc
637
kt
Kotlin
app/src/main/java/com/example/admin/bigkt/TestWhen.kt
DNF229298806/BigKtDemo
761ed216197c2391e54deaeb60f4b77559237c0e
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/admin/bigkt/TestWhen.kt
DNF229298806/BigKtDemo
761ed216197c2391e54deaeb60f4b77559237c0e
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/example/admin/bigkt/TestWhen.kt
DNF229298806/BigKtDemo
761ed216197c2391e54deaeb60f4b77559237c0e
[ "Apache-2.0" ]
null
null
null
package com.example.admin.bigkt /** * @author Richard_Y_Wang * @des 2018/12/13 21:36 */ var opCount = 0 val UNIX_LINE_SEPARAOR = "\n" const val UNIX_LINE_SEPARAOR1 = "???" fun main(args: Array<String>) { for (i in 1..10) { when { i % 2 == 0 || i % 3 == 0 -> println("i是偶数") i % 10 == 0 -> println("i被10整除") } } val list = listOf("1", "2", "3", "4") println(joinToString(list)) val testString = "Kotlin" //Java TestWhen.lastChar(testString) //Kotlin testString.lastChar() println(testString.lastChar()) } fun String.lastChar(): Char = get(length - 1)
21.233333
55
0.565149
261510acf3e735c92b410f552f23c06c5911055b
8,683
java
Java
java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/NewTestSuiteWizardIterator.java
timfel/netbeans
fa4b0f70def0573f9675fc06108e13b8b6c49c0e
[ "Apache-2.0" ]
1,056
2019-04-25T20:00:35.000Z
2022-03-30T04:46:14.000Z
java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/NewTestSuiteWizardIterator.java
timfel/netbeans
fa4b0f70def0573f9675fc06108e13b8b6c49c0e
[ "Apache-2.0" ]
1,846
2019-04-25T20:50:05.000Z
2022-03-31T23:40:41.000Z
java/testng.ui/src/org/netbeans/modules/testng/ui/wizards/NewTestSuiteWizardIterator.java
timfel/netbeans
fa4b0f70def0573f9675fc06108e13b8b6c49c0e
[ "Apache-2.0" ]
550
2019-04-25T20:04:33.000Z
2022-03-25T17:43:01.000Z
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.netbeans.modules.testng.ui.wizards; import java.awt.Component; import java.io.IOException; import java.util.*; import javax.swing.JComponent; import javax.swing.event.ChangeListener; import org.netbeans.api.java.project.JavaProjectConstants; import org.netbeans.api.project.*; import org.netbeans.api.templates.TemplateRegistration; import org.netbeans.modules.testng.api.TestNGSupport; import org.netbeans.spi.java.project.support.ui.templates.JavaTemplates; import org.netbeans.spi.project.ui.templates.support.Templates; import org.openide.WizardDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.loaders.DataFolder; import org.openide.loaders.DataObject; import org.openide.util.NbBundle; @TemplateRegistration(folder = "UnitTests", position = 1200, content = "../resources/TestNGSuite.xml.template", scriptEngine = "freemarker", displayName = "#TestNGSuite_displayName", description = "/org/netbeans/modules/testng/ui/resources/newTestSuite.html", iconBase = "org/netbeans/modules/testng/ui/resources/testng.gif", category="junit") @NbBundle.Messages("TestNGSuite_displayName=TestNG Test Suite") public final class NewTestSuiteWizardIterator implements WizardDescriptor.InstantiatingIterator<WizardDescriptor> { private transient int index; private transient WizardDescriptor.Panel[] panels; private transient WizardDescriptor wiz; public NewTestSuiteWizardIterator() { } private WizardDescriptor.Panel[] createPanels(final WizardDescriptor wizardDescriptor) { // Ask for Java folders Project project = Templates.getProject(wizardDescriptor); Sources sources = ProjectUtils.getSources(project); SourceGroup[] groups = getTestRoots(sources); if (groups.length == 0) { if (SourceGroupModifier.createSourceGroup(project, JavaProjectConstants.SOURCES_TYPE_JAVA, JavaProjectConstants.SOURCES_HINT_TEST) != null) { groups = getTestRoots(sources); } } if (groups.length == 0) { groups = sources.getSourceGroups(Sources.TYPE_GENERIC); } return new WizardDescriptor.Panel[]{ JavaTemplates.createPackageChooser(project, groups) }; } private String[] createSteps(String[] before, WizardDescriptor.Panel[] panels) { assert panels != null; // hack to use the steps set before this panel processed int diff = 0; if (before == null) { before = new String[0]; } else if (before.length > 0) { diff = ("...".equals(before[before.length - 1])) ? 1 : 0; // NOI18N } String[] res = new String[(before.length - diff) + panels.length]; for (int i = 0; i < res.length; i++) { if (i < (before.length - diff)) { res[i] = before[i]; } else { res[i] = panels[i - before.length + diff].getComponent().getName(); } } return res; } public Set<DataObject> instantiate() throws IOException { FileObject targetFolder = Templates.getTargetFolder(wiz); TestNGSupport.findTestNGSupport(FileOwnerQuery.getOwner(targetFolder)).configureProject(targetFolder); String targetName = Templates.getTargetName(wiz); DataFolder df = DataFolder.findFolder(targetFolder); FileObject template = Templates.getTemplate(wiz); DataObject dTemplate = DataObject.find(template); String pkgName = getSelectedPackageName(targetFolder); String suiteName = pkgName + " suite"; String projectName = ProjectUtils.getInformation(FileOwnerQuery.getOwner(targetFolder)).getName(); if (pkgName == null || pkgName.trim().length() < 1) { pkgName = ".*"; //NOI18N suiteName = "All tests for " + projectName; } Map<String, String> props = new HashMap<String, String>(); props.put("suiteName", projectName); props.put("testName", suiteName); props.put("pkg", pkgName); DataObject dobj = dTemplate.createFromTemplate(df, targetName, props); return Collections.singleton(dobj); } public void initialize(WizardDescriptor wiz) { this.wiz = wiz; index = 0; panels = createPanels(wiz); // Make sure list of steps is accurate. String[] beforeSteps = null; Object prop = wiz.getProperty("WizardPanel_contentData"); // NOI18N if (prop != null && prop instanceof String[]) { beforeSteps = (String[]) prop; } String[] steps = createSteps(beforeSteps, panels); for (int i = 0; i < panels.length; i++) { Component c = panels[i].getComponent(); if (steps[i] == null) { // Default step name to component name of panel. // Mainly useful for getting the name of the target // chooser to appear in the list of steps. steps[i] = c.getName(); } if (c instanceof JComponent) { // assume Swing components JComponent jc = (JComponent) c; // Step #. jc.putClientProperty("WizardPanel_contentSelectedIndex", Integer.valueOf(i)); // NOI18N // Step name (actually the whole list for reference). jc.putClientProperty("WizardPanel_contentData", steps); // NOI18N } } } public void uninitialize(WizardDescriptor wiz) { this.wiz = null; panels = null; } public String name() { return ""; // NOI18N } public boolean hasNext() { return index < panels.length - 1; } public boolean hasPrevious() { return index > 0; } public void nextPanel() { if (!hasNext()) { throw new NoSuchElementException(); } index++; } public void previousPanel() { if (!hasPrevious()) { throw new NoSuchElementException(); } index--; } public WizardDescriptor.Panel current() { return panels[index]; } public final void addChangeListener(ChangeListener l) { } public final void removeChangeListener(ChangeListener l) { } private static String getSelectedPackageName(FileObject targetFolder) { Project project = FileOwnerQuery.getOwner(targetFolder); Sources sources = ProjectUtils.getSources(project); SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); String packageName = null; for (int i = 0; i < groups.length && packageName == null; i++) { packageName = FileUtil.getRelativePath(groups[i].getRootFolder(), targetFolder); } if (packageName != null) { packageName = packageName.replaceAll("/", "."); // NOI18N } return packageName; } private SourceGroup[] getTestRoots(Sources srcs) { SourceGroup[] groups = srcs.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); assert groups != null : "Cannot return null from Sources.getSourceGroups: " + srcs; //XXX - have to filter out regular source roots, there should //be better way to do this... (Hint: use UnitTestForSourceQuery) //${test - Ant based projects //2TestSourceRoot - Maven projects List<SourceGroup> result = new ArrayList<SourceGroup>(2); for (SourceGroup sg : groups) { if (sg.getName().startsWith("${test") || "2TestSourceRoot".equals(sg.getName())) { //NOI18N result.add(sg); } } return result.toArray(new SourceGroup[result.size()]); } }
38.93722
153
0.640908
6239db5b2fbb86f00b1ae95e8fd80dc2ffb3d863
5,970
rs
Rust
src/signature/mod.rs
joseluis/bsv-wasm
67ce940c7c16479257898fa67e414f8a455677a3
[ "MIT" ]
null
null
null
src/signature/mod.rs
joseluis/bsv-wasm
67ce940c7c16479257898fa67e414f8a455677a3
[ "MIT" ]
null
null
null
src/signature/mod.rs
joseluis/bsv-wasm
67ce940c7c16479257898fa67e414f8a455677a3
[ "MIT" ]
null
null
null
use crate::{get_hash_digest, BSVErrors, PublicKey, Sha256r, SigningHash, ECDSA}; use digest::Digest; use ecdsa::signature::{DigestVerifier, Signature as SigTrait}; use elliptic_curve::sec1::*; use k256::{ ecdsa::Signature as SecpSignature, ecdsa::{recoverable, signature::Verifier, VerifyingKey}, EncodedPoint, FieldBytes, Scalar, }; use wasm_bindgen::{convert::OptionIntoWasmAbi, prelude::*, throw_str}; #[wasm_bindgen] #[derive(Debug, Clone, PartialEq, Eq)] pub struct Signature { pub(crate) sig: k256::ecdsa::Signature, pub(crate) recovery_i: u8, } /** * Implementation Methods */ impl Signature { pub(crate) fn from_der_impl(bytes: &[u8], is_recoverable: bool) -> Result<Signature, BSVErrors> { let sig = SecpSignature::from_der(bytes)?; Ok(Signature { sig, recovery_i: is_recoverable as u8, }) } pub(crate) fn from_hex_der_impl(hex: &str, is_recoverable: bool) -> Result<Signature, BSVErrors> { let bytes = hex::decode(hex)?; let sig = SecpSignature::from_der(&bytes)?; Ok(Signature { sig, recovery_i: is_recoverable as u8, }) } pub(crate) fn get_public_key(&self, message: &[u8], hash_algo: SigningHash) -> Result<PublicKey, BSVErrors> { let recovery_id_main = match recoverable::Id::new(self.recovery_i) { Ok(v) => v, Err(e) => { return Err(BSVErrors::PublicKeyRecoveryError( format!("Recovery I ({}) is too large, must be 0 or 1 for this library. {}", self.recovery_i, e), None, )) } }; let recoverable_sig = recoverable::Signature::new(&self.sig, recovery_id_main)?; let message_digest = get_hash_digest(hash_algo, message); let verify_key = match recoverable_sig.recover_verify_key_from_digest(message_digest) { Ok(v) => v, Err(e) => { return Err(BSVErrors::PublicKeyRecoveryError(format!("Signature Hex: {} Id: {}", self.to_hex(), self.recovery_i), Some(e))); } }; let pub_key = PublicKey::from_bytes_impl(&verify_key.to_bytes().to_vec())?; Ok(pub_key) } pub(crate) fn from_compact_impl(compact_bytes: &[u8]) -> Result<Signature, BSVErrors> { // 27-30: P2PKH uncompressed // 31-34: P2PKH compressed let i = match compact_bytes[0] - 27 { x if x > 4 => x - 4, x => x, }; let r = Scalar::from_bytes_reduced(FieldBytes::from_slice(&compact_bytes[1..33])); let s = Scalar::from_bytes_reduced(FieldBytes::from_slice(&compact_bytes[33..65])); let sig = SecpSignature::from_scalars(r, s)?; Ok(Signature { sig, recovery_i: i }) } } #[wasm_bindgen] impl Signature { #[wasm_bindgen(js_name = toHex)] pub fn to_hex(&self) -> String { let bytes = self.sig.to_der(); hex::encode(bytes) } #[wasm_bindgen(js_name = toDER)] pub fn to_der_bytes(&self) -> Vec<u8> { let bytes = self.sig.to_der(); bytes.as_bytes().to_vec() } #[wasm_bindgen(js_name = toCompactBytes)] pub fn to_compact_bytes(&self) -> Vec<u8> { // Need to handle compression? let mut compact_buf = vec![self.recovery_i + 27 + 4]; let r_bytes = &*self.sig.r().to_bytes(); compact_buf.extend_from_slice(r_bytes); let s_bytes = &*self.sig.s().to_bytes(); compact_buf.extend_from_slice(s_bytes); compact_buf } #[wasm_bindgen(js_name = verifyMessage)] pub fn verify_message(&self, message: &[u8], pub_key: &PublicKey) -> bool { ECDSA::verify_digest_impl(message, pub_key, self, SigningHash::Sha256).is_ok() } } /** * WASM Exported Methods */ #[cfg_attr(target_arch = "wasm32", wasm_bindgen)] #[cfg(target_arch = "wasm32")] impl Signature { #[cfg_attr(target_arch = "wasm32", wasm_bindgen(js_name = fromDER))] pub fn from_der(bytes: &[u8], is_recoverable: bool) -> Result<Signature, JsValue> { Signature::from_der_impl(bytes, is_recoverable).map_err(|e| throw_str(&e.to_string())) } #[cfg_attr(target_arch = "wasm32", wasm_bindgen(js_name = fromHexDER))] pub fn from_hex_der(hex: &str, is_recoverable: bool) -> Result<Signature, JsValue> { match Signature::from_hex_der_impl(hex, is_recoverable) { Ok(v) => Ok(v), Err(e) => throw_str(&e.to_string()), } } #[wasm_bindgen(js_name = fromCompactBytes)] pub fn from_compact_bytes(compact_bytes: &[u8]) -> Result<Signature, JsValue> { match Signature::from_compact_impl(compact_bytes) { Ok(v) => Ok(v), Err(e) => throw_str(&e.to_string()), } } #[wasm_bindgen(js_name = recoverPublicKey)] pub fn recover_public_key(&self, message: &[u8], hash_algo: SigningHash) -> Result<PublicKey, JsValue> { match Signature::get_public_key(&self, &message, hash_algo) { Ok(v) => Ok(v), Err(e) => throw_str(&e.to_string()), } } } /** * Native Exported Methods */ #[cfg(not(target_arch = "wasm32"))] impl Signature { #[cfg(not(target_arch = "wasm32"))] pub fn from_der(bytes: &[u8], is_recoverable: bool) -> Result<Signature, BSVErrors> { Signature::from_der_impl(bytes, is_recoverable) } #[cfg(not(target_arch = "wasm32"))] pub fn from_hex_der(hex: &str, is_recoverable: bool) -> Result<Signature, BSVErrors> { Signature::from_hex_der_impl(hex, is_recoverable) } pub fn from_compact_bytes(compact_bytes: &[u8]) -> Result<Signature, BSVErrors> { Signature::from_compact_impl(compact_bytes) } #[cfg(not(target_arch = "wasm32"))] pub fn recover_public_key(&self, message: &[u8], hash_algo: SigningHash) -> Result<PublicKey, BSVErrors> { Signature::get_public_key(self, message, hash_algo) } }
33.166667
140
0.616248
f187bccdccead7b69c1c784e654ec309458e1557
130
rb
Ruby
db/migrate/20141018175154_remove_hidden_note_from_gifts.rb
aligature/wishlist
66b6acc4f13c53e56ef984f151d1a40fb769f7f8
[ "Apache-2.0" ]
null
null
null
db/migrate/20141018175154_remove_hidden_note_from_gifts.rb
aligature/wishlist
66b6acc4f13c53e56ef984f151d1a40fb769f7f8
[ "Apache-2.0" ]
null
null
null
db/migrate/20141018175154_remove_hidden_note_from_gifts.rb
aligature/wishlist
66b6acc4f13c53e56ef984f151d1a40fb769f7f8
[ "Apache-2.0" ]
1
2018-07-28T00:49:59.000Z
2018-07-28T00:49:59.000Z
class RemoveHiddenNoteFromGifts < ActiveRecord::Migration def change remove_column :gifts, :hidden_note, :string end end
21.666667
57
0.776923
969366fdb0c58035e879b7911e81e7405072bd20
1,482
html
HTML
src/app/shared/layout/header/notification-modal/notification-modal.component.html
IT-Academy-Social-Projects-KRV/Mentor4you_Angular
2147629691bbd14352c1d8e4ff3fa320dca42702
[ "MIT" ]
null
null
null
src/app/shared/layout/header/notification-modal/notification-modal.component.html
IT-Academy-Social-Projects-KRV/Mentor4you_Angular
2147629691bbd14352c1d8e4ff3fa320dca42702
[ "MIT" ]
1
2021-08-24T10:07:38.000Z
2021-08-24T10:07:38.000Z
src/app/shared/layout/header/notification-modal/notification-modal.component.html
IT-Academy-Social-Projects-KRV/Mentor4you_Angular
2147629691bbd14352c1d8e4ff3fa320dca42702
[ "MIT" ]
null
null
null
<ng-container *ngIf="display$ | async as display"> <div class="container"> <section [class.open]="display === 'open'" (click)="close()"> <div (click)="$event.stopPropagation()"> <button class="close" type="button" (click)="close()"><i class="fas fa-times"></i></button> <h1 class="mentorship-request__title">Requesting mentorship</h1> <hr> <ng-container *ngIf="modalService.isNewNotification$ | async; else NoNotification"> <div class="mentorship-request__users"> <ng-container *ngIf="auth.isMentor"> <app-mentorship-request *ngFor="let mentee of mentees$ | async" [mentee]="mentee" (approveIgnoreRequest)="approveIgnoreRequest($event)" > </app-mentorship-request> </ng-container> <ng-container *ngIf="auth.isMentee"> <app-mentorship-approve *ngFor="let mentor of mentors$ | async" [mentorCooperation]="mentor" (moderatorDetails)="moderatorNavigate($event)" (deleteNotificationRequest)="deleteNotificationRequest($event)" > </app-mentorship-approve> </ng-container> </div> </ng-container> <ng-template #NoNotification> <h2 class="no-request">No new notifications</h2> </ng-template> </div> </section> </div> </ng-container>
41.166667
99
0.556005
2a4740db2d03b8956d397623306afc662654e50b
404
java
Java
sample/app/src/main/java/demo/jaop/sample/Zoo.java
ltshddx/jaop
190385523cd48fc90b32d5f1f2bae9f9e3c5ba84
[ "Apache-2.0" ]
125
2015-12-31T13:26:58.000Z
2021-12-09T03:44:43.000Z
sample/app/src/main/java/demo/jaop/sample/Zoo.java
2017398956/jaop
190385523cd48fc90b32d5f1f2bae9f9e3c5ba84
[ "Apache-2.0" ]
5
2016-09-23T10:01:02.000Z
2018-02-24T09:58:02.000Z
sample/app/src/main/java/demo/jaop/sample/Zoo.java
2017398956/jaop
190385523cd48fc90b32d5f1f2bae9f9e3c5ba84
[ "Apache-2.0" ]
31
2015-12-31T11:06:45.000Z
2020-06-10T11:58:15.000Z
package demo.jaop.sample; import android.util.Log; /** * Created by liting06 on 16/1/20. */ public class Zoo extends Foo { public Zoo() { Log.e("init", "Zoo"); } public Zoo(String s) { super(s); Log.e("init", "Zoo whit param"); } static { Log.e("init", "static"); } @Override public void say() { Log.e("Zoo", "Zoo"); } }
14.962963
40
0.5
cb7054c01f3d04f33b5a0ec78b1110ce0ba60d2a
10,370
html
HTML
niushop/template/platform/Activity/activityDetail.html
caorui33707/ruikun
3169f4d4c5eea45d93e47a85452b5c92b691ab7f
[ "Apache-2.0" ]
null
null
null
niushop/template/platform/Activity/activityDetail.html
caorui33707/ruikun
3169f4d4c5eea45d93e47a85452b5c92b691ab7f
[ "Apache-2.0" ]
null
null
null
niushop/template/platform/Activity/activityDetail.html
caorui33707/ruikun
3169f4d4c5eea45d93e47a85452b5c92b691ab7f
[ "Apache-2.0" ]
null
null
null
{extend name="platform/base" /} {block name="resources"/} <style type="text/css"> </style> {/block} {block name="main"} <div class="row padder-v"> <div class="col-sm-4"> <button class="btn btn-sm btn-default" type="button" onclick="deleteCount()">批量删除</button> </div> <div class="col-sm-2"> <input type="text" id="item_name" class="input-sm form-control" placeholder="请输入商品名称"> </div> <div class="col-sm-2"> <input type="text" id="shop_name" class="input-sm form-control" placeholder="请输入店铺名称"> </div> <div class="col-sm-2"> <div style="width:25%;float:left;line-height: 30px;">审核状态</div> <select class="input-sm form-control" id="activity_detail_state" style="width:75%;float:left;"> <option value="">全部</option> <option value="0">待审核</option> <option value="1">通过</option> <option value="2">未通过</option> </select> </div> <div class="col-sm-1"> <button class="btn btn-sm btn-default" type="button" onclick="LoadingInfo(1)">搜索</button> </div> </div> <section class="panel panel-default"> <div class="table-responsive"> <table class="table table-striped b-t b-light text-sm"> <thead> <tr> <th width="20"><input type="checkbox"></th> <th class="center">排序</th> <th class="center">商品名称</th> <th class="center">所属店铺</th> <th class="center">状态</th> <th class="center">操作</th> </tr> </thead> <tbody id="list"> <tr></tr> </tbody> </table> </div> {include file="platform/page" /} </section> {/block} {block name="script"} <script type="text/javascript"> var activity_id = "{$activity_id}"; $(function(){ LoadingInfo(1); }); function LoadingInfo(page_index) { var item_name = $("#item_name").val(); var shop_name = $("#shop_name").val(); var activity_detail_state = $("#activity_detail_state").val(); $.ajax({ type : "post", url : "{:__URL('PLATFORM_MAIN/activity/activityDetail')}", async : true, data : { "page_index" : page_index, "item_name" : item_name, "shop_name" : shop_name, "activity_id" : activity_id, "activity_detail_state" : activity_detail_state }, success : function(data) { // alert(JSON.stringify(data)); var html = ''; $("#total_count_num").text(data["total_count"]); $("#page_count_num").text(data["page_count"]); $("#page_count").val(data["page_count"]); $("#pageNumber a").remove(); if (data["data"].length > 0) { for (var i = 0; i < data["data"].length; i++) { html += '<tr align="center">'; html += '<td><div class="cell"><label ><input name="sub" type="checkbox" value="'+ data['data'][i]["activity_detail_id"]+'" ></label></div></td>'; html += '<td class="center"><input style="width:50px;" type="text" id="sort" value="' + data['data'][i]["activity_detail_sort"] + '" onchange="setSort('+data["data"][i]["activity_detail_id"]+',this);"/></td>'; html += '<td >'+ data['data'][i]["item_name"]+'</td>'; // html += '<td >'+ data['data'][i]["shop_name"]+'</td>'; if(data['data'][i]["activity_detail_state"] == 0){ html += '<td>待审核</td>'; }else if(data['data'][i]["activity_detail_state"] == 1){ html += '<td>通过</td>'; }else if(data['data'][i]["activity_detail_state"] == 2){ html += '<td>未通过</td>'; }else if(data['data'][i]["activity_detail_state"] == 3){ html += '<td>已开始</td>'; }else if(data['data'][i]["activity_detail_state"] == 4){ html += '<td>已结束</td>'; } if(data['data'][i]["activity_detail_state"] == 0){ html += '<td><a href="javascript:passHandle('+data['data'][i]['activity_detail_id']+');">通过&nbsp;|</a> <a href="javascript:refuseHandle('+data['data'][i]['activity_detail_id']+');">未通过&nbsp;|</a> <a href="javascript:deleteHandle('+data['data'][i]['activity_detail_id']+');">删除&nbsp;|</a></td>'; }else if(data['data'][i]["activity_detail_state"] == 1){ html += '<td><a href="javascript:refuseHandle('+data['data'][i]['activity_detail_id']+');">未通过</a></td>'; }else if(data['data'][i]["activity_detail_state"] == 2){ html += '<td><a href="javascript:passHandle('+data['data'][i]['activity_detail_id']+');">通过&nbsp;|</a> <a href="javascript:deleteHandle('+data['data'][i]['activity_detail_id']+');">删除&nbsp;|</a></td>'; }else if(data['data'][i]["activity_detail_state"] == 3 || data['data'][i]["activity_detail_state"] == 4){ html += '<td></td>'; }else{ html += '<td></td>'; } html += '</tr>'; } } else { html += '<tr align="center"><th colspan="5">暂无符合条件的数据记录</th></tr>'; } $("#list").html(html); var totalpage = $("#page_count").val(); if (totalpage == 1) { changeClass("all"); } var $html = pagenumShow(jumpNumber,totalpage,{$pageshow}) $("#pageNumber").append($html); } }); } //全选 function CheckAll(event){ var checked = event.checked; $(".style0list tbody input[type = 'checkbox']").prop("checked",checked); } //通过审核 function passHandle(activity_detail_id){ $.ajax({ type : "post", url : "{:__URL('PLATFORM_MAIN/activity/passHandle')}", data : { 'activity_detail_id' : activity_detail_id }, async : true, success : function(data) { if (data['code'] > 0) { showMessage('success', '审核成功'); location.href=__URL("PLATFORM_MAIN/activity/activityDetail?activity_id="+activity_id); } else { showMessage('error', '审核失败'); } } }); } //拒绝通过 function refuseHandle(activity_detail_id){ $.ajax({ type : "post", url : "{:__URL('PLATFORM_MAIN/activity/refuseHandle')}", data : { 'activity_detail_id' : activity_detail_id }, success : function(data) { if (data['code'] > 0) { showMessage('success', '拒绝成功'); location.href=__URL("PLATFORM_MAIN/activity/activityDetail?activity_id="+activity_id); } else { showMessage('error', '拒绝失败'); } } }); } //删除 function deleteHandle(activity_detail_id){ $.ajax({ type : "post", url : "PLATFORM_MAIN/activity/deleteActivityDetail", data : { 'activity_detail_id' : activity_detail_id }, success : function(data) { if (data['code'] > 0) { showMessage('success', '删除成功'); location.href="PLATFORM_MAIN/activity/activityDetail?activity_id="+activity_id; } else { showMessage('error', '删除失败'); } } }); } // //批量删除 // function aaa(){ // var activity_detail_ids = new array(); // $("#list input[type='checkbox']:checked").each(function() // { // if (!isNaN($(this).val())) { // activity_detail_ids.push($(this).val()); // alert(JSON.stringify(activity_detail_ids)); // return false; // var state = $(this).attr("state"); // if(state != -1){ // $( "#dialog" ).dialog({ // buttons: { // "确定,#e57373": function() { // $(this).dialog('close'); // } // }, // contentText:"记录中包含非待审核状态的商品", // title:"消息提醒", // }); // return false; // } // goods_ids = $(this).val() + "," + goods_ids; // } // }); // goods_ids = goods_ids.substring(0, goods_ids.length - 1); // // if(goods_ids == ""){ // $( "#dialog" ).dialog({ // buttons: { // "确定,#e57373": function() { // $(this).dialog('close'); // } // }, // contentText:"请选择需要操作的记录", // title:"消息提醒", // }); // return false; // } // modifyGoodsOnline(goods_ids,status); // } function setSort(id,e){ var sortVal = $(e).val(); $.ajax({ type:"post", url:"PLATFORM_MAIN/activity/setActivityDetailSort", data:{ 'activity_detail_id' : id, 'activity_detail_sort' : sortVal }, async:true, success: function (data) { if(data['code'] > 0){ showMessage('success', '修改成功'); location.href="PLATFORM_MAIN/activity/activityDetail?activity_id="+activity_id; }else{ showMessage('error', '修改失败'); location.href="PLATFORM_MAIN/activity/activityDetail?activity_id="+activity_id; } } }); } </script> {/block}
39.132075
322
0.448312
c09e0a330412418e1b854c6f05180ae936743661
1,006
sql
SQL
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uaocs_mvcc/readcommit/readcommit_concurr_vacuum_vacuum/sql/2.sql
sridhargoudrangu/gpdb
0783892116708662d7fe7ef4f307197de40ecc04
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uaocs_mvcc/readcommit/readcommit_concurr_vacuum_vacuum/sql/2.sql
sridhargoudrangu/gpdb
0783892116708662d7fe7ef4f307197de40ecc04
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/uao/uaocs_mvcc/readcommit/readcommit_concurr_vacuum_vacuum/sql/2.sql
sridhargoudrangu/gpdb
0783892116708662d7fe7ef4f307197de40ecc04
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
-- @Description UAOCS MVCC readcommit and vacuum + vacuum -- Transaction 2 of 2 (vacuum) -- select pg_sleep(3); insert into sto_uaocs_mvcc_status (workload, script) values('readcommit_concurr_vacuum_vacuum', 't2_insert_tuples'); select count(*) as only_visi_rows from sto_uaocs_mvcc_vacuum2; set gp_select_invisible = true; select count(*) as visi_and_invisi_rows from sto_uaocs_mvcc_vacuum2; set gp_select_invisible = false; update sto_uaocs_mvcc_status set updover = CURRENT_TIMESTAMP where workload='readcommit_concurr_vacuum_vacuum' AND script='t2_insert_tuples'; set transaction isolation level READ COMMITTED; vacuum full sto_uaocs_mvcc_vacuum2 ; update sto_uaocs_mvcc_status set endtime = CURRENT_TIMESTAMP where workload='readcommit_concurr_vacuum_vacuum' AND script='t2_insert_tuples'; select count(*) as only_visi_rows from sto_uaocs_mvcc_vacuum2; set gp_select_invisible = true; select count(*) as visi_and_invisi_rows from sto_uaocs_mvcc_vacuum2; set gp_select_invisible = false;
34.689655
116
0.826044
40df310583a9dc504ab5d4ae5d40a203fef20b5e
27,380
py
Python
tests/test_make_phyla_plots_AGP.py
JWDebelius/American-Gut
ed2479a5951946ed977a5916444b51c34c48e60c
[ "BSD-3-Clause-Clear" ]
92
2015-02-25T18:33:56.000Z
2021-12-10T07:47:40.000Z
tests/test_make_phyla_plots_AGP.py
JWDebelius/American-Gut
ed2479a5951946ed977a5916444b51c34c48e60c
[ "BSD-3-Clause-Clear" ]
96
2015-02-24T17:21:58.000Z
2018-12-10T19:40:53.000Z
tests/test_make_phyla_plots_AGP.py
JWDebelius/American-Gut
ed2479a5951946ed977a5916444b51c34c48e60c
[ "BSD-3-Clause-Clear" ]
67
2015-02-25T20:53:16.000Z
2022-03-11T14:02:16.000Z
#!/usr/bin/env python from __future__ import division from unittest import TestCase, main from StringIO import StringIO from numpy import array from numpy.testing import assert_almost_equal from biom import Table from matplotlib.transforms import Bbox from americangut.make_phyla_plots import (map_to_2D_dict, identify_most_common_categories, summarize_common_categories, calculate_dimensions_rectangle, calculate_dimensions_bar, translate_colors) __author__ = "Justine Debelius" __copyright__ = "Copyright 2013, The American Gut Project" __credits__ = ["Justine Debelius", "Adam Robbins-Pianka"] __license__ = "BSD" __version__ = "unversioned" __maintainer__ = "Justine Debelius" __email__ = "Justine.Debelius@colorado.edu" class MakePhylaPlotsAGPTest(TestCase): def setUp(self): # Creates an otu table for testing which corresponds with the sample_ids = ['00010', '00100', '00200', '00111', '00112', '00211'] observation_ids = ['1001', '2001', '2002', '2003', '3001', '3003', '4001', '5001', '6001', '7001', '8001', '9001', '9002', '9003'] observation_md = [{'taxonomy': (u'k__Bacteria', u'p__Bacteroidetes', u'c__Bacteroidia')}, {'taxonomy': (u'k__Bacteria', u'p__Firmicutes', u'c__Clostridia')}, {'taxonomy': (u'k__Bacteria', u'p__Firmicutes', u'c__Erysipelotrichi')}, {'taxonomy': (u'k__Bacteria', u'p__Firmicutes', u'c__Bacilli')}, {'taxonomy': (u'k__Bacteria', u'p__Proteobacteria', u'c__Alphaproteobacteria')}, {'taxonomy': (u'k__Bacteria', u'p__Proteobacteria', u'c__Gammaproteobacteria')}, {'taxonomy': (u'k__Bacteria', u'p__Tenericutes', u'c__Mollicutes')}, {'taxonomy': (u'k__Bacteria', u'p__Actinobacteria', u'c__Coriobacteriia')}, {'taxonomy': (u'k__Bacteria', u'p__Verrucomicrobia', u'c__Verrucomicrobiae')}, {'taxonomy': (u'k__Bacteria', u'p__Cyanobacteria', u'c__4C0d-2')}, {'taxonomy': (u'k__Bacteria', u'p__Fusobacteria', u'c__Fusobacteriia')}, {'taxonomy': (u'k__Bacteria', u'p__TM7', u'c__TM7-2')}, {'taxonomy': (u'k__Bacteria', u'p__Acidobacteria', u'c__Chloracidobacteria')}, {'taxonomy': (u'k__Bacteria', u'p__', u'c__')}] data = array([[ 1691, 3004, 18606, 6914, 1314, 22843], [ 2019, 1091, 8163, 1112, 738, 2362], [ 67, 4, 2835, 310, 85, 161], [ 731, 407, 18240, 1924, 492, 522], [ 8, 1, 0, 53, 8, 275], [ 105, 179, 0, 504, 79, 2771], [ 451, 0, 0, 33, 0, 0], [ 282, 60, 106, 11, 0, 0], [ 113, 481, 2658, 22, 146, 0], [ 6, 120, 0, 0, 0, 0], [ 45, 0, 106, 0, 0, 1523], [ 39, 341, 1761, 139, 18, 0], [ 21, 268, 153, 8, 15, 0], [ 59, 51, 531, 120, 25, 0]]) self.otu_table = Table(data, observation_ids, sample_ids, observation_metadata=observation_md) self.common_cats = [(u'k__Bacteria', u'p__Firmicutes'), (u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Proteobacteria'), (u'k__Bacteria', u'p__Actinobacteria'), (u'k__Bacteria', u'p__Verrucomicrobia'), (u'k__Bacteria', u'p__Tenericutes'), (u'k__Bacteria', u'p__Cyanobacteria'), (u'k__Bacteria', u'p__Fusobacteria')] def test_map_to_2D_dict(self): """Checks map_to_2D_dict is sane""" # Creates a pseudo-opening function test_map = StringIO( '#SampleID\tBIRTH_YEAR\tDEATH_YEAR\tSEX\tPROFESSION\tHOME_STATE\n' '00010\t1954\t2006\tmale\tMechanic\tKansas\n' '00100\t1954\t1983\tfemale\tHunter\tKansas\n' '00200\tNA\t2009\tfemale\tNurse\tMinnesota\n' '00111\t1979\t2007\tmale\tHunter\tImpala\n' '00112\t1983\t2006\tmale\tHunter\tImpala\n' '00211\t1990\t2009\tmale\tStudent\tMinnesota\n') # Sets up the known dictionary known_dict = {'00010': {'#SampleID': '00010', 'BIRTH_YEAR': '1954', 'DEATH_YEAR': '2006', 'SEX': 'male', 'PROFESSION': 'Mechanic', 'HOME_STATE': 'Kansas'}, '00100': {'#SampleID': '00100', 'BIRTH_YEAR': '1954', 'DEATH_YEAR': '1983', 'SEX': 'female', 'PROFESSION': 'Hunter', 'HOME_STATE': 'Kansas'}, '00200': {'#SampleID': '00200', 'BIRTH_YEAR': 'NA', 'DEATH_YEAR': '2009', 'SEX': 'female', 'PROFESSION': 'Nurse', 'HOME_STATE': 'Minnesota'}, '00111': {'#SampleID': '00111', 'BIRTH_YEAR': '1979', 'DEATH_YEAR': '2007', 'SEX': 'male', 'PROFESSION': 'Hunter', 'HOME_STATE': 'Impala'}, '00112': {'#SampleID': '00112', 'BIRTH_YEAR': '1983', 'DEATH_YEAR': '2006', 'SEX': 'male', 'PROFESSION': 'Hunter', 'HOME_STATE': 'Impala'}, '00211': {'#SampleID': '00211', 'BIRTH_YEAR': '1990', 'DEATH_YEAR': '2009', 'SEX': 'male', 'PROFESSION': 'Student', 'HOME_STATE': 'Minnesota'}} # Checks the test dictionary is loaded properly and equals the known test_dict = map_to_2D_dict(test_map) self.assertEqual(test_dict, known_dict) def test_identify_most_common_categories(self): """Tests that indentify_most_common_categories is sane""" # Sets up known values known_cats_comp = [(u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Firmicutes'), (u'k__Bacteria', u'p__Proteobacteria'), (u'k__Bacteria', u'p__Verrucomicrobia'), (u'k__Bacteria', u'p__TM7'), (u'k__Bacteria', u'p__Acidobacteria'), (u'k__Bacteria', u'p__Actinobacteria'), (u'k__Bacteria', u'p__'), (u'k__Bacteria', u'p__Fusobacteria')] known_cats_aver = [(u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Firmicutes')] known_cat_count = [(u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Firmicutes'), (u'k__Bacteria', u'p__Proteobacteria'), (u'k__Bacteria', u'p__Verrucomicrobia'), (u'k__Bacteria', u'p__TM7'), (u'k__Bacteria', u'p__Acidobacteria'), (u'k__Bacteria', u'p__'), (u'k__Bacteria', u'p__Actinobacteria')] known_cats_none = [(u'k__Bacteria', u'p__'), (u'k__Bacteria', u'p__Acidobacteria'), (u'k__Bacteria', u'p__Actinobacteria'), (u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Cyanobacteria'), (u'k__Bacteria', u'p__Firmicutes'), (u'k__Bacteria', u'p__Fusobacteria'), (u'k__Bacteria', u'p__Proteobacteria'), (u'k__Bacteria', u'p__TM7'), (u'k__Bacteria', u'p__Tenericutes'), (u'k__Bacteria', u'p__Verrucomicrobia')] known_scores_comp = [[(u'k__Bacteria', u'p__Bacteroidetes'), 0.4950, 1.0000, 4950.00], [(u'k__Bacteria', u'p__Firmicutes'), 0.3584, 1.0000, 3584.00], [(u'k__Bacteria', u'p__Proteobacteria'), 0.0383, 0.8333, 319.15], [(u'k__Bacteria', u'p__Verrucomicrobia'), 0.0337, 0.8333, 280.82], [(u'k__Bacteria', u'p__TM7'), 0.0192, 0.8333, 159.99], [(u'k__Bacteria', u'p__Acidobacteria'), 0.0095, 0.8333, 79.16], [(u'k__Bacteria', u'p__Actinobacteria'), 0.0105, 0.6667, 70.00], [(u'k__Bacteria', u'p__'), 0.0080, 0.8333, 66.66], [(u'k__Bacteria', u'p__Fusobacteria'), 0.0100, 0.5000, 50.00], [(u'k__Bacteria', u'p__Tenericutes'), 0.0138, 0.3333, 46.00], [(u'k__Bacteria', u'p__Cyanobacteria'), 0.0035, 0.3333, 11.67]] known_scores_aver = [[(u'k__Bacteria', u'p__Bacteroidetes'), 0.4950, 1.0000, 4950.00], [(u'k__Bacteria', u'p__Firmicutes'), 0.3584, 1.0000, 3584.00], [(u'k__Bacteria', u'p__Proteobacteria'), 0.0383, 0.8333, 319.15], [(u'k__Bacteria', u'p__Verrucomicrobia'), 0.0337, 0.8333, 280.82], [(u'k__Bacteria', u'p__TM7'), 0.0192, 0.8333, 159.99], [(u'k__Bacteria', u'p__Tenericutes'), 0.0138, 0.3333, 46.00], [(u'k__Bacteria', u'p__Actinobacteria'), 0.0105, 0.6667, 70.00], [(u'k__Bacteria', u'p__Fusobacteria'), 0.0100, 0.5000, 50.00], [(u'k__Bacteria', u'p__Acidobacteria'), 0.0095, 0.8333, 79.16], [(u'k__Bacteria', u'p__'), 0.0080, 0.8333, 66.66], [(u'k__Bacteria', u'p__Cyanobacteria'), 0.0035, 0.3333, 11.67]] known_score_count = [[(u'k__Bacteria', u'p__Bacteroidetes'), 0.4950, 1.0000, 4950.00], [(u'k__Bacteria', u'p__Firmicutes'), 0.3584, 1.0000, 3584.00], [(u'k__Bacteria', u'p__Proteobacteria'), 0.0383, 0.8333, 319.15], [(u'k__Bacteria', u'p__Verrucomicrobia'), 0.0337, 0.8333, 280.82], [(u'k__Bacteria', u'p__TM7'), 0.0192, 0.8333, 159.99], [(u'k__Bacteria', u'p__Acidobacteria'), 0.0095, 0.8333, 79.16], [(u'k__Bacteria', u'p__'), 0.0080, 0.8333, 66.66], [(u'k__Bacteria', u'p__Actinobacteria'), 0.0105, 0.6667, 70.00], [(u'k__Bacteria', u'p__Fusobacteria'), 0.0100, 0.5000, 50.00], [(u'k__Bacteria', u'p__Tenericutes'), 0.0138, 0.3333, 46.00], [(u'k__Bacteria', u'p__Cyanobacteria'), 0.0035, 0.3333, 11.67]] known_scores_none = [[(u'k__Bacteria', u'p__'), 0.0080, 0.8333, 66.66], [(u'k__Bacteria', u'p__Acidobacteria'), 0.0095, 0.8333, 79.16], [(u'k__Bacteria', u'p__Actinobacteria'), 0.0105, 0.6667, 70.00], [(u'k__Bacteria', u'p__Bacteroidetes'), 0.4950, 1.0000, 4950.00], [(u'k__Bacteria', u'p__Cyanobacteria'), 0.0035, 0.3333, 11.67], [(u'k__Bacteria', u'p__Firmicutes'), 0.3584, 1.0000, 3584.00], [(u'k__Bacteria', u'p__Fusobacteria'), 0.0100, 0.5000, 50.00], [(u'k__Bacteria', u'p__Proteobacteria'), 0.0383, 0.8333, 319.15], [(u'k__Bacteria', u'p__TM7'), 0.0192, 0.8333, 159.99], [(u'k__Bacteria', u'p__Tenericutes'), 0.0138, 0.3333, 46.00], [(u'k__Bacteria', u'p__Verrucomicrobia'), 0.0337, 0.8333, 280.82]] # Tests code [test_cats_none, test_scores_none] = \ identify_most_common_categories(biom_table=self.otu_table, level=2, metadata_category='taxonomy', limit_mode='NONE') [test_cats_comp, test_scores_comp] = \ identify_most_common_categories(biom_table=self.otu_table, level=2, metadata_category='taxonomy', limit_mode='COMPOSITE', limit=49) [test_cats_aver, test_scores_aver] = \ identify_most_common_categories(biom_table=self.otu_table, level=2, metadata_category='taxonomy', limit_mode='AVERAGE', limit=0.1) [test_cat_count, test_score_count] = \ identify_most_common_categories(biom_table=self.otu_table, level=2, metadata_category='taxonomy', limit_mode='COUNTS', limit=0.5) # Checks that appropriate errors are called with self.assertRaises(ValueError): identify_most_common_categories(biom_table=self.otu_table, level=2, limit_mode='This is a test') with self.assertRaises(ValueError): identify_most_common_categories(biom_table=self.otu_table, level=2, limit=100000) # Checks that output values are correct self.assertEqual(test_cats_none, known_cats_none) self.assertEqual(test_scores_none, known_scores_none) self.assertEqual(test_cats_comp, known_cats_comp) self.assertEqual(test_scores_comp, known_scores_comp) self.assertEqual(test_cats_aver, known_cats_aver) self.assertEqual(test_scores_aver, known_scores_aver) self.assertEqual(test_cat_count, known_cat_count) self.assertEqual(test_score_count, known_score_count) def test_summarize_common_categories(self): """Checks that summarize_common_categories is sane""" # Defines the known values known_ids = ('00010', '00100', '00200', '00111', '00112', '00211') table_known = array([[ 0.49973390, 0.25004162, 0.55001035, 0.30008969, 0.45034247, 0.09997702], [ 0.29998226, 0.50008324, 0.35000658, 0.62008969, 0.45000000, 0.75000821], [ 0.02004612, 0.02996504, 0.00000000, 0.04995516, 0.02979452, 0.10000985], [ 0.05002661, 0.00998835, 0.00199402, 0.00098655, 0.00000000, 0.00000000], [ 0.02004612, 0.08007325, 0.05000094, 0.00197309, 0.05000000, 0.00000000], [ 0.08000710, 0.00000000, 0.00000000, 0.00295964, 0.00000000, 0.00000000], [ 0.00106440, 0.01997669, 0.00000000, 0.00000000, 0.00000000, 0.00000000], [ 0.00798297, 0.00000000, 0.00199402, 0.00000000, 0.00000000, 0.05000492], [ 0.02111052, 0.10987182, 0.04599409, 0.02394619, 0.01986301, 0.00000000]]) known_common_cats = [(u'k__Bacteria', u'p__Firmicutes'), (u'k__Bacteria', u'p__Bacteroidetes'), (u'k__Bacteria', u'p__Proteobacteria'), (u'k__Bacteria', u'p__Actinobacteria'), (u'k__Bacteria', u'p__Verrucomicrobia'), (u'k__Bacteria', u'p__Tenericutes'), (u'k__Bacteria', u'p__Cyanobacteria'), (u'k__Bacteria', u'p__Fusobacteria'), (u'k__Bacteria', u'p__Other')] # Checks that appropriate errors are raised when the wrong type of # argument is passed. with self.assertRaises(ValueError): summarize_common_categories(biom_table=self.otu_table, level=2, common_categories=self.common_cats, metadata_category='Billy_Joel_Song') # Calculates the test values [test_ids, test_table, test_common_cats] = \ summarize_common_categories(biom_table=self.otu_table, level=2, common_categories=self.common_cats) # Checks that all the outputs are correct self.assertEqual(tuple(test_ids), known_ids) assert_almost_equal(test_table, table_known, decimal=4) self.assertEqual(test_common_cats, known_common_cats) def test_calculate_dimensions_rectangle(self): """Checcks calculate_dimensions_rectangle is sane""" # Sets up known values known_figure_dimensions_def = (5.2, 4.45) known_axis_dimensions_def = Bbox(array([[0.01923077, 0.02247191], [0.78846154, 0.92134831]])) known_figure_dims_in = (4.2, 3.45) known_axis_dims_in = Bbox(array([[0.26190476, 0.31884058], [0.73809524, 0.89855072]])) known_figure_dims_cm = (1.6535433, 1.3582677) known_axis_dims_cm = Bbox(array([[0.26190476, 0.31884058], [0.73809524, 0.89855072]])) # Sets up test values test_axis_side = 2 test_border = 0.1 test_xlab = 1 test_ylab = 1 # Tests that an error is raised if the units are not sane with self.assertRaises(ValueError): calculate_dimensions_rectangle(unit='Demons') # Calculates the test values (test_axis_df, test_fig_df) = calculate_dimensions_rectangle() (test_axis_in, test_fig_in) = \ calculate_dimensions_rectangle(axis_width=test_axis_side, axis_height=test_axis_side, border=test_border, xlab=test_xlab, ylab=test_ylab) (test_axis_cm, test_fig_cm) = \ calculate_dimensions_rectangle(axis_width=test_axis_side, axis_height=test_axis_side, border=test_border, xlab=test_xlab, ylab=test_ylab, unit='cm') assert_almost_equal(test_fig_df, known_figure_dimensions_def, decimal=5) assert_almost_equal(test_axis_df, known_axis_dimensions_def, decimal=5) assert_almost_equal(test_fig_in, known_figure_dims_in, decimal=5) assert_almost_equal(test_axis_in, known_axis_dims_in, decimal=5) assert_almost_equal(test_fig_cm, known_figure_dims_cm, decimal=5) assert_almost_equal(test_axis_cm, known_axis_dims_cm, decimal=5) def test_calculate_dimensions_bar(self): """Checks that calculate_dimensions_bar is sane""" # Sets up known values known_axis_df = array([[0.01388889, 0.02380952], [0.70833333, 0.73809524]]) known_axis_in = array([[0.06179775, 0.21153846], [0.43258427, 0.98076923]]) known_axis_cm = array([[0.06179775, 0.21153846], [0.43258427, 0.98076923]]) known_fig_df = (7.2, 4.2) known_fig_in = (8.9, 2.6) known_fig_cm = (8.9/2.54, 2.6/2.54) # Sets up test values test_num_bars = 10 test_bar_width = 0.33 test_axis_height = 2 test_border = 0.05 test_title = 0 test_legend = 5 test_xlab = 0.5 test_ylab = 0.5 # Checks that errors are raised when improper arguments are passed. (A # number of bars that is not an integer less than one, or a unit other # than 'in' or 'cm'.) with self.assertRaises(ValueError): calculate_dimensions_bar(num_bars=-3) with self.assertRaises(ValueError): calculate_dimensions_bar(num_bars=3.1435) with self.assertRaises(ValueError): calculate_dimensions_bar(num_bars=3, unit='Angel') # Calculates the test value (test_axis_df, test_fig_df) = calculate_dimensions_bar(test_num_bars) (test_axis_in, test_fig_in) = \ calculate_dimensions_bar(num_bars=test_num_bars, bar_width=test_bar_width, border=test_border, axis_height=test_axis_height, xlab=test_xlab, ylab=test_ylab, title=test_title, legend=test_legend) (test_axis_cm, test_fig_cm) = \ calculate_dimensions_bar(num_bars=test_num_bars, bar_width=test_bar_width, border=test_border, axis_height=test_axis_height, xlab=test_xlab, ylab=test_ylab, title=test_title, legend=test_legend, unit='cm') # Checks that values are appropriate self.assertEqual(known_fig_df, test_fig_df) self.assertEqual(known_fig_in, test_fig_in) self.assertEqual(known_fig_cm, test_fig_cm) assert_almost_equal(known_axis_df, test_axis_df, decimal=5) assert_almost_equal(known_axis_in, test_axis_in, decimal=5) assert_almost_equal(known_axis_cm, test_axis_cm, decimal=5) def test_translate_colors(self): """Checks translate_colors is sane""" # Sets up knowns values known_def_8 = array([[0.83529412, 0.24313725, 0.30980392], [0.95686275, 0.42745098, 0.26274510], [0.99215686, 0.68235294, 0.38039216], [0.99607843, 0.87843137, 0.54509804], [0.90196078, 0.96078431, 0.59607843], [0.67058824, 0.86666667, 0.64313725], [0.40000000, 0.76078431, 0.64705882], [0.19607843, 0.53333333, 0.74117647]]) known_PuRd_9 = array([[0.96862745, 0.95686275, 0.97647059], [0.90588235, 0.88235294, 0.93725490], [0.83137255, 0.72549020, 0.85490196], [0.78823529, 0.58039216, 0.78039216], [0.87450980, 0.39607843, 0.69019608], [0.90588235, 0.16078431, 0.54117647], [0.80784314, 0.07058824, 0.33725490], [0.59607843, 0.00000000, 0.26274510], [0.40392157, 0.00000000, 0.12156863]]) # Test the calls with self.assertRaises(ValueError): translate_colors(5, 'Winchester') with self.assertRaises(ValueError): translate_colors(13) def_map = translate_colors(8) PuRd_map = translate_colors(9, 'PuRd') # Checks the outputs are sane assert_almost_equal(known_def_8, def_map) assert_almost_equal(known_PuRd_9, PuRd_map) if __name__ == '__main__': main()
51.17757
78
0.449525
6e396141f20d75b1197f8303cd5a1758ff77c72e
1,336
swift
Swift
iOS.Conf Extension/VenueInterfaceController.swift
stelarelas/ios-conference
c6166c97c66235d77c0070c6e4601c3f8171628a
[ "MIT" ]
15
2017-03-07T23:13:36.000Z
2020-02-26T15:34:21.000Z
iOS.Conf Extension/VenueInterfaceController.swift
stelarelas/ios-conference
c6166c97c66235d77c0070c6e4601c3f8171628a
[ "MIT" ]
1
2017-05-03T09:24:05.000Z
2017-05-03T09:24:05.000Z
iOS.Conf Extension/VenueInterfaceController.swift
stelarelas/ios-conference
c6166c97c66235d77c0070c6e4601c3f8171628a
[ "MIT" ]
3
2017-03-08T15:10:11.000Z
2019-09-18T12:54:45.000Z
// // VenueInterfaceController.swift // iOSConf // // Created by Nikos Maounis on 08/02/2017. // Copyright © 2017 Taxibeat Ltd. All rights reserved. // import WatchKit import Foundation class VenueInterfaceController: WKInterfaceController { @IBOutlet var venueMap: WKInterfaceMap! @IBOutlet var venueLabel: WKInterfaceLabel! let coordinate = CLLocationCoordinate2DMake(37.9787925, 23.7123368) override func awake(withContext context: Any?) { super.awake(withContext: context) venueLabel.setText("Voutadon 34, Athens, Greece") setupMap() } func setupMap() { venueMap.setVisibleMapRect(MKMapRect(origin: MKMapPointForCoordinate(coordinate), size: MKMapSize(width: 0.5, height: 0.5))) let span = MKCoordinateSpanMake(0.003, 0.003) venueMap.setRegion(MKCoordinateRegion(center: coordinate, span: span)) venueMap.addAnnotation(coordinate, withImageNamed: "venueIcon", centerOffset: CGPoint(x: 0.0, y: -9.0)) } override func willActivate() { // This method is called when watch view controller is about to be visible to user super.willActivate() } override func didDeactivate() { // This method is called when watch view controller is no longer visible super.didDeactivate() } }
30.363636
132
0.689371
16e2f905cc81fcc7b3ca9f88ab2e71b49e138721
127
kt
Kotlin
idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsMultiple.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
152
2016-02-03T20:19:47.000Z
2021-05-28T07:08:12.000Z
idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsMultiple.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
1
2020-09-03T16:13:29.000Z
2020-09-03T16:13:29.000Z
idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsMultiple.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
54
2016-02-29T16:27:38.000Z
2020-12-26T15:02:23.000Z
// "Add name to argument..." "true" fun f(a: Int, b: String = "b", c: String = "c") {} fun g() { f(a = 10, <caret>"FOO") }
21.166667
50
0.480315
7b8cd84603dc7b669a38ff36240d81d884aa5146
908
css
CSS
Spring_02_ReadBook/src/main/webapp/static/write.css
paldonenemttin/2021_11_IDEA
1fa440f09dcca14cb745df11d1a09e880aea03e4
[ "MIT" ]
null
null
null
Spring_02_ReadBook/src/main/webapp/static/write.css
paldonenemttin/2021_11_IDEA
1fa440f09dcca14cb745df11d1a09e880aea03e4
[ "MIT" ]
null
null
null
Spring_02_ReadBook/src/main/webapp/static/write.css
paldonenemttin/2021_11_IDEA
1fa440f09dcca14cb745df11d1a09e880aea03e4
[ "MIT" ]
null
null
null
.content-box{ display: flex; flex-direction: column; width: 90vw; margin-left: 5%; } .one{ display: flex; margin-top: 20px; justify-content: center; } .one input{ width:50vw; height: 5vh; } .two{ display: flex; margin-top: 20px; justify-content: center; } .three{ display: flex; margin-top: 20px; justify-content: center; flex-direction: column; margin-bottom: 20px; } .button_box{ display: flex; justify-content: right; margin-bottom: 20px; width: 90vw; margin-left: 5%; } #save{ background-color: cadetblue; color: white; margin-right: 10px; } #reset{ background-color: tomato; color: white; margin-right: 10px; } #list{ background-color: yellow; color: black; } .btn_boys{ padding: 3px; border-radius: 2px; box-shadow: 1px 1px 1px gray; width: 10%; height: 30px; }
16.214286
33
0.606828
1873994a38612ad6dcbaf591297d6d534e3132ae
1,749
rb
Ruby
app/models/saved_search.rb
unepwcmc/ProtectedPlanet
0d1e0b643b5926551b3dda7fbba19f88a6862872
[ "BSD-3-Clause" ]
12
2015-09-21T08:39:07.000Z
2021-06-24T13:22:27.000Z
app/models/saved_search.rb
unepwcmc/ProtectedPlanet
0d1e0b643b5926551b3dda7fbba19f88a6862872
[ "BSD-3-Clause" ]
220
2015-01-08T12:07:15.000Z
2022-03-21T17:08:02.000Z
app/models/saved_search.rb
unepwcmc/ProtectedPlanet
0d1e0b643b5926551b3dda7fbba19f88a6862872
[ "BSD-3-Clause" ]
2
2017-09-21T11:53:14.000Z
2018-02-21T07:24:53.000Z
# Only used for the areas search download - to cache search results and reduce # performance hit on the system class SavedSearch < ApplicationRecord # Elasticsearch has a maximum page size of 10000 MAX_SIZE = 9999 def name search_term end def parsed_filters JSON.parse(filters) if filters.present? end def all_wdpa_ids search_results.flatten end private def search_results # Perform initial search to store the first set of results @results = [] initial_set = extract_wdpa_ids(download_search.results) @results << initial_set # Return early if number of hits is less than 10000 to avoid unnecessary searches return @results if @results.last.length < MAX_SIZE # Keep looping until there are no more results loop do last_wdpa_id = @results.last.last next_batch = extract_wdpa_ids(download_search(last_wdpa_id).results) break if next_batch.empty? @results << next_batch end @results end def extract_wdpa_ids(results) results.pluck('wdpa_id') end def search_query_options { offset: 0, # Have to set this to 0 for Elastic's search_after API filters: parsed_filters || {}, without_aggregations: true, sort: [{ 'wdpa_id': 'asc' }], size: MAX_SIZE } end # Make use of Elasticsearch search_after API to search after the WDPA ID passed # to the search. def download_search(last_wdpaid_of_results = nil) if last_wdpaid_of_results merged_query_options = search_query_options.merge({ last_wdpa_id: last_wdpaid_of_results }) else merged_query_options = search_query_options end Search.search(search_term, merged_query_options, Search::PA_INDEX) end end
24.291667
97
0.71012
c87a40e9857c5fba5e45d3e5428cddb4e970df97
1,803
rs
Rust
src/lib.rs
saghm/dynlist
b859e87d0cdfcf4f3a3a69e08e9027e61dcc3810
[ "Apache-2.0" ]
null
null
null
src/lib.rs
saghm/dynlist
b859e87d0cdfcf4f3a3a69e08e9027e61dcc3810
[ "Apache-2.0" ]
null
null
null
src/lib.rs
saghm/dynlist
b859e87d0cdfcf4f3a3a69e08e9027e61dcc3810
[ "Apache-2.0" ]
null
null
null
#[macro_use] mod elem; use std::fmt; use std::marker::PhantomData; pub use self::elem::DynElem; #[derive(Debug)] pub struct DynList<'a, T: 'a> { inner: Vec<DynElem<'a, T>>, phantom: PhantomData<&'a T>, } impl<'a, T> DynList<'a, T> { pub fn new<I>(i: I) -> Self where I: IntoIterator<Item = DynElem<'a, T>>, { DynList { inner: i.into_iter().collect(), phantom: PhantomData, } } pub fn inner_ref(&self) -> DynList<&T> { DynList { inner: self.inner.iter().map(DynElem::inner_ref).collect(), phantom: PhantomData, } } pub fn iter(&self) -> DynListIntoIter<&T> { self.inner_ref().into_iter() } } impl<'a, T> fmt::Display for DynList<'a, T> where T: fmt::Display, { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "[")?; for (i, elem) in self.inner.iter().enumerate() { if i != 0 { write!(f, ",")?; } write!(f, "{}", elem)?; } write!(f, "]")?; Ok(()) } } impl<'a, T: 'a> IntoIterator for DynList<'a, T> { type Item = T; type IntoIter = DynListIntoIter<'a, T>; fn into_iter(self) -> Self::IntoIter { DynListIntoIter { inner: Box::new(self.inner.into_iter().flat_map(IntoIterator::into_iter)), } } } #[macro_export] macro_rules! dyn_list { ($($elem:tt),*) => {{ use dynlist::DynList; DynList::new(vec![$(dyn_elem!($elem)),*]) }}; } pub struct DynListIntoIter<'a, T: 'a> { inner: Box<Iterator<Item = T> + 'a>, } impl<'a, T: 'a> Iterator for DynListIntoIter<'a, T> { type Item = T; fn next(&mut self) -> Option<Self::Item> { self.inner.next() } }
20.258427
86
0.507488
0496792faf894bc146da3978dd94780a4561c9fc
5,220
kt
Kotlin
sdk/src/main/java/me/uport/sdk/AccountStorage.kt
uport-project/uport-android-sdk
6b53dc1dcc992b3761496c1f4b13838b1bf914d5
[ "Apache-2.0" ]
32
2018-05-25T10:43:07.000Z
2020-09-16T10:31:35.000Z
sdk/src/main/java/me/uport/sdk/AccountStorage.kt
uport-project/uport-android-sdk
6b53dc1dcc992b3761496c1f4b13838b1bf914d5
[ "Apache-2.0" ]
56
2018-06-22T08:20:24.000Z
2019-10-10T10:11:03.000Z
sdk/src/main/java/me/uport/sdk/AccountStorage.kt
uport-project/uport-android-sdk
6b53dc1dcc992b3761496c1f4b13838b1bf914d5
[ "Apache-2.0" ]
8
2018-06-26T02:29:08.000Z
2022-03-29T10:05:25.000Z
package me.uport.sdk import android.content.SharedPreferences import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import me.uport.sdk.identity.Account import me.uport.sdk.identity.AccountType import me.uport.sdk.identity.HDAccount import me.uport.sdk.identity.MetaIdentityAccount interface AccountStorage { fun upsert(newAcc: Account) fun get(handle: String): Account? fun delete(handle: String) fun all(): List<Account> fun upsertAll(list: Collection<Account>) /** * sets the default account using its handle */ fun setAsDefault(accountHandle: String) /** * fetches the default account */ fun getDefaultAccount(): Account? } /** * An account storage mechanism that relies on [SharedPreferences] for persistence to disk * * Accounts are serialized then wrapped in an AccountHolder then along with the AccountType and isDefault * * Accounts are loaded during construction and then relayed from memory */ class SharedPrefsAccountStorage( private val prefs: SharedPreferences ) : AccountStorage { private val accounts = mapOf<String, AccountHolder>().toMutableMap() init { prefs.getStringSet(KEY_ACCOUNTS, emptySet()) .orEmpty() .forEach { serialized -> val accountHolder = try { AccountHolder.fromJson(serialized) } catch (ex: Exception) { null } accountHolder.let { val account = fetchAccountFromHolder(accountHolder) if (account != null) { upsert(account) } } } } override fun upsert(newAcc: Account) { accounts[newAcc.handle] = buildAccountHolder(newAcc) persist() } override fun upsertAll(list: Collection<Account>) { list.forEach { accounts[it.handle] = buildAccountHolder(it) } persist() } override fun get(handle: String): Account? { val holder: AccountHolder? = accounts[handle] return fetchAccountFromHolder(holder) } override fun delete(handle: String) { accounts.remove(handle) if (getDefaultAccount()?.handle.equals(handle)) { persistDefault("") } persist() } override fun all(): List<Account> = fetchAllAccounts() override fun setAsDefault(accountHandle: String) { persistDefault(accountHandle) } override fun getDefaultAccount(): Account? { val accountHandle = prefs.getString(KEY_DEFAULT_ACCOUNT, "") ?: "" val defaultAccountHolder = accounts[accountHandle] if (defaultAccountHolder != null && defaultAccountHolder != AccountHolder.blank) { return fetchAccountFromHolder(defaultAccountHolder) } else { return null } } private fun persist() { prefs.edit() .putStringSet(KEY_ACCOUNTS, accounts.values.map { it.toJson() }.toSet()) .apply() } private fun persistDefault(serializedAccountHolder: String) { prefs.edit() .putString(KEY_DEFAULT_ACCOUNT, serializedAccountHolder) .apply() } companion object { private const val KEY_ACCOUNTS = "accounts" private const val KEY_DEFAULT_ACCOUNT = "default_account" } @Suppress("UnsafeCast") private fun buildAccountHolder(account: Account): AccountHolder { val acc = when (account.type) { AccountType.HDKeyPair -> (account as HDAccount).toJson() AccountType.MetaIdentityManager -> (account as MetaIdentityAccount).toJson() else -> throw IllegalArgumentException("Storage not supported AccountType ${account.type}") } return AccountHolder(acc, account.type.toString()) } private fun fetchAccountFromHolder(holder: AccountHolder?): Account? { return when (holder?.type) { AccountType.HDKeyPair.toString() -> HDAccount.fromJson(holder.account) AccountType.MetaIdentityManager.toString() -> MetaIdentityAccount.fromJson(holder.account) else -> null } } private fun fetchAllAccounts() = accounts .map { fetchAccountFromHolder(it.value) } .filterNotNull() } /** * Used to wrap any type of account before it is stored */ @Serializable data class AccountHolder( val account: String, val type: String ) { /** * serializes accountHolder */ fun toJson(pretty: Boolean = false): String = if (pretty) Json.indented.stringify(serializer(), this) else Json.stringify(serializer(), this) companion object { val blank = AccountHolder("", "") /** * de-serializes accountHolder */ fun fromJson(serializedAccountHolder: String): AccountHolder { if (serializedAccountHolder.isEmpty()) { return blank } return Json.parse(serializer(), serializedAccountHolder) } } }
28.064516
145
0.615326
e9ca0ad74e463c3f20d2d665a2fdf394b36f30de
527
rb
Ruby
app/models/association.rb
alilee/shortepic-pmo
953ea3b35960e8a47f9625f2a8b592aecfb75c4d
[ "MIT" ]
1
2016-05-09T05:05:50.000Z
2016-05-09T05:05:50.000Z
app/models/association.rb
alilee/shortepic-pmo
953ea3b35960e8a47f9625f2a8b592aecfb75c4d
[ "MIT" ]
null
null
null
app/models/association.rb
alilee/shortepic-pmo
953ea3b35960e8a47f9625f2a8b592aecfb75c4d
[ "MIT" ]
null
null
null
# == Schema Information # Schema version: 16 # # Table name: associations # # id :integer not null, primary key # item_id_from :integer not null # item_id_to :integer not null # class Association < ActiveRecord::Base belongs_to :item_from, :class_name => "Item", :foreign_key => "item_id_from" belongs_to :item_to, :class_name => "Item", :foreign_key => "item_id_to" validates_presence_of :item_id_from, :item_id_to validates_uniqueness_of :item_id_to, :scope => 'item_id_from' end
29.277778
78
0.6926
5de444a2fe9e22bfba19997eb7b783018541574a
578
h
C
Comprehensive_Project/Comprehensive_Project/Parser/KLT2010-TestVersion-2017/API/kma/header/pomi-def.h
blackberry-pie/Comprehensive_Project
f54e07047fa411d2348422de089e406ffed44ac2
[ "Apache-2.0" ]
null
null
null
Comprehensive_Project/Comprehensive_Project/Parser/KLT2010-TestVersion-2017/API/kma/header/pomi-def.h
blackberry-pie/Comprehensive_Project
f54e07047fa411d2348422de089e406ffed44ac2
[ "Apache-2.0" ]
null
null
null
Comprehensive_Project/Comprehensive_Project/Parser/KLT2010-TestVersion-2017/API/kma/header/pomi-def.h
blackberry-pie/Comprehensive_Project
f54e07047fa411d2348422de089e406ffed44ac2
[ "Apache-2.0" ]
null
null
null
/* File name: pomi-def.h Description: Definition of prefinal Eomi field. Written by: Kang, Seung-Shik 04/11/1997 */ /* Definition for 'pomi' field of result structure 1-byte is used for 'Ui/WbV/WfV/AgV'. Each bit-potistion is as follows. +-----------------+-----+-----+-----+-----+ | 4 bits(not used)| Ui | WbV | WfV | AgV | +-----------------+-----+-----+-----+-----+ If Ui-bit is set to 1, 'Ui' is found. */ #define POMI_AgV 0x01 #define POMI_WfV 0x02 #define POMI_WbV 0x04 #define POMI_Ui 0x08 /*------------------ end of pomi-def.h -------------------*/
24.083333
61
0.532872
56a08d570ed511e28094965b49589dd53f62c060
2,016
swift
Swift
ContentApp/Modules/Advance Search/Views/Table Cells/List Item/ListItemTableViewCell.swift
Ricksoft-OSS/alfresco-mobile-workspace-ios
cd0862a2c7b8e9b76c95a2071307d28a7a337a1f
[ "Apache-2.0" ]
null
null
null
ContentApp/Modules/Advance Search/Views/Table Cells/List Item/ListItemTableViewCell.swift
Ricksoft-OSS/alfresco-mobile-workspace-ios
cd0862a2c7b8e9b76c95a2071307d28a7a337a1f
[ "Apache-2.0" ]
null
null
null
ContentApp/Modules/Advance Search/Views/Table Cells/List Item/ListItemTableViewCell.swift
Ricksoft-OSS/alfresco-mobile-workspace-ios
cd0862a2c7b8e9b76c95a2071307d28a7a337a1f
[ "Apache-2.0" ]
null
null
null
// // Copyright (C) 2005-2021 Alfresco Software Limited. // // This file is part of the Alfresco Content Mobile iOS App. // // 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. // import UIKit class ListItemTableViewCell: UITableViewCell, CellConfigurable { @IBOutlet weak var baseView: UIView! @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var checkBoxImageView: UIImageView! var viewModel: ListItemCellViewModel? override func awakeFromNib() { super.awakeFromNib() } func setup(viewModel: RowViewModel) { guard let viewModel = viewModel as? ListItemCellViewModel else { return } self.viewModel = viewModel self.titleLabel.text = NSLocalizedString(viewModel.title ?? "", comment: "") self.checkBoxImageView.image = viewModel.image titleLabel.accessibilityIdentifier = "\(String(describing: self.titleLabel.text))" checkBoxImageView.accessibilityIdentifier = "\(String(describing: self.titleLabel.text))" } // MARK: - Apply Themes and Localization func applyTheme(with service: MaterialDesignThemingService?) { guard let currentTheme = service?.activeTheme else { return } baseView.backgroundColor = currentTheme.surfaceColor titleLabel.applyStyleSubtitle1OnSurface(theme: currentTheme) } @IBAction func selectTableCellButtonAction(_ sender: Any) { guard let viewModel = self.viewModel else { return } viewModel.didSelectListItem?() } }
38.769231
97
0.716766
2f14abda5a2716e3bc8773de02045b960683f0b7
3,698
php
PHP
resources/views/membership_cards_for_individuals/show.blade.php
mohIbrahim/ghazala
8cc3d50c3bca98d27719b8726cef0ba89ed1c2dd
[ "MIT" ]
null
null
null
resources/views/membership_cards_for_individuals/show.blade.php
mohIbrahim/ghazala
8cc3d50c3bca98d27719b8726cef0ba89ed1c2dd
[ "MIT" ]
null
null
null
resources/views/membership_cards_for_individuals/show.blade.php
mohIbrahim/ghazala
8cc3d50c3bca98d27719b8726cef0ba89ed1c2dd
[ "MIT" ]
null
null
null
@extends('layouts.app') @section('title') الكارت {{$membershipCard->serial}} @endsection @section('content') <div class="col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-1 col-lg-10 col-lg-offset-1"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title text-center arabic-direction"><strong> الكارت:{{$membershipCard->serial}} </strong></h3> </div> <div class="panel-body"> <div class="table-responsive arabic-direction"> <table class="table table-striped table-condensed table-hover"> <tbody class="text-right"> <tr> <td><strong>الكود الكارت:</strong></td> <td>{{ $membershipCard->serial }}</td> </tr> <tr> <td><strong>كود الوحدة:</strong></td> <td> @if($membershipCard->unit) <a href="{{ action('UnitsController@show', ['id'=>$membershipCard->unit->id]) }}" target="_blank"> {{ $membershipCard->unit->code }} </a> @endif </td> </tr> <tr> <td><strong>اسم مالك الوحدة:</strong></td> <td> @if($membershipCard->owner) <a href="{{ action('OwnersController@show', ['slug'=>$membershipCard->owner->slug]) }}" target="_blandk"> {{ $membershipCard->owner->name }} </a> @endif </td> </tr> <tr> <td><strong>نوع الكارت:</strong></td> <td>{{ $membershipCard->type }}</td> </tr> <tr> <td><strong>تاريخ الإصدار:</strong></td> <td>{{ ($membershipCard->release_date)?$membershipCard->release_date->format('d-m-Y') : "" }}</td> </tr> <tr> <td><strong>حالة الكارت:</strong></td> <td>{{ ($membershipCard->status)? "فعّال":"غير فعّال" }}</td> </tr> <tr> <td><strong>هل تم تسليم الكارت؟</strong></td> <td>{{ ($membershipCard->delivered)? "نعم" : "لا" }}</td> </tr> <tr> <td><strong>تاريخ تسليم الكارت:</strong></td> <td>{{ ($membershipCard->delivered_date)? $membershipCard->delivered_date->format('d-m-Y'): '' }}</td> </tr> <tr> <td><strong>التعليقات:</strong></td> <td>{{ $membershipCard->comments }}</td> </tr> <tr> <td><strong>إنشاء من قبل المستخدم:</strong></td> <td>{{ $membershipCard->creator->name }}</td> </tr> <tr> <td><strong>تاريخ و وقت الإنشاء:</strong></td> <td>{{ $membershipCard->created_at }}</td> </tr> <tr> <td><strong>تاريخ و وقت التعديل:</strong></td> <td>{{ $membershipCard->updated_at }}</td> </tr> @if(in_array('update_membership_cards_for_individuals', $permissions)) <tr> <td><strong>تعديل:</strong></td> <td><a href="{{action('MembershipCardsForIndividualsController@edit',['id'=>$membershipCard->id]) }}">تعديل</a></td> </tr> @endif @if(in_array('delete_membership_cards_for_individuals', $permissions)) <tr> <td><strong>حذف:</strong></td> <td><button type="button" class="btn btn-danger" data-toggle="modal" data-target="#myModal">حذف الوحدة</button></td> </tr> @endif </tbody> </table> </div> </div> </div> </div> @include('partial.deleteConfirm',['name'=>$membershipCard->serial, 'id'=>$membershipCard->id, 'message'=>'هل انت متأكد تريد حذف الكارت', 'route'=>'MembershipCardsForIndividualsController@destroy']) @endsection
29.822581
127
0.523797
fb1fbde2c443a408162d2b46ec8455e49784c3da
1,074
go
Go
pagination_test.go
oussama4/gopify
b4c52e6f2eb135ad7727fcfa014f5baff252b0dd
[ "MIT" ]
4
2021-09-20T08:48:16.000Z
2022-02-01T15:47:30.000Z
pagination_test.go
oussama4/gopify
b4c52e6f2eb135ad7727fcfa014f5baff252b0dd
[ "MIT" ]
1
2022-02-01T20:49:05.000Z
2022-02-01T20:49:05.000Z
pagination_test.go
oussama4/gopify
b4c52e6f2eb135ad7727fcfa014f5baff252b0dd
[ "MIT" ]
1
2021-12-19T17:35:00.000Z
2021-12-19T17:35:00.000Z
package gopify import ( "errors" "testing" ) func TestExtractPagination(t *testing.T) { cases := []struct { linkHeader string expectedPagination *Pagination expectedError error }{ { linkHeader: "invalid header", expectedPagination: nil, expectedError: errors.New("invalid header"), }, { linkHeader: `<https://resource.url?page_info=next_cursor>; rel="next"`, expectedPagination: &Pagination{Next: "next_cursor"}, expectedError: nil, }, { linkHeader: `<https://resource.url?page_info=next_cursor>; rel="next", <http://resource.url?page_info=previous_cursor>; rel="previous"`, expectedPagination: &Pagination{Next: "next_cursor", Previous: "previous_cursor"}, expectedError: nil, }, } for _, c := range cases { pagination, err := extractPagination(c.linkHeader) if pagination != c.expectedPagination && c.expectedError != err { t.Errorf("expected pagination: %v, and error : %v, but got : %v, %v", c.expectedPagination, c.expectedError, pagination, err) } } }
28.263158
147
0.659218
041813b54e10edef5ca62adc2aaecf888b239bc6
1,150
lua
Lua
init_buttons.lua
angeljesmar/corona-GameTemplateWStoryBoard
98d2c6e9a77fad302b8a7f6bff9df7846629a139
[ "MIT" ]
1
2015-01-06T08:22:14.000Z
2015-01-06T08:22:14.000Z
init_buttons.lua
angeljesmar/corona-GameTemplateWStoryBoard
98d2c6e9a77fad302b8a7f6bff9df7846629a139
[ "MIT" ]
null
null
null
init_buttons.lua
angeljesmar/corona-GameTemplateWStoryBoard
98d2c6e9a77fad302b8a7f6bff9df7846629a139
[ "MIT" ]
null
null
null
_G.buttons = { about = { default = "res/btn_about.png", defaultX = 160, defaultY = 32, over = "res/btn_about_over.png", overX = 160, overY = 32, id = "btnAbout", text = "", font = "Helvetica", textColor = { 255, 255, 255, 255 }, emboss = false }, help = { default = "res/btn_help.png", defaultX = 160, defaultY = 32, over = "res/btn_help_over.png", overX = 160, overY = 32, id = "btnHelp", text = "", font = "Helvetica", textColor = { 255, 255, 255, 255 }, emboss = false }, play = { default = "res/btn_play.png", defaultX = 160, defaultY = 32, over = "res/btn_play_over.png", overX = 160, overY = 32, id = "btnPlay", text = "", font = "Helvetica", textColor = { 255, 255, 255, 255 }, emboss = false }, settings = { default = "res/btn_settings.png", defaultX = 160, defaultY = 32, over = "res/btn_settings_over.png", overX = 160, overY = 32, id = "btnSettings", text = "", font = "Helvetica", textColor = { 255, 255, 255, 255 }, emboss = false } }
20.535714
39
0.51913
5375e94df5b72d2106fc9b0909da20ab00a2b25c
71
sql
SQL
hasura/migrations/default/1650979928645_alter_table_public_comment_alter_column_rating_id/up.sql
eoscostarica/rate.eoscostarica.io
53cdcaa808414eb418d5e37f85391d1a367553f3
[ "MIT" ]
5
2018-09-11T01:45:02.000Z
2018-10-01T00:31:04.000Z
hasura/migrations/default/1650979928645_alter_table_public_comment_alter_column_rating_id/up.sql
eoscostarica/rate.eoscostarica.io
53cdcaa808414eb418d5e37f85391d1a367553f3
[ "MIT" ]
46
2018-09-11T01:37:01.000Z
2018-10-22T03:28:44.000Z
hasura/migrations/default/1650979928645_alter_table_public_comment_alter_column_rating_id/up.sql
eoscostarica/rate.eoscostarica.io
53cdcaa808414eb418d5e37f85391d1a367553f3
[ "MIT" ]
2
2018-09-19T22:39:21.000Z
2018-09-25T18:09:42.000Z
alter table "public"."comment" alter column "rating_id" drop not null;
35.5
70
0.760563
4f2328e8086cfedd40909e4150d00dcb62dd1d35
79,593
sql
SQL
framework/Targets/wordpress_3_2/plugins/pretty-link_1_5_2/database.sql
UncleWillis/BugBox
25682f25fc3222db383649a4924bcd65f2ddcb34
[ "BSD-3-Clause" ]
1
2019-01-25T21:32:42.000Z
2019-01-25T21:32:42.000Z
framework/Targets/wordpress_3_2/plugins/pretty-link_1_5_2/database.sql
UMD-SEAM/bugbox
1753477cbca12fe43446d8ded320f77894671dfe
[ "BSD-3-Clause" ]
null
null
null
framework/Targets/wordpress_3_2/plugins/pretty-link_1_5_2/database.sql
UMD-SEAM/bugbox
1753477cbca12fe43446d8ded320f77894671dfe
[ "BSD-3-Clause" ]
1
2018-04-17T06:04:09.000Z
2018-04-17T06:04:09.000Z
-- MySQL dump 10.13 Distrib 5.5.28, for debian-linux-gnu (i686) -- -- Host: localhost Database: wordpress_3_2 -- ------------------------------------------------------ -- Server version 5.5.28-1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Current Database: `wordpress_3_2` -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `wordpress_3_2` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `wordpress_3_2`; -- -- Table structure for table `wp_bwbps_categories` -- DROP TABLE IF EXISTS `wp_bwbps_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_categories` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `image_id` bigint(20) NOT NULL, `category_id` bigint(20) DEFAULT NULL, `tag_name` varchar(250) DEFAULT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `image_id` (`image_id`), KEY `category_id` (`category_id`), KEY `tag_name` (`tag_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_categories` -- LOCK TABLES `wp_bwbps_categories` WRITE; /*!40000 ALTER TABLE `wp_bwbps_categories` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_categories` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_customdata` -- DROP TABLE IF EXISTS `wp_bwbps_customdata`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_customdata` ( `id` int(11) NOT NULL AUTO_INCREMENT, `image_id` int(11) NOT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `bwbps_status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `image_id` (`image_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_customdata` -- LOCK TABLES `wp_bwbps_customdata` WRITE; /*!40000 ALTER TABLE `wp_bwbps_customdata` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_customdata` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_favorites` -- DROP TABLE IF EXISTS `wp_bwbps_favorites`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_favorites` ( `favorite_id` bigint(20) NOT NULL AUTO_INCREMENT, `image_id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`favorite_id`), KEY `image_id` (`image_id`), KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_favorites` -- LOCK TABLES `wp_bwbps_favorites` WRITE; /*!40000 ALTER TABLE `wp_bwbps_favorites` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_favorites` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_fields` -- DROP TABLE IF EXISTS `wp_bwbps_fields`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_fields` ( `field_id` int(11) NOT NULL AUTO_INCREMENT, `form_id` int(4) NOT NULL DEFAULT '0', `field_name` varchar(50) DEFAULT NULL, `label` varchar(255) DEFAULT NULL, `type` int(4) DEFAULT NULL, `numeric_field` tinyint(1) NOT NULL DEFAULT '0', `multi_val` tinyint(1) NOT NULL, `default_val` varchar(255) DEFAULT NULL, `auto_capitalize` tinyint(1) DEFAULT NULL, `keyboard_type` tinyint(1) DEFAULT NULL, `html_filter` tinyint(1) DEFAULT NULL, `date_format` tinyint(1) DEFAULT NULL, `seq` int(4) DEFAULT NULL, `status` tinyint(1) NOT NULL, PRIMARY KEY (`field_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_fields` -- LOCK TABLES `wp_bwbps_fields` WRITE; /*!40000 ALTER TABLE `wp_bwbps_fields` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_fields` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_forms` -- DROP TABLE IF EXISTS `wp_bwbps_forms`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_forms` ( `form_id` int(11) NOT NULL AUTO_INCREMENT, `form_name` varchar(30) DEFAULT NULL, `form` text, `css` text, `fields_used` text, `category` tinyint(1) DEFAULT NULL, PRIMARY KEY (`form_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_forms` -- LOCK TABLES `wp_bwbps_forms` WRITE; /*!40000 ALTER TABLE `wp_bwbps_forms` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_forms` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_galleries` -- DROP TABLE IF EXISTS `wp_bwbps_galleries`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_galleries` ( `gallery_id` bigint(20) NOT NULL AUTO_INCREMENT, `post_id` bigint(20) DEFAULT NULL, `gallery_name` varchar(255) DEFAULT NULL, `gallery_description` text, `gallery_type` tinyint(1) NOT NULL DEFAULT '0', `caption` text, `add_text` varchar(255) DEFAULT NULL, `upload_form_caption` varchar(255) DEFAULT NULL, `contrib_role` tinyint(1) NOT NULL DEFAULT '0', `anchor_class` varchar(255) DEFAULT NULL, `img_count` bigint(11) DEFAULT NULL, `img_rel` varchar(255) DEFAULT NULL, `img_class` varchar(255) DEFAULT NULL, `img_perrow` tinyint(1) DEFAULT NULL, `img_perpage` int(4) DEFAULT NULL, `mini_aspect` tinyint(1) DEFAULT NULL, `mini_width` int(4) DEFAULT NULL, `mini_height` int(4) DEFAULT NULL, `thumb_aspect` tinyint(1) DEFAULT NULL, `thumb_width` int(4) DEFAULT NULL, `thumb_height` int(4) DEFAULT NULL, `medium_aspect` tinyint(1) DEFAULT NULL, `medium_width` int(4) DEFAULT NULL, `medium_height` int(4) DEFAULT NULL, `image_aspect` tinyint(1) DEFAULT NULL, `image_width` int(4) DEFAULT NULL, `image_height` int(4) DEFAULT NULL, `show_caption` tinyint(1) DEFAULT NULL, `nofollow_caption` tinyint(1) DEFAULT NULL, `caption_template` varchar(255) DEFAULT NULL, `show_imgcaption` tinyint(1) DEFAULT NULL, `img_status` tinyint(1) DEFAULT NULL, `allow_no_image` tinyint(1) DEFAULT NULL, `suppress_no_image` tinyint(1) DEFAULT NULL, `default_image` varchar(255) DEFAULT NULL, `created_date` datetime DEFAULT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `layout_id` int(4) DEFAULT NULL, `use_customform` tinyint(1) DEFAULT NULL, `custom_formid` int(4) DEFAULT NULL, `use_customfields` tinyint(1) DEFAULT NULL, `cover_imageid` int(4) DEFAULT NULL, `status` tinyint(1) DEFAULT NULL, `sort_field` tinyint(1) DEFAULT NULL, `sort_order` tinyint(1) DEFAULT NULL, `poll_id` int(4) DEFAULT NULL, `rating_position` int(4) DEFAULT NULL, `hide_toggle_ratings` tinyint(1) DEFAULT NULL, `pext_insert_setid` int(4) DEFAULT NULL, `max_user_uploads` int(4) DEFAULT NULL, `uploads_period` int(4) DEFAULT NULL, PRIMARY KEY (`gallery_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_galleries` -- LOCK TABLES `wp_bwbps_galleries` WRITE; /*!40000 ALTER TABLE `wp_bwbps_galleries` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_galleries` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_imageratings` -- DROP TABLE IF EXISTS `wp_bwbps_imageratings`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_imageratings` ( `rating_id` bigint(20) NOT NULL AUTO_INCREMENT, `image_id` bigint(20) NOT NULL, `gallery_id` bigint(20) DEFAULT NULL, `poll_id` bigint(20) DEFAULT NULL, `user_id` bigint(20) DEFAULT NULL, `user_ip` varchar(30) DEFAULT NULL, `rating` tinyint(1) DEFAULT NULL, `comment` varchar(250) DEFAULT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `status` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`rating_id`), KEY `image_id` (`image_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_imageratings` -- LOCK TABLES `wp_bwbps_imageratings` WRITE; /*!40000 ALTER TABLE `wp_bwbps_imageratings` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_imageratings` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_images` -- DROP TABLE IF EXISTS `wp_bwbps_images`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_images` ( `image_id` bigint(20) NOT NULL AUTO_INCREMENT, `gallery_id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL DEFAULT '0', `post_id` bigint(20) DEFAULT NULL, `comment_id` bigint(20) DEFAULT NULL, `image_name` varchar(250) DEFAULT NULL, `image_caption` text, `file_type` tinyint(1) DEFAULT NULL, `file_name` text, `file_url` text, `mini_url` text, `thumb_url` text, `medium_url` text, `image_url` text, `wp_attach_id` bigint(11) DEFAULT NULL, `url` varchar(250) DEFAULT NULL, `custom_fields` text, `meta_data` text, `geolong` double DEFAULT NULL, `geolat` double DEFAULT NULL, `img_attribution` text, `img_license` tinyint(1) DEFAULT NULL, `updated_by` bigint(20) NOT NULL DEFAULT '0', `created_date` datetime DEFAULT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `status` tinyint(1) NOT NULL DEFAULT '0', `alerted` tinyint(1) NOT NULL DEFAULT '0', `seq` bigint(11) NOT NULL DEFAULT '0', `favorites_cnt` bigint(11) DEFAULT NULL, `avg_rating` float(8,4) NOT NULL DEFAULT '0.0000', `rating_cnt` bigint(11) NOT NULL DEFAULT '0', `votes_sum` bigint(11) NOT NULL DEFAULT '0', `votes_cnt` bigint(11) NOT NULL DEFAULT '0', PRIMARY KEY (`image_id`), KEY `gallery_id` (`gallery_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_images` -- LOCK TABLES `wp_bwbps_images` WRITE; /*!40000 ALTER TABLE `wp_bwbps_images` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_images` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_layouts` -- DROP TABLE IF EXISTS `wp_bwbps_layouts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_layouts` ( `layout_id` int(11) NOT NULL AUTO_INCREMENT, `layout_name` varchar(30) DEFAULT NULL, `layout_type` tinyint(4) NOT NULL DEFAULT '0', `layout` text, `alt_layout` text, `wrapper` text, `cells_perrow` tinyint(4) NOT NULL DEFAULT '0', `css` text, `pagination_class` varchar(255) DEFAULT NULL, `lists` varchar(255) DEFAULT NULL, `post_type` varchar(20) DEFAULT NULL, `fields_used` text, `footer_layout` text, PRIMARY KEY (`layout_id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_layouts` -- LOCK TABLES `wp_bwbps_layouts` WRITE; /*!40000 ALTER TABLE `wp_bwbps_layouts` DISABLE KEYS */; INSERT INTO `wp_bwbps_layouts` VALUES (1,'Std_Widget',0,'\n <div class=\'bwbps_image\'>[thumb_linktoimage]</div>\n ','','',0,'','bwbps_pagination',NULL,NULL,NULL,NULL),(2,'media_rss',0,'\n<item>\n <title><![CDATA[[caption]]]></title>\n <description><![CDATA[]]></description>\n <link><![CDATA[]]></link>\n <media:content url=\'[image_url]\' medium=\'image\' />\n <media:title><![CDATA[[caption]]]></media:title>\n <media:description><![CDATA[]]></media:description>\n <media:thumbnail url=\'[thumb_url]\' width=\'100\' height=\'75\' />\n <media:keywords><![CDATA[]]></media:keywords>\n <media:copyright><![CDATA[Copyright (c) [blog_name]]]></media:copyright>\n</item>\n ','','',0,'','bwbps_pagination',NULL,NULL,NULL,NULL),(3,'gallery_viewer',0,'\n<div class=\'bwbps_galviewer\'>\n <div class=\'bwbps_galviewer_head\'>\n <a href=\'[gallery_url]\' title=\'Gallery: \n [image_gallery_name]\'>\n [image_gallery_name length=16] ([gallery_image_count])</a>\n </div>\n <div class=\'bwbps_image\'>\n <a href=\'[gallery_url]\' title=\'Gallery: \n [image_gallery_name]\'>\n [thumb_image]</a>\n </div>\n</div>\n ','','<h2>Galleries:</h2>',0,'','bwbps_pag_2',NULL,NULL,NULL,NULL),(4,'gallery_view_layout',0,'\n<li class=\'psgal_[gallery_id]\'>\n <div class=\'bwbps_image bwbps_relative\'>\n <a rel=\'lightbox[album_[gallery_id]]\' href=\'[image_url]\' title=\'[caption_escaped]\'>[thumb_image]</a>\n[ps_rating]\n <div class=\'bwbps_postlink_top_rt bwbps_postlink\'>\n <a href=\'[post_url]\' title=\'Visit image page.\'>\n <img src=\'[plugin_url]/photosmash-galleries/images/post-out.png\' />\n </a>\n </div>\n </div>\n <div style=\'clear: both;\'>\n <a rel=\'lightbox[caption_[gallery_id]]\' href=\'[image_url]\' title=\'[caption_escaped]\'>\n [caption length=20]\n </a>\n </div>\n</li>\n ','','<span style=\'float:right;\'>[piclens]</span><div class=\'clear\'></div>\n<h3>Gallery: [gallery_name]</h3>\n<div class=\'bwbps_gallery_container0\'>\n<ul class=\'bwbps_gallery\'>\n[gallery]\n</ul>\n<div style=\'clear:both;\'></div>\n</div>\n',0,'','bwbps_pag_2',NULL,NULL,NULL,NULL),(5,'image_view_layout',0,'\n<div class=\'bwbps_galviewer\' style=\'width:100%; text-align: center;\'>\n <div class=\'\'>\n <a rel=\'lightbox[album_[gallery_id]]\' href=\'[image_url]\' title=\'[caption_escaped]\'>[medium]</a>\n </div>\n <div style=\'clear: both;\'>\n [caption]\n </div>\n <h3 style=\'width: 100%; text-align: center;\'>Meta Data</h3>\n <table class=\'bwbps-meta-table\' style=\'margin: 10px auto !important; text-align: left;\'>\n <tr><th>Contributor:</th><td>[author_link]</td></tr>\n <tr><th>Date added:</th><td>[date_added]</td></tr>\n <tr><th>Related Post:</th><td><a href=\'[post_url]\'>[post_name]</a></td></tr>\n <tr><th>Attribution:</th><td>[img_attribution]</td></tr>\n <tr><th>License:</th><td>[img_license]</td></tr>\n </table>\n <h3 style=\'width: 100%; text-align: center;\'>EXIF Data</h3>\n [exif_table no_exif_msg=\'No EXIF data available\' show_blank=false]\n</div>\n','','',0,'','bwbps_pag_2',NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `wp_bwbps_layouts` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_lookup` -- DROP TABLE IF EXISTS `wp_bwbps_lookup`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_lookup` ( `id` int(11) NOT NULL AUTO_INCREMENT, `field_id` int(4) DEFAULT NULL, `value` varchar(255) DEFAULT NULL, `label` varchar(255) DEFAULT NULL, `seq` int(4) DEFAULT NULL, PRIMARY KEY (`id`), KEY `field_id` (`field_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_lookup` -- LOCK TABLES `wp_bwbps_lookup` WRITE; /*!40000 ALTER TABLE `wp_bwbps_lookup` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_lookup` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_params` -- DROP TABLE IF EXISTS `wp_bwbps_params`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_params` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `param_group` varchar(20) DEFAULT NULL, `param` varchar(100) DEFAULT NULL, `num_value` float DEFAULT NULL, `text_value` varchar(255) DEFAULT NULL, `user_ip` varchar(30) DEFAULT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `param_group` (`param_group`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_params` -- LOCK TABLES `wp_bwbps_params` WRITE; /*!40000 ALTER TABLE `wp_bwbps_params` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_params` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_bwbps_ratingssummary` -- DROP TABLE IF EXISTS `wp_bwbps_ratingssummary`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_bwbps_ratingssummary` ( `rating_id` bigint(20) NOT NULL AUTO_INCREMENT, `image_id` bigint(20) NOT NULL, `gallery_id` bigint(20) DEFAULT NULL, `poll_id` bigint(20) DEFAULT NULL, `avg_rating` float(8,4) NOT NULL, `rating_cnt` bigint(11) NOT NULL, `updated_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`rating_id`), KEY `image_id` (`image_id`), KEY `gallery_poll` (`gallery_id`,`poll_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_bwbps_ratingssummary` -- LOCK TABLES `wp_bwbps_ratingssummary` WRITE; /*!40000 ALTER TABLE `wp_bwbps_ratingssummary` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_bwbps_ratingssummary` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_comments` -- DROP TABLE IF EXISTS `wp_comments`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_comments` ( `comment_ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `comment_post_ID` bigint(20) unsigned NOT NULL DEFAULT '0', `comment_author` tinytext NOT NULL, `comment_author_email` varchar(100) NOT NULL DEFAULT '', `comment_author_url` varchar(200) NOT NULL DEFAULT '', `comment_author_IP` varchar(100) NOT NULL DEFAULT '', `comment_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `comment_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `comment_content` text NOT NULL, `comment_karma` int(11) NOT NULL DEFAULT '0', `comment_approved` varchar(20) NOT NULL DEFAULT '1', `comment_agent` varchar(255) NOT NULL DEFAULT '', `comment_type` varchar(20) NOT NULL DEFAULT '', `comment_parent` bigint(20) unsigned NOT NULL DEFAULT '0', `user_id` bigint(20) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`comment_ID`), KEY `comment_approved` (`comment_approved`), KEY `comment_post_ID` (`comment_post_ID`), KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`), KEY `comment_date_gmt` (`comment_date_gmt`), KEY `comment_parent` (`comment_parent`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_comments` -- LOCK TABLES `wp_comments` WRITE; /*!40000 ALTER TABLE `wp_comments` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_comments` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_gigpress_artists` -- DROP TABLE IF EXISTS `wp_gigpress_artists`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_gigpress_artists` ( `artist_id` int(4) NOT NULL AUTO_INCREMENT, `artist_name` varchar(255) NOT NULL, `artist_order` int(4) DEFAULT '0', PRIMARY KEY (`artist_id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_gigpress_artists` -- LOCK TABLES `wp_gigpress_artists` WRITE; /*!40000 ALTER TABLE `wp_gigpress_artists` DISABLE KEYS */; INSERT INTO `wp_gigpress_artists` VALUES (1,'The Haxors',0),(2,'The Haxors',0); /*!40000 ALTER TABLE `wp_gigpress_artists` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_gigpress_shows` -- DROP TABLE IF EXISTS `wp_gigpress_shows`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_gigpress_shows` ( `show_id` int(4) NOT NULL AUTO_INCREMENT, `show_artist_id` int(4) NOT NULL, `show_venue_id` int(4) NOT NULL, `show_tour_id` int(4) DEFAULT '0', `show_date` date NOT NULL, `show_multi` int(1) DEFAULT NULL, `show_time` time NOT NULL, `show_expire` date NOT NULL, `show_price` varchar(32) DEFAULT NULL, `show_tix_url` varchar(255) DEFAULT NULL, `show_tix_phone` varchar(255) DEFAULT NULL, `show_ages` varchar(255) DEFAULT NULL, `show_notes` text, `show_related` bigint(20) DEFAULT '0', `show_status` varchar(32) DEFAULT 'active', `show_tour_restore` int(1) DEFAULT '0', `show_address` varchar(255) DEFAULT NULL, `show_locale` varchar(255) DEFAULT NULL, `show_country` varchar(2) DEFAULT NULL, `show_venue` varchar(255) DEFAULT NULL, `show_venue_url` varchar(255) DEFAULT NULL, `show_venue_phone` varchar(255) DEFAULT NULL, PRIMARY KEY (`show_id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_gigpress_shows` -- LOCK TABLES `wp_gigpress_shows` WRITE; /*!40000 ALTER TABLE `wp_gigpress_shows` DISABLE KEYS */; INSERT INTO `wp_gigpress_shows` VALUES (1,1,1,0,'2013-04-03',0,'00:00:01','2013-04-03','','','','Not sure','<script>alert(\'w00t\');</script>',0,'deleted',0,NULL,NULL,NULL,NULL,NULL,NULL),(2,2,2,0,'2013-04-03',0,'00:00:01','2013-04-03','','','','Not sure','<script>alert(\'w00t\');</script>',0,'deleted',0,NULL,NULL,NULL,NULL,NULL,NULL),(3,2,1,0,'2013-04-03',0,'00:00:01','2013-04-03','','','','Not sure','test',0,'deleted',0,NULL,NULL,NULL,NULL,NULL,NULL); /*!40000 ALTER TABLE `wp_gigpress_shows` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_gigpress_tours` -- DROP TABLE IF EXISTS `wp_gigpress_tours`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_gigpress_tours` ( `tour_id` int(4) NOT NULL AUTO_INCREMENT, `tour_name` varchar(255) NOT NULL, `tour_status` varchar(32) DEFAULT 'active', PRIMARY KEY (`tour_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_gigpress_tours` -- LOCK TABLES `wp_gigpress_tours` WRITE; /*!40000 ALTER TABLE `wp_gigpress_tours` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_gigpress_tours` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_gigpress_venues` -- DROP TABLE IF EXISTS `wp_gigpress_venues`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_gigpress_venues` ( `venue_id` int(4) NOT NULL AUTO_INCREMENT, `venue_name` varchar(255) NOT NULL, `venue_address` varchar(255) DEFAULT NULL, `venue_city` varchar(255) NOT NULL, `venue_country` varchar(2) NOT NULL, `venue_url` varchar(255) DEFAULT NULL, `venue_phone` varchar(255) DEFAULT NULL, PRIMARY KEY (`venue_id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_gigpress_venues` -- LOCK TABLES `wp_gigpress_venues` WRITE; /*!40000 ALTER TABLE `wp_gigpress_venues` DISABLE KEYS */; INSERT INTO `wp_gigpress_venues` VALUES (1,'UMD','','College Park','US','',''),(2,'UMD','','College Park','US','',''); /*!40000 ALTER TABLE `wp_gigpress_venues` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_links` -- DROP TABLE IF EXISTS `wp_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_links` ( `link_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `link_url` varchar(255) NOT NULL DEFAULT '', `link_name` varchar(255) NOT NULL DEFAULT '', `link_image` varchar(255) NOT NULL DEFAULT '', `link_target` varchar(25) NOT NULL DEFAULT '', `link_description` varchar(255) NOT NULL DEFAULT '', `link_visible` varchar(20) NOT NULL DEFAULT 'Y', `link_owner` bigint(20) unsigned NOT NULL DEFAULT '1', `link_rating` int(11) NOT NULL DEFAULT '0', `link_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `link_rel` varchar(255) NOT NULL DEFAULT '', `link_notes` mediumtext NOT NULL, `link_rss` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`link_id`), KEY `link_visible` (`link_visible`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_links` -- LOCK TABLES `wp_links` WRITE; /*!40000 ALTER TABLE `wp_links` DISABLE KEYS */; INSERT INTO `wp_links` VALUES (1,'http://codex.wordpress.org/','Documentation','','','','Y',1,0,'0000-00-00 00:00:00','','',''),(2,'http://wordpress.org/news/','WordPress Blog','','','','Y',1,0,'0000-00-00 00:00:00','','','http://wordpress.org/news/feed/'),(3,'http://wordpress.org/extend/ideas/','Suggest Ideas','','','','Y',1,0,'0000-00-00 00:00:00','','',''),(4,'http://wordpress.org/support/','Support Forum','','','','Y',1,0,'0000-00-00 00:00:00','','',''),(5,'http://wordpress.org/extend/plugins/','Plugins','','','','Y',1,0,'0000-00-00 00:00:00','','',''),(6,'http://wordpress.org/extend/themes/','Themes','','','','Y',1,0,'0000-00-00 00:00:00','','',''),(7,'http://planet.wordpress.org/','WordPress Planet','','','','Y',1,0,'0000-00-00 00:00:00','','',''); /*!40000 ALTER TABLE `wp_links` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_options` -- DROP TABLE IF EXISTS `wp_options`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_options` ( `option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `blog_id` int(11) NOT NULL DEFAULT '0', `option_name` varchar(64) NOT NULL DEFAULT '', `option_value` longtext NOT NULL, `autoload` varchar(20) NOT NULL DEFAULT 'yes', PRIMARY KEY (`option_id`), UNIQUE KEY `option_name` (`option_name`) ) ENGINE=InnoDB AUTO_INCREMENT=351 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_options` -- LOCK TABLES `wp_options` WRITE; /*!40000 ALTER TABLE `wp_options` DISABLE KEYS */; INSERT INTO `wp_options` VALUES (1,0,'siteurl','http://127.0.0.1/wordpress','yes'),(2,0,'blogname','Wordpress 3.2 Target','yes'),(3,0,'blogdescription','Just another WordPress site','yes'),(4,0,'users_can_register','0','yes'),(5,0,'admin_email','gnilson@terpmail.umd.edu','yes'),(6,0,'start_of_week','1','yes'),(7,0,'use_balanceTags','0','yes'),(8,0,'use_smilies','1','yes'),(9,0,'require_name_email','1','yes'),(10,0,'comments_notify','1','yes'),(11,0,'posts_per_rss','10','yes'),(12,0,'rss_use_excerpt','0','yes'),(13,0,'mailserver_url','mail.example.com','yes'),(14,0,'mailserver_login','login@example.com','yes'),(15,0,'mailserver_pass','password','yes'),(16,0,'mailserver_port','110','yes'),(17,0,'default_category','1','yes'),(18,0,'default_comment_status','open','yes'),(19,0,'default_ping_status','open','yes'),(20,0,'default_pingback_flag','0','yes'),(21,0,'default_post_edit_rows','20','yes'),(22,0,'posts_per_page','10','yes'),(23,0,'date_format','F j, Y','yes'),(24,0,'time_format','g:i a','yes'),(25,0,'links_updated_date_format','F j, Y g:i a','yes'),(26,0,'links_recently_updated_prepend','<em>','yes'),(27,0,'links_recently_updated_append','</em>','yes'),(28,0,'links_recently_updated_time','120','yes'),(29,0,'comment_moderation','0','yes'),(30,0,'moderation_notify','1','yes'),(31,0,'permalink_structure','/wordpress/%post_id%','yes'),(32,0,'gzipcompression','0','yes'),(33,0,'hack_file','0','yes'),(34,0,'blog_charset','UTF-8','yes'),(35,0,'moderation_keys','','no'),(36,0,'active_plugins','a:1:{i:0;s:27:\"pretty-link/pretty-link.php\";}','yes'),(37,0,'home','http://127.0.0.1/wordpress','yes'),(38,0,'category_base','','yes'),(39,0,'ping_sites','http://rpc.pingomatic.com/','yes'),(40,0,'advanced_edit','0','yes'),(41,0,'comment_max_links','2','yes'),(42,0,'gmt_offset','0','yes'),(43,0,'default_email_category','1','yes'),(44,0,'recently_edited','','no'),(45,0,'template','twentyeleven','yes'),(46,0,'stylesheet','twentyeleven','yes'),(47,0,'comment_whitelist','1','yes'),(48,0,'blacklist_keys','','no'),(49,0,'comment_registration','0','yes'),(50,0,'rss_language','en','yes'),(51,0,'html_type','text/html','yes'),(52,0,'use_trackback','0','yes'),(53,0,'default_role','subscriber','yes'),(54,0,'db_version','18226','yes'),(55,0,'uploads_use_yearmonth_folders','1','yes'),(56,0,'upload_path','','yes'),(57,0,'blog_public','0','yes'),(58,0,'default_link_category','2','yes'),(59,0,'show_on_front','posts','yes'),(60,0,'tag_base','','yes'),(61,0,'show_avatars','1','yes'),(62,0,'avatar_rating','G','yes'),(63,0,'upload_url_path','','yes'),(64,0,'thumbnail_size_w','150','yes'),(65,0,'thumbnail_size_h','150','yes'),(66,0,'thumbnail_crop','1','yes'),(67,0,'medium_size_w','300','yes'),(68,0,'medium_size_h','300','yes'),(69,0,'avatar_default','mystery','yes'),(70,0,'enable_app','0','yes'),(71,0,'enable_xmlrpc','0','yes'),(72,0,'large_size_w','1024','yes'),(73,0,'large_size_h','1024','yes'),(74,0,'image_default_link_type','file','yes'),(75,0,'image_default_size','','yes'),(76,0,'image_default_align','','yes'),(77,0,'close_comments_for_old_posts','0','yes'),(78,0,'close_comments_days_old','14','yes'),(79,0,'thread_comments','1','yes'),(80,0,'thread_comments_depth','5','yes'),(81,0,'page_comments','0','yes'),(82,0,'comments_per_page','50','yes'),(83,0,'default_comments_page','newest','yes'),(84,0,'comment_order','asc','yes'),(85,0,'sticky_posts','a:0:{}','yes'),(86,0,'widget_categories','a:2:{i:2;a:4:{s:5:\"title\";s:0:\"\";s:5:\"count\";i:0;s:12:\"hierarchical\";i:0;s:8:\"dropdown\";i:0;}s:12:\"_multiwidget\";i:1;}','yes'),(87,0,'widget_text','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(88,0,'widget_rss','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(89,0,'timezone_string','','yes'),(90,0,'embed_autourls','1','yes'),(91,0,'embed_size_w','','yes'),(92,0,'embed_size_h','600','yes'),(93,0,'page_for_posts','0','yes'),(94,0,'page_on_front','0','yes'),(95,0,'default_post_format','0','yes'),(96,0,'wp_user_roles','a:5:{s:13:\"administrator\";a:2:{s:4:\"name\";s:13:\"Administrator\";s:12:\"capabilities\";a:62:{s:13:\"switch_themes\";b:1;s:11:\"edit_themes\";b:1;s:16:\"activate_plugins\";b:1;s:12:\"edit_plugins\";b:1;s:10:\"edit_users\";b:1;s:10:\"edit_files\";b:1;s:14:\"manage_options\";b:1;s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:6:\"import\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:8:\"level_10\";b:1;s:7:\"level_9\";b:1;s:7:\"level_8\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;s:12:\"delete_users\";b:1;s:12:\"create_users\";b:1;s:17:\"unfiltered_upload\";b:1;s:14:\"edit_dashboard\";b:1;s:14:\"update_plugins\";b:1;s:14:\"delete_plugins\";b:1;s:15:\"install_plugins\";b:1;s:13:\"update_themes\";b:1;s:14:\"install_themes\";b:1;s:11:\"update_core\";b:1;s:10:\"list_users\";b:1;s:12:\"remove_users\";b:1;s:9:\"add_users\";b:1;s:13:\"promote_users\";b:1;s:18:\"edit_theme_options\";b:1;s:13:\"delete_themes\";b:1;s:6:\"export\";b:1;}}s:6:\"editor\";a:2:{s:4:\"name\";s:6:\"Editor\";s:12:\"capabilities\";a:34:{s:17:\"moderate_comments\";b:1;s:17:\"manage_categories\";b:1;s:12:\"manage_links\";b:1;s:12:\"upload_files\";b:1;s:15:\"unfiltered_html\";b:1;s:10:\"edit_posts\";b:1;s:17:\"edit_others_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:10:\"edit_pages\";b:1;s:4:\"read\";b:1;s:7:\"level_7\";b:1;s:7:\"level_6\";b:1;s:7:\"level_5\";b:1;s:7:\"level_4\";b:1;s:7:\"level_3\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:17:\"edit_others_pages\";b:1;s:20:\"edit_published_pages\";b:1;s:13:\"publish_pages\";b:1;s:12:\"delete_pages\";b:1;s:19:\"delete_others_pages\";b:1;s:22:\"delete_published_pages\";b:1;s:12:\"delete_posts\";b:1;s:19:\"delete_others_posts\";b:1;s:22:\"delete_published_posts\";b:1;s:20:\"delete_private_posts\";b:1;s:18:\"edit_private_posts\";b:1;s:18:\"read_private_posts\";b:1;s:20:\"delete_private_pages\";b:1;s:18:\"edit_private_pages\";b:1;s:18:\"read_private_pages\";b:1;}}s:6:\"author\";a:2:{s:4:\"name\";s:6:\"Author\";s:12:\"capabilities\";a:10:{s:12:\"upload_files\";b:1;s:10:\"edit_posts\";b:1;s:20:\"edit_published_posts\";b:1;s:13:\"publish_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_2\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;s:22:\"delete_published_posts\";b:1;}}s:11:\"contributor\";a:2:{s:4:\"name\";s:11:\"Contributor\";s:12:\"capabilities\";a:5:{s:10:\"edit_posts\";b:1;s:4:\"read\";b:1;s:7:\"level_1\";b:1;s:7:\"level_0\";b:1;s:12:\"delete_posts\";b:1;}}s:10:\"subscriber\";a:2:{s:4:\"name\";s:10:\"Subscriber\";s:12:\"capabilities\";a:2:{s:4:\"read\";b:1;s:7:\"level_0\";b:1;}}}','yes'),(97,0,'widget_search','a:2:{i:2;a:1:{s:5:\"title\";s:0:\"\";}s:12:\"_multiwidget\";i:1;}','yes'),(98,0,'widget_recent-posts','a:2:{i:2;a:2:{s:5:\"title\";s:0:\"\";s:6:\"number\";i:5;}s:12:\"_multiwidget\";i:1;}','yes'),(99,0,'widget_recent-comments','a:2:{i:2;a:2:{s:5:\"title\";s:0:\"\";s:6:\"number\";i:5;}s:12:\"_multiwidget\";i:1;}','yes'),(100,0,'widget_archives','a:2:{i:2;a:3:{s:5:\"title\";s:0:\"\";s:5:\"count\";i:0;s:8:\"dropdown\";i:0;}s:12:\"_multiwidget\";i:1;}','yes'),(101,0,'widget_meta','a:2:{i:2;a:1:{s:5:\"title\";s:0:\"\";}s:12:\"_multiwidget\";i:1;}','yes'),(102,0,'sidebars_widgets','a:8:{s:19:\"wp_inactive_widgets\";a:0:{}s:19:\"primary-widget-area\";a:6:{i:0;s:8:\"search-2\";i:1;s:14:\"recent-posts-2\";i:2;s:17:\"recent-comments-2\";i:3;s:10:\"archives-2\";i:4;s:12:\"categories-2\";i:5;s:6:\"meta-2\";}s:21:\"secondary-widget-area\";a:0:{}s:24:\"first-footer-widget-area\";a:0:{}s:25:\"second-footer-widget-area\";a:0:{}s:24:\"third-footer-widget-area\";a:0:{}s:25:\"fourth-footer-widget-area\";a:0:{}s:13:\"array_version\";i:3;}','yes'),(103,0,'cron','a:3:{i:1372278485;a:1:{s:19:\"wp_scheduled_delete\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:5:\"daily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:86400;}}}i:1372313176;a:3:{s:16:\"wp_version_check\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}s:17:\"wp_update_plugins\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}s:16:\"wp_update_themes\";a:1:{s:32:\"40cd750bba9870f18aada2478b24840a\";a:3:{s:8:\"schedule\";s:10:\"twicedaily\";s:4:\"args\";a:0:{}s:8:\"interval\";i:43200;}}}s:7:\"version\";i:2;}','yes'),(104,0,'_transient_doing_cron','1372274776','yes'),(107,0,'current_theme','Twenty Eleven','yes'),(108,0,'_site_transient_update_core','O:8:\"stdClass\":3:{s:7:\"updates\";a:1:{i:0;O:8:\"stdClass\":9:{s:8:\"response\";s:7:\"upgrade\";s:8:\"download\";s:40:\"http://wordpress.org/wordpress-3.5.1.zip\";s:6:\"locale\";s:5:\"en_US\";s:8:\"packages\";O:8:\"stdClass\":4:{s:4:\"full\";s:40:\"http://wordpress.org/wordpress-3.5.1.zip\";s:10:\"no_content\";s:51:\"http://wordpress.org/wordpress-3.5.1-no-content.zip\";s:11:\"new_bundled\";s:52:\"http://wordpress.org/wordpress-3.5.1-new-bundled.zip\";s:7:\"partial\";b:0;}s:7:\"current\";s:5:\"3.5.1\";s:11:\"php_version\";s:5:\"5.2.4\";s:13:\"mysql_version\";s:3:\"5.0\";s:11:\"new_bundled\";s:3:\"3.5\";s:15:\"partial_version\";s:0:\"\";}}s:12:\"last_checked\";i:1372274777;s:15:\"version_checked\";s:3:\"3.2\";}','yes'),(109,0,'_site_transient_update_plugins','O:8:\"stdClass\":3:{s:12:\"last_checked\";i:1372274797;s:7:\"checked\";a:3:{s:19:\"akismet/akismet.php\";s:5:\"2.5.3\";s:9:\"hello.php\";s:3:\"1.6\";s:27:\"pretty-link/pretty-link.php\";s:5:\"1.5.2\";}s:8:\"response\";a:1:{s:19:\"akismet/akismet.php\";O:8:\"stdClass\":5:{s:2:\"id\";s:2:\"15\";s:4:\"slug\";s:7:\"akismet\";s:11:\"new_version\";s:5:\"2.5.8\";s:3:\"url\";s:37:\"http://wordpress.org/plugins/akismet/\";s:7:\"package\";s:55:\"http://downloads.wordpress.org/plugin/akismet.2.5.8.zip\";}}}','yes'),(110,0,'_site_transient_update_themes','O:8:\"stdClass\":3:{s:12:\"last_checked\";i:1372274817;s:7:\"checked\";a:2:{s:12:\"twentyeleven\";s:3:\"1.1\";s:9:\"twentyten\";s:3:\"1.2\";}s:8:\"response\";a:2:{s:12:\"twentyeleven\";a:3:{s:11:\"new_version\";s:3:\"1.5\";s:3:\"url\";s:40:\"http://wordpress.org/themes/twentyeleven\";s:7:\"package\";s:57:\"http://wordpress.org/themes/download/twentyeleven.1.5.zip\";}s:9:\"twentyten\";a:3:{s:11:\"new_version\";s:3:\"1.5\";s:3:\"url\";s:37:\"http://wordpress.org/themes/twentyten\";s:7:\"package\";s:54:\"http://wordpress.org/themes/download/twentyten.1.5.zip\";}}}','yes'),(111,0,'widget_pages','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(112,0,'widget_calendar','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(113,0,'widget_links','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(114,0,'widget_tag_cloud','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(115,0,'widget_nav_menu','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(116,0,'widget_widget_twentyeleven_ephemera','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(117,0,'_site_transient_timeout_browser_d9e8a45e78e5d7c5b931564fc5f45dc7','1365625685','yes'),(118,0,'_site_transient_browser_d9e8a45e78e5d7c5b931564fc5f45dc7','a:9:{s:8:\"platform\";s:5:\"Linux\";s:4:\"name\";s:7:\"Firefox\";s:7:\"version\";s:6:\"13.0.1\";s:10:\"update_url\";s:23:\"http://www.firefox.com/\";s:7:\"img_src\";s:50:\"http://s.wordpress.org/images/browsers/firefox.png\";s:11:\"img_src_ssl\";s:49:\"https://wordpress.org/images/browsers/firefox.png\";s:15:\"current_version\";s:2:\"16\";s:7:\"upgrade\";b:1;s:8:\"insecure\";b:0;}','yes'),(119,0,'dashboard_widget_options','a:4:{s:25:\"dashboard_recent_comments\";a:1:{s:5:\"items\";i:5;}s:24:\"dashboard_incoming_links\";a:5:{s:4:\"home\";s:26:\"http://127.0.0.1/wordpress\";s:4:\"link\";s:102:\"http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:http://127.0.0.1/wordpress/\";s:3:\"url\";s:135:\"http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:http://127.0.0.1/wordpress/\";s:5:\"items\";i:10;s:9:\"show_date\";b:0;}s:17:\"dashboard_primary\";a:7:{s:4:\"link\";s:26:\"http://wordpress.org/news/\";s:3:\"url\";s:31:\"http://wordpress.org/news/feed/\";s:5:\"title\";s:14:\"WordPress Blog\";s:5:\"items\";i:2;s:12:\"show_summary\";i:1;s:11:\"show_author\";i:0;s:9:\"show_date\";i:1;}s:19:\"dashboard_secondary\";a:7:{s:4:\"link\";s:28:\"http://planet.wordpress.org/\";s:3:\"url\";s:33:\"http://planet.wordpress.org/feed/\";s:5:\"title\";s:20:\"Other WordPress News\";s:5:\"items\";i:5;s:12:\"show_summary\";i:0;s:11:\"show_author\";i:0;s:9:\"show_date\";i:0;}}','yes'),(122,0,'can_compress_scripts','0','yes'),(157,0,'recently_activated','a:0:{}','yes'),(159,0,'uninstall_plugins','a:2:{i:0;b:0;s:21:\"gigpress/gigpress.php\";s:18:\"gigpress_uninstall\";}','yes'),(160,0,'widget_gigpress','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(169,0,'_transient_timeout_feed_3f3acdaaa076c5c8f7ef1e97a6996807','1365117949','no'),(170,0,'_transient_feed_3f3acdaaa076c5c8f7ef1e97a6996807','a:4:{s:5:\"child\";a:1:{s:0:\"\";a:1:{s:3:\"rss\";a:1:{i:0;a:6:{s:4:\"data\";s:4:\"\n \n\";s:7:\"attribs\";a:1:{s:0:\"\";a:1:{s:7:\"version\";s:3:\"2.0\";}}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:1:{s:0:\"\";a:1:{s:7:\"channel\";a:1:{i:0;a:6:{s:4:\"data\";s:33:\"\n \n \n \n \n \n \n \";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";s:5:\"child\";a:2:{s:0:\"\";a:3:{s:5:\"title\";a:1:{i:0;a:5:{s:4:\"data\";s:57:\"link:http://127.0.0.1/wordpress/ - Google Blog Search\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:4:\"link\";a:1:{i:0;a:5:{s:4:\"data\";s:94:\"http://www.google.com/search?ie=utf-8&q=link:http://127.0.0.1/wordpress/&tbm=blg&tbs=sbd:1\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:11:\"description\";a:1:{i:0;a:5:{s:4:\"data\";s:88:\"Your search - <b>link:http://127.0.0.1/wordpress/</b> - did not match any documents.\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}s:36:\"http://a9.com/-/spec/opensearch/1.1/\";a:3:{s:12:\"totalResults\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"0\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:10:\"startIndex\";a:1:{i:0;a:5:{s:4:\"data\";s:1:\"1\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}s:12:\"itemsPerPage\";a:1:{i:0;a:5:{s:4:\"data\";s:2:\"10\";s:7:\"attribs\";a:0:{}s:8:\"xml_base\";s:0:\"\";s:17:\"xml_base_explicit\";b:0;s:8:\"xml_lang\";s:0:\"\";}}}}}}}}}}}}s:4:\"type\";i:128;s:7:\"headers\";a:9:{s:12:\"content-type\";s:28:\"text/xml; charset=ISO-8859-1\";s:4:\"date\";s:29:\"Thu, 04 Apr 2013 11:27:55 GMT\";s:7:\"expires\";s:2:\"-1\";s:13:\"cache-control\";s:18:\"private, max-age=0\";s:10:\"set-cookie\";a:2:{i:0;s:143:\"PREF=ID=ae347fc7a472474e:FF=0:TM=1365074875:LM=1365074875:S=J8cHRGQDf6tmdC7r; expires=Sat, 04-Apr-2015 11:27:55 GMT; path=/; domain=.google.com\";i:1;s:212:\"NID=67=iP0pBWJWxATGWK2SY3OgXYfdcH4ZZS_dNceVY0KFIShZxK7MVKvOSwE2fkHu6dngxpRcyKKNtaLt4Nl4pNqoAxAch76F-9MGE5e3W1FTA6jYANHi81cg-R2EvRmuXIEh; expires=Fri, 04-Oct-2013 11:27:55 GMT; path=/; domain=.google.com; HttpOnly\";}s:3:\"p3p\";s:122:\"CP=\"This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info.\"\";s:6:\"server\";s:3:\"gws\";s:16:\"x-xss-protection\";s:13:\"1; mode=block\";s:15:\"x-frame-options\";s:10:\"SAMEORIGIN\";}s:5:\"build\";s:14:\"20090627192103\";}','no'),(171,0,'_transient_timeout_feed_mod_3f3acdaaa076c5c8f7ef1e97a6996807','1365117949','no'),(172,0,'_transient_feed_mod_3f3acdaaa076c5c8f7ef1e97a6996807','1365074749','no'),(203,0,'_site_transient_timeout_browser_5ec8c1ed49733eeafd82c0b3a24edcd9','1372182209','yes'),(204,0,'_site_transient_browser_5ec8c1ed49733eeafd82c0b3a24edcd9','a:9:{s:8:\"platform\";s:5:\"Linux\";s:4:\"name\";s:7:\"Firefox\";s:7:\"version\";s:4:\"17.0\";s:10:\"update_url\";s:23:\"http://www.firefox.com/\";s:7:\"img_src\";s:50:\"http://s.wordpress.org/images/browsers/firefox.png\";s:11:\"img_src_ssl\";s:49:\"https://wordpress.org/images/browsers/firefox.png\";s:15:\"current_version\";s:2:\"16\";s:7:\"upgrade\";b:0;s:8:\"insecure\";b:0;}','yes'),(238,0,'_site_transient_timeout_poptags_40cd750bba9870f18aada2478b24840a','1371588232','yes'),(239,0,'_site_transient_poptags_40cd750bba9870f18aada2478b24840a','a:40:{s:6:\"widget\";a:3:{s:4:\"name\";s:6:\"widget\";s:4:\"slug\";s:6:\"widget\";s:5:\"count\";s:4:\"3827\";}s:4:\"post\";a:3:{s:4:\"name\";s:4:\"Post\";s:4:\"slug\";s:4:\"post\";s:5:\"count\";s:4:\"2420\";}s:6:\"plugin\";a:3:{s:4:\"name\";s:6:\"plugin\";s:4:\"slug\";s:6:\"plugin\";s:5:\"count\";s:4:\"2308\";}s:5:\"admin\";a:3:{s:4:\"name\";s:5:\"admin\";s:4:\"slug\";s:5:\"admin\";s:5:\"count\";s:4:\"1914\";}s:5:\"posts\";a:3:{s:4:\"name\";s:5:\"posts\";s:4:\"slug\";s:5:\"posts\";s:5:\"count\";s:4:\"1829\";}s:7:\"sidebar\";a:3:{s:4:\"name\";s:7:\"sidebar\";s:4:\"slug\";s:7:\"sidebar\";s:5:\"count\";s:4:\"1569\";}s:7:\"twitter\";a:3:{s:4:\"name\";s:7:\"twitter\";s:4:\"slug\";s:7:\"twitter\";s:5:\"count\";s:4:\"1305\";}s:6:\"google\";a:3:{s:4:\"name\";s:6:\"google\";s:4:\"slug\";s:6:\"google\";s:5:\"count\";s:4:\"1304\";}s:8:\"comments\";a:3:{s:4:\"name\";s:8:\"comments\";s:4:\"slug\";s:8:\"comments\";s:5:\"count\";s:4:\"1289\";}s:6:\"images\";a:3:{s:4:\"name\";s:6:\"images\";s:4:\"slug\";s:6:\"images\";s:5:\"count\";s:4:\"1244\";}s:4:\"page\";a:3:{s:4:\"name\";s:4:\"page\";s:4:\"slug\";s:4:\"page\";s:5:\"count\";s:4:\"1201\";}s:5:\"image\";a:3:{s:4:\"name\";s:5:\"image\";s:4:\"slug\";s:5:\"image\";s:5:\"count\";s:4:\"1114\";}s:5:\"links\";a:3:{s:4:\"name\";s:5:\"links\";s:4:\"slug\";s:5:\"links\";s:5:\"count\";s:3:\"972\";}s:9:\"shortcode\";a:3:{s:4:\"name\";s:9:\"shortcode\";s:4:\"slug\";s:9:\"shortcode\";s:5:\"count\";s:3:\"960\";}s:8:\"facebook\";a:3:{s:4:\"name\";s:8:\"Facebook\";s:4:\"slug\";s:8:\"facebook\";s:5:\"count\";s:3:\"956\";}s:3:\"seo\";a:3:{s:4:\"name\";s:3:\"seo\";s:4:\"slug\";s:3:\"seo\";s:5:\"count\";s:3:\"929\";}s:9:\"wordpress\";a:3:{s:4:\"name\";s:9:\"wordpress\";s:4:\"slug\";s:9:\"wordpress\";s:5:\"count\";s:3:\"822\";}s:7:\"gallery\";a:3:{s:4:\"name\";s:7:\"gallery\";s:4:\"slug\";s:7:\"gallery\";s:5:\"count\";s:3:\"809\";}s:6:\"social\";a:3:{s:4:\"name\";s:6:\"social\";s:4:\"slug\";s:6:\"social\";s:5:\"count\";s:3:\"763\";}s:3:\"rss\";a:3:{s:4:\"name\";s:3:\"rss\";s:4:\"slug\";s:3:\"rss\";s:5:\"count\";s:3:\"710\";}s:7:\"widgets\";a:3:{s:4:\"name\";s:7:\"widgets\";s:4:\"slug\";s:7:\"widgets\";s:5:\"count\";s:3:\"677\";}s:6:\"jquery\";a:3:{s:4:\"name\";s:6:\"jquery\";s:4:\"slug\";s:6:\"jquery\";s:5:\"count\";s:3:\"670\";}s:5:\"pages\";a:3:{s:4:\"name\";s:5:\"pages\";s:4:\"slug\";s:5:\"pages\";s:5:\"count\";s:3:\"666\";}s:5:\"email\";a:3:{s:4:\"name\";s:5:\"email\";s:4:\"slug\";s:5:\"email\";s:5:\"count\";s:3:\"615\";}s:4:\"ajax\";a:3:{s:4:\"name\";s:4:\"AJAX\";s:4:\"slug\";s:4:\"ajax\";s:5:\"count\";s:3:\"611\";}s:5:\"media\";a:3:{s:4:\"name\";s:5:\"media\";s:4:\"slug\";s:5:\"media\";s:5:\"count\";s:3:\"580\";}s:10:\"javascript\";a:3:{s:4:\"name\";s:10:\"javascript\";s:4:\"slug\";s:10:\"javascript\";s:5:\"count\";s:3:\"560\";}s:5:\"video\";a:3:{s:4:\"name\";s:5:\"video\";s:4:\"slug\";s:5:\"video\";s:5:\"count\";s:3:\"552\";}s:10:\"buddypress\";a:3:{s:4:\"name\";s:10:\"buddypress\";s:4:\"slug\";s:10:\"buddypress\";s:5:\"count\";s:3:\"544\";}s:4:\"feed\";a:3:{s:4:\"name\";s:4:\"feed\";s:4:\"slug\";s:4:\"feed\";s:5:\"count\";s:3:\"534\";}s:7:\"content\";a:3:{s:4:\"name\";s:7:\"content\";s:4:\"slug\";s:7:\"content\";s:5:\"count\";s:3:\"519\";}s:5:\"photo\";a:3:{s:4:\"name\";s:5:\"photo\";s:4:\"slug\";s:5:\"photo\";s:5:\"count\";s:3:\"518\";}s:4:\"link\";a:3:{s:4:\"name\";s:4:\"link\";s:4:\"slug\";s:4:\"link\";s:5:\"count\";s:3:\"497\";}s:6:\"photos\";a:3:{s:4:\"name\";s:6:\"photos\";s:4:\"slug\";s:6:\"photos\";s:5:\"count\";s:3:\"492\";}s:5:\"login\";a:3:{s:4:\"name\";s:5:\"login\";s:4:\"slug\";s:5:\"login\";s:5:\"count\";s:3:\"452\";}s:4:\"spam\";a:3:{s:4:\"name\";s:4:\"spam\";s:4:\"slug\";s:4:\"spam\";s:5:\"count\";s:3:\"451\";}s:8:\"category\";a:3:{s:4:\"name\";s:8:\"category\";s:4:\"slug\";s:8:\"category\";s:5:\"count\";s:3:\"448\";}s:5:\"stats\";a:3:{s:4:\"name\";s:5:\"stats\";s:4:\"slug\";s:5:\"stats\";s:5:\"count\";s:3:\"448\";}s:7:\"youtube\";a:3:{s:4:\"name\";s:7:\"youtube\";s:4:\"slug\";s:7:\"youtube\";s:5:\"count\";s:3:\"431\";}s:5:\"share\";a:3:{s:4:\"name\";s:5:\"Share\";s:4:\"slug\";s:5:\"share\";s:5:\"count\";s:3:\"426\";}}','yes'),(245,0,'prli_options','O:11:\"PrliOptions\":23:{s:16:\"prli_exclude_ips\";s:0:\"\";s:13:\"whitelist_ips\";s:0:\"\";s:13:\"filter_robots\";i:0;s:17:\"extended_tracking\";s:6:\"normal\";s:19:\"prettybar_image_url\";s:86:\"http://127.0.0.1/wordpress/wp-content/plugins/pretty-link/images/pretty-link-48x48.png\";s:30:\"prettybar_background_image_url\";s:83:\"http://127.0.0.1/wordpress/wp-content/plugins/pretty-link/images/bar_background.png\";s:15:\"prettybar_color\";s:0:\"\";s:20:\"prettybar_text_color\";s:6:\"000000\";s:20:\"prettybar_link_color\";s:6:\"0000ee\";s:21:\"prettybar_hover_color\";s:6:\"ababab\";s:23:\"prettybar_visited_color\";s:6:\"551a8b\";s:20:\"prettybar_show_title\";s:1:\"1\";s:26:\"prettybar_show_description\";s:1:\"1\";s:26:\"prettybar_show_share_links\";s:1:\"1\";s:30:\"prettybar_show_target_url_link\";s:1:\"1\";s:21:\"prettybar_title_limit\";s:2:\"25\";s:20:\"prettybar_desc_limit\";s:2:\"30\";s:20:\"prettybar_link_limit\";s:2:\"30\";s:18:\"link_redirect_type\";s:3:\"307\";s:11:\"link_prefix\";i:0;s:13:\"link_track_me\";s:1:\"1\";s:13:\"link_nofollow\";s:1:\"0\";s:16:\"bookmarklet_auth\";s:32:\"efd3354e10ef6281dd3e8c2bc01aca64\";}','yes'),(246,0,'prli_db_version','12','yes'),(247,0,'BWBPhotosmashAdminOptions','a:73:{s:8:\"auto_add\";i:0;s:11:\"img_perpage\";i:0;s:10:\"img_perrow\";i:0;s:23:\"use_wp_upload_functions\";i:1;s:23:\"add_to_wp_media_library\";i:1;s:13:\"max_file_size\";i:0;s:11:\"mini_aspect\";i:0;s:10:\"mini_width\";i:125;s:11:\"mini_height\";i:125;s:12:\"thumb_aspect\";i:0;s:11:\"thumb_width\";i:125;s:12:\"thumb_height\";i:125;s:13:\"medium_aspect\";i:0;s:12:\"medium_width\";i:300;s:13:\"medium_height\";i:300;s:12:\"image_aspect\";i:0;s:11:\"image_width\";i:0;s:12:\"image_height\";i:0;s:12:\"anchor_class\";s:0:\"\";s:7:\"img_rel\";s:15:\"lightbox[album]\";s:8:\"add_text\";s:9:\"Add Photo\";s:15:\"gallery_caption\";s:18:\"PhotoSmash Gallery\";s:19:\"upload_form_caption\";s:26:\"Select an image to upload:\";s:9:\"img_class\";s:9:\"ps_images\";s:12:\"show_caption\";i:1;s:16:\"nofollow_caption\";i:1;s:17:\"alert_all_uploads\";i:0;s:10:\"img_alerts\";i:3600;s:15:\"show_imgcaption\";i:1;s:12:\"contrib_role\";i:10;s:10:\"img_status\";i:0;s:10:\"last_alert\";i:0;s:12:\"use_advanced\";i:0;s:12:\"use_urlfield\";i:0;s:15:\"use_attribution\";i:0;s:14:\"use_customform\";i:0;s:16:\"use_customfields\";i:0;s:12:\"use_thickbox\";i:1;s:18:\"use_alt_ajaxscript\";i:0;s:14:\"alt_ajaxscript\";s:0:\"\";s:14:\"alt_javascript\";s:0:\"\";s:18:\"uploadform_visible\";i:0;s:14:\"use_manualform\";i:0;s:9:\"layout_id\";i:-1;s:17:\"caption_targetnew\";i:0;s:13:\"img_targetnew\";i:0;s:13:\"custom_formid\";i:0;s:12:\"use_donelink\";i:0;s:8:\"css_file\";s:0:\"\";s:19:\"exclude_default_css\";i:0;s:11:\"date_format\";s:5:\"m/d/Y\";s:18:\"upload_authmessage\";s:0:\"\";s:23:\"imglinks_postpages_only\";i:0;s:10:\"sort_field\";i:0;s:10:\"sort_order\";i:1;s:14:\"contrib_gal_on\";i:0;s:22:\"suppress_contrib_posts\";i:0;s:7:\"poll_id\";i:0;s:9:\"favorites\";i:0;s:15:\"rating_position\";i:0;s:17:\"rating_allow_anon\";i:0;s:12:\"mod_send_msg\";i:0;s:15:\"mod_approve_msg\";s:117:\"Thanks for submitting your image to [blogname]! It has been accepted and is now visible in the appropriate galleries.\";s:18:\"mod_reject_message\";s:221:\"Sorry, the image you submitted to [blogname] has been reviewed, but did not meet our submission guidelines. Please review our guidelines to see what types of images we accept. We look forward to your future submissions.\";s:7:\"version\";s:5:\"1.0.0\";s:9:\"tb_height\";i:390;s:8:\"tb_width\";i:545;s:10:\"gmap_width\";i:450;s:11:\"gmap_height\";i:350;s:7:\"gmap_js\";b:0;s:11:\"gmap_layout\";s:0:\"\";s:16:\"auto_maptowidget\";i:0;s:10:\"tags_mapid\";b:0;}','yes'),(248,0,'bwbps_cf_stdfields','a:31:{i:0;s:12:\"image_select\";i:1;s:14:\"image_select_2\";i:2;s:12:\"video_select\";i:3;s:6:\"submit\";i:4;s:7:\"caption\";i:5;s:8:\"caption2\";i:6;s:9:\"user_name\";i:7;s:8:\"user_url\";i:8;s:3:\"url\";i:9;s:9:\"thumbnail\";i:10;s:11:\"thumbnail_2\";i:11;s:18:\"user_submitted_url\";i:12;s:4:\"done\";i:13;s:7:\"loading\";i:14;s:7:\"message\";i:15;s:15:\"img_attribution\";i:16;s:11:\"img_license\";i:17;s:13:\"category_name\";i:18;s:13:\"category_link\";i:19;s:11:\"category_id\";i:20;s:7:\"post_id\";i:21;s:14:\"allow_no_image\";i:22;s:8:\"post_cat\";i:23;s:9:\"post_cat1\";i:24;s:9:\"post_cat2\";i:25;s:9:\"post_cat3\";i:26;s:9:\"post_tags\";i:27;s:12:\"tag_dropdown\";i:28;s:8:\"bloginfo\";i:29;s:10:\"plugin_url\";i:30;s:12:\"preview_post\";}','yes'),(249,0,'bwbps_custfield_ver','22','yes'),(250,0,'widget_photosmash-widget','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(251,0,'widget_photosmash-tags-widget','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(252,0,'widget_psmap-widget','a:2:{i:2;a:0:{}s:12:\"_multiwidget\";i:1;}','yes'),(291,0,'_transient_plugins_delete_result_1','1','yes'),(331,0,'_site_transient_timeout_theme_roots','1372282017','yes'),(332,0,'_site_transient_theme_roots','a:2:{s:12:\"twentyeleven\";s:7:\"/themes\";s:9:\"twentyten\";s:7:\"/themes\";}','yes'),(333,0,'_site_transient_timeout__prli_messages','1372276661','yes'),(334,0,'_site_transient__prli_messages','a:1:{i:0;s:38:\"Add a Pretty Link from your Dashboard:\";}','yes'),(335,0,'_transient_timeout_dash_20494a3d90a6669585674ed0eb8dcd8f','1372318083','no'),(336,0,'_transient_dash_20494a3d90a6669585674ed0eb8dcd8f','<p><strong>RSS Error</strong>: WP HTTP Error: Could not open handle for fopen() to http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:http://127.0.0.1/wordpress/</p>','no'),(337,0,'_transient_timeout_dash_4077549d03da2e451c8b5f002294ff51','1372318083','no'),(338,0,'_transient_dash_4077549d03da2e451c8b5f002294ff51','<div class=\"rss-widget\"><p><strong>RSS Error</strong>: WP HTTP Error: Could not open handle for fopen() to http://wordpress.org/news/feed/</p></div>','no'),(339,0,'_transient_timeout_dash_aa95765b5cc111c56d5993d476b1c2f0','1372318084','no'),(340,0,'_transient_dash_aa95765b5cc111c56d5993d476b1c2f0','<div class=\"rss-widget\"><p><strong>RSS Error</strong>: WP HTTP Error: Could not open handle for fopen() to http://planet.wordpress.org/feed/</p></div>','no'),(341,0,'_transient_timeout_plugin_slugs','1372361376','no'),(342,0,'_transient_plugin_slugs','a:3:{i:0;s:19:\"akismet/akismet.php\";i:1;s:9:\"hello.php\";i:2;s:27:\"pretty-link/pretty-link.php\";}','no'),(343,0,'_transient_timeout_dash_de3249c4736ad3bd2cd29147c4a0d43e','1372318124','no'),(344,0,'_transient_dash_de3249c4736ad3bd2cd29147c4a0d43e','','no'),(350,0,'rewrite_rules','a:71:{s:57:\"wordpress/category/(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:52:\"wordpress/category/(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:52:\"index.php?category_name=$matches[1]&feed=$matches[2]\";s:45:\"wordpress/category/(.+?)/page/?([0-9]{1,})/?$\";s:53:\"index.php?category_name=$matches[1]&paged=$matches[2]\";s:27:\"wordpress/category/(.+?)/?$\";s:35:\"index.php?category_name=$matches[1]\";s:54:\"wordpress/tag/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:49:\"wordpress/tag/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?tag=$matches[1]&feed=$matches[2]\";s:42:\"wordpress/tag/([^/]+)/page/?([0-9]{1,})/?$\";s:43:\"index.php?tag=$matches[1]&paged=$matches[2]\";s:24:\"wordpress/tag/([^/]+)/?$\";s:25:\"index.php?tag=$matches[1]\";s:55:\"wordpress/type/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?post_format=$matches[1]&feed=$matches[2]\";s:50:\"wordpress/type/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?post_format=$matches[1]&feed=$matches[2]\";s:43:\"wordpress/type/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?post_format=$matches[1]&paged=$matches[2]\";s:25:\"wordpress/type/([^/]+)/?$\";s:33:\"index.php?post_format=$matches[1]\";s:14:\".*wp-atom.php$\";s:19:\"index.php?feed=atom\";s:13:\".*wp-rdf.php$\";s:18:\"index.php?feed=rdf\";s:13:\".*wp-rss.php$\";s:18:\"index.php?feed=rss\";s:14:\".*wp-rss2.php$\";s:19:\"index.php?feed=rss2\";s:14:\".*wp-feed.php$\";s:19:\"index.php?feed=feed\";s:22:\".*wp-commentsrss2.php$\";s:34:\"index.php?feed=rss2&withcomments=1\";s:32:\"feed/(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:27:\"(feed|rdf|rss|rss2|atom)/?$\";s:27:\"index.php?&feed=$matches[1]\";s:20:\"page/?([0-9]{1,})/?$\";s:28:\"index.php?&paged=$matches[1]\";s:41:\"comments/feed/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:36:\"comments/(feed|rdf|rss|rss2|atom)/?$\";s:42:\"index.php?&feed=$matches[1]&withcomments=1\";s:29:\"comments/page/?([0-9]{1,})/?$\";s:28:\"index.php?&paged=$matches[1]\";s:44:\"search/(.+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:39:\"search/(.+)/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?s=$matches[1]&feed=$matches[2]\";s:32:\"search/(.+)/page/?([0-9]{1,})/?$\";s:41:\"index.php?s=$matches[1]&paged=$matches[2]\";s:14:\"search/(.+)/?$\";s:23:\"index.php?s=$matches[1]\";s:57:\"wordpress/author/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:52:\"wordpress/author/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:50:\"index.php?author_name=$matches[1]&feed=$matches[2]\";s:45:\"wordpress/author/([^/]+)/page/?([0-9]{1,})/?$\";s:51:\"index.php?author_name=$matches[1]&paged=$matches[2]\";s:27:\"wordpress/author/([^/]+)/?$\";s:33:\"index.php?author_name=$matches[1]\";s:84:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:79:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:80:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&feed=$matches[4]\";s:72:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:81:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]\";s:54:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$\";s:63:\"index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]\";s:71:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:66:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/(feed|rdf|rss|rss2|atom)/?$\";s:64:\"index.php?year=$matches[1]&monthnum=$matches[2]&feed=$matches[3]\";s:59:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$\";s:65:\"index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]\";s:41:\"wordpress/date/([0-9]{4})/([0-9]{1,2})/?$\";s:47:\"index.php?year=$matches[1]&monthnum=$matches[2]\";s:58:\"wordpress/date/([0-9]{4})/feed/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:53:\"wordpress/date/([0-9]{4})/(feed|rdf|rss|rss2|atom)/?$\";s:43:\"index.php?year=$matches[1]&feed=$matches[2]\";s:46:\"wordpress/date/([0-9]{4})/page/?([0-9]{1,})/?$\";s:44:\"index.php?year=$matches[1]&paged=$matches[2]\";s:28:\"wordpress/date/([0-9]{4})/?$\";s:26:\"index.php?year=$matches[1]\";s:38:\"wordpress/[0-9]+/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:48:\"wordpress/[0-9]+/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:68:\"wordpress/[0-9]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:63:\"wordpress/[0-9]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:63:\"wordpress/[0-9]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:31:\"wordpress/([0-9]+)/trackback/?$\";s:28:\"index.php?p=$matches[1]&tb=1\";s:51:\"wordpress/([0-9]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?p=$matches[1]&feed=$matches[2]\";s:46:\"wordpress/([0-9]+)/(feed|rdf|rss|rss2|atom)/?$\";s:40:\"index.php?p=$matches[1]&feed=$matches[2]\";s:39:\"wordpress/([0-9]+)/page/?([0-9]{1,})/?$\";s:41:\"index.php?p=$matches[1]&paged=$matches[2]\";s:46:\"wordpress/([0-9]+)/comment-page-([0-9]{1,})/?$\";s:41:\"index.php?p=$matches[1]&cpage=$matches[2]\";s:31:\"wordpress/([0-9]+)(/[0-9]+)?/?$\";s:40:\"index.php?p=$matches[1]&page=$matches[2]\";s:27:\"wordpress/[0-9]+/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:37:\"wordpress/[0-9]+/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:57:\"wordpress/[0-9]+/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\"wordpress/[0-9]+/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:52:\"wordpress/[0-9]+/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:25:\".+?/attachment/([^/]+)/?$\";s:32:\"index.php?attachment=$matches[1]\";s:35:\".+?/attachment/([^/]+)/trackback/?$\";s:37:\"index.php?attachment=$matches[1]&tb=1\";s:55:\".+?/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:50:\".+?/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$\";s:49:\"index.php?attachment=$matches[1]&feed=$matches[2]\";s:50:\".+?/attachment/([^/]+)/comment-page-([0-9]{1,})/?$\";s:50:\"index.php?attachment=$matches[1]&cpage=$matches[2]\";s:18:\"(.+?)/trackback/?$\";s:35:\"index.php?pagename=$matches[1]&tb=1\";s:38:\"(.+?)/feed/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:33:\"(.+?)/(feed|rdf|rss|rss2|atom)/?$\";s:47:\"index.php?pagename=$matches[1]&feed=$matches[2]\";s:26:\"(.+?)/page/?([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&paged=$matches[2]\";s:33:\"(.+?)/comment-page-([0-9]{1,})/?$\";s:48:\"index.php?pagename=$matches[1]&cpage=$matches[2]\";s:18:\"(.+?)(/[0-9]+)?/?$\";s:47:\"index.php?pagename=$matches[1]&page=$matches[2]\";}','yes'); /*!40000 ALTER TABLE `wp_options` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_postmeta` -- DROP TABLE IF EXISTS `wp_postmeta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_postmeta` ( `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `post_id` bigint(20) unsigned NOT NULL DEFAULT '0', `meta_key` varchar(255) DEFAULT NULL, `meta_value` longtext, PRIMARY KEY (`meta_id`), KEY `post_id` (`post_id`), KEY `meta_key` (`meta_key`) ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_postmeta` -- LOCK TABLES `wp_postmeta` WRITE; /*!40000 ALTER TABLE `wp_postmeta` DISABLE KEYS */; INSERT INTO `wp_postmeta` VALUES (1,2,'_wp_page_template','default'); /*!40000 ALTER TABLE `wp_postmeta` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_posts` -- DROP TABLE IF EXISTS `wp_posts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_posts` ( `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `post_author` bigint(20) unsigned NOT NULL DEFAULT '0', `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `post_content` longtext NOT NULL, `post_title` text NOT NULL, `post_excerpt` text NOT NULL, `post_status` varchar(20) NOT NULL DEFAULT 'publish', `comment_status` varchar(20) NOT NULL DEFAULT 'open', `ping_status` varchar(20) NOT NULL DEFAULT 'open', `post_password` varchar(20) NOT NULL DEFAULT '', `post_name` varchar(200) NOT NULL DEFAULT '', `to_ping` text NOT NULL, `pinged` text NOT NULL, `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `post_content_filtered` text NOT NULL, `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0', `guid` varchar(255) NOT NULL DEFAULT '', `menu_order` int(11) NOT NULL DEFAULT '0', `post_type` varchar(20) NOT NULL DEFAULT 'post', `post_mime_type` varchar(100) NOT NULL DEFAULT '', `comment_count` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`ID`), KEY `post_name` (`post_name`), KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`), KEY `post_parent` (`post_parent`), KEY `post_author` (`post_author`) ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_posts` -- LOCK TABLES `wp_posts` WRITE; /*!40000 ALTER TABLE `wp_posts` DISABLE KEYS */; INSERT INTO `wp_posts` VALUES (1,1,'2013-04-03 18:06:12','2013-04-03 18:06:12','Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!','Hello world!','','publish','open','open','','hello-world','','','2013-04-03 18:06:12','2013-04-03 18:06:12','',0,'http://127.0.0.1/wordpress/?p=1',0,'post','',1),(2,1,'2013-04-03 18:06:12','2013-04-03 18:06:12','This is an example page. It\'s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:\n\n<blockquote>Hi there! I\'m a bike messenger by day, aspiring actor by night, and this is my blog. I live in Los Angeles, have a great dog named Jack, and I like pi&#241;a coladas. (And gettin\' caught in the rain.)</blockquote>\n\n...or something like this:\n\n<blockquote>The XYZ Doohickey Company was founded in 1971, and has been providing quality doohickies to the public ever since. Located in Gotham City, XYZ employs over 2,000 people and does all kinds of awesome things for the Gotham community.</blockquote>\n\nAs a new WordPress user, you should go to <a href=\"http://127.0.0.1/wordpress/wp-admin/\">your dashboard</a> to delete this page and create new pages for your content. Have fun!','Sample Page','','publish','open','open','','sample-page','','','2013-04-03 18:06:12','2013-04-03 18:06:12','',0,'http://127.0.0.1/wordpress/?page_id=2',0,'page','',0),(3,1,'2013-04-03 20:28:05','0000-00-00 00:00:00','','Auto Draft','','auto-draft','open','open','','','','','2013-04-03 20:28:05','0000-00-00 00:00:00','',0,'http://127.0.0.1/wordpress/?p=3',0,'post','',0),(8,2,'2013-04-04 11:31:44','0000-00-00 00:00:00','','Auto Draft','','auto-draft','open','open','','','','','2013-04-04 11:31:44','0000-00-00 00:00:00','',0,'http://127.0.0.1/wordpress/?p=8',0,'post','',0); /*!40000 ALTER TABLE `wp_posts` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_prli_clicks` -- DROP TABLE IF EXISTS `wp_prli_clicks`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_prli_clicks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ip` varchar(255) DEFAULT NULL, `browser` varchar(255) DEFAULT NULL, `btype` varchar(255) DEFAULT NULL, `bversion` varchar(255) DEFAULT NULL, `os` varchar(255) DEFAULT NULL, `referer` varchar(255) DEFAULT NULL, `host` varchar(255) DEFAULT NULL, `uri` varchar(255) DEFAULT NULL, `robot` tinyint(4) DEFAULT '0', `first_click` tinyint(4) DEFAULT '0', `created_at` datetime NOT NULL, `link_id` int(11) DEFAULT NULL, `vuid` varchar(25) DEFAULT NULL, PRIMARY KEY (`id`), KEY `link_id` (`link_id`), KEY `ip` (`ip`), KEY `browser` (`browser`), KEY `btype` (`btype`), KEY `bversion` (`bversion`), KEY `os` (`os`), KEY `referer` (`referer`), KEY `host` (`host`), KEY `uri` (`uri`), KEY `robot` (`robot`), KEY `first_click` (`first_click`), KEY `vuid` (`vuid`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_prli_clicks` -- LOCK TABLES `wp_prli_clicks` WRITE; /*!40000 ALTER TABLE `wp_prli_clicks` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_prli_clicks` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_prli_groups` -- DROP TABLE IF EXISTS `wp_prli_groups`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_prli_groups` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `description` text, `created_at` datetime NOT NULL, PRIMARY KEY (`id`), KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_prli_groups` -- LOCK TABLES `wp_prli_groups` WRITE; /*!40000 ALTER TABLE `wp_prli_groups` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_prli_groups` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_prli_link_metas` -- DROP TABLE IF EXISTS `wp_prli_link_metas`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_prli_link_metas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `meta_key` varchar(255) DEFAULT NULL, `meta_value` longtext, `link_id` int(11) NOT NULL, `created_at` datetime NOT NULL, PRIMARY KEY (`id`), KEY `meta_key` (`meta_key`), KEY `link_id` (`link_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_prli_link_metas` -- LOCK TABLES `wp_prli_link_metas` WRITE; /*!40000 ALTER TABLE `wp_prli_link_metas` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_prli_link_metas` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_prli_links` -- DROP TABLE IF EXISTS `wp_prli_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_prli_links` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `description` text, `url` text, `slug` varchar(255) DEFAULT NULL, `nofollow` tinyint(1) DEFAULT '0', `track_me` tinyint(1) DEFAULT '1', `param_forwarding` varchar(255) DEFAULT NULL, `param_struct` varchar(255) DEFAULT NULL, `redirect_type` varchar(255) DEFAULT '307', `created_at` datetime NOT NULL, `group_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `group_id` (`group_id`), KEY `name` (`name`), KEY `nofollow` (`nofollow`), KEY `track_me` (`track_me`), KEY `param_forwarding` (`param_forwarding`), KEY `param_struct` (`param_struct`), KEY `redirect_type` (`redirect_type`), KEY `slug` (`slug`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_prli_links` -- LOCK TABLES `wp_prli_links` WRITE; /*!40000 ALTER TABLE `wp_prli_links` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_prli_links` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_schreikasten` -- DROP TABLE IF EXISTS `wp_schreikasten`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_schreikasten` ( `id` bigint(1) NOT NULL AUTO_INCREMENT, `alias` tinytext NOT NULL, `text` text NOT NULL, `date` datetime NOT NULL, `ip` char(32) NOT NULL, `status` int(11) NOT NULL, `user_id` int(11) NOT NULL, `email` tinytext NOT NULL, `reply` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_schreikasten` -- LOCK TABLES `wp_schreikasten` WRITE; /*!40000 ALTER TABLE `wp_schreikasten` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_schreikasten` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_schreikasten_blacklist` -- DROP TABLE IF EXISTS `wp_schreikasten_blacklist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_schreikasten_blacklist` ( `id` bigint(1) NOT NULL AUTO_INCREMENT, `pc` bigint(1) NOT NULL, `date` datetime NOT NULL, `forever` tinyint(4) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_schreikasten_blacklist` -- LOCK TABLES `wp_schreikasten_blacklist` WRITE; /*!40000 ALTER TABLE `wp_schreikasten_blacklist` DISABLE KEYS */; /*!40000 ALTER TABLE `wp_schreikasten_blacklist` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_term_relationships` -- DROP TABLE IF EXISTS `wp_term_relationships`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_term_relationships` ( `object_id` bigint(20) unsigned NOT NULL DEFAULT '0', `term_taxonomy_id` bigint(20) unsigned NOT NULL DEFAULT '0', `term_order` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`object_id`,`term_taxonomy_id`), KEY `term_taxonomy_id` (`term_taxonomy_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_term_relationships` -- LOCK TABLES `wp_term_relationships` WRITE; /*!40000 ALTER TABLE `wp_term_relationships` DISABLE KEYS */; INSERT INTO `wp_term_relationships` VALUES (1,1,0),(1,2,0),(2,2,0),(3,2,0),(4,2,0),(5,2,0),(6,2,0),(7,2,0); /*!40000 ALTER TABLE `wp_term_relationships` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_term_taxonomy` -- DROP TABLE IF EXISTS `wp_term_taxonomy`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_term_taxonomy` ( `term_taxonomy_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `term_id` bigint(20) unsigned NOT NULL DEFAULT '0', `taxonomy` varchar(32) NOT NULL DEFAULT '', `description` longtext NOT NULL, `parent` bigint(20) unsigned NOT NULL DEFAULT '0', `count` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`term_taxonomy_id`), UNIQUE KEY `term_id_taxonomy` (`term_id`,`taxonomy`), KEY `taxonomy` (`taxonomy`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_term_taxonomy` -- LOCK TABLES `wp_term_taxonomy` WRITE; /*!40000 ALTER TABLE `wp_term_taxonomy` DISABLE KEYS */; INSERT INTO `wp_term_taxonomy` VALUES (1,1,'category','',0,1),(2,2,'link_category','',0,7); /*!40000 ALTER TABLE `wp_term_taxonomy` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_terms` -- DROP TABLE IF EXISTS `wp_terms`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_terms` ( `term_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(200) NOT NULL DEFAULT '', `slug` varchar(200) NOT NULL DEFAULT '', `term_group` bigint(10) NOT NULL DEFAULT '0', PRIMARY KEY (`term_id`), UNIQUE KEY `slug` (`slug`), KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_terms` -- LOCK TABLES `wp_terms` WRITE; /*!40000 ALTER TABLE `wp_terms` DISABLE KEYS */; INSERT INTO `wp_terms` VALUES (1,'Uncategorized','uncategorized',0),(2,'Blogroll','blogroll',0); /*!40000 ALTER TABLE `wp_terms` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_usermeta` -- DROP TABLE IF EXISTS `wp_usermeta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_usermeta` ( `umeta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned NOT NULL DEFAULT '0', `meta_key` varchar(255) DEFAULT NULL, `meta_value` longtext, PRIMARY KEY (`umeta_id`), KEY `user_id` (`user_id`), KEY `meta_key` (`meta_key`) ) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_usermeta` -- LOCK TABLES `wp_usermeta` WRITE; /*!40000 ALTER TABLE `wp_usermeta` DISABLE KEYS */; INSERT INTO `wp_usermeta` VALUES (1,1,'first_name',''),(2,1,'last_name',''),(3,1,'nickname','wpadmin'),(4,1,'description',''),(5,1,'rich_editing','true'),(6,1,'comment_shortcuts','false'),(7,1,'admin_color','fresh'),(8,1,'use_ssl','0'),(9,1,'show_admin_bar_front','true'),(10,1,'show_admin_bar_admin','false'),(11,1,'aim',''),(12,1,'yim',''),(13,1,'jabber',''),(14,1,'wp_capabilities','a:1:{s:13:\"administrator\";s:1:\"1\";}'),(15,1,'wp_user_level','10'),(16,1,'wp_user-settings','editor=html'),(17,1,'wp_user-settings-time','1365020880'),(18,1,'wp_dashboard_quick_press_last_post_id','3'),(19,2,'first_name',''),(20,2,'last_name',''),(21,2,'nickname','contributor'),(22,2,'description',''),(23,2,'rich_editing','true'),(24,2,'comment_shortcuts','false'),(25,2,'admin_color','fresh'),(26,2,'use_ssl','0'),(27,2,'show_admin_bar_front','true'),(28,2,'show_admin_bar_admin','false'),(29,2,'aim',''),(30,2,'yim',''),(31,2,'jabber',''),(32,2,'wp_capabilities','a:1:{s:11:\"contributor\";s:1:\"1\";}'),(33,2,'wp_user_level','1'),(34,2,'wp_dashboard_quick_press_last_post_id','8'),(35,1,'gigpress_sort','DESC'); /*!40000 ALTER TABLE `wp_usermeta` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `wp_users` -- DROP TABLE IF EXISTS `wp_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `wp_users` ( `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_login` varchar(60) NOT NULL DEFAULT '', `user_pass` varchar(64) NOT NULL DEFAULT '', `user_nicename` varchar(50) NOT NULL DEFAULT '', `user_email` varchar(100) NOT NULL DEFAULT '', `user_url` varchar(100) NOT NULL DEFAULT '', `user_registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `user_activation_key` varchar(60) NOT NULL DEFAULT '', `user_status` int(11) NOT NULL DEFAULT '0', `display_name` varchar(250) NOT NULL DEFAULT '', PRIMARY KEY (`ID`), KEY `user_login_key` (`user_login`), KEY `user_nicename` (`user_nicename`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `wp_users` -- LOCK TABLES `wp_users` WRITE; /*!40000 ALTER TABLE `wp_users` DISABLE KEYS */; INSERT INTO `wp_users` VALUES (1,'wpadmin','$P$B8PK7VaBkB4/draLuLsEBT93UmKxOy.','wpadmin','gnilson@terpmail.umd.edu','','2013-04-03 18:06:12','',0,'wpadmin'),(2,'contributor','$P$BYoUpbVts1TQ1k5M4F04juk.arKNPt0','contributor','contributor@terpmail.umd.edu','','2013-04-03 20:42:13','',0,'contributor'); /*!40000 ALTER TABLE `wp_users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2013-06-26 15:44:44
71.899729
35,505
0.668112
5f0869d1bb143e039be62686b221b43b037c362f
856
tsx
TypeScript
src/pages/academy/_video-banner.tsx
mohammad-rework/deriv-com
3a13751535bc6b4aa6a903299468251670e64338
[ "Apache-2.0" ]
1
2021-11-08T10:23:34.000Z
2021-11-08T10:23:34.000Z
src/pages/academy/_video-banner.tsx
mohammad-rework/deriv-com
3a13751535bc6b4aa6a903299468251670e64338
[ "Apache-2.0" ]
null
null
null
src/pages/academy/_video-banner.tsx
mohammad-rework/deriv-com
3a13751535bc6b4aa6a903299468251670e64338
[ "Apache-2.0" ]
null
null
null
import React from 'react' import Dbanner from './components/video-banner/_DBanner' import { FeaturedVideoListDataType, NonFeaturedVideoListDataType } from './index' import { Flex } from 'components/containers' export type VideoBannerProps = { featured_video_list_data: FeaturedVideoListDataType non_featured_video_list_data: NonFeaturedVideoListDataType } const VideoBanner = ({ featured_video_list_data, non_featured_video_list_data, }: VideoBannerProps) => { return ( <Flex> {non_featured_video_list_data && non_featured_video_list_data.length && ( <Dbanner featured_video_list_data={featured_video_list_data} non_featured_video_list_data={non_featured_video_list_data} /> )} </Flex> ) } export default VideoBanner
30.571429
85
0.693925
652605d299fd300a1dad2460c429b891eac6cf67
3,011
rs
Rust
src/lib.rs
lights0123/ddelta-rs
17662629fda4cbb3e2f38aa36626c47ebba6f30b
[ "MIT" ]
6
2020-04-06T16:59:37.000Z
2021-03-30T15:40:01.000Z
src/lib.rs
lights0123/ddelta-rs
17662629fda4cbb3e2f38aa36626c47ebba6f30b
[ "MIT" ]
null
null
null
src/lib.rs
lights0123/ddelta-rs
17662629fda4cbb3e2f38aa36626c47ebba6f30b
[ "MIT" ]
null
null
null
//! A rust port of [ddelta], which is a streaming and more efficient version of [bsdiff]. The //! output created by this program is sometimes (when using [`generate`]) compatible with the //! original C tool, [ddelta], but not with [bsdiff]. This library may use up to 5 times the old //! file size + the new file size, (5 × min(o, 2^31-1) + min(n, 2^31-1)), up to 12GiB. To control //! this, see the `chunk_sizes` parameter of [`generate_chunked`]. //! //! **Note**: the patches created by program should be compressed. If not compressed, the output may //! actually be larger than just including the new file. You might want to feed the patch file //! directly to an [encoder][XzEncoder], and read via a //! [decoder implementing a compression algorithm][XzDecoder] to not require much disk space. //! Additionally, no checksum is performed, so you should strongly consider doing a checksum of at //! least either the old or new file once written. //! //! ## Features //! //! This crate optionally supports compiling the c library, divsufsort, which is enabled by default. //! A Rust port is available; however, it has worse performance than the C version. If you'd like //! to use the Rust version instead, for example if you don't have a C compiler installed, add //! `default-features = false` to your Cargo.toml, i.e. //! //! ```toml //! [dependencies] //! ddelta = { version = "0.1.0", default-features = false } //! ``` //! //! [ddelta]: https://github.com/julian-klode/ddelta //! [bsdiff]: http://www.daemonology.net/bsdiff/ //! [XzEncoder]: https://docs.rs/xz2/*/xz2/write/struct.XzEncoder.html //! [XzDecoder]: https://docs.rs/xz2/*/xz2/read/struct.XzDecoder.html use byteorder::BigEndian; use zerocopy::{AsBytes, FromBytes, Unaligned, I64, U64}; use anyhow::Result; #[cfg(feature = "diff")] pub use diff::{generate, generate_chunked}; pub use patch::{apply, apply_chunked}; const DDELTA_MAGIC: &[u8; 8] = b"DDELTA40"; #[cfg(feature = "diff")] mod diff; mod patch; /// The current state of the generator. /// /// Passed to a callback periodically to give feedback, such as updating a progress bar. #[derive(Eq, PartialEq, Copy, Clone, Hash, Debug)] #[cfg(feature = "diff")] pub enum State { /// The new or old file is currently being read. This is currently only used in /// [`generate_chunked`]. Reading, /// The internal algorithm, divsufsort, is currently being run. Sorting, /// The generator is currently working its way through the data. The number represents how much /// of the new file has been worked through. In other words, if calculating a percentage, divide /// this number by the size of the new file. Working(u64), } #[derive(Debug, Copy, Clone, FromBytes, AsBytes, Unaligned)] #[repr(C)] struct PatchHeader { magic: [u8; 8], new_file_size: U64<BigEndian>, } #[derive(Debug, Copy, Clone, FromBytes, AsBytes, Unaligned)] #[repr(C)] struct EntryHeader { diff: U64<BigEndian>, extra: U64<BigEndian>, seek: I64<BigEndian>, }
39.618421
100
0.696114
feea767009355a0b71c77d474ccbc46a8c95d85e
103,807
html
HTML
paper-mining/nips/nips2004/nips-2004-Self-Tuning_Spectral_Clustering.html
makerhacker/makerhacker.github.io
abe4da269cc42f7f9f5f168cbc8dfc60e6b3dec5
[ "MIT" ]
21
2015-01-18T20:28:43.000Z
2022-03-15T14:02:16.000Z
paper-mining/nips/nips2004/nips-2004-Self-Tuning_Spectral_Clustering.html
makerhacker/makerhacker.github.io
abe4da269cc42f7f9f5f168cbc8dfc60e6b3dec5
[ "MIT" ]
null
null
null
paper-mining/nips/nips2004/nips-2004-Self-Tuning_Spectral_Clustering.html
makerhacker/makerhacker.github.io
abe4da269cc42f7f9f5f168cbc8dfc60e6b3dec5
[ "MIT" ]
14
2015-01-07T16:15:46.000Z
2022-03-14T03:58:16.000Z
<!DOCTYPE html> <html> <head> <meta charset=utf-8> <title>161 nips-2004-Self-Tuning Spectral Clustering</title> </head> <body> <p><a title="nips" href="../nips_home.html">nips</a> <a title="nips-2004" href="../home/nips2004_home.html">nips2004</a> <a title="nips-2004-161" href="#">nips2004-161</a> knowledge-graph by maker-knowledge-mining</p><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- maker adsense --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-5027806277543591" data-ad-slot="4192012269"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> <h1>161 nips-2004-Self-Tuning Spectral Clustering</h1> <br/><p>Source: <a title="nips-2004-161-pdf" href="http://papers.nips.cc/paper/2619-self-tuning-spectral-clustering.pdf">pdf</a></p><p>Author: Lihi Zelnik-manor, Pietro Perona</p><p>Abstract: We study a number of open issues in spectral clustering: (i) Selecting the appropriate scale of analysis, (ii) Handling multi-scale data, (iii) Clustering with irregular background clutter, and, (iv) Finding automatically the number of groups. We first propose that a ‘local’ scale should be used to compute the affinity between each pair of points. This local scaling leads to better clustering especially when the data includes multiple scales and when the clusters are placed within a cluttered background. We further suggest exploiting the structure of the eigenvectors to infer automatically the number of groups. This leads to a new algorithm in which the final randomly initialized k-means stage is eliminated. 1</p><p>Reference: <a title="nips-2004-161-reference" href="../nips2004_reference/nips-2004-Self-Tuning_Spectral_Clustering_reference.html">text</a></p><br/><h2>Summary: the most important sentenses genereted by tfidf model</h2><p>sentIndex sentText sentNum sentScore</p><p>1 html Abstract We study a number of open issues in spectral clustering: (i) Selecting the appropriate scale of analysis, (ii) Handling multi-scale data, (iii) Clustering with irregular background clutter, and, (iv) Finding automatically the number of groups. [sent-9, score-0.393] </p><p>2 This local scaling leads to better clustering especially when the data includes multiple scales and when the clusters are placed within a cluttered background. [sent-11, score-0.614] </p><p>3 We further suggest exploiting the structure of the eigenvectors to infer automatically the number of groups. [sent-12, score-0.359] </p><p>4 An alternative clustering approach, which was shown to handle such structured data is spectral clustering. [sent-18, score-0.41] </p><p>5 It does not require estimating an explicit model of data distribution, rather a spectral analysis of the matrix of point-to-point similarities. [sent-19, score-0.276] </p><p>6 There are still open issues: (i) Selection of the appropriate scale in which the data is to be analyzed, (ii) Clustering data that is distributed according to different scales, (iii) Clustering with irregular background clutter, and, (iv) Estimating automatically the number of groups. [sent-26, score-0.23] </p><p>7 , sn } in Rl cluster them into C clusters as follows: −d2 (s ,s ) i j 1. [sent-34, score-0.223] </p><p>8 Form the affinity matrix A ∈ Rn×n defined by Aij = exp ( ) for i = j σ2 and Aii = 0, where d(si , sj ) is some distance function, often just the Euclidean σ = 0. [sent-35, score-0.202] </p><p>9 03125 σ=1 Figure 1: Spectral clustering without local scaling (using the NJW algorithm. [sent-41, score-0.409] </p><p>10 ) Top row: When the data incorporates multiple scales standard spectral clustering fails. [sent-42, score-0.48] </p><p>11 This highlights the high impact σ has on the clustering quality. [sent-45, score-0.287] </p><p>12 Define D to be a diagonal matrix with Dii = malized affinity matrix L = D−1/2 AD−1/2 . [sent-51, score-0.181] </p><p>13 , xC , the C largest eigenvectors of L, and form the matrix X = [x1 , . [sent-58, score-0.33] </p><p>14 Treat each row of Y as a point in RC and cluster via k-means. [sent-65, score-0.196] </p><p>15 Assign the original point si to cluster c if and only if the corresponding row i of the matrix Y was assigned to cluster c. [sent-67, score-0.508] </p><p>16 In Section 2 we analyze the effect of σ on the clustering and suggest a method for setting it automatically. [sent-68, score-0.284] </p><p>17 In Section 3 we suggest a scheme for finding automatically the number of groups C. [sent-70, score-0.365] </p><p>18 Our new spectral clustering algorithm is summarized in Section 4. [sent-71, score-0.41] </p><p>19 2 Local Scaling As was suggested by [6] the scaling parameter is some measure of when two points are considered similar. [sent-73, score-0.176] </p><p>20 [5] suggested selecting σ automatically by running their clustering algorithm repeatedly for a number of values of σ and selecting the one which provides least distorted clusters of the rows of Y . [sent-77, score-0.822] </p><p>21 Moreover, when the input data includes clusters with different local statistics there may not be a singe value of σ that works well for all the data. [sent-80, score-0.214] </p><p>22 When the data contains multiple scales, even using the optimal σ fails to provide good clustering (see examples at the right of top row). [sent-82, score-0.288] </p><p>23 The affinities across clusters are larger than the affinities within the background cluster. [sent-87, score-0.174] </p><p>24 Introducing Local Scaling: Instead of selecting a single scaling parameter σ we propose to calculate a local scaling parameter σi for each data point si . [sent-90, score-0.486] </p><p>25 The distance from si to sj as ‘seen’ by si is d(si , sj )/σi while the converse is d(sj , si )/σj . [sent-91, score-0.776] </p><p>26 The selection of the local scale σi can be done by studying the local statistics of the neighborhood of point si . [sent-93, score-0.379] </p><p>27 Figure 2 provides a visualization of the effect of the suggested local scaling. [sent-97, score-0.172] </p><p>28 Since the data resides in multiple scales (one cluster is tight and the other is sparse) the standard approach to estimating affinities fails to capture the data structure (see Figure 2. [sent-98, score-0.256] </p><p>29 Local scaling automatically finds the two scales and results in high affinities within clusters and low affinities across clusters (see Figure 2. [sent-100, score-0.517] </p><p>30 We tested the power of local scaling by clustering the data set of Figure 1, plus four additional examples. [sent-103, score-0.409] </p><p>31 In spite of the multiple scales and the various types of structure, the groups now match the intuitive solution. [sent-108, score-0.238] </p><p>32 3 Estimating the Number of Clusters Having defined a scheme to set the scale parameter automatically we are left with one more free parameter: the number of clusters. [sent-109, score-0.217] </p><p>33 This parameter is usually set manually and Figure 3: Our clustering results. [sent-110, score-0.247] </p><p>34 The first 10 eigenvalues of L corresponding to the top row data sets of Figure 3. [sent-134, score-0.304] </p><p>35 The suggested scheme turns out to lead to a new spatial clustering algorithm. [sent-137, score-0.406] </p><p>36 1 The Intuitive Solution: Analyzing the Eigenvalues One possible approach to try and discover the number of groups is to analyze the eigenvalues of the affinity matrix. [sent-139, score-0.323] </p><p>37 1) will be a repeated eigenvalue of magnitude 1 with multiplicity equal to the number of groups C. [sent-141, score-0.396] </p><p>38 Examining the eigenvalues of our locally scaled matrix, corresponding to clean data-sets, indeed shows that the multiplicity of eigenvalue 1 equals the number of groups. [sent-143, score-0.392] </p><p>39 An alternative approach would be to search for a drop in the magnitude of the eigenvalues (this was pursued to some extent by Polito and Perona in [7]). [sent-145, score-0.194] </p><p>40 The eigenvalues of L are the union of the eigenvalues of the sub-matrices corresponding to each cluster. [sent-147, score-0.353] </p><p>41 This implies the eigenvalues depend on the structure of the individual clusters and thus no assumptions can be placed on their values. [sent-148, score-0.29] </p><p>42 Figure 4 shows the first 10 eigenvalues corresponding to the top row examples of Figure 3. [sent-150, score-0.304] </p><p>43 It highlights the different patterns of distribution of eigenvalues for different data sets. [sent-151, score-0.195] </p><p>44 , C), its eigenvalues and eigenvectors are the union of the eigenvalues and eigenvectors of its blocks padded appropriately with zeros (see [6, 5]). [sent-159, score-0.968] </p><p>45 However, as was shown above, the eigenvalue 1 is bound to be a repeated eigenvalue with multiplicity equal to the number of groups C. [sent-161, score-0.434] </p><p>46 This, however, implies that even if the eigensolver provided us the rotated set of vectors, ˆ ˆ we are still guaranteed that there exists a rotation R such that each row in the matrix X R has a single non-zero entry. [sent-164, score-0.38] </p><p>47 Since the eigenvectors of L are the union of the eigenvectors of its individual blocks (padded with zeros), taking more than the first C eigenvectors will result in more than one non-zero entry in some of the rows. [sent-165, score-0.832] </p><p>48 Taking fewer eigenvectors we do not have a full basis spanning the subspace, thus depending on the initial X there might or might not exist such a rotation. [sent-166, score-0.228] </p><p>49 For each possible group number C we recover the rotation which best aligns X’s columns with the canonical coordinate system. [sent-169, score-0.536] </p><p>50 Let Z ∈ Rn×C be the matrix obtained after rotating the eigenvector matrix X, i. [sent-170, score-0.234] </p><p>51 We wish to recover the rotation R for which in every row in Z there will be at most one non-zero entry. [sent-173, score-0.329] </p><p>52 We thus define a cost function: n C J= i=1 j=1 2 Zij Mi2 (3) Minimizing this cost function over all possible rotations will provide the best alignment with the canonical coordinate system. [sent-174, score-0.526] </p><p>53 This is done using the gradient descent scheme described in Appendix A. [sent-175, score-0.186] </p><p>54 The number of groups is taken as the one providing the minimal cost (if several group numbers yield practically the same minimal cost, the largest of those is selected). [sent-176, score-0.52] </p><p>55 We start by aligning the top two eigenvectors (as well as possible). [sent-178, score-0.362] </p><p>56 Then, at each step of the search (up to the maximal group number), we add a single eigenvector to the already rotated ones. [sent-179, score-0.283] </p><p>57 This can be viewed as taking the alignment result of the previous group number as an initialization to the current one. [sent-180, score-0.322] </p><p>58 The alignment of this new set of eigenvectors is extremely fast (typically a few iterations) since the initialization is good. [sent-181, score-0.406] </p><p>59 The overall run time of this incremental procedure is just slightly longer than aligning all the eigenvectors in a non-incremental way. [sent-182, score-0.321] </p><p>60 Using this scheme to estimate the number of groups on the data set of Figure 3 provided a correct result for all but one (for the right-most dataset at the bottom row we predicted 2 clusters instead of 3). [sent-183, score-0.477] </p><p>61 Corresponding plots of the alignment quality for different group numbers are shown in Figure 5. [sent-184, score-0.325] </p><p>62 Yu and Shi [11] suggested rotating normalized eigenvectors to obtain an optimal segmentation. [sent-185, score-0.377] </p><p>63 , setting Mi = 1 and Zij = 0 otherwise) and using SVD to recover the rotation which best aligns the columns of X with those of Z. [sent-188, score-0.247] </p><p>64 In our experiments we noticed that this iterative method can easily get stuck in local minima and thus does not reliably find the optimal alignment and the group number. [sent-189, score-0.364] </p><p>65 [3] who assigned points to clusters according to the maximal entry in the corresponding row of the eigenvector matrix. [sent-191, score-0.396] </p><p>66 This works well when there are no repeated eigenvalues as then the eigenvectors 0. [sent-192, score-0.422] </p><p>67 (3)) for varying group numbers corresponding to the top row data sets of Figure 3. [sent-210, score-0.293] </p><p>68 The selected group number marked by a red circle, corresponds to the largest group number providing minimal cost (costs up to 0. [sent-211, score-0.455] </p><p>69 used a non-normalized affinity matrix thus were not certain to obtain a repeated eigenvalue, however, this could easily happen and then the clustering would fail. [sent-215, score-0.346] </p><p>70 (ii) Since the final clustering can be conducted by non-maximum suppression, we obtain clustering results for all the inspected group numbers at a tiny additional cost. [sent-217, score-0.638] </p><p>71 When the data is highly noisy, one can still employ k-means, or better, EM, to cluster the rows of Z. [sent-218, score-0.187] </p><p>72 However, since the data is now aligned with the canonical coordinate scheme we can obtain by non-maximum suppression an excellent initialization so very few iterations suffice. [sent-219, score-0.325] </p><p>73 Compute the local scale σi for each point si ∈ S using Eq. [sent-224, score-0.3] </p><p>74 Define D to be a diagonal matrix with Dii = j=1 Aij and construct the nor−1/2 ˆ −1/2 malized affinity matrix L = D . [sent-230, score-0.181] </p><p>75 , xC the C largest eigenvectors of L and form the matrix X = [x1 , . [sent-235, score-0.33] </p><p>76 , xC ] ∈ Rn×C , where C is the largest possible group number. [sent-238, score-0.186] </p><p>77 Recover the rotation R which best aligns X’s columns with the canonical coordinate system using the incremental gradient descent scheme (see also Appendix A). [sent-240, score-0.518] </p><p>78 Grade the cost of the alignment for each group number, up to C, according to Eq. [sent-242, score-0.369] </p><p>79 Set the final group number Cb est to be the largest group number with minimal alignment cost. [sent-245, score-0.56] </p><p>80 Take the alignment result Z of the top Cb est eigenvectors and assign the original 2 2 point si to cluster c if and only if maxj (Zij ) = Zic . [sent-247, score-0.75] </p><p>81 If highly noisy data, use the previous step result to initialize k-means, or EM, clustering on the rows of Z. [sent-249, score-0.346] </p><p>82 The number of groups and the corresponding segmentation were obtained automatically. [sent-252, score-0.232] </p><p>83 html 5 Discussion & Conclusions Spectral clustering practitioners know that selecting good parameters to tune the clustering process is an art requiring skill and patience. [sent-260, score-0.608] </p><p>84 Automating spectral clustering was the main motivation for this study. [sent-261, score-0.41] </p><p>85 The key ideas we introduced are three: (a) using a local scale, rather than a global one, (b) estimating the scale from the data, and (c) rotating the eigenvectors to create the maximally sparse representation. [sent-262, score-0.473] </p><p>86 We proposed an automated spectral clustering algorithm based on these ideas: it computes automatically the scale and the number of groups and it can handle multi-scale data which are problematic for previous approaches. [sent-263, score-0.729] </p><p>87 For instance, the local scale σ might be better estimated by a method which relies on more informative local statistics. [sent-265, score-0.215] </p><p>88 Acknowledgments: Finally, we wish to thank Yair Weiss for providing us his code for spectral clustering. [sent-270, score-0.201] </p><p>89 Longuet-Higgins “Feature grouping by ‘relocalisation’ of eigenvectors of the proximity matrix” In Proc. [sent-301, score-0.27] </p><p>90 A Recovering the Aligning Rotation To find the best alignment for a set of eigenvectors we adopt a gradient descent scheme similar to that suggested in [2]. [sent-314, score-0.648] </p><p>91 There, Givens rotations where used to recover a rotation which diagonalizes a symmetric matrix by minimizing a cost function which measures the diagonality of the matrix. [sent-315, score-0.399] </p><p>92 Similarly, here, we define a cost function which measures the alignment quality of a set of vectors and prove that the gradient descent, using Givens rotations, converges. [sent-316, score-0.316] </p><p>93 Note, that the indices mi of the maximal entries of the rows of X might be different than those of the optimal Z. [sent-320, score-0.315] </p><p>94 Using the gradient descent scheme allows to increase the cost corresponding to part of the rows as long as the overall cost is reduced, thus enabling changing the indices mi . [sent-322, score-0.624] </p><p>95 Similar to [2] we wish to represent the rotation matrix R in terms of the smallest possible ˜ number of parameters. [sent-323, score-0.221] </p><p>96 Let Gi,j,θ denote a Givens rotation [1] of θ radians (counterclockwise) in the (i, j) coordinate plane. [sent-324, score-0.2] </p><p>97 Hence, finding the aligning rotation amounts to minimizing the cost function J over Θ ∈ [−π/2, π/2)K . [sent-329, score-0.3] </p><p>98 Note, that at Θ = 0 we have Zij = 0 for j = mi , Zimi = Mi , and ∂Mi ∂θk = Θ=0 ∂Zimi = ∂θk (k) Aimi (i. [sent-338, score-0.171] </p><p>99 , near Θ = 0 the maximal ∂2J ∂θl ∂θk entry for each row does not change its index). [sent-340, score-0.203] </p><p>100 mi = ik or mi = jk 0 if k = l otherwise where (ik , jk ) is the pair (i, j) corresponding to the index k in the index re-mapping discussed above. [sent-344, score-0.51] </p> <br/> <h2>similar papers computed by tfidf model</h2><h3>tfidf for this paper:</h3><p>wordName wordTfidf (topN-words)</p> <p>[('zij', 0.265), ('clustering', 0.247), ('eigenvectors', 0.228), ('af', 0.221), ('nities', 0.182), ('aij', 0.179), ('mi', 0.171), ('groups', 0.168), ('si', 0.164), ('spectral', 0.163), ('eigenvalues', 0.155), ('group', 0.144), ('sj', 0.142), ('alignment', 0.141), ('clusters', 0.135), ('nity', 0.133), ('rotation', 0.123), ('fkl', 0.122), ('row', 0.108), ('givens', 0.106), ('xc', 0.106), ('perona', 0.101), ('rows', 0.099), ('automatically', 0.094), ('suggested', 0.093), ('aligning', 0.093), ('zimi', 0.091), ('cluster', 0.088), ('cost', 0.084), ('scaling', 0.083), ('xr', 0.079), ('local', 0.079), ('suppression', 0.077), ('selecting', 0.077), ('eigenvalue', 0.077), ('coordinate', 0.077), ('kannan', 0.073), ('multiplicity', 0.073), ('rotations', 0.072), ('scales', 0.07), ('descent', 0.069), ('rn', 0.069), ('canonical', 0.068), ('shi', 0.067), ('scheme', 0.066), ('segmentation', 0.064), ('aligns', 0.064), ('malized', 0.061), ('njw', 0.061), ('padded', 0.061), ('polito', 0.061), ('recover', 0.06), ('matrix', 0.06), ('eigenvector', 0.058), ('scale', 0.057), ('rotating', 0.056), ('blocks', 0.055), ('lihi', 0.053), ('eigensolver', 0.053), ('wise', 0.053), ('estimating', 0.053), ('gradient', 0.051), ('entry', 0.05), ('weiss', 0.049), ('cb', 0.048), ('est', 0.048), ('resides', 0.045), ('award', 0.045), ('jk', 0.045), ('maximal', 0.045), ('locally', 0.045), ('union', 0.043), ('dii', 0.043), ('pasadena', 0.043), ('zeros', 0.043), ('largest', 0.042), ('uk', 0.042), ('grouping', 0.042), ('scaled', 0.042), ('minimal', 0.041), ('circle', 0.041), ('top', 0.041), ('highlights', 0.04), ('maxj', 0.04), ('rl', 0.04), ('irregular', 0.04), ('quality', 0.04), ('magnitude', 0.039), ('background', 0.039), ('index', 0.039), ('repeated', 0.039), ('wish', 0.038), ('suggest', 0.037), ('iv', 0.037), ('ga', 0.037), ('tune', 0.037), ('initialization', 0.037), ('rotated', 0.036), ('yu', 0.036), ('clutter', 0.036)]</p> <h3>similar papers list:</h3><p>simIndex simValue paperId paperTitle</p> <p>same-paper 1 0.99999958 <a title="161-tfidf-1" href="./nips-2004-Self-Tuning_Spectral_Clustering.html">161 nips-2004-Self-Tuning Spectral Clustering</a></p> <p>Author: Lihi Zelnik-manor, Pietro Perona</p><p>Abstract: We study a number of open issues in spectral clustering: (i) Selecting the appropriate scale of analysis, (ii) Handling multi-scale data, (iii) Clustering with irregular background clutter, and, (iv) Finding automatically the number of groups. We first propose that a ‘local’ scale should be used to compute the affinity between each pair of points. This local scaling leads to better clustering especially when the data includes multiple scales and when the clusters are placed within a cluttered background. We further suggest exploiting the structure of the eigenvectors to infer automatically the number of groups. This leads to a new algorithm in which the final randomly initialized k-means stage is eliminated. 1</p><p>2 0.25222942 <a title="161-tfidf-2" href="./nips-2004-Hierarchical_Eigensolver_for_Transition_Matrices_in_Spectral_Methods.html">79 nips-2004-Hierarchical Eigensolver for Transition Matrices in Spectral Methods</a></p> <p>Author: Chakra Chennubhotla, Allan D. Jepson</p><p>Abstract: We show how to build hierarchical, reduced-rank representation for large stochastic matrices and use this representation to design an efficient algorithm for computing the largest eigenvalues, and the corresponding eigenvectors. In particular, the eigen problem is first solved at the coarsest level of the representation. The approximate eigen solution is then interpolated over successive levels of the hierarchy. A small number of power iterations are employed at each stage to correct the eigen solution. The typical speedups obtained by a Matlab implementation of our fast eigensolver over a standard sparse matrix eigensolver [13] are at least a factor of ten for large image sizes. The hierarchical representation has proven to be effective in a min-cut based segmentation algorithm that we proposed recently [8]. 1 Spectral Methods Graph-theoretic spectral methods have gained popularity in a variety of application domains: segmenting images [22]; embedding in low-dimensional spaces [4, 5, 8]; and clustering parallel scientific computation tasks [19]. Spectral methods enable the study of properties global to a dataset, using only local (pairwise) similarity or affinity measurements between the data points. The global properties that emerge are best understood in terms of a random walk formulation on the graph. For example, the graph can be partitioned into clusters by analyzing the perturbations to the stationary distribution of a Markovian relaxation process defined in terms of the affinity weights [17, 18, 24, 7]. The Markovian relaxation process need never be explicitly carried out; instead, it can be analytically expressed using the leading order eigenvectors, and eigenvalues, of the Markov transition matrix. In this paper we consider the practical application of spectral methods to large datasets. In particular, the eigen decomposition can be very expensive, on the order of O(n 3 ), where n is the number of nodes in the graph. While it is possible to compute analytically the first eigenvector (see §3 below), the remaining subspace of vectors (necessary for say clustering) has to be explicitly computed. A typical approach to dealing with this difficulty is to first sparsify the links in the graph [22] and then apply an efficient eigensolver [13, 23, 3]. In comparison, we propose in this paper a specialized eigensolver suitable for large stochastic matrices with known stationary distributions. In particular, we exploit the spectral properties of the Markov transition matrix to generate hierarchical, successively lower-ranked approximations to the full transition matrix. The eigen problem is solved directly at the coarsest level of representation. The approximate eigen solution is then interpolated over successive levels of the hierarchy, using a small number of power iterations to correct the solution at each stage. 2 Previous Work One approach to speeding up the eigen decomposition is to use the fact that the columns of the affinity matrix are typically correlated. The idea then is to pick a small number of representative columns to perform eigen decomposition via SVD. For example, in the Nystrom approximation procedure, originally proposed for integral eigenvalue problems, the idea is to randomly pick a small set of m columns; generate the corresponding affinity matrix; solve the eigenproblem and finally extend the solution to the complete graph [9, 10]. The Nystrom method has also been recently applied in the kernel learning methods for fast Gaussian process classification and regression [25]. Other sampling-based approaches include the work reported in [1, 2, 11]. Our starting point is the transition matrix generated from affinity weights and we show how building a representational hierarchy follows naturally from considering the stochastic matrix. A closely related work is the paper by Lin on reduced rank approximations of transition matrices [14]. We differ in how we approximate the transition matrices, in particular our objective function is computationally less expensive to solve. In particular, one of our goals in reducing transition matrices is to develop a fast, specialized eigen solver for spectral clustering. Fast eigensolving is also the goal in ACE [12], where successive levels in the hierarchy can potentially have negative affinities. A graph coarsening process for clustering was also pursued in [21, 3]. 3 Markov Chain Terminology We first provide a brief overview of the Markov chain terminology here (for more details see [17, 15, 6]). We consider an undirected graph G = (V, E) with vertices vi , for i = {1, . . . , n}, and edges ei,j with non-negative weights ai,j . Here the weight ai,j represents the affinity between vertices vi and vj . The affinities are represented by a non-negative, symmetric n × n matrix A having weights ai,j as elements. The degree of a node j is n n defined to be: dj = i=1 ai,j = j=1 aj,i , where we define D = diag(d1 , . . . , dn ). A Markov chain is defined using these affinities by setting a transition probability matrix M = AD −1 , where the columns of M each sum to 1. The transition probability matrix defines the random walk of a particle on the graph G. The random walk need never be explicitly carried out; instead, it can be analytically expressed using the leading order eigenvectors, and eigenvalues, of the Markov transition matrix. Because the stochastic matrices need not be symmetric in general, a direct eigen decomposition step is not preferred for reasons of instability. This problem is easily circumvented by considering a normalized affinity matrix: L = D −1/2 AD−1/2 , which is related to the stochastic matrix by a similarity transformation: L = D −1/2 M D1/2 . Because L is symmetric, it can be diagonalized: L = U ΛU T , where U = [u1 , u2 , · · · , un ] is an orthogonal set of eigenvectors and Λ is a diagonal matrix of eigenvalues [λ1 , λ2 , · · · , λn ] sorted in decreasing order. The eigenvectors have unit length uk = 1 and from the form of A and D it can be shown that the eigenvalues λi ∈ (−1, 1], with at least one eigenvalue equal to one. Without loss of generality, we take λ1 = 1. Because L and M are similar we can perform an eigen decomposition of the Markov transition matrix as: M = D1/2 LD−1/2 = D1/2 U Λ U T D−1/2 . Thus an eigenvector u of L corresponds to an eigenvector D 1/2 u of M with the same eigenvalue λ. The Markovian relaxation process after β iterations, namely M β , can be represented as: M β = D1/2 U Λβ U T D−1/2 . Therefore, a particle undertaking a random walk with an initial distribution p 0 acquires after β steps a distribution p β given by: p β = M β p 0 . Assuming the graph is connected, as β → ∞, the Markov chain approaches a unique n stationary distribution given by π = diag(D)/ i=1 di , and thus, M ∞ = π1T , where 1 is a n-dim column vector of all ones. Observe that π is an eigenvector of M as it is easy to show that M π = π and the corresponding eigenvalue is 1. Next, we show how to generate hierarchical, successively low-ranked approximations for the transition matrix M . 4 Building a Hierarchy of Transition Matrices The goal is to generate a very fast approximation, while simultaneously achieving sufficient accuracy. For notational ease, we think of M as a fine-scale representation and M as some coarse-scale approximation to be derived here. By coarsening M further, we can generate successive levels of the representation hierarchy. We use the stationary distribution π to construct a corresponding coarse-scale stationary distribution δ. As we just discussed a critical property of the fine scale Markov matrix M is that it is similar to the symmetric matrix L and we wish to preserve this property at every level of the representation hierarchy. 4.1 Deriving Coarse-Scale Stationary Distribution We begin by expressing the stationary distribution π as a probabilistic mixture of latent distributions. In matrix notation, we have (1) π = K δ, where δ is an unknown mixture coefficient vector of length m, K is an n × m non-negative n kernel matrix whose columns are latent distributions that each sum to 1: i=1 Ki,j = 1 and m n. It is easy to derive a maximum likelihood approximation of δ using an EM type algorithm [16]. The main step is to find a stationary point δ, λ for the Lagrangian: m n i=1 m Ki,j δj + λ πi ln E≡− j=1 δj − 1 . (2) j=1 An implicit step in this EM procedure is to compute the the ownership probability r i,j of the j th kernel (or node) at the coarse scale for the ith node on the fine scale and is given by ri,j = δj Ki,j . m k=1 δk Ki,k (3) The EM procedure allows for an update of both δ and the latent distributions in the kernel matrix K (see §8.3.1 in [6]). For initialization, δ is taken to be uniform over the coarse-scale states. But in choosing kernels K, we provide a good initialization for the EM procedure. Specifically, the Markov matrix M is diffused using a small number of iterations to get M β . The diffusion causes random walks from neighboring nodes to be less distinguishable. This in turn helps us select a small number of columns of M β in a fast and greedy way to be the kernel matrix K. We defer the exact details on kernel selection to a later section (§4.3). 4.2 Deriving the Coarse-Scale Transition Matrix In order to define M , the coarse-scale transition matrix, we break it down into three steps. First, the Markov chain propagation at the coarse scale can be defined as: q k+1 = M q k , (4) where q is the coarse scale probability distribution after k steps of the random walk. Second, we expand q k into the fine scale using the kernels K resulting in a fine scale probability distribution p k : p k = Kq k . (5) k Finally, we lift p k back into the coarse scale by using the ownership probability of the j th kernel for the ith node on the fine grid: n qjk+1 = ri,j pik i=1 (6) Substituting for Eqs.(3) and (5) in Eq. 6 gives n m qjk+1 = i=1 n Ki,t qtk = ri,j t=1 i=1 δj Ki,j m k=1 δk Ki,k m Ki,t qtk . (7) t=1 We can write the preceding equation in a matrix form: q k+1 = diag( δ ) K T diag K δ −1 Kq k . (8) Comparing this with Eq. 4, we can derive the transition matrix M as: M = diag( δ ) K T diag K δ −1 (9) K. It is easy to see that δ = M δ, so δ is the stationary distribution for M . Following the definition of M , and its stationary distribution δ, we can generate a symmetric coarse scale affinity matrix A given by A = M diag(δ) = diag( δ ) K T diag K δ −1 Kdiag(δ) , (10) where we substitute for the expression M from Eq. 9. The coarse-scale affinity matrix A is then normalized to get: L = D−1/2 AD−1/2 ; D = diag(d1 , d2 , · · · , dm ), (11) where dj is the degree of node j in the coarse-scale graph represented by the matrix A (see §3 for degree definition). Thus, the coarse scale Markov matrix M is precisely similar to a symmetric matrix L. 4.3 Selecting Kernels For demonstration purpose, we present the kernel selection details on the image of an eye shown below. To begin with, a random walk is defined where each pixel in the test image is associated with a vertex of the graph G. The edges in G are defined by the standard 8-neighbourhood of each pixel. For the demonstrations in this paper, the edge weight ai,j between neighbouring pixels xi and xj is given by a function of the difference in the 2 corresponding intensities I(xi ) and I(xj ): ai,j = exp(−(I(xi ) − I(xj ))2 /2σa ), where σa is set according to the median absolute difference |I(xi ) − I(xj )| between neighbours measured over the entire image. The affinity matrix A with the edge weights is then used to generate a Markov transition matrix M . The kernel selection process we use is fast and greedy. First, the fine scale Markov matrix M is diffused to M β using β = 4. The Markov matrix M is sparse as we make the affinity matrix A sparse. Every column in the diffused matrix M β is a potential kernel. To facilitate the selection process, the second step is to rank order the columns of M β based on a probability value in the stationary distribution π. Third, the kernels (i.e. columns of M β ) are picked in such a way that for a kernel Ki all of the neighbours of pixel i which are within the half-height of the the maximum value in the kernel Ki are suppressed from the selection process. Finally, the kernel selection is continued until every pixel in the image is within a half-height of the peak value of at least one kernel. If M is a full matrix, to avoid the expense of computing M β explicitly, random kernel centers can be selected, and only the corresponding columns of M β need be computed. We show results from a three-scale hierarchy on the eye image (below). The image has 25 × 20 pixels but is shown here enlarged for clarity. At the first coarse scale 83 kernels are picked. The kernels each correspond to a different column in the fine scale transition matrix and the pixels giving rise to these kernels are shown numbered on the image. Using these kernels as an initialization, the EM procedure derives a coarse-scale stationary distribution δ 21 14 26 4 (Eq. 2), while simultaneously updating the kernel ma12 27 2 19 trix. Using the newly updated kernel matrix K and the 5 8 13 23 30 18 6 9 derived stationary distribution δ a transition matrix M 28 20 15 32 10 22 is generated (Eq. 9). The coarse scale Markov matrix 24 17 7 is then diffused to M β , again using β = 4. The kernel Coarse Scale 1 Coarse Scale 2 selection algorithm is reapplied, this time picking 32 kernels for the second coarse scale. Larger values of β cause the coarser level to have fewer elements. But the exact number of elements depends on the form of the kernels themselves. For the random experiments that we describe later in §6 we found β = 2 in the first iteration and 4 thereafter causes the number of kernels to be reduced by a factor of roughly 1/3 to 1/4 at each level. 72 28 35 44 51 64 82 4 12 31 56 19 77 36 45 52 65 13 57 23 37 5 40 53 63 73 14 29 6 66 38 74 47 24 7 30 41 54 71 78 58 15 8 20 39 48 59 67 25 68 79 21 16 2 11 26 42 49 55 60 75 32 83 43 9 76 50 17 27 61 33 69 80 3 46 18 70 81 34 10 62 22 1 25 11 1 3 16 31 29 At coarser levels of the hierarchy, we expect the kernels to get less sparse and so will the affinity and the transition matrices. In order to promote sparsity at successive levels of the hierarchy we sparsify A by zeroing out elements associated with “small” transition probabilities in M . However, in the experiments described later in §6, we observe this sparsification step to be not critical. To summarize, we use the stationary distribution π at the fine-scale to derive a transition matrix M , and its stationary distribution δ, at the coarse-scale. The coarse scale transition in turn helps to derive an affinity matrix A and its normalized version L. It is obvious that this procedure can be repeated recursively. We describe next how to use this representation hierarchy for building a fast eigensolver. 5 Fast EigenSolver Our goal in generating a hierarchical representation of a transition matrix is to develop a fast, specialized eigen solver for spectral clustering. To this end, we perform a full eigen decomposition of the normalized affinity matrix only at the coarsest level. As discussed in the previous section, the affinity matrix at the coarsest level is not likely to be sparse, hence it will need a full (as opposed to a sparse) version of an eigen solver. However it is typically the case that e ≤ m n (even in the case of the three-scale hierarchy that we just considered) and hence we expect this step to be the least expensive computationally. The resulting eigenvectors are interpolated to the next lower level of the hierarchy by a process which will be described next. Because the eigen interpolation process between every adjacent pair of scales in the hierarchy is similar, we will assume we have access to the leading eigenvectors U (size: m × e) for the normalized affinity matrix L (size: m × m) and describe how to generate the leading eigenvectors U (size: n × e), and the leading eigenvalues S (size: e × 1), for the fine-scale normalized affinity matrix L (size: n × n). There are several steps to the eigen interpolation process and in the discussion that follows we refer to the lines in the pseudo-code presented below. First, the coarse-scale eigenvectors U can be interpolated using the kernel matrix K to generate U = K U , an approximation for the fine-scale eigenvectors (line 9). Second, interpolation alone is unlikely to set the directions of U exactly aligned with U L , the vectors one would obtain by a direct eigen decomposition of the fine-scale normalized affinity matrix L. We therefore update the directions in U by applying a small number of power iterations with L, as given in lines 13-15. e e function (U, S) = CoarseToFine(L, K, U , S) 1: INPUT 2: L, K ⇐ {L is n × n and K is n × m where m n} e e e e 3: U /S ⇐ {leading coarse-scale eigenvectors/eigenvalues of L. U is of size m × e, e ≤ m} 4: OUTPUT 5: U, S ⇐ {leading fine-scale eigenvectors/eigenvalues of L. U is n × e and S is e × 1.} x 10 0.4 3 0.96 0.94 0.92 0.9 0.35 2.5 Relative Error Absolute Relative Error 0.98 Eigen Value |δλ|λ−1 −3 Eigen Spectrum 1 2 1.5 1 5 10 15 20 Eigen Index (a) 25 30 0.2 0.15 0.1 0.5 0.88 0.3 0.25 0.05 5 10 15 20 Eigen Index (b) 25 30 5 10 15 20 Eigen Index 25 30 (c) Figure 1: Hierarchical eigensolver results. (a) comparing ground truth eigenvalues S L (red circles) with multi-scale eigensolver spectrum S (blue line) (b) Relative absolute error between eigenvalues: |S−SL | (c) Eigenvector mismatch: 1 − diag |U T UL | , between SL eigenvectors U derived by the multi-scale eigensolver and the ground truth U L . Observe the slight mismatch in the last few eigenvectors, but excellent agreement in the leading eigenvectors (see text). 6: CONSTANTS: TOL = 1e-4; POWER ITERS = 50 7: “ ” e 8: TPI = min POWER ITERS, log(e × eps/TOL)/ log(min(S)) {eps: machine accuracy} e 9: U = K U {interpolation from coarse to fine} 10: while not converged do 11: Uold = U {n × e matrix, e n} 12: for i = 1 to TPI do 13: U ⇐ LU 14: end for 15: U ⇐ Gram-Schmidt(U ) {orthogonalize U } 16: Le = U T LU {L may be sparse, but Le need not be.} 17: Ue Se UeT = svd(Le ) {eigenanalysis of Le , which is of size e × e.} 18: U ⇐ U Ue {update the leading eigenvectors of L} 19: S = diag(Se ) {grab the leading eigenvalues of L} T 20: innerProd = 1 − diag( Uold U ) {1 is a e × 1 vector of all ones} 21: converged = max[abs(innerProd)] < TOL 22: end while The number of power iterations TPI can be bounded as discussed next. Suppose v = U c where U is a matrix of true eigenvectors and c is a coefficient vector for an arbitrary vector v. After TPI power iterations v becomes v = U diag(S TPI )c, where S has the exact eigenvalues. In order for the component of a vector v in the direction Ue (the eth column of U ) not to be swamped by other components, we can limit it’s decay after TPI iterations as TPI follows: (S(e)/S(1)) >= e×eps/TOL, where S(e) is the exact eth eigenvalue, S(1) = 1, eps is the machine precision, TOL is requested accuracy. Because we do not have access to the exact value S(e) at the beginning of the interpolation procedure, we estimate it from the coarse eigenvalues S. This leads to a bound on the power iterations TPI, as derived on the line 9 above. Third, the interpolation process and the power iterations need not preserve orthogonality in the eigenvectors in U . We fix this by Gram-Schmidt orthogonalization procedure (line 16). Finally, there is a still a problem with power iterations that needs to be resolved, in that it is very hard to separate nearby eigenvalues. In particular, for the convergence of the power iterations the ratio that matters is between the (e + 1) st and eth eigenvalues. So the idea we pursue is to use the power iterations only to separate the reduced space of eigenvectors (of dimension e) from the orthogonal subspace (of dimension n − e). We then use a full SVD on the reduced space to update the leading eigenvectors U , and eigenvalues S, for the fine-scale (lines 17-20). This idea is similar to computing the Ritz values and Ritz vectors in a Rayleigh-Ritz method. 6 Interpolation Results Our multi-scale decomposition code is in Matlab. For the direct eigen decomposition, we have used the Matlab program svds.m which invokes the compiled ARPACKC routine [13], with a default convergence tolerance of 1e-10. In Fig. 1a we compare the spectrum S obtained from a three-scale decomposition on the eye image (blue line) with the ground truth, which is the spectrum SL resulting from direct eigen decomposition of the fine-scale normalized affinity matrices L (red circles). There is an excellent agreement in the leading eigenvalues. To illustrate this, we show absolute relative error between the spectra: |S−SL | in Fig. 1b. The spectra agree mostly, except for SL the last few eigenvalues. For a quantitative comparison between the eigenvectors, we plot in Fig. 1c the following measure: 1 − diag(|U T UL |), where U is the matrix of eigenvectors obtained by the multi-scale approximation, UL is the ground-truth resulting from a direct eigen decomposition of the fine-scale affinity matrix L and 1 is a vector of all ones. The relative error plot demonstrates a close match, within the tolerance threshold of 1e-4 that we chose for the multi-scale method, in the leading eigenvector directions between the two methods. The relative error is high with the last few eigen vectors, which suggests that the power iterations have not clearly separated them from other directions. So, the strategy we suggest is to pad the required number of leading eigen basis by about 20% before invoking the multi-scale procedure. Obviously, the number of hierarchical stages for the multi-scale procedure must be chosen such that the transition matrix at the coarsest scale can accommodate the slight increase in the subspace dimensions. For lack of space we are omitting extra results (see Ch.8 in [6]). Next we measure the time the hierarchical eigensolver takes to compute the leading eigenbasis for various input sizes, in comparison with the svds.m procedure [13]. We form images of different input sizes by Gaussian smoothing of i.i.d noise. The Gaussian function has a standard deviation of 3 pixels. The edges in graph G are defined by the standard 8-neighbourhood of each pixel. The edge weights between neighbouring pixels are simply given by a function of the difference in the corresponding intensities (see §4.3). The affinity matrix A with the edge weights is then used to generate a Markov transition matrix M . The fast eigensolver is run on ten different instances of the input image of a given size and the average of these times is reported here. For a fair comparison between the two procedures, we set the convergence tolerance value for the svds.m procedure to be 1e-4, the same as the one used for the fast eigensolver. We found the hierarchical representation derived from this tolerance threshold to be sufficiently accurate for a novel min-cut based segmentation results that we reported in [8]. Also, the subspace dimensionality is fixed to be 51 where we expect (and indeed observe) the leading 40 eigenpairs derived from the multi-scale procedure to be accurate. Hence, while invoking svds.m we compute only the leading 41 eigenpairs. In the table shown below, the first column corresponds to the number of nodes in the graph, while the second and third columns report the time taken in seconds by the svds.m procedure and the Matlab implementation of the multi-scale eigensolver respectively. The fourth column reports the speedups of the multi-scale eigensolver over svds.m procedure on a standard desktop (Intel P4, 2.5GHz, 1GB RAM). Lowering the tolerance threshold for svds.m made it faster by about 20 − 30%. Despite this, the multi-scale algorithm clearly outperforms the svds.m procedure. The most expensive step in the multi-scale algorithm is the power iteration required in the last stage, that is interpolating eigenvectors from the first coarse scale to the required fine scale. The complexity is of the order of n × e where e is the subspace dimensionality and n is the size of the graph. Indeed, from the table we can see that the multi-scale procedure is taking time roughly proportional to n. Deviations from the linear trend are observed at specific values of n, which we believe are due to the n 322 632 642 652 1002 1272 1282 1292 1602 2552 2562 2572 5112 5122 5132 6002 7002 8002 svds.m 1.6 10.8 20.5 12.6 44.2 91.1 230.9 96.9 179.3 819.2 2170.8 871.7 7977.2 20269 7887.2 10841.4 15048.8 Multi-Scale 1.5 4.9 5.5 5.1 13.1 20.4 35.2 20.9 34.4 90.3 188.7 93.3 458.8 739.3 461.9 644.2 1162.4 1936.6 Speedup 1.1 2.2 3.7 2.5 3.4 4.5 6.6 4.6 5.2 9.1 11.5 9.3 17.4 27.4 17.1 16.8 12.9 variations in the difficulty of the specific eigenvalue problem (eg. nearly multiple eigenvalues). The hierarchical representation has proven to be effective in a min-cut based segmentation algorithm that we proposed recently [8]. Here we explored the use of random walks and associated spectral embedding techniques for the automatic generation of suitable proposal (source and sink) regions for a min-cut based algorithm. The multiscale algorithm was used to generate the 40 leading eigenvectors of large transition matrices (eg. size 20K × 20K). In terms of future work, it will be useful to compare our work with other approximate methods for SVD such as [23]. Ack: We thank S. Roweis, F. Estrada and M. Sakr for valuable comments. References [1] D. Achlioptas and F. McSherry. Fast Computation of Low-Rank Approximations. STOC, 2001. [2] D. Achlioptas et al Sampling Techniques for Kernel Methods. NIPS, 2001. [3] S. Barnard and H. Simon Fast Multilevel Implementation of Recursive Spectral Bisection for Partitioning Unstructured Problems. PPSC, 627-632. [4] M. Belkin et al Laplacian Eigenmaps and Spectral Techniques for Embedding. NIPS, 2001. [5] M. Brand et al A unifying theorem for spectral embedding and clustering. AI & STATS, 2002. [6] C. Chennubhotla. Spectral Methods for Multi-scale Feature Extraction and Spectral Clustering. http://www.cs.toronto.edu/˜chakra/thesis.pdf Ph.D Thesis, Department of Computer Science, University of Toronto, Canada, 2004. [7] C. Chennubhotla and A. Jepson. Half-Lives of EigenFlows for Spectral Clustering. NIPS, 2002. [8] F. Estrada, A. Jepson and C. Chennubhotla. Spectral Embedding and Min-Cut for Image Segmentation. Manuscript Under Review, 2004. [9] C. Fowlkes et al Efficient spatiotemporal grouping using the Nystrom method. CVPR, 2001. [10] S. Belongie et al Spectral Partitioning with Indefinite Kernels using Nystrom app. ECCV, 2002. [11] A. Frieze et al Fast Monte-Carlo Algorithms for finding low-rank approximations. FOCS, 1998. [12] Y. Koren et al ACE: A Fast Multiscale Eigenvectors Computation for Drawing Huge Graphs IEEE Symp. on InfoVis 2002, pp. 137-144 [13] R. B. Lehoucq, D. C. Sorensen and C. Yang. ARPACK User Guide: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods. SIAM 1998. [14] J. J. Lin. Reduced Rank Approximations of Transition Matrices. AI & STATS, 2002. [15] L. Lova’sz. Random Walks on Graphs: A Survey Combinatorics, 1996, 353–398. [16] G. J. McLachlan et al Mixture Models: Inference and Applications to Clustering. 1988 [17] M. Meila and J. Shi. A random walks view of spectral segmentation. AI & STATS, 2001. [18] A. Ng, M. Jordan and Y. Weiss. On Spectral Clustering: analysis and an algorithm NIPS, 2001. [19] A. Pothen Graph partitioning algorithms with applications to scientific computing. Parallel Numerical Algorithms, D. E. Keyes et al (eds.), Kluwer Academic Press, 1996. [20] G. L. Scott et al Feature grouping by relocalization of eigenvectors of the proximity matrix. BMVC, pg. 103-108, 1990. [21] E. Sharon et al Fast Multiscale Image Segmentation CVPR, I:70-77, 2000. [22] J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI, August, 2000. [23] H. Simon et al Low-Rank Matrix Approximation Using the Lanczos Bidiagonalization Process with Applications SIAM J. of Sci. Comp. 21(6):2257-2274, 2000. [24] N. Tishby et al Data clustering by Markovian Relaxation NIPS, 2001. [25] C. Williams et al Using the Nystrom method to speed up the kernel machines. NIPS, 2001.</p><p>3 0.22374403 <a title="161-tfidf-3" href="./nips-2004-Limits_of_Spectral_Clustering.html">103 nips-2004-Limits of Spectral Clustering</a></p> <p>Author: Ulrike V. Luxburg, Olivier Bousquet, Mikhail Belkin</p><p>Abstract: An important aspect of clustering algorithms is whether the partitions constructed on finite samples converge to a useful clustering of the whole data space as the sample size increases. This paper investigates this question for normalized and unnormalized versions of the popular spectral clustering algorithm. Surprisingly, the convergence of unnormalized spectral clustering is more difficult to handle than the normalized case. Even though recently some first results on the convergence of normalized spectral clustering have been obtained, for the unnormalized case we have to develop a completely new approach combining tools from numerical integration, spectral and perturbation theory, and probability. It turns out that while in the normalized case, spectral clustering usually converges to a nice partition of the data space, in the unnormalized case the same only holds under strong additional assumptions which are not always satisfied. We conclude that our analysis gives strong evidence for the superiority of normalized spectral clustering. It also provides a basis for future exploration of other Laplacian-based methods. 1</p><p>4 0.1720594 <a title="161-tfidf-4" href="./nips-2004-Blind_One-microphone_Speech_Separation%3A_A_Spectral_Learning_Approach.html">31 nips-2004-Blind One-microphone Speech Separation: A Spectral Learning Approach</a></p> <p>Author: Francis R. Bach, Michael I. Jordan</p><p>Abstract: We present an algorithm to perform blind, one-microphone speech separation. Our algorithm separates mixtures of speech without modeling individual speakers. Instead, we formulate the problem of speech separation as a problem in segmenting the spectrogram of the signal into two or more disjoint sets. We build feature sets for our segmenter using classical cues from speech psychophysics. We then combine these features into parameterized affinity matrices. We also take advantage of the fact that we can generate training examples for segmentation by artificially superposing separately-recorded signals. Thus the parameters of the affinity matrices can be tuned using recent work on learning spectral clustering [1]. This yields an adaptive, speech-specific segmentation algorithm that can successfully separate one-microphone speech mixtures. 1</p><p>5 0.1715461 <a title="161-tfidf-5" href="./nips-2004-A_Three_Tiered_Approach_for_Articulated_Object_Action_Modeling_and_Recognition.html">13 nips-2004-A Three Tiered Approach for Articulated Object Action Modeling and Recognition</a></p> <p>Author: Le Lu, Gregory D. Hager, Laurent Younes</p><p>Abstract: Visual action recognition is an important problem in computer vision. In this paper, we propose a new method to probabilistically model and recognize actions of articulated objects, such as hand or body gestures, in image sequences. Our method consists of three levels of representation. At the low level, we first extract a feature vector invariant to scale and in-plane rotation by using the Fourier transform of a circular spatial histogram. Then, spectral partitioning [20] is utilized to obtain an initial clustering; this clustering is then refined using a temporal smoothness constraint. Gaussian mixture model (GMM) based clustering and density estimation in the subspace of linear discriminant analysis (LDA) are then applied to thousands of image feature vectors to obtain an intermediate level representation. Finally, at the high level we build a temporal multiresolution histogram model for each action by aggregating the clustering weights of sampled images belonging to that action. We discuss how this high level representation can be extended to achieve temporal scaling invariance and to include Bi-gram or Multi-gram transition information. Both image clustering and action recognition/segmentation results are given to show the validity of our three tiered representation.</p><p>6 0.17047203 <a title="161-tfidf-6" href="./nips-2004-Maximum_Margin_Clustering.html">115 nips-2004-Maximum Margin Clustering</a></p> <p>7 0.15037368 <a title="161-tfidf-7" href="./nips-2004-Joint_Probabilistic_Curve_Clustering_and_Alignment.html">90 nips-2004-Joint Probabilistic Curve Clustering and Alignment</a></p> <p>8 0.14431772 <a title="161-tfidf-8" href="./nips-2004-Nonparametric_Transforms_of_Graph_Kernels_for_Semi-Supervised_Learning.html">133 nips-2004-Nonparametric Transforms of Graph Kernels for Semi-Supervised Learning</a></p> <p>9 0.12728186 <a title="161-tfidf-9" href="./nips-2004-Efficient_Out-of-Sample_Extension_of_Dominant-Set_Clusters.html">61 nips-2004-Efficient Out-of-Sample Extension of Dominant-Set Clusters</a></p> <p>10 0.12194566 <a title="161-tfidf-10" href="./nips-2004-Proximity_Graphs_for_Clustering_and_Manifold_Learning.html">150 nips-2004-Proximity Graphs for Clustering and Manifold Learning</a></p> <p>11 0.11852661 <a title="161-tfidf-11" href="./nips-2004-Spike_Sorting%3A_Bayesian_Clustering_of_Non-Stationary_Data.html">174 nips-2004-Spike Sorting: Bayesian Clustering of Non-Stationary Data</a></p> <p>12 0.10880237 <a title="161-tfidf-12" href="./nips-2004-Hierarchical_Clustering_of_a_Mixture_Model.html">77 nips-2004-Hierarchical Clustering of a Mixture Model</a></p> <p>13 0.10203286 <a title="161-tfidf-13" href="./nips-2004-Semi-supervised_Learning_with_Penalized_Probabilistic_Clustering.html">167 nips-2004-Semi-supervised Learning with Penalized Probabilistic Clustering</a></p> <p>14 0.093724191 <a title="161-tfidf-14" href="./nips-2004-The_Laplacian_PDF_Distance%3A_A_Cost_Function_for_Clustering_in_a_Kernel_Feature_Space.html">188 nips-2004-The Laplacian PDF Distance: A Cost Function for Clustering in a Kernel Feature Space</a></p> <p>15 0.084137216 <a title="161-tfidf-15" href="./nips-2004-A_Method_for_Inferring_Label_Sampling_Mechanisms_in_Semi-Supervised_Learning.html">9 nips-2004-A Method for Inferring Label Sampling Mechanisms in Semi-Supervised Learning</a></p> <p>16 0.069258049 <a title="161-tfidf-16" href="./nips-2004-The_Convergence_of_Contrastive_Divergences.html">185 nips-2004-The Convergence of Contrastive Divergences</a></p> <p>17 0.067414947 <a title="161-tfidf-17" href="./nips-2004-Algebraic_Set_Kernels_with_Application_to_Inference_Over_Local_Image_Representations.html">18 nips-2004-Algebraic Set Kernels with Application to Inference Over Local Image Representations</a></p> <p>18 0.066397235 <a title="161-tfidf-18" href="./nips-2004-Modelling_Uncertainty_in_the_Game_of_Go.html">122 nips-2004-Modelling Uncertainty in the Game of Go</a></p> <p>19 0.065107316 <a title="161-tfidf-19" href="./nips-2004-Multiple_Relational_Embedding.html">125 nips-2004-Multiple Relational Embedding</a></p> <p>20 0.064714834 <a title="161-tfidf-20" href="./nips-2004-A_Probabilistic_Model_for_Online_Document_Clustering_with_Application_to_Novelty_Detection.html">10 nips-2004-A Probabilistic Model for Online Document Clustering with Application to Novelty Detection</a></p> <br/> <h2>similar papers computed by <a title="lsi-model" href="../home/nips2004_lsi.html">lsi model</a></h2><h3>lsi for this paper:</h3><p>topicId topicWeight</p> <p>[(0, -0.257), (1, 0.091), (2, -0.092), (3, -0.156), (4, -0.137), (5, -0.132), (6, -0.254), (7, 0.084), (8, -0.232), (9, -0.022), (10, -0.214), (11, 0.045), (12, -0.101), (13, -0.021), (14, 0.031), (15, -0.054), (16, -0.115), (17, -0.016), (18, -0.168), (19, 0.004), (20, 0.061), (21, 0.035), (22, -0.008), (23, -0.071), (24, 0.004), (25, 0.109), (26, -0.015), (27, 0.016), (28, 0.022), (29, 0.063), (30, 0.044), (31, 0.059), (32, -0.053), (33, 0.05), (34, -0.003), (35, 0.094), (36, -0.064), (37, -0.041), (38, -0.066), (39, -0.042), (40, -0.012), (41, -0.022), (42, -0.056), (43, -0.026), (44, 0.0), (45, -0.137), (46, -0.053), (47, -0.027), (48, 0.083), (49, 0.108)]</p> <h3>similar papers list:</h3><p>simIndex simValue paperId paperTitle</p> <p>same-paper 1 0.98028123 <a title="161-lsi-1" href="./nips-2004-Self-Tuning_Spectral_Clustering.html">161 nips-2004-Self-Tuning Spectral Clustering</a></p> <p>Author: Lihi Zelnik-manor, Pietro Perona</p><p>Abstract: We study a number of open issues in spectral clustering: (i) Selecting the appropriate scale of analysis, (ii) Handling multi-scale data, (iii) Clustering with irregular background clutter, and, (iv) Finding automatically the number of groups. We first propose that a ‘local’ scale should be used to compute the affinity between each pair of points. This local scaling leads to better clustering especially when the data includes multiple scales and when the clusters are placed within a cluttered background. We further suggest exploiting the structure of the eigenvectors to infer automatically the number of groups. This leads to a new algorithm in which the final randomly initialized k-means stage is eliminated. 1</p><p>2 0.80918354 <a title="161-lsi-2" href="./nips-2004-Limits_of_Spectral_Clustering.html">103 nips-2004-Limits of Spectral Clustering</a></p> <p>Author: Ulrike V. Luxburg, Olivier Bousquet, Mikhail Belkin</p><p>Abstract: An important aspect of clustering algorithms is whether the partitions constructed on finite samples converge to a useful clustering of the whole data space as the sample size increases. This paper investigates this question for normalized and unnormalized versions of the popular spectral clustering algorithm. Surprisingly, the convergence of unnormalized spectral clustering is more difficult to handle than the normalized case. Even though recently some first results on the convergence of normalized spectral clustering have been obtained, for the unnormalized case we have to develop a completely new approach combining tools from numerical integration, spectral and perturbation theory, and probability. It turns out that while in the normalized case, spectral clustering usually converges to a nice partition of the data space, in the unnormalized case the same only holds under strong additional assumptions which are not always satisfied. We conclude that our analysis gives strong evidence for the superiority of normalized spectral clustering. It also provides a basis for future exploration of other Laplacian-based methods. 1</p><p>3 0.78293663 <a title="161-lsi-3" href="./nips-2004-Hierarchical_Eigensolver_for_Transition_Matrices_in_Spectral_Methods.html">79 nips-2004-Hierarchical Eigensolver for Transition Matrices in Spectral Methods</a></p> <p>Author: Chakra Chennubhotla, Allan D. Jepson</p><p>Abstract: We show how to build hierarchical, reduced-rank representation for large stochastic matrices and use this representation to design an efficient algorithm for computing the largest eigenvalues, and the corresponding eigenvectors. In particular, the eigen problem is first solved at the coarsest level of the representation. The approximate eigen solution is then interpolated over successive levels of the hierarchy. A small number of power iterations are employed at each stage to correct the eigen solution. The typical speedups obtained by a Matlab implementation of our fast eigensolver over a standard sparse matrix eigensolver [13] are at least a factor of ten for large image sizes. The hierarchical representation has proven to be effective in a min-cut based segmentation algorithm that we proposed recently [8]. 1 Spectral Methods Graph-theoretic spectral methods have gained popularity in a variety of application domains: segmenting images [22]; embedding in low-dimensional spaces [4, 5, 8]; and clustering parallel scientific computation tasks [19]. Spectral methods enable the study of properties global to a dataset, using only local (pairwise) similarity or affinity measurements between the data points. The global properties that emerge are best understood in terms of a random walk formulation on the graph. For example, the graph can be partitioned into clusters by analyzing the perturbations to the stationary distribution of a Markovian relaxation process defined in terms of the affinity weights [17, 18, 24, 7]. The Markovian relaxation process need never be explicitly carried out; instead, it can be analytically expressed using the leading order eigenvectors, and eigenvalues, of the Markov transition matrix. In this paper we consider the practical application of spectral methods to large datasets. In particular, the eigen decomposition can be very expensive, on the order of O(n 3 ), where n is the number of nodes in the graph. While it is possible to compute analytically the first eigenvector (see §3 below), the remaining subspace of vectors (necessary for say clustering) has to be explicitly computed. A typical approach to dealing with this difficulty is to first sparsify the links in the graph [22] and then apply an efficient eigensolver [13, 23, 3]. In comparison, we propose in this paper a specialized eigensolver suitable for large stochastic matrices with known stationary distributions. In particular, we exploit the spectral properties of the Markov transition matrix to generate hierarchical, successively lower-ranked approximations to the full transition matrix. The eigen problem is solved directly at the coarsest level of representation. The approximate eigen solution is then interpolated over successive levels of the hierarchy, using a small number of power iterations to correct the solution at each stage. 2 Previous Work One approach to speeding up the eigen decomposition is to use the fact that the columns of the affinity matrix are typically correlated. The idea then is to pick a small number of representative columns to perform eigen decomposition via SVD. For example, in the Nystrom approximation procedure, originally proposed for integral eigenvalue problems, the idea is to randomly pick a small set of m columns; generate the corresponding affinity matrix; solve the eigenproblem and finally extend the solution to the complete graph [9, 10]. The Nystrom method has also been recently applied in the kernel learning methods for fast Gaussian process classification and regression [25]. Other sampling-based approaches include the work reported in [1, 2, 11]. Our starting point is the transition matrix generated from affinity weights and we show how building a representational hierarchy follows naturally from considering the stochastic matrix. A closely related work is the paper by Lin on reduced rank approximations of transition matrices [14]. We differ in how we approximate the transition matrices, in particular our objective function is computationally less expensive to solve. In particular, one of our goals in reducing transition matrices is to develop a fast, specialized eigen solver for spectral clustering. Fast eigensolving is also the goal in ACE [12], where successive levels in the hierarchy can potentially have negative affinities. A graph coarsening process for clustering was also pursued in [21, 3]. 3 Markov Chain Terminology We first provide a brief overview of the Markov chain terminology here (for more details see [17, 15, 6]). We consider an undirected graph G = (V, E) with vertices vi , for i = {1, . . . , n}, and edges ei,j with non-negative weights ai,j . Here the weight ai,j represents the affinity between vertices vi and vj . The affinities are represented by a non-negative, symmetric n × n matrix A having weights ai,j as elements. The degree of a node j is n n defined to be: dj = i=1 ai,j = j=1 aj,i , where we define D = diag(d1 , . . . , dn ). A Markov chain is defined using these affinities by setting a transition probability matrix M = AD −1 , where the columns of M each sum to 1. The transition probability matrix defines the random walk of a particle on the graph G. The random walk need never be explicitly carried out; instead, it can be analytically expressed using the leading order eigenvectors, and eigenvalues, of the Markov transition matrix. Because the stochastic matrices need not be symmetric in general, a direct eigen decomposition step is not preferred for reasons of instability. This problem is easily circumvented by considering a normalized affinity matrix: L = D −1/2 AD−1/2 , which is related to the stochastic matrix by a similarity transformation: L = D −1/2 M D1/2 . Because L is symmetric, it can be diagonalized: L = U ΛU T , where U = [u1 , u2 , · · · , un ] is an orthogonal set of eigenvectors and Λ is a diagonal matrix of eigenvalues [λ1 , λ2 , · · · , λn ] sorted in decreasing order. The eigenvectors have unit length uk = 1 and from the form of A and D it can be shown that the eigenvalues λi ∈ (−1, 1], with at least one eigenvalue equal to one. Without loss of generality, we take λ1 = 1. Because L and M are similar we can perform an eigen decomposition of the Markov transition matrix as: M = D1/2 LD−1/2 = D1/2 U Λ U T D−1/2 . Thus an eigenvector u of L corresponds to an eigenvector D 1/2 u of M with the same eigenvalue λ. The Markovian relaxation process after β iterations, namely M β , can be represented as: M β = D1/2 U Λβ U T D−1/2 . Therefore, a particle undertaking a random walk with an initial distribution p 0 acquires after β steps a distribution p β given by: p β = M β p 0 . Assuming the graph is connected, as β → ∞, the Markov chain approaches a unique n stationary distribution given by π = diag(D)/ i=1 di , and thus, M ∞ = π1T , where 1 is a n-dim column vector of all ones. Observe that π is an eigenvector of M as it is easy to show that M π = π and the corresponding eigenvalue is 1. Next, we show how to generate hierarchical, successively low-ranked approximations for the transition matrix M . 4 Building a Hierarchy of Transition Matrices The goal is to generate a very fast approximation, while simultaneously achieving sufficient accuracy. For notational ease, we think of M as a fine-scale representation and M as some coarse-scale approximation to be derived here. By coarsening M further, we can generate successive levels of the representation hierarchy. We use the stationary distribution π to construct a corresponding coarse-scale stationary distribution δ. As we just discussed a critical property of the fine scale Markov matrix M is that it is similar to the symmetric matrix L and we wish to preserve this property at every level of the representation hierarchy. 4.1 Deriving Coarse-Scale Stationary Distribution We begin by expressing the stationary distribution π as a probabilistic mixture of latent distributions. In matrix notation, we have (1) π = K δ, where δ is an unknown mixture coefficient vector of length m, K is an n × m non-negative n kernel matrix whose columns are latent distributions that each sum to 1: i=1 Ki,j = 1 and m n. It is easy to derive a maximum likelihood approximation of δ using an EM type algorithm [16]. The main step is to find a stationary point δ, λ for the Lagrangian: m n i=1 m Ki,j δj + λ πi ln E≡− j=1 δj − 1 . (2) j=1 An implicit step in this EM procedure is to compute the the ownership probability r i,j of the j th kernel (or node) at the coarse scale for the ith node on the fine scale and is given by ri,j = δj Ki,j . m k=1 δk Ki,k (3) The EM procedure allows for an update of both δ and the latent distributions in the kernel matrix K (see §8.3.1 in [6]). For initialization, δ is taken to be uniform over the coarse-scale states. But in choosing kernels K, we provide a good initialization for the EM procedure. Specifically, the Markov matrix M is diffused using a small number of iterations to get M β . The diffusion causes random walks from neighboring nodes to be less distinguishable. This in turn helps us select a small number of columns of M β in a fast and greedy way to be the kernel matrix K. We defer the exact details on kernel selection to a later section (§4.3). 4.2 Deriving the Coarse-Scale Transition Matrix In order to define M , the coarse-scale transition matrix, we break it down into three steps. First, the Markov chain propagation at the coarse scale can be defined as: q k+1 = M q k , (4) where q is the coarse scale probability distribution after k steps of the random walk. Second, we expand q k into the fine scale using the kernels K resulting in a fine scale probability distribution p k : p k = Kq k . (5) k Finally, we lift p k back into the coarse scale by using the ownership probability of the j th kernel for the ith node on the fine grid: n qjk+1 = ri,j pik i=1 (6) Substituting for Eqs.(3) and (5) in Eq. 6 gives n m qjk+1 = i=1 n Ki,t qtk = ri,j t=1 i=1 δj Ki,j m k=1 δk Ki,k m Ki,t qtk . (7) t=1 We can write the preceding equation in a matrix form: q k+1 = diag( δ ) K T diag K δ −1 Kq k . (8) Comparing this with Eq. 4, we can derive the transition matrix M as: M = diag( δ ) K T diag K δ −1 (9) K. It is easy to see that δ = M δ, so δ is the stationary distribution for M . Following the definition of M , and its stationary distribution δ, we can generate a symmetric coarse scale affinity matrix A given by A = M diag(δ) = diag( δ ) K T diag K δ −1 Kdiag(δ) , (10) where we substitute for the expression M from Eq. 9. The coarse-scale affinity matrix A is then normalized to get: L = D−1/2 AD−1/2 ; D = diag(d1 , d2 , · · · , dm ), (11) where dj is the degree of node j in the coarse-scale graph represented by the matrix A (see §3 for degree definition). Thus, the coarse scale Markov matrix M is precisely similar to a symmetric matrix L. 4.3 Selecting Kernels For demonstration purpose, we present the kernel selection details on the image of an eye shown below. To begin with, a random walk is defined where each pixel in the test image is associated with a vertex of the graph G. The edges in G are defined by the standard 8-neighbourhood of each pixel. For the demonstrations in this paper, the edge weight ai,j between neighbouring pixels xi and xj is given by a function of the difference in the 2 corresponding intensities I(xi ) and I(xj ): ai,j = exp(−(I(xi ) − I(xj ))2 /2σa ), where σa is set according to the median absolute difference |I(xi ) − I(xj )| between neighbours measured over the entire image. The affinity matrix A with the edge weights is then used to generate a Markov transition matrix M . The kernel selection process we use is fast and greedy. First, the fine scale Markov matrix M is diffused to M β using β = 4. The Markov matrix M is sparse as we make the affinity matrix A sparse. Every column in the diffused matrix M β is a potential kernel. To facilitate the selection process, the second step is to rank order the columns of M β based on a probability value in the stationary distribution π. Third, the kernels (i.e. columns of M β ) are picked in such a way that for a kernel Ki all of the neighbours of pixel i which are within the half-height of the the maximum value in the kernel Ki are suppressed from the selection process. Finally, the kernel selection is continued until every pixel in the image is within a half-height of the peak value of at least one kernel. If M is a full matrix, to avoid the expense of computing M β explicitly, random kernel centers can be selected, and only the corresponding columns of M β need be computed. We show results from a three-scale hierarchy on the eye image (below). The image has 25 × 20 pixels but is shown here enlarged for clarity. At the first coarse scale 83 kernels are picked. The kernels each correspond to a different column in the fine scale transition matrix and the pixels giving rise to these kernels are shown numbered on the image. Using these kernels as an initialization, the EM procedure derives a coarse-scale stationary distribution δ 21 14 26 4 (Eq. 2), while simultaneously updating the kernel ma12 27 2 19 trix. Using the newly updated kernel matrix K and the 5 8 13 23 30 18 6 9 derived stationary distribution δ a transition matrix M 28 20 15 32 10 22 is generated (Eq. 9). The coarse scale Markov matrix 24 17 7 is then diffused to M β , again using β = 4. The kernel Coarse Scale 1 Coarse Scale 2 selection algorithm is reapplied, this time picking 32 kernels for the second coarse scale. Larger values of β cause the coarser level to have fewer elements. But the exact number of elements depends on the form of the kernels themselves. For the random experiments that we describe later in §6 we found β = 2 in the first iteration and 4 thereafter causes the number of kernels to be reduced by a factor of roughly 1/3 to 1/4 at each level. 72 28 35 44 51 64 82 4 12 31 56 19 77 36 45 52 65 13 57 23 37 5 40 53 63 73 14 29 6 66 38 74 47 24 7 30 41 54 71 78 58 15 8 20 39 48 59 67 25 68 79 21 16 2 11 26 42 49 55 60 75 32 83 43 9 76 50 17 27 61 33 69 80 3 46 18 70 81 34 10 62 22 1 25 11 1 3 16 31 29 At coarser levels of the hierarchy, we expect the kernels to get less sparse and so will the affinity and the transition matrices. In order to promote sparsity at successive levels of the hierarchy we sparsify A by zeroing out elements associated with “small” transition probabilities in M . However, in the experiments described later in §6, we observe this sparsification step to be not critical. To summarize, we use the stationary distribution π at the fine-scale to derive a transition matrix M , and its stationary distribution δ, at the coarse-scale. The coarse scale transition in turn helps to derive an affinity matrix A and its normalized version L. It is obvious that this procedure can be repeated recursively. We describe next how to use this representation hierarchy for building a fast eigensolver. 5 Fast EigenSolver Our goal in generating a hierarchical representation of a transition matrix is to develop a fast, specialized eigen solver for spectral clustering. To this end, we perform a full eigen decomposition of the normalized affinity matrix only at the coarsest level. As discussed in the previous section, the affinity matrix at the coarsest level is not likely to be sparse, hence it will need a full (as opposed to a sparse) version of an eigen solver. However it is typically the case that e ≤ m n (even in the case of the three-scale hierarchy that we just considered) and hence we expect this step to be the least expensive computationally. The resulting eigenvectors are interpolated to the next lower level of the hierarchy by a process which will be described next. Because the eigen interpolation process between every adjacent pair of scales in the hierarchy is similar, we will assume we have access to the leading eigenvectors U (size: m × e) for the normalized affinity matrix L (size: m × m) and describe how to generate the leading eigenvectors U (size: n × e), and the leading eigenvalues S (size: e × 1), for the fine-scale normalized affinity matrix L (size: n × n). There are several steps to the eigen interpolation process and in the discussion that follows we refer to the lines in the pseudo-code presented below. First, the coarse-scale eigenvectors U can be interpolated using the kernel matrix K to generate U = K U , an approximation for the fine-scale eigenvectors (line 9). Second, interpolation alone is unlikely to set the directions of U exactly aligned with U L , the vectors one would obtain by a direct eigen decomposition of the fine-scale normalized affinity matrix L. We therefore update the directions in U by applying a small number of power iterations with L, as given in lines 13-15. e e function (U, S) = CoarseToFine(L, K, U , S) 1: INPUT 2: L, K ⇐ {L is n × n and K is n × m where m n} e e e e 3: U /S ⇐ {leading coarse-scale eigenvectors/eigenvalues of L. U is of size m × e, e ≤ m} 4: OUTPUT 5: U, S ⇐ {leading fine-scale eigenvectors/eigenvalues of L. U is n × e and S is e × 1.} x 10 0.4 3 0.96 0.94 0.92 0.9 0.35 2.5 Relative Error Absolute Relative Error 0.98 Eigen Value |δλ|λ−1 −3 Eigen Spectrum 1 2 1.5 1 5 10 15 20 Eigen Index (a) 25 30 0.2 0.15 0.1 0.5 0.88 0.3 0.25 0.05 5 10 15 20 Eigen Index (b) 25 30 5 10 15 20 Eigen Index 25 30 (c) Figure 1: Hierarchical eigensolver results. (a) comparing ground truth eigenvalues S L (red circles) with multi-scale eigensolver spectrum S (blue line) (b) Relative absolute error between eigenvalues: |S−SL | (c) Eigenvector mismatch: 1 − diag |U T UL | , between SL eigenvectors U derived by the multi-scale eigensolver and the ground truth U L . Observe the slight mismatch in the last few eigenvectors, but excellent agreement in the leading eigenvectors (see text). 6: CONSTANTS: TOL = 1e-4; POWER ITERS = 50 7: “ ” e 8: TPI = min POWER ITERS, log(e × eps/TOL)/ log(min(S)) {eps: machine accuracy} e 9: U = K U {interpolation from coarse to fine} 10: while not converged do 11: Uold = U {n × e matrix, e n} 12: for i = 1 to TPI do 13: U ⇐ LU 14: end for 15: U ⇐ Gram-Schmidt(U ) {orthogonalize U } 16: Le = U T LU {L may be sparse, but Le need not be.} 17: Ue Se UeT = svd(Le ) {eigenanalysis of Le , which is of size e × e.} 18: U ⇐ U Ue {update the leading eigenvectors of L} 19: S = diag(Se ) {grab the leading eigenvalues of L} T 20: innerProd = 1 − diag( Uold U ) {1 is a e × 1 vector of all ones} 21: converged = max[abs(innerProd)] < TOL 22: end while The number of power iterations TPI can be bounded as discussed next. Suppose v = U c where U is a matrix of true eigenvectors and c is a coefficient vector for an arbitrary vector v. After TPI power iterations v becomes v = U diag(S TPI )c, where S has the exact eigenvalues. In order for the component of a vector v in the direction Ue (the eth column of U ) not to be swamped by other components, we can limit it’s decay after TPI iterations as TPI follows: (S(e)/S(1)) >= e×eps/TOL, where S(e) is the exact eth eigenvalue, S(1) = 1, eps is the machine precision, TOL is requested accuracy. Because we do not have access to the exact value S(e) at the beginning of the interpolation procedure, we estimate it from the coarse eigenvalues S. This leads to a bound on the power iterations TPI, as derived on the line 9 above. Third, the interpolation process and the power iterations need not preserve orthogonality in the eigenvectors in U . We fix this by Gram-Schmidt orthogonalization procedure (line 16). Finally, there is a still a problem with power iterations that needs to be resolved, in that it is very hard to separate nearby eigenvalues. In particular, for the convergence of the power iterations the ratio that matters is between the (e + 1) st and eth eigenvalues. So the idea we pursue is to use the power iterations only to separate the reduced space of eigenvectors (of dimension e) from the orthogonal subspace (of dimension n − e). We then use a full SVD on the reduced space to update the leading eigenvectors U , and eigenvalues S, for the fine-scale (lines 17-20). This idea is similar to computing the Ritz values and Ritz vectors in a Rayleigh-Ritz method. 6 Interpolation Results Our multi-scale decomposition code is in Matlab. For the direct eigen decomposition, we have used the Matlab program svds.m which invokes the compiled ARPACKC routine [13], with a default convergence tolerance of 1e-10. In Fig. 1a we compare the spectrum S obtained from a three-scale decomposition on the eye image (blue line) with the ground truth, which is the spectrum SL resulting from direct eigen decomposition of the fine-scale normalized affinity matrices L (red circles). There is an excellent agreement in the leading eigenvalues. To illustrate this, we show absolute relative error between the spectra: |S−SL | in Fig. 1b. The spectra agree mostly, except for SL the last few eigenvalues. For a quantitative comparison between the eigenvectors, we plot in Fig. 1c the following measure: 1 − diag(|U T UL |), where U is the matrix of eigenvectors obtained by the multi-scale approximation, UL is the ground-truth resulting from a direct eigen decomposition of the fine-scale affinity matrix L and 1 is a vector of all ones. The relative error plot demonstrates a close match, within the tolerance threshold of 1e-4 that we chose for the multi-scale method, in the leading eigenvector directions between the two methods. The relative error is high with the last few eigen vectors, which suggests that the power iterations have not clearly separated them from other directions. So, the strategy we suggest is to pad the required number of leading eigen basis by about 20% before invoking the multi-scale procedure. Obviously, the number of hierarchical stages for the multi-scale procedure must be chosen such that the transition matrix at the coarsest scale can accommodate the slight increase in the subspace dimensions. For lack of space we are omitting extra results (see Ch.8 in [6]). Next we measure the time the hierarchical eigensolver takes to compute the leading eigenbasis for various input sizes, in comparison with the svds.m procedure [13]. We form images of different input sizes by Gaussian smoothing of i.i.d noise. The Gaussian function has a standard deviation of 3 pixels. The edges in graph G are defined by the standard 8-neighbourhood of each pixel. The edge weights between neighbouring pixels are simply given by a function of the difference in the corresponding intensities (see §4.3). The affinity matrix A with the edge weights is then used to generate a Markov transition matrix M . The fast eigensolver is run on ten different instances of the input image of a given size and the average of these times is reported here. For a fair comparison between the two procedures, we set the convergence tolerance value for the svds.m procedure to be 1e-4, the same as the one used for the fast eigensolver. We found the hierarchical representation derived from this tolerance threshold to be sufficiently accurate for a novel min-cut based segmentation results that we reported in [8]. Also, the subspace dimensionality is fixed to be 51 where we expect (and indeed observe) the leading 40 eigenpairs derived from the multi-scale procedure to be accurate. Hence, while invoking svds.m we compute only the leading 41 eigenpairs. In the table shown below, the first column corresponds to the number of nodes in the graph, while the second and third columns report the time taken in seconds by the svds.m procedure and the Matlab implementation of the multi-scale eigensolver respectively. The fourth column reports the speedups of the multi-scale eigensolver over svds.m procedure on a standard desktop (Intel P4, 2.5GHz, 1GB RAM). Lowering the tolerance threshold for svds.m made it faster by about 20 − 30%. Despite this, the multi-scale algorithm clearly outperforms the svds.m procedure. The most expensive step in the multi-scale algorithm is the power iteration required in the last stage, that is interpolating eigenvectors from the first coarse scale to the required fine scale. The complexity is of the order of n × e where e is the subspace dimensionality and n is the size of the graph. Indeed, from the table we can see that the multi-scale procedure is taking time roughly proportional to n. Deviations from the linear trend are observed at specific values of n, which we believe are due to the n 322 632 642 652 1002 1272 1282 1292 1602 2552 2562 2572 5112 5122 5132 6002 7002 8002 svds.m 1.6 10.8 20.5 12.6 44.2 91.1 230.9 96.9 179.3 819.2 2170.8 871.7 7977.2 20269 7887.2 10841.4 15048.8 Multi-Scale 1.5 4.9 5.5 5.1 13.1 20.4 35.2 20.9 34.4 90.3 188.7 93.3 458.8 739.3 461.9 644.2 1162.4 1936.6 Speedup 1.1 2.2 3.7 2.5 3.4 4.5 6.6 4.6 5.2 9.1 11.5 9.3 17.4 27.4 17.1 16.8 12.9 variations in the difficulty of the specific eigenvalue problem (eg. nearly multiple eigenvalues). The hierarchical representation has proven to be effective in a min-cut based segmentation algorithm that we proposed recently [8]. Here we explored the use of random walks and associated spectral embedding techniques for the automatic generation of suitable proposal (source and sink) regions for a min-cut based algorithm. The multiscale algorithm was used to generate the 40 leading eigenvectors of large transition matrices (eg. size 20K × 20K). In terms of future work, it will be useful to compare our work with other approximate methods for SVD such as [23]. Ack: We thank S. Roweis, F. Estrada and M. Sakr for valuable comments. References [1] D. Achlioptas and F. McSherry. Fast Computation of Low-Rank Approximations. STOC, 2001. [2] D. Achlioptas et al Sampling Techniques for Kernel Methods. NIPS, 2001. [3] S. Barnard and H. Simon Fast Multilevel Implementation of Recursive Spectral Bisection for Partitioning Unstructured Problems. PPSC, 627-632. [4] M. Belkin et al Laplacian Eigenmaps and Spectral Techniques for Embedding. NIPS, 2001. [5] M. Brand et al A unifying theorem for spectral embedding and clustering. AI & STATS, 2002. [6] C. Chennubhotla. Spectral Methods for Multi-scale Feature Extraction and Spectral Clustering. http://www.cs.toronto.edu/˜chakra/thesis.pdf Ph.D Thesis, Department of Computer Science, University of Toronto, Canada, 2004. [7] C. Chennubhotla and A. Jepson. Half-Lives of EigenFlows for Spectral Clustering. NIPS, 2002. [8] F. Estrada, A. Jepson and C. Chennubhotla. Spectral Embedding and Min-Cut for Image Segmentation. Manuscript Under Review, 2004. [9] C. Fowlkes et al Efficient spatiotemporal grouping using the Nystrom method. CVPR, 2001. [10] S. Belongie et al Spectral Partitioning with Indefinite Kernels using Nystrom app. ECCV, 2002. [11] A. Frieze et al Fast Monte-Carlo Algorithms for finding low-rank approximations. FOCS, 1998. [12] Y. Koren et al ACE: A Fast Multiscale Eigenvectors Computation for Drawing Huge Graphs IEEE Symp. on InfoVis 2002, pp. 137-144 [13] R. B. Lehoucq, D. C. Sorensen and C. Yang. ARPACK User Guide: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods. SIAM 1998. [14] J. J. Lin. Reduced Rank Approximations of Transition Matrices. AI & STATS, 2002. [15] L. Lova’sz. Random Walks on Graphs: A Survey Combinatorics, 1996, 353–398. [16] G. J. McLachlan et al Mixture Models: Inference and Applications to Clustering. 1988 [17] M. Meila and J. Shi. A random walks view of spectral segmentation. AI & STATS, 2001. [18] A. Ng, M. Jordan and Y. Weiss. On Spectral Clustering: analysis and an algorithm NIPS, 2001. [19] A. Pothen Graph partitioning algorithms with applications to scientific computing. Parallel Numerical Algorithms, D. E. Keyes et al (eds.), Kluwer Academic Press, 1996. [20] G. L. Scott et al Feature grouping by relocalization of eigenvectors of the proximity matrix. BMVC, pg. 103-108, 1990. [21] E. Sharon et al Fast Multiscale Image Segmentation CVPR, I:70-77, 2000. [22] J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI, August, 2000. [23] H. Simon et al Low-Rank Matrix Approximation Using the Lanczos Bidiagonalization Process with Applications SIAM J. of Sci. Comp. 21(6):2257-2274, 2000. [24] N. Tishby et al Data clustering by Markovian Relaxation NIPS, 2001. [25] C. Williams et al Using the Nystrom method to speed up the kernel machines. NIPS, 2001.</p><p>4 0.59537059 <a title="161-lsi-4" href="./nips-2004-Efficient_Out-of-Sample_Extension_of_Dominant-Set_Clusters.html">61 nips-2004-Efficient Out-of-Sample Extension of Dominant-Set Clusters</a></p> <p>Author: Massimiliano Pavan, Marcello Pelillo</p><p>Abstract: Dominant sets are a new graph-theoretic concept that has proven to be relevant in pairwise data clustering problems, such as image segmentation. They generalize the notion of a maximal clique to edgeweighted graphs and have intriguing, non-trivial connections to continuous quadratic optimization and spectral-based grouping. We address the problem of grouping out-of-sample examples after the clustering process has taken place. This may serve either to drastically reduce the computational burden associated to the processing of very large data sets, or to efficiently deal with dynamic situations whereby data sets need to be updated continually. We show that the very notion of a dominant set offers a simple and efficient way of doing this. Numerical experiments on various grouping problems show the effectiveness of the approach. 1</p><p>5 0.58607417 <a title="161-lsi-5" href="./nips-2004-A_Three_Tiered_Approach_for_Articulated_Object_Action_Modeling_and_Recognition.html">13 nips-2004-A Three Tiered Approach for Articulated Object Action Modeling and Recognition</a></p> <p>Author: Le Lu, Gregory D. Hager, Laurent Younes</p><p>Abstract: Visual action recognition is an important problem in computer vision. In this paper, we propose a new method to probabilistically model and recognize actions of articulated objects, such as hand or body gestures, in image sequences. Our method consists of three levels of representation. At the low level, we first extract a feature vector invariant to scale and in-plane rotation by using the Fourier transform of a circular spatial histogram. Then, spectral partitioning [20] is utilized to obtain an initial clustering; this clustering is then refined using a temporal smoothness constraint. Gaussian mixture model (GMM) based clustering and density estimation in the subspace of linear discriminant analysis (LDA) are then applied to thousands of image feature vectors to obtain an intermediate level representation. Finally, at the high level we build a temporal multiresolution histogram model for each action by aggregating the clustering weights of sampled images belonging to that action. We discuss how this high level representation can be extended to achieve temporal scaling invariance and to include Bi-gram or Multi-gram transition information. Both image clustering and action recognition/segmentation results are given to show the validity of our three tiered representation.</p><p>6 0.56056261 <a title="161-lsi-6" href="./nips-2004-Maximum_Margin_Clustering.html">115 nips-2004-Maximum Margin Clustering</a></p> <p>7 0.56030262 <a title="161-lsi-7" href="./nips-2004-Proximity_Graphs_for_Clustering_and_Manifold_Learning.html">150 nips-2004-Proximity Graphs for Clustering and Manifold Learning</a></p> <p>8 0.47719514 <a title="161-lsi-8" href="./nips-2004-Blind_One-microphone_Speech_Separation%3A_A_Spectral_Learning_Approach.html">31 nips-2004-Blind One-microphone Speech Separation: A Spectral Learning Approach</a></p> <p>9 0.45548329 <a title="161-lsi-9" href="./nips-2004-Semi-supervised_Learning_with_Penalized_Probabilistic_Clustering.html">167 nips-2004-Semi-supervised Learning with Penalized Probabilistic Clustering</a></p> <p>10 0.45400563 <a title="161-lsi-10" href="./nips-2004-Joint_Probabilistic_Curve_Clustering_and_Alignment.html">90 nips-2004-Joint Probabilistic Curve Clustering and Alignment</a></p> <p>11 0.43922827 <a title="161-lsi-11" href="./nips-2004-Spike_Sorting%3A_Bayesian_Clustering_of_Non-Stationary_Data.html">174 nips-2004-Spike Sorting: Bayesian Clustering of Non-Stationary Data</a></p> <p>12 0.4200083 <a title="161-lsi-12" href="./nips-2004-Nonparametric_Transforms_of_Graph_Kernels_for_Semi-Supervised_Learning.html">133 nips-2004-Nonparametric Transforms of Graph Kernels for Semi-Supervised Learning</a></p> <p>13 0.41586569 <a title="161-lsi-13" href="./nips-2004-Hierarchical_Clustering_of_a_Mixture_Model.html">77 nips-2004-Hierarchical Clustering of a Mixture Model</a></p> <p>14 0.39495951 <a title="161-lsi-14" href="./nips-2004-The_Convergence_of_Contrastive_Divergences.html">185 nips-2004-The Convergence of Contrastive Divergences</a></p> <p>15 0.38972786 <a title="161-lsi-15" href="./nips-2004-%E2%84%93%E2%82%80-norm_Minimization_for_Basis_Selection.html">207 nips-2004-ℓ₀-norm Minimization for Basis Selection</a></p> <p>16 0.34274149 <a title="161-lsi-16" href="./nips-2004-Newscast_EM.html">130 nips-2004-Newscast EM</a></p> <p>17 0.33260915 <a title="161-lsi-17" href="./nips-2004-Using_Machine_Learning_to_Break_Visual_Human_Interaction_Proofs_%28HIPs%29.html">199 nips-2004-Using Machine Learning to Break Visual Human Interaction Proofs (HIPs)</a></p> <p>18 0.32405046 <a title="161-lsi-18" href="./nips-2004-Triangle_Fixing_Algorithms_for_the_Metric_Nearness_Problem.html">196 nips-2004-Triangle Fixing Algorithms for the Metric Nearness Problem</a></p> <p>19 0.31874603 <a title="161-lsi-19" href="./nips-2004-Learning%2C_Regularization_and_Ill-Posed_Inverse_Problems.html">96 nips-2004-Learning, Regularization and Ill-Posed Inverse Problems</a></p> <p>20 0.31606618 <a title="161-lsi-20" href="./nips-2004-Algebraic_Set_Kernels_with_Application_to_Inference_Over_Local_Image_Representations.html">18 nips-2004-Algebraic Set Kernels with Application to Inference Over Local Image Representations</a></p> <br/> <h2>similar papers computed by <a title="lda-model" href="../home/nips2004_lda.html">lda model</a></h2><h3>lda for this paper:</h3><p>topicId topicWeight</p> <p>[(13, 0.096), (15, 0.176), (26, 0.097), (31, 0.016), (33, 0.238), (35, 0.022), (39, 0.044), (50, 0.038), (71, 0.015), (74, 0.167), (87, 0.014)]</p> <h3>similar papers list:</h3><p>simIndex simValue paperId paperTitle</p> <p>same-paper 1 0.9213919 <a title="161-lda-1" href="./nips-2004-Self-Tuning_Spectral_Clustering.html">161 nips-2004-Self-Tuning Spectral Clustering</a></p> <p>Author: Lihi Zelnik-manor, Pietro Perona</p><p>Abstract: We study a number of open issues in spectral clustering: (i) Selecting the appropriate scale of analysis, (ii) Handling multi-scale data, (iii) Clustering with irregular background clutter, and, (iv) Finding automatically the number of groups. We first propose that a ‘local’ scale should be used to compute the affinity between each pair of points. This local scaling leads to better clustering especially when the data includes multiple scales and when the clusters are placed within a cluttered background. We further suggest exploiting the structure of the eigenvectors to infer automatically the number of groups. This leads to a new algorithm in which the final randomly initialized k-means stage is eliminated. 1</p><p>2 0.8747533 <a title="161-lda-2" href="./nips-2004-Face_Detection_---_Efficient_and_Rank_Deficient.html">68 nips-2004-Face Detection --- Efficient and Rank Deficient</a></p> <p>Author: Wolf Kienzle, Matthias O. Franz, Bernhard Schölkopf, Gökhan H. Bakir</p><p>Abstract: This paper proposes a method for computing fast approximations to support vector decision functions in the field of object detection. In the present approach we are building on an existing algorithm where the set of support vectors is replaced by a smaller, so-called reduced set of synthesized input space points. In contrast to the existing method that finds the reduced set via unconstrained optimization, we impose a structural constraint on the synthetic points such that the resulting approximations can be evaluated via separable filters. For applications that require scanning large images, this decreases the computational complexity by a significant amount. Experimental results show that in face detection, rank deficient approximations are 4 to 6 times faster than unconstrained reduced set systems. 1</p><p>3 0.87323743 <a title="161-lda-3" href="./nips-2004-Spike_Sorting%3A_Bayesian_Clustering_of_Non-Stationary_Data.html">174 nips-2004-Spike Sorting: Bayesian Clustering of Non-Stationary Data</a></p> <p>Author: Aharon Bar-hillel, Adam Spiro, Eran Stark</p><p>Abstract: Spike sorting involves clustering spike trains recorded by a microelectrode according to the source neuron. It is a complicated problem, which requires a lot of human labor, partly due to the non-stationary nature of the data. We propose an automated technique for the clustering of non-stationary Gaussian sources in a Bayesian framework. At a first search stage, data is divided into short time frames and candidate descriptions of the data as a mixture of Gaussians are computed for each frame. At a second stage transition probabilities between candidate mixtures are computed, and a globally optimal clustering is found as the MAP solution of the resulting probabilistic model. Transition probabilities are computed using local stationarity assumptions and are based on a Gaussian version of the Jensen-Shannon divergence. The method was applied to several recordings. The performance appeared almost indistinguishable from humans in a wide range of scenarios, including movement, merges, and splits of clusters. 1</p><p>4 0.87231034 <a title="161-lda-4" href="./nips-2004-The_Power_of_Selective_Memory%3A_Self-Bounded_Learning_of_Prediction_Suffix_Trees.html">189 nips-2004-The Power of Selective Memory: Self-Bounded Learning of Prediction Suffix Trees</a></p> <p>Author: Ofer Dekel, Shai Shalev-shwartz, Yoram Singer</p><p>Abstract: Prediction suffix trees (PST) provide a popular and effective tool for tasks such as compression, classification, and language modeling. In this paper we take a decision theoretic view of PSTs for the task of sequence prediction. Generalizing the notion of margin to PSTs, we present an online PST learning algorithm and derive a loss bound for it. The depth of the PST generated by this algorithm scales linearly with the length of the input. We then describe a self-bounded enhancement of our learning algorithm which automatically grows a bounded-depth PST. We also prove an analogous mistake-bound for the self-bounded algorithm. The result is an efficient algorithm that neither relies on a-priori assumptions on the shape or maximal depth of the target PST nor does it require any parameters. To our knowledge, this is the first provably-correct PST learning algorithm which generates a bounded-depth PST while being competitive with any fixed PST determined in hindsight. 1</p><p>5 0.87219959 <a title="161-lda-5" href="./nips-2004-Adaptive_Discriminative_Generative_Model_and_Its_Applications.html">16 nips-2004-Adaptive Discriminative Generative Model and Its Applications</a></p> <p>Author: Ruei-sung Lin, David A. Ross, Jongwoo Lim, Ming-Hsuan Yang</p><p>Abstract: This paper presents an adaptive discriminative generative model that generalizes the conventional Fisher Linear Discriminant algorithm and renders a proper probabilistic interpretation. Within the context of object tracking, we aim to find a discriminative generative model that best separates the target from the background. We present a computationally efficient algorithm to constantly update this discriminative model as time progresses. While most tracking algorithms operate on the premise that the object appearance or ambient lighting condition does not significantly change as time progresses, our method adapts a discriminative generative model to reflect appearance variation of the target and background, thereby facilitating the tracking task in ever-changing environments. Numerous experiments show that our method is able to learn a discriminative generative model for tracking target objects undergoing large pose and lighting changes.</p><p>6 0.87184381 <a title="161-lda-6" href="./nips-2004-Nonparametric_Transforms_of_Graph_Kernels_for_Semi-Supervised_Learning.html">133 nips-2004-Nonparametric Transforms of Graph Kernels for Semi-Supervised Learning</a></p> <p>7 0.87178469 <a title="161-lda-7" href="./nips-2004-Fast_Rates_to_Bayes_for_Kernel_Machines.html">69 nips-2004-Fast Rates to Bayes for Kernel Machines</a></p> <p>8 0.87118679 <a title="161-lda-8" href="./nips-2004-Support_Vector_Classification_with_Input_Data_Uncertainty.html">178 nips-2004-Support Vector Classification with Input Data Uncertainty</a></p> <p>9 0.87112409 <a title="161-lda-9" href="./nips-2004-The_Entire_Regularization_Path_for_the_Support_Vector_Machine.html">187 nips-2004-The Entire Regularization Path for the Support Vector Machine</a></p> <p>10 0.87082565 <a title="161-lda-10" href="./nips-2004-Blind_One-microphone_Speech_Separation%3A_A_Spectral_Learning_Approach.html">31 nips-2004-Blind One-microphone Speech Separation: A Spectral Learning Approach</a></p> <p>11 0.86954325 <a title="161-lda-11" href="./nips-2004-A_Generalized_Bradley-Terry_Model%3A_From_Group_Competition_to_Individual_Skill.html">4 nips-2004-A Generalized Bradley-Terry Model: From Group Competition to Individual Skill</a></p> <p>12 0.86855799 <a title="161-lda-12" href="./nips-2004-Worst-Case_Analysis_of_Selective_Sampling_for_Linear-Threshold_Algorithms.html">206 nips-2004-Worst-Case Analysis of Selective Sampling for Linear-Threshold Algorithms</a></p> <p>13 0.86837023 <a title="161-lda-13" href="./nips-2004-Non-Local_Manifold_Tangent_Learning.html">131 nips-2004-Non-Local Manifold Tangent Learning</a></p> <p>14 0.86788476 <a title="161-lda-14" href="./nips-2004-Limits_of_Spectral_Clustering.html">103 nips-2004-Limits of Spectral Clustering</a></p> <p>15 0.86783689 <a title="161-lda-15" href="./nips-2004-Confidence_Intervals_for_the_Area_Under_the_ROC_Curve.html">45 nips-2004-Confidence Intervals for the Area Under the ROC Curve</a></p> <p>16 0.86756516 <a title="161-lda-16" href="./nips-2004-Matrix_Exponential_Gradient_Updates_for_On-line_Learning_and_Bregman_Projection.html">110 nips-2004-Matrix Exponential Gradient Updates for On-line Learning and Bregman Projection</a></p> <p>17 0.86723983 <a title="161-lda-17" href="./nips-2004-Semi-supervised_Learning_with_Penalized_Probabilistic_Clustering.html">167 nips-2004-Semi-supervised Learning with Penalized Probabilistic Clustering</a></p> <p>18 0.86667252 <a title="161-lda-18" href="./nips-2004-A_Feature_Selection_Algorithm_Based_on_the_Global_Minimization_of_a_Generalization_Error_Bound.html">3 nips-2004-A Feature Selection Algorithm Based on the Global Minimization of a Generalization Error Bound</a></p> <p>19 0.86527121 <a title="161-lda-19" href="./nips-2004-%E2%84%93%E2%82%80-norm_Minimization_for_Basis_Selection.html">207 nips-2004-ℓ₀-norm Minimization for Basis Selection</a></p> <p>20 0.86523783 <a title="161-lda-20" href="./nips-2004-A_Direct_Formulation_for_Sparse_PCA_Using_Semidefinite_Programming.html">2 nips-2004-A Direct Formulation for Sparse PCA Using Semidefinite Programming</a></p> <br/><br/><br/> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-48522588-1', 'makerhacker.github.io'); ga('send', 'pageview'); </script> </body> </html>
503.917476
28,527
0.772241
717fbb9ca2b406375dfdb2dad766b6a864ed082a
2,317
asm
Assembly
boot/asmhead.asm
TTwotree/AntzOS
1e420858ba398efe866f25b1f8f6aa5088a0d929
[ "MIT" ]
460
2018-08-02T10:02:34.000Z
2022-03-04T09:41:20.000Z
boot/asmhead.asm
TTwotree/AntzOS
1e420858ba398efe866f25b1f8f6aa5088a0d929
[ "MIT" ]
3
2018-12-09T07:09:58.000Z
2019-09-19T06:39:37.000Z
boot/asmhead.asm
TTwotree/AntzOS
1e420858ba398efe866f25b1f8f6aa5088a0d929
[ "MIT" ]
53
2018-10-21T14:10:03.000Z
2022-03-13T08:54:38.000Z
[INSTRSET "i486p"] VBEMODE EQU 0x105 BOTPAK EQU 0x00280000 DSKCAC EQU 0x00100000 DSKCAC0 EQU 0x00008000 ; BOOT_INFO 相关 CYLS EQU 0x0ff0 LEDS EQU 0x0ff1 VMODE EQU 0x0ff2 SCRNX EQU 0x0ff4 SCRNY EQU 0x0ff6 VRAM EQU 0x0ff8 ORG 0xc200 MOV AX,0x9000 MOV ES,AX MOV DI,0 MOV AX,0x4f00 INT 0x10 CMP AX,0x004f JNE scrn320 MOV AX,[ES:DI+4] CMP AX,0x0200 JB scrn320 MOV CX,VBEMODE MOV AX,0x4f01 INT 0x10 CMP AX,0x004f JNE scrn320 CMP BYTE [ES:DI+0x19],8 ;颜色数必须为8 JNE scrn320 CMP BYTE [ES:DI+0x1b],4 JNE scrn320 MOV AX,[ES:DI+0x00] AND AX,0x0080 JZ scrn320 MOV BX,VBEMODE+0x4000 MOV AX,0x4f02 INT 0x10 MOV BYTE [VMODE],8 ;模式 MOV AX,[ES:DI+0x12] MOV [SCRNX],AX MOV AX,[ES:DI+0x14] MOV [SCRNY],AX MOV EAX,[ES:DI+0x28] MOV [VRAM],EAX JMP keystatus scrn320: MOV AL,0x13 MOV AH,0x00 INT 0x10 MOV BYTE [VMODE],8 MOV WORD [SCRNX],320 MOV WORD [SCRNY],200 MOV DWORD [VRAM],0x000a0000 keystatus: MOV AH,0x02 INT 0x16 MOV [LEDS],AL MOV AL,0xff OUT 0x21,AL NOP OUT 0xa1,AL CLI CALL waitkbdout MOV AL,0xd1 OUT 0x64,AL CALL waitkbdout MOV AL,0xdf OUT 0x60,AL CALL waitkbdout [INSTRSET "i486p"] LGDT [GDTR0] ; GDT MOV EAX,CR0 AND EAX,0x7fffffff OR EAX,0x00000001 ; MOV CR0,EAX JMP pipelineflush pipelineflush: MOV AX,1*8 MOV DS,AX MOV ES,AX MOV FS,AX MOV GS,AX MOV SS,AX MOV ESI,bootpack MOV EDI,BOTPAK MOV ECX,512*1024/4 CALL memcpy MOV ESI,0x7c00 MOV EDI,DSKCAC MOV ECX,512/4 CALL memcpy MOV ESI,DSKCAC0+512 MOV EDI,DSKCAC+512 MOV ECX,0 MOV CL,BYTE [CYLS] IMUL ECX,512*18*2/4 SUB ECX,512/4 CALL memcpy MOV EBX,BOTPAK MOV ECX,[EBX+16] ADD ECX,3 SHR ECX,2 JZ skip MOV ESI,[EBX+20] ; 转送源 ADD ESI,EBX MOV EDI,[EBX+12] ; 转送目标 CALL memcpy skip: MOV ESP,[EBX+12] ; 堆栈的初始化 JMP DWORD 2*8:0x0000001b waitkbdout: IN AL,0x64 AND AL,0x02 JNZ waitkbdout RET memcpy: MOV EAX,[ESI] ADD ESI,4 MOV [EDI],EAX ADD EDI,4 SUB ECX,1 JNZ memcpy RET ; memcpy地址前缀大小 ALIGNB 16 GDT0: RESB 8 DW 0xffff,0x0000,0x9200,0x00cf DW 0xffff,0x0000,0x9a28,0x0047 DW 0 GDTR0: DW 8*3-1 DD GDT0 ALIGNB 16 bootpack:
13.874251
36
0.634441
ee2e46ca2dc2941a16e5db5282909a7a651c1571
80
asm
Assembly
data/maps/headers/PewterNidoranHouse.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
1
2022-02-15T00:19:44.000Z
2022-02-15T00:19:44.000Z
data/maps/headers/PewterNidoranHouse.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
data/maps/headers/PewterNidoranHouse.asm
opiter09/ASM-Machina
75d8e457b3e82cc7a99b8e70ada643ab02863ada
[ "CC0-1.0" ]
null
null
null
map_header PewterNidoranHouse, PEWTER_NIDORAN_HOUSE, HOUSE, 0 end_map_header
20
62
0.85
b900e9db83c859e8e2e7d24bb608cefa759b7be7
459
asm
Assembly
programs/oeis/146/A146083.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/146/A146083.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/146/A146083.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A146083: Expansion of 1/(1 - x*(1 - 11*x)). ; 1,1,-10,-21,89,320,-659,-4179,3070,49039,15269,-524160,-692119,5073641,12686950,-43123101,-182679551,291674560,2301149621,-907270539,-26219916370,-16239940441,272179139629,450818484480,-2543152051439,-7502155380719,20472517185110,102996226373019,-122201462663191,-1255159952766400,89056136528701 mov $1,2 mov $2,2 lpb $0 sub $0,1 mul $1,11 sub $2,$1 add $1,$2 lpe sub $1,2 div $1,22 mul $1,11 add $1,1
28.6875
297
0.729847
f3bee1ddaa385f1770c891eb37419cfe6a57bd7d
132
sql
SQL
packaging/dbscripts/upgrade/03_06_0940_drop_vm_dynamic_guest_last_logxxx_time_columns.sql
leongold/ovirt-engine
8b915dab8ad8157849b36b60eb0ca159b1923faf
[ "Apache-2.0" ]
null
null
null
packaging/dbscripts/upgrade/03_06_0940_drop_vm_dynamic_guest_last_logxxx_time_columns.sql
leongold/ovirt-engine
8b915dab8ad8157849b36b60eb0ca159b1923faf
[ "Apache-2.0" ]
null
null
null
packaging/dbscripts/upgrade/03_06_0940_drop_vm_dynamic_guest_last_logxxx_time_columns.sql
leongold/ovirt-engine
8b915dab8ad8157849b36b60eb0ca159b1923faf
[ "Apache-2.0" ]
null
null
null
SELECT fn_db_drop_column('vm_dynamic', 'guest_last_login_time'); SELECT fn_db_drop_column('vm_dynamic', 'guest_last_logout_time');
33
65
0.825758
2314f8ee0fda40bc2ef803b56bd6f773498fc78f
58
rs
Rust
workspace_tests/src/rt_logic.rs
azriel91/choochoo
61835c5c9e9e44d7ca99eba3a3a1c78957186cee
[ "Apache-2.0", "MIT" ]
1
2022-01-17T18:12:00.000Z
2022-01-17T18:12:00.000Z
workspace_tests/src/rt_logic.rs
azriel91/choochoo
61835c5c9e9e44d7ca99eba3a3a1c78957186cee
[ "Apache-2.0", "MIT" ]
30
2020-12-23T07:32:08.000Z
2022-03-13T02:34:38.000Z
workspace_tests/src/rt_logic.rs
azriel91/choochoo
61835c5c9e9e44d7ca99eba3a3a1c78957186cee
[ "Apache-2.0", "MIT" ]
null
null
null
mod integrity_strat; mod train; mod visit_status_updater;
14.5
25
0.844828
f03934ae8a6f4c97b9e55d2ce3b5fe4a8d8e7f9c
1,809
js
JavaScript
controllers/trafficData.js
Ligengxin96/fetchRepooTrafficData
8c38e6a5cc27beff1e48af9248ac21785a1300f2
[ "MIT" ]
null
null
null
controllers/trafficData.js
Ligengxin96/fetchRepooTrafficData
8c38e6a5cc27beff1e48af9248ac21785a1300f2
[ "MIT" ]
null
null
null
controllers/trafficData.js
Ligengxin96/fetchRepooTrafficData
8c38e6a5cc27beff1e48af9248ac21785a1300f2
[ "MIT" ]
null
null
null
import moment from "moment"; export const getRecord = async (date, model) => { if (!model) { throw new Error(`Model can't be null`); } console.log(`Need be get ${model.modelName} record date: ${moment(date).format('yyyy-MM-DD')}`); try { const data = await model.findOne({ date }); if (data) { console.log(`Get ${model.modelName} record successful, ${model.modelName} record info: ${JSON.stringify(data)}`); } return data; } catch (error) { const errorMessage = `Get ${model.modelName} record from mongoose failed with error: ${error.message}`; console.error(errorMessage); } } export const createReocrd = async (data, model) => { if (!model) { throw new Error(`Model can't be null`); } try { console.log(`Need be created ${model.modelName} record date: ${moment(data.date).format('yyyy-MM-DD')}`); const newData = new model(data); await newData.save(); console.log(`Save ${model.modelName} record to mongoose successful, ${model.modelName} record: ${JSON.stringify(newData)}`); } catch (error) { const errorMessage = `Save ${model.modelName} record to mongoose failed with error: ${error.message}`; console.error(errorMessage); } } export const updatReocrd = async (date, data, model) => { if (!model) { throw new Error(`Model can't be null`); } console.log(`Need be updated ${model.modelName} record date: ${moment(date).format('yyyy-MM-DD')}`); try { const newData = await model.findOneAndUpdate({ date }, data, { new: true }); console.log(`Update ${model.modelName} record successful, ${model.modelName} record: ${JSON.stringify(newData)}`); } catch (error) { const errorMessage = `Update ${model.modelName} record failed with error: ${error.message}`; console.error(errorMessage); } }
37.6875
128
0.658928
5b6fe44de96807db91f33645a98426aa909fdf98
67
kt
Kotlin
intellij2checkstyle-core/src/test/kotlin/integration/extension/types/OutputFolder.kt
theodm/intellij2checkstyle
2607e1f9e4f64e7b4e8140c56918ad5d856a62eb
[ "Apache-2.0" ]
null
null
null
intellij2checkstyle-core/src/test/kotlin/integration/extension/types/OutputFolder.kt
theodm/intellij2checkstyle
2607e1f9e4f64e7b4e8140c56918ad5d856a62eb
[ "Apache-2.0" ]
null
null
null
intellij2checkstyle-core/src/test/kotlin/integration/extension/types/OutputFolder.kt
theodm/intellij2checkstyle
2607e1f9e4f64e7b4e8140c56918ad5d856a62eb
[ "Apache-2.0" ]
null
null
null
package integration.extension.types annotation class OutputFolder
16.75
35
0.880597
405fc0a64bd2a08ed23474494053caa8a0b6fbbd
311
py
Python
proxy.py
Raccoonwao/BookGrepper
5223f773629f8c3aad9c8b86df3aeb805cc939a9
[ "Unlicense" ]
null
null
null
proxy.py
Raccoonwao/BookGrepper
5223f773629f8c3aad9c8b86df3aeb805cc939a9
[ "Unlicense" ]
null
null
null
proxy.py
Raccoonwao/BookGrepper
5223f773629f8c3aad9c8b86df3aeb805cc939a9
[ "Unlicense" ]
null
null
null
class Proxy: def __init__(self, host, port): self.host=host self.port=port self.succeed=0 self.fail=0 def markSucceed(self): self.succeed +=1 def markFail(self): self.fail +=1 def __str__(self): return f'http://{self.host}:{self.port}'
19.4375
48
0.55627
e8ed02dac89d480ead9705b1ad919290dfc731c8
934
py
Python
fabfile/text.py
nprapps/austin
45237e878260678bbeb57801e798b89e67ad4e0b
[ "MIT" ]
7
2015-01-26T16:02:49.000Z
2015-04-01T12:37:52.000Z
fabfile/text.py
nprapps/austin
45237e878260678bbeb57801e798b89e67ad4e0b
[ "MIT" ]
272
2015-01-26T16:37:22.000Z
2016-04-04T17:08:55.000Z
fabfile/text.py
nprapps/austin
45237e878260678bbeb57801e798b89e67ad4e0b
[ "MIT" ]
4
2015-03-05T00:38:17.000Z
2021-02-23T10:26:28.000Z
#!/usr/bin/env python """ Commands related to syncing copytext from Google Docs. """ from fabric.api import task from termcolor import colored import app_config from etc.gdocs import GoogleDoc @task(default=True) def update(): """ Downloads a Google Doc as an Excel file. """ if app_config.COPY_GOOGLE_DOC_URL == None: print colored('You have set COPY_GOOGLE_DOC_URL to None. If you want to use a Google Sheet, set COPY_GOOGLE_DOC_URL to the URL of your sheet in app_config.py', 'blue') return else: doc = {} url = app_config.COPY_GOOGLE_DOC_URL if 'key' in url: bits = url.split('key=') bits = bits[1].split('&') doc['key'] = bits[0] else: bits = url.split('/d/') bits = bits[1].split('/') doc['key'] = bits[0] g = GoogleDoc(**doc) g.get_auth() g.get_document()
24.578947
175
0.586724
dd967b2d2273673a2ddee8888af00a5ad0ecb06c
462
go
Go
pkg/xbits/types.go
the-xlang/xxc
a3abddc58e88dbb33955b5670a10f7473fef338d
[ "BSD-3-Clause" ]
1
2022-03-23T19:31:58.000Z
2022-03-23T19:31:58.000Z
pkg/xbits/types.go
the-xlang/xxc
a3abddc58e88dbb33955b5670a10f7473fef338d
[ "BSD-3-Clause" ]
null
null
null
pkg/xbits/types.go
the-xlang/xxc
a3abddc58e88dbb33955b5670a10f7473fef338d
[ "BSD-3-Clause" ]
1
2022-03-26T21:24:20.000Z
2022-03-26T21:24:20.000Z
package xbits import "github.com/the-xlang/xxc/pkg/xtype" // BitsizeType returns bit-size of // data type of specified type code. func BitsizeType(t uint8) int { switch t { case xtype.I8, xtype.U8: return 0b1000 case xtype.I16, xtype.U16: return 0b00010000 case xtype.I32, xtype.U32, xtype.F32: return 0b00100000 case xtype.I64, xtype.U64, xtype.F64: return 0b01000000 case xtype.UInt, xtype.Int: return xtype.BitSize default: return 0 } }
20.086957
43
0.731602
cd61252038cede38877b226d9566c3bbe138f4f3
28,876
sql
SQL
SQL/controleGames_APS_BD_SQL.sql
dsambugaro/APS_BD_1_UTFPR
b7755a67cb71dabbe01179ca2636f1be2163a1ee
[ "MIT" ]
null
null
null
SQL/controleGames_APS_BD_SQL.sql
dsambugaro/APS_BD_1_UTFPR
b7755a67cb71dabbe01179ca2636f1be2163a1ee
[ "MIT" ]
null
null
null
SQL/controleGames_APS_BD_SQL.sql
dsambugaro/APS_BD_1_UTFPR
b7755a67cb71dabbe01179ca2636f1be2163a1ee
[ "MIT" ]
null
null
null
-- ----------------------------------------------------- -- APS Banco de Dados 1 | UTFPR-CM 2017/1 -- Prof.º André Luis Schwerz -- Alunos: Danilo Sambugaro | Rafael Soratto -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema controleGames_APS_BD -- ----------------------------------------------------- DROP SCHEMA IF EXISTS `controleGames_APS_BD` ; -- ----------------------------------------------------- -- Schema controleGames_APS_BD -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `controleGames_APS_BD` DEFAULT CHARACTER SET utf8 ; USE `controleGames_APS_BD` ; -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`PESSOA` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`PESSOA` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`PESSOA` ( `CPF` CHAR(11) NOT NULL, `nome_pessoa` VARCHAR(255) NOT NULL, `data_nasc_pessoa` DATE NOT NULL, PRIMARY KEY (`CPF`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`ESTADO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`ESTADO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`ESTADO` ( `ID` INT AUTO_INCREMENT, `nome` VARCHAR(255) NOT NULL, UNIQUE(`nome`), PRIMARY KEY (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`CIDADE` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`CIDADE` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`CIDADE` ( `ID` INT AUTO_INCREMENT, `nome` VARCHAR(255) NOT NULL, `ESTADO_ID` INT NOT NULL, PRIMARY KEY (`ID`), CONSTRAINT `fk_CIDADE_ESTADO1` FOREIGN KEY (`ESTADO_ID`) REFERENCES `controleGames_APS_BD`.`ESTADO` (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`ENDERECO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`ENDERECO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`ENDERECO` ( `PESSOA_CPF` CHAR(11) NOT NULL, `logradouro` VARCHAR(255) NOT NULL, `nome` VARCHAR(255) NOT NULL, `numero` INT NOT NULL, `bairro` VARCHAR(255) NOT NULL, `CEP` INT NOT NULL, `CIDADE_ID` INT NOT NULL, PRIMARY KEY (`PESSOA_CPF`), CONSTRAINT `fk_ENDERECO_PESSOA` FOREIGN KEY (`PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`PESSOA` (`CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_ENDERECO_CIDADE1` FOREIGN KEY (`CIDADE_ID`) REFERENCES `controleGames_APS_BD`.`CIDADE` (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`USUARIO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`USUARIO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`USUARIO` ( `ID` INT AUTO_INCREMENT, `user` VARCHAR(20) NOT NULL, `senha` VARCHAR(255) NOT NULL, UNIQUE(`user`), PRIMARY KEY (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`CLIENTE` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`CLIENTE` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`CLIENTE` ( `PESSOA_CPF` CHAR(11) NOT NULL, `usuario` INT NOT NULL, `ultima_compra` DATE NULL, `email` VARCHAR(255) NOT NULL, PRIMARY KEY (`PESSOA_CPF`), UNIQUE(`usuario`), CONSTRAINT `fk_CLIENTE_PESSOA1` FOREIGN KEY (`PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`PESSOA` (`CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_CLIENTE_USUARIO` FOREIGN KEY (`usuario`) REFERENCES `controleGames_APS_BD`.`USUARIO` (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`FUNCIONARIO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`FUNCIONARIO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`FUNCIONARIO` ( `cracha` INT NOT NULL AUTO_INCREMENT, `PESSOA_CPF` CHAR(11) NOT NULL, `telefone` CHAR(11), PRIMARY KEY (`PESSOA_CPF`), UNIQUE (`cracha`), CONSTRAINT `fk_FUNCIONARIO_PESSOA1` FOREIGN KEY (`PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`PESSOA` (`CPF`) ON UPDATE CASCADE ON DELETE CASCADE); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`SUPERVISOR` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`SUPERVISOR` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`SUPERVISOR` ( `usuario` INT NOT NULL, `FUNCIONARIO_PESSOA_CPF` CHAR(11) NOT NULL, PRIMARY KEY (`FUNCIONARIO_PESSOA_CPF`), UNIQUE(`usuario`), CONSTRAINT `fk_SUPERVISOR_FUNCIONARIO1` FOREIGN KEY (`FUNCIONARIO_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`FUNCIONARIO` (`PESSOA_CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_SUPERVISOR_USUARIO` FOREIGN KEY (`usuario`) REFERENCES `controleGames_APS_BD`.`USUARIO` (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`FISCALIZADO_POR` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`FISCALIZADO_POR` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`FISCALIZADO_POR` ( `FUNCIONARIO_PESSOA_CPF` CHAR(11) NOT NULL, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF` CHAR(11), PRIMARY KEY (`FUNCIONARIO_PESSOA_CPF`), CONSTRAINT `fk_FISCALIZADO_POR_FUNCIONARIO1` FOREIGN KEY (`FUNCIONARIO_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`FUNCIONARIO` (`PESSOA_CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_FISCALIZADO_POR_SUPERVISOR1` FOREIGN KEY (`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`SUPERVISOR` (`FUNCIONARIO_PESSOA_CPF`) ON UPDATE CASCADE ON DELETE SET NULL); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`EMPRESA` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`EMPRESA` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`EMPRESA` ( `CNPJ` CHAR(14) NOT NULL, `nome` VARCHAR(255) NOT NULL, `telefone` CHAR(11) NULL, PRIMARY KEY (`CNPJ`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`COMPRA` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`COMPRA` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`COMPRA` ( `ID` INT NOT NULL AUTO_INCREMENT, `preco_total` DECIMAL(10,2) NULL, `data` DATE NOT NULL, `EMPRESA_CNPJ` CHAR(14) NOT NULL, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF` CHAR(11) NOT NULL, PRIMARY KEY (`ID`), CONSTRAINT `fk_COMPRA_EMPRESA1` FOREIGN KEY (`EMPRESA_CNPJ`) REFERENCES `controleGames_APS_BD`.`EMPRESA` (`CNPJ`) ON UPDATE CASCADE, CONSTRAINT `fk_COMPRA_SUPERVISOR1` FOREIGN KEY (`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`SUPERVISOR` (`FUNCIONARIO_PESSOA_CPF`) ON UPDATE CASCADE); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`PLATAFORMA` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`PLATAFORMA` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`PLATAFORMA` ( `ID` INT AUTO_INCREMENT, `nome` VARCHAR(20) NOT NULL, UNIQUE(`nome`), PRIMARY KEY (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`GENERO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`GENERO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`GENERO` ( `ID` INT AUTO_INCREMENT, `nome` VARCHAR(20) NOT NULL, UNIQUE(`nome`), PRIMARY KEY (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`JOGO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`JOGO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`JOGO` ( `codigo` INT NOT NULL, `titulo` VARCHAR(255) NOT NULL, `genero` INT NOT NULL, `plataforma` INT NOT NULL, `sinopse` LONGTEXT NULL, `lancamento` DATE NOT NULL, `faixa_etaria` INT NOT NULL, `preco` DECIMAL(10,2) NOT NULL, `qtd_estoque` INT NOT NULL, `EMPRESA_CNPJ` CHAR(14) NOT NULL, PRIMARY KEY (`codigo`), CONSTRAINT `fk_JOGO_EMPRESA1` FOREIGN KEY (`EMPRESA_CNPJ`) REFERENCES `controleGames_APS_BD`.`EMPRESA` (`CNPJ`) ON UPDATE CASCADE, CONSTRAINT `fk_JOGO_PLATAFORMA` FOREIGN KEY (`plataforma`) REFERENCES `controleGames_APS_BD`.`PLATAFORMA` (`ID`), CONSTRAINT `fk_JOGO_GENERO` FOREIGN KEY (`genero`) REFERENCES `controleGames_APS_BD`.`GENERO` (`ID`) ); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`COMPRA_CONTEM` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`COMPRA_CONTEM` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`COMPRA_CONTEM` ( `JOGO_codigo` INT NOT NULL, `COMPRA_ID` INT NOT NULL, `quantidade` INT NOT NULL, `preco_unit` DECIMAL(10,2) NOT NULL, PRIMARY KEY (`JOGO_codigo`, `COMPRA_ID`), CONSTRAINT `fk_JOGO_has_COMPRA_JOGO1` FOREIGN KEY (`JOGO_codigo`) REFERENCES `controleGames_APS_BD`.`JOGO` (`codigo`) ON UPDATE CASCADE, CONSTRAINT `fk_JOGO_has_COMPRA_COMPRA1` FOREIGN KEY (`COMPRA_ID`) REFERENCES `controleGames_APS_BD`.`COMPRA` (`ID`) ON DELETE CASCADE); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` ( `CLIENTE_PESSOA_CPF` CHAR(11) NOT NULL, `JOGO_codigo` INT NOT NULL, `nota` INT NOT NULL, PRIMARY KEY (`CLIENTE_PESSOA_CPF`, `JOGO_codigo`), CONSTRAINT `fk_CLIENTE_has_JOGO_CLIENTE1` FOREIGN KEY (`CLIENTE_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_CLIENTE_has_JOGO_JOGO1` FOREIGN KEY (`JOGO_codigo`) REFERENCES `controleGames_APS_BD`.`JOGO` (`codigo`) ON UPDATE CASCADE ON DELETE CASCADE); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`METODO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`METODO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`METODO` ( `ID` INT AUTO_INCREMENT, `nome` VARCHAR(45) NOT NULL, UNIQUE(`nome`), PRIMARY KEY (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`PEDIDO` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`PEDIDO` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`PEDIDO` ( `ID` INT AUTO_INCREMENT, `frete` DECIMAL(10,2) NULL, `data` DATE NOT NULL, `valor_total` DECIMAL(10,2) NOT NULL, `metodo_pagamento` INT NOT NULL, `CLIENTE_PESSOA_CPF` CHAR(11) NOT NULL, PRIMARY KEY (`ID`), CONSTRAINT `fk_PEDIDO_CLIENTE1` FOREIGN KEY (`CLIENTE_PESSOA_CPF`) REFERENCES `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT `fk_PEDIDO_METODO` FOREIGN KEY (`metodo_pagamento`) REFERENCES `controleGames_APS_BD`.`METODO` (`ID`)); -- ----------------------------------------------------- -- Table `controleGames_APS_BD`.`PEDIDO_CONTEM` -- ----------------------------------------------------- DROP TABLE IF EXISTS `controleGames_APS_BD`.`PEDIDO_CONTEM` ; CREATE TABLE IF NOT EXISTS `controleGames_APS_BD`.`PEDIDO_CONTEM` ( `PEDIDO_ID` INT NOT NULL, `JOGO_codigo` INT NOT NULL, `quantidade` INT NOT NULL, PRIMARY KEY (`PEDIDO_ID`, `JOGO_codigo`), CONSTRAINT `fk_PEDIDO_has_JOGO_PEDIDO1` FOREIGN KEY (`PEDIDO_ID`) REFERENCES `controleGames_APS_BD`.`PEDIDO` (`ID`) ON DELETE CASCADE, CONSTRAINT `fk_PEDIDO_has_JOGO_JOGO1` FOREIGN KEY (`JOGO_codigo`) REFERENCES `controleGames_APS_BD`.`JOGO` (`codigo`) ON UPDATE CASCADE); DELIMITER // CREATE TRIGGER USER_REMOVE_CLIENTE AFTER DELETE ON CLIENTE FOR EACH ROW BEGIN DELETE FROM USUARIO WHERE ID = OLD.usuario; END// CREATE TRIGGER USER_REMOVE_SUPERVISOR AFTER DELETE ON SUPERVISOR FOR EACH ROW BEGIN DELETE FROM USUARIO WHERE ID = OLD.usuario; END// CREATE TRIGGER ATUALIZA_ESTOQUE AFTER INSERT ON PEDIDO_CONTEM FOR EACH ROW BEGIN UPDATE JOGO SET qtd_estoque = (qtd_estoque - NEW.quantidade) WHERE codigo = NEW.JOGO_codigo; END// DELIMITER ; -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`PESSOA` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('78234536494', 'Jurema Romana', '1997-02-15'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('11736653660', 'João Camara', '1990-12-07'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('52867465435', 'Antonio Fernandes', '1999-03-17'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('73314993510', 'Mairieli Wessel', '1995-06-02'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('12345567898', 'Marcos Antonio Godoy', '1995-06-02'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('56380781188', 'Bruno Mendes Souza', '1996-05-15'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('54560161330', 'Darlan Felipe', '1998-09-11'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('54651643108', 'Lucas Henrique', '1989-08-30'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('12490072323', 'Michel Gomes', '2000-02-28'); INSERT INTO `controleGames_APS_BD`.`PESSOA` (`CPF`, `nome_pessoa`, `data_nasc_pessoa`) VALUES ('90146845170', 'Mohammed Lee', '1995-01-18'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`ESTADO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`ESTADO` (`nome`) VALUES ('Parana'); INSERT INTO `controleGames_APS_BD`.`ESTADO` (`nome`) VALUES ('Santa Catarina'); INSERT INTO `controleGames_APS_BD`.`ESTADO` (`nome`) VALUES ('Sao Paulo'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`CIDADE` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`CIDADE` (`nome`, `ESTADO_ID`) VALUES ('Campo Mourao', 1); INSERT INTO `controleGames_APS_BD`.`CIDADE` (`nome`, `ESTADO_ID`) VALUES ('Maringa', 1); INSERT INTO `controleGames_APS_BD`.`CIDADE` (`nome`, `ESTADO_ID`) VALUES ('Jundiai', 3); INSERT INTO `controleGames_APS_BD`.`CIDADE` (`nome`, `ESTADO_ID`) VALUES ('Florianopolis', 2); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`ENDERECO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('78234536494', 'Rua', 'Palmeira', 59, 'Arvoredo', 98765400, 1); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('11736653660', 'Avenida', 'Capitao Indio Bandeira', 829, 'Centro', 87359005, 1); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('52867465435', 'Praca', 'Constantinopla', 42, 'Prometheus', 78694200, 2); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('73314993510', 'Rua', 'Capoeira', 489, 'Centro', 87298489, 3); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('12345567898', 'Avenida', '29 de Novembro', 1580, 'Centro', 87260278, 4); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('56380781188', 'Rua', 'Pombo', 125, 'Floriano das Neves', 12978942, 3); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('54651643108', 'Praca', 'João Alvarez', 1470, 'Centro', 12345678, 4); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('12490072323', 'Avenida', 'Iamar J. Santos', 375, 'Ocarina', 78945612, 2); INSERT INTO `controleGames_APS_BD`.`ENDERECO` (`PESSOA_CPF`, `logradouro`, `nome`, `numero`, `bairro`, `CEP`, `CIDADE_ID`) VALUES ('90146845170', 'Rua', 'José Borges', 441, 'Centro', 35715982, 1); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`USUARIO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('romana', '53e6086284353cb73d4979f08537d950'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('camaraJose', '5527af1a9848339f9d78e74b4b7472c3'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('demonioDaGaroa', 'bbc667e139476e37b5f5bd3d35b6ec6b'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('mWessel', '908d3f20d1d1473fb16bd7599cf47928'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('Godoy', '54ad4196220b983a194b7a22d9f68b23'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('mlee', 'cb17bd2285f26466a477579632350588'); INSERT INTO `controleGames_APS_BD`.`USUARIO` (`user`, `senha`) VALUES ('sup42', 'cb17bd2285f26466a477579632350588'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`CLIENTE` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`, `usuario`, `ultima_compra`, `email`) VALUES ('78234536494', 1, '2017-02-15', 'jurema@romana.com'); INSERT INTO `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`, `usuario`, `ultima_compra`, `email`) VALUES ('11736653660', 2,'2015-10-07', 'jose@camara.com'); INSERT INTO `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`, `usuario`, `ultima_compra`, `email`) VALUES ('52867465435', 3,'2017-01-20', 'fernandes@gmail.com'); INSERT INTO `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`, `usuario`, `ultima_compra`, `email`) VALUES ('73314993510', 4, '2010-05-15', 'mwessel@gmail.com'); INSERT INTO `controleGames_APS_BD`.`CLIENTE` (`PESSOA_CPF`, `usuario`, `ultima_compra`, `email`) VALUES ('12345567898', 5, '2016-12-02', 'godoy2017@hotmail.com'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`FUNCIONARIO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`FUNCIONARIO` (`cracha`, `PESSOA_CPF`) VALUES (12, '56380781188'); INSERT INTO `controleGames_APS_BD`.`FUNCIONARIO` (`cracha`, `PESSOA_CPF`) VALUES (23, '54560161330'); INSERT INTO `controleGames_APS_BD`.`FUNCIONARIO` (`cracha`, `PESSOA_CPF`) VALUES (34, '54651643108'); INSERT INTO `controleGames_APS_BD`.`FUNCIONARIO` (`cracha`, `PESSOA_CPF`) VALUES (45, '12490072323'); INSERT INTO `controleGames_APS_BD`.`FUNCIONARIO` (`cracha`, `PESSOA_CPF`) VALUES (56, '90146845170'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`SUPERVISOR` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`SUPERVISOR` (`usuario`, `FUNCIONARIO_PESSOA_CPF`) VALUES (6, '90146845170'); INSERT INTO `controleGames_APS_BD`.`SUPERVISOR` (`usuario`, `FUNCIONARIO_PESSOA_CPF`) VALUES (7, '12490072323'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`FISCALIZADO_POR` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`FISCALIZADO_POR` (`FUNCIONARIO_PESSOA_CPF`,`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES ('56380781188','90146845170'); INSERT INTO `controleGames_APS_BD`.`FISCALIZADO_POR` (`FUNCIONARIO_PESSOA_CPF`,`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES ('54560161330','12490072323'); INSERT INTO `controleGames_APS_BD`.`FISCALIZADO_POR` (`FUNCIONARIO_PESSOA_CPF`,`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES ('54651643108','12490072323'); INSERT INTO `controleGames_APS_BD`.`FISCALIZADO_POR` (`FUNCIONARIO_PESSOA_CPF`,`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES ('12490072323','90146845170'); INSERT INTO `controleGames_APS_BD`.`FISCALIZADO_POR` (`FUNCIONARIO_PESSOA_CPF`,`SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES ('90146845170', NULL); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`EMPRESA` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`EMPRESA` (`CNPJ`, `nome`, `telefone`) VALUES ('27082686000163', 'RockStar', '55121345678'); INSERT INTO `controleGames_APS_BD`.`EMPRESA` (`CNPJ`, `nome`, `telefone`) VALUES ('93111580000175', 'Activision Blizzard', '11258369458'); INSERT INTO `controleGames_APS_BD`.`EMPRESA` (`CNPJ`, `nome`, `telefone`) VALUES ('38644428000140', 'Ubisoft', '99123789654'); INSERT INTO `controleGames_APS_BD`.`EMPRESA` (`CNPJ`, `nome`, `telefone`) VALUES ('47462545000183', 'Nintendo', '21258741369'); INSERT INTO `controleGames_APS_BD`.`EMPRESA` (`CNPJ`, `nome`, `telefone`) VALUES ('62313357000187', 'Eletronic Arts', '12365478955'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`COMPRA` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`COMPRA` (`preco_total`, `data`, `EMPRESA_CNPJ`, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES (613.9, '2016-11-25', '47462545000183', '90146845170'); INSERT INTO `controleGames_APS_BD`.`COMPRA` (`preco_total`, `data`, `EMPRESA_CNPJ`, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES (1513.5, '2016-12-29', '38644428000140', '90146845170'); INSERT INTO `controleGames_APS_BD`.`COMPRA` (`preco_total`, `data`, `EMPRESA_CNPJ`, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES (300.0, '2017-01-25', '62313357000187', '90146845170'); INSERT INTO `controleGames_APS_BD`.`COMPRA` (`preco_total`, `data`, `EMPRESA_CNPJ`, `SUPERVISOR_FUNCIONARIO_PESSOA_CPF`) VALUES (329.5, '2017-02-17', '93111580000175', '90146845170'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`PLATAFORMA` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`PLATAFORMA` (`nome`) VALUES ('Wii'); INSERT INTO `controleGames_APS_BD`.`PLATAFORMA` (`nome`) VALUES ('Xbox'); INSERT INTO `controleGames_APS_BD`.`PLATAFORMA` (`nome`) VALUES ('PC'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`METODO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`METODO` (`nome`) VALUES ('Boleto'); INSERT INTO `controleGames_APS_BD`.`METODO` (`nome`) VALUES ('Depósito Bancário'); INSERT INTO `controleGames_APS_BD`.`METODO` (`nome`) VALUES ('Cartão de Crédito'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`GENERO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`GENERO` (`nome`) VALUES ('Plataforma'); INSERT INTO `controleGames_APS_BD`.`GENERO` (`nome`) VALUES ('FPS'); INSERT INTO `controleGames_APS_BD`.`GENERO` (`nome`) VALUES ('Corrida'); INSERT INTO `controleGames_APS_BD`.`GENERO` (`nome`) VALUES ('Ação'); INSERT INTO `controleGames_APS_BD`.`GENERO` (`nome`) VALUES ('Aventura'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`JOGO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`JOGO` (`codigo`, `titulo`, `genero`, `plataforma`, `sinopse`, `lancamento`, `faixa_etaria`, `preco`, `qtd_estoque`, `EMPRESA_CNPJ`) VALUES (4589, 'Super Mario', 1, 1, 'Super Mario Bros. é um jogo eletrônico lançado pela Nintendo em 1985. Considerado um clássico, Super Mario Bros. foi um dos primeiros JOGO de plataforma com rolagem lateral, recurso conhecido em inglês como side-scrolling', '2006-12-25', 0, 60.0, 5, '47462545000183'); INSERT INTO `controleGames_APS_BD`.`JOGO` (`codigo`, `titulo`, `genero`, `plataforma`, `sinopse`, `lancamento`, `faixa_etaria`, `preco`, `qtd_estoque`, `EMPRESA_CNPJ`) VALUES (7894, 'Call of Duty: Infite Warface', 2, 2, 'Call of Duty (frequentemente abreviado como CoD) é uma série de videoJOGO na primeira pessoa. A série começou no PC, mais tarde expandindo-se para os vários tipos de consolas. Também foram lançados vários JOGO spin-off. ', '2003-11-04', 16, 95.9, 5, '93111580000175'); INSERT INTO `controleGames_APS_BD`.`JOGO` (`codigo`, `titulo`, `genero`, `plataforma`, `sinopse`, `lancamento`, `faixa_etaria`, `preco`, `qtd_estoque`, `EMPRESA_CNPJ`) VALUES (1549, 'Need For Speed', 3, 3, 'Need for Speed é um jogo eletrônico de corrida que foi produzido pelo estúdio Ghost Games e lançado pela Electronic Arts para as plataformas PlayStation 4, Xbox One e para Microsoft Windows. O game, que possui uma jogabilidade não linear dá ao jogador a liberdade de explorar totalmente os cenários, é o vigésimo primeiro da franquia Need for Speed, sendo, porém, um reboot a esta popular série.', '2015-11-03', 12, 90.0, 5, '62313357000187'); INSERT INTO `controleGames_APS_BD`.`JOGO` (`codigo`, `titulo`, `genero`, `plataforma`, `sinopse`, `lancamento`, `faixa_etaria`, `preco`, `qtd_estoque`, `EMPRESA_CNPJ`) VALUES (1548, 'Far Cry Primal', 4, 3, 'Far Cry Primal é um videojogo de ação-aventura na primeira pessoa desenvolvido pela Ubisoft Montreal com a assistência de Ubisoft Toronto, Ubisoft Kiev e Ubisoft Shanghai e publicado pela Ubisoft.', '2016-03-01', 18, 165.0, 5, '38644428000140'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`COMPRA_CONTEM` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`COMPRA_CONTEM` (`JOGO_codigo`, `COMPRA_ID`, `quantidade`, `preco_unit`) VALUES (4589, 1, 15, 40.9); INSERT INTO `controleGames_APS_BD`.`COMPRA_CONTEM` (`JOGO_codigo`, `COMPRA_ID`, `quantidade`, `preco_unit`) VALUES (1548, 2, 15, 120.9); INSERT INTO `controleGames_APS_BD`.`COMPRA_CONTEM` (`JOGO_codigo`, `COMPRA_ID`, `quantidade`, `preco_unit`) VALUES (1549, 3, 5, 60); INSERT INTO `controleGames_APS_BD`.`COMPRA_CONTEM` (`JOGO_codigo`, `COMPRA_ID`, `quantidade`, `preco_unit`) VALUES (7894, 4, 5, 65.9); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` (`CLIENTE_PESSOA_CPF`, `JOGO_codigo`, `nota`) VALUES ('78234536494', 1548, 5); INSERT INTO `controleGames_APS_BD`.`CLIENTE_AVALIACAO_JOGO` (`CLIENTE_PESSOA_CPF`, `JOGO_codigo`, `nota`) VALUES ('73314993510', 4589, 3); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`PEDIDO` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`PEDIDO` (`frete`, `data`, `valor_total`, `metodo_pagamento`, `CLIENTE_PESSOA_CPF`) VALUES (12.90, '2017-01-25', 72.90, 1, '73314993510'); INSERT INTO `controleGames_APS_BD`.`PEDIDO` (`frete`, `data`, `valor_total`, `metodo_pagamento`, `CLIENTE_PESSOA_CPF`) VALUES (15.60, '2016-12-11', 345.60, 2, '52867465435'); -- ----------------------------------------------------- -- Data for table `controleGames_APS_BD`.`PEDIDO_CONTEM` -- ----------------------------------------------------- INSERT INTO `controleGames_APS_BD`.`PEDIDO_CONTEM` (`PEDIDO_ID`, `JOGO_codigo`, `quantidade`) VALUES (1, 4589, 1); INSERT INTO `controleGames_APS_BD`.`PEDIDO_CONTEM` (`PEDIDO_ID`, `JOGO_codigo`, `quantidade`) VALUES (2, 1548, 2);
49.786207
650
0.616463
16c0767dc5bf700ff0adeb4aabb64b71f01d29c0
2,229
ts
TypeScript
webapp/src/scenes/PreloadScene.ts
torives/poker-updater-demo
0a7be9e53ab3bd973296ced0561bbbd1a9dd1493
[ "Apache-2.0" ]
12
2021-06-30T17:04:00.000Z
2022-03-11T18:34:51.000Z
webapp/src/scenes/PreloadScene.ts
torives/poker-updater-demo
0a7be9e53ab3bd973296ced0561bbbd1a9dd1493
[ "Apache-2.0" ]
9
2021-06-29T06:45:44.000Z
2022-02-11T23:26:13.000Z
webapp/src/scenes/PreloadScene.ts
torives/poker-updater-demo
0a7be9e53ab3bd973296ced0561bbbd1a9dd1493
[ "Apache-2.0" ]
1
2022-01-07T12:03:19.000Z
2022-01-07T12:03:19.000Z
import { Howl } from "howler"; import { AudioManager } from "../AudioManager"; import { GameConstants } from "../GameConstants"; import { GameManager } from "../GameManager"; import { GameVars } from "../GameVars"; export class PreloadScene extends Phaser.Scene { public static currentInstance: PreloadScene; private progressBar: Phaser.GameObjects.Graphics; constructor() { super("PreloadScene"); PreloadScene.currentInstance = this; } public preload(): void { GameVars.currentScene = this; this.composeScene(); this.loadAssets(); } public create(): void { GameManager.setCurrentScene(this); this.loadHowl(); } public loadAssets(): void { this.load.html("raiseform", "assets/raiseform.html"); this.load.image("bg", "assets/bg.png"); this.load.atlas("texture_atlas_1", "assets/texture_atlas_1.png", "assets/texture_atlas_1.json"); this.load.atlas("texture_atlas_2", "assets/texture_atlas_2.png", "assets/texture_atlas_2.json"); this.load.json("audiosprite", "assets/audio/audiosprite.json"); this.load.html("input-text", "assets/dom/inputText.html"); this.load.on("progress", this.updateLoadedPercentage, this); } private updateLoadedPercentage(percentageLoaded: number): void { // los valores del porcentaje cargado disminuyen por algun bug if (this.progressBar.scaleX < percentageLoaded) { this.progressBar.scaleX = percentageLoaded; } } private composeScene(): void { this.progressBar = this.add.graphics(); this.progressBar.fillStyle(0xFFFFFF); this.progressBar.fillRect(0, GameConstants.GAME_HEIGHT - 10, GameConstants.GAME_WIDTH, 10); this.progressBar.scaleX = 0; } private loadHowl(): void { let json = this.cache.json.get("audiosprite"); json = JSON.parse(JSON.stringify(json).replace("urls", "src")); AudioManager.sound = new Howl(json); AudioManager.sound.on("load", function (): void { GameManager.onGameAssetsLoaded(); PreloadScene.currentInstance.scene.setVisible(false); }); } }
27.518519
104
0.645581
7e9d0be37d6e550de74c59f9a97b98ac20771f2b
346
sql
SQL
am-lib/src/main/resources/db/migration/V9__Add_Access_Management_Type_To_Roles_Table.sql
hmcts/am-lib
5851a157a443e9b7887dbcf4b3d749e66fcad15f
[ "MIT" ]
null
null
null
am-lib/src/main/resources/db/migration/V9__Add_Access_Management_Type_To_Roles_Table.sql
hmcts/am-lib
5851a157a443e9b7887dbcf4b3d749e66fcad15f
[ "MIT" ]
568
2019-01-29T10:46:39.000Z
2021-05-14T05:21:13.000Z
am-lib/src/main/resources/db/migration/V9__Add_Access_Management_Type_To_Roles_Table.sql
hmcts/am-lib
5851a157a443e9b7887dbcf4b3d749e66fcad15f
[ "MIT" ]
3
2019-02-04T15:53:20.000Z
2021-04-10T22:38:45.000Z
CREATE TYPE ACCESS_TYPE AS enum ('ROLE_BASED', 'EXPLICIT'); CREATE TYPE ROLE_TYPE AS enum ('IDAM', 'RESOURCE'); ALTER TABLE roles ADD COLUMN access_management_type ACCESS_TYPE NOT NULL; ALTER TABLE roles ALTER COLUMN role_type TYPE ROLE_TYPE USING role_type::ROLE_TYPE; ALTER TYPE SECURITYCLASSIFICATION RENAME TO SECURITY_CLASSIFICATION;
31.454545
68
0.806358
2f66ee7857473ec0473c13962f2c422cc610ee4c
6,861
php
PHP
application/libraries/MY_Table.php
pandigresik/easyHRIS
e28cbf802112920ba304b28df22d11350f510772
[ "MIT" ]
1
2021-03-14T02:50:49.000Z
2021-03-14T02:50:49.000Z
application/libraries/MY_Table.php
pandigresik/message_manager
a99f3907af217df9b420317c0a5bdce7025aa282
[ "MIT" ]
null
null
null
application/libraries/MY_Table.php
pandigresik/message_manager
a99f3907af217df9b420317c0a5bdce7025aa282
[ "MIT" ]
1
2020-05-03T21:33:11.000Z
2020-05-03T21:33:11.000Z
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } class MY_Table extends CI_Table { public $extra_columns = array(); public $extra_header = array(); public $key_record = array(); public $hiddenField = []; public $withNumber = true; private $startNumber = 1; public function __construct(array $config = array()) { parent::__construct($config); } // -------------------------------------------------------------------- /** * Generate the table. * * @param mixed $table_data * * @return string */ public function generate($table_data = null) { // The table data can optionally be passed to this function // either as a database result object or an array if (!empty($table_data)) { if ($table_data instanceof CI_DB_result) { $this->_set_from_db_result($table_data); } elseif (is_array($table_data)) { $this->_set_from_array($table_data); } } // Is there anything to display? No? Smite them! if (empty($this->heading) && empty($this->rows)) { return 'Undefined table data'; } // Compile and validate the template date $this->_compile_template(); // Validate a possibly existing custom cell manipulation function if (isset($this->function) && !is_callable($this->function)) { $this->function = null; } // Build the table! $out = $this->template['table_open'].$this->newline; // Add any caption here if ($this->caption) { $out .= '<caption>'.$this->caption.'</caption>'.$this->newline; } // Is there a table heading to display? if (!empty($this->heading)) { if(!empty($this->extra_columns)){ $this->extra_header = empty($this->extra_header) ? [['data' => 'Aksi', 'rowspan' => count($this->heading)]] : $this->extra_header; } if(!empty($this->extra_header)){ foreach($this->extra_header as $_extra_header){ array_push($this->heading[0],$_extra_header); } } if ($this->withNumber) { array_unshift($this->heading[0], ['data' => 'No', 'rowspan' => count($this->heading)]); } $out .= $this->template['thead_open'].$this->newline; foreach ($this->heading as $headings) { $out .= $this->template['heading_row_start'].$this->newline; foreach ($headings as $heading) { $temp = $this->template['heading_cell_start']; foreach ($heading as $key => $val) { if ($key !== 'data') { $temp = str_replace('<th', '<th '.$key.'="'.$val.'"', $temp); } } $out .= $temp.(isset($heading['data']) ? $heading['data'] : '').$this->template['heading_cell_end']; } $out .= $this->template['heading_row_end'].$this->newline; } $out .= $this->template['thead_close'].$this->newline; } // Build the table rows if (!empty($this->rows)) { $out .= $this->template['tbody_open'].$this->newline; $i = 1; foreach ($this->rows as $row) { if (!is_array($row)) { break; } // We use modulus to alternate the row colors $name = fmod($i++, 2) ? '' : 'alt_'; if (!empty($this->key_record)) { $tmp_key = array(); foreach ($this->key_record as $_v) { $tmp_key[$_v] = $row[$_v]['data']; } $out .= substr($this->template['row_'.$name.'start'], 0, strlen($this->template['row_'.$name.'start']) - 1).' data-key=\''.json_encode($tmp_key).'\'>'.$this->newline; } else { $out .= $this->template['row_'.$name.'start'].$this->newline; } if (!empty($this->extra_columns)) { $row = array_merge($row, $this->extra_columns); } if ($this->withNumber) { array_unshift($row, ['data' => $this->startNumber]); ++$this->startNumber; } foreach ($row as $indexCell => $cell) { $temp = $this->template['cell_'.$name.'start']; if (!empty($this->hiddenField)) { if (in_array($indexCell, $this->hiddenField)) { if (!empty($indexCell)) { continue; } //die(); } } foreach ($cell as $key => $val) { if ($key !== 'data') { $temp = str_replace('<td', '<td '.$key.'="'.$val.'"', $temp); } } $cell = isset($cell['data']) ? $cell['data'] : ''; $out .= $temp; if ($cell === '' or $cell === null) { $out .= $this->empty_cells; } elseif (isset($this->function)) { $out .= call_user_func($this->function, $indexCell, $cell); } else { $out .= $cell; } $out .= $this->template['cell_'.$name.'end']; } $out .= $this->template['row_'.$name.'end'].$this->newline; } $out .= $this->template['tbody_close'].$this->newline; } $out .= $this->template['table_close']; // Clear table class properties before generating the table $this->clear(); return $out; } public function setStartNumber($number) { $this->startNumber = $number; } private function is_multi_array($arr) { rsort($arr); return isset($arr[0]) && is_array($arr[0]); } /** * Set the value of withNumber. * * @return self */ public function setWithNumber($withNumber) { $this->withNumber = $withNumber; } /** * Get the value of hiddenField. */ public function getHiddenField() { return $this->hiddenField; } /** * Set the value of hiddenField. * * @return self */ public function setHiddenField($hiddenField) { $this->hiddenField = $hiddenField; } }
32.363208
186
0.445416
fe51a6b80a5cd727c4772649f5a118817a3329dd
781
c
C
Kelas/kumpulansoalaplro2020/src/34_DNAKambing.c
Reylyer/Alpro-A1
ce96a87fffc68cd23afbaff332b1895578530eb5
[ "Unlicense" ]
null
null
null
Kelas/kumpulansoalaplro2020/src/34_DNAKambing.c
Reylyer/Alpro-A1
ce96a87fffc68cd23afbaff332b1895578530eb5
[ "Unlicense" ]
null
null
null
Kelas/kumpulansoalaplro2020/src/34_DNAKambing.c
Reylyer/Alpro-A1
ce96a87fffc68cd23afbaff332b1895578530eb5
[ "Unlicense" ]
null
null
null
/* * Nama Program : 34_DNAKambing.c * Deskripsi : menghitung relasi saudara dan tidak saudara dari kumpulan DNA kambing * Nama : Givandra Haikal Adjie - 24060121130063 * Tanggal : 29, Maret 2022 **/ #include <stdio.h> int main(){ // kamus int N; int i; int j; int nS=0; int ntS=0; int *T; // Algoritma //input scanf("%d", &N); //proses if(N <= 0) printf("N harus positif"); else{ T = (int*) malloc(N * sizeof *T); for(i = 0; i < N; i++) scanf("%d", T + i); for(i = 0; i < N; i++){ for(j = i+1; j < N; j++){ if(T[j] - T[i] < 3) nS++; else ntS++; } } printf("%d %d", nS, ntS); } return 0; }
21.108108
89
0.440461
4e3dc2f31ce7eae2252d27a9792f68eb67bb7853
409
swift
Swift
BoxOffice+ReactorKit/BoxOffice+ReactorKit/Sources/Views/DetailTableViewCellReactor.swift
haeseoklee/BoxOffice-ReactorKit
33462cc9d495999bd2e0b3b7018f40269d0d5dec
[ "MIT" ]
null
null
null
BoxOffice+ReactorKit/BoxOffice+ReactorKit/Sources/Views/DetailTableViewCellReactor.swift
haeseoklee/BoxOffice-ReactorKit
33462cc9d495999bd2e0b3b7018f40269d0d5dec
[ "MIT" ]
11
2022-01-16T07:43:00.000Z
2022-01-24T12:04:56.000Z
BoxOffice+ReactorKit/BoxOffice+ReactorKit/Sources/Views/DetailTableViewCellReactor.swift
haeseoklee/BoxOffice-ReactorKit
33462cc9d495999bd2e0b3b7018f40269d0d5dec
[ "MIT" ]
null
null
null
// // BoxOfficeDetailTableViewCellReactor.swift // BoxOffice+ReactorKit // // Created by Haeseok Lee on 2022/01/13. // import Foundation import ReactorKit final class DetailTableViewCellReactor: Reactor { // Action typealias Action = NoAction // Properties let initialState: Comment // Functions init(comment: Comment) { self.initialState = comment } }
17.041667
49
0.669927
dd756fe3c9531932c7420528b2c053f99b681215
191
php
PHP
core/controllers/ConsoleController.php
wwb382899012/yii2-amqp
e749e55d5f6de4ecd14b6ff7bff16c806067d37c
[ "BSD-3-Clause" ]
null
null
null
core/controllers/ConsoleController.php
wwb382899012/yii2-amqp
e749e55d5f6de4ecd14b6ff7bff16c806067d37c
[ "BSD-3-Clause" ]
null
null
null
core/controllers/ConsoleController.php
wwb382899012/yii2-amqp
e749e55d5f6de4ecd14b6ff7bff16c806067d37c
[ "BSD-3-Clause" ]
null
null
null
<?php /** * Created by PhpStorm. * User: wenwb * Date: 2019/8/6 * Time: 16:32 */ namespace core\controllers; use yii\console\Controller; class ConsoleController extends controller{ }
12.733333
43
0.696335
5d643a7af7f0abeb1330f79d8ae4e5f2f871ff01
2,151
kt
Kotlin
MVVMArchitectureLiveDataRetrofitPaging/app/src/main/java/com/samruddhi/mvvmarchitecturelivedataretrofitpaging/RestaurantsAdapter.kt
MuralikrishnaGS/Android-Jetpack-Components
9bbd4118630966ec6cee9cf8b77bc24840e43065
[ "MIT" ]
null
null
null
MVVMArchitectureLiveDataRetrofitPaging/app/src/main/java/com/samruddhi/mvvmarchitecturelivedataretrofitpaging/RestaurantsAdapter.kt
MuralikrishnaGS/Android-Jetpack-Components
9bbd4118630966ec6cee9cf8b77bc24840e43065
[ "MIT" ]
null
null
null
MVVMArchitectureLiveDataRetrofitPaging/app/src/main/java/com/samruddhi/mvvmarchitecturelivedataretrofitpaging/RestaurantsAdapter.kt
MuralikrishnaGS/Android-Jetpack-Components
9bbd4118630966ec6cee9cf8b77bc24840e43065
[ "MIT" ]
null
null
null
package com.samruddhi.mvvmarchitecturelivedataretrofitpaging import android.annotation.SuppressLint import android.content.Context import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.ImageView import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.bumptech.glide.Glide import com.samruddhi.mvvmarchitecturelivedataretrofitpaging.model.RestaurantsDataList class RestaurantsAdapter : RecyclerView.Adapter<RestaurantsAdapter.ViewHolder>() { private var restaurantsList = mutableListOf<RestaurantsDataList>() private var mContext: Context? = null fun setAllRestaurantsNearBy(restaurantsDataList: List<RestaurantsDataList>, context: Context) { this.restaurantsList = restaurantsDataList.toMutableList() this.mContext = context notifyDataSetChanged() } override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder { val inflater = LayoutInflater.from(parent.context) val view: View = inflater.inflate(R.layout.adapter_restaurants, parent, false) return ViewHolder(view) } @SuppressLint("SetTextI18n") override fun onBindViewHolder(holder: ViewHolder, position: Int) { val restaurantsDataList = restaurantsList[position] val restaurants = restaurantsDataList.restaurant holder.name.text = restaurants.name holder.timings.text = "Store Timings: " + restaurants.timings holder.costForTwo.text = "Avg Cost for Two: ${mContext!!.getString(R.string.rupee_symbol)}${restaurants.average_cost_for_two}" Glide.with(holder.itemView.context).load(restaurants.thumb).into(holder.imageView) } inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) { var name: TextView = view.findViewById(R.id.name) var timings: TextView = view.findViewById(R.id.timings) var costForTwo: TextView = view.findViewById(R.id.cost_for_two) var imageView: ImageView = view.findViewById(R.id.image_view) } override fun getItemCount(): Int { return restaurantsList.size } }
42.176471
134
0.753138
1d58d024e268e51a4225982882823877ae55db86
2,290
swift
Swift
Application/Application/Recent/View/RecentImageView.swift
utrpanic/funjcam-ios
5b5855ae8d4b287b10fd837d4d6bca2068074277
[ "MIT" ]
null
null
null
Application/Application/Recent/View/RecentImageView.swift
utrpanic/funjcam-ios
5b5855ae8d4b287b10fd837d4d6bca2068074277
[ "MIT" ]
null
null
null
Application/Application/Recent/View/RecentImageView.swift
utrpanic/funjcam-ios
5b5855ae8d4b287b10fd837d4d6bca2068074277
[ "MIT" ]
null
null
null
import UIKit import Entity import TinyConstraints final class RecentImageCell: UICollectionViewListCell { private weak var imageView: UIImageView? private weak var nameLabel: UILabel? private weak var fileNameLabel: UILabel? override init(frame: CGRect) { super.init(frame: frame) self.setupSubview() } required init?(coder: NSCoder) { super.init(coder: coder) self.setupSubview() } override func preferredLayoutAttributesFitting(_ layoutAttributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes { let preferredHeight = CGFloat(176) let targetSize = CGSize(width: layoutAttributes.frame.width, height: preferredHeight) layoutAttributes.frame.size = self.contentView.systemLayoutSizeFitting(targetSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) return layoutAttributes } private func setupSubview() { let imageView = UIImageView() imageView.contentMode = .scaleToFill self.contentView.addSubview(imageView) imageView.edgesToSuperview(excluding: [.trailing]) imageView.width(88) imageView.height(176) self.imageView = imageView let containerView = UIView() self.contentView.addSubview(containerView) containerView.leadingToTrailing(of: imageView, offset: 16) containerView.trailingToSuperview(offset: 16) containerView.centerYToSuperview() let nameLabel = UILabel() nameLabel.font = UIFont.preferredFont(forTextStyle: .title1) nameLabel.textColor = Resource.color("textPrimary") containerView.addSubview(nameLabel) nameLabel.edgesToSuperview(excluding: [.bottom]) self.nameLabel = nameLabel let fileNameLabel = UILabel() fileNameLabel.font = UIFont.preferredFont(forTextStyle: .title2) fileNameLabel.textColor = Resource.color("textSecondary") containerView.addSubview(fileNameLabel) fileNameLabel.edgesToSuperview(excluding: [.top]) fileNameLabel.topToBottom(of: nameLabel, offset: 8) self.fileNameLabel = fileNameLabel } func configure(with image: RecentImage) { self.nameLabel?.text = image.name self.fileNameLabel?.text = image.url?.lastPathComponent self.imageView?.setImage(url: image.url, placeholder: nil, completion: nil) } }
36.935484
172
0.757642
dbbd7f0b5a59721a6a1d3d80b4236659d3130fca
763
asm
Assembly
oeis/345/A345094.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/345/A345094.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/345/A345094.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A345094: a(n) = Sum_{k=1..n} floor(n/k)^(floor(n/k) - 1). ; Submitted by Christian Krause ; 1,3,11,68,630,7790,117664,2097224,43046801,1000000643,25937425245,743008378547,23298085130341,793714773371879,29192926025508929,1152921504608944840,48661191875668966346,2185911559738739586562,104127350297911284587436,5242880000000001000008492,278218429446951549637314774,15519448971100888998512394048,907846434775996175432678104306,55572324035428505186121405177606,3552713678800500929356364348366969,236773830007967588876818463025697515,16423203268260658146231491098837433005 add $0,1 mov $5,$0 lpb $0 mov $3,$2 mov $4,$0 cmp $4,0 add $0,$4 mov $2,$5 div $2,$0 sub $0,1 sub $2,1 cmp $3,0 add $3,$2 pow $3,$2 add $1,$3 div $2,$1 lpe mov $0,$1
33.173913
477
0.777195
85a8d16575491d98e95de7a74f5212ff840a5348
25,743
js
JavaScript
presentation/index.js
chrisco255/deus
6b5df6c4265f42efc5c73cd9770f0896b7cc29e2
[ "MIT" ]
null
null
null
presentation/index.js
chrisco255/deus
6b5df6c4265f42efc5c73cd9770f0896b7cc29e2
[ "MIT" ]
null
null
null
presentation/index.js
chrisco255/deus
6b5df6c4265f42efc5c73cd9770f0896b7cc29e2
[ "MIT" ]
null
null
null
// Import React import React from "react"; // Import Spectacle Core tags import { BlockQuote, Cite, Deck, Heading, ListItem, List, Quote, Fill, Slide, Text, Table, TableRow, TableHeaderItem, TableItem, TableHeader, TableBody, CodePane, Image, Layout, Fit } from "spectacle"; import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, Text as ChartText, ResponsiveContainer } from 'recharts'; import { Timeline, TimelineEvent } from 'react-event-timeline'; // Import image preloader util import preloader from "spectacle/lib/utils/preloader"; // Import theme import createTheme from "spectacle/lib/themes/default"; // Require CSS require("normalize.css"); require("spectacle/lib/themes/default/index.css"); const images = { city: require("../assets/city.jpg"), kat: require("../assets/kat.png"), logo: require("../assets/formidable-logo.svg"), markdown: require("../assets/markdown.png"), angular: require("../assets/angular.svg"), react: require("../assets/react.svg"), developerSatisfaction: require("../assets/developerSatisfaction.png"), trends: require("../assets/trends.png"), chefSteps: require("../assets/ionic/chefsteps-sq.png"), pacifica: require("../assets/ionic/pacifica-sq.png"), sworkit: require("../assets/ionic/sworkit-sq.jpg"), untappd: require("../assets/ionic/untappd-sq.jpg"), airbnb: require("../assets/react/airbnb-sq.png"), baidu: require("../assets/react/baidu-sq.png"), bloomberg: require("../assets/react/bloomberg-sq.jpg"), facebook: require("../assets/react/facebook-sq.png"), instagram: require("../assets/react/instagram-sq.jpg"), tesla: require("../assets/react/tesla-sq.jpg"), vogue: require("../assets/react/vogue-sq.jpg"), walmart: require("../assets/react/walmart-sq.jpg"), }; preloader(images); const theme = createTheme({ primary: "white", secondary: "#1F2022", tertiary: "#03A9FC", quartenary: "#CECECE" }, { primary: "Montserrat", secondary: "Helvetica" }); const data = [ {name: 'Q1 2015', react: 15960, angular2: 1560}, {name: 'Q2 2015', react: 21270, angular2: 3210}, {name: 'Q3 2015', react: 26610, angular2: 4830}, {name: 'Q4 2015', react: 31950, angular2: 6480}, {name: 'Q1 2016', react: 37290, angular2: 9750}, {name: 'Q2 2016', react: 44932, angular2: 13020}, {name: 'Q3 2016', react: 50720, angular2: 16290}, {name: 'Q4 2016', react: 56825, angular2: 18810}, {name: 'Q1 2017', react: 64812, angular2: 22830}, ]; const TimelineIcon = ({ children }) => ( <div style={{ position: 'relative', left: '-25%', top: '-25%', height: '100%', width: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' }}> </div> ); export default class Presentation extends React.Component { render() { return ( <Deck transition={["zoom", "slide"]} transitionDuration={500} theme={theme}> <Slide transition={["zoom"]} bgColor="primary"> <Heading size={1} fit caps lineHeight={1} textColor="secondary"> The Case for React </Heading> <Text margin="10px 0 0" textColor="tertiary" size={1} fit bold> Functional, Consistent, Flexible, Simple, Superior UI </Text> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="tertiary" caps>The Cost of Development at NU</Heading> <List> <ListItem textSize={24}>NU has 16 UI Devs</ListItem> <ListItem textSize={24}>NU closes 22 UI stories per month (41 so far in May)</ListItem> <ListItem textSize={24}>NU generates 52 defects per month <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={18}>27 closed per month</ListItem> <ListItem textSize={18}>10 cancelled per month</ListItem> <ListItem textSize={18}>Carrying 15 defects per month</ListItem> <ListItem textSize={18}>More than 50% of all defects are UI defects (27 per month)</ListItem> </List> </ListItem> <ListItem textSize={24}>Each UI story takes 9 days to close per developer <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={18}>Our stack is a bottleneck</ListItem> <ListItem textSize={18}>Y Tests (1 day), PR requests (2 days)</ListItem> <ListItem textSize={18}>9 minutes to run 160 mobile tests. 7 min to run 60 web tests. 4 min to create environment.</ListItem> </List> </ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="tertiary" caps>The Running Deficit</Heading> <List> <ListItem textSize={24}>The Roadmap does not include our current balance of 134 defects <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={18}>Adding 15 defects per month, we'll double defect count in 1 year</ListItem> </List> </ListItem> <ListItem textSize={24}>Upgrading to Angular 2 will significantly increase our defect count <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={18}>It will stop development to address critical defects in order to upgrade</ListItem> </List> </ListItem> <ListItem textSize={24}>Will be cheaper to move to React <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={18}>Move 2x faster on feature dev (44 stories per month)</ListItem> <ListItem textSize={18}>Reduce bug intro rate by 5X (10 per month)</ListItem> <ListItem textSize={18}>Move wasted bug fix capacity to feature development (27 stories)</ListItem> <ListItem textSize={18}>Net increase in throughput from 2.5 stories per dev to more than 5</ListItem> <ListItem textSize={18}>Achieve feature parity quickly</ListItem> <ListItem textSize={18}>Remove the defect backlog, focus on roadmap</ListItem> </List> </ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="tertiary" caps>The Business Case for React</Heading> <List> <ListItem textSize={24}>Cuts development time in half</ListItem> <ListItem textSize={24}>React simplifies testing <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={20}>Better testing tools (Snapshots)</ListItem> <ListItem textSize={20}>Y Tests become optional</ListItem> </List> </ListItem> <ListItem textSize={24}>React speeds development time <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={20}>Single development effort</ListItem> <ListItem textSize={20}>Start with React for Web, port to mobile via React Native</ListItem> <ListItem textSize={20}>Feature parity between mobile and web</ListItem> </List> </ListItem> <ListItem textSize={24}>React has a bigger, stronger community <List style={{ marginLeft: 36, fontSize: 16 }}> <ListItem textSize={20}>Standardized, documented, well-supported</ListItem> <ListItem textSize={20}>Shopify's Polaris for Web</ListItem> <ListItem textSize={20}>React Native for Mobile</ListItem> <ListItem textSize={20}>Storybook took for component documentation & demonstration</ListItem> <ListItem textSize={20}>Sketch integration</ListItem> </List> </ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="secondary" caps>The Choice</Heading> <div style={{ display: "flex" }}> <Fill bgColor="tertiary"> <img src={images.angular} style={{ height: 180 }} /> <Text>Angular 2</Text> </Fill> <Fill> <img src={images.react} style={{ height: 200 }} /> <Text>React</Text> </Fill> </div> </Slide> <Slide transition={["fade"]} bgColor="primary"> <div> <Text textSize={30} style={{ fontWeight: "bold", textAlign: "left", }} textColor="tertiary" caps>Brief History of Angular & React</Text> </div> <div style={{ textAlign: "left" }}> <Text textSize={24} style={{ fontWeight: "bold" }}>2010</Text> <Text textSize={20}>Angular created as hobby project by Misko Hevery</Text> </div> <div style={{ textAlign: "left" }}> <Text textSize={24} style={{ fontWeight: "bold" }}>2011</Text> <Text textSize={20}>Facebook starts using React in production</Text> </div> <div style={{ textAlign: "left" }}> <Text textSize={24} style={{ fontWeight: "bold" }}>2013</Text> <Text textSize={20}>Facebook open sources React</Text> </div> <div style={{ textAlign: "left" }}> <Text textSize={24} style={{ fontWeight: "bold" }}>2014</Text> <Text textSize={20}>Angular team announces incompatible rewrite of popular framework</Text> </div> <div style={{ textAlign: "left" }}> <Text textSize={24} style={{ fontWeight: "bold" }}>2016</Text> <Text textSize={20}>Angular 2 released</Text> </div> </Slide> <Slide> <Heading size={6} textColor="tertiary">What was the catalyst that triggered Angular to rewrite their popular framework?</Heading> </Slide> <Slide> <Heading size={5} textColor="tertiary">How React Changed the Game</Heading> <List> <ListItem>Component driven architecture</ListItem> <ListItem>Simple, minimalist architecture</ListItem> <ListItem>Virtual DOM => High Performance</ListItem> <ListItem>Unidirectional data flow => More predictable state management</ListItem> </List> </Slide> <Slide> <Heading size={5} textColor="tertiary">The Simplicity of React</Heading> <List> <ListItem>Built on Functional principles</ListItem> <ListItem>Similar to mathematical functions: <br />f(x) => x</ListItem> <ListItem>React components are a function of <br />f(state, props) => UI</ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="secondary" textColor="primary"> <BlockQuote> <Quote>Simplicity is prerequisite for reliability.</Quote> <Cite>Edsger W. Dijkstra</Cite> </BlockQuote> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>A One-Line React Component</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/react-component.example")} margin="20px auto" /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>An equivalent Angular Component</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/angular-component.example")} margin="20px auto" /> <CodePane lang="javascript" source={require("raw-loader!../assets/angular-module.example")} margin="20px auto" /> </Slide> {/*<Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>A Stateful React Component</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/react-component2.example")} margin="20px auto" /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>An Equivalent Stateful Angular Component 1 of 2</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/angular-component2.example")} margin="20px auto" /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>A Stateful Angular Component 2 of 2</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/angular-module2.example")} margin="20px auto" /> </Slide>*/} <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>Angular Is Over-Engineered</Heading> <List> <ListItem>React has <a href="https://facebook.github.io/react/docs/react-api.html" target="blank">11</a> top level API methods</ListItem> <ListItem>Angular has <a href="https://angular.io/docs/ts/latest/api/" target="_blank">over 500</a> top level API concepts</ListItem> <ListItem>Huge surface area means more complexity, more moving parts, bigger learning curve</ListItem> <ListItem>Introduces: structural directives, pipes, declarations, modules, injectors, services, view encapsulation, decorators, observables</ListItem> </List> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>Angular Is Over-Engineered</Heading> <List> <ListItem>Angular forces decisions on you <br />(i.e. TypeScript)</ListItem> <ListItem>Angular's engine is more complex</ListItem> <ListItem>Zone.js overrides native HTTP methods</ListItem> <ListItem>Has two module systems</ListItem> <ListItem>Ahead of Time compiler generates code 3-5X the size of source: <a target="_blank" href="https://docs.google.com/document/d/195L4WaDSoI_kkW094LlShH6gT3B7K1GZpSBnnLkQR-g/edit#heading=h.wt8e1dv0pljj">Link</a></ListItem> </List> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>Angular Is Over-Engineered</Heading> <List> <ListItem>Change detection strategy now a concern</ListItem> <ListItem>Built on experimental language features (i.e. decorators)</ListItem> <ListItem>Angular DSL is not valid HTML</ListItem> <ListItem>1 Megabyte just to do hello world</ListItem> <ListItem>Requires HTML parser and sanitizer</ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="secondary" textColor="primary"> <BlockQuote> <Quote style={{ fontSize: 44 }}>There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.</Quote> <Cite>C.A.R. Hoare, The 1980 ACM Turing Award Lecture</Cite> </BlockQuote> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>React's Consistency</Heading> <Heading size={6}>2013</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/react2013.example")} margin="20px auto" /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>React's Consistency</Heading> <Heading size={6}>2017</Heading> <CodePane lang="javascript" source={require("raw-loader!../assets/react2017.example")} margin="20px auto" /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="Angular has a 64% retention rate among devs vs. React's 92% retention. Over 9000 devs surveyed."> <Heading textColor="tertiary" size={4}>React Has Highest Satisfaction Rating</Heading> <Fill> <Image height={500} src={images.developerSatisfaction}/> </Fill> </Slide> <Slide style={{ fontSize: 14 }} notes="React is not only more popular, it's growing faster. Gaining 77 stars a day vs Angular's 38. Hundreds more contributors."> <Heading size={6} textColor="tertiary">React's Popularity</Heading> <Text textSize={24}>GitHub Stars Over Time</Text> <div style={{ display: "flex", justifyContent: "center" }}> <ResponsiveContainer width="100%" height={400}> <LineChart margin={{ top: 5, right: 30, left: 20, bottom: 5 }} data={data}> <XAxis dataKey="name"/> <YAxis/> <CartesianGrid strokeDasharray="3 3"/> <Tooltip/> <Legend /> <Line type="monotone" dataKey="react" name="React" stroke="blue" activeDot={{r: 8}}/> <Line type="monotone" dataKey="angular2" name="Angular 2" stroke="red" /> </LineChart> </ResponsiveContainer> </div> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="More devs want to learn React than Angular 2."> <Heading textColor="tertiary" size={4}>More People Want to Learn React</Heading> <Image height={500} src={images.trends} /> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>React Has Better Performance</Heading> <List> <ListItem>Consistently Faster than Angular 2: <br /> <a href="https://auth0.com/blog/updated-and-improved-more-benchmarks-virtual-dom-vs-angular-12-vs-mithril-js-vs-the-rest/" target="_blank">Auth0 Benchmark</a></ListItem> <ListItem>Lighter weight: 43KB vs. 766KB</ListItem> <ListItem>Less Memory Usage</ListItem> </List> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>React's "Learn Once, Write Anywhere" Philosophy</Heading> <List> <ListItem>Native mobile</ListItem> <ListItem>Native desktop</ListItem> <ListItem>Native Mac OSX</ListItem> <ListItem>Native Touchbar</ListItem> <ListItem>Native Windows</ListItem> <ListItem>HTML5 Canvas</ListItem> <ListItem>VR</ListItem> </List> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="tertiary" caps>Built With Ionic</Heading> <div style={{ display: "flex", flexWrap: "wrap", justifyContent: "center" }}> <div style={{marginRight: 15}}> <img src={images.chefSteps} style={{ height: 180 }} /> <Text textSize={20}>Chef Steps</Text> </div> <div style={{marginRight: 15}}> <img src={images.pacifica} style={{ height: 180 }} /> <Text textSize={20}>Pacifica</Text> </div> <div style={{marginRight: 15}}> <img src={images.sworkit} style={{ height: 180 }} /> <Text textSize={20}>Sworkit</Text> </div> <div> <img src={images.untappd} style={{ height: 180 }} /> <Text textSize={20}>Untappd</Text> </div> </div> </Slide> <Slide transition={["fade"]} bgColor="primary" textColor="secondary"> <Heading size={6} textColor="tertiary" caps>Built With React Native</Heading> <div style={{ display: "flex", flexWrap: "wrap", justifyContent: "center" }}> <div style={{marginRight: 15}}> <img src={images.airbnb} style={{ height: 180 }} /> <Text textSize={20}>AirBnB</Text> </div> <div style={{marginRight: 15}}> <img src={images.baidu} style={{ height: 180 }} /> <Text textSize={20}>Baidu</Text> </div> <div style={{marginRight: 15}}> <img src={images.bloomberg} style={{ height: 180 }} /> <Text textSize={20}>Bloomberg</Text> </div> <div style={{marginRight: 15}}> <img src={images.facebook} style={{ height: 180 }} /> <Text textSize={20}>Facebook</Text> </div> <div style={{marginRight: 15}}> <img src={images.instagram} style={{ height: 180 }} /> <Text textSize={20}>Instagram</Text> </div> <div style={{marginRight: 15}}> <img src={images.tesla} style={{ height: 180 }} /> <Text textSize={20}>Tesla</Text> </div> <div style={{marginRight: 15}}> <img src={images.vogue} style={{ height: 180 }} /> <Text textSize={20}>Vogue</Text> </div> <div> <img src={images.walmart} style={{ height: 180 }} /> <Text textSize={20}>Wal-Mart</Text> </div> </div> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>React Is A Joy To Work With</Heading> <List> <ListItem>React is faster, easier and more reliable</ListItem> <ListItem>React has stronger JS community backing and support</ListItem> <ListItem>This presentation was written in React</ListItem> </List> </Slide> <Slide transition={["zoom", "fade"]} bgColor="primary" notes="<ul><li>talk about that</li><li>and that</li></ul>"> <Heading textColor="tertiary" size={4}>Design Systems</Heading> </Slide> </Deck> ); } } /*<Slide transition={["zoom"]} bgColor="primary"> <Heading size={6} caps textColor="secondary"> JS Framework Timeline </Heading> <div style={{ height: 500, overflowY: 'auto', background: '#EEE', border: '1px solid #333' }}> <Timeline> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>In the beginning...</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>There was JQuery.</Text> </TimelineEvent> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>July 5, 2010</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>Knockout JS released.</Text> </TimelineEvent> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>October 13, 2010</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>Backbone released.</Text> </TimelineEvent> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>October 20, 2010</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>Angular 1 released.</Text> </TimelineEvent> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>October 2010</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>Angular 1 released.</Text> </TimelineEvent> <TimelineEvent contentStyle={{ padding: 30 }} createdAt={<Text textSize={16} style={{ color: 'white' }}>October 2010</Text>} style={{ fontWeight: 400 }} icon={<TimelineIcon><img src={images.angular} style={{ height: '80%', }} /></TimelineIcon>} iconColor={theme.secondary} container="card" > <Text textSize={22}>Angular 1 released.</Text> </TimelineEvent> </Timeline> </div> </Slide>*/
47.584104
265
0.592783
406106568e2425ac2b699fa4570160ef70511675
692
sql
SQL
P2_studies/cc2/Postgres/theta_omega.sql
chackoge/ERNIE_Plus
7e480c47a69fc2f736ac7fb55ece35dbff919938
[ "MIT" ]
6
2017-09-26T23:45:52.000Z
2021-10-18T22:58:38.000Z
P2_studies/cc2/Postgres/theta_omega.sql
NETESOLUTIONS/ERNIE
454518f28b39a6f37ad8dde4f3be15d4dccc6f61
[ "MIT" ]
null
null
null
P2_studies/cc2/Postgres/theta_omega.sql
NETESOLUTIONS/ERNIE
454518f28b39a6f37ad8dde4f3be15d4dccc6f61
[ "MIT" ]
9
2017-11-22T13:42:32.000Z
2021-05-16T17:58:03.000Z
\set ON_ERROR_STOP on -- \set ECHO all -- DataGrip: start execution from here SET TIMEZONE = 'US/Eastern'; CALL cc2.theta_omega_calculations(:cited_1::bigint, :cited_2::bigint, :first_year::smallint); -- DO -- $blocks$ -- -- BEGIN -- IF :first_year::smallint < 1998 THEN -- CALL cc2.theta_omega_calculations(:cited_1::bigint, :cited_2::bigint, :first_year::smallint); -- ELSE -- RAISE NOTICE 'First cited year greater than 1997 running query on public.scopus_reference table'; -- CALL cc2.theta_omega_calculations_main_table(:cited_1::bigint, :cited_2::bigint, :first_year::smallint); -- END IF; -- -- -- END -- $blocks$;
31.454545
119
0.656069
916e2b5838f3021ea38b3d41a13b04204205a628
199
html
HTML
Micropractica3/src/app/propiedades/propiedades.component.html
IvanAguado22/Practica_AngularComponents_DSI
ed1388a8aadc9c43e73348a07a7f4025c48eb719
[ "MIT" ]
null
null
null
Micropractica3/src/app/propiedades/propiedades.component.html
IvanAguado22/Practica_AngularComponents_DSI
ed1388a8aadc9c43e73348a07a7f4025c48eb719
[ "MIT" ]
null
null
null
Micropractica3/src/app/propiedades/propiedades.component.html
IvanAguado22/Practica_AngularComponents_DSI
ed1388a8aadc9c43e73348a07a7f4025c48eb719
[ "MIT" ]
null
null
null
<div> <p [hidden]="hide">Comunidad: {{selectedCom}}</p> <p [hidden]="hide">Provincia: {{selectedProv}}</p> <button (click)="hide = false">Get propiedades del CustomElement</button> </div>
39.8
77
0.638191
fbb4c3eb04c8ae73ca99f931e25487fbf034e795
316
h
C
ntsmss.h
M2Team/phnt
9ed46af8f746a8fe459f551f011523b4815e6a79
[ "CC-BY-4.0" ]
null
null
null
ntsmss.h
M2Team/phnt
9ed46af8f746a8fe459f551f011523b4815e6a79
[ "CC-BY-4.0" ]
null
null
null
ntsmss.h
M2Team/phnt
9ed46af8f746a8fe459f551f011523b4815e6a79
[ "CC-BY-4.0" ]
null
null
null
NTSYSAPI NTSTATUS NTAPI RtlConnectToSm( _In_ PUNICODE_STRING ApiPortName, _In_ HANDLE ApiPortHandle, _In_ DWORD ProcessImageType, _Out_ PHANDLE SmssConnection ); NTSYSAPI NTSTATUS NTAPI RtlSendMsgToSm( _In_ HANDLE ApiPortHandle, _In_ PPORT_MESSAGE MessageData );
16.631579
38
0.712025
396da11c34ff23470398bdb0ba9a65f7d7f1f00e
502
html
HTML
angular/src/app/customers/customer-create/select-booking/select-booking.component.html
mikedevatos/spring-boot-rest-jwt-angular
c69d5790c5a06511dd98ac0c79368a729765ede5
[ "MIT" ]
2
2022-02-13T11:36:58.000Z
2022-02-20T12:46:49.000Z
angular/src/app/customers/customer-create/select-booking/select-booking.component.html
bettercallmike/spring-boot-rest-jwt-angular
c69d5790c5a06511dd98ac0c79368a729765ede5
[ "MIT" ]
5
2020-10-31T21:37:11.000Z
2020-11-03T17:38:41.000Z
angular/src/app/customers/customer-create/select-booking/select-booking.component.html
mikedevatos/spring-boot-rest-jwt-angular
c69d5790c5a06511dd98ac0c79368a729765ede5
[ "MIT" ]
1
2020-12-24T01:58:42.000Z
2020-12-24T01:58:42.000Z
<div class="booking-dates-container"> <h3> Select Booking Dates </h3> <div> <nz-date-picker [(ngModel)]="dateStart" [nzFormat]="dateFormat" [nzShowTime]="false" nzPlaceHolder="Start" (ngModelChange)="onChangeStartDate($event)"> </nz-date-picker> </div> <div> <nz-date-picker [(ngModel)]="dateEnd" [nzFormat]="dateFormat" [nzShowTime]="false" nzPlaceHolder="End" (ngModelChange)="onChangeEndDate($event)"></nz-date-picker> </div> </div>
31.375
114
0.621514
725cbffeea44b39ad2d15e2f373b74f47fa57bee
1,122
kt
Kotlin
mobile/src/main/java/com/chernowii/camcontrol/camera/goproAPI/ApiClient.kt
watchingJu/CamControl
2a10cbdd00845c89be78a4946d0b4b55b8a922e4
[ "MIT" ]
102
2017-02-11T05:06:00.000Z
2022-03-21T18:42:19.000Z
mobile/src/main/java/com/chernowii/camcontrol/camera/goproAPI/ApiClient.kt
watchingJu/CamControl
2a10cbdd00845c89be78a4946d0b4b55b8a922e4
[ "MIT" ]
9
2018-03-05T23:29:52.000Z
2022-03-21T18:48:58.000Z
mobile/src/main/java/com/chernowii/camcontrol/camera/goproAPI/ApiClient.kt
watchingJu/CamControl
2a10cbdd00845c89be78a4946d0b4b55b8a922e4
[ "MIT" ]
31
2017-03-20T09:11:46.000Z
2021-12-29T23:57:46.000Z
package com.chernowii.camcontrol.camera.goproAPI import com.chernowii.camcontrol.camera.goproAPI.model.GoProResponse import com.chernowii.camcontrol.camera.goproAPI.model.media.GoProMediaList import com.chernowii.camcontrol.camera.goproAPI.model.media.GoProMetadata import retrofit2.Call import retrofit2.http.GET import retrofit2.http.Path import retrofit2.http.Query interface ApiClient { @get:GET("/gp/gpMediaList") val mediaList: Call<GoProMediaList> @GET("/gp/gpControl/setting/{param}/{option}") fun config(@Path("param") param: String, @Path("option") option: String): Call<GoProResponse> @GET("/gp/gpControl/command/{param}") fun command(@Path("param") param: String, @Query("p") option: String): Call<GoProResponse> @GET("gp/gpControl/execute/{param}") fun execute(@Path("param") param: String): Call<GoProResponse> @GET("/gp/getMediaMetadata") fun getMediaMetadata(@Query("p") GoProMedia: String, @Query("t") MetadataOption: String): Call<GoProMetadata> @GET("/gp/getMediaMetadata") fun getThumbnail(@Query("p") GoProMedia: String): Call<GoProMetadata> }
35.0625
113
0.742424
26b87c41e8ed827459600dc83c7839898e3b073d
2,964
java
Java
lib_obex/src/main/java/javax/obex/utils/BluetoothObexTransport.java
Yaqiok/AndroidOBEXTranslate
433a10934c8d073961d82e3687ec5450a7df8571
[ "Apache-2.0" ]
null
null
null
lib_obex/src/main/java/javax/obex/utils/BluetoothObexTransport.java
Yaqiok/AndroidOBEXTranslate
433a10934c8d073961d82e3687ec5450a7df8571
[ "Apache-2.0" ]
null
null
null
lib_obex/src/main/java/javax/obex/utils/BluetoothObexTransport.java
Yaqiok/AndroidOBEXTranslate
433a10934c8d073961d82e3687ec5450a7df8571
[ "Apache-2.0" ]
null
null
null
package javax.obex.utils; /* * Copyright (C) 2014 Samsung System LSI * 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. */ import android.bluetooth.BluetoothSocket; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.obex.ObexTransport; /** * Generic Obex Transport class, to be used in OBEX based Bluetooth * Profiles. */ public class BluetoothObexTransport implements ObexTransport { private BluetoothSocket mSocket = null; public BluetoothObexTransport(BluetoothSocket socket) { this.mSocket = socket; } @Override public void close() throws IOException { mSocket.close(); } @Override public DataInputStream openDataInputStream() throws IOException { return new DataInputStream(openInputStream()); } @Override public DataOutputStream openDataOutputStream() throws IOException { return new DataOutputStream(openOutputStream()); } @Override public InputStream openInputStream() throws IOException { return mSocket.getInputStream(); } @Override public OutputStream openOutputStream() throws IOException { return mSocket.getOutputStream(); } @Override public void connect() throws IOException { } @Override public void create() throws IOException { } @Override public void disconnect() throws IOException { } @Override public void listen() throws IOException { } public boolean isConnected() throws IOException { return true; } @Override public int getMaxTransmitPacketSize() { //if (mSocket.getConnectionType() != BluetoothSocket.TYPE_L2CAP) { // return -1; // } return 4096;//mSocket.getMaxTransmitPacketSize(); } @Override public int getMaxReceivePacketSize() { // if (mSocket.getConnectionType() != BluetoothSocket.TYPE_L2CAP) { // return -1; // } return 4096;//mSocket.getMaxReceivePacketSize(); } public String getRemoteAddress() { if (mSocket == null) { return null; } return mSocket.getRemoteDevice().getAddress(); } @Override public boolean isSrmSupported() { // if (mSocket.getConnectionType() == BluetoothSocket.TYPE_L2CAP) { // return true; // } return false; } }
29.64
75
0.675439
a265a12ab1148189356d0fb5749da86adba55723
3,417
kt
Kotlin
covidstats/src/main/java/me/tatocaster/covidstats/screens/CovidStatsFragment.kt
tatocaster/covid19-IoT
32c3eab1e0f544d75457bc5300d82a38b91e7126
[ "MIT" ]
3
2020-04-08T06:13:16.000Z
2020-05-21T19:54:18.000Z
covidstats/src/main/java/me/tatocaster/covidstats/screens/CovidStatsFragment.kt
tatocaster/covid19-IoT
32c3eab1e0f544d75457bc5300d82a38b91e7126
[ "MIT" ]
null
null
null
covidstats/src/main/java/me/tatocaster/covidstats/screens/CovidStatsFragment.kt
tatocaster/covid19-IoT
32c3eab1e0f544d75457bc5300d82a38b91e7126
[ "MIT" ]
null
null
null
package me.tatocaster.covidstats.screens import android.content.Context import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Button import android.widget.TextView import android.widget.Toast import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider import me.tatocaster.core.base.* import me.tatocaster.core.mixins.ProgressBarMixin import me.tatocaster.covidstats.R import me.tatocaster.covidstats.inject import timber.log.Timber import javax.inject.Inject class CovidStatsFragment : BaseFragment(), ProgressBarMixin { lateinit var covidStatsViewModel: CovidStatsViewModel @Inject lateinit var viewModelFactory: CovidStatsViewModelFactory @Inject lateinit var activityContext: Context private lateinit var tvTotalCasesCount: TextView private lateinit var tvTotalRecoveredCount: TextView private lateinit var tvTotalDeathCount: TextView private lateinit var bRefreshStats: Button override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { inject() return inflater.inflate(R.layout.fragment_covid_stats, container, false) } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) findViewsById(view) covidStatsViewModel = ViewModelProvider(this, viewModelFactory)[CovidStatsViewModel::class.java] covidStatsViewModel.state.observe(viewLifecycleOwner, Observer { state -> applyProgressbarMixin(state, view.findViewById(R.id.progressBar)) when (state) { is JustInitial -> { } is JustLoading -> { } is JustError -> { bRefreshStats.isEnabled = true Toast.makeText(activityContext, R.string.server_error, Toast.LENGTH_SHORT) .show() } is JustSuccess -> { } is CovidStatsViewModel.CasesLoaded -> { bRefreshStats.isEnabled = true tvTotalCasesCount.text = state.payload.totalConfirmed.toString() tvTotalRecoveredCount.text = state.payload.totalRecovered.toString() tvTotalDeathCount.text = state.payload.totalDeaths.toString() } is JustUnknownError -> { Toast.makeText(activityContext, R.string.server_error, Toast.LENGTH_SHORT) .show() } else -> throw UndefinedStateException(state) } }) bRefreshStats.setOnClickListener { bRefreshStats.isEnabled = false Toast.makeText(activityContext, R.string.loading, Toast.LENGTH_SHORT).show() covidStatsViewModel.getCovidCases() } } private fun findViewsById(view: View) { tvTotalCasesCount = view.findViewById(R.id.tvTotalCasesCount) tvTotalRecoveredCount = view.findViewById(R.id.tvTotalRecoveredCount) tvTotalDeathCount = view.findViewById(R.id.tvTotalDeathCount) bRefreshStats = view.findViewById(R.id.bRefreshStats) } companion object { fun newInstance() = CovidStatsFragment() } }
36.741935
104
0.664618
5b2b1bc05d0f07f67600b0ce428eb3f5b8e52077
19,336
h
C
es/include/tencentcloud/es/v20180416/model/ClusterView.h
suluner/tencentcloud-sdk-cpp
a56c73cc3f488c4d1e10755704107bb15c5e000d
[ "Apache-2.0" ]
null
null
null
es/include/tencentcloud/es/v20180416/model/ClusterView.h
suluner/tencentcloud-sdk-cpp
a56c73cc3f488c4d1e10755704107bb15c5e000d
[ "Apache-2.0" ]
null
null
null
es/include/tencentcloud/es/v20180416/model/ClusterView.h
suluner/tencentcloud-sdk-cpp
a56c73cc3f488c4d1e10755704107bb15c5e000d
[ "Apache-2.0" ]
null
null
null
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * 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. */ #ifndef TENCENTCLOUD_ES_V20180416_MODEL_CLUSTERVIEW_H_ #define TENCENTCLOUD_ES_V20180416_MODEL_CLUSTERVIEW_H_ #include <string> #include <vector> #include <map> #include <tencentcloud/core/utils/rapidjson/document.h> #include <tencentcloud/core/utils/rapidjson/writer.h> #include <tencentcloud/core/utils/rapidjson/stringbuffer.h> #include <tencentcloud/core/AbstractModel.h> namespace TencentCloud { namespace Es { namespace V20180416 { namespace Model { /** * 集群维度视图数据 */ class ClusterView : public AbstractModel { public: ClusterView(); ~ClusterView() = default; void ToJsonObject(rapidjson::Value &value, rapidjson::Document::AllocatorType& allocator) const; CoreInternalOutcome Deserialize(const rapidjson::Value &value); /** * 获取集群健康状态 * @return Health 集群健康状态 */ double GetHealth() const; /** * 设置集群健康状态 * @param Health 集群健康状态 */ void SetHealth(const double& _health); /** * 判断参数 Health 是否已赋值 * @return Health 是否已赋值 */ bool HealthHasBeenSet() const; /** * 获取集群是否可见 * @return Visible 集群是否可见 */ double GetVisible() const; /** * 设置集群是否可见 * @param Visible 集群是否可见 */ void SetVisible(const double& _visible); /** * 判断参数 Visible 是否已赋值 * @return Visible 是否已赋值 */ bool VisibleHasBeenSet() const; /** * 获取集群是否熔断 * @return Break 集群是否熔断 */ double GetBreak() const; /** * 设置集群是否熔断 * @param Break 集群是否熔断 */ void SetBreak(const double& _break); /** * 判断参数 Break 是否已赋值 * @return Break 是否已赋值 */ bool BreakHasBeenSet() const; /** * 获取平均磁盘使用率 * @return AvgDiskUsage 平均磁盘使用率 */ double GetAvgDiskUsage() const; /** * 设置平均磁盘使用率 * @param AvgDiskUsage 平均磁盘使用率 */ void SetAvgDiskUsage(const double& _avgDiskUsage); /** * 判断参数 AvgDiskUsage 是否已赋值 * @return AvgDiskUsage 是否已赋值 */ bool AvgDiskUsageHasBeenSet() const; /** * 获取平均内存使用率 * @return AvgMemUsage 平均内存使用率 */ double GetAvgMemUsage() const; /** * 设置平均内存使用率 * @param AvgMemUsage 平均内存使用率 */ void SetAvgMemUsage(const double& _avgMemUsage); /** * 判断参数 AvgMemUsage 是否已赋值 * @return AvgMemUsage 是否已赋值 */ bool AvgMemUsageHasBeenSet() const; /** * 获取平均cpu使用率 * @return AvgCpuUsage 平均cpu使用率 */ double GetAvgCpuUsage() const; /** * 设置平均cpu使用率 * @param AvgCpuUsage 平均cpu使用率 */ void SetAvgCpuUsage(const double& _avgCpuUsage); /** * 判断参数 AvgCpuUsage 是否已赋值 * @return AvgCpuUsage 是否已赋值 */ bool AvgCpuUsageHasBeenSet() const; /** * 获取集群总存储大小 * @return TotalDiskSize 集群总存储大小 */ uint64_t GetTotalDiskSize() const; /** * 设置集群总存储大小 * @param TotalDiskSize 集群总存储大小 */ void SetTotalDiskSize(const uint64_t& _totalDiskSize); /** * 判断参数 TotalDiskSize 是否已赋值 * @return TotalDiskSize 是否已赋值 */ bool TotalDiskSizeHasBeenSet() const; /** * 获取客户端请求节点 * @return TargetNodeTypes 客户端请求节点 */ std::vector<std::string> GetTargetNodeTypes() const; /** * 设置客户端请求节点 * @param TargetNodeTypes 客户端请求节点 */ void SetTargetNodeTypes(const std::vector<std::string>& _targetNodeTypes); /** * 判断参数 TargetNodeTypes 是否已赋值 * @return TargetNodeTypes 是否已赋值 */ bool TargetNodeTypesHasBeenSet() const; /** * 获取在线节点数 * @return NodeNum 在线节点数 */ int64_t GetNodeNum() const; /** * 设置在线节点数 * @param NodeNum 在线节点数 */ void SetNodeNum(const int64_t& _nodeNum); /** * 判断参数 NodeNum 是否已赋值 * @return NodeNum 是否已赋值 */ bool NodeNumHasBeenSet() const; /** * 获取总节点数 * @return TotalNodeNum 总节点数 */ int64_t GetTotalNodeNum() const; /** * 设置总节点数 * @param TotalNodeNum 总节点数 */ void SetTotalNodeNum(const int64_t& _totalNodeNum); /** * 判断参数 TotalNodeNum 是否已赋值 * @return TotalNodeNum 是否已赋值 */ bool TotalNodeNumHasBeenSet() const; /** * 获取数据节点数 * @return DataNodeNum 数据节点数 */ int64_t GetDataNodeNum() const; /** * 设置数据节点数 * @param DataNodeNum 数据节点数 */ void SetDataNodeNum(const int64_t& _dataNodeNum); /** * 判断参数 DataNodeNum 是否已赋值 * @return DataNodeNum 是否已赋值 */ bool DataNodeNumHasBeenSet() const; /** * 获取索引数 * @return IndexNum 索引数 */ int64_t GetIndexNum() const; /** * 设置索引数 * @param IndexNum 索引数 */ void SetIndexNum(const int64_t& _indexNum); /** * 判断参数 IndexNum 是否已赋值 * @return IndexNum 是否已赋值 */ bool IndexNumHasBeenSet() const; /** * 获取文档数 * @return DocNum 文档数 */ int64_t GetDocNum() const; /** * 设置文档数 * @param DocNum 文档数 */ void SetDocNum(const int64_t& _docNum); /** * 判断参数 DocNum 是否已赋值 * @return DocNum 是否已赋值 */ bool DocNumHasBeenSet() const; /** * 获取磁盘已使用字节数 * @return DiskUsedInBytes 磁盘已使用字节数 */ int64_t GetDiskUsedInBytes() const; /** * 设置磁盘已使用字节数 * @param DiskUsedInBytes 磁盘已使用字节数 */ void SetDiskUsedInBytes(const int64_t& _diskUsedInBytes); /** * 判断参数 DiskUsedInBytes 是否已赋值 * @return DiskUsedInBytes 是否已赋值 */ bool DiskUsedInBytesHasBeenSet() const; /** * 获取分片个数 * @return ShardNum 分片个数 */ int64_t GetShardNum() const; /** * 设置分片个数 * @param ShardNum 分片个数 */ void SetShardNum(const int64_t& _shardNum); /** * 判断参数 ShardNum 是否已赋值 * @return ShardNum 是否已赋值 */ bool ShardNumHasBeenSet() const; /** * 获取主分片个数 * @return PrimaryShardNum 主分片个数 */ int64_t GetPrimaryShardNum() const; /** * 设置主分片个数 * @param PrimaryShardNum 主分片个数 */ void SetPrimaryShardNum(const int64_t& _primaryShardNum); /** * 判断参数 PrimaryShardNum 是否已赋值 * @return PrimaryShardNum 是否已赋值 */ bool PrimaryShardNumHasBeenSet() const; /** * 获取迁移中的分片个数 * @return RelocatingShardNum 迁移中的分片个数 */ int64_t GetRelocatingShardNum() const; /** * 设置迁移中的分片个数 * @param RelocatingShardNum 迁移中的分片个数 */ void SetRelocatingShardNum(const int64_t& _relocatingShardNum); /** * 判断参数 RelocatingShardNum 是否已赋值 * @return RelocatingShardNum 是否已赋值 */ bool RelocatingShardNumHasBeenSet() const; /** * 获取初始化中的分片个数 * @return InitializingShardNum 初始化中的分片个数 */ int64_t GetInitializingShardNum() const; /** * 设置初始化中的分片个数 * @param InitializingShardNum 初始化中的分片个数 */ void SetInitializingShardNum(const int64_t& _initializingShardNum); /** * 判断参数 InitializingShardNum 是否已赋值 * @return InitializingShardNum 是否已赋值 */ bool InitializingShardNumHasBeenSet() const; /** * 获取未分配的分片个数 * @return UnassignedShardNum 未分配的分片个数 */ int64_t GetUnassignedShardNum() const; /** * 设置未分配的分片个数 * @param UnassignedShardNum 未分配的分片个数 */ void SetUnassignedShardNum(const int64_t& _unassignedShardNum); /** * 判断参数 UnassignedShardNum 是否已赋值 * @return UnassignedShardNum 是否已赋值 */ bool UnassignedShardNumHasBeenSet() const; /** * 获取企业版COS存储容量大小,单位GB * @return TotalCosStorage 企业版COS存储容量大小,单位GB */ int64_t GetTotalCosStorage() const; /** * 设置企业版COS存储容量大小,单位GB * @param TotalCosStorage 企业版COS存储容量大小,单位GB */ void SetTotalCosStorage(const int64_t& _totalCosStorage); /** * 判断参数 TotalCosStorage 是否已赋值 * @return TotalCosStorage 是否已赋值 */ bool TotalCosStorageHasBeenSet() const; /** * 获取企业版集群可搜索快照cos存放的bucket名称 注意:此字段可能返回 null,表示取不到有效值。 * @return SearchableSnapshotCosBucket 企业版集群可搜索快照cos存放的bucket名称 注意:此字段可能返回 null,表示取不到有效值。 */ std::string GetSearchableSnapshotCosBucket() const; /** * 设置企业版集群可搜索快照cos存放的bucket名称 注意:此字段可能返回 null,表示取不到有效值。 * @param SearchableSnapshotCosBucket 企业版集群可搜索快照cos存放的bucket名称 注意:此字段可能返回 null,表示取不到有效值。 */ void SetSearchableSnapshotCosBucket(const std::string& _searchableSnapshotCosBucket); /** * 判断参数 SearchableSnapshotCosBucket 是否已赋值 * @return SearchableSnapshotCosBucket 是否已赋值 */ bool SearchableSnapshotCosBucketHasBeenSet() const; /** * 获取企业版集群可搜索快照cos所属appid 注意:此字段可能返回 null,表示取不到有效值。 * @return SearchableSnapshotCosAppId 企业版集群可搜索快照cos所属appid 注意:此字段可能返回 null,表示取不到有效值。 */ std::string GetSearchableSnapshotCosAppId() const; /** * 设置企业版集群可搜索快照cos所属appid 注意:此字段可能返回 null,表示取不到有效值。 * @param SearchableSnapshotCosAppId 企业版集群可搜索快照cos所属appid 注意:此字段可能返回 null,表示取不到有效值。 */ void SetSearchableSnapshotCosAppId(const std::string& _searchableSnapshotCosAppId); /** * 判断参数 SearchableSnapshotCosAppId 是否已赋值 * @return SearchableSnapshotCosAppId 是否已赋值 */ bool SearchableSnapshotCosAppIdHasBeenSet() const; private: /** * 集群健康状态 */ double m_health; bool m_healthHasBeenSet; /** * 集群是否可见 */ double m_visible; bool m_visibleHasBeenSet; /** * 集群是否熔断 */ double m_break; bool m_breakHasBeenSet; /** * 平均磁盘使用率 */ double m_avgDiskUsage; bool m_avgDiskUsageHasBeenSet; /** * 平均内存使用率 */ double m_avgMemUsage; bool m_avgMemUsageHasBeenSet; /** * 平均cpu使用率 */ double m_avgCpuUsage; bool m_avgCpuUsageHasBeenSet; /** * 集群总存储大小 */ uint64_t m_totalDiskSize; bool m_totalDiskSizeHasBeenSet; /** * 客户端请求节点 */ std::vector<std::string> m_targetNodeTypes; bool m_targetNodeTypesHasBeenSet; /** * 在线节点数 */ int64_t m_nodeNum; bool m_nodeNumHasBeenSet; /** * 总节点数 */ int64_t m_totalNodeNum; bool m_totalNodeNumHasBeenSet; /** * 数据节点数 */ int64_t m_dataNodeNum; bool m_dataNodeNumHasBeenSet; /** * 索引数 */ int64_t m_indexNum; bool m_indexNumHasBeenSet; /** * 文档数 */ int64_t m_docNum; bool m_docNumHasBeenSet; /** * 磁盘已使用字节数 */ int64_t m_diskUsedInBytes; bool m_diskUsedInBytesHasBeenSet; /** * 分片个数 */ int64_t m_shardNum; bool m_shardNumHasBeenSet; /** * 主分片个数 */ int64_t m_primaryShardNum; bool m_primaryShardNumHasBeenSet; /** * 迁移中的分片个数 */ int64_t m_relocatingShardNum; bool m_relocatingShardNumHasBeenSet; /** * 初始化中的分片个数 */ int64_t m_initializingShardNum; bool m_initializingShardNumHasBeenSet; /** * 未分配的分片个数 */ int64_t m_unassignedShardNum; bool m_unassignedShardNumHasBeenSet; /** * 企业版COS存储容量大小,单位GB */ int64_t m_totalCosStorage; bool m_totalCosStorageHasBeenSet; /** * 企业版集群可搜索快照cos存放的bucket名称 注意:此字段可能返回 null,表示取不到有效值。 */ std::string m_searchableSnapshotCosBucket; bool m_searchableSnapshotCosBucketHasBeenSet; /** * 企业版集群可搜索快照cos所属appid 注意:此字段可能返回 null,表示取不到有效值。 */ std::string m_searchableSnapshotCosAppId; bool m_searchableSnapshotCosAppIdHasBeenSet; }; } } } } #endif // !TENCENTCLOUD_ES_V20180416_MODEL_CLUSTERVIEW_H_
32.442953
116
0.393928
9d435616ba97ec997db44a0c42ea163936b4ba0c
13,406
html
HTML
yrx/u/u-022.html
daniel-kelley/daniel-kelley.github.io
5ea40ae2152437c39d9f1fec0e8fafd6859ea22f
[ "CC0-1.0" ]
null
null
null
yrx/u/u-022.html
daniel-kelley/daniel-kelley.github.io
5ea40ae2152437c39d9f1fec0e8fafd6859ea22f
[ "CC0-1.0" ]
4
2020-06-21T14:30:07.000Z
2021-03-13T21:00:07.000Z
yrx/u/u-022.html
daniel-kelley/daniel-kelley.github.io
5ea40ae2152437c39d9f1fec0e8fafd6859ea22f
[ "CC0-1.0" ]
null
null
null
<html> <body> <table> <tr><td>dec</td><td>hex</td><td>char</td></tr> <tr><td>5632</td><td>1600</td><td>&#5632;</td></tr> <tr><td>5633</td><td>1601</td><td>&#5633;</td></tr> <tr><td>5634</td><td>1602</td><td>&#5634;</td></tr> <tr><td>5635</td><td>1603</td><td>&#5635;</td></tr> <tr><td>5636</td><td>1604</td><td>&#5636;</td></tr> <tr><td>5637</td><td>1605</td><td>&#5637;</td></tr> <tr><td>5638</td><td>1606</td><td>&#5638;</td></tr> <tr><td>5639</td><td>1607</td><td>&#5639;</td></tr> <tr><td>5640</td><td>1608</td><td>&#5640;</td></tr> <tr><td>5641</td><td>1609</td><td>&#5641;</td></tr> <tr><td>5642</td><td>160a</td><td>&#5642;</td></tr> <tr><td>5643</td><td>160b</td><td>&#5643;</td></tr> <tr><td>5644</td><td>160c</td><td>&#5644;</td></tr> <tr><td>5645</td><td>160d</td><td>&#5645;</td></tr> <tr><td>5646</td><td>160e</td><td>&#5646;</td></tr> <tr><td>5647</td><td>160f</td><td>&#5647;</td></tr> <tr><td>5648</td><td>1610</td><td>&#5648;</td></tr> <tr><td>5649</td><td>1611</td><td>&#5649;</td></tr> <tr><td>5650</td><td>1612</td><td>&#5650;</td></tr> <tr><td>5651</td><td>1613</td><td>&#5651;</td></tr> <tr><td>5652</td><td>1614</td><td>&#5652;</td></tr> <tr><td>5653</td><td>1615</td><td>&#5653;</td></tr> <tr><td>5654</td><td>1616</td><td>&#5654;</td></tr> <tr><td>5655</td><td>1617</td><td>&#5655;</td></tr> <tr><td>5656</td><td>1618</td><td>&#5656;</td></tr> <tr><td>5657</td><td>1619</td><td>&#5657;</td></tr> <tr><td>5658</td><td>161a</td><td>&#5658;</td></tr> <tr><td>5659</td><td>161b</td><td>&#5659;</td></tr> <tr><td>5660</td><td>161c</td><td>&#5660;</td></tr> <tr><td>5661</td><td>161d</td><td>&#5661;</td></tr> <tr><td>5662</td><td>161e</td><td>&#5662;</td></tr> <tr><td>5663</td><td>161f</td><td>&#5663;</td></tr> <tr><td>5664</td><td>1620</td><td>&#5664;</td></tr> <tr><td>5665</td><td>1621</td><td>&#5665;</td></tr> <tr><td>5666</td><td>1622</td><td>&#5666;</td></tr> <tr><td>5667</td><td>1623</td><td>&#5667;</td></tr> <tr><td>5668</td><td>1624</td><td>&#5668;</td></tr> <tr><td>5669</td><td>1625</td><td>&#5669;</td></tr> <tr><td>5670</td><td>1626</td><td>&#5670;</td></tr> <tr><td>5671</td><td>1627</td><td>&#5671;</td></tr> <tr><td>5672</td><td>1628</td><td>&#5672;</td></tr> <tr><td>5673</td><td>1629</td><td>&#5673;</td></tr> <tr><td>5674</td><td>162a</td><td>&#5674;</td></tr> <tr><td>5675</td><td>162b</td><td>&#5675;</td></tr> <tr><td>5676</td><td>162c</td><td>&#5676;</td></tr> <tr><td>5677</td><td>162d</td><td>&#5677;</td></tr> <tr><td>5678</td><td>162e</td><td>&#5678;</td></tr> <tr><td>5679</td><td>162f</td><td>&#5679;</td></tr> <tr><td>5680</td><td>1630</td><td>&#5680;</td></tr> <tr><td>5681</td><td>1631</td><td>&#5681;</td></tr> <tr><td>5682</td><td>1632</td><td>&#5682;</td></tr> <tr><td>5683</td><td>1633</td><td>&#5683;</td></tr> <tr><td>5684</td><td>1634</td><td>&#5684;</td></tr> <tr><td>5685</td><td>1635</td><td>&#5685;</td></tr> <tr><td>5686</td><td>1636</td><td>&#5686;</td></tr> <tr><td>5687</td><td>1637</td><td>&#5687;</td></tr> <tr><td>5688</td><td>1638</td><td>&#5688;</td></tr> <tr><td>5689</td><td>1639</td><td>&#5689;</td></tr> <tr><td>5690</td><td>163a</td><td>&#5690;</td></tr> <tr><td>5691</td><td>163b</td><td>&#5691;</td></tr> <tr><td>5692</td><td>163c</td><td>&#5692;</td></tr> <tr><td>5693</td><td>163d</td><td>&#5693;</td></tr> <tr><td>5694</td><td>163e</td><td>&#5694;</td></tr> <tr><td>5695</td><td>163f</td><td>&#5695;</td></tr> <tr><td>5696</td><td>1640</td><td>&#5696;</td></tr> <tr><td>5697</td><td>1641</td><td>&#5697;</td></tr> <tr><td>5698</td><td>1642</td><td>&#5698;</td></tr> <tr><td>5699</td><td>1643</td><td>&#5699;</td></tr> <tr><td>5700</td><td>1644</td><td>&#5700;</td></tr> <tr><td>5701</td><td>1645</td><td>&#5701;</td></tr> <tr><td>5702</td><td>1646</td><td>&#5702;</td></tr> <tr><td>5703</td><td>1647</td><td>&#5703;</td></tr> <tr><td>5704</td><td>1648</td><td>&#5704;</td></tr> <tr><td>5705</td><td>1649</td><td>&#5705;</td></tr> <tr><td>5706</td><td>164a</td><td>&#5706;</td></tr> <tr><td>5707</td><td>164b</td><td>&#5707;</td></tr> <tr><td>5708</td><td>164c</td><td>&#5708;</td></tr> <tr><td>5709</td><td>164d</td><td>&#5709;</td></tr> <tr><td>5710</td><td>164e</td><td>&#5710;</td></tr> <tr><td>5711</td><td>164f</td><td>&#5711;</td></tr> <tr><td>5712</td><td>1650</td><td>&#5712;</td></tr> <tr><td>5713</td><td>1651</td><td>&#5713;</td></tr> <tr><td>5714</td><td>1652</td><td>&#5714;</td></tr> <tr><td>5715</td><td>1653</td><td>&#5715;</td></tr> <tr><td>5716</td><td>1654</td><td>&#5716;</td></tr> <tr><td>5717</td><td>1655</td><td>&#5717;</td></tr> <tr><td>5718</td><td>1656</td><td>&#5718;</td></tr> <tr><td>5719</td><td>1657</td><td>&#5719;</td></tr> <tr><td>5720</td><td>1658</td><td>&#5720;</td></tr> <tr><td>5721</td><td>1659</td><td>&#5721;</td></tr> <tr><td>5722</td><td>165a</td><td>&#5722;</td></tr> <tr><td>5723</td><td>165b</td><td>&#5723;</td></tr> <tr><td>5724</td><td>165c</td><td>&#5724;</td></tr> <tr><td>5725</td><td>165d</td><td>&#5725;</td></tr> <tr><td>5726</td><td>165e</td><td>&#5726;</td></tr> <tr><td>5727</td><td>165f</td><td>&#5727;</td></tr> <tr><td>5728</td><td>1660</td><td>&#5728;</td></tr> <tr><td>5729</td><td>1661</td><td>&#5729;</td></tr> <tr><td>5730</td><td>1662</td><td>&#5730;</td></tr> <tr><td>5731</td><td>1663</td><td>&#5731;</td></tr> <tr><td>5732</td><td>1664</td><td>&#5732;</td></tr> <tr><td>5733</td><td>1665</td><td>&#5733;</td></tr> <tr><td>5734</td><td>1666</td><td>&#5734;</td></tr> <tr><td>5735</td><td>1667</td><td>&#5735;</td></tr> <tr><td>5736</td><td>1668</td><td>&#5736;</td></tr> <tr><td>5737</td><td>1669</td><td>&#5737;</td></tr> <tr><td>5738</td><td>166a</td><td>&#5738;</td></tr> <tr><td>5739</td><td>166b</td><td>&#5739;</td></tr> <tr><td>5740</td><td>166c</td><td>&#5740;</td></tr> <tr><td>5741</td><td>166d</td><td>&#5741;</td></tr> <tr><td>5742</td><td>166e</td><td>&#5742;</td></tr> <tr><td>5743</td><td>166f</td><td>&#5743;</td></tr> <tr><td>5744</td><td>1670</td><td>&#5744;</td></tr> <tr><td>5745</td><td>1671</td><td>&#5745;</td></tr> <tr><td>5746</td><td>1672</td><td>&#5746;</td></tr> <tr><td>5747</td><td>1673</td><td>&#5747;</td></tr> <tr><td>5748</td><td>1674</td><td>&#5748;</td></tr> <tr><td>5749</td><td>1675</td><td>&#5749;</td></tr> <tr><td>5750</td><td>1676</td><td>&#5750;</td></tr> <tr><td>5751</td><td>1677</td><td>&#5751;</td></tr> <tr><td>5752</td><td>1678</td><td>&#5752;</td></tr> <tr><td>5753</td><td>1679</td><td>&#5753;</td></tr> <tr><td>5754</td><td>167a</td><td>&#5754;</td></tr> <tr><td>5755</td><td>167b</td><td>&#5755;</td></tr> <tr><td>5756</td><td>167c</td><td>&#5756;</td></tr> <tr><td>5757</td><td>167d</td><td>&#5757;</td></tr> <tr><td>5758</td><td>167e</td><td>&#5758;</td></tr> <tr><td>5759</td><td>167f</td><td>&#5759;</td></tr> <tr><td>5760</td><td>1680</td><td>&#5760;</td></tr> <tr><td>5761</td><td>1681</td><td>&#5761;</td></tr> <tr><td>5762</td><td>1682</td><td>&#5762;</td></tr> <tr><td>5763</td><td>1683</td><td>&#5763;</td></tr> <tr><td>5764</td><td>1684</td><td>&#5764;</td></tr> <tr><td>5765</td><td>1685</td><td>&#5765;</td></tr> <tr><td>5766</td><td>1686</td><td>&#5766;</td></tr> <tr><td>5767</td><td>1687</td><td>&#5767;</td></tr> <tr><td>5768</td><td>1688</td><td>&#5768;</td></tr> <tr><td>5769</td><td>1689</td><td>&#5769;</td></tr> <tr><td>5770</td><td>168a</td><td>&#5770;</td></tr> <tr><td>5771</td><td>168b</td><td>&#5771;</td></tr> <tr><td>5772</td><td>168c</td><td>&#5772;</td></tr> <tr><td>5773</td><td>168d</td><td>&#5773;</td></tr> <tr><td>5774</td><td>168e</td><td>&#5774;</td></tr> <tr><td>5775</td><td>168f</td><td>&#5775;</td></tr> <tr><td>5776</td><td>1690</td><td>&#5776;</td></tr> <tr><td>5777</td><td>1691</td><td>&#5777;</td></tr> <tr><td>5778</td><td>1692</td><td>&#5778;</td></tr> <tr><td>5779</td><td>1693</td><td>&#5779;</td></tr> <tr><td>5780</td><td>1694</td><td>&#5780;</td></tr> <tr><td>5781</td><td>1695</td><td>&#5781;</td></tr> <tr><td>5782</td><td>1696</td><td>&#5782;</td></tr> <tr><td>5783</td><td>1697</td><td>&#5783;</td></tr> <tr><td>5784</td><td>1698</td><td>&#5784;</td></tr> <tr><td>5785</td><td>1699</td><td>&#5785;</td></tr> <tr><td>5786</td><td>169a</td><td>&#5786;</td></tr> <tr><td>5787</td><td>169b</td><td>&#5787;</td></tr> <tr><td>5788</td><td>169c</td><td>&#5788;</td></tr> <tr><td>5789</td><td>169d</td><td>&#5789;</td></tr> <tr><td>5790</td><td>169e</td><td>&#5790;</td></tr> <tr><td>5791</td><td>169f</td><td>&#5791;</td></tr> <tr><td>5792</td><td>16a0</td><td>&#5792;</td></tr> <tr><td>5793</td><td>16a1</td><td>&#5793;</td></tr> <tr><td>5794</td><td>16a2</td><td>&#5794;</td></tr> <tr><td>5795</td><td>16a3</td><td>&#5795;</td></tr> <tr><td>5796</td><td>16a4</td><td>&#5796;</td></tr> <tr><td>5797</td><td>16a5</td><td>&#5797;</td></tr> <tr><td>5798</td><td>16a6</td><td>&#5798;</td></tr> <tr><td>5799</td><td>16a7</td><td>&#5799;</td></tr> <tr><td>5800</td><td>16a8</td><td>&#5800;</td></tr> <tr><td>5801</td><td>16a9</td><td>&#5801;</td></tr> <tr><td>5802</td><td>16aa</td><td>&#5802;</td></tr> <tr><td>5803</td><td>16ab</td><td>&#5803;</td></tr> <tr><td>5804</td><td>16ac</td><td>&#5804;</td></tr> <tr><td>5805</td><td>16ad</td><td>&#5805;</td></tr> <tr><td>5806</td><td>16ae</td><td>&#5806;</td></tr> <tr><td>5807</td><td>16af</td><td>&#5807;</td></tr> <tr><td>5808</td><td>16b0</td><td>&#5808;</td></tr> <tr><td>5809</td><td>16b1</td><td>&#5809;</td></tr> <tr><td>5810</td><td>16b2</td><td>&#5810;</td></tr> <tr><td>5811</td><td>16b3</td><td>&#5811;</td></tr> <tr><td>5812</td><td>16b4</td><td>&#5812;</td></tr> <tr><td>5813</td><td>16b5</td><td>&#5813;</td></tr> <tr><td>5814</td><td>16b6</td><td>&#5814;</td></tr> <tr><td>5815</td><td>16b7</td><td>&#5815;</td></tr> <tr><td>5816</td><td>16b8</td><td>&#5816;</td></tr> <tr><td>5817</td><td>16b9</td><td>&#5817;</td></tr> <tr><td>5818</td><td>16ba</td><td>&#5818;</td></tr> <tr><td>5819</td><td>16bb</td><td>&#5819;</td></tr> <tr><td>5820</td><td>16bc</td><td>&#5820;</td></tr> <tr><td>5821</td><td>16bd</td><td>&#5821;</td></tr> <tr><td>5822</td><td>16be</td><td>&#5822;</td></tr> <tr><td>5823</td><td>16bf</td><td>&#5823;</td></tr> <tr><td>5824</td><td>16c0</td><td>&#5824;</td></tr> <tr><td>5825</td><td>16c1</td><td>&#5825;</td></tr> <tr><td>5826</td><td>16c2</td><td>&#5826;</td></tr> <tr><td>5827</td><td>16c3</td><td>&#5827;</td></tr> <tr><td>5828</td><td>16c4</td><td>&#5828;</td></tr> <tr><td>5829</td><td>16c5</td><td>&#5829;</td></tr> <tr><td>5830</td><td>16c6</td><td>&#5830;</td></tr> <tr><td>5831</td><td>16c7</td><td>&#5831;</td></tr> <tr><td>5832</td><td>16c8</td><td>&#5832;</td></tr> <tr><td>5833</td><td>16c9</td><td>&#5833;</td></tr> <tr><td>5834</td><td>16ca</td><td>&#5834;</td></tr> <tr><td>5835</td><td>16cb</td><td>&#5835;</td></tr> <tr><td>5836</td><td>16cc</td><td>&#5836;</td></tr> <tr><td>5837</td><td>16cd</td><td>&#5837;</td></tr> <tr><td>5838</td><td>16ce</td><td>&#5838;</td></tr> <tr><td>5839</td><td>16cf</td><td>&#5839;</td></tr> <tr><td>5840</td><td>16d0</td><td>&#5840;</td></tr> <tr><td>5841</td><td>16d1</td><td>&#5841;</td></tr> <tr><td>5842</td><td>16d2</td><td>&#5842;</td></tr> <tr><td>5843</td><td>16d3</td><td>&#5843;</td></tr> <tr><td>5844</td><td>16d4</td><td>&#5844;</td></tr> <tr><td>5845</td><td>16d5</td><td>&#5845;</td></tr> <tr><td>5846</td><td>16d6</td><td>&#5846;</td></tr> <tr><td>5847</td><td>16d7</td><td>&#5847;</td></tr> <tr><td>5848</td><td>16d8</td><td>&#5848;</td></tr> <tr><td>5849</td><td>16d9</td><td>&#5849;</td></tr> <tr><td>5850</td><td>16da</td><td>&#5850;</td></tr> <tr><td>5851</td><td>16db</td><td>&#5851;</td></tr> <tr><td>5852</td><td>16dc</td><td>&#5852;</td></tr> <tr><td>5853</td><td>16dd</td><td>&#5853;</td></tr> <tr><td>5854</td><td>16de</td><td>&#5854;</td></tr> <tr><td>5855</td><td>16df</td><td>&#5855;</td></tr> <tr><td>5856</td><td>16e0</td><td>&#5856;</td></tr> <tr><td>5857</td><td>16e1</td><td>&#5857;</td></tr> <tr><td>5858</td><td>16e2</td><td>&#5858;</td></tr> <tr><td>5859</td><td>16e3</td><td>&#5859;</td></tr> <tr><td>5860</td><td>16e4</td><td>&#5860;</td></tr> <tr><td>5861</td><td>16e5</td><td>&#5861;</td></tr> <tr><td>5862</td><td>16e6</td><td>&#5862;</td></tr> <tr><td>5863</td><td>16e7</td><td>&#5863;</td></tr> <tr><td>5864</td><td>16e8</td><td>&#5864;</td></tr> <tr><td>5865</td><td>16e9</td><td>&#5865;</td></tr> <tr><td>5866</td><td>16ea</td><td>&#5866;</td></tr> <tr><td>5867</td><td>16eb</td><td>&#5867;</td></tr> <tr><td>5868</td><td>16ec</td><td>&#5868;</td></tr> <tr><td>5869</td><td>16ed</td><td>&#5869;</td></tr> <tr><td>5870</td><td>16ee</td><td>&#5870;</td></tr> <tr><td>5871</td><td>16ef</td><td>&#5871;</td></tr> <tr><td>5872</td><td>16f0</td><td>&#5872;</td></tr> <tr><td>5873</td><td>16f1</td><td>&#5873;</td></tr> <tr><td>5874</td><td>16f2</td><td>&#5874;</td></tr> <tr><td>5875</td><td>16f3</td><td>&#5875;</td></tr> <tr><td>5876</td><td>16f4</td><td>&#5876;</td></tr> <tr><td>5877</td><td>16f5</td><td>&#5877;</td></tr> <tr><td>5878</td><td>16f6</td><td>&#5878;</td></tr> <tr><td>5879</td><td>16f7</td><td>&#5879;</td></tr> <tr><td>5880</td><td>16f8</td><td>&#5880;</td></tr> <tr><td>5881</td><td>16f9</td><td>&#5881;</td></tr> <tr><td>5882</td><td>16fa</td><td>&#5882;</td></tr> <tr><td>5883</td><td>16fb</td><td>&#5883;</td></tr> <tr><td>5884</td><td>16fc</td><td>&#5884;</td></tr> <tr><td>5885</td><td>16fd</td><td>&#5885;</td></tr> <tr><td>5886</td><td>16fe</td><td>&#5886;</td></tr> <tr><td>5887</td><td>16ff</td><td>&#5887;</td></tr> </table> </body> </html>
50.780303
51
0.538565
0ccb7361200b302e98746fb913273e875a9c713b
593
py
Python
2019/06-hsctf/web-networked/solve.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
25
2019-03-06T11:55:56.000Z
2021-05-21T22:07:14.000Z
2019/06-hsctf/web-networked/solve.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
1
2020-06-25T07:27:15.000Z
2020-06-25T07:27:15.000Z
2019/06-hsctf/web-networked/solve.py
wani-hackase/wani-writeup
dd4ad0607d2f2193ad94c1ce65359294aa591681
[ "MIT" ]
1
2019-02-14T00:42:28.000Z
2019-02-14T00:42:28.000Z
import requests text = "0123456789abcdefghijklmnopqrstuvwxyz_}" flag = "hsctf{" for _ in range(30): time = [0.1 for _ in range(38)] for _ in range(5): for i in range(38): payload = {"password": flag + text[i]} r = requests.post( "https://networked-password.web.chal.hsctf.com", data=payload ) response_time = r.elapsed.total_seconds() time[i] += response_time print(payload, " response time : ", response_time) flag += text[time.index(max(time))] print("flag is ", flag)
21.962963
77
0.563238
685141c17355095b33d1f7d8be59cfced1083b11
10,335
lua
Lua
examples/example-22.lua
remyroez/DxLua
ac3dcdae6c3c10035a5cf9cdcfebc9e71020b396
[ "MIT" ]
2
2020-04-08T17:35:04.000Z
2020-04-14T13:11:55.000Z
examples/example-22.lua
remyroez/DxLua
ac3dcdae6c3c10035a5cf9cdcfebc9e71020b396
[ "MIT" ]
1
2020-04-11T09:30:51.000Z
2020-04-11T09:30:51.000Z
examples/example-22.lua
remyroez/DxLua
ac3dcdae6c3c10035a5cf9cdcfebc9e71020b396
[ "MIT" ]
null
null
null
-- ワイプ1~5 local band = bit.band local Key = 0 GraphHandle1, GraphHandle2 = GraphHandle1 or -1, GraphHandle2 or -1 -- DxLua: 各ワイプを一つのソースにまとめるためステートマシンの構築 -- 初期ステート local InitialState = 'Enter' -- カラーコード local Yellow = dx.GetColor(0xFF, 0xFF, 0) -- 共通の更新関数 local UpdateFn = function (self, parent, ...) if self[self.State] then self[self.State](self, parent, ...) else parent.State = InitialState end end -- 共通の待機関数 local WaitFn = function (self, parent, dt) dx.DrawString(0, 0, '\n左クリックで再実行\n右クリックで戻る') dx.ScreenFlip() local mouse = dx.GetMouseInput() if band(mouse, dx.MOUSE_INPUT_LEFT) ~= 0 then self.State = InitialState elseif band(mouse, dx.MOUSE_INPUT_RIGHT) ~= 0 then parent.State = InitialState end end -- 各ワイプのステートマシン local Wipe1 = { State = InitialState, Update = UpdateFn, Wait = WaitFn } local Wipe2 = { State = InitialState, Update = UpdateFn, Wait = WaitFn } local Wipe3 = { State = InitialState, Update = UpdateFn, Wait = WaitFn } local Wipe4 = { State = InitialState, Update = UpdateFn, Wait = WaitFn } local Wipe5 = { State = InitialState, Update = UpdateFn, Wait = WaitFn } -- メインとなるステートマシン local StateMachine = { State = InitialState, Wipe1 = Wipe1, Wipe2 = Wipe2, Wipe3 = Wipe3, Wipe4 = Wipe4, Wipe5 = Wipe5, } -- 画面モードのセット dx.SetGraphMode(640, 480, 16) -- DXライブラリ初期化処理 function dx.Init() -- グラフィックのロード GraphHandle1 = dx.LoadGraph("Scene1.jpg") GraphHandle2 = dx.LoadGraph("Scene2.jpg") -- 描画先を裏画面にします dx.SetDrawScreen(dx.DX_SCREEN_BACK) dx.ChangeFontType(dx.DX_FONTTYPE_EDGE) end -- ループ function dx.Update(dt) StateMachine:Update(dt) end -- 開始 function StateMachine:Enter(parent, dt) dx.ClearDrawScreen() dx.DrawString(0, 0, 'ワイプ選択', Yellow) dx.DrawString(0, 0, '\n1~5を入力してください') dx.ScreenFlip() self.State = 'Select' end -- ステートマシン更新 function StateMachine:Update(...) -- 現在のステート名のメンバのタイプを取得 local mode = type(self[self.State]) if mode == 'function' then -- 関数なら実行 self[self.State](self, ...) elseif mode == 'table' then -- テーブルなら更新関数があれば実行 if self[self.State].Update then self[self.State]:Update(self, ...) end end end -- ワイプ選択 function StateMachine:Select(dt) -- 現在のステート local before = self.State -- キーボードでワイプ選択 if dx.CheckHitKey(dx.KEY_INPUT_1) ~= 0 or dx.CheckHitKey(dx.KEY_INPUT_NUMPAD1) ~= 0 then self.State = 'Wipe1' elseif dx.CheckHitKey(dx.KEY_INPUT_2) ~= 0 or dx.CheckHitKey(dx.KEY_INPUT_NUMPAD2) ~= 0 then self.State = 'Wipe2' elseif dx.CheckHitKey(dx.KEY_INPUT_3) ~= 0 or dx.CheckHitKey(dx.KEY_INPUT_NUMPAD3) ~= 0 then self.State = 'Wipe3' elseif dx.CheckHitKey(dx.KEY_INPUT_4) ~= 0 or dx.CheckHitKey(dx.KEY_INPUT_NUMPAD4) ~= 0 then self.State = 'Wipe4' elseif dx.CheckHitKey(dx.KEY_INPUT_5) ~= 0 or dx.CheckHitKey(dx.KEY_INPUT_NUMPAD5) ~= 0 then self.State = 'Wipe5' end -- ステートが変更されたら、子ステートのステートを初期化 if self.State ~= before then if type(self[self.State]) == 'table' then self[self.State].State = InitialState end end end -- 開始 function Wipe1:Enter(parent, dt) self.count = 17 self.State = 'Wipe' GraphHandle1, GraphHandle2 = GraphHandle2, GraphHandle1 end -- ワイプ実行 function Wipe1:Wipe(parent, dt) -- 画面を初期化 dx.ClearDrawScreen() -- グラフィック1を描画します dx.DrawGraph(0, 0, GraphHandle1, false) -- グラフィック2を描画します for j = 0, math.floor(480 / 16) do -- 描画範囲を指定します dx.SetDrawArea(0, j * 16, 640, j * 16 + self.count) -- グラフィック2を描画します dx.DrawGraph(0, 0, GraphHandle2, false) end dx.SetDrawArea(0, 0, 640, 480) -- DxLua: 現在のワイプ dx.DrawString(0, 0, 'ワイプ1', Yellow) -- 裏画面の内容を表画面に反映させます dx.ScreenFlip() -- 時間待ち dx.WaitTimer(15) self.count = self.count - 1 if self.count < 0 then self.State = 'Wait' end end -- 開始 function Wipe2:Enter(parent, dt) self.count = 80 self.Mode = self.Mode and (self.Mode == 0 and 1 or 0) or 0 self.State = 'Wipe' GraphHandle1, GraphHandle2 = GraphHandle2, GraphHandle1 end -- ワイプ実行 function Wipe2:Wipe(parent, dt) local i = self.count -- 画面を初期化 dx.ClearDrawScreen() -- グラフィック1を描画します dx.DrawGraph(0, 0, GraphHandle1, false) -- グラフィック2を描画します for j = 0, math.floor(640 / 16) do -- 描画可能領域設定用の値セット local k = j + i - 40 if k > 0 then if k > 16 then k = 16 end -- 描画可能領域を指定します if self.Mode == 0 then dx.SetDrawArea(624 - j * 16, 0, 624 - (j * 16 - k), 480) else dx.SetDrawArea(j * 16, 0, j * 16 - k, 480) end -- グラフィック2を描画します dx.DrawGraph(0, 0, GraphHandle2, false) end end -- 描画可能領域を元に戻します dx.SetDrawArea(0, 0, 640, 480) -- DxLua: 現在のワイプ dx.DrawString(0, 0, 'ワイプ2', Yellow) -- 裏画面の内容を表画面に反映させます dx.ScreenFlip() -- 時間待ち dx.WaitTimer(32) self.count = self.count - 1 if self.count < 0 then self.State = 'Wait' end end -- 開始 function Wipe3:Enter(parent, dt) self.count = 640 + 256 self.Mode = self.Mode and (self.Mode == 0 and 1 or 0) or 0 self.State = 'Wipe' GraphHandle1, GraphHandle2 = GraphHandle2, GraphHandle1 end -- ワイプ実行 function Wipe3:Wipe(parent, dt) local i = 640 + 256 - self.count -- 画面を初期化 dx.ClearDrawScreen() -- グラフィック1を描画します dx.DrawGraph(0, 0, GraphHandle1, false) -- グラフィック2を描画します for j = 0, 256 do -- 描画可能領域設定用の値セット local k = j + i - 256 -- 描画可能領域を指定します if k >= 0 then if self.Mode == 0 then dx.SetDrawArea(k, 0, k + 1, 480) else dx.SetDrawArea(640 - k, 0, 640 - (k + 1), 480) end -- アルファブレンド値をセット dx.SetDrawBlendMode(dx.DX_BLENDMODE_ALPHA, 255 - j) -- グラフィック2を描画します dx.DrawGraph(0, 0, GraphHandle2, false) end end -- ブレンドモードを元に戻す dx.SetDrawBlendMode(dx.DX_BLENDMODE_NOBLEND, 0) -- グラフィック2のアルファブレンド描画以外の部分の描画 do -- 描画領域設定用の値をセット local k = i - 256 if k > 0 then if self.Mode == 0 then dx.SetDrawArea(0, 0, k, 480) else dx.SetDrawArea(640 - k, 0, 640, 480) end dx.DrawGraph(0, 0, GraphHandle2, false) end -- 描画領域を元に戻す dx.SetDrawArea(0, 0, 640, 480) end -- DxLua: 現在のワイプ dx.DrawString(0, 0, 'ワイプ3', Yellow) -- 裏画面の内容を表画面に反映させます dx.ScreenFlip() self.count = self.count - 8 if self.count < 0 then self.State = 'Wait' end end -- 開始 function Wipe4:Enter(parent, dt) if self.Mode == 1 then GraphHandle1, GraphHandle2 = GraphHandle2, GraphHandle1 end self.count = 400 self.Mode = self.Mode and (self.Mode == 0 and 1 or 0) or 0 self.State = 'Wipe' end -- ワイプ実行 function Wipe4:Wipe(parent, dt) local i = 400 - self.count -- 画面を初期化 dx.ClearDrawScreen() -- グラフィック1を描画します dx.DrawGraph(0, 0, GraphHandle1, false) -- 描画したグラフィックの上に反転円を描きます DrawReversalCircle(320, 240, self.Mode == 0 and i or 399 - i, 0) -- DxLua: 現在のワイプ dx.DrawString(0, 0, 'ワイプ4', Yellow) -- 裏画面の内容を表画面に反映させます dx.ScreenFlip() self.count = self.count - 8 if self.count < 0 then self.State = 'Wait' end end -- 開始 function Wipe5:Enter(parent, dt) self.count = -160 self.Mode = self.Mode and (self.Mode == 0 and 1 or 0) or 0 self.State = 'Wipe' GraphHandle1, GraphHandle2 = GraphHandle2, GraphHandle1 end -- ワイプ実行 function Wipe5:Wipe(parent, dt) local i = self.count -- 画面を初期化 dx.ClearDrawScreen() -- グラフィック1を描画します dx.DrawGraph(0, 0, GraphHandle1, false) -- 描画したグラフィックの上に円を描きます dx.DrawCircle(320, 240, i + 100, 0); -- その上からグラフィック2描きます if 0 < i then -- 直後に描いた円の中に描画可能領域をセット dx.SetDrawArea(320 - i, 240 - i, 320 + i, 240 + i); -- グラフィック2を描画 dx.DrawGraph(0, 0, GraphHandle2, false); -- 反転円を描画 DrawReversalCircle(320, 240, i, 0); -- 描画可能領域を元に戻す dx.SetDrawArea(0, 0, 640, 480); end -- DxLua: 現在のワイプ dx.DrawString(0, 0, 'ワイプ5', Yellow) -- 裏画面の内容を表画面に反映させます dx.ScreenFlip() self.count = self.count + 4 if self.count > 500 then self.State = 'Wait' end end -- 反転円の描画 function DrawReversalCircle(x, y, r, Color) -- 円反転描画領域の外側を描画 dx.DrawBox(0, 0, 640, y - r, Color, true) dx.DrawBox(0, y - r, x - r, 480, Color, true) dx.DrawBox(x - r, y + r + 1, 640, 480, Color, true) dx.DrawBox(x + r, y - r, 640, y + r + 1, Color, true) -- 描画処理 do local Dx, Dy, F, j local x1, x2, y1 -- 初期値セット Dx = r Dy = 0 F = -2 * r + 3 j = 0 -- 描画開始 do -- まず最初に座標データを進める if (F >= 0) then x2 = Dy + x x1 = -Dy + x y1 = Dx + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) x2 = Dy + x x1 = -Dy + x y1 = -Dx + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) Dx = Dx - 1 F = F - 4 * Dx end Dy = Dy + 1 F = F + 4 * Dy + 2 -- 描き切るまでループ while Dx >= Dy do -- ラインを描く x2 = Dx + x x1 = -Dx + x y1 = Dy + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) x2 = Dx + x x1 = -Dx + x y1 = -Dy + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) -- 座標データを進める if F >= 0 then x2 = Dy + x x1 = -Dy + x y1 = Dx + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) x2 = Dy + x x1 = -Dy + x y1 = -Dx + y dx.DrawLine(0, y1, x1, y1, Color) dx.DrawLine(x2, y1, 640, y1, Color) Dx = Dx - 1 F = F - 4 * Dx end Dy = Dy + 1 F = F + (4 * Dy + 2) end end end -- 終了 return 0 end
22.51634
96
0.565651
cb68a4ee671e0dcf711b5b97bb8e1b47f787756a
2,746
html
HTML
data/CRAN/CNVassocData.html
JuliaTagBot/OSS.jl
985ed664e484bbcc59b009968e71f2eccaaf4cd4
[ "Zlib" ]
null
null
null
data/CRAN/CNVassocData.html
JuliaTagBot/OSS.jl
985ed664e484bbcc59b009968e71f2eccaaf4cd4
[ "Zlib" ]
null
null
null
data/CRAN/CNVassocData.html
JuliaTagBot/OSS.jl
985ed664e484bbcc59b009968e71f2eccaaf4cd4
[ "Zlib" ]
3
2019-05-18T18:47:05.000Z
2020-02-08T16:36:58.000Z
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>CRAN - Package CNVassocData</title> <link rel="stylesheet" type="text/css" href="../../CRAN_web.css" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> table td { vertical-align: top; } </style> </head> <body> <h2>CNVassocData: Example data sets for association analysis of CNV data</h2> <p>This package contains example data sets with Copy Number Variants and imputed SNPs to be used by CNVassoc package.</p> <table summary="Package CNVassocData summary"> <tr> <td>Version:</td> <td>1.0</td> </tr> <tr> <td>Depends:</td> <td>R (&ge; 2.15.0)</td> </tr> <tr> <td>Published:</td> <td>2013-08-16</td> </tr> <tr> <td>Author:</td> <td>Juan R González, Isaac Subirana</td> </tr> <tr> <td>Maintainer:</td> <td>Juan R González &#x3c;&#x6a;&#x72;&#x67;&#x6f;&#x6e;&#x7a;&#x61;&#x6c;&#x65;&#x7a;&#x20;&#x61;&#x74;&#x20;&#x63;&#x72;&#x65;&#x61;&#x6c;&#x2e;&#x63;&#x61;&#x74;&#x3e;</td> </tr> <tr> <td>License:</td> <td><a href="../../licenses/GPL-2">GPL-2</a> | <a href="../../licenses/GPL-3">GPL-3</a> [expanded from: GPL (&ge; 2)]</td> </tr> <tr> <td>URL:</td> <td><a href="http://www.creal.cat/jrgonzalez/software.htm">http://www.creal.cat/jrgonzalez/software.htm</a></td> </tr> <tr> <td>NeedsCompilation:</td> <td>no</td> </tr> <tr> <td>CRAN&nbsp;checks:</td> <td><a href="../../checks/check_results_CNVassocData.html">CNVassocData results</a></td> </tr> </table> <h4>Downloads:</h4> <table summary="Package CNVassocData downloads"> <tr> <td> Reference&nbsp;manual: </td> <td> <a href="CNVassocData.pdf"> CNVassocData.pdf </a> </td> </tr> <tr> <td> Package&nbsp;source: </td> <td> <a href="../../../src/contrib/CNVassocData_1.0.tar.gz"> CNVassocData_1.0.tar.gz </a> </td> </tr> <tr> <td> Windows&nbsp;binaries: </td> <td> r-devel: <a href="../../../bin/windows/contrib/3.6/CNVassocData_1.0.zip">CNVassocData_1.0.zip</a>, r-release: <a href="../../../bin/windows/contrib/3.5/CNVassocData_1.0.zip">CNVassocData_1.0.zip</a>, r-oldrel: <a href="../../../bin/windows/contrib/3.4/CNVassocData_1.0.zip">CNVassocData_1.0.zip</a> </td> </tr> <tr> <td> OS&nbsp;X&nbsp;binaries: </td> <td> r-release: <a href="../../../bin/macosx/el-capitan/contrib/3.5/CNVassocData_1.0.tgz">CNVassocData_1.0.tgz</a>, r-oldrel: <a href="../../../bin/macosx/el-capitan/contrib/3.4/CNVassocData_1.0.tgz">CNVassocData_1.0.tgz</a> </td> </tr> </table> <h4>Linking:</h4> <p>Please use the canonical form <a href="https://CRAN.R-project.org/package=CNVassocData"><samp>https://CRAN.R-project.org/package=CNVassocData</samp></a> to link to this page.</p> </body> </html>
35.662338
309
0.653314
b2e71e54f3ede13551ca6c960041e280c9f907b3
761
py
Python
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
null
null
null
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
1
2022-02-17T17:43:52.000Z
2022-02-17T17:43:52.000Z
htdocs/geojson/hsearch.py
akrherz/depbackend
d43053319227a3aaaf7553c823e8e2e748fbe95d
[ "Apache-2.0" ]
2
2021-11-28T11:41:32.000Z
2022-01-26T17:12:03.000Z
"""search for HUC12 by name.""" import json from paste.request import parse_formvars from pyiem.util import get_dbconn def search(q): """Search for q""" pgconn = get_dbconn("idep") cursor = pgconn.cursor() d = dict(results=[]) cursor.execute( """SELECT huc_12, hu_12_name from huc12 WHERE hu_12_name ~* %s and scenario = 0 LIMIT 10""", (q,), ) for row in cursor: d["results"].append(dict(huc_12=row[0], name=row[1])) return d def application(environ, start_response): """DO Something""" form = parse_formvars(environ) q = form.get("q", "") headers = [("Content-type", "application/json")] start_response("200 OK", headers) return [json.dumps(search(q)).encode("ascii")]
23.78125
61
0.622865
5f9c6515c255fb981c594d054ccad4bedc66a80a
2,853
c
C
filesystems/unixfs/minixfs/itree_common.c
bispawel/macfuse
9f5773372ec7e9a8ab35c865eda7180a95edcdab
[ "AML" ]
7
2017-11-25T18:56:43.000Z
2020-10-22T21:17:33.000Z
filesystems/unixfs/minixfs/itree_common.c
bispawel/macfuse
9f5773372ec7e9a8ab35c865eda7180a95edcdab
[ "AML" ]
null
null
null
filesystems/unixfs/minixfs/itree_common.c
bispawel/macfuse
9f5773372ec7e9a8ab35c865eda7180a95edcdab
[ "AML" ]
1
2022-02-12T11:31:50.000Z
2022-02-12T11:31:50.000Z
/* Generic part */ typedef struct { block_t* p; block_t key; struct buffer_head* bh; } Indirect; static inline void add_chain(Indirect* p, struct buffer_head* bh, block_t* v) { p->key = *(p->p = v); p->bh = bh; } static inline int verify_chain(Indirect* from, Indirect* to) { while (from <= to && from->key == *from->p) from++; return (from > to); } static inline block_t* block_end(struct buffer_head *bh) { return (block_t*)((char*)bh->b_data + bh->b_size); } static inline Indirect* get_branch(struct inode* inode, int depth, int* offsets, Indirect chain[DEPTH], int* err) { struct super_block* sb = inode->I_sb; Indirect* p = chain; struct buffer_head *bh; *err = 0; /* i_data is not going away, no lock needed */ add_chain (chain, NULL, i_data(inode) + *offsets); if (!p->key) goto no_block; while (--depth) { bh = malloc(sizeof(struct buffer_head)); if (sb_bread_intobh(sb, block_to_cpu(p->key), bh) != 0) goto failure; if (!verify_chain(chain, p)) goto changed; add_chain(++p, bh, (block_t *)bh->b_data + *++offsets); if (!p->key) goto no_block; } return NULL; changed: brelse(bh); *err = -EAGAIN; goto no_block; failure: *err = -EIO; no_block: return p; } static inline int get_block(struct inode* inode, sector_t iblock, off_t* result) { *result = (off_t)0; int err = -EIO; int offsets[DEPTH]; Indirect chain[DEPTH]; Indirect* partial; int depth = block_to_path(inode, iblock, offsets); if (depth == 0) goto out; /* reread: */ partial = get_branch(inode, depth, offsets, chain, &err); /* simplest case - block found, no allocation needed */ if (!partial) { *result = (off_t)(block_to_cpu(chain[depth-1].key)); /* clean up and exit */ partial = chain + depth - 1; /* the whole chain */ goto cleanup; } /* Next simple case - plain lookup or failed read of indirect block */ cleanup: while (partial > chain) { brelse(partial->bh); partial--; } out: return err; } static inline int all_zeroes(block_t* p, block_t* q) { while (p < q) if (*p++) return 0; return 1; } static inline unsigned nblocks(loff_t size, struct super_block* sb) { int k = sb->s_blocksize_bits - 10; unsigned blocks, res, direct = DIRECT, i = DEPTH; blocks = (size + sb->s_blocksize - 1) >> (BLOCK_SIZE_BITS + k); res = blocks; while (--i && blocks > direct) { blocks -= direct; blocks += sb->s_blocksize/sizeof(block_t) - 1; blocks /= sb->s_blocksize/sizeof(block_t); res += blocks; direct = 1; } return res; }
22.642857
80
0.57238
6b65458b9be913a7bf52765da49e2e880374b56a
1,790
asm
Assembly
programs/oeis/001/A001045.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/001/A001045.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/001/A001045.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A001045: Jacobsthal sequence (or Jacobsthal numbers): a(n) = a(n-1) + 2*a(n-2), with a(0) = 0, a(1) = 1; also a(n) = nearest integer to 2^n/3. ; 0,1,1,3,5,11,21,43,85,171,341,683,1365,2731,5461,10923,21845,43691,87381,174763,349525,699051,1398101,2796203,5592405,11184811,22369621,44739243,89478485,178956971,357913941,715827883,1431655765,2863311531,5726623061,11453246123,22906492245,45812984491,91625968981,183251937963,366503875925,733007751851,1466015503701,2932031007403,5864062014805,11728124029611,23456248059221,46912496118443,93824992236885,187649984473771,375299968947541,750599937895083,1501199875790165,3002399751580331,6004799503160661,12009599006321323,24019198012642645,48038396025285291,96076792050570581,192153584101141163,384307168202282325,768614336404564651,1537228672809129301,3074457345618258603,6148914691236517205,12297829382473034411,24595658764946068821,49191317529892137643,98382635059784275285,196765270119568550571,393530540239137101141,787061080478274202283,1574122160956548404565,3148244321913096809131,6296488643826193618261,12592977287652387236523,25185954575304774473045,50371909150609548946091,100743818301219097892181,201487636602438195784363,402975273204876391568725,805950546409752783137451,1611901092819505566274901,3223802185639011132549803,6447604371278022265099605,12895208742556044530199211,25790417485112089060398421,51580834970224178120796843,103161669940448356241593685,206323339880896712483187371,412646679761793424966374741,825293359523586849932749483,1650586719047173699865498965,3301173438094347399730997931,6602346876188694799461995861,13204693752377389598923991723,26409387504754779197847983445,52818775009509558395695966891,105637550019019116791391933781,211275100038038233582783867563 mov $1,2 pow $1,$0 add $1,1 div $1,3 mov $0,$1
198.888889
1,596
0.898324
cc26a69f4bdcd259a01c9d88077ea7c837917bff
655
kt
Kotlin
koverage/src/main/java/net/sarazan/koverage/testers/ConstructorTester.kt
asarazan/koverage
4dfcf24afecd97c3d88322170adf050dbbf91aee
[ "Apache-2.0" ]
9
2018-01-23T21:35:50.000Z
2020-06-11T20:23:12.000Z
koverage/src/main/java/net/sarazan/koverage/testers/ConstructorTester.kt
asarazan/koverage
4dfcf24afecd97c3d88322170adf050dbbf91aee
[ "Apache-2.0" ]
16
2017-12-19T20:54:41.000Z
2021-08-10T18:23:26.000Z
koverage/src/main/java/net/sarazan/koverage/testers/ConstructorTester.kt
asarazan/koverage
4dfcf24afecd97c3d88322170adf050dbbf91aee
[ "Apache-2.0" ]
2
2018-05-03T23:12:14.000Z
2020-11-24T02:42:19.000Z
package net.sarazan.koverage.testers import net.sarazan.koverage.Coverable import net.sarazan.koverage.util.invokeDefault import kotlin.reflect.KClass import kotlin.reflect.full.primaryConstructor import kotlin.reflect.jvm.isAccessible /** * Created by Aaron Sarazan on 12/21/17 */ @Suppress("UNCHECKED_CAST") object ConstructorTester : Coverable { override fun <T : Any> cover(klass: KClass<T>) { if (klass.java.isEnum) return if (klass.isCompanion) return if (klass.objectInstance != null) return klass.primaryConstructor?.let { it.isAccessible = true it.invokeDefault() } } }
27.291667
52
0.699237
b9746fdc759e6b4b7627f1b285320c56c6617ccd
124
sql
SQL
migrations/sqls/20200221235141-AddEx10IndicesAndTable/sqlite-down.sql
rachit2501/sql-fundamentals
cb4bb1bcc6288e9d96b229e7961235773626b033
[ "BSD-3-Clause" ]
null
null
null
migrations/sqls/20200221235141-AddEx10IndicesAndTable/sqlite-down.sql
rachit2501/sql-fundamentals
cb4bb1bcc6288e9d96b229e7961235773626b033
[ "BSD-3-Clause" ]
null
null
null
migrations/sqls/20200221235141-AddEx10IndicesAndTable/sqlite-down.sql
rachit2501/sql-fundamentals
cb4bb1bcc6288e9d96b229e7961235773626b033
[ "BSD-3-Clause" ]
null
null
null
-- Put your SQLite "down" migration here DROP UNIQUE INDEX orderdetailuniqueproduct; DROP TABLE CustomerOrderTransaction;
20.666667
43
0.822581
b2e911b19926607cd6e241f7b09f34ddcf0231cd
2,556
py
Python
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
fastinference.py
wkcw/VariousDiscriminator-CycleGan
de9c033aeed1c429f37c531056c1f74cb51a771c
[ "MIT" ]
null
null
null
""" A fast version of the original inference. Constructing one graph to infer all the samples. Originaly one graph for each sample. """ import tensorflow as tf import os from model import CycleGAN import utils import scipy.misc import numpy as np try: from os import scandir except ImportError: # Python 2 polyfill module from scandir import scandir FLAGS = tf.flags.FLAGS tf.flags.DEFINE_string('model', '', 'model path (.pb)') tf.flags.DEFINE_string('input', 'data/apple', 'input image path') tf.flags.DEFINE_string('output', 'samples/apple', 'output image path') tf.flags.DEFINE_integer('image_size', 128, 'image size, default: 128') def data_reader(input_dir): file_paths = [] for img_file in scandir(input_dir): if img_file.name.endswith('.jpg') and img_file.is_file(): file_paths.append(img_file.path) return file_paths def inference(): graph = tf.Graph() with graph.as_default(): with tf.gfile.FastGFile(FLAGS.model, 'rb') as model_file: graph_def = tf.GraphDef() graph_def.ParseFromString(model_file.read()) input_image = tf.placeholder(tf.float32,shape=[FLAGS.image_size, FLAGS.image_size, 3]) [output_image] = tf.import_graph_def(graph_def, input_map={'input_image': input_image}, return_elements=['output_image:0'], name='output') #print type(output_image), output_image file_list = data_reader(FLAGS.input) whole = len(file_list) cnt = 0 with tf.Session(graph=graph) as sess: for file in file_list: tmp_image = scipy.misc.imread(file) tmp_image = scipy.misc.imresize(tmp_image, (FLAGS.image_size, FLAGS.image_size, 3)) processed_image = tmp_image / 127.5 - 1 processed_image = np.asarray(processed_image, dtype=np.float32) predicted_image = sess.run(output_image, feed_dict={input_image: processed_image}) predicted_image = np.squeeze(predicted_image) #print tmp_image.shape, predicted_image.shape save_image = np.concatenate((tmp_image, predicted_image), axis=1) print cnt output_file_name = file.split('/')[-1] try: os.makedirs(FLAGS.output) except os.error, e: pass scipy.misc.imsave(FLAGS.output + '/{}'.format(output_file_name), save_image) cnt += 1 if cnt//whole > 0.05: print cnt//whole, 'done' def main(unused_argv): inference() if __name__ == '__main__': tf.app.run()
31.555556
91
0.658842
621b5c327b65ff5367f9ac87e21bef065ecb429c
566
kt
Kotlin
app/src/main/java/openfoodfacts/github/scrachx/openfood/category/network/CategoryResponse.kt
machiav3lli/openfoodfacts-androidapp
bbd9fed80455b434eb79674a251c740160731ea8
[ "Apache-2.0" ]
651
2017-02-10T02:30:01.000Z
2022-03-31T19:11:05.000Z
app/src/main/java/openfoodfacts/github/scrachx/openfood/category/network/CategoryResponse.kt
machiav3lli/openfoodfacts-androidapp
bbd9fed80455b434eb79674a251c740160731ea8
[ "Apache-2.0" ]
3,760
2017-02-09T15:20:36.000Z
2022-03-31T22:06:34.000Z
app/src/main/java/openfoodfacts/github/scrachx/openfood/category/network/CategoryResponse.kt
machiav3lli/openfoodfacts-androidapp
bbd9fed80455b434eb79674a251c740160731ea8
[ "Apache-2.0" ]
548
2017-03-13T22:23:22.000Z
2022-03-24T09:26:02.000Z
package openfoodfacts.github.scrachx.openfood.category.network import com.fasterxml.jackson.annotation.JsonIgnoreProperties /** * Class for response received from CategoryNetworkService class */ data class CategoryResponse @JvmOverloads constructor( val count: Int = 0, val tags: List<Tag> = emptyList() ) { @JsonIgnoreProperties(ignoreUnknown = true) data class Tag @JvmOverloads constructor( val id: String = "", val name: String = "", val url: String = "", val products: Int = 0 ) }
28.3
64
0.657244
d0f323e1ee7b6c07d53cce9aea517a5cf67f8569
2,038
kt
Kotlin
app/src/main/java/com/tsl/androidbase/fragment/first/FirstFragment.kt
Jowney23/AndroidBaseProject
278cfbc6a02ee9602016b3304e8a7b285bb48987
[ "Apache-2.0" ]
1
2021-06-22T02:34:13.000Z
2021-06-22T02:34:13.000Z
app/src/main/java/com/tsl/androidbase/fragment/first/FirstFragment.kt
Jowney23/AndroidBaseProject
278cfbc6a02ee9602016b3304e8a7b285bb48987
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/tsl/androidbase/fragment/first/FirstFragment.kt
Jowney23/AndroidBaseProject
278cfbc6a02ee9602016b3304e8a7b285bb48987
[ "Apache-2.0" ]
null
null
null
package com.tsl.androidbase.fragment.first import android.content.Context import android.os.Bundle import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.Button import androidx.fragment.app.Fragment import androidx.lifecycle.ViewModelProvider import androidx.navigation.Navigation import com.jowney.common.util.logger.L import com.tsl.androidbase.R import kotlinx.android.synthetic.main.fragment_first.* import org.greenrobot.eventbus.EventBus import org.greenrobot.eventbus.Subscribe import org.greenrobot.eventbus.ThreadMode import java.util.concurrent.Executors class FirstFragment : Fragment() { companion object { var TAG = "JFragment" } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) EventBus.getDefault().register(this) } override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { var view = inflater.inflate(R.layout.fragment_first, container, false) view.findViewById<Button>(R.id.id_first_ft_bt1).setOnClickListener { Navigation.findNavController(it).navigate(R.id.action_firstFragment_to_secondFragment) } view.findViewById<Button>(R.id.id_first_ft_bt2).setOnClickListener { EventBus.getDefault().post("123") } return view } override fun onResume() { super.onResume() Executors.newSingleThreadExecutor().submit{ L.v("123 开始发送") EventBus.getDefault().post("123") EventBus.getDefault().post("123") EventBus.getDefault().post("123") EventBus.getDefault().post("123") EventBus.getDefault().post("123") EventBus.getDefault().post("123") L.v("123 发送完了") } } @Subscribe(threadMode = ThreadMode.ASYNC) fun test(i: String) { Thread.sleep(3000) L.v(i + "执行") } }
29.536232
98
0.687929
fbec8503ce6d9971463e241885b62a687b178f00
2,843
asm
Assembly
Lab05/Task04.asm
PrabalChowdhury/CSE-341-MICROPROCESSOR
88f0dea914890c5aa5bc10d0131233b2ebd27586
[ "MIT" ]
null
null
null
Lab05/Task04.asm
PrabalChowdhury/CSE-341-MICROPROCESSOR
88f0dea914890c5aa5bc10d0131233b2ebd27586
[ "MIT" ]
null
null
null
Lab05/Task04.asm
PrabalChowdhury/CSE-341-MICROPROCESSOR
88f0dea914890c5aa5bc10d0131233b2ebd27586
[ "MIT" ]
null
null
null
.MODEL SMalL .STACK 100H .DATA X DB "ENTER A HEX DIGIT: $" Y DB "IN DECIMAL IT IS 1$" Z DB "IN DECIMAL IT IS $" P DB "DO YOU WANT TO DO IT AGAIN? :$" Q DB "ILLEGAL CHARACTER, $" R DB "INSERT AGAIN: $" .CODE MAIN PROC MOV AX,@DATA MOV DS,AX SRT: lea dx,X mov ah,9 int 21H mov ah,1 int 21H mov cl,al mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H cmp cl,41H je AB cmp cl,42H je AB cmp cl,43H je AB cmp cl,44H je AB cmp cl,45H je AB cmp cl,46H je AB cmp cl,30H je AD cmp cl,31H je AD cmp cl,32H je AD cmp cl,33H je AD cmp cl,34H je AD cmp cl,35H je AD cmp cl,36H je AD cmp cl,37H je AD cmp cl,38H je AD cmp cl,39H je AD JMP AC AB: sub cl,11H lea DX, Y mov ah,9 int 21H mov dl, cl mov ah,2 int 21H mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H lea DX,P mov ah,9 int 21H mov ah,1 int 21H mov cl,al mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H cmp cl,59H je SRT cmp cl,79H je SRT cmp cl,4EH je EXT cmp cl,6EH je EXT AD: lea DX,Z mov ah,9 int 21H mov dl, cl mov ah,2 int 21H mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H lea DX,P mov ah,9 int 21H mov ah,1 int 21H mov cl,al mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H cmp cl,59H je SRT cmp cl,79H je SRT cmp cl,4Eh je EXT cmp cl,6Eh je EXT AC: lea DX,Q mov ah,9 int 21H JMP SRT2 SRT2: lea DX,R mov ah,9 int 21H mov ah,1 int 21H mov cl,al mov ah,2 mov dl,0DH int 21H mov dl,0ah int 21H cmp cl,41H je AB cmp cl,42H je AB cmp cl,43H je AB cmp cl,44H je AB cmp cl,45H je AB cmp cl,46H je AB cmp cl,30H je AD cmp cl,31H je AD cmp cl,32H je AD cmp cl,33H je AD cmp cl,34H je AD cmp cl,35H je AD cmp cl,36H je AD cmp cl,37H je AD cmp cl,38H je AD cmp cl,39H je AD JMP AC EXT: MOV AX,4C00H INT 21H MAIN ENDP END MAIN
14.286432
38
0.408371
3970eca533564d5be68a1def6d47268b0c34e9c5
67
html
HTML
help/404.html
ChoicescriptIDE/ChoiceScriptIDE
08b35b06a76314b8a56fdd4f3a5eb8ebddccd9ae
[ "MIT" ]
7
2017-04-10T05:27:32.000Z
2021-08-18T05:45:47.000Z
help/404.html
ChoicescriptIDE/ChoiceScriptIDE
08b35b06a76314b8a56fdd4f3a5eb8ebddccd9ae
[ "MIT" ]
5
2020-02-24T20:24:35.000Z
2022-02-26T01:19:35.000Z
help/404.html
ChoicescriptIDE/ChoiceScriptIDE
08b35b06a76314b8a56fdd4f3a5eb8ebddccd9ae
[ "MIT" ]
2
2018-09-12T23:27:15.000Z
2020-01-03T14:58:06.000Z
<h1>Ever so sorry...</h1> <h2>That page doesn't seem to exist!</h2>
33.5
41
0.656716
50fa7b672b34598dcb789d53adabdbd1a315c667
555
go
Go
Array.go
fizyomatik/learning-go
fb45fd40aa9e4c3d3d9633901a9e74c2419821b9
[ "Apache-2.0" ]
null
null
null
Array.go
fizyomatik/learning-go
fb45fd40aa9e4c3d3d9633901a9e74c2419821b9
[ "Apache-2.0" ]
null
null
null
Array.go
fizyomatik/learning-go
fb45fd40aa9e4c3d3d9633901a9e74c2419821b9
[ "Apache-2.0" ]
null
null
null
package main import ( "fmt" "os" "strconv" ) const ( EUR = iota GBP JPY ) func main() { rates := [...]float64{ EUR: 0.88, GBP: 0.78, JPY: 113.02, } args := os.Args if len(args) != 2 { fmt.Println("Please provide the amount to be converted.") return } n, err := strconv.Atoi(args[1]) if err != nil { fmt.Println("Give me a number") return } fmt.Printf("%d USD is %g EUR\n", n, float64(n)*rates[EUR]) fmt.Printf("%d USD is %g GBY\n", n, float64(n)*rates[GBP]) fmt.Printf("%d USD is %g JPY\n", n, float64(n)*rates[JPY]) }
15
59
0.587387
bef158ef7d03e60171d536d7cecd0d2b3a07ffe3
744
asm
Assembly
oeis/143/A143056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/143/A143056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/143/A143056.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A143056: a(n) = Re(b(n)) where b(n)=(1+i)*b(n-1)+b(n-2), with b(1)=0, b(2)=1. ; Submitted by Christian Krause ; 0,1,1,1,0,-3,-9,-19,-32,-43,-39,5,128,377,783,1305,1728,1513,-367,-5495,-15744,-32267,-53177,-69371,-58464,21693,235305,656909,1328896,2165489,2781855,2249009,-1161856,-10052911,-27385695,-54696687,-88125696,-111427091,-86075113,58797853,428575584,1140728485,2249936377,3583923733,4457814912,3275028585,-2867726673,-18235006903,-47477885888,-92495347015,-145652953551,-178115128423,-123761676928,136277900261,774439010919,1974516504117,3800238884640,5915321847181,7107171675209,4639349077021 mov $2,1 lpb $0 sub $0,1 add $1,$3 sub $3,$4 mov $4,$2 mov $2,$3 add $5,$4 mov $3,$5 add $4,$1 add $5,$2 lpe mov $0,$5
41.333333
493
0.71371
39feaa202c08b787d7321d1012e8ca249c9b9217
454
java
Java
Slithice-Origin/src/jqian/sootex/dependency/pdg/CtrlDependenceEdge.java
coder-chenzhi/Slithice
a91fb7df2839f6f473311341c832599b23879a06
[ "MIT" ]
null
null
null
Slithice-Origin/src/jqian/sootex/dependency/pdg/CtrlDependenceEdge.java
coder-chenzhi/Slithice
a91fb7df2839f6f473311341c832599b23879a06
[ "MIT" ]
null
null
null
Slithice-Origin/src/jqian/sootex/dependency/pdg/CtrlDependenceEdge.java
coder-chenzhi/Slithice
a91fb7df2839f6f473311341c832599b23879a06
[ "MIT" ]
null
null
null
package jqian.sootex.dependency.pdg; /** * A control dependence edge. */ public class CtrlDependenceEdge extends DependenceEdge { public CtrlDependenceEdge(DependenceNode from,DependenceNode to){ super(from,to); } public boolean equals(Object that){ if(that.getClass()!=this.getClass()) return false; return super.equals(that); } public int hashCode(){ return super.hashCode(); } }
20.636364
69
0.64978
0b319f1e0f623f7a373575a0813d2b01691f2dd6
1,514
kt
Kotlin
src/commonMain/kotlin/com/github/dwursteisen/minigdx/PlatformContext.kt
dwursteisen/mini-gdx
4120365d3856500884df805aaf5fb8845c58b4c3
[ "MIT" ]
11
2020-02-20T13:20:58.000Z
2021-03-24T00:30:56.000Z
src/commonMain/kotlin/com/github/dwursteisen/minigdx/PlatformContext.kt
dwursteisen/mini-gdx
4120365d3856500884df805aaf5fb8845c58b4c3
[ "MIT" ]
1
2020-07-03T22:51:48.000Z
2020-07-03T22:51:48.000Z
src/commonMain/kotlin/com/github/dwursteisen/minigdx/PlatformContext.kt
dwursteisen/mini-gdx
4120365d3856500884df805aaf5fb8845c58b4c3
[ "MIT" ]
1
2021-03-08T20:25:43.000Z
2021-03-08T20:25:43.000Z
package com.github.dwursteisen.minigdx import com.github.dwursteisen.minigdx.file.FileHandler import com.github.dwursteisen.minigdx.game.Game import com.github.dwursteisen.minigdx.graphics.ViewportStrategy import com.github.dwursteisen.minigdx.input.InputHandler import com.github.dwursteisen.minigdx.logger.Logger interface PlatformContext { /** * Configuration used to create the game and the platform. */ val configuration: GameConfiguration /** * Create the GL object, used for communicating with the GL Driver. */ fun createGL(): GL /** * Create the File Handler: the entry point to access file on disk, ... */ fun createFileHandler(logger: Logger, gameContext: GameContext): FileHandler /** * Create the Input Handler: it's the entry point to manage game inputs (keyboard, touch, mouse) */ fun createInputHandler(logger: Logger, gameContext: GameContext): InputHandler /** * Create the viewport Strategy responsible to get the displayed grahical area. */ fun createViewportStrategy(logger: Logger): ViewportStrategy /** * Create the logger */ fun createLogger(): Logger /** * Create the game options */ fun createOptions(): Options /** * Start the game using the platform specific creation code. * The game will be created by [gameFactory] using the [gameContext] * created in by the platform. */ fun start(gameFactory: (GameContext) -> Game) }
29.686275
100
0.694848
f22cd3bacbeacc69185b83c02e0e43653439e203
3,660
swift
Swift
HCCardView/Other/ViewController.swift
HC1058503505/HCCardView
b342c19038422d1948fceaf99f64f243f5649cfd
[ "MIT" ]
1
2017-07-19T02:23:52.000Z
2017-07-19T02:23:52.000Z
HCCardView/Other/ViewController.swift
HC1058503505/HCCardView
b342c19038422d1948fceaf99f64f243f5649cfd
[ "MIT" ]
null
null
null
HCCardView/Other/ViewController.swift
HC1058503505/HCCardView
b342c19038422d1948fceaf99f64f243f5649cfd
[ "MIT" ]
null
null
null
// // ViewController.swift // HCCardView // // Created by UltraPower on 2017/5/23. // Copyright © 2017年 UltraPower. All rights reserved. // import UIKit import Foundation class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.title = "HCCardView" automaticallyAdjustsScrollViewInsets = false let titles:[String] = ["全部","视频","图片","段子","互动区","相册","网红","投票","美女"]; let childVCs:[UIViewController] = { () -> [UIViewController] in var childM:[UIViewController] = [UIViewController]() let allVC = HCContentViewController(type: HCContentViewControllerType.All) let videoVC = HCContentViewController(type: HCContentViewControllerType.Video) let pictureVC = HCContentViewController(type: HCContentViewControllerType.Picture) let jokeVC = HCContentViewController(type: HCContentViewControllerType.Joke) let interactionVC = HCContentViewController(type: HCContentViewControllerType.Interaction) let ablumVC = HCContentViewController(type: HCContentViewControllerType.Album) let netpopularVC = HCContentViewController(type: HCContentViewControllerType.NetPopular) let voteVC = HCContentViewController(type: HCContentViewControllerType.Vote) let beautyVC = HCContentViewController(type: HCContentViewControllerType.Beauty) childM.append(contentsOf: [allVC,videoVC,pictureVC,jokeVC,interactionVC,ablumVC,netpopularVC,voteVC,beautyVC]) return childM }() var cardViewStyle:HCCardViewStyle = HCCardViewStyle() cardViewStyle.headerViewBGColor = UIColor.orange // 标题栏背景色 cardViewStyle.headerViewHeight = 44; // 标题栏高度 cardViewStyle.itemNormalFontSize = 15; // 标题文字Normal模式文字大小 cardViewStyle.itemSelectedFontSize = 18; // 标题文字Selected模式文字大小 cardViewStyle.itemNormalColor = UIColor.white // 标题文字Normal模式文字颜色 cardViewStyle.itemSelectedColor = UIColor.red // 标题文字Selected模式文字颜色 cardViewStyle.isGradient = true // 标题文字切换时文字颜色是否渐变 // cardViewStyle.isShowLineView = false // 是否展示下滑view cardViewStyle.lineViewColor = UIColor.green // 下滑view背景色 // cardViewStyle.isShowCoverView = false // 是否item背景view cardViewStyle.coverViewColor = UIColor.white // item背景view背景色 let cardV: HCCardView = HCCardView(frame: CGRect(x: 0, y: 64, width: view.bounds.width, height: view.bounds.height - 64), titles: titles, childVCs: childVCs, parentVC: self, cardViewStyle: cardViewStyle) view.addSubview(cardV) // HCNetWorking.request("http://s.budejie.com/topic/list/zuixin/1/bs0315-iphone-4.5.6/0-20.json", method: .GET, success: { (result) in // do { // let resultDic = try JSONSerialization.jsonObject(with: result, options: .allowFragments) as! [String:Any] // print(resultDic["list"] ?? "nil") // } catch { // } // // }) { (error) in // print(error) // } // HCNetWorking.request("http://s.budejie.com/topic/list/zuixin/1/bs0315-iphone-4.5.6/0-20.json") // .responseJSON { (res) in // print(res) // } // .responseString { (res) in // print(res) // } } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
46.329114
211
0.635519
3e60242f085b7979e725509458435d6d1ac79d2c
7,008
h
C
OpenGL4/uniformbuffer.h
freegraphics/cpputils
3f990d4765a50c7428bd6a4929a83ff49d3567bd
[ "MIT" ]
null
null
null
OpenGL4/uniformbuffer.h
freegraphics/cpputils
3f990d4765a50c7428bd6a4929a83ff49d3567bd
[ "MIT" ]
null
null
null
OpenGL4/uniformbuffer.h
freegraphics/cpputils
3f990d4765a50c7428bd6a4929a83ff49d3567bd
[ "MIT" ]
null
null
null
#pragma once #include "utils.h" #include <utils/strconv.h> #include "glprogram.h" namespace detail { template<class _DataStruct> interface IUniformBlockLayout { virtual void get_names(std::vector<const GLchar*>& _names) const = 0; virtual void get_ptrs(const _DataStruct& _data,std::vector<const void*>& _ptrs) const = 0; virtual void get_sizes(const _DataStruct& _data,std::vector<size_t>& _sizes) const = 0; }; };//namespace detail template<class _DataStruct> struct UniformBlockLayoutBase : public detail::IUniformBlockLayout<_DataStruct> { protected: interface IItemInfo { virtual ~IItemInfo() {} virtual const GLchar* get_name() const = 0; virtual const void* get_pointer(const _DataStruct& _data) const = 0; virtual size_t get_size(const _DataStruct& _data) const = 0; }; template<typename _VarType> struct ItemInfo : public IItemInfo { std::auto_ptr<GLchar> m_name; _VarType _DataStruct::* m_member_ptr; ItemInfo(const CString& _name,_VarType _DataStruct::* _member_ptr) :m_member_ptr(_member_ptr) { string_converter<TCHAR,GLchar> name(_name,CP_ACP); m_name = std::auto_ptr<GLchar>(new GLchar[name.get_length()+1]); size_t i = 0; for(i=0;i<(size_t)name.get_length();i++) { m_name.get()[i] = ((GLchar*)name)[i]; } m_name.get()[i] = 0; } virtual const GLchar* get_name() const { return m_name.get(); } virtual const void* get_pointer(const _DataStruct& _data) const { return Private::to_pointer(_data.*m_member_ptr); } virtual size_t get_size(const _DataStruct& _data) const { return Private::get_size(_data.*m_member_ptr); } }; protected: ptrvector<IItemInfo> items; public: UniformBlockLayoutBase() { } template<typename _VarType> void add(const CString& _name,_VarType _DataStruct::* _member_ptr) { items.push_back(new ItemInfo<_VarType>(_name,_member_ptr)); } virtual void get_names(std::vector<const GLchar*>& _names) const { ptrvector<IItemInfo>::const_iterator it = items.begin() ,ite = items.end() ; for(;it!=ite;++it) { const IItemInfo* ii = *it; _names.push_back(ii->get_name()); } } virtual void get_ptrs(const _DataStruct& _data,std::vector<const void*>& _ptrs) const { ptrvector<IItemInfo>::const_iterator it = items.begin() ,ite = items.end() ; for(;it!=ite;++it) { const IItemInfo* ii = *it; _ptrs.push_back(ii->get_pointer(_data)); } } virtual void get_sizes(const _DataStruct& _data,std::vector<size_t>& _sizes) const { ptrvector<IItemInfo>::const_iterator it = items.begin() ,ite = items.end() ; for(;it!=ite;++it) { const IItemInfo* ii = *it; _sizes.push_back(ii->get_size(_data)); } } };// template<> struct UniformBlockLayoutBase namespace Private { template<typename _UniformBlockStruct> inline const detail::IUniformBlockLayout<_UniformBlockStruct>& get_uniform_block_layout() { typedef typename _UniformBlockStruct::UniformBlockLayout DataUniformBlockLayout; static DataUniformBlockLayout _; return _; } template<class _UniformBlockStruct> inline bool save_data_to_buffer( const _UniformBlockStruct& _data ,std::vector<byte>& _buf ,const UniformBlockIndex& _block_index ) { VERIFY_EXIT1(!_block_index.is_error_index(),false); const detail::IUniformBlockLayout<_UniformBlockStruct>& layout = get_uniform_block_layout<_UniformBlockStruct>(); std::vector<const GLchar*> names; std::vector<const void*> ptrs; std::vector<size_t> sizes; layout.get_names(names); layout.get_ptrs(_data,ptrs); layout.get_sizes(_data,sizes); return save_data_to_buffer(names,ptrs,sizes,_buf,_block_index); } inline bool save_data_to_buffer( const std::vector<const GLchar*>& _names ,const std::vector<const void*>& _ptrs ,const std::vector<size_t>& _sizes ,std::vector<byte>& _buf ,const UniformBlockIndex& _block_index ) { VERIFY_EXIT1(!_block_index.is_error_index(),false); _buf.resize(_block_index.size()); std::fill(_buf.begin(),_buf.end(),0); VERIFY_EXIT1(_names.size()==_ptrs.size(),false); VERIFY_EXIT1(_names.size()==_sizes.size(),false); std::vector<GLuint> indices; std::vector<GLint> size; std::vector<GLint> offset; std::vector<GLint> type; indices.resize(_names.size()); size.resize(_names.size()); offset.resize(_names.size()); type.resize(_names.size()); glGetUniformIndices(_block_index.program(),_names.size(),&_names[0],&indices[0]); GLenum err_code = GL_NO_ERROR; if(is_error(err_code)) return false; glGetActiveUniformsiv(_block_index.program(),_names.size(),&indices[0] ,GL_UNIFORM_OFFSET, &offset[0] ); if(is_error(err_code)) return false; glGetActiveUniformsiv(_block_index.program(),_names.size(),&indices[0] ,GL_UNIFORM_SIZE, &size[0] ); if(is_error(err_code)) return false; glGetActiveUniformsiv(_block_index.program(),_names.size(),&indices[0] ,GL_UNIFORM_TYPE, &type[0] ); if(is_error(err_code)) return false; size_t i = 0; for(i=0;i<_names.size();i++) { size_t sz = size[i]*get_gl_type_size(type[i]); if(sz!=_sizes[i]) return false; if(offset[i]>=(int)_buf.size() || offset[i]+sz>=_buf.size()) return false; memcpy(&_buf[offset[i]],_ptrs[i],sz); } return true; } };//namespace Private struct Buffer; struct UniformBuffer { protected: GLuint m_uniform_buffer_id; GLenum m_err_code; size_t m_size; public: UniformBuffer() :m_uniform_buffer_id(0) ,m_err_code(GL_NO_ERROR) ,m_size(0) { } ~UniformBuffer() { clear(); } GLenum get_last_error() const {return m_err_code;} bool create() { clear(); glGenBuffers(1,&m_uniform_buffer_id); if(is_error(m_err_code)) return false; return bind(); } void clear() { if(glIsBuffer(m_uniform_buffer_id)) { stop_using_buffer(); glDeleteBuffers(1,&m_uniform_buffer_id); } m_uniform_buffer_id = 0; m_size = 0; } template<typename _UniformBlockStruct> bool set_data( IN GLProgram& _program ,IN const CString& _block_name,IN const _UniformBlockStruct& _data ,IN GLenum _usage = GL_STATIC_DRAW ) { if(!prepare_buffer()) return false; std::vector<byte> buf; UniformBlockIndex uniform_block = _program.get_uniform_block_index(_block_name); if(uniform_block.is_error_index()) return false; if(!Private::save_data_to_buffer(_data,buf,uniform_block)) { if(!is_error(m_err_code)) m_err_code = GL_INVALID_VALUE; test_error(m_err_code); return false; } glBufferData(GL_UNIFORM_BUFFER,uniform_block.size(),&buf[0],_usage); if(is_error(m_err_code)) return false; m_size = uniform_block.size(); glBindBufferBase(GL_UNIFORM_BUFFER,uniform_block.index(),m_uniform_buffer_id); return !is_error(m_err_code); } bool bind() { glBindBuffer(GL_UNIFORM_BUFFER,m_uniform_buffer_id); return !is_error(m_err_code); } protected: bool prepare_buffer() { if(!glIsBuffer(m_uniform_buffer_id)) { clear(); return create(); } else { return bind(); } } friend struct Buffer; };//struct UniformBuffer
24.418118
115
0.714469
71fcb89761cbc6bcf71c32a29bf5ae3a9f403cf8
1,609
tsx
TypeScript
components/card.tsx
seanbreckenridge/projects
4ecaa85a6a299f276783a4bfe0626f77dd325393
[ "MIT" ]
3
2020-07-04T12:18:47.000Z
2021-04-24T22:42:49.000Z
components/card.tsx
seanbreckenridge/projects
4ecaa85a6a299f276783a4bfe0626f77dd325393
[ "MIT" ]
8
2020-11-25T08:10:33.000Z
2021-10-11T03:47:48.000Z
components/card.tsx
seanbreckenridge/projects
4ecaa85a6a299f276783a4bfe0626f77dd325393
[ "MIT" ]
null
null
null
import React from "react"; import styles from "../styles/Home.module.css"; import { Repository } from "../lib/parseData"; import { IconBrandGithub } from "@tabler/icons"; import FooterIcon, { Website } from "./icons"; import LazyImage from "./lazy_image"; interface IRepo { repo: Repository; } const RepoCard = React.memo(({ repo }: IRepo) => { const remoteURL = "https://github.com/" + repo.full_name; return ( <div className={styles.card}> <div className={styles.cardTitle}> <a href={remoteURL}> <h3>{repo.name}</h3> </a> <span>{repo.language}</span> </div> <div className={styles.cardDescription}> <div dangerouslySetInnerHTML={{ __html: repo.description }}></div> {repo.full_name === "seanbreckenridge/projects" ? ( <div className={styles.lazyImageContainer}> <iframe src="https://sean.fish/projects" /> </div> ) : ( <LazyImage src={repo.img} dimensions={repo.dimensions} name={repo.name} /> )} </div> <hr /> <div className={styles.cardFooter}> <FooterIcon href={remoteURL} linkText="Github"> <IconBrandGithub /> </FooterIcon> <Website url={repo.url} /> </div> </div> ); }); interface IRepoGrid { repos: Repository[]; } const RepoGrid = React.memo(({ repos }: IRepoGrid) => { return ( <> {repos.map((repo: Repository) => { return <RepoCard key={repo.full_name} repo={repo} />; })} </> ); }); export default RepoGrid;
24.753846
74
0.563704
e071d95b395566ccb04ebec889234667e3c26376
4,901
swift
Swift
Source/Swift/UIDocumentPickerViewController.swift
plotfi/Swift-UIKit
ac8c37a70b635e096ae9bae9e90f61a6bb355e93
[ "BSD-3-Clause" ]
1
2021-11-28T08:08:09.000Z
2021-11-28T08:08:09.000Z
Source/Swift/UIDocumentPickerViewController.swift
plotfi/Swift-UIKit
ac8c37a70b635e096ae9bae9e90f61a6bb355e93
[ "BSD-3-Clause" ]
null
null
null
Source/Swift/UIDocumentPickerViewController.swift
plotfi/Swift-UIKit
ac8c37a70b635e096ae9bae9e90f61a6bb355e93
[ "BSD-3-Clause" ]
null
null
null
@_exported import Foundation protocol UIDocumentPickerDelegate : NSObjectProtocol { @available(iOS 11.0, *) optional func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) @available(iOS 11.0, *) @available(swift, obsoleted: 3, renamed: "documentPicker(_:didPickDocumentsAt:)") optional func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAtURLs urls: [URL]) @available(iOS 8.0, *) optional func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) @available(iOS, introduced: 8.0, deprecated: 11.0) optional func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) @available(swift, obsoleted: 3, renamed: "documentPicker(_:didPickDocumentAt:)") @available(iOS, introduced: 8.0, deprecated: 11.0) optional func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAtURL url: URL) } @available(iOS, introduced: 8.0, deprecated: 14.0, message: "Use appropriate initializers instead") enum UIDocumentPickerMode : UInt { init?(rawValue: UInt) var rawValue: UInt { get } typealias RawValue = UInt case `import` @available(swift, obsoleted: 3, renamed: "import") static var Import: UIDocumentPickerMode { get } case open @available(swift, obsoleted: 3, renamed: "open") static var Open: UIDocumentPickerMode { get } case exportToService @available(swift, obsoleted: 3, renamed: "exportToService") static var ExportToService: UIDocumentPickerMode { get } case moveToService @available(swift, obsoleted: 3, renamed: "moveToService") static var MoveToService: UIDocumentPickerMode { get } } @available(iOS 8.0, *) class UIDocumentPickerViewController : UIViewController { @available(iOS, introduced: 8.0, deprecated: 14.0) init(documentTypes allowedUTIs: [String], in mode: UIDocumentPickerMode) @available(swift, obsoleted: 3, renamed: "init(documentTypes:in:)") @available(iOS, introduced: 8.0, deprecated: 14.0) init(documentTypes allowedUTIs: [String], inMode mode: UIDocumentPickerMode) init?(coder: NSCoder) @available(iOS, introduced: 8.0, deprecated: 14.0) init(url: URL, in mode: UIDocumentPickerMode) @available(swift, obsoleted: 3, renamed: "init(url:in:)") @available(iOS, introduced: 8.0, deprecated: 14.0) init(URL url: URL, inMode mode: UIDocumentPickerMode) @available(iOS, introduced: 11.0, deprecated: 14.0) init(urls: [URL], in mode: UIDocumentPickerMode) @available(swift, obsoleted: 3, renamed: "init(urls:in:)") @available(iOS, introduced: 11.0, deprecated: 14.0) init(URLs urls: [URL], inMode mode: UIDocumentPickerMode) /// Initializes the picker for exporting local documents to an external location. The new locations will be returned using `didPickDocumentAtURLs:`. /// @param asCopy if true, a copy will be exported to the destination, otherwise the original document will be moved to the destination. For performance reasons and to avoid copies, we recommend you set `asCopy` to false. @available(iOS 14.0, *) init(forExporting urls: [URL], asCopy: Bool) /// Initializes the picker for exporting local documents to an external location. The new locations will be returned using `didPickDocumentAtURLs:`. /// @param asCopy if true, a copy will be exported to the destination, otherwise the original document will be moved to the destination. For performance reasons and to avoid copies, we recommend you set `asCopy` to false. @available(iOS 14.0, *) @available(swift, obsoleted: 3, renamed: "init(forExporting:asCopy:)") init(forExportingURLs urls: [URL], asCopy: Bool) /// Initializes the picker for exporting local documents to an external location. The new locations will be returned using `didPickDocumentAtURLs:`. The original document will be moved to the destination. @available(iOS 14.0, *) convenience init(forExporting urls: [URL]) /// Initializes the picker for exporting local documents to an external location. The new locations will be returned using `didPickDocumentAtURLs:`. The original document will be moved to the destination. @available(iOS 14.0, *) @available(swift, obsoleted: 3, renamed: "init(forExporting:)") convenience init(forExportingURLs urls: [URL]) weak var delegate: @sil_weak UIDocumentPickerDelegate? @available(iOS, introduced: 8.0, deprecated: 14.0, message: "Use appropriate initializers instead") var documentPickerMode: UIDocumentPickerMode { get } @available(iOS 11.0, *) var allowsMultipleSelection: Bool /// Force the display of supported file extensions (default: NO). @available(iOS 13.0, *) var shouldShowFileExtensions: Bool /// Picker will try to display this URL when presented @available(iOS 13.0, *) var directoryURL: URL? convenience init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) convenience init() }
55.067416
223
0.759233
b4ad397fa3ed8939d4584ce4a2df0835484b9834
379
kt
Kotlin
order/src/main/kotlin/li/doerf/microstore/order/ConfigTopics.kt
doerfli/microstore
ef6d3b228ad3665631322252cf07fcc1bab17269
[ "MIT" ]
null
null
null
order/src/main/kotlin/li/doerf/microstore/order/ConfigTopics.kt
doerfli/microstore
ef6d3b228ad3665631322252cf07fcc1bab17269
[ "MIT" ]
null
null
null
order/src/main/kotlin/li/doerf/microstore/order/ConfigTopics.kt
doerfli/microstore
ef6d3b228ad3665631322252cf07fcc1bab17269
[ "MIT" ]
null
null
null
package li.doerf.microstore.order import li.doerf.microstore.TOPIC_ORDERS import org.apache.kafka.clients.admin.NewTopic import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @Configuration class ConfigTopics { @Bean fun topicOrders(): NewTopic { return NewTopic(TOPIC_ORDERS, 10, 1.toShort()) } }
22.294118
59
0.778364
3b7ffcb7face9ab82836c657366df57b2d359f88
3,244
h
C
MainLoader_fpga.h
dMajoIT/loadp2
05842c525e7a5c3acb570f04488857ef90c32479
[ "MIT" ]
7
2019-07-27T18:03:37.000Z
2022-03-09T17:21:56.000Z
MainLoader_fpga.h
dMajoIT/loadp2
05842c525e7a5c3acb570f04488857ef90c32479
[ "MIT" ]
4
2019-11-19T13:59:42.000Z
2021-10-02T05:35:34.000Z
MainLoader_fpga.h
dMajoIT/loadp2
05842c525e7a5c3acb570f04488857ef90c32479
[ "MIT" ]
6
2020-07-16T18:59:39.000Z
2022-02-22T17:13:14.000Z
unsigned char MainLoader_fpga_bin[] = { 0x00, 0x00, 0x61, 0xfd, 0x84, 0x00, 0x88, 0xfc, 0x20, 0x7e, 0x65, 0xfd, 0x24, 0x08, 0x60, 0xfd, 0x24, 0x28, 0x60, 0xfd, 0x1f, 0x02, 0x61, 0xfd, 0x08, 0x06, 0xdc, 0xfc, 0x40, 0x7e, 0x74, 0xfd, 0x01, 0x0a, 0x85, 0xf0, 0x1f, 0x04, 0x61, 0xfd, 0x18, 0x0a, 0x45, 0xf0, 0x15, 0x0a, 0x61, 0xfd, 0xf6, 0x07, 0x6d, 0xfb, 0x00, 0x00, 0x7c, 0xfc, 0x84, 0x00, 0xe8, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; unsigned int MainLoader_fpga_bin_len = 512;
69.021277
73
0.652281
c70d4248cf700a61ff5a7353c92105be4b6572a3
388
asm
Assembly
programs/oeis/174/A174316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/174/A174316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/174/A174316.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A174316: Sequence defined by a(0)=a(1)=a(2)=1, a(3)=2, a(4)=6 and the formula a(n)=2^(n-2)+2 for n>=5. ; 1,1,1,2,6,10,18,34,66,130,258,514,1026,2050,4098,8194,16386,32770,65538,131074,262146,524290,1048578,2097154,4194306,8388610,16777218,33554434,67108866,134217730,268435458,536870914,1073741826,2147483650 trn $0,2 mov $1,$0 trn $0,2 sub $0,$1 mov $2,2 pow $2,$1 bin $0,$2 add $0,1
32.333333
205
0.698454