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
750fa2dd40cfe48ae68d71b8fab9a9af0f2176ec
3,684
h
C
PrivateFrameworks/GeoServices.framework/GEOETAResponse.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
36
2016-04-20T04:19:04.000Z
2018-10-08T04:12:25.000Z
PrivateFrameworks/GeoServices.framework/GEOETAResponse.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
null
null
null
PrivateFrameworks/GeoServices.framework/GEOETAResponse.h
shaojiankui/iOS10-Runtime-Headers
6b0d842bed0c52c2a7c1464087b3081af7e10c43
[ "MIT" ]
10
2016-06-16T02:40:44.000Z
2019-01-15T03:31:45.000Z
/* Generated by RuntimeBrowser Image: /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices */ @interface GEOETAResponse : PBCodable <NSCopying> { NSMutableArray * _etaResultReferencePointDestinations; GEOETAResult * _etaResultReferencePointOrigin; NSMutableArray * _etaResults; GEOETAServiceResponseSummary * _etaServiceSummary; struct { unsigned int status : 1; } _has; GEOPlaceSearchResponse * _originPlaceSearchResponse; struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; } * _problemDetails; unsigned long long _problemDetailsCount; unsigned long long _problemDetailsSpace; int _status; } @property (nonatomic, retain) NSMutableArray *etaResultReferencePointDestinations; @property (nonatomic, retain) GEOETAResult *etaResultReferencePointOrigin; @property (nonatomic, retain) NSMutableArray *etaResults; @property (nonatomic, retain) GEOETAServiceResponseSummary *etaServiceSummary; @property (nonatomic, readonly) bool hasEtaResultReferencePointOrigin; @property (nonatomic, readonly) bool hasEtaServiceSummary; @property (nonatomic, readonly) bool hasOriginPlaceSearchResponse; @property (nonatomic) bool hasStatus; @property (nonatomic, retain) GEOPlaceSearchResponse *originPlaceSearchResponse; @property (nonatomic, readonly) struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; }*problemDetails; @property (nonatomic, readonly) unsigned long long problemDetailsCount; @property (nonatomic) int status; + (Class)etaResultReferencePointDestinationType; + (Class)etaResultType; - (int)StringAsStatus:(id)arg1; - (void)addEtaResult:(id)arg1; - (void)addEtaResultReferencePointDestination:(id)arg1; - (void)addProblemDetail:(struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; })arg1; - (void)clearEtaResultReferencePointDestinations; - (void)clearEtaResults; - (void)clearProblemDetails; - (void)copyTo:(id)arg1; - (id)copyWithZone:(struct _NSZone { }*)arg1; - (void)dealloc; - (id)description; - (id)dictionaryRepresentation; - (id)etaResultAtIndex:(unsigned long long)arg1; - (id)etaResultReferencePointDestinationAtIndex:(unsigned long long)arg1; - (id)etaResultReferencePointDestinations; - (unsigned long long)etaResultReferencePointDestinationsCount; - (id)etaResultReferencePointOrigin; - (id)etaResults; - (unsigned long long)etaResultsCount; - (id)etaServiceSummary; - (bool)hasEtaResultReferencePointOrigin; - (bool)hasEtaServiceSummary; - (bool)hasOriginPlaceSearchResponse; - (bool)hasStatus; - (unsigned long long)hash; - (bool)isEqual:(id)arg1; - (void)mergeFrom:(id)arg1; - (id)originPlaceSearchResponse; - (struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; })problemDetailAtIndex:(unsigned long long)arg1; - (struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; }*)problemDetails; - (unsigned long long)problemDetailsCount; - (bool)readFrom:(id)arg1; - (void)setEtaResultReferencePointDestinations:(id)arg1; - (void)setEtaResultReferencePointOrigin:(id)arg1; - (void)setEtaResults:(id)arg1; - (void)setEtaServiceSummary:(id)arg1; - (void)setHasStatus:(bool)arg1; - (void)setOriginPlaceSearchResponse:(id)arg1; - (void)setProblemDetails:(struct GEOProblemDetail { int x1; int x2; struct { unsigned int x_3_1_1 : 1; unsigned int x_3_1_2 : 1; } x3; }*)arg1 count:(unsigned long long)arg2; - (void)setStatus:(int)arg1; - (int)status; - (id)statusAsString:(int)arg1; - (void)writeTo:(id)arg1; @end
45.481481
175
0.773073
71e33162e267427b277e6a835be162a79ac38226
393
ts
TypeScript
src/app/modules/service-only/service-only.module.ts
Panglot/ngxsApp
d45be5bdf18ab7585afcaed34c769040d2f977db
[ "MIT" ]
null
null
null
src/app/modules/service-only/service-only.module.ts
Panglot/ngxsApp
d45be5bdf18ab7585afcaed34c769040d2f977db
[ "MIT" ]
null
null
null
src/app/modules/service-only/service-only.module.ts
Panglot/ngxsApp
d45be5bdf18ab7585afcaed34c769040d2f977db
[ "MIT" ]
null
null
null
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { ServiceOnlyComponent } from './service-only.component'; import { TodoListingComponent } from './components/todo-listing.component'; @NgModule({ declarations: [ ServiceOnlyComponent, TodoListingComponent ], imports: [ CommonModule ] }) export class ServiceOnlyModule { }
20.684211
75
0.715013
79473b8f04cb76ea1f27485c893662ff320dbfc1
332
kt
Kotlin
messageprovider/src/main/java/com/sample/scoped/SeparateComponent.kt
soniccat/Dagger2WithMultimoduleTest
390d91f355ca466d55f5ad1b4436a4fbb1b3713a
[ "MIT" ]
null
null
null
messageprovider/src/main/java/com/sample/scoped/SeparateComponent.kt
soniccat/Dagger2WithMultimoduleTest
390d91f355ca466d55f5ad1b4436a4fbb1b3713a
[ "MIT" ]
null
null
null
messageprovider/src/main/java/com/sample/scoped/SeparateComponent.kt
soniccat/Dagger2WithMultimoduleTest
390d91f355ca466d55f5ad1b4436a4fbb1b3713a
[ "MIT" ]
null
null
null
package com.sample.scoped import com.sample.core.CoreComponent import com.sample.text.TextComp import com.sample.text.TextModule import dagger.Component @SeparateComp @Component( dependencies = [CoreComponent::class], modules = [SeparateModule::class]) interface SeparateComponent { fun getTaskManager(): SeparateTaskManager }
27.666667
85
0.813253
74ddac7434433b7e7c2bf5974daf5edcfd0b8a74
6,594
js
JavaScript
provider/static/alias.js
progressive-identity/alias-js
fd88e241488efe994e955e5ff0c0b42bd662bbd9
[ "Apache-2.0" ]
20
2019-09-19T00:06:00.000Z
2021-05-19T05:47:15.000Z
provider/static/alias.js
progressive-identity/proposal-2
fd88e241488efe994e955e5ff0c0b42bd662bbd9
[ "Apache-2.0" ]
3
2021-03-11T01:48:50.000Z
2022-02-27T08:21:01.000Z
provider/static/alias.js
progressive-identity/proposal-2
fd88e241488efe994e955e5ff0c0b42bd662bbd9
[ "Apache-2.0" ]
3
2019-10-07T20:16:52.000Z
2021-01-06T09:58:28.000Z
const PublicSalt = new Uint8Array([120, 91, 218, 28, 75, 140, 142, 94, 53, 23, 72, 39, 190, 221, 210, 152]); const chain = new Anychain.Chain({ passwordSalt: PublicSalt, }); chain.registerValidator(AliasChains.validators); let _publicSeed = null; function publicSeed() { if (_publicSeed == null) { const root = "sample alias authorization app"; _publicSeed = sodium.crypto_generichash(64, sodium.from_string(root)); } return _publicSeed; } function userSecretSeed(user, password) { const pwdSeed = chain.seedOf(user, 16, publicSeed()); return chain.seedOfPassword(password, pwdSeed); } function userPublicPassHash(user, password) { const pwdSeed = chain.seedOf(user, 16, publicSeed(), "public"); return chain.seedOfPassword(password, pwdSeed); } function createIdentity(username) { let idty = { username: username, seed: chain.seed(), sign: chain.signKeypair(), }; const selfURL = new URL(window.location.href); let bind = { type: "alias.bindAuthz", origin: selfURL.origin, }; idty.bind = chain.sign(idty.sign, bind); return idty; } function saveBox(user, passHash, box) { return $.ajax({ method: 'PUT', url: '/api/user', headers: { 'Authorization': "Basic " + btoa(user + ":" + sodium.to_base64(passHash)), }, data: { box: box, } }); } function createBox(user, passHash, box) { return $.ajax({ method: 'POST', url: '/api/user', data: { username: user, publicPwdHash: sodium.to_base64(passHash), box: box, } }); } function getBox(user, passHash) { return $.ajax({ method: 'GET', url: '/api/user', headers: { 'Authorization': "Basic " + btoa(user + ":" + sodium.to_base64(passHash)), }, }); } function deleteBox(user, passHash) { return $.ajax({ method: 'DELETE', url: '/api/user', headers: { 'Authorization': "Basic " + btoa(user + ":" + sodium.to_base64(passHash)), }, }); } function login(sk) { return $.ajax("/api/session/seed") .then((r) => { r = chain.fromJSON(r); r = chain.sign(sk, r); return $.ajax({ method: "POST", url: "/api/session/login", data: {token: chain.toToken(r)}, }); }) .then((r) => { console.log(r); }) ; } function redirectLogin() { const url = new URL(window.location.href); const pathname = url.pathname + url.search; window.location.href = "/login/?redirect=" + encodeURIComponent(pathname); } function authed() { const sess = currentSession(); if (!sess) { redirectLogin(); return; } return $.ajax("/api/session") .then((r) => { return true; }) .catch((e) => { redirectLogin(); }) ; } function mutateIdentity(sess, cb) { const idty = openBox(sess.box, sess.userSeed); cb(idty); const box = sealBox(idty, sess.userSeed); return saveBox(sess.username, sess.passHash, box) .then(() => { sess.box = box; setSession(sess.username, sess.userSeed, sess.passHash, sess.box); }) ; } function sealBox(idty, userSeed) { const sk = chain.boxSeedKeypair(chain.seedOf(userSeed, 32, "box")); const box = chain.seal(sk.publicKey, idty); return chain.toToken(box); } function openBox(boxToken, userSeed) { const sk = chain.boxSeedKeypair(chain.seedOf(userSeed, 32, "box")); const box = chain.fromToken(boxToken); console.log("box", box); const idty = chain.unseal(sk, box); console.log("idty", idty); return idty; } function setSession(username, userSeed, passHash, box) { sessionStorage.setItem("alias", chain.toToken({ username: username, userSeed: userSeed, passHash: passHash, box: box, })); } function currentSession() { let sess = sessionStorage.getItem("alias"); if (!sess) { return null; } return chain.fromToken(sess); } function clearSession() { sessionStorage.removeItem("alias"); } function logout() { $.ajax({ method: 'POST', url: '/api/session/logout' }).then(() => { clearSession(); window.location.reload(); }); } function createAccount(username, pwd) { if (username.length == 0 || pwd.length == 0) { throw "username or pwd is not set"; } const userSeed = userSecretSeed(username, pwd); const passHash = userPublicPassHash(username, pwd); const idty = createIdentity(username); const box = sealBox(idty, userSeed); return createBox(username, passHash, box).then(() => { setSession(username, userSeed, passHash, box); return login(idty.sign); }).then(() => { return idty; }) } function loginAccount(username, pwd) { if (username.length == 0 || pwd.length == 0) { throw "username or pwd is not set"; } const passHash = userPublicPassHash(username, pwd); return getBox(username, passHash) .catch((_) => { throw "unknown user or bad password"; }).then((box) => { const userSeed = userSecretSeed(username, pwd); const idty = openBox(box, userSeed); setSession(username, userSeed, passHash, box); return login(idty.sign); }) ; } function formatScope(scope) { let r = scope.provider + "." + scope.path; if (scope.predicates) { const formatPredicates = (scope.predicates).map((p) => { if (p.length == 2) { return p[0] + " " + p[1]; } else if (p.length == 3) { return p[1] + p[0] + p[2]; } else { return "?"; } }); r = r + "[" + formatPredicates.join(",") + "]"; } if (scope.fields) { r = r + ".{" + scope.fields.join(",") + "}"; } else { r = r + ".*"; } return r; } function setUserMeta(d) { return $.ajax({ method: 'POST', url: '/api/session/meta', contentType: 'application/json', data: JSON.stringify(d), }); } function getUserMeta() { return $.ajax('/api/session/meta'); } function describeScopes(scopes) { const url = "/api/scope/describe/?scopes=" + encodeURIComponent(JSON.stringify(scopes)); return $.getJSON(url); }
24.696629
108
0.554443
4687b8fa3f25c5e27584730901c2a9ea734c922c
803
css
CSS
grid/hex.css
matejker/game-of-life
41b2dcd056a985d3eee368dd2bb91ec02a5cfb72
[ "MIT" ]
3
2022-01-03T00:52:05.000Z
2022-01-23T15:06:54.000Z
grid/hex.css
matejker/game-of-life
41b2dcd056a985d3eee368dd2bb91ec02a5cfb72
[ "MIT" ]
null
null
null
grid/hex.css
matejker/game-of-life
41b2dcd056a985d3eee368dd2bb91ec02a5cfb72
[ "MIT" ]
1
2022-02-06T02:06:24.000Z
2022-02-06T02:06:24.000Z
.hex { float: left; margin-right: -3px; margin-bottom: -6px; } .hex .left { float: left; width: 0; border-right: 4px solid #efefef; border-top: 7px solid transparent; border-bottom: 7px solid transparent; } .hex .middle { float: left; width: 8px; height: 14px; background: #efefef; } .hex .right { float: left; width: 0; border-left: 4px solid #efefef; border-top: 7px solid transparent; border-bottom: 7px solid transparent; } .hex.alive .right { border-left: 4px solid #888; } .hex.alive .middle { background: #888; } .hex.alive .left { border-right: 4px solid #888; } .hex-row { clear: left; } .hex.even { margin-top: 7px; } #world { text-align: center; margin: 10px auto; width: 1050px; }
14.6
41
0.596513
e8f70cb35f8f35780ab43f567c03a983bf3f8b23
5,512
py
Python
othello.py
edjacob25/Intelligent-Systems
ae24c7e1039c98cd2940a5a813aae27fabadb99f
[ "MIT" ]
null
null
null
othello.py
edjacob25/Intelligent-Systems
ae24c7e1039c98cd2940a5a813aae27fabadb99f
[ "MIT" ]
null
null
null
othello.py
edjacob25/Intelligent-Systems
ae24c7e1039c98cd2940a5a813aae27fabadb99f
[ "MIT" ]
null
null
null
from games import (GameState, Game, query_player, random_player, alphabeta_player, play_game, minimax_decision, alphabeta_full_search, alphabeta_search) class Othello(Game): """Juega Othello en un tablero 8 x 8, con Max (primer jugador) jugando con las fichas negras. Un estado tiene el jugador al que le toca jugar, una utilidad en caché, una lista de movimientos en la forma de una lista de posiciones (x, y), y un tablero, en la forma de un diccionario de entradas {(x, y): Jugador}, donde Jugador es 'B' para las fichas blancas y 'N' para las fichas negras.""" def __init__(self): moves = [(x, y) for x in range(1, 9) for y in range(1, 9)] moves.remove((4, 4)) moves.remove((4, 5)) moves.remove((5, 4)) moves.remove((5, 5)) # siempre inicia 'N' self.initial = GameState(to_move='N', utility=0, board={(4, 4):'B',(4, 5):'N', (5, 4):'N',(5, 5):'B'}, moves=moves) def actions(self, state): """Los movimientos legales son las posiciones que se alinean con otra pieza del mismo color del jugador que mueve formando una segmento de línea recta que contenga al menos una pieza del contrincante.""" return self.legal_moves(state.moves, state.board, state.to_move) def legal_moves(self, smoves, board, player): """Determina los movimientos legales de un jugador sobre un tablero""" moves = [] for (x, y) in smoves: if self.change_dir(x, y, -1, -1, board, player) \ or self.change_dir(x, y, -1, 0, board, player) \ or self.change_dir(x, y, -1, 1, board, player) \ or self.change_dir(x, y, 0, -1, board, player) \ or self.change_dir(x, y, 0, 1, board, player) \ or self.change_dir(x, y, 1, -1, board, player) \ or self.change_dir(x, y, 1, 0, board, player) \ or self.change_dir(x, y, 1, 1, board, player): moves.append((x, y)) return moves def change_dir(self, x, y, xd, yd, board, player): """Determina una dirección que cambiará el color de al menos una pieza del contrincante""" def find_player(x, y): """Determina si se encuentra otra pieza del jugador en una dirección""" x += xd y += yd while (x, y) in board: if board[(x, y)] == player: return True else: x += xd y += yd return False x1 = x + xd y1 = y + yd if (x1, y1) in board and player != board[(x1, y1)]: return find_player(x1, y1) else: return False def result(self, state, move): def change_player(xd, yd): """Cambia las piezas al color del jugador en una dirección""" x, y = move if self.change_dir(x, y, xd, yd, board, player): x += xd y += yd while (x, y) in board: if board[(x, y)] == player: return else: board[(x, y)] = player x += xd y += yd board = state.board.copy() moves = list(state.moves) player = state.to_move if move in self.actions(state): board[move] = player change_player(-1, -1) change_player(-1, 0) change_player(-1, 1) change_player(0, -1) change_player(0, 1) change_player(1, -1) change_player(1, 0) change_player(1, 1) moves.remove(move) return GameState(to_move=('B' if player == 'N' else 'N'), utility=self.compute_utility(board, move, player), board=board, moves=moves) else: return GameState(to_move=('B' if player == 'N' else 'N'), utility=self.compute_utility(board, move, player), board=board, moves=moves) def utility(self, state, player): "Return the value to player; 1 for win, -1 for loss, 0 otherwise." return state.utility if player == 'N' else -state.utility def terminal_test(self, state): "Un estado es terminal si ninguno de los jugadores tiene acciones" laN = len(self.legal_moves(state.moves, state.board, 'N')) laB = len(self.legal_moves(state.moves, state.board, 'B')) return (laN + laB) == 0 def display(self, state): """despliega el estado del tablero de juego""" board = state.board print(' ', end=' ') for y in range(1, 9): print(y, end=' ') print() for x in range(1, 9): print(x, end=' ') for y in range(1, 9): print(board.get((x, y), '.'), end=' ') print() def compute_utility(self, board, move, player): """Regresa la diferencia entre el número de piezas de 'N' y el número de piezas de 'B'""" pieces = list(board.values()) return pieces.count('N') - pieces.count('B')
40.529412
80
0.502903
98b53a601c456ec2b23fcb5756973b3e244111d8
3,218
html
HTML
app/views/dth/register.html
dommn/green-zone-prototype
c7ada3f17875c30760f000dd86183d92abedb8d9
[ "MIT" ]
null
null
null
app/views/dth/register.html
dommn/green-zone-prototype
c7ada3f17875c30760f000dd86183d92abedb8d9
[ "MIT" ]
null
null
null
app/views/dth/register.html
dommn/green-zone-prototype
c7ada3f17875c30760f000dd86183d92abedb8d9
[ "MIT" ]
null
null
null
{% extends "layout.html" %} {% block head %} {% include "includes/head.html" %} <div class="govuk-cookie-banner " data-nosnippet role="region" aria-label="Cookies on [name of service]"> <div class="govuk-cookie-banner__message govuk-width-container"> <div class="govuk-grid-row"> <div class="govuk-grid-column-two-thirds"> <h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on DWP login and identification service</h2> <div class="govuk-cookie-banner__content"> <p class="govuk-body">We use some essential cookies to make this service work.</p> <p class="govuk-body">We’d also like to use analytics cookies so we can understand how you use the service and make improvements.</p> </div> </div> </div> <div class="govuk-button-group"> <button value="accept" type="button" name="cookies" class="govuk-button" data-module="govuk-button"> Accept analytics cookies </button> <button value="reject" type="button" name="cookies" class="govuk-button" data-module="govuk-button"> Reject analytics cookies </button> <a class="govuk-link" href="#">View cookies</a> </div> </div> </div> {% endblock %} {% block pageTitle %} Identity {% endblock %} {% block beforeContent %} {{ govukPhaseBanner({ tag: { text: "alpha" }, classes: "govuk-width-container", html: 'This is a new service – your <a class="govuk-link" href="#">feedback</a> will help us to improve it.' }) }} {% endblock %} {% block content %} <div class="govuk-grid-row"> <div class="govuk-grid-column-two-thirds"> <h1 class="govuk-heading-l">Register</h1> <p>Register so you can securely sign in whenever you use this service.</p> <div class="govuk-inset-text"> <a href="/auth/dev-ready/sign-in">Sign in if you have already registered</a> </div> <h2 class="govuk-heading-m">Before you start</h2> <p>You will need:</p> <ul class="govuk-list govuk-list--bullet"> <li>an email address</li> <li>a mobile phone</li> </ul> <p>You will also need information from 2 sources so we can check we are dealing with the right person. These are:</p> <ul class="govuk-list govuk-list--bullet"> <li>a UK passport</li> <li>payslips or P60</li> <li>Self Assessment</li> <li>information about tax credits, if you claim them</li> <li>details of your credit record</li> </ul> <p><a href="">I do not have this information</a></p> <h2 class="govuk-heading-m">What happens next</h2> <p>Your information will be checked against our records. This also helps protect you from fraud.</p> <p>We will send security codes to your email and mobile phone to check that they belong to you.</p> <p>Whenever you sign in we will send a new security code to your mobile phone.</p> <p>You will also need to create a password.</p> <a href="email-address.html" role="button" draggable="false" class="govuk-button" data-module="govuk-button"> Continue </a> </div> </div> {% endblock %}
30.074766
145
0.625233
2a1436368069e0661819ffd7353e269a6503e373
4,739
html
HTML
index.html
tinchoforever/latin-x
c13d1a2ba384efeb183e16680fc203df60e8ae47
[ "Apache-2.0" ]
null
null
null
index.html
tinchoforever/latin-x
c13d1a2ba384efeb183e16680fc203df60e8ae47
[ "Apache-2.0" ]
null
null
null
index.html
tinchoforever/latin-x
c13d1a2ba384efeb183e16680fc203df60e8ae47
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE HTML> <html lang='en-US'> <head> <!-- <description> Chequea tus conocimientos sobre --> <meta charset='utf-8'> <!-- Mobile Meta --> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'> <meta name='mobile-web-app-capable' content='yes'> <meta name='apple-mobile-web-app-capable' content='yes'> <meta name='apple-mobile-web-app-status-bar-style' content='black'> <title>¿Que es #LatinX? - Mediamorphosis MX</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta itemprop="name" content="Queremos formar la opinion de lo que significa LATINX. Con tus respuestas podemos ir generando una identidad colectiva entre todos."> <meta itemprop="image" content="https://latin-x.herokuapp.com/og.png"> <meta name="keywords" content=""> <meta name="description" content="Queremos formar la opinion de lo que significa LATINX. Con tus respuestas podemos ir generando una identidad colectiva entre todos."> <meta name="robots" content="Index, All"> <meta name="robots" content="Index, Follow"> <meta name="revisit-after" content="10 days"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <meta property="fb:page_id" content=""> <meta property="og:image" content="https://latin-x.herokuapp.com/fb.jpg"> <meta property="og:image:width" content="1024"> <meta property="og:image:height" content="512"> <meta property="og:description" content="Queremos formar la opinion de lo que significa LATINX. Con tus respuestas podemos ir generando una identidad colectiva entre todos."> <meta property="og:title" content="¿Que es #LatinX? - Mediamorphosis MX"> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:site" content="@mediamorphosisMX"> <meta name="twitter:creator" content="@mediamorphosisMX"> <meta name="twitter:title" content="¿Que es #LatinX? - Mediamorphosis MX"> <meta name="twitter:description" content="¿Que es #LatinX? - Mediamorphosis MX"> <meta name="twitter:image" content="https://latin-x.herokuapp.com/fb.jpg"> <!-- Meta Charset --> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <!-- Icons --> <link rel="shortcut icon" type="image/png" href="ile/imgs/favicon-16x16.png"/> <!-- Styles --> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- Style --> <link href="styles/animate.css" rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous"> <link href="styles/styles.css" rel='stylesheet' type='text/css'> </head> <body> <div class="wrapper" ng-app="initApp"> <div ng-view> </div> </div> <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <h6 class="btn"> Creditos </h6> <p> Realizado en </p> <p> Desarrollado por <a href="http://genosha.com.ar" target="_blank"> Genosha</a></p> </div> </div> </div> <!-- Dependencies --> <script src='js/libs/jquery-1.10.2.min.js''></script> <script src='//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js'></script> <script src="https://latin-x-map.herokuapp.com/socket.io/socket.io.js"></script> <script src='js/libs/angular/angular.min.js'></script> <script src='js/libs/angular/angular-animate.min.js'></script> <script src='js/libs/angular/angular-route.min.js'></script> <script src="js/libs/wow/dist/wow.js"></script> <script src="js/libs/d3/d3.js"></script> <script src="https://rawgit.com/jasondavies/d3-cloud/master/build/d3.layout.cloud.js"></script> <script src='js/app.js'></script> <script src='js/check/main.js'></script> <script src='js/check/answer.js'></script> <script src='js/check/question.js'></script> <script src='js/check/end.js'></script> <script src='js/check/stats.js'></script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-142467879-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-142467879-1'); </script> </body> </html>
41.938053
208
0.693817
5004e78963205d9ea6ac93d978111288a5f1320c
1,280
js
JavaScript
src/chrome/index.js
rainforestapp/tester-chrome-extension
7c1702af2e6a653d5216a38ca6b93f4c92c532c7
[ "MIT" ]
99
2015-12-25T15:21:03.000Z
2021-09-26T00:19:03.000Z
src/chrome/index.js
rainforestapp/tester-chrome-extension
7c1702af2e6a653d5216a38ca6b93f4c92c532c7
[ "MIT" ]
745
2015-11-02T21:53:56.000Z
2021-08-24T00:03:25.000Z
src/chrome/index.js
rainforestapp/tester-chrome-extension
7c1702af2e6a653d5216a38ca6b93f4c92c532c7
[ "MIT" ]
76
2015-11-03T08:00:09.000Z
2019-07-29T16:41:29.000Z
import { Socket } from 'phoenix'; import { startPlugin } from '..'; import listenMessages from './listenMessages'; import handleNotifications from './handleNotifications'; import handleWork from './handleWork'; import getSync from './getSync'; import handleStateSaving from './handleStateSaving'; import renderIcon from './renderIcon'; import startIdleChecking from './startIdleChecking'; import buildContextMenus from './buildContextMenus'; import { applyMiddleware } from 'redux'; import { logMiddleware } from '../logging'; export const startChromePlugin = (chrome, socketConstructor = Socket) => { const reloader = () => { chrome.storage.local.set({ reload: true }, () => { window.location.reload(true); }); }; const enhancer = applyMiddleware(logMiddleware); const plugin = startPlugin({ enhancer, reloader, socketConstructor }); const store = plugin.getStore(); const getStore = () => store; getSync(store, chrome) .then(() => handleStateSaving(store, chrome)) .then(() => { listenMessages(store, chrome); handleNotifications(store, chrome); renderIcon(store, chrome); handleWork(store, chrome); startIdleChecking(store, chrome); buildContextMenus(store, chrome); }); return { getStore }; };
32.820513
74
0.695313
117f912705cefe5f5a20bb28f9cb403b6db53746
690
rs
Rust
src/player/fasttracker/mod.rs
cmatsuoka/oxdz
0b7371bf63967819315316a58629881b2169f570
[ "Apache-2.0", "MIT" ]
20
2018-01-18T13:04:49.000Z
2021-05-19T01:44:16.000Z
src/player/fasttracker/mod.rs
cmatsuoka/oxdz
0b7371bf63967819315316a58629881b2169f570
[ "Apache-2.0", "MIT" ]
1
2018-11-27T00:51:42.000Z
2018-11-27T09:00:05.000Z
src/player/fasttracker/mod.rs
cmatsuoka/oxdz
0b7371bf63967819315316a58629881b2169f570
[ "Apache-2.0", "MIT" ]
7
2018-01-25T06:26:45.000Z
2019-12-14T04:15:41.000Z
mod player; use module::Module; use player::{Options, PlayerListEntry, PlayerInfo, FormatPlayer}; use ::*; pub struct Ft101; impl PlayerListEntry for Ft101 { fn info(&self) -> PlayerInfo { PlayerInfo { id : "ft", name : "FastTracker 1.01", description: "Based on the FastTracker 1.01 replayer", author : "Claudio Matsuoka", accepts : &[ "m.k.", "xchn" ], } } fn player(&self, module: &Module, options: Options) -> Box<FormatPlayer> { Box::new(self::player::FtPlayer::new(module, options)) } fn import(&self, module: Module) -> Result<Module, Error> { Ok(module) } }
23
77
0.568116
577a11da64b734063de3d03c5fa05a9bbf950ee2
502
h
C
iPhone/TuningFork/Classes/TuningForkAppDelegate.h
drichardson/examples
89cd96741f6110729138f5c904317dd1a42f63ff
[ "Unlicense" ]
33
2015-04-21T20:10:42.000Z
2021-09-28T05:54:37.000Z
iPhone/TuningFork/Classes/TuningForkAppDelegate.h
drichardson/examples
89cd96741f6110729138f5c904317dd1a42f63ff
[ "Unlicense" ]
1
2020-03-15T18:54:19.000Z
2020-03-15T18:54:19.000Z
iPhone/TuningFork/Classes/TuningForkAppDelegate.h
drichardson/examples
d8b285db4ad1cfd9a92091deab2eb385748f97c8
[ "Unlicense" ]
19
2015-01-09T13:39:06.000Z
2021-09-15T05:39:33.000Z
// // TuningForkAppDelegate.h // TuningFork // // Created by Doug on 3/11/08. // Copyright Douglas Richardson 2008. All rights reserved. // #import <UIKit/UIKit.h> @interface TuningForkAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; UIToolbarController *toolbarController; } @property (nonatomic, retain) UIWindow *window; @property (nonatomic, retain) UIToolbarController *toolbarController; - (void)applicationDidFinishLaunching:(UIApplication *)application; @end
22.818182
69
0.758964
271936e384ac0d16f164cf7537c110bfd47a5150
904
lua
Lua
lua/plugin/orgmode.lua
hahuang65/nvim-config
3a8c8d867bddd359a512879a775523c48ebb78a7
[ "MIT" ]
null
null
null
lua/plugin/orgmode.lua
hahuang65/nvim-config
3a8c8d867bddd359a512879a775523c48ebb78a7
[ "MIT" ]
null
null
null
lua/plugin/orgmode.lua
hahuang65/nvim-config
3a8c8d867bddd359a512879a775523c48ebb78a7
[ "MIT" ]
null
null
null
-- https://github.com/nvim-orgmode/orgmode -- https://github.com/akinsho/org-bullets.nvim require("org-bullets").setup { symbols = { "◉", "○", "✸", "✿" } } require'orgmode'.setup_ts_grammar() require'nvim-treesitter.configs'.setup { -- If TS highlights are not enabled at all, or disabled via `disable` prop, highlighting will fallback to default Vim syntax highlighting highlight = { enable = true, disable = {'org'}, -- Remove this to use TS highlighter for some of the highlights (Experimental) additional_vim_regex_highlighting = {'org'}, -- Required since TS highlighter doesn't support all syntax features (conceal) }, ensure_installed = {'org'}, -- Or run :TSUpdate org } require('orgmode').setup({ org_agenda_files = {'~/.org/journal/**/*'}, org_default_notes_file = '~/.org/Inbox.org', mappings = { disable_all = true -- Keymaps defined in keymaps.lua } })
33.481481
139
0.686947
9d463e42825ed37abd56f403fe8faf39bfe0e6db
6,342
asm
Assembly
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2626.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2626.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_2626.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_UC_ht+0x109e9, %rcx inc %rbp vmovups (%rcx), %ymm7 vextracti128 $0, %ymm7, %xmm7 vpextrq $1, %xmm7, %r11 and %rax, %rax lea addresses_UC_ht+0x7fff, %rsi lea addresses_normal_ht+0x15429, %rdi nop nop nop nop nop add %r13, %r13 mov $69, %rcx rep movsl nop nop nop nop nop cmp $8915, %r11 lea addresses_UC_ht+0x3c29, %rcx nop nop nop nop nop cmp $60973, %rbp mov $0x6162636465666768, %r11 movq %r11, (%rcx) nop nop nop nop dec %rbp lea addresses_D_ht+0x5b30, %r13 nop nop nop add %rax, %rax mov $0x6162636465666768, %r11 movq %r11, %xmm6 movups %xmm6, (%r13) nop nop nop sub %r11, %r11 lea addresses_WT_ht+0x829, %rcx nop nop nop xor %rsi, %rsi mov (%rcx), %r11d nop add %rcx, %rcx lea addresses_UC_ht+0x7619, %rbp nop nop nop nop sub $53291, %r13 mov $0x6162636465666768, %rdi movq %rdi, %xmm3 vmovups %ymm3, (%rbp) sub $1232, %rax lea addresses_D_ht+0x33a0, %rsi lea addresses_UC_ht+0x17969, %rdi nop nop nop nop nop cmp $25163, %r10 mov $46, %rcx rep movsw nop nop nop sub $49935, %rdi lea addresses_UC_ht+0x1a429, %r11 nop nop nop nop cmp %rax, %rax movw $0x6162, (%r11) nop nop nop nop and %rsi, %rsi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r13 push %r15 push %rbx push %rcx push %rdi // Store lea addresses_normal+0x7829, %rcx nop nop nop cmp %r12, %r12 mov $0x5152535455565758, %r11 movq %r11, (%rcx) nop nop nop nop nop add %r11, %r11 // Faulty Load lea addresses_UC+0x6029, %rbx nop nop cmp $46402, %rdi movups (%rbx), %xmm2 vpextrq $1, %xmm2, %r13 lea oracles, %r12 and $0xff, %r13 shlq $12, %r13 mov (%r12,%r13,1), %r13 pop %rdi pop %rcx pop %rbx pop %r15 pop %r13 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 6, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': True}, 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 8, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 16, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 7, 'size': 4, 'same': False, 'NT': True}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 4, 'size': 32, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 6, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 8, 'size': 2, 'same': False, 'NT': False}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
35.830508
2,999
0.66036
3dea43d677d71d87ebd49e2a8c5374c038e79251
506
lua
Lua
garrysmod/gamemodes/darkrp/schema/factions/sh_greh.lua
Kek1ch/Kek1ch
fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc
[ "Apache-2.0" ]
7
2019-06-15T09:10:59.000Z
2021-11-21T18:15:03.000Z
garrysmod/gamemodes/darkrp/schema/factions/sh_greh.lua
Kek1ch/Kek1ch
fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc
[ "Apache-2.0" ]
null
null
null
garrysmod/gamemodes/darkrp/schema/factions/sh_greh.lua
Kek1ch/Kek1ch
fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc
[ "Apache-2.0" ]
6
2019-06-15T08:33:15.000Z
2020-10-25T07:50:32.000Z
FACTION.name = "Грех" FACTION.desc = "Грех" FACTION.color = Color(210, 105, 30) FACTION.models = { "models/hdmodels/kek1ch/stalker_neutral_1_face_2.mdl", "models/hdmodels/kek1ch/stalker_neutral_1_hq.mdl", "models/hdmodels/kek1ch/stalker_neutral_1_mask.mdl", "models/hdmodels/kek1ch/stalker_neutral_1_mas2.mdl", "models/hdmodels/kek1ch/stalker_neutrala4.mdl", "models/hdmodels/kek1ch/stalker_neutrala5.mdl" } FACTION.isDefault = false FACTION.isPublic = true FACTION_GREH = FACTION.index
36.142857
56
0.774704
75733c59ef54373029e387e389a51bc1c043aa0e
6,110
h
C
src/mesh.h
dbukenberger/HexaLab
a9deed7920923e1dd8fff8c41568d1f015bb7362
[ "MIT" ]
null
null
null
src/mesh.h
dbukenberger/HexaLab
a9deed7920923e1dd8fff8c41568d1f015bb7362
[ "MIT" ]
null
null
null
src/mesh.h
dbukenberger/HexaLab
a9deed7920923e1dd8fff8c41568d1f015bb7362
[ "MIT" ]
1
2021-02-19T07:24:21.000Z
2021-02-19T07:24:21.000Z
#pragma once #include <vector> #include <unordered_map> #include <Eigen/Dense> #include <Eigen/Geometry> #include "common.h" #include "hex_quality_color_maps.h" /* * HEXALAB vertex and face orderning * * 6-------7 + - + +-------+ +-------+ * /| /| /| /| / 3 / | 5 | * 2-------3 | + | - + | +-------+ +-------+ | * | | | | |0| |1| | | | | * | 4-----|-5 | + - | + +-------+ | +-----|-+ * |/ |/ |/ |/ / 2 / | 4 | * 0-------1 + - + +-------+ +-------+ * * Vertex Faces * * * 2---6---7 +-0-+-2-+ * | 0 | 5 | 3 1 3 * 0---4---5---7 0---1 +-0-+ +-2-+-0-+-2-+ * | 2 | 1 | | | 3 1 3 1 3 * 0---1---3---7 3---2 +-2-+ +-2-+-0-+-2-+ * | 4 | 3 | 3 1 3 * 0---2---6 Corners Edges Edges +-2-+-0-+ */ namespace HexaLab { using namespace Eigen; using namespace std; struct FourIndices{ Index vi[4]; FourIndices(Index a, Index b, Index c,Index d){ vi[0]=a; vi[1]=b; vi[2]=c; vi[3]=d; } Index operator[] (short i) const {return vi[i];} }; struct Cell { Index fi[6]; Index vi[8]; uint32_t marked; FourIndices get_face(short face0to5) const { switch (face0to5){ case 0: return FourIndices(vi[2],vi[6],vi[4],vi[0]); // 010 110 100 000 case 1: return FourIndices(vi[3],vi[1],vi[5],vi[7]); // 011 001 101 111 case 2: return FourIndices(vi[4],vi[5],vi[1],vi[0]); // 100 101 001 000 case 3: return FourIndices(vi[6],vi[2],vi[3],vi[7]); // 011 010 011 111 case 4: return FourIndices(vi[1],vi[3],vi[2],vi[0]); // 001 011 010 000 default: return FourIndices(vi[5],vi[4],vi[6],vi[7]); // 101 100 110 111 } } inline int get_v3_of_face(short face0to5) const { return vi[(face0to5&1)*7]; } static short pivot_face_around_edge( short face0to5, short edge0to3 ) { /* * edge=0 : faces 0<->3 1<->4 2<->5 * edge=1 : faces 0<->5 2<->1 4<->3 * edge=2 : faces 0->2->4->0 5->3->1->5 * edge=3 : faces 0->4->2->0 5->1->3->5 */ if (edge0to3==1) face0to5 = (face0to5+3)^1; else if (edge0to3> 1) face0to5 += (((edge0to3 ^ (face0to5&1))<<1)|5); return (face0to5+3)%6; // edge: 3<->2 (0,1 unchanged) //edge0to3 ^= (edge0to3>>1); } }; struct Face { Vector3f normal; Index ci[2]; short wi[2]; // this is face number wi[0] of cell ci[0] bool is_boundary() const { return ci[1]==-1; } void flip() { assert(!is_boundary()); normal *= -1.0f; std::swap(ci[0],ci[1]); std::swap(wi[0],wi[1]); } Face flipped() const { Face res = *this; res.flip(); return res; } }; struct Vert { Vector3f position; uint32_t visible; // mystery: if bool, size of vert rises (from 12+4 to 12+12!) Vert() {} Vert ( Vector3f p ):position(p) {} }; class Mesh { // Builder class is responsible for building a Mesh instance, given the file parser output. friend class Builder; public: vector<Cell> cells; vector<Face> faces; vector<Vert> verts; AlignedBox3f aabb; void unmark_all(); FourIndices vertex_indices(const Face &f) const{ return cells[ f.ci[0] ].get_face( f.wi[0] ); } FourIndices vertex_indices(const Face &f,short side0or1) const{ return cells[ f.ci[side0or1] ].get_face( f.wi[side0or1] ); } Vector3f pos( Index vi) const { return verts[vi].position; } Vector3f norm_of_side( Index ci, short side) const { const Face& f = faces[ cells[ci].fi[side] ]; if (f.ci[0]==ci) return f.normal; else return -f.normal; } bool is_marked ( int ci ) const { return cells[ci].marked; } bool is_marked ( const Cell& cell ) const { return cell.marked; } void unmark ( Cell& cell ) { cell.marked = false; } void mark ( Cell& cell ) { cell.marked = true; } bool is_visible ( const Vert& vert ) const { return vert.visible; } bool is_visible ( int vi ) const { return verts[vi].visible; } void set_invisible ( Vert& vert ) { vert.visible = false; } void set_visible ( Vert& vert ) { vert.visible = true; } void erode_dilate_marked(int str); void erode_marked(); void dilate_marked(); int count_visible_faces(Index fi, short si) const; Index other_side( Index ci, int side0to5 ) const { const Face &f = faces[ cells[ci].fi[side0to5] ]; return (f.ci[0]==ci)?f.ci[1]:f.ci[0]; } // per-hexa quality measure (parallel vectors) vector<float> hexa_quality; vector<float> normalized_hexa_quality; int internal_edge_valency(Index fi, short side) const; float average_edge_lenght(float &min, float &max) const; float average_cell_volume() const; void update_vertex_visibility(); void update_vertex_visibility_internals_only(); long total_occupation_RAM() const; // approximation! Index pivot_around_edge(Index fi, Index vi, short &side0or1, short edge0to3) const; short find_edge(Index fi, Index vi, short side0or1) const; private: /* used during construction */ Vector3f barycenter_of(const Face &face) const; Vector3f barycenter_of(const Cell &c) const; void compute_and_store_normal(Face &face); }; }
33.027027
99
0.48707
35f93715d490657e4fa5d4992dfb2b3fbf726fb9
12,437
sql
SQL
dbms/tests/queries/0_stateless/00233_position_function_family.sql
189569400/ClickHouse
0b8683c8c9f0e17446bef5498403c39e9cb483b8
[ "Apache-2.0" ]
5
2018-05-10T14:40:44.000Z
2020-12-13T11:43:15.000Z
dbms/tests/queries/0_stateless/00233_position_function_family.sql
189569400/ClickHouse
0b8683c8c9f0e17446bef5498403c39e9cb483b8
[ "Apache-2.0" ]
8
2018-11-21T09:45:25.000Z
2018-11-21T13:53:40.000Z
dbms/tests/queries/0_stateless/00233_position_function_family.sql
189569400/ClickHouse
0b8683c8c9f0e17446bef5498403c39e9cb483b8
[ "Apache-2.0" ]
2
2018-12-17T13:08:09.000Z
2022-01-26T08:50:20.000Z
select 1 = position('', ''); select 1 = position('abc', ''); select 0 = position('', 'abc'); select 1 = position('abc', 'abc'); select 2 = position('abc', 'bc'); select 3 = position('abc', 'c'); select 1 = position(materialize(''), ''); select 1 = position(materialize('abc'), ''); select 0 = position(materialize(''), 'abc'); select 1 = position(materialize('abc'), 'abc'); select 2 = position(materialize('abc'), 'bc'); select 3 = position(materialize('abc'), 'c'); select 1 = position(materialize(''), '') from system.numbers limit 10; select 1 = position(materialize('abc'), '') from system.numbers limit 10; select 0 = position(materialize(''), 'abc') from system.numbers limit 10; select 1 = position(materialize('abc'), 'abc') from system.numbers limit 10; select 2 = position(materialize('abc'), 'bc') from system.numbers limit 10; select 3 = position(materialize('abc'), 'c') from system.numbers limit 10; select 1 = position('', ''); select 1 = position('абв', ''); select 0 = position('', 'абв'); select 1 = position('абв', 'абв'); select 3 = position('абв', 'бв'); select 5 = position('абв', 'в'); select 1 = position(materialize(''), ''); select 1 = position(materialize('абв'), ''); select 0 = position(materialize(''), 'абв'); select 1 = position(materialize('абв'), 'абв'); select 3 = position(materialize('абв'), 'бв'); select 5 = position(materialize('абв'), 'в'); select 1 = position(materialize(''), '') from system.numbers limit 10; select 1 = position(materialize('абв'), '') from system.numbers limit 10; select 0 = position(materialize(''), 'абв') from system.numbers limit 10; select 1 = position(materialize('абв'), 'абв') from system.numbers limit 10; select 3 = position(materialize('абв'), 'бв') from system.numbers limit 10; select 5 = position(materialize('абв'), 'в') from system.numbers limit 10; select 1 = positionUTF8('', ''); select 1 = positionUTF8('абв', ''); select 0 = positionUTF8('', 'абв'); select 1 = positionUTF8('абв', 'абв'); select 2 = positionUTF8('абв', 'бв'); select 3 = positionUTF8('абв', 'в'); select 1 = positionUTF8(materialize(''), ''); select 1 = positionUTF8(materialize('абв'), ''); select 0 = positionUTF8(materialize(''), 'абв'); select 1 = positionUTF8(materialize('абв'), 'абв'); select 2 = positionUTF8(materialize('абв'), 'бв'); select 3 = positionUTF8(materialize('абв'), 'в'); select 1 = positionUTF8(materialize(''), '') from system.numbers limit 10; select 1 = positionUTF8(materialize('абв'), '') from system.numbers limit 10; select 0 = positionUTF8(materialize(''), 'абв') from system.numbers limit 10; select 1 = positionUTF8(materialize('абв'), 'абв') from system.numbers limit 10; select 2 = positionUTF8(materialize('абв'), 'бв') from system.numbers limit 10; select 3 = positionUTF8(materialize('абв'), 'в') from system.numbers limit 10; select 1 = positionCaseInsensitive('', ''); select 1 = positionCaseInsensitive('abc', ''); select 0 = positionCaseInsensitive('', 'aBc'); select 1 = positionCaseInsensitive('abc', 'aBc'); select 2 = positionCaseInsensitive('abc', 'Bc'); select 3 = positionCaseInsensitive('abc', 'C'); select 1 = positionCaseInsensitive(materialize(''), ''); select 1 = positionCaseInsensitive(materialize('abc'), ''); select 0 = positionCaseInsensitive(materialize(''), 'aBc'); select 1 = positionCaseInsensitive(materialize('abc'), 'aBc'); select 2 = positionCaseInsensitive(materialize('abc'), 'Bc'); select 3 = positionCaseInsensitive(materialize('abc'), 'C'); select 1 = positionCaseInsensitive(materialize(''), '') from system.numbers limit 10; select 1 = positionCaseInsensitive(materialize('abc'), '') from system.numbers limit 10; select 0 = positionCaseInsensitive(materialize(''), 'aBc') from system.numbers limit 10; select 1 = positionCaseInsensitive(materialize('abc'), 'aBc') from system.numbers limit 10; select 2 = positionCaseInsensitive(materialize('abc'), 'Bc') from system.numbers limit 10; select 3 = positionCaseInsensitive(materialize('abc'), 'C') from system.numbers limit 10; select 1 = positionCaseInsensitive('', ''); select 1 = positionCaseInsensitive('абв', ''); select 0 = positionCaseInsensitive('', 'аБв'); select 0 = positionCaseInsensitive('абв', 'аБв'); select 0 = positionCaseInsensitive('абв', 'Бв'); select 0 = positionCaseInsensitive('абв', 'В'); select 1 = positionCaseInsensitive(materialize(''), ''); select 1 = positionCaseInsensitive(materialize('абв'), ''); select 0 = positionCaseInsensitive(materialize(''), 'аБв'); select 0 = positionCaseInsensitive(materialize('абв'), 'аБв'); select 0 = positionCaseInsensitive(materialize('абв'), 'Бв'); select 0 = positionCaseInsensitive(materialize('абв'), 'В'); select 1 = positionCaseInsensitive(materialize(''), '') from system.numbers limit 10; select 1 = positionCaseInsensitive(materialize('абв'), '') from system.numbers limit 10; select 0 = positionCaseInsensitive(materialize(''), 'аБв') from system.numbers limit 10; select 0 = positionCaseInsensitive(materialize('абв'), 'аБв') from system.numbers limit 10; select 0 = positionCaseInsensitive(materialize('абв'), 'Бв') from system.numbers limit 10; select 0 = positionCaseInsensitive(materialize('абв'), 'В') from system.numbers limit 10; select 1 = positionCaseInsensitiveUTF8('', ''); select 1 = positionCaseInsensitiveUTF8('абв', ''); select 0 = positionCaseInsensitiveUTF8('', 'аБв'); select 1 = positionCaseInsensitiveUTF8('абв', 'аБв'); select 2 = positionCaseInsensitiveUTF8('абв', 'Бв'); select 3 = positionCaseInsensitiveUTF8('абв', 'в'); select 1 = positionCaseInsensitiveUTF8(materialize(''), ''); select 1 = positionCaseInsensitiveUTF8(materialize('абв'), ''); select 0 = positionCaseInsensitiveUTF8(materialize(''), 'аБв'); select 1 = positionCaseInsensitiveUTF8(materialize('абв'), 'аБв'); select 2 = positionCaseInsensitiveUTF8(materialize('абв'), 'Бв'); select 3 = positionCaseInsensitiveUTF8(materialize('абв'), 'В'); select 1 = positionCaseInsensitiveUTF8(materialize(''), '') from system.numbers limit 10; select 1 = positionCaseInsensitiveUTF8(materialize('абв'), '') from system.numbers limit 10; select 0 = positionCaseInsensitiveUTF8(materialize(''), 'аБв') from system.numbers limit 10; select 1 = positionCaseInsensitiveUTF8(materialize('абв'), 'аБв') from system.numbers limit 10; select 2 = positionCaseInsensitiveUTF8(materialize('абв'), 'Бв') from system.numbers limit 10; select 3 = positionCaseInsensitiveUTF8(materialize('абв'), 'В') from system.numbers limit 10; select position('' as h, '' as n) = positionCaseInsensitive(h, n); select position('abc' as h, '' as n) = positionCaseInsensitive(n, n); select 0 = positionCaseInsensitive('', 'aBc'); select position('abc' as h, lower('aBc' as n)) = positionCaseInsensitive(h, n); select position('abc' as h, lower('Bc' as n)) = positionCaseInsensitive(h, n); select position('abc' as h, lower('C' as n)) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('') as h, '' as n) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('abc') as h, '' as n) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('') as h, lower('aBc' as n)) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('abc') as h, lower('aBc' as n)) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('abc') as h, lower('Bc' as n)) = positionCaseInsensitive(h, n); select positionCaseInsensitive(materialize('abc') as h, lower('C' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('abc') as h, lower('' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('') as h, lower('aBc' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('abc') as h, lower('aBc' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('abc') as h, lower('Bc' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('abc') as h, lower('C' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position('' as h, lower('' as n)) = positionCaseInsensitive(h, n); select position('абв' as h, lower('' as n)) = positionCaseInsensitive(h, n); select position('' as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position('абв' as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position('абв' as h, lower('Бв' as n)) = positionCaseInsensitive(h, n); select position('абв' as h, lower('В' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('Бв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('В' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('Бв' as n)) = positionCaseInsensitive(h, n); select position(materialize('абв') as h, lower('В' as n)) = positionCaseInsensitive(h, n); select position(materialize('') as h, lower('' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('абв') as h, lower('' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('абв') as h, lower('аБв' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('абв') as h, lower('Бв' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select position(materialize('абв') as h, lower('В' as n)) = positionCaseInsensitive(h, n) from system.numbers limit 10; select positionUTF8('' as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8('абв' as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8('' as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8('абв' as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8('абв' as h, lowerUTF8('Бв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8('абв' as h, lowerUTF8('в' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('') as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('абв') as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('') as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('абв') as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('абв') as h, lowerUTF8('Бв' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('абв') as h, lowerUTF8('В' as n)) = positionCaseInsensitiveUTF8(h, n); select positionUTF8(materialize('') as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10; select positionUTF8(materialize('абв') as h, lowerUTF8('' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10; select positionUTF8(materialize('') as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10; select positionUTF8(materialize('абв') as h, lowerUTF8('аБв' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10; select positionUTF8(materialize('абв') as h, lowerUTF8('Бв' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10; select positionUTF8(materialize('абв') as h, lowerUTF8('В' as n)) = positionCaseInsensitiveUTF8(h, n) from system.numbers limit 10;
63.454082
133
0.721878
7fdc4d95af75db29529dbcd84ff8bfe76f06cbc1
474
go
Go
termios/use.go
mcsakoff/go-serial
0bb7f04a02f0e2c5b197563d36142e3fdd7a2cd2
[ "BSD-2-Clause" ]
9
2015-11-05T17:51:00.000Z
2022-01-11T13:47:35.000Z
termios/use.go
mcsakoff/go-serial
0bb7f04a02f0e2c5b197563d36142e3fdd7a2cd2
[ "BSD-2-Clause" ]
1
2021-05-28T03:25:54.000Z
2021-05-28T03:25:54.000Z
termios/use.go
mcsakoff/go-serial
0bb7f04a02f0e2c5b197563d36142e3fdd7a2cd2
[ "BSD-2-Clause" ]
2
2017-03-20T00:35:09.000Z
2020-11-16T13:12:57.000Z
// Copyright (c) 2015, Nick Patavalis (npat@efault.net). // All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE.txt file. // +build linux freebsd netbsd openbsd darwin dragonfly solaris // +build nocgo !cgo package termios import "unsafe" // use is a no-op, but the compiler cannot see that it is. // Calling use(p) ensures that p is kept live until that point. //go:noescape func use(p unsafe.Pointer)
27.882353
63
0.732068
4bc0a111b35663c2abe1c3b76e55af1fffb12774
3,394
kt
Kotlin
src/main/kotlin/at/ac/tuwien/otl/evrptw/metaheuristic/neighbourhood/TwoOrOptExplorer.kt
fuvidani/e-vrptw
cdc80fa603b7a79271a538e47e795d0c8b3ef3d5
[ "MIT" ]
13
2018-09-16T12:35:23.000Z
2022-03-04T00:24:24.000Z
src/main/kotlin/at/ac/tuwien/otl/evrptw/metaheuristic/neighbourhood/TwoOrOptExplorer.kt
fuvidani/e-vrptw
cdc80fa603b7a79271a538e47e795d0c8b3ef3d5
[ "MIT" ]
null
null
null
src/main/kotlin/at/ac/tuwien/otl/evrptw/metaheuristic/neighbourhood/TwoOrOptExplorer.kt
fuvidani/e-vrptw
cdc80fa603b7a79271a538e47e795d0c8b3ef3d5
[ "MIT" ]
9
2020-01-17T08:13:27.000Z
2022-03-13T19:26:00.000Z
package at.ac.tuwien.otl.evrptw.metaheuristic.neighbourhood import at.ac.tuwien.otl.evrptw.dto.EVRPTWInstance import at.ac.tuwien.otl.evrptw.dto.EVRPTWSolution import at.ac.tuwien.otl.evrptw.dto.Operator import at.ac.tuwien.otl.evrptw.dto.Route /** * <h4>About this class</h4> * <p>Description</p> * * @author Daniel Fuevesi * @version 1.0.0 * @since 26.06.2018 */ class TwoOrOptExplorer : INeighbourhoodExplorer<EVRPTWSolution> { /** * Explores (enumerates) every possible solution in the search space * of this neighbourhood based on the initial solution and returns them * in a list. * * @param initialSolution an initial solution for which the neighbours should * be calculated * @return a list of neighbour solutions, not necessarily sorted */ override fun exploreEverySolution( initialSolution: EVRPTWSolution, startAtIncl: Int, endAtExcl: Int ): List<EVRPTWSolution> { val result = mutableListOf<EVRPTWSolution>() for (routeIndex in startAtIncl until endAtExcl) { val route = initialSolution.routes[routeIndex] if (route.size >= 5) { for (nodeIndex in 1 until route.size - 2) { if (route[nodeIndex] is EVRPTWInstance.Customer && route[nodeIndex + 1] is EVRPTWInstance.Customer) { if (nodeIndex > 1) { for (nodeBefore in 1 until nodeIndex) { result.add(performOrOptBackwards(initialSolution, routeIndex, nodeIndex, nodeBefore)) } } if (nodeIndex + 1 != route.size - 2) { for (nodeAfter in nodeIndex + 2 until route.size - 1) { result.add(performOrOptForwards(initialSolution, routeIndex, nodeIndex, nodeAfter)) } } } } } } return result } private fun performOrOptBackwards(solution: EVRPTWSolution, routeIndex: Int, indexOfChainFirstNode: Int, insertBeforeIndex: Int): EVRPTWSolution { val routes = solution.copyOfRoutes() val route = routes[routeIndex] val node1 = route[indexOfChainFirstNode] val node2 = route[indexOfChainFirstNode + 1] val chain = listOf(node1, node2) route.removeAll(chain) route.addAll(insertBeforeIndex, chain) return EVRPTWSolution( solution.instance, routes, Route.calculateTotalDistance(routes, solution.instance), Operator.TWO_OR_OPT ) } private fun performOrOptForwards(solution: EVRPTWSolution, routeIndex: Int, indexOfChainFirstNode: Int, insertAfterIndex: Int): EVRPTWSolution { val routes = solution.copyOfRoutes() val route = routes[routeIndex] val node1 = route[indexOfChainFirstNode] val node2 = route[indexOfChainFirstNode + 1] val chain = listOf(node1, node2) route.removeAll(chain) route.addAll(insertAfterIndex - 1, chain) return EVRPTWSolution( solution.instance, routes, Route.calculateTotalDistance(routes, solution.instance), Operator.TWO_OR_OPT ) } }
39.011494
150
0.601945
d29d09516aae0d2c14bb9985ba641c3edd093248
84,560
sql
SQL
src/ucar/unidata/data/point/testdb.sql
mhiley/IDV
bf45573c008f4b1d155d42fbb078bd99578d69d3
[ "CNRI-Jython" ]
48
2015-02-22T05:05:01.000Z
2022-03-14T14:23:41.000Z
src/ucar/unidata/data/point/testdb.sql
mhiley/IDV
bf45573c008f4b1d155d42fbb078bd99578d69d3
[ "CNRI-Jython" ]
40
2015-02-09T19:25:29.000Z
2022-02-16T00:21:08.000Z
src/ucar/unidata/data/point/testdb.sql
mhiley/IDV
bf45573c008f4b1d155d42fbb078bd99578d69d3
[ "CNRI-Jython" ]
28
2015-04-03T05:43:00.000Z
2022-01-31T23:41:20.000Z
CREATE TABLE pointdata ( time timestamp, latitude double, longitude double, altitude double, station varchar(50), temperature double, winddir double, windspeed double); insert into pointdata values('2008-02-04 19:00:00',32.864,117.131,145.0,'KNKX',12.8,260.0,3.6); insert into pointdata values('2008-02-04 19:00:00',15.117,-145.733,66.0,'PGSN',25.6,40.0,3.1); insert into pointdata values('2008-02-04 19:00:00',48.083,69.550,5.0,'WAF ',-6.0,210.0,4.6); insert into pointdata values('2008-02-04 19:00:00',47.300,54.000,16.0,'WAR ',-4.0,340.0,6.7); insert into pointdata values('2008-02-04 19:00:00',45.767,62.683,2.0,'WBK ',-6.0,320.0,7.2); insert into pointdata values('2008-02-04 19:00:00',49.833,64.300,53.0,'WBY ',-6.0,290.0,3.6); insert into pointdata values('2008-02-04 19:00:00',52.067,111.467,791.0,'WCT ',-20.0,170.0,5.1); insert into pointdata values('2008-02-04 19:00:00',50.467,59.633,6.0,'WDM ',-7.0,350.0,2.1); insert into pointdata values('2008-02-04 19:00:00',49.683,54.800,92.0,'WDO ',-7.0,340.0,8.2); insert into pointdata values('2008-02-04 19:00:00',47.417,72.800,169.0,'WDQ ',-7.0,330.0,1.0); insert into pointdata values('2008-02-04 19:00:00',47.233,60.133,26.0,'WEF ',-5.0,310.0,12.3); insert into pointdata values('2008-02-04 19:00:00',49.433,108.983,1078.0,'WEH ',-17.0,110.0,1.5); insert into pointdata values('2008-02-04 19:00:00',54.583,130.700,8.0,'WEK ',-2.0,40.0,14.4); insert into pointdata values('2008-02-04 19:00:00',46.450,61.967,11.0,'WEP ',-6.0,280.0,6.2); insert into pointdata values('2008-02-04 19:00:00',49.750,114.900,1137.0,'WGW ',-7.0,0.0,0.0); insert into pointdata values('2008-02-04 19:00:00',55.450,60.233,8.0,'WHO ',-15.0,310.0,4.6); insert into pointdata values('2008-02-04 19:00:00',49.083,61.700,4.0,'WHP ',-7.0,320.0,6.2); insert into pointdata values('2008-02-04 19:00:00',53.183,99.267,223.0,'WJD ',-21.0,50.0,2.1); insert into pointdata values('2008-02-04 19:00:00',49.083,116.500,646.0,'WJR ',-3.0,300.0,4.6); insert into pointdata values('2008-02-04 19:00:00',54.767,112.017,565.0,'WLB ',-19.0,140.0,1.0); insert into pointdata values('2008-02-04 19:00:00',50.933,127.633,17.0,'WLP ',2.0,150.0,8.7); insert into pointdata values('2008-02-04 19:00:00',52.183,127.467,32.0,'WME ',-0.99,60.0,4.1); insert into pointdata values('2008-02-04 19:00:00',48.017,64.500,3.0,'WMI ',-7.0,230.0,5.1); insert into pointdata values('2008-02-04 19:00:00',47.800,69.550,148.0,'WNH ',-6.0,230.0,2.1); insert into pointdata values('2008-02-04 19:00:00',50.267,117.817,524.0,'WNP ',-3.0,270.0,0.5); insert into pointdata values('2008-02-04 19:00:00',49.750,84.167,259.0,'WNZ ',-2.0,170.0,3.1); insert into pointdata values('2008-02-04 19:00:00',51.767,104.217,561.0,'WOY ',-24.0,40.0,1.5); insert into pointdata values('2008-02-04 19:00:00',47.917,74.617,442.0,'WPK ',-4.0,200.0,1.5); insert into pointdata values('2008-02-04 19:00:00',49.200,98.900,470.0,'WPO ',-16.0,360.0,7.7); insert into pointdata values('2008-02-04 19:00:00',50.600,120.517,700.0,'WPR ',-6.0,0.0,0.0); insert into pointdata values('2008-02-04 19:00:00',53.317,132.750,14.0,'WQS ',4.0,170.0,15.4); insert into pointdata values('2008-02-04 19:00:00',46.650,53.067,27.0,'WRA ',-4.0,320.0,9.8); insert into pointdata values('2008-02-04 19:00:00',52.433,114.933,988.0,'WRM ',-19.0,130.0,2.1); insert into pointdata values('2008-02-04 19:00:00',45.350,60.983,4.0,'WRN ',-3.0,310.0,9.8); insert into pointdata values('2008-02-04 19:00:00',54.167,131.667,7.0,'WRO ',2.0,150.0,14.4); insert into pointdata values('2008-02-04 19:00:00',49.633,114.483,1303.0,'WRT ',-8.0,80.0,0.5); insert into pointdata values('2008-02-04 19:00:00',50.117,127.933,99.0,'WRU ',1.0,110.0,7.7); insert into pointdata values('2008-02-04 19:00:00',49.250,65.333,29.0,'WSF ',-6.0,280.0,6.7); insert into pointdata values('2008-02-04 19:00:00',49.783,123.167,59.0,'WSK ',-3.0,310.0,0.5); insert into pointdata values('2008-02-04 19:00:00',50.700,119.283,351.0,'WSL ',-8.0,0.0,0.0); insert into pointdata values('2008-02-04 19:00:00',45.217,67.250,26.0,'WSS ',-0.99,340.0,3.1); insert into pointdata values('2008-02-04 19:00:00',43.300,79.800,77.0,'WWB ',3.0,70.0,6.7); insert into pointdata values('2008-02-04 19:00:00',43.983,64.667,9.0,'WWE ',2.0,300.0,4.1); insert into pointdata values('2008-02-04 19:00:00',52.800,97.617,223.0,'WWS ',-22.0,290.0,6.2); insert into pointdata values('2008-02-04 19:00:00',43.250,79.217,79.0,'WWZ ',1.0,70.0,7.2); insert into pointdata values('2008-02-04 19:00:00',51.017,57.100,8.0,'WXI ',-10.0,270.0,3.1); insert into pointdata values('2008-02-04 19:00:00',49.033,119.433,283.0,'WYY ',-5.0,210.0,1.0); insert into pointdata values('2008-02-04 19:00:00',51.200,115.550,1397.0,'WZG ',-12.0,230.0,4.1); insert into pointdata values('2008-02-04 19:00:00',60.167,132.767,705.0,'WZW ',-24.0,270.0,1.5); insert into pointdata values('2008-02-04 19:00:00',12.000,83.800,5.0,'MNBL',28.0,90.0,2.1); insert into pointdata values('2008-02-04 19:00:00',30.317,97.767,198.0,'KATT',22.2,210.0,2.6); insert into pointdata values('2008-02-04 19:00:00',53.883,122.683,691.0,'CYXS',-13.0,180.0,4.1); insert into pointdata values('2008-02-04 20:00:00',32.864,117.131,145.0,'KNKX',12.8,280.0,3.6); insert into pointdata values('2008-02-04 20:00:00',20.050,-145.217,24.0,'PGWT',26.0,80.0,1.0); insert into pointdata values('2008-02-04 20:00:00',44.254,121.150,938.0,'KRDM',1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',15.117,-145.733,66.0,'PGSN',25.6,30.0,2.6); insert into pointdata values('2008-02-04 20:00:00',47.300,54.000,16.0,'WAR ',-5.0,330.0,8.2); insert into pointdata values('2008-02-04 20:00:00',45.767,62.683,2.0,'WBK ',-6.0,320.0,7.2); insert into pointdata values('2008-02-04 20:00:00',49.833,64.300,53.0,'WBY ',-6.0,280.0,4.1); insert into pointdata values('2008-02-04 20:00:00',52.067,111.467,791.0,'WCT ',-19.0,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',50.467,59.633,6.0,'WDM ',-8.0,10.0,3.6); insert into pointdata values('2008-02-04 20:00:00',49.683,54.800,92.0,'WDO ',-7.0,350.0,7.2); insert into pointdata values('2008-02-04 20:00:00',47.417,72.800,169.0,'WDQ ',-6.0,310.0,1.5); insert into pointdata values('2008-02-04 20:00:00',49.433,108.983,1078.0,'WEH ',-17.0,90.0,1.0); insert into pointdata values('2008-02-04 20:00:00',54.583,130.700,8.0,'WEK ',-0.99,40.0,13.9); insert into pointdata values('2008-02-04 20:00:00',46.450,61.967,11.0,'WEP ',-6.0,280.0,6.2); insert into pointdata values('2008-02-04 20:00:00',49.750,114.900,1137.0,'WGW ',-6.0,210.0,2.1); insert into pointdata values('2008-02-04 20:00:00',55.450,60.233,8.0,'WHO ',-15.0,290.0,3.1); insert into pointdata values('2008-02-04 20:00:00',53.183,99.267,223.0,'WJD ',-22.0,60.0,1.5); insert into pointdata values('2008-02-04 20:00:00',49.083,116.500,646.0,'WJR ',-3.0,300.0,3.1); insert into pointdata values('2008-02-04 20:00:00',54.767,112.017,565.0,'WLB ',-18.0,190.0,2.6); insert into pointdata values('2008-02-04 20:00:00',50.933,127.633,17.0,'WLP ',2.0,130.0,9.3); insert into pointdata values('2008-02-04 20:00:00',48.017,64.500,3.0,'WMI ',-7.0,230.0,3.6); insert into pointdata values('2008-02-04 20:00:00',47.800,69.550,148.0,'WNH ',-6.0,190.0,1.5); insert into pointdata values('2008-02-04 20:00:00',50.267,117.817,524.0,'WNP ',-3.0,270.0,1.0); insert into pointdata values('2008-02-04 20:00:00',49.750,84.167,259.0,'WNZ ',-2.0,170.0,2.6); insert into pointdata values('2008-02-04 20:00:00',51.767,104.217,561.0,'WOY ',-24.0,60.0,1.0); insert into pointdata values('2008-02-04 20:00:00',47.917,74.617,442.0,'WPK ',-4.0,160.0,1.5); insert into pointdata values('2008-02-04 20:00:00',49.200,98.900,470.0,'WPO ',-16.0,360.0,7.7); insert into pointdata values('2008-02-04 20:00:00',50.600,120.517,700.0,'WPR ',-4.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',46.650,53.067,27.0,'WRA ',-5.0,320.0,8.7); insert into pointdata values('2008-02-04 20:00:00',52.433,114.933,988.0,'WRM ',-17.0,110.0,2.1); insert into pointdata values('2008-02-04 20:00:00',54.167,131.667,7.0,'WRO ',2.0,150.0,15.4); insert into pointdata values('2008-02-04 20:00:00',49.633,114.483,1303.0,'WRT ',-4.0,300.0,6.7); insert into pointdata values('2008-02-04 20:00:00',50.117,127.933,99.0,'WRU ',1.0,110.0,11.8); insert into pointdata values('2008-02-04 20:00:00',49.250,65.333,29.0,'WSF ',-7.0,280.0,6.7); insert into pointdata values('2008-02-04 20:00:00',49.783,123.167,59.0,'WSK ',-0.99,260.0,0.5); insert into pointdata values('2008-02-04 20:00:00',50.700,119.283,351.0,'WSL ',-7.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',45.217,67.250,26.0,'WSS ',0.01,320.0,2.6); insert into pointdata values('2008-02-04 20:00:00',43.300,79.800,77.0,'WWB ',3.0,60.0,6.2); insert into pointdata values('2008-02-04 20:00:00',43.983,64.667,9.0,'WWE ',1.0,310.0,3.6); insert into pointdata values('2008-02-04 20:00:00',43.250,79.217,79.0,'WWZ ',2.0,70.0,7.7); insert into pointdata values('2008-02-04 20:00:00',49.033,119.433,283.0,'WYY ',-4.0,210.0,1.0); insert into pointdata values('2008-02-04 20:00:00',51.200,115.550,1397.0,'WZG ',-10.0,230.0,4.1); insert into pointdata values('2008-02-04 20:00:00',60.167,132.767,705.0,'WZW ',-24.0,270.0,1.5); insert into pointdata values('2008-02-04 20:00:00',12.000,83.800,5.0,'MNBL',29.0,110.0,2.1); insert into pointdata values('2008-02-04 20:00:00',53.883,122.683,691.0,'CYXS',-11.0,180.0,3.1); insert into pointdata values('2008-02-04 20:00:00',-77.950,-166.517,17.0,'NZPG',-13.0,60.0,4.1); insert into pointdata values('2008-02-04 20:00:00',-77.867,-167.083,66.0,'NZWD',-17.0,30.0,2.6); insert into pointdata values('2008-02-04 20:00:00',-14.433,-132.267,108.0,'YPTN',26.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',34.398,96.148,180.0,'KAQR',26.0,210.0,8.2); insert into pointdata values('2008-02-04 20:00:00',18.017,66.567,9.0,'TJPS',30.0,60.0,2.6); insert into pointdata values('2008-02-04 20:00:00',18.450,66.000,3.0,'TJSJ',26.1,60.0,7.2); insert into pointdata values('2008-02-04 20:00:00',28.973,95.863,14.0,'KBYY',25.0,150.0,7.7); insert into pointdata values('2008-02-04 20:00:00',45.150,89.150,0.0,'KAIG',-2.0,50.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.717,96.667,228.0,'KGYI',25.0,180.0,9.3); insert into pointdata values('2008-02-04 20:00:00',29.115,95.463,7.0,'KLBX',23.3,180.0,9.3); insert into pointdata values('2008-02-04 20:00:00',32.131,110.955,805.0,'KTUS',5.0,230.0,2.6); insert into pointdata values('2008-02-04 20:00:00',31.583,110.350,1438.0,'KFHU',3.0,290.0,9.8); insert into pointdata values('2008-02-04 20:00:00',61.600,149.083,74.0,'PAAQ',-22.8,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',70.134,143.577,2.0,'PABA',-33.3,130.0,2.1); insert into pointdata values('2008-02-04 20:00:00',60.780,161.838,38.0,'PABE',-28.9,20.0,9.3); insert into pointdata values('2008-02-04 20:00:00',64.000,145.733,389.0,'PABI',-37.2,160.0,2.6); insert into pointdata values('2008-02-04 20:00:00',71.285,156.766,13.0,'PABR',-20.6,270.0,4.1); insert into pointdata values('2008-02-04 20:00:00',66.917,151.517,196.0,'PABT',-39.4,20.0,1.5); insert into pointdata values('2008-02-04 20:00:00',61.417,149.517,29.0,'PABV',-26.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',55.221,162.728,30.0,'PACD',-2.8,320.0,3.6); insert into pointdata values('2008-02-04 20:00:00',60.492,145.478,13.0,'PACV',-10.6,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',61.783,166.033,139.0,'PACZ',-18.0,170.0,2.1); insert into pointdata values('2008-02-04 20:00:00',66.083,162.750,5.0,'PADE',-30.0,20.0,3.6); insert into pointdata values('2008-02-04 20:00:00',51.878,176.646,6.0,'PADK',0.01,250.0,7.2); insert into pointdata values('2008-02-04 20:00:00',59.050,158.517,26.0,'PADL',-21.0,20.0,5.1); insert into pointdata values('2008-02-04 20:00:00',57.750,152.500,22.0,'PADQ',-7.2,290.0,5.7); insert into pointdata values('2008-02-04 20:00:00',62.700,143.983,730.0,'PADT',-23.0,120.0,5.1); insert into pointdata values('2008-02-04 20:00:00',53.900,166.533,7.0,'PADU',-0.99,190.0,4.1); insert into pointdata values('2008-02-04 20:00:00',61.253,149.794,65.0,'PAED',-22.6,50.0,2.6); insert into pointdata values('2008-02-04 20:00:00',64.776,141.151,268.0,'PAEG',-39.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',58.650,162.067,165.0,'PAEH',-18.0,170.0,2.1); insert into pointdata values('2008-02-04 20:00:00',64.650,147.100,167.0,'PAEI',-38.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',62.783,164.500,4.0,'PAEM',-29.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',60.573,151.245,30.0,'PAEN',-30.6,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',61.250,153.817,358.0,'PAER',-42.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',64.804,147.876,132.0,'PAFA',-39.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',64.837,147.596,138.0,'PAFB',-42.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',56.950,133.900,52.0,'PAFE',-0.99,100.0,5.7); insert into pointdata values('2008-02-04 20:00:00',67.100,157.850,88.0,'PAFM',-35.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',62.150,145.450,481.0,'PAGK',-23.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',64.543,163.039,8.0,'PAGL',-35.0,310.0,4.6); insert into pointdata values('2008-02-04 20:00:00',57.500,134.583,0.0,'PAGN',-0.49,60.0,2.1); insert into pointdata values('2008-02-04 20:00:00',58.417,135.700,10.0,'PAGS',-2.0,140.0,4.6); insert into pointdata values('2008-02-04 20:00:00',59.467,135.300,16.0,'PAGY',-13.3,40.0,11.8); insert into pointdata values('2008-02-04 20:00:00',65.698,156.351,65.0,'PAHL',-40.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',59.250,135.517,5.0,'PAHN',-13.9,300.0,7.2); insert into pointdata values('2008-02-04 20:00:00',59.650,151.483,26.0,'PAHO',-16.7,60.0,4.1); insert into pointdata values('2008-02-04 20:00:00',58.185,157.386,28.0,'PAII',-24.0,20.0,5.7); insert into pointdata values('2008-02-04 20:00:00',59.750,154.900,57.0,'PAIL',-26.7,20.0,5.1); insert into pointdata values('2008-02-04 20:00:00',66.983,153.700,372.0,'PAIM',-35.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',56.311,158.373,6.0,'PAJC',-2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',58.355,134.576,6.0,'PAJN',-3.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',59.933,164.030,3.0,'PAKI',-29.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',64.934,161.158,37.0,'PAKK',-23.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',58.677,156.649,17.0,'PAKN',-27.8,360.0,5.7); insert into pointdata values('2008-02-04 20:00:00',68.134,151.743,641.0,'PAKP',-31.0,180.0,6.2); insert into pointdata values('2008-02-04 20:00:00',55.356,131.714,27.0,'PAKT',0.61,140.0,7.7); insert into pointdata values('2008-02-04 20:00:00',70.317,149.583,20.0,'PAKU',-32.0,220.0,3.6); insert into pointdata values('2008-02-04 20:00:00',64.317,158.733,54.0,'PAKV',-41.7,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',55.583,133.083,24.0,'PAKW',1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',61.183,149.967,22.0,'PALH',-21.1,80.0,1.5); insert into pointdata values('2008-02-04 20:00:00',62.033,142.667,735.0,'PALK',-24.0,230.0,1.0); insert into pointdata values('2008-02-04 20:00:00',70.333,150.933,5.0,'PALP',-31.0,210.0,4.1); insert into pointdata values('2008-02-04 20:00:00',68.883,166.100,4.0,'PALU',-18.9,210.0,19.0); insert into pointdata values('2008-02-04 20:00:00',62.967,155.617,103.0,'PAMC',-40.6,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',59.433,146.300,27.0,'PAMD',-3.0,40.0,7.2); insert into pointdata values('2008-02-04 20:00:00',63.880,152.300,208.0,'PAMH',-28.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',55.131,131.578,0.0,'PAMM',1.0,160.0,5.1); insert into pointdata values('2008-02-04 20:00:00',61.217,149.850,42.0,'PAMR',-20.6,0.0,5.1); insert into pointdata values('2008-02-04 20:00:00',61.174,149.996,44.0,'PANC',-22.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',61.581,159.543,27.0,'PANI',-29.0,10.0,1.5); insert into pointdata values('2008-02-04 20:00:00',64.550,149.083,110.0,'PANN',-41.7,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',55.042,131.572,36.0,'PANT',1.7,140.0,5.7); insert into pointdata values('2008-02-04 20:00:00',58.117,135.450,0.0,'PAOH',-3.8,80.0,3.6); insert into pointdata values('2008-02-04 20:00:00',64.512,165.445,11.0,'PAOM',-34.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',62.961,141.929,523.0,'PAOR',-40.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',66.884,162.598,3.0,'PAOT',-32.2,90.0,4.6); insert into pointdata values('2008-02-04 20:00:00',56.579,169.661,38.0,'PAPB',-2.2,80.0,14.4); insert into pointdata values('2008-02-04 20:00:00',56.817,132.967,0.0,'PAPG',-2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',56.950,158.633,29.0,'PAPH',-19.0,40.0,11.8); insert into pointdata values('2008-02-04 20:00:00',68.350,166.800,4.0,'PAPO',-25.0,160.0,8.2); insert into pointdata values('2008-02-04 20:00:00',70.210,151.006,12.0,'PAQT',-31.0,190.0,4.6); insert into pointdata values('2008-02-04 20:00:00',68.114,145.579,638.0,'PARC',-48.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',63.683,170.500,16.0,'PASA',-24.0,210.0,1.5); insert into pointdata values('2008-02-04 20:00:00',70.200,148.467,17.0,'PASC',-33.0,220.0,4.1); insert into pointdata values('2008-02-04 20:00:00',55.317,160.517,7.0,'PASD',-0.99,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',66.267,166.083,4.0,'PASH',-31.0,140.0,2.1); insert into pointdata values('2008-02-04 20:00:00',57.048,135.365,6.0,'PASI',0.61,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',66.617,160.000,8.0,'PASK',-36.0,70.0,2.6); insert into pointdata values('2008-02-04 20:00:00',61.717,157.150,54.0,'PASL',-23.0,320.0,2.1); insert into pointdata values('2008-02-04 20:00:00',62.050,163.300,95.0,'PASM',-24.0,50.0,4.1); insert into pointdata values('2008-02-04 20:00:00',57.167,170.217,19.0,'PASN',-4.4,70.0,14.9); insert into pointdata values('2008-02-04 20:00:00',59.450,151.700,9.0,'PASO',-12.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',60.483,151.033,33.0,'PASX',-31.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',52.717,-174.117,30.0,'PASY',-4.0,40.0,1.5); insert into pointdata values('2008-02-04 20:00:00',65.167,152.100,69.0,'PATA',-40.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',65.567,167.917,83.0,'PATC',-21.1,180.0,6.2); insert into pointdata values('2008-02-04 20:00:00',62.320,150.094,109.0,'PATK',-27.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',62.900,155.983,294.0,'PATL',-30.6,70.0,2.1); insert into pointdata values('2008-02-04 20:00:00',60.783,148.833,29.0,'PATO',-26.7,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',63.883,160.800,6.0,'PAUN',-27.0,90.0,4.6); insert into pointdata values('2008-02-04 20:00:00',61.133,146.267,37.0,'PAVD',-13.0,30.0,2.6); insert into pointdata values('2008-02-04 20:00:00',60.117,149.450,9.0,'PAWD',-16.7,30.0,8.2); insert into pointdata values('2008-02-04 20:00:00',56.483,132.367,13.0,'PAWG',1.0,90.0,7.2); insert into pointdata values('2008-02-04 20:00:00',70.633,159.850,12.0,'PAWI',-25.6,200.0,4.6); insert into pointdata values('2008-02-04 20:00:00',67.567,162.983,27.0,'PAWN',-37.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',61.572,149.540,106.0,'PAWS',-28.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',63.033,145.500,809.0,'PAXK',-25.0,360.0,3.1); insert into pointdata values('2008-02-04 20:00:00',59.517,139.667,11.0,'PAYA',-6.7,100.0,2.6); insert into pointdata values('2008-02-04 20:00:00',61.933,147.167,1002.0,'PAZK',-24.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',66.567,145.267,433.0,'PFYU',-48.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',69.717,163.000,8.0,'PPIZ',-26.6,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',34.280,87.600,284.0,'K1M4',21.6,200.0,8.2); insert into pointdata values('2008-02-04 20:00:00',34.269,86.858,294.0,'K3A1',18.0,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',34.474,85.721,267.0,'K4A9',18.0,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',31.300,86.383,94.0,'K79J',25.0,200.0,3.6); insert into pointdata values('2008-02-04 20:00:00',34.229,86.256,315.0,'K8A0',16.0,160.0,2.1); insert into pointdata values('2008-02-04 20:00:00',32.915,85.963,209.0,'KALX',24.0,170.0,4.6); insert into pointdata values('2008-02-04 20:00:00',32.617,85.433,236.0,'KAUO',23.0,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',30.614,88.063,7.0,'KBFM',21.1,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.566,86.745,196.0,'KBHM',21.1,200.0,6.7); insert into pointdata values('2008-02-04 20:00:00',34.658,86.943,180.0,'KDCU',18.9,180.0,7.7); insert into pointdata values('2008-02-04 20:00:00',31.321,85.450,122.0,'KDHN',25.0,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',33.178,86.782,178.0,'KEET',22.8,160.0,6.7); insert into pointdata values('2008-02-04 20:00:00',33.967,86.083,173.0,'KGAD',14.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',31.419,87.048,78.0,'KGZH',26.1,190.0,4.6); insert into pointdata values('2008-02-04 20:00:00',31.350,85.667,97.0,'KHEY',23.9,200.0,6.7); insert into pointdata values('2008-02-04 20:00:00',34.644,86.786,192.0,'KHSV',18.9,180.0,5.1); insert into pointdata values('2008-02-04 20:00:00',32.300,86.406,67.0,'KMGM',23.9,170.0,4.6); insert into pointdata values('2008-02-04 20:00:00',30.688,88.246,66.0,'KMOB',22.8,150.0,6.2); insert into pointdata values('2008-02-04 20:00:00',34.744,87.599,167.0,'KMSL',22.8,190.0,6.2); insert into pointdata values('2008-02-04 20:00:00',32.383,86.367,51.0,'KMXF',23.9,190.0,4.6); insert into pointdata values('2008-02-04 20:00:00',31.283,85.717,91.0,'KOZR',24.1,190.0,6.2); insert into pointdata values('2008-02-04 20:00:00',33.220,87.611,52.0,'KTCL',24.4,190.0,6.7); insert into pointdata values('2008-02-04 20:00:00',31.860,86.012,121.0,'KTOI',20.0,170.0,4.1); insert into pointdata values('2008-02-04 20:00:00',36.133,90.917,83.0,'KARG',22.0,200.0,12.4); insert into pointdata values('2008-02-04 20:00:00',36.183,94.117,412.0,'KASG',24.0,220.0,6.2); insert into pointdata values('2008-02-04 20:00:00',36.370,92.472,282.0,'KBPK',23.3,200.0,5.7); insert into pointdata values('2008-02-04 20:00:00',35.733,91.650,141.0,'KBVX',23.0,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',35.967,89.950,78.0,'KBYH',22.0,210.0,9.3); insert into pointdata values('2008-02-04 20:00:00',33.617,92.767,40.0,'KCDH',24.0,180.0,6.2); insert into pointdata values('2008-02-04 20:00:00',34.047,94.399,108.0,'KDEQ',23.3,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.221,92.813,84.0,'KELD',23.3,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',36.300,92.583,219.0,'KFLP',24.0,200.0,5.1); insert into pointdata values('2008-02-04 20:00:00',35.334,94.365,142.0,'KFSM',26.1,200.0,7.7); insert into pointdata values('2008-02-04 20:00:00',36.010,94.168,381.0,'KFYV',23.9,200.0,7.2); insert into pointdata values('2008-02-04 20:00:00',35.939,89.832,78.0,'KHKA',22.2,200.0,10.3); insert into pointdata values('2008-02-04 20:00:00',34.478,93.096,165.0,'KHOT',22.8,220.0,5.7); insert into pointdata values('2008-02-04 20:00:00',36.262,93.155,416.0,'KHRO',23.3,210.0,4.6); insert into pointdata values('2008-02-04 20:00:00',35.837,90.643,79.0,'KJBR',22.2,190.0,11.8); insert into pointdata values('2008-02-04 20:00:00',34.727,92.236,79.0,'KLIT',24.4,190.0,6.7); insert into pointdata values('2008-02-04 20:00:00',33.638,91.751,82.0,'KLLQ',22.8,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',34.917,92.150,95.0,'KLRF',23.8,190.0,6.7); insert into pointdata values('2008-02-04 20:00:00',35.638,91.176,73.0,'KM19',22.7,180.0,8.8); insert into pointdata values('2008-02-04 20:00:00',34.100,93.066,56.0,'KM89',23.3,210.0,5.7); insert into pointdata values('2008-02-04 20:00:00',34.545,94.202,329.0,'KMEZ',23.0,200.0,3.6); insert into pointdata values('2008-02-04 20:00:00',34.175,91.935,63.0,'KPBF',23.3,180.0,6.2); insert into pointdata values('2008-02-04 20:00:00',36.367,94.100,414.0,'KROG',23.0,210.0,11.3); insert into pointdata values('2008-02-04 20:00:00',35.259,93.093,123.0,'KRUE',25.6,190.0,7.7); insert into pointdata values('2008-02-04 20:00:00',34.600,91.567,68.0,'KSGT',24.0,180.0,12.4); insert into pointdata values('2008-02-04 20:00:00',36.200,94.483,364.0,'KSLG',24.0,210.0,9.3); insert into pointdata values('2008-02-04 20:00:00',35.212,91.737,81.0,'KSRC',21.6,190.0,9.3); insert into pointdata values('2008-02-04 20:00:00',33.456,93.988,118.0,'KTXK',25.0,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',36.282,94.307,392.0,'KXNA',23.3,210.0,8.8); insert into pointdata values('2008-02-04 20:00:00',32.950,111.767,446.0,'KCGZ',7.0,270.0,7.2); insert into pointdata values('2008-02-04 20:00:00',33.269,111.811,379.0,'KCHD',5.0,140.0,2.6); insert into pointdata values('2008-02-04 20:00:00',32.167,110.883,824.0,'KDMA',4.5,260.0,2.1); insert into pointdata values('2008-02-04 20:00:00',31.469,109.604,1266.0,'KDUG',11.1,220.0,10.3); insert into pointdata values('2008-02-04 20:00:00',33.690,112.066,450.0,'KDVT',8.3,240.0,7.2); insert into pointdata values('2008-02-04 20:00:00',33.467,111.733,424.0,'KFFZ',5.0,220.0,7.7); insert into pointdata values('2008-02-04 20:00:00',35.140,111.672,2137.0,'KFLG',-2.2,50.0,5.7); insert into pointdata values('2008-02-04 20:00:00',32.433,112.683,262.0,'KGBN',12.0,280.0,4.6); insert into pointdata values('2008-02-04 20:00:00',35.946,112.155,2014.0,'KGCN',-2.2,290.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.527,112.295,325.0,'KGEU',8.0,240.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.417,112.383,295.0,'KGYR',8.0,340.0,4.1); insert into pointdata values('2008-02-04 20:00:00',35.158,114.559,212.0,'KIFP',13.0,340.0,11.8); insert into pointdata values('2008-02-04 20:00:00',35.258,113.933,1050.0,'KIGM',6.1,350.0,10.8); insert into pointdata values('2008-02-04 20:00:00',35.028,110.721,1505.0,'KINW',-1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',33.317,111.650,421.0,'KIWA',7.0,270.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.533,112.383,332.0,'KLUF',8.6,250.0,5.7); insert into pointdata values('2008-02-04 20:00:00',32.624,113.764,64.0,'KNYL',18.3,300.0,4.1); insert into pointdata values('2008-02-04 20:00:00',31.421,110.846,1198.0,'KOLS',3.3,270.0,5.1); insert into pointdata values('2008-02-04 20:00:00',36.920,111.448,1314.0,'KPGA',2.8,340.0,4.1); insert into pointdata values('2008-02-04 20:00:00',33.434,112.051,345.0,'KPHX',10.0,210.0,2.6); insert into pointdata values('2008-02-04 20:00:00',34.649,112.422,1537.0,'KPRC',1.7,330.0,7.2); insert into pointdata values('2008-02-04 20:00:00',35.650,109.067,2055.0,'KRQE',-3.3,210.0,1.5); insert into pointdata values('2008-02-04 20:00:00',32.857,109.636,968.0,'KSAD',5.6,310.0,11.8); insert into pointdata values('2008-02-04 20:00:00',33.623,111.910,460.0,'KSDL',8.3,190.0,4.1); insert into pointdata values('2008-02-04 20:00:00',34.518,109.379,1747.0,'KSJN',-2.2,320.0,4.1); insert into pointdata values('2008-02-04 20:00:00',34.265,110.006,1955.0,'KSOW',-2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',34.367,118.567,427.0,'K3A6',7.8,350.0,10.3); insert into pointdata values('2008-02-04 20:00:00',34.983,117.850,701.0,'K9L2',8.9,310.0,6.2); insert into pointdata values('2008-02-04 20:00:00',41.491,120.564,1333.0,'KAAT',-3.3,150.0,2.1); insert into pointdata values('2008-02-04 20:00:00',40.978,124.109,66.0,'KACV',8.3,330.0,6.7); insert into pointdata values('2008-02-04 20:00:00',38.208,122.279,10.0,'KAPC',12.8,350.0,9.3); insert into pointdata values('2008-02-04 20:00:00',38.950,121.067,467.0,'KAUN',8.0,30.0,5.7); insert into pointdata values('2008-02-04 20:00:00',33.405,118.416,488.0,'KAVX',9.4,320.0,6.7); insert into pointdata values('2008-02-04 20:00:00',39.133,121.433,34.0,'KBAB',11.0,330.0,9.8); insert into pointdata values('2008-02-04 20:00:00',35.434,119.057,155.0,'KBFL',8.9,330.0,6.2); insert into pointdata values('2008-02-04 20:00:00',37.371,118.358,1256.0,'KBIH',2.8,360.0,10.8); insert into pointdata values('2008-02-04 20:00:00',33.619,114.717,121.0,'KBLH',16.1,340.0,6.7); insert into pointdata values('2008-02-04 20:00:00',34.200,118.365,236.0,'KBUR',12.8,350.0,6.2); insert into pointdata values('2008-02-04 20:00:00',37.992,122.052,7.0,'KCCR',12.2,360.0,6.2); insert into pointdata values('2008-02-04 20:00:00',34.217,119.083,23.0,'KCMA',15.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',33.976,117.624,198.0,'KCNO',12.8,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',33.130,117.276,100.0,'KCRQ',12.2,260.0,2.1); insert into pointdata values('2008-02-04 20:00:00',32.626,116.468,807.0,'KCZZ',7.2,210.0,4.6); insert into pointdata values('2008-02-04 20:00:00',34.917,117.900,702.0,'KEDW',9.5,340.0,5.7); insert into pointdata values('2008-02-04 20:00:00',34.766,114.623,300.0,'KEED',13.9,30.0,7.2); insert into pointdata values('2008-02-04 20:00:00',36.780,119.719,101.0,'KFAT',7.2,300.0,4.6); insert into pointdata values('2008-02-04 20:00:00',33.924,118.332,19.0,'KHHR',17.8,320.0,4.1); insert into pointdata values('2008-02-04 20:00:00',36.319,119.629,74.0,'KHJO',8.9,330.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.661,122.118,14.0,'KHWD',11.7,350.0,5.1); insert into pointdata values('2008-02-04 20:00:00',32.834,115.579,-17.0,'KIPL',17.2,340.0,4.1); insert into pointdata values('2008-02-04 20:00:00',33.938,118.389,38.0,'KLAX',15.6,320.0,6.7); insert into pointdata values('2008-02-04 20:00:00',33.812,118.146,17.0,'KLGB',15.6,20.0,2.6); insert into pointdata values('2008-02-04 20:00:00',34.667,120.467,27.0,'KLPC',13.0,10.0,5.7); insert into pointdata values('2008-02-04 20:00:00',37.693,121.814,121.0,'KLVK',11.7,310.0,4.6); insert into pointdata values('2008-02-04 20:00:00',36.987,120.111,77.0,'KMAE',8.3,320.0,6.2); insert into pointdata values('2008-02-04 20:00:00',37.283,120.508,47.0,'KMCE',9.4,320.0,8.8); insert into pointdata values('2008-02-04 20:00:00',37.367,120.567,57.0,'KMER',9.0,300.0,7.7); insert into pointdata values('2008-02-04 20:00:00',38.550,121.300,29.0,'KMHR',11.0,320.0,8.2); insert into pointdata values('2008-02-04 20:00:00',35.067,118.150,849.0,'KMHV',6.0,290.0,10.8); insert into pointdata values('2008-02-04 20:00:00',37.624,120.950,29.0,'KMOD',11.1,310.0,9.3); insert into pointdata values('2008-02-04 20:00:00',36.590,121.848,77.0,'KMRY',12.2,310.0,5.1); insert into pointdata values('2008-02-04 20:00:00',34.233,118.067,1739.0,'KMWS',3.0,120.0,1.0); insert into pointdata values('2008-02-04 20:00:00',32.814,117.136,128.0,'KMYF',12.2,260.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.098,121.570,19.0,'KMYV',11.1,330.0,6.7); insert into pointdata values('2008-02-04 20:00:00',33.305,117.354,23.0,'KNFG',13.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',35.686,117.690,696.0,'KNID',10.6,320.0,6.7); insert into pointdata values('2008-02-04 20:00:00',32.825,115.660,-13.0,'KNJK',17.8,310.0,6.2); insert into pointdata values('2008-02-04 20:00:00',36.304,119.938,71.0,'KNLC',10.0,340.0,9.8); insert into pointdata values('2008-02-04 20:00:00',32.563,117.110,7.0,'KNRS',13.3,280.0,4.1); insert into pointdata values('2008-02-04 20:00:00',33.235,119.453,153.0,'KNSI',13.3,310.0,12.4); insert into pointdata values('2008-02-04 20:00:00',34.124,119.122,3.0,'KNTD',13.3,260.0,4.1); insert into pointdata values('2008-02-04 20:00:00',33.023,118.587,55.0,'KNUC',14.4,300.0,8.2); insert into pointdata values('2008-02-04 20:00:00',37.406,122.048,10.0,'KNUQ',10.6,320.0,5.7); insert into pointdata values('2008-02-04 20:00:00',32.691,117.209,7.0,'KNZY',15.6,310.0,3.1); insert into pointdata values('2008-02-04 20:00:00',37.719,122.235,1.0,'KOAK',11.7,350.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.218,117.351,9.0,'KOKB',12.8,230.0,4.1); insert into pointdata values('2008-02-04 20:00:00',34.053,117.576,287.0,'KONT',11.7,170.0,1.5); insert into pointdata values('2008-02-04 20:00:00',39.495,121.620,57.0,'KOVE',11.1,330.0,3.6); insert into pointdata values('2008-02-04 20:00:00',34.200,119.203,13.0,'KOXR',13.3,290.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.467,122.117,2.0,'KPAO',11.0,330.0,7.2); insert into pointdata values('2008-02-04 20:00:00',34.630,118.081,775.0,'KPMD',7.8,30.0,4.6); insert into pointdata values('2008-02-04 20:00:00',35.673,120.627,255.0,'KPRB',10.0,330.0,8.2); insert into pointdata values('2008-02-04 20:00:00',36.033,119.067,135.0,'KPTV',8.0,310.0,3.6); insert into pointdata values('2008-02-04 20:00:00',40.150,122.252,106.0,'KRBL',10.6,350.0,7.2); insert into pointdata values('2008-02-04 20:00:00',40.515,122.297,153.0,'KRDD',10.0,360.0,3.6); insert into pointdata values('2008-02-04 20:00:00',37.333,121.817,41.0,'KRHV',12.0,290.0,5.1); insert into pointdata values('2008-02-04 20:00:00',33.900,117.250,469.0,'KRIV',11.5,310.0,6.2); insert into pointdata values('2008-02-04 20:00:00',33.037,116.916,424.0,'KRNM',10.6,240.0,2.6); insert into pointdata values('2008-02-04 20:00:00',38.507,121.495,6.0,'KSAC',11.1,340.0,8.8); insert into pointdata values('2008-02-04 20:00:00',32.734,117.183,4.0,'KSAN',13.3,260.0,4.6); insert into pointdata values('2008-02-04 20:00:00',34.426,119.844,3.0,'KSBA',13.9,360.0,4.6); insert into pointdata values('2008-02-04 20:00:00',35.236,120.636,63.0,'KSBP',12.8,270.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.890,121.224,9.0,'KSCK',11.1,350.0,9.8); insert into pointdata values('2008-02-04 20:00:00',34.744,118.724,1378.0,'KSDB',-1.7,350.0,17.0); insert into pointdata values('2008-02-04 20:00:00',32.575,116.993,164.0,'KSDM',12.8,270.0,4.1); insert into pointdata values('2008-02-04 20:00:00',32.826,116.972,118.0,'KSEE',14.0,260.0,4.1); insert into pointdata values('2008-02-04 20:00:00',37.620,122.365,3.0,'KSFO',10.6,340.0,9.8); insert into pointdata values('2008-02-04 20:00:00',37.359,121.924,18.0,'KSJC',11.1,310.0,5.7); insert into pointdata values('2008-02-04 20:00:00',33.783,118.050,11.0,'KSLI',15.0,320.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.701,121.594,8.0,'KSMF',10.6,330.0,10.8); insert into pointdata values('2008-02-04 20:00:00',34.016,118.451,53.0,'KSMO',15.6,350.0,4.1); insert into pointdata values('2008-02-04 20:00:00',34.899,120.449,78.0,'KSMX',12.8,330.0,7.2); insert into pointdata values('2008-02-04 20:00:00',33.680,117.866,16.0,'KSNA',14.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',36.664,121.608,25.0,'KSNS',11.7,280.0,5.7); insert into pointdata values('2008-02-04 20:00:00',37.517,122.250,1.0,'KSQL',12.0,310.0,9.3); insert into pointdata values('2008-02-04 20:00:00',38.500,122.817,38.0,'KSTS',11.1,340.0,6.2); insert into pointdata values('2008-02-04 20:00:00',38.267,121.950,19.0,'KSUU',10.8,360.0,9.3); insert into pointdata values('2008-02-04 20:00:00',33.800,118.333,31.0,'KTOA',15.0,310.0,5.1); insert into pointdata values('2008-02-04 20:00:00',39.317,120.133,1798.0,'KTRK',-7.0,360.0,6.7); insert into pointdata values('2008-02-04 20:00:00',33.627,116.159,-38.0,'KTRM',17.2,320.0,4.6); insert into pointdata values('2008-02-04 20:00:00',39.126,123.201,187.0,'KUKI',8.9,320.0,3.6); insert into pointdata values('2008-02-04 20:00:00',34.729,120.577,112.0,'KVBG',11.7,330.0,10.3); insert into pointdata values('2008-02-04 20:00:00',38.378,121.957,34.0,'KVCB',11.1,350.0,10.3); insert into pointdata values('2008-02-04 20:00:00',36.317,119.400,90.0,'KVIS',9.0,330.0,4.6); insert into pointdata values('2008-02-04 20:00:00',34.212,118.491,243.0,'KVNY',12.8,340.0,5.1); insert into pointdata values('2008-02-04 20:00:00',34.250,118.400,306.0,'KWHP',14.0,340.0,5.1); insert into pointdata values('2008-02-04 20:00:00',34.741,118.219,715.0,'KWJF',7.8,280.0,7.7); insert into pointdata values('2008-02-04 20:00:00',36.939,121.789,49.0,'KWVI',12.2,320.0,3.6); insert into pointdata values('2008-02-04 20:00:00',40.054,106.369,2259.0,'K20V',-3.0,230.0,1.5); insert into pointdata values('2008-02-04 20:00:00',40.450,106.750,3241.0,'K3MW',-11.0,240.0,5.1); insert into pointdata values('2008-02-04 20:00:00',39.050,105.514,3438.0,'K4BM',-3.0,220.0,2.1); insert into pointdata values('2008-02-04 20:00:00',39.426,107.379,3232.0,'K5SM',-7.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',38.782,106.218,2995.0,'K7BM',-6.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',38.967,104.817,2003.0,'KAFF',0.51,30.0,3.1); insert into pointdata values('2008-02-04 20:00:00',40.174,103.214,1431.0,'KAKO',-2.8,350.0,5.7); insert into pointdata values('2008-02-04 20:00:00',37.439,105.861,2297.0,'KALS',-1.1,190.0,6.2); insert into pointdata values('2008-02-04 20:00:00',39.564,104.848,1793.0,'KAPA',-2.8,80.0,3.6); insert into pointdata values('2008-02-04 20:00:00',39.917,105.117,1724.0,'KBJC',-0.99,90.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.710,104.758,1726.0,'KBKF',-3.0,40.0,4.1); insert into pointdata values('2008-02-04 20:00:00',40.493,107.524,1888.0,'KCAG',-5.0,260.0,4.6); insert into pointdata values('2008-02-04 20:00:00',39.467,106.150,3680.0,'KCCU',-12.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',37.306,108.626,1803.0,'KCEZ',0.01,350.0,1.5); insert into pointdata values('2008-02-04 20:00:00',39.833,104.658,1655.0,'KDEN',-3.3,60.0,4.1); insert into pointdata values('2008-02-04 20:00:00',37.143,107.760,2038.0,'KDRO',-1.7,250.0,3.1); insert into pointdata values('2008-02-04 20:00:00',40.042,107.890,1948.0,'KEEO',-3.3,40.0,3.1); insert into pointdata values('2008-02-04 20:00:00',39.650,106.917,1993.0,'KEGE',-2.0,280.0,2.1); insert into pointdata values('2008-02-04 20:00:00',38.700,104.767,1789.0,'KFCS',5.6,360.0,5.7); insert into pointdata values('2008-02-04 20:00:00',40.450,105.017,1529.0,'KFNL',-2.0,20.0,3.1); insert into pointdata values('2008-02-04 20:00:00',39.783,104.550,1709.0,'KFTG',-3.0,20.0,4.1); insert into pointdata values('2008-02-04 20:00:00',39.134,108.539,1481.0,'KGJT',-0.59,350.0,4.1); insert into pointdata values('2008-02-04 20:00:00',38.533,106.933,2340.0,'KGUC',-7.0,90.0,2.1); insert into pointdata values('2008-02-04 20:00:00',40.433,104.633,1432.0,'KGXY',-2.0,10.0,8.8); insert into pointdata values('2008-02-04 20:00:00',40.483,107.217,2012.0,'KHDN',-6.0,260.0,6.7); insert into pointdata values('2008-02-04 20:00:00',39.242,102.283,1285.0,'KITR',0.61,360.0,4.6); insert into pointdata values('2008-02-04 20:00:00',38.072,102.687,1128.0,'KLAA',11.1,20.0,8.2); insert into pointdata values('2008-02-04 20:00:00',38.049,103.512,1288.0,'KLHX',12.8,10.0,3.6); insert into pointdata values('2008-02-04 20:00:00',39.273,103.667,1635.0,'KLIC',-1.1,340.0,7.7); insert into pointdata values('2008-02-04 20:00:00',39.217,104.634,2152.0,'KMNH',-4.0,30.0,3.1); insert into pointdata values('2008-02-04 20:00:00',38.505,107.897,1755.0,'KMTJ',0.01,330.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.484,106.317,3667.0,'KMYP',-12.0,240.0,7.2); insert into pointdata values('2008-02-04 20:00:00',38.290,104.498,1440.0,'KPUB',9.4,70.0,4.1); insert into pointdata values('2008-02-04 20:00:00',39.525,107.727,1690.0,'KRIL',0.01,270.0,2.6); insert into pointdata values('2008-02-04 20:00:00',37.283,102.617,1335.0,'KSPD',16.1,220.0,9.3); insert into pointdata values('2008-02-04 20:00:00',37.267,104.433,1756.0,'KTAD',11.7,250.0,7.7); insert into pointdata values('2008-02-04 20:00:00',37.954,107.909,2767.0,'KTEX',-5.0,250.0,4.1); insert into pointdata values('2008-02-04 20:00:00',37.501,105.167,3114.0,'KVTP',-3.0,250.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.938,72.682,53.0,'KBDL',2.8,170.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.158,73.129,3.0,'KBDR',3.3,100.0,5.1); insert into pointdata values('2008-02-04 20:00:00',41.372,73.484,139.0,'KDXR',1.7,90.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.327,72.049,3.0,'KGON',3.9,120.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.735,72.652,5.0,'KHFD',3.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.264,72.887,4.0,'KHVN',2.8,80.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.742,72.184,75.0,'KIJD',2.8,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.510,72.828,31.0,'KMMK',2.8,120.0,2.1); insert into pointdata values('2008-02-04 20:00:00',41.483,73.133,221.0,'KOXC',1.0,100.0,1.5); insert into pointdata values('2008-02-04 20:00:00',39.133,75.467,9.0,'KDOV',9.3,100.0,6.2); insert into pointdata values('2008-02-04 20:00:00',38.690,75.362,15.0,'KGED',11.7,90.0,6.7); insert into pointdata values('2008-02-04 20:00:00',39.673,75.601,24.0,'KILG',9.4,80.0,4.1); insert into pointdata values('2008-02-04 20:00:00',30.072,83.574,13.0,'K40J',26.7,200.0,5.1); insert into pointdata values('2008-02-04 20:00:00',29.727,85.025,6.0,'KAAF',21.7,130.0,4.1); insert into pointdata values('2008-02-04 20:00:00',26.150,81.767,2.0,'KAPF',27.8,200.0,7.2); insert into pointdata values('2008-02-04 20:00:00',28.474,82.454,23.0,'KBKV',28.3,150.0,3.1); insert into pointdata values('2008-02-04 20:00:00',27.950,81.783,39.0,'KBOW',28.0,130.0,5.1); insert into pointdata values('2008-02-04 20:00:00',30.772,86.520,65.0,'KCEW',22.8,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',28.233,80.600,3.0,'KCOF',24.0,110.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.336,81.515,12.0,'KCRG',25.0,80.0,4.1); insert into pointdata values('2008-02-04 20:00:00',29.550,83.105,12.0,'KCTY',26.7,210.0,3.1); insert into pointdata values('2008-02-04 20:00:00',29.177,81.060,10.0,'KDAB',25.6,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',30.393,86.467,6.0,'KDTS',20.6,140.0,4.6); insert into pointdata values('2008-02-04 20:00:00',29.056,80.948,3.0,'KEVB',25.0,70.0,5.1); insert into pointdata values('2008-02-04 20:00:00',24.554,81.754,1.0,'KEYW',26.7,120.0,7.7); insert into pointdata values('2008-02-04 20:00:00',26.068,80.152,3.0,'KFLL',26.1,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',26.584,81.862,5.0,'KFMY',28.3,220.0,4.6); insert into pointdata values('2008-02-04 20:00:00',27.498,80.377,8.0,'KFPR',26.1,110.0,5.7); insert into pointdata values('2008-02-04 20:00:00',26.200,80.183,4.0,'KFXE',26.7,130.0,5.1); insert into pointdata values('2008-02-04 20:00:00',28.060,81.757,44.0,'KGIF',27.8,140.0,2.1); insert into pointdata values('2008-02-04 20:00:00',29.692,82.276,46.0,'KGNV',27.8,130.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.417,86.683,12.0,'KHRT',20.0,120.0,4.1); insert into pointdata values('2008-02-04 20:00:00',25.483,80.383,2.0,'KHST',25.1,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',25.999,80.241,2.0,'KHWO',26.7,120.0,5.1); insert into pointdata values('2008-02-04 20:00:00',28.290,81.437,25.0,'KISM',27.0,160.0,4.1); insert into pointdata values('2008-02-04 20:00:00',30.494,81.693,9.0,'KJAX',27.2,160.0,4.6); insert into pointdata values('2008-02-04 20:00:00',27.983,82.017,43.0,'KLAL',29.0,120.0,3.6); insert into pointdata values('2008-02-04 20:00:00',28.822,81.809,24.0,'KLEE',27.8,170.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.837,85.184,34.0,'KMAI',26.1,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',27.850,82.500,4.0,'KMCF',27.6,270.0,1.5); insert into pointdata values('2008-02-04 20:00:00',28.417,81.325,29.0,'KMCO',27.8,200.0,4.1); insert into pointdata values('2008-02-04 20:00:00',25.790,80.316,3.0,'KMIA',25.6,110.0,6.2); insert into pointdata values('2008-02-04 20:00:00',28.103,80.646,10.0,'KMLB',26.1,110.0,6.2); insert into pointdata values('2008-02-04 20:00:00',24.726,81.048,2.0,'KMTH',27.8,120.0,5.1); insert into pointdata values('2008-02-04 20:00:00',30.697,87.020,54.0,'KNDZ',25.0,160.0,5.7); insert into pointdata values('2008-02-04 20:00:00',30.234,81.675,6.0,'KNIP',23.9,180.0,2.6); insert into pointdata values('2008-02-04 20:00:00',30.356,87.323,9.0,'KNPA',22.8,120.0,5.7); insert into pointdata values('2008-02-04 20:00:00',24.579,81.684,1.0,'KNQX',27.8,120.0,6.7); insert into pointdata values('2008-02-04 20:00:00',30.396,81.422,5.0,'KNRB',16.7,80.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.724,87.022,61.0,'KNSE',23.9,180.0,6.2); insert into pointdata values('2008-02-04 20:00:00',29.167,82.217,27.0,'KOCF',27.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',29.301,81.114,9.0,'KOMN',27.0,100.0,2.6); insert into pointdata values('2008-02-04 20:00:00',25.910,80.283,3.0,'KOPF',27.2,130.0,5.7); insert into pointdata values('2008-02-04 20:00:00',30.067,85.583,5.0,'KPAM',22.9,160.0,7.2); insert into pointdata values('2008-02-04 20:00:00',26.685,80.099,5.0,'KPBI',26.1,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',28.000,82.150,47.0,'KPCM',31.0,170.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.208,85.685,6.0,'KPFN',23.3,180.0,4.6); insert into pointdata values('2008-02-04 20:00:00',26.918,81.994,7.0,'KPGD',30.0,160.0,4.6); insert into pointdata values('2008-02-04 20:00:00',27.912,82.686,3.0,'KPIE',27.8,70.0,2.6); insert into pointdata values('2008-02-04 20:00:00',26.246,80.111,6.0,'KPMP',25.6,140.0,5.7); insert into pointdata values('2008-02-04 20:00:00',30.478,87.187,36.0,'KPNS',21.1,130.0,5.1); insert into pointdata values('2008-02-04 20:00:00',26.527,81.766,9.0,'KRSW',28.9,250.0,3.6); insert into pointdata values('2008-02-04 20:00:00',28.783,81.250,17.0,'KSFB',27.8,180.0,2.1); insert into pointdata values('2008-02-04 20:00:00',29.959,81.340,3.0,'KSGJ',22.0,110.0,5.1); insert into pointdata values('2008-02-04 20:00:00',27.768,82.626,2.0,'KSPG',25.6,200.0,3.6); insert into pointdata values('2008-02-04 20:00:00',27.401,82.559,9.0,'KSRQ',25.6,190.0,6.2); insert into pointdata values('2008-02-04 20:00:00',27.182,80.221,6.0,'KSUA',27.0,120.0,5.7); insert into pointdata values('2008-02-04 20:00:00',28.517,80.800,11.0,'KTIX',26.0,100.0,3.1); insert into pointdata values('2008-02-04 20:00:00',30.393,84.353,24.0,'KTLH',25.0,150.0,5.7); insert into pointdata values('2008-02-04 20:00:00',25.642,80.435,3.0,'KTMB',26.1,110.0,5.7); insert into pointdata values('2008-02-04 20:00:00',27.961,82.540,8.0,'KTPA',27.2,250.0,3.1); insert into pointdata values('2008-02-04 20:00:00',27.916,82.449,2.0,'KTPF',28.0,210.0,2.1); insert into pointdata values('2008-02-04 20:00:00',28.617,80.700,3.0,'KTTS',26.0,150.0,4.1); insert into pointdata values('2008-02-04 20:00:00',28.014,82.345,7.0,'KVDF',28.0,150.0,2.1); insert into pointdata values('2008-02-04 20:00:00',30.483,86.517,26.0,'KVPS',21.3,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',27.656,80.418,7.0,'KVRB',26.1,110.0,6.7); insert into pointdata values('2008-02-04 20:00:00',28.967,81.967,27.0,'KVVG',28.0,130.0,4.1); insert into pointdata values('2008-02-04 20:00:00',28.467,80.567,3.0,'KXMR',25.3,140.0,4.1); insert into pointdata values('2008-02-04 20:00:00',33.597,83.139,206.0,'K3J7',22.0,140.0,2.1); insert into pointdata values('2008-02-04 20:00:00',31.536,84.194,60.0,'KABY',25.6,180.0,5.7); insert into pointdata values('2008-02-04 20:00:00',33.364,81.963,44.0,'KAGS',18.9,120.0,2.1); insert into pointdata values('2008-02-04 20:00:00',33.951,83.328,246.0,'KAHN',17.8,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',31.536,82.507,61.0,'KAMG',25.6,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.640,84.427,313.0,'KATL',20.0,160.0,3.6); insert into pointdata values('2008-02-04 20:00:00',31.250,82.400,46.0,'KAYS',26.0,200.0,4.6); insert into pointdata values('2008-02-04 20:00:00',30.967,84.633,43.0,'KBGE',27.0,180.0,4.6); insert into pointdata values('2008-02-04 20:00:00',31.250,81.467,8.0,'KBQK',26.0,160.0,3.1); insert into pointdata values('2008-02-04 20:00:00',33.312,84.770,296.0,'KCCO',20.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',32.564,82.985,94.0,'KDBN',24.0,230.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.467,82.039,128.0,'KDNL',18.3,140.0,2.1); insert into pointdata values('2008-02-04 20:00:00',34.722,84.869,216.0,'KDNN',16.0,140.0,3.6); insert into pointdata values('2008-02-04 20:00:00',31.477,82.860,78.0,'KDQH',26.0,220.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.355,84.567,246.0,'KFFC',21.7,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.778,84.524,256.0,'KFTY',20.0,140.0,2.6); insert into pointdata values('2008-02-04 20:00:00',34.272,83.830,388.0,'KGVL',12.8,90.0,1.5); insert into pointdata values('2008-02-04 20:00:00',33.009,85.072,211.0,'KLGC',20.0,190.0,5.1); insert into pointdata values('2008-02-04 20:00:00',31.883,81.567,14.0,'KLHW',26.0,160.0,3.1); insert into pointdata values('2008-02-04 20:00:00',32.333,84.833,71.0,'KLSF',24.0,170.0,4.6); insert into pointdata values('2008-02-04 20:00:00',33.978,83.962,323.0,'KLZU',17.0,80.0,2.6); insert into pointdata values('2008-02-04 20:00:00',32.688,83.654,107.0,'KMCN',24.4,240.0,3.1); insert into pointdata values('2008-02-04 20:00:00',33.917,84.517,326.0,'KMGE',19.0,170.0,2.6); insert into pointdata values('2008-02-04 20:00:00',31.085,83.803,90.0,'KMGR',27.0,210.0,3.6); insert into pointdata values('2008-02-04 20:00:00',33.154,83.240,117.0,'KMLJ',24.0,180.0,1.5); insert into pointdata values('2008-02-04 20:00:00',34.348,85.161,194.0,'KRMG',17.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',34.013,84.599,317.0,'KRYY',19.0,220.0,4.1); insert into pointdata values('2008-02-04 20:00:00',32.119,81.202,15.0,'KSAV',25.6,210.0,2.6); insert into pointdata values('2008-02-04 20:00:00',31.152,81.391,6.0,'KSSI',19.4,110.0,2.6); insert into pointdata values('2008-02-04 20:00:00',32.017,81.150,13.0,'KSVN',24.9,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',32.483,81.737,57.0,'KTBR',26.0,240.0,3.6); insert into pointdata values('2008-02-04 20:00:00',30.967,83.200,71.0,'KVAD',26.8,180.0,6.7); insert into pointdata values('2008-02-04 20:00:00',32.192,82.372,84.0,'KVDI',26.0,230.0,2.1); insert into pointdata values('2008-02-04 20:00:00',30.783,83.283,62.0,'KVLD',26.1,180.0,4.6); insert into pointdata values('2008-02-04 20:00:00',33.982,83.668,287.0,'KWDR',16.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',32.633,83.600,90.0,'KWRB',24.5,200.0,3.6); insert into pointdata values('2008-02-04 20:00:00',13.583,-144.933,187.0,'PGUA',24.0,60.0,6.2); insert into pointdata values('2008-02-04 20:00:00',13.483,-144.800,91.0,'PGUM',25.0,60.0,4.6); insert into pointdata values('2008-02-04 20:00:00',22.036,159.786,4.0,'PHBK',23.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',21.483,158.033,255.0,'PHHI',20.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',21.017,156.633,40.0,'PHJH',24.0,60.0,6.2); insert into pointdata values('2008-02-04 20:00:00',19.741,156.050,13.0,'PHKO',23.9,10.0,3.1); insert into pointdata values('2008-02-04 20:00:00',21.984,159.341,45.0,'PHLI',23.0,70.0,10.3); insert into pointdata values('2008-02-04 20:00:00',21.150,157.100,138.0,'PHMK',23.3,40.0,5.7); insert into pointdata values('2008-02-04 20:00:00',21.454,157.766,5.0,'PHNG',22.8,80.0,8.2); insert into pointdata values('2008-02-04 20:00:00',21.327,157.943,3.0,'PHNL',23.3,60.0,5.1); insert into pointdata values('2008-02-04 20:00:00',20.786,156.951,399.0,'PHNY',21.6,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',20.892,156.437,16.0,'PHOG',22.2,50.0,5.7); insert into pointdata values('2008-02-04 20:00:00',19.722,155.056,11.0,'PHTO',21.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',28.217,177.367,4.0,'PMDY',23.0,170.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.701,94.920,392.0,'KADU',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.400,95.050,360.0,'KAIO',1.0,320.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.554,92.401,266.0,'KALO',0.61,80.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.990,93.619,288.0,'KAMW',1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.283,91.667,230.0,'KAWG',2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',43.083,94.267,372.0,'KAXA',0.01,50.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.050,93.850,354.0,'KBNW',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',40.773,91.125,212.0,'KBRL',7.8,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',42.750,93.767,354.0,'KCAV',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.267,95.767,382.0,'KCBF',2.0,320.0,3.6); insert into pointdata values('2008-02-04 20:00:00',43.067,92.617,343.0,'KCCY',1.0,80.0,5.1); insert into pointdata values('2008-02-04 20:00:00',41.884,91.710,263.0,'KCID',0.61,100.0,2.6); insert into pointdata values('2008-02-04 20:00:00',42.050,94.783,375.0,'KCIN',0.01,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.732,95.556,374.0,'KCKP',1.0,10.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.033,93.367,320.0,'KCNC',3.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.017,94.367,394.0,'KCSQ',5.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.833,90.333,216.0,'KCWI',2.0,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',42.398,90.704,328.0,'KDBQ',1.1,90.0,2.6); insert into pointdata values('2008-02-04 20:00:00',43.283,91.733,353.0,'KDEH',1.0,70.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.983,95.383,388.0,'KDNS',1.0,350.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.538,93.666,291.0,'KDSM',1.1,320.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.614,90.591,229.0,'KDVN',2.2,100.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.433,93.867,342.0,'KEBS',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',40.467,91.433,205.0,'KEOK',11.0,200.0,3.1); insert into pointdata values('2008-02-04 20:00:00',43.401,94.747,401.0,'KEST',-1.7,20.0,4.6); insert into pointdata values('2008-02-04 20:00:00',41.050,91.983,244.0,'KFFL',4.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.550,94.183,354.0,'KFOD',1.0,70.0,1.5); insert into pointdata values('2008-02-04 20:00:00',40.667,91.333,221.0,'KFSW',8.0,210.0,2.6); insert into pointdata values('2008-02-04 20:00:00',41.584,95.340,375.0,'KHNR',2.0,310.0,2.6); insert into pointdata values('2008-02-04 20:00:00',40.717,95.033,303.0,'KICL',5.0,310.0,2.6); insert into pointdata values('2008-02-04 20:00:00',41.690,93.566,275.0,'KIKV',0.01,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.633,91.543,203.0,'KIOW',1.7,90.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.778,96.194,365.0,'KLRJ',0.01,40.0,5.1); insert into pointdata values('2008-02-04 20:00:00',40.630,93.901,344.0,'KLWD',3.9,290.0,2.6); insert into pointdata values('2008-02-04 20:00:00',43.158,93.331,370.0,'KMCW',0.61,80.0,4.6); insert into pointdata values('2008-02-04 20:00:00',42.110,92.916,296.0,'KMIW',0.61,50.0,1.5); insert into pointdata values('2008-02-04 20:00:00',40.947,91.511,224.0,'KMPZ',5.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.367,91.150,167.0,'KMUT',4.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.233,91.167,259.0,'KMXO',2.0,120.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.681,91.974,328.0,'KOLZ',0.01,80.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.226,92.494,256.0,'KOOA',3.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.983,96.067,431.0,'KORC',-0.99,60.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.107,92.448,258.0,'KOTM',2.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.400,92.933,270.0,'KPEA',3.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.017,95.267,318.0,'KRDK',4.0,310.0,3.6); insert into pointdata values('2008-02-04 20:00:00',40.750,95.417,296.0,'KSDA',5.0,300.0,3.1); insert into pointdata values('2008-02-04 20:00:00',43.217,95.833,432.0,'KSHL',0.01,50.0,7.2); insert into pointdata values('2008-02-04 20:00:00',42.600,95.233,454.0,'KSLB',1.0,20.0,2.6); insert into pointdata values('2008-02-04 20:00:00',43.166,95.203,408.0,'KSPW',-1.1,20.0,6.7); insert into pointdata values('2008-02-04 20:00:00',42.402,96.384,335.0,'KSUX',-0.59,20.0,5.1); insert into pointdata values('2008-02-04 20:00:00',41.683,93.017,290.0,'KTNU',2.0,150.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.219,92.026,258.0,'KVTI',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',43.567,116.240,871.0,'KBOI',0.01,310.0,8.2); insert into pointdata values('2008-02-04 20:00:00',42.542,113.771,1265.0,'KBYI',-3.9,270.0,6.7); insert into pointdata values('2008-02-04 20:00:00',47.767,116.817,707.0,'KCOE',-2.0,230.0,3.1); insert into pointdata values('2008-02-04 20:00:00',43.633,116.633,741.0,'KEUL',1.0,310.0,7.7); insert into pointdata values('2008-02-04 20:00:00',43.521,112.066,1445.0,'KIDA',-6.1,220.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.727,114.457,1234.0,'KJER',-3.9,250.0,9.3); insert into pointdata values('2008-02-04 20:00:00',44.523,114.215,1546.0,'KLLJ',-3.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',46.375,117.014,438.0,'KLWS',3.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',43.050,115.867,913.0,'KMUO',-0.69,300.0,12.4); insert into pointdata values('2008-02-04 20:00:00',44.883,116.099,1530.0,'KMYL',-5.6,270.0,3.6); insert into pointdata values('2008-02-04 20:00:00',46.144,115.596,480.0,'KP69',1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.920,112.571,1356.0,'KPIH',-5.0,240.0,7.7); insert into pointdata values('2008-02-04 20:00:00',43.832,111.806,1481.0,'KRXE',-7.2,200.0,4.1); insert into pointdata values('2008-02-04 20:00:00',45.117,113.883,1233.0,'KSMN',-2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',44.209,114.934,1980.0,'KSNT',-6.7,340.0,3.1); insert into pointdata values('2008-02-04 20:00:00',43.500,114.300,1621.0,'KSUN',-6.0,120.0,2.1); insert into pointdata values('2008-02-04 20:00:00',48.299,116.560,648.0,'KSZT',-0.99,240.0,4.1); insert into pointdata values('2008-02-04 20:00:00',42.479,114.476,1265.0,'KTWF',-1.7,250.0,9.3); insert into pointdata values('2008-02-04 20:00:00',39.070,88.533,179.0,'K1H2',14.0,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',39.162,89.674,210.0,'K3LF',15.0,160.0,5.1); insert into pointdata values('2008-02-04 20:00:00',38.606,87.727,131.0,'KAJG',16.0,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',38.900,90.050,166.0,'KALN',21.0,180.0,7.7); insert into pointdata values('2008-02-04 20:00:00',41.770,88.481,215.0,'KARR',2.8,120.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.550,89.850,140.0,'KBLV',21.8,190.0,7.7); insert into pointdata values('2008-02-04 20:00:00',40.477,88.916,266.0,'KBMI',6.1,190.0,7.2); insert into pointdata values('2008-02-04 20:00:00',41.425,88.419,178.0,'KC09',3.0,180.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.019,89.386,173.0,'KC75',7.0,180.0,3.1); insert into pointdata values('2008-02-04 20:00:00',37.064,89.219,98.0,'KCIR',22.0,210.0,8.2); insert into pointdata values('2008-02-04 20:00:00',40.032,88.273,229.0,'KCMI',7.8,160.0,5.7); insert into pointdata values('2008-02-04 20:00:00',38.571,90.156,126.0,'KCPS',22.8,200.0,4.6); insert into pointdata values('2008-02-04 20:00:00',38.089,88.123,118.0,'KCUL',18.0,200.0,7.2); insert into pointdata values('2008-02-04 20:00:00',39.834,88.866,208.0,'KDEC',10.0,160.0,5.7); insert into pointdata values('2008-02-04 20:00:00',41.932,88.708,279.0,'KDKB',2.0,110.0,5.7); insert into pointdata values('2008-02-04 20:00:00',40.199,87.596,212.0,'KDNV',8.0,170.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.896,88.251,231.0,'KDPA',2.8,100.0,2.6); insert into pointdata values('2008-02-04 20:00:00',38.515,89.092,163.0,'KENL',18.0,190.0,8.8); insert into pointdata values('2008-02-04 20:00:00',42.246,89.582,262.0,'KFEP',1.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',38.665,88.453,144.0,'KFOA',15.0,160.0,5.1); insert into pointdata values('2008-02-04 20:00:00',38.379,88.413,133.0,'KFWC',17.0,200.0,6.2); insert into pointdata values('2008-02-04 20:00:00',37.811,88.549,121.0,'KHSB',20.0,200.0,9.3); insert into pointdata values('2008-02-04 20:00:00',41.540,87.532,188.0,'KIGQ',5.0,150.0,4.6); insert into pointdata values('2008-02-04 20:00:00',39.774,90.239,190.0,'KIJX',9.0,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.071,87.846,192.0,'KIKK',8.0,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',41.518,88.175,177.0,'KJOT',2.0,130.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.760,87.599,131.0,'KLWV',16.7,180.0,7.2); insert into pointdata values('2008-02-04 20:00:00',37.186,88.750,117.0,'KM30',20.0,200.0,7.2); insert into pointdata values('2008-02-04 20:00:00',37.783,89.245,125.0,'KMDH',21.1,200.0,7.7); insert into pointdata values('2008-02-04 20:00:00',41.784,87.755,188.0,'KMDW',2.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.451,90.515,179.0,'KMLI',2.8,80.0,1.5); insert into pointdata values('2008-02-04 20:00:00',40.520,90.652,216.0,'KMQB',7.0,170.0,2.1); insert into pointdata values('2008-02-04 20:00:00',39.478,88.279,220.0,'KMTO',11.7,160.0,4.1); insert into pointdata values('2008-02-04 20:00:00',38.317,88.867,146.0,'KMVN',18.0,200.0,7.7); insert into pointdata values('2008-02-04 20:00:00',37.750,89.001,144.0,'KMWA',20.0,200.0,7.7); insert into pointdata values('2008-02-04 20:00:00',41.980,87.904,203.0,'KORD',1.7,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',40.667,89.684,201.0,'KPIA',6.1,180.0,3.1); insert into pointdata values('2008-02-04 20:00:00',40.924,88.625,201.0,'KPNT',6.0,170.0,7.7); insert into pointdata values('2008-02-04 20:00:00',39.639,90.778,216.0,'KPPQ',11.0,110.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.700,87.670,199.0,'KPRG',11.0,180.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.121,87.905,197.0,'KPWK',1.7,70.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.193,89.093,224.0,'KRFD',2.2,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',41.893,89.078,238.0,'KRPJ',0.01,110.0,3.6); insert into pointdata values('2008-02-04 20:00:00',39.016,87.650,141.0,'KRSV',15.0,170.0,4.6); insert into pointdata values('2008-02-04 20:00:00',38.149,89.699,164.0,'KSAR',21.0,190.0,7.7); insert into pointdata values('2008-02-04 20:00:00',42.046,90.108,188.0,'KSFY',3.0,70.0,2.1); insert into pointdata values('2008-02-04 20:00:00',38.643,88.964,175.0,'KSLO',18.0,180.0,6.7); insert into pointdata values('2008-02-04 20:00:00',39.845,89.684,182.0,'KSPI',8.3,170.0,6.7); insert into pointdata values('2008-02-04 20:00:00',41.750,89.667,197.0,'KSQI',3.0,110.0,2.1); insert into pointdata values('2008-02-04 20:00:00',39.534,89.328,190.0,'KTAZ',12.0,160.0,4.6); insert into pointdata values('2008-02-04 20:00:00',40.294,88.142,225.0,'KTIP',4.0,170.0,4.1); insert into pointdata values('2008-02-04 20:00:00',42.417,87.867,222.0,'KUGN',1.1,100.0,4.6); insert into pointdata values('2008-02-04 20:00:00',39.942,91.194,234.0,'KUIN',15.6,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.352,89.153,199.0,'KVYS',4.0,130.0,3.6); insert into pointdata values('2008-02-04 20:00:00',41.274,85.840,259.0,'KASW',3.0,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',39.267,85.900,200.0,'KBAK',13.0,170.0,6.7); insert into pointdata values('2008-02-04 20:00:00',39.143,86.617,257.0,'KBMG',13.3,160.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.717,86.000,237.0,'KEKM',3.0,120.0,4.6); insert into pointdata values('2008-02-04 20:00:00',38.043,87.520,127.0,'KEVV',18.9,190.0,7.7); insert into pointdata values('2008-02-04 20:00:00',39.825,86.296,250.0,'KEYE',10.6,140.0,3.1); insert into pointdata values('2008-02-04 20:00:00',40.978,85.195,248.0,'KFWA',2.8,90.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.586,85.800,245.0,'KGEZ',11.7,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',41.526,85.787,252.0,'KGSH',2.2,140.0,4.1); insert into pointdata values('2008-02-04 20:00:00',40.650,86.150,247.0,'KGUS',7.4,140.0,4.6); insert into pointdata values('2008-02-04 20:00:00',41.617,87.417,180.0,'KGYY',6.0,140.0,9.3); insert into pointdata values('2008-02-04 20:00:00',38.250,86.950,161.0,'KHNB',17.0,170.0,6.2); insert into pointdata values('2008-02-04 20:00:00',39.442,87.325,178.0,'KHUF',13.3,170.0,6.2); insert into pointdata values('2008-02-04 20:00:00',39.725,86.282,243.0,'KIND',11.1,140.0,5.1); insert into pointdata values('2008-02-04 20:00:00',40.412,86.948,184.0,'KLAF',9.4,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',40.234,85.394,285.0,'KMIE',9.4,170.0,4.6); insert into pointdata values('2008-02-04 20:00:00',40.533,86.067,253.0,'KOKK',10.0,160.0,6.7); insert into pointdata values('2008-02-04 20:00:00',41.709,86.319,244.0,'KSBN',2.8,130.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.453,86.998,234.0,'KVPZ',3.3,120.0,3.6); insert into pointdata values('2008-02-04 20:00:00',37.750,97.219,432.0,'KAAO',17.8,230.0,4.6); insert into pointdata values('2008-02-04 20:00:00',37.091,95.566,229.0,'KCFV',23.9,210.0,8.2); insert into pointdata values('2008-02-04 20:00:00',39.551,97.650,453.0,'KCNK',5.0,330.0,4.1); insert into pointdata values('2008-02-04 20:00:00',37.670,95.484,305.0,'KCNU',23.9,210.0,7.7); insert into pointdata values('2008-02-04 20:00:00',37.773,99.970,790.0,'KDDC',9.4,10.0,7.2); insert into pointdata values('2008-02-04 20:00:00',37.000,101.883,1104.0,'KEHA',17.8,240.0,6.7); insert into pointdata values('2008-02-04 20:00:00',38.329,96.194,367.0,'KEMP',19.4,210.0,6.2); insert into pointdata values('2008-02-04 20:00:00',38.050,97.283,467.0,'KEWK',17.0,240.0,8.2); insert into pointdata values('2008-02-04 20:00:00',38.941,95.650,329.0,'KFOE',18.9,220.0,5.7); insert into pointdata values('2008-02-04 20:00:00',39.056,96.764,324.0,'KFRI',10.9,280.0,3.1); insert into pointdata values('2008-02-04 20:00:00',38.350,98.867,575.0,'KGBD',3.0,350.0,6.2); insert into pointdata values('2008-02-04 20:00:00',37.928,100.724,881.0,'KGCK',6.7,40.0,5.1); insert into pointdata values('2008-02-04 20:00:00',39.368,101.693,1114.0,'KGLD',0.61,350.0,5.1); insert into pointdata values('2008-02-04 20:00:00',39.375,99.830,678.0,'KHLC',5.0,30.0,8.2); insert into pointdata values('2008-02-04 20:00:00',38.068,97.860,470.0,'KHUT',17.2,270.0,5.7); insert into pointdata values('2008-02-04 20:00:00',38.850,99.267,609.0,'KHYS',2.0,360.0,4.6); insert into pointdata values('2008-02-04 20:00:00',37.617,97.267,418.0,'KIAB',19.2,230.0,4.6); insert into pointdata values('2008-02-04 20:00:00',37.647,97.429,406.0,'KICT',18.3,210.0,4.6); insert into pointdata values('2008-02-04 20:00:00',38.824,94.887,331.0,'KIXD',20.0,230.0,6.7); insert into pointdata values('2008-02-04 20:00:00',37.050,100.967,879.0,'KLBL',20.0,230.0,7.7); insert into pointdata values('2008-02-04 20:00:00',39.008,95.212,253.0,'KLWC',18.3,240.0,4.6); insert into pointdata values('2008-02-04 20:00:00',39.135,96.678,321.0,'KMHK',11.1,310.0,4.1); insert into pointdata values('2008-02-04 20:00:00',38.850,94.739,334.0,'KOJC',20.6,250.0,5.7); insert into pointdata values('2008-02-04 20:00:00',37.284,98.553,469.0,'KP28',23.3,240.0,5.7); insert into pointdata values('2008-02-04 20:00:00',37.328,95.504,274.0,'KPPF',23.3,210.0,7.2); insert into pointdata values('2008-02-04 20:00:00',37.700,98.750,595.0,'KPTT',14.0,340.0,8.8); insert into pointdata values('2008-02-04 20:00:00',38.873,98.813,567.0,'KRSL',2.8,350.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.780,97.644,387.0,'KSLN',7.8,320.0,5.7); insert into pointdata values('2008-02-04 20:00:00',39.072,95.626,268.0,'KTOP',20.0,240.0,4.6); insert into pointdata values('2008-02-04 20:00:00',37.168,97.037,353.0,'KWLD',21.7,230.0,6.2); insert into pointdata values('2008-02-04 20:00:00',36.610,83.737,352.0,'K1A6',11.0,170.0,3.1); insert into pointdata values('2008-02-04 20:00:00',36.964,86.419,167.0,'KBWG',17.2,190.0,5.7); insert into pointdata values('2008-02-04 20:00:00',39.043,84.672,273.0,'KCVG',13.9,170.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.817,87.683,117.0,'KEHR',19.0,200.0,6.7); insert into pointdata values('2008-02-04 20:00:00',36.855,84.856,294.0,'KEKQ',14.4,150.0,3.6); insert into pointdata values('2008-02-04 20:00:00',38.185,84.903,245.0,'KFFT',15.6,190.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.900,85.967,230.0,'KFTK',16.8,180.0,7.2); insert into pointdata values('2008-02-04 20:00:00',37.032,85.954,218.0,'KGLW',16.0,180.0,4.6); insert into pointdata values('2008-02-04 20:00:00',36.667,87.500,174.0,'KHOP',18.3,150.0,4.1); insert into pointdata values('2008-02-04 20:00:00',37.591,83.314,421.0,'KJKL',13.9,190.0,3.1); insert into pointdata values('2008-02-04 20:00:00',38.041,84.606,298.0,'KLEX',15.0,200.0,9.8); insert into pointdata values('2008-02-04 20:00:00',38.228,85.664,166.0,'KLOU',17.8,180.0,4.6); insert into pointdata values('2008-02-04 20:00:00',37.089,84.069,369.0,'KLOZ',13.9,180.0,3.6); insert into pointdata values('2008-02-04 20:00:00',37.740,87.167,124.0,'KOWB',19.4,190.0,8.8); insert into pointdata values('2008-02-04 20:00:00',37.056,88.774,125.0,'KPAH',21.7,210.0,4.1); insert into pointdata values('2008-02-04 20:00:00',38.177,85.730,151.0,'KSDF',18.3,190.0,5.1); insert into pointdata values('2008-02-04 20:00:00',37.054,84.615,283.0,'KSME',16.0,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',30.750,92.689,33.0,'KACP',26.0,180.0,8.2); insert into pointdata values('2008-02-04 20:00:00',31.335,92.559,27.0,'KAEX',26.1,170.0,8.8); insert into pointdata values('2008-02-04 20:00:00',31.667,93.450,111.0,'KAQV',25.0,170.0,4.1); insert into pointdata values('2008-02-04 20:00:00',30.029,91.884,7.0,'KARA',25.0,170.0,8.2); insert into pointdata values('2008-02-04 20:00:00',30.343,89.822,9.0,'KASD',24.4,170.0,6.7); insert into pointdata values('2008-02-04 20:00:00',32.500,93.667,51.0,'KBAD',24.9,170.0,9.3); insert into pointdata values('2008-02-04 20:00:00',30.537,91.147,21.0,'KBTR',26.1,170.0,8.8); insert into pointdata values('2008-02-04 20:00:00',29.333,89.400,0.0,'KBVE',25.0,160.0,6.7); insert into pointdata values('2008-02-04 20:00:00',30.217,93.150,4.0,'KCWF',26.0,170.0,11.3); insert into pointdata values('2008-02-04 20:00:00',31.167,93.000,114.0,'KDNK',25.0,180.0,9.3); insert into pointdata values('2008-02-04 20:00:00',30.832,93.340,63.0,'KDRI',25.0,170.0,10.8); insert into pointdata values('2008-02-04 20:00:00',32.542,93.745,54.0,'KDTN',24.4,180.0,7.2); insert into pointdata values('2008-02-04 20:00:00',31.395,92.290,34.0,'KESF',25.0,210.0,7.7); insert into pointdata values('2008-02-04 20:00:00',29.445,90.261,0.0,'KGAO',23.0,160.0,5.7); insert into pointdata values('2008-02-04 20:00:00',30.521,90.418,13.0,'KHDC',28.0,170.0,5.7); insert into pointdata values('2008-02-04 20:00:00',29.567,90.667,3.0,'KHUM',26.0,160.0,5.1); insert into pointdata values('2008-02-04 20:00:00',31.736,93.099,37.0,'KIER',26.0,180.0,6.7); insert into pointdata values('2008-02-04 20:00:00',30.126,93.223,5.0,'KLCH',25.6,170.0,7.2); insert into pointdata values('2008-02-04 20:00:00',30.202,91.993,12.0,'KLFT',25.0,180.0,7.2); insert into pointdata values('2008-02-04 20:00:00',32.512,92.031,24.0,'KMLU',24.4,200.0,8.8); insert into pointdata values('2008-02-04 20:00:00',29.993,90.251,1.0,'KMSY',25.6,170.0,6.7); insert into pointdata values('2008-02-04 20:00:00',29.825,90.035,1.0,'KNBG',24.4,170.0,8.2); insert into pointdata values('2008-02-04 20:00:00',30.049,90.029,2.0,'KNEW',25.6,180.0,8.8); insert into pointdata values('2008-02-04 20:00:00',29.562,91.526,0.0,'KP92',22.2,150.0,4.6); insert into pointdata values('2008-02-04 20:00:00',31.050,93.194,101.0,'KPOE',25.0,180.0,7.2); insert into pointdata values('2008-02-04 20:00:00',32.514,92.588,95.0,'KRSN',24.0,190.0,6.7); insert into pointdata values('2008-02-04 20:00:00',32.447,93.824,78.0,'KSHV',24.4,180.0,8.8); insert into pointdata values('2008-02-04 20:00:00',32.348,91.030,26.0,'KTVR',25.0,190.0,6.7); insert into pointdata values('2008-02-04 20:00:00',41.254,70.060,14.0,'KACK',4.4,150.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.697,73.170,199.0,'KAQW',2.2,90.0,2.6); insert into pointdata values('2008-02-04 20:00:00',42.160,72.713,82.0,'KBAF',2.2,190.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.468,71.294,40.0,'KBED',4.4,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.360,71.010,6.0,'KBOS',3.3,110.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.584,70.916,33.0,'KBVY',3.3,290.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.200,72.533,75.0,'KCEF',2.9,200.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.688,69.993,20.0,'KCQX',5.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.675,70.957,24.0,'KEWB',3.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.552,71.756,106.0,'KFIT',3.3,100.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.650,70.517,40.0,'KFMH',3.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.672,70.270,15.0,'KHYA',3.9,40.0,2.1); insert into pointdata values('2008-02-04 20:00:00',42.713,71.126,45.0,'KLWM',3.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.212,71.115,192.0,'KMQE',2.8,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.392,70.617,20.0,'KMVY',3.9,70.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.572,72.277,169.0,'KORE',2.2,180.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.270,71.873,307.0,'KORH',1.7,200.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.191,71.174,15.0,'KOWD',3.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.427,73.289,364.0,'KPSF',1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',42.067,70.217,2.0,'KPVC',4.0,290.0,1.5); insert into pointdata values('2008-02-04 20:00:00',41.909,70.728,45.0,'KPYM',3.3,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.876,71.021,13.0,'KTAN',3.9,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',38.817,76.850,86.0,'KADW',11.2,90.0,2.1); insert into pointdata values('2008-02-04 20:00:00',39.167,76.683,44.0,'KBWI',8.9,70.0,4.1); insert into pointdata values('2008-02-04 20:00:00',39.615,78.761,236.0,'KCBE',6.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',38.800,76.067,22.0,'KESN',13.0,140.0,2.1); insert into pointdata values('2008-02-04 20:00:00',39.417,77.374,92.0,'KFDK',11.0,350.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.083,76.767,46.0,'KFME',10.0,80.0,2.6); insert into pointdata values('2008-02-04 20:00:00',39.706,77.730,214.0,'KHGR',6.1,350.0,3.6); insert into pointdata values('2008-02-04 20:00:00',39.333,76.417,7.0,'KMTN',9.0,50.0,3.1); insert into pointdata values('2008-02-04 20:00:00',38.991,76.483,2.0,'KNAK',10.6,120.0,1.5); insert into pointdata values('2008-02-04 20:00:00',38.279,76.414,12.0,'KNHK',9.4,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',38.340,75.510,16.0,'KSBY',14.4,150.0,5.1); insert into pointdata values('2008-02-04 20:00:00',44.320,69.797,107.0,'KAUG',2.2,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',44.797,68.819,58.0,'KBGR',1.1,360.0,1.5); insert into pointdata values('2008-02-04 20:00:00',44.450,68.367,25.0,'KBHB',1.0,320.0,2.1); insert into pointdata values('2008-02-04 20:00:00',46.867,68.013,191.0,'KCAR',-3.9,330.0,2.6); insert into pointdata values('2008-02-04 20:00:00',47.285,68.307,301.0,'KFVE',-5.6,330.0,3.6); insert into pointdata values('2008-02-04 20:00:00',45.467,69.583,427.0,'KGNR',-1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',46.123,67.792,149.0,'KHUL',-3.3,40.0,1.5); insert into pointdata values('2008-02-04 20:00:00',43.964,69.712,20.0,'KIWI',2.8,180.0,3.6); insert into pointdata values('2008-02-04 20:00:00',44.050,70.283,88.0,'KLEW',4.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',45.648,68.692,124.0,'KMLT',-0.59,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',43.900,69.935,22.0,'KNHZ',3.3,180.0,2.6); insert into pointdata values('2008-02-04 20:00:00',46.683,68.050,163.0,'KPQI',-3.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',43.642,70.304,22.0,'KPWM',3.3,190.0,3.6); insert into pointdata values('2008-02-04 20:00:00',44.067,69.100,17.0,'KRKD',1.0,170.0,4.1); insert into pointdata values('2008-02-04 20:00:00',43.400,70.717,74.0,'KSFM',3.0,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',44.533,69.683,102.0,'KWVL',2.0,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',44.988,85.198,190.0,'KACB',2.0,80.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.868,84.079,244.0,'KADG',0.61,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',43.322,84.688,229.0,'KAMN',1.0,90.0,4.1); insert into pointdata values('2008-02-04 20:00:00',46.479,84.357,210.0,'KANJ',0.01,130.0,3.6); insert into pointdata values('2008-02-04 20:00:00',45.072,83.564,210.0,'KAPN',0.61,110.0,5.7); insert into pointdata values('2008-02-04 20:00:00',42.224,83.740,255.0,'KARB',1.7,90.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.229,85.546,266.0,'KAZO',2.2,120.0,3.6); insert into pointdata values('2008-02-04 20:00:00',43.781,82.986,233.0,'KBAX',2.0,110.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.129,86.428,196.0,'KBEH',2.8,120.0,5.7); insert into pointdata values('2008-02-04 20:00:00',42.746,86.097,209.0,'KBIV',2.2,90.0,7.2); insert into pointdata values('2008-02-04 20:00:00',42.312,85.241,290.0,'KBTL',1.7,110.0,4.6); insert into pointdata values('2008-02-04 20:00:00',44.283,85.417,398.0,'KCAD',-0.99,130.0,6.2); insert into pointdata values('2008-02-04 20:00:00',43.459,83.445,214.0,'KCFS',2.0,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',46.250,84.467,244.0,'KCIU',-0.99,110.0,7.2); insert into pointdata values('2008-02-04 20:00:00',47.168,88.489,334.0,'KCMX',-1.7,90.0,4.1); insert into pointdata values('2008-02-04 20:00:00',45.305,85.275,204.0,'KCVX',0.01,90.0,5.7); insert into pointdata values('2008-02-04 20:00:00',42.409,83.010,191.0,'KDET',1.1,120.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.231,83.331,194.0,'KDTW',2.2,90.0,2.6); insert into pointdata values('2008-02-04 20:00:00',41.736,83.655,204.0,'KDUH',1.0,100.0,2.6); insert into pointdata values('2008-02-04 20:00:00',46.311,85.457,265.0,'KERY',1.0,100.0,6.7); insert into pointdata values('2008-02-04 20:00:00',45.750,87.033,180.0,'KESC',0.01,70.0,7.2); insert into pointdata values('2008-02-04 20:00:00',44.625,86.200,193.0,'KFKS',1.0,80.0,2.6); insert into pointdata values('2008-02-04 20:00:00',42.967,83.749,238.0,'KFNT',3.3,120.0,4.6); insert into pointdata values('2008-02-04 20:00:00',42.574,84.811,271.0,'KFPK',1.0,110.0,3.6); insert into pointdata values('2008-02-04 20:00:00',44.680,84.729,353.0,'KGOV',0.01,100.0,5.7); insert into pointdata values('2008-02-04 20:00:00',42.881,85.523,242.0,'KGRR',1.1,90.0,7.7); insert into pointdata values('2008-02-04 20:00:00',44.351,84.674,350.0,'KHTL',0.01,120.0,4.6); insert into pointdata values('2008-02-04 20:00:00',43.433,83.862,183.0,'KHYX',2.0,110.0,2.6); insert into pointdata values('2008-02-04 20:00:00',45.814,88.109,360.0,'KIMT',-1.1,0.0,0.0); insert into pointdata values('2008-02-04 20:00:00',41.813,85.439,282.0,'KIRS',2.0,120.0,5.1); insert into pointdata values('2008-02-04 20:00:00',45.975,86.172,209.0,'KISQ',0.01,90.0,6.2); insert into pointdata values('2008-02-04 20:00:00',46.533,90.133,375.0,'KIWD',-0.99,40.0,1.5); insert into pointdata values('2008-02-04 20:00:00',42.260,84.459,305.0,'KJXN',1.1,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',41.921,84.586,360.0,'KJYM',1.0,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.780,84.579,262.0,'KLAN',1.1,110.0,4.6); insert into pointdata values('2008-02-04 20:00:00',43.967,86.400,197.0,'KLDM',1.0,110.0,5.7); insert into pointdata values('2008-02-04 20:00:00',42.351,86.256,203.0,'KLWA',2.0,120.0,7.7); insert into pointdata values('2008-02-04 20:00:00',44.267,86.250,189.0,'KMBL',1.0,100.0,6.7); insert into pointdata values('2008-02-04 20:00:00',43.533,84.079,204.0,'KMBS',1.7,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',45.865,84.637,226.0,'KMCD',1.0,100.0,3.1); insert into pointdata values('2008-02-04 20:00:00',45.426,84.913,209.0,'KMGN',1.0,80.0,6.2); insert into pointdata values('2008-02-04 20:00:00',43.171,86.237,191.0,'KMKG',0.61,70.0,6.2); insert into pointdata values('2008-02-04 20:00:00',45.133,87.633,191.0,'KMNM',0.01,80.0,7.2); insert into pointdata values('2008-02-04 20:00:00',43.617,84.733,230.0,'KMOP',0.01,80.0,2.6); insert into pointdata values('2008-02-04 20:00:00',42.617,82.833,177.0,'KMTC',2.0,110.0,4.1); insert into pointdata values('2008-02-04 20:00:00',41.933,85.052,292.0,'KOEB',2.0,130.0,4.6); insert into pointdata values('2008-02-04 20:00:00',42.099,83.161,180.0,'KONZ',2.0,90.0,3.1); insert into pointdata values('2008-02-04 20:00:00',44.450,83.367,193.0,'KOSC',1.0,80.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.629,83.984,293.0,'KOZW',2.0,110.0,3.6); insert into pointdata values('2008-02-04 20:00:00',46.412,86.651,0.0,'KP53',0.61,130.0,5.1); insert into pointdata values('2008-02-04 20:00:00',44.022,82.793,179.0,'KP58',1.1,80.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.917,82.533,198.0,'KPHN',2.0,130.0,5.1); insert into pointdata values('2008-02-04 20:00:00',45.571,84.797,220.0,'KPLN',0.61,100.0,5.1); insert into pointdata values('2008-02-04 20:00:00',42.663,83.410,299.0,'KPTK',1.1,150.0,3.1); insert into pointdata values('2008-02-04 20:00:00',45.407,83.813,204.0,'KPZQ',1.0,110.0,4.6); insert into pointdata values('2008-02-04 20:00:00',42.251,84.956,287.0,'KRMY',2.0,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',42.993,84.139,224.0,'KRNP',1.0,100.0,3.6); insert into pointdata values('2008-02-04 20:00:00',43.722,85.504,302.0,'KRQB',0.01,130.0,4.1); insert into pointdata values('2008-02-04 20:00:00',46.354,87.395,372.0,'KSAW',-0.99,80.0,2.6); insert into pointdata values('2008-02-04 20:00:00',45.692,85.566,204.0,'KSJX',1.0,80.0,6.2); insert into pointdata values('2008-02-04 20:00:00',45.654,84.519,195.0,'KSLH',0.01,100.0,4.6); insert into pointdata values('2008-02-04 20:00:00',42.566,84.423,280.0,'KTEW',2.0,120.0,3.1); insert into pointdata values('2008-02-04 20:00:00',41.940,83.435,188.0,'KTTF',2.0,90.0,3.6); insert into pointdata values('2008-02-04 20:00:00',42.543,83.178,222.0,'KVLL',2.0,90.0,3.1); insert into pointdata values('2008-02-04 20:00:00',42.237,83.526,218.0,'KYIP',1.7,80.0,3.6); insert into pointdata values('2008-02-04 20:00:00',44.073,93.553,343.0,'KACQ',0.01,40.0,4.1); insert into pointdata values('2008-02-04 20:00:00',46.450,95.211,417.0,'KADC',-3.0,60.0,3.1); insert into pointdata values('2008-02-04 20:00:00',43.683,93.367,384.0,'KAEL',-0.99,70.0,3.6); insert into pointdata values('2008-02-04 20:00:00',46.550,93.683,367.0,'KAIT',-3.0,60.0,3.1); insert into pointdata values('2008-02-04 20:00:00',45.150,93.217,278.0,'KANE',0.01,50.0,4.6); insert into pointdata values('2008-02-04 20:00:00',45.228,96.004,310.0,'KAQP',-2.0,50.0,2.6); insert into pointdata values('2008-02-04 20:00:00',43.667,92.933,375.0,'KAUM',1.0,70.0,4.1); insert into pointdata values('2008-02-04 20:00:00',45.869,95.394,434.0,'KAXN',-2.2,70.0,4.6); insert into pointdata values('2008-02-04 20:00:00',45.317,95.650,317.0,'KBBB',-3.0,90.0,3.1); insert into pointdata values('2008-02-04 20:00:00',48.727,94.612,330.0,'KBDE',-3.3,50.0,1.5); insert into pointdata values('2008-02-04 20:00:00',47.200,91.400,331.0,'KBFW',-0.99,60.0,4.1); insert into pointdata values('2008-02-04 20:00:00',47.500,94.933,423.0,'KBJI',-2.0,80.0,2.1); insert into pointdata values('2008-02-04 20:00:00',46.405,94.131,373.0,'KBRD',-1.7,70.0,3.1); insert into pointdata values('2008-02-04 20:00:00',45.567,93.267,287.0,'KCBG',-0.99,30.0,2.1); insert into pointdata values('2008-02-04 20:00:00',45.159,93.843,295.0,'KCFE',-0.79,30.0,3.6); insert into pointdata values('2008-02-04 20:00:00',47.838,90.383,548.0,'KCKC',-4.0,90.0,2.1);
92.923077
97
0.688292
0bd2a15595a7ffeff3a5d04383b9bf4a9a9a6d0e
429
swift
Swift
Faulting/Item+CoreDataProperties.swift
tutsplus/iOS-CoreDataFault
7aa4180286dfaa7954c5f24e1d723a30716441c6
[ "BSD-2-Clause" ]
6
2015-10-31T12:38:19.000Z
2018-05-10T12:52:24.000Z
Faulting/Item+CoreDataProperties.swift
tutsplus/iOS-CoreDataFault
7aa4180286dfaa7954c5f24e1d723a30716441c6
[ "BSD-2-Clause" ]
null
null
null
Faulting/Item+CoreDataProperties.swift
tutsplus/iOS-CoreDataFault
7aa4180286dfaa7954c5f24e1d723a30716441c6
[ "BSD-2-Clause" ]
3
2015-10-31T12:38:20.000Z
2018-05-10T06:17:30.000Z
// // Item+CoreDataProperties.swift // Faulting // // Created by Bart Jacobs on 30/10/15. // Copyright © 2015 Envato Tuts+. All rights reserved. // // Choose "Create NSManagedObject Subclass…" from the Core Data editor menu // to delete and recreate this implementation file for your updated model. // import Foundation import CoreData extension Item { @NSManaged var name: String? @NSManaged var list: List? }
20.428571
76
0.715618
c49421d681deee89af4fc6aac73ca904e4c853d9
350
c
C
questao05/main.c
williambrn/1-lista-PA
bfd79c42687db32d0f8f0c23f25902f59fde61da
[ "MIT" ]
null
null
null
questao05/main.c
williambrn/1-lista-PA
bfd79c42687db32d0f8f0c23f25902f59fde61da
[ "MIT" ]
null
null
null
questao05/main.c
williambrn/1-lista-PA
bfd79c42687db32d0f8f0c23f25902f59fde61da
[ "MIT" ]
1
2020-10-12T18:02:26.000Z
2020-10-12T18:02:26.000Z
#include <stdio.h> int main(void){ float vet[5] = {1.1,2.2,3.3,4.4,5.5}; float *f; int i; f = vet; printf("contador/valor/valor/endereco/endereco"); for(i = 0 ; i <= 4 ; i++){ printf("\n i = %d",i); printf(" vet[%d] = %.1f",i, vet[i]); printf(" *(f + %d) = %.1f",i, *(f+i)); printf(" &vet[%d] = %X",i, &vet[i]); printf(" (f + %d) = %X",i, f+i); } }
20.588235
49
0.494286
793b0d767b60c37eedbc82680b54458077d93baf
1,881
sql
SQL
sql/view/vKokoelmapeli.sql
daFool/slskirjasto_backend
9b026b1107ce001289fc6099d687b0d509ad90ed
[ "Apache-2.0" ]
null
null
null
sql/view/vKokoelmapeli.sql
daFool/slskirjasto_backend
9b026b1107ce001289fc6099d687b0d509ad90ed
[ "Apache-2.0" ]
null
null
null
sql/view/vKokoelmapeli.sql
daFool/slskirjasto_backend
9b026b1107ce001289fc6099d687b0d509ad90ed
[ "Apache-2.0" ]
null
null
null
drop view if exists vKokoelmapeli; create view vKokoelmapeli as select kp.*, p.nimet, p.julkaisijat, p.nimi, p.julkaisija, l.verkkoosoite from kokoelmapeli as kp join (select nimet, julkaisijat, tunniste, nimi, julkaisija from peli) as p on (kp.peli=p.tunniste) left outer join lahjoittaja as l on (kp.lahjoittaja=l.id); comment on view vKokoelmapeli is 'Kokoelmapelin tiedot'; comment on column vKokoelmapeli.Kokoelma is 'Viiteavain kokoelmaan'; comment on column vKokoelmapeli.Peli is 'Viiteavain peliiin'; comment on column vKokoelmapeli.Omistaja is 'Pelin omistaja'; comment on column vKokoelmapeli.Lahjoittaja is 'Viiteavain pelin lahjoittajaan'; comment on column vKokoelmapeli.Hylly is 'Hyllykkö'; comment on column vKokoelmapeli.Paikka is 'Hyllytaso/paikka'; comment on column vKokoelmapeli.Varasto is 'Viiteavain varastoon'; comment on column vKokoelmapeli.Laatikko is 'Minkä pelin laatikossa tämä peli on tms'; comment on column vKokoelmapeli.Kunto is 'Pelin kunto'; comment on column vKokoelmapeli.Huomautus is 'Huomioitavaa pelistä'; comment on column vKokoelmapeli.Tuotu is 'Koska tuotu kokoelmasta'; comment on column vKokoelmapeli.TuotuKokoelmasta is 'Mistä kokoelmasta tämä peli on lainattu'; comment on column vKokoelmapeli.AlkuperainenTunniste is 'Alkuperäisen kokoelman tunniste pelille'; comment on column vKokoelmapeli.nimiid is 'Nimen indeksi pelissä'; comment on column vKokoelmapeli.julkaisijaid is 'Julkaisijan indeksi pelissä'; comment on column vKokoelmapeli.tila is 'Pelin tila'; comment on column vKokoelmapeli.verkkoosoite is 'Lahjoittajan verkko-osoite'; comment on column vKokoelmapeli.nimet is 'Pelin nimitaulukko'; comment on column vKokoelmapeli.julkaisijat is 'Julkaisijoiden nimitaulukko'; comment on column vKokoelmapeli.nimi is 'Pelin oletusnimi'; comment on column vKokoelmapeli.julkaisija is 'Pelin oletusjulkaisija';
50.837838
98
0.81446
58ce5b1be799a8d0ea40cee7f7eb2c202fcb8516
10,844
rs
Rust
polars/tests/it/core/rolling_window.rs
alexander-beedie/polars
06ba4f3796a1f4aaa39a04d5454a48009568e290
[ "MIT" ]
null
null
null
polars/tests/it/core/rolling_window.rs
alexander-beedie/polars
06ba4f3796a1f4aaa39a04d5454a48009568e290
[ "MIT" ]
null
null
null
polars/tests/it/core/rolling_window.rs
alexander-beedie/polars
06ba4f3796a1f4aaa39a04d5454a48009568e290
[ "MIT" ]
null
null
null
use super::*; #[test] fn test_rolling() { let s = Int32Chunked::new("foo", &[1, 2, 3, 2, 1]).into_series(); let a = s .rolling_sum(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }) .unwrap(); let a = a.i32().unwrap(); assert_eq!( Vec::from(a), [1, 3, 5, 5, 3] .iter() .copied() .map(Some) .collect::<Vec<_>>() ); let a = s .rolling_min(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }) .unwrap(); let a = a.i32().unwrap(); assert_eq!( Vec::from(a), [1, 1, 2, 2, 1] .iter() .copied() .map(Some) .collect::<Vec<_>>() ); let a = s .rolling_max(RollingOptionsImpl { window_size: Duration::new(2), weights: Some(vec![1., 1.]), min_periods: 1, ..Default::default() }) .unwrap(); let a = a.f64().unwrap(); assert_eq!( Vec::from(a), [1., 2., 3., 3., 2.] .iter() .copied() .map(Some) .collect::<Vec<_>>() ); } #[test] fn test_rolling_min_periods() { let s = Int32Chunked::new("foo", &[1, 2, 3, 2, 1]).into_series(); let a = s .rolling_max(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 2, ..Default::default() }) .unwrap(); let a = a.i32().unwrap(); assert_eq!(Vec::from(a), &[None, Some(2), Some(3), Some(3), Some(2)]); } #[test] fn test_rolling_mean() { let s = Float64Chunked::new( "foo", &[ Some(0.0), Some(1.0), Some(2.0), None, None, Some(5.0), Some(6.0), ], ) .into_series(); // check err on wrong input assert!(s .rolling_mean(RollingOptionsImpl { window_size: Duration::new(1), min_periods: 2, ..Default::default() }) .is_err()); // validate that we divide by the proper window length. (same as pandas) let a = s .rolling_mean(RollingOptionsImpl { window_size: Duration::new(3), min_periods: 1, center: false, ..Default::default() }) .unwrap(); let a = a.f64().unwrap(); assert_eq!( Vec::from(a), &[ Some(0.0), Some(0.5), Some(1.0), Some(1.5), Some(2.0), Some(5.0), Some(5.5) ] ); // check centered rolling window let a = s .rolling_mean(RollingOptionsImpl { window_size: Duration::new(3), min_periods: 1, center: true, ..Default::default() }) .unwrap(); let a = a.f64().unwrap(); assert_eq!( Vec::from(a), &[ Some(0.5), Some(1.0), Some(1.5), Some(2.0), Some(5.0), Some(5.5), Some(5.5) ] ); // integers let ca = Int32Chunked::from_slice("", &[1, 8, 6, 2, 16, 10]); let out = ca .into_series() .rolling_mean(RollingOptionsImpl { window_size: Duration::new(2), weights: None, min_periods: 2, center: false, ..Default::default() }) .unwrap(); let out = out.f64().unwrap(); assert_eq!( Vec::from(out), &[None, Some(4.5), Some(7.0), Some(4.0), Some(9.0), Some(13.0),] ); } #[test] fn test_rolling_apply() { let ca = Float64Chunked::new( "foo", &[ Some(0.0), Some(1.0), Some(2.0), None, None, Some(5.0), Some(6.0), ], ); let out = ca .rolling_apply( &|s| s.sum_as_series(), RollingOptionsFixedWindow { window_size: 3, min_periods: 3, ..Default::default() }, ) .unwrap(); let out = out.f64().unwrap(); assert_eq!( Vec::from(out), &[ None, None, Some(3.0), Some(3.0), Some(2.0), Some(5.0), Some(11.0) ] ); } #[test] fn test_rolling_var() { let s = Float64Chunked::new( "foo", &[ Some(0.0), Some(1.0), Some(2.0), None, None, Some(5.0), Some(6.0), ], ) .into_series(); // window larger than array assert_eq!( s.rolling_var(RollingOptionsImpl { window_size: Duration::new(10), min_periods: 10, ..Default::default() }) .unwrap() .null_count(), s.len() ); let options = RollingOptionsImpl { window_size: Duration::new(3), min_periods: 3, ..Default::default() }; let out = s .rolling_var(options.clone()) .unwrap() .cast(&DataType::Int32) .unwrap(); let out = out.i32().unwrap(); assert_eq!( Vec::from(out), &[None, None, Some(1), None, None, None, None,] ); let s = Float64Chunked::from_slice("", &[0.0, 2.0, 8.0, 3.0, 12.0, 1.0]).into_series(); let out = s .rolling_var(options) .unwrap() .cast(&DataType::Int32) .unwrap(); let out = out.i32().unwrap(); assert_eq!( Vec::from(out), &[None, None, Some(17), Some(10), Some(20), Some(34),] ); // check centered rolling window let out = s .rolling_var(RollingOptionsImpl { window_size: Duration::new(4), min_periods: 3, center: true, ..Default::default() }) .unwrap(); let out = out.f64().unwrap(); assert_eq!( Vec::from(out), &[ None, Some(17.333333333333332), Some(11.583333333333334), Some(21.583333333333332), Some(24.666666666666668), Some(34.33333333333334) ] ); } #[test] fn test_median_quantile_types() { let s = Int32Chunked::new("foo", &[1, 2, 3, 2, 1]).into_series(); let rol_med = s .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }) .unwrap(); let rol_med_weighted = s .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }) .unwrap(); let rol_quantile = s .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }, ) .unwrap(); let rol_quantile_weighted = s .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }, ) .unwrap(); assert_eq!(*rol_med.dtype(), DataType::Float64); assert_eq!(*rol_med_weighted.dtype(), DataType::Float64); assert_eq!(*rol_quantile.dtype(), DataType::Float64); assert_eq!(*rol_quantile_weighted.dtype(), DataType::Float64); let s = Float32Chunked::new("foo", &[1.0, 2.0, 3.0, 2.0, 1.0]).into_series(); let rol_med = s .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }) .unwrap(); let rol_med_weighted = s .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }) .unwrap(); let rol_quantile = s .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }, ) .unwrap(); let rol_quantile_weighted = s .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }, ) .unwrap(); assert_eq!(*rol_med.dtype(), DataType::Float32); assert_eq!(*rol_med_weighted.dtype(), DataType::Float32); assert_eq!(*rol_quantile.dtype(), DataType::Float32); assert_eq!(*rol_quantile_weighted.dtype(), DataType::Float32); let s1 = Float64Chunked::new("foo", &[1.0, 2.0, 3.0, 2.0, 1.0]).into_series(); let rol_med = s1 .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }) .unwrap(); let rol_med_weighted = s1 .rolling_median(RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }) .unwrap(); let rol_quantile = s1 .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, ..Default::default() }, ) .unwrap(); let rol_quantile_weighted = s1 .rolling_quantile( 0.3, QuantileInterpolOptions::Linear, RollingOptionsImpl { window_size: Duration::new(2), min_periods: 1, weights: Some(vec![1.0, 2.0]), ..Default::default() }, ) .unwrap(); assert_eq!(*rol_med.dtype(), DataType::Float64); assert_eq!(*rol_med_weighted.dtype(), DataType::Float64); assert_eq!(*rol_quantile.dtype(), DataType::Float64); assert_eq!(*rol_quantile_weighted.dtype(), DataType::Float64); }
25.160093
91
0.462744
aa29f486639f8a039f73b588429a9ccd121b8c92
2,692
swift
Swift
JetLayout/Classes/Core/View.swift
vbenkevich/jetLayout
c254a48d1e027175afb773264ddd0c7933e53894
[ "MIT" ]
4
2020-07-07T15:35:05.000Z
2022-01-28T07:15:48.000Z
JetLayout/Classes/Core/View.swift
vbenkevich/jetLayout
c254a48d1e027175afb773264ddd0c7933e53894
[ "MIT" ]
null
null
null
JetLayout/Classes/Core/View.swift
vbenkevich/jetLayout
c254a48d1e027175afb773264ddd0c7933e53894
[ "MIT" ]
null
null
null
// // JetLayout // // Copyright © 2020 Vladimir Benkevich // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // import UIKit public protocol Views { var views: [View] { get } } public protocol View: Views { var body: Layout { get } } public extension View { var views: [View] { return [self] } } public protocol Layout: class { var alignment: Alignment { get set } @discardableResult func layout(container: UIView?) -> UIView } public extension View { func toUIView() -> UIView { return ViewAdapter(view: self) } func setup(block: (Self) -> Void) -> Self { block(self) return self } } private class ViewAdapter: UIView { init(view: View) { super.init(frame: .zero) view.embed(in: self, alignment: .fill(toPadding: false)) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } } protocol UIViewProvider { var uiView: UIView? { get } } public extension View { func embed(in view: UIView, alignment: Alignment = .fill()) { let body = self.body body.alignment = alignment body.layout(container: view) } func accessibilityId(_ identifier: String) -> Self { guard let view = (body as? UIViewProvider)?.uiView else { assertionFailure("cant set accessibility id") return self } view.accessibilityIdentifier = identifier return self } } extension Widget: UIViewProvider { var uiView: UIView? { return view } }
25.158879
82
0.651932
f029112ff9d652c6d8e36f9059cb703264d4ebbd
739
py
Python
Hartree-Fock_H2/utils.py
WonhoZhung/CH502
c64a174fe7218e6e86c84c73e6df441fb5074211
[ "MIT" ]
null
null
null
Hartree-Fock_H2/utils.py
WonhoZhung/CH502
c64a174fe7218e6e86c84c73e6df441fb5074211
[ "MIT" ]
null
null
null
Hartree-Fock_H2/utils.py
WonhoZhung/CH502
c64a174fe7218e6e86c84c73e6df441fb5074211
[ "MIT" ]
null
null
null
#---------------------------------------------------------------------- # Basis Set Exchange # Version v0.8.13 # https://www.basissetexchange.org #---------------------------------------------------------------------- # Basis set: STO-3G # Description: STO-3G Minimal Basis (3 functions/AO) # Role: orbital # Version: 1 (Data from Gaussian09) #---------------------------------------------------------------------- # BASIS "ao basis" PRINT # #BASIS SET: (3s) -> [1s] # H S # 0.3425250914E+01 0.1543289673E+00 # 0.6239137298E+00 0.5353281423E+00 # 0.1688554040E+00 0.4446345422E+00 # END A_LIST = [3.425250914 , 0.6239137298, 0.1688554040] D_LIST = [0.1543289673, 0.5353281423, 0.4446345422]
35.190476
71
0.460081
e773a1a34ee6ceb55d2e78ed0b6c7b64b968b619
6,184
js
JavaScript
src/Memezator/stores/MemezatorStatusesStore.js
Prometeus-Network/ignite-front-end
0073ee633e27dcdcbab7f7ec2d49c8fd0cb779ae
[ "Apache-1.1" ]
4
2020-05-14T08:02:00.000Z
2021-04-29T07:28:50.000Z
src/Memezator/stores/MemezatorStatusesStore.js
Prometeus-Network/ignite-front-end
0073ee633e27dcdcbab7f7ec2d49c8fd0cb779ae
[ "Apache-1.1" ]
null
null
null
src/Memezator/stores/MemezatorStatusesStore.js
Prometeus-Network/ignite-front-end
0073ee633e27dcdcbab7f7ec2d49c8fd0cb779ae
[ "Apache-1.1" ]
5
2020-05-11T13:55:46.000Z
2020-05-24T15:29:35.000Z
import { observable, action, reaction } from "mobx"; import { axiosInstance } from "../../api/axios-instance"; export class MemezatorStatusesStore { @observable statuses = []; @observable statusLikePendingMap = {}; @observable hasMore = true; @observable currentStatusId = undefined; @observable currentStatusUsername = undefined; @observable memezatorError = undefined; @observable pending = false; authorizationStore = undefined; createStatusStore = undefined; memezatorDialogStore = undefined; constructor(authorizationStore, createStatusStore, memezatorDialogStore) { this.authorizationStore = authorizationStore; this.createStatusStore = createStatusStore; this.memezatorDialogStore = memezatorDialogStore; // reaction( // () => this.authorizationStore.currentUser, // () => { // this.reset(); // if (window.location.pathname === "/memezator") { // this.fetchMemezatorStatuses(); // } // } // ); reaction( () => this.createStatusStore.createdMemeStatus, status => { if (status) { this.statuses = [status, ...this.statuses]; } } ); } @action fetchMemezatorStatuses = () => { this.pending = true; let url; if (this.statuses.length > 0) { const maxId = this.statuses[this.statuses.length - 1].id; url = `/api/v1/statuses?type=memes&max_id=${maxId}`; } else { url = "/api/v1/statuses?type=memes"; } axiosInstance .get(url) .then(({ data }) => { if (data.length !== 0) { this.statuses.push(...data); } else { this.hasMore = false; } }) .catch(error => { console.log(error); }) .finally(() => { this.pending = false; }); }; @action favouriteStatus = id => { if (this.authorizationStore.accessToken) { this.statusLikePendingMap = { ...this.statusLikePendingMap, [id]: true }; axiosInstance .post(`/api/v1/statuses/${id}/favourite`) .then(({ data }) => { this.statusLikePendingMap[id] = false; this.statuses = this.statuses.map(status => { if (status.id === id) { const originalMediaAttachments = status.media_attachments; status = { ...data }; status.media_attachments = originalMediaAttachments; } return status; }); }) .catch(error => { this.statusLikePendingMap[id] = false; this.statuses = this.statuses.map(status => { if (status.id === id) { const originalMediaAttachments = status.media_attachments; status.media_attachments = originalMediaAttachments; } return status; }); this.memezatorDialogStore.openDialogByError(error); }) .finally(() => { this.statusLikePendingMap[id] = false; }); } }; @action followStatusAuthor = id => { if (this.authorizationStore.accessToken) { const authorId = this.statuses .filter(status => status.id === id) .map(status => status.account.id) .reduce(authorId => authorId); axiosInstance.post(`/api/v1/accounts/${authorId}/follow`).then(() => { this.authorizationStore.setFollowsCount( this.authorizationStore.currentUser.follows_count + 1 ); this.followStatusAuthorByAuthorId(authorId); }); } }; @action followStatusAuthorByAuthorId = authorId => { this.statuses = this.statuses.map(status => { if (status.account.id === authorId) { status.account.following = true; } return status; }); }; @action unfollowStatusAuthor = () => { if (this.authorizationStore.accessToken) { const authorId = this.statuses .filter(status => status.id === this.currentStatusId) .map(status => status.account.id) .reduce(authorId => authorId); axiosInstance.post(`/api/v1/accounts/${authorId}/unfollow`).then(() => { this.unfollowDialogOpen = false; this.unfollowStatusAuthorByAuthorId(authorId); this.authorizationStore.setFollowsCount( this.authorizationStore.currentUser.follows_count - 1 ); }); } }; @action unfollowStatusAuthorByAuthorId = authorId => { this.statuses = this.statuses.map(status => { if (status.account.id === authorId) { status.account.following = false; } return status; }); }; @action unfollowStatusAuthorWithDialog = (statusId, username) => { this.currentStatusId = statusId; this.currentStatusUsername = username; this.unfollowDialogOpen = true; }; @action setUnfollowDialogOpen = unfollowDialogOpen => { this.unfollowDialogOpen = unfollowDialogOpen; }; @action reset = () => { this.statuses = []; this.currentStatusId = undefined; this.currentStatusUsername = undefined; this.unfollowDialogOpen = false; this.pending = false; }; }
30.766169
84
0.493532
8aa361f041cd80d1951709b60af0b47e33ae06a7
674
swift
Swift
Sources/Honey/CustomQueryConvertible Extensions.swift
ValentinFromSpace/Honey
8ed44c2e9557ea8753fa3f20ad322d2b492e7fbe
[ "MIT" ]
22
2021-05-15T17:02:32.000Z
2021-06-07T03:32:51.000Z
Sources/Honey/CustomQueryConvertible Extensions.swift
ValentinFromSpace/Honey
8ed44c2e9557ea8753fa3f20ad322d2b492e7fbe
[ "MIT" ]
1
2021-05-30T03:28:40.000Z
2021-06-02T19:41:21.000Z
Sources/Honey/CustomQueryConvertible Extensions.swift
ValentinWalter/Honey
8ed44c2e9557ea8753fa3f20ad322d2b492e7fbe
[ "MIT" ]
null
null
null
// // CustomQueryConvertible Extensions.swift // Honey // // Created by Valentin Walter on 4/21/20. // import Foundation import Middleman extension Bool: CustomQueryConvertible { public var queryValue: String? { self ? "yes" : "no" } } extension Array: CustomQueryConvertible where Element: CustomStringConvertible { public var queryValue: String? { if isEmpty { return nil } else { return self .map(\.description) .joined(separator: ",") } } } extension Data: CustomQueryConvertible { public var queryValue: String? { base64EncodedString() } }
19.823529
80
0.605341
758dfae76040b34f023842c2efb591a783273520
1,559
rs
Rust
crates/math/src/packing.rs
gents83/INOX
8ff4f851ab6493b9d613fce4a08bb0ba58dee568
[ "MIT" ]
5
2022-02-27T12:48:52.000Z
2022-03-26T17:57:59.000Z
crates/math/src/packing.rs
gents83/SABI
8ff4f851ab6493b9d613fce4a08bb0ba58dee568
[ "MIT" ]
1
2022-03-14T17:02:23.000Z
2022-03-14T17:02:23.000Z
crates/math/src/packing.rs
gents83/SABI
8ff4f851ab6493b9d613fce4a08bb0ba58dee568
[ "MIT" ]
null
null
null
use crate::Vector4; // https://docs.microsoft.com/en-us/windows/win32/direct3d10/d3d10-graphics-programming-guide-resources-data-conversion //output: [-1..1] float in range [min..max] #[inline] pub fn normalize_f32_in_neg1_pos1(v: f32, min: f32, max: f32) -> f32 { 2. * (v - min) / (max - min) - 1. } //output: [0..1] float in range [min..max] #[inline] pub fn normalize_f32_in_0_1(v: f32, min: f32, max: f32) -> f32 { (v - min) / (max - min) } //input: [-1..1] float; output: [-127..127] integer #[inline] pub fn encode_f32_to_snorm(v: f32) -> i8 { (v * 127.0 + { if v > 0.0 { 0.5 } else { -0.5 } }) as i8 } //input: [0..1] float; output: [0..255] integer #[inline] pub fn encode_f32_to_unorm(v: f32) -> u8 { (v * 255.0 + 0.5) as u8 } //input: [-1..1] float; output: [-127..127] integer #[inline] pub fn pack_4_f32_to_snorm(value: Vector4) -> i32 { let v = [ encode_f32_to_snorm(value.x), encode_f32_to_snorm(value.y), encode_f32_to_snorm(value.z), encode_f32_to_snorm(value.w), ]; ((v[0] as i32) << 24) | ((v[1] as i32) << 16) | ((v[2] as i32) << 8) | v[3] as i32 } //input: [0..1] float; output: [0..255] integer #[inline] pub fn pack_4_f32_to_unorm(value: Vector4) -> u32 { let v = [ encode_f32_to_unorm(value.x), encode_f32_to_unorm(value.y), encode_f32_to_unorm(value.z), encode_f32_to_unorm(value.w), ]; ((v[0] as u32) << 24) | ((v[1] as u32) << 16) | ((v[2] as u32) << 8) | v[3] as u32 }
26.87931
119
0.566389
b97bf7c5792238d5563c3c86bc97f85dd2d63a93
3,537
h
C
include/java/util/TreeSet.h
iFindTA/PBJ2Objc
014bd0f99b129cb094ee35e472802fd38c5c0f87
[ "MIT" ]
null
null
null
include/java/util/TreeSet.h
iFindTA/PBJ2Objc
014bd0f99b129cb094ee35e472802fd38c5c0f87
[ "MIT" ]
null
null
null
include/java/util/TreeSet.h
iFindTA/PBJ2Objc
014bd0f99b129cb094ee35e472802fd38c5c0f87
[ "MIT" ]
null
null
null
// // Generated by the J2ObjC translator. DO NOT EDIT! // source: android/libcore/luni/src/main/java/java/util/TreeSet.java // #ifndef _JavaUtilTreeSet_H_ #define _JavaUtilTreeSet_H_ #include "J2ObjC_header.h" #include "java/io/Serializable.h" #include "java/util/AbstractSet.h" #include "java/util/NavigableSet.h" @protocol JavaUtilCollection; @protocol JavaUtilComparator; @protocol JavaUtilIterator; @protocol JavaUtilNavigableMap; @protocol JavaUtilSortedSet; @interface JavaUtilTreeSet : JavaUtilAbstractSet < JavaUtilNavigableSet, NSCopying, JavaIoSerializable > #pragma mark Public - (instancetype)init; - (instancetype)initWithJavaUtilCollection:(id<JavaUtilCollection>)collection; - (instancetype)initWithJavaUtilComparator:(id<JavaUtilComparator>)comparator; - (instancetype)initWithJavaUtilSortedSet:(id<JavaUtilSortedSet>)set; - (jboolean)addWithId:(id)object; - (jboolean)addAllWithJavaUtilCollection:(id<JavaUtilCollection>)collection; - (id)ceilingWithId:(id)e; - (void)clear; - (id)clone; - (id<JavaUtilComparator>)comparator; - (jboolean)containsWithId:(id)object; - (id<JavaUtilIterator>)descendingIterator; - (id<JavaUtilNavigableSet>)descendingSet; - (id)first; - (id)floorWithId:(id)e; - (id<JavaUtilSortedSet>)headSetWithId:(id)end; - (id<JavaUtilNavigableSet>)headSetWithId:(id)end withBoolean:(jboolean)endInclusive; - (id)higherWithId:(id)e; - (jboolean)isEmpty; - (id<JavaUtilIterator>)iterator; - (id)last; - (id)lowerWithId:(id)e; - (id)pollFirst; - (id)pollLast; - (jboolean)removeWithId:(id)object; - (jint)size; - (id<JavaUtilNavigableSet>)subSetWithId:(id)start withBoolean:(jboolean)startInclusive withId:(id)end withBoolean:(jboolean)endInclusive; - (id<JavaUtilSortedSet>)subSetWithId:(id)start withId:(id)end; - (id<JavaUtilSortedSet>)tailSetWithId:(id)start; - (id<JavaUtilNavigableSet>)tailSetWithId:(id)start withBoolean:(jboolean)startInclusive; #pragma mark Package-Private - (instancetype)initWithJavaUtilNavigableMap:(id<JavaUtilNavigableMap>)map; @end J2OBJC_EMPTY_STATIC_INIT(JavaUtilTreeSet) FOUNDATION_EXPORT void JavaUtilTreeSet_initWithJavaUtilNavigableMap_(JavaUtilTreeSet *self, id<JavaUtilNavigableMap> map); FOUNDATION_EXPORT JavaUtilTreeSet *new_JavaUtilTreeSet_initWithJavaUtilNavigableMap_(id<JavaUtilNavigableMap> map) NS_RETURNS_RETAINED; FOUNDATION_EXPORT void JavaUtilTreeSet_init(JavaUtilTreeSet *self); FOUNDATION_EXPORT JavaUtilTreeSet *new_JavaUtilTreeSet_init() NS_RETURNS_RETAINED; FOUNDATION_EXPORT void JavaUtilTreeSet_initWithJavaUtilCollection_(JavaUtilTreeSet *self, id<JavaUtilCollection> collection); FOUNDATION_EXPORT JavaUtilTreeSet *new_JavaUtilTreeSet_initWithJavaUtilCollection_(id<JavaUtilCollection> collection) NS_RETURNS_RETAINED; FOUNDATION_EXPORT void JavaUtilTreeSet_initWithJavaUtilComparator_(JavaUtilTreeSet *self, id<JavaUtilComparator> comparator); FOUNDATION_EXPORT JavaUtilTreeSet *new_JavaUtilTreeSet_initWithJavaUtilComparator_(id<JavaUtilComparator> comparator) NS_RETURNS_RETAINED; FOUNDATION_EXPORT void JavaUtilTreeSet_initWithJavaUtilSortedSet_(JavaUtilTreeSet *self, id<JavaUtilSortedSet> set); FOUNDATION_EXPORT JavaUtilTreeSet *new_JavaUtilTreeSet_initWithJavaUtilSortedSet_(id<JavaUtilSortedSet> set) NS_RETURNS_RETAINED; J2OBJC_TYPE_LITERAL_HEADER(JavaUtilTreeSet) #endif // _JavaUtilTreeSet_H_
28.991803
138
0.781736
c37d6d48330b5c1c59cdd17264a7db9d8cfc9df1
206
kt
Kotlin
idea/testData/refactoring/introduceLambdaParameter/lambdaParamInPrimaryConstructor.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
337
2020-05-14T00:40:10.000Z
2022-02-16T23:39:07.000Z
idea/testData/refactoring/introduceLambdaParameter/lambdaParamInPrimaryConstructor.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
92
2020-06-10T23:17:42.000Z
2020-09-25T10:50:13.000Z
idea/testData/refactoring/introduceLambdaParameter/lambdaParamInPrimaryConstructor.kt
qussarah/declare
c83b764c7394efa3364915d973ae79c4ebed2437
[ "Apache-2.0" ]
54
2016-02-29T16:27:38.000Z
2020-12-26T15:02:23.000Z
// WITH_DEFAULT_VALUE: false // TARGET: class Foo(val a: Int) { fun foo(n: Int): Int { val t = a + n + 1 return <selection>a - n</selection> - t } } fun test() { Foo(1).foo(2) }
17.166667
47
0.514563
48c47e4a4e37bce191f48f4e002fb89b273d6cf2
458
h
C
lib/filelib/test/ldm_test.h
VladisM/m2tools
9b53269938297109ad7210b840348933c9ad4dcf
[ "WTFPL" ]
1
2022-01-08T19:27:42.000Z
2022-01-08T19:27:42.000Z
lib/filelib/test/ldm_test.h
VladisM/m2tools
9b53269938297109ad7210b840348933c9ad4dcf
[ "WTFPL" ]
7
2021-12-18T23:04:17.000Z
2022-01-19T22:43:50.000Z
lib/filelib/test/ldm_test.h
VladisM/m2tools
9b53269938297109ad7210b840348933c9ad4dcf
[ "WTFPL" ]
null
null
null
#ifndef LDM_TEST_H_included #define LDM_TEST_H_included #include <utillib/cli.h> #include <stdbool.h> typedef struct{ bool generate; bool print; bool load_save; }ldm_settings_t; void ldm_test_args_init(options_t *args, ldm_settings_t *settings); void ldm_test_args_parse(options_t *args, ldm_settings_t *settings); bool ldm_test_should_run(ldm_settings_t *settings); bool ldm_test_run(ldm_settings_t *settings, int argc, char **argv); #endif
24.105263
68
0.790393
6056527e4eee9d5b22264b0d02e6d80a67388325
286
html
HTML
buildSrc/src/javadoc/overview.html
ramtej/qi4j-sdk
b8efcda1446afbf0dde033719d6956542bcec9d8
[ "Apache-2.0" ]
1
2017-08-08T03:09:29.000Z
2017-08-08T03:09:29.000Z
buildSrc/src/javadoc/overview.html
bwzhang2011/qi4j-sdk
be5f91e61a3b02e21f8f236fbaf85747f7f993ae
[ "Apache-2.0" ]
null
null
null
buildSrc/src/javadoc/overview.html
bwzhang2011/qi4j-sdk
be5f91e61a3b02e21f8f236fbaf85747f7f993ae
[ "Apache-2.0" ]
1
2021-12-26T13:53:10.000Z
2021-12-26T13:53:10.000Z
<html> <body> <h3>Welcome to the Qi4j SDK Javadoc.</h3> <p>Qi4j is a framework for domain centric application development, including evolved concepts from AOP, DI and DDD.</p> <p><a href="http://qi4j.org" target="_blank">qi4j.org</a></p> </body> </html>
35.75
127
0.625874
ae7decdf57db757c5fff011b926e568083609e10
3,286
rs
Rust
flow-rs/src/graph/subgraph.rs
chentyjpm/MegFlow
33c03ebbf9ce7b088a771a8206942ab1b56ce634
[ "Apache-2.0" ]
5
2021-12-07T06:52:15.000Z
2022-03-12T05:54:01.000Z
flow-rs/src/graph/subgraph.rs
chentyjpm/MegFlow
33c03ebbf9ce7b088a771a8206942ab1b56ce634
[ "Apache-2.0" ]
null
null
null
flow-rs/src/graph/subgraph.rs
chentyjpm/MegFlow
33c03ebbf9ce7b088a771a8206942ab1b56ce634
[ "Apache-2.0" ]
2
2021-12-27T03:49:38.000Z
2022-01-12T05:10:44.000Z
/** * \file flow-rs/src/graph/subgraph.rs * MegFlow is Licensed under the Apache License, Version 2.0 (the "License") * * Copyright (c) 2019-2021 Megvii Inc. All rights reserved. * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ use crate::broker::BrokerClient; use crate::prelude::*; use crate::registry::Collect; use crate::rt::task::JoinHandle; use futures_util::{pin_mut, select, FutureExt}; impl Node for Graph { fn set_port(&mut self, port_name: &str, tag: Option<u64>, channel: &ChannelStorage) { let port_name = port_name.to_owned(); let local_key = self.ctx.local_key; if let Some(chan) = self.conns.get_mut(&port_name) { chan.set(channel.clone()); for port in chan.info().rx.iter().chain(chan.info().tx.iter()) { if let Some(nodes) = self.nodes.get_mut(&port.node_name) { for node in nodes.get_mut() { node.set_port(&port.port_name, tag, channel); } } else { if self.is_shared { panic!("nested shared graph is not support"); } let proxy = self .shares .entry(port.node_name.clone()) .or_insert_with(|| { SharedProxy::registry_local() .get(local_key) .get(&port.node_name) .unwrap_or_else(|| { panic!("global node not found {}", port.node_name) }) .as_ref() .clone() }); proxy.set_port(&port.port_name, channel); } } } else { unreachable!("unexpected port {} for graph {}", port_name, self.ctx.name) } } fn set_port_dynamic(&mut self, _: u64, _: &str, _: String, _: usize, _: Vec<BrokerClient>) { unimplemented!() } fn close(&mut self) { for input in &self.inputs { self.conns[input].get().close(); } } fn is_allinp_closed(&self) -> bool { let mut is_closed = true; for input in &self.inputs { is_closed = is_closed && self.conns[input].get().is_closed(); } is_closed } } impl Actor for Graph { fn start( mut self: Box<Self>, context: Context, resource: ResourceCollection, ) -> JoinHandle<()> { flow_rs::rt::task::spawn(async move { let wait_ctx = context.wait().fuse(); let wait_graph = self.as_mut().start(Some(resource)).fuse(); pin_mut!(wait_ctx, wait_graph); loop { select! { _ = wait_ctx => { self.close() } _ = wait_graph => context.close(), complete => break, } } }) } }
34.957447
96
0.483567
c09e563829075cdc057912981a834e22d997d400
33,066
swift
Swift
Tests/Sequencer/Sequence/ShuffleSequenceIterationTests.swift
kartik-venugopal/aural-player
73e1e2768563094da63a73bddb4e22b3469ebf3a
[ "MIT" ]
21
2022-02-07T23:42:43.000Z
2022-03-17T12:07:28.000Z
Tests/Sequencer/Sequence/ShuffleSequenceIterationTests.swift
kartik-venugopal/aural-player
73e1e2768563094da63a73bddb4e22b3469ebf3a
[ "MIT" ]
2
2022-03-01T20:20:27.000Z
2022-03-07T14:23:04.000Z
Tests/Sequencer/Sequence/ShuffleSequenceIterationTests.swift
kartik-venugopal/aural-player
73e1e2768563094da63a73bddb4e22b3469ebf3a
[ "MIT" ]
3
2022-02-10T16:42:31.000Z
2022-03-18T11:11:48.000Z
// // ShuffleSequenceIterationTests.swift // Aural // // Copyright © 2021 Kartik Venugopal. All rights reserved. // // This software is licensed under the MIT software license. // See the file "LICENSE" in the project root directory for license terms. // import XCTest class ShuffleSequenceIterationTests: AuralTestCase { private var sequence: ShuffleSequence = ShuffleSequence() private var sequenceArray: [Int] { return sequence.sequence } private var sequenceArrayCount: Int { return sequenceArray.count } override func setUp() { // Start with a fresh object before each test sequence = ShuffleSequence() } func testPrevious_noSequence() { // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // previous() should produce nil when there is no sequence. // Calling previous() multiple times here should always produce the same result. for _ in 1...5 { XCTAssertNil(sequence.previous()) // Ensure that the sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testPrevious_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // Calling previous() multiple times here should always produce the same result. for _ in 1...5 { // No previous element available when sequence has not started. XCTAssertNil(sequence.previous()) // Also verify that no iteration was performed (i.e. still not pointing to any element). XCTAssertNil(sequence.currentValue) } } func testPrevious_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure that the sequence points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) // Calling previous() multiple times here should always produce the same result. for _ in 1...5 { XCTAssertNil(sequence.previous()) // Ensure that the calls to previous() did not result in any iteration (i.e. it still points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testPrevious_atSecondElement() { sequence.resizeAndReshuffle(size: 10) // Iterate to the 2nd element. XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[0]) XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[1]) // Ensure sequence is pointing to the second element. XCTAssertEqual(sequenceArray[1], sequence.currentValue) // Perform the test. let previous = sequence.previous() XCTAssertNotNil(previous) // Previous value should equal the first element. XCTAssertEqual(previous, sequenceArray.first) // Ensure that the call to previous() resulted in iteration to the first element. XCTAssertEqual(sequenceArray.first, sequence.currentValue) // Any further calls should result in nil for _ in 1...5 { XCTAssertNil(sequence.previous()) // Ensure sequence is still pointing to the first element (i.e. no iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testPrevious_iterateBackwardsFromTheEnd() { sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for _ in 0..<sequenceArray.count { _ = sequence.next(repeatMode: .off) } // Ensure sequence is pointing to the last element. XCTAssertEqual(sequenceArray.last, sequence.currentValue) // Iterate backwards, invoking previous() var cursor: Int = sequenceArray.count - 1 while cursor > 0 { let previous = sequence.previous() XCTAssertNotNil(previous) XCTAssertEqual(previous, sequenceArray[cursor - 1]) // Ensure sequence is now pointing to the element at index = cursor - 1 (i.e. iteration). XCTAssertEqual(sequenceArray[cursor - 1], sequence.currentValue) cursor.decrement() } } // MARK: next() tests ---------------------------------------------------------------------------------------------------- func testNext_noSequence() { for repeatMode in RepeatMode.allCases { sequence.clear() // next() should produce nil, regardless of repeat mode. XCTAssertNil(sequence.next(repeatMode: repeatMode)) } } func testNext_sequenceNotStarted() { for repeatMode in RepeatMode.allCases { sequence.clear() // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure sequence is not pointing to any element (i.e. no iteration), because it has not been started. XCTAssertNil(sequence.currentValue) // next() should produce the first element, regardless of repeat mode. XCTAssertEqual(sequenceArray.first, sequence.next(repeatMode: repeatMode)) // Ensure sequence is now pointing to the first element (i.e. iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testNext_atFirstElement() { for repeatMode in RepeatMode.allCases { sequence.clear() // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure sequence is now pointing to the first element. XCTAssertEqual(sequenceArray.first, sequence.currentValue) // next() should produce the second element, regardless of repeat mode. XCTAssertEqual(sequenceArray[1], sequence.next(repeatMode: repeatMode)) // Ensure sequence is now pointing to the second element (i.e. iteration). XCTAssertEqual(sequenceArray[1], sequence.currentValue) } } func testNext_atSecondLastElement() { for repeatMode in RepeatMode.allCases { sequence.clear() // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Ensure sequence is not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) // Iterate to the second-last element. for index in 0..<(sequenceArrayCount - 1) { XCTAssertEqual(sequence.next(repeatMode: repeatMode), sequenceArray[index]) } // Ensure sequence is now pointing to the second-last element (i.e. iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) // next() should produce the last element, regardless of repeat mode. XCTAssertEqual(sequenceArray.last, sequence.next(repeatMode: repeatMode)) // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } } func testNext_atLastElement_repeatOff() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // next() should produce nil when not repeating the sequence. XCTAssertNil(sequence.next(repeatMode: .off)) // Ensure sequence is still pointing to the last element (i.e. no iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } func testNext_atLastElement_repeatOne() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { XCTAssertEqual(sequence.next(repeatMode: .one), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // next() should produce nil when not repeating the sequence. XCTAssertNil(sequence.next(repeatMode: .one)) // Ensure sequence is still pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } func testNext_atLastElement_repeatAll() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) let seqArrayBeforeReshuffle: [Int] = Array(sequenceArray) // Iterate to the last element. for index in 0..<sequenceArrayCount { XCTAssertEqual(sequence.next(repeatMode: .all), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) let lastElementBeforeReshuffle = sequenceArray.last! // next() should cause the sequence to be reshuffled, and a value to be produced, so the value should be non-nil. let next = sequence.next(repeatMode: .all) XCTAssertNotNil(next) let seqArrayAfterReshuffle: [Int] = Array(sequenceArray) let firstElementAfterReshuffle = seqArrayAfterReshuffle.first! // Check that next() produced the first element in the new sequence XCTAssertEqual(next, firstElementAfterReshuffle) // Ensure the order of the sequence elements changed (i.e. new sequence), and that the last element // in the old sequence is not equal the first element in the new sequence. // (so that no track plays twice in a row) XCTAssertFalse(seqArrayBeforeReshuffle.elementsEqual(seqArrayAfterReshuffle)) XCTAssertNotEqual(lastElementBeforeReshuffle, firstElementAfterReshuffle) // Ensure sequence is now pointing to the first element of the new sequence (i.e. iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } // MARK: peekPrevious() tests --------------------------------------------------------------------------------------- func testPeekPrevious_noSequence() { // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // peekPrevious() should produce nil when there is no sequence. // Calling peekPrevious() multiple times here should always produce the same result. for _ in 1...5 { XCTAssertNil(sequence.peekPrevious()) // Ensure that the sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testPeekPrevious_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // Calling peekPrevious() multiple times here should always produce the same result. for _ in 1...5 { XCTAssertNil(sequence.peekPrevious()) // Also verify that no iteration was performed (i.e. still not pointing to any element). XCTAssertNil(sequence.currentValue) } } func testPeekPrevious_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure that the sequence points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) // Calling peekPrevious() multiple times here should always produce the same result. for _ in 1...5 { // When pointing to the first element, the previous element should be nil. XCTAssertNil(sequence.peekPrevious()) // Ensure that the calls to peekPrevious() did not result in any iteration (i.e. it still points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testPeekPrevious_atSecondElement() { sequence.resizeAndReshuffle(size: 10) // Iterate to the 2nd element. XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[0]) XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[1]) // Ensure sequence is pointing to the second element. XCTAssertEqual(sequenceArray[1], sequence.currentValue) // Perform the test. let previous = sequence.peekPrevious() XCTAssertNotNil(previous) // Previous value should equal the first element. XCTAssertEqual(previous, sequenceArray.first) // Ensure that the call to peekPrevious() resulted in no iteration (i.e. still pointing to the 2nd element) XCTAssertEqual(sequenceArray[1], sequence.currentValue) // Any further calls should result in the same value being produced (i.e. first element). for _ in 1...5 { XCTAssertEqual(previous, sequenceArray.first) // Ensure sequence is still pointing to the second element (i.e. no iteration). XCTAssertEqual(sequenceArray[1], sequence.currentValue) } } func testPeekPrevious_iterateBackwardsFromTheEnd() { sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for _ in 0..<sequenceArray.count { _ = sequence.next(repeatMode: .off) } // Ensure sequence is pointing to the last element. XCTAssertEqual(sequenceArray.last, sequence.currentValue) // Iterate backwards var cursor: Int = sequenceArray.count - 1 while cursor > 0 { // Ensure sequence is pointing to the element at index = cursor. XCTAssertEqual(sequenceArray[cursor], sequence.currentValue) // Then test peekPrevious(). let previous = sequence.peekPrevious() XCTAssertNotNil(previous) XCTAssertEqual(previous, sequenceArray[cursor - 1]) // Call previous() to actually iterate one element back. _ = sequence.previous() cursor.decrement() } } // MARK: peekNext() tests --------------------------------------------------------------------------------------- func testPeekNext_noSequence() { // Ensure sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // peekNext() should produce nil, even with repeated calls // No iteration should take place. for _ in 1...5 { XCTAssertNil(sequence.peekNext()) XCTAssertNil(sequence.currentValue) } } func testPeekNext_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure sequence is not pointing to any element (i.e. no iteration), because it has not been started. XCTAssertNil(sequence.currentValue) // peekNext() should produce the first element, even with repeated calls. for _ in 1...5 { XCTAssertEqual(sequenceArray.first, sequence.peekNext()) // Ensure sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testPeekNext_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure sequence is now pointing to the first element. XCTAssertEqual(sequenceArray.first, sequence.currentValue) for _ in 1...5 { // peekNext() should produce the second element, even with repeated calls. XCTAssertEqual(sequenceArray[1], sequence.peekNext()) // Ensure sequence is still pointing to the first element (i.e. no iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testPeekNext_atSecondLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Ensure sequence is not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) // Iterate to the second-last element. for index in 0..<(sequenceArrayCount - 1) { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the second-last element (i.e. iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) // peekNext() should produce the last element, even with repeated calls. for _ in 1...5 { XCTAssertEqual(sequenceArray.last, sequence.peekNext()) // Ensure sequence is still pointing to the second-last element (i.e. no iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) } } func testPeekNext_atLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // peekNext() should always produce nil, even with repeated calls. for _ in 1...5 { XCTAssertNil(sequence.peekNext()) // Ensure sequence is still pointing to the last element (i.e. no iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } } // MARK: hasPrevious tests --------------------------------------------------------------------------------------- func testHasPrevious_noSequence() { // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // hasPrevious should produce false when there is no sequence. // Calling hasPrevious multiple times here should always produce the same result. for _ in 1...5 { XCTAssertFalse(sequence.hasPrevious) // Ensure that the sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testHasPrevious_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure that the sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // Calling hasPrevious multiple times here should always produce the same result. for _ in 1...5 { // No previous element available when sequence has not started. XCTAssertFalse(sequence.hasPrevious) // Also verify that no iteration was performed (i.e. still not pointing to any element). XCTAssertNil(sequence.currentValue) } } func testHasPrevious_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure that the sequence points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) // Calling hasPrevious multiple times here should always produce the same result. for _ in 1...5 { // When pointing to the first element, there should be no previous element. XCTAssertFalse(sequence.hasPrevious) // Ensure that the calls to hasPrevious did not result in any iteration (i.e. it still points to the first element). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testHasPrevious_atSecondElement() { sequence.resizeAndReshuffle(size: 10) // Iterate to the 2nd element. XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[0]) XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[1]) // Ensure sequence is pointing to the second element. XCTAssertEqual(sequenceArray[1], sequence.currentValue) // Any further calls should result in the same value being produced (i.e. true). for _ in 1...5 { XCTAssertTrue(sequence.hasPrevious) // Ensure sequence is still pointing to the second element (i.e. no iteration). XCTAssertEqual(sequenceArray[1], sequence.currentValue) } } func testHasPrevious_iterateBackwardsFromTheEnd() { sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for _ in 0..<sequenceArray.count { _ = sequence.next(repeatMode: .off) } // Ensure sequence is pointing to the last element. XCTAssertEqual(sequenceArray.last, sequence.currentValue) // Iterate backwards var cursor: Int = sequenceArray.count - 1 while cursor > 0 { // Ensure sequence is pointing to the element at index = cursor. XCTAssertEqual(sequenceArray[cursor], sequence.currentValue) // Then test hasPrevious. XCTAssertTrue(sequence.hasPrevious) // Call previous() to actually iterate one element back. _ = sequence.previous() cursor.decrement() } } // MARK: hasNext tests --------------------------------------------------------------------------------------- func testHasNext_noSequence() { // Ensure sequence is not pointing to any element. XCTAssertNil(sequence.currentValue) // hasNext should produce false, even with repeated calls // No iteration should take place. for _ in 1...5 { XCTAssertFalse(sequence.hasNext) XCTAssertNil(sequence.currentValue) } } func testHasNext_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure sequence is not pointing to any element (i.e. no iteration), because it has not been started. XCTAssertNil(sequence.currentValue) // hasNext should return true when sequence has not started, even with repeated calls. for _ in 1...5 { XCTAssertTrue(sequence.hasNext) // Ensure sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testHasNext_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure sequence is now pointing to the first element. XCTAssertEqual(sequenceArray.first, sequence.currentValue) for _ in 1...5 { // hasNext should produce true, even with repeated calls. XCTAssertTrue(sequence.hasNext) // Ensure sequence is still pointing to the first element (i.e. no iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testHasNext_atSecondLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Ensure sequence is not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) // Iterate to the second-last element. for index in 0..<(sequenceArrayCount - 1) { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the second-last element (i.e. iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) // hasNext should produce true, even with repeated calls. for _ in 1...5 { XCTAssertTrue(sequence.hasNext) // Ensure sequence is still pointing to the second-last element (i.e. no iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) } } func testHasNext_atLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // hasNext should always produce false, even with repeated calls. for _ in 1...5 { XCTAssertFalse(sequence.hasNext) // Ensure sequence is still pointing to the last element (i.e. no iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } } // MARK: hasEnded tests --------------------------------------------------------------------------------------- func testHasEnded_noSequence() { // An empty sequence is never considered to have started or ended. XCTAssertFalse(sequence.hasEnded) } func testHasEnded_sequenceNotStarted() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 10) // Ensure sequence is not pointing to any element (i.e. no iteration), because it has not been started. XCTAssertNil(sequence.currentValue) // hasEnded should return false when sequence has not started, even with repeated calls. for _ in 1...5 { XCTAssertFalse(sequence.hasEnded) // Ensure sequence is still not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) } } func testHasEnded_atFirstElement() { // Create and start the sequence. sequence.resizeAndReshuffle(size: 10, startWith: 5) // Ensure sequence is now pointing to the first element. XCTAssertEqual(sequenceArray.first, sequence.currentValue) for _ in 1...5 { // hasEnded should produce false, even with repeated calls. XCTAssertFalse(sequence.hasEnded) // Ensure sequence is still pointing to the first element (i.e. no iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } func testHasEnded_atSecondLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Ensure sequence is not pointing to any element (i.e. no iteration). XCTAssertNil(sequence.currentValue) // Iterate to the second-last element. for index in 0..<(sequenceArrayCount - 1) { XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) // hasEnded should produce false, throughout the loop. XCTAssertFalse(sequence.hasEnded) } // Ensure sequence is now pointing to the second-last element (i.e. iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) // hasEnded should still produce false, even with repeated calls. for _ in 1...5 { XCTAssertFalse(sequence.hasEnded) // Ensure sequence is still pointing to the second-last element (i.e. no iteration). XCTAssertEqual(sequenceArray[sequenceArrayCount - 2], sequence.currentValue) } } func testHasEnded_atLastElement() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { // hasEnded should produce false, throughout the loop. XCTAssertFalse(sequence.hasEnded) XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // hasEnded should now produce true, even with repeated calls, because sequence is now pointing to the last element. for _ in 1...5 { XCTAssertTrue(sequence.hasEnded) // Ensure sequence is still pointing to the last element (i.e. no iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } } func testHasEnded_atLastElement_afterReshuffle() { // Create but don't start the sequence. sequence.resizeAndReshuffle(size: 1000) // Iterate to the last element. for index in 0..<sequenceArrayCount { // hasEnded should produce false, throughout the loop. XCTAssertFalse(sequence.hasEnded) XCTAssertEqual(sequence.next(repeatMode: .off), sequenceArray[index]) } // Ensure sequence is now pointing to the last element (i.e. iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) // hasEnded should now produce true, even with repeated calls, because sequence is now pointing to the last element. for _ in 1...5 { XCTAssertTrue(sequence.hasEnded) // Ensure sequence is still pointing to the last element (i.e. no iteration). XCTAssertEqual(sequenceArray.last, sequence.currentValue) } // Trigger a sequence reshuffle by calling next() with repeatMode = .all (this will cause the creation of a new sequence) XCTAssertNotNil(sequence.next(repeatMode: .all)) // Ensure sequence is pointing to the first element of the new sequence (i.e. iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) // Now, hasEnded should produce false, as a new sequence has been created. for _ in 1...5 { XCTAssertFalse(sequence.hasEnded) // Ensure sequence is still pointing to the first element of the new sequence (i.e. no iteration). XCTAssertEqual(sequenceArray.first, sequence.currentValue) } } }
38.22659
131
0.595748
742c272b1e7c3eaa3d43c360c91dd4e43cf0ffe2
236
h
C
Classes/NSData+Golf.h
guofengtd/GolfTools
d5d3750fb639261dfdcd841e898f8f23c7efd31a
[ "MIT" ]
null
null
null
Classes/NSData+Golf.h
guofengtd/GolfTools
d5d3750fb639261dfdcd841e898f8f23c7efd31a
[ "MIT" ]
null
null
null
Classes/NSData+Golf.h
guofengtd/GolfTools
d5d3750fb639261dfdcd841e898f8f23c7efd31a
[ "MIT" ]
null
null
null
// // NSData+Golf.h // GolfTools // // Created by 熊国锋 on 2021/7/30. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface NSData (Golf) - (NSString *)md5; - (NSString *)stringSize; @end NS_ASSUME_NONNULL_END
11.238095
33
0.690678
bd77147982b7a0d39e1e976c80d68d89919cc613
789
kt
Kotlin
app/src/main/java/com/vinzaceto/mvvmtest/utils/BindingAdapter.kt
vinzaceto/mvvmtest
7fa787e5ab6d73b35386a52ae051fd95041c6712
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/vinzaceto/mvvmtest/utils/BindingAdapter.kt
vinzaceto/mvvmtest
7fa787e5ab6d73b35386a52ae051fd95041c6712
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/vinzaceto/mvvmtest/utils/BindingAdapter.kt
vinzaceto/mvvmtest
7fa787e5ab6d73b35386a52ae051fd95041c6712
[ "Apache-2.0" ]
null
null
null
package com.vinzaceto.mvvmtest.utils import android.arch.lifecycle.MutableLiveData import android.arch.lifecycle.Observer import android.databinding.BindingAdapter import android.support.v7.app.AppCompatActivity import android.view.View import com.vinzaceto.mvvmtest.utils.extension.getParentActivity /** * NTT Data Italia S.p.A. * File created on 19/02/2019. * * @author Vincenzo Aceto - vincenzo.aceto@nttdata.com * @version 1.0 */ @BindingAdapter("mutableVisibility") fun setMutableVisibility(view: View, visibility: MutableLiveData<Int>?) { val parentActivity: AppCompatActivity? = view.getParentActivity() if(parentActivity != null && visibility != null) { visibility.observe(parentActivity, Observer { value -> view.visibility = value?:View.VISIBLE}) } }
32.875
102
0.768061
67e8ad20cd02249fa0bc1090642ec3a44eaf9ba3
677
sql
SQL
src/main/resources/org/docksidestage/mysql/dbflute/exbhv/whitebox/vendorcheck/VendorCheckBhv_selectUnionVendorCheck.sql
dbflute-test/dbflute-test-dbms-mysql
438a68f2effef426fdcb9e2ff018f2a093a8478e
[ "Apache-2.0" ]
null
null
null
src/main/resources/org/docksidestage/mysql/dbflute/exbhv/whitebox/vendorcheck/VendorCheckBhv_selectUnionVendorCheck.sql
dbflute-test/dbflute-test-dbms-mysql
438a68f2effef426fdcb9e2ff018f2a093a8478e
[ "Apache-2.0" ]
null
null
null
src/main/resources/org/docksidestage/mysql/dbflute/exbhv/whitebox/vendorcheck/VendorCheckBhv_selectUnionVendorCheck.sql
dbflute-test/dbflute-test-dbms-mysql
438a68f2effef426fdcb9e2ff018f2a093a8478e
[ "Apache-2.0" ]
null
null
null
/* [df:title] Union Vendor Check Select [df:description] The SQL select several types with union. */ -- #df:entity# -- !df:pmb! select vendor.VENDOR_CHECK_ID , vendor.TYPE_OF_TEXT , vendor.TYPE_OF_NUMERIC_DECIMAL , vendor.TYPE_OF_NUMERIC_INTEGER , vendor.TYPE_OF_NUMERIC_BIGINT , vendor.TYPE_OF_BOOLEAN , vendor.TYPE_OF_BLOB from VENDOR_CHECK vendor union select vendor.VENDOR_CHECK_ID , vendor.TYPE_OF_TEXT , vendor.TYPE_OF_NUMERIC_DECIMAL , vendor.TYPE_OF_NUMERIC_INTEGER , vendor.TYPE_OF_NUMERIC_BIGINT , vendor.TYPE_OF_BOOLEAN , vendor.TYPE_OF_BLOB from VENDOR_CHECK vendor
24.178571
42
0.704579
c459183553bba34ce74bd9523171eb8a63b2855e
3,049
c
C
release/src-rt-6.x/linux/linux-2.6/arch/mips/brcm-boards/bcm947xx/gpio.c
ghsecuritylab/tomato-sabai
9027a38297d32e97dd386499cca4a583e25d1f9d
[ "Apache-2.0" ]
278
2015-11-03T03:01:20.000Z
2022-01-20T18:21:05.000Z
release/src-rt-6.x/linux/linux-2.6/arch/mips/brcm-boards/bcm947xx/gpio.c
kerpz/tomato
60d3c74ab93d43d0e6a22f56f0876c0180c5c7d3
[ "FSFAP" ]
374
2015-11-03T12:37:22.000Z
2021-12-17T14:18:08.000Z
release/src-rt-6.x/linux/linux-2.6/arch/mips/brcm-boards/bcm947xx/gpio.c
kerpz/tomato
60d3c74ab93d43d0e6a22f56f0876c0180c5c7d3
[ "FSFAP" ]
96
2015-11-22T07:47:26.000Z
2022-01-20T19:52:19.000Z
/* * GPIO char driver * * Copyright (C) 2009, Broadcom Corporation * All Rights Reserved. * * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. * * $Id: gpio.c,v 1.5 2008/04/03 03:49:45 Exp $ */ #include <linux/module.h> #include <linux/init.h> #include <linux/fs.h> #include <linux/miscdevice.h> #include <asm/uaccess.h> #include <typedefs.h> #include <bcmutils.h> #include <siutils.h> #include <bcmdevs.h> static si_t *gpio_sih; static int gpio_major; static devfs_handle_t gpio_dir; static struct { char *name; devfs_handle_t handle; } gpio_file[] = { { "in", NULL }, { "out", NULL }, { "outen", NULL }, { "control", NULL } }; static int gpio_open(struct inode *inode, struct file * file) { if (MINOR(inode->i_rdev) > ARRAYSIZE(gpio_file)) return -ENODEV; MOD_INC_USE_COUNT; return 0; } static int gpio_release(struct inode *inode, struct file * file) { MOD_DEC_USE_COUNT; return 0; } static ssize_t gpio_read(struct file *file, char *buf, size_t count, loff_t *ppos) { u32 val; switch (MINOR(file->f_dentry->d_inode->i_rdev)) { case 0: val = si_gpioin(gpio_sih); break; case 1: val = si_gpioout(gpio_sih, 0, 0); break; case 2: val = si_gpioouten(gpio_sih, 0, 0); break; case 3: val = si_gpiocontrol(gpio_sih, 0, 0); break; default: return -ENODEV; } if (put_user(val, (u32 *) buf)) return -EFAULT; return sizeof(val); } static ssize_t gpio_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { u32 val; if (get_user(val, (u32 *) buf)) return -EFAULT; switch (MINOR(file->f_dentry->d_inode->i_rdev)) { case 0: return -EACCES; case 1: si_gpioout(gpio_sih, ~0, val); break; case 2: si_gpioouten(gpio_sih, ~0, val); break; case 3: si_gpiocontrol(gpio_sih, ~0, val); break; default: return -ENODEV; } return sizeof(val); } static struct file_operations gpio_fops = { owner: THIS_MODULE, open: gpio_open, release: gpio_release, read: gpio_read, write: gpio_write, }; static int __init gpio_init(void) { int i; if (!(gpio_sih = si_kattach(SI_OSH))) return -ENODEV; si_gpiosetcore(gpio_sih); if ((gpio_major = devfs_register_chrdev(0, "gpio", &gpio_fops)) < 0) return gpio_major; gpio_dir = devfs_mk_dir(NULL, "gpio", NULL); for (i = 0; i < ARRAYSIZE(gpio_file); i++) { gpio_file[i].handle = devfs_register(gpio_dir, gpio_file[i].name, DEVFS_FL_DEFAULT, gpio_major, i, S_IFCHR | S_IRUGO | S_IWUGO, &gpio_fops, NULL); } return 0; } static void __exit gpio_exit(void) { int i; for (i = 0; i < ARRAYSIZE(gpio_file); i++) devfs_unregister(gpio_file[i].handle); devfs_unregister(gpio_dir); devfs_unregister_chrdev(gpio_major, "gpio"); si_detach(gpio_sih); } module_init(gpio_init); module_exit(gpio_exit);
18.820988
77
0.683831
0cd6ed4cd564901c9d6e6419361c7b61b1d56dfb
120
py
Python
CF_Functions/Arcade/WordPower.py
glickmac/Misc_Scripts
7e18be79b84a309a1e79935f4470ea915141938d
[ "MIT" ]
null
null
null
CF_Functions/Arcade/WordPower.py
glickmac/Misc_Scripts
7e18be79b84a309a1e79935f4470ea915141938d
[ "MIT" ]
null
null
null
CF_Functions/Arcade/WordPower.py
glickmac/Misc_Scripts
7e18be79b84a309a1e79935f4470ea915141938d
[ "MIT" ]
1
2020-07-30T17:37:12.000Z
2020-07-30T17:37:12.000Z
def wordPower(word): num = dict(zip(string.ascii_lowercase, range(1,27))) return sum([num[ch] for ch in word])
24
56
0.666667
56c84693fb28b4b4835199d7d553f8f34180d36b
1,436
ts
TypeScript
src/app/workplans/workplans-list/workplans-list.component.ts
FlorinMC/form-builder
40f0dabc2b7f2e58e53f739e09f002e3749fbac3
[ "MIT" ]
null
null
null
src/app/workplans/workplans-list/workplans-list.component.ts
FlorinMC/form-builder
40f0dabc2b7f2e58e53f739e09f002e3749fbac3
[ "MIT" ]
null
null
null
src/app/workplans/workplans-list/workplans-list.component.ts
FlorinMC/form-builder
40f0dabc2b7f2e58e53f739e09f002e3749fbac3
[ "MIT" ]
null
null
null
import { HttpResponse } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs/Rx'; import 'rxjs/add/operator/map'; import { WebApiService } from '../../shared/services/web-api.service'; import { Workplan } from '../workplan/workplan.model'; import { WorkplansListService } from './workplans-list.service'; @Component({ selector: 'app-workplans-list', templateUrl: 'workplans-list.component.html', styleUrls: ['./workplans-list.component.scss'], }) export class WorkplansListComponent implements OnInit { public workplansList: Workplan[]; public workplans: Observable<HttpResponse<Workplan[]>> = null; constructor( private workplansListService: WorkplansListService, private webApiService: WebApiService, ) { } public ngOnInit(): void { this.getWorkplansListItems(); } private getWorkplansListItems(): void { this.workplans = Observable.fromPromise(this.workplansListService.getWorkplansList()); this.workplans.subscribe(async (resp: HttpResponse<Workplan[]>) => { const response: HttpResponse<Workplan[]> = await resp; if (response) { const workplansList: Workplan[] = response && response.body; this.workplansList = workplansList.map((workplan: Workplan): Workplan => { return workplan; }); } }, (err: Error) => { this.webApiService.checkErrorFault(err); }); } }
33.395349
90
0.69429
577815f078e52274c4ad804a6738b76fcbf9e085
340
h
C
Chapter4_StructureFromMotion/AbstractFeatureMatcher.h
nic-c-cc-txt/code-master
97f4f1da5f27b2af4d2faee51436ecdaef662a24
[ "MIT" ]
54
2017-05-16T02:28:16.000Z
2021-11-19T14:03:53.000Z
Chapter4_StructureFromMotion/AbstractFeatureMatcher.h
nic-c-cc-txt/code-master
97f4f1da5f27b2af4d2faee51436ecdaef662a24
[ "MIT" ]
3
2017-05-18T19:11:24.000Z
2020-11-05T08:59:25.000Z
Chapter02/AbstractFeatureMatcher.h
Pandinosaurus/Mastering-OpenCV3-Second-Edition
3347366025d7551f42eb55940aac629629000d42
[ "MIT" ]
35
2017-05-21T17:59:43.000Z
2021-04-22T22:20:22.000Z
/* * AbstractFeatureMatcher.h * SfMToyExample * * Created by Roy Shilkrot on 8/6/12. * Copyright 2012 MIT. All rights reserved. * */ #pragma once #include "IFeatureMatcher.h" class AbstractFeatureMatcher : public IFeatureMatcher { protected: bool use_gpu; public: AbstractFeatureMatcher(bool _use_gpu):use_gpu(_use_gpu) {} };
18.888889
59
0.738235
1f6188273257752c0a206f80cce52906a5078d84
729
css
CSS
src/index.css
chaughawout/unit-cards
7bd35d33325ddaae1468d84cd145ddc210e9dc22
[ "MIT" ]
13
2019-02-05T08:42:36.000Z
2022-02-22T14:45:30.000Z
src/index.css
chaughawout/unit-cards
7bd35d33325ddaae1468d84cd145ddc210e9dc22
[ "MIT" ]
18
2019-02-05T08:45:15.000Z
2022-02-22T14:46:58.000Z
src/index.css
chaughawout/unit-cards
7bd35d33325ddaae1468d84cd145ddc210e9dc22
[ "MIT" ]
9
2019-07-31T21:52:42.000Z
2022-02-11T03:08:35.000Z
body { margin: 0; padding: 0; font-family: 'PT Serif', serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } *, *:before, *:after { box-sizing: border-box; } @media only screen and (min-width: 768px) { .col-md-6 { width: 50%; } } .text-right { text-align: right; } .pad-right { padding-right: 20px; } .text-transform-none { text-transform: none !important; } h1 { margin: 0 0 10px; color: #b33320; } h1 small { font-size: 50%; } .image-section { text-align: center; } .image-section canvas { margin-top: 15px; } .card { margin-bottom: 15px; } .saved-units { margin-top: 15px; } .list-group-item { padding: 5px 10px; line-height: 30px; overflow: hidden; }
14.294118
43
0.631001
8ef78f37e2a972a471f60d4ad37bcbab6de8f718
320
rb
Ruby
lib/generators/parse_resource/model/templates/model.rb
siegfried/parse_resource_rails
e2d6464f29e76493aeefd360778ae7ac83a26154
[ "MIT" ]
2
2015-02-02T17:27:32.000Z
2015-09-01T04:49:19.000Z
lib/generators/parse_resource/model/templates/model.rb
siegfried/parse_resource_rails
e2d6464f29e76493aeefd360778ae7ac83a26154
[ "MIT" ]
1
2016-08-22T12:20:37.000Z
2016-08-22T12:20:37.000Z
lib/generators/parse_resource/model/templates/model.rb
siegfried/parse_resource_rails
e2d6464f29e76493aeefd360778ae7ac83a26154
[ "MIT" ]
null
null
null
<% module_namespacing do -%> class <%= class_name %> < ParseResource::Base <% attributes.reject{ |attr| attr.reference? }.each do |attribute| -%> field :<%= attribute.name %> <% end -%> <% attributes.select{ |attr| attr.reference? }.each do |attribute| -%> belongs_to :<%= attribute.name%> <% end -%> end <% end -%>
29.090909
70
0.628125
2e057285c790dcd5181be5ebdc346ea6f1133084
2,529
kt
Kotlin
dalesbred/src/test/kotlin/org/dalesbred/DatabaseGeneratedKeysTest.kt
globalbus/dalesbred
649f938ae8de34a4b19b426fa356235ef0e75fa9
[ "MIT" ]
57
2015-03-28T05:28:51.000Z
2022-02-15T22:09:23.000Z
dalesbred/src/test/kotlin/org/dalesbred/DatabaseGeneratedKeysTest.kt
globalbus/dalesbred
649f938ae8de34a4b19b426fa356235ef0e75fa9
[ "MIT" ]
45
2015-04-24T12:08:00.000Z
2021-12-03T07:36:15.000Z
dalesbred/src/test/kotlin/org/dalesbred/DatabaseGeneratedKeysTest.kt
globalbus/dalesbred
649f938ae8de34a4b19b426fa356235ef0e75fa9
[ "MIT" ]
20
2015-04-16T13:00:44.000Z
2021-03-22T05:20:32.000Z
/* * Copyright (c) 2017 Evident Solutions Oy * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package org.dalesbred import org.dalesbred.result.ResultSetProcessor import org.dalesbred.testutils.mapRows import org.junit.Rule import org.junit.Test import java.sql.ResultSet import kotlin.test.assertEquals class DatabaseGeneratedKeysTest { private val db = TestDatabaseProvider.createInMemoryHSQLDatabase() @get:Rule val rule = TransactionalTestsRule(db) @Test fun updateWithGeneratedKeys() { db.update("drop table if exists my_table") db.update("create temporary table my_table (id identity primary key, my_text varchar(100))") val keys = db.updateAndProcessGeneratedKeys(CollectKeysResultSetProcessor, listOf("ID"), "insert into my_table (my_text) values ('foo'), ('bar'), ('baz')") assertEquals(listOf(0, 1, 2), keys) } @Test fun updateWithGeneratedKeysWithDefaultColumnNames() { db.update("drop table if exists my_table") db.update("create temporary table my_table (id identity primary key, my_text varchar(100))") val keys = db.updateAndProcessGeneratedKeys(CollectKeysResultSetProcessor, emptyList(), "insert into my_table (my_text) values ('foo'), ('bar'), ('baz')") assertEquals(listOf(0, 1, 2), keys) } private object CollectKeysResultSetProcessor : ResultSetProcessor<List<Int>> { override fun process(resultSet: ResultSet) = resultSet.mapRows { it.getInt((1)) } } }
41.459016
163
0.738632
f430a83eab882a42031452566a71bbe4ba9f03b1
655
kt
Kotlin
src/main/kotlin/com/redgrapefruit/cryonic/core/profiles.kt
RedGrapefruit09/Utopia
9f5520ded57cb4a10c07f5fe3e1c24e3bd023380
[ "MIT" ]
2
2021-06-25T13:55:12.000Z
2021-08-22T09:18:51.000Z
src/main/kotlin/com/redgrapefruit/cryonic/core/profiles.kt
RedGrapefruit09/Utopia
9f5520ded57cb4a10c07f5fe3e1c24e3bd023380
[ "MIT" ]
1
2021-06-25T12:35:22.000Z
2021-06-25T12:35:22.000Z
src/main/kotlin/com/redgrapefruit/cryonic/core/profiles.kt
RedGrapefruit09/Utopia
9f5520ded57cb4a10c07f5fe3e1c24e3bd023380
[ "MIT" ]
1
2021-07-13T19:23:44.000Z
2021-07-13T19:23:44.000Z
package com.redgrapefruit.cryonic.core /** * Minimal loss of ticks to compensate. * * Used to avoid packet delays and random glitches */ const val MIN_TICK_LOSS: Long = 20L /** * Contains changed-at-runtime values of food type */ data class FoodProfile( var rotProgress: Int = 0, var overdueProgress: Int = 0, var previousTick: Long = 0L, var isInitialized: Boolean = false, var fridgeState: FridgeState = FridgeState.NOT_IN_FRIDGE ) /** * Contains changed-at-runtime values of drink type */ data class DrinkProfile( var rancidProgress: Int = 0, var previousTick: Long = 0L, var isInitialized: Boolean = false )
22.586207
60
0.705344
957d3853156c8f9210bb6675d47a429f779cea98
31,810
css
CSS
xv.css
smartergiving/irs-990-viewer
13b6897d251a71e8a2192e6df64bd4bc19f775b8
[ "MIT" ]
null
null
null
xv.css
smartergiving/irs-990-viewer
13b6897d251a71e8a2192e6df64bd4bc19f775b8
[ "MIT" ]
4
2016-11-10T22:32:35.000Z
2020-01-10T20:26:07.000Z
xv.css
smartergiving/irs-990-viewer
13b6897d251a71e8a2192e6df64bd4bc19f775b8
[ "MIT" ]
null
null
null
/* - Default - */ @charset "utf-8"; html { color: #000; background: #FFF } body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { margin: 0; padding: 0 } table { border-collapse: collapse; border-spacing: 0 } fieldset, img { border: 0 } address, caption, cite, code, dfn, em, strong, th, var { font-style: normal; font-weight: normal } li { list-style: none } caption, th { text-align: left } h1, h2, h3, h4, h5, h6 { font-size: 100%; font-weight: normal } q:before, q:after { content: '' } abbr, acronym { border: 0; font-variant: normal } sup { vertical-align: text-top } sub { vertical-align: text-bottom } input, textarea, select { font-family: inherit; font-size: inherit; font-weight: inherit } input, textarea, select { *font-size: 100% } legend { color: #000 } body { font-family: 'Lucida Grande', arial, sans-serif; font-size: 14px } .xv-source-pane { position: absolute; top: 37px; bottom: 0; left: 0; right: 0; overflow: auto } .xv-source-pane-inner { position: relative; padding: 10px; padding-left: 0 } .xv-source-xml { display: none } #xv-source-data { display: none } .xv-error { position: absolute; left: 50%; top: 100px; width: 30em; padding: 20px; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; border: 1px solid #ccc; margin-left: -15em; font-size: 15px; color: #c00; line-height: 1.5; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); -ms-box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); box-shadow: 0 0 10px rgba(0, 0, 0, 0.3) } .xv-error h2 { font-size: 20px; margin-bottom: 1em } .xv-error-state .xv-source-pane, .xv-error-state .xv-search-panel { display: none } .xv-drag-image { position: absolute; left: 0; top: 0; z-index: 1 } .xv-dnd-tooltip { padding: 2px 5px 3px 5px; color: #fff; font-family: "Lucida Grande", sans-serif; position: absolute; display: inline-block; font-size: 11px !important; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; background: #000; opacity: .8; z-index: 1; white-space: nowrap; top: -2em; left: 0; text-shadow: none !important } .xv-dnd-tooltip:after { display: inline-block; content: '.'; text-indent: -2em; overflow: hidden; position: absolute; width: 6px; height: 6px; top: 100%; left: 10px; margin-top: -3px; background: #000; z-index: -1; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -o-transform: rotate(45deg); -ms-transform: rotate(45deg) } .xv-dnd-tooltip-hidden { visibility: hidden } .xv-draggable { -webkit-user-drag: element } .xv-options-href { position: absolute; right: 10px; top: 50%; margin-top: -0.6em; line-height: 1.2; font-size: 10px; color: #777; text-shadow: 0 1px 0 #fff } .xv-node { padding: .25em 0 .2em 15px; font-family: 'Consolas', 'DejaVu Sans Mono', monospace; position: relative; display: block } .xv-tag.hover { background: #fefcf1; border-color: #f2c202 } .xv-tag.selected>.xv-tag-open, .xv-tag.selected>.xv-tag-close { background: #e7e7e7 } .xv-tag.selected>.xv-tag-open .xv-tag-name, .xv-tag.selected>.xv-tag-close .xv-tag-name { background: transparent } .xv-tag-open, .xv-tag-close { color: #5fafef; display: inline-block; padding: 0 3px; white-space: nowrap; position: relative; border: 1px solid transparent; -webkit-border-radius: 1em; -moz-border-radius: .8em; border-radius: .8em } .xv-tag-name { color: #2f6f9f; background-color: #f4faff } .xv-attr { color: #4f9fcf; position: relative } .xv-attr-name { color: #4f9fcf } .xv-attr-value { color: #d44950 } .xv-text { color: #000; padding-left: 20px; display: block } .xv-tag-switcher { display: inline-block; width: 10px; height: 1em; margin-right: -10px; margin-left: -0.9em; margin-top: .15em; cursor: pointer; position: absolute; visibility: hidden } .xv-tag-switcher:before { content: '▼'; color: #7d7d7d; position: absolute; font-size: 10px } .xv-tag-switcher-shortcut { display: inline-block; width: 10px; height: 1em; margin-right: -10px; margin-left: -0.9em; margin-top: .15em; cursor: pointer; position: absolute; } .xv-tag-switcher-shortcut:before { /* content: '◉'; */ color: #7d7d7d; position: absolute; font-size: 10px } .xv-node:hover>.xv-tag-switcher { visibility: visible } .xv-collapsed>.xv-tag-switcher { visibility: visible !important } .xv-collapsed>.xv-tag-switcher:before { content: '▶' } .xv-collapsed>.xv-tag, .xv-collapsed>.xv-text, .xv-collapsed>.xv-tag-children, .xv-collapsed>.xv-tag-close { display: none } .xv-collapsed>.xv-tag-open, .xv-collapsed.xv-comment>.xv-comment-start { background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#fbf0c3), to(#f7e683)) !important; background-image: -moz-linear-gradient(top, #fbf0c3, #f7e683); background-color: #f7e683 !important; color: #b89946 !important; text-shadow: 0 1px 0 #fcf4d2; border-color: #fcee9e #fae089 #f8d36e #fae28c } .xv-collapsed>.xv-tag-open>.xv-tag-name, .xv-collapsed>.xv-tag-open>.xv-attr, .xv-collapsed>.xv-tag-open>.xv-attr>.xv-attr-name, .xv-collapsed>.xv-tag-open>.xv-attr>.xv-attr-value { color: inherit; background: 0 } .xv-marked>.xv-tag-open { background: #ebf2fb; -webkit-border-radius: 5px; -moz-border-radius: 5px } .xv-one-line>.xv-tag-open, .xv-one-line>.xv-tag-close, .xv-one-line>.xv-text { display: inline } .xv-one-line>.xv-tag-children>.xv-text { padding-left: 0; display: inline } .xv-one-line>.xv-tag-switcher { display: none } .xv-comment { color: #ccc } .xv-comment-value, .xv-cdata-value { display: block; padding-left: 15px } .xv-comment-start { padding: 0 3px; border: 1px solid transparent; -webkit-border-radius: 1em; -moz-border-radius: .8em; border-radius: .8em } .xv-collapsed>.xv-comment-value, .xv-collapsed>.xv-comment-end, .xv-collapsed>.xv-cdata-value, .xv-collapsed>.xv-cdata-end { display: none } .xv-collapsed>.xv-comment-start:after { content: '... -->' } .xv-one-line>.xv-comment-value, .xv-one-line>.xv-cdata-value { display: inline; padding-left: 0 } .xv-cdata { color: #5fafef; font-weight: bold } .xv-cdata-start { padding: 0 3px; border: 1px solid transparent; -webkit-border-radius: 1em; -moz-border-radius: .8em; border-radius: .8em } .xv-cdata-value { color: black } .xv-collapsed>.xv-cdata-start:after { content: ']]\u003E' } .xv-pi { font-weight: bold; padding-left: 17px; color: #2f6f9f } .xv-url { color: #1732b4 } .xv-search-panel { position: absolute; left: 0; right: 0; padding: 8px 10px; border-top: 1px solid #ededed; border-bottom: 1px solid #a3a3a3; background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#e5e5e5), to(#d6d6d6)) !important; background-image: -moz-linear-gradient(top left, #e5e5e5, #d6d6d6) !important; background-color: #e5e5e5; font-size: 11px; height: 37px; z-index: 2; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box } .xv-search-field { width: 70%; max-width: 60em; margin-right: 1em } .xv-search-panel .xv-search-result { left: 10px; top: 40px } .xv-search-xpath-result { color: #555; text-shadow: 0 1px 0 #fff; font-weight: bold } .xv-search-xpath-result:before { font-weight: normal; content: 'XPath result: ' } .xv-search-result { position: absolute; background: #fff; background: rgba(255, 255, 255, 0.95); z-index: 10; padding: 2px; border: 1px solid #d2d2d2; zoom: 1; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); -moz-box-shadow: 0 3px 2px rgba(0, 0, 0, 0.1); -ms-box-shadow: 0 3px 2px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1); -webkit-border-top-left-radius: 2px; -moz-border-radius-topleft: 2px; border-top-left-radius: 2px } .xv-search-result-hidden { display: none } .xv-search-result-content { position: relative; overflow: auto; overflow-x: hidden; zoom: 1; min-width: 100px; display: block; list-style: none } .xv-search-result-overflow .xv-search-result-content { padding-right: 2px } .xv-search-result-item { color: #242423; font-family: 'Lucida Grande', arial, sans-serif; font-size: 11px; font-weight: bold; line-height: 20px; padding: 0 4px 1px 4px; cursor: pointer; overflow: hidden; position: relative; white-space: nowrap; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; border-radius: 3px; -webkit-border-top-left-radius: 0; -moz-border-radius-topleft: 0; border-top-left-radius: 0 } .xv-search-result-item em { font-weight: bold; font-style: normal; text-decoration: underline } .xv-search-result-item-selected { background: #7a8da1; background: -webkit-gradient(linear, left top, left bottom, from(#7a8da1), to(#455d75)); background-image: -moz-linear-gradient(top, #7a8da1, #455d75); color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7) } .xv-search-result-xpath { color: #ccc; margin-left: 10px; font-weight: normal; display: inline-block; max-width: 40em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; vertical-align: bottom } .xv-search-result-content::-webkit-scrollbar { width: 9px; height: 9px } .xv-search-result-content::-webkit-scrollbar-track { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAHCAIAAABPxRC5AAAAPElEQVQImVWLwRGAMBCElou5/vuLtQQfPoz8GAbutWb3Ncacs7tLTaJSpVaSJIB7AwXkoE5Rv//X3wt4ACQ3F9lopNWrAAAAAElFTkSuQmCC) transparent 50% 0 repeat-y; -webkit-border-radius: 5px } .xv-search-result-content::-webkit-scrollbar-thumb { -webkit-border-radius: 4px; background: #c5c5c4; background: -webkit-gradient(linear, left top, right top, from(#f9f9f9), to(#e6e6e6)); border: 1px solid #d3d2d2; left: 0; position: absolute; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1) } .xv-outline { position: absolute; top: 37px; bottom: 0; width: 300px; right: 0; overflow: auto; padding-right: 10px; font-family: 'Lucida Grande', arial, sans-serif; background: #f5f5f5; font-size: 11px; border-left: 1px solid #b4b4b4; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box } .xv-outline-wrap { position: relative; min-height: 100% } .xv-outline-header, .xv-shortcut-header, .xv-summary-header { font-weight: bold; text-transform: uppercase; color: #b3b3b3; text-shadow: 0 1px 0 #fff; padding: 10px 15px 0 15px } .xv-outline-close { position: absolute; width: 1.2em; height: 1.2em; line-height: 1; color: #b3b3b3; border: 1px solid #e4e4e4; cursor: pointer; right: 10px; top: 9px; text-align: center; -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px } .xv-outline-close:hover { border-color: #b3b3b3 } .xv-outline-inner, .xv-shortcut-inner, .xv-summary-inner { position: relative; padding: 10px 0; z-index: 1 } .xv-outline-node, .xv-summary-node { font-family: inherit; font-size: 11px; line-height: 16px; display: block; margin: 3px 0 0 0; padding: 0 0 0 15px; white-space: nowrap; overflow: hidden; cursor: default; position: static } .xv-outline-item { position: relative; display: inline-block; margin: 1px 8px 2px 10px; padding: 0 1px 0 2px } .xv-outline-item:before { display: inline-block; content: ''; position: absolute; top: -1px; left: -10px; width: 100%; height: 100%; border-width: 1px 5px 2px 10px } .xv-outline-tag-name { color: #005082; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); background: -webkit-linear-gradient(#e0edf7, #cddef1); background: -moz-linear-gradient(#e0edf7, #cddef1); background: -ms-linear-gradient(#e0edf7, #cddef1); background: -o-linear-gradient(#e0edf7, #cddef1); background: -webkit-gradient(linear, 0 0, 0 100%, from(#e0edf7), to(#cddef1)); background: linear-gradient(#e0edf7, #cddef1) } .xv-outline-tag-name:before { -webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNq8ljtLA0EQx3fvmTSmEoKptVAwhTYpVLAQW0EQBMFC8NsI9oJBEKwsRLAyhQpKEDSGROMDH5hgfMRHkrvL5W7X2UPz4ExSeHd/GOb2ipvf7czOLKaUona6yn5Ng1sHk5AzSoPFwZZ6Q11J9gK3g7jMfjKADVEWeY7jHCFg8YhJkFE1dFgu9oUC0ZYQmccGAJ5DTosSinRNZyDDf0JcPHzMsBSIPncAfmVWTWToxpZgS9j9+yy4Nckn8RhS0KFk/iWO5xGh1bEmiNRdoQEAI+omQb1GAjWI5G1hDtwqA0CwA8T9+JZYHAsicfM2D25F9suup8AGARTCyfVrDQBhbL30UgT+WKA/QSkBw8hzsfjWET3OPFsFyXYD5CmEUlLqHTN+np9izUn2Q2UK3oEoxXJz2z5K5yfBbcKO+AWPQMpFxT47DlNP4+C2JR+AiILbPQKpJeXF1pMjA8EYVOyEpmqlqm5Yx9UtY9+HWLGWA+zgLBcBtwOpCQii6PzRNE2kllUVHgfbjvL9RG6IgUBqukVJdKg5EUQME1W0ignLhZFwTxR3mg97iWw/uF2woMOXmuXRcOi046XGK30LMAA+VQNxLbtsiAAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -moz-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNq8ljtLA0EQx3fvmTSmEoKptVAwhTYpVLAQW0EQBMFC8NsI9oJBEKwsRLAyhQpKEDSGROMDH5hgfMRHkrvL5W7X2UPz4ExSeHd/GOb2ipvf7czOLKaUona6yn5Ng1sHk5AzSoPFwZZ6Q11J9gK3g7jMfjKADVEWeY7jHCFg8YhJkFE1dFgu9oUC0ZYQmccGAJ5DTosSinRNZyDDf0JcPHzMsBSIPncAfmVWTWToxpZgS9j9+yy4Nckn8RhS0KFk/iWO5xGh1bEmiNRdoQEAI+omQb1GAjWI5G1hDtwqA0CwA8T9+JZYHAsicfM2D25F9suup8AGARTCyfVrDQBhbL30UgT+WKA/QSkBw8hzsfjWET3OPFsFyXYD5CmEUlLqHTN+np9izUn2Q2UK3oEoxXJz2z5K5yfBbcKO+AWPQMpFxT47DlNP4+C2JR+AiILbPQKpJeXF1pMjA8EYVOyEpmqlqm5Yx9UtY9+HWLGWA+zgLBcBtwOpCQii6PzRNE2kllUVHgfbjvL9RG6IgUBqukVJdKg5EUQME1W0ignLhZFwTxR3mg97iWw/uF2woMOXmuXRcOi046XGK30LMAA+VQNxLbtsiAAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -o-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNq8ljtLA0EQx3fvmTSmEoKptVAwhTYpVLAQW0EQBMFC8NsI9oJBEKwsRLAyhQpKEDSGROMDH5hgfMRHkrvL5W7X2UPz4ExSeHd/GOb2ipvf7czOLKaUona6yn5Ng1sHk5AzSoPFwZZ6Q11J9gK3g7jMfjKADVEWeY7jHCFg8YhJkFE1dFgu9oUC0ZYQmccGAJ5DTosSinRNZyDDf0JcPHzMsBSIPncAfmVWTWToxpZgS9j9+yy4Nckn8RhS0KFk/iWO5xGh1bEmiNRdoQEAI+omQb1GAjWI5G1hDtwqA0CwA8T9+JZYHAsicfM2D25F9suup8AGARTCyfVrDQBhbL30UgT+WKA/QSkBw8hzsfjWET3OPFsFyXYD5CmEUlLqHTN+np9izUn2Q2UK3oEoxXJz2z5K5yfBbcKO+AWPQMpFxT47DlNP4+C2JR+AiILbPQKpJeXF1pMjA8EYVOyEpmqlqm5Yx9UtY9+HWLGWA+zgLBcBtwOpCQii6PzRNE2kllUVHgfbjvL9RG6IgUBqukVJdKg5EUQME1W0ignLhZFwTxR3mg97iWw/uF2woMOXmuXRcOi046XGK30LMAA+VQNxLbtsiAAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNq8ljtLA0EQx3fvmTSmEoKptVAwhTYpVLAQW0EQBMFC8NsI9oJBEKwsRLAyhQpKEDSGROMDH5hgfMRHkrvL5W7X2UPz4ExSeHd/GOb2ipvf7czOLKaUona6yn5Ng1sHk5AzSoPFwZZ6Q11J9gK3g7jMfjKADVEWeY7jHCFg8YhJkFE1dFgu9oUC0ZYQmccGAJ5DTosSinRNZyDDf0JcPHzMsBSIPncAfmVWTWToxpZgS9j9+yy4Nckn8RhS0KFk/iWO5xGh1bEmiNRdoQEAI+omQb1GAjWI5G1hDtwqA0CwA8T9+JZYHAsicfM2D25F9suup8AGARTCyfVrDQBhbL30UgT+WKA/QSkBw8hzsfjWET3OPFsFyXYD5CmEUlLqHTN+np9izUn2Q2UK3oEoxXJz2z5K5yfBbcKO+AWPQMpFxT47DlNP4+C2JR+AiILbPQKpJeXF1pMjA8EYVOyEpmqlqm5Yx9UtY9+HWLGWA+zgLBcBtwOpCQii6PzRNE2kllUVHgfbjvL9RG6IgUBqukVJdKg5EUQME1W0ignLhZFwTxR3mg97iWw/uF2woMOXmuXRcOi046XGK30LMAA+VQNxLbtsiAAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch } .xv-outline-pi-name { color: #40368f; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); background: -webkit-linear-gradient(#e3e1f7, #d7d1f0); background: -moz-linear-gradient(#e3e1f7, #d7d1f0); background: -ms-linear-gradient(#e3e1f7, #d7d1f0); background: -o-linear-gradient(#e3e1f7, #d7d1f0); background: -webkit-gradient(linear, 0 0, 0 100%, from(#e3e1f7), to(#d7d1f0)); background: linear-gradient(#e3e1f7, #d7d1f0) } .xv-outline-pi-name:before { -webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNrElr9Lw0AUx++Sy6VOdSkWnTroUEQsFUEXwcFVBEEQFAfB/0ZwFyyC4CaI4GRHlYK02lL7Q+1kUepPkKZpcjnftU2hatsliQ8ej0uG+9z3/bjDnHPUy0rFz2UIB+AUOWNZ8AT4dmjUnxYfcC+IUuFDABwSSmUsSY4QiP24ZSFmGHVYboXGBmNdIR7yLQBVcQygA8biyNTrAmTqT4j73PuKSAFRqSsAtlkmE4ock58/7m7fViHsK6oqYwwA3DUGJMEBTc7nOiCK2RYA1ACUS0Mytw0S4W9DFDKvaxD2hAIIFODu79+ujQZEPv2yAWG3CYAR94qg1S0kd11pAvh8nirQoYSddrHAyGMC0SGwpRSeDMQAYF3XaoxBywglPHVxeDv/mavnJTGcqKpSSZY9U6JWraL2JBqPDh0B1SIoopmG+T9K2HaTeJqHcAKzYkAmxPXO0DWt8msmT0wH4/Bzoa7rXwwUadSqS85MoTiPd73AUpflGQinlKp+mSjOd4XFkF7TNHHunld58qIcFSCQmgBRFIfmAlzj4IauM1huRmaGY7jfdEyeP4YhnIEHHX7U7ERmR1J9HzVe2bcAAwDBk19xRcNjtQAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -moz-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNrElr9Lw0AUx++Sy6VOdSkWnTroUEQsFUEXwcFVBEEQFAfB/0ZwFyyC4CaI4GRHlYK02lL7Q+1kUepPkKZpcjnftU2hatsliQ8ej0uG+9z3/bjDnHPUy0rFz2UIB+AUOWNZ8AT4dmjUnxYfcC+IUuFDABwSSmUsSY4QiP24ZSFmGHVYboXGBmNdIR7yLQBVcQygA8biyNTrAmTqT4j73PuKSAFRqSsAtlkmE4ock58/7m7fViHsK6oqYwwA3DUGJMEBTc7nOiCK2RYA1ACUS0Mytw0S4W9DFDKvaxD2hAIIFODu79+ujQZEPv2yAWG3CYAR94qg1S0kd11pAvh8nirQoYSddrHAyGMC0SGwpRSeDMQAYF3XaoxBywglPHVxeDv/mavnJTGcqKpSSZY9U6JWraL2JBqPDh0B1SIoopmG+T9K2HaTeJqHcAKzYkAmxPXO0DWt8msmT0wH4/Bzoa7rXwwUadSqS85MoTiPd73AUpflGQinlKp+mSjOd4XFkF7TNHHunld58qIcFSCQmgBRFIfmAlzj4IauM1huRmaGY7jfdEyeP4YhnIEHHX7U7ERmR1J9HzVe2bcAAwDBk19xRcNjtQAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -o-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNrElr9Lw0AUx++Sy6VOdSkWnTroUEQsFUEXwcFVBEEQFAfB/0ZwFyyC4CaI4GRHlYK02lL7Q+1kUepPkKZpcjnftU2hatsliQ8ej0uG+9z3/bjDnHPUy0rFz2UIB+AUOWNZ8AT4dmjUnxYfcC+IUuFDABwSSmUsSY4QiP24ZSFmGHVYboXGBmNdIR7yLQBVcQygA8biyNTrAmTqT4j73PuKSAFRqSsAtlkmE4ock58/7m7fViHsK6oqYwwA3DUGJMEBTc7nOiCK2RYA1ACUS0Mytw0S4W9DFDKvaxD2hAIIFODu79+ujQZEPv2yAWG3CYAR94qg1S0kd11pAvh8nirQoYSddrHAyGMC0SGwpRSeDMQAYF3XaoxBywglPHVxeDv/mavnJTGcqKpSSZY9U6JWraL2JBqPDh0B1SIoopmG+T9K2HaTeJqHcAKzYkAmxPXO0DWt8msmT0wH4/Bzoa7rXwwUadSqS85MoTiPd73AUpflGQinlKp+mSjOd4XFkF7TNHHunld58qIcFSCQmgBRFIfmAlzj4IauM1huRmaGY7jfdEyeP4YhnIEHHX7U7ERmR1J9HzVe2bcAAwDBk19xRcNjtQAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAcJJREFUeNrElr9Lw0AUx++Sy6VOdSkWnTroUEQsFUEXwcFVBEEQFAfB/0ZwFyyC4CaI4GRHlYK02lL7Q+1kUepPkKZpcjnftU2hatsliQ8ej0uG+9z3/bjDnHPUy0rFz2UIB+AUOWNZ8AT4dmjUnxYfcC+IUuFDABwSSmUsSY4QiP24ZSFmGHVYboXGBmNdIR7yLQBVcQygA8biyNTrAmTqT4j73PuKSAFRqSsAtlkmE4ock58/7m7fViHsK6oqYwwA3DUGJMEBTc7nOiCK2RYA1ACUS0Mytw0S4W9DFDKvaxD2hAIIFODu79+ujQZEPv2yAWG3CYAR94qg1S0kd11pAvh8nirQoYSddrHAyGMC0SGwpRSeDMQAYF3XaoxBywglPHVxeDv/mavnJTGcqKpSSZY9U6JWraL2JBqPDh0B1SIoopmG+T9K2HaTeJqHcAKzYkAmxPXO0DWt8msmT0wH4/Bzoa7rXwwUadSqS85MoTiPd73AUpflGQinlKp+mSjOd4XFkF7TNHHunld58qIcFSCQmgBRFIfmAlzj4IauM1huRmaGY7jfdEyeP4YhnIEHHX7U7ERmR1J9HzVe2bcAAwDBk19xRcNjtQAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch } .xv-outline-cdata-name { color: #105913; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); background: -webkit-linear-gradient(#daf6d7, #cbe7c8); background: -moz-linear-gradient(#daf6d7, #cbe7c8); background: -ms-linear-gradient(#daf6d7, #cbe7c8); background: -o-linear-gradient(#daf6d7, #cbe7c8); background: -webkit-gradient(linear, 0 0, 0 100%, from(#daf6d7), to(#cbe7c8)); background: linear-gradient(#daf6d7, #cbe7c8) } .xv-outline-cdata-name:before { -webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAASCAYAAADVCrdsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZJJREFUeNpi/P//PwM+cPn9hRAgtRSI2RioA64B8Skg7tMVNLgMEmDE5wioA1awsbExMzExUcUFIPv+/fvH8Pv3719AbjrQIQtwOuLSu/NwBwABA7UByCE/f/4EOcQEqyMuvj0XDooCWjkABv78+QMKkU0s6BLnX5+JAlKL2NnZwVFAKM1QAkDmA0PEHsUR516dppsDkNIIP9wRZ1+eigVS8+npAFhCBTvi9PMTCUBqDgcHB10dAEugLKeeHYc7gJGRESxITwAOCZilIA49QwA5JMBZ9PjjI+AECQoNWmZJbODr16+IEvPow0OBoMIJ6BA2FhYWujniy5cvDPCy2Frebj3QQf7fgQBYgMCjhx4YpUKwUbDfART0ATnk169fNLcclB6A9GuMWslW0WEfUMLtx48fX2jtEKj5+3BWYAfu7LUEUtuBaYSflZWV6mnh79+/DN++ffsOZOrhrcr3395jDHIIsBQVBVZmVMuSIAcAQ/ovkJviqOqygJFQ2QB0iBaQ2gvEElRu1EwEOuACSAAgwABrnbxcf6GNlgAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -moz-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAASCAYAAADVCrdsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZJJREFUeNpi/P//PwM+cPn9hRAgtRSI2RioA64B8Skg7tMVNLgMEmDE5wioA1awsbExMzExUcUFIPv+/fvH8Pv3719AbjrQIQtwOuLSu/NwBwABA7UByCE/f/4EOcQEqyMuvj0XDooCWjkABv78+QMKkU0s6BLnX5+JAlKL2NnZwVFAKM1QAkDmA0PEHsUR516dppsDkNIIP9wRZ1+eigVS8+npAFhCBTvi9PMTCUBqDgcHB10dAEugLKeeHYc7gJGRESxITwAOCZilIA49QwA5JMBZ9PjjI+AECQoNWmZJbODr16+IEvPow0OBoMIJ6BA2FhYWujniy5cvDPCy2Frebj3QQf7fgQBYgMCjhx4YpUKwUbDfART0ATnk169fNLcclB6A9GuMWslW0WEfUMLtx48fX2jtEKj5+3BWYAfu7LUEUtuBaYSflZWV6mnh79+/DN++ffsOZOrhrcr3395jDHIIsBQVBVZmVMuSIAcAQ/ovkJviqOqygJFQ2QB0iBaQ2gvEElRu1EwEOuACSAAgwABrnbxcf6GNlgAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; -o-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAASCAYAAADVCrdsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZJJREFUeNpi/P//PwM+cPn9hRAgtRSI2RioA64B8Skg7tMVNLgMEmDE5wioA1awsbExMzExUcUFIPv+/fvH8Pv3719AbjrQIQtwOuLSu/NwBwABA7UByCE/f/4EOcQEqyMuvj0XDooCWjkABv78+QMKkU0s6BLnX5+JAlKL2NnZwVFAKM1QAkDmA0PEHsUR516dppsDkNIIP9wRZ1+eigVS8+npAFhCBTvi9PMTCUBqDgcHB10dAEugLKeeHYc7gJGRESxITwAOCZilIA49QwA5JMBZ9PjjI+AECQoNWmZJbODr16+IEvPow0OBoMIJ6BA2FhYWujniy5cvDPCy2Frebj3QQf7fgQBYgMCjhx4YpUKwUbDfART0ATnk169fNLcclB6A9GuMWslW0WEfUMLtx48fX2jtEKj5+3BWYAfu7LUEUtuBaYSflZWV6mnh79+/DN++ffsOZOrhrcr3395jDHIIsBQVBVZmVMuSIAcAQ/ovkJviqOqygJFQ2QB0iBaQ2gvEElRu1EwEOuACSAAgwABrnbxcf6GNlgAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch; border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAASCAYAAADVCrdsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZJJREFUeNpi/P//PwM+cPn9hRAgtRSI2RioA64B8Skg7tMVNLgMEmDE5wioA1awsbExMzExUcUFIPv+/fvH8Pv3719AbjrQIQtwOuLSu/NwBwABA7UByCE/f/4EOcQEqyMuvj0XDooCWjkABv78+QMKkU0s6BLnX5+JAlKL2NnZwVFAKM1QAkDmA0PEHsUR516dppsDkNIIP9wRZ1+eigVS8+npAFhCBTvi9PMTCUBqDgcHB10dAEugLKeeHYc7gJGRESxITwAOCZilIA49QwA5JMBZ9PjjI+AECQoNWmZJbODr16+IEvPow0OBoMIJ6BA2FhYWujniy5cvDPCy2Frebj3QQf7fgQBYgMCjhx4YpUKwUbDfART0ATnk169fNLcclB6A9GuMWslW0WEfUMLtx48fX2jtEKj5+3BWYAfu7LUEUtuBaYSflZWV6mnh79+/DN++ffsOZOrhrcr3395jDHIIsBQVBVZmVMuSIAcAQ/ovkJviqOqygJFQ2QB0iBaQ2gvEElRu1EwEOuACSAAgwABrnbxcf6GNlgAAAABJRU5ErkJggg==) 1 5 2 10 stretch stretch } .xv-outline-comment { padding-left: 35px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAbFJREFUeNqkUstqwlAQnTxoSaVifQviTneSrVCL1UWhi+BW/Iku+weFrtxLl/6H3RTFrQvBUjctiI8osQETzKMzFwOpSDH0wsDcSc6Zc88M57ou/OeInU5H5jju2nGcfBAgz/Pv2PxNNE3zplqtPobD4WwQgs1m89Xtdp/F7XZbiEQi2aDSCUNYUdd1ThAEVlwulzAYDCCdTsNutwNVVVmd7pqmsbxYLEI8Hmc5YUXDMByPIJVKgaIoJ6sgLBFYfgWj0QgymQwMh0PI5XIwnU6hVCpBv98HSZJYHgqFPAKLCGycAiskEgkWdPL530M5poyw5IHjEZCCXq/HFFiWBYvFgtXp7nkgy7LfA4emYONMWSGZTEK9Xj/ZA4ZFlo/JZPJJKoIEYQjLlctlGRXcYrGAm8XjyC5arZaCE7miLrVarY3f7IPm+Ks7xu19ZeuMcYkRo1fgnO8bjUYb36/Ztu1WKpUn8vcgYnuMeOxpZ2jUXbPZfEHjvlHhw18+CL48ikH2hmezmb5er0WcvYF7IMzn8zHV913JccMDcQeEEinY18+j0WhstVqpPoDpB9P5EWAABCPJWGXksUIAAAAASUVORK5CYII=) 15px 1px no-repeat; color: #666 } .xv-outline-small .xv-outline-node { font-size: 9px; line-height: 12px } .xv-outline-small .xv-outline-tag-name, .xv-outline-small .xv-outline-pi-name { border-left-width: 7px } .xv-outline-small .xv-outline-comment { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAH9JREFUeNpinDlzpj0DA0MXEJsx4AangLiMBUisAGIJBvwAZNAKJiIUwoAEEwMJgGTFT4lU+xSkOAWIXxBQCJJPASneAcSSQMwCFfwFxK1AzAvEjFAMkt/B+P//f4ZZs2aBdNsAcREoPIH4DszItLQ0uPEsSFZdAOIgfG4BCDAA+EgXjMIYFx8AAAAASUVORK5CYII=) 0 3px no-repeat; padding-left: 14px } .xv-outline-node .xv-tag-switcher { margin-left: -1em; visibility: visible; color: #8c97a4 } .xv-outline-node .xv-tag-switcher:before { font-size: 9px } .xv-outline-node-empty .xv-tag-switcher { display: none } .xv-collapsed .xv-outline-tag-children { display: none } .xv-outline-node-inner { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis } .xv-outline-rs-handler { position: absolute; top: 0; bottom: 0; left: -1px; width: 7px; cursor: col-resize; z-index: 10 } .xv-outline-node-selected>.xv-outline-node-inner { color: #fff !important; font-weight: bold; text-shadow: 0 1px #6b757f } .xv-outline-node-selected:before { position: absolute; left: 0; width: 100%; background: #a4b1bf; overflow: hidden; content: '.'; text-indent: -2em; display: block; padding-right: 10px; padding-bottom: 2px; z-index: -1; margin-top: -1px; border-top: 1px solid #a5b3bd; border-bottom: 1px solid #909faf; background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#b8c4cf), to(#93a1b1)); background-image: -moz-linear-gradient(top, #b8c4cf, #93a1b1); background-color: #b8c4cf } .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-tag-name, .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-pi-name, .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-cdata-name { color: #fff; text-shadow: 0 1px #6b757f; background: -webkit-linear-gradient(#c3ccd6, #9faebb); background: -moz-linear-gradient(#c3ccd6, #9faebb); background: -ms-linear-gradient(#c3ccd6, #9faebb); background: -o-linear-gradient(#c3ccd6, #9faebb); background: -webkit-gradient(linear, 0 0, 0 100%, from(#c3ccd6), to(#9faebb)); background: linear-gradient(#c3ccd6, #9faebb) } .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-tag-name:before, .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-pi-name:before, .xv-outline-node-selected>.xv-outline-node-inner>.xv-outline-cdata-name:before { -webkit-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpiZCAArt19EgKklgIxGwN1wDUgPgXEfVrKMpdBAoz4HfAY5IAVr9+8Zf7x8xdVXMDKwsLAzs7GICjADzIwXUtZdgFOR1y98wjsgLfvPjIzMjEzUAv8+/eP4e/fvwxMQJtFRQRBDjHB6ogrtx+Gg6LgzbsPVHUAOmABuoSHm2MrC7rE5VsPo/7/Z1j0+u17ZgYmJpDTaeaIf/9BYcBkh+KISzcfAB3wf9Gr1+8gDvhLOwfAACMjIy/cERdv3I8FOmD+i9dvmRkYaRsCyABoJwPYEeev30v49///nOcv30BC4D99HACJEqAjzl27mwB0zZynL15DQuAv/RwAD4kXz5/xiImJM4Ly78/ffxjoDf4Do53Jy9l2+amTx2uFBXj/sbIwA/PwP7piUEiACoHvWzdtuKqlrftGXV3N8efv38y/gCECkqQH5uflYoCVRN93bttyXUlZ5bmWlqbzrz9/WH7SySECvNwMyMXhj727d9yQU1B4rKOt7fb791+Wn79+09QBTIzAEpOL/T16mfzzwN7dtyQkpe/r6+u7/v7zl/UHDR3Cy83J8OvHt0PYKoZfhw/suyMqJnbf0MDA5c+/f2w/fv1i+E9lyM7GyiAmxP9zw7pVmbhqp19HDx24w88veMvIyMjp37//nN+BVTnQ8RRjUFHAzcnBICki+O/i+bOt9VWlyxkJZGOutKw89+j4pNksLCzC1CgXfv78ee/Tx49Xd+/YunzqxN5dQKG3jETo4wBiNVB7hErl0w8g/grEr4D4G0gAIMAALC2j5MjdajEAAAAASUVORK5CYII=) 1 5 2 10 stretch stretch; -moz-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpiZCAArt19EgKklgIxGwN1wDUgPgXEfVrKMpdBAoz4HfAY5IAVr9+8Zf7x8xdVXMDKwsLAzs7GICjADzIwXUtZdgFOR1y98wjsgLfvPjIzMjEzUAv8+/eP4e/fvwxMQJtFRQRBDjHB6ogrtx+Gg6LgzbsPVHUAOmABuoSHm2MrC7rE5VsPo/7/Z1j0+u17ZgYmJpDTaeaIf/9BYcBkh+KISzcfAB3wf9Gr1+8gDvhLOwfAACMjIy/cERdv3I8FOmD+i9dvmRkYaRsCyABoJwPYEeev30v49///nOcv30BC4D99HACJEqAjzl27mwB0zZynL15DQuAv/RwAD4kXz5/xiImJM4Ly78/ffxjoDf4Do53Jy9l2+amTx2uFBXj/sbIwA/PwP7piUEiACoHvWzdtuKqlrftGXV3N8efv38y/gCECkqQH5uflYoCVRN93bttyXUlZ5bmWlqbzrz9/WH7SySECvNwMyMXhj727d9yQU1B4rKOt7fb791+Wn79+09QBTIzAEpOL/T16mfzzwN7dtyQkpe/r6+u7/v7zl/UHDR3Cy83J8OvHt0PYKoZfhw/suyMqJnbf0MDA5c+/f2w/fv1i+E9lyM7GyiAmxP9zw7pVmbhqp19HDx24w88veMvIyMjp37//nN+BVTnQ8RRjUFHAzcnBICki+O/i+bOt9VWlyxkJZGOutKw89+j4pNksLCzC1CgXfv78ee/Tx49Xd+/YunzqxN5dQKG3jETo4wBiNVB7hErl0w8g/grEr4D4G0gAIMAALC2j5MjdajEAAAAASUVORK5CYII=) 1 5 2 10 stretch stretch; -o-border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpiZCAArt19EgKklgIxGwN1wDUgPgXEfVrKMpdBAoz4HfAY5IAVr9+8Zf7x8xdVXMDKwsLAzs7GICjADzIwXUtZdgFOR1y98wjsgLfvPjIzMjEzUAv8+/eP4e/fvwxMQJtFRQRBDjHB6ogrtx+Gg6LgzbsPVHUAOmABuoSHm2MrC7rE5VsPo/7/Z1j0+u17ZgYmJpDTaeaIf/9BYcBkh+KISzcfAB3wf9Gr1+8gDvhLOwfAACMjIy/cERdv3I8FOmD+i9dvmRkYaRsCyABoJwPYEeev30v49///nOcv30BC4D99HACJEqAjzl27mwB0zZynL15DQuAv/RwAD4kXz5/xiImJM4Ly78/ffxjoDf4Do53Jy9l2+amTx2uFBXj/sbIwA/PwP7piUEiACoHvWzdtuKqlrftGXV3N8efv38y/gCECkqQH5uflYoCVRN93bttyXUlZ5bmWlqbzrz9/WH7SySECvNwMyMXhj727d9yQU1B4rKOt7fb791+Wn79+09QBTIzAEpOL/T16mfzzwN7dtyQkpe/r6+u7/v7zl/UHDR3Cy83J8OvHt0PYKoZfhw/suyMqJnbf0MDA5c+/f2w/fv1i+E9lyM7GyiAmxP9zw7pVmbhqp19HDx24w88veMvIyMjp37//nN+BVTnQ8RRjUFHAzcnBICki+O/i+bOt9VWlyxkJZGOutKw89+j4pNksLCzC1CgXfv78ee/Tx49Xd+/YunzqxN5dQKG3jETo4wBiNVB7hErl0w8g/grEr4D4G0gAIMAALC2j5MjdajEAAAAASUVORK5CYII=) 1 5 2 10 stretch stretch; border-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAATCAYAAAAeVmTJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAk1JREFUeNpiZCAArt19EgKklgIxGwN1wDUgPgXEfVrKMpdBAoz4HfAY5IAVr9+8Zf7x8xdVXMDKwsLAzs7GICjADzIwXUtZdgFOR1y98wjsgLfvPjIzMjEzUAv8+/eP4e/fvwxMQJtFRQRBDjHB6ogrtx+Gg6LgzbsPVHUAOmABuoSHm2MrC7rE5VsPo/7/Z1j0+u17ZgYmJpDTaeaIf/9BYcBkh+KISzcfAB3wf9Gr1+8gDvhLOwfAACMjIy/cERdv3I8FOmD+i9dvmRkYaRsCyABoJwPYEeev30v49///nOcv30BC4D99HACJEqAjzl27mwB0zZynL15DQuAv/RwAD4kXz5/xiImJM4Ly78/ffxjoDf4Do53Jy9l2+amTx2uFBXj/sbIwA/PwP7piUEiACoHvWzdtuKqlrftGXV3N8efv38y/gCECkqQH5uflYoCVRN93bttyXUlZ5bmWlqbzrz9/WH7SySECvNwMyMXhj727d9yQU1B4rKOt7fb791+Wn79+09QBTIzAEpOL/T16mfzzwN7dtyQkpe/r6+u7/v7zl/UHDR3Cy83J8OvHt0PYKoZfhw/suyMqJnbf0MDA5c+/f2w/fv1i+E9lyM7GyiAmxP9zw7pVmbhqp19HDx24w88veMvIyMjp37//nN+BVTnQ8RRjUFHAzcnBICki+O/i+bOt9VWlyxkJZGOutKw89+j4pNksLCzC1CgXfv78ee/Tx49Xd+/YunzqxN5dQKG3jETo4wBiNVB7hErl0w8g/grEr4D4G0gAIMAALC2j5MjdajEAAAAASUVORK5CYII=) 1 5 2 10 stretch stretch } .xv-outline-collapsed { width: 2em; cursor: pointer; overflow: hidden } .xv-outline-collapsed .xv-outline-header, .xv-outline-collapsed .xv-shortcut-header { -webkit-transform-origin: bottom left; -moz-transform-origin: bottom left; -ms-transform-origin: bottom left; -o-transform-origin: bottom left; transform-origin: bottom left; -webkit-transform: rotate(90deg) translateX(-25px) translateY(-4px); -moz-transform: rotate(90deg) translateX(-25px) translateY(-4px); -ms-transform: rotate(90deg) translateX(-25px) translateY(-4px); -o-transform: rotate(90deg) translateX(-25px) translateY(-4px); transform: rotate(90deg) translateX(-25px) translateY(-4px) } .xv-outline-collapsed .xv-outline-close, .xv-outline-collapsed .xv-outline-rs-handler, .xv-outline-collapsed .xv-outline-inner, .xv-outline-collapsed .xv-shortcut-header { display: none } .xv-selection-notifier { position: absolute; z-index: 1; display: block; margin: -3px; padding: 2px; border: 1px solid rgba(255, 216, 0, 0.42); background: rgba(255, 198, 0, 0.4); background: -webkit-gradient(linear, 0% 0, 0% 100%, from(rgba(255, 198, 0, 0.1)), to(rgba(255, 198, 0, 0.5))); background: -moz-linear-gradient(top, rgba(255, 198, 0, 0), rgba(255, 198, 0, 0.6)); -webkit-transform-origin: 50% 50%; -webkit-animation-name: xv-notify; -webkit-animation-duration: 1s; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3); -ms-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3) } @-webkit-keyframes "xv-notify" { 0% { -webkit-transform: scale(1); -webkit-animation-timing-function: ease-in; opacity: 0 } 6% { opacity: 1; -webkit-transform: scale(2); -webkit-animation-timing-function: ease-out } 17% { -webkit-transform: scale(1) } 70% { opacity: 1 } 100% { opacity: 0 } } /* - IRS Form 990PF - */ .xv-attr { display: none; } .xv-tag-close { display: none !important; } .xv-summary-website { text-transform: lowercase; } .xv-summary-name, .xv-summary-city { text-transform: capitalize; } .xv-summary-location, .xv-summary-assets { padding-bottom: 10px; } .xv-summary-hide { display: none !important; }
42.188329
988
0.807482
d0a9cf9a88523f2341ce99ca8652a90c13f6bba4
1,710
css
CSS
data/usercss/37085.user.css
33kk/uso-archive
2c4962d1d507ff0eaec6dcca555efc531b37a9b4
[ "MIT" ]
118
2020-08-28T19:59:28.000Z
2022-03-26T16:28:40.000Z
data/usercss/37085.user.css
33kk/uso-archive
2c4962d1d507ff0eaec6dcca555efc531b37a9b4
[ "MIT" ]
38
2020-09-02T01:08:45.000Z
2022-01-23T02:47:24.000Z
data/usercss/37085.user.css
33kk/uso-archive
2c4962d1d507ff0eaec6dcca555efc531b37a9b4
[ "MIT" ]
21
2020-08-19T01:12:43.000Z
2022-03-15T21:55:17.000Z
/* ==UserStyle== @name xing.com - design improvements @namespace USO Archive @author mprove @description `better design -- better usability for Xing.com` @version 20121220.5.59 @license CC-BY-4.0 @preprocessor uso ==/UserStyle== */ @namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("xing.com") { /* http://www.mprove.de/script/10/xing/, 20-Dec-2012, v2.8 */ /* gray endorsement */ .endorse .tag .action { background: #d4dcda !important; color:gray !important;} .arrow{display:none !important;} /* Activity: new connection */ li[data-activity-cat="7"] .controls, li[data-activity-cat="7"] ul.actions {display:none;} /* Focus on headlines at the news feed */ #maincontent .descriptive-list.post-list, #maincontent .descriptive-list.post-list strong, #maincontent .descriptive-list.post-list strong a, .myxing-container .date { color: #abc !important; font-weight: normal; } #maincontent .descriptive-list.post-list .icn, #maincontent .descriptive-list.post-list .date { display: none !important; } #maincontent .descriptive-list.post-list li:first-child .date, #maincontent .descriptive-list.post-list li.last .date { display: inline !important; } .myxing-container .descriptive-list .description { color:#000 !important; } /* groups home: no redundant title, no no news items */ .groups-callout + h1, .groups-callout + .flip-switch-wrapper h1, #news-items p, #active-threads h2 {display:none !important;} /* form teaser: hide own photo */ #form-teaser .photo, #form-teaser strong, #form-teaser .icn, #form-teaser .copy-light {display:none !important;} /* End of Xing Design Hack */ }
32.884615
113
0.68538
bccea4b3dc6a7afa6abb4a6e4a2d6e58c55b67e7
13,844
js
JavaScript
node_modules/eslint-plugin-sonarjs/lib/rules/cognitive-complexity.js
pioneer2k/github-action-for-generator
0a5020c3f40b4049f290f8ae714dcc737a949424
[ "Apache-2.0" ]
null
null
null
node_modules/eslint-plugin-sonarjs/lib/rules/cognitive-complexity.js
pioneer2k/github-action-for-generator
0a5020c3f40b4049f290f8ae714dcc737a949424
[ "Apache-2.0" ]
null
null
null
node_modules/eslint-plugin-sonarjs/lib/rules/cognitive-complexity.js
pioneer2k/github-action-for-generator
0a5020c3f40b4049f290f8ae714dcc737a949424
[ "Apache-2.0" ]
null
null
null
"use strict"; /* * eslint-plugin-sonarjs * Copyright (C) 2018 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program 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 program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // https://jira.sonarsource.com/browse/RSPEC-3776 var __spreadArrays = (this && this.__spreadArrays) || function () { for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j]; return r; }; var nodes_1 = require("../utils/nodes"); var locations_1 = require("../utils/locations"); var DEFAULT_THRESHOLD = 15; var rule = { meta: { schema: [ { type: "integer", minimum: 0 }, { // internal parameter enum: ["sonar-runtime", "metric"], }, ], }, create: function (context) { var threshold = context.options[0] !== undefined ? context.options[0] : DEFAULT_THRESHOLD; var isFileComplexity = context.options.includes("metric"); /** Complexity of the file */ var fileComplexity = 0; /** Complexity of the current function if it is *not* considered nested to the first level function */ var complexityIfNotNested = []; /** Complexity of the current function if it is considered nested to the first level function */ var complexityIfNested = []; /** Current nesting level (number of enclosing control flow statements and functions) */ var nesting = 0; /** Indicator if the current top level function has a structural (generated by control flow statements) complexity */ var topLevelHasStructuralComplexity = false; /** Own (not including nested functions) complexity of the current top function */ var topLevelOwnComplexity = []; /** Nodes that should increase nesting level */ var nestingNodes = new Set(); /** Set of already considered (with already computed complexity) logical expressions */ var consideredLogicalExpressions = new Set(); /** Stack of enclosing functions */ var enclosingFunctions = []; var secondLevelFunctions = []; return { ":function": function (node) { onEnterFunction(node); }, ":function:exit": function (node) { onLeaveFunction(node); }, "*": function (node) { if (nestingNodes.has(node)) { nesting++; } }, "*:exit": function (node) { if (nestingNodes.has(node)) { nesting--; nestingNodes.delete(node); } }, Program: function () { fileComplexity = 0; }, "Program:exit": function (node) { if (isFileComplexity) { // as issues are the only communication channel of a rule // we pass data as serialized json as an issue message context.report({ node: node, message: fileComplexity.toString() }); } }, IfStatement: function (node) { visitIfStatement(node); }, ForStatement: function (node) { visitLoop(node); }, ForInStatement: function (node) { visitLoop(node); }, ForOfStatement: function (node) { visitLoop(node); }, DoWhileStatement: function (node) { visitLoop(node); }, WhileStatement: function (node) { visitLoop(node); }, SwitchStatement: function (node) { visitSwitchStatement(node); }, ContinueStatement: function (node) { visitContinueOrBreakStatement(node); }, BreakStatement: function (node) { visitContinueOrBreakStatement(node); }, CatchClause: function (node) { visitCatchClause(node); }, LogicalExpression: function (node) { visitLogicalExpression(node); }, ConditionalExpression: function (node) { visitConditionalExpression(node); }, }; function onEnterFunction(node) { if (enclosingFunctions.length === 0) { // top level function topLevelHasStructuralComplexity = false; topLevelOwnComplexity = []; secondLevelFunctions = []; } else if (enclosingFunctions.length === 1) { // second level function complexityIfNotNested = []; complexityIfNested = []; } else { nesting++; nestingNodes.add(node); } enclosingFunctions.push(node); } function onLeaveFunction(node) { enclosingFunctions.pop(); if (enclosingFunctions.length === 0) { // top level function if (topLevelHasStructuralComplexity) { var totalComplexity_1 = topLevelOwnComplexity; secondLevelFunctions.forEach(function (secondLevelFunction) { totalComplexity_1 = totalComplexity_1.concat(secondLevelFunction.complexityIfNested); }); checkFunction(totalComplexity_1, locations_1.getMainFunctionTokenLocation(node, nodes_1.getParent(context), context)); } else { checkFunction(topLevelOwnComplexity, locations_1.getMainFunctionTokenLocation(node, nodes_1.getParent(context), context)); secondLevelFunctions.forEach(function (secondLevelFunction) { checkFunction(secondLevelFunction.complexityIfThisSecondaryIsTopLevel, locations_1.getMainFunctionTokenLocation(secondLevelFunction.node, secondLevelFunction.parent, context)); }); } } else if (enclosingFunctions.length === 1) { // second level function secondLevelFunctions.push({ node: node, parent: nodes_1.getParent(context), complexityIfNested: complexityIfNested, complexityIfThisSecondaryIsTopLevel: complexityIfNotNested, loc: locations_1.getMainFunctionTokenLocation(node, nodes_1.getParent(context), context), }); } else { // complexity of third+ level functions is computed in their parent functions // so we never raise an issue for them } } function visitIfStatement(ifStatement) { var parent = nodes_1.getParent(context); var ifLoc = locations_1.getFirstToken(ifStatement, context).loc; // if the current `if` statement is `else if`, do not count it in structural complexity if (nodes_1.isIfStatement(parent) && parent.alternate === ifStatement) { addComplexity(ifLoc); } else { addStructuralComplexity(ifLoc); } // always increase nesting level inside `then` statement nestingNodes.add(ifStatement.consequent); // if `else` branch is not `else if` then // - increase nesting level inside `else` statement // - add +1 complexity if (ifStatement.alternate && !nodes_1.isIfStatement(ifStatement.alternate)) { nestingNodes.add(ifStatement.alternate); var elseTokenLoc = locations_1.getFirstTokenAfter(ifStatement.consequent, context).loc; addComplexity(elseTokenLoc); } } function visitLoop(loop) { addStructuralComplexity(locations_1.getFirstToken(loop, context).loc); nestingNodes.add(loop.body); } function visitSwitchStatement(switchStatement) { addStructuralComplexity(locations_1.getFirstToken(switchStatement, context).loc); for (var _i = 0, _a = switchStatement.cases; _i < _a.length; _i++) { var switchCase = _a[_i]; nestingNodes.add(switchCase); } } function visitContinueOrBreakStatement(statement) { if (statement.label) { addComplexity(locations_1.getFirstToken(statement, context).loc); } } function visitCatchClause(catchClause) { addStructuralComplexity(locations_1.getFirstToken(catchClause, context).loc); nestingNodes.add(catchClause.body); } function visitConditionalExpression(conditionalExpression) { var questionTokenLoc = locations_1.getFirstTokenAfter(conditionalExpression.test, context).loc; addStructuralComplexity(questionTokenLoc); nestingNodes.add(conditionalExpression.consequent); nestingNodes.add(conditionalExpression.alternate); } function visitLogicalExpression(logicalExpression) { if (!consideredLogicalExpressions.has(logicalExpression)) { var flattenedLogicalExpressions = flattenLogicalExpression(logicalExpression); var previous = void 0; for (var _i = 0, flattenedLogicalExpressions_1 = flattenedLogicalExpressions; _i < flattenedLogicalExpressions_1.length; _i++) { var current = flattenedLogicalExpressions_1[_i]; if (!previous || previous.operator !== current.operator) { var operatorTokenLoc = locations_1.getFirstTokenAfter(logicalExpression.left, context).loc; addComplexity(operatorTokenLoc); } previous = current; } } } function flattenLogicalExpression(node) { if (nodes_1.isLogicalExpression(node)) { consideredLogicalExpressions.add(node); return __spreadArrays(flattenLogicalExpression(node.left), [node], flattenLogicalExpression(node.right)); } return []; } function addStructuralComplexity(location) { var added = nesting + 1; var complexityPoint = { complexity: added, location: location }; if (enclosingFunctions.length === 0) { // top level scope fileComplexity += added; } else if (enclosingFunctions.length === 1) { // top level function topLevelHasStructuralComplexity = true; topLevelOwnComplexity.push(complexityPoint); } else { // second+ level function complexityIfNested.push({ complexity: added + 1, location: location }); complexityIfNotNested.push(complexityPoint); } } function addComplexity(location) { var complexityPoint = { complexity: 1, location: location }; if (enclosingFunctions.length === 0) { // top level scope fileComplexity += 1; } else if (enclosingFunctions.length === 1) { // top level function topLevelOwnComplexity.push(complexityPoint); } else { // second+ level function complexityIfNested.push(complexityPoint); complexityIfNotNested.push(complexityPoint); } } function checkFunction(complexity, loc) { if (complexity === void 0) { complexity = []; } var complexityAmount = complexity.reduce(function (acc, cur) { return acc + cur.complexity; }, 0); fileComplexity += complexityAmount; if (isFileComplexity) { return; } if (complexityAmount > threshold) { var secondaryLocations = complexity.map(function (complexityPoint) { var complexity = complexityPoint.complexity, location = complexityPoint.location; var message = complexity === 1 ? "+1" : "+" + complexity + " (incl. " + (complexity - 1) + " for nesting)"; return locations_1.issueLocation(location, undefined, message); }); locations_1.report(context, { message: "Refactor this function to reduce its Cognitive Complexity from " + complexityAmount + " to the " + threshold + " allowed.", loc: loc, }, secondaryLocations, complexityAmount - threshold); } } }, }; module.exports = rule; //# sourceMappingURL=cognitive-complexity.js.map
45.539474
200
0.565299
3be723695b8ce12579b7db62dc61571a6f6db6c7
9,800
c
C
src/config.c
r-c-f/rcfvt
d390d617de2ea4054bd5a347a3c7726fe676f37f
[ "MIT" ]
null
null
null
src/config.c
r-c-f/rcfvt
d390d617de2ea4054bd5a347a3c7726fe676f37f
[ "MIT" ]
null
null
null
src/config.c
r-c-f/rcfvt
d390d617de2ea4054bd5a347a3c7726fe676f37f
[ "MIT" ]
null
null
null
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> #include <glib.h> #include <gdk/gdk.h> #ifdef GDK_WINDOWING_X11 #include <gdk/gdkx.h> #endif #ifdef GDK_WINDOWING_WAYLAND #include <gdk/gdkwayland.h> #endif #include <gtk/gtk.h> #include <vte/vte.h> #include "config.h" #include "ca_plugin.h" #include "notify_plugin.h" /* read file into a buffer, resizing as needed */ static bool buf_append_file(char **buf, size_t *len, size_t *pos, char *path) { FILE *f; size_t read_count; if (!path) return false; if (!(f = fopen(path, "r"))) { return false; } while ((read_count = fread(*buf + *pos, 1, *len - *pos - 1, f))) { *pos += read_count; if (*len - *pos <= 2) { *buf = g_realloc(*buf, *len *= 2); } } fclose(f); return true; } /* get base path for configuration */ static inline char *get_base_path(void) { return g_build_filename(g_get_user_config_dir(), "rcfvt", NULL); } /* read in full configuration */ static char *read_full_conf_buf(void) { char *buf, *full_path; const char *filename; size_t len = 1024; //how many bytes are allocated size_t pos = 0; //index of next empty block of buf GError *err = NULL; GDir *dir; g_autofree gchar *base_path = get_base_path(); g_autofree gchar *main_file = g_build_filename(base_path, "rcfvt.conf", NULL); g_autofree gchar *dirname = g_build_filename(base_path, "rcfvt.conf.d", NULL); buf = g_malloc0(len); if (main_file) { if (!buf_append_file(&buf, &len, &pos, main_file)) { g_free(buf); return NULL; } } if (!dirname) goto done; if (!(dir = g_dir_open(dirname, 0, &err))) { g_info("Could not open config dir %s: %s", dirname, err->message); goto done; } while ((filename = g_dir_read_name(dir))) { if (!g_str_has_suffix(filename, ".conf")) continue; full_path = g_build_filename(dirname, filename, NULL); if (!buf_append_file(&buf, &len, &pos, full_path)) { g_free(full_path); g_free(buf); return NULL; } g_free(full_path); } g_dir_close(dir); done: buf[pos + 1] = '\0'; return buf; } /* * tries to use g_key_file_get_typ() to set dest, if it fails, * sets dest to def instead * * includes helper macros to get assign by value even for strings, and helper * functions because _Generic is stupid for some reason */ static inline bool noop_bool(bool x) { return x; } static inline int noop_int(int x) { return x; } static inline double noop_dbl(double x) { return x; } #define KEYFILE_TRY_ASSGN_DEF(dest, def) ((dest) = _Generic( (dest), bool: noop_bool, int: noop_int, double: noop_dbl, char *: g_strdup)(def)) #define KEYFILE_TRY_GET(kf, grp, key, dest, def) \ do { \ if (!kf) { \ KEYFILE_TRY_ASSGN_DEF(dest, def); \ } else { \ GError *err = NULL; \ dest = _Generic((dest), bool: g_key_file_get_boolean, int: g_key_file_get_integer, char *: g_key_file_get_string, double: g_key_file_get_double)(kf, grp, key, &err); \ if (err) \ KEYFILE_TRY_ASSGN_DEF(dest, def); \ } \ } while(0) static GdkModifierType gdk_mod_parse(char *name) { if (!strcasecmp("shift", name)) return GDK_SHIFT_MASK; if (!strcasecmp("control", name)) return GDK_CONTROL_MASK; if (!strcasecmp("mod1", name)) return GDK_MOD1_MASK; if (!strcasecmp("mod2", name)) return GDK_MOD2_MASK; if (!strcasecmp("mod3", name)) return GDK_MOD3_MASK; if (!strcasecmp("mod4", name)) return GDK_MOD4_MASK; if (!strcasecmp("mod5", name)) return GDK_MOD5_MASK; if (!strcasecmp("super", name)) return GDK_SUPER_MASK; if (!strcasecmp("hyper", name)) return GDK_HYPER_MASK; if (!strcasecmp("meta", name)) return GDK_META_MASK; return 0; } /* Try to load a color from a keyfile. Returns 0 on success, 1 on failure */ static int keyfile_load_color(GdkRGBA *dest, GKeyFile *kf, char* group, char *key) { int ret = 1; if (kf) { char *val = g_key_file_get_string(kf, group, key, NULL); if (val && gdk_rgba_parse(dest,val)) { ret = 0; } g_free(val); } return ret; } // Set size of a theme from GKeyFile configuration static size_t conf_theme_set_size(struct theme *theme, GKeyFile *conf) { char *val, **size; char *sizes[] = {"0", "8", "16", "232", "256", NULL}; // all VTE supports. if (!conf) { theme->size = 0; return theme->size; } for (size = sizes; *size; ++size) { val = g_key_file_get_string(conf, "theme", *size, NULL); if (!val) { break; } else { g_free(val); } } theme->size = atol(*size); g_free(val); assert(theme->size <= THEME_SIZE_MAX); return theme->size; } // Load whole theme from GKeyFile configuration static bool conf_load_theme(struct theme *theme, GKeyFile *conf) { size_t i; int missing = 0; KEYFILE_TRY_GET(conf, "theme", "font", theme->font, DEFAULT_FONT); KEYFILE_TRY_GET(conf, "theme", "opacity", theme->opacity, DEFAULT_OPACITY); KEYFILE_TRY_GET(conf, "theme", "bold_is_bright", theme->bold_is_bright, false); conf_theme_set_size(theme, conf); char key[1 + snprintf(NULL, 0, "%zd", theme->size)]; for (i = 0; i < theme->size; ++i) { snprintf(key, sizeof(key), "%zd", i); missing += keyfile_load_color(theme->colors + i, conf, "theme", key); } missing += !(theme->fg_set = !keyfile_load_color(&(theme->fg), conf, "theme", "fg")); missing += !(theme->bg_set = !keyfile_load_color(&(theme->bg), conf, "theme", "bg")); return !missing; } //Figure out what windowing system we are using static enum conf_backend conf_get_backend(void) { //first we'll try the halfway-decent way char *backend = getenv("XDG_SESSION_TYPE"); if (backend) { if (!strcmp(backend, "x11")) { return conf_backend_x11; } else if (!strcmp(backend, "wayland")) { return conf_backend_wl; } else { return conf_backend_unknown; } } //slightly dumber way -- wayland will take precedence because xwayland if (getenv("WAYLAND_DISPLAY")) { return conf_backend_wl; } if (getenv("DISPLAY")) { return conf_backend_x11; } //and everything has failed at this point. return conf_backend_unknown; } void conf_load(struct config *conf) { char *mod_names, *mod_name; GKeyFile *kf; char *default_shell = vte_get_user_shell(); if (!default_shell) default_shell = DEFAULT_SHELL; char *conf_buf = read_full_conf_buf(); if (conf_buf) { kf = g_key_file_new(); g_key_file_load_from_data(kf, conf_buf, (gsize)-1, G_KEY_FILE_NONE, NULL); } else { g_warning("Could not read configuration file, using defaults"); kf = NULL; } KEYFILE_TRY_GET(kf, "main", "shell", conf->shell,default_shell); KEYFILE_TRY_GET(kf, "main", "scrollback", conf->scrollback, DEFAULT_SCROLLBACK); KEYFILE_TRY_GET(kf, "main", "spawn_timeout", conf->spawn_timeout, DEFAULT_SPAWN_TIMEOUT); KEYFILE_TRY_GET(kf, "main", "select_to_clipboard", conf->select_to_clipboard, false); KEYFILE_TRY_GET(kf, "main", "single_proc", conf->single_proc, false); KEYFILE_TRY_GET(kf, "main", "fifo_path", conf->fifo_path, NULL); if (!conf->fifo_path) { conf->fifo_path = g_build_filename(g_get_user_runtime_dir(), "rcfvt_fifo", NULL); } KEYFILE_TRY_GET(kf, "main", "fifo_timeout", conf->fifo_timeout, DEFAULT_FIFO_TIMEOUT); if (!conf_load_theme(&(conf->theme), kf)) { g_warning("Could not load complete theme; using defaults"); conf->theme.size = 0; } KEYFILE_TRY_GET(kf, "main", "sixel", conf->sixel, false); KEYFILE_TRY_GET(kf, "url", "modifiers", mod_names, NULL); if (mod_names) { mod_name = strtok(mod_names, "|+"); do { conf->url_modifiers |= gdk_mod_parse(mod_name); } while ((mod_name = strtok(NULL, "|+"))); } KEYFILE_TRY_GET(kf, "url", "regex", conf->url_regex, DEFAULT_URL_REGEX); KEYFILE_TRY_GET(kf, "url", "osc8", conf->url_osc8, false); KEYFILE_TRY_GET(kf, "url", "spawn_sync", conf->url_spawn_sync, false); KEYFILE_TRY_GET(kf, "url", "action", conf->url_action, NULL); KEYFILE_TRY_GET(kf, "notify", "x11", conf->notify_bell_x11, false); KEYFILE_TRY_GET(kf, "notify", "wayland", conf->notify_bell_wl, true); conf->notify_bell = conf->notify_bell_x11 || conf->notify_bell_wl; if (conf->notify_bell) { if ((conf->notify_bell = notify_plug_load())) { conf->notify_bell = notify_plug_init(); } } //because whether we use the notify bell is really mostly dependent on //which windowing system we're using, figure that out now and set the //main option accordingly if (conf->notify_bell) { enum conf_backend backend = conf_get_backend(); switch (backend) { case conf_backend_x11: if (!conf->notify_bell_x11) conf->notify_bell = false; break; case conf_backend_wl: if (!conf->notify_bell_wl) conf->notify_bell = false; break; default: g_warning("could not determine gdk backend"); conf->notify_bell = false; } } KEYFILE_TRY_GET(kf, "sound", "beep_bell", conf->beep_bell, false); KEYFILE_TRY_GET(kf, "sound", "canberra_bell", conf->canberra_bell, false); if (conf->canberra_bell) { if ((conf->canberra_bell = ca_plug_load())) { conf->canberra_bell = ca_plug_init(); } } if (kf) { g_key_file_free(kf); g_free(conf_buf); } }
31.012658
170
0.627143
5720d7f09b2e0b066c17013da8dc668e96e29ab9
1,244
h
C
snapgear_linux/user/e2fsprogs/lib/uuid/uuid.h
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
4
2016-04-26T03:43:54.000Z
2016-11-17T08:09:04.000Z
snapgear_linux/user/e2fsprogs/lib/uuid/uuid.h
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
17
2015-01-05T21:06:22.000Z
2015-12-07T20:45:44.000Z
snapgear_linux/user/e2fsprogs/lib/uuid/uuid.h
impedimentToProgress/UCI-BlueChip
53e5d48b79079eaf60d42f7cb65bb795743d19fc
[ "MIT" ]
3
2016-06-13T13:20:56.000Z
2019-12-05T02:31:23.000Z
/* * Public include file for the UUID library * * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. * * %Begin-Header% * This file may be redistributed under the terms of the GNU * Library General Public License. * %End-Header% */ #ifndef _UUID_UUID_H #define _UUID_UUID_H #include <sys/types.h> #include <sys/time.h> #include <time.h> typedef unsigned char uuid_t[16]; /* UUID Variant definitions */ #define UUID_VARIANT_NCS 0 #define UUID_VARIANT_DCE 1 #define UUID_VARIANT_MICROSOFT 2 #define UUID_VARIANT_OTHER 3 #ifdef __cplusplus extern "C" { #endif /* clear.c */ void uuid_clear(uuid_t uu); /* compare.c */ int uuid_compare(const uuid_t uu1, const uuid_t uu2); /* copy.c */ void uuid_copy(uuid_t dst, const uuid_t src); /* gen_uuid.c */ void uuid_generate(uuid_t out); void uuid_generate_random(uuid_t out); void uuid_generate_time(uuid_t out); /* isnull.c */ int uuid_is_null(const uuid_t uu); /* parse.c */ int uuid_parse(const char *in, uuid_t uu); /* unparse.c */ void uuid_unparse(const uuid_t uu, char *out); /* uuid_time.c */ time_t uuid_time(const uuid_t uu, struct timeval *ret_tv); int uuid_type(const uuid_t uu); int uuid_variant(const uuid_t uu); #ifdef __cplusplus } #endif #endif /* _UUID_UUID_H */
19.4375
61
0.724277
6c7ca9fa776c18a96a14130d830d418246656446
808
swift
Swift
Sources/GMSOverlay+Rx.swift
dimala/RxGoogleMaps
bb316c3dd0d7bbf8b00779b41acaec376f0d7755
[ "MIT" ]
1
2018-08-31T18:39:50.000Z
2018-08-31T18:39:50.000Z
Pods/RxGoogleMaps/Sources/GMSOverlay+Rx.swift
juliancadi/AnyMap
c5578d0432f25c2f820a303c84a34a7944e4e9e2
[ "MIT" ]
null
null
null
Pods/RxGoogleMaps/Sources/GMSOverlay+Rx.swift
juliancadi/AnyMap
c5578d0432f25c2f820a303c84a34a7944e4e9e2
[ "MIT" ]
1
2018-05-28T00:29:00.000Z
2018-05-28T00:29:00.000Z
// // GMSOverlay+Rx.swift // Example // // Created by Gabriel Araujo on 30/10/17. // Copyright © 2017 Gen X Hippies Company. All rights reserved. // import Foundation import UIKit import CoreLocation import RxSwift import RxCocoa import GoogleMaps public extension Reactive where Base: GMSOverlay { public var title: AnyObserver<String?> { return Binder(base) { control, title in control.title = title }.asObserver() } public var tappable: AnyObserver<Bool> { return Binder(base) { control, tappable in control.isTappable = tappable }.asObserver() } public var zIndex: AnyObserver<Int32> { return Binder(base) { control, zIndex in control.zIndex = zIndex }.asObserver() } }
21.837838
64
0.631188
1e8ad7e2176beb38269d8130db19ff50cbb24e84
407
asm
Assembly
programs/oeis/192/A192466.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/192/A192466.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/192/A192466.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A192466: Coefficient of x in the reduction by x^2->x+2 of the polynomial p(n,x)=1+x^n+x^(2n). ; 2,6,24,90,352,1386,5504,21930,87552,349866,1398784,5593770,22372352,89483946,357924864,1431677610,5726666752,22906579626,91626143744,366504225450,1466016202752,5864063412906,23456250855424,93824997829290 add $0,3 mov $1,4 mov $2,2 pow $2,$0 add $1,$2 mul $1,$2 div $1,16 sub $1,6 div $1,3 add $1,2 mov $0,$1
27.133333
205
0.739558
d43dffe27f7d2c7666c92eed22de74cbf6273890
1,106
rs
Rust
src/basics/src/main.rs
jrbeverly/rust-lang-checks
1ded16c64147834f350dd0c9da4b06d8b5a77df6
[ "MIT" ]
null
null
null
src/basics/src/main.rs
jrbeverly/rust-lang-checks
1ded16c64147834f350dd0c9da4b06d8b5a77df6
[ "MIT" ]
null
null
null
src/basics/src/main.rs
jrbeverly/rust-lang-checks
1ded16c64147834f350dd0c9da4b06d8b5a77df6
[ "MIT" ]
null
null
null
fn main() { println!("Hello, world!"); println!("The first letter of the English alphabet is {} and the last letter is {}.", 'A', 'Z'); let mut a_number : u32; let a_word = "Ten"; a_number = 10; println!("The number is {}.", a_number); println!("The word is {}.", a_word); a_number = 15; println!("The number is {}.", a_number); print_byrange(500, 0, 512); let simple_struct = generate_struct(); print_struct(simple_struct); } struct DataOf { name: String, scale: u8 } fn generate_struct() -> DataOf { let result = DataOf { name: String::from("ABC"), scale: 5 }; return result; } fn print_struct(st : DataOf) { println!("The name is {}.", st.name); println!("The scale is {}.", st.scale); } fn print_byrange(num: i32, min : i32, max: i32) { let out_of_range: bool; if num < min { out_of_range = true; } else if num == min { out_of_range = true; } else if num > max { out_of_range = true; } else { out_of_range = false; } println!("The number is {}.", out_of_range); }
24.577778
100
0.576854
39d0b9db90b1a5bea3e64a9aa2c3c4e47927c178
6,155
swift
Swift
Pod/Classes/Container/Container.swift
mikenolimits/Oatmeal
e4d2c41d4dbbe27426080b7fcf783fc8a650fb63
[ "MIT" ]
1
2016-01-11T03:30:30.000Z
2016-01-11T03:30:30.000Z
Pod/Classes/Container/Container.swift
mikenolimits/Oatmeal
e4d2c41d4dbbe27426080b7fcf783fc8a650fb63
[ "MIT" ]
null
null
null
Pod/Classes/Container/Container.swift
mikenolimits/Oatmeal
e4d2c41d4dbbe27426080b7fcf783fc8a650fb63
[ "MIT" ]
null
null
null
import Foundation public class Container : Oatmeal { public static var entityName : String? = "Container" /* The singleton reference to the container itself */ static public let App = Container() /* Singletons bound to the app always need a reference */ public var singletons : [Resolveable] = [ Events(),Reflections() ] /* Lazy members bound to the app do not need a reference, and will be deinitlized whenever they are no longer needed. */ private var members: [String:Resolveable.Type] = [String: Resolveable.Type]() { didSet { #if debug print(members, terminator: "\n") #endif } } public required init() { } public func didResolve(member : Any) { if let proactiveMember = member as? ProactiveResolveable { proactiveMember.didResolve() } //We're going to ensure that all events are registered as soon as the class is resolved. if let eventUser = member as? UsesEvents { eventUser.setEvents() } if let autoresolver = member as? Autoresolves { injectDependencies(autoresolver) } } /* First we will check if the user provided an entityName, if they did, we will use it. Otherwise we will get the name of the class instead. If the object autoresolves, then we will check if a custom entityName is provided as autoresolves do not have a static one, and they might be stored as singletons later with custom keys. */ public func get<O : Resolveable>() -> O? { guard let name = O.entityName else { let name = getDynamicName(String(O)) return self.get(name) as? O } if let auto = O() as? Autoresolveable where auto.customEntityName != "" { return self.get(auto.customEntityName) as? O } return self.get(name) as? O } /* First we will check for a framework bound members because it will be most common Second we we will check singletons */ public func get(key:String)->Resolveable? { if let member = members[key] { let entity = member.init() //The instance method for didResolve will only work with an itialized object self.didResolve(entity) return entity } if let member = singletons.find({$0.dynamicType.entityName == key}) { //Singletons are always initialized self.didResolve(member) return member } else { return nil } } public func has(key:String)-> Bool { return get(key) != nil } public func has(key:Resolveable.Type)-> Bool { if let entityName = key.entityName { return (get(entityName) != nil) } let dynamicName = getDynamicName(String(key.init().dynamicType)) return (get(dynamicName) != nil) } /* This is the "safe" bind method. If the developer makes their class Resolveable, and it has a custom entity name, it would be unlikely for a name collision to occur and for the class not to resolve later on. */ public func bind(key: String,member: Resolveable.Type) { self.members[key] = member if let proactiveMember = member as? ProactiveResolveable { proactiveMember.didBind() } } public func bind(member: Resolveable) { //Now that we have both the type and a reference to the class, //We can initialize it whenever its needed. let entity = member.dynamicType guard let name = member.dynamicType.entityName else { let dynamicName = getDynamicName(String(entity)) self.members[dynamicName] = entity return } self.members[name] = entity //In case the developer wants to listen for the binding of their class if let proactiveMember = member as? ProactiveResolveable { proactiveMember.didBind() } } public func bindSingleton(singleton : Resolveable) { self.singletons.append(singleton) } public func bindIf(condition : () -> Bool, withMember : Resolveable.Type,completion : () -> ()) { if(condition()) { let entity = withMember.init() bind(entity) completion() } } public func register(providers : [ServiceProvider]) { for i in providers { register(i) } } public func getDynamicName(name:String) -> String { return name.capitalizedString.replace(".Type",withString: "") } public func register(provider: ServiceProvider) { for i in provider.provides { if let entityName = i.entityName { members[entityName] = i } else { let name = getDynamicName(String(i.dynamicType)) members[name] = i } } } public func injectDependencies(obj: Autoresolves) { for (key,prop) in obj.dependencies() { if let autoresolvable = obj as? Autoresolveable, resolved = ~key as? NSObject { autoresolvable.setValue(resolved, forKey: prop.label) } } } public func open(any: Any?) -> Any.Type { let mi = Mirror(reflecting: any) if let children = AnyRandomAccessCollection(mi.children) { if mi.children.count == 0 { return NullElement.self } for (_, value) in children { return value.dynamicType } } return mi.subjectType } }
26.76087
214
0.547847
243e8a3e0ab197b5209c01254e387c4e287acea0
1,403
kt
Kotlin
app/src/main/java/com/zys/qa/ui/add_qa/AddQAPresentImpl.kt
Equalzys/InterviewQA
1899ad8b5faa43e8bc6cec74569fdb90d278aef7
[ "Apache-2.0" ]
19
2019-02-16T08:41:46.000Z
2021-05-20T11:12:32.000Z
app/src/main/java/com/zys/qa/ui/add_qa/AddQAPresentImpl.kt
Equalzys/InterviewQA
1899ad8b5faa43e8bc6cec74569fdb90d278aef7
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/zys/qa/ui/add_qa/AddQAPresentImpl.kt
Equalzys/InterviewQA
1899ad8b5faa43e8bc6cec74569fdb90d278aef7
[ "Apache-2.0" ]
2
2019-02-16T13:13:51.000Z
2019-02-19T06:21:23.000Z
package com.zys.qa.ui.add_qa import android.app.Activity import android.text.TextUtils import com.zys.baselibrary.base.BasePresenterImpl import com.zys.baselibrary.bean.BaseBoolean import com.zys.baselibrary.net.RxSchedulers import com.zys.qa.net.Api import com.zys.qa.net.BaseObserver import com.zys.qa.constant.NoCodeConstant import com.zys.qa.bean.QAList import java.util.HashMap class AddQAPresentImpl(activity: Activity) : BasePresenterImpl<AddQAContract.IView>(activity), AddQAContract.IPresenter { override fun postQA(title: String, content: String) { if (TextUtils.isEmpty(title)) { getView()?.onHttpError("请输入标题"); return } if (TextUtils.isEmpty(content)) { getView()?.onHttpError("请输入答案"); return } val map = HashMap<String, String>() map["question"] = title map["answer"] = content val mObserver = object : BaseObserver<BaseBoolean>( context, this ) { override fun onSuccess(mData: BaseBoolean?) { if (!isViewAttached()) { return } getView()?.postQASuccess(mData?.is_success) } } mObserver.isShowLoading = true Api.service.addQA(map) .compose(RxSchedulers.compose(this)) .subscribe(mObserver) } }
26.471698
94
0.617962
2544057351efd4c35493f6f5d9dc132e41b87b98
245
kt
Kotlin
data/src/main/java/com/jbkalit/data/source/post/remote/PostRemoteDataSourceContract.kt
jbkalit/PostApp
fbf808718f0648b7bf9046ede6a6c3c60463a1e7
[ "Apache-2.0" ]
2
2021-05-29T10:07:53.000Z
2021-11-09T08:48:43.000Z
data/src/main/java/com/jbkalit/data/source/post/remote/PostRemoteDataSourceContract.kt
jbkalit/PostApp
fbf808718f0648b7bf9046ede6a6c3c60463a1e7
[ "Apache-2.0" ]
null
null
null
data/src/main/java/com/jbkalit/data/source/post/remote/PostRemoteDataSourceContract.kt
jbkalit/PostApp
fbf808718f0648b7bf9046ede6a6c3c60463a1e7
[ "Apache-2.0" ]
null
null
null
package com.jbkalit.data.source.post.remote import com.jbkalit.domain.model.Post import io.reactivex.Single interface PostRemoteDataSourceContract { fun getAllPosts(): Single<List<Post>> fun getPostById(postId: Int): Single<Post> }
18.846154
46
0.771429
b6f9ff6348c3137d1ef6a5429a6be8378626e765
7,322
kt
Kotlin
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/coroutineCallChecker.kt
AgustaRC/kotlin
434f33f9e9caacf2109c05fcb432227618e0e6c5
[ "Apache-2.0" ]
1
2021-05-08T21:21:02.000Z
2021-05-08T21:21:02.000Z
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/coroutineCallChecker.kt
AgustaRC/kotlin
434f33f9e9caacf2109c05fcb432227618e0e6c5
[ "Apache-2.0" ]
null
null
null
compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/checkers/coroutineCallChecker.kt
AgustaRC/kotlin
434f33f9e9caacf2109c05fcb432227618e0e6c5
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2010-2016 JetBrains s.r.o. * * 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. */ package org.jetbrains.kotlin.resolve.calls.checkers import com.intellij.psi.PsiElement import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.coroutines.hasSuspendFunctionType import org.jetbrains.kotlin.coroutines.isSuspendLambda import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor import org.jetbrains.kotlin.diagnostics.DiagnosticSink import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.psi.KtExpression import org.jetbrains.kotlin.psi.KtThisExpression import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall import org.jetbrains.kotlin.resolve.descriptorUtil.hasRestrictsSuspensionAnnotation import org.jetbrains.kotlin.resolve.inline.InlineUtil import org.jetbrains.kotlin.resolve.scopes.LexicalScope import org.jetbrains.kotlin.resolve.scopes.LexicalScopeKind import org.jetbrains.kotlin.resolve.scopes.receivers.ExpressionReceiver import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue import org.jetbrains.kotlin.resolve.scopes.utils.parentsWithSelf import org.jetbrains.kotlin.types.typeUtil.supertypes import org.jetbrains.kotlin.utils.addToStdlib.cast import org.jetbrains.kotlin.utils.addToStdlib.safeAs object CoroutineSuspendCallChecker : CallChecker { override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) { val descriptor = resolvedCall.candidateDescriptor as? SimpleFunctionDescriptor ?: return if (!descriptor.isSuspend) return val (closestSuspendLambdaScope, closestSuspensionLambdaDescriptor) = context.scope .parentsWithSelf.firstOrNull { it is LexicalScope && it.kind == LexicalScopeKind.FUNCTION_INNER_SCOPE && it.ownerDescriptor.safeAs<CallableDescriptor>()?.isSuspendLambda == true }?.let { it to it.cast<LexicalScope>().ownerDescriptor.cast<CallableDescriptor>() } ?: null to null val enclosingSuspendFunction = context.scope.parentsWithSelf.filterIsInstance<LexicalScope>().takeWhile { it != closestSuspendLambdaScope } .firstOrNull { (it.ownerDescriptor as? FunctionDescriptor)?.isSuspend == true }?.ownerDescriptor as? SimpleFunctionDescriptor when { enclosingSuspendFunction != null -> { // Tail calls checks happen during control flow analysis // Here we only record enclosing function mapping (for backends purposes) context.trace.record(BindingContext.ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL, resolvedCall.call, enclosingSuspendFunction) checkRestrictsSuspension(enclosingSuspendFunction, resolvedCall, reportOn, context) } closestSuspensionLambdaDescriptor != null -> { val callElement = resolvedCall.call.callElement as KtExpression if (!InlineUtil.checkNonLocalReturnUsage(closestSuspensionLambdaDescriptor, callElement, context.resolutionContext)) { context.trace.report(Errors.NON_LOCAL_SUSPENSION_POINT.on(reportOn)) } context.trace.record( BindingContext.ENCLOSING_SUSPEND_LAMBDA_FOR_SUSPENSION_POINT, resolvedCall.call, closestSuspensionLambdaDescriptor ) checkRestrictsSuspension(closestSuspensionLambdaDescriptor, resolvedCall, reportOn, context) } else -> { context.trace.report(Errors.ILLEGAL_SUSPEND_FUNCTION_CALL.on(reportOn)) } } } } object BuilderFunctionsCallChecker : CallChecker { override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) { val descriptor = resolvedCall.candidateDescriptor as? FunctionDescriptor ?: return if (descriptor.valueParameters.any { it.hasSuspendFunctionType }) { checkCoroutinesFeature(context.languageVersionSettings, context.trace, reportOn) } } } fun checkCoroutinesFeature(languageVersionSettings: LanguageVersionSettings, diagnosticHolder: DiagnosticSink, reportOn: PsiElement) { if (!languageVersionSettings.supportsFeature(LanguageFeature.Coroutines)) { diagnosticHolder.report(Errors.UNSUPPORTED_FEATURE.on(reportOn, LanguageFeature.Coroutines)) } else if (languageVersionSettings.supportsFeature(LanguageFeature.ErrorOnCoroutines)) { diagnosticHolder.report(Errors.EXPERIMENTAL_FEATURE_ERROR.on(reportOn, LanguageFeature.Coroutines)) } else if (languageVersionSettings.supportsFeature(LanguageFeature.WarnOnCoroutines)) { diagnosticHolder.report(Errors.EXPERIMENTAL_FEATURE_WARNING.on(reportOn, LanguageFeature.Coroutines)) } } private fun checkRestrictsSuspension( enclosingCallableDescriptor: CallableDescriptor, resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext ) { val enclosingSuspendReceiverValue = enclosingCallableDescriptor.extensionReceiverParameter?.value ?: return fun ReceiverValue.isRestrictsSuspensionReceiver() = (type.supertypes() + type).any { it.constructor.declarationDescriptor?.hasRestrictsSuspensionAnnotation() == true } infix fun ReceiverValue.sameInstance(other: ReceiverValue?): Boolean { if (other == null) return false if (this === other) return true val referenceExpression = ((other as? ExpressionReceiver)?.expression as? KtThisExpression)?.instanceReference val referenceTarget = referenceExpression?.let { context.trace.get(BindingContext.REFERENCE_TARGET, referenceExpression) } return this === (referenceTarget as? CallableDescriptor)?.extensionReceiverParameter?.value } if (!enclosingSuspendReceiverValue.isRestrictsSuspensionReceiver()) return // member of suspend receiver if (enclosingSuspendReceiverValue sameInstance resolvedCall.dispatchReceiver) return if (enclosingSuspendReceiverValue sameInstance resolvedCall.extensionReceiver && resolvedCall.candidateDescriptor.extensionReceiverParameter!!.value.isRestrictsSuspensionReceiver()) return context.trace.report(Errors.ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL.on(reportOn)) }
49.809524
150
0.744878
3b7edf0787835ab3d2ae82a873d469d237d3aa78
508
h
C
LYSGoogleAd/Classes/LYSGoogleAd.h
MrLiuYS/LYSGoogleAd
ef3ec37a03df67635cbb5a9f4aab5c2dc55bbc32
[ "MIT" ]
null
null
null
LYSGoogleAd/Classes/LYSGoogleAd.h
MrLiuYS/LYSGoogleAd
ef3ec37a03df67635cbb5a9f4aab5c2dc55bbc32
[ "MIT" ]
null
null
null
LYSGoogleAd/Classes/LYSGoogleAd.h
MrLiuYS/LYSGoogleAd
ef3ec37a03df67635cbb5a9f4aab5c2dc55bbc32
[ "MIT" ]
null
null
null
// // LYSGoogleAd.h // Pods // // Created by 刘永生 on 2017/3/4. // // #import <Foundation/Foundation.h> @interface LYSGoogleAd : NSObject + (LYSGoogleAd *)shareInstance; /** 横幅广告的广告id @param unitID 广告id */ + (void)lys_adBannerUnitID:(NSString *)unitID; /** 显示横幅广告 @param vc 视图 */ + (void)lys_showGadBannerVC:(UIViewController *)vc; /** 插页广告的广告id @param unitID 广告id */ + (void)lys_adInterstitialUnitID:(NSString *)unitID; + (void)lys_showInterstitialVC:(UIViewController *)vc; @end
11.288889
54
0.677165
ae0ccb9c2a224c5db88bcb48d684384633c2a54e
9,346
rs
Rust
src/clock/traceconfig/mod.rs
braun-embedded/nrf52
c52a2915bfcf57f27a7cf650b77a79bd418679cb
[ "Apache-2.0", "MIT" ]
1
2021-07-06T15:09:06.000Z
2021-07-06T15:09:06.000Z
src/clock/traceconfig/mod.rs
braun-embedded/nrf52
c52a2915bfcf57f27a7cf650b77a79bd418679cb
[ "Apache-2.0", "MIT" ]
null
null
null
src/clock/traceconfig/mod.rs
braun-embedded/nrf52
c52a2915bfcf57f27a7cf650b77a79bd418679cb
[ "Apache-2.0", "MIT" ]
null
null
null
#[doc = r" Value read from the register"] pub struct R { bits: u32, } #[doc = r" Value to write to the register"] pub struct W { bits: u32, } impl super::TRACECONFIG { #[doc = r" Modifies the contents of the register"] #[inline] pub fn modify<F>(&self, f: F) where for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, { let bits = self.register.get(); let r = R { bits: bits }; let mut w = W { bits: bits }; f(&r, &mut w); self.register.set(w.bits); } #[doc = r" Reads the contents of the register"] #[inline] pub fn read(&self) -> R { R { bits: self.register.get(), } } #[doc = r" Writes to the register"] #[inline] pub fn write<F>(&self, f: F) where F: FnOnce(&mut W) -> &mut W, { let mut w = W::reset_value(); f(&mut w); self.register.set(w.bits); } #[doc = r" Writes the reset value to the register"] #[inline] pub fn reset(&self) { self.write(|w| w) } } #[doc = "Possible values of the field `TRACEPORTSPEED`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum TRACEPORTSPEEDR { #[doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)"] _32MHZ, #[doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)"] _16MHZ, #[doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)"] _8MHZ, #[doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)"] _4MHZ, } impl TRACEPORTSPEEDR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { TRACEPORTSPEEDR::_32MHZ => 0, TRACEPORTSPEEDR::_16MHZ => 1, TRACEPORTSPEEDR::_8MHZ => 2, TRACEPORTSPEEDR::_4MHZ => 3, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> TRACEPORTSPEEDR { match value { 0 => TRACEPORTSPEEDR::_32MHZ, 1 => TRACEPORTSPEEDR::_16MHZ, 2 => TRACEPORTSPEEDR::_8MHZ, 3 => TRACEPORTSPEEDR::_4MHZ, _ => unreachable!(), } } #[doc = "Checks if the value of the field is `_32MHZ`"] #[inline] pub fn is_32mhz(&self) -> bool { *self == TRACEPORTSPEEDR::_32MHZ } #[doc = "Checks if the value of the field is `_16MHZ`"] #[inline] pub fn is_16mhz(&self) -> bool { *self == TRACEPORTSPEEDR::_16MHZ } #[doc = "Checks if the value of the field is `_8MHZ`"] #[inline] pub fn is_8mhz(&self) -> bool { *self == TRACEPORTSPEEDR::_8MHZ } #[doc = "Checks if the value of the field is `_4MHZ`"] #[inline] pub fn is_4mhz(&self) -> bool { *self == TRACEPORTSPEEDR::_4MHZ } } #[doc = "Possible values of the field `TRACEMUX`"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum TRACEMUXR { #[doc = "GPIOs multiplexed onto all trace-pins"] GPIO, #[doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] SERIAL, #[doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] PARALLEL, #[doc = r" Reserved"] _Reserved(u8), } impl TRACEMUXR { #[doc = r" Value of the field as raw bits"] #[inline] pub fn bits(&self) -> u8 { match *self { TRACEMUXR::GPIO => 0, TRACEMUXR::SERIAL => 1, TRACEMUXR::PARALLEL => 2, TRACEMUXR::_Reserved(bits) => bits, } } #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _from(value: u8) -> TRACEMUXR { match value { 0 => TRACEMUXR::GPIO, 1 => TRACEMUXR::SERIAL, 2 => TRACEMUXR::PARALLEL, i => TRACEMUXR::_Reserved(i), } } #[doc = "Checks if the value of the field is `GPIO`"] #[inline] pub fn is_gpio(&self) -> bool { *self == TRACEMUXR::GPIO } #[doc = "Checks if the value of the field is `SERIAL`"] #[inline] pub fn is_serial(&self) -> bool { *self == TRACEMUXR::SERIAL } #[doc = "Checks if the value of the field is `PARALLEL`"] #[inline] pub fn is_parallel(&self) -> bool { *self == TRACEMUXR::PARALLEL } } #[doc = "Values that can be written to the field `TRACEPORTSPEED`"] pub enum TRACEPORTSPEEDW { #[doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)"] _32MHZ, #[doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)"] _16MHZ, #[doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)"] _8MHZ, #[doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)"] _4MHZ, } impl TRACEPORTSPEEDW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { TRACEPORTSPEEDW::_32MHZ => 0, TRACEPORTSPEEDW::_16MHZ => 1, TRACEPORTSPEEDW::_8MHZ => 2, TRACEPORTSPEEDW::_4MHZ => 3, } } } #[doc = r" Proxy"] pub struct _TRACEPORTSPEEDW<'a> { w: &'a mut W, } impl<'a> _TRACEPORTSPEEDW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: TRACEPORTSPEEDW) -> &'a mut W { { self.bits(variant._bits()) } } #[doc = "32 MHz Trace Port clock (TRACECLK = 16 MHz)"] #[inline] pub fn _32mhz(self) -> &'a mut W { self.variant(TRACEPORTSPEEDW::_32MHZ) } #[doc = "16 MHz Trace Port clock (TRACECLK = 8 MHz)"] #[inline] pub fn _16mhz(self) -> &'a mut W { self.variant(TRACEPORTSPEEDW::_16MHZ) } #[doc = "8 MHz Trace Port clock (TRACECLK = 4 MHz)"] #[inline] pub fn _8mhz(self) -> &'a mut W { self.variant(TRACEPORTSPEEDW::_8MHZ) } #[doc = "4 MHz Trace Port clock (TRACECLK = 2 MHz)"] #[inline] pub fn _4mhz(self) -> &'a mut W { self.variant(TRACEPORTSPEEDW::_4MHZ) } #[doc = r" Writes raw bits to the field"] #[inline] pub fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 3; const OFFSET: u8 = 0; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } #[doc = "Values that can be written to the field `TRACEMUX`"] pub enum TRACEMUXW { #[doc = "GPIOs multiplexed onto all trace-pins"] GPIO, #[doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] SERIAL, #[doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] PARALLEL, } impl TRACEMUXW { #[allow(missing_docs)] #[doc(hidden)] #[inline] pub fn _bits(&self) -> u8 { match *self { TRACEMUXW::GPIO => 0, TRACEMUXW::SERIAL => 1, TRACEMUXW::PARALLEL => 2, } } } #[doc = r" Proxy"] pub struct _TRACEMUXW<'a> { w: &'a mut W, } impl<'a> _TRACEMUXW<'a> { #[doc = r" Writes `variant` to the field"] #[inline] pub fn variant(self, variant: TRACEMUXW) -> &'a mut W { unsafe { self.bits(variant._bits()) } } #[doc = "GPIOs multiplexed onto all trace-pins"] #[inline] pub fn gpio(self) -> &'a mut W { self.variant(TRACEMUXW::GPIO) } #[doc = "SWO multiplexed onto P0.18, GPIO multiplexed onto other trace pins"] #[inline] pub fn serial(self) -> &'a mut W { self.variant(TRACEMUXW::SERIAL) } #[doc = "TRACECLK and TRACEDATA multiplexed onto P0.20, P0.18, P0.16, P0.15 and P0.14."] #[inline] pub fn parallel(self) -> &'a mut W { self.variant(TRACEMUXW::PARALLEL) } #[doc = r" Writes raw bits to the field"] #[inline] pub unsafe fn bits(self, value: u8) -> &'a mut W { const MASK: u8 = 3; const OFFSET: u8 = 16; self.w.bits &= !((MASK as u32) << OFFSET); self.w.bits |= ((value & MASK) as u32) << OFFSET; self.w } } impl R { #[doc = r" Value of the register as raw bits"] #[inline] pub fn bits(&self) -> u32 { self.bits } #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] #[inline] pub fn traceportspeed(&self) -> TRACEPORTSPEEDR { TRACEPORTSPEEDR::_from({ const MASK: u8 = 3; const OFFSET: u8 = 0; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] #[inline] pub fn tracemux(&self) -> TRACEMUXR { TRACEMUXR::_from({ const MASK: u8 = 3; const OFFSET: u8 = 16; ((self.bits >> OFFSET) & MASK as u32) as u8 }) } } impl W { #[doc = r" Reset value of the register"] #[inline] pub fn reset_value() -> W { W { bits: 0 } } #[doc = r" Writes raw bits to the register"] #[inline] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.bits = bits; self } #[doc = "Bits 0:1 - Speed of Trace Port clock. Note that the TRACECLK pin will output this clock divided by two."] #[inline] pub fn traceportspeed(&mut self) -> _TRACEPORTSPEEDW { _TRACEPORTSPEEDW { w: self } } #[doc = "Bits 16:17 - Pin multiplexing of trace signals."] #[inline] pub fn tracemux(&mut self) -> _TRACEMUXW { _TRACEMUXW { w: self } } }
29.115265
118
0.542906
48134b1f377f7e47564e5178d5320cdf95f457a0
1,606
kt
Kotlin
packages/@simpli/cli-server/generator/injected/src/test/module/ProcessTest.kt
simplitech/simpli-cli
8c6a7f85da614627e205fca68125317d2732adcc
[ "MIT" ]
3
2018-04-05T12:45:23.000Z
2020-09-14T00:31:04.000Z
packages/@simpli/cli-server/generator/injected/src/test/module/ProcessTest.kt
simplitech/simpli-cli
8c6a7f85da614627e205fca68125317d2732adcc
[ "MIT" ]
79
2019-02-06T19:35:42.000Z
2022-02-13T19:58:38.000Z
packages/@simpli/cli-server/generator/injected/src/test/module/ProcessTest.kt
simplitech/simpli-cli
8c6a7f85da614627e205fca68125317d2732adcc
[ "MIT" ]
null
null
null
<%_ var packageAddress = options.serverSetup.packageAddress _%> <%_ var moduleName = options.serverSetup.moduleName _%> <%_ var userTable = options.serverSetup.userTable _%> <%_ var accountColumn = options.serverSetup.accountColumn _%> <%_ var passwordColumn = options.serverSetup.passwordColumn _%> <%_ var database = options.serverSetup.connection.database _%> package <%-packageAddress%>.<%-moduleName%> import <%-packageAddress%>.AppTest import <%-packageAddress%>.<%-moduleName%>.context.RequestContext import <%-packageAddress%>.<%-moduleName%>.request.AuthRequest import <%-packageAddress%>.<%-moduleName%>.response.AuthResponse import <%-packageAddress%>.app.Facade.Env import <%-packageAddress%>.model.resource.<%-userTable.modelName%> import br.com.simpli.tools.SecurityUtils.sha256 /** * Extended class of handle tests * @author Simpli CLI generator */ open class ProcessTest: AppTest() { protected val context = RequestContext(transacConnector, param) protected val <%-userTable.instanceName%> = <%-userTable.modelName%>().apply { <%-userTable.idColumn.name%> = Env.TESTER_ID <%-accountColumn.name%> = Env.TESTER_LOGIN <%-passwordColumn.name%> = sha256(Env.TESTER_PASSWORD) } protected val authRequest: AuthRequest protected val token: String protected val auth: AuthResponse init { authRequest = AuthRequest(<%-userTable.instanceName%>.<%-accountColumn.name%>, <%-userTable.instanceName%>.<%-passwordColumn.name%>) token = authRequest.toToken() auth = AuthResponse(token, <%-userTable.instanceName%>) } }
40.15
140
0.723537
ce0ae1b87cb015c7657cdc61fcb6c19f16124bb4
670
h
C
test/messages/DF_test_message_defs.h
pitt-rnel/rnel_dragonfly
b5687945fa3ff7b73e57f0a9a40c0c0c7aebe881
[ "BSD-3-Clause" ]
null
null
null
test/messages/DF_test_message_defs.h
pitt-rnel/rnel_dragonfly
b5687945fa3ff7b73e57f0a9a40c0c0c7aebe881
[ "BSD-3-Clause" ]
null
null
null
test/messages/DF_test_message_defs.h
pitt-rnel/rnel_dragonfly
b5687945fa3ff7b73e57f0a9a40c0c0c7aebe881
[ "BSD-3-Clause" ]
null
null
null
/* * messages ids */ // message request 1: just a signal, no fields // provider will send back predefined values #define MT_REQUEST_TEST_1 101 // message request 2: message with fields // values send will be copied in reply #define MT_REQUEST_TEST_2 102 // reply message #define MT_REPLY_TEST 103 /* * messages definition */ // message request 2 structure typedef struct { char tss[32]; char string1[64]; char string2[128]; int number1; float number2; } MDF_REQUEST_TEST_2; // message reply structure typedef struct { char tss[32]; char tsr[32]; char string1[64]; char string2[128]; int number1; float number2; } MDF_REPLY_TEST;
17.631579
46
0.707463
1699ba02233cae2c1b6a56fe0458963186f53bfa
212
swift
Swift
ios/PostFeed/PostFeed/Model/Posts.swift
ridoan01/fun
d5acf48be029c44b0621da766540bf495b5ba97d
[ "MIT" ]
null
null
null
ios/PostFeed/PostFeed/Model/Posts.swift
ridoan01/fun
d5acf48be029c44b0621da766540bf495b5ba97d
[ "MIT" ]
null
null
null
ios/PostFeed/PostFeed/Model/Posts.swift
ridoan01/fun
d5acf48be029c44b0621da766540bf495b5ba97d
[ "MIT" ]
null
null
null
// // Posts.swift // PostFeed // // Created by Ridoan Wibisono on 30/07/21. // import Foundation struct Posts : Codable, Hashable { var userId : Int var id : Int var title : String var body : String }
12.470588
43
0.650943
b1318f1322fa3b4abea6fa11e5c0d6ada4dd2d57
109
css
CSS
src/css/rtl.collapsible.css
osuslov/nyc-lib
7ad16c0d20a9a581dfaa5cd300765bbd311d6a20
[ "Apache-2.0" ]
null
null
null
src/css/rtl.collapsible.css
osuslov/nyc-lib
7ad16c0d20a9a581dfaa5cd300765bbd311d6a20
[ "Apache-2.0" ]
null
null
null
src/css/rtl.collapsible.css
osuslov/nyc-lib
7ad16c0d20a9a581dfaa5cd300765bbd311d6a20
[ "Apache-2.0" ]
null
null
null
.translated-rtl .clps>button:before { float: right; } .translated-rtl .clps>button { text-align: right; }
18.166667
37
0.697248
0cb93959fe2a17c6bba6b5049a41d091d98ecf1d
1,174
py
Python
slixmpp/plugins/xep_0421/stanza.py
cnngimenez/slixmpp
bb61f0f39dfba205282dab50c0f3a47b26145c74
[ "BSD-3-Clause" ]
null
null
null
slixmpp/plugins/xep_0421/stanza.py
cnngimenez/slixmpp
bb61f0f39dfba205282dab50c0f3a47b26145c74
[ "BSD-3-Clause" ]
null
null
null
slixmpp/plugins/xep_0421/stanza.py
cnngimenez/slixmpp
bb61f0f39dfba205282dab50c0f3a47b26145c74
[ "BSD-3-Clause" ]
null
null
null
""" Slixmpp: The Slick XMPP Library Copyright (C) 2020 "Maxime “pep” Buquet <pep@bouah.net>" This file is part of Slixmpp. See the file LICENSE for copying permission. """ from slixmpp.xmlstream import ElementBase NS = 'urn:xmpp:occupant-id:0' class OccupantId(ElementBase): ''' An Occupant-id tag. An <occupant-id/> tag is set by the MUC. This is useful in semi-anon MUCs (and MUC-PMs) as a stable identifier to prevent the usual races with nicknames. Without occupant-id, getting the following messages from MUC history would prevent a client from asserting senders are the same entity: <message type='groupchat' from='foo@muc/nick1' id='message1'> <body>Some message</body> <occupant-id xmlns='urn:xmpp:occupant-id:0' id='unique-opaque-id1'/> </message> <message type='groupchat' from='foo@muc/nick2' id='message2'> <body>Some correction</body> <occupant-id xmlns='urn:xmpp:occupant-id:0' id='unique-opaque-id1'/> <replace xmlns='urn:xmpp:message-correct:0' id='message1'/> </message> ''' name = 'occupant-id' namespace = NS interface = {'id'}
28.634146
78
0.663543
854717e96a040bdd7f43187d24ad3e371377cac0
4,175
rs
Rust
benches/benchmark.rs
coder543/zapper
d790e21a1fa5fa2c9346edcff0cef450c7cc5ebe
[ "MIT" ]
116
2018-06-26T11:29:13.000Z
2022-01-07T07:53:26.000Z
benches/benchmark.rs
coder543/zap
d790e21a1fa5fa2c9346edcff0cef450c7cc5ebe
[ "MIT" ]
2
2018-06-28T05:28:58.000Z
2018-07-13T07:21:28.000Z
benches/benchmark.rs
coder543/zap
d790e21a1fa5fa2c9346edcff0cef450c7cc5ebe
[ "MIT" ]
2
2018-12-18T11:41:33.000Z
2019-01-30T21:53:19.000Z
extern crate handlebars; #[macro_use] extern crate zapper; #[macro_use] extern crate criterion; use criterion::Criterion; #[macro_use] extern crate serde_derive; extern crate serde_json; use handlebars::{to_json, Handlebars}; use zapper::compile; #[derive(Clone, ZapperRunner, Serialize)] #[filter = "sqrt/0n"] #[filter = "round/1n"] #[filter = "toupper/0s"] struct Person { id: u64, name: String, age: u32, weight: f64, } #[derive(ZapperEnv)] #[runner = "Person"] struct Provider { provider: String, provider_code: u32, } fn sqrt(_data: &Person, _args: &[f64], input: f64) -> f64 { input.sqrt() } fn round(_data: &Person, args: &[f64], input: f64) -> f64 { let digits = args[0]; let factor = 10u32.pow(digits as u32) as f64; let value = (input * factor).round() as f64; value / factor } fn toupper(_data: &Person, _args: &[f64], input: &str, buffer: &mut String) { for c in input.as_bytes() { buffer.push(c.to_ascii_uppercase() as char) } } fn bench_zapper(c: &mut Criterion) { let template = "{{provider}} {{provider_code}} {{id}} {{name}} {{age}} {{weight}}kg\n"; let env = Provider { provider: "apns".to_string(), provider_code: 31, }; let mut bytecode = match compile(template, &env) { Ok(bc) => bc, Err(err) => { eprintln!("error compiling template: {}", err); return; } }; // build up a group of 1000 (similar) people let mut group = vec![]; for i in 0..1000 { group.push(Person { id: 12 + i, name: "Bob".to_string(), age: 49, weight: 170.3 + i as f64, }); } c.bench_function("zapper", move |b| { b.iter(|| { let mut output = Vec::new(); for person in &group { bytecode.render(person, &mut output).unwrap(); } output }) }); } fn bench_zapper_par(c: &mut Criterion) { let template = "{{provider}} {{provider_code}} {{id}} {{name}} {{age}} {{weight}}kg\n"; let env = Provider { provider: "apns".to_string(), provider_code: 31, }; let bytecode = match compile(template, &env) { Ok(bc) => bc, Err(err) => { eprintln!("error compiling template: {}", err); return; } }; // build up a group of 1000 (similar) people let mut group = vec![]; for i in 0..1000 { group.push(Person { id: 12 + i, name: "Bob".to_string(), age: 49, weight: 170.3 + i as f64, }); } c.bench_function("zapper_par", move |b| { b.iter(|| { let mut output = Vec::new(); bytecode.par_render(&group, &mut output, 50).unwrap(); output }) }); } fn bench_hbs(c: &mut Criterion) { use serde_json::value::Map; let template = "{{#each group as |p| ~}}{{provider}} {{provider_code}} {{p.id}} {{p.name}} {{p.age}} {{p.weight}}kg\n{{/each~}}"; let mut handlebars = Handlebars::new(); handlebars .register_template_string("table", template) .unwrap(); let mut group = vec![]; for i in 0..1000 { group.push(Person { id: 12 + i, name: "Bob".to_string(), age: 49, weight: 170.3 + i as f64, }); } let mut data = Map::new(); data.insert("provider".to_string(), to_json(&"apns".to_string())); data.insert("provider_code".to_string(), to_json(&"35".to_string())); c.bench_function("hbs", move |b| { b.iter(|| { let mut data = data.clone(); data.insert("group".to_string(), to_json(&group)); handlebars.render("table", &data).unwrap() }) }); } pub fn benches() { use std::time::Duration; let mut criterion: Criterion = Criterion::default() .configure_from_args() .sample_size(200) .measurement_time(Duration::from_secs(40)); bench_zapper(&mut criterion); bench_zapper_par(&mut criterion); bench_hbs(&mut criterion); } criterion_main!(benches);
25.30303
133
0.540359
9a47323dad88088519b67aaf9253c1e30606c186
57
sql
SQL
services/movies/src/db/create.sql
jMac029/movies-w-microservices
241ecce79b45c797b9db5e1f894715fd4ffa9e1d
[ "MIT" ]
271
2017-05-12T14:49:21.000Z
2022-03-02T14:42:57.000Z
services/movies/src/db/create.sql
jMac029/movies-w-microservices
241ecce79b45c797b9db5e1f894715fd4ffa9e1d
[ "MIT" ]
2
2017-06-23T08:05:41.000Z
2017-10-09T23:00:01.000Z
services/movies/src/db/create.sql
jMac029/movies-w-microservices
241ecce79b45c797b9db5e1f894715fd4ffa9e1d
[ "MIT" ]
168
2017-05-12T03:58:35.000Z
2022-03-20T04:51:49.000Z
CREATE DATABASE movies_dev; CREATE DATABASE movies_test;
19
28
0.859649
b429921b698a4abd88b74b588d71802e3739ffb8
314
kt
Kotlin
src/luciferMain/kotlin/model/NetworkMetadata.kt
reubenfirmin/lucifer
5c1b4875dc5b70236e6294bab6cfe3e9563a00a1
[ "BSD-2-Clause" ]
1
2022-01-31T04:34:41.000Z
2022-01-31T04:34:41.000Z
src/luciferMain/kotlin/model/NetworkMetadata.kt
reubenfirmin/lucifer
5c1b4875dc5b70236e6294bab6cfe3e9563a00a1
[ "BSD-2-Clause" ]
1
2021-12-19T19:02:45.000Z
2021-12-19T19:45:03.000Z
src/luciferMain/kotlin/model/NetworkMetadata.kt
reubenfirmin/lucifer
5c1b4875dc5b70236e6294bab6cfe3e9563a00a1
[ "BSD-2-Clause" ]
null
null
null
package model data class NetworkMetadata(val pid: Int, val fd: Int, val localIp: String, val localPort: String, val peerIp: String, val peerPort: String, val bytesReceived: Long, val bytesSent: Long, val lastReceived: Int, val lastSent: Int, val org: String?)
62.8
117
0.633758
60669f5757d65e22b805a92225c19d9edf0326fa
2,598
html
HTML
server/public/footer.html
rosejcs/xiangqu
388967c3f5f94162267426feb0294b43688a3f4a
[ "MIT" ]
null
null
null
server/public/footer.html
rosejcs/xiangqu
388967c3f5f94162267426feb0294b43688a3f4a
[ "MIT" ]
null
null
null
server/public/footer.html
rosejcs/xiangqu
388967c3f5f94162267426feb0294b43688a3f4a
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="keywords" content="购物 衣服 女装 shop shopping xiangqu 想去 wg" /> <meta name="description" content="想去,买得起的好设计" /> <title>想去_wg_index</title> <link rel="stylesheet" href="./lib/fonts/font_qntbk/iconfont.css" /> <link rel="stylesheet" href="./css/base.css" /> <link rel="stylesheet" href="./css/index.css" /> </head> <body> <!-- #mFooter底部通用版块 --> <footer id="mFooter"> <div class="wrap"> <!-- 1.say&author名人名言 --> <div class="sayAuthor"> <!-- 1.1.say --> <p class="say"> “决定设计哪个产品跟决定如何度过人生一样,最关键是看你的见解。” </p> <!-- 1.2.author --> <p class="author">by <span> 米谷久美</span></p> </div> <!-- 2.copyright 版权声明,社区跳转 --> <div class="copyright clearfix"> <!-- link左侧网站链接 --> <div class="link"> <a href="#"><span class="sina"></span>新浪微博</a> <a href="#"><span class="douban"></span>豆瓣小站</a> <a href="#"><span class="renren"></span>人人小站</a> </div> <!-- copyWord中间版权声明 --> <div class="copyWord"> <p>Copyright 2017 版权所有 xiangqu.com 浙ICP备12027496</p> </div> <!-- goShopLink --> <div class="goShopLink"> <a href="#">热门精选</a> <a href="#">热门分类</a> </div> </div> <!-- 3.friendLink 友情链接合作伙伴 --> <div class="friendLink clearfix"> <ul class="aboutUs clearfix"> <li><a href="#">关于我们</a></li> <li><a href="#">联系我们</a></li> <li><a href="#">用户帮助</a></li> <li><a href="#">商务合作</a></li> </ul> <ul class="theLink"> <li>友情链接:</li> <li><a href="#">想去网</a></li> <li><a href="#">手机想去</a></li> <li><a href="#">爱图购</a></li> <li><a href="#">更多...</a></li> </ul> </div> <!-- 4.工商编号和安全联盟 --> <div class="versionNum clearfix"> <div class="verNum"> <a href="#"> <img src="./img/FinEALw7ifYIV2baxOAzDe1ctz1S" alt="" /> <span>浙公网安备 33010602001965号</span> </a> </div> <div class="unionPic"> <a href="#"> <img src="./img/sm_83x30.png" alt="" /> </a> </div> </div> <!-- 5.wantJoin入驻链接 --> <div class="wantJoin float-r"> <a href="#"><img src="./img/xq_bottom_img.png" alt="" /></a> </div> </div> </footer> <!-- /#mFooter底部通用版块 --> </body> </html>
29.862069
111
0.488068
261116536558ce57795dfa295158e546907cf992
1,236
swift
Swift
Sources/VRMKit/VRM/Camera.swift
drafale/VRMKit
25977a00a732c106e8e6ef24a82324db49e513d8
[ "MIT" ]
91
2018-09-13T10:55:20.000Z
2022-03-30T11:53:25.000Z
Sources/VRMKit/VRM/Camera.swift
drafale/VRMKit
25977a00a732c106e8e6ef24a82324db49e513d8
[ "MIT" ]
14
2019-02-02T04:51:28.000Z
2020-03-17T13:24:01.000Z
Sources/VRMKit/VRM/Camera.swift
drafale/VRMKit
25977a00a732c106e8e6ef24a82324db49e513d8
[ "MIT" ]
15
2018-09-13T04:29:39.000Z
2022-03-28T09:25:23.000Z
// // Camera.swift // VRMKit // // Created by Tatsuya Tanaka on 20180908. // Copyright © 2018年 tattn. All rights reserved. // import Foundation // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#camera extension GLTF { public struct Camera: Codable { public let orthographic: Orthographic? public let perspective: Perspective? public let type: Type public let name: String? public let extensions: CodableAny? public let extras: CodableAny? public struct Orthographic: Codable { public let xmag: Float public let ymag: Float public let zfar: Float public let znear: Float public let extensions: CodableAny? public let extras: CodableAny? } public struct Perspective: Codable { public let aspectRatio: Float? public let yfov: Float public let zfar: Float? public let znear: Float public let extensions: CodableAny? public let extras: CodableAny? } public enum `Type`: String, Codable { case perspective case orthographic } } }
26.869565
86
0.600324
712442c4cc018698556687723a85b8f3b6037f7d
40,643
ts
TypeScript
src/graphics/struct/mat4.ts
wjheesen/hexel-art
1d9b62029e36888cd670a103244164ecd0536726
[ "MIT" ]
null
null
null
src/graphics/struct/mat4.ts
wjheesen/hexel-art
1d9b62029e36888cd670a103244164ecd0536726
[ "MIT" ]
null
null
null
src/graphics/struct/mat4.ts
wjheesen/hexel-art
1d9b62029e36888cd670a103244164ecd0536726
[ "MIT" ]
null
null
null
// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. import * as Rect from "./rect"; import Structure from "../structify/struct"; import StructureBuffer from "../structify/buf"; /** * A 4x4 matrix. */ interface Mat4 { /** * The first entry in the first column of this Mat4. */ c1r1: number; /** * The second entry in the first column of this Mat4. */ c1r2: number; /** * The third entry in the first column of this Mat4. */ c1r3: number; /** * The fourth entry in the first column of this Mat4. */ c1r4: number; /** * The first entry in the second column of this Mat4. */ c2r1: number; /** * The second entry in the second column of this Mat4. */ c2r2: number; /** * The third entry in the second column of this Mat4. */ c2r3: number; /** * The fourth entry in the second column of this Mat4. */ c2r4: number; /** * The first entry in the third column of this Mat4. */ c3r1: number; /** * The second entry in the third column of this Mat4. */ c3r2: number; /** * The third entry in the third column of this Mat4. */ c3r3: number; /** * The fourth entry in the third column of this Mat4. */ c3r4: number; /** * The first entry in the fourth column of this Mat4. */ c4r1: number; /** * The second entry in the fourth column of this Mat4. */ c4r2: number; /** * The third entry in the fourth column of this Mat4. */ c4r3: number; /** * The fourth entry in the fourth column of this Mat4. */ c4r4: number; } export { Mat4 as _}; /** * Sets each component of this Mat4 to that of the other Mat4. */ export function set(_this: Mat4, other: Mat4) { _this.c1r1 = other.c1r1; _this.c1r2 = other.c1r2; _this.c1r3 = other.c1r3; _this.c1r4 = other.c1r4; _this.c2r1 = other.c2r1; _this.c2r2 = other.c2r2; _this.c2r3 = other.c2r3; _this.c2r4 = other.c2r4; _this.c3r1 = other.c3r1; _this.c3r2 = other.c3r2; _this.c3r3 = other.c3r3; _this.c3r4 = other.c3r4; _this.c4r1 = other.c4r1; _this.c4r2 = other.c4r2; _this.c4r3 = other.c4r3; _this.c4r4 = other.c4r4; } /** * Sets each component of this Mat4. */ export function set$(_this: Mat4, c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { _this.c1r1 = c1r1; _this.c1r2 = c1r2; _this.c1r3 = c1r3; _this.c1r4 = c1r4; _this.c2r1 = c2r1; _this.c2r2 = c2r2; _this.c2r3 = c2r3; _this.c2r4 = c2r4; _this.c3r1 = c3r1; _this.c3r2 = c3r2; _this.c3r3 = c3r3; _this.c3r4 = c3r4; _this.c4r1 = c4r1; _this.c4r2 = c4r2; _this.c4r3 = c4r3; _this.c4r4 = c4r4; } /** * Adds the other Mat4 to this Mat4 componentwise. */ export function add(_this: Mat4, other: Mat4) { _this.c1r1 += other.c1r1; _this.c1r2 += other.c1r2; _this.c1r3 += other.c1r3; _this.c1r4 += other.c1r4; _this.c2r1 += other.c2r1; _this.c2r2 += other.c2r2; _this.c2r3 += other.c2r3; _this.c2r4 += other.c2r4; _this.c3r1 += other.c3r1; _this.c3r2 += other.c3r2; _this.c3r3 += other.c3r3; _this.c3r4 += other.c3r4; _this.c4r1 += other.c4r1; _this.c4r2 += other.c4r2; _this.c4r3 += other.c4r3; _this.c4r4 += other.c4r4; } /** * Adds the specified values to this Mat4 componentwise. */ export function add$(_this: Mat4, c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { _this.c1r1 += c1r1; _this.c1r2 += c1r2; _this.c1r3 += c1r3; _this.c1r4 += c1r4; _this.c2r1 += c2r1; _this.c2r2 += c2r2; _this.c2r3 += c2r3; _this.c2r4 += c2r4; _this.c3r1 += c3r1; _this.c3r2 += c3r2; _this.c3r3 += c3r3; _this.c3r4 += c3r4; _this.c4r1 += c4r1; _this.c4r2 += c4r2; _this.c4r3 += c4r3; _this.c4r4 += c4r4; } /** * Subtracts the other Mat4 from this Mat4 componentwise. */ export function subtract(_this: Mat4, other: Mat4) { _this.c1r1 -= other.c1r1; _this.c1r2 -= other.c1r2; _this.c1r3 -= other.c1r3; _this.c1r4 -= other.c1r4; _this.c2r1 -= other.c2r1; _this.c2r2 -= other.c2r2; _this.c2r3 -= other.c2r3; _this.c2r4 -= other.c2r4; _this.c3r1 -= other.c3r1; _this.c3r2 -= other.c3r2; _this.c3r3 -= other.c3r3; _this.c3r4 -= other.c3r4; _this.c4r1 -= other.c4r1; _this.c4r2 -= other.c4r2; _this.c4r3 -= other.c4r3; _this.c4r4 -= other.c4r4; } /** * Subtracts the specified values from this Mat4 componentwise. */ export function subtract$(_this: Mat4, c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { _this.c1r1 -= c1r1; _this.c1r2 -= c1r2; _this.c1r3 -= c1r3; _this.c1r4 -= c1r4; _this.c2r1 -= c2r1; _this.c2r2 -= c2r2; _this.c2r3 -= c2r3; _this.c2r4 -= c2r4; _this.c3r1 -= c3r1; _this.c3r2 -= c3r2; _this.c3r3 -= c3r3; _this.c3r4 -= c3r4; _this.c4r1 -= c4r1; _this.c4r2 -= c4r2; _this.c4r3 -= c4r3; _this.c4r4 -= c4r4; } /** * Multiplies each component of this Mat4 by the specified scalar. */ export function mulScalar(_this: Mat4, k: number) { _this.c1r1 *= k; _this.c1r2 *= k; _this.c1r3 *= k; _this.c1r4 *= k; _this.c2r1 *= k; _this.c2r2 *= k; _this.c2r3 *= k; _this.c2r4 *= k; _this.c3r1 *= k; _this.c3r2 *= k; _this.c3r3 *= k; _this.c3r4 *= k; _this.c4r1 *= k; _this.c4r2 *= k; _this.c4r3 *= k; _this.c4r4 *= k; } /** * Divides each component of this Mat4 by the specified scalar. */ export function divScalar(_this: Mat4, k: number) { _this.c1r1 /= k; _this.c1r2 /= k; _this.c1r3 /= k; _this.c1r4 /= k; _this.c2r1 /= k; _this.c2r2 /= k; _this.c2r3 /= k; _this.c2r4 /= k; _this.c3r1 /= k; _this.c3r2 /= k; _this.c3r3 /= k; _this.c3r4 /= k; _this.c4r1 /= k; _this.c4r2 /= k; _this.c4r3 /= k; _this.c4r4 /= k; } /** * Checks if each component of this Mat4 is equal to that of the other Mat4. */ export function equals(_this: Mat4, other: Mat4) { return _this.c1r1 === other.c1r1 && _this.c1r2 === other.c1r2 && _this.c1r3 === other.c1r3 && _this.c1r4 === other.c1r4 && _this.c2r1 === other.c2r1 && _this.c2r2 === other.c2r2 && _this.c2r3 === other.c2r3 && _this.c2r4 === other.c2r4 && _this.c3r1 === other.c3r1 && _this.c3r2 === other.c3r2 && _this.c3r3 === other.c3r3 && _this.c3r4 === other.c3r4 && _this.c4r1 === other.c4r1 && _this.c4r2 === other.c4r2 && _this.c4r3 === other.c4r3 && _this.c4r4 === other.c4r4; } /** * Checks if each component of this Mat4 is equal to the specified scalar. */ export function equalsScalar(_this: Mat4, k: number) { return _this.c1r1 === k && _this.c1r2 === k && _this.c1r3 === k && _this.c1r4 === k && _this.c2r1 === k && _this.c2r2 === k && _this.c2r3 === k && _this.c2r4 === k && _this.c3r1 === k && _this.c3r2 === k && _this.c3r3 === k && _this.c3r4 === k && _this.c4r1 === k && _this.c4r2 === k && _this.c4r3 === k && _this.c4r4 === k; } /** * Checks if each component of this Mat4 is approximately equal to that of the other Mat4. */ export function epsilonEquals(_this: Mat4, other: Mat4, e: number) { return Math.abs(_this.c1r1 - other.c1r1) <= e && Math.abs(_this.c1r2 - other.c1r2) <= e && Math.abs(_this.c1r3 - other.c1r3) <= e && Math.abs(_this.c1r4 - other.c1r4) <= e && Math.abs(_this.c2r1 - other.c2r1) <= e && Math.abs(_this.c2r2 - other.c2r2) <= e && Math.abs(_this.c2r3 - other.c2r3) <= e && Math.abs(_this.c2r4 - other.c2r4) <= e && Math.abs(_this.c3r1 - other.c3r1) <= e && Math.abs(_this.c3r2 - other.c3r2) <= e && Math.abs(_this.c3r3 - other.c3r3) <= e && Math.abs(_this.c3r4 - other.c3r4) <= e && Math.abs(_this.c4r1 - other.c4r1) <= e && Math.abs(_this.c4r2 - other.c4r2) <= e && Math.abs(_this.c4r3 - other.c4r3) <= e && Math.abs(_this.c4r4 - other.c4r4) <= e; } /** * Checks if each component of this Mat4 is approximately equal to the specified scalar. */ export function epsilonEqualsScalar(_this: Mat4, k: number, e: number) { return Math.abs(_this.c1r1 - k) <= e && Math.abs(_this.c1r2 - k) <= e && Math.abs(_this.c1r3 - k) <= e && Math.abs(_this.c1r4 - k) <= e && Math.abs(_this.c2r1 - k) <= e && Math.abs(_this.c2r2 - k) <= e && Math.abs(_this.c2r3 - k) <= e && Math.abs(_this.c2r4 - k) <= e && Math.abs(_this.c3r1 - k) <= e && Math.abs(_this.c3r2 - k) <= e && Math.abs(_this.c3r3 - k) <= e && Math.abs(_this.c3r4 - k) <= e && Math.abs(_this.c4r1 - k) <= e && Math.abs(_this.c4r2 - k) <= e && Math.abs(_this.c4r3 - k) <= e && Math.abs(_this.c4r4 - k) <= e; } /** * Returns a string representation of this Mat4. */ export function toString(_this: Mat4) { return `{ c1r1: ${_this.c1r1}, c1r2: ${_this.c1r2}, c1r3: ${_this.c1r3}, c1r4: ${_this.c1r4}, c2r1: ${_this.c2r1}, c2r2: ${_this.c2r2}, c2r3: ${_this.c2r3}, c2r4: ${_this.c2r4}, c3r1: ${_this.c3r1}, c3r2: ${_this.c3r2}, c3r3: ${_this.c3r3}, c3r4: ${_this.c3r4}, c4r1: ${_this.c4r1}, c4r2: ${_this.c4r2}, c4r3: ${_this.c4r3}, c4r4: ${_this.c4r4} }` } /** * Sets this Mat4 to an othogonal transformation matrix given the * dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ export function ortho(_this: Mat4, clip: Rect._, near: number, far: number) { ortho$(_this, clip.left, clip.right, clip.bottom, clip.top, near, far); } /** * Sets this Mat4 to an othogonal transformation matrix given the left, right, * bottom, and top dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ export function ortho$(_this: Mat4, left: number, right: number, bottom: number, top: number, near: number, far: number) { let width = right - left, height = top - bottom, depth = near - far; _this.c1r1 = 2 / width; _this.c1r2 = 0; _this.c1r3 = 0; _this.c1r4 = 0; _this.c2r1 = 0; _this.c2r2 = 2 / height; _this.c2r3 = 0; _this.c2r4 = 0; _this.c3r1 = 0; _this.c3r2 = 0; _this.c3r3 = 1 / depth; _this.c3r4 = 0; _this.c4r1 = -(right + left) / width; _this.c4r2 = -(top + bottom) / height; _this.c4r3 = -near / depth; _this.c4r4 = 1; } /** * A 4x4 matrix. */ export class Obj { static create(other: Mat4) { let Mat4 = new Obj(); Mat4.set(other); return Mat4; } static create$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { let Mat4 = new Obj(); Mat4.set$(c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); return Mat4; } /** * The first entry in the first column of this Mat4. */ c1r1: number; /** * The second entry in the first column of this Mat4. */ c1r2: number; /** * The third entry in the first column of this Mat4. */ c1r3: number; /** * The fourth entry in the first column of this Mat4. */ c1r4: number; /** * The first entry in the second column of this Mat4. */ c2r1: number; /** * The second entry in the second column of this Mat4. */ c2r2: number; /** * The third entry in the second column of this Mat4. */ c2r3: number; /** * The fourth entry in the second column of this Mat4. */ c2r4: number; /** * The first entry in the third column of this Mat4. */ c3r1: number; /** * The second entry in the third column of this Mat4. */ c3r2: number; /** * The third entry in the third column of this Mat4. */ c3r3: number; /** * The fourth entry in the third column of this Mat4. */ c3r4: number; /** * The first entry in the fourth column of this Mat4. */ c4r1: number; /** * The second entry in the fourth column of this Mat4. */ c4r2: number; /** * The third entry in the fourth column of this Mat4. */ c4r3: number; /** * The fourth entry in the fourth column of this Mat4. */ c4r4: number; /** * Sets each component of this Mat4 to that of the other Mat4. */ set(other: Mat4) { return set(this, other); } /** * Sets each component of this Mat4. */ set$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return set$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Adds the other Mat4 to this Mat4 componentwise. */ add(other: Mat4) { return add(this, other); } /** * Adds the specified values to this Mat4 componentwise. */ add$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return add$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Subtracts the other Mat4 from this Mat4 componentwise. */ subtract(other: Mat4) { return subtract(this, other); } /** * Subtracts the specified values from this Mat4 componentwise. */ subtract$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return subtract$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Multiplies each component of this Mat4 by the specified scalar. */ mulScalar(k: number) { return mulScalar(this, k); } /** * Divides each component of this Mat4 by the specified scalar. */ divScalar(k: number) { return divScalar(this, k); } /** * Checks if each component of this Mat4 is equal to that of the other Mat4. */ equals(other: Mat4) { return equals(this, other); } /** * Checks if each component of this Mat4 is equal to the specified scalar. */ equalsScalar(k: number) { return equalsScalar(this, k); } /** * Checks if each component of this Mat4 is approximately equal to that of the other Mat4. */ epsilonEquals(other: Mat4, e: number) { return epsilonEquals(this, other, e); } /** * Checks if each component of this Mat4 is approximately equal to the specified scalar. */ epsilonEqualsScalar(k: number, e: number) { return epsilonEqualsScalar(this, k, e); } /** * Returns a string representation of this Mat4. */ toString() { return toString(this); } /** * Sets this Mat4 to an othogonal transformation matrix given the * dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ ortho(clip: Rect._, near: number, far: number) { return ortho(this, clip, near, far); } /** * Sets this Mat4 to an othogonal transformation matrix given the left, right, * bottom, and top dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ ortho$(left: number, right: number, bottom: number, top: number, near: number, far: number) { return ortho$(this, left, right, bottom, top, near, far); } } /** * A Mat4 backed by a Float32Array. */ export class Struct extends Structure<Float32Array> { static create(other: Mat4) { let Mat4 = new Struct(); Mat4.set(other); return Mat4; } static create$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { let Mat4 = new Struct(); Mat4.set$(c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); return Mat4; } /** * Creates a Mat4 struct. */ constructor() { super(new Float32Array(16)); } /** * The first entry in the first column of this Mat4. */ get c1r1() { return this.data[0]; } /** * The first entry in the first column of this Mat4. */ set c1r1(value: number) { this.data[0] = value; } /** * The second entry in the first column of this Mat4. */ get c1r2() { return this.data[1]; } /** * The second entry in the first column of this Mat4. */ set c1r2(value: number) { this.data[1] = value; } /** * The third entry in the first column of this Mat4. */ get c1r3() { return this.data[2]; } /** * The third entry in the first column of this Mat4. */ set c1r3(value: number) { this.data[2] = value; } /** * The fourth entry in the first column of this Mat4. */ get c1r4() { return this.data[3]; } /** * The fourth entry in the first column of this Mat4. */ set c1r4(value: number) { this.data[3] = value; } /** * The first entry in the second column of this Mat4. */ get c2r1() { return this.data[4]; } /** * The first entry in the second column of this Mat4. */ set c2r1(value: number) { this.data[4] = value; } /** * The second entry in the second column of this Mat4. */ get c2r2() { return this.data[5]; } /** * The second entry in the second column of this Mat4. */ set c2r2(value: number) { this.data[5] = value; } /** * The third entry in the second column of this Mat4. */ get c2r3() { return this.data[6]; } /** * The third entry in the second column of this Mat4. */ set c2r3(value: number) { this.data[6] = value; } /** * The fourth entry in the second column of this Mat4. */ get c2r4() { return this.data[7]; } /** * The fourth entry in the second column of this Mat4. */ set c2r4(value: number) { this.data[7] = value; } /** * The first entry in the third column of this Mat4. */ get c3r1() { return this.data[8]; } /** * The first entry in the third column of this Mat4. */ set c3r1(value: number) { this.data[8] = value; } /** * The second entry in the third column of this Mat4. */ get c3r2() { return this.data[9]; } /** * The second entry in the third column of this Mat4. */ set c3r2(value: number) { this.data[9] = value; } /** * The third entry in the third column of this Mat4. */ get c3r3() { return this.data[10]; } /** * The third entry in the third column of this Mat4. */ set c3r3(value: number) { this.data[10] = value; } /** * The fourth entry in the third column of this Mat4. */ get c3r4() { return this.data[11]; } /** * The fourth entry in the third column of this Mat4. */ set c3r4(value: number) { this.data[11] = value; } /** * The first entry in the fourth column of this Mat4. */ get c4r1() { return this.data[12]; } /** * The first entry in the fourth column of this Mat4. */ set c4r1(value: number) { this.data[12] = value; } /** * The second entry in the fourth column of this Mat4. */ get c4r2() { return this.data[13]; } /** * The second entry in the fourth column of this Mat4. */ set c4r2(value: number) { this.data[13] = value; } /** * The third entry in the fourth column of this Mat4. */ get c4r3() { return this.data[14]; } /** * The third entry in the fourth column of this Mat4. */ set c4r3(value: number) { this.data[14] = value; } /** * The fourth entry in the fourth column of this Mat4. */ get c4r4() { return this.data[15]; } /** * The fourth entry in the fourth column of this Mat4. */ set c4r4(value: number) { this.data[15] = value; } /** * Sets each component of this Mat4 to that of the other Mat4. */ set(other: Mat4) { return set(this, other); } /** * Sets each component of this Mat4. */ set$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return set$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Adds the other Mat4 to this Mat4 componentwise. */ add(other: Mat4) { return add(this, other); } /** * Adds the specified values to this Mat4 componentwise. */ add$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return add$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Subtracts the other Mat4 from this Mat4 componentwise. */ subtract(other: Mat4) { return subtract(this, other); } /** * Subtracts the specified values from this Mat4 componentwise. */ subtract$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return subtract$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Multiplies each component of this Mat4 by the specified scalar. */ mulScalar(k: number) { return mulScalar(this, k); } /** * Divides each component of this Mat4 by the specified scalar. */ divScalar(k: number) { return divScalar(this, k); } /** * Checks if each component of this Mat4 is equal to that of the other Mat4. */ equals(other: Mat4) { return equals(this, other); } /** * Checks if each component of this Mat4 is equal to the specified scalar. */ equalsScalar(k: number) { return equalsScalar(this, k); } /** * Checks if each component of this Mat4 is approximately equal to that of the other Mat4. */ epsilonEquals(other: Mat4, e: number) { return epsilonEquals(this, other, e); } /** * Checks if each component of this Mat4 is approximately equal to the specified scalar. */ epsilonEqualsScalar(k: number, e: number) { return epsilonEqualsScalar(this, k, e); } /** * Returns a string representation of this Mat4. */ toString() { return toString(this); } /** * Sets this Mat4 to an othogonal transformation matrix given the * dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ ortho(clip: Rect._, near: number, far: number) { return ortho(this, clip, near, far); } /** * Sets this Mat4 to an othogonal transformation matrix given the left, right, * bottom, and top dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ ortho$(left: number, right: number, bottom: number, top: number, near: number, far: number) { return ortho$(this, left, right, bottom, top, near, far); } } /** * A Mat4 buffer backed by a Float32Array. */ export class Buf extends StructureBuffer<Float32Array> { /** * Creates an empty Mat4 buffer with the specified Mat4 capacity. */ static create(capacity: number) { return new Buf(new Float32Array(capacity * 16)); } /** * The first entry in the first column of the current Mat4. */ get c1r1() { return this.data[this.dataPosition + 0]; } /** * The first entry in the first column of the current Mat4. */ set c1r1(value: number) { this.data[this.dataPosition + 0] = value; } /** * The second entry in the first column of the current Mat4. */ get c1r2() { return this.data[this.dataPosition + 1]; } /** * The second entry in the first column of the current Mat4. */ set c1r2(value: number) { this.data[this.dataPosition + 1] = value; } /** * The third entry in the first column of the current Mat4. */ get c1r3() { return this.data[this.dataPosition + 2]; } /** * The third entry in the first column of the current Mat4. */ set c1r3(value: number) { this.data[this.dataPosition + 2] = value; } /** * The fourth entry in the first column of the current Mat4. */ get c1r4() { return this.data[this.dataPosition + 3]; } /** * The fourth entry in the first column of the current Mat4. */ set c1r4(value: number) { this.data[this.dataPosition + 3] = value; } /** * The first entry in the second column of the current Mat4. */ get c2r1() { return this.data[this.dataPosition + 4]; } /** * The first entry in the second column of the current Mat4. */ set c2r1(value: number) { this.data[this.dataPosition + 4] = value; } /** * The second entry in the second column of the current Mat4. */ get c2r2() { return this.data[this.dataPosition + 5]; } /** * The second entry in the second column of the current Mat4. */ set c2r2(value: number) { this.data[this.dataPosition + 5] = value; } /** * The third entry in the second column of the current Mat4. */ get c2r3() { return this.data[this.dataPosition + 6]; } /** * The third entry in the second column of the current Mat4. */ set c2r3(value: number) { this.data[this.dataPosition + 6] = value; } /** * The fourth entry in the second column of the current Mat4. */ get c2r4() { return this.data[this.dataPosition + 7]; } /** * The fourth entry in the second column of the current Mat4. */ set c2r4(value: number) { this.data[this.dataPosition + 7] = value; } /** * The first entry in the third column of the current Mat4. */ get c3r1() { return this.data[this.dataPosition + 8]; } /** * The first entry in the third column of the current Mat4. */ set c3r1(value: number) { this.data[this.dataPosition + 8] = value; } /** * The second entry in the third column of the current Mat4. */ get c3r2() { return this.data[this.dataPosition + 9]; } /** * The second entry in the third column of the current Mat4. */ set c3r2(value: number) { this.data[this.dataPosition + 9] = value; } /** * The third entry in the third column of the current Mat4. */ get c3r3() { return this.data[this.dataPosition + 10]; } /** * The third entry in the third column of the current Mat4. */ set c3r3(value: number) { this.data[this.dataPosition + 10] = value; } /** * The fourth entry in the third column of the current Mat4. */ get c3r4() { return this.data[this.dataPosition + 11]; } /** * The fourth entry in the third column of the current Mat4. */ set c3r4(value: number) { this.data[this.dataPosition + 11] = value; } /** * The first entry in the fourth column of the current Mat4. */ get c4r1() { return this.data[this.dataPosition + 12]; } /** * The first entry in the fourth column of the current Mat4. */ set c4r1(value: number) { this.data[this.dataPosition + 12] = value; } /** * The second entry in the fourth column of the current Mat4. */ get c4r2() { return this.data[this.dataPosition + 13]; } /** * The second entry in the fourth column of the current Mat4. */ set c4r2(value: number) { this.data[this.dataPosition + 13] = value; } /** * The third entry in the fourth column of the current Mat4. */ get c4r3() { return this.data[this.dataPosition + 14]; } /** * The third entry in the fourth column of the current Mat4. */ set c4r3(value: number) { this.data[this.dataPosition + 14] = value; } /** * The fourth entry in the fourth column of the current Mat4. */ get c4r4() { return this.data[this.dataPosition + 15]; } /** * The fourth entry in the fourth column of the current Mat4. */ set c4r4(value: number) { this.data[this.dataPosition + 15] = value; } /** * Gets the number of components in a Mat4, namely 16. */ structLength() { return 16; } /** * Sets each component of the Mat4 at the specified position. */ set$(position: number, c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { let dataPos = position * this.structLength(); this.data[dataPos++] = c1r1; this.data[dataPos++] = c1r2; this.data[dataPos++] = c1r3; this.data[dataPos++] = c1r4; this.data[dataPos++] = c2r1; this.data[dataPos++] = c2r2; this.data[dataPos++] = c2r3; this.data[dataPos++] = c2r4; this.data[dataPos++] = c3r1; this.data[dataPos++] = c3r2; this.data[dataPos++] = c3r3; this.data[dataPos++] = c3r4; this.data[dataPos++] = c4r1; this.data[dataPos++] = c4r2; this.data[dataPos++] = c4r3; this.data[dataPos++] = c4r4; } /** * Sets each component of the current Mat4, then moves to the next position of this buffer. */ put$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { this.data[this.dataPosition++] = c1r1; this.data[this.dataPosition++] = c1r2; this.data[this.dataPosition++] = c1r3; this.data[this.dataPosition++] = c1r4; this.data[this.dataPosition++] = c2r1; this.data[this.dataPosition++] = c2r2; this.data[this.dataPosition++] = c2r3; this.data[this.dataPosition++] = c2r4; this.data[this.dataPosition++] = c3r1; this.data[this.dataPosition++] = c3r2; this.data[this.dataPosition++] = c3r3; this.data[this.dataPosition++] = c3r4; this.data[this.dataPosition++] = c4r1; this.data[this.dataPosition++] = c4r2; this.data[this.dataPosition++] = c4r3; this.data[this.dataPosition++] = c4r4; } /** * Sets each component of the current Mat4 to that of the other Mat4. */ $set(other: Mat4) { return set(this, other); } /** * Sets each component of the current Mat4. */ $set$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return set$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Adds the other Mat4 to the current Mat4 componentwise. */ $add(other: Mat4) { return add(this, other); } /** * Adds the specified values to the current Mat4 componentwise. */ $add$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return add$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Subtracts the other Mat4 from the current Mat4 componentwise. */ $subtract(other: Mat4) { return subtract(this, other); } /** * Subtracts the specified values from the current Mat4 componentwise. */ $subtract$(c1r1: number, c1r2: number, c1r3: number, c1r4: number, c2r1: number, c2r2: number, c2r3: number, c2r4: number, c3r1: number, c3r2: number, c3r3: number, c3r4: number, c4r1: number, c4r2: number, c4r3: number, c4r4: number) { return subtract$(this, c1r1, c1r2, c1r3, c1r4, c2r1, c2r2, c2r3, c2r4, c3r1, c3r2, c3r3, c3r4, c4r1, c4r2, c4r3, c4r4); } /** * Multiplies each component of the current Mat4 by the specified scalar. */ $mulScalar(k: number) { return mulScalar(this, k); } /** * Divides each component of the current Mat4 by the specified scalar. */ $divScalar(k: number) { return divScalar(this, k); } /** * Checks if each component of the current Mat4 is equal to that of the other Mat4. */ $equals(other: Mat4) { return equals(this, other); } /** * Checks if each component of the current Mat4 is equal to the specified scalar. */ $equalsScalar(k: number) { return equalsScalar(this, k); } /** * Checks if each component of the current Mat4 is approximately equal to that of the other Mat4. */ $epsilonEquals(other: Mat4, e: number) { return epsilonEquals(this, other, e); } /** * Checks if each component of the current Mat4 is approximately equal to the specified scalar. */ $epsilonEqualsScalar(k: number, e: number) { return epsilonEqualsScalar(this, k, e); } /** * Returns a string representation of the current Mat4. */ $toString() { return toString(this); } /** * Sets the current Mat4 to an othogonal transformation matrix given the * dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ $ortho(clip: Rect._, near: number, far: number) { return ortho(this, clip, near, far); } /** * Sets the current Mat4 to an othogonal transformation matrix given the left, right, * bottom, and top dimensions of the near clipping plane as well as the * near and far clipping plane distances. * @param left left side of the near clipping plane viewport. * @param right side of the near clipping plane viewport. * @param top top of the near clipping plane viewport. * @param bottom bottom of the near clipping plane viewport. * @param near the depth (negative z coordinate) of the near clipping plane. * @param far the depth (negative z coordinate) of the far clipping plane. * @param dst where to store the result. Defaults to new Mat4. * @returns the ortho matrix. */ $ortho$(left: number, right: number, bottom: number, top: number, near: number, far: number) { return ortho$(this, left, right, bottom, top, near, far); } }
30.535687
680
0.59752
6506db5995970d6837a7164f54f13ccdaecfc008
1,651
py
Python
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
9
2021-04-21T04:21:01.000Z
2021-06-19T19:33:36.000Z
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
null
null
null
steampipe_alchemy/models/aws_route53_resolver_rule.py
RyanJarv/steampipe_alchemy
c8a31303252c1bd8d83d0f9c429d7d0ef7e1690f
[ "BSD-3-Clause" ]
1
2021-04-26T21:08:20.000Z
2021-04-26T21:08:20.000Z
from sqlalchemy import Column from sqlalchemy.types import JSON, Text, Boolean, TIMESTAMP, BigInteger from sqlalchemy.dialects import postgresql as psql from steampipe_alchemy.mixins import FormatMixins from steampipe_alchemy import Base class AwsRoute53ResolverRule(Base, FormatMixins): __tablename__ = 'aws_route53_resolver_rule' tags = Column('tags', JSON, nullable=True) akas = Column('akas', JSON, nullable=True) target_ips = Column('target_ips', JSON, nullable=True) tags_src = Column('tags_src', JSON, nullable=True) resolver_rule_associations = Column('resolver_rule_associations', JSON, nullable=True) domain_name = Column('domain_name', Text, nullable=True) owner_id = Column('owner_id', Text, nullable=True) resolver_endpoint_id = Column('resolver_endpoint_id', Text, nullable=True) rule_type = Column('rule_type', Text, nullable=True) share_status = Column('share_status', Text, nullable=True) status_message = Column('status_message', Text, nullable=True) creation_time = Column('creation_time', Text, nullable=True) modification_time = Column('modification_time', Text, nullable=True) title = Column('title', Text, nullable=True) partition = Column('partition', Text, nullable=True) region = Column('region', Text, nullable=True) name = Column('name', Text, nullable=True) account_id = Column('account_id', Text, nullable=True) id = Column('id', Text, nullable=True) arn = Column('arn', Text, primary_key=True, nullable=True) status = Column('status', Text, nullable=True) creator_request_id = Column('creator_request_id', Text, nullable=True)
53.258065
90
0.740763
afc46e39484bcde35dd1fbd2915ff8aa19237709
9,490
sql
SQL
SQL/MDS/System Changes + Updates/MDS Monitored Entities + Stations - Update.sql
MMeaney/General-Code
f55575e0e5c5f4733f6e6b480bfb2103565009f5
[ "Apache-1.1" ]
null
null
null
SQL/MDS/System Changes + Updates/MDS Monitored Entities + Stations - Update.sql
MMeaney/General-Code
f55575e0e5c5f4733f6e6b480bfb2103565009f5
[ "Apache-1.1" ]
null
null
null
SQL/MDS/System Changes + Updates/MDS Monitored Entities + Stations - Update.sql
MMeaney/General-Code
f55575e0e5c5f4733f6e6b480bfb2103565009f5
[ "Apache-1.1" ]
null
null
null
-- ************************************************** -- *** Update station / monitored entity details -- ************************************************** USE [EdenMDS-PRD] SELECT * FROM dbo.tblStation_sta WHERE NationalCode_sta IN ( 'LS360012319200010', 'LS360012332300040', 'LS360012332300050', 'LS360012332300060', 'LS360012332300070', 'LS360012332300080', 'LS360012332300090', 'LS360012332300100', 'LS360012332300020', 'LS360012332300030' ) --SELECT * FROM tblOrganisation_org WHERE OrganisationId_org IN (11, 12, 13) --SELECT * FROM tblMonitoredEntity_men WHERE MonitoredEntityId_men IN ('26292', '26288') BEGIN TRANSACTION UPDATE dbo.tblMonitoredEntity_men SET OwnerOrganisationId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_men = GETDATE() , RevisionComment_men = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE MonitoredEntityId_men = '26292' UPDATE dbo.tblMonitoredEntity_men SET OwnerOrganisationId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_men = GETDATE() , RevisionComment_men = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE MonitoredEntityId_men = '26288' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012319200010' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300040' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300050' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300060' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300070' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300080' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300090' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300100' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300020' UPDATE dbo.tblStation_sta SET RiverBasinDistrictId_org = '13' , LastUpdatedBy_usr = '1179' , LastUpdateDate_sta = GETDATE() , RevisionComment_sta = 'UPDATED 2016-01-28 RBD changed from RBD6 Neagh Bann IRBD to RBD7 North Western IRBD after discussion with GIS' WHERE NationalCode_sta = 'LS360012332300030' --COMMIT TRANSACTION ----ROLLBACK TRANSACTION -- */ -- ******************* -- *** Update Station --Existing code Change to --LS070015911700010 to LS070015911706310 --LS070015911700020 to LS070015911706320 --LS070015911700030 to LS070015911706330 --LS070015911700040 to LS070015911706340 --LS070015911703100 to LS070015911706350 --LS260155a03220010 to LS260155a03226310 --LS260155a03223100 to LS260155a03226320 --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS070015911706310' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS070015911700010 to LS070015911706310' --WHERE NationalCode_sta = 'LS070015911700010' --COMMIT TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS070015911706320' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS070015911700020 to LS070015911706320' --WHERE NationalCode_sta = 'LS070015911700020' --COMMIT TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS070015911706330' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS070015911700030 to LS070015911706330' --WHERE NationalCode_sta = 'LS070015911700030' --COMMIT TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS070015911706340' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS070015911700040 to LS070015911706340' --WHERE NationalCode_sta = 'LS070015911700040' --COMMIT TRANSACTION ----LS070015911703100 to LS070015911706350 ----LS260155a03220010 to LS260155a03226310 ----LS260155a03223100 to LS260155a03226320 --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS070015911706350' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS070015911703100 to LS070015911706350' --WHERE NationalCode_sta = 'LS070015911703100' --COMMIT TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS260155a03226310' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS260155a03220010 to LS260155a03226310' --WHERE NationalCode_sta = 'LS260155a03220010' --COMMIT TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS260155a03226320' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 changed station code from LS260155a03223100 to LS260155a03226320' --WHERE NationalCode_sta = 'LS260155a03223100' --COMMIT TRANSACTION ----ROLLBACK TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --RiverBasinDistrictId_org = '12' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-22 15:12:14.100' --, RevisionComment_sta = 'UPDATED 2015-10-22 RBD reverted change from "Neagh Bann IRBD" TO "North Western IRBD"' --WHERE NationalCode_sta = 'LS360012319200010' ----COMMIT TRANSACTION ------ROLLBACK TRANSACTION --BEGIN TRANSACTION --UPDATE dbo.tblStation_sta --SET --NationalCode_sta = 'LS260155a03226310' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_sta = '2015-10-20 12:30:00.000' --, RevisionComment_sta = 'UPDATED 2015-10-20 Station Code updated from LS260155a03220010 to LS260155a03226310' --WHERE StationId_sta = '86284' --COMMIT TRANSACTION ----ROLLBACK TRANSACTION -- *************************** -- *** Update Montitored Entity --BEGIN TRANSACTION --UPDATE dbo.tblMonitoredEntity_men --SET --OwnerOrganisationId_org = '11' --, Version_men = '2' --, LastUpdatedBy_usr = '1179' --, LastUpdateDate_men = '2015-10-19 10:14:12.000' --, RevisionComment_men = 'UPDATED 2015-10-19 RBD updated from "Shannon IRBD" TO "Western RBD"' --WHERE NationalCode_men = '27001581900' --COMMIT TRANSACTION ----ROLLBACK TRANSACTION -- ******************************************** -- *** Determine monitored entities / stations --SELECT * FROM dbo.tblStation_sta WHERE NationalCode_sta = 'LS360012319200010' --SELECT * FROM dbo.tblMonitoredEntity_men WHERE NationalCode_men = '27001581900' --SELECT * FROM dbo.tblOrganisation_org ORG --INNER JOIN dbo.tblStringDefinition_std STD ON ORG.Name_stg = std.StringID_stg --WHERE STD.LanguageID_lan = '1' --SELECT * FROM tblUser_usr --WHERE UserID_usr = 161 --WHERE Email_usr = 'm.meaney@epa.ie' -- 1179
35.410448
137
0.735195
7d5d267e7340fe47f5a34ba032fb103d6a1eae32
8,597
html
HTML
2019/10/23/getting-promotion-value-from-order/index.html
marisks/marisks.github.com
f9a77c243963c7932868b0bb40f0286c6b13d675
[ "MIT" ]
null
null
null
2019/10/23/getting-promotion-value-from-order/index.html
marisks/marisks.github.com
f9a77c243963c7932868b0bb40f0286c6b13d675
[ "MIT" ]
null
null
null
2019/10/23/getting-promotion-value-from-order/index.html
marisks/marisks.github.com
f9a77c243963c7932868b0bb40f0286c6b13d675
[ "MIT" ]
null
null
null
<!DOCTYPE html><!--if lt IE 8html.no-js.lt-ie9.lt-ie8(lang="en")--><!--if IE 8html.no-js.lt-ie9(lang="en")--><!--if gt IE 8html.no-js(lang="en")--><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Getting promotion value from the order | marisks # code</title><meta name="description" content="Episerver provides a simple API to get an order's and line item's monetary discount value. Though sometimes you have to know more about the discount. I will show you how to get a percentage or monetary value from the promotions applied to the order."><meta name="keywords" content=".NET, ASP.NET, C#, JavaScript, Optimizely, EPiServer, programming languages"><meta name="viewport" content="width=device-width, initial-scale=1"><!--Place favicon.ico and apple-touch-icon.png in the root directory--><meta name="generator" content="DocPad v6.79.4" /><!-- Google Tag Manager--><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-WDKMR7');</script><!-- End Google Tag Manager--><link rel="icon" sizes="16x16 32x32" href="/favicon.ico?v=1"><link rel="stylesheet" href="/css/vendor/normalize.css" /><link rel="stylesheet" href="/css/vendor/main.css" /><link rel="stylesheet" href="/css/vendor/bootstrap.min.css" /><link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" /><link rel="stylesheet" href="/css/style.css" /><script src="/js/vendor/modernizr-2.6.2.min.js"></script></head><body><!-- Google Tag Manager--><noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-WDKMR7" height="0" width="0" style="display: none; visibility: hidden;"></iframe></noscript><!-- End Google Tag Manager--><!--if lt IE 8p.browsehappy |You are using an strong |outdated browser |. Please a(href="http://browsehappy.com/") |upgrade your browser |to improve your experience. --><div id="wrap"><div role="navigation" class="navbar navbar-ornament navbar-fixed-top"><div class="container"><div class="navbar-header"><a href="/" class="navbar-brand">marisks # code</a></div></div></div><div class="container"><div class="row"><div class="col-sm-8"><article><header><h1>Getting promotion value from the order</h1><p class="meta"><time datetime="2019-10-23T00:00:00.000Z">Wed Oct 23 2019</time></p></header><div class="lead"><p>Episerver provides a simple API to get an order&#39;s and line item&#39;s monetary discount value. Though sometimes you have to know more about the discount. I will show you how to get a percentage or monetary value from the promotions applied to the order.</p> </div><p><code>IOrderForm</code> has a property with all promotions applied to the order. Each promotion record provides information about the saved monetary amount, about the type of the reward, has a reference to the promotion data and more information. But it lacks information about the percentage value of promotion if a promotion&#39;s type is a percentage.</p> <p>The only way to get the percentage value of the promotion is by loading the promotion by a reference and then getting its value.</p> <pre><code class="lang-csharp">public static decimal GetDiscountValue(this PromotionInformation promotionInfo, IContentLoader contentLoader) { if (promotionInfo.RewardType != RewardType.Percentage) { return promotionInfo.SavedAmount; } if (contentLoader.TryGet&lt;PromotionData&gt;(promotionInfo.PromotionGuid, out var promotion) &amp;&amp; promotion is IMonetaryDiscount monetaryDiscount) { return monetaryDiscount.Discount.Percentage; } return promotionInfo.SavedAmount; } </code></pre> <p>Here I have created an extension method to get the correct value based on a reward type. When the reward type is not a percentage, return saved amount value from the promotion. Otherwise, load the promotion and return percentage value. Only the promotion of <code>IMonetaryDiscount</code> can have a percentage value.</p> <p>Now you can use this method to get a percentage or monetary value like this:</p> <pre><code class="lang-csharp">public void WorkOnPromotionValue(IOrderForm orderForm, IContentLoader contentLoader) { var promotion = orderForm.Promotions.First(); var value = promotion.GetDiscountValue(contentLoader); if (promotion.RewardType == RewardType.Percentage) { var percentage = value; // Do some work with percentage ... } else { var money = value; // Do some work with money ... } } </code></pre> <p>It would be much better if Episerver would store percentage value in the order too. Promotions might be removed, and it will not be possible to get the percentage value anymore. And promotions are removed quite often as too many promotions severely affect the site&#39;s performance when calculating discounted price.</p> </article><div id="disqus_thread"></div><script>/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'marisksblog'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();</script><noscript>Please enable JavaScript to view the<a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a><a href="http://disqus.com" class="dsq-brlink">comments powered by<span class="logo-disqus">Disqus</span></a></noscript></div><div class="col-sm-1"><aside class="archive"><ul class="nav"><li><a href="/">2021</a></li><li><a href="/2020/">2020</a></li><li class="active"><a href="/2019/">2019</a></li><li><a href="/2018/">2018</a></li><li><a href="/2017/">2017</a></li><li><a href="/2016/">2016</a></li><li><a href="/2015/">2015</a></li><li><a href="/2014/">2014</a></li><li><a href="/2013/">2013</a></li><li><a href="/2012/">2012</a></li></ul></aside></div><div class="col-sm-3"><aside class="panel panel-default"><div class="panel-body"><div class="about"><img src="/img/common/profile_0021.jpg" alt="profile picture" class="center-block img-responsive thumbnail"><p>Hi! I'm Māris Krivtežs. I am Web developer primarily working with ASP.NET, EPiServer and front-end development at&nbsp;<a href="http://geta.no" target="_blank">Geta</a>, but same time learning different programming languages, learning new programming paradigms, architectures, and design. I spend my free time with my family, reading books, bicycling and traveling.</p></div><ul class="social"><li><a href="http://stackoverflow.com/users/660154/marisks" target="_blank"><i class="fa fa-stack-overflow"></i></a></li><li><a href="https://github.com/marisks" target="_blank"><i class="fa fa-github-alt"></i></a></li><li><a href="https://twitter.com/pioners1001" target="_blank"><i class="fa fa-twitter"></i></a></li><li><a href="http://www.linkedin.com/pub/maris-krivtezs/31/98b/b53" target="_blank"><i class="fa fa-linkedin"></i></a></li><li><a href="/rss.xml" target="_blank"><i class="fa fa-rss"></i></a></li></ul><a href="https://getadigital.com" target="_blank"><img src="/img/common/ident-geta-wordmark.svg" alt="Geta logo" class="center-block img-responsive aside-logo"></a></div></aside></div></div></div></div><div id="footer"><div class="container"><div class="container credit">Copyright &copy; 2017 Maris Krivtezs. All Rights Reserved, except for the parts enumerated below:<ul class="licence-list"><li>- The source code examples on this blog are covered by&nbsp;<a href="https://opensource.org/licenses/mit-license.php">MIT License</a>.</li><li>- This page content, excluding the visual design and the logotype, is covered by&nbsp;<a href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</li></ul></div></div></div><script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script><script>window.jQuery || document.write('<script src="/js/vendor/jquery-1.10.2.min.js"><\/script>')</script><script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script><script src="/js/plugins.js"></script><script src="/js/main.js"></script></body>
140.934426
2,932
0.714668
c2371ddb1d59269c92cd83466da06317bdb19f1c
745
kt
Kotlin
src/test/kotlin/com/igorwojda/string/reverse/challenge.kt
ioana-condrea/kotlin-coding-challenges
83dcf9cdb98ffafb5d70c333941f394f3a1fb04e
[ "MIT" ]
null
null
null
src/test/kotlin/com/igorwojda/string/reverse/challenge.kt
ioana-condrea/kotlin-coding-challenges
83dcf9cdb98ffafb5d70c333941f394f3a1fb04e
[ "MIT" ]
null
null
null
src/test/kotlin/com/igorwojda/string/reverse/challenge.kt
ioana-condrea/kotlin-coding-challenges
83dcf9cdb98ffafb5d70c333941f394f3a1fb04e
[ "MIT" ]
null
null
null
package com.igorwojda.string.reverse import org.amshove.kluent.shouldBeEqualTo import org.junit.jupiter.api.Test private fun reverse(str: String): String { var reversedString = "" (str.length - 1 downTo 0).forEach { reversedString += str[it] } return reversedString } private class Test { @Test fun `Reverse of "" is ""`() { reverse("") shouldBeEqualTo "" } @Test fun `Reverse of "a!32a" is "a23!a"`() { reverse("a!32a") shouldBeEqualTo "a23!a" } @Test fun `Reverse of "abcd" is "dcba"`() { reverse("abcd") shouldBeEqualTo "dcba" } @Test fun `Reverse of "aabbccdd" is "ccbbaadd"`() { reverse("aabbccdd") shouldBeEqualTo "ddccbbaa" } }
21.285714
54
0.602685
40deb3165996274c92f17ea37bd725fa6a786353
590
kt
Kotlin
ontrack-ui-graphql/src/main/java/net/nemerosa/ontrack/graphql/service/GraphQLService.kt
nemerosa/ontrack
d23f775162d64ffd4efeab08b231b934502107e1
[ "MIT" ]
102
2015-01-22T14:34:53.000Z
2022-03-25T09:58:04.000Z
ontrack-ui-graphql/src/main/java/net/nemerosa/ontrack/graphql/service/GraphQLService.kt
nemerosa/ontrack
d23f775162d64ffd4efeab08b231b934502107e1
[ "MIT" ]
736
2015-01-01T13:27:13.000Z
2022-03-24T18:39:39.000Z
ontrack-ui-graphql/src/main/java/net/nemerosa/ontrack/graphql/service/GraphQLService.kt
nemerosa/ontrack
d23f775162d64ffd4efeab08b231b934502107e1
[ "MIT" ]
35
2015-02-05T22:12:38.000Z
2021-06-24T08:11:19.000Z
package net.nemerosa.ontrack.graphql.service import graphql.ExecutionResult /** * Execution of GraphQL queries. */ interface GraphQLService { /** * Executes a GraphQL query * * @param query GraphQL query * @param variables List of variables to associate with the query * @param operationName Optional name of the operation * @return Execution result */ @Throws(GraphQLServiceException::class) fun execute( query: String, variables: Map<String, Any> = mapOf(), operationName: String? = null, ): ExecutionResult }
25.652174
69
0.667797
2158469d745108f8fa2ddd678d636a03235228f2
6,162
sql
SQL
src/mysql_database_setup.sql
arocca1/fantasy-sports-backend
a6c8ce62a50f9056804c4aff8baefe0e9efdf1b5
[ "MIT" ]
1
2020-01-01T18:14:32.000Z
2020-01-01T18:14:32.000Z
src/mysql_database_setup.sql
arocca1/fantasy-sports-backend
a6c8ce62a50f9056804c4aff8baefe0e9efdf1b5
[ "MIT" ]
15
2019-12-29T22:28:14.000Z
2020-01-05T13:08:22.000Z
src/mysql_database_setup.sql
arocca1/fantasy-sports-backend
a6c8ce62a50f9056804c4aff8baefe0e9efdf1b5
[ "MIT" ]
null
null
null
CREATE DATABASE fantasy_sports; USE fantasy_sports; DROP TABLE IF EXISTS season_lineup_position_requirements; DROP TABLE IF EXISTS weekly_scores; DROP TABLE IF EXISTS player_team_records; DROP TABLE IF EXISTS weeks; DROP TABLE IF EXISTS seasons; DROP TABLE IF EXISTS players; DROP TABLE IF EXISTS matchups; DROP TABLE IF EXISTS teams; DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS divisions; DROP TABLE IF EXISTS leagues; DROP TABLE IF EXISTS real_teams; DROP TABLE IF EXISTS positions; DROP TABLE IF EXISTS real_leagues; DROP TABLE IF EXISTS sports; CREATE TABLE sports ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=INNODB; CREATE TABLE real_leagues ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, sportId BIGINT NOT NULL, CONSTRAINT fk_real_leagues_sportId FOREIGN KEY (sportId) REFERENCES sports(id) ) ENGINE=INNODB; CREATE TABLE positions ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, sportId BIGINT NOT NULL, CONSTRAINT fk_positions_sportId FOREIGN KEY (sportId) REFERENCES sports(id) ) ENGINE=INNODB; CREATE TABLE real_teams ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, realLeagueId BIGINT NOT NULL, CONSTRAINT fk_real_teams_realLeagueId FOREIGN KEY (realLeagueId) REFERENCES real_leagues(id) ) ENGINE=INNODB; CREATE TABLE leagues ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, sportId BIGINT NOT NULL, CONSTRAINT fk_leagues_sportId FOREIGN KEY (sportId) REFERENCES sports(id), realLeagueId BIGINT, CONSTRAINT fk_leagues_realLeagueId FOREIGN KEY (realLeagueId) REFERENCES real_leagues(id) ) ENGINE=INNODB; CREATE TABLE divisions ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, leagueId BIGINT NOT NULL, CONSTRAINT fk_divisions_leagueId FOREIGN KEY (leagueId) REFERENCES leagues(id) ) ENGINE=INNODB; CREATE TABLE users ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, realName VARCHAR(255), createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=INNODB; CREATE TABLE teams ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, userId BIGINT, CONSTRAINT fk_teams_userId FOREIGN KEY (userId) REFERENCES users(id), divisionId BIGINT, CONSTRAINT fk_teams_divisionId FOREIGN KEY (divisionId) REFERENCES divisions(id), leagueId BIGINT NOT NULL, CONSTRAINT fk_teams_leagueId FOREIGN KEY (leagueId) REFERENCES leagues(id) ) ENGINE=INNODB; CREATE TABLE matchups ( id BIGINT AUTO_INCREMENT PRIMARY KEY, matchupDate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, homeTeamId BIGINT NOT NULL, CONSTRAINT fk_matchups_homeTeamId FOREIGN KEY (homeTeamId) REFERENCES teams(id), awayTeamId BIGINT NOT NULL, CONSTRAINT fk_matchups_awayTeamId FOREIGN KEY (awayTeamId) REFERENCES teams(id), winningTeamId BIGINT, CONSTRAINT fk_matchups_winningTeamId FOREIGN KEY (winningTeamId) REFERENCES teams(id), losingTeamId BIGINT, CONSTRAINT fk_matchups_losingTeamId FOREIGN KEY (losingTeamId) REFERENCES teams(id) ) ENGINE=INNODB; CREATE TABLE players ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, positionId BIGINT NOT NULL, CONSTRAINT fk_players_positionId FOREIGN KEY (positionId) REFERENCES positions(id), realTeamId BIGINT NOT NULL, CONSTRAINT fk_players_realTeamId FOREIGN KEY (realTeamId) REFERENCES real_teams(id) ) ENGINE=INNODB; CREATE TABLE seasons ( id BIGINT AUTO_INCREMENT PRIMARY KEY, year INT NOT NULL, numWeeks INT NOT NULL, maxTeamSize INT NOT NULL, scoringBreakdown TEXT NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, leagueId BIGINT NOT NULL, CONSTRAINT fk_seasons_leagueId FOREIGN KEY (leagueId) REFERENCES leagues(id) ) ENGINE=INNODB; CREATE TABLE weeks ( id BIGINT AUTO_INCREMENT PRIMARY KEY, num INT NOT NULL, startDate TIMESTAMP NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, seasonId BIGINT NOT NULL, CONSTRAINT fk_weeks_seasonId FOREIGN KEY (seasonId) REFERENCES seasons(id) ) ENGINE=INNODB; CREATE TABLE player_team_records ( id BIGINT AUTO_INCREMENT PRIMARY KEY, isStarter BOOLEAN NOT NULL DEFAULT FALSE, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, playerId BIGINT NOT NULL, CONSTRAINT fk_player_team_records_playerId FOREIGN KEY (playerId) REFERENCES players(id), teamId BIGINT NOT NULL, CONSTRAINT fk_player_team_records_teamId FOREIGN KEY (teamId) REFERENCES teams(id), weekId BIGINT NOT NULL, CONSTRAINT fk_player_team_records_weekId FOREIGN KEY (weekId) REFERENCES weeks(id) ) ENGINE=INNODB; CREATE TABLE weekly_scores ( id BIGINT AUTO_INCREMENT PRIMARY KEY, projectedScore DOUBLE NOT NULL DEFAULT 0.0, actualScore DOUBLE NOT NULL DEFAULT 0.0, scoringBreakdown TEXT NOT NULL, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, weekId BIGINT NOT NULL, CONSTRAINT fk_weekly_scores_weekId FOREIGN KEY (weekId) REFERENCES weeks(id), playerId BIGINT NOT NULL, CONSTRAINT fk_weekly_scores_playerId FOREIGN KEY (playerId) REFERENCES players(id), teamId BIGINT, CONSTRAINT fk_weekly_scores_teamId FOREIGN KEY (teamId) REFERENCES teams(id) ) ENGINE=INNODB; CREATE TABLE season_lineup_position_requirements ( id BIGINT AUTO_INCREMENT PRIMARY KEY, createdAt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, num INT NOT NULL, seasonId BIGINT NOT NULL, CONSTRAINT fk_season_lineup_position_requirements_seasonId FOREIGN KEY (seasonId) REFERENCES seasons(id), positionId BIGINT NOT NULL, CONSTRAINT fk_season_lineup_position_requirements_positionId FOREIGN KEY (positionId) REFERENCES positions(id) ) ENGINE=INNODB;
28.527778
61
0.809964
992da53c606c793f25278152406582bb993719d2
683
c
C
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/arm/aapcs/align2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
7
2020-05-02T17:34:05.000Z
2021-10-17T10:15:18.000Z
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/arm/aapcs/align2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
null
null
null
gcc-gcc-7_3_0-release/gcc/testsuite/gcc.target/arm/aapcs/align2.c
best08618/asylo
5a520a9f5c461ede0f32acc284017b737a43898c
[ "Apache-2.0" ]
2
2020-07-27T00:22:36.000Z
2021-04-01T09:41:02.000Z
/* Test AAPCS layout (alignment). */ /* { dg-do run { target arm_eabi } } */ /* { dg-require-effective-target arm32 } */ /* { dg-options "-O" } */ #ifndef IN_FRAMEWORK #define TESTFILE "align2.c" /* The underlying struct here has alignment 4. */ typedef struct __attribute__((aligned (8))) { int x; int y; } overaligned; /* A couple of instances, at 8-byte-aligned memory locations. */ overaligned a = { 2, 3 }; overaligned b = { 5, 8 }; #include "abitest.h" #else ARG (int, 7, R0) /* Alignment should be 4. */ ARG (overaligned, a, R1) ARG (int, 9, R3) ARG (int, 10, STACK) /* Alignment should be 4. */ LAST_ARG (overaligned, b, STACK + 4) #endif
22.032258
65
0.616398
f738729199a72631379a2c4801ad323fd674f970
359
h
C
jets/rete/rete_types_impl.h
artisoft-io/jetstore
84f8b5d82bbc8fa309571c431a7674ef3ff0e9c2
[ "Apache-2.0" ]
null
null
null
jets/rete/rete_types_impl.h
artisoft-io/jetstore
84f8b5d82bbc8fa309571c431a7674ef3ff0e9c2
[ "Apache-2.0" ]
61
2021-12-29T15:02:53.000Z
2022-03-31T14:53:40.000Z
jets/rete/rete_types_impl.h
artisoft-io/jetstore
84f8b5d82bbc8fa309571c431a7674ef3ff0e9c2
[ "Apache-2.0" ]
null
null
null
#ifndef JETS_RETE_TYPES_IMPL_H #define JETS_RETE_TYPES_IMPL_H #include "../rete/alpha_node_impl.h" #include "../rete/alpha_functors.h" #include "../rete/expr_op_arithmetics.h" #include "../rete/expr_op_logics.h" #include "../rete/expr_op_strings.h" #include "../rete/expr_op_resources.h" #include "../rete/expr_op_others.h" #endif // JETS_RETE_TYPES_IMPL_H
27.615385
40
0.766017
83fa5b2dd76df3d1e965351aa43d6c29fd849e1a
699
rs
Rust
bee-test/src/rand/mod.rs
LouayKamel/bee-p
8b8eda7d348867a076284f0bb07dda176a1e6050
[ "Apache-2.0" ]
null
null
null
bee-test/src/rand/mod.rs
LouayKamel/bee-p
8b8eda7d348867a076284f0bb07dda176a1e6050
[ "Apache-2.0" ]
null
null
null
bee-test/src/rand/mod.rs
LouayKamel/bee-p
8b8eda7d348867a076284f0bb07dda176a1e6050
[ "Apache-2.0" ]
null
null
null
// Copyright 2020 IOTA Stiftung // // 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. pub mod bytes; pub mod input; pub mod integer; pub mod message; pub mod output; pub mod string; pub mod transaction;
36.789474
118
0.758226
053635e0c18dff7a327fe8fe38fcc9ff0515c350
46
rb
Ruby
lib/generators/know_it_all/install/templates/application_policy.rb
mrodrigues/know_it_all
7003ab99d4c9b646dc53a936baa06bbf4cdd4d50
[ "MIT" ]
26
2016-06-30T04:41:34.000Z
2016-07-25T04:36:06.000Z
lib/generators/know_it_all/install/templates/application_policy.rb
oddlyfunctional/know_it_all
7003ab99d4c9b646dc53a936baa06bbf4cdd4d50
[ "MIT" ]
1
2016-07-01T16:48:48.000Z
2016-07-03T01:35:30.000Z
lib/generators/know_it_all/install/templates/application_policy.rb
oddlyfunctional/know_it_all
7003ab99d4c9b646dc53a936baa06bbf4cdd4d50
[ "MIT" ]
2
2016-07-01T04:31:55.000Z
2016-07-01T15:20:44.000Z
class ApplicationPolicy < KnowItAll::Base end
15.333333
41
0.826087
dd85b76c6078f5b7128cbe5020aa0227953ea094
489
go
Go
pkg/kt/util/interpretable_reader.go
hadoop835/kt-connect
6ae53cc1a54f12a724596e30c0b5019fb05d83f1
[ "MIT" ]
null
null
null
pkg/kt/util/interpretable_reader.go
hadoop835/kt-connect
6ae53cc1a54f12a724596e30c0b5019fb05d83f1
[ "MIT" ]
null
null
null
pkg/kt/util/interpretable_reader.go
hadoop835/kt-connect
6ae53cc1a54f12a724596e30c0b5019fb05d83f1
[ "MIT" ]
null
null
null
package util import "io" type InterpretableReader struct { r io.Reader interrupt chan int } func NewInterpretableReader(r io.Reader) InterpretableReader { return InterpretableReader{ r, make(chan int), } } func (r InterpretableReader) Read(p []byte) (n int, err error) { if r.r == nil { return 0, io.EOF } select { case <-r.interrupt: r.r = nil return 0, io.EOF default: return r.r.Read(p) } } func (r InterpretableReader) Cancel() { r.interrupt <- 0 }
14.818182
64
0.666667
6e4add83c3192935f6847f7066ae2828edc6040f
7,657
html
HTML
src/story/eight-lessons-from-the-carleton-ching-nomination.html
ikaikahussey/independent-11
605493298db60a51ce7e7b3b30865480b95fd82d
[ "MIT" ]
null
null
null
src/story/eight-lessons-from-the-carleton-ching-nomination.html
ikaikahussey/independent-11
605493298db60a51ce7e7b3b30865480b95fd82d
[ "MIT" ]
null
null
null
src/story/eight-lessons-from-the-carleton-ching-nomination.html
ikaikahussey/independent-11
605493298db60a51ce7e7b3b30865480b95fd82d
[ "MIT" ]
null
null
null
{ "title": "Eight lessons from the Carleton Ching nomination", "url_title":"eight-lessons-from-the-carleton-ching-nomination", "entry_id":"28162", "channel_id":"70", "author_id":"1", "date":"2015-03-18", "related_index_topic_title":"Ige Administration", "related_index_topic_url":"ige-administration", "page_location":"daily", "teaser":"Governor Ige instigated a political crisis by nominating a developer's lobbyist to watch over Hawaii's natural resources. Here are some of the lessons that this crisis taught Hawaii about our political culture. ", "art_gallery":"http://media.hawaiiindependent.net/media/28162/web_img_6999__large.jpg", "user": "Ikaika M Hussey", "username": "ikaikahussey@gmail.com" } <p>When Governor Ige announced two months ago that he had nominated a developer’s lobbyist to the head of DLNR, many in and out of the capitol scratched their heads. </p> <p>Neil Abercrombie had just lost to Ige for alienating public sector unions and environmentalists, and yet here was a new governor again alienating his environmental base.</p> <p>It&#8217;s been a taxing process for most of the parties involved. </p> <p>Leaders of the &#8220;Chess Club,&#8221; the central faction of the Senate, were forced to vote with their former colleague – Governor Ige – against their own expressed values of good governance and transparency. For the business community, it provided ammunition for anti-developer sentiment.</p> <p>It&#8217;s been expensive for the Governor himself. It appears that he has had to negotiate deals with individual senators to secure votes on this nomination. It will be interesting to see, at the end of this legislative session, if there is a relationship between pork barrel projects and yes votes on the Governor&#8217;s nomination.</p> <p>The Governor has also lost public support for his Administration. More than a thousand pieces of testimony were submitted last week to the Senate Committee evaluating this nomination, and nine of every ten of those testimonies were in opposition. Even the Star-Advertiser, a historically pro-business paper, has spoken out against the nomination. </p> <p>Regardless of how Wednesday&#8217;s Senate vote shakes out, Governor Ige has suffered an unfortunately massive blow to his political stature and public persona in prosecuting this nomination against the recommendation of the Committee Chairperson, Senator Thielen. </p> <p>But it&#8217;s been a learning experience for the Hawaii political sphere. Here&#8217;s some of the lessons to take away:</p> <p><strong>1. It&#8217;s better to fail quickly and try again</strong></p> <p>It was clear, very early on, that the Ching nomination would be a problem for this Administration. It would have saved a lot of time for Governor Ige to withdraw the nomination sooner and move on to a more acceptable candidate.</p> <p><strong>2. Relationships matter in our small town, to a fault.</strong></p> <p>Governor Ige came to office with several assets: strong public union support, a mandate to govern better, and rich personal relationships with his colleagues in the State Senate and House. Those relationships were strained by the Ching nomination process, and my sense is that activists and business people in the city felt de facto pressure to not come out against personal friends. The unintended consequence of this polite silence is that it lengthens the feedback loop before Mr. Ige could change course. Early honesty could have accelerated this process and been less costly.</p> <p><strong>3. Corporate alignment is the default</strong></p> <p>Politics tends to cozy up to the strong arms of big business. And given that the Democratic party is center-right – on the same side as the only Republican Senator! – it seems nearly logical that the lobbyist for a major multinational land and agriculture conglomerate would be a fitting choice for the head of a conservation agency.&nbsp; The choice of this candidate demonstrated the Administration&#8217;s lack of appreciation for the public&#8217;s concern about our environment. </p> <p><strong>4. People vs. money</strong></p> <p>Most environmental groups, such as those that contested Mr. Ching&#8217;s nomination, measure their annual budgets in tens and hundreds of thousands of dollars, or a fraction of a percent of the budget of an organization like Castle &amp; Cooke. What the grassroots have, though, is people, passion, and compelling arguments.</p> <p><strong>5. We need higher expectations for government officials</strong></p> <p>It&#8217;s undoubtedly true that Mr. Ching is a good, honorable man. It&#8217;s also irrelevant. Hawaii deserves the best possible candidate for each position. It&#8217;s common in independent schools, for instance, to embark on national searches for the head of school. Shouldn&#8217;t the manager of two million acres of trust lands be subjected to the same high standards and care? </p> <p>For the head of the DLNR – and for each state agency – the Governor should be looking for the person who would best be able to execute the agency&#8217;s expressed mission. It&#8217;s incumbent on the Governor to move beyond their limited social circles and find the meritorious person, not simply the most expedient from a list of familiar names.</p> <p>And ideally the gubernatorial candidates would launch their campaigns with these key positions filled as part of the value proposition for their election. A ballot for a governor, in Hawaii&#8217;s highly-centralized political system, is really a vote for an entire team of appointed cabinet positions and board members. It&#8217;s surprising that Governor Ige didn&#8217;t use the campaign to build a broad leadership team that could immediately stand for cabinet nominations. This absence speaks to the small, business-heavy circle in which he and his key team runs.</p> <p><strong>7. Appoint the best people to fulfill each agency&#8217;s mission</strong></p> <p>On several occassions Governor Ige described his nomination of a development lobbyist as a desire to bring balance to his administration. It&#8217;s admirable, I suppose, but uses the wrong strategy. It would be better to find an agressive, anti-development, treehugging Green party member to run the DLNR, someone who has imagined for decades how they would decorate their office in the Kalanimoku building. And then appoint a bona fide capitalist – a developer, a marketer, an investment banker – to run DBEDT and its assemblage of business-friendly agencies. Let those two key cabinet officials debate and argue, and the synthesis of their approaches will be richer than if they stood alone. It&#8217;s also likely that such an arrangement would allow the Governor to cut deals which would appeal to both ends of his base.</p> <p><strong>8. Communicate, explain, debate</strong></p> <p>150 years ago it was normal for Hawaii&#8217;s citizens to petition the government and for the King to respond via the newspapers. There was a spirit of public debate and discourse which is sorely missing from our modern political culture. By contrast, Governor Ige&#8217;s nominee only met with the public in off-the-record settings, and didn&#8217;t respond to several requests from <em>The Independent</em> for interviews. In fact <a href="http://petitions.moveon.org/sign/do-not-confirm-developer">a petition opposing the nomination was signed by 8,728 people</a> – or roughly 5% of the Governor&#8217;s total electorate – but he didn&#8217;t respond. These were missed opportunities for the Governor to engage with the public and to rebuild our democratic culture.</p>
78.132653
832
0.783989
7177f91f4cd94fe20a8ef8f8102078debc0af85c
89
tsx
TypeScript
packages/app/src/pages/index.tsx
covertbert/adventure-blog
35f25d00cec6e541f4a0f84b78cec5555d5708e0
[ "MIT" ]
null
null
null
packages/app/src/pages/index.tsx
covertbert/adventure-blog
35f25d00cec6e541f4a0f84b78cec5555d5708e0
[ "MIT" ]
null
null
null
packages/app/src/pages/index.tsx
covertbert/adventure-blog
35f25d00cec6e541f4a0f84b78cec5555d5708e0
[ "MIT" ]
null
null
null
import React from 'react' const App = () => <div>Hello world!</div> export default App
14.833333
41
0.674157
34f6eb05d0e217455c627333e1af88dee0b6bd20
886
swift
Swift
WorkdayTracker/View/ContentView.swift
odedgolden/WorkdayTracker
ff045e64abaca19253235813044559e6aadff0f7
[ "MIT" ]
14
2020-12-09T08:53:39.000Z
2021-12-07T09:15:44.000Z
WorkdayTracker/View/ContentView.swift
odedgolden/WorkdayTracker
ff045e64abaca19253235813044559e6aadff0f7
[ "MIT" ]
null
null
null
WorkdayTracker/View/ContentView.swift
odedgolden/WorkdayTracker
ff045e64abaca19253235813044559e6aadff0f7
[ "MIT" ]
8
2020-12-10T05:59:26.000Z
2022-01-03T07:49:21.000Z
// // ContentView.swift // WorkdayTracker // // Created by Oded Golden on 20/09/2020. // import SwiftUI import CoreData struct ContentView: View { @EnvironmentObject var trackerModel: TrackerModel var body: some View { TabView{ DaysView().tabItem { Text("Days") Image(systemName: "list.bullet") } SettingsView().tabItem { Text("Settings") Image(systemName: "pencil") } MapView().tabItem { Text("Stats") Image(systemName: "chart.bar") } }.navigationTitle("Settings") } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext) } }
22.717949
110
0.562077
d85ebbd58cf7adc9578334c4412eb556b2c4f1d1
566
swift
Swift
SharkScope/Model/Login/UserRequest.swift
eppz/macOS.Prototype.Ranger
c6de24383e20b87c1bf1448a858477789ff8c305
[ "PostgreSQL" ]
3
2020-06-20T21:27:42.000Z
2021-01-17T21:42:33.000Z
SharkScope/Model/Login/UserRequest.swift
Geri-Borbas/macOS.Prototype.Ranger
c6de24383e20b87c1bf1448a858477789ff8c305
[ "PostgreSQL" ]
null
null
null
SharkScope/Model/Login/UserRequest.swift
Geri-Borbas/macOS.Prototype.Ranger
c6de24383e20b87c1bf1448a858477789ff8c305
[ "PostgreSQL" ]
null
null
null
// // UserRequest.swift // Ranger // // Created by Geri Borbás on 2019. 12. 14.. // Copyright © 2019. Geri Borbás. All rights reserved. // import Foundation /// 3.9.1. LOGIN /// Performs a login confirmation. The response only contains the /// UserInfo element if successful. public struct UserRequest: ApiRequest { public typealias ApiResponseType = User public var path: String { "user" } public var parameters: KeyValuePairs<String, String> { [:] } public var useCache: Bool = true public init() { } }
18.866667
65
0.641343
0b5a82c329031fc6f172ed423012d36ab20bca44
10,817
py
Python
testscripts/RDKB/component/WEBCONFIG/TS_WEBCONFIG_DisableRFC_QuerySyncParams.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/WEBCONFIG/TS_WEBCONFIG_DisableRFC_QuerySyncParams.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
testscripts/RDKB/component/WEBCONFIG/TS_WEBCONFIG_DisableRFC_QuerySyncParams.py
rdkcmf/rdkb-tools-tdkb
9f9c3600cd701d5fc90ac86a6394ebd28d49267e
[ "Apache-2.0" ]
null
null
null
########################################################################## # If not stated otherwise in this file or this component's Licenses.txt # file the following copyright and licenses apply: # # Copyright 2021 RDK Management # # 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. ########################################################################## ''' <?xml version="1.0" encoding="UTF-8"?><xml> <id/> <version>1</version> <name>TS_WEBCONFIG_DisableRFC_QuerySyncParams</name> <primitive_test_id/> <primitive_test_name>Webconfig_DoNothing</primitive_test_name> <primitive_test_version>1</primitive_test_version> <status>FREE</status> <synopsis>To disable the Webconfig RFC and check if a get operation on Force Sync parameters logs DB failure in WebConfig.log file</synopsis> <groups_id/> <execution_time>10</execution_time> <long_duration>false</long_duration> <advanced_script>false</advanced_script> <remarks/> <skip>false</skip> <box_types> <box_type>Broadband</box_type> </box_types> <rdk_versions> <rdk_version>RDKB</rdk_version> </rdk_versions> <test_cases> <test_case_id>TC_WEBCONFIG_02</test_case_id> <test_objective>This test is case is to disable the RFC and check if a get operation on Force Sync parameters logs DB failure in WebConfig.log file</test_objective> <test_type>Positive</test_type> <test_setup>Broadband</test_setup> <pre_requisite>1.Ccsp Components in DUT should be in a running state that includes component under test Cable Modem 2.TDK Agent should be in running state or invoke it through StartTdk.sh script 3.Webconfig distro should be enabled else enable with custom image</pre_requisite> <api_or_interface_used>pam_GetParameterValues pam_SetParameterValues</api_or_interface_used> <input_parameters>Device.X_RDK_WebConfig.RfcEnable Device.X_RDK_WebConfig.ConfigFile.1.ForceSyncCheck Device.X_RDK_WebConfig.ConfigFile.1.SyncCheckOK"</input_parameters> <automation_approch>1.Load the module 2.Get the current webconfig RFC enable status and disable the RFC 3.Do a get operation on Force Sync check and Force Sync Check Ok parameters 4.Check if DB failed message specific to the parameter is logged in WebConfig.log File 5.Revert the RFC status to previous 6.Unload the module</automation_approch> <expected_output>When webconfig RFC is disabled and get operation done on Force Sync parameters should log Db failed message specific to the parameter in webConfig.log file</expected_output> <priority>High</priority> <test_stub_interface>WEBCONFIG</test_stub_interface> <test_script>TS_WEBCONFIG_DisableRFC_QuerySyncParams</test_script> <skipped>No</skipped> <release_version>M86</release_version> <remarks>None</remarks> </test_cases> </xml> ''' # use tdklib library,which provides a wrapper for tdk testcase script import tdklib; from tdkbVariables import *; import tdkutility from tdkutility import * from time import sleep; #Test component to be tested sysobj = tdklib.TDKScriptingLibrary("sysutil","1"); pamobj = tdklib.TDKScriptingLibrary("pam","1"); #IP and Port of box, No need to change, #This will be replaced with correspoing Box Ip and port while executing script ip = <ipaddress> port = <port> pamobj.configureTestCase(ip,port,'TS_WEBCONFIG_DisableRFC_QuerySyncParams'); sysobj.configureTestCase(ip,port,'TS_WEBCONFIG_DisableRFC_QuerySyncParams'); #Get the result of connection with test component and DUT pamloadmodulestatus =pamobj.getLoadModuleResult(); sysloadmodulestatus =sysobj.getLoadModuleResult(); print "[LIB LOAD STATUS] : %s" %pamloadmodulestatus ; print "[LIB LOAD STATUS] : %s" %sysloadmodulestatus ; revert = 0; if "SUCCESS" in pamloadmodulestatus.upper() and "SUCCESS" in sysloadmodulestatus.upper(): #Set the result status of execution pamobj.setLoadModuleStatus("SUCCESS"); sysobj.setLoadModuleStatus("SUCCESS"); tdkTestObj = pamobj.createTestStep('pam_GetParameterValues'); tdkTestObj.addParameter("ParamName","Device.X_RDK_WebConfig.RfcEnable"); expectedresult="SUCCESS"; #Execute the test case in DUT tdkTestObj.executeTestCase("expectedresult"); actualresult = tdkTestObj.getResult(); initial_value = tdkTestObj.getResultDetails().strip(); if expectedresult in actualresult: #Set the result status of execution tdkTestObj.setResultStatus("SUCCESS"); print "TEST STEP 1: Get current value of Web Config Enable" print "EXPECTED RESULT 1: Should get current value of Web Config Enable" print "ACTUAL RESULT 1: current value is %s" %initial_value; #Get the result of execution print "[TEST EXECUTION RESULT] : SUCCESS"; tdkTestObj = pamobj.createTestStep('pam_SetParameterValues'); tdkTestObj.addParameter("ParamName","Device.X_RDK_WebConfig.RfcEnable"); tdkTestObj.addParameter("ParamValue","false"); tdkTestObj.addParameter("Type","boolean"); expectedresult="SUCCESS"; #Execute testcase on DUT tdkTestObj.executeTestCase(expectedresult); actualresult = tdkTestObj.getResult(); result = tdkTestObj.getResultDetails(); if expectedresult in actualresult: revert =1; #Set the result status of execution tdkTestObj.setResultStatus("SUCCESS"); print "TEST STEP 2: Set Web Config Enable status to false"; print "EXPECTED RESULT 2: Should set Web Config Enable status to false"; print "ACTUAL RESULT 2: %s" %result; #Get the result of execution print "[TEST EXECUTION RESULT] : SUCCESS"; paramlist = ["Device.X_RDK_WebConfig.ConfigFile.1.ForceSyncCheck","Device.X_RDK_WebConfig.ConfigFile.1.SyncCheckOK"]; logMsgs = ["ForceSyncCheck GET from DB failed","SyncCheckOK GET from DB failed"]; i=0; for item in paramlist: tdkTestObj = pamobj.createTestStep('pam_GetParameterValues'); tdkTestObj.addParameter("ParamName",item); expectedresult="SUCCESS"; #Execute the test case in DUT tdkTestObj.executeTestCase("expectedresult"); actualresult = tdkTestObj.getResult(); details = tdkTestObj.getResultDetails().strip(); if expectedresult in actualresult: print "Querying %s parameter is sucessfull" %item; print "Check if DB failed message is seen on querying this specific parameter"; sleep(5); tdkTestObj = sysobj.createTestStep('ExecuteCmd'); expectedresult="SUCCESS"; cmd= "cat /rdklogs/logs/WebConfig.log | grep -rn \"%s\" " %logMsgs[i]; print cmd; expectedresult="SUCCESS"; tdkTestObj.addParameter("command", cmd); tdkTestObj.executeTestCase(expectedresult); actualresult = tdkTestObj.getResult(); details = tdkTestObj.getResultDetails().strip().replace("\\n", ""); i= i+1; if expectedresult in actualresult and details: tdkTestObj.setResultStatus("SUCCESS"); print"%s" %details; print"The expected log message is present when Queried"; print "[TEST EXECUTION RESULT] : SUCCESS"; else: tdkTestObj.setResultStatus("FAILURE"); print "The expected log message is not present: %s" %logMsgs[i]; print "[TEST EXECUTION RESULT] : FAILURE"; break; else: revert =0; #Set the result status of execution tdkTestObj.setResultStatus("FAILURE"); print "TEST STEP 2: Set Web Config Enable status to false"; print "EXPECTED RESULT 2: Should set Web Config Enable status to false"; print "ACTUAL RESULT 2: %s" %result; #Get the result of execution print "[TEST EXECUTION RESULT] : FAILURE"; if revert ==1 : tdkTestObj = pamobj.createTestStep('pam_SetParameterValues'); tdkTestObj.addParameter("ParamName","Device.X_RDK_WebConfig.RfcEnable"); tdkTestObj.addParameter("ParamValue",initial_value); tdkTestObj.addParameter("Type","boolean"); expectedresult="SUCCESS"; #Execute testcase on DUT tdkTestObj.executeTestCase(expectedresult); actualresult = tdkTestObj.getResult(); result = tdkTestObj.getResultDetails(); if expectedresult in actualresult: #Set the result status of execution tdkTestObj.setResultStatus("SUCCESS"); print "TEST STEP 3: Revert the Web Config Enable status to previous" print "EXPECTED RESULT 3: Should revert Web Config status to previous" print "ACTUAL RESULT 3: %s" %result; #Get the result of execution print "[TEST EXECUTION RESULT] : SUCCESS" else: #Set the result status of execution tdkTestObj.setResultStatus("FAILURE"); print "TEST STEP 3: Revert Web Config Enable status to previous" print "EXPECTED RESULT 3: Should revert Web Config Enable status to previous" print "ACTUAL RESULT 3: %s" %result; #Get the result of execution print "[TEST EXECUTION RESULT] : FAILURE" else: #Set the result status of execution tdkTestObj.setResultStatus("FAILURE"); print "TEST STEP 1: Get current value of Web Config Enable" print "EXPECTED RESULT 1: Should get current value of Web Config Enable" print "ACTUAL RESULT 1: current value is %s" %initial_value; #Get the result of execution print "[TEST EXECUTION RESULT] : FAILURE"; pamobj.unloadModule("pam"); sysobj.unloadModule("sysutil"); else: print "Failed to load pam/sysutil module"; pamobj.setLoadModuleStatus("FAILURE"); sysobj.setLoadModuleStatus("FAILURE"); print "Module loading failed";
49.168182
194
0.665249
b8dd81ddedc4d3c7649e0de9cbacd419089669f1
1,139
lua
Lua
lua/setup/indent-blankline.lua
yuchanns/nvim
7a0c5e27474897c5d1292be9919d05eef78766cb
[ "MIT" ]
2
2021-12-09T12:29:28.000Z
2021-12-10T06:20:19.000Z
lua/setup/indent-blankline.lua
yuchanns/nvim
7a0c5e27474897c5d1292be9919d05eef78766cb
[ "MIT" ]
null
null
null
lua/setup/indent-blankline.lua
yuchanns/nvim
7a0c5e27474897c5d1292be9919d05eef78766cb
[ "MIT" ]
2
2022-02-05T03:04:42.000Z
2022-02-05T08:25:18.000Z
-- Use a protected call so we don't error out on first use local status_ok, _ = pcall(require, "indent_blankline") if not status_ok then return end local g = vim.g g.indentLine_char_list = {'|', '¦', '┆', '┊'} g.indent_blankline_use_treesitter = true g.indent_blankline_show_current_context = true g.indent_blankline_show_first_indent_level = true g.indent_blankline_filetype_exclude = { "startify", "dashboard", "dotooagenda", "log", "fugitive", "gitcommit", "packer", "vimwiki", "markdown", "json", "txt", "vista", "help", "todoist", "NvimTree", "peekaboo", "git", "TelescopePrompt", "undotree", "flutterToolsOutline", "" -- for all buffers without a file type } g.indent_blankline_buftype_exclude = {"terminal", "nofile"} g.indent_blankline_show_trailing_blankline_indent = false g.indent_blankline_show_current_context = true g.indent_blankline_context_patterns = { "class", "function", "method", "block", "list_literal", "selector", "^if", "^table", "if_statement", "while", "for" } -- because lazy load indent-blankline so need readd this autocmd vim.cmd('autocmd CursorMoved * IndentBlanklineRefresh')
40.678571
76
0.726953
e8f1a3ca50bcfed7f7af218f87aa8a2b2ac30b0f
3,224
py
Python
python/greshunkel.py
qpfiffer/38-Moths
e7985b3ee655bca965c37b8fefde6c6ad70fdd4f
[ "MIT" ]
14
2015-02-23T07:16:36.000Z
2021-05-05T11:49:57.000Z
python/greshunkel.py
qpfiffer/futility
e7985b3ee655bca965c37b8fefde6c6ad70fdd4f
[ "MIT" ]
19
2015-03-21T22:14:28.000Z
2017-01-25T17:07:21.000Z
python/greshunkel.py
qpfiffer/futility
e7985b3ee655bca965c37b8fefde6c6ad70fdd4f
[ "MIT" ]
3
2015-02-23T07:17:08.000Z
2015-03-23T18:05:34.000Z
from ctypes import cdll, c_char_p, c_size_t, c_void_p, Union,\ LittleEndianStructure, c_char, POINTER,\ c_int, byref, CFUNCTYPE, create_string_buffer class greshunkel_var(Union): _fields_ = [ ("str", c_char * 513), ("arr", c_void_p), ("sub_ctext", c_void_p) ] GshklFilterFunc = CFUNCTYPE(c_char_p, c_char_p) lib38moths = cdll.LoadLibrary("lib38moths.so") lib38moths.gshkl_init_context.restype = c_void_p lib38moths.gshkl_add_array.argtypes = [c_void_p, c_char_p] lib38moths.gshkl_add_array.restype = greshunkel_var lib38moths.gshkl_add_string_to_loop.argtypes = [POINTER(greshunkel_var), c_char_p] lib38moths.gshkl_add_int_to_loop.argtypes = [POINTER(greshunkel_var), c_int] lib38moths.gshkl_add_filter.argtypes = [c_void_p, c_char_p, GshklFilterFunc, c_void_p] lib38moths.gshkl_render.restype = c_char_p def _add_item_to_greshunkel_loop(ctext, loop, value): if isinstance(value, str): lib38moths.gshkl_add_string_to_loop(byref(loop), c_char_p(value.encode())) elif isinstance(value, int): lib38moths.gshkl_add_int_to_loop(byref(loop), value) elif hasattr(value, '__call__'): raise Exception("Don't really know what you're trying to do here.") elif isinstance(value, list) or isinstance(value, tuple): raise Exception("Cannot add loops to loops right now. Use subcontexts.") elif isinstance(value, dict): sub_ctext = lib38moths.gshkl_init_context() lib38moths.gshkl_add_sub_context_to_loop(byref(loop), sub_ctext) for sub_key, sub_value in value.items(): _add_item_to_greshunkel_context(sub_ctext, sub_key, sub_value) def _add_item_to_greshunkel_context(ctext, key, value): if isinstance(value, str): lib38moths.gshkl_add_string(ctext, c_char_p(key.encode()), c_char_p(value.encode())) elif isinstance(value, int): lib38moths.gshkl_add_int(ctext, c_char_p(key.encode()), c_size_t(value)) elif isinstance(value, list): converted_key = c_char_p(key.encode()) new_loop = lib38moths.gshkl_add_array(ctext, converted_key) for subitem in value: _add_item_to_greshunkel_loop(ctext, new_loop, subitem) elif hasattr(value, '__call__'): lib38moths.gshkl_add_filter(ctext, c_char_p(key.encode()), value, None) elif isinstance(value, dict): sub_ctext = lib38moths.gshkl_init_context() lib38moths.gshkl_add_sub_context(ctext, c_char_p(key.encode()), sub_ctext) for sub_key, sub_value in value.items(): _add_item_to_greshunkel_context(sub_ctext, sub_key, sub_value) class Context(object): def __init__(self, context_dict): self.gshkl_ctext = lib38moths.gshkl_init_context() for key, value in context_dict.items(): _add_item_to_greshunkel_context(self.gshkl_ctext, key, value) class Template(object): def __init__(self, template): self.template = template def render(self, context): template_c_string = c_char_p(self.template.encode()) ret_c_str = lib38moths.gshkl_render(context.gshkl_ctext, template_c_string, len(self.template), None) return ret_c_str.decode()
45.408451
109
0.715261
0b3087eb0d5de6a063260501def92d99d71d6436
397
py
Python
setup.py
TechAtNYU/api-python
26cfa78208f30c41095484422cd1232aeddbfcb2
[ "MIT" ]
null
null
null
setup.py
TechAtNYU/api-python
26cfa78208f30c41095484422cd1232aeddbfcb2
[ "MIT" ]
null
null
null
setup.py
TechAtNYU/api-python
26cfa78208f30c41095484422cd1232aeddbfcb2
[ "MIT" ]
null
null
null
try: from setuptools import setup except ImportError: from distutils.core import setup setup( description='Tech@NYU API Python Client', author='TechatNYU', url='https://github.com/TechAtNYU/pytnyu', author_email='hello@techatnyu.org', version='0.0.4', install_requires=['requests'], namespace_packages=['pytnyu'], packages=['pytnyu'], name='pytnyu', )
23.352941
46
0.677582
1e66492f28d90b7e0da011534c1c9b6985f59e23
124
css
CSS
dist/production/css/theme-dark/examples/calendar/basic/MainContainer.css
neomjs/neomjs-realworld-example-app
5fd5f901ba74d76b706ea129b18f141f73e9e558
[ "MIT" ]
10
2019-11-28T19:33:18.000Z
2020-03-04T15:33:36.000Z
workspace/neo-webcomponents-demo/dist/production/css/theme-dark/examples/calendar/basic/MainContainer.css
neomjs/pages2
065156fa068b45dcaca2aeed6bb5f3260a555cf5
[ "MIT" ]
3
2019-11-30T18:39:46.000Z
2021-11-08T18:05:58.000Z
workspace/neo-webcomponents-demo/dist/production/css/theme-dark/examples/calendar/basic/MainContainer.css
neomjs/pages2
065156fa068b45dcaca2aeed6bb5f3260a555cf5
[ "MIT" ]
3
2019-12-18T09:17:54.000Z
2021-12-17T16:15:55.000Z
:root .neo-theme-dark{--examples-calendar-basic-header-background-color:#33343d;--examples-calendar-basic-header-color:#ccc}
124
124
0.798387
992f754ec9c3cb0c8a5e0489a2966519eef8c2c7
351
c
C
1st_and_2nd_Sem_c_backup/BIN/C Prog/11.c
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
1st_and_2nd_Sem_c_backup/BIN/C Prog/11.c
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
1st_and_2nd_Sem_c_backup/BIN/C Prog/11.c
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
#include<stdio.h> void main() { unsigned int p, t; float si, ci, r, i; clrscr(); printf("\n Enter Principal:"); scanf("%d", &p); printf("\n Enter Time Period:"); scanf("%d", &t); printf("\n Enter Rate Of Interest:"); scanf("%d", &r); si=(p*t*r)/100; i=r/100; ci=p*pow((1+i),t); printf("\n SIMPLE INTEREST: %5.2f") }
19.5
39
0.532764
0e856b04b5587f66b751e215f5f76670f40d30eb
12,071
html
HTML
_site/clever-websites.html
lewispb/lewispb.github.io
16fb9f75c61abeb20b7a605d67f390ab87c32216
[ "MIT" ]
null
null
null
_site/clever-websites.html
lewispb/lewispb.github.io
16fb9f75c61abeb20b7a605d67f390ab87c32216
[ "MIT" ]
null
null
null
_site/clever-websites.html
lewispb/lewispb.github.io
16fb9f75c61abeb20b7a605d67f390ab87c32216
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Clever Websites - PHP / Ruby on Rails - Bristol - Lewis Buckley Development</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="/css/bootstrap.min.css" rel="stylesheet"> <link href="/css/lb.css" rel="stylesheet"> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> <link rel="shortcut icon" href="/icons/favicon.ico"> <link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152x152.png"> <link rel="icon" type="image/png" href="/icons/favicon-196x196.png" sizes="196x196"> <link rel="icon" type="image/png" href="/icons/favicon-160x160.png" sizes="160x160"> <link rel="icon" type="image/png" href="/icons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="/icons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/icons/favicon-32x32.png" sizes="32x32"> <meta name="msapplication-TileColor" content="#ffffff"> <meta name="msapplication-TileImage" content="/icons/mstile-144x144.png"> <meta name="msapplication-config" content="/icons/browserconfig.xml"> <meta name="description" content="Lewis Buckley Development is a unique web application development company that specialised in Ruby on Rails and PHP. We build powerful and responsive websites that do amazing things, we call them clever websites." /> <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <![endif] d--> <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-51573312-1', 'lewisbuckley.co.uk'); ga('send', 'pageview'); </script> </head> <body> <div class="nav-toggle"><i class="fa fa-bars fa-2x"></i> Lewis Buckley </div> <div id="wrapper"> <div class="navbar navbar-default" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <p class="navbar-brand"><a href='/'>Lewis Buckley Development</a></p> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li><a href="/clever-websites.html">Clever Websites</a></li> <li><a href="/about.html">About</a></li> <li><a href="/contact.html">Get In Touch</a></li> </ul> </div> </div> </div> <div id="sidebar-wrapper"> <ul class="sidebar-nav"> <li class="sidebar-brand"> <a href="/"> <div class="brand"><img src="/images/logo.png" alt="Lewis Buckley Development"/></div> </a> <h3>Ruby on Rails specialists in Bristol</h3> </li> <li class='hr'></li> <li><a href="/clever-websites.html">Clever Websites</a></li> <li><a href="/about.html">About</a></li> <li><a href="/contact.html">Get In Touch</a></li> <li class='hr'></li> <li class='contain'> <ul id="social-wrapper"> <li> <a href="http://www.twitter.com/lewispb"><i class="fa fa-twitter-square"></i> twitter</a></li> <li> <a href="https://www.linkedin.com/pub/lewis-buckley/20/36b/aa7"><i class="fa fa-linkedin-square"></i> linkedin</a> </li> <li> <a href="http://www.github.com/lewispb"><i class="fa fa-github-square"></i> github</a> </li> </ul> </li> </ul> </div> <div class="container"> </div> <div class="container"> <div class="row"> <div class="clever cf"> <div class="col-xs-12"> <h1>Clever Websites</h1> </div> <div class="col-md-4"> <p>Lewis Buckley Development create <strong>clever websites</strong>. We design &amp; build exceptional digital products. These live as websites but can do so much more than a typical 'website'. They can help you run your business or provide a service to your customers.</p> <div class='section cf'> <h2>Testimonials</h2> <div class='testimonial cf'> <p>Full marks to Lewis for being able to decipher my sketched brief! He's knowledgeable and fast, and ready with a solution at every step. I've worked with programmers for 10 years; Lewis is outstanding.</p> <p class="author">- Customer from Southampton, UK</p> </div> <div class='testimonial cf'> <p>Very talented, very efficient, very quick worker and gets things done as quick as he can. Great! Lewis has done me proud on this job and I would highly recommend him to anyone.</p> <p class="author">- Customer from Kent, UK</p> </div> </div> <div class='section cf'> <h2>Sectors</h2> <p>We've got experience working in the following sectors:</p> <ul> <li>Geo Location / Mapping</li> <li>GPS Tracking</li> <li>Health Care</li> <li>Consumer Startups</li> <li>Bulk Email</li> <li>Storage and Logistics</li> </ul> </div> </div> <div class="col-md-7 col-md-offset-1"> <p>We use the following tools to help us deliver our projects:</p> <ul> <li>Ruby on Rails for complex projects</li> <li>Wordpress for simple websites</li> <li>PHP (Laravel and CodeIgniter)</li> <li>MySQL databases</li> <li>Photoshop (for designs)</li> <li>Swift / Objective C development for iPhone apps</li> <li>Complete set of devices including Windows and Mac computers, iPhones, iPads and Android devices</li> <li>Plus many more, we always use the right tool for the job</li> </ul> <div class='section cf'> <h2>Previous Projects</h2> <div class='portfolio cf'> <h3>Games for radio DJ's</h3> <p class='oneliner'>We were approached to develop a system to help radio DJ's use quiz show questions and answers along with MP3 audio files to entertain listeners.</p> <div class="screen"> <img src="/images/port1.jpg" alt='Screenshot of web site homepage' /> <p>Home page using Twitter Bootstrap</p> </div> <div class="screen"> <img src="/images/port2.jpg" alt='Screenshot of software interface' /> <p>Software interface, written using Backbone.js</p> </div> </div> <div class='portfolio cf'> <h3>Website for health care provider</h3> <p class='oneliner'>Having worked with this client for some time we were asked to re-develop their website.</p> <div class="screen"> <img src="/images/port3.jpg" alt='Screenshot of wordpress web site homepage' /> <p>Responsive CMS using Wordpress and a custom theme</p> <p><a href="http://www.aspirations-support.co.uk">Aspirations Support Website</a></p> </div> </div> <div class='portfolio cf'> <h3>Leaflet distribution company web application</h3> <p class='oneliner'>Advertar needed to track how their deliveries were being made using GPS tracking.</p> <div class="screen"> <img src="/images/port4.jpg" alt='Screenshot of leaflet distribution website' /> <p>ASP.NET with C# used for this database driven website. Fully integrated with Google Maps.</p> <p><a href="http://advertar.cloudapp.net">Advertar Website</a></p> </div> </div> </div> </div> </div> </div> </div> <footer> <p class="text-muted credit">&copy; 2014 Lewis Buckley Development &middot; Bristol, United Kingdom &middot; <a href='http://validator.w3.org/check?uri=http%3A%2F%2Fwww.lewisbuckley.co.uk&amp;charset=%28detect+automatically%29&amp;doctype=Inline&amp;group=0'>Valid HTML5</a> &middot; 2014-06-02 23:17:15 +0100</p> </footer> <script src="/js/jquery-1.10.2.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/lb.js"></script> </div> </body> </html>
64.207447
328
0.477094
d0ec33219a1d733c938bc73515485202688f0391
21,845
swift
Swift
iOS/Zippy/SearchViewController.swift
seguemodev/Meducated-Ninja
cc7bb88f20bac0f66f2e00b69d7c18342ca8d413
[ "CC0-1.0" ]
1
2016-02-24T15:03:04.000Z
2016-02-24T15:03:04.000Z
iOS/Zippy/SearchViewController.swift
seguemodev/Meducated-Ninja
cc7bb88f20bac0f66f2e00b69d7c18342ca8d413
[ "CC0-1.0" ]
null
null
null
iOS/Zippy/SearchViewController.swift
seguemodev/Meducated-Ninja
cc7bb88f20bac0f66f2e00b69d7c18342ca8d413
[ "CC0-1.0" ]
null
null
null
// // SearchViewController.swift // Zippy // // Created by Geoffrey Bender on 6/18/15. // Copyright (c) 2015 Segue Technologies, Inc. All rights reserved. // import UIKit class SearchViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, SearchFilterDelegate, UITextFieldDelegate { // MARK: - Interface Outlets @IBOutlet weak var drugField: UITextField! @IBOutlet weak var medicationTable: UITableView! @IBOutlet weak var backgroundView: UIView! // MARK: - Variables var drugs = [Medication]() var originalResults = [Medication]() var loadingNotification: MBProgressHUD? var searchSuggestions = [String]() var searchStartIndex = 0 var totalSearchResults = 0 var isLoading = false var scrollToFirstRecord = false // MARK: - Lifecycle Methods override func viewDidLoad() { super.viewDidLoad() // For dynamic table row height self.medicationTable.estimatedRowHeight = 80 self.medicationTable.rowHeight = UITableViewAutomaticDimension var homeBarButton = UIBarButtonItem(title:"Home", style:UIBarButtonItemStyle.Plain, target:self, action:"goHome:") var filterBarButton = UIBarButtonItem(title:"Filter", style:UIBarButtonItemStyle.Plain, target:self, action:"filterSearchResults") self.navigationItem.leftBarButtonItem = homeBarButton self.navigationItem.rightBarButtonItem = filterBarButton var normalButtonBackground = UIImage(named:"BlueButtonBackground")!.resizableImageWithCapInsets(UIEdgeInsetsMake(0, 10, 0, 10)) self.navigationItem.leftBarButtonItem!.setBackgroundImage(normalButtonBackground, forState: UIControlState.Normal, barMetrics: UIBarMetrics.Default) self.navigationItem.rightBarButtonItem!.setBackgroundImage(normalButtonBackground, forState: UIControlState.Normal, barMetrics: UIBarMetrics.Default) var pressedButtonBackground = UIImage(named:"GreenButtonBackground")!.resizableImageWithCapInsets(UIEdgeInsetsMake(0, 10, 0, 10)) self.navigationItem.leftBarButtonItem!.setBackgroundImage(pressedButtonBackground, forState: UIControlState.Highlighted, barMetrics: UIBarMetrics.Default) self.navigationItem.rightBarButtonItem!.setBackgroundImage(pressedButtonBackground, forState: UIControlState.Highlighted, barMetrics: UIBarMetrics.Default) if let font = UIFont(name:"RobotoSlab-Bold", size:14.0) { self.navigationItem.leftBarButtonItem!.setTitleTextAttributes([NSFontAttributeName:font, NSForegroundColorAttributeName:UIColor.whiteColor()], forState:UIControlState.Normal) self.navigationItem.rightBarButtonItem!.setTitleTextAttributes([NSFontAttributeName:font, NSForegroundColorAttributeName:UIColor.whiteColor()], forState:UIControlState.Normal) } let gestureRecognizer = UITapGestureRecognizer(target:self, action:"hideKeyboard:") self.backgroundView.addGestureRecognizer(gestureRecognizer) // Load news to set news badge self.setNewsTabBadgeCount() } // Important that these remain or there will be bugs! override func viewWillAppear(animated: Bool) { super.viewWillAppear(animated) // Add an observer to monitor search criteria changes in the search field (must be added and removed as view appears or typing in any uitextfield in other views will trigger this notification) NSNotificationCenter.defaultCenter().addObserver(self, selector:"offerSuggestions", name:UITextFieldTextDidChangeNotification, object:nil) } // Important that these remain or there will be bugs! override func viewWillDisappear(animated: Bool) { super.viewWillDisappear(animated) // Remove typing observer (must be added and removed as view appears of typing in any uitextfield in other views will trigger this notification) NSNotificationCenter.defaultCenter().removeObserver(self, name:UITextFieldTextDidChangeNotification, object:nil) } // Reload table contents on device rotation override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator) // Completion handler to execute code after transition coordinator.animateAlongsideTransition({(context) -> Void in}, completion: {(context) -> Void in if self.medicationTable != nil { // Scroll to first row self.medicationTable.setContentOffset(CGPointZero, animated:false) // Reload the table with the new cabinet (using this method for proper autoheight calculation on table cells) self.medicationTable.reloadSections(NSIndexSet(indexesInRange:NSMakeRange(0, self.medicationTable.numberOfSections())), withRowAnimation:UITableViewRowAnimation.None) } }) } // MARK: - My Methods // Sets the badge count on the news tab if new postings are found func setNewsTabBadgeCount() { // Get news controller let newsNavController = self.tabBarController?.viewControllers![2] as! UINavigationController let newsController = newsNavController.viewControllers[0] as! NewsViewController // Fire load newsController.loadData(self) } // Search for medication results @IBAction func searchForInfo(sender:AnyObject) { // If not connected to the Internet if reachabilityStatus == kNotReachable { // Alert user that field is required var alert = UIAlertController(title:"Attention Required", message:"This application requires an Internet connection. Please try again once connectivity has been established.", preferredStyle:UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title:"OK", style:UIAlertActionStyle.Default, handler:nil)) self.presentViewController(alert, animated:true, completion:nil) } else if self.drugField.text.isEmpty { // Alert user that field is required var alert = UIAlertController(title:"Attention Required", message:"Please enter a medication name", preferredStyle:UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title:"OK", style:UIAlertActionStyle.Default, handler:nil)) self.presentViewController(alert, animated:true, completion:nil) } else { // Hide keyboard self.drugField.resignFirstResponder() // Show table view self.medicationTable.hidden = false // Start with empty array if search start index is set to zero if self.searchStartIndex == 0 { self.drugs.removeAll(keepCapacity: false) } // Set up progress hud self.loadingNotification = MBProgressHUD.showHUDAddedTo(self.view, animated: true) self.loadingNotification!.mode = MBProgressHUDMode.Indeterminate self.loadingNotification!.userInteractionEnabled = true // Customize loading message based on whether it's a new search or a continuing load if self.searchStartIndex == 0 { self.loadingNotification!.labelText = "Searching For Medication Information" } else { let startIndex = self.searchStartIndex + 1 self.loadingNotification!.labelText = "Loading Additional Records" self.loadingNotification!.detailsLabelText = " \(startIndex) through \(startIndex + 50) of \(self.totalSearchResults)" } let fieldValue = self.drugField.text.stringByReplacingOccurrencesOfString(" ", withString: "+") let criteria = fieldValue.stringByAddingPercentEncodingWithAllowedCharacters(.URLHostAllowedCharacterSet()) let urlString = "http://api.fda.gov/drug/label.json?api_key=0NUtnvRyEkiYwoxhuDTfZbpykcPzIj1viymzqrLl&search=openfda.brand_name:\(criteria!)+openfda.generic_name:\(criteria!)+openfda.product_ndc:\(criteria!)&skip=\(self.searchStartIndex)&limit=50" let restURL = NSURL(string: urlString) var restRequest = NSMutableURLRequest(URL: restURL!, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 10) // Make async data call NSURLConnection.sendAsynchronousRequest(restRequest, queue: NSOperationQueue.mainQueue(), completionHandler: { (response, data, error) -> Void in // Parse JSON for storage or use var err: NSError if let jsonResult = NSJSONSerialization.JSONObjectWithData(data, options:NSJSONReadingOptions.MutableContainers, error: nil) as? NSDictionary { // Go create medications self.createMedications(jsonResult) } }) } } // Offer search term suggestions func offerSuggestions() { // If not connected to the Internet if reachabilityStatus == kNotReachable { // Alert user that field is required var alert = UIAlertController(title:"Attention Required", message:"This application requires an Internet connection. Please try again once connectivity has been established.", preferredStyle:UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title:"OK", style:UIAlertActionStyle.Default, handler:nil)) self.presentViewController(alert, animated:true, completion:nil) } else if !self.drugField.text.isEmpty { // Unhide table if it is hidden self.medicationTable.hidden = false // Form search request let termSuggestionString = "https://staging.meducated.ninja/api/Term/\(self.drugField.text)" let termSuggestionURL = NSURL(string: termSuggestionString) var termRequest = NSMutableURLRequest(URL: termSuggestionURL!, cachePolicy: NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 10) // Make async data call NSURLConnection.sendAsynchronousRequest(termRequest, queue: NSOperationQueue.mainQueue(), completionHandler: { (response, data, error) -> Void in // If no errors if error == nil { // Populate search array with results if let jsonResult: AnyObject = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error:nil) { self.searchSuggestions = jsonResult as! [String] // Reload table self.medicationTable.reloadData() } } }) } } // Perform segue to show filter form func filterSearchResults() { self.performSegueWithIdentifier("filterSegue", sender: self) } // Create medication objects from search results func createMedications(jsonObject: NSDictionary) { // Get total query result count if let meta = jsonObject["meta"] as? NSDictionary { if let results = meta["results"] as? NSDictionary { if let total = results["total"] as? Int { self.totalSearchResults = total } } } // If we have results if let results = jsonObject["results"] as? NSArray { // Remove search suggestions now that our search has returned data self.searchSuggestions.removeAll(keepCapacity: false) // Parse json data into an object for passing to information page for result in results { if let medication = result as? NSDictionary { // Create medication object self.drugs.append(Medication(result: medication)) } } // Keep an unaltered copy that we can use when applying filters self.originalResults = self.drugs // Sort the drugs array self.sortDrugs() } else { // Hide progress hud MBProgressHUD.hideAllHUDsForView(self.view, animated: true) // Alert user that field is required var alert = UIAlertController(title:"No Results Found", message:"Sorry, but your search had an error. Please try again.", preferredStyle:UIAlertControllerStyle.Alert) alert.addAction(UIAlertAction(title:"OK", style:UIAlertActionStyle.Default, handler:nil)) self.presentViewController(alert, animated:true, completion:nil) } } // Sort the drugs array func sortDrugs() { // If filtering var filteredArray = [Medication]() if NSUserDefaults.standardUserDefaults().boolForKey("filterByBrand") { for med in self.originalResults { let brandName = med.openfda?.valueForKey("brand_name") as! [String] let genericName = med.openfda?.valueForKey("generic_name") as! [String] if find(genericName,brandName[0]) == nil { filteredArray.append(med) } } self.drugs = filteredArray } else if NSUserDefaults.standardUserDefaults().boolForKey("filterByGeneric") { for med in self.originalResults { let brandName = med.openfda?.valueForKey("brand_name") as! [String] let genericName = med.openfda?.valueForKey("generic_name") as! [String] if find(genericName,brandName[0]) != nil { filteredArray.append(med) } } self.drugs = filteredArray } else { self.drugs = self.originalResults } // Sort by brand name ASC or DESC self.drugs.sort{ item1, item2 in let brandArray1 = item1.openfda!["brand_name"] as! [String] let brandArray2 = item2.openfda!["brand_name"] as! [String] let brand1 = brandArray1[0] as String let brand2 = brandArray2[0] as String if NSUserDefaults.standardUserDefaults().boolForKey("searchSortDESC") { return brand1 > brand2 } return brand1 < brand2 } // Filter was applied and we should scroll to the beginning of the table if self.scrollToFirstRecord { // Scroll to first row self.medicationTable.setContentOffset(CGPointZero, animated:false) // Reset bool since we really only want to do if after applying a filter self.scrollToFirstRecord = false } // Reload the table with the search results (using this method for proper autoheight calculation on table cells) self.medicationTable.reloadSections(NSIndexSet(indexesInRange:NSMakeRange(0, self.medicationTable.numberOfSections())), withRowAnimation:UITableViewRowAnimation.Fade) // No longer loading self.isLoading = false // Hide progress hud MBProgressHUD.hideAllHUDsForView(self.view, animated: true) } // Hide keyboard on demand @IBAction func hideKeyboard(sender:AnyObject) { self.drugField.resignFirstResponder() } // Shows menu page @IBAction func goHome(sender:AnyObject) { self.dismissViewControllerAnimated(true, completion:nil) } // MARK: - Text Field Delegate Methods func textFieldShouldReturn(textField: UITextField) -> Bool { // Search key pressed, so reset search start index self.searchStartIndex = 0 return true } // MARK: - Navigation Methods override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { let indexPath = self.medicationTable.indexPathForSelectedRow() if segue.identifier == "drugInfoSegue" { let destinationController = segue.destinationViewController as! DrugInformationViewController destinationController.medication = self.drugs[indexPath!.row] } else if segue.identifier == "filterSegue" { let destinationController = segue.destinationViewController as! UINavigationController let filterController = destinationController.viewControllers[0] as! FilterViewController filterController.delegate = self } } // MARK: - Table View Methods func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { if !self.searchSuggestions.isEmpty { // Return +1 to account for header cell return self.searchSuggestions.count + 1 } return self.drugs.count } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { var cell = UITableViewCell() if !self.searchSuggestions.isEmpty && indexPath.row == 0 { cell = tableView.dequeueReusableCellWithIdentifier("suggestionHeaderCell", forIndexPath: indexPath) as! UITableViewCell cell.textLabel?.text = "Did you mean?" } else if !self.searchSuggestions.isEmpty && indexPath.row > 0 { cell = tableView.dequeueReusableCellWithIdentifier("suggestionCell", forIndexPath: indexPath) as! UITableViewCell cell.textLabel?.text = self.searchSuggestions[indexPath.row - 1] } else { cell = tableView.dequeueReusableCellWithIdentifier("medCell", forIndexPath: indexPath) as! UITableViewCell var medicationLabel = cell.viewWithTag(10) as! UILabel var manufacturerLabel = cell.viewWithTag(11) as! UILabel if let medDict = self.drugs[indexPath.row].openfda { if let brandName = medDict.valueForKey("brand_name") as? [String] { medicationLabel.text = brandName[0].capitalizedString } else if let genericName = medDict.valueForKey("generic_name") as? [String] { medicationLabel.text = genericName[0].capitalizedString } if let manufacturerName = medDict.valueForKey("manufacturer_name") as? [String] { manufacturerLabel.text = manufacturerName[0].capitalizedString } } } return cell } func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { self.drugField.resignFirstResponder() // If we're selecting a search suggestion, set the text field and perform a search if !self.searchSuggestions.isEmpty { self.searchStartIndex = 0 self.drugField.text = self.searchSuggestions[indexPath.row - 1] self.searchForInfo(indexPath) } else { self.performSegueWithIdentifier("drugInfoSegue", sender:self) } } func scrollViewDidScroll(scrollView: UIScrollView) { // UITableView only moves in one direction, y axis let currentOffset = scrollView.contentOffset.y let maximumOffset = scrollView.contentSize.height - scrollView.frame.size.height // Make sure total offset is less than -5 and next start point is less than total record count if ((maximumOffset - currentOffset == 0) && (self.searchStartIndex + 50 < self.totalSearchResults) && !self.isLoading) { // We are loading data self.isLoading = true // Start at the beginning of the search self.searchStartIndex = self.searchStartIndex + 50 // Go fetch the burial records self.searchForInfo(self) } } // MARK: - Search Delegate Methods // Search criteria applied func applySearchFilter() { // Search will research to populate array, do sort, then filter if !self.originalResults.isEmpty { // Reset scroll self.scrollToFirstRecord = true // Set up progress hud self.loadingNotification = MBProgressHUD.showHUDAddedTo(self.view, animated: true) self.loadingNotification!.mode = MBProgressHUDMode.Indeterminate self.loadingNotification!.userInteractionEnabled = true self.loadingNotification!.labelText = "Applying Filter Criteria" self.sortDrugs() } } }
42.253385
258
0.626276
3b34fbda3ef420cce5c41c40bb24ed0a43807e2b
154
h
C
src/interactionmode.h
SjorsVanGelderen/nes-editor
dd851bcaa2328a69fe00701f3550f92645b7ac7d
[ "MIT" ]
1
2018-10-16T23:52:19.000Z
2018-10-16T23:52:19.000Z
src/interactionmode.h
SjorsVanGelderen/nes-editor
dd851bcaa2328a69fe00701f3550f92645b7ac7d
[ "MIT" ]
null
null
null
src/interactionmode.h
SjorsVanGelderen/nes-editor
dd851bcaa2328a69fe00701f3550f92645b7ac7d
[ "MIT" ]
null
null
null
#ifndef INTERACTIONMODE_H #define INTERACTIONMODE_H enum InteractionMode { Idle = 0, Dragging, Plotting, Saving, Loading, }; #endif
11
25
0.675325
604ec500636edbdf6609389f7157368e30bfc9a7
1,643
html
HTML
wwwroot/bctos.cn/app/admin/view/apps/edit.html
wxm201411/bctos
35e8085d75963f0456679e7c9f3792d612ff6168
[ "Apache-2.0" ]
null
null
null
wwwroot/bctos.cn/app/admin/view/apps/edit.html
wxm201411/bctos
35e8085d75963f0456679e7c9f3792d612ff6168
[ "Apache-2.0" ]
null
null
null
wwwroot/bctos.cn/app/admin/view/apps/edit.html
wxm201411/bctos
35e8085d75963f0456679e7c9f3792d612ff6168
[ "Apache-2.0" ]
null
null
null
{extend name="common@base/common" /} {block name="body"} <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script> <!-- 标签页导航 --> <div class="wrap"> <div class="tab-content"> <!-- 表单 --> <form id="form" action="{:U('edit?name='.trim(input('name')))}" method="POST" class="form-horizontal layui-form" lay-filter="xw-form"> <!-- 基础文档模型 --> {include file="common@base/_form" /} <div class="form-item cf"> <button class="btn submit-btn ajax-post hidden" id="submit" type="submit" target-form="form-horizontal">确 定</button> <a class="btn btn-return">返 回</a> </div> </form> </div> </div> {/block} {block name="script"} <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css"> {php}if(config('app.COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';{/php} <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script> <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script> <script type="text/javascript"> $('#submit').click(function(){ $('#form').submit(); }); $(function(){ $('.time').datetimepicker({ format: 'yyyy-mm-dd hh:ii', language:"zh-CN", minView:2, autoclose:true }); showTab(); }); </script> {/block}
38.209302
164
0.632988
36b9671d4aaca820165bc55a42dd850f41b26bfc
40,891
sql
SQL
sql/schema.sql
brentnowak/spotmarket
b19982e6bbf595f43bb200802aa24da0802b447a
[ "Unlicense" ]
20
2016-01-29T19:39:46.000Z
2018-05-05T08:58:21.000Z
sql/schema.sql
brentnowak/spotmarket
b19982e6bbf595f43bb200802aa24da0802b447a
[ "Unlicense" ]
2
2016-03-18T13:32:08.000Z
2016-06-12T01:00:36.000Z
sql/schema.sql
brentnowak/spotmarket
b19982e6bbf595f43bb200802aa24da0802b447a
[ "Unlicense" ]
11
2016-01-29T18:59:04.000Z
2021-01-31T09:39:11.000Z
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.1 -- Dumped by pg_dump version 9.5.0 -- Started on 2016-06-10 16:32:38 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; -- -- TOC entry 11 (class 2615 OID 1061174) -- Name: character; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA "character"; ALTER SCHEMA "character" OWNER TO spotmarketadmin; -- -- TOC entry 6 (class 2615 OID 17000) -- Name: data; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA data; ALTER SCHEMA data OWNER TO spotmarketadmin; -- -- TOC entry 14 (class 2615 OID 1074253) -- Name: kill; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA kill; ALTER SCHEMA kill OWNER TO spotmarketadmin; -- -- TOC entry 12 (class 2615 OID 1061179) -- Name: map; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA map; ALTER SCHEMA map OWNER TO spotmarketadmin; -- -- TOC entry 10 (class 2615 OID 1061168) -- Name: market; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA market; ALTER SCHEMA market OWNER TO spotmarketadmin; -- -- TOC entry 9 (class 2615 OID 1008770) -- Name: meta; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA meta; ALTER SCHEMA meta OWNER TO spotmarketadmin; -- -- TOC entry 13 (class 2615 OID 1061183) -- Name: moon; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA moon; ALTER SCHEMA moon OWNER TO spotmarketadmin; -- -- TOC entry 8 (class 2615 OID 1008764) -- Name: system; Type: SCHEMA; Schema: -; Owner: spotmarketadmin -- CREATE SCHEMA system; ALTER SCHEMA system OWNER TO spotmarketadmin; SET search_path = "character", pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- TOC entry 294 (class 1259 OID 1070904) -- Name: balance; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE balance ( "balanceID" integer NOT NULL, "characterID" integer NOT NULL, balance real NOT NULL, "timestamp" timestamp without time zone NOT NULL ); ALTER TABLE balance OWNER TO spotmarketadmin; -- -- TOC entry 293 (class 1259 OID 1070902) -- Name: balance_balanceID_seq; Type: SEQUENCE; Schema: character; Owner: spotmarketadmin -- CREATE SEQUENCE "balance_balanceID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "balance_balanceID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2722 (class 0 OID 0) -- Dependencies: 293 -- Name: balance_balanceID_seq; Type: SEQUENCE OWNED BY; Schema: character; Owner: spotmarketadmin -- ALTER SEQUENCE "balance_balanceID_seq" OWNED BY balance."balanceID"; -- -- TOC entry 295 (class 1259 OID 1070917) -- Name: blueprint; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE blueprint ( "characterID" integer NOT NULL, "itemID" bigint NOT NULL, "locationID" bigint NOT NULL, "typeID" integer NOT NULL, quantity bigint NOT NULL, "flagID" bigint NOT NULL, "timeEfficiency" integer NOT NULL, "materialEfficiency" integer NOT NULL, runs integer NOT NULL ); ALTER TABLE blueprint OWNER TO spotmarketadmin; -- -- TOC entry 296 (class 1259 OID 1070928) -- Name: characters; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE characters ( "walletID" integer NOT NULL, "characterID" integer NOT NULL, "characterName" text NOT NULL, "keyID" integer NOT NULL, "vCode" text NOT NULL, "enableWallet" integer NOT NULL, "enableJournal" integer NOT NULL, "enableOrders" integer NOT NULL, "enableBlueprints" integer NOT NULL, "displayWallet" integer NOT NULL, "displayOrders" integer NOT NULL, "displayBlueprints" integer NOT NULL, "corpKey" integer NOT NULL ); ALTER TABLE characters OWNER TO spotmarketadmin; -- -- TOC entry 297 (class 1259 OID 1070940) -- Name: journal; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE journal ( "transactionDateTime" timestamp without time zone NOT NULL, "refID" bigint NOT NULL, "refTypeID" real NOT NULL, "ownerName1" text NOT NULL, "ownerID1" integer NOT NULL, "ownerName2" text, "ownerID2" integer, "argName1" text, "argID1" integer, amount real, balance real, reason text, "taxReceiverID" integer, "taxAmount" real ); ALTER TABLE journal OWNER TO spotmarketadmin; -- -- TOC entry 306 (class 1259 OID 2481729) -- Name: orders; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE orders ( "characterID" integer NOT NULL, "orderID" bigint NOT NULL, "stationID" bigint, "volEntered" integer, "volRemaining" integer, "minVolume" integer, "orderState" text, "typeID" integer, range integer, "accountKey" integer, duration integer, escrow real, price real, bid text, issued timestamp without time zone ); ALTER TABLE orders OWNER TO spotmarketadmin; -- -- TOC entry 299 (class 1259 OID 1071178) -- Name: skillqueue; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE skillqueue ( "characterID" integer NOT NULL, "endTime" timestamp without time zone NOT NULL, level integer NOT NULL, "typeID" integer NOT NULL, "startTime" timestamp without time zone NOT NULL, "endSP" integer NOT NULL, "startSP" integer NOT NULL, "queuePosition" integer NOT NULL ); ALTER TABLE skillqueue OWNER TO spotmarketadmin; -- -- TOC entry 298 (class 1259 OID 1070972) -- Name: wallet; Type: TABLE; Schema: character; Owner: spotmarketadmin -- CREATE TABLE wallet ( "transactionDateTime" timestamp without time zone NOT NULL, "transactionID" bigint NOT NULL, quantity bigint NOT NULL, "typeName" text NOT NULL, "typeID" integer NOT NULL, price real NOT NULL, "clientID" bigint NOT NULL, "clientName" text NOT NULL, "characterID" integer NOT NULL, "stationID" bigint NOT NULL, "transactionType" text NOT NULL, personal integer, "journalTransactionID" bigint, profit real, "transactionFor" text ); ALTER TABLE wallet OWNER TO spotmarketadmin; SET search_path = data, pg_catalog; -- -- TOC entry 281 (class 1259 OID 17047) -- Name: mapjumps; Type: TABLE; Schema: data; Owner: spotmarketadmin -- CREATE TABLE mapjumps ( "systemjumpID" integer NOT NULL, "solarSystemID" integer NOT NULL, "timestamp" timestamp without time zone NOT NULL, "shipJumps" integer NOT NULL ); ALTER TABLE mapjumps OWNER TO spotmarketadmin; -- -- TOC entry 282 (class 1259 OID 17050) -- Name: mapjumps_systemjumpID_seq; Type: SEQUENCE; Schema: data; Owner: spotmarketadmin -- CREATE SEQUENCE "mapjumps_systemjumpID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "mapjumps_systemjumpID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2723 (class 0 OID 0) -- Dependencies: 282 -- Name: mapjumps_systemjumpID_seq; Type: SEQUENCE OWNED BY; Schema: data; Owner: spotmarketadmin -- ALTER SEQUENCE "mapjumps_systemjumpID_seq" OWNED BY mapjumps."systemjumpID"; -- -- TOC entry 283 (class 1259 OID 17072) -- Name: moonevemoons; Type: TABLE; Schema: data; Owner: spotmarketadmin -- CREATE TABLE moonevemoons ( "moonID" integer NOT NULL, "typeID" integer NOT NULL ); ALTER TABLE moonevemoons OWNER TO spotmarketadmin; -- -- TOC entry 284 (class 1259 OID 17075) -- Name: moonevemoonsitems; Type: TABLE; Schema: data; Owner: spotmarketadmin -- CREATE TABLE moonevemoonsitems ( "solarSystemID" integer NOT NULL, result integer NOT NULL ); ALTER TABLE moonevemoonsitems OWNER TO spotmarketadmin; SET search_path = kill, pg_catalog; -- -- TOC entry 303 (class 1259 OID 1074272) -- Name: mail; Type: TABLE; Schema: kill; Owner: spotmarketadmin -- CREATE TABLE mail ( "killmailID" integer NOT NULL, "killID" integer NOT NULL, "killHash" text NOT NULL, "killData" jsonb, "totalValue" real ); ALTER TABLE mail OWNER TO spotmarketadmin; -- -- TOC entry 302 (class 1259 OID 1074270) -- Name: mail_killmailID_seq; Type: SEQUENCE; Schema: kill; Owner: spotmarketadmin -- CREATE SEQUENCE "mail_killmailID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "mail_killmailID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2724 (class 0 OID 0) -- Dependencies: 302 -- Name: mail_killmailID_seq; Type: SEQUENCE OWNED BY; Schema: kill; Owner: spotmarketadmin -- ALTER SEQUENCE "mail_killmailID_seq" OWNED BY mail."killmailID"; -- -- TOC entry 301 (class 1259 OID 1074264) -- Name: tracking; Type: TABLE; Schema: kill; Owner: spotmarketadmin -- CREATE TABLE tracking ( "killmailsitemsID" integer NOT NULL, "typeID" integer NOT NULL, enabled integer NOT NULL, "importResult" integer, "lastPage" integer, "importTimestamp" timestamp without time zone ); ALTER TABLE tracking OWNER TO spotmarketadmin; -- -- TOC entry 300 (class 1259 OID 1074262) -- Name: tracking_killmailsitemsID_seq; Type: SEQUENCE; Schema: kill; Owner: spotmarketadmin -- CREATE SEQUENCE "tracking_killmailsitemsID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "tracking_killmailsitemsID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2725 (class 0 OID 0) -- Dependencies: 300 -- Name: tracking_killmailsitemsID_seq; Type: SEQUENCE OWNED BY; Schema: kill; Owner: spotmarketadmin -- ALTER SEQUENCE "tracking_killmailsitemsID_seq" OWNED BY tracking."killmailsitemsID"; SET search_path = map, pg_catalog; -- -- TOC entry 311 (class 1259 OID 3145222) -- Name: jump; Type: TABLE; Schema: map; Owner: spotmarketadmin -- CREATE TABLE jump ( "systemjumpID" integer NOT NULL, "timestamp" timestamp without time zone NOT NULL, "shipJumps" integer NOT NULL, "solarSystemID" integer NOT NULL ); ALTER TABLE jump OWNER TO spotmarketadmin; -- -- TOC entry 310 (class 1259 OID 3145220) -- Name: jump_systemjumpID_seq; Type: SEQUENCE; Schema: map; Owner: spotmarketadmin -- CREATE SEQUENCE "jump_systemjumpID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "jump_systemjumpID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2726 (class 0 OID 0) -- Dependencies: 310 -- Name: jump_systemjumpID_seq; Type: SEQUENCE OWNED BY; Schema: map; Owner: spotmarketadmin -- ALTER SEQUENCE "jump_systemjumpID_seq" OWNED BY jump."systemjumpID"; -- -- TOC entry 313 (class 1259 OID 3145292) -- Name: kill; Type: TABLE; Schema: map; Owner: spotmarketadmin -- CREATE TABLE kill ( "systemkillID" integer NOT NULL, "timestamp" timestamp without time zone NOT NULL, "factionKills" integer NOT NULL, "podKills" integer NOT NULL, "shipKills" integer NOT NULL, "solarSystemID" integer NOT NULL ); ALTER TABLE kill OWNER TO spotmarketadmin; -- -- TOC entry 312 (class 1259 OID 3145290) -- Name: kill_systemkillID_seq; Type: SEQUENCE; Schema: map; Owner: spotmarketadmin -- CREATE SEQUENCE "kill_systemkillID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "kill_systemkillID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2727 (class 0 OID 0) -- Dependencies: 312 -- Name: kill_systemkillID_seq; Type: SEQUENCE OWNED BY; Schema: map; Owner: spotmarketadmin -- ALTER SEQUENCE "kill_systemkillID_seq" OWNED BY kill."systemkillID"; -- -- TOC entry 309 (class 1259 OID 3145134) -- Name: sov; Type: TABLE; Schema: map; Owner: spotmarketadmin -- CREATE TABLE sov ( "systemsovID" integer NOT NULL, "timestamp" timestamp without time zone NOT NULL, "allianceID" integer NOT NULL, "corporationID" integer NOT NULL, "solarSystemID" integer NOT NULL ); ALTER TABLE sov OWNER TO spotmarketadmin; -- -- TOC entry 308 (class 1259 OID 3145132) -- Name: sov_systemsovID_seq; Type: SEQUENCE; Schema: map; Owner: spotmarketadmin -- CREATE SEQUENCE "sov_systemsovID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "sov_systemsovID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2728 (class 0 OID 0) -- Dependencies: 308 -- Name: sov_systemsovID_seq; Type: SEQUENCE OWNED BY; Schema: map; Owner: spotmarketadmin -- ALTER SEQUENCE "sov_systemsovID_seq" OWNED BY sov."systemsovID"; SET search_path = market, pg_catalog; -- -- TOC entry 292 (class 1259 OID 1062456) -- Name: history; Type: TABLE; Schema: market; Owner: spotmarketadmin -- CREATE TABLE history ( "markethistoryID" integer NOT NULL, "regionID" integer NOT NULL, "typeID" integer NOT NULL, volume bigint NOT NULL, "orderCount" integer NOT NULL, "lowPrice" real NOT NULL, "highPrice" real NOT NULL, "avgPrice" real NOT NULL, "timestamp" timestamp without time zone NOT NULL ); ALTER TABLE history OWNER TO spotmarketadmin; -- -- TOC entry 291 (class 1259 OID 1062454) -- Name: history_markethistoryID_seq; Type: SEQUENCE; Schema: market; Owner: spotmarketadmin -- CREATE SEQUENCE "history_markethistoryID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "history_markethistoryID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2729 (class 0 OID 0) -- Dependencies: 291 -- Name: history_markethistoryID_seq; Type: SEQUENCE OWNED BY; Schema: market; Owner: spotmarketadmin -- ALTER SEQUENCE "history_markethistoryID_seq" OWNED BY history."markethistoryID"; -- -- TOC entry 305 (class 1259 OID 2217798) -- Name: inventory; Type: TABLE; Schema: market; Owner: spotmarketadmin -- CREATE TABLE inventory ( "marketinventoryID" integer NOT NULL, "transactionID" bigint NOT NULL, "typeID" integer NOT NULL, quantity integer NOT NULL, remaining integer NOT NULL, price real NOT NULL ); ALTER TABLE inventory OWNER TO spotmarketadmin; -- -- TOC entry 304 (class 1259 OID 2217796) -- Name: inventory_marketinventoryID_seq; Type: SEQUENCE; Schema: market; Owner: spotmarketadmin -- CREATE SEQUENCE "inventory_marketinventoryID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "inventory_marketinventoryID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2730 (class 0 OID 0) -- Dependencies: 304 -- Name: inventory_marketinventoryID_seq; Type: SEQUENCE OWNED BY; Schema: market; Owner: spotmarketadmin -- ALTER SEQUENCE "inventory_marketinventoryID_seq" OWNED BY inventory."marketinventoryID"; -- -- TOC entry 288 (class 1259 OID 1061340) -- Name: region; Type: TABLE; Schema: market; Owner: spotmarketadmin -- CREATE TABLE region ( "marketregionID" integer NOT NULL, "regionID" integer NOT NULL, enabled integer NOT NULL, rank integer, "timestamp" timestamp without time zone, "importResult" integer ); ALTER TABLE region OWNER TO spotmarketadmin; -- -- TOC entry 287 (class 1259 OID 1061338) -- Name: region_marketregionID_seq; Type: SEQUENCE; Schema: market; Owner: spotmarketadmin -- CREATE SEQUENCE "region_marketregionID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "region_marketregionID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2731 (class 0 OID 0) -- Dependencies: 287 -- Name: region_marketregionID_seq; Type: SEQUENCE OWNED BY; Schema: market; Owner: spotmarketadmin -- ALTER SEQUENCE "region_marketregionID_seq" OWNED BY region."marketregionID"; -- -- TOC entry 324 (class 1259 OID 3967002) -- Name: speculation; Type: TABLE; Schema: market; Owner: spotmarketadmin -- CREATE TABLE speculation ( "marketspeculationID" integer NOT NULL, "transactionID" bigint NOT NULL, "typeID" integer NOT NULL, quantity integer NOT NULL, remaining integer NOT NULL, price real NOT NULL ); ALTER TABLE speculation OWNER TO spotmarketadmin; -- -- TOC entry 323 (class 1259 OID 3966999) -- Name: speculation_marketspeculationID_seq; Type: SEQUENCE; Schema: market; Owner: spotmarketadmin -- CREATE SEQUENCE "speculation_marketspeculationID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "speculation_marketspeculationID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2732 (class 0 OID 0) -- Dependencies: 323 -- Name: speculation_marketspeculationID_seq; Type: SEQUENCE OWNED BY; Schema: market; Owner: spotmarketadmin -- ALTER SEQUENCE "speculation_marketspeculationID_seq" OWNED BY speculation."marketspeculationID"; -- -- TOC entry 290 (class 1259 OID 1061372) -- Name: tracking; Type: TABLE; Schema: market; Owner: spotmarketadmin -- CREATE TABLE tracking ( "marketitemID" integer NOT NULL, "typeID" integer NOT NULL, enabled integer NOT NULL, "importResult" integer, "importTimestamp" timestamp without time zone ); ALTER TABLE tracking OWNER TO spotmarketadmin; -- -- TOC entry 289 (class 1259 OID 1061370) -- Name: tracking_marketitemID_seq; Type: SEQUENCE; Schema: market; Owner: spotmarketadmin -- CREATE SEQUENCE "tracking_marketitemID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "tracking_marketitemID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2733 (class 0 OID 0) -- Dependencies: 289 -- Name: tracking_marketitemID_seq; Type: SEQUENCE OWNED BY; Schema: market; Owner: spotmarketadmin -- ALTER SEQUENCE "tracking_marketitemID_seq" OWNED BY tracking."marketitemID"; SET search_path = meta, pg_catalog; -- -- TOC entry 322 (class 1259 OID 3655145) -- Name: alliance; Type: TABLE; Schema: meta; Owner: spotmarketadmin -- CREATE TABLE alliance ( "allianceID" integer NOT NULL, "executorCorpID" integer NOT NULL, ticker text NOT NULL, "memberCount" integer NOT NULL, name text NOT NULL, "coalitionID" text, "startDate" timestamp without time zone NOT NULL ); ALTER TABLE alliance OWNER TO spotmarketadmin; -- -- TOC entry 321 (class 1259 OID 3640554) -- Name: coalition; Type: TABLE; Schema: meta; Owner: spotmarketadmin -- CREATE TABLE coalition ( "coalitionID" text, name text NOT NULL, ticker text ); ALTER TABLE coalition OWNER TO spotmarketadmin; -- -- TOC entry 307 (class 1259 OID 2493287) -- Name: conquerablestation; Type: TABLE; Schema: meta; Owner: spotmarketadmin -- CREATE TABLE conquerablestation ( "solarSystemID" integer, "stationID" integer NOT NULL, x double precision, y double precision, z double precision, name text NOT NULL ); ALTER TABLE conquerablestation OWNER TO spotmarketadmin; -- -- TOC entry 326 (class 1259 OID 7786495) -- Name: event; Type: TABLE; Schema: meta; Owner: spotmarketadmin -- CREATE TABLE event ( "eventID" integer NOT NULL, "eventName" text NOT NULL, "eventGroup" text NOT NULL, "timestamp" timestamp without time zone NOT NULL ); ALTER TABLE event OWNER TO spotmarketadmin; -- -- TOC entry 325 (class 1259 OID 7786493) -- Name: event_eventID_seq; Type: SEQUENCE; Schema: meta; Owner: spotmarketadmin -- CREATE SEQUENCE "event_eventID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "event_eventID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2734 (class 0 OID 0) -- Dependencies: 325 -- Name: event_eventID_seq; Type: SEQUENCE OWNED BY; Schema: meta; Owner: spotmarketadmin -- ALTER SEQUENCE "event_eventID_seq" OWNED BY event."eventID"; -- -- TOC entry 317 (class 1259 OID 3180513) -- Name: tranquility; Type: TABLE; Schema: meta; Owner: spotmarketadmin -- CREATE TABLE tranquility ( "tranquilityID" integer NOT NULL, "timestamp" timestamp without time zone NOT NULL, players integer NOT NULL, status boolean NOT NULL ); ALTER TABLE tranquility OWNER TO spotmarketadmin; -- -- TOC entry 316 (class 1259 OID 3180511) -- Name: tranquility_tranquilityID_seq; Type: SEQUENCE; Schema: meta; Owner: spotmarketadmin -- CREATE SEQUENCE "tranquility_tranquilityID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "tranquility_tranquilityID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2735 (class 0 OID 0) -- Dependencies: 316 -- Name: tranquility_tranquilityID_seq; Type: SEQUENCE OWNED BY; Schema: meta; Owner: spotmarketadmin -- ALTER SEQUENCE "tranquility_tranquilityID_seq" OWNED BY tranquility."tranquilityID"; SET search_path = moon, pg_catalog; -- -- TOC entry 320 (class 1259 OID 3190178) -- Name: killmail; Type: TABLE; Schema: moon; Owner: spotmarketadmin -- CREATE TABLE killmail ( "moonverifyID" integer NOT NULL, "moonID" integer NOT NULL, "killID" integer NOT NULL, "typeID" integer NOT NULL ); ALTER TABLE killmail OWNER TO spotmarketadmin; -- -- TOC entry 319 (class 1259 OID 3190176) -- Name: killmail_moonverifyID_seq; Type: SEQUENCE; Schema: moon; Owner: spotmarketadmin -- CREATE SEQUENCE "killmail_moonverifyID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "killmail_moonverifyID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2736 (class 0 OID 0) -- Dependencies: 319 -- Name: killmail_moonverifyID_seq; Type: SEQUENCE OWNED BY; Schema: moon; Owner: spotmarketadmin -- ALTER SEQUENCE "killmail_moonverifyID_seq" OWNED BY killmail."moonverifyID"; -- -- TOC entry 318 (class 1259 OID 3189674) -- Name: mineral; Type: TABLE; Schema: moon; Owner: spotmarketadmin -- CREATE TABLE mineral ( "moonID" integer NOT NULL, "typeID" integer NOT NULL ); ALTER TABLE mineral OWNER TO spotmarketadmin; SET search_path = system, pg_catalog; -- -- TOC entry 315 (class 1259 OID 3148258) -- Name: log; Type: TABLE; Schema: system; Owner: spotmarketadmin -- CREATE TABLE log ( "logID" integer NOT NULL, service text NOT NULL, severity integer NOT NULL, detail text NOT NULL, "timestamp" timestamp without time zone NOT NULL ); ALTER TABLE log OWNER TO spotmarketadmin; -- -- TOC entry 314 (class 1259 OID 3148256) -- Name: log_logID_seq; Type: SEQUENCE; Schema: system; Owner: spotmarketadmin -- CREATE SEQUENCE "log_logID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "log_logID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2737 (class 0 OID 0) -- Dependencies: 314 -- Name: log_logID_seq; Type: SEQUENCE OWNED BY; Schema: system; Owner: spotmarketadmin -- ALTER SEQUENCE "log_logID_seq" OWNED BY log."logID"; -- -- TOC entry 286 (class 1259 OID 1009285) -- Name: settings; Type: TABLE; Schema: system; Owner: spotmarketadmin -- CREATE TABLE settings ( "settingID" integer NOT NULL, version text NOT NULL ); ALTER TABLE settings OWNER TO spotmarketadmin; -- -- TOC entry 285 (class 1259 OID 1009283) -- Name: settings_settingID_seq; Type: SEQUENCE; Schema: system; Owner: spotmarketadmin -- CREATE SEQUENCE "settings_settingID_seq" START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; ALTER TABLE "settings_settingID_seq" OWNER TO spotmarketadmin; -- -- TOC entry 2738 (class 0 OID 0) -- Dependencies: 285 -- Name: settings_settingID_seq; Type: SEQUENCE OWNED BY; Schema: system; Owner: spotmarketadmin -- ALTER SEQUENCE "settings_settingID_seq" OWNED BY settings."settingID"; SET search_path = "character", pg_catalog; -- -- TOC entry 2512 (class 2604 OID 1070907) -- Name: balanceID; Type: DEFAULT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY balance ALTER COLUMN "balanceID" SET DEFAULT nextval('"balance_balanceID_seq"'::regclass); SET search_path = data, pg_catalog; -- -- TOC entry 2507 (class 2604 OID 17114) -- Name: systemjumpID; Type: DEFAULT; Schema: data; Owner: spotmarketadmin -- ALTER TABLE ONLY mapjumps ALTER COLUMN "systemjumpID" SET DEFAULT nextval('"mapjumps_systemjumpID_seq"'::regclass); SET search_path = kill, pg_catalog; -- -- TOC entry 2514 (class 2604 OID 1074275) -- Name: killmailID; Type: DEFAULT; Schema: kill; Owner: spotmarketadmin -- ALTER TABLE ONLY mail ALTER COLUMN "killmailID" SET DEFAULT nextval('"mail_killmailID_seq"'::regclass); -- -- TOC entry 2513 (class 2604 OID 1074267) -- Name: killmailsitemsID; Type: DEFAULT; Schema: kill; Owner: spotmarketadmin -- ALTER TABLE ONLY tracking ALTER COLUMN "killmailsitemsID" SET DEFAULT nextval('"tracking_killmailsitemsID_seq"'::regclass); SET search_path = map, pg_catalog; -- -- TOC entry 2517 (class 2604 OID 3145225) -- Name: systemjumpID; Type: DEFAULT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY jump ALTER COLUMN "systemjumpID" SET DEFAULT nextval('"jump_systemjumpID_seq"'::regclass); -- -- TOC entry 2518 (class 2604 OID 3145295) -- Name: systemkillID; Type: DEFAULT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY kill ALTER COLUMN "systemkillID" SET DEFAULT nextval('"kill_systemkillID_seq"'::regclass); -- -- TOC entry 2516 (class 2604 OID 3145137) -- Name: systemsovID; Type: DEFAULT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY sov ALTER COLUMN "systemsovID" SET DEFAULT nextval('"sov_systemsovID_seq"'::regclass); SET search_path = market, pg_catalog; -- -- TOC entry 2511 (class 2604 OID 1062459) -- Name: markethistoryID; Type: DEFAULT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY history ALTER COLUMN "markethistoryID" SET DEFAULT nextval('"history_markethistoryID_seq"'::regclass); -- -- TOC entry 2515 (class 2604 OID 2217801) -- Name: marketinventoryID; Type: DEFAULT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY inventory ALTER COLUMN "marketinventoryID" SET DEFAULT nextval('"inventory_marketinventoryID_seq"'::regclass); -- -- TOC entry 2509 (class 2604 OID 1061343) -- Name: marketregionID; Type: DEFAULT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY region ALTER COLUMN "marketregionID" SET DEFAULT nextval('"region_marketregionID_seq"'::regclass); -- -- TOC entry 2522 (class 2604 OID 3967005) -- Name: marketspeculationID; Type: DEFAULT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY speculation ALTER COLUMN "marketspeculationID" SET DEFAULT nextval('"speculation_marketspeculationID_seq"'::regclass); -- -- TOC entry 2510 (class 2604 OID 1061375) -- Name: marketitemID; Type: DEFAULT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY tracking ALTER COLUMN "marketitemID" SET DEFAULT nextval('"tracking_marketitemID_seq"'::regclass); SET search_path = meta, pg_catalog; -- -- TOC entry 2523 (class 2604 OID 7786498) -- Name: eventID; Type: DEFAULT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY event ALTER COLUMN "eventID" SET DEFAULT nextval('"event_eventID_seq"'::regclass); -- -- TOC entry 2520 (class 2604 OID 3180516) -- Name: tranquilityID; Type: DEFAULT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY tranquility ALTER COLUMN "tranquilityID" SET DEFAULT nextval('"tranquility_tranquilityID_seq"'::regclass); SET search_path = moon, pg_catalog; -- -- TOC entry 2521 (class 2604 OID 3190181) -- Name: moonverifyID; Type: DEFAULT; Schema: moon; Owner: spotmarketadmin -- ALTER TABLE ONLY killmail ALTER COLUMN "moonverifyID" SET DEFAULT nextval('"killmail_moonverifyID_seq"'::regclass); SET search_path = system, pg_catalog; -- -- TOC entry 2519 (class 2604 OID 3148261) -- Name: logID; Type: DEFAULT; Schema: system; Owner: spotmarketadmin -- ALTER TABLE ONLY log ALTER COLUMN "logID" SET DEFAULT nextval('"log_logID_seq"'::regclass); -- -- TOC entry 2508 (class 2604 OID 1009288) -- Name: settingID; Type: DEFAULT; Schema: system; Owner: spotmarketadmin -- ALTER TABLE ONLY settings ALTER COLUMN "settingID" SET DEFAULT nextval('"settings_settingID_seq"'::regclass); SET search_path = "character", pg_catalog; -- -- TOC entry 2544 (class 2606 OID 1070909) -- Name: pk_character_balance; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY balance ADD CONSTRAINT pk_character_balance PRIMARY KEY ("characterID", balance, "timestamp"); -- -- TOC entry 2548 (class 2606 OID 1070921) -- Name: pk_character_blueprint; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY blueprint ADD CONSTRAINT pk_character_blueprint PRIMARY KEY ("characterID", "itemID", "locationID", "typeID", quantity, "flagID", "timeEfficiency", "materialEfficiency", runs); -- -- TOC entry 2573 (class 2606 OID 2481736) -- Name: pk_character_orders; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY orders ADD CONSTRAINT pk_character_orders PRIMARY KEY ("characterID", "orderID"); -- -- TOC entry 2561 (class 2606 OID 1071182) -- Name: pk_character_skillqueue; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY skillqueue ADD CONSTRAINT pk_character_skillqueue PRIMARY KEY ("characterID", "endTime", level, "typeID", "startTime", "endSP", "startSP", "queuePosition"); -- -- TOC entry 2550 (class 2606 OID 1070935) -- Name: pkey_character_characters; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY characters ADD CONSTRAINT pkey_character_characters PRIMARY KEY ("characterID"); -- -- TOC entry 2555 (class 2606 OID 1070947) -- Name: pkey_character_journal; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY journal ADD CONSTRAINT pkey_character_journal PRIMARY KEY ("refID"); -- -- TOC entry 2559 (class 2606 OID 1070979) -- Name: pkey_character_wallet; Type: CONSTRAINT; Schema: character; Owner: spotmarketadmin -- ALTER TABLE ONLY wallet ADD CONSTRAINT pkey_character_wallet PRIMARY KEY ("transactionID"); SET search_path = data, pg_catalog; -- -- TOC entry 2527 (class 2606 OID 23588) -- Name: mapjumps_pkey; Type: CONSTRAINT; Schema: data; Owner: spotmarketadmin -- ALTER TABLE ONLY mapjumps ADD CONSTRAINT mapjumps_pkey PRIMARY KEY ("timestamp", "solarSystemID", "shipJumps"); -- -- TOC entry 2529 (class 2606 OID 23610) -- Name: pk_moonevemoons; Type: CONSTRAINT; Schema: data; Owner: spotmarketadmin -- ALTER TABLE ONLY moonevemoons ADD CONSTRAINT pk_moonevemoons PRIMARY KEY ("moonID", "typeID"); -- -- TOC entry 2531 (class 2606 OID 23612) -- Name: pk_moonevemoonsitems; Type: CONSTRAINT; Schema: data; Owner: spotmarketadmin -- ALTER TABLE ONLY moonevemoonsitems ADD CONSTRAINT pk_moonevemoonsitems PRIMARY KEY ("solarSystemID", result); SET search_path = kill, pg_catalog; -- -- TOC entry 2568 (class 2606 OID 2277110) -- Name: pk_kill_mail; Type: CONSTRAINT; Schema: kill; Owner: spotmarketadmin -- ALTER TABLE ONLY mail ADD CONSTRAINT pk_kill_mail PRIMARY KEY ("killID"); -- -- TOC entry 2563 (class 2606 OID 1074269) -- Name: pk_kill_tracking; Type: CONSTRAINT; Schema: kill; Owner: spotmarketadmin -- ALTER TABLE ONLY tracking ADD CONSTRAINT pk_kill_tracking PRIMARY KEY ("typeID"); SET search_path = map, pg_catalog; -- -- TOC entry 2582 (class 2606 OID 3145227) -- Name: pk_map_jump; Type: CONSTRAINT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY jump ADD CONSTRAINT pk_map_jump PRIMARY KEY ("timestamp", "solarSystemID"); -- -- TOC entry 2586 (class 2606 OID 3145297) -- Name: pk_map_kill; Type: CONSTRAINT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY kill ADD CONSTRAINT pk_map_kill PRIMARY KEY ("timestamp", "solarSystemID"); -- -- TOC entry 2578 (class 2606 OID 3145139) -- Name: pk_map_sov; Type: CONSTRAINT; Schema: map; Owner: spotmarketadmin -- ALTER TABLE ONLY sov ADD CONSTRAINT pk_map_sov PRIMARY KEY ("systemsovID"); SET search_path = market, pg_catalog; -- -- TOC entry 2539 (class 2606 OID 2200589) -- Name: history_pkey; Type: CONSTRAINT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY history ADD CONSTRAINT history_pkey PRIMARY KEY ("regionID", "typeID", "timestamp"); -- -- TOC entry 2571 (class 2606 OID 2217803) -- Name: pk_market_inventory; Type: CONSTRAINT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY inventory ADD CONSTRAINT pk_market_inventory PRIMARY KEY ("transactionID"); -- -- TOC entry 2535 (class 2606 OID 1061345) -- Name: pk_market_region; Type: CONSTRAINT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY region ADD CONSTRAINT pk_market_region PRIMARY KEY ("regionID"); -- -- TOC entry 2603 (class 2606 OID 3967007) -- Name: pk_market_speculation; Type: CONSTRAINT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY speculation ADD CONSTRAINT pk_market_speculation PRIMARY KEY ("transactionID"); -- -- TOC entry 2537 (class 2606 OID 1061377) -- Name: pk_market_tracking; Type: CONSTRAINT; Schema: market; Owner: spotmarketadmin -- ALTER TABLE ONLY tracking ADD CONSTRAINT pk_market_tracking PRIMARY KEY ("typeID"); SET search_path = meta, pg_catalog; -- -- TOC entry 2600 (class 2606 OID 3655152) -- Name: pk_meta_alliance; Type: CONSTRAINT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY alliance ADD CONSTRAINT pk_meta_alliance PRIMARY KEY ("allianceID"); -- -- TOC entry 2598 (class 2606 OID 3640561) -- Name: pk_meta_coalition; Type: CONSTRAINT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY coalition ADD CONSTRAINT pk_meta_coalition PRIMARY KEY (name); -- -- TOC entry 2575 (class 2606 OID 2493294) -- Name: pk_meta_conquerablestation; Type: CONSTRAINT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY conquerablestation ADD CONSTRAINT pk_meta_conquerablestation PRIMARY KEY ("stationID"); -- -- TOC entry 2590 (class 2606 OID 3180518) -- Name: pk_meta_tranquility; Type: CONSTRAINT; Schema: meta; Owner: spotmarketadmin -- ALTER TABLE ONLY tranquility ADD CONSTRAINT pk_meta_tranquility PRIMARY KEY ("timestamp", players, status); SET search_path = moon, pg_catalog; -- -- TOC entry 2596 (class 2606 OID 3190183) -- Name: pk_moon_killmail; Type: CONSTRAINT; Schema: moon; Owner: spotmarketadmin -- ALTER TABLE ONLY killmail ADD CONSTRAINT pk_moon_killmail PRIMARY KEY ("moonID", "killID", "typeID"); -- -- TOC entry 2592 (class 2606 OID 3189678) -- Name: pk_moon_mineral; Type: CONSTRAINT; Schema: moon; Owner: spotmarketadmin -- ALTER TABLE ONLY mineral ADD CONSTRAINT pk_moon_mineral PRIMARY KEY ("moonID", "typeID"); SET search_path = system, pg_catalog; -- -- TOC entry 2533 (class 2606 OID 1009293) -- Name: pk_settings; Type: CONSTRAINT; Schema: system; Owner: spotmarketadmin -- ALTER TABLE ONLY settings ADD CONSTRAINT pk_settings PRIMARY KEY ("settingID"); -- -- TOC entry 2588 (class 2606 OID 3148266) -- Name: pk_system_log; Type: CONSTRAINT; Schema: system; Owner: spotmarketadmin -- ALTER TABLE ONLY log ADD CONSTRAINT pk_system_log PRIMARY KEY ("logID"); SET search_path = "character", pg_catalog; -- -- TOC entry 2542 (class 1259 OID 1070910) -- Name: idx_character_balance_characterid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_balance_characterid ON balance USING btree ("characterID" DESC NULLS LAST); -- -- TOC entry 2545 (class 1259 OID 1070922) -- Name: idx_character_blueprint_characterid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_blueprint_characterid ON blueprint USING btree ("characterID" DESC NULLS LAST); -- -- TOC entry 2546 (class 1259 OID 1070923) -- Name: idx_character_blueprint_typeid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_blueprint_typeid ON blueprint USING btree ("typeID" DESC NULLS LAST); -- -- TOC entry 2551 (class 1259 OID 1070948) -- Name: idx_character_journal_ownerid1; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_journal_ownerid1 ON journal USING btree ("ownerID1" DESC NULLS LAST); -- -- TOC entry 2552 (class 1259 OID 1070949) -- Name: idx_character_journal_ownerid2; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_journal_ownerid2 ON journal USING btree ("ownerID2" DESC NULLS LAST); -- -- TOC entry 2553 (class 1259 OID 1070950) -- Name: idx_character_journal_taxreceiverid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_journal_taxreceiverid ON journal USING btree ("taxReceiverID" DESC NULLS LAST); -- -- TOC entry 2556 (class 1259 OID 1070980) -- Name: idx_character_wallet_stationid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_wallet_stationid ON wallet USING btree ("stationID" DESC NULLS LAST); -- -- TOC entry 2557 (class 1259 OID 1070981) -- Name: idx_character_wallet_typeid; Type: INDEX; Schema: character; Owner: spotmarketadmin -- CREATE INDEX idx_character_wallet_typeid ON wallet USING btree ("typeID" DESC NULLS LAST); SET search_path = data, pg_catalog; -- -- TOC entry 2524 (class 1259 OID 23624) -- Name: idx_mapjumps_solarsystemid; Type: INDEX; Schema: data; Owner: spotmarketadmin -- CREATE INDEX idx_mapjumps_solarsystemid ON mapjumps USING btree ("solarSystemID" DESC NULLS LAST); -- -- TOC entry 2525 (class 1259 OID 23625) -- Name: idx_mapjumps_timestamp; Type: INDEX; Schema: data; Owner: spotmarketadmin -- CREATE INDEX idx_mapjumps_timestamp ON mapjumps USING btree ("timestamp" DESC NULLS LAST); SET search_path = kill, pg_catalog; -- -- TOC entry 2564 (class 1259 OID 1074281) -- Name: idx_kill_mail_solarsystemid; Type: INDEX; Schema: kill; Owner: spotmarketadmin -- CREATE INDEX idx_kill_mail_solarsystemid ON mail USING btree ((((("killData" -> 'solarSystem'::text) ->> 'id'::text))::integer)); -- -- TOC entry 2565 (class 1259 OID 1074282) -- Name: idx_kill_mail_timestamp; Type: INDEX; Schema: kill; Owner: spotmarketadmin -- CREATE INDEX idx_kill_mail_timestamp ON mail USING btree ((("killData" -> 'killTime'::text)) DESC); -- -- TOC entry 2566 (class 1259 OID 1074283) -- Name: idx_kill_mail_typeid; Type: INDEX; Schema: kill; Owner: spotmarketadmin -- CREATE INDEX idx_kill_mail_typeid ON mail USING btree (((((("killData" -> 'victim'::text) -> 'shipType'::text) ->> 'id'::text))::integer)); SET search_path = map, pg_catalog; -- -- TOC entry 2579 (class 1259 OID 7786481) -- Name: idx_map_jump_solarsystemid; Type: INDEX; Schema: map; Owner: spotmarketadmin -- CREATE INDEX idx_map_jump_solarsystemid ON jump USING btree ("solarSystemID" DESC NULLS LAST); -- -- TOC entry 2580 (class 1259 OID 3145229) -- Name: idx_map_jump_timestamp; Type: INDEX; Schema: map; Owner: spotmarketadmin -- CREATE INDEX idx_map_jump_timestamp ON jump USING btree ("timestamp" DESC NULLS LAST); -- -- TOC entry 2583 (class 1259 OID 7786482) -- Name: idx_map_kill_solarsystemid; Type: INDEX; Schema: map; Owner: spotmarketadmin -- CREATE INDEX idx_map_kill_solarsystemid ON kill USING btree ("solarSystemID" DESC NULLS LAST); -- -- TOC entry 2584 (class 1259 OID 3145299) -- Name: idx_map_kill_timestamp; Type: INDEX; Schema: map; Owner: spotmarketadmin -- CREATE INDEX idx_map_kill_timestamp ON kill USING btree ("timestamp" DESC NULLS LAST); -- -- TOC entry 2576 (class 1259 OID 3145140) -- Name: idx_map_sov_timestamp; Type: INDEX; Schema: map; Owner: spotmarketadmin -- CREATE INDEX idx_map_sov_timestamp ON sov USING btree ("timestamp" DESC NULLS LAST); SET search_path = market, pg_catalog; -- -- TOC entry 2540 (class 1259 OID 1062462) -- Name: idx_market_history_regionid; Type: INDEX; Schema: market; Owner: spotmarketadmin -- CREATE INDEX idx_market_history_regionid ON history USING btree ("regionID" DESC NULLS LAST); -- -- TOC entry 2541 (class 1259 OID 1062464) -- Name: idx_market_history_typeid; Type: INDEX; Schema: market; Owner: spotmarketadmin -- CREATE INDEX idx_market_history_typeid ON history USING btree ("typeID" DESC NULLS LAST); -- -- TOC entry 2569 (class 1259 OID 2217804) -- Name: idx_market_inventory_typeid; Type: INDEX; Schema: market; Owner: spotmarketadmin -- CREATE INDEX idx_market_inventory_typeid ON inventory USING btree ("typeID" DESC NULLS LAST); -- -- TOC entry 2601 (class 1259 OID 3967008) -- Name: idx_market_speculation_typeid; Type: INDEX; Schema: market; Owner: spotmarketadmin -- CREATE INDEX idx_market_speculation_typeid ON speculation USING btree ("typeID" DESC NULLS LAST); SET search_path = moon, pg_catalog; -- -- TOC entry 2593 (class 1259 OID 3190184) -- Name: idx_moon_killmail_moonid; Type: INDEX; Schema: moon; Owner: spotmarketadmin -- CREATE INDEX idx_moon_killmail_moonid ON killmail USING btree ("moonID" DESC NULLS LAST); -- -- TOC entry 2594 (class 1259 OID 3190185) -- Name: idx_moon_killmail_typeid; Type: INDEX; Schema: moon; Owner: spotmarketadmin -- CREATE INDEX idx_moon_killmail_typeid ON killmail USING btree ("typeID" DESC NULLS LAST); -- Completed on 2016-06-10 16:32:39 -- -- PostgreSQL database dump complete --
24.692633
170
0.73356
43c08c473c97d781b926aeca628fbb0ec1d3b504
1,928
go
Go
examples/templates/main.go
robvanbentem/sendinblue
317844f502f77c0822f3fa64b4ab17e9aaba86fc
[ "Apache-2.0" ]
null
null
null
examples/templates/main.go
robvanbentem/sendinblue
317844f502f77c0822f3fa64b4ab17e9aaba86fc
[ "Apache-2.0" ]
null
null
null
examples/templates/main.go
robvanbentem/sendinblue
317844f502f77c0822f3fa64b4ab17e9aaba86fc
[ "Apache-2.0" ]
null
null
null
package main import ( "log" "os" "github.com/JKhawaja/sendinblue" ) func main() { // recommendation: set API key as system environment variable apiKey := os.Getenv("SIB_KEY") // Create SendInBlue Client sibClient, err := sib.NewClient(apiKey) if err != nil { log.Println("Client creation error: ") log.Println(err) os.Exit(1) } /* Create Template */ myTemplate := &sib.Template{ Template_name: "Test Template", Html_content: "Hello World.", Subject: "Test Template Email", From_email: "sender@example.net", // SENDER EMAIL HERE Status: 1, // activate template } createResponse, err := sibClient.CreateTemplate(myTemplate) if err != nil { log.Println("Create template error: ") log.Println(err) os.Exit(1) } log.Println(createResponse.Code) log.Println(createResponse.Message) /* Send Template Email */ templateID := createResponse.Data.ID userList := []string{"user1@example.net", "user2@example.net", "user3@example.net"} // RECEIVER EMAILS HERE sendResponse, err := sibClient.SendTemplateEmail(templateID, userList, nil) if err != nil { log.Println("Send template email error: ") log.Println(err) os.Exit(1) } log.Println(sendResponse.Code) log.Println(sendResponse.Message) /* Update Template */ udpateTemplate := &sib.Template{ Template_name: "Test Template", Html_content: "Hello World. UPDATED!", Subject: "Test Template Email", From_email: "sender@example.net", // SENDER EMAIL HERE Status: 1, } err = sibClient.UpdateTemplate(templateID, udpateTemplate) if err != nil { log.Println("Update template error: ") log.Println(err) os.Exit(1) } log.Println("Update Template: successful") /* Get Template */ getResponse, err := sibClient.GetTemplate(templateID) if err != nil { log.Println("Get template error: ") log.Println(err) os.Exit(1) } log.Println(getResponse) }
22.952381
108
0.679461
0b8210f4f1d6486c1ca027ea81ba3795882b8a8f
3,433
py
Python
tests/python/benchmarks/two_neighborhood_bench.py
sid17/weaver
f9074397ca854a777a873eaf409621de679f9749
[ "BSD-3-Clause" ]
163
2015-01-02T03:51:38.000Z
2022-03-21T23:06:39.000Z
tests/python/benchmarks/two_neighborhood_bench.py
sid17/weaver
f9074397ca854a777a873eaf409621de679f9749
[ "BSD-3-Clause" ]
1
2015-04-08T23:17:06.000Z
2015-04-24T15:25:26.000Z
tests/python/benchmarks/two_neighborhood_bench.py
sid17/weaver
f9074397ca854a777a873eaf409621de679f9749
[ "BSD-3-Clause" ]
20
2015-02-17T19:24:05.000Z
2020-10-29T01:59:18.000Z
#! /usr/bin/env python # # =============================================================== # Description: Two neighborhood benchmark # # Created: 2014-03-21 13:39:06 # # Author: Ayush Dubey, dubey@cs.cornell.edu # # Copyright (C) 2013-2014, Cornell University, see the LICENSE # file for licensing agreement # =============================================================== # import random import sys import time import threading import weaver.client as client import simple_client random.seed(42) num_edges = 1768149 edge_sources = [None] * num_edges def choose_random_pair(): global edge_sources return (edge_sources[random.randint(0, num_edges-1)], edge_sources[random.randint(0, num_edges-1)]) if (len(sys.argv) != 2): print "want single extra arg for file to open" assert(False) f = open(sys.argv[1]) i = 0 for line in f: if (line[0] is '#'): continue edge_sources[i] = int(line.split(" ")[0]) i += 1 print "done loading file" num_started = 0 num_finished = 0 cv = threading.Condition() num_nodes = 81306 # snap twitter-combined read_percent = 95 # node handles are range(0, num_nodes) num_vts = 1 num_clients = 100 requests_per_client = 200 def add_labels(c, idx): global num_nodes tx_id = c.begin_tx() for i in range(num_nodes): if i % num_clients is idx: c.set_node_property(tx_id, i, 'name', str(i)) assert(c.end_tx(tx_id)) print "writing labels finished for client " + str(idx) def exec_reads(reqs, sc, c, exec_time, idx): global num_started global cv global num_clients global num_finished with cv: while num_started < num_clients: cv.wait() start = time.time() cnt = 0 for pair in reqs: cnt += 1 if (random.randint(1,100) > read_percent) : tx_id = c.begin_tx() c.create_edge(tx_id, pair[0], pair[1]) assert(c.end_tx(tx_id)) else: two_neighborhood = sc.two_neighborhood(pair[0], "name", caching = True) end = time.time() with cv: num_finished += 1 cv.notify_all() exec_time[idx] = end - start clients = [] simple_clients = [] for i in range(num_clients): clients.append(client.Client(client._CLIENT_ID + i, i % num_vts)) simple_clients.append(simple_client.simple_client(clients[i])) reqs = [] for i in range(num_clients): cl_reqs = [] for _ in range(requests_per_client): cl_reqs.append(choose_random_pair()) reqs.append(cl_reqs) exec_time = [0] * num_clients threads = [] print "starting writes" for i in range(num_clients): thr = threading.Thread(target=add_labels, args=(clients[i], i)) thr.start() threads.append(thr) for thr in threads: thr.join() print "starting requests" for i in range(num_clients): thr = threading.Thread(target=exec_reads, args=(reqs[i], simple_clients[i], clients[i], exec_time, i)) thr.start() threads.append(thr) start_time = time.time() with cv: num_started = num_clients cv.notify_all() while num_finished < num_clients: cv.wait() end_time = time.time() total_time = end_time-start_time for thr in threads: thr.join() print 'Total time for ' + str(num_clients * requests_per_client) + 'requests = ' + str(total_time) throughput = (num_clients * requests_per_client) / total_time print 'Throughput = ' + str(throughput)
26.206107
106
0.633265
1de8b1590d2fc14ece2fe937f310fc31f84f3459
2,223
kt
Kotlin
app/src/main/java/com/androidexamples/app/flows/broadcastReceiver/LocalBroadcastActivity.kt
marcosvbras/AndroidExamples
9d0d87c081f832786ff2a5d7d362d2fa596306a9
[ "Apache-2.0" ]
1
2018-04-10T23:08:46.000Z
2018-04-10T23:08:46.000Z
app/src/main/java/com/androidexamples/app/flows/broadcastReceiver/LocalBroadcastActivity.kt
marcosvbras/AndroidExamples
9d0d87c081f832786ff2a5d7d362d2fa596306a9
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/androidexamples/app/flows/broadcastReceiver/LocalBroadcastActivity.kt
marcosvbras/AndroidExamples
9d0d87c081f832786ff2a5d7d362d2fa596306a9
[ "Apache-2.0" ]
null
null
null
package com.androidexamples.app.flows.broadcastReceiver import android.content.BroadcastReceiver import android.content.Context import android.content.Intent import android.content.IntentFilter import android.support.v4.content.LocalBroadcastManager import android.support.v7.app.AppCompatActivity import android.os.Bundle import android.support.v7.widget.Toolbar import android.view.View import android.widget.TextView import android.widget.Toast import com.androidexamples.app.R class LocalBroadcastActivity : AppCompatActivity() { // Views private var textViewMessage: TextView? = null // Another objects private var localBroadcastManager: LocalBroadcastManager? = null private val dynamicReceiver = object : BroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { textViewMessage!!.text = context.getString(R.string.message_arrived) } } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_local_broadcast) loadComponents() localBroadcastManager = LocalBroadcastManager.getInstance(this) // Registra o broadcast receiver de forma local localBroadcastManager!!.registerReceiver(dynamicReceiver, IntentFilter("Katiuga")) } private fun loadComponents() { setSupportActionBar(findViewById<View>(R.id.top_toolbar) as Toolbar) supportActionBar!!.setDisplayHomeAsUpEnabled(true) findViewById<View>(R.id.button_send_broadcast).setOnClickListener(onButtonClickListener()) textViewMessage = findViewById<View>(R.id.text_view_message) as TextView } private fun onButtonClickListener(): View.OnClickListener { return View.OnClickListener { v -> when (v.id) { R.id.button_send_broadcast -> { localBroadcastManager!!.sendBroadcast(Intent("Katiuga")) Toast.makeText(baseContext, "Intent sent", Toast.LENGTH_SHORT).show() } } } } override fun onDestroy() { super.onDestroy() localBroadcastManager!!.unregisterReceiver(dynamicReceiver) } }
34.734375
98
0.71525
128ef22b7b319469749040320399517368c9fc4d
1,125
h
C
Applied/CCore/inc/crypton/Forget.h
SergeyStrukov/CCore-4-xx
5faeadd50a24a7dbe18ffff8efe5f49212588637
[ "BSL-1.0" ]
null
null
null
Applied/CCore/inc/crypton/Forget.h
SergeyStrukov/CCore-4-xx
5faeadd50a24a7dbe18ffff8efe5f49212588637
[ "BSL-1.0" ]
null
null
null
Applied/CCore/inc/crypton/Forget.h
SergeyStrukov/CCore-4-xx
5faeadd50a24a7dbe18ffff8efe5f49212588637
[ "BSL-1.0" ]
null
null
null
/* Forget.h */ //---------------------------------------------------------------------------------------- // // Project: CCore 4.01 // // Tag: Applied // // License: Boost Software License - Version 1.0 - August 17th, 2003 // // see http://www.boost.org/LICENSE_1_0.txt or the local copy // // Copyright (c) 2020 Sergey Strukov. All rights reserved. // //---------------------------------------------------------------------------------------- #ifndef CCore_inc_crypton_Forget_h #define CCore_inc_crypton_Forget_h #include <CCore/inc/Gadget.h> namespace CCore { namespace Crypton { /* functions */ template <class T> void PrepareForget(T &obj) noexcept { obj=T(); } template <class T,ulen Len> void PrepareForget(T (&obj)[Len]) noexcept { for(ulen i=0; i<Len ;i++) PrepareForget(obj[i]); } template <class T> void Forget(T &obj) noexcept { PrepareForget(obj); OptimizeBarrier(&obj,sizeof obj); } template <class T> void ForgetRange(PtrLen<T> data) noexcept { data.set_null(); OptimizeBarrier(data.ptr,data.len*sizeof (T)); } } // namespace Crypton } // namespace CCore #endif
18.75
90
0.567111