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
4a06e448c31a6264dfda5e36a9cc3418b7a64627
381
cpp
C++
diff2/aligned_storage.cpp
IgorHersht/proxygen_ih
616a8eb899196d2a130e14c0fabcae1944e34b7d
[ "MIT" ]
7
2017-11-10T05:18:30.000Z
2021-04-29T15:38:25.000Z
diff2/aligned_storage.cpp
IgorHersht/proxygen_ih
616a8eb899196d2a130e14c0fabcae1944e34b7d
[ "MIT" ]
null
null
null
diff2/aligned_storage.cpp
IgorHersht/proxygen_ih
616a8eb899196d2a130e14c0fabcae1944e34b7d
[ "MIT" ]
null
null
null
// aligned_storage example #include <iostream> #include <type_traits> struct A { // non-POD type int avg; A (int a, int b) : avg((a+b)/2) {} }; typedef std::aligned_storage<sizeof(A),1024 >::type A_pod; int main() { A_pod a,b; new (&a) A (10,20); b=a; std::cout << reinterpret_cast<A&>(b).avg << std::endl; std::cout << alignof(A_pod) << std::endl; return 0; }
19.05
58
0.606299
32cec9219394a802e32bf5c2ac94e53a29ad1b0c
19,223
kt
Kotlin
Others/CommentBot/vertxBusGen/src/commonMain/kotlin/org/duangsuse/TemplatorIntrp.kt
duangsuse/Share
fac2af2dc24bc9952b6849241d81020600e3c7e8
[ "MIT" ]
5
2019-08-06T14:21:20.000Z
2022-02-20T16:02:43.000Z
Others/CommentBot/vertxBusGen/src/commonMain/kotlin/org/duangsuse/TemplatorIntrp.kt
duangsuse-valid-projects/Share
3b01f8acc235333cd0c2a943a22d6031c005d0d0
[ "MIT" ]
3
2019-07-24T00:02:44.000Z
2020-12-16T06:21:41.000Z
Others/CommentBot/vertxBusGen/src/commonMain/kotlin/org/duangsuse/TemplatorIntrp.kt
duangsuse/Share
fac2af2dc24bc9952b6849241d81020600e3c7e8
[ "MIT" ]
1
2019-07-23T13:58:04.000Z
2019-07-23T13:58:04.000Z
package org.duangsuse import kotlin.jvm.JvmStatic typealias Obj = Any? typealias Globals = MutableMap<String, Obj> typealias Processor = Scope.(Obj) -> Obj interface Scope { operator fun get(key: String): Obj operator fun set(key: String, value: Obj) fun enterBlock(); fun leaveBlock() fun closure() = this } /** Basic enclosed scope implementation */ open class DynamicScoping(val globals: Globals): Scope { private val stack = mutableListOf<Globals?>() override fun get(key: String) = globals[key] override fun set(key: String, value: Obj) { if (stack.isNotEmpty()) { val parent = stack.getOrInit(stack.lastIndex, ::mutableMapOf) parent[key] = globals[key] } globals[key] = value } override fun enterBlock() { stack.add(null) } override fun leaveBlock() { val parent = stack.removeAt(stack.lastIndex) ?: return // no set() called on that for ((k, oldV) in parent.entries) globals[k] = oldV } override fun closure(): LexicalScope { val shadowed: Globals = mutableMapOf() for (frame in stack) if (frame != null) for (key in frame.keys) { shadowed[key] = globals[key] } // stack.flatMap { it?.keys ?: emptySet() }.associateWithTo(mutableMapOf()) { globals[it] } return LexicalScope(globals, shadowed) } } /** Just [DynamicScoping] with cloned, flattened upvalues as globals */ class LexicalScope(private val topGlobals: Globals, upvalues: Globals): DynamicScoping(upvalues) { override fun get(key: String) = super.get(key) ?: topGlobals[key] override fun closure() = LexicalScope(topGlobals, globals.toMutableMap()) override fun toString() = "λ.$globals in $topGlobals" } fun Scope.resolve(name: String) = this[name] ?: error("undefined variable $name") inline fun <reified T:Any> Scope.getTyped(name: String, message: String) = resolve(name) as? T ?: error(message) private inline fun <T> MutableList<T?>.getOrInit(index: Int, init: () -> T): T { if (this[index] == null) this[index] = init() @Suppress("unchecked_cast") return this[index] as T } private fun impossible(): Nothing = throw Error() /** [K]:[V] = 1:1 (instead of N:1) bi-directional map */ class BidirMap<K, V> private constructor(private val back: MutableMap<K, V>): MutableMap<K, V> by back { private val revBack = mutableMapOf<V, K>() fun keyOf(value: V) = revBack[value] override fun put(key: K, value: V): V? { require(!revBack.containsKey(value)) {"value $value repeated (in key $key)"} revBack[value] = key return back.put(key, value) } override fun putAll(from: Map<out K, V>) { from.values.firstOrNull { !revBack.containsKey(it) }?.let { throw IllegalArgumentException("value $it repeated (in map $from)") } for ((k, v) in from.entries) revBack[v] = k back.putAll(from) } override fun remove(key: K): V? { val value = back.remove(key) value?.let(revBack::remove) return value } override val values: MutableCollection<V> get() = revBack.keys override fun containsValue(value: V): Boolean = revBack.containsKey(value) override fun clear() { revBack.clear(); back.clear() } companion object { fun <K, V> of(vararg pairs: Pair<K, V>): BidirMap<K, V> { val bid = BidirMap<K, V>(mutableMapOf()) for ((k, v) in pairs) bid[k] = v return bid } fun <FORM, K, V> translate(forms: Map<FORM, BidirMap<K, V>>, mode: Pair<FORM, FORM>, value: K): K? { val (src, dest) = mode val standard = forms[src]?.get(value) return if (standard == null) null else forms[dest]?.keyOf(standard) } fun <V> identity(vararg values: V) = BidirMap<V, V>(mutableMapOf()).apply { for (value in values) this[value] = value } } } //// == abstract Syntax Tree and script API == sealed class TemplatorAst { abstract fun fillTo(sb: Appendable, map: Scope) class Plain(val text: String): TemplatorAst() { override fun fillTo(sb: Appendable, map: Scope) { sb.append(text) } } class ValRef(val name: String): TemplatorAst() { override fun fillTo(sb: Appendable, map: Scope) { sb.append(map.resolve(name).toString()) } } class ValPipe(val pipes: List<String>, val name: String): TemplatorAst() { override fun fillTo(sb: Appendable, map: Scope) { val res = pipes.foldRight(map.resolve(name)) { it, res:Obj -> if (it[it.length-1] == '=') { map[it.substring(0, it.length-1)] = res; res } else try { map.getTyped<Processor>(it, "bad function $it")(map, res) } catch (c: ControlException) { throw c } catch (e: Exception) { throw Exception("Failed calling process $it: ${e.message}\nin $pipes <- $name with res: $res", e) } }.toString() if (name != "ok") sb.append(res) } } class Block(val items: List<TemplatorAst>): TemplatorAst() { override fun fillTo(sb: Appendable, map: Scope) { items.forEach { it.fillTo(sb, map) } } } abstract class HasBlock(val block: Block): TemplatorAst() class BuildString(val name: String, b: Block): HasBlock(b) { override fun fillTo(sb: Appendable, map: Scope) { val sb1 = map[name] as? StringBuilder ?: StringBuilder().also { map[name] = it } block.fillTo(sb1, map) } } abstract class BaseFor(val name: String, val varName: String, b: Block): HasBlock(b) { abstract fun onEach(value: Obj, map: Scope) override fun fillTo(sb: Appendable, map: Scope) { map.enterBlock() for (it in map.getTyped<Iterable<*>>(varName, "$varName not iterable")) { onEach(it, map) try { block.fillTo(sb, map) } catch (c: ControlException) { when (c.mode) { BREAK -> break; CONTINUE -> continue; else -> { map.leaveBlock(); throw c } } } } map.leaveBlock() } } class ForIn(name: String, varName: String, b: Block): BaseFor(name, varName, b) { override fun onEach(value: Obj, map: Scope) { map[name] = value } } class ForDo(name: String, varName: String, b: Block): BaseFor(name, varName, b) { override fun onEach(value: Obj, map: Scope) { map.getTyped<Processor>(name, "bad destructor $name")(map, value) } } class If(val inverted: Boolean, val varName: String, val a: Block, val b: Block): TemplatorAst() { override fun fillTo(sb: Appendable, map: Scope) { val truthy = (map[varName] as? Boolean) == true map.enterBlock() if (if (inverted) !truthy else truthy) a.fillTo(sb, map) else b.fillTo(sb, map) map.leaveBlock() } } class Table(val variables: Map<String, String>) { fun fill(map: Scope) { for ((k, v) in variables.entries) if (v.isNotEmpty() && v[0] == '$') map[k] = map[v.substring(1)] else map[k] = v } } class LetIn(val table: Table, b: Block): HasBlock(b) { override fun fillTo(sb: Appendable, map: Scope) { map.enterBlock() table.fill(map) block.fillTo(sb, map) map.leaveBlock() } } class Def(val name: String, val table: Table, b: Block): HasBlock(b) { override fun fillTo(sb: Appendable, map: Scope) { map.enterBlock() table.fill(map) val params = mutableListOf<String>(); for ((k, v) in table.variables.entries) if (v == "?") params.add(k) val closed=map.closure(); val outs=StringBuilder() val op: Processor = proc@ { closed.enterBlock() closed["it"] = it; for (k in params) closed[k] = this[k] try { block.fillTo(outs, closed) } catch (c: ControlException) { if (c.mode == RETURN) return@proc c.value else throw c } finally { closed.leaveBlock() } val res=outs.toString(); outs.clear(); res } map.leaveBlock() map[name] = op } } class ControlException(val mode: Int, val value: Obj): Exception() { override val message: String? get() = "non-local control#$mode with $value" } companion object { val nop = Block(emptyList()) const val RETURN = 0 const val BREAK = 1 const val CONTINUE = 2 } } expect fun lineSeparator(): String expect fun main(vararg args: String) object Templator { fun fillWith(map: Scope, vararg templates: TemplatorAst): String { val lastSb = StringBuilder() templates.forEach { lastSb.clear(); it.fillTo(lastSb, map) } return lastSb.toString() } fun createGlobal(map: Map<String, Obj>): Scope = DynamicScoping(map.toMutableMap().also { it.putAll(initGlobals) }) fun compile(code: String, mode: LangMode = LangMode.Normal) = TemplatorParser(code, mode).readTop().let { TemplatorAst.Block(it) } enum class LangMode { Normal, Pure } class ParseError(message: String, cause: Throwable? = null): Exception(message, cause) @JvmStatic fun main(vararg args: String) = org.duangsuse.main(*args) val initGlobals: Globals = mutableMapOf("_" to " ", "TAB" to "\t", "NL" to lineSeparator(), "CR" to "\r", "LF" to "\n", "PLUS" to "+", "QUEST_MARK" to "?", "ok" to "", "done" to "", "true" to true, "false" to false, "null" to null) val notImplemented: Processor = { error("not implemented on this platform") } init { // lib processes like variables/cat, join/split, replace/transform/match, repeat/map/filter/get @Suppress("unchecked_cast") val func = initGlobals as MutableMap<String, Processor> func["return"] = controlThrow(TemplatorAst.RETURN) func["break"] = controlThrow(TemplatorAst.BREAK) func["continue"] = controlThrow(TemplatorAst.CONTINUE) func["variables"] = { if (it is String && it.isNotEmpty()) resolve(it) else this.closure() } func["puts"] = { println(it); "" }; func["putsOnce"] = { print(it); "" } func["require"] = notImplemented func["rename"] = { } func["cat"] = { it.toS().split('+').joinToString("") { part -> this[part]?.toS() ?: part } } func["range"] = { resolve("start").toI()..resolve("last").toI() } func["pair"] = { resolve("first") to resolve("second") } func["join"] = { (it as Iterable<*>).joinToString(vSeparator()) } func["split"] = { val s=it.toS(); vRegex()?.let { re -> s.split(re) } ?: s.split(vSeparator()) } func["replace"] = { val s=it.toS(); val subst=resolve("subst").toS(); vRegex()?.let { re -> s.replace(re, subst) } ?: s.replace(vSubstr(), subst) } func["match"] = { val s=it.toS(); vRegex()?.let { re -> s.matches(re) } ?: s.contains(vSubstr()) } func["repeat"] = { val sb=StringBuilder(); val n=resolve("n").toI(); val item=resolve("item").toS(); for (_t in (1..n)) sb.append(item); sb.toString() } func["map"] = { val op=getTypedReq<Processor>("op", "processor"); (it as Iterable<*>).map { item -> op(this, item) } } func["filter"] = { val op=getTypedReq<Processor>("test", "predicate"); (it as Iterable<*>).filter { item -> op(this, item) == true } } func["get"] = { (it as List<*>)[(this["index"] ?: 0).toI()] } func["size"] = { when (it) { is Collection<*> -> it.size; is CharSequence -> it.length; is Array<*> -> it.size; else -> error("size of $it unknown") } } func["transform"] = { val s = it.toS() when (val mode = resolve("mode") as String) { "lower" -> s.toLowerCase() "upper" -> s.toUpperCase() "capitalize" -> s.capitalize() "decapitalize" -> s.decapitalize() "reverse" -> s.reversed() "trim" -> s.trim() else -> throw IllegalArgumentException("unknown mode $mode") } } } private fun Obj.toS() = this?.toString() ?: "?" private fun Obj.toI() = this.toS().toInt() private fun Scope.vRegex() = (this["regex"] as? String)?.let(::Regex) private fun Scope.vSeparator() = this["separator"] as? String ?: ", " private fun Scope.vSubstr() = getTypedReq<String>("substr", "sub-string") private inline fun <reified T:Any> Scope.getTypedReq(name: String, desc: String) = getTyped<T>(name, "$name: $desc is required") private fun controlThrow(mode: Int): Processor = { throw TemplatorAst.ControlException(mode, it) } } //// == non-streamed Parser used in eval == abstract class SubseqParser(protected var text: CharSequence) { protected fun drop(n: Int) { text = text.run { subSequence(n, length) } } protected fun dropTo(sb: Appendable, n: Int) { sb.append(text.subSequence(0, n)); drop(n) } protected inline infix fun Int.minus1(op: () -> Int) = if (this == -1) op() else this } class Peek<T>(private val next: () -> T) { object End: Exception("no more") private var lastItem: T = next() private var tailConsumed = false val peek get() = lastItem fun consume(): T { val token = peek try { lastItem = next() } catch (_: End) { if (!tailConsumed) tailConsumed = true else throw End } return token } val isEnd get() = tailConsumed } typealias Token = Pair<TemplatorLexer.TokenKind, String> open class TemplatorLexer(text: CharSequence, mode: Templator.LangMode): SubseqParser(text) { enum class TokenKind { Plain, Squared, Braced } private val sb = StringBuilder() private fun sbToken(kind: TokenKind): Token { val s=sb.toString(); sb.clear(); return (kind to s) } private fun readToken(): Token { // -{cmd} -[ref] text while (text.isNotEmpty()) { val idxMinus = text.indexOf('-') minus1 { dropTo(sb, text.length); -1 } if (idxMinus == text.lastIndex) break/*=do-while*/ braceKind[text[idxMinus+1]]?.let { dropTo(sb, idxMinus) if (sb.isNotEmpty()) return sbToken(TokenKind.Plain) drop(2/*-[*/) val closing = when (it) { TokenKind.Squared -> ']'; TokenKind.Braced -> '}'; else -> impossible() } val idxClose = text.indexOf(closing) minus1 { throw Templator.ParseError("$it: where is $closing expected to close?\nnear:\n$text") } val innerSb = StringBuilder() dropTo(innerSb, idxClose); drop(1/*]*/) return it to innerSb.toString() } ?: run { dropTo(sb, idxMinus+1/*-*/) } } if (sb.isEmpty()) throw Peek.End return sbToken(TokenKind.Plain) } private fun readToken1(): Token { // (cmd) ref while (text.isNotEmpty()) { val idxPar = text.indexOf('(') minus1 { dropTo(sb, text.length); -1 } if (idxPar == text.lastIndex) break/*=do-while*/ dropTo(sb, idxPar) if (sb.isNotEmpty()) return sbToken(TokenKind.Squared) drop(1/*(*/) val idxClose = text.indexOf(')') minus1 { throw Templator.ParseError("where is ) expected to close?\nnear:\n$text") } val innerSb = StringBuilder() dropTo(innerSb, idxClose); drop(1/*)*/) return TokenKind.Braced to innerSb.toString() } if (sb.isEmpty()) throw Peek.End return sbToken(TokenKind.Squared) } val token = Peek(when(mode) { Templator.LangMode.Normal -> ::readToken; Templator.LangMode.Pure -> ::readToken1 }) companion object { private val braceKind = mapOf('[' to TokenKind.Squared, '{' to TokenKind.Braced) } protected fun expect(kind: TokenKind, name: String, predicate: (String) -> Boolean) { fun mismatch(): Nothing = error("expecting $kind $name") val (tok, text) = token.peek if (tok != kind || !predicate(text)) mismatch() } protected fun error(message: String): Nothing = throw Templator.ParseError(if (token.isEnd) "$message\nat EOF" else "$message\nnear ${token.peek}:\n$text") } /** * ```plain * Top = Item* * Block = Item* end * Item = plain | ValRef | BuildString | For | If | Let | Def * ValRef = ('='? Name)* Name * BuildString = buildString Name Block * For = for Name (in | do) Name Block * If = if ('!')? Name (Block | Item* else Block) * Table = (Name'=' '$'?~white)* * Let = (let Table in Block) | (let Table do Name*) * Def = def Name Table Block * ``` * * Recursive descent parser. */ class TemplatorParser(text: CharSequence, mode: Templator.LangMode): TemplatorLexer(text, mode) { private inline fun <T> asList(read: () -> T): List<T> { val collected = mutableListOf<T>() try { while (true) collected.add(read()) } catch (_: Peek.End) {} return collected } fun readTop() = asList(::readItem) private fun readBlock(): TemplatorAst.Block { val items = asList { if (token.peek.run { first == TokenKind.Braced && isEnd(second) }) throw Peek.End; readItem() } readBlockEnd() return TemplatorAst.Block(items) } private fun isEnd(s: String) = s.trim() == "end" private fun readBlockEnd() { expect(TokenKind.Braced, "end of code block", ::isEnd)/*not EOF*/ try { token.consume() } catch (_: Peek.End) { error("expect more end") } } fun readItem(): TemplatorAst { val (tok, text) = token.peek; token.consume() return try { when (tok) { TokenKind.Plain -> TemplatorAst.Plain(text) TokenKind.Squared -> (text.splitWs() ?: error("empty ref")).cValPipe { TemplatorAst.ValRef(it) } TokenKind.Braced -> { val parts = text.splitWs() ?: error("empty command brace") fun t(i: Int, name: String) = try { parts[i] } catch (_: IndexOutOfBoundsException) { error("$name as param $i required in ${parts[0]}") } fun table(ri:IntRange): TemplatorAst.Table { val m = mutableMapOf<String, String>() for (i in ri) { val kv=parts[i]; val qi=kv.indexOf('=') minus1 { error("expect = in arg `$kv'") }; m[kv.substring(0, qi)] = kv.substring(qi+1,kv.length) } return TemplatorAst.Table(m) } fun isElse(s: String) = s.trim() == "else" when (val command = parts[0]) { "buildString" -> TemplatorAst.BuildString(t(1, "name"), readBlock()) "for" -> { when (val mode = t(2, "mode")) { "in" -> TemplatorAst.ForIn(t(1,"name"), t(3,"varName"), readBlock()); "do" -> TemplatorAst.ForDo(t(3,"opName"), t(1,"varName"), readBlock()); else -> error("unknown for-mode $mode") } } "if" -> { if (parts.size == 2) t(1, "varName").let { val inverted = (it[0] == '!'); val varName = it.removePrefix("!") val items = asList { if (token.peek.run { first == TokenKind.Braced && (isElse(second) || isEnd(second)) }) throw Peek.End; readItem() } val block = TemplatorAst.Block(items) if (isElse(token.peek.second)) { token.consume(); TemplatorAst.If(inverted, varName, block, readBlock()) } else { readBlockEnd(); TemplatorAst.If(inverted, varName, block, TemplatorAst.nop) } } else error("use if like {if name} or {if !name}") } "let" -> { val di = parts.indexOf("do") if (di != -1) { TemplatorAst.LetIn(table(1 until di), TemplatorAst.Block(listOf(parts.subList(di+1, parts.size).cValPipe { TemplatorAst.ValPipe(listOf(it), "done") }))) } else { if (parts.size < 3 || parts[parts.size-1] != "in") error("use let like {let a=1 b=2 in}") TemplatorAst.LetIn(table(1 until parts.size-1), readBlock()) } } "def" -> { if (parts.size < 2) error("use def name a=1") TemplatorAst.Def(t(1, "name"), table(2 until parts.size), readBlock()) } else -> error("unknown command $command") } } } } catch (e: Templator.ParseError) { throw Templator.ParseError("`$text': "+e.message, e.cause) } } private inline fun List<String>.cValPipe(single: (String) -> TemplatorAst): TemplatorAst { val rIdx=size-1; return if (rIdx==0) single(this[0]) else TemplatorAst.ValPipe(subList(0, rIdx), this[rIdx]) } private fun CharSequence.splitWs() = split(' ', '\t', '\n', '\r').filter(String::isNotEmpty).takeUnless { it.isEmpty() } }
48.913486
239
0.630495
0486f67c0f66cd1fa9e1428b1552e82c14bf0106
25,013
java
Java
src/main/java/org/ScripterRon/NxtMint/Main.java
Jiago/NxtMint
8374b20329777bce91356c865f2344671e177bb4
[ "Apache-2.0" ]
1
2021-03-02T13:56:20.000Z
2021-03-02T13:56:20.000Z
src/main/java/org/ScripterRon/NxtMint/Main.java
Jiago/NxtMint
8374b20329777bce91356c865f2344671e177bb4
[ "Apache-2.0" ]
null
null
null
src/main/java/org/ScripterRon/NxtMint/Main.java
Jiago/NxtMint
8374b20329777bce91356c865f2344671e177bb4
[ "Apache-2.0" ]
null
null
null
/** * Copyright 2015 Ronald W Hoffman * * 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.ScripterRon.NxtMint; import org.ScripterRon.NxtCore.Account; import org.ScripterRon.NxtCore.Crypto; import org.ScripterRon.NxtCore.Currency; import org.ScripterRon.NxtCore.MintingTarget; import org.ScripterRon.NxtCore.Nxt; import org.ScripterRon.NxtCore.NxtException; import org.ScripterRon.NxtCore.Utils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.jocl.CL; import org.jocl.CLException; import org.jocl.cl_device_id; import org.jocl.cl_platform_id; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.RandomAccessFile; import java.nio.channels.FileLock; import java.util.ArrayList; import java.util.List; import java.util.Properties; import java.util.logging.LogManager; import javax.swing.JFrame; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.UIManager; /** * NxtMint will mint a Nxt currency */ public class Main { /** Logger instance */ public static final Logger log = LoggerFactory.getLogger("org.ScripterRon.NxtMint"); /** File separator */ public static String fileSeparator; /** Line separator */ public static String lineSeparator; /** User home */ public static String userHome; /** Operating system */ public static String osName; /** Application identifier */ public static String applicationID; /** Application name */ public static String applicationName; /** Application version */ public static String applicationVersion; /** Application properties */ public static Properties properties; /** Data directory */ public static String dataPath; /** Application properties file */ private static File propFile; /** Enable the GUI */ public static boolean enableGUI = true; /** Main application window */ public static MainWindow mainWindow; /** Application lock file */ private static RandomAccessFile lockFile; /** Application lock */ private static FileLock fileLock; /** Deferred exception text */ private static String deferredText; /** Deferred exception */ private static Throwable deferredException; /** Nxt node host name */ public static String nxtHost = "localhost"; /** Nxt API port */ public static int apiPort = 7876; /** Use HTTPS connections */ public static boolean useSSL = false; /** Allow host name mismatch */ public static boolean allowNameMismatch = false; /** Accept any server certificate */ public static boolean acceptAnyCertificate = false; /** Secret phrase */ public static String secretPhrase; /** Currency code */ public static String currencyCode; /** Currency units */ public static double currencyUnits; /** CPU worker thread count */ public static int cpuThreads = 1; /** GPU intensity */ public static int gpuIntensity = 0; /** GPU devices */ public static List<Integer> gpuDevices = new ArrayList<>(); /** GPU work group sizes */ public static List<Integer> gpuSizes = new ArrayList<>(); /** GPU work group counts */ public static List<Integer> gpuCounts = new ArrayList<>(); /** Minting account identifier */ public static long accountId; /** Minting currency */ public static Currency currency; /** Minting target */ public static MintingTarget mintingTarget; /** Minting units expressed as a whole number with an implied decimal point */ public static long mintingUnits; /** GPU devices */ public static List<GpuDevice> gpuDeviceList = new ArrayList<>(); /** * Handles program initialization * * @param args Command-line arguments */ public static void main(String[] args) { try { fileSeparator = System.getProperty("file.separator"); lineSeparator = System.getProperty("line.separator"); userHome = System.getProperty("user.home"); osName = System.getProperty("os.name").toLowerCase(); // // Process command-line options // dataPath = System.getProperty("nxt.datadir"); if (dataPath == null) { if (osName.startsWith("win")) dataPath = userHome+"\\Appdata\\Roaming\\NxtMint"; else if (osName.startsWith("linux")) dataPath = userHome+"/.NxtMint"; else if (osName.startsWith("mac os")) dataPath = userHome+"/Library/Application Support/NxtMint"; else dataPath = userHome+"/NxtMint"; } // // Create the data directory if it doesn't exist // File dirFile = new File(dataPath); if (!dirFile.exists()) dirFile.mkdirs(); // // Initialize the Aparapi subsystem. We need to do this before initializing // the logger since Aparapi resets logging. // GpuFunction.isSupported(0); // // Initialize the logging properties from 'logging.properties' // File logFile = new File(dataPath+fileSeparator+"logging.properties"); if (logFile.exists()) { FileInputStream inStream = new FileInputStream(logFile); LogManager.getLogManager().readConfiguration(inStream); } // // Use the brief logging format // BriefLogFormatter.init(); // // Process configuration file options // processConfig(); if (secretPhrase==null || secretPhrase.length() == 0) throw new IllegalArgumentException("Secret phrase not specified"); if (currencyCode==null || currencyCode.length()<3 || currencyCode.length()>5) throw new IllegalArgumentException("Currency code is not valid"); if (gpuIntensity > 1048576) throw new IllegalArgumentException("Maximum gpuIntensity is 1,048,576"); accountId = Utils.getAccountId(Crypto.getPublicKey(secretPhrase)); // // Get the application build properties // Class<?> mainClass = Class.forName("org.ScripterRon.NxtMint.Main"); try (InputStream classStream = mainClass.getClassLoader().getResourceAsStream("META-INF/application.properties")) { if (classStream == null) throw new IllegalStateException("Application build properties not found"); Properties applicationProperties = new Properties(); applicationProperties.load(classStream); applicationID = applicationProperties.getProperty("application.id"); applicationName = applicationProperties.getProperty("application.name"); applicationVersion = applicationProperties.getProperty("application.version"); } log.info(String.format("%s Version %s", applicationName, applicationVersion)); log.info(String.format("Application data path: %s", dataPath)); log.info(String.format("Using Nxt node at %s://%s:%d", (useSSL ? "https" : "http"), nxtHost, apiPort)); log.info(String.format("Minting %,f units of %s for account %s: %d CPU threads, %d GPU intensity", currencyUnits, currencyCode, Utils.getAccountRsId(accountId), cpuThreads, gpuIntensity)); // // Open the application lock file // lockFile = new RandomAccessFile(dataPath+fileSeparator+".lock", "rw"); fileLock = lockFile.getChannel().tryLock(); if (fileLock == null) { JOptionPane.showMessageDialog(null, "NxtMint is already running", "Error", JOptionPane.ERROR_MESSAGE); System.exit(0); } // // Load the saved application properties // propFile = new File(dataPath+fileSeparator+"NxtMint.properties"); properties = new Properties(); if (propFile.exists()) { try (FileInputStream in = new FileInputStream(propFile)) { properties.load(in); } } // // Initialize the NxtCore library // Nxt.init(nxtHost, apiPort, useSSL, allowNameMismatch, acceptAnyCertificate); // // Ensure the account is funded // Account account = Nxt.getAccount(accountId); if (account.getConfirmedBalance() < 1*Nxt.NQT_ADJUST) throw new IllegalArgumentException(String.format("Account %s confirmed balance is less than 1 Nxt", Utils.getAccountRsId(accountId))); // // Get the currency definition // currency = Nxt.getCurrency(currencyCode, false); if (!currency.isMintable()) throw new IllegalArgumentException(String.format("Currency %s is not mintable", currencyCode)); if (!HashFunction.isSupported(currency.getAlgorithm())) throw new IllegalArgumentException(String.format("Currency algorithm %d is not supported", currency.getAlgorithm())); if (gpuIntensity>0 && !GpuFunction.isSupported(currency.getAlgorithm())) throw new IllegalArgumentException(String.format("Currency algorithm %d is not supported on the GPU", currency.getAlgorithm())); // // Get the current minting target // mintingUnits = (long)(currencyUnits*Math.pow(10, currency.getDecimals())); mintingTarget = Nxt.getMintingTarget(currency.getCurrencyId(), accountId, mintingUnits); long maxUnits = (currency.getMaxSupply()-currency.getReserveSupply())/10000; if (mintingUnits > maxUnits) throw new IllegalArgumentException(String.format("Maximum minting units is %f for currency %s", (double)maxUnits*Math.pow(10, -currency.getDecimals()), currencyCode)); // // Get the GPU device list if GPU intensity is non-zero // if (gpuIntensity > 0) { if (gpuDevices.isEmpty()) { gpuDevices.add(0); gpuSizes.add(256); gpuCounts.add(0); } buildGpuList(); for (int i=0; i<gpuDevices.size(); i++) { int devnum = gpuDevices.get(i); if (devnum >= gpuDeviceList.size()) throw new IllegalArgumentException(String.format("GPU device %d is not available", devnum)); GpuDevice gpuDevice = gpuDeviceList.get(devnum); if (gpuSizes.get(i) > gpuDevice.getMaxWorkGroupSize()) { log.warn(String.format("Work group size %d for GPU %d exceeds maximum size %d - using maximum size", gpuSizes.get(i), devnum, gpuDevice.getMaxWorkGroupSize())); gpuDevice.setWorkGroupSize(gpuDevice.getMaxWorkGroupSize()); } else { gpuDevice.setWorkGroupSize(gpuSizes.get(i)); } gpuDevice.setWorkGroupCount(gpuCounts.get(i)); } } // // Start the GUI // if (enableGUI) { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); javax.swing.SwingUtilities.invokeLater(() -> createAndShowGUI()); while (mainWindow == null) Thread.sleep(1000); } // // Start minting // Mint.mint(); } catch (Exception exc) { if ((exc instanceof IllegalArgumentException) || (exc instanceof NxtException)) log.error(exc.getMessage()); else log.error("Exception during program initialization", exc); } } /** * Create and show our application GUI * * This method is invoked on the AWT event thread to avoid timing * problems with other window events */ private static void createAndShowGUI() { // // Use the normal window decorations as defined by the look-and-feel // schema // JFrame.setDefaultLookAndFeelDecorated(true); // // Create the main application window // mainWindow = new MainWindow(); // // Show the application window // mainWindow.pack(); mainWindow.setVisible(true); } /** * Shutdown and exit */ public static void shutdown() { // // Stop minting // Mint.shutdown(); // // Save the application properties // saveProperties(); // // Close the application lock file // try { fileLock.release(); lockFile.close(); } catch (IOException exc) { } // // All done // System.exit(0); } /** * Save the application properties */ public static void saveProperties() { try { try (FileOutputStream out = new FileOutputStream(propFile)) { properties.store(out, "NxtMint Properties"); } } catch (IOException exc) { log.error("Exception while saving application properties", exc); } } /** * Process the configuration file * * @throws IllegalArgumentException Invalid configuration option * @throws IOException Unable to read configuration file */ private static void processConfig() throws IOException, IllegalArgumentException { // // Use the defaults if there is no configuration file // File configFile = new File(dataPath+Main.fileSeparator+"NxtMint.conf"); if (!configFile.exists()) return; // // Process the configuration file // try (BufferedReader in = new BufferedReader(new FileReader(configFile))) { String line; while ((line=in.readLine()) != null) { line = line.trim(); if (line.length() == 0 || line.charAt(0) == '#') continue; int sep = line.indexOf('='); if (sep < 1) throw new IllegalArgumentException(String.format("Invalid configuration option: %s", line)); String option = line.substring(0, sep).trim().toLowerCase(); String value = line.substring(sep+1).trim(); try { switch (option) { case "connect": nxtHost = value; break; case "apiport": apiPort = Integer.valueOf(value); break; case "usessl": useSSL = Boolean.valueOf(value); break; case "allownamemismatch": allowNameMismatch = Boolean.valueOf(value); break; case "acceptanycertificate": acceptAnyCertificate = Boolean.valueOf(value); break; case "secretphrase": secretPhrase = value; break; case "currency": currencyCode = value; break; case "units": currencyUnits = Double.valueOf(value); break; case "cputhreads": cpuThreads = Integer.valueOf(value); break; case "gpuintensity": gpuIntensity = Integer.valueOf(value); break; case "gpudevice": String[] splits = value.split(","); gpuDevices.add(Integer.valueOf(splits[0].trim())); if (splits.length > 1) { gpuSizes.add(Integer.valueOf(splits[1].trim())); if (splits.length > 2) { gpuCounts.add(Integer.valueOf(splits[2].trim())); } else { gpuCounts.add(0); } } else { gpuSizes.add(256); gpuCounts.add(0); } break; case "enablegui": if (value.equalsIgnoreCase("true")) enableGUI = true; else if (value.equalsIgnoreCase("false")) enableGUI = false; else throw new IllegalArgumentException(String.format("enableGUI must be TRUE or FALSE")); break; default: throw new IllegalArgumentException(String.format("Invalid configuration option: %s", line)); } } catch (NumberFormatException exc) { throw new IllegalArgumentException(String.format("Invalid numeric value for '%s' option", option)); } } } } /** * Build a list of available GPU devices * * @throws CLException OpenCL error occurred */ private static void buildGpuList() throws CLException { // // Enable OpenCL exceptions // CL.setExceptionsEnabled(true); // // Get the available platforms // int[] numPlatforms= new int[1]; CL.clGetPlatformIDs(0, null, numPlatforms); cl_platform_id[] platforms = new cl_platform_id[numPlatforms[0]]; CL.clGetPlatformIDs(platforms.length, platforms, null); // // Get the devices for each platform // for (cl_platform_id platform : platforms) { int numDevices[] = new int[1]; CL.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, 0, null, numDevices); cl_device_id[] devices = new cl_device_id[numDevices[0]]; CL.clGetDeviceIDs(platform, CL.CL_DEVICE_TYPE_ALL, devices.length, devices, null); for (cl_device_id device : devices) { long deviceType = OpenCL.getLong(device, CL.CL_DEVICE_TYPE); if ((deviceType&CL.CL_DEVICE_TYPE_GPU)!=0 && OpenCL.getBoolean(device, CL.CL_DEVICE_AVAILABLE)) { String platformName = OpenCL.getString(platform, CL.CL_PLATFORM_NAME); String deviceName = OpenCL.getString(device, CL.CL_DEVICE_NAME); String driverVersion = OpenCL.getString(device, CL.CL_DRIVER_VERSION); int computeUnits = OpenCL.getInt(device, CL.CL_DEVICE_MAX_COMPUTE_UNITS); long globalMemorySize = OpenCL.getLong(device, CL.CL_DEVICE_GLOBAL_MEM_SIZE); long localMemorySize = OpenCL.getLong(device, CL.CL_DEVICE_LOCAL_MEM_SIZE); int maxWorkGroupSize = (int)OpenCL.getSize(device, CL.CL_DEVICE_MAX_WORK_GROUP_SIZE); int gpuId = gpuDeviceList.size(); log.info(String.format( "GPU device %d: %s, %s, Driver %s\n" + " %dMB global memory, %dKB local memory, %d compute units, Max work group size %d", gpuId, platformName, deviceName, driverVersion, globalMemorySize/(1024*1024), localMemorySize/1024, computeUnits, maxWorkGroupSize)); gpuDeviceList.add(new GpuDevice(gpuId, platform, device, computeUnits, globalMemorySize, localMemorySize, maxWorkGroupSize)); } } } } /** * Display a dialog when an exception occurs. * * @param text Text message describing the cause of the exception * @param exc The Java exception object */ public static void logException(String text, Throwable exc) { if (SwingUtilities.isEventDispatchThread()) { StringBuilder string = new StringBuilder(512); // // Display our error message // string.append("<html><b>"); string.append(text); string.append("</b><br><br>"); // // Display the exception object // string.append(exc.toString()); string.append("<br>"); // // Display the stack trace // StackTraceElement[] trace = exc.getStackTrace(); int count = 0; for (StackTraceElement elem : trace) { string.append("<br>"); string.append(elem.toString()); if (++count == 25) break; } string.append("</html>"); JOptionPane.showMessageDialog(mainWindow, string, "Error", JOptionPane.ERROR_MESSAGE); } else if (deferredException == null) { deferredText = text; deferredException = exc; try { javax.swing.SwingUtilities.invokeAndWait(() -> { Main.logException(deferredText, deferredException); deferredException = null; deferredText = null; }); } catch (Exception logexc) { log.error("Unable to log exception during program initialization"); } } } /** * Dumps a byte array to the log * * @param text Text message * @param data Byte array */ public static void dumpData(String text, byte[] data) { dumpData(text, data, 0, data.length); } /** * Dumps a byte array to the log * * @param text Text message * @param data Byte array * @param length Length to dump */ public static void dumpData(String text, byte[] data, int length) { dumpData(text, data, 0, length); } /** * Dump a byte array to the log * * @param text Text message * @param data Byte array * @param offset Offset into array * @param length Data length */ public static void dumpData(String text, byte[] data, int offset, int length) { StringBuilder outString = new StringBuilder(512); outString.append(text); outString.append("\n"); for (int i=0; i<length; i++) { if (i%32 == 0) outString.append(String.format(" %14X ", i)); else if (i%4 == 0) outString.append(" "); outString.append(String.format("%02X", data[offset+i])); if (i%32 == 31) outString.append("\n"); } if (length%32 != 0) outString.append("\n"); log.debug(outString.toString()); } }
39.266876
127
0.53824
b2f2624018def017d6f216025461d08675741a16
799
kt
Kotlin
src/main/kotlin/net/testusuke/randomteleport/Main.kt
AzisabaNetwork/RandomTeleport
5c206051581ee808228814d1326687cfee72740c
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/net/testusuke/randomteleport/Main.kt
AzisabaNetwork/RandomTeleport
5c206051581ee808228814d1326687cfee72740c
[ "Apache-2.0" ]
3
2021-05-04T16:22:23.000Z
2021-05-06T09:17:24.000Z
src/main/kotlin/net/testusuke/randomteleport/Main.kt
AzisabaNetwork/RandomTeleport
5c206051581ee808228814d1326687cfee72740c
[ "Apache-2.0" ]
1
2021-05-05T12:47:24.000Z
2021-05-05T12:47:24.000Z
package net.testusuke.randomteleport import org.bukkit.plugin.java.JavaPlugin import java.util.concurrent.ExecutorService import java.util.concurrent.Executors class Main : JavaPlugin() { companion object { lateinit var plugin: Main lateinit var configuration: Configuration const val prefix = "§e[§6Random§aTeleport§e]" } lateinit var randomGenerateThread: ExecutorService override fun onEnable() { plugin = this randomGenerateThread = Executors.newFixedThreadPool(10) server.pluginManager.registerEvents(Listener, this) getCommand("randomtp")?.setExecutor(Command) saveDefaultConfig() configuration = Configuration() } override fun onDisable() { randomGenerateThread.shutdown() } }
25.774194
63
0.700876
fbca94dee58601055ab53341cd8308e66c2afe06
1,729
java
Java
liteql-skeleton-core/src/main/java/org/cheeryworks/liteql/skeleton/util/jackson/serializer/TypeDefinitionSerializer.java
cheeryworks/liteql-java
e144293d22038f43c2e0dcb2ef72c88d33215f31
[ "MIT" ]
1
2021-05-06T04:24:31.000Z
2021-05-06T04:24:31.000Z
liteql-skeleton-core/src/main/java/org/cheeryworks/liteql/skeleton/util/jackson/serializer/TypeDefinitionSerializer.java
cheeryworks/liteql-java
e144293d22038f43c2e0dcb2ef72c88d33215f31
[ "MIT" ]
null
null
null
liteql-skeleton-core/src/main/java/org/cheeryworks/liteql/skeleton/util/jackson/serializer/TypeDefinitionSerializer.java
cheeryworks/liteql-java
e144293d22038f43c2e0dcb2ef72c88d33215f31
[ "MIT" ]
null
null
null
package org.cheeryworks.liteql.skeleton.util.jackson.serializer; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.std.StdSerializer; import org.apache.commons.lang3.reflect.FieldUtils; import org.cheeryworks.liteql.skeleton.schema.TypeDefinition; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.List; public class TypeDefinitionSerializer extends StdSerializer<TypeDefinition> { public TypeDefinitionSerializer() { super(TypeDefinition.class); } @Override public void serialize(TypeDefinition value, JsonGenerator gen, SerializerProvider provider) throws IOException { gen.writeStartObject(); if (value.isTrait()) { gen.writeObjectField("trait", true); } List<Field> fields = FieldUtils.getAllFieldsList(value.getClass()); for (Field field : fields) { JsonIgnore jsonIgnore = field.getAnnotation(JsonIgnore.class); if (jsonIgnore != null && jsonIgnore.value()) { continue; } if (Modifier.isStatic(field.getModifiers())) { continue; } try { Object fieldValue = FieldUtils.readField(field, value, true); if (fieldValue != null) { gen.writeObjectField(field.getName(), fieldValue); } } catch (Exception ex) { throw new IllegalStateException(ex.getMessage(), ex); } } gen.writeEndObject(); } }
29.810345
116
0.64893
d2b515a3b5b936b35117d2b3f2cd8f1672bb8e41
2,137
php
PHP
resources/views/user/car/home.blade.php
wyatt3/gas-mileage
2be5c76075c48baf15342184b92dddb7318b83b2
[ "MIT" ]
null
null
null
resources/views/user/car/home.blade.php
wyatt3/gas-mileage
2be5c76075c48baf15342184b92dddb7318b83b2
[ "MIT" ]
null
null
null
resources/views/user/car/home.blade.php
wyatt3/gas-mileage
2be5c76075c48baf15342184b92dddb7318b83b2
[ "MIT" ]
null
null
null
@extends('layouts.app') @section('content') <a href="{{ route('home') }}" class="btn btn-outline-primary">&lsaquo; Back to Home</a> <h1 class="mt-4">{{$car->name()}}</h1> <div class="car-details pl-5"> <div class="ml-2 mb-3 row text-light"> <a class="mr-3 btn btn-primary" href="{{ route('gas', ['car_id' => $car->id]) }}">View Gas Mileage</a> <a class="btn btn-primary" href="{{ route('maintenance', ['car_id' => $car->id]) }}">View Maintenance</a> </div> <img class="rounded" src="{{ asset('storage/app/carImages/'. $car->photo_name) }}" width="450px"> <p class="mt-3"><strong>Year: </strong> {{ $car->year }}<br> <strong>Make: </strong> {{ $car->make }}<br> <strong>Model: </strong> {{ $car->model }}<br> <strong>Miles: </strong> {{ $car->mileage }}<br> </p> <a href="{{ route('car.edit', ['car_id' => $car->id]) }}" class="btn btn-warning text-light mb-2">Edit Car</a><br> <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#deleteModal">Delete Car</button> </div> <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Do you really want to delete this car?</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> </div> <div class="modal-body"> This cannot be undone, so only proceed if you are sure you don't want this car. </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <a href="{{ route('car.delete', ['car_id' => $car->id]) }}" class="btn btn-danger">Delete</a> </div> </div> </div> </div> @endsection
52.121951
144
0.547029
43632fe8328cd597e54f7821f3ce88ebb5e98609
1,096
swift
Swift
RAD/Model/Entities/CoreData/GenericObjectContainer.swift
npr/RAD-iOS
2340f66a88679fbba7b117b4f43661b4ea2d3a20
[ "Apache-2.0" ]
10
2018-11-15T13:01:27.000Z
2021-12-19T06:28:59.000Z
RAD/Model/Entities/CoreData/GenericObjectContainer.swift
npr/RAD-iOS
2340f66a88679fbba7b117b4f43661b4ea2d3a20
[ "Apache-2.0" ]
3
2018-11-23T08:08:17.000Z
2019-01-22T16:54:20.000Z
RAD/Model/Entities/CoreData/GenericObjectContainer.swift
npr/RAD-iOS
2340f66a88679fbba7b117b4f43661b4ea2d3a20
[ "Apache-2.0" ]
5
2018-12-13T19:38:35.000Z
2021-02-18T11:24:52.000Z
// // GenericObjectContainer.swift // RAD // // Copyright 2018 NPR // // Licensed under the Apache License, Version 2.0 (the "License"); you may not use // this file except in compliance with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software distributed under the // License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, // either express or implied. See the License for the specific language governing permissions // and limitations under the License. // import Foundation import CoreData /// A subclass which simplifies the usage of otherFields property. class GenericObjectContainer: NSManagedObject { @NSManaged var md5: String? @NSManaged var otherFields: NSDictionary? var json: JSONDictionary { return otherFields as? JSONDictionary ?? [:] } func updateOtherFields(_ closure: (_ json: JSONDictionary?) -> JSONDictionary?) { otherFields = closure(json) as NSDictionary? } }
32.235294
94
0.725365
e528f717c619cc3b71d71217a79719569c07631c
757
ts
TypeScript
src/characters/characters.repository.ts
Azzyew/naruto-api
6e2cbb3bf7a12b8d7b0b5d218f5b352209367ef4
[ "MIT" ]
null
null
null
src/characters/characters.repository.ts
Azzyew/naruto-api
6e2cbb3bf7a12b8d7b0b5d218f5b352209367ef4
[ "MIT" ]
null
null
null
src/characters/characters.repository.ts
Azzyew/naruto-api
6e2cbb3bf7a12b8d7b0b5d218f5b352209367ef4
[ "MIT" ]
null
null
null
import { Injectable } from "@nestjs/common"; import { InjectModel } from "@nestjs/mongoose"; import { Model } from "mongoose"; import { Character, CharacterDocument } from "./schema/character.schema"; @Injectable() export class CharactersRepository { constructor(@InjectModel(Character.name) private characterModel: Model<CharacterDocument>) {} findAll() { return this.characterModel.find(); } findOneById(id: string) { return this.characterModel.findById(id); } findByName(name: string) { //Setting first letter of Name to be upper case for correct filtering in the database const formattedName = name.charAt(0).toUpperCase() + name.slice(1); return this.characterModel.find({ 'name': { $regex: formattedName } }); } }
32.913043
95
0.717305
8a1f4b9a3436248b4e5d4ed4ca1b8b69f42109d0
172
swift
Swift
Sources/Callable/String.swift
ElevatedUnderdogs/Callable
ac9cd5d0e74c2769ecf236b65b226fe5b787c86d
[ "MIT" ]
null
null
null
Sources/Callable/String.swift
ElevatedUnderdogs/Callable
ac9cd5d0e74c2769ecf236b65b226fe5b787c86d
[ "MIT" ]
null
null
null
Sources/Callable/String.swift
ElevatedUnderdogs/Callable
ac9cd5d0e74c2769ecf236b65b226fe5b787c86d
[ "MIT" ]
1
2021-04-04T01:48:55.000Z
2021-04-04T01:48:55.000Z
// // File.swift // // // Created by Scott Lydon on 4/3/21. // import Foundation extension String { public var url: URL? { URL(string: self) } }
10.75
37
0.540698
e39c1bcdc14e06835ef047e732f101cba9770416
1,019
dart
Dart
dart_lang_intro/inheritance_w_constructors/bin/inheritance_w_constructors.dart
fredgrott/common_dart_flutter
70dfb1120dcb98bfb0a0a7eadfa89ac4994fdb99
[ "BSD-3-Clause" ]
1
2022-02-19T23:03:40.000Z
2022-02-19T23:03:40.000Z
dart_lang_intro/inheritance_w_constructors/bin/inheritance_w_constructors.dart
fredgrott/common_dart_flutter
70dfb1120dcb98bfb0a0a7eadfa89ac4994fdb99
[ "BSD-3-Clause" ]
null
null
null
dart_lang_intro/inheritance_w_constructors/bin/inheritance_w_constructors.dart
fredgrott/common_dart_flutter
70dfb1120dcb98bfb0a0a7eadfa89ac4994fdb99
[ "BSD-3-Clause" ]
null
null
null
// Copyright 2022 Fredrick Allan Grott. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Objectives // 1. Inheritance with Default Constructor and Parameterised Constructor // 2. Inheritance with Named Constructor // ignore_for_file: unused_local_variable void main() { var dog1 = Dog("Labrador", "Black"); print(""); var dog2 = Dog("Pug", "Brown"); print(""); var dog3 = Dog.myNamedConstructor("German Shepherd", "Black-Brown"); } class Animal { late String color; Animal(this.color) { print("Animal class constructor"); } Animal.myAnimalNamedConstrctor(String color) { print("Animal class named constructor"); } } class Dog extends Animal { late String breed; Dog(this.breed, String color) : super(color) { print("Dog class constructor"); } Dog.myNamedConstructor(this.breed, String color) : super.myAnimalNamedConstrctor(color) { print("Dog class Named Constructor"); } }
21.680851
72
0.697743
86504523b90eacd0c413a52198106fdc9342f39d
89
kt
Kotlin
retroauth/src/main/java/com/andretietz/retroauth/RequestType.kt
Unic8/retroauth
43a88b18e65f56fefa015613d75a50e704804924
[ "Apache-2.0" ]
279
2015-06-29T08:08:16.000Z
2015-09-24T04:02:06.000Z
retroauth/src/main/java/com/andretietz/retroauth/RequestType.kt
andretietz/retroauth
43a88b18e65f56fefa015613d75a50e704804924
[ "Apache-2.0" ]
51
2015-10-24T21:50:13.000Z
2020-12-22T19:52:33.000Z
retroauth/src/main/java/com/andretietz/retroauth/RequestType.kt
andretietz/retroauth
43a88b18e65f56fefa015613d75a50e704804924
[ "Apache-2.0" ]
34
2015-10-06T17:34:48.000Z
2021-03-19T15:50:14.000Z
package com.andretietz.retroauth data class RequestType( val credentialType: String )
14.833333
32
0.808989
60ffb674efc280cb3fb220293d74d0c4c5e3ada2
1,380
swift
Swift
Examples/VoiceSearch/SearchResultsController.swift
algolia/instantsearch-swift-examples
f5d1f25fdf88fcdd3f7779a3265172dcb6f5cb43
[ "MIT" ]
3
2017-07-05T07:45:36.000Z
2017-07-18T04:00:18.000Z
Examples/VoiceSearch/SearchResultsController.swift
algolia/instantsearch-swift-examples
f5d1f25fdf88fcdd3f7779a3265172dcb6f5cb43
[ "MIT" ]
null
null
null
Examples/VoiceSearch/SearchResultsController.swift
algolia/instantsearch-swift-examples
f5d1f25fdf88fcdd3f7779a3265172dcb6f5cb43
[ "MIT" ]
null
null
null
// // SearchResultsController.swift // VoiceSearch // // Created by Vladislav Fitc on 05/11/2021. // import Foundation import UIKit import InstantSearch extension VoiceSearch { class SearchResultsController: UITableViewController, HitsController { var hitsSource: HitsInteractor<Hit<Product>>? let productCellID = "productCellID" override func viewDidLoad() { super.viewDidLoad() tableView.register(ProductTableViewCell.self, forCellReuseIdentifier: productCellID) } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { hitsSource?.numberOfHits() ?? 0 } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: productCellID, for: indexPath) if let productTableViewCell = cell as? ProductTableViewCell, let product = hitsSource?.hit(atIndex: indexPath.row) { productTableViewCell.setup(with: product) } return cell } override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { // Handle hit selection } override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 100 } } }
27.6
109
0.697101
7d143319e1dd166630cdf32f8fe3d6db7ef09f17
228
lua
Lua
test/init.lua
alexaandru/hotpot.nvim
0e0e8dff92f47c85bf4893f50bec4e36d6c7d0b9
[ "MIT" ]
115
2021-07-26T16:43:48.000Z
2022-03-29T15:04:16.000Z
test/init.lua
alexaandru/hotpot.nvim
0e0e8dff92f47c85bf4893f50bec4e36d6c7d0b9
[ "MIT" ]
42
2021-07-29T13:44:10.000Z
2022-03-23T06:48:19.000Z
test/init.lua
alexaandru/hotpot.nvim
0e0e8dff92f47c85bf4893f50bec4e36d6c7d0b9
[ "MIT" ]
5
2021-08-01T12:04:01.000Z
2021-08-21T07:05:40.000Z
vim.cmd("set rtp+=/hotpot") vim.cmd("set rtp+=/test") vim.cmd("set rtp+=/config") if vim.fn.empty(vim.fn.glob("/hotpot")) > 0 then vim.cmd("cq 255") end if vim.fn.empty(vim.fn.glob("/test")) > 0 then vim.cmd("cq 255") end
19
48
0.622807
9532089580b27af2101d248828b532548d3da129
513
dart
Dart
lib/src/models/realtime_history_query.dart
XLNT/flutter_ably
c0e3577a2659e2b9892f137f063b711c75b81e5f
[ "Apache-2.0" ]
null
null
null
lib/src/models/realtime_history_query.dart
XLNT/flutter_ably
c0e3577a2659e2b9892f137f063b711c75b81e5f
[ "Apache-2.0" ]
null
null
null
lib/src/models/realtime_history_query.dart
XLNT/flutter_ably
c0e3577a2659e2b9892f137f063b711c75b81e5f
[ "Apache-2.0" ]
1
2019-02-18T23:24:49.000Z
2019-02-18T23:24:49.000Z
import 'package:json_annotation/json_annotation.dart'; part 'realtime_history_query.g.dart'; @JsonSerializable() class RealtimeHistoryQuery { DateTime start; DateTime end; int direction; int limit; bool untilAttach; RealtimeHistoryQuery({ this.start, this.end, this.direction, this.limit, this.untilAttach, }); factory RealtimeHistoryQuery.fromJson(Map json) => _$RealtimeHistoryQueryFromJson(json); Map<String, dynamic> toJson() => _$RealtimeHistoryQueryToJson(this); }
21.375
90
0.738791
2a60b93971087032fc4eb9113897afa4dcafc89e
1,237
java
Java
youran-generate-core/src/main/java/com/youran/generate/pojo/dto/chart/source/item/DimensionAddDTO.java
yanghuai2020/youran
e230457a9e89d9c17d96287e7c13eb8a8e14e1a8
[ "Apache-2.0" ]
112
2019-12-14T03:26:29.000Z
2022-02-23T09:26:16.000Z
youran-generate-core/src/main/java/com/youran/generate/pojo/dto/chart/source/item/DimensionAddDTO.java
yanghuai2020/youran
e230457a9e89d9c17d96287e7c13eb8a8e14e1a8
[ "Apache-2.0" ]
8
2019-12-23T02:59:11.000Z
2022-01-10T09:38:16.000Z
youran-generate-core/src/main/java/com/youran/generate/pojo/dto/chart/source/item/DimensionAddDTO.java
yanghuai2020/youran
e230457a9e89d9c17d96287e7c13eb8a8e14e1a8
[ "Apache-2.0" ]
58
2019-12-16T13:28:25.000Z
2022-03-03T02:44:01.000Z
package com.youran.generate.pojo.dto.chart.source.item; import com.youran.common.validator.Const; import com.youran.generate.constant.Granularity; import com.youran.generate.constant.SourceItemType; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.constraints.NotNull; /** * 新增【维度】入参 * * @author: cbb * @date: 2020-04-04 */ @ApiModel(description = "新增【维度】入参") public class DimensionAddDTO extends AbstractSourceItemDTO { @ApiModelProperty(notes = "字段id", example = "1", required = true) @NotNull private Integer fieldId; @ApiModelProperty(notes = "维度粒度", example = "1", required = true, allowableValues = Granularity.VALUES_STR) @NotNull @Const(constClass = Granularity.class) private Integer granularity; @Override public Integer getType() { return SourceItemType.DIMENSION.getValue(); } public Integer getFieldId() { return fieldId; } public void setFieldId(Integer fieldId) { this.fieldId = fieldId; } public Integer getGranularity() { return granularity; } public void setGranularity(Integer granularity) { this.granularity = granularity; } }
24.74
111
0.704123
3bb3ce5f1df2d29a3a9728df71f67c5b87a787ce
95,980
html
HTML
docs/doxy/protected/out/html/classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html
aarre/drawl-docs
410d91f03aec0934240985fa6afe664f128565f6
[ "MIT" ]
null
null
null
docs/doxy/protected/out/html/classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html
aarre/drawl-docs
410d91f03aec0934240985fa6afe664f128565f6
[ "MIT" ]
null
null
null
docs/doxy/protected/out/html/classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html
aarre/drawl-docs
410d91f03aec0934240985fa6afe664f128565f6
[ "MIT" ]
null
null
null
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>My Project: com.aarrelaakso.drawl.Circle Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">My Project </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.13 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacecom.html">com</a></li><li class="navelem"><a class="el" href="namespacecom_1_1aarrelaakso.html">aarrelaakso</a></li><li class="navelem"><a class="el" href="namespacecom_1_1aarrelaakso_1_1drawl.html">drawl</a></li><li class="navelem"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> &#124; <a href="#pro-methods">Protected Member Functions</a> &#124; <a href="#pac-static-methods">Static Package Functions</a> &#124; <a href="#pri-methods">Private Member Functions</a> &#124; <a href="#pri-attribs">Private Attributes</a> &#124; <a href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">com.aarrelaakso.drawl.Circle Class Reference</div> </div> </div><!--header--> <div class="contents"> <div class="dynheader"> Inheritance diagram for com.aarrelaakso.drawl.Circle:</div> <div class="dyncontent"> <div class="center"><img src="classcom_1_1aarrelaakso_1_1drawl_1_1_circle__inherit__graph.png" border="0" usemap="#com_8aarrelaakso_8drawl_8_circle_inherit__map" alt="Inheritance graph"/></div> <map name="com_8aarrelaakso_8drawl_8_circle_inherit__map" id="com_8aarrelaakso_8drawl_8_circle_inherit__map"> <area shape="rect" id="node2" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html" title="com.aarrelaakso.drawl.Shape" alt="" coords="5,5,200,32"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for com.aarrelaakso.drawl.Circle:</div> <div class="dyncontent"> <div class="center"><img src="classcom_1_1aarrelaakso_1_1drawl_1_1_circle__coll__graph.png" border="0" usemap="#com_8aarrelaakso_8drawl_8_circle_coll__map" alt="Collaboration graph"/></div> <map name="com_8aarrelaakso_8drawl_8_circle_coll__map" id="com_8aarrelaakso_8drawl_8_circle_coll__map"> <area shape="rect" id="node2" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html" title="com.aarrelaakso.drawl.Shape" alt="" coords="482,349,677,376"/> <area shape="rect" id="node3" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html" title="com.aarrelaakso.drawl.Sisu\lBigDecimal" alt="" coords="280,118,463,159"/> </map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a18cd01a953d72d49941bc8211f50d268"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a18cd01a953d72d49941bc8211f50d268">Circle</a> ()</td></tr> <tr class="separator:a18cd01a953d72d49941bc8211f50d268"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a31a2fa475820117ecfbb5c9cd839f0f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a31a2fa475820117ecfbb5c9cd839f0f4">getExplicitHeight</a> ()</td></tr> <tr class="separator:a31a2fa475820117ecfbb5c9cd839f0f4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adc826cc2d93eb4e78318035c86d00f03"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#adc826cc2d93eb4e78318035c86d00f03">getSVG</a> ()</td></tr> <tr class="separator:adc826cc2d93eb4e78318035c86d00f03"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af34a59acf0e1fc33777aca1b9be7b23d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#af34a59acf0e1fc33777aca1b9be7b23d">setExplicitRadius</a> (@NotNull Integer radius)</td></tr> <tr class="separator:af34a59acf0e1fc33777aca1b9be7b23d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6b4fd174602db84c42763606abfdd98a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a6b4fd174602db84c42763606abfdd98a">setExplicitWidth</a> (@Nullable <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> width)</td></tr> <tr class="separator:a6b4fd174602db84c42763606abfdd98a"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acebea2aa57031322323c9bf50ee447db"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#acebea2aa57031322323c9bf50ee447db">getAbove</a> ()</td></tr> <tr class="separator:acebea2aa57031322323c9bf50ee447db"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a53de5ab609d879719cd3b372dfe8df58"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a53de5ab609d879719cd3b372dfe8df58">getBelow</a> ()</td></tr> <tr class="separator:a53de5ab609d879719cd3b372dfe8df58"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0d9a33a3e151aaceeec140bea343a650"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a0d9a33a3e151aaceeec140bea343a650">getFill</a> ()</td></tr> <tr class="separator:a0d9a33a3e151aaceeec140bea343a650"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2b19d5964ac46d545a7bae3133df6532"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a2b19d5964ac46d545a7bae3133df6532">getLeftOf</a> ()</td></tr> <tr class="separator:a2b19d5964ac46d545a7bae3133df6532"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1ad573b06f341aa79f6a255a476ae6e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a1ad573b06f341aa79f6a255a476ae6e4">getRightOf</a> ()</td></tr> <tr class="separator:a1ad573b06f341aa79f6a255a476ae6e4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4e1d54c7e161e3af5053939ddefdf9e6"><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a4e1d54c7e161e3af5053939ddefdf9e6">getStroke</a> ()</td></tr> <tr class="separator:a4e1d54c7e161e3af5053939ddefdf9e6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a942b3cf3365498dc1ac6b0309ce33b86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a942b3cf3365498dc1ac6b0309ce33b86">setAbove</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> shape)</td></tr> <tr class="separator:a942b3cf3365498dc1ac6b0309ce33b86"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa0ec0030515b5096820e4dd030c0b320"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#aa0ec0030515b5096820e4dd030c0b320">setBelow</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> shape)</td></tr> <tr class="separator:aa0ec0030515b5096820e4dd030c0b320"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a2a2868c85bfbf4d2940d929950001b3d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a2a2868c85bfbf4d2940d929950001b3d">setFill</a> (String s)</td></tr> <tr class="separator:a2a2868c85bfbf4d2940d929950001b3d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aad14fa860ab74cfa90815f56cf4c3ecf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#aad14fa860ab74cfa90815f56cf4c3ecf">setLeftOf</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> shape)</td></tr> <tr class="separator:aad14fa860ab74cfa90815f56cf4c3ecf"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a09e1586ce85c1d964cc3b7ce94bc5d4c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a09e1586ce85c1d964cc3b7ce94bc5d4c">setRightOf</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> shape)</td></tr> <tr class="separator:a09e1586ce85c1d964cc3b7ce94bc5d4c"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a3930f6fe72f6c5e0c0aa4c25ffbf18ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a3930f6fe72f6c5e0c0aa4c25ffbf18ff">setStroke</a> (String s)</td></tr> <tr class="separator:a3930f6fe72f6c5e0c0aa4c25ffbf18ff"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <tr class="memitem:a8137fc064c1c7ce86fed179b56be9ab5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a8137fc064c1c7ce86fed179b56be9ab5">Circle</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a44419c5eba485de9b3dc2d8092be4e19">implicitRadius</a>)</td></tr> <tr class="separator:a8137fc064c1c7ce86fed179b56be9ab5"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1fd7180d686a72b1631a51f0c34f5690"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a1fd7180d686a72b1631a51f0c34f5690">getExplicitRadius</a> ()</td></tr> <tr class="separator:a1fd7180d686a72b1631a51f0c34f5690"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ab12f4d0269b029217c11ba98755f4348"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#ab12f4d0269b029217c11ba98755f4348">getExplicitWidth</a> ()</td></tr> <tr class="separator:ab12f4d0269b029217c11ba98755f4348"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:afdf1eafa90768ab10a9a6ceb25941e34"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#afdf1eafa90768ab10a9a6ceb25941e34">getImplicitDiameter</a> ()</td></tr> <tr class="separator:afdf1eafa90768ab10a9a6ceb25941e34"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a634a3118425b7aa555ef14d0b4441a93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a634a3118425b7aa555ef14d0b4441a93">getImplicitHeight</a> ()</td></tr> <tr class="separator:a634a3118425b7aa555ef14d0b4441a93"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8991b4ff460833d4198dc692241f142f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a8991b4ff460833d4198dc692241f142f">getImplicitRadius</a> ()</td></tr> <tr class="separator:a8991b4ff460833d4198dc692241f142f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a062c441fca2adcc959e236d7352bea55"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a062c441fca2adcc959e236d7352bea55">getImplicitWidth</a> ()</td></tr> <tr class="separator:a062c441fca2adcc959e236d7352bea55"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:acb7e453b97a2800eaf52d209f9759bf6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#acb7e453b97a2800eaf52d209f9759bf6">getImplicitXMaximum</a> ()</td></tr> <tr class="separator:acb7e453b97a2800eaf52d209f9759bf6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac7ed577bb645a1f136b221feda9e6dfc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#ac7ed577bb645a1f136b221feda9e6dfc">getImplicitXMinimum</a> ()</td></tr> <tr class="separator:ac7ed577bb645a1f136b221feda9e6dfc"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a69c8084493cd0d4c899235c171fe127e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a69c8084493cd0d4c899235c171fe127e">getImplicitYMaximum</a> ()</td></tr> <tr class="separator:a69c8084493cd0d4c899235c171fe127e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a1f11256f2fbfb54b387c0e71d7abfd7d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a1f11256f2fbfb54b387c0e71d7abfd7d">setExplicitHeight</a> (@Nullable <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> height)</td></tr> <tr class="separator:a1f11256f2fbfb54b387c0e71d7abfd7d"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a12d16906e4e41d57f9e453f6b508bfa7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a12d16906e4e41d57f9e453f6b508bfa7">setExplicitRadius</a> (@NotNull <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> radius)</td></tr> <tr class="separator:a12d16906e4e41d57f9e453f6b508bfa7"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa3857406bc4f6c7373f1cd7cbe16dfd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#aa3857406bc4f6c7373f1cd7cbe16dfd9">getExplicitHalfHeight</a> ()</td></tr> <tr class="separator:aa3857406bc4f6c7373f1cd7cbe16dfd9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4fba348eaeef3c258aa7443410137ad7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a4fba348eaeef3c258aa7443410137ad7">getExplicitHalfWidth</a> ()</td></tr> <tr class="separator:a4fba348eaeef3c258aa7443410137ad7"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a079e4ec300c2ab3cd2514230b7428ea4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a079e4ec300c2ab3cd2514230b7428ea4">getExplicitXPositionCenter</a> ()</td></tr> <tr class="separator:a079e4ec300c2ab3cd2514230b7428ea4"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4e26548d18a063bff6bb0781526b909f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a4e26548d18a063bff6bb0781526b909f">getExplicitXPositionLeft</a> ()</td></tr> <tr class="separator:a4e26548d18a063bff6bb0781526b909f"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:adfeaa06d8a6943d8f5bc90e91f0b4fac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#adfeaa06d8a6943d8f5bc90e91f0b4fac">getExplicitYPositionBottom</a> ()</td></tr> <tr class="separator:adfeaa06d8a6943d8f5bc90e91f0b4fac"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6499eaa6fd9cdef3d77fe20a5b039401"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a6499eaa6fd9cdef3d77fe20a5b039401">getExplicitYPositionCenter</a> ()</td></tr> <tr class="separator:a6499eaa6fd9cdef3d77fe20a5b039401"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af5d7293539d67234c9941e6abc3e642b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#af5d7293539d67234c9941e6abc3e642b">getExplicitYPositionTop</a> ()</td></tr> <tr class="separator:af5d7293539d67234c9941e6abc3e642b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a33908342a13df06645b6ab7c1fd7a801"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a33908342a13df06645b6ab7c1fd7a801">getImplicitHalfHeight</a> ()</td></tr> <tr class="separator:a33908342a13df06645b6ab7c1fd7a801"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a46d1d2823bc131d796a6a41383334d85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a46d1d2823bc131d796a6a41383334d85">getImplicitHalfWidth</a> ()</td></tr> <tr class="separator:a46d1d2823bc131d796a6a41383334d85"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a50c12c30790bd28ec0b71b58f59b1e96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a50c12c30790bd28ec0b71b58f59b1e96">getImplicitXPositionCenter</a> ()</td></tr> <tr class="separator:a50c12c30790bd28ec0b71b58f59b1e96"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad9b2aee9937d5f034f7f4a2a1d979260"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ad9b2aee9937d5f034f7f4a2a1d979260">getImplicitXPositionLeft</a> ()</td></tr> <tr class="separator:ad9b2aee9937d5f034f7f4a2a1d979260"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa0877965f7f172378e87ba69f27c7ad6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#aa0877965f7f172378e87ba69f27c7ad6">getImplicitYMinimum</a> ()</td></tr> <tr class="separator:aa0877965f7f172378e87ba69f27c7ad6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5116673c093c60f66bba9fddf9533db6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a5116673c093c60f66bba9fddf9533db6">getImplicitYPositionBottom</a> ()</td></tr> <tr class="separator:a5116673c093c60f66bba9fddf9533db6"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad10def6c8dd7cbe03c281817406ab461"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ad10def6c8dd7cbe03c281817406ab461">getImplicitYPositionCenter</a> ()</td></tr> <tr class="separator:ad10def6c8dd7cbe03c281817406ab461"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a5ffc02627cca0723e3555b5d04ba2b75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a5ffc02627cca0723e3555b5d04ba2b75">getImplicitYPositionTop</a> ()</td></tr> <tr class="separator:a5ffc02627cca0723e3555b5d04ba2b75"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a8e4c74480fede49f44519554136c12b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a8e4c74480fede49f44519554136c12b0">setExplicitXPositionCenter</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> x)</td></tr> <tr class="separator:a8e4c74480fede49f44519554136c12b0"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aa7855df6d98b3bfa556b7d857755181b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#aa7855df6d98b3bfa556b7d857755181b">setExplicitXPositionCenter</a> (Integer x)</td></tr> <tr class="separator:aa7855df6d98b3bfa556b7d857755181b"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:af8af5129e3e61324439a1035428016a2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#af8af5129e3e61324439a1035428016a2">setExplicitYPosition</a> (Integer y)</td></tr> <tr class="separator:af8af5129e3e61324439a1035428016a2"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0ddc58345fca924e973fac474955ef14"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a0ddc58345fca924e973fac474955ef14">setExplicitYPositionCenter</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> y)</td></tr> <tr class="separator:a0ddc58345fca924e973fac474955ef14"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ad41ecfc8ce74638066d8a21c97e3f399"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ad41ecfc8ce74638066d8a21c97e3f399">setImplicitHeight</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ab374c520d98692018b1a5866acd33849">implicitHeight</a>)</td></tr> <tr class="separator:ad41ecfc8ce74638066d8a21c97e3f399"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a6ec4c2bd26d08f0a1545bd1d5f47c05a"><td class="memItemLeft" align="right" valign="top">final void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a6ec4c2bd26d08f0a1545bd1d5f47c05a">setImplicitWidth</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a100066b3ccbb6e88080211b00ad8ebb9">implicitWidth</a>)</td></tr> <tr class="separator:a6ec4c2bd26d08f0a1545bd1d5f47c05a"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a4fbc0d430cfe312e018e4ec58f726842"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#a4fbc0d430cfe312e018e4ec58f726842">setImplicitXPositionCenter</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> x)</td></tr> <tr class="separator:a4fbc0d430cfe312e018e4ec58f726842"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:ac1cf4cf6f0bcc489b996a10a600d5629"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ac1cf4cf6f0bcc489b996a10a600d5629">setImplicitYPositionCenter</a> (<a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> y)</td></tr> <tr class="separator:ac1cf4cf6f0bcc489b996a10a600d5629"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pac-static-methods"></a> Static Package Functions</h2></td></tr> <tr class="memitem:ad2adcb85374cf5d6d59429628314e8d1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html#ad2adcb85374cf5d6d59429628314e8d1">[static initializer]</a></td></tr> <tr class="separator:ad2adcb85374cf5d6d59429628314e8d1"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a> Private Member Functions</h2></td></tr> <tr class="memitem:ad4037edaf1ef2bfc989cd157b7f90e61"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#ad4037edaf1ef2bfc989cd157b7f90e61">getExplicitDiameter</a> ()</td></tr> <tr class="separator:ad4037edaf1ef2bfc989cd157b7f90e61"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:aff1c4d184a3234f987a95b673f91bf18"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#aff1c4d184a3234f987a95b673f91bf18">setExplicitRadiusToNull</a> ()</td></tr> <tr class="separator:aff1c4d184a3234f987a95b673f91bf18"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a> Private Attributes</h2></td></tr> <tr class="memitem:a8e3fa774b3fb8e64c8e1f0381a96df5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a8e3fa774b3fb8e64c8e1f0381a96df5e">explicitRadius</a></td></tr> <tr class="separator:a8e3fa774b3fb8e64c8e1f0381a96df5e"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a44419c5eba485de9b3dc2d8092be4e19"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html#a44419c5eba485de9b3dc2d8092be4e19">implicitRadius</a> = <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html#ae01ee6ac57cabf393e59465704a62f2c">SisuBigDecimal.HALF</a></td></tr> <tr class="separator:a44419c5eba485de9b3dc2d8092be4e19"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2> <a id="a18cd01a953d72d49941bc8211f50d268"></a> <h2 class="memtitle"><span class="permalink"><a href="#a18cd01a953d72d49941bc8211f50d268">&#9670;&nbsp;</a></span>Circle() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">com.aarrelaakso.drawl.Circle.Circle </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Construct a circle with a default implicit radius. </p> </div> </div> <a id="a8137fc064c1c7ce86fed179b56be9ab5"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8137fc064c1c7ce86fed179b56be9ab5">&#9670;&nbsp;</a></span>Circle() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">com.aarrelaakso.drawl.Circle.Circle </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>implicitRadius</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Construct a circle with an implicit radius.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">implicitRadius</td><td>The implicit radius of the new circle. </td></tr> </table> </dd> </dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a id="ad2adcb85374cf5d6d59429628314e8d1"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad2adcb85374cf5d6d59429628314e8d1">&#9670;&nbsp;</a></span>[static initializer]()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">com.aarrelaakso.drawl.Shape.[static initializer] </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">package</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="acebea2aa57031322323c9bf50ee447db"></a> <h2 class="memtitle"><span class="permalink"><a href="#acebea2aa57031322323c9bf50ee447db">&#9670;&nbsp;</a></span>getAbove()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> com.aarrelaakso.drawl.Shape.getAbove </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor above (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is below that one), if any.</p> <dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to the right of this one, if any; <code>null</code> otherwise. </dd></dl> </div> </div> <a id="a53de5ab609d879719cd3b372dfe8df58"></a> <h2 class="memtitle"><span class="permalink"><a href="#a53de5ab609d879719cd3b372dfe8df58">&#9670;&nbsp;</a></span>getBelow()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> com.aarrelaakso.drawl.Shape.getBelow </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor below (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is below that one), if any.</p> <dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to below this one, if any; <code>null</code> otherwise. </dd></dl> </div> </div> <a id="ad4037edaf1ef2bfc989cd157b7f90e61"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad4037edaf1ef2bfc989cd157b7f90e61">&#9670;&nbsp;</a></span>getExplicitDiameter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getExplicitDiameter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the explicit diameter of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The explicit diameter of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>, or <code>null</code> if the explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> has not been set. </dd></dl> </div> </div> <a id="aa3857406bc4f6c7373f1cd7cbe16dfd9"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa3857406bc4f6c7373f1cd7cbe16dfd9">&#9670;&nbsp;</a></span>getExplicitHalfHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitHalfHeight </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a4fba348eaeef3c258aa7443410137ad7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4fba348eaeef3c258aa7443410137ad7">&#9670;&nbsp;</a></span>getExplicitHalfWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitHalfWidth </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a31a2fa475820117ecfbb5c9cd839f0f4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a31a2fa475820117ecfbb5c9cd839f0f4">&#9670;&nbsp;</a></span>getExplicitHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getExplicitHeight </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Get the explicit height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the explicit height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>, or <code>null</code> if the explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> has not been set. </dd></dl> </div> </div> <a id="a1fd7180d686a72b1631a51f0c34f5690"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1fd7180d686a72b1631a51f0c34f5690">&#9670;&nbsp;</a></span>getExplicitRadius()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getExplicitRadius </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>, or <code>null</code> if the explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> has not been set. </dd></dl> </div> </div> <a id="ab12f4d0269b029217c11ba98755f4348"></a> <h2 class="memtitle"><span class="permalink"><a href="#ab12f4d0269b029217c11ba98755f4348">&#9670;&nbsp;</a></span>getExplicitWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getExplicitWidth </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the explicit width of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The explicit width of this circle, or <code>null</code> if the explicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> has not been set. </dd></dl> </div> </div> <a id="a079e4ec300c2ab3cd2514230b7428ea4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a079e4ec300c2ab3cd2514230b7428ea4">&#9670;&nbsp;</a></span>getExplicitXPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitXPositionCenter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the explicit x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the explicit x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a4e26548d18a063bff6bb0781526b909f"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4e26548d18a063bff6bb0781526b909f">&#9670;&nbsp;</a></span>getExplicitXPositionLeft()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitXPositionLeft </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="adfeaa06d8a6943d8f5bc90e91f0b4fac"></a> <h2 class="memtitle"><span class="permalink"><a href="#adfeaa06d8a6943d8f5bc90e91f0b4fac">&#9670;&nbsp;</a></span>getExplicitYPositionBottom()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitYPositionBottom </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the explicit y position of the bottom of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the explicit y position of the bottom of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a6499eaa6fd9cdef3d77fe20a5b039401"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6499eaa6fd9cdef3d77fe20a5b039401">&#9670;&nbsp;</a></span>getExplicitYPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitYPositionCenter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the explicit y-position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the explicit y-position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="af5d7293539d67234c9941e6abc3e642b"></a> <h2 class="memtitle"><span class="permalink"><a href="#af5d7293539d67234c9941e6abc3e642b">&#9670;&nbsp;</a></span>getExplicitYPositionTop()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getExplicitYPositionTop </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the explicit y-position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>the explicit y-position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a0d9a33a3e151aaceeec140bea343a650"></a> <h2 class="memtitle"><span class="permalink"><a href="#a0d9a33a3e151aaceeec140bea343a650">&#9670;&nbsp;</a></span>getFill()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">String com.aarrelaakso.drawl.Shape.getFill </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the fill associated with this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>, if any.</p> <dl class="section return"><dt>Returns</dt><dd>the fill associated with this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>, or null if no fill has been associated with this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="afdf1eafa90768ab10a9a6ceb25941e34"></a> <h2 class="memtitle"><span class="permalink"><a href="#afdf1eafa90768ab10a9a6ceb25941e34">&#9670;&nbsp;</a></span>getImplicitDiameter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitDiameter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit diameter of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a></p> <dl class="section return"><dt>Returns</dt><dd></dd></dl> </div> </div> <a id="a33908342a13df06645b6ab7c1fd7a801"></a> <h2 class="memtitle"><span class="permalink"><a href="#a33908342a13df06645b6ab7c1fd7a801">&#9670;&nbsp;</a></span>getImplicitHalfHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitHalfHeight </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a46d1d2823bc131d796a6a41383334d85"></a> <h2 class="memtitle"><span class="permalink"><a href="#a46d1d2823bc131d796a6a41383334d85">&#9670;&nbsp;</a></span>getImplicitHalfWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitHalfWidth </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a634a3118425b7aa555ef14d0b4441a93"></a> <h2 class="memtitle"><span class="permalink"><a href="#a634a3118425b7aa555ef14d0b4441a93">&#9670;&nbsp;</a></span>getImplicitHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitHeight </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a></p> <dl class="section return"><dt>Returns</dt><dd>the implicit height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>, or <code>null</code> if the implicit radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> has not been set. </dd></dl> </div> </div> <a id="a8991b4ff460833d4198dc692241f142f"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8991b4ff460833d4198dc692241f142f">&#9670;&nbsp;</a></span>getImplicitRadius()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitRadius </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a062c441fca2adcc959e236d7352bea55"></a> <h2 class="memtitle"><span class="permalink"><a href="#a062c441fca2adcc959e236d7352bea55">&#9670;&nbsp;</a></span>getImplicitWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitWidth </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit width of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a></p> <dl class="section return"><dt>Returns</dt><dd>the implicit width of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> </dd></dl> </div> </div> <a id="acb7e453b97a2800eaf52d209f9759bf6"></a> <h2 class="memtitle"><span class="permalink"><a href="#acb7e453b97a2800eaf52d209f9759bf6">&#9670;&nbsp;</a></span>getImplicitXMaximum()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitXMaximum </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit maximum (rightmost) x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit maximum (rightmost) x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. </dd></dl> </div> </div> <a id="ac7ed577bb645a1f136b221feda9e6dfc"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac7ed577bb645a1f136b221feda9e6dfc">&#9670;&nbsp;</a></span>getImplicitXMinimum()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitXMinimum </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit minimum (leftmost) x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit minimum (leftmost) x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. </dd></dl> </div> </div> <a id="a50c12c30790bd28ec0b71b58f59b1e96"></a> <h2 class="memtitle"><span class="permalink"><a href="#a50c12c30790bd28ec0b71b58f59b1e96">&#9670;&nbsp;</a></span>getImplicitXPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitXPositionCenter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit x position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit x position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="ad9b2aee9937d5f034f7f4a2a1d979260"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad9b2aee9937d5f034f7f4a2a1d979260">&#9670;&nbsp;</a></span>getImplicitXPositionLeft()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitXPositionLeft </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit x position of the left edge of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit x position of the left edge of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a69c8084493cd0d4c899235c171fe127e"></a> <h2 class="memtitle"><span class="permalink"><a href="#a69c8084493cd0d4c899235c171fe127e">&#9670;&nbsp;</a></span>getImplicitYMaximum()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.getImplicitYMaximum </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit maximum (topmost) y-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit maximum (topmost) x-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. </dd></dl> </div> </div> <a id="aa0877965f7f172378e87ba69f27c7ad6"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa0877965f7f172378e87ba69f27c7ad6">&#9670;&nbsp;</a></span>getImplicitYMinimum()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitYMinimum </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit minimum (bottommost) y-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit minimum (bottommost) y-position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a5116673c093c60f66bba9fddf9533db6"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5116673c093c60f66bba9fddf9533db6">&#9670;&nbsp;</a></span>getImplicitYPositionBottom()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitYPositionBottom </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the implicit y position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit y position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="ad10def6c8dd7cbe03c281817406ab461"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad10def6c8dd7cbe03c281817406ab461">&#9670;&nbsp;</a></span>getImplicitYPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitYPositionCenter </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit y position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit y position of the center of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a5ffc02627cca0723e3555b5d04ba2b75"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5ffc02627cca0723e3555b5d04ba2b75">&#9670;&nbsp;</a></span>getImplicitYPositionTop()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Shape.getImplicitYPositionTop </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get the implicit y position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The implicit y position of the top of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </dd></dl> </div> </div> <a id="a2b19d5964ac46d545a7bae3133df6532"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2b19d5964ac46d545a7bae3133df6532">&#9670;&nbsp;</a></span>getLeftOf()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> com.aarrelaakso.drawl.Shape.getLeftOf </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor to the right (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is to the left of that one), if any.</p> <dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to the right of this one, if any; <code>null</code> otherwise. </dd></dl> </div> </div> <a id="a1ad573b06f341aa79f6a255a476ae6e4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1ad573b06f341aa79f6a255a476ae6e4">&#9670;&nbsp;</a></span>getRightOf()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> com.aarrelaakso.drawl.Shape.getRightOf </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Get this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor to the left (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is to the right of that one), if any.</p> <dl class="section return"><dt>Returns</dt><dd>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to the left of this one, if any; <code>null</code> otherwise. </dd></dl> </div> </div> <a id="a4e1d54c7e161e3af5053939ddefdf9e6"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4e1d54c7e161e3af5053939ddefdf9e6">&#9670;&nbsp;</a></span>getStroke()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">String com.aarrelaakso.drawl.Shape.getStroke </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets the stroke of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="section return"><dt>Returns</dt><dd>The stroke of this shape, or null if the stroke of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> has not been set. </dd></dl> </div> </div> <a id="adc826cc2d93eb4e78318035c86d00f03"></a> <h2 class="memtitle"><span class="permalink"><a href="#adc826cc2d93eb4e78318035c86d00f03">&#9670;&nbsp;</a></span>getSVG()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">String com.aarrelaakso.drawl.Circle.getSVG </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Get <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_s_v_g.html">SVG</a> representing this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>.</p> <dl class="section return"><dt>Returns</dt><dd>A string containing <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_s_v_g.html">SVG</a> representing this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. </dd></dl> </div> </div> <a id="a942b3cf3365498dc1ac6b0309ce33b86"></a> <h2 class="memtitle"><span class="permalink"><a href="#a942b3cf3365498dc1ac6b0309ce33b86">&#9670;&nbsp;</a></span>setAbove()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setAbove </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td> <td class="paramname"><em>shape</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> above another <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">shape</td><td>The circle that will be below this one. </td></tr> </table> </dd> </dl> </div> </div> <a id="aa0ec0030515b5096820e4dd030c0b320"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa0ec0030515b5096820e4dd030c0b320">&#9670;&nbsp;</a></span>setBelow()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setBelow </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td> <td class="paramname"><em>shape</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set this circle below another circle.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">shape</td><td>The circle that will be above this one. </td></tr> </table> </dd> </dl> </div> </div> <a id="a1f11256f2fbfb54b387c0e71d7abfd7d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1f11256f2fbfb54b387c0e71d7abfd7d">&#9670;&nbsp;</a></span>setExplicitHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Circle.setExplicitHeight </td> <td>(</td> <td class="paramtype">@Nullable <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>height</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set the height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> to a fixed value</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">height</td><td>The new height of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. This value can be <code>null</code> to indicate that the explict height has not yet been determined. </td></tr> </table> </dd> </dl> </div> </div> <a id="a12d16906e4e41d57f9e453f6b508bfa7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a12d16906e4e41d57f9e453f6b508bfa7">&#9670;&nbsp;</a></span>setExplicitRadius() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Circle.setExplicitRadius </td> <td>(</td> <td class="paramtype">@NotNull <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>radius</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set the radius to a fixed value </p> <p>This is a protected method because users of the API should not have to deal with <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">radius</td><td>the fixed value </td></tr> </table> </dd> </dl> </div> </div> <a id="af34a59acf0e1fc33777aca1b9be7b23d"></a> <h2 class="memtitle"><span class="permalink"><a href="#af34a59acf0e1fc33777aca1b9be7b23d">&#9670;&nbsp;</a></span>setExplicitRadius() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Circle.setExplicitRadius </td> <td>(</td> <td class="paramtype">@NotNull Integer&#160;</td> <td class="paramname"><em>radius</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set the radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> to a fixed value.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">radius</td><td>The fixed value for the radius of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a>. This method allows providing the value as an Integer to support common use cases. </td></tr> </table> </dd> </dl> </div> </div> <a id="aff1c4d184a3234f987a95b673f91bf18"></a> <h2 class="memtitle"><span class="permalink"><a href="#aff1c4d184a3234f987a95b673f91bf18">&#9670;&nbsp;</a></span>setExplicitRadiusToNull()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Circle.setExplicitRadiusToNull </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a6b4fd174602db84c42763606abfdd98a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6b4fd174602db84c42763606abfdd98a">&#9670;&nbsp;</a></span>setExplicitWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Circle.setExplicitWidth </td> <td>(</td> <td class="paramtype">@Nullable <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>width</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Set the width of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> to a fixed value</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">width</td><td>the new width of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> </td></tr> </table> </dd> </dl> </div> </div> <a id="a8e4c74480fede49f44519554136c12b0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8e4c74480fede49f44519554136c12b0">&#9670;&nbsp;</a></span>setExplicitXPositionCenter() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setExplicitXPositionCenter </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>x</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="aa7855df6d98b3bfa556b7d857755181b"></a> <h2 class="memtitle"><span class="permalink"><a href="#aa7855df6d98b3bfa556b7d857755181b">&#9670;&nbsp;</a></span>setExplicitXPositionCenter() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setExplicitXPositionCenter </td> <td>(</td> <td class="paramtype">Integer&#160;</td> <td class="paramname"><em>x</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="af8af5129e3e61324439a1035428016a2"></a> <h2 class="memtitle"><span class="permalink"><a href="#af8af5129e3e61324439a1035428016a2">&#9670;&nbsp;</a></span>setExplicitYPosition()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setExplicitYPosition </td> <td>(</td> <td class="paramtype">Integer&#160;</td> <td class="paramname"><em>y</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a0ddc58345fca924e973fac474955ef14"></a> <h2 class="memtitle"><span class="permalink"><a href="#a0ddc58345fca924e973fac474955ef14">&#9670;&nbsp;</a></span>setExplicitYPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setExplicitYPositionCenter </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>y</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set the explicit y position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </p> <p>The y position marks the vertical position of the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s center. The explicit coordinate system is the common Cartesian coordinate system, with higher values of y upward and lower values of y downward.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">y</td><td>The explicit y position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </td></tr> </table> </dd> </dl> </div> </div> <a id="a2a2868c85bfbf4d2940d929950001b3d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2a2868c85bfbf4d2940d929950001b3d">&#9670;&nbsp;</a></span>setFill()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setFill </td> <td>(</td> <td class="paramtype">String&#160;</td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set the fill of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>A string representing a fill color, e.g., "white". </td></tr> </table> </dd> </dl> </div> </div> <a id="ad41ecfc8ce74638066d8a21c97e3f399"></a> <h2 class="memtitle"><span class="permalink"><a href="#ad41ecfc8ce74638066d8a21c97e3f399">&#9670;&nbsp;</a></span>setImplicitHeight()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">final void com.aarrelaakso.drawl.Shape.setImplicitHeight </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>implicitHeight</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a6ec4c2bd26d08f0a1545bd1d5f47c05a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6ec4c2bd26d08f0a1545bd1d5f47c05a">&#9670;&nbsp;</a></span>setImplicitWidth()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">final void com.aarrelaakso.drawl.Shape.setImplicitWidth </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>implicitWidth</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="a4fbc0d430cfe312e018e4ec58f726842"></a> <h2 class="memtitle"><span class="permalink"><a href="#a4fbc0d430cfe312e018e4ec58f726842">&#9670;&nbsp;</a></span>setImplicitXPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setImplicitXPositionCenter </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>x</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a id="ac1cf4cf6f0bcc489b996a10a600d5629"></a> <h2 class="memtitle"><span class="permalink"><a href="#ac1cf4cf6f0bcc489b996a10a600d5629">&#9670;&nbsp;</a></span>setImplicitYPositionCenter()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setImplicitYPositionCenter </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a>&#160;</td> <td class="paramname"><em>y</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set the implicit y position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </p> <p>The y position marks the vertical position of the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s center. In the implicit coordinate system, higher values of y are upward whereas lower values of y are downward.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">y</td><td>The implicit y position of this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>. </td></tr> </table> </dd> </dl> </div> </div> <a id="aad14fa860ab74cfa90815f56cf4c3ecf"></a> <h2 class="memtitle"><span class="permalink"><a href="#aad14fa860ab74cfa90815f56cf4c3ecf">&#9670;&nbsp;</a></span>setLeftOf()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setLeftOf </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td> <td class="paramname"><em>shape</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor to the right (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is to the left of that one).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">shape</td><td>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to the right of this one </td></tr> </table> </dd> </dl> </div> </div> <a id="a09e1586ce85c1d964cc3b7ce94bc5d4c"></a> <h2 class="memtitle"><span class="permalink"><a href="#a09e1586ce85c1d964cc3b7ce94bc5d4c">&#9670;&nbsp;</a></span>setRightOf()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setRightOf </td> <td>(</td> <td class="paramtype"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>&#160;</td> <td class="paramname"><em>shape</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Set this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a>'s neighbor to the left (this <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> is to the right of that one).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">shape</td><td>the <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_shape.html">Shape</a> to the left of this one </td></tr> </table> </dd> </dl> </div> </div> <a id="a3930f6fe72f6c5e0c0aa4c25ffbf18ff"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3930f6fe72f6c5e0c0aa4c25ffbf18ff">&#9670;&nbsp;</a></span>setStroke()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">void com.aarrelaakso.drawl.Shape.setStroke </td> <td>(</td> <td class="paramtype">String&#160;</td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inherited</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets the stroke of this shape.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">s</td><td>A stroke name. </td></tr> </table> </dd> </dl> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a id="a8e3fa774b3fb8e64c8e1f0381a96df5e"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8e3fa774b3fb8e64c8e1f0381a96df5e">&#9670;&nbsp;</a></span>explicitRadius</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.explicitRadius</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>The explicit radius of a <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> is null by default. </p> </div> </div> <a id="a44419c5eba485de9b3dc2d8092be4e19"></a> <h2 class="memtitle"><span class="permalink"><a href="#a44419c5eba485de9b3dc2d8092be4e19">&#9670;&nbsp;</a></span>implicitRadius</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html">SisuBigDecimal</a> com.aarrelaakso.drawl.Circle.implicitRadius = <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_sisu_big_decimal.html#ae01ee6ac57cabf393e59465704a62f2c">SisuBigDecimal.HALF</a></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">private</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>The implicit radius of a <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> is 0.5 by default, giving the default <a class="el" href="classcom_1_1aarrelaakso_1_1drawl_1_1_circle.html">Circle</a> an implicit diameter of 1. </p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>/mnt/d/OneDrive/Documents/src/drawl/src/main/java/com/aarrelaakso/drawl/<a class="el" href="_circle_8java.html">Circle.java</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.13 </small></address> </body> </html>
53.710129
527
0.701073
372ab68f44d43f42a1301010d78fdc390016ae53
2,184
ps1
PowerShell
scripts/init-repeatingtask.ps1
tallaltawil/cfn
903fdee17a335ea37cca600ef93c6d878e8506ea
[ "Apache-2.0" ]
13
2016-04-21T07:12:31.000Z
2022-02-12T16:48:07.000Z
scripts/init-repeatingtask.ps1
tallaltawil/cfn
903fdee17a335ea37cca600ef93c6d878e8506ea
[ "Apache-2.0" ]
49
2015-11-23T20:10:08.000Z
2020-11-05T05:53:49.000Z
scripts/init-repeatingtask.ps1
tallaltawil/cfn
903fdee17a335ea37cca600ef93c6d878e8506ea
[ "Apache-2.0" ]
25
2015-11-13T15:55:30.000Z
2020-08-07T13:44:52.000Z
[CmdLetBinding()] Param( [Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [String] $Name, [Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [String[]] $Arguments, [Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [String] $User, [Parameter(Mandatory=$true,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [String] $Password, [Parameter(Mandatory=$false,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [String] $Command = "powershell.exe", [Parameter(Mandatory=$false,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [DateTime] $StartTime = (Get-Date).Date, [Parameter(Mandatory=$false,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [TimeSpan] $RepetitionInterval = (New-TimeSpan -Hours 1), [Parameter(Mandatory=$false,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [TimeSpan] $RandomDelay = (New-TimeSpan -Minutes 10), [Parameter(Mandatory=$false,ValueFromPipeLine=$false,ValueFromPipeLineByPropertyName=$false)] [Switch] $Force ) if (Get-ScheduledTask -TaskName $Name -ErrorAction SilentlyContinue) { if ($Force) { UnRegister-ScheduledTask -TaskName $Name -Confirm:$false Write-Verbose "Force-unregistered existing job, ${Name}" } else { throw "Task already exists, ${Name}. Use '-Force' to delete it" } } $Action = New-ScheduledTaskAction -Execute $Command -Argument "$Arguments" $Trigger = New-JobTrigger -Once -At $StartTime -RepeatIndefinitely -RepetitionInterval $RepetitionInterval -RandomDelay $RandomDelay $Settings = New-ScheduledTaskSettingsSet -MultipleInstances Parallel Register-ScheduledTask -TaskName $Name -Action $Action -Trigger $Trigger -User $User -Password $Password -RunLevel Highest -Settings $Settings Write-Verbose "Created scheduled job, ${Name}" if ($StartTime.CompareTo((Get-Date)) -le 0) { # Start time is now or in the past, trigger job immediately Start-ScheduledTask -TaskName $Name Write-Verbose "Triggered job, ${Name}" }
39
142
0.757784
53de563505628430a92871600aa806b0235be96a
564
java
Java
test/org/nutz/lang/util/ByteInputStreamTest.java
google-code-export/nutz
26594e2782aa8667b17ee3aa54e2bc207001f41e
[ "Apache-2.0" ]
null
null
null
test/org/nutz/lang/util/ByteInputStreamTest.java
google-code-export/nutz
26594e2782aa8667b17ee3aa54e2bc207001f41e
[ "Apache-2.0" ]
1
2015-05-22T05:19:22.000Z
2015-05-22T05:19:22.000Z
test/org/nutz/lang/util/ByteInputStreamTest.java
google-code-export/nutz
26594e2782aa8667b17ee3aa54e2bc207001f41e
[ "Apache-2.0" ]
1
2022-02-12T10:23:11.000Z
2022-02-12T10:23:11.000Z
package org.nutz.lang.util; import static org.junit.Assert.assertEquals; import java.io.IOException; import org.junit.Test; public class ByteInputStreamTest { @Test public void test_read_ByteInputStream() throws IOException { byte[] bs_abc = {'a','b','c'}; ByteInputStream bis = new ByteInputStream(bs_abc); assertEquals((int) ('a'), bis.read()); assertEquals((int) ('b'), bis.read()); assertEquals((int) ('c'), bis.read()); assertEquals(-1, bis.read()); bis.close(); } }
26.857143
65
0.601064
4b32b3d6d8e78963c56fb781f435caa14c0299f9
2,700
html
HTML
HTML/R/4638.html
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
2
2019-03-03T00:04:36.000Z
2020-10-06T16:22:38.000Z
HTML/R/4638.html
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
null
null
null
HTML/R/4638.html
cocoatomo/Python3.2_C_API_Tutorial
e33d4a285429935aca3178dc2a97aca3ab484232
[ "PSF-2.0" ]
1
2019-03-03T00:04:38.000Z
2019-03-03T00:04:38.000Z
<html> <head> <title>TkappObject</title> <meta name='robots' content='noindex,nofollow'> <meta name='generator' content='GLOBAL-5.8.1'> </head> <body text='#191970' bgcolor='#f5f5dc' vlink='gray'> <pre> <a href='../S/2618.html#L221'>TkappObject</a> 221 Modules/_tkinter.c if (((TkappObject *)self)-&gt;threaded &amp;&amp; \ <a href='../S/2618.html#L222'>TkappObject</a> 222 Modules/_tkinter.c ((TkappObject *)self)-&gt;thread_id != Tcl_GetCurrentThread()) { \ <a href='../S/2618.html#L266'>TkappObject</a> 266 Modules/_tkinter.c #define Tkapp_Interp(v) (((TkappObject *) (v))-&gt;interp) <a href='../S/2618.html#L602'>TkappObject</a> 602 Modules/_tkinter.c static TkappObject * <a href='../S/2618.html#L606'>TkappObject</a> 606 Modules/_tkinter.c TkappObject *v; <a href='../S/2618.html#L609'>TkappObject</a> 609 Modules/_tkinter.c v = PyObject_New(TkappObject, &amp;Tkapp_Type); <a href='../S/2618.html#L726'>TkappObject</a> 726 Modules/_tkinter.c return (TkappObject *)result; <a href='../S/2618.html#L1030'>TkappObject</a> 1030 Modules/_tkinter.c TkappObject *app = (TkappObject*)tkapp; <a href='../S/2618.html#L1121'>TkappObject</a> 1121 Modules/_tkinter.c TkappObject *self; <a href='../S/2618.html#L1283'>TkappObject</a> 1283 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L1566'>TkappObject</a> 1566 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L1568'>TkappObject</a> 1568 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L1686'>TkappObject</a> 1686 Modules/_tkinter.c if (((TkappObject*)self)-&gt;wantobjects) { <a href='../S/2618.html#L2101'>TkappObject</a> 2101 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L2165'>TkappObject</a> 2165 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L2508'>TkappObject</a> 2508 Modules/_tkinter.c TkappObject *self = (TkappObject*)selfptr; <a href='../S/2618.html#L2661'>TkappObject</a> 2661 Modules/_tkinter.c return PyBool_FromLong(((TkappObject*)self)-&gt;wantobjects); <a href='../S/2618.html#L2662'>TkappObject</a> 2662 Modules/_tkinter.c ((TkappObject*)self)-&gt;wantobjects = wantobjects; <a href='../S/2618.html#L2672'>TkappObject</a> 2672 Modules/_tkinter.c ((TkappObject*)self)-&gt;dispatching = 1; <a href='../S/2618.html#L2742'>TkappObject</a> 2742 Modules/_tkinter.c sizeof(TkappObject), /*tp_basicsize */ </pre> </body> </html>
84.375
149
0.660741
7139870d2082d3ad633b2e0edd094e059f709dcc
49
asm
Assembly
src/third_party/nasm/test/br3392418.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
2,219
2018-03-26T02:57:34.000Z
2022-03-31T00:27:59.000Z
src/third_party/nasm/test/br3392418.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
src/third_party/nasm/test/br3392418.asm
Mr-Sheep/naiveproxy
9f6e9768295f6d1d41517a15a621d4756bd7d6be
[ "BSD-3-Clause" ]
473
2019-03-24T16:34:23.000Z
2022-03-31T02:01:05.000Z
section __LD,__compact_unwind data debug dd 0
12.25
41
0.795918
a4b6f922e74e53e570a04fb0b21b3dc7db98fcee
5,250
lua
Lua
NvChad/lua/custom/plugins.lua
i3Cheese/dots
30567481dc80a3dabc0ca4079049f5eca7ac926f
[ "MIT" ]
null
null
null
NvChad/lua/custom/plugins.lua
i3Cheese/dots
30567481dc80a3dabc0ca4079049f5eca7ac926f
[ "MIT" ]
null
null
null
NvChad/lua/custom/plugins.lua
i3Cheese/dots
30567481dc80a3dabc0ca4079049f5eca7ac926f
[ "MIT" ]
null
null
null
local map = require("core.utils").map local mapping = require('custom.mapping') local settings = { status = { dap = true, }, } return { { "ellisonleao/glow.nvim", cmd = "Glow" }, { "j-hui/fidget.nvim", after = "nvim-lspconfig", config = function() require('fidget').setup({}) end, -- disable = true, }, { 'callmekohei/switcher.nvim', run = function() vim.cmd "py3 from pip._internal.cli.main import main as pipmain; pipmain(['install', 'pyobjc-core', 'pyobjc-framework-Cocoa']);" vim.cmd ":UpdateRemotePlugins" end, setup = function() vim.g.switcher_keyboardInputSource = "com.apple.keylayout.ABC" end, config = function() vim.cmd [[ autocmd InsertLeave * :call SwitchEnglish('') ]] end, }, { 'jose-elias-alvarez/null-ls.nvim', config = function() local null_ls = require('null-ls') null_ls.setup({ debug = true, sources = { null_ls.builtins.formatting.autopep8.with({ extra_args = {'--ignore=E402'} }), null_ls.builtins.formatting.brittany, null_ls.builtins.code_actions.gitsigns, }, }) end, }, { "danymat/neogen", config = function() require('neogen').setup {} end, requires = "nvim-treesitter/nvim-treesitter", tag = "*", event = "InsertEnter", }, { 'simrat39/symbols-outline.nvim', event = "BufRead", config = function() require('custom.mapping').symbols_outline() end, }, { 'williamboman/nvim-lsp-installer', config = function() -- require('custom.plugins.lspconfig').config_lsp_installer() end, }, { "mfussenegger/nvim-dap", config = function() require("custom.plugins.dap").dap.config() end, disabled = not settings.status.dap, }, { 'theHamsta/nvim-dap-virtual-text', config = function() require("nvim-dap-virtual-text").setup() end, after = 'nvim-dap', }, { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"}, after = 'nvim-dap', config = function() require("custom.plugins.dap").dapui.config() end, }, { 'nvim-telescope/telescope-dap.nvim', requires = {'nvim-dap', 'telescope.nvim'}, after = 'nvim-dap', config = function() require('telescope').load_extension('dap') vim.cmd "silent! command Vars lua require'telescope'.extensions.dap.variables{}" vim.cmd "silent! command Breakpoints lua require'telescope'.extensions.dap.list_breakpoints{}" end, }, { 'mfussenegger/nvim-dap-python', requires = {'nvim-dap'}, config = function() require('dap-python').setup('~/python/venvs/debugpy/bin/python') local dap = require('dap') table.insert(dap.configurations.python, { -- The first three options are required by nvim-dap type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` request = 'launch'; name = "Launch file in venv"; -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options program = "${file}"; -- This configuration will launch the current file if used. pythonPath = require('custom.utils').locate_python_executable(), }) end, }, { 'Shatur/neovim-session-manager', config = function() require('session_manager').setup({ path_replacer = '__', -- The character to which the path separator will be replaced for session files. colon_replacer = '++', -- The character to which the colon symbol will be replaced for session files. autoload_mode = require('session_manager.config').AutoloadMode.CurrentDir, -- Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession autosave_last_session = true, -- Automatically save last session on exit and on session switch. autosave_ignore_not_normal = true, -- Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed. autosave_ignore_filetypes = { -- All buffers of these file types will be closed before the session is saved. 'gitcommit', }, autosave_only_in_session = false, -- Always autosaves session. If true, only autosaves after a session is active. max_path_length = 80, -- Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all. }) end }, }
36.458333
204
0.555048
fb74b4e318b376f6d357515fc8ce7f83effc5894
393
c
C
src/internal/stack_prot.c
MobSlicer152/shard_libc
7b028ac5c14d90173ea76ec9bfff5e819a18aaf6
[ "Zlib" ]
6
2021-01-04T20:20:15.000Z
2021-11-11T03:36:06.000Z
src/internal/stack_prot.c
MobSlicer152/shard_libc
7b028ac5c14d90173ea76ec9bfff5e819a18aaf6
[ "Zlib" ]
null
null
null
src/internal/stack_prot.c
MobSlicer152/shard_libc
7b028ac5c14d90173ea76ec9bfff5e819a18aaf6
[ "Zlib" ]
null
null
null
#include <stdint.h> #include <stdlib.h> /** * @file This file stops GCC and maybe Clang from * complaining about this stuff being undefined */ #if UINT32_MAX == UINTPTR_MAX #define STACK_GUARD 0xe09d013f #else #define STACK_GUARD 0xef0293fd02fe8a89 #endif uintptr_t __stack_chk_guard = STACK_GUARD; __attribute__((noreturn)) void __stack_chk_fail(void) { abort(); /* Totally die. */ }
17.863636
49
0.750636
7a212ccff38cc35bd824f88dce4bfd0ac287bd77
306
rb
Ruby
app/controllers/admin/flags_controller.rb
WGBH/transcript-editor
d224e19f94d0b9472e023ca183ef4c38088aef04
[ "MIT" ]
1
2018-11-24T02:41:23.000Z
2018-11-24T02:41:23.000Z
app/controllers/admin/flags_controller.rb
WGBH/transcript-editor
d224e19f94d0b9472e023ca183ef4c38088aef04
[ "MIT" ]
39
2018-01-05T15:42:30.000Z
2019-06-27T18:00:54.000Z
app/controllers/admin/flags_controller.rb
WGBH/transcript-editor
d224e19f94d0b9472e023ca183ef4c38088aef04
[ "MIT" ]
null
null
null
class Admin::FlagsController < ApplicationController include ActionController::MimeResponds before_action :authenticate_moderator! # GET /admin/flags.json # GET /moderator def index respond_to do |format| format.json { @flags = Flag.getUnresolved() } end end end
18
52
0.69281
e9f2e45cee62e062a4a8e7dc34952f752d3c3d17
806
rb
Ruby
specs/helper/authmatrix.rb
matthiasr/logformat
c5cbc6ea41a274464de311a4110e1763342330fa
[ "MIT" ]
1
2015-04-19T11:50:46.000Z
2015-04-19T11:50:46.000Z
specs/helper/authmatrix.rb
matthiasr/logformat
c5cbc6ea41a274464de311a4110e1763342330fa
[ "MIT" ]
null
null
null
specs/helper/authmatrix.rb
matthiasr/logformat
c5cbc6ea41a274464de311a4110e1763342330fa
[ "MIT" ]
null
null
null
require_relative '../../lib/models/user' require_relative '../../lib/models/channel' require_relative '../../lib/models/permission' include Logformat # Test access matrix # | u1 | u2 | anon # --|----|----|------ # c1| ? | N | ? # c2| Y | D | D # c3| Y | ? | D # # where ? = no rule, D = DEFAULT rule, Y = allowed, N = not allowed u1 = User.create(:name => 'user1', :password => 'pass1', :password_confirmation => 'pass1') u2 = User.create(:name => 'user2', :password => 'pass2', :password_confirmation => 'pass2') c1 = Channel.create(:name => '#channel1') c2 = Channel.create(:name => '#channel2') c3 = Channel.create(:name => '#channel3') c1.deny!(u2) c2.allow!(u1) Permission.create(:user => u2, :channel => c2, :rule => Permission::DEFAULT) c2.deny_anonymous! c3.allow!(u1) c3.deny_anonymous!
31
91
0.621588
3bb744ae5dfdd6be61f3f1127c4e70a283e638fd
46,301
sql
SQL
database/rentalmobil.sql
muhamadanjar/RentalMobilWeb
da0e03a98891e88f097598c7300c737bba7df4e0
[ "MIT" ]
null
null
null
database/rentalmobil.sql
muhamadanjar/RentalMobilWeb
da0e03a98891e88f097598c7300c737bba7df4e0
[ "MIT" ]
null
null
null
database/rentalmobil.sql
muhamadanjar/RentalMobilWeb
da0e03a98891e88f097598c7300c737bba7df4e0
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Apr 08, 2018 at 04:35 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `rentalmobil` -- -- -------------------------------------------------------- -- -- Table structure for table `cache` -- CREATE TABLE `cache` ( `key` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `value` text COLLATE utf8_unicode_ci NOT NULL, `expiration` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE `categories` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `comments` -- CREATE TABLE `comments` ( `id` int(10) UNSIGNED NOT NULL, `author_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `post_id` int(10) UNSIGNED NOT NULL, `content` text COLLATE utf8_unicode_ci NOT NULL, `approved` tinyint(1) NOT NULL DEFAULT '0', `posted_at` datetime NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `customers` -- CREATE TABLE `customers` ( `id` bigint(20) UNSIGNED NOT NULL, `sex` enum('Laki-laki','Perempuan') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Laki-laki', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `telp` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `religion` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `tgl_lahir` date NOT NULL, `address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `city_id` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `job` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `nationality` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `education` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `customers` -- INSERT INTO `customers` (`id`, `sex`, `name`, `email`, `telp`, `religion`, `tgl_lahir`, `address`, `city_id`, `job`, `nationality`, `education`, `status`, `user_id`, `created_at`, `updated_at`) VALUES (1, 'Laki-laki', 'Customer 5', 'customer5@gmail.com', '000', 'Islam', '2018-04-05', '-', NULL, '-', 'Indonesia', 'SMP', 1, 10, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` int(10) UNSIGNED NOT NULL, `connection` text COLLATE utf8_unicode_ci NOT NULL, `queue` text COLLATE utf8_unicode_ci NOT NULL, `payload` longtext COLLATE utf8_unicode_ci NOT NULL, `exception` longtext COLLATE utf8_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `fasilitas` -- CREATE TABLE `fasilitas` ( `id` int(10) UNSIGNED NOT NULL, `nama` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `fbstatus` -- CREATE TABLE `fbstatus` ( `status_id` int(11) NOT NULL, `s_text` text, `t_status` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `fbstatus` -- INSERT INTO `fbstatus` (`status_id`, `s_text`, `t_status`) VALUES (1, 'dfdfdf', '2018-04-08 05:28:10'), (2, 'apa adanya', '2018-04-08 06:05:30'); -- -------------------------------------------------------- -- -- Table structure for table `hubungi` -- CREATE TABLE `hubungi` ( `id` int(10) UNSIGNED NOT NULL, `nama` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `email` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `pesan` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `posted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `dibaca` enum('1','0') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `jobs` -- CREATE TABLE `jobs` ( `id` bigint(20) UNSIGNED NOT NULL, `queue` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `payload` longtext COLLATE utf8_unicode_ci NOT NULL, `attempts` tinyint(3) UNSIGNED NOT NULL, `reserved_at` int(10) UNSIGNED DEFAULT NULL, `available_at` int(10) UNSIGNED NOT NULL, `created_at` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `log_activities` -- CREATE TABLE `log_activities` ( `id` bigint(20) UNSIGNED NOT NULL, `parent_id` bigint(20) UNSIGNED DEFAULT NULL, `subject_id` bigint(20) UNSIGNED DEFAULT NULL, `subject_type` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `predicate` varchar(190) COLLATE utf8_unicode_ci DEFAULT NULL, `object_id` bigint(20) UNSIGNED DEFAULT NULL, `object_type` varchar(190) COLLATE utf8_unicode_ci DEFAULT NULL, `note` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `log_revisions` -- CREATE TABLE `log_revisions` ( `id` int(10) UNSIGNED NOT NULL, `revisionable_type` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `revisionable_id` int(11) NOT NULL, `user_id` int(11) DEFAULT NULL, `activity_id` int(11) DEFAULT NULL, `key` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `old_value` text COLLATE utf8_unicode_ci, `new_value` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `log_revisions` -- INSERT INTO `log_revisions` (`id`, `revisionable_type`, `revisionable_id`, `user_id`, `activity_id`, `key`, `old_value`, `new_value`, `created_at`, `updated_at`) VALUES (1, 'App\\Officer\\Officer', 1, 1, NULL, 'name', NULL, 'Muhamad Anjar P', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (2, 'App\\Officer\\Officer', 1, 1, NULL, 'nip', NULL, ' ', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (3, 'App\\Officer\\Officer', 1, 1, NULL, 'alamat', NULL, 'Caringin', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (4, 'App\\Officer\\Officer', 1, 1, NULL, 'no_telp', NULL, '0000', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (5, 'App\\Officer\\Officer', 1, 1, NULL, 'role', NULL, 'staff/karyawan', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (6, 'App\\Officer\\Officer', 1, 1, NULL, 'name', NULL, 'Muhamad Anjar P', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (7, 'App\\Officer\\Officer', 1, 1, NULL, 'nip', NULL, ' ', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (8, 'App\\Officer\\Officer', 1, 1, NULL, 'alamat', NULL, 'Caringin', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (9, 'App\\Officer\\Officer', 1, 1, NULL, 'no_telp', NULL, '0000', '2018-03-29 16:50:45', '2018-03-29 16:50:45'), (10, 'App\\Officer\\Officer', 1, 1, NULL, 'role', NULL, 'staff/karyawan', '2018-03-29 16:50:45', '2018-03-29 16:50:45'); -- -------------------------------------------------------- -- -- Table structure for table `log_sewa_status` -- CREATE TABLE `log_sewa_status` ( `id` bigint(20) UNSIGNED NOT NULL, `sewa_id` bigint(20) NOT NULL, `waktu` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `status` varchar(1) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `log_sewa_status` -- INSERT INTO `log_sewa_status` (`id`, `sewa_id`, `waktu`, `status`, `created_at`, `updated_at`) VALUES (1, 11, '2018-04-05 15:36:56', '0', NULL, NULL), (2, 11, '2018-04-05 15:37:04', '9', NULL, NULL), (3, 11, '2018-04-05 15:44:48', '2', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `lookups` -- CREATE TABLE `lookups` ( `id` int(10) UNSIGNED NOT NULL, `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `lookups` -- INSERT INTO `lookups` (`id`, `type`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'jabatan', 'Operator', NULL, NULL, NULL), (2, 'jabatan', 'Pengemudi / Driver', NULL, NULL, NULL), (11, 'type_sewa', 'Rental', NULL, NULL, NULL), (12, 'type_sewa', 'Taxi', NULL, NULL, NULL), (21, 'status_sewa', 'pending', NULL, NULL, NULL), (22, 'status_sewa', 'cancelled', NULL, NULL, NULL), (23, 'status_sewa', 'confirmed', NULL, NULL, NULL), (24, 'status_sewa', 'collected', NULL, NULL, NULL), (25, 'status_sewa', 'complete', NULL, NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `merk` -- CREATE TABLE `merk` ( `id` bigint(20) UNSIGNED NOT NULL, `merk` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `merk` -- INSERT INTO `merk` (`id`, `merk`, `image`, `status`, `created_at`, `updated_at`) VALUES (1, 'Mitsubishi', NULL, 0, '2018-03-29 05:25:48', '2018-03-29 05:25:48'), (2, 'Toyota', NULL, 0, '2018-03-29 05:25:48', '2018-03-29 05:25:48'), (3, 'Daihatsu', NULL, 0, '2018-03-29 05:25:48', '2018-03-29 05:25:48'), (4, 'Suzuki', NULL, 0, '2018-03-29 05:25:48', '2018-03-29 05:25:48'); -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) UNSIGNED NOT NULL, `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `batch` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1, '2014_10_12_000000_create_users_table', 1), (2, '2014_10_12_100000_create_password_resets_table', 1), (3, '2017_10_20_040704_wilayah_provinsi', 1), (4, '2017_10_20_040723_wilayah_kabupaten', 1), (5, '2017_10_20_040735_wilayah_kecamatan', 1), (6, '2017_10_20_040752_wilayah_desa', 1), (7, '2017_10_20_075351_roles', 1), (8, '2017_10_20_075403_permission', 1), (9, '2017_10_20_075423_permission_role', 1), (10, '2017_10_20_075443_role_user', 1), (11, '2017_10_20_075752_post', 1), (12, '2017_10_20_075753_comments', 1), (13, '2017_10_20_075753_newsletter_subcriptions', 1), (14, '2017_10_20_081140_settings', 1), (15, '2017_10_20_082352_create_sessions_table', 1), (16, '2017_10_20_082434_create_jobs_table', 1), (17, '2017_10_20_082514_create_failed_jobs_table', 1), (18, '2017_10_20_082607_create_cache_table', 1), (19, '2017_10_20_082620_create_notifications_table', 1), (20, '2017_10_22_125029_officers', 1), (21, '2017_10_22_125048_lookups', 1), (22, '2017_10_22_125252_log_activity', 1), (23, '2017_10_22_125302_log_revisions', 1), (24, '2017_11_02_162438_category', 1), (25, '2017_11_02_162454_tags', 1), (26, '2017_11_04_224448_post_tag', 1), (27, '2017_11_21_142217_stasistik', 1), (28, '2017_11_21_143101_hubungi', 1), (29, '2017_11_24_221009_sekilasinfo', 1), (30, '2018_01_19_103759_userverifications', 1), (31, '2018_01_25_090027_mobil', 1), (32, '2018_01_25_090038_mobil_fasilitas', 1), (33, '2018_01_30_025244_sewa', 1), (34, '2018_03_19_151137_sewa_detail', 1), (35, '2018_03_19_164404_log_sewa_status', 1), (36, '2018_03_22_113150_type', 1), (37, '2018_03_22_114335_merk', 1), (38, '2018_03_22_130610_customer', 1); -- -------------------------------------------------------- -- -- Table structure for table `mobil` -- CREATE TABLE `mobil` ( `id` int(10) UNSIGNED NOT NULL, `no_plat` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `name` varchar(120) COLLATE utf8_unicode_ci NOT NULL, `merk` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `warna` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `harga` int(11) NOT NULL, `harga_perjam` int(11) NOT NULL, `tahun` int(4) NOT NULL, `foto` varchar(200) COLLATE utf8_unicode_ci NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `status` enum('tersedia','dipinjam') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'tersedia', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `mobil` -- INSERT INTO `mobil` (`id`, `no_plat`, `name`, `merk`, `type`, `warna`, `harga`, `harga_perjam`, `tahun`, `foto`, `user_id`, `status`, `created_at`, `updated_at`) VALUES (1, 'F 9080 GH', 'Alphard', 'Toyota', 'Cumperback', 'Hitam', 500000, 5000, 2016, 'http:/10.10.2.2:8000/images/car/alphard.jpg', 3, 'tersedia', NULL, NULL), (52, 'F 3774 HJ', 'Fortuner', 'Toyota', 'Luxury', 'Putih', 400000, 3400, 2015, 'http:/10.10.2.2:8000/images/car/fortuner.jpg', 3, 'tersedia', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `mobil_fasilitas` -- CREATE TABLE `mobil_fasilitas` ( `id` int(10) UNSIGNED NOT NULL, `mobil_id` int(10) UNSIGNED NOT NULL, `fasilitas_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_subscriptions` -- CREATE TABLE `newsletter_subscriptions` ( `id` int(10) UNSIGNED NOT NULL, `email` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `notifications` -- CREATE TABLE `notifications` ( `id` char(36) COLLATE utf8_unicode_ci NOT NULL, `type` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `notifiable_id` int(10) UNSIGNED NOT NULL, `notifiable_type` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `data` text COLLATE utf8_unicode_ci NOT NULL, `read_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `officers` -- CREATE TABLE `officers` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `nip` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `alamat` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `no_telp` bigint(20) UNSIGNED NOT NULL, `pangkat_id` int(10) UNSIGNED DEFAULT NULL, `jabatan_id` int(10) UNSIGNED DEFAULT NULL, `role` enum('staff/karyawan','customer') COLLATE utf8_unicode_ci NOT NULL, `deposit` bigint(20) NOT NULL, `user_id` int(11) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `officers` -- INSERT INTO `officers` (`id`, `name`, `nip`, `alamat`, `no_telp`, `pangkat_id`, `jabatan_id`, `role`, `deposit`, `user_id`, `created_at`, `updated_at`, `deleted_at`) VALUES (1, 'Muhamad Anjar P', ' ', 'Caringin', 87870427227, 0, 2, 'staff/karyawan', 0, 3, '2018-03-29 16:50:45', '2018-03-29 16:50:45', NULL); -- -------------------------------------------------------- -- -- Table structure for table `password_resets` -- CREATE TABLE `password_resets` ( `email` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `pengumumam` -- CREATE TABLE `pengumumam` ( `id` int(10) UNSIGNED NOT NULL, `info` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `aktif` tinyint(1) NOT NULL, `author_id` int(11) NOT NULL, `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `permissions` -- CREATE TABLE `permissions` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `permissions` -- INSERT INTO `permissions` (`id`, `name`, `created_at`, `updated_at`) VALUES (1, 'access.backend', NULL, NULL), (2, 'create.user', NULL, NULL), (3, 'edit.user', NULL, NULL), (4, 'delete.user', NULL, NULL), (5, 'create.article', NULL, NULL), (6, 'edit.article', NULL, NULL), (7, 'delete.article', NULL, NULL), (8, 'create.dokumen', NULL, NULL), (9, 'edit.dokumen', NULL, NULL), (10, 'delete.dokumen', NULL, NULL), (11, 'create.informasi', NULL, NULL), (12, 'edit.informasi', NULL, NULL), (13, 'delete.informasi', NULL, NULL), (14, 'create.mobil', NULL, NULL), (15, 'edit.mobil', NULL, NULL), (16, 'delete.mobil', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `permission_role` -- CREATE TABLE `permission_role` ( `permission_id` int(10) UNSIGNED NOT NULL, `role_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `permission_role` -- INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES (1, 1), (1, 2), (2, 1), (3, 1), (4, 1), (14, 1), (15, 1), (16, 1); -- -------------------------------------------------------- -- -- Table structure for table `posts` -- CREATE TABLE `posts` ( `id` int(10) UNSIGNED NOT NULL, `author_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `title` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `content` text COLLATE utf8_unicode_ci NOT NULL, `type_post` enum('post','page','kegiatan','lowongan') COLLATE utf8_unicode_ci NOT NULL, `status` enum('published','draft') COLLATE utf8_unicode_ci NOT NULL, `position` enum('main','manual') COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `image` varchar(190) COLLATE utf8_unicode_ci DEFAULT NULL, `category_id` int(10) UNSIGNED DEFAULT NULL, `dibaca` int(11) NOT NULL, `sticky` int(11) DEFAULT '0', `posted_at` datetime DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `post_tag` -- CREATE TABLE `post_tag` ( `id` int(10) UNSIGNED NOT NULL, `post_id` int(10) UNSIGNED NOT NULL, `tag_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `promo` -- CREATE TABLE `promo` ( `id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `description` varchar(255) NOT NULL, `tgl_mulai` datetime NOT NULL, `tgl_akhir` datetime NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE `roles` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`id`, `name`, `created_at`, `updated_at`) VALUES (1, 'superadmin', NULL, NULL), (2, 'admin', NULL, NULL), (3, 'driver', NULL, NULL), (4, 'customer', NULL, NULL); -- -------------------------------------------------------- -- -- Table structure for table `role_user` -- CREATE TABLE `role_user` ( `role_id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `role_user` -- INSERT INTO `role_user` (`role_id`, `user_id`) VALUES (1, 1), (2, 2), (3, 3), (4, 10); -- -------------------------------------------------------- -- -- Table structure for table `sessions` -- CREATE TABLE `sessions` ( `id` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `user_id` int(11) DEFAULT NULL, `ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL, `user_agent` text COLLATE utf8_unicode_ci, `payload` text COLLATE utf8_unicode_ci NOT NULL, `last_activity` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `sessions` -- INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES ('bf2d91S4vUAbuC3FOqHYxVts47XfoWH8RWuj7wdc', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36', 'YTo4OntzOjY6Il90b2tlbiI7czo0MDoiYzNLMm8xb01aQmhaNXRGb2xvMk0zbDVGTHVINTZNcWlUNnppbGFHSiI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoyMToiaHR0cDovL2xvY2FsaG9zdDo4MDAwIjt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzk6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9iYWNrZW5kL3RyYW5zYWtzaSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7czo4OiJsaW5rX3dlYiI7czo5OiJkYXNoYm9hcmQiO3M6NDoiYWtzaSI7czo0OiJlZGl0IjtzOjk6Il9zZjJfbWV0YSI7YTozOntzOjE6InUiO2k6MTUyMzE2MTUzMTtzOjE6ImMiO2k6MTUyMzE1NDQzNztzOjE6ImwiO3M6MToiMCI7fX0=', 1523161531), ('f4b3frjNS5MTAvqiur0v8qvpab8j1iiat1wts2Bq', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoiUWhHMmJ6YXhlSDVrOEc2alJTdVVRQVdpb0NqUEt1SjE4NnE0ZndWOSI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoyMToiaHR0cDovL2xvY2FsaG9zdDo4MDAwIjt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDU6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9iYWNrZW5kL2Rhc2hib2FyZC9pbmRleCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7czo4OiJsaW5rX3dlYiI7czo5OiJkYXNoYm9hcmQiO3M6OToiX3NmMl9tZXRhIjthOjM6e3M6MToidSI7aToxNTIzMTk3MjEwO3M6MToiYyI7aToxNTIzMTkxMjQ2O3M6MToibCI7czoxOiIwIjt9fQ==', 1523197210), ('YmfkScjuULBpVpy7FoWyOIxN0ZlbjwEy1NMDzhCY', 2, '127.0.0.1', 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36', 'YTo3OntzOjY6Il90b2tlbiI7czo0MDoiRGl1aXJhajZYSjl2MTM3akdRVDIwZWF2QkZLTEFzN2VQQnRWc1NWWSI7czozOiJ1cmwiO2E6MTp7czo4OiJpbnRlbmRlZCI7czoyMToiaHR0cDovL2xvY2FsaG9zdDo4MDAwIjt9czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6Mzk6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9iYWNrZW5kL3RyYW5zYWtzaSI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fXM6NTA6ImxvZ2luX3dlYl81OWJhMzZhZGRjMmIyZjk0MDE1ODBmMDE0YzdmNThlYTRlMzA5ODlkIjtpOjI7czo4OiJsaW5rX3dlYiI7czo5OiJkYXNoYm9hcmQiO3M6OToiX3NmMl9tZXRhIjthOjM6e3M6MToidSI7aToxNTIzMTk3OTc4O3M6MToiYyI7aToxNTIzMTk3OTQ2O3M6MToibCI7czoxOiIwIjt9fQ==', 1523197979); -- -------------------------------------------------------- -- -- Table structure for table `settings` -- CREATE TABLE `settings` ( `key` varchar(190) COLLATE utf8_unicode_ci NOT NULL, `value` text COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `sewa` -- CREATE TABLE `sewa` ( `id` int(11) NOT NULL, `customer_id` int(11) NOT NULL, `mobil_id` int(11) NOT NULL, `tgl_mulai` datetime DEFAULT NULL, `tgl_akhir` datetime DEFAULT NULL, `origin` varchar(255) NOT NULL, `origin_latitude` decimal(8,5) NOT NULL, `origin_longitude` decimal(8,5) NOT NULL, `destination` varchar(255) NOT NULL, `destination_latitude` decimal(8,5) NOT NULL, `destination_longitude` decimal(8,5) NOT NULL, `total_bayar` int(11) NOT NULL, `denda` int(11) NOT NULL, `status` varchar(255) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `delete_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `sewa` -- INSERT INTO `sewa` (`id`, `customer_id`, `mobil_id`, `tgl_mulai`, `tgl_akhir`, `origin`, `origin_latitude`, `origin_longitude`, `destination`, `destination_latitude`, `destination_longitude`, `total_bayar`, `denda`, `status`, `created_at`, `updated_at`, `delete_at`) VALUES (34, 10, 1, NULL, NULL, 'Bogor', '-6.55178', '106.62913', 'Pakuan', '-6.63130', '106.82226', 15547500, 0, 'complete', '2018-04-07 17:30:34', '2018-04-08 02:44:22', NULL); -- -------------------------------------------------------- -- -- Table structure for table `sewa_detail` -- CREATE TABLE `sewa_detail` ( `id` bigint(20) UNSIGNED NOT NULL, `sewa_id` bigint(20) NOT NULL, `sewa_type` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `statistik` -- CREATE TABLE `statistik` ( `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `tanggal` date NOT NULL, `hits` int(11) NOT NULL, `online` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `tags` -- CREATE TABLE `tags` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `slug` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `type` -- CREATE TABLE `type` ( `id` bigint(20) UNSIGNED NOT NULL, `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `image` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `type` -- INSERT INTO `type` (`id`, `type`, `image`, `status`, `created_at`, `updated_at`) VALUES (1, 'Coupe', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (2, 'Hatcback', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (3, 'Minivan', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (4, 'Sedan', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (5, 'Sports Car', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (6, 'Sport Vehicle', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'), (7, 'Station Wagon', NULL, 0, '2018-03-29 05:26:21', '2018-03-29 05:26:21'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(10) UNSIGNED NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `isactived` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `latestlogin` timestamp NULL DEFAULT NULL, `foto` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `uuid` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `isverified` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `username`, `email`, `password`, `isactived`, `latestlogin`, `foto`, `uuid`, `remember_token`, `created_at`, `updated_at`, `isverified`) VALUES (1, 'Super Admin', 'superadmin', 'superadmin@example.com', '$2y$10$/lqrqey2J2HGk8Kl88CR7.XN44QeZ0/uogxznENvow5DS5JL.L7vG', '1', NULL, NULL, NULL, 'rfqsZub1rOf2FuYkGJQw4HdW4qSL2bvrYEuuBsg3fB9R4wy1Bnd4k648btvE', '2018-03-29 05:21:42', '2018-04-05 04:47:30', 1), (2, 'Administrator', 'admin', 'admin@example.com', '$2y$10$aHmu28SCD7XM5T7CJ.WFlupteumZTgVnan8ajTjj.L.bZ.CiUXTUC', '1', NULL, NULL, NULL, 'wCARsiqDOKvm6m7DBFkgNLDY7woDqHFuBvXb5lCPqSGX9SX7Anit8jLswkPg', '2018-03-29 05:21:42', '2018-04-05 04:46:24', 1), (3, 'Muhamad Anjar P', 'muhamadanjar', 'muhamadanjar37@gmail.com', '$2y$10$387EOdztbyj13gMitZWIjeF9KqY/zX8UKzhk7XmSWvsDmp2dLPAmS', '1', NULL, NULL, NULL, 'ySoIoesfeJOHNg44hAzznfvoZoWloR0uyAwnrIYJuEAReNczNHMaEqrK0Yrl', '2018-03-29 16:50:45', '2018-04-05 04:49:08', 1), (10, 'Customer 5', 'customer5', 'customer5@gmail.com', '$2y$10$xso6Bbng34i2w1xzdDtjSO17vy7Fz0ERKHXTOOuw6kaji1nuwJPh2', '1', NULL, NULL, NULL, 'TyUBmdMkx7mht4hWda6eXWYhYdqMw8jD1tQK9atvhykuKqqtALKwjA4Qifcj', '2018-04-01 17:09:25', '2018-04-05 06:28:19', 1); -- -------------------------------------------------------- -- -- Table structure for table `user_location` -- CREATE TABLE `user_location` ( `id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `latitude` decimal(8,5) NOT NULL, `longitude` decimal(8,5) NOT NULL, `latest_update` datetime NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `user_verifications` -- CREATE TABLE `user_verifications` ( `id` int(10) UNSIGNED NOT NULL, `user_id` int(10) UNSIGNED NOT NULL, `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `wilayah_desa` -- CREATE TABLE `wilayah_desa` ( `kode_desa` bigint(20) NOT NULL, `nama_desa` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `kode_kec` bigint(20) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `wilayah_kabupaten` -- CREATE TABLE `wilayah_kabupaten` ( `kode_kab` bigint(20) NOT NULL, `nama_kabupaten` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `kode_prov` bigint(20) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `wilayah_kecamatan` -- CREATE TABLE `wilayah_kecamatan` ( `kode_kec` bigint(20) NOT NULL, `nama_kecamatan` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `kode_kab` bigint(20) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `wilayah_provinsi` -- CREATE TABLE `wilayah_provinsi` ( `kode_prov` bigint(20) NOT NULL, `nama_provinsi` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Indexes for dumped tables -- -- -- Indexes for table `cache` -- ALTER TABLE `cache` ADD UNIQUE KEY `cache_key_unique` (`key`); -- -- Indexes for table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `comments` -- ALTER TABLE `comments` ADD PRIMARY KEY (`id`), ADD KEY `comments_author_id_foreign` (`author_id`), ADD KEY `comments_post_id_foreign` (`post_id`); -- -- Indexes for table `customers` -- ALTER TABLE `customers` ADD PRIMARY KEY (`id`); -- -- Indexes for table `failed_jobs` -- ALTER TABLE `failed_jobs` ADD PRIMARY KEY (`id`); -- -- Indexes for table `fasilitas` -- ALTER TABLE `fasilitas` ADD PRIMARY KEY (`id`); -- -- Indexes for table `fbstatus` -- ALTER TABLE `fbstatus` ADD PRIMARY KEY (`status_id`); -- -- Indexes for table `hubungi` -- ALTER TABLE `hubungi` ADD PRIMARY KEY (`id`); -- -- Indexes for table `jobs` -- ALTER TABLE `jobs` ADD PRIMARY KEY (`id`), ADD KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`); -- -- Indexes for table `log_activities` -- ALTER TABLE `log_activities` ADD PRIMARY KEY (`id`), ADD KEY `log_activities_subject_id_subject_type_index` (`subject_id`,`subject_type`), ADD KEY `log_activities_predicate_index` (`predicate`), ADD KEY `log_activities_object_id_object_type_index` (`object_id`,`object_type`); -- -- Indexes for table `log_revisions` -- ALTER TABLE `log_revisions` ADD PRIMARY KEY (`id`), ADD KEY `log_revisions_revisionable_id_revisionable_type_index` (`revisionable_id`,`revisionable_type`); -- -- Indexes for table `log_sewa_status` -- ALTER TABLE `log_sewa_status` ADD PRIMARY KEY (`id`); -- -- Indexes for table `lookups` -- ALTER TABLE `lookups` ADD KEY `lookups_id_index` (`id`), ADD KEY `lookups_type_index` (`type`); -- -- Indexes for table `merk` -- ALTER TABLE `merk` ADD PRIMARY KEY (`id`); -- -- Indexes for table `migrations` -- ALTER TABLE `migrations` ADD PRIMARY KEY (`id`); -- -- Indexes for table `mobil` -- ALTER TABLE `mobil` ADD PRIMARY KEY (`id`), ADD KEY `mobil_user_id_foreign` (`user_id`); -- -- Indexes for table `mobil_fasilitas` -- ALTER TABLE `mobil_fasilitas` ADD PRIMARY KEY (`id`), ADD KEY `mobil_fasilitas_mobil_id_foreign` (`mobil_id`), ADD KEY `mobil_fasilitas_fasilitas_id_foreign` (`fasilitas_id`); -- -- Indexes for table `newsletter_subscriptions` -- ALTER TABLE `newsletter_subscriptions` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `newsletter_subscriptions_email_unique` (`email`); -- -- Indexes for table `notifications` -- ALTER TABLE `notifications` ADD PRIMARY KEY (`id`); -- -- Indexes for table `officers` -- ALTER TABLE `officers` ADD PRIMARY KEY (`id`); -- -- Indexes for table `password_resets` -- ALTER TABLE `password_resets` ADD KEY `password_resets_email_index` (`email`); -- -- Indexes for table `pengumumam` -- ALTER TABLE `pengumumam` ADD PRIMARY KEY (`id`); -- -- Indexes for table `permissions` -- ALTER TABLE `permissions` ADD PRIMARY KEY (`id`); -- -- Indexes for table `permission_role` -- ALTER TABLE `permission_role` ADD PRIMARY KEY (`permission_id`,`role_id`), ADD KEY `permission_role_role_id_foreign` (`role_id`); -- -- Indexes for table `posts` -- ALTER TABLE `posts` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `posts_slug_unique` (`slug`), ADD KEY `posts_author_id_foreign` (`author_id`); -- -- Indexes for table `post_tag` -- ALTER TABLE `post_tag` ADD PRIMARY KEY (`id`), ADD KEY `post_tag_post_id_foreign` (`post_id`), ADD KEY `post_tag_tag_id_foreign` (`tag_id`); -- -- Indexes for table `promo` -- ALTER TABLE `promo` ADD PRIMARY KEY (`id`); -- -- Indexes for table `roles` -- ALTER TABLE `roles` ADD PRIMARY KEY (`id`); -- -- Indexes for table `role_user` -- ALTER TABLE `role_user` ADD PRIMARY KEY (`role_id`,`user_id`), ADD KEY `role_user_user_id_foreign` (`user_id`); -- -- Indexes for table `sessions` -- ALTER TABLE `sessions` ADD UNIQUE KEY `sessions_id_unique` (`id`); -- -- Indexes for table `settings` -- ALTER TABLE `settings` ADD KEY `settings_key_index` (`key`); -- -- Indexes for table `sewa` -- ALTER TABLE `sewa` ADD PRIMARY KEY (`id`); -- -- Indexes for table `sewa_detail` -- ALTER TABLE `sewa_detail` ADD PRIMARY KEY (`id`); -- -- Indexes for table `statistik` -- ALTER TABLE `statistik` ADD PRIMARY KEY (`hits`); -- -- Indexes for table `tags` -- ALTER TABLE `tags` ADD PRIMARY KEY (`id`); -- -- Indexes for table `type` -- ALTER TABLE `type` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `users_email_unique` (`email`); -- -- Indexes for table `user_location` -- ALTER TABLE `user_location` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_verifications` -- ALTER TABLE `user_verifications` ADD PRIMARY KEY (`id`), ADD KEY `user_verifications_user_id_foreign` (`user_id`); -- -- Indexes for table `wilayah_desa` -- ALTER TABLE `wilayah_desa` ADD PRIMARY KEY (`kode_desa`), ADD UNIQUE KEY `wilayah_desa_kode_desa_unique` (`kode_desa`); -- -- Indexes for table `wilayah_kabupaten` -- ALTER TABLE `wilayah_kabupaten` ADD PRIMARY KEY (`kode_kab`), ADD UNIQUE KEY `wilayah_kabupaten_kode_kab_unique` (`kode_kab`); -- -- Indexes for table `wilayah_kecamatan` -- ALTER TABLE `wilayah_kecamatan` ADD PRIMARY KEY (`kode_kec`), ADD UNIQUE KEY `wilayah_kecamatan_kode_kec_unique` (`kode_kec`); -- -- Indexes for table `wilayah_provinsi` -- ALTER TABLE `wilayah_provinsi` ADD PRIMARY KEY (`kode_prov`), ADD UNIQUE KEY `wilayah_provinsi_kode_prov_unique` (`kode_prov`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `categories` -- ALTER TABLE `categories` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `comments` -- ALTER TABLE `comments` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `customers` -- ALTER TABLE `customers` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `failed_jobs` -- ALTER TABLE `failed_jobs` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `fasilitas` -- ALTER TABLE `fasilitas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `fbstatus` -- ALTER TABLE `fbstatus` MODIFY `status_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3; -- -- AUTO_INCREMENT for table `hubungi` -- ALTER TABLE `hubungi` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `jobs` -- ALTER TABLE `jobs` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `log_activities` -- ALTER TABLE `log_activities` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `log_revisions` -- ALTER TABLE `log_revisions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `log_sewa_status` -- ALTER TABLE `log_sewa_status` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `merk` -- ALTER TABLE `merk` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `migrations` -- ALTER TABLE `migrations` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39; -- -- AUTO_INCREMENT for table `mobil` -- ALTER TABLE `mobil` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=53; -- -- AUTO_INCREMENT for table `mobil_fasilitas` -- ALTER TABLE `mobil_fasilitas` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `newsletter_subscriptions` -- ALTER TABLE `newsletter_subscriptions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `officers` -- ALTER TABLE `officers` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `pengumumam` -- ALTER TABLE `pengumumam` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `permissions` -- ALTER TABLE `permissions` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; -- -- AUTO_INCREMENT for table `posts` -- ALTER TABLE `posts` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `post_tag` -- ALTER TABLE `post_tag` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `promo` -- ALTER TABLE `promo` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `roles` -- ALTER TABLE `roles` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `sewa` -- ALTER TABLE `sewa` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36; -- -- AUTO_INCREMENT for table `sewa_detail` -- ALTER TABLE `sewa_detail` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `statistik` -- ALTER TABLE `statistik` MODIFY `hits` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `tags` -- ALTER TABLE `tags` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `type` -- ALTER TABLE `type` MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- AUTO_INCREMENT for table `user_location` -- ALTER TABLE `user_location` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; -- -- AUTO_INCREMENT for table `user_verifications` -- ALTER TABLE `user_verifications` MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT; -- -- Constraints for dumped tables -- -- -- Constraints for table `comments` -- ALTER TABLE `comments` ADD CONSTRAINT `comments_author_id_foreign` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `comments_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE; -- -- Constraints for table `mobil` -- ALTER TABLE `mobil` ADD CONSTRAINT `mobil_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `mobil_fasilitas` -- ALTER TABLE `mobil_fasilitas` ADD CONSTRAINT `mobil_fasilitas_fasilitas_id_foreign` FOREIGN KEY (`fasilitas_id`) REFERENCES `fasilitas` (`id`), ADD CONSTRAINT `mobil_fasilitas_mobil_id_foreign` FOREIGN KEY (`mobil_id`) REFERENCES `mobil` (`id`); -- -- Constraints for table `permission_role` -- ALTER TABLE `permission_role` ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `posts` -- ALTER TABLE `posts` ADD CONSTRAINT `posts_author_id_foreign` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `post_tag` -- ALTER TABLE `post_tag` ADD CONSTRAINT `post_tag_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`), ADD CONSTRAINT `post_tag_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`); -- -- Constraints for table `role_user` -- ALTER TABLE `role_user` ADD CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `user_verifications` -- ALTER TABLE `user_verifications` ADD CONSTRAINT `user_verifications_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
31.931724
799
0.688214
75118dd190a9260b9291bf2929a596e27b9d1dd1
740
h
C
DiabetesCare/cfAppDelegate.h
flyingfan76/DiabeteHealth
b3c86e7a5d3b088a3135fb43342013396989b7fd
[ "MIT" ]
null
null
null
DiabetesCare/cfAppDelegate.h
flyingfan76/DiabeteHealth
b3c86e7a5d3b088a3135fb43342013396989b7fd
[ "MIT" ]
null
null
null
DiabetesCare/cfAppDelegate.h
flyingfan76/DiabeteHealth
b3c86e7a5d3b088a3135fb43342013396989b7fd
[ "MIT" ]
null
null
null
// // cfAppDelegate.h // DiabetesCare // // Created by Chen, Fan on 7/8/14. // Copyright (c) 2014 HealthyCare. All rights reserved. // #import <UIKit/UIKit.h> #import "ProfileMasterData.h" @interface cfAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @property (nonatomic, retain, readonly) NSManagedObjectModel *managedObjectModel; @property (nonatomic, retain, readonly) NSManagedObjectContext *managedObjectContext; @property (nonatomic, retain, readonly) NSPersistentStoreCoordinator *persistentStoreCoordinator; @property (nonatomic, retain) ProfileMasterData *currentUser; - (void)saveContext; - (NSURL *)applicationDocumentsDirectory; - (void) refreshCurrentUser; @end
23.870968
97
0.775676
1806c47944fcbd37a7d3c2031e86312361dcdab3
328
asm
Assembly
oeis/122/A122249.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/122/A122249.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/122/A122249.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A122249: Numerators of Hankel transform of 1/(2n+1). ; Submitted by Christian Krause ; 1,4,256,65536,1073741824,70368744177664,73786976294838206464,309485009821345068724781056,332306998946228968225951765070086144,1427247692705959881058285969449495136382746624 seq $0,77071 ; Row sums of A077070. mov $1,2 pow $1,$0 mov $0,$1
36.444444
174
0.820122
ddef52b1750533df015513b731a061646d594283
6,681
h
C
source/engine/graphics/opengl/opengl_context.h
Coeurou/kairos_engine
b02eb302d7470d5f29b6ae342b2236dddaae91ea
[ "CC0-1.0" ]
null
null
null
source/engine/graphics/opengl/opengl_context.h
Coeurou/kairos_engine
b02eb302d7470d5f29b6ae342b2236dddaae91ea
[ "CC0-1.0" ]
null
null
null
source/engine/graphics/opengl/opengl_context.h
Coeurou/kairos_engine
b02eb302d7470d5f29b6ae342b2236dddaae91ea
[ "CC0-1.0" ]
null
null
null
#pragma once #include <glad/glad.h> #include <core/types.h> namespace kairos { enum class gl_attribute { red_size, green_size, blue_size, alpha_size, framebuffer_size, double_buffering, depth_size, stencil_size, accum_red_size, accum_green_size, accum_blue_size, accum_alpha_size, stereo, multisample_buffers, aa_samples, hardware_acc, major_version, minor_version, context_profile, count }; class opengl_context { friend bool setup(opengl_context& gl_context, uint32 window_id); friend void swap_buffers(opengl_context& gl_context); friend int version(const opengl_context& gl_context); friend int get_attribute(const opengl_context& gl_context, gl_attribute attr); friend void set_attribute(opengl_context& gl_context, gl_attribute attr, int value); friend void destroy(opengl_context& gl_context); template <class T> using disable_copy = std::enable_if_t<!std::is_same_v<std::decay_t<T>, opengl_context>>*; public: /** Member functions */ opengl_context() = default; /** Construct an opengl_context. * This constructor accept any type where sizeof(T) < small_type_size, and implements the * interface with free functions. */ template <class T> explicit opengl_context(T&& w, disable_copy<T> = nullptr) { static_assert(sizeof(T) <= small_type_size, "opengl context implementation must have a size below small_type_size"); new (my_memory.data()) opengl_context_impl<T>(std::forward<T>(w)); } /** Copy constructor. Copy concrete opengl_context_t type. Invoke copy method. */ opengl_context(const opengl_context& gl); /** Copy assignement operator. Copy concrete opengl_context_t type. Invoke copy method. */ opengl_context& operator=(const opengl_context& gl); /** Move constructor. Move concrete opengl_context_t type. Invoke move method. */ opengl_context(opengl_context&& gl) noexcept; /** Move assignement operator. Move concrete opengl_context_t type. Invoke move method. */ opengl_context& operator=(opengl_context&& gl) noexcept; /** Destructor. Call destroy method on concrete opengl_context_t type. Set memory to \0. */ ~opengl_context(); enum class opengl_profile : uint8 { core, compat, es }; private: struct opengl_context_t { virtual ~opengl_context_t() {} /** Copy opengl_context_t with placement new. */ virtual void copy(void* memory) const = 0; /** Move opengl_context_t with placement new. */ virtual void move(void* memory) noexcept = 0; /** Call destructor of derived class. */ virtual void destruct() = 0; virtual bool setup_context(uint32 window_id) = 0; virtual void swap_gl_buffers() = 0; virtual int gl_version() const = 0; virtual int get_gl_attribute(gl_attribute attr) const = 0; virtual void set_gl_attribute(gl_attribute attr, int value) = 0; virtual void destroy_context() = 0; }; /** opengl_context_impl implements the context interface, by forwarding calls to type-erased * concrete type. */ template <class T> struct opengl_context_impl final : public opengl_context_t { /** Constructor. Forward arguments to T::Constructor. */ template <class... Args> explicit opengl_context_impl(Args&&... args) : gl_context(std::forward<Args>(args)...) { static_assert(!std::is_same_v<std::decay_t<T>, opengl_context_impl>, "Should use proper copy or move constructor"); } /** Copy T with placement new. Call T copy constructor. */ void copy(void* memory) const override { new (memory) opengl_context_impl<T>(gl_context); } /** Move T with placement new. Call T move constructor. */ void move(void* memory) noexcept { new (memory) opengl_context_impl<T>(std::move(gl_context)); } /** Call destructor. */ void destruct() override { this->~opengl_context_impl(); } bool setup_context(uint32 window_id) override { return setup(gl_context, window_id); } void swap_gl_buffers() override { swap_buffers(gl_context); } int gl_version() const override { return version(gl_context); } int get_gl_attribute(gl_attribute attr) const { return get_attribute(gl_context, attr); } void set_gl_attribute(gl_attribute attr, int value) override { set_attribute(gl_context, attr, value); } void destroy_context() override { destroy(gl_context); } /** Type instance where the logic of an opengl context is implemented */ T gl_context; }; static constexpr size_t small_type_size = 24; /** my_memory is a used for placement new the opengl_context_t concrete type. */ std::array<char, small_type_size> my_memory{'\0'}; opengl_context_t* get(); const opengl_context_t* get() const; }; /** Non-member functions */ bool setup(opengl_context& gl_context, uint32 window_id); void swap_buffers(opengl_context& gl_context); int version(const opengl_context& gl_context); int get_attribute(const opengl_context& gl_context, gl_attribute attr); void set_attribute(opengl_context& gl_context, gl_attribute attr, int value); void destroy(opengl_context& gl_context); /** Utils */ namespace { static const dictionary<int, string> gl_error_to_string = { {GL_NO_ERROR, "No error."}, {GL_INVALID_ENUM, "an enumeration parameter is not a legal enumeration for that function."}, {GL_INVALID_VALUE, "a value parameter is not a legal value."}, {GL_INVALID_OPERATION, "the set of state for a command is not legal for the parameters given to that command."}, {GL_OUT_OF_MEMORY, "an operation had allocated memory, and the memory cannot be allocated. The " "results of OpenGL functions that return this error are undefined."}, {GL_INVALID_FRAMEBUFFER_OPERATION, "attempt to read from or write/render to a framebuffer that is not complete."}, /*{GL_STACK_OVERFLOW, "a stack pushing operation cannot be done because it would overflow the limit of that stack's size."}, {GL_STACK_UNDERFLOW, "a stack popping operation cannot be done because the stack is already at its lowest point."}, {GL_CONTEXT_LOST, "the OpenGL context has been lost, due to a graphics card reset."},*/ }; } void check_gl_error(const char* caller); } // namespace kairos
40.98773
101
0.675647
c0feee61e5057dca597571e419862dff7e110acd
1,817
asm
Assembly
week_7/dataset/Assembly/056599.asm
Dumebi35/DumebiCSC102
56985f4852bc01c94dce2ee368c9612ad368f619
[ "MIT" ]
null
null
null
week_7/dataset/Assembly/056599.asm
Dumebi35/DumebiCSC102
56985f4852bc01c94dce2ee368c9612ad368f619
[ "MIT" ]
null
null
null
week_7/dataset/Assembly/056599.asm
Dumebi35/DumebiCSC102
56985f4852bc01c94dce2ee368c9612ad368f619
[ "MIT" ]
null
null
null
;convert hex 8-bit number to binary and display on screen (CONVERT.ASM) .model small .stack 100h .data msg1 db "Enter first hex character: $" msg2 db 10,13,"Enter second hex character: $" msg3 db 10,13,"The binary equivalent is: $" .code main proc mov ax,@data mov ds,ax mov dx,offset msg1 mov ah,9h int 21h ;display msg1 mov ah,1 ;input first hex character, w/ echo int 21h ;places character in al mov dl,al ;place char in dl to convert call hexconv ;convert ASCII value to hex char mov bl,dl ;place char in bl mov cl,4 ;set up to shift left 4 times shl bl,cl ;shift lower 4 bits to higher 4 bits mov dx,offset msg2 mov ah,9h int 21h ;display msg2 mov ah,1 int 21h ;input 2nd hex char mov dl,al ;place char in dl to convert call hexconv ;convert ASCII value to hex char add bl,dl ;add into 1st char to form 1 byte mov dx,offset msg3 mov ah,9 int 21h ;display msg3 mov cx,8 ;set loop counter next: mov dl,0 ;initialize dl rcl bl,1 ;rotate CF left one position adc dl,30h ;yields ASCII 0 or 1 mov ah,2 ;set up int to display int 21h ;display 1 or 0 loop next ;get next bit mov ax,4c00h int 21h ;end main endp ;convert ASCII value to hex char hexconv proc cmp dl,39h jle upto_9 ;dl is ASCII 30h -39h cmp dl,46h ;ASCII 'F' jle continu ;upper case letters sub dl,20h ;else convert to upper case continu: cmp dl,41h je A1 cmp dl,42h je B1 cmp dl,43h je C1 cmp dl,44h je D1 cmp dl,45h je E1 mov dl,0Fh jmp done upto_9: sub dl,30h jmp done A1: mov dl,0Ah jmp done B1: mov dl,0Bh jmp done C1: mov dl,0Ch jmp done D1: mov dl,0Dh jmp done E1: mov dl,0Eh done: ret hexconv endp end main 
23
72
0.644469
d5c2c30d767fdd54f991846e8ebcf1783220b0e3
1,161
c
C
basic_c_homework/10.13/src/myatoi.c
AugustusWillisWang/C-learning
bd1b29fe0ef3df120686e0db5a9962c49ae1a4a5
[ "MIT" ]
2
2017-11-25T12:57:07.000Z
2017-11-29T13:11:53.000Z
basic_c_homework/10.13/src/myatoi.c
AugustusWillisWang/C-learning
bd1b29fe0ef3df120686e0db5a9962c49ae1a4a5
[ "MIT" ]
null
null
null
basic_c_homework/10.13/src/myatoi.c
AugustusWillisWang/C-learning
bd1b29fe0ef3df120686e0db5a9962c49ae1a4a5
[ "MIT" ]
2
2017-11-25T12:57:18.000Z
2017-11-29T11:21:03.000Z
#include"lazy.h" int myatoi(char* str){ if(str==0){//空指针处理 puts("point at null."); return 0; } int p = 0; int sign = 1; int result = 0; //deal with sign. while(str[p]!=0&&(str[p]<'0'||str[p]>'9')){ if (str[p]=='-'){ sign = -sign; } else { fprintf(stderr, "Invaild number."); BP; return 0; } p++; } //deal with number. while (str[p] != '\0'){ if(str[p]<'0'||str[p]>'9'){ fprintf(stderr, "Invaild number."); BP; return 0; } result*=10; result += (str[p]-'0'); p++; } return result*sign; } //modify the string itself char* mytolower(char* str){ int p = 0; while (str[p++]!=0) if(str[p]>='a'&&str[p]<='z')str[p]+=(-'a'+'A'); return str; } int main(){ char a[] = "AaSsDd"; char b[] = "-233"; char c[] = "333"; CK(myatoi(b)); CK(myatoi(c)); mytolower(a); puts(a); }
20.732143
55
0.367786
9b925e726ffa95b2546922dfe4b4e9e5e05a13b1
148
js
JavaScript
todo-customElements.js
bahrus/todo
2726235ad236962dee7f7be2323d03c707047641
[ "MIT" ]
null
null
null
todo-customElements.js
bahrus/todo
2726235ad236962dee7f7be2323d03c707047641
[ "MIT" ]
null
null
null
todo-customElements.js
bahrus/todo
2726235ad236962dee7f7be2323d03c707047641
[ "MIT" ]
null
null
null
///<reference path='Scripts/typings/polymer/polymer.d.ts'/> ///<reference path='PolymerActions.ts'/> //# sourceMappingURL=todo-customElements.js.map
49.333333
59
0.756757
3b125da5dcb233d8541558676b4c577289a8fe40
158
h
C
linux/arch/blackfin/include/uapi/asm/byteorder.h
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
55
2019-12-20T03:25:14.000Z
2022-01-16T07:19:47.000Z
linux/arch/blackfin/include/uapi/asm/byteorder.h
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
5
2020-04-04T09:24:09.000Z
2020-04-19T12:33:55.000Z
linux/arch/blackfin/include/uapi/asm/byteorder.h
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
30
2018-05-02T08:43:27.000Z
2022-01-23T03:25:54.000Z
#ifndef _UAPI__BFIN_ASM_BYTEORDER_H #define _UAPI__BFIN_ASM_BYTEORDER_H #include <linux/byteorder/little_endian.h> #endif /* _UAPI__BFIN_ASM_BYTEORDER_H */
22.571429
42
0.841772
22b56d9446ea90bf465d75fbc2326f96d4fa5fc8
18,933
asm
Assembly
M4Driver.asm
adolfopa/TelnetRSX
03aa778fc9f4d9e8b02c6409d5552f7c23accc5f
[ "MIT" ]
null
null
null
M4Driver.asm
adolfopa/TelnetRSX
03aa778fc9f4d9e8b02c6409d5552f7c23accc5f
[ "MIT" ]
null
null
null
M4Driver.asm
adolfopa/TelnetRSX
03aa778fc9f4d9e8b02c6409d5552f7c23accc5f
[ "MIT" ]
null
null
null
; call GetM4ROMNumber ; OUT C=M4ROM-Number ; ; IX-Register ; call FF06_IX__Get_M4_Socket_Response_Address ; IN: C=ROM-Number OUT: HL=Socket response adress (ld hl,(0xFF06) ; get Socket response address) ; ; IY-Register ; call FF02_IY__Get_M4_Buffer_Response_Address; IN: C=ROM-Number OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address ; http://www.spinpoint.org/cpc/m4info.txt ; m4 commands used M4_C_NETSOCKET equ 0x4331 ; data[0] = domain, data[1] = type, data[2] = protocol. Return data[0] = socket number or 0xFF (error). Only TCP protocol for now. M4_C_NETCONNECT equ 0x4332 ; data[0] = socket, data[1..4] = ip, data[5-6] = port. Return data[0] = 0 (OK) or ERROR 0xFF. M4_C_NETCLOSE equ 0x4333 M4_C_NETSEND equ 0x4334 M4_C_NETRECV equ 0x4335 ;data[0] = socket, data[1..2] = receive size (don't flood buffer, max. 0x800). ; Return data[0] = 0. data[1..2] = actual received size. data[3...] = received data. Look at sockinfo for status. M4_C_NETHOSTIP equ 0x4336 ; data[0..] = hostname string\0. Return data[0] = 1 Lookup in progress. Any other = error. Look in M4rom sockinfo for IP and status ;Responses are read from rom by mapping M4 rom. ;At offset 0xFF00, there is a link table for things that may move as firmware gets updates: ;0xFF00 .dw #0x109 ; rom version ;0xFF02 .dw rom_response ; 0x800+some byte buffer for responses from commands ;0xFF04 .dw rom_config ; Internal config, that is only reset by power cycle. This buffer can be written with <1 byte size> .dw C_CONFIG <offset> <data> ;0xFF06 .dw sock_info ; socket structure for NETAPI, works like read only hardware registers ;0xFF08 .dw helper_functions ; useful functions, to have executed in rom. ;Socket info structure (ptr read from 0xFF06), there is a total of 4 sockets for use and "socket 0" reserved C_NETHOSTIP. User sockets are 1-4. offset: ;(socket*16)+0 status : current status 0=idle, 1=connect in progress, 2=send in progress, 3=remote closed connectoion, ; 4=wait incoming (accept), 5=dnslookup in progress, 240-255 = error code ;(socket*16)+1 lastcmd : last command updating sock status 0=none, 1=send, 2=dnslookup, 3=connect, 4=accept, 5=recv, 6=error handler ;(socket*16)+2 received: (2 bytes) - data received in internal buffer (ready to get with C_NETRECV) ;(socket*16)+4 ip_addr : (4 bytes) - ip addr of connected client in passive mode ;(socket*16)+8 port : (2 bytes) - port of the same.. ;(socket*16)+10 reserved: (6 bytes) - not used yet (alignment!). ; ------------------------------------------------------------------------------ ; http://www.spinpoint.org/cpc/m4info.txt M4_CMD_SOCKET ; 0x4331 ; Implemented v1.0.9. data[0] = domain, data[1] = type, data[2] = protocol. ; Return data[0] = socket number or 0xFF (error). Only TCP protocol for now. ; get a socket ;cmdsocket: db 5 ; dw C_NETSOCKET ; db 0x0,0x0,0x6 ; domain, type, protocol (TCP/IP) ld hl,ROM_cmdsocket call M4_sendcmd call GetM4ROMNumber ; OUT C=M4ROM-Number call FF02_IY__Get_M4_Buffer_Response_Address ; OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address inc hl inc hl inc hl call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) ;MAXAM ; A=1 cp 255 ;ret z ret FF02_IY__Get_M4_Buffer_Response_Address push af ld hl,#FF02 push bc call Read16BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: HL=Value ; ld hl,(0xFF02) ; get response buffer address pop bc pop af ret FF06_IX__Get_M4_Socket_Response_Address ; OUT: HL=Socket response adress (ld hl,(0xFF06) ; get Socket response address) push af ld hl,#FF06 push bc call Read16BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: HL=Value ; ld hl,(0xFF06) ; get Socket response address pop bc pop af ret ; store socket in predefined packets ; push af ; ld (csocket),a ; ld (clsocket),a ; ld (rsocket),a ; ld (sendsock),a ; pop af Clear_Z_Flag ret ROM_cmdsocket: db 5 dw M4_C_NETSOCKET db 0x0,0x0,0x6 ; domain, type, protocol (TCP/IP) ; ------------------------------------------------------------------------------ M4_CMD_CONNECT ; IN A=Socket, DE=Pointer to IP-Addr Z-Flag indicates Error ex de,hl call send_cmd_connect ; IN A=Socket, HL=Pointer to IP-Addr call GetM4ROMNumber ; OUT C=M4ROM-Number call FF02_IY__Get_M4_Buffer_Response_Address ; OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address inc hl inc hl inc hl call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) cp 255 ; ret z ; Clear_Z_Flag ret ; ------------------------------------------------------------------------------ ; M4_GET_SOCKET_STATE ; IN A= Socket, OUT (0 ==IDLE (OK), 1 == connect in progress, 2 == send in progress) DE=Data (from IX+2 / IX+3) ; Socket ; 0: #FE00 ; 1: #FE10 push ix push hl call GetM4ROMNumber ; OUT C=M4ROM-Number ;MAXAM ; A=1 (ok) call GetSocketPtr ; IN A=Socket,C=ROM-Number OUT IX=Ptr push ix inc ix inc ix ;MAXAM ; IX=#FE02 push ix pop hl ;fe12 call Read16BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: HL=Value ; ld hl,(0xFF02) ; get response buffer address ex de,hl pop hl ;MAXAM ; C=6 (ok) call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ,;ld a,(ix) pop hl pop ix ;MAXAM ret ; ------------------------------------------------------------------------------ ; GetSocketPtr ; GetSocketPtr ; IN A=Socket,C=ROM-Number OUT IX=Ptr ; multiply by 16 and add to socket status buffer push hl push de sla a sla a sla a sla a ; ld hl,(0xFF06) ; get sock info call FF06_IX__Get_M4_Socket_Response_Address ; IN: C=ROM-Number OUT: HL=Socket response adress (ld hl,(0xFF06) ; get Socket response address) ;Socket info structure (ptr read from 0xFF06), there is a total of 4 sockets for use and "socket 0" reserved C_NETHOSTIP. User sockets are 1-4. offset: ;(socket*16)+0 status : current status 0=idle, 1=connect in progress, 2=send in progress, 3=remote closed connectoion, ; 4=wait incoming (accept), 5=dnslookup in progress, 240-255 = error code ;(socket*16)+1 lastcmd : last command updating sock status 0=none, 1=send, 2=dnslookup, 3=connect, 4=accept, 5=recv, 6=error handler ;(socket*16)+2 received: (2 bytes) - data received in internal buffer (ready to get with C_NETRECV) ;(socket*16)+4 ip_addr : (4 bytes) - ip addr of connected client in passive mode ;(socket*16)+8 port : (2 bytes) - port of the same.. ;(socket*16)+10 reserved: (6 bytes) - not used yet (alignment!). ld e,a ld d,0 add hl,de ; sockinfo + (socket*4) push hl pop ix ; ix ptr to current socket status pop de pop hl ret ; ------------------------------------------------------------------------------ ; puffermem4rsx equ #bf00 GetM4ROMNumber ; OUT C=M4ROM-Number push de push hl push af ld hl,puffermem4rsx ld (hl),'S' inc hl ld (hl),'D'+#80 dec hl call KL_FIND_COMMAND ; OUT: HL=Adress, C=ROM-Number pop af pop hl pop de ret ;ld c,6 ;ret Read16BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: HL=Value ; ld hl,(0xFF02) ; get response buffer address push ix push de push bc call Read16BitFromROM_Main pop bc pop de pop ix ret Read16BitFromROM_Main ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;ld a,(hl) ; #7e ;inc hl ; #23 ;ld h,(hl) ; #66 ;ld l,a ; #6F ;ret ; #c9 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ld ix,#B918 push ix ld ix,puffermem4rsx ld (ix+00),#7e ;ld a,(hl) ; #7e ld (ix+01),#23 ;inc hl ; #23 ld (ix+02),#66 ;ld h,(hl) ; #66 ld (ix+03),#6f ;ld l,a ; #6F ld (ix+04),#c9 ;ret ; #c9 push ix jp #B90F ; HI KL ROM SELECT IN: C = ROM-Select-Byte OUT C = alte ROM-Selection B = alter ROM-Status Unverändert: DE,HL,IX,IY ; call #B90F ; HI KL ROM SELECT IN: C = ROM-Select-Byte OUT C = alte ROM-Selection B = alter ROM-Status Unverändert: DE,HL,IX,IY ; ld a,(hl) ; inc hl ; ld h,(hl) ; ld l,a ; jp #B918 ; HI KL ROM DESELECTION IN: C = alte ROM-Selection B = alter ROM-Status OUT: C = zuletzt angewähltes ROM Unverändert: AF,DE,HL,IX,IY Read32BitFromROM; IN: C=ROM-Number, HL=Adress OUT: HLDE=Value IX Destroyed push ix push bc call Read32BitFromROM_Main pop bc pop ix ret Read32BitFromROM_Main ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;ld e,(hl) ; #5e ;inc hl ; #23 ;ld d,(hl) ; #56 ;inc hl ; #23 ;ld a,(hl) ; #7e ;inc hl ; #23 ;ld h,(hl) ; #66 ;ld l,a ; #6F ;ret ; #c9 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ld ix,#B918 push ix ld ix,puffermem4rsx ld (ix+00),#5e ;ld e,(hl) ; #5e ld (ix+01),#23 ;inc hl ; #23 ld (ix+02),#56 ;ld d,(hl) ; #56 ld (ix+03),#23 ;inc hl ; #23 ld (ix+04),#7e ;ld a,(hl) ; #7e ld (ix+05),#23 ;inc hl ; #23 ld (ix+06),#66 ;ld h,(hl) ; #66 ld (ix+07),#6f ;ld l,a ; #6F ; ld (ix+08),#F7 ; MAXAM ld (ix+08),#c9 ;ret ; #c9 push ix jp #B90F ; HI KL ROM SELECT IN: C = ROM-Select-Byte OUT C = alte ROM-Selection B = alter ROM-Status Unverändert: DE,HL,IX,IY Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) push ix push de push bc call Read8BitFromROM_Main pop bc pop de pop ix ret Read8BitFromROM_Main ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;ld a,(hl) ; #7e ;ret ; #c9 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ld ix,#B918 push ix ld ix,puffermem4rsx ld (ix+0),#7e ;ld a,(hl) ; #7E ld (ix+1),#c9 ;ret ; #c9 push ix jp #B90F ; HI KL ROM SELECT IN: C = ROM-Select-Byte OUT C = alte ROM-Selection B = alter ROM-Status Unverändert: DE,HL,IX,IY ; ld a,(hl) ; #7e ; ret ; #c9 ; call #B90F ; HI KL ROM SELECT IN: C = ROM-Select-Byte OUT C = alte ROM-Selection B = alter ROM-Status Unverändert: DE,HL,IX,IY ; ld a,(hl) ; jp #B918 ; HI KL ROM DESELECTION IN: C = alte ROM-Selection B = alter ROM-Status OUT: C = zuletzt angewähltes ROM Unverändert: AF,DE,HL,IX,IY ; ------------------------------------------------------------------------------ ; ; Send command to M4 ; HL = packet to send ; M4_sendcmd: ld bc,0xFE00 ld d,(hl) inc d M4_sendcmd_sendloop: inc b outi dec d jr nz,M4_sendcmd_sendloop ld bc,0xFC00 out (c),c ret send_cmd_connect: ; IN A=Socket, HL=Pointer to IP-Addr push af ld bc,0xFE00 ; ld bc,0xFF00 ld a,#9 ; Länge von C_NETCONNECT out (C),a ld a,M4_C_NETCONNECT ; Bit 0-8 out (C),a ld a,M4_C_NETCONNECT>>8 ; Bit 9-16 out (C),a pop af ; Socket (0-4) ;MAXAM out (C),a ; send_ip_backwards ; IP 4 Bytes ;ld a,(hl) ;MAXAM inc b outi ;Reads from (HL) and writes to the (C) port. HL is then incremented, and B is decremented. inc b ;ld a,(hl) ;MAXAM outi ;Reads from (HL) and writes to the (C) port. HL is then incremented, and B is decremented. inc b outi ;Reads from (HL) and writes to the (C) port. HL is then incremented, and B is decremented. inc b outi ;Reads from (HL) and writes to the (C) port. HL is then incremented, and B is decremented. inc b ld bc,0xFE00 ;port: dw 23 ; port ld a,23 ; Port 23 out (C),a ld a,0 ; Port 23 out (C),a ld bc,0xFC00 out (c),c ret ; ------------------------------------------------------------------------------ ; DE-Reg: data[0..] = hostname string\0. Return data[0] = 1 Lookup in progress. Any other = error. Look in M4rom sockinfo for IP and status ; DE = Stringadress ; IN IX=Adress of IP-Adress, BC=Adress of the Host-String OUT=Filled (BC) with IP-Adress ; OUT A=0 => All OK M4_CMD_NET_LOOKUP_IP: push de push ix pop hl call M4_CMD_NET_LOOKUP_IP_send ; IN HL=Adress of Name to lookup ; Analyse call GetM4ROMNumber ; OUT C=M4ROM-Number call FF02_IY__Get_M4_Buffer_Response_Address ; OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address inc hl inc hl inc hl call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) cp 1 jr z,M4_CMD_NET_LOOKUP_IP_wait pop de ld a,1 ret M4_CMD_NET_LOOKUP_IP_wait call FF06_IX__Get_M4_Socket_Response_Address ; OUT: HL=Socket response adress (ld hl,(0xFF06) ; get Socket response address) M4_CMD_NET_LOOKUP_IP_wait_lookup call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(ix+0) cp 5 ; ip lookup in progress jr z,M4_CMD_NET_LOOKUP_IP_wait_lookup push af ; call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(ix+0) inc hl inc hl inc hl inc hl ; HL points now to the IP-Adress ;MAXAM call Read32BitFromROM; IN: C=ROM-Number, HL=Adress OUT: HLDE=Value IX Destroyed pop af pop ix ; Destination of IP-Adress-Memory ;MAXAM ld (ix+0),e ld (ix+1),d ld (ix+2),l ld (ix+3),h ret M4_CMD_NET_LOOKUP_IP_send: ; IN HL=Adress of Name to lookup ; Send Data to M4 ld bc,0xFE00 ld a,16 ; Länge von String out (C),a ld a,M4_C_NETHOSTIP ; Bit 0-8 out (C),a ld a,M4_C_NETHOSTIP>>8 ; Bit 9-16 out (C),a ld d,14 M4_CMD_NET_LOOKUP_IP_sendloop_NEU: ld a,(hl) inc hl out (c),a dec d jr nz,M4_CMD_NET_LOOKUP_IP_sendloop_NEU ld bc,0xFC00 out (c),c ret ld d,16 inc d M4_CMD_NET_LOOKUP_IP_sendloop inc b outi dec d jr nz,M4_CMD_NET_LOOKUP_IP_sendloop ld bc,0xFC00 out (c),c ret ; Original Code: ; ld hl,(0xFF02) ; get response buffer address ; push hl ; pop iy ; ; ld hl,(0xFF06) ; get sock info ; push hl ; pop ix ; ix ptr to current socket status ; ; ; ld hl,cmdlookup ; call sendcmd ; ld a,(iy+3) ; cp 1 ; jr z,wait_lookup ; ld a,1 ; ret ; ;wait_lookup: ; ld a,(ix+0) ; cp 5 ; ip lookup in progress ; jr z, wait_lookup ; ret ;cmdlookup: db 16 ; dw C_NETHOSTIP ;lookup_name: ds 128 ; ------------------------------------------------------------------------------ ;C_NETRECV 0x4335 Implemented v1.0.9. data[0] = socket, data[1..2] = receive size (don't flood buffer, max. 0x800). ; Return data[0] = 0. data[1..2] = actual received size. data[3...] = received data. Look at sockinfo for status. ; IN A= Socket, DE=Size IX=Pointer to Data OUT A=Buffer State, BC=Size, Filled (DE)-Memory M4_CMD_NET_RECEIVE_DATA: ; Send Data to M4 push de push af ;MAXAM ld bc,0xFE00 ld a,5 out (C),a ld a,M4_C_NETRECV ; Bit 0-8 out (C),a ld a,M4_C_NETRECV>>8 ; Bit 9-16 out (C),a pop af out (C),a ; Socket pop de ; Size out (c),e out (c),d ld bc,0xFC00 out (c),c ; Auswertungsphase call GetM4ROMNumber ; OUT C=M4ROM-Number ; IY-Register call FF02_IY__Get_M4_Buffer_Response_Address; IN: C=ROM-Number OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address inc hl inc hl inc hl inc hl push hl ;MAXAM ; HL ist richtig? ; Lese die empfangene Laenge (#E801) ; ld bc,(iy+4) ; +4 +5 call Read16BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: HL=Value ; ld a,(ix+0) ;MAXAM ; HL ist falsch push hl pop de ; Länge in DE pop hl inc hl inc hl ; #E806 push de M4_CMD_NET_RECEIVE_DATA___TRANSFER_DATA_LOOP ;ld a,(iy+6) Datenstart ;ld a,hl ich komme hier mit ix und iy durcheinander ;MAXAM ;nop call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) ; push af ; call SUB_Print_8BitHex ; pop af ;ld a,a ld (ix),a inc ix inc hl dec de ld a, d or e jr nz,M4_CMD_NET_RECEIVE_DATA___TRANSFER_DATA_LOOP ; ld a,(iy+3) ; C ist hier richtig (=ROM-Nr. M4) call FF02_IY__Get_M4_Buffer_Response_Address; IN: C=ROM-Number OUT HL=Adresse ld hl,(0xFF02) ; get response buffer address inc hl inc hl inc hl call Read8BitFromROM ; IN: C=ROM-Number, HL=Adress OUT: A=Value ; ld a,(hl) pop bc ;MAXAM ret ;cmdrecv: db 5 ; dw M4_C_NETRECV ; recv ;rsocket: db 0x0 ; socket ;rsize: dw 2048 ; size ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- M4_CMD_NET_SEND_CUSTOM_DATA: ld bc,&FE00 ld a,(ix+0) push af inc a inc a out (C),a ld a,M4_C_NETSEND ; Bit 0-8 out (C),a ld a,M4_C_NETSEND>>8 ; Bit 9-16 out (C),a inc ix pop de M4_CMD_NET_SEND_CUSTOM_DATA_LOOP: ld a,(ix) inc ix out (c),a dec d jr nz,M4_CMD_NET_SEND_CUSTOM_DATA_LOOP ld bc,0xFC00 out (c),c ret ; --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- M4_CMD_CLOSE_CONNECTION ; IN A= Socket ld bc,&FE00 ld e,3; Size out (c),e ld e,M4_C_NETCLOSE ; Bit 0-8 out (C),e ld e,M4_C_NETCLOSE>>8 ; Bit 9-16 out (C),e out (c),a ; Socket ld bc,0xFC00 out (c),c ret ; ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27.966027
180
0.540643
0e1d0d8cf425e0752efac0a395b3ba6b268e9917
392
ps1
PowerShell
Invoke-Docker-PSObject/Set-ScriptLevelVariables.ps1
DTW-DanWard/Invoke-Docker-PSObject
9da10615a20674e937f787f1eac1b1b68276649c
[ "MIT" ]
3
2019-10-08T14:15:15.000Z
2021-02-20T01:00:00.000Z
Invoke-Docker-PSObject/Set-ScriptLevelVariables.ps1
DTW-DanWard/Invoke-Docker-PSObject
9da10615a20674e937f787f1eac1b1b68276649c
[ "MIT" ]
1
2019-01-12T16:44:23.000Z
2019-01-12T17:31:18.000Z
Invoke-Docker-PSObject/Set-ScriptLevelVariables.ps1
DTW-DanWard/Invoke-Docker-PSObject
9da10615a20674e937f787f1eac1b1b68276649c
[ "MIT" ]
1
2020-03-27T13:41:51.000Z
2020-03-27T13:41:51.000Z
Set-StrictMode -Version Latest Write-Verbose "$($MyInvocation.MyCommand) :: Creating script-level variables" # script-level variables # web site url $script:ProjectUrl = 'https://github.com/DTW-DanWard/Invoke-Docker-PSObject' # define alias/function mappings $AliasesToExport = @{ id = 'Invoke-DockerPSObject' } Set-Variable OfficialAliasExports -Value $AliasesToExport -Scope Script
26.133333
77
0.772959
c7c05541e7fd1f9245a0f4d88d232b96db1c9534
15,430
py
Python
utils/explorer.py
urastogi885/a-star-turtlebot
2dc805c0111c51f7870bd2d65d56bd516e0c7177
[ "MIT" ]
14
2020-05-17T06:47:56.000Z
2022-03-01T11:34:44.000Z
utils/explorer.py
urastogi885/a-star-turtlebot
2dc805c0111c51f7870bd2d65d56bd516e0c7177
[ "MIT" ]
null
null
null
utils/explorer.py
urastogi885/a-star-turtlebot
2dc805c0111c51f7870bd2d65d56bd516e0c7177
[ "MIT" ]
4
2020-04-16T00:24:55.000Z
2022-02-15T08:03:06.000Z
# Import necessary standard libraries import cv2 import numpy as np from math import sqrt from queue import PriorityQueue # Import custom-built methods from utils import constants from utils.node import Node def check_node_validity(check_img, x, y): """ Method to check whether point lies within any obstacle :param check_img: 2-d array with information of the map :param x: x-coordinate of the current node :param y: y-coordinate of the current node :return: false if point lies within any obstacle """ # Check condition for out of bounds if x <= 0 or x >= constants.map_size[1] or y <= 0 or y >= constants.map_size[0]: return False # Check condition to verify if point lies within obstacle elif check_img[y, x].all() == 0: return False return True def get_euclidean_distance(first_node, second_node): """ Get euclidean distance between two points :param first_node: a tuple containing coordinates of first point :param second_node: a tuple containing coordinates of second point :return: euclidean distance between two points """ return sqrt((second_node[0] - first_node[0]) ** 2 + (second_node[1] - first_node[1]) ** 2) def get_base_cost(parent_node, child_node): """ Get base cost of child node :param parent_node: a tuple of parent node coordinates and orientation :param child_node: a tuple of child node coordinates and orientation :return: parent cost + euclidean distance between parent node and child node """ # Self-data contains coordinates of the parent node as a tuple return parent_node.base_weight + get_euclidean_distance(parent_node.get_data(), child_node) class Explorer: def __init__(self, start_node, goal_node, robot_rpm, map_img, animation): """ Initialize the explorer with a start node and final goal node :param start_node: a list of start coordinates and orientation provided by the user :param goal_node: a list of goal coordinates and orientation provided by the user :param robot_rpm: a tuple of 2 RPMs for 2 wheels :param map_img: a tuple of 2-d arrays with information of the map """ # Store start and goal nodes self.start_node = Node(start_node, None, 0, 0, None) self.goal_node = goal_node # Store animation self.animation = animation # Store RPMs of robot self.robot_rpm = robot_rpm # Original map self.map_img = map_img[0] # Extended map due to robot radius and clearance self.check_img = map_img[1] # Store angular step size and translation step size self.step_theta = constants.angular_step # Store map dimensions self.map_size = constants.map_size[0], constants.map_size[1], (constants.total_angle // self.step_theta) # Define an empty list to store all generated nodes and path nodes self.closed_nodes = [] self.path_nodes = [] # Define 3-D arrays to store information about generated nodes and parent nodes self.parent = np.full(fill_value=constants.no_parent, shape=self.map_size) # Define video-writer of open-cv to record the exploration and final path video_format = cv2.VideoWriter_fourcc('X', 'V', 'I', 'D') self.video_output = cv2.VideoWriter('video_output.avi', video_format, 200.0, (self.map_size[1], self.map_size[0])) def get_heuristic_score(self, node): """ Implement heuristic function for a-star by calculating euclidean distance Heuristic is nothing but cost to goal :param: node: tuple containing coordinates and orientation of the current node :return: distance between the goal node and current node """ # Evaluate euclidean distance between goal node and current node and return it return get_euclidean_distance(self.goal_node, node) def get_final_weight(self, node, base_cost): """ Get final weight for a-star :param node: tuple containing coordinates and orientation of the current node :param base_cost: base cost of the current node :return: final weight for according to method """ # Add cost-to-goal and cost-to-come to get final cost and return it return self.get_heuristic_score(node) + base_cost def get_orientation_index(self, theta): """ Convert theta from radians to a grid world index based on pre-defined angular step :param theta: orientation of the robot in radians :return: index of orientation based on angular step """ # Limit orientation between 0 to 360 if theta >= 2 * np.pi: n = int(theta / (2 * np.pi)) theta = theta - n * 2 * np.pi elif theta < 0: # Convert negative angle into positive and maintain the orientation between 0 to 360 theta = abs(theta) if theta > 2 * np.pi: n = int(theta / (2 * np.pi)) theta = theta - n * 2 * np.pi # Get orientation in degrees theta = theta + (180 * theta / np.pi) # Limit orientation between 0 to 360 if theta > constants.total_angle: theta = theta - constants.total_angle # Return index by dividing orientation in degrees by angular step return int(theta / self.step_theta) def action_space(self, action): """ Define action space :param action: Varies from 0-7 to call one of the 8 defined actions :return: a tuple of left and right wheel RPM respectively """ if action == 0: return 0, self.robot_rpm[0] elif action == 1: return 0, self.robot_rpm[1] elif action == 2: return self.robot_rpm[0], 0 elif action == 3: return self.robot_rpm[1], 0 elif action == 4: return self.robot_rpm[0], self.robot_rpm[0] elif action == 5: return self.robot_rpm[1], self.robot_rpm[1] elif action == 6: return self.robot_rpm[0], self.robot_rpm[1] return self.robot_rpm[1], self.robot_rpm[0] def take_action(self, parent_node, action): """ Call various actions based on an integer and get new child coordinates and orientation Applying differential drive formulae to get coordinates and orientation :param parent_node: a tuple of parent node coordinates and orientation :param action: Varies from 0-n to call one of the 8 defined actions :return: child node """ # Get action to be performed on parent to generate child rpm = self.action_space(action) # Convert rpm into left and right wheel velocities respectively lw_velocity = rpm[0] * (2 * np.pi / 60) rw_velocity = rpm[1] * (2 * np.pi / 60) return self.get_child_node(parent_node, lw_velocity, rw_velocity) def explore(self): """ Method to explore the map to find the goal :return: nothing """ # Initialize priority queue node_queue = PriorityQueue() start_node = self.start_node.get_data() self.parent[int(start_node[0])][int(start_node[1])][int(start_node[2])] = constants.start_parent # Add start node to priority queue node_queue.put(self.start_node) # Start exploring while not node_queue.empty(): # Get node with minimum total cost current_node = node_queue.get() self.closed_nodes.append(current_node) # Add node to generated nodes array # Check for goal node if (self.get_heuristic_score(current_node.get_data()) <= constants.goal_thresh or current_node.get_data() == self.goal_node): self.path_nodes.append(current_node) break # Generate child nodes from current node for i in range(constants.max_actions): child_node = self.take_action(current_node, i) if child_node is not None: # Add child node to priority queue node_queue.put(child_node) def get_child_node(self, parent_node, l_vel, r_vel): """ Get child node based on wheel velocities Show exploration by generating intermediate nodes :param parent_node: node class object of parent :param l_vel: left-wheel velocity of robot :param r_vel: right-wheel velocity of robot :return: node class object of child """ # An empty list to store intermediate nodes inter_nodes = [] valid_path = True # Define grey grey = [200, 200, 200] # Get coordinates and orientation of parent node parent_node_data = parent_node.get_data() y, x = parent_node_data[0], parent_node_data[1] theta = np.pi * parent_node_data[2] * self.step_theta / 180 prev_y, prev_x, prev_theta = y, x, parent_node_data[2] # Get linear and angular velocities in m/s and rad/s respectively linear_x = 0.5 * constants.wheel_radius * (l_vel + r_vel) * np.cos(theta) / constants.scaling_factor linear_y = 0.5 * constants.wheel_radius * (l_vel + r_vel) * np.sin(theta) / constants.scaling_factor linear_vel = sqrt((linear_x ** 2) + (linear_y ** 2)) angular_vel = (constants.wheel_radius / constants.wheel_distance) * (r_vel - l_vel) t = 0 while t < constants.total_time: # Increment time t += constants.time_step # Get new coordinates and orientation using time step x += (0.5 * constants.wheel_radius * (l_vel + r_vel) * np.cos(theta) * constants.time_step * constants.time_scaling) y += (0.5 * constants.wheel_radius * (l_vel + r_vel) * np.sin(theta) * constants.time_step * constants.time_scaling) theta += ((constants.wheel_radius / constants.wheel_distance) * (r_vel - l_vel) * constants.time_step * constants.time_scaling) # Get index of current orientation in grid world to check for parent theta_index = self.get_orientation_index(theta) # Check for validity of intermediate node if (check_node_validity(self.check_img, int(x), self.map_size[0] - int(y)) and self.parent[int(y)][int(x)][theta_index] == constants.no_parent): # Add intermediate to its list inter_nodes.append(([prev_y, prev_x, prev_theta], [y, x, theta], [linear_vel, angular_vel])) # Update previous coordinates and orientation prev_x, prev_y, prev_theta = x, y, theta else: valid_path = False break # Discard entire path if any intermediate point lies within obstacle space if valid_path: last_node = None # Define base-cost of the child node base_cost = parent_node.get_base_weight() len_inter_nodes = len(inter_nodes) # Add exploration to video for i in range(len_inter_nodes): prev_node, current_node, _ = inter_nodes[i] # Update base-cost of the node base_cost += get_euclidean_distance(prev_node, current_node) # Get index of orientation of intermediate node prev_node[2] = self.get_orientation_index(prev_node[2]) current_node[2] = self.get_orientation_index(current_node[2]) # Update parent of the intermediate node self.parent[int(current_node[0])][int(current_node[1])][int(current_node[2])] = \ np.ravel_multi_index([int(prev_node[0]), int(prev_node[1]), int(prev_node[2])], dims=self.map_size) # Add nodes to exploration video if self.animation: cv2.arrowedLine(self.map_img, (int(prev_node[1]), self.map_size[0] - int(prev_node[0])), (int(current_node[1]), self.map_size[0] - int(current_node[0])), grey) self.video_output.write(self.map_img) # Make last node in the list as the child node and create is node class object if i == len_inter_nodes - 1: last_node = Node(current_node, parent_node_data, float('inf'), float('inf'), inter_nodes) last_node.set_base_weight(base_cost) last_node.set_weight(self.get_final_weight(current_node, last_node.base_weight)) return last_node return None def generate_path(self): """ Generate path using back-tracking :return: a list containing path nodes """ # Exit if exploration failed if not len(self.path_nodes): print('No path found') return False # Define colors red = [0, 0, 255] blue = [255, 0, 0] green = [0, 255, 0] # Open text file to write velocities vel_txt = open('output_files/commander.txt', 'w+') # Get first node nearest to the goal node to start backtracking last_node = self.path_nodes[0] print('Finding path...') # Iterate until we reach the initial node while last_node.get_data() != self.start_node.get_data(): for node in self.closed_nodes: if node.get_data() == last_node.get_parent(): self.path_nodes.append(node) last_node = node break print('Path found') # Iterate through path nodes for i in range(len(self.path_nodes) - 2, -1, -1): # Get intermediate nodes of each node in path-nodes' list current_sub_nodes = self.path_nodes[i].get_sub_nodes() # Iterate through intermediate nodes' list to display path to be taken by the robot for j in range(0, len(current_sub_nodes)): current_node_data = current_sub_nodes[j] vel_txt.write(str(current_node_data[2][0]) + ',' + str(current_node_data[2][1]) + '\n') if self.animation: cv2.line(self.map_img, (int(current_node_data[0][1]), self.map_size[0] - int(current_node_data[0][0])), (int(current_node_data[1][1]), self.map_size[0] - int(current_node_data[1][0])), blue) self.video_output.write(self.map_img) if self.animation: # Draw start and goal node to the video frame in the form of filled circle cv2.circle(self.map_img, (int(self.path_nodes[-1].data[1]), self.map_size[0] - int(self.path_nodes[-1].data[0])), int(constants.robot_radius), red, -1) cv2.circle(self.map_img, (int(self.path_nodes[0].data[1]), self.map_size[0] - int(self.path_nodes[0].data[0])), int(constants.robot_radius), green, -1) # Show path for longer time for _ in range(1000): self.video_output.write(self.map_img) return True
47.623457
119
0.61361
fe9dcae4eeb17b6f5b4fff5b0c68f7a8cf05e92d
7,908
swift
Swift
WeatherAPI/ViewController.swift
FahdSaif/OptusIntelli
5b092e712af8e216ef4e13d36eb2257be63a7bb2
[ "Unlicense", "MIT" ]
null
null
null
WeatherAPI/ViewController.swift
FahdSaif/OptusIntelli
5b092e712af8e216ef4e13d36eb2257be63a7bb2
[ "Unlicense", "MIT" ]
null
null
null
WeatherAPI/ViewController.swift
FahdSaif/OptusIntelli
5b092e712af8e216ef4e13d36eb2257be63a7bb2
[ "Unlicense", "MIT" ]
null
null
null
// // ViewController.swift // WeatherAPI // // Created by Fahd on 23/01/2017. // Copyright © 2017 Fahd. All rights reserved. // import UIKit import Alamofire import SystemConfiguration class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { //spinner var spinner = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge) var loadingView: UIView = UIView() //spinner @IBOutlet weak var MyTableref: UITableView! var dictcitytemp = [String: Double]() var mydictonary=[String:AnyObject]() var actorsarray=[String:AnyObject]() var mysweat:[Weathertype]=[] var globCityname="" var globcitycount:Int=0 //var arrayofobjects=[]() var temperature:Double=0.0 var city:String="" var netisworking:Bool=false override func viewDidLoad() { super.viewDidLoad() self.MyTableref.dataSource=self self.MyTableref.delegate=self //Fahd: Calling the function to get JSON Data from OpenweatherAPI netisworking=isInternetAvailable() if(netisworking){ self.singlehit() }else{ //No internet or WIFI available let alert=UIAlertController(title: "Please connect to the Network/Wifi", message: "No Data Available", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil)) self.present(alert, animated: true, completion: nil) } }//end of view did load func singlehit() { showActivityIndicator() //faHD: hITTING THE api Alamofire.request("http://api.openweathermap.org/data/2.5/group?id=4163971,2147714,2174003&APPID=34605ed001ce1c650df89137aebc58f8").responseJSON { response in self.hideActivityIndicator() if let JSON = response.result.value { //print("JSON: \(JSON)") let result=response.result if let dict=result.value as? Dictionary<String,AnyObject> { if let citycount=dict["cnt"] as? Int{ self.globcitycount=citycount print("singlehit self.globcitycount\(self.globcitycount)") }else{ self.globcitycount=0 } if let listvar=dict["list"] as? NSArray{ //print("singlehit all ok") //print(listvar[0]) for myiterator in 0..<listvar.count{ if let firstele=listvar[myiterator] as? Dictionary<String,AnyObject>{ if let mainfromfirstele=firstele["main"] { if let cityname=firstele["name"] as? String { self.globCityname=cityname print(cityname) } print("all super ok") let w=Weathertype(dict: (mainfromfirstele as? Dictionary<String,AnyObject>)!, cityname: self.globCityname,itemsequence:myiterator,iwasclicked:0) self.mysweat.append(w) //print(mainfromfirstele) } } } //self.MyTableref.reloadData() DispatchQueue.main.async { self.MyTableref.reloadData() } } } } } } //spinner start func showActivityIndicator() { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { // in half a second... self.loadingView = UIView() self.loadingView.frame = CGRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0) self.loadingView.center = self.view.center self.loadingView.backgroundColor = UIColor.brown self.loadingView.alpha = 0.7 self.loadingView.clipsToBounds = true self.loadingView.layer.cornerRadius = 10 self.spinner = UIActivityIndicatorView(activityIndicatorStyle: .whiteLarge) self.spinner.frame = CGRect(x: 0.0, y: 0.0, width: 80.0, height: 80.0) self.spinner.center = CGPoint(x:self.loadingView.bounds.size.width / 2, y:self.loadingView.bounds.size.height / 2) self.loadingView.addSubview(self.spinner) self.view.addSubview(self.loadingView) self.spinner.startAnimating() } } func hideActivityIndicator() { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { self.spinner.stopAnimating() self.loadingView.removeFromSuperview() } } //spinner end //check internet func isInternetAvailable() -> Bool { var zeroAddress = sockaddr_in() zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) zeroAddress.sin_family = sa_family_t(AF_INET) let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) { $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {zeroSockAddress in SCNetworkReachabilityCreateWithAddress(nil, zeroSockAddress) } } var flags = SCNetworkReachabilityFlags() if !SCNetworkReachabilityGetFlags(defaultRouteReachability!, &flags) { return false } let isReachable = (flags.rawValue & UInt32(kSCNetworkFlagsReachable)) != 0 let needsConnection = (flags.rawValue & UInt32(kSCNetworkFlagsConnectionRequired)) != 0 return (isReachable && !needsConnection) } //check internet func numberOfSections(in tableView: UITableView) -> Int { return 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return mysweat.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = MyTableref.dequeueReusableCell(withIdentifier: "mycellidentifier") as? MyCustomCell cell?.lblcityname.text=mysweat[indexPath.row].cityname cell?.lbltemperature.text=String(mysweat[indexPath.row].temp) //print(dictcitytemp) return cell! } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { //print("clicked cell") //print("indexPath.row is \(indexPath.row)") mysweat[indexPath.row].iwasclicked=1 performSegue(withIdentifier: "myseguedetail", sender: mysweat) //print(mysweat[indexPath.row].cityname) } override func prepare(for segue: UIStoryboardSegue, sender: Any?) { //print("prepare for segue method is called") if segue.identifier=="myseguedetail" { let destinationviewcontroller = segue.destination as? DetailViewController destinationviewcontroller?.localdetailweather=(sender as? [Weathertype])! //destinationviewcontroller?.another=sender //print("all ok") } } }
36.611111
180
0.538442
b4a73b0a72f5c3d8a4a0d6863633b12553c83117
609
ps1
PowerShell
FdB.SitecoreLangRegPowerTool/SitecorePowerShellScript/SitecoreAddLanguagesScriptTemplate.ps1
FreddieDB/Sitecore-Language-Registration-PowerTool
ac51e4b132a530e8595bf585bec23d01651728b8
[ "MIT" ]
null
null
null
FdB.SitecoreLangRegPowerTool/SitecorePowerShellScript/SitecoreAddLanguagesScriptTemplate.ps1
FreddieDB/Sitecore-Language-Registration-PowerTool
ac51e4b132a530e8595bf585bec23d01651728b8
[ "MIT" ]
null
null
null
FdB.SitecoreLangRegPowerTool/SitecorePowerShellScript/SitecoreAddLanguagesScriptTemplate.ps1
FreddieDB/Sitecore-Language-Registration-PowerTool
ac51e4b132a530e8595bf585bec23d01651728b8
[ "MIT" ]
1
2021-08-10T20:46:51.000Z
2021-08-10T20:46:51.000Z
$item = New-Item "master:/sitecore/system/Languages/XX-ISO-LANG-COUNTRY" -type "/sitecore/templates/System/Language" $item.Editing.BeginEdit() $item.Fields["Charset"] = "iso-8859-1" $item.Fields["Code page"] = "65001" $item.Fields["Encoding"] = "utf-8" $item.Fields["Fallback Language"] = "XX-FALLBACK-ISO-LANG-COUNTRY" #Leave as empty string if not applicable. Example: "en-CA" $item.Fields["Iso"] = "XX-ISOLang" #Language ISO code. Example: "es" $item.Fields["Regional Iso Code"] = "XX-ISO-LANG-COUNTRY" #ISO Language-Country code for new Language. Example: "es-MX" $item.Editing.EndEdit()
55.363636
127
0.701149
84ef3594ba9e24dbd5011d7bb68fb29a12436ccb
463
c
C
lib/libc/functions/stdio/sscanf.c
otaviopace/ananas
849925915b0888543712a8ca625318cd7bca8dd9
[ "Zlib" ]
52
2015-11-27T13:56:00.000Z
2021-12-01T16:33:58.000Z
lib/libc/functions/stdio/sscanf.c
otaviopace/ananas
849925915b0888543712a8ca625318cd7bca8dd9
[ "Zlib" ]
4
2017-06-26T17:59:51.000Z
2021-09-26T17:30:32.000Z
lib/libc/functions/stdio/sscanf.c
otaviopace/ananas
849925915b0888543712a8ca625318cd7bca8dd9
[ "Zlib" ]
8
2016-08-26T09:42:27.000Z
2021-12-04T00:21:05.000Z
/* sscanf( const char *, const char *, ... ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ #include <stdio.h> #include <stdarg.h> // Testing covered by scanf.cpp int sscanf(const char* _PDCLIB_restrict s, const char* _PDCLIB_restrict format, ...) { int rc; va_list ap; va_start(ap, format); rc = vsscanf(s, format, ap); va_end(ap); return rc; }
23.15
84
0.654428
f74d224a36e4279f2f056e9d9292c3a341e10180
665
dart
Dart
graphite_language/lib/src/ast/union_type_extension.dart
graphql-dart/graphite
491e49cd86157659fd66fdefad2e22fa4f7eef78
[ "MIT" ]
null
null
null
graphite_language/lib/src/ast/union_type_extension.dart
graphql-dart/graphite
491e49cd86157659fd66fdefad2e22fa4f7eef78
[ "MIT" ]
5
2019-08-18T08:48:52.000Z
2019-12-17T11:21:14.000Z
graphite_language/lib/src/ast/union_type_extension.dart
graphql-dart/graphite
491e49cd86157659fd66fdefad2e22fa4f7eef78
[ "MIT" ]
null
null
null
part of graphite.language.ast; /// https://graphql.github.io/graphql-spec/draft/#UnionTypeExtension class UnionTypeExtension extends Extension { const UnionTypeExtension( {@required this.name, this.directives, this.members}); final String name; final Iterable<Directive> directives; final Iterable<NamedType> members; @override NodeKind get kind => NodeKind.unionTypeExtension; @override T accept<T>(Visitor<T> visitor) => visitor.visitUnionTypeExtension(this); @override Map<String, Object> toJson() => { 'kind': kind.toString(), 'name': name, 'directives': directives, 'members': members, }; }
25.576923
75
0.690226
18ab6f2a2af310669a345c8618e3ad3ca36c919f
1,248
css
CSS
discovery-frontend/src/assets/css/metatron/popup/metatron.popup.02Dashboard_multidata.css
Diffblue-benchmarks/metatron-discovery
4a5dc07cba6e8482dfbcd77c8d08fbfd4adffb3e
[ "Apache-2.0" ]
2
2019-01-09T08:06:10.000Z
2019-01-09T08:06:14.000Z
discovery-frontend/src/assets/css/metatron/popup/metatron.popup.02Dashboard_multidata.css
Diffblue-benchmarks/metatron-discovery
4a5dc07cba6e8482dfbcd77c8d08fbfd4adffb3e
[ "Apache-2.0" ]
null
null
null
discovery-frontend/src/assets/css/metatron/popup/metatron.popup.02Dashboard_multidata.css
Diffblue-benchmarks/metatron-discovery
4a5dc07cba6e8482dfbcd77c8d08fbfd4adffb3e
[ "Apache-2.0" ]
null
null
null
@charset "utf-8"; /************************************************************** popup : 02대시보드_01멀티데이터소스_01추가_2 **************************************************************/ .page-multidata .ddp-box-resultdata .ddp-type-top-option .ddp-part {float:left; position:relative;padding:8px 14px; } /*.page-multidata .ddp-box-resultdata .ddp-ui-top-area .ddp-fright .ddp-part:before {display:inline-block; position:absolute; top:8px; right:0; height:23px; border-left:1px solid #e7e7ea; content:'';}*/ /*.page-multidata .ddp-box-resultdata .ddp-ui-top-area .ddp-fright .ddp-part:first-of-type:before {display:none;}*/ /*.page-multidata .ddp-box-resultdata .ddp-ui-top-area .ddp-icon-fullsize {margin:0;}*/ .page-multidata .ddp-box-resultdata .ddp-type-top-option .ddp-link-unlink {color:#90969f; font-size:13px;} .page-multidata .ddp-box-resultdata .ddp-type-top-option .ddp-link-unlink:hover {color:#4b515b;} .page-multidata .ddp-box-resultdata .ddp-type-top-option .ddp-link-unlink:before {display:inline-block; width:15px; height:10px; margin-right:3px; background:url(../../../images/icon_unlink.png) no-repeat; content:'';} .page-multidata .ddp-box-resultdata .ddp-type-top-option .ddp-link-unlink:hover:before {background-position-x:-16px;}
83.2
218
0.671474
1f37f620d8e80835aa7c7a22a23c33b4e7965c42
6,899
cpp
C++
src/Nodes/Base_Nodes/ofxOceanodeNodeModelExternalWindow.cpp
PlaymodesStudio/ofxOceanode
400df6d49c4b29bc6916e4a045145e935beff4e0
[ "MIT" ]
31
2018-04-20T13:47:38.000Z
2021-12-26T04:32:24.000Z
src/Nodes/Base_Nodes/ofxOceanodeNodeModelExternalWindow.cpp
PlaymodesStudio/ofxOceanode
400df6d49c4b29bc6916e4a045145e935beff4e0
[ "MIT" ]
25
2018-02-19T17:15:32.000Z
2020-01-05T01:51:00.000Z
src/Nodes/Base_Nodes/ofxOceanodeNodeModelExternalWindow.cpp
PlaymodesStudio/ofxOceanode
400df6d49c4b29bc6916e4a045145e935beff4e0
[ "MIT" ]
5
2018-09-25T18:37:23.000Z
2021-01-21T16:26:16.000Z
// // ofxOceanodeNodeModelExternalWindow.cpp // example-basic // // Created by Eduard Frigola Bagué on 23/03/2018. // #include "ofxOceanodeNodeModelExternalWindow.h" ofxOceanodeNodeModelExternalWindow::ofxOceanodeNodeModelExternalWindow(string name) : ofxOceanodeNodeModel(name){ addParameter(showWindow.set("Show.Win", false), ofxOceanodeParameterFlags_DisableInConnection | ofxOceanodeParameterFlags_DisableOutConnection | ofxOceanodeParameterFlags_DisableSavePreset); addParameter(fullscreenWindow.set("Fullscr.", false), ofxOceanodeParameterFlags_DisableInConnection | ofxOceanodeParameterFlags_DisableOutConnection | ofxOceanodeParameterFlags_DisableSavePreset); windowListenerEvents.push(showWindow.newListener(this, &ofxOceanodeNodeModelExternalWindow::showExternalWindow)); windowListenerEvents.push(fullscreenWindow.newListener([this](bool &b){ if(externalWindow != nullptr) externalWindow->setFullscreen(b); })); externalWindowRect.setPosition(-1, -1); externalWindow = nullptr; externalWindowMode = OF_WINDOW; saveStateOnPreset = true; } ofxOceanodeNodeModelExternalWindow::~ofxOceanodeNodeModelExternalWindow(){ if(externalWindow != nullptr){ externalWindow->setWindowShouldClose(); } } void ofxOceanodeNodeModelExternalWindow::setExternalWindowPosition(int px, int py) { if(externalWindow != nullptr) externalWindow->setWindowPosition(px,py); else externalWindowRect.setPosition(px, py); } void ofxOceanodeNodeModelExternalWindow::setExternalWindowShape(int w, int h) { if(externalWindow != nullptr) externalWindow->setWindowShape(w,h); else externalWindowRect.setSize(w, h); } void ofxOceanodeNodeModelExternalWindow::setExternalWindowFullScreen(bool b) { if((externalWindow != nullptr)) externalWindow->setFullscreen(b); } void ofxOceanodeNodeModelExternalWindow::toggleFullscreen() { if(externalWindow != nullptr) externalWindow->toggleFullscreen(); } void ofxOceanodeNodeModelExternalWindow::showExternalWindow(bool &b){ #ifndef OFXOCEANODE_HEADLESS if(b && externalWindow == nullptr){ ofGLFWWindowSettings prevSettings; if(externalWindowRect.getPosition() == glm::vec3(-1, -1, 0)){ prevSettings.setSize(1024, 1024); prevSettings.setPosition(ofVec2f(ofGetScreenWidth()-1024, ofGetScreenHeight()-1024)); } else{ prevSettings.setSize(externalWindowRect.width, externalWindowRect.height); prevSettings.setPosition(externalWindowRect.position); } prevSettings.windowMode = fullscreenWindow ? OF_FULLSCREEN : OF_WINDOW; prevSettings.resizable = true; prevSettings.shareContextWith = ofGetCurrentWindow(); prevSettings.setGLVersion(ofGetGLRenderer()->getGLVersionMajor(), ofGetGLRenderer()->getGLVersionMinor()); prevSettings.monitor = 1; externalWindow = ofCreateWindow(prevSettings); externalWindow->setWindowTitle(nodeName() + " " + ofToString(getNumIdentifier())); externalWindow->setVerticalSync(true); windowListenerEvents.push(externalWindow->events().draw.newListener(this, &ofxOceanodeNodeModelExternalWindow::drawInExternalWindow)); windowListenerEvents.push(externalWindow->events().update.newListener(this, &ofxOceanodeNodeModelExternalWindow::updateForExternalWindow)); windowListenerEvents.push(externalWindow->events().exit.newListener(this, &ofxOceanodeNodeModelExternalWindow::closeExternalWindow)); windowListenerEvents.push(externalWindow->events().keyPressed.newListener(this, &ofxOceanodeNodeModelExternalWindow::keyPressed)); windowListenerEvents.push(externalWindow->events().keyReleased.newListener(this, &ofxOceanodeNodeModelExternalWindow::keyReleased)); windowListenerEvents.push(externalWindow->events().mouseMoved.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseMoved)); windowListenerEvents.push(externalWindow->events().mousePressed.newListener(this, &ofxOceanodeNodeModelExternalWindow::mousePressed)); windowListenerEvents.push(externalWindow->events().mouseReleased.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseReleased)); windowListenerEvents.push(externalWindow->events().mouseDragged.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseDragged)); windowListenerEvents.push(externalWindow->events().mouseScrolled.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseScrolled)); windowListenerEvents.push(externalWindow->events().mouseEntered.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseEntered)); windowListenerEvents.push(externalWindow->events().mouseExited.newListener(this, &ofxOceanodeNodeModelExternalWindow::mouseExited)); windowListenerEvents.push(externalWindow->events().windowResized.newListener(this, &ofxOceanodeNodeModelExternalWindow::windowResizedOwnEvent)); windowListenerEvents.push(externalWindow->events().fileDragEvent.newListener(this, &ofxOceanodeNodeModelExternalWindow::dragEvent)); setupForExternalWindow(); } else if(!b && externalWindow != nullptr){ externalWindow->setWindowShouldClose(); externalWindow = nullptr; } #endif } void ofxOceanodeNodeModelExternalWindow::windowResizedOwnEvent(ofResizeEventArgs &a){ externalWindowRect.setPosition(glm::vec3(externalWindow->getWindowPosition(), 0)); externalWindowRect.setSize(externalWindow->getWidth(), externalWindow->getHeight()); windowResized(a); } void ofxOceanodeNodeModelExternalWindow::closeExternalWindow(ofEventArgs &e){ externalWindowRect.setPosition(glm::vec3(externalWindow->getWindowPosition(), 0)); externalWindowRect.setSize(externalWindow->getWidth(), externalWindow->getHeight()); showWindow = false; } void ofxOceanodeNodeModelExternalWindow::presetSave(ofJson &json){ if(saveStateOnPreset){ json["ExtWindowRect"] = {externalWindowRect.x, externalWindowRect.y, externalWindowRect.width, externalWindowRect.height}; json["ExtWindowMode"] = fullscreenWindow ? OF_FULLSCREEN : OF_WINDOW; } } void ofxOceanodeNodeModelExternalWindow::presetRecallBeforeSettingParameters(ofJson &json){ if(saveStateOnPreset){ if(json.count("ExtWindowRect") == 1){ auto infoVec = json["ExtWindowRect"]; externalWindowRect = ofRectangle(infoVec[0], infoVec[1], infoVec[2], infoVec[3]); } } } void ofxOceanodeNodeModelExternalWindow::loadCustomPersistent(ofJson &json){ if(json.count("ExtWindowRect") == 1){ auto infoVec = json["ExtWindowRect"]; externalWindowRect = ofRectangle(infoVec[0], infoVec[1], infoVec[2], infoVec[3]); } if(json.count("ExtWindowMode") == 1){ auto windowMode = json["ExtWindowMode"]; fullscreenWindow = windowMode == OF_FULLSCREEN ? true : false; } }
51.485075
200
0.764893
e7460860e33ff246dbabc490c4084b7589fcbd36
7,310
js
JavaScript
src/js/template.js
ilyutkin/MCDatepicker
8dfbb4ed7a1ebb92756399aaa021f6fb6cd0e9aa
[ "MIT" ]
null
null
null
src/js/template.js
ilyutkin/MCDatepicker
8dfbb4ed7a1ebb92756399aaa021f6fb6cd0e9aa
[ "MIT" ]
null
null
null
src/js/template.js
ilyutkin/MCDatepicker
8dfbb4ed7a1ebb92756399aaa021f6fb6cd0e9aa
[ "MIT" ]
null
null
null
export const spanTemplate = (direction, content) => { const units = direction === 'next' ? '-100' : '100'; return `<span style="transform: translateX(${units}px);">${content}</span>`; }; export default `<div class="mc-display" data-target="calendar"> <div class="mc-display__header"> <h3 class="mc-display__day">Thursday</h3> </div> <div class="mc-display__body"> <div class="mc-display__data mc-display__data--primary"> <h1 class="mc-display__date">1</h1> </div> <div class="mc-display__data mc-display__data--secondary"> <h3 class="mc-display__month">January</h3> <h2 class="mc-display__year">1970</h2> </div> </div> </div> <div class="mc-picker"> <div class="mc-picker__header mc-select mc-container" data-target="calendar"> <div class="mc-select__month"> <button id="mc-picker__month--prev" class="mc-select__nav mc-select__nav--prev" tabindex="0" aria-label="Previous Month"> <svg class="icon-angle icon-angle--left" viewBox="0 0 256 512" width='10px' height='100%'> <path fill="currentColor" d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z" /> </svg> </button> <div id="mc-current--month" class="mc-select__data mc-select__data--month" tabindex="0" aria-label="Click to select month" aria-haspopup="true" aria-expanded="false" aria-controls="mc-month-year__preview"> <span>January</span> </div> <button id="mc-picker__month--next" class="mc-select__nav mc-select__nav--next" tabindex="0" aria-label="Next Month"> <svg class="icon-angle icon-angle--right" viewBox="0 0 256 512" width='10px' height='100%'> <path fill="currentColor" d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" /> </svg> </button> </div> <div class="mc-select__year"> <button id="mc-picker__year--prev" class="mc-select__nav mc-select__nav--prev"> <svg class="icon-angle icon-angle--left" viewBox="0 0 256 512" width='10px' height='100%'> <path fill="currentColor" d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z" /> </svg> </button> <div id="mc-current--year" class="mc-select__data mc-select__data--year" tabindex="0" aria-label="Click to select year" aria-haspopup="true" aria-expanded="false" aria-controls="mc-month-year__preview"> <span>1970</span> </div> <button id="mc-picker__year--next" class="mc-select__nav mc-select__nav--next"> <svg class="icon-angle icon-angle--right" viewBox="0 0 256 512" width='10px' height='100%'> <path fill="currentColor" d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z" /> </svg> </button> </div> <div id="mc-picker__month-year" class="mc-picker-vhidden" aria-live="polite" aria-atomic="true">January 1970</div> </div> <div class="mc-picker__body"> <table class="mc-table mc-container" aria-labelledby="mc-picker__month-year"> <thead class="mc-table__header"> <tr> <th class="mc-table__weekday">S</th> <th class="mc-table__weekday">M</th> <th class="mc-table__weekday">T</th> <th class="mc-table__weekday">W</th> <th class="mc-table__weekday">T</th> <th class="mc-table__weekday">F</th> <th class="mc-table__weekday">S</th> </tr> </thead> <tbody class="mc-table__body"> <tr class="mc-table__week"> <td class="mc-date mc-date--inactive" data-val-date="">28</td> <td class="mc-date mc-date--inactive" data-val-date="">29</td> <td class="mc-date mc-date--inactive" data-val-date="">30</td> <td class="mc-date mc-date--inactive" data-val-date="">31</td> <td class="mc-date mc-date--active" data-val-date="">1</td> <td class="mc-date mc-date--active" data-val-date="">2</td> <td class="mc-date mc-date--active" data-val-date="">3</td> </tr> <tr class="mc-table__week"> <td class="mc-date mc-date--active" data-val-date="">4</td> <td class="mc-date mc-date--active" data-val-date="">5</td> <td class="mc-date mc-date--active" data-val-date="">6</td> <td class="mc-date mc-date--active" data-val-date="">7</td> <td class="mc-date mc-date--active" data-val-date="">8</td> <td class="mc-date mc-date--active" data-val-date="">9</td> <td class="mc-date mc-date--active" data-val-date="">10</td> </tr> <tr class="mc-table__week"> <td class="mc-date mc-date--active" data-val-date="">11</td> <td class="mc-date mc-date--active" data-val-date="">12</td> <td class="mc-date mc-date--active" data-val-date="">13</td> <td class="mc-date mc-date--active" data-val-date="">14</td> <td class="mc-date mc-date--active" data-val-date="">15</td> <td class="mc-date mc-date--active" data-val-date="">16</td> <td class="mc-date mc-date--active" data-val-date="">17</td> </tr> <tr class="mc-table__week"> <td class="mc-date mc-date--active" data-val-date="">18</td> <td class="mc-date mc-date--active" data-val-date="">19</td> <td class="mc-date mc-date--active" data-val-date="">20</td> <td class="mc-date mc-date--active" data-val-date="">21</td> <td class="mc-date mc-date--active" data-val-date="">22</td> <td class="mc-date mc-date--active" data-val-date="">23</td> <td class="mc-date mc-date--active" data-val-date="">24</td> </tr> <tr class="mc-table__week"> <td class="mc-date mc-date--active" data-val-date="">25</td> <td class="mc-date mc-date--active" data-val-date="">26</td> <td class="mc-date mc-date--active" data-val-date="">27</td> <td class="mc-date mc-date--active" data-val-date="">28</td> <td class="mc-date mc-date--active" data-val-date="">29</td> <td class="mc-date mc-date--active" data-val-date="">30</td> <td class="mc-date mc-date--active" data-val-date="">31</td> </tr> <tr class="mc-table__week"> <td class="mc-date mc-date--inactive" data-val-date="">1</td> <td class="mc-date mc-date--inactive" data-val-date="">2</td> <td class="mc-date mc-date--inactive" data-val-date="">3</td> <td class="mc-date mc-date--inactive" data-val-date="">4</td> <td class="mc-date mc-date--inactive" data-val-date="">5</td> <td class="mc-date mc-date--inactive" data-val-date="">6</td> <td class="mc-date mc-date--inactive" data-val-date="">7</td> </tr> </tbody> </table> <div id="mc-month-year__preview" class="mc-month-year__preview" data-target=null role="menu"> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> <div class="mc-month-year__cell"></div> </div> </div> <div class="mc-picker__footer mc-container"> <div class="mc-footer__section mc-footer__section--primary"> </div> <div class="mc-footer__section mc-footer__section--secondary"> <button id="mc-btn__cancel" class="mc-btn mc-btn--success" tabindex="0">CANCEL</button> <button id="mc-btn__ok" class="mc-btn mc-btn--success" tabindex="0">OK</button> </div> </div> </div>`;
49.391892
222
0.682763
9d183f004a77ddab48913ae1edf7ef97c38bc311
667
html
HTML
codehs/-partials/1-3-8.html
bfu4/bfu4.github.io
5c324f840f1ea94358f8463886746097a6dad132
[ "CC-BY-4.0" ]
1
2021-04-16T06:42:05.000Z
2021-04-16T06:42:05.000Z
codehs/-partials/1-3-8.html
bfu4/bfu4.github.io
5c324f840f1ea94358f8463886746097a6dad132
[ "CC-BY-4.0" ]
null
null
null
codehs/-partials/1-3-8.html
bfu4/bfu4.github.io
5c324f840f1ea94358f8463886746097a6dad132
[ "CC-BY-4.0" ]
null
null
null
<h1>1.3.8 Answering Questions</h1> <code id="source"> public class Variables { public static void main(String[] args) { String myName = "Karel the Dog"; int luckyNumber = 11; double currentTemperature = 75.3; boolean isStudent = true; System.out.println(myName); System.out.println(luckyNumber); System.out.println(currentTemperature); System.out.println(isStudent); } } </code>
31.761905
59
0.427286
5bfcd311e1cf3c01863bc5630d75635b8716d5c3
4,459
h
C
core/include/tcs/dynamics_plugin.h
PositronicsLab/tcs
c43bc3244b3c68cd1b42358afd18d5a0716d3e0f
[ "Apache-2.0" ]
null
null
null
core/include/tcs/dynamics_plugin.h
PositronicsLab/tcs
c43bc3244b3c68cd1b42358afd18d5a0716d3e0f
[ "Apache-2.0" ]
null
null
null
core/include/tcs/dynamics_plugin.h
PositronicsLab/tcs
c43bc3244b3c68cd1b42358afd18d5a0716d3e0f
[ "Apache-2.0" ]
null
null
null
#ifndef _DYNAMICS_PLUGIN_H_ #define _DYNAMICS_PLUGIN_H_ #include <dlfcn.h> //POSIX //----------------------------------------------------------------------------- typedef double Real; //----------------------------------------------------------------------------- // dynamics initialization function signature typedef bool ( *init_f )( int argv, char** argc ); // dynamics shutdown function signature typedef void ( *shutdown_f )( void ); // dynamics step function signature typedef void ( *step_f )( dynamics_data_t* data ); // dynamics step size query function signature typedef Real ( *get_step_size_f )( void ); // dynamics state query function signature typedef void ( *get_state_f )( dynamics_data_t* data ); //----------------------------------------------------------------------------- class dynamics_plugin_c { private: void* HANDLE; // plugin handle //--------------------------------------------------------------------------- public: enum error_e { ERROR_NONE = 0, ERROR_OPEN, ERROR_LINK, ERROR_READ }; dynamics_plugin_c( void ) { HANDLE = NULL; } virtual ~dynamics_plugin_c( void ) { } init_f init; shutdown_f shutdown; step_f step; get_step_size_f get_step_size; get_state_f get_state; //--------------------------------------------------------------------------- error_e read( const char* filename ) { if( open( filename ) ) // attempt to read the plugin file HANDLE = dlopen( filename, RTLD_LAZY ); printf( "plugin: %s\n", filename ); if( !HANDLE ) { std::cerr << " failed to read plugin from " << filename << std::endl; std::cerr << " " << dlerror( ) << std::endl; return ERROR_OPEN; } // locate the init function init = (init_f) dlsym(HANDLE, "init"); const char* dlsym_error1 = dlerror( ); if( dlsym_error1 ) { std::cerr << " warning: cannot load symbol 'init' from " << filename << std::endl; std::cerr << " error follows: " << std::endl << dlsym_error1 << std::endl; return ERROR_LINK; } shutdown = (shutdown_f) dlsym(HANDLE, "shutdown"); const char* dlsym_error2 = dlerror( ); if( dlsym_error2 ) { std::cerr << " warning: cannot load symbol 'init' from " << filename << std::endl; std::cerr << " error follows: " << std::endl << dlsym_error2 << std::endl; return ERROR_LINK; } // locate the run function step = (step_f) dlsym(HANDLE, "step"); const char* dlsym_error3 = dlerror( ); if( dlsym_error3 ) { std::cerr << " warning: cannot load symbol 'step' from " << filename << std::endl; std::cerr << " error follows: " << std::endl << dlsym_error3 << std::endl; return ERROR_LINK; } // locate the get step size function get_step_size = (get_step_size_f) dlsym(HANDLE, "get_step_size"); const char* dlsym_error4 = dlerror( ); if( dlsym_error4 ) { std::cerr << " warning: cannot load symbol 'get_step_size' from " << filename << std::endl; std::cerr << " error follows: " << std::endl << dlsym_error4 << std::endl; return ERROR_LINK; } // locate the get state function get_state = (get_state_f) dlsym(HANDLE, "get_state"); const char* dlsym_error5 = dlerror( ); if( dlsym_error5 ) { std::cerr << " warning: cannot load symbol 'get_state' from " << filename << std::endl; std::cerr << " error follows: " << std::endl << dlsym_error5 << std::endl; return ERROR_LINK; } return ERROR_NONE; } //--------------------------------------------------------------------------- void close( void ) { if( HANDLE != NULL ) dlclose( HANDLE ); } //--------------------------------------------------------------------------- private: //--------------------------------------------------------------------------- error_e open( const char* filename ) { HANDLE = dlopen( filename, RTLD_LAZY ); if( !HANDLE ) { //if( VERBOSE ) std::cerr << " failed to open plugin: " << filename << std::endl; //if( VERBOSE ) std::cerr << " " << dlerror( ) << std::endl; return ERROR_OPEN; } return ERROR_NONE; } //--------------------------------------------------------------------------- }; //----------------------------------------------------------------------------- #endif // _DYNAMICS_PLUGIN_H_
32.079137
97
0.4963
ca0181dc18fcbd7549854c3877b72b7a9e5d3d80
3,014
java
Java
src/main/java/boj/Boj_1647.java
so3500/problem-solving
cc76b8749d0f82c5e4711d3a33905bfaac31655b
[ "MIT" ]
1
2020-05-10T04:04:03.000Z
2020-05-10T04:04:03.000Z
src/main/java/boj/Boj_1647.java
so3500/problem-solving
cc76b8749d0f82c5e4711d3a33905bfaac31655b
[ "MIT" ]
null
null
null
src/main/java/boj/Boj_1647.java
so3500/problem-solving
cc76b8749d0f82c5e4711d3a33905bfaac31655b
[ "MIT" ]
null
null
null
/* * 문제: 1647 도시 분할 계획 / 1468 ms * link: https://www.acmicpc.net/problem/1647 * 알고리즘: Minimum Spanning Tree(MST), Kruskal * 풀이방법: * * 의사코드(Pseudo Code) * * 시간복잡도(Time Complexity) * O(ElogE), O(ElogV) * * 공간복잡도(Space Complexity) * * */ package boj; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.PriorityQueue; public class Boj_1647 { static class Point implements Comparable<Point> { int a, b, cost; public Point(int a, int b, int cost) { this.a = a; this.b = b; this.cost = cost; } @Override public int compareTo(Point p) { return this.cost - p.cost; // 오름차순 정렬 } } static int N, M, minCost, cnt; static int[] parent, height; static PriorityQueue<Point> pq; public static void main(String[] args) throws IOException { init(); solve(); System.out.println(minCost); } static void init() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int a, b, cost, i; String[] input; input = br.readLine().split(" "); N = Integer.parseInt(input[0]); M = Integer.parseInt(input[1]); pq = new PriorityQueue<>(M); for (i = 0; i < M; i++) { input = br.readLine().split(" "); a = Integer.parseInt(input[0]); b = Integer.parseInt(input[1]); cost = Integer.parseInt(input[2]); pq.add(new Point(a, b, cost)); } // 각 정점 초기화 parent = new int[N + 1]; height = new int[N + 1]; for (i = 1; i <= N; i++) { parent[i] = i; height[i] = 1; } minCost = 0; cnt = N - 2; // 최소 신장 트리를 구할 때 union 수행 횟수(두 그룹이 이미 하나일 경우에는 제외) br.close(); } static int find(int a) { if (parent[a] == a) return a; parent[a] = find(parent[a]); return parent[a]; } static boolean union(int a, int b) { int rootA, rootB, temp; rootA = find(a); rootB = find(b); // 같은 그룹 if (rootA == rootB) return false; // 항상 A의 높이가 더 작도록 if (height[rootA] > height[rootB]) { temp = rootA; rootA = rootB; rootA = temp; } // 항상 B가 루트가 되도록 parent[rootA] = rootB; // A, B의 높이가 같으면 B의 길이를 늘린다. if (height[rootA] == height[rootB]) height[rootB]++; return true; } static void solve() { Point p; // 최소 신장 트리는 N-1개의 간선으로 이루어져 있다. // 이때, 마지막으로 추가한 간선을 제거하면 두 개의 최소 신장 트리를 구할 수 있다. // 즉 N-2번만 union 연산을 수행하면 된다. 단 이미 같은 그룹은 연산에서 제외한다. while (!pq.isEmpty() && (cnt > 0)) { p = pq.poll(); if (union(p.a, p.b)) { minCost += p.cost; cnt--; } } } }
24.306452
81
0.491374
9f170b6e5b04d69a3a4f6b8e5d845313a8da0853
719
go
Go
domain/memory/piastres/locks/service.go
xmn-services/rod-network
5a14304844a480cfad4b84fe98f4bcfba4cdfd3b
[ "MIT" ]
null
null
null
domain/memory/piastres/locks/service.go
xmn-services/rod-network
5a14304844a480cfad4b84fe98f4bcfba4cdfd3b
[ "MIT" ]
null
null
null
domain/memory/piastres/locks/service.go
xmn-services/rod-network
5a14304844a480cfad4b84fe98f4bcfba4cdfd3b
[ "MIT" ]
null
null
null
package locks import ( transfer_lock "github.com/xmn-services/rod-network/domain/transfers/piastres/locks" ) type service struct { adapter Adapter repository Repository trService transfer_lock.Service } func createService( adapter Adapter, repository Repository, trService transfer_lock.Service, ) Service { out := service{ adapter: adapter, repository: repository, trService: trService, } return &out } // Save saves a lock instance func (app *service) Save(lock Lock) error { hash := lock.Hash() _, err := app.repository.Retrieve(hash) if err == nil { return nil } trLock, err := app.adapter.ToTransfer(lock) if err != nil { return err } return app.trService.Save(trLock) }
17.119048
84
0.717663
e43a72f9d2a45c3ed66eb523bdf4b429d1c1dd99
2,965
swift
Swift
Source/Table/TableDataSourceDelegate.swift
jonasbeckers/FetchedDataSource
8ad336b2990b8568fc3ad73cfa634ffb3c04d7e5
[ "MIT" ]
null
null
null
Source/Table/TableDataSourceDelegate.swift
jonasbeckers/FetchedDataSource
8ad336b2990b8568fc3ad73cfa634ffb3c04d7e5
[ "MIT" ]
null
null
null
Source/Table/TableDataSourceDelegate.swift
jonasbeckers/FetchedDataSource
8ad336b2990b8568fc3ad73cfa634ffb3c04d7e5
[ "MIT" ]
null
null
null
// // TableDataSource.swift // FetchedDataSource // // Created by David Jennes on 01/10/2018. // import CoreData import UIKit public protocol TableDataSourceDelegate: AnyObject { associatedtype ResultType: NSFetchRequestResult /// Asks your delegate for the cell that corresponds to the specified item in the view. /// /// - Parameter view: The view requesting this information. /// - Parameter indexPath: The index path that specifies the location of the item. /// - Parameter indexPath: The data object to configure the cell. /// - Returns: A configured cell object. func cell(for indexPath: IndexPath, data: ResultType, view: UITableView) -> UITableViewCell /// Asks your delegate whether the specified item can be moved to another location in the view. /// Use this method to selectively allow or disallow the movement of items within the view. /// /// **Note**: If you do not implement this method, the default implementation will return `false`. /// /// - Parameter view: The view requesting this information. /// - Parameter indexPath: The index path of the item that the view is trying to move. /// - Returns: `true` if the item is allowed to move or `false` if it is not. func canMoveItem(at indexPath: IndexPath, view: UITableView) -> Bool /// Tells your delegate to move the specified item to its new location. /// /// - Parameter view: The view notifying you of the move. /// - Parameter sourceIndexPath: The item’s original index path. /// - Parameter destinationIndexPath: The new index path of the item. func moveItem(at sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath, view: UITableView) func titleForHeader(in section: Int, view: UITableView, default: String?) -> String? func titleForFooter(in section: Int, view: UITableView) -> String? func canEditRow(at indexPath: IndexPath, view: UITableView) -> Bool func commit(edit: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath, view: UITableView) func sectionIndexTitles(forView view: UITableView) -> [String]? func section(forSectionIndexTitle title: String, at index: Int, view: UITableView) -> Int } public extension TableDataSourceDelegate { func canMoveItem(at indexPath: IndexPath, view: UITableView) -> Bool { return false } func moveItem(at sourceIndexPath: IndexPath, to destinationIndexPath: IndexPath, view: UITableView) { } func titleForHeader(in section: Int, view: UITableView, default: String?) -> String? { return `default` } func titleForFooter(in section: Int, view: UITableView) -> String? { return nil } func canEditRow(at indexPath: IndexPath, view: UITableView) -> Bool { return false } func commit(edit: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath, view: UITableView) { } func sectionIndexTitles(forView view: UITableView) -> [String]? { return nil } func section(forSectionIndexTitle title: String, at index: Int, view: UITableView) -> Int { return index } }
37.0625
102
0.743002
f075e8c126925ef5b4219cb734e27a29b74428c2
2,166
js
JavaScript
beconsult/webBeconsult/static/webBeconsult/js/js-WordPress/popup-maker-remote-content/scripts.min.js
enmanuel23x/django
e7b540d80dd73d27a149b45d5480b367bd33bd2e
[ "MIT" ]
null
null
null
beconsult/webBeconsult/static/webBeconsult/js/js-WordPress/popup-maker-remote-content/scripts.min.js
enmanuel23x/django
e7b540d80dd73d27a149b45d5480b367bd33bd2e
[ "MIT" ]
16
2020-06-06T00:57:14.000Z
2022-03-12T00:31:11.000Z
django/beconsult/webBeconsult/static/webBeconsult/js/js-WordPress/popup-maker-remote-content/scripts.min.js
enmanuel23x/django
e7b540d80dd73d27a149b45d5480b367bd33bd2e
[ "MIT" ]
null
null
null
/** * Popup Maker: Remote Content v1.0.0 */ !function(e){"use strict";void 0===e.expr[":"].external&&(e.expr[":"].external=function(e){return e&&e.href&&!e.href.match(/^mailto:/)&&e.hostname!=document.location.hostname}),void 0===e.expr[":"].internal&&void 0!==e.expr[":"].external&&(e.expr[":"].internal=function(t){return e(t).is(":not(:external)")}),e.fn.popmake.rc_user_args={},e(".popmake.remote-content").on("popmakeInit",function(){var t=e(this),a=t.data("popmake"),o=a.meta.remote_content,n=e(".popmake-content",t),p={};e.fn.popmake.rc_user_args[a.id]={},p.top=parseInt(e(".popmake-title",t).css("line-height"))+parseInt(t.css("padding-top"))+"px",p.maxHeight="calc(100% - "+(parseInt(p.top)+parseInt(t.css("padding-bottom")))+"px)",p.maxWidth="calc(100% - "+(parseInt(t.css("padding-left"))+parseInt(t.css("padding-right")))+"px)",n.addClass("popmake-remote-content").css({left:t.css("padding-left"),top:p.top,maxWidth:p.maxWidth,maxHeight:p.maxHeight}),"iframe"!==o.type||e("#popmake-remote-content-iframe",n).length||n.append('<iframe src="" id="popmake-remote-content-iframe">')}).on("popmakeBeforeOpen",function(){var t=e(this),a=t.data("popmake"),o=a.meta.remote_content,n=e(".popmake-remote-content",t),p=e(".popmake-loader",n);p.length||(p=e('<div class="popmake-loader">').appendTo(t)),p.addClass(o.loading_icon).fadeIn(0),n.fadeOut(0)}).on("popmakeAfterOpen",function(){var t=e(this),a=t.data("popmake"),o=a.meta.remote_content,n=e(".popmake-remote-content",t),p=e(e.fn.popmake.last_open_trigger),r=e("#popmake-remote-content-iframe",n),m=e(".popmake-loader",t),s={};switch(o.type){case"loadselector":""!==p.attr("href")&&n.load(p.attr("href")+" "+o.css_selector,function(){m.fadeOut("slow"),n.fadeIn("slow")});break;case"iframe":""!==p.attr("href")&&r.off("load.popmake_rc").on("load.popmake_rc",function(){n.fadeIn("slow"),m.fadeOut("slow")}).prop("src",p.attr("href"));break;case"ajax":t.trigger("popmakeRcBeforeAjax"),s=e.extend({},{action:"popmake_rc",popup_id:a.id},e.fn.popmake.rc_user_args[a.id]),e.ajax({method:"POST",dataType:"json",url:ajaxurl,data:s}).done(function(e){n.html(e.content).fadeIn("slow"),m.fadeOut("slow")})}})}(jQuery);
541.5
2,120
0.686519
175611cf6ceaac52b3a106bace80bf57f86f77a5
1,026
html
HTML
airsoft-es/styles/absolution/template/gallery/gallery_footer.html
filipesr/PHP
1378dc19b2290b7020d8fb27e00dce062e85ba69
[ "MIT" ]
null
null
null
airsoft-es/styles/absolution/template/gallery/gallery_footer.html
filipesr/PHP
1378dc19b2290b7020d8fb27e00dce062e85ba69
[ "MIT" ]
5
2020-02-19T20:51:41.000Z
2020-02-19T20:51:52.000Z
airsoft-es/styles/absolution/template/gallery/gallery_footer.html
filipesr/PHP
1378dc19b2290b7020d8fb27e00dce062e85ba69
[ "MIT" ]
null
null
null
<!-- I request you retain the full copyright notice below including the link to www.flying-bits.org. This not only gives respect to the large amount of time given freely by the developer but also helps build interest, traffic and use of phpBB Gallery. If you (honestly) cannot retain the full copyright I ask you at least leave in place the "Powered by phpBB Gallery" line, with "phpBB Gallery" linked to www.flying-bits.org. If you refuse to include even this then support on my forums may be affected. phpBB Gallery, nickvergessen : 2009 //--> <!-- IF S_IN_GALLERY_POPUP --> <a href="#" onclick="window.close(); return false;">{L_CLOSE_WINDOW}</a> <!-- INCLUDE simple_footer.html --> <!-- ELSE --> <div class="copyright"> Powered by <a href="http://www.flying-bits.org/">phpBB Gallery</a> &copy; 2007, 2009 <a href="http://www.flying-bits.org/">nickvergessen</a> <!-- IF GALLERY_TRANSLATION_INFO --><br />{GALLERY_TRANSLATION_INFO}<!-- ENDIF --> </div> <!-- INCLUDE overall_footer.html --> <!-- ENDIF -->
44.608696
142
0.709552
0abe3242a1d950fd636dcbe2d9b1fe2a090943b2
6,120
swift
Swift
CCBaseKit/CCExtension/CCExtension_UIDevice.swift
XiaoYiShi/CCBaseKit
b16c9e23b049613e7a97b48d23b053d62bd32e4a
[ "MIT" ]
1
2019-12-13T14:08:49.000Z
2019-12-13T14:08:49.000Z
CCBaseKit/CCExtension/CCExtension_UIDevice.swift
XiaoYiShi/CCBaseKit
b16c9e23b049613e7a97b48d23b053d62bd32e4a
[ "MIT" ]
null
null
null
CCBaseKit/CCExtension/CCExtension_UIDevice.swift
XiaoYiShi/CCBaseKit
b16c9e23b049613e7a97b48d23b053d62bd32e4a
[ "MIT" ]
null
null
null
// // CCExtension_UIDevice.swift // CCBaseKit // // Created by 史晓义 on 2019/12/1. // Copyright © 2019 FeatherBrowser. All rights reserved. // import UIKit // //extension UIDevice //{ // // List of device names that don't support advanced visual settings // static let lowGraphicsQualityModels = ["iPad", "iPad1,1", "iPhone1,1", "iPhone1,2", "iPhone2,1", "iPhone3,1", "iPhone3,2", "iPhone3,3", "iPod1,1", "iPod2,1", "iPod2,2", "iPod3,1", "iPod4,1", "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4", "iPad3,1", "iPad3,2", "iPad3,3"] // // public static var specificModelName: String { // var systemInfo = utsname() // uname(&systemInfo) // // let machine = systemInfo.machine // let mirror = Mirror(reflecting: machine) // var identifier = "" // // // Parses the string for the model name via NSUTF8StringEncoding, refer to // // http://stackoverflow.com/questions/26028918/ios-how-to-determine-iphone-model-in-swift // for child in mirror.children.enumerated() { // if let value = child.1.value as? Int8, value != 0 { // identifier.append(String(UnicodeScalar(UInt8(value)))) // } // } // return identifier // } // // //提供更友好的机型名称 // public static var niceModelName: String { // let identifier = specificModelName // switch identifier { // case "iPod5,1": return "iPod Touch 5" // case "iPod7,1": return "iPod Touch 6" // case "iPhone3,1", "iPhone3,2", "iPhone3,3": return "iPhone 4" // case "iPhone4,1": return "iPhone 4s" // case "iPhone5,1", "iPhone5,2": return "iPhone 5" // case "iPhone5,3", "iPhone5,4": return "iPhone 5c" // case "iPhone6,1", "iPhone6,2": return "iPhone 5s" // case "iPhone7,2": return "iPhone 6" // case "iPhone7,1": return "iPhone 6 Plus" // case "iPhone8,1": return "iPhone 6s" // case "iPhone8,2": return "iPhone 6s Plus" // case "iPhone8,4": return "iPhone SE" // case "iPhone9,1", "iPhone9,3": return "iPhone 7" // case "iPhone9,2", "iPhone9,4": return "iPhone 7 Plus" // case "iPhone10,1", "iPhone10,4": return "iPhone 8" // case "iPhone10,2", "iPhone10,5": return "iPhone 8 Plus" // case "iPhone10,3", "iPhone10,6": return "iPhone X" // case "iPad2,1", "iPad2,2", "iPad2,3", "iPad2,4":return "iPad 2" // case "iPad3,1", "iPad3,2", "iPad3,3": return "iPad 3" // case "iPad3,4", "iPad3,5", "iPad3,6": return "iPad 4" // case "iPad6,11", "iPad6,12": return "iPad 5" // case "iPad4,1", "iPad4,2", "iPad4,3": return "iPad Air" // case "iPad5,3", "iPad5,4": return "iPad Air 2" // case "iPad2,5", "iPad2,6", "iPad2,7": return "iPad Mini" // case "iPad4,4", "iPad4,5", "iPad4,6": return "iPad Mini 2" // case "iPad4,7", "iPad4,8", "iPad4,9": return "iPad Mini 3" // case "iPad5,1", "iPad5,2": return "iPad Mini 4" // case "iPad6,3", "iPad6,4", "iPad6,7", "iPad6,8" // , "iPad7,1", "iPad7,2", "iPad7,3", "iPad7,4":return "iPad Pro" // case "AppleTV5,3": return "Apple TV" // case "i386", "x86_64": return "Simulator" // default: return identifier // } // } // // open class func appName() -> String { // let localizedDict = Bundle.main.localizedInfoDictionary // let infoDict = Bundle.main.infoDictionary // let key = "CFBundleDisplayName" // // // E.g., "Fennec Nightly". // return localizedDict?[key] as? String ?? // infoDict?[key] as? String ?? // "Firefox" // } // // // I'd land a test for this, but it turns out it's hardly worthwhile -- both the // // app name and the device name are variable, and the format string itself varies // // by locale! // open class func defaultClientName() -> String { // // E.g., "Sarah's iPhone". // let device = UIDevice.current.name // // let f = NSLocalizedString("%@ on %@", tableName: "Shared", comment: "A brief descriptive name for this app on this device, used for Send Tab and Synced Tabs. The first argument is the app name. The second argument is the device name.") // // return String(format: f, appName(), device) // } // // // static func deviceModel() -> String { // return UIDevice.current.model // } // // static func isSimulator() -> Bool { // return UIDevice.current.model.contains("Simulator") //// return UIDevice.current.model.contains("Simulator") // } // // open class func isBlurSupported() -> Bool { // // We've tried multiple ways to make this change visible on simulators, but we // // haven't found a solution that worked: // // 1. http://stackoverflow.com/questions/21603475/how-can-i-detect-if-the-iphone-my-app-is-on-is-going-to-use-a-simple-transparen // // 2. https://gist.github.com/conradev/8655650 // // Thus, testing has to take place on actual devices. // return !lowGraphicsQualityModels.contains(specificModelName) // } // // // // 需要引入Firefox的Reachability.swift, 否则下面代码报错 // // public class func hasConnectivity() -> Bool { // // // // let status = Reach().connectionStatus() // // switch status { // // case .Online(.WWAN): // // return true // // case .Online(.WiFi): // // return true // // default: // // return false // // } // // } //} // //
46.015038
273
0.518301
dd65f49e342a6cf1d630da730ed674962ffd4c24
79
php
PHP
resources/views/home.php
give-solution/project-laravel
edc02588f76b08d0117195c862230e836071f5a6
[ "MIT" ]
null
null
null
resources/views/home.php
give-solution/project-laravel
edc02588f76b08d0117195c862230e836071f5a6
[ "MIT" ]
null
null
null
resources/views/home.php
give-solution/project-laravel
edc02588f76b08d0117195c862230e836071f5a6
[ "MIT" ]
null
null
null
<div id="home"> <p>HOME PAGE</p> <p>Selamat datang di poltek tegal</p> </div>
19.75
38
0.632911
e8bda79d0e981b884cad41b17ac67a08f940a707
2,622
kt
Kotlin
lint-checks-android/src/main/java/com/uber/lintchecks/android/GetDrawableDetector.kt
smorimoto/lint-checks
dbf5b1424bd8304585ff2588654b4da2eef22cae
[ "Apache-2.0" ]
50
2019-11-09T00:55:25.000Z
2022-01-13T03:46:33.000Z
lint-checks-android/src/main/java/com/uber/lintchecks/android/GetDrawableDetector.kt
smorimoto/lint-checks
dbf5b1424bd8304585ff2588654b4da2eef22cae
[ "Apache-2.0" ]
8
2019-11-11T22:43:42.000Z
2020-12-07T13:10:43.000Z
lint-checks-android/src/main/java/com/uber/lintchecks/android/GetDrawableDetector.kt
smorimoto/lint-checks
dbf5b1424bd8304585ff2588654b4da2eef22cae
[ "Apache-2.0" ]
4
2019-11-16T05:59:54.000Z
2021-09-14T12:08:54.000Z
/* * Copyright (C) 2019. Uber Technologies * * 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 com.uber.lintchecks.android import com.android.tools.lint.client.api.JavaEvaluator import com.android.tools.lint.detector.api.Category import com.android.tools.lint.detector.api.Detector import com.android.tools.lint.detector.api.Issue import com.android.tools.lint.detector.api.JavaContext import com.android.tools.lint.detector.api.Severity import com.android.tools.lint.detector.api.SourceCodeScanner import com.intellij.psi.PsiMethod import org.jetbrains.uast.UCallExpression /** * Detector to check for usages of `ResourcesCompat.getDrawable` or `ContextCompat.getDrawable`. */ class GetDrawableDetector : Detector(), SourceCodeScanner { companion object { private const val ISSUE_ID = "GetDrawable" const val LINT_ERROR_MESSAGE = "Don't use ContextCompat#getDrawable(Context,int), instead use " + "AppCompatResources#getDrawable(Context, int) since it understands how to process vector drawables." @JvmField val ISSUE = Issue.create( id = ISSUE_ID, briefDescription = "Use AppCompatResources#getDrawable(Context, int)", explanation = LINT_ERROR_MESSAGE, category = Category.CORRECTNESS, priority = 6, severity = Severity.ERROR, implementation = createImplementation<GetDrawableDetector>()) } override fun visitMethodCall( context: JavaContext, node: UCallExpression, method: PsiMethod ) { if (!getApplicableMethodNames().contains(node.methodName)) return if (node.methodName == "getDrawable" && isBlacklisted(context.evaluator, node)) { context.report(ISSUE, context.getLocation(node), LINT_ERROR_MESSAGE) } } private fun isBlacklisted(evaluator: JavaEvaluator, node: UCallExpression): Boolean { return evaluator.isMemberInClass(node.resolve(), "androidx.core.content.ContextCompat") || evaluator.isMemberInClass(node.resolve(), "androidx.core.content.res.ResourcesCompat") } override fun getApplicableMethodNames(): List<String> = listOf("getDrawable") }
39.727273
108
0.748284
f214e23cab9345c77a8f7add1c39faa606ac8e9a
835
swift
Swift
Sources/afcore/extensions/Collection_extension.swift
adam-fowler/swift-library
76faa78dcff33709cd2b91ea1a34f4e848a72c4f
[ "MIT" ]
1
2020-08-07T10:14:21.000Z
2020-08-07T10:14:21.000Z
Sources/afcore/extensions/Collection_extension.swift
adam-fowler/afcore
76faa78dcff33709cd2b91ea1a34f4e848a72c4f
[ "MIT" ]
1
2017-07-11T09:40:53.000Z
2018-05-16T17:56:54.000Z
Sources/afcore/extensions/Collection_extension.swift
adam-fowler/afcore
76faa78dcff33709cd2b91ea1a34f4e848a72c4f
[ "MIT" ]
null
null
null
// // Collection_extension.swift // afcore // // Created by Adam Fowler on 29/05/2017. // Copyright © 2017 Adam Fowler. All rights reserved. // import Foundation extension Collection { /// Finds such index N that predicate is true for all elements up to /// but not including the index N, and is false for all elements /// starting with index N. /// Behavior is undefined if there is no such N. public func binarySearch(predicate: (Iterator.Element) -> Bool) -> Index { var low = startIndex var high = endIndex while low != high { let mid = index(low, offsetBy: distance(from: low, to: high)/2) if predicate(self[mid]) { low = index(after: mid) } else { high = mid } } return low } }
26.935484
78
0.579641
7fc0617db1202c6c86de0bc4f0e77cbe4b862fb6
7,916
go
Go
googleapis/ads/googleads/v3/enums/criterion_category_channel_availability_mode.pb.go
qingqibing/go-genproto
c45acf45369a9d2fa234d9508b092aefb9cb9385
[ "Apache-2.0" ]
6
2018-05-11T20:42:12.000Z
2021-02-03T18:25:14.000Z
googleapis/ads/googleads/v3/enums/criterion_category_channel_availability_mode.pb.go
qingqibing/go-genproto
c45acf45369a9d2fa234d9508b092aefb9cb9385
[ "Apache-2.0" ]
5
2018-04-17T19:03:06.000Z
2020-03-31T22:30:37.000Z
googleapis/ads/googleads/v3/enums/criterion_category_channel_availability_mode.pb.go
qingqibing/go-genproto
c45acf45369a9d2fa234d9508b092aefb9cb9385
[ "Apache-2.0" ]
2
2018-11-12T15:05:06.000Z
2019-05-09T21:36:50.000Z
// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto package enums import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Enum containing the possible CriterionCategoryChannelAvailabilityMode. type CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode int32 const ( // Not specified. CriterionCategoryChannelAvailabilityModeEnum_UNSPECIFIED CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode = 0 // Used for return value only. Represents value unknown in this version. CriterionCategoryChannelAvailabilityModeEnum_UNKNOWN CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode = 1 // The category is available to campaigns of all channel types and subtypes. CriterionCategoryChannelAvailabilityModeEnum_ALL_CHANNELS CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode = 2 // The category is available to campaigns of a specific channel type, // including all subtypes under it. CriterionCategoryChannelAvailabilityModeEnum_CHANNEL_TYPE_AND_ALL_SUBTYPES CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode = 3 // The category is available to campaigns of a specific channel type and // subtype(s). CriterionCategoryChannelAvailabilityModeEnum_CHANNEL_TYPE_AND_SUBSET_SUBTYPES CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode = 4 ) var CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode_name = map[int32]string{ 0: "UNSPECIFIED", 1: "UNKNOWN", 2: "ALL_CHANNELS", 3: "CHANNEL_TYPE_AND_ALL_SUBTYPES", 4: "CHANNEL_TYPE_AND_SUBSET_SUBTYPES", } var CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode_value = map[string]int32{ "UNSPECIFIED": 0, "UNKNOWN": 1, "ALL_CHANNELS": 2, "CHANNEL_TYPE_AND_ALL_SUBTYPES": 3, "CHANNEL_TYPE_AND_SUBSET_SUBTYPES": 4, } func (x CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode) String() string { return proto.EnumName(CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode_name, int32(x)) } func (CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_187b80cdb03fe27e, []int{0, 0} } // Describes channel availability mode for a criterion availability - whether // the availability is meant to include all advertising channels, or a // particular channel with all its channel subtypes, or a channel with a certain // subset of channel subtypes. type CriterionCategoryChannelAvailabilityModeEnum struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *CriterionCategoryChannelAvailabilityModeEnum) Reset() { *m = CriterionCategoryChannelAvailabilityModeEnum{} } func (m *CriterionCategoryChannelAvailabilityModeEnum) String() string { return proto.CompactTextString(m) } func (*CriterionCategoryChannelAvailabilityModeEnum) ProtoMessage() {} func (*CriterionCategoryChannelAvailabilityModeEnum) Descriptor() ([]byte, []int) { return fileDescriptor_187b80cdb03fe27e, []int{0} } func (m *CriterionCategoryChannelAvailabilityModeEnum) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum.Unmarshal(m, b) } func (m *CriterionCategoryChannelAvailabilityModeEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum.Marshal(b, m, deterministic) } func (m *CriterionCategoryChannelAvailabilityModeEnum) XXX_Merge(src proto.Message) { xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum.Merge(m, src) } func (m *CriterionCategoryChannelAvailabilityModeEnum) XXX_Size() int { return xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum.Size(m) } func (m *CriterionCategoryChannelAvailabilityModeEnum) XXX_DiscardUnknown() { xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum.DiscardUnknown(m) } var xxx_messageInfo_CriterionCategoryChannelAvailabilityModeEnum proto.InternalMessageInfo func init() { proto.RegisterEnum("google.ads.googleads.v3.enums.CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode", CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode_name, CriterionCategoryChannelAvailabilityModeEnum_CriterionCategoryChannelAvailabilityMode_value) proto.RegisterType((*CriterionCategoryChannelAvailabilityModeEnum)(nil), "google.ads.googleads.v3.enums.CriterionCategoryChannelAvailabilityModeEnum") } func init() { proto.RegisterFile("google/ads/googleads/v3/enums/criterion_category_channel_availability_mode.proto", fileDescriptor_187b80cdb03fe27e) } var fileDescriptor_187b80cdb03fe27e = []byte{ // 373 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x51, 0xc1, 0x6a, 0xe3, 0x30, 0x14, 0x5c, 0x3b, 0xcb, 0x2e, 0x28, 0x0b, 0x6b, 0x7c, 0x5c, 0x36, 0xb0, 0x09, 0x7b, 0xd8, 0xc3, 0x56, 0x3e, 0xf8, 0xa6, 0x9e, 0x64, 0xc7, 0x4d, 0x43, 0x53, 0xd7, 0xe0, 0x38, 0xa5, 0xc5, 0x20, 0x14, 0x5b, 0xb8, 0x02, 0x5b, 0x0a, 0x96, 0x13, 0xc8, 0xb5, 0x9f, 0xd2, 0xde, 0xfa, 0x29, 0x3d, 0xf7, 0x2b, 0xfa, 0x15, 0xc5, 0x76, 0x9c, 0x16, 0x4a, 0x4b, 0x2e, 0x62, 0x9e, 0xde, 0xbc, 0x19, 0x69, 0x1e, 0x08, 0x32, 0x29, 0xb3, 0x9c, 0x59, 0x34, 0x55, 0x56, 0x0b, 0x6b, 0xb4, 0xb1, 0x2d, 0x26, 0xd6, 0x85, 0xb2, 0x92, 0x92, 0x57, 0xac, 0xe4, 0x52, 0x90, 0x84, 0x56, 0x2c, 0x93, 0xe5, 0x96, 0x24, 0x37, 0x54, 0x08, 0x96, 0x13, 0xba, 0xa1, 0x3c, 0xa7, 0x4b, 0x9e, 0xf3, 0x6a, 0x4b, 0x0a, 0x99, 0x32, 0xb8, 0x2a, 0x65, 0x25, 0xcd, 0x41, 0x2b, 0x03, 0x69, 0xaa, 0xe0, 0x5e, 0x11, 0x6e, 0x6c, 0xd8, 0x28, 0xfe, 0xfa, 0xdd, 0x19, 0xae, 0xb8, 0x45, 0x85, 0x90, 0x15, 0xad, 0xb8, 0x14, 0xaa, 0x1d, 0x1e, 0x3d, 0x69, 0xe0, 0xbf, 0xdb, 0x79, 0xba, 0x3b, 0x4b, 0xb7, 0x75, 0xc4, 0x6f, 0x0c, 0xcf, 0x65, 0xca, 0x3c, 0xb1, 0x2e, 0x46, 0xf7, 0x1a, 0xf8, 0x77, 0xe8, 0x80, 0xf9, 0x13, 0xf4, 0x23, 0x3f, 0x0c, 0x3c, 0x77, 0x7a, 0x32, 0xf5, 0xc6, 0xc6, 0x17, 0xb3, 0x0f, 0xbe, 0x47, 0xfe, 0x99, 0x7f, 0x71, 0xe9, 0x1b, 0x9a, 0x69, 0x80, 0x1f, 0x78, 0x36, 0x23, 0xee, 0x29, 0xf6, 0x7d, 0x6f, 0x16, 0x1a, 0xba, 0x39, 0x04, 0x83, 0x5d, 0x45, 0xe6, 0x57, 0x81, 0x47, 0xb0, 0x3f, 0x26, 0x35, 0x25, 0x8c, 0x9c, 0xba, 0x0e, 0x8d, 0x9e, 0xf9, 0x17, 0xfc, 0x79, 0x47, 0x09, 0x23, 0x27, 0xf4, 0xe6, 0xaf, 0xac, 0xaf, 0xce, 0xad, 0x0e, 0x86, 0x89, 0x2c, 0xe0, 0xa7, 0xd1, 0x38, 0x47, 0x87, 0x7e, 0x24, 0xa8, 0xb3, 0x0a, 0xb4, 0x6b, 0x67, 0xa7, 0x97, 0xc9, 0x9c, 0x8a, 0x0c, 0xca, 0x32, 0xb3, 0x32, 0x26, 0x9a, 0x24, 0xbb, 0x65, 0xae, 0xb8, 0xfa, 0x60, 0xb7, 0xc7, 0xcd, 0x79, 0xa7, 0xf7, 0x26, 0x18, 0x3f, 0xe8, 0x83, 0x49, 0x2b, 0x85, 0x53, 0x05, 0x5b, 0x58, 0xa3, 0x85, 0x0d, 0xeb, 0x94, 0xd5, 0x63, 0xd7, 0x8f, 0x71, 0xaa, 0xe2, 0x7d, 0x3f, 0x5e, 0xd8, 0x71, 0xd3, 0x7f, 0xd6, 0x87, 0xed, 0x25, 0x42, 0x38, 0x55, 0x08, 0xed, 0x19, 0x08, 0x2d, 0x6c, 0x84, 0x1a, 0xce, 0xf2, 0x5b, 0xf3, 0x30, 0xfb, 0x25, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x59, 0xb9, 0x5c, 0x73, 0x02, 0x00, 0x00, }
55.746479
323
0.784234
1e7f6d90342ae6165315a42b41f7577b4c6f86f2
996
ps1
PowerShell
BuildPackages/example/sublime/Packages/AAAPackageDev/bin/MakeRelease.ps1
cohero/boxstarter
bb298cae0aef485e3547e9d654f60afbd16f93d1
[ "Apache-2.0" ]
583
2015-01-04T11:35:23.000Z
2018-04-27T13:39:27.000Z
BuildPackages/example/sublime/Packages/AAAPackageDev/bin/MakeRelease.ps1
cohero/boxstarter
bb298cae0aef485e3547e9d654f60afbd16f93d1
[ "Apache-2.0" ]
269
2015-01-06T14:11:44.000Z
2018-04-06T12:24:56.000Z
BuildPackages/example/sublime/Packages/AAAPackageDev/bin/MakeRelease.ps1
cohero/boxstarter
bb298cae0aef485e3547e9d654f60afbd16f93d1
[ "Apache-2.0" ]
114
2015-01-27T11:39:13.000Z
2018-03-29T18:03:54.000Z
param([switch]$DontUpload=$False) $here = $MyInvocation.MyCommand.Definition $here = split-path $here -parent $root = resolve-path (join-path $here "..") push-location $root if (-not (test-path (join-path $root "Doc"))) { new-item -itemtype "d" -name "Doc" > $null copy-item ".\Data\main.css" ".\Doc" } # Generate docs in html from rst. push-location ".\Doc" get-childitem "..\*.rst" | foreach-object { & "rst2html.py" ` "--template" "..\data\html_template.txt" ` "--stylesheet-path" "main.css" ` "--link-stylesheet" ` $_.fullname "$($_.basename).html" } pop-location # Ensure MANIFEST reflects all changes to file system. remove-item ".\MANIFEST" -erroraction silentlycontinue & ".\setup.py" "spa" (get-item ".\dist\AAAPackageDev.sublime-package").fullname | clip.exe pop-location if (-not $DontUpload) { start-process "https://bitbucket.org/guillermooo/aaapackagedev/downloads" }
30.181818
75
0.620482
705727366cef1fcf768cf7b78c5238b02d04c24d
50
go
Go
lang/Go/memory-allocation-1.go
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
1
2018-11-09T22:08:38.000Z
2018-11-09T22:08:38.000Z
lang/Go/memory-allocation-1.go
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Go/memory-allocation-1.go
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
1
2018-11-09T22:08:40.000Z
2018-11-09T22:08:40.000Z
func inc(n int) { x := n + 1 println(x) }
10
17
0.44
cccb889a0972a13aaa80691442649e46ff295c28
23,106
dart
Dart
lib/screens/last_form/widgets/page_list/first_page.dart
Amin397/repo_test
bd9b96c8abe46c58399526119a3899ba38747b6d
[ "Apache-2.0" ]
null
null
null
lib/screens/last_form/widgets/page_list/first_page.dart
Amin397/repo_test
bd9b96c8abe46c58399526119a3899ba38747b6d
[ "Apache-2.0" ]
null
null
null
lib/screens/last_form/widgets/page_list/first_page.dart
Amin397/repo_test
bd9b96c8abe46c58399526119a3899ba38747b6d
[ "Apache-2.0" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:sanannegarexperts/screens/last_form/widgets/classes/file_class.dart'; class Page1 extends StatefulWidget { Strings strings; PageController _pageController; Page1(Strings strings , PageController _pageController){ this.strings = strings; this._pageController = _pageController; } @override _Page1State createState() => _Page1State(); } class _Page1State extends State<Page1> { @override Widget build(BuildContext context) { var height = MediaQuery.of(context).size.height; var width = MediaQuery.of(context).size.width; return Container( child: Center( child: Scaffold( backgroundColor: Colors.white.withOpacity(.6), resizeToAvoidBottomInset: false, body: Container( child: Column( children: <Widget>[ Container( height: (MediaQuery.of(context).size.height * .75) * .88, child: ListView( physics: BouncingScrollPhysics(), children: <Widget>[ Padding( padding: EdgeInsets.symmetric(vertical: height * .01), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Padding( padding: EdgeInsets.only(right: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * .3, child: Center( child:DropdownButton<String>( value: widget.strings.ostan, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.ostan = newValue; }); }, items: <String>[ 'تهران', 'شهریار', 'اسلامشهر', 'شهر قدس' ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ) ), ), ), Padding( padding: EdgeInsets.only(left: 15.0), child: Material( borderRadius: BorderRadius.all(Radius.circular(10.0)), elevation: 5.0, child: Container( width: width * .3, child: Center( child: DropdownButton<String>( value: widget.strings.city, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.city = newValue; }); }, items: <String>['تهران', 'اصفهان', 'شیراز', 'قم'] .map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ) ), ) ], ), ), Padding( padding: EdgeInsets.symmetric(vertical: height * .01), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Padding( padding: EdgeInsets.only(right: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * .3, child: Center( child: DropdownButton<String>( value: widget.strings.sherkate_bime_motaghazi, icon: Icon(Icons.keyboard_arrow_down), iconSize: 20, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.sherkate_bime_motaghazi = newValue; }); }, items: <String>['ایران', 'دی', 'پارسیان', 'سینا'] .map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.only(left: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * .3, child: Center( child: DropdownButton<String>( value: widget.strings.namayandegi, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.namayandegi = newValue; }); }, items: <String>[ 'نمایندگی تهران', 'نمایندگی اصفهان', 'نمایندگی شیراز', 'نمایندگی قم' ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ) ], ), ), Padding( padding: EdgeInsets.only(left: 15.0 , right: 15.0 , bottom: 10.0), child: Material( elevation: 5.0 , borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( child: Center( child: DropdownButton<String>( value: widget.strings.shobe_bimeGozar, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.shobe_bimeGozar = newValue; }); }, items: <String>[ 'شعبه کرج', 'شعبه تهران', 'شعبه شیراز', 'شعبه قم' ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.only(left:15.0 , right: 15.0 , bottom: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( child: Center( child: DropdownButton<String>( value: widget.strings.khatarate_pishnehadi, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.khatarate_pishnehadi = newValue; }); }, items: <String>[ 'آتش سوزی', 'سرقت کلی', 'اسید پاشی', 'سرقت درجا' ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.only(left: 15.0 , right: 15.0 , top: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * .22, child: Center( child: DropdownButton<String>( value: widget.strings.brand_mashin, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.brand_mashin = newValue; }); }, items: <String>[ 'پژو', 'پراید', 'سمند', 'وانت', "پرادو", 'آلفا', 'ایکس', 'اینفینیتی', 'ام جی', 'بنز', 'بی وای دی' ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.symmetric(vertical: height * .01), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: <Widget>[ Padding( padding: EdgeInsets.only(right: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * .3, child: Center( child: DropdownButton<String>( value: widget.strings.model_mashin, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.model_mashin = newValue; }); }, items: <String>['111', 'تیبا', 'هاچ بک', 'ساینا'] .map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.only(left: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( width: width * 0.3, child: Center( child: DropdownButton<String>( value: widget.strings.carbary_mashin, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.carbary_mashin = newValue; }); }, items: <String>[ 'یخچال دار', 'سواری', 'باری', 'وانت', "شخصی", 'غمومی', ].map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ) ], ), ), Padding( padding: EdgeInsets.only(left: 15.0 , right: 15.0 , bottom: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( child: Center( child: DropdownButton<String>( value: widget.strings.noee_bime_mashin, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.noee_bime_mashin = newValue; }); }, items: <String>['بدنه', 'ثالث'] .map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ), Padding( padding: EdgeInsets.only(left:15.0 , right: 15.0 , bottom: 15.0), child: Material( elevation: 5.0, borderRadius: BorderRadius.all(Radius.circular(10.0)), child: Container( child: Center( child: DropdownButton<String>( value: widget.strings.year, icon: Icon(Icons.keyboard_arrow_down), iconSize: 24, elevation: 16, style: TextStyle(color: Colors.deepPurple), onChanged: (String newValue) { setState(() { widget.strings.year = newValue; }); }, items: <String>['شمسی', 'میلادی'] .map<DropdownMenuItem<String>>((String value) { return DropdownMenuItem<String>( value: value, child: Text(value), ); }).toList(), ), ), ), ), ) ], ), ), Expanded( child: GestureDetector( onTap: () { if (widget._pageController.hasClients) { widget._pageController.animateToPage( 1, duration: const Duration(milliseconds: 800), curve: Curves.easeInOut, ); } }, child: Container( height: 40.0, color: Colors.blue.withOpacity(.8), child: Center( child: Text( 'مرحله بعد', style: TextStyle(fontSize: 16.0), ), ), ), ), ) ], ), ), ), ), ); } }
49.477516
92
0.286722
5c26f23379718ec4b710527f6afbfc6f373af76b
2,188
lua
Lua
volume/data/npc/scripts/Robson.lua
patsadow2/Tibia
b3aebbc5aea78cc2a238584c767c5c7315bab4dd
[ "MIT" ]
2
2021-07-16T00:21:26.000Z
2022-01-28T02:08:22.000Z
volume/data/npc/scripts/Robson.lua
patsadow2/Tibia
b3aebbc5aea78cc2a238584c767c5c7315bab4dd
[ "MIT" ]
1
2019-04-05T18:53:52.000Z
2019-04-10T10:53:04.000Z
volume/data/npc/scripts/Robson.lua
patsadow2/Tibia
b3aebbc5aea78cc2a238584c767c5c7315bab4dd
[ "MIT" ]
2
2019-12-11T04:13:15.000Z
2020-02-15T14:42:13.000Z
local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local voices = { { text = '<mumbles>' }, { text = 'Just great. Getting stranded on a remote underground isle was not that bad but now I\'m becoming a tourist attraction!' } } npcHandler:addModule(VoiceModule:new(voices)) local function creatureSayCallback(cid, type, msg) if not npcHandler:isFocused(cid) then return false end if msgcontains(msg, 'parcel') then npcHandler:say('Do you want to buy a parcel for 15 gold?', cid) npcHandler.topic[cid] = 1 elseif msgcontains(msg, 'label') then npcHandler:say('Do you want to buy a label for 1 gold?', cid) npcHandler.topic[cid] = 2 elseif msgcontains(msg, 'yes') then local player = Player(cid) if npcHandler.topic[cid] == 1 then if not player:removeMoney(15) then npcHandler:say('Sorry, that\'s only dust in your purse.', cid) npcHandler.topic[cid] = 0 return true end player:addItem(2595, 1) npcHandler:say('Fine.', cid) npcHandler.topic[cid] = 0 elseif npcHandler.topic[cid] == 2 then if not player:removeMoney(1) then npcHandler:say('Sorry, that\'s only dust in your purse.', cid) npcHandler.topic[cid] = 0 return true end player:addItem(2599, 1) npcHandler:say('Fine.', cid) npcHandler.topic[cid] = 0 end elseif msgcontains(msg, 'no') then if isInArray({1, 2}, npcHandler.topic[cid]) then npcHandler:say('I knew I would be stuck with that stuff.', cid) npcHandler.topic[cid] = 0 end end return true end npcHandler:setMessage(MESSAGE_GREET, "Hrmpf, I'd say welcome if I felt like lying.") npcHandler:setMessage(MESSAGE_FAREWELL, "See you next time!") npcHandler:setMessage(MESSAGE_WALKAWAY, "No patience at all!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
33.151515
132
0.733547
50c71e00802a0a9c5a62aae39bc5bb8ae7c64320
1,098
dart
Dart
lib/src/ui/venueDetailPage.dart
fwhite95/evented
5dbc617b16a6c3b3f17a85ace64d32bed8f99bbd
[ "MIT" ]
null
null
null
lib/src/ui/venueDetailPage.dart
fwhite95/evented
5dbc617b16a6c3b3f17a85ace64d32bed8f99bbd
[ "MIT" ]
1
2021-07-23T22:09:32.000Z
2021-07-23T22:09:32.000Z
lib/src/ui/venueDetailPage.dart
fwhite95/evented
5dbc617b16a6c3b3f17a85ace64d32bed8f99bbd
[ "MIT" ]
null
null
null
import 'package:csc413termprojectfwhite/src/models/venueModel.dart'; import 'package:flutter/material.dart'; class VenueDetailPage extends StatelessWidget{ final Venue _venue; VenueDetailPage({Key key, @required venue}) : _venue = venue, super(key: key); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: Text("${_venue.name}",)), body: Padding( padding: EdgeInsets.all(16), child: ListView( children: [ Text('${_venue.name}', textAlign: TextAlign.center, style: TextStyle( fontWeight: FontWeight.bold, fontSize: 30, ), ), Text('Label: ${_venue.label}', textAlign: TextAlign.center, style: TextStyle( fontStyle: FontStyle.italic, ),), SizedBox(height: 20,), Text('Address: ${_venue.address}', style: TextStyle( fontSize: 20, ),), SizedBox(height: 10,), ], ), ), ); } }
25.534884
68
0.537341
a85883c54499d7424b5bbaadab37de4d97627488
22,862
sql
SQL
sistempakar.sql
khalidmahfudh/sistem-pakar-bfs-telkom
047f6498fd5f65b7a7033c31bcac5ab330f840b0
[ "MIT" ]
1
2020-11-12T09:56:46.000Z
2020-11-12T09:56:46.000Z
sistempakar.sql
khalidmahfudh/sistem-pakar-bfs-telkom
047f6498fd5f65b7a7033c31bcac5ab330f840b0
[ "MIT" ]
null
null
null
sistempakar.sql
khalidmahfudh/sistem-pakar-bfs-telkom
047f6498fd5f65b7a7033c31bcac5ab330f840b0
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 26, 2021 at 05:47 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `sistempakar` -- -- -------------------------------------------------------- -- -- Table structure for table `data_gangguan_internet` -- CREATE TABLE `data_gangguan_internet` ( `id` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL, `nama_gangguan` varchar(128) NOT NULL, `solusi_gangguan` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gangguan_internet` -- INSERT INTO `data_gangguan_internet` (`id`, `kode_gangguan`, `nama_gangguan`, `solusi_gangguan`) VALUES (1, 201, 'IP PC Tidak Sesuai Dengan IP Modem', 'Cek koneksi local area, lakukan ping tes dari pc langsung ke modem, cek perangkat pelanggan sudah mendapat IP modem, jika belum bisa dilakukan isi IP secara manual. Restart modem atau reset modem, kemudian setting ulang konfigurasi'), (2, 202, 'Terisolir', 'Buka aplikasi SAMS, lakukan bukis (buka isolir) dengan memasukkan nomor internet pelanggan.'), (3, 203, 'Spam, Virus', 'Meng-offkan semua firewall, pastikan antivirus tidak blocking koneksi'), (4, 204, 'Profil Paket Kuota Habis', 'Cek pada aplikasi spins untuk cek sisa kuota, edukasi pelanggan'), (5, 205, 'Kabel Patchcord Rusak', 'Ganti kabel patchcord baru, melakukan penyambungan ulang dengan kabel dropcore'), (6, 206, 'DNS / Proxy', 'Bisa dilakukan cek/ganti proxy yang ada di browser. Mengubah DNS, masukkan DNS google (Preferred DNS Server 8.8.8.8, Alternate DNS Server 8.8.4.4)'), (7, 207, 'Profil di Port Tidak Sesuai Paket', 'Setting-an create pada modem hilang, lakukan create ulang, masuk pada putty, masukkan script create setting konfigurasi dan masukkan data nomor telepon, nomor internet, dan SN (Serial Number) modem'), (8, 208, 'Kabel dropcore Rusak', 'Cek ukuran/redaman kabel dengan menggunakan OPM meter (ukuran baik tidak >25dBm), lalu lakukan rekoneksi sambungan/pergantian dropcore. Settingcreate pada modem hilang, lakukan create ulang, masuk pada putty, masukkan script create setting konfigurasi dan masukkan data nomor telepon, nomor internet, dan SN (Serial Number) modem'), (9, 209, 'Fast Connector Rusak', 'Dilakukan penggantian fast connector baru, kemudian lakukan penyambungan ulang'), (10, 210, 'Adaptor Rusak/ Modem Rusak', 'dilakukan pengecekan dengan adaptor dan modem test, apabila tidak berfungsi dapat diganti dengan adaptor atau modem ONT baru'), (11, 211, 'Maintenance Server', 'Kemungkinan terdapat perbaikan server pada alamat web yang dituju.'), (29, 212, 'GAMAS - Gangguan Masal', 'Menunggu Sedang Dalam Proses Perbaikan'), (38, 213, 'hehehehe', 'heheeeeeeeeeeeeeeeeeeeeeeeeeeee'); -- -------------------------------------------------------- -- -- Table structure for table `data_gangguan_telepon` -- CREATE TABLE `data_gangguan_telepon` ( `id` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL, `nama_gangguan` varchar(128) NOT NULL, `solusi_gangguan` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gangguan_telepon` -- INSERT INTO `data_gangguan_telepon` (`id`, `kode_gangguan`, `nama_gangguan`, `solusi_gangguan`) VALUES (1, 101, 'Telepon Mati Total', 'Solusi yang diberikan apabila telepon mati tidak ada nada adalah cek dengan test phone kemungkinan pesawat telepon pelanggan yang rusak, jika jaringan telepon, rekonek kabel UTP telepon, cek pada splitter pastikan RJ 11 yang masuk pada phone dan modem tidak terbalik. Apabila tlp di paralel, cek pada sambungan rosette pastikan tidak lembab air. Jika masih belum bisa coba ganti splitter dan rosette baru, atau ganti kabel dan connector RJ 11 yang baru'), (22, 102, 'Kabel UTP Telepon Rusak', 'Pertama kali cabut RJ 11 pada pesawat telepon, kemudian pasang kembali. Jika masih belum bisa, dilakukan penggantian kabel UTP TLP yang baru.'); -- -------------------------------------------------------- -- -- Table structure for table `data_gangguan_useetv` -- CREATE TABLE `data_gangguan_useetv` ( `id` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL, `nama_gangguan` varchar(128) NOT NULL, `solusi_gangguan` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gangguan_useetv` -- INSERT INTO `data_gangguan_useetv` (`id`, `kode_gangguan`, `nama_gangguan`, `solusi_gangguan`) VALUES (1, 301, 'Kabel RCA/HDMI rusak', 'Dilakukan penggantian kabel RCA/HDMI baru'), (2, 302, 'Alamat dari server otentikasi tidak sesuai', 'Jika gangguan error 1302. Disebabkan alamat homepage EPG (Electronic Program Guide) gagal terhubung atau alamat dari server otentikasi tidak sesuai. Dicoba dengan reboot STB (set top box) dengan cara: pencet tombol SET pada remote useetv> pilih konfigurasi> isi password dengan 6321> tingkat lanjut> reboot. Pastikan kabel UTP dari STB menancap di LAN Port 4 modem, agar mendapatkan alamat dari server yaitu ip 10 .x.x.x'), (3, 303, 'Profil DHCP tidak valid', 'Jika gangguan error 1305. Kemungkinan parameter DHCP (Dinamic Host Configuration Protocol) dari modem tidak benar. Dilakukan reboot modem seperti gangguan 1302, dilanjutkan dengan cek info jaringan: pilih menu tingkat lanjut> pilih sistem informasi> pilih info jaringan> pastikan ip mendapatkan ip 10.x.x.x dengan memastikan parameter otentikasi, nomor internet, dan password useetvsudah benar'), (4, 304, 'Kabel UTP LAN/Connector RJ 45 rusak', 'Jika gangguan error 1901. Disebabkan kabel jaringan tidak tersambung. Periksa koneksi fisik dari kabel jaringan. Cek koneksi kabel UTP & RJ 45 dari modem ke arah STB, coba di-reconnect ulang. Apabila kabel UTP & RJ 45 sudah tidak berfungsi dapat dilakukan penggantian baru'), (5, 305, 'Konfigurasi vlan multicast hilang', 'Jika gangguan error code 4514 sama dengan gangguan channel live TV tidak muncul. Cek pada embassy, pastikan data Rx Power untuk OLT dan ONU tidak > 25 dBm. Cek konfigurasi vlan multicast apabila konfigurasi hilang atau channel multicast mengalami data timeout, maka create lagi dengan memasukkan scriptkonfigurasi vlan pada putty, dengan mendaftarkan nomor internet dan SN (serial number) modem'), (6, 306, 'Konfigurasi setting hilang', 'ika kualitas gambar tv putus-putus, tekan tombol info pada remote control> panah kanan [volume +] > tampil signal power & quality standard>70%. Atau dilakukan create ulang konfigurasi'), (7, 307, 'Unbind', 'Jika gangguan error code 70116204, disebabkan account pelanggan di lock, cek pada aplikasi embassy jika kebinding maka di unbinding, terutama untuk modem baru'), (8, 308, 'Salah username/password', 'Jika gangguan error code 70116206, disebabkan username/nomor rekening dan password salah pada settingan menu STB, cek pada aplikasi SOAP username dan password useetv yang benar> setting ulang kembali di STB'), (9, 309, 'Modem STB Rusak', 'Jika lampu indikator LINK mati, Cek kelayakan kabel UTP, connector RJ 45 dari ONT ke STB. Cek dengan modem test, apabila STB rusak dapat dilakukan penggantian modem baru'); -- -------------------------------------------------------- -- -- Table structure for table `data_gejala_internet` -- CREATE TABLE `data_gejala_internet` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `nama_gejala` varchar(128) NOT NULL, `cf_pakar` float NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gejala_internet` -- INSERT INTO `data_gejala_internet` (`id`, `kode_gejala`, `nama_gejala`, `cf_pakar`) VALUES (1, 201, 'Internet Tidak Bisa Connect', 0.6), (2, 202, 'PC Tidak Mendapatkan IP', 0.6), (3, 203, 'Ada Tunggakan Pembayaran', 1), (4, 204, 'Koneksi Lambat Pc Pelanggan di Share', 0.2), (5, 205, 'Koneksi Lambat', 0.6), (6, 206, 'Bandwidth Kecil', 0.8), (7, 207, 'Paket Internet Kuota Habis', 0.6), (8, 208, 'Koneksi Putus Putus', 0.8), (9, 209, 'Modem Tidak Normal', 0.6), (10, 210, 'Kabel Patchcord Rusak', 0.2), (11, 211, 'Tidak Bisa Browsing', 0.6), (12, 212, 'IP PC Sesuai Dengan IP Modem', 0.8), (13, 213, 'Bandwidth Tidak Sesuai Paket', 0.6), (14, 214, 'Konfigurasi Setting Hilang', 0.6), (15, 215, 'Lampu Indikator PON Mati', 0.6), (16, 216, 'Lampu Indikator LOS Merah', 0.6), (17, 217, 'Fast Connector Tidak Berfungsi/Rusak', 0.6), (18, 218, 'Lampu Indicator Power Mati', 0.6), (19, 219, 'Modem ONT Tidak Menyala', 0.6), (20, 220, 'Tidak Bisa Membuka Web Tertentu', 0.6), (21, 221, 'Proxy Tidak Sesuai', 0.6), (22, 222, 'DNS Tidak Sesuai', 0.6), (24, 223, 'Kabel Distribusi Putus', 0.6), (25, 224, 'Kabel Feder Putus', 0.6), (26, 225, 'Fanderisme', 0.6), (29, 226, 'ODP Rusak', 0.6), (44, 227, 'internet lamot kali', 0), (51, 228, 'dsdsdsd', 0); -- -------------------------------------------------------- -- -- Table structure for table `data_gejala_telepon` -- CREATE TABLE `data_gejala_telepon` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `nama_gejala` varchar(128) NOT NULL, `cf_pakar` float NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gejala_telepon` -- INSERT INTO `data_gejala_telepon` (`id`, `kode_gejala`, `nama_gejala`, `cf_pakar`) VALUES (1, 101, 'Telepon mati tidak ada nada', 0.6), (2, 102, 'Rosette lembab air', 0.6), (3, 103, 'Splitter tidak berfungsi', 0.6), (4, 104, 'Kabel PVC telepon rusak', 0.6), (5, 105, 'Connector RJ11 tidak berfungsi', 0.6), (6, 106, 'Nada telepon ngetut-tut', 0.6), (7, 107, 'Nada telepon nada panjang', 0.6), (16, 108, 'Kabel digigit tikus', 0.6), (17, 109, 'Kabel Kejepit', 0.6); -- -------------------------------------------------------- -- -- Table structure for table `data_gejala_useetv` -- CREATE TABLE `data_gejala_useetv` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `nama_gejala` varchar(128) NOT NULL, `cf_pakar` float NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `data_gejala_useetv` -- INSERT INTO `data_gejala_useetv` (`id`, `kode_gejala`, `nama_gejala`, `cf_pakar`) VALUES (1, 301, 'Gambar UseeTV Blank', 0.6), (2, 302, 'Konfigurasi Sudah Sesuai', 0.6), (3, 303, 'Error 1302', 0.6), (4, 304, 'Koneksi Ke EPG Gagal', 0.6), (5, 305, 'Error 1305', 0.6), (6, 306, 'Username Tidak Sesuai', 0.6), (7, 307, 'Password Tidak Sesuai', 0.6), (8, 308, 'Error 1901', 0.6), (9, 309, 'Error 4514', 0.6), (10, 310, 'Channel Multicast Mengalami Data Timeout', 0.6), (11, 311, 'Gambar UseeTV Putus-putus', 0.6), (12, 312, 'Konfigurasi Setting Hilang', 0.6), (13, 313, 'Penggantian Modem STB Baru', 0.6), (14, 314, 'Error 70116204', 0.6), (15, 315, 'Error 70116206', 0.6), (16, 316, 'Modem STB Tidak Menyala Atau Tidak Berfungsi', 0.6), (17, 317, 'Lampu Indikator LINK Mati', 0.6), (19, 318, 'Password Terpasang Di Perangkat Lain', 0.6); -- -------------------------------------------------------- -- -- Table structure for table `gejala_gangguan_internet` -- CREATE TABLE `gejala_gangguan_internet` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gejala_gangguan_internet` -- INSERT INTO `gejala_gangguan_internet` (`id`, `kode_gejala`, `kode_gangguan`) VALUES (14, 211, 207), (15, 213, 207), (16, 214, 207), (17, 214, 208), (18, 215, 208), (21, 218, 210), (22, 219, 210), (95, 202, 209), (96, 216, 209), (97, 217, 209), (114, 201, 202), (115, 203, 202), (126, 211, 206), (127, 212, 206), (128, 205, 204), (129, 206, 204), (130, 207, 204), (134, 204, 203), (140, 208, 205), (141, 209, 205), (142, 210, 205), (145, 201, 201), (146, 202, 201), (156, 211, 211), (157, 220, 211), (158, 221, 211), (159, 222, 211), (160, 223, 212), (161, 224, 212), (162, 225, 212), (163, 226, 212); -- -------------------------------------------------------- -- -- Table structure for table `gejala_gangguan_telepon` -- CREATE TABLE `gejala_gangguan_telepon` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gejala_gangguan_telepon` -- INSERT INTO `gejala_gangguan_telepon` (`id`, `kode_gejala`, `kode_gangguan`) VALUES (177, 106, 102), (178, 107, 102), (179, 108, 102), (180, 109, 102), (224, 101, 101), (225, 102, 101), (226, 103, 101), (227, 104, 101), (228, 105, 101); -- -------------------------------------------------------- -- -- Table structure for table `gejala_gangguan_useetv` -- CREATE TABLE `gejala_gangguan_useetv` ( `id` int(11) NOT NULL, `kode_gejala` int(11) NOT NULL, `kode_gangguan` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gejala_gangguan_useetv` -- INSERT INTO `gejala_gangguan_useetv` (`id`, `kode_gejala`, `kode_gangguan`) VALUES (7, 305, 303), (8, 306, 303), (9, 307, 303), (10, 304, 304), (11, 308, 304), (12, 309, 305), (13, 310, 305), (14, 311, 306), (15, 312, 306), (18, 306, 308), (19, 307, 308), (20, 314, 308), (23, 301, 301), (24, 302, 301), (25, 303, 302), (26, 304, 302), (30, 313, 307), (31, 314, 307), (32, 318, 307), (33, 316, 309); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(11) NOT NULL, `name` varchar(128) NOT NULL, `email` varchar(128) NOT NULL, `image` varchar(128) NOT NULL, `password` varchar(256) NOT NULL, `role_id` int(11) NOT NULL, `is_active` int(1) NOT NULL, `date_created` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `name`, `email`, `image`, `password`, `role_id`, `is_active`, `date_created`) VALUES (1, 'Khalid', 'khalid@gmail.com', 'images1.png', '$2y$10$XHFbOLoLhZLkH36JdtQmnubw2kjJ9lantNrrDiXhQjulHKoz5GrhK', 3, 1, 1569744112), (27, 'Seorang Pakar', 'pakar@gmail.com', 'osNfc9l-airbus-a380-wallpaper_(1).jpg', '$2y$10$LcpQvrcJbtTfHgPcz1KDx.Ex1VgPJn0NuzbW4Bx1zpaZvFHgAWkrG', 1, 1, 1579817521), (28, 'Seorang User', 'user@gmail.com', 'default.jpg', '$2y$10$Y3A0dZDzS3cFuDY5ebp2huEAXOoBHEiF5CDo7bzlbrjwj17LQ9zTO', 2, 1, 1579817597), (29, 'Andi', 'andi@gmail.com', 'default.jpg', '$2y$10$c/5Ls.OLa3PDWKfdxGAM6OPWfQnHLFisGZ6dNJ6Z7cd68CytT5X5.', 2, 1, 1579817628), (32, 'Didi', 'didimakriadi@gmail.com', 'default.jpg', '$2y$10$T2gE5aFf0eJCKMcGhA38ieldyVK9UkfIuXTBj12Pahi/ud0v/NPhS', 3, 1, 1605477237), (35, 'Khalid Mahfudh Al Azizi', 'khalidmahfudh94@gmail.com', 'default.jpg', '$2y$10$pn9T68AnKWvPTn.4HUkMiOx6jrK3FeLPZd/rILwlITi0VsXopHl.2', 3, 1, 1606425431); -- -------------------------------------------------------- -- -- Table structure for table `user_access_menu` -- CREATE TABLE `user_access_menu` ( `id` int(11) NOT NULL, `role_id` int(11) NOT NULL, `menu_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_access_menu` -- INSERT INTO `user_access_menu` (`id`, `role_id`, `menu_id`) VALUES (1, 1, 1), (2, 1, 2), (3, 2, 2), (4, 1, 3), (5, 2, 3), (6, 1, 4), (7, 2, 4), (8, 3, 1), (9, 3, 2), (10, 3, 3), (11, 3, 4); -- -------------------------------------------------------- -- -- Table structure for table `user_menu` -- CREATE TABLE `user_menu` ( `id` int(11) NOT NULL, `menu` varchar(128) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_menu` -- INSERT INTO `user_menu` (`id`, `menu`) VALUES (1, 'MENU PAKAR'), (2, 'KONSULTASI GANGGUAN LAYANAN'), (3, 'USER'), (4, ''); -- -------------------------------------------------------- -- -- Table structure for table `user_requests` -- CREATE TABLE `user_requests` ( `id` int(11) NOT NULL, `request` varchar(128) NOT NULL, `layanan` varchar(128) NOT NULL, `id_layanan` int(11) NOT NULL, `kode_gejala` varchar(255) NOT NULL, `kode_gangguan` int(11) NOT NULL, `nama_layanan` varchar(128) NOT NULL, `solusi` text NOT NULL, `cf_pakar` float NOT NULL, `image` varchar(128) NOT NULL, `name` varchar(128) NOT NULL, `date` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -------------------------------------------------------- -- -- Table structure for table `user_role` -- CREATE TABLE `user_role` ( `id` int(11) NOT NULL, `role` varchar(128) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_role` -- INSERT INTO `user_role` (`id`, `role`) VALUES (1, 'Pakar'), (2, 'Pelanggan'), (3, 'Teknisi'); -- -------------------------------------------------------- -- -- Table structure for table `user_sub_menu` -- CREATE TABLE `user_sub_menu` ( `id` int(11) NOT NULL, `menu_id` int(11) NOT NULL, `title` varchar(128) NOT NULL, `url` varchar(128) NOT NULL, `icon` varchar(128) NOT NULL, `is_active` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `user_sub_menu` -- INSERT INTO `user_sub_menu` (`id`, `menu_id`, `title`, `url`, `icon`, `is_active`) VALUES (1, 1, 'Manage Telepon Rumah', 'managetelepon', 'fas fa-fw fa-phone-alt', 1), (2, 1, 'Manage Internet Fiber', 'manageinternet', 'fas fa-fw fa-wifi', 1), (3, 1, 'Manage UseeTV', 'manageuseetv', 'fas fa-fw fa-tv', 1), (4, 1, 'Manage Users', 'manageusers', 'fas fa-fw fa-users-cog', 1), (5, 1, 'All Requests', 'requests', 'fas fa-fw fa-tools', 1), (6, 2, 'Gangguan Telepon Rumah', 'konsultasitelepon', 'fas fa-fw fa-phone-alt', 1), (7, 2, 'Gangguan Internet Fiber', 'konsultasiinternet', 'fas fa-fw fa-wifi', 1), (8, 2, 'Gangguan UseeTV', 'konsultasiuseetv', 'fas fa-fw fa-tv', 1), (9, 3, 'My Profile', 'user', 'fas fa-fw fa-user', 1), (10, 3, 'Edit Profile', 'user/edit', 'fas fa-fw fa-user-edit', 1), (11, 4, 'About', 'about', 'fas fa-fw fa-mobile-alt', 1), (12, 3, 'Ubah Password', 'user/ubahpassword', 'fas fa-fw fa-key', 1); -- -------------------------------------------------------- -- -- Table structure for table `user_token` -- CREATE TABLE `user_token` ( `id` int(11) NOT NULL, `email` varchar(128) NOT NULL, `token` varchar(128) NOT NULL, `date_created` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Indexes for dumped tables -- -- -- Indexes for table `data_gangguan_internet` -- ALTER TABLE `data_gangguan_internet` ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `kode_gangguan` (`kode_gangguan`); -- -- Indexes for table `data_gangguan_telepon` -- ALTER TABLE `data_gangguan_telepon` ADD PRIMARY KEY (`id`); -- -- Indexes for table `data_gangguan_useetv` -- ALTER TABLE `data_gangguan_useetv` ADD PRIMARY KEY (`id`); -- -- Indexes for table `data_gejala_internet` -- ALTER TABLE `data_gejala_internet` ADD PRIMARY KEY (`id`), ADD KEY `kode_gejala` (`kode_gejala`); -- -- Indexes for table `data_gejala_telepon` -- ALTER TABLE `data_gejala_telepon` ADD PRIMARY KEY (`id`); -- -- Indexes for table `data_gejala_useetv` -- ALTER TABLE `data_gejala_useetv` ADD PRIMARY KEY (`id`); -- -- Indexes for table `gejala_gangguan_internet` -- ALTER TABLE `gejala_gangguan_internet` ADD PRIMARY KEY (`id`), ADD KEY `kode_gangguan` (`kode_gangguan`); -- -- Indexes for table `gejala_gangguan_telepon` -- ALTER TABLE `gejala_gangguan_telepon` ADD PRIMARY KEY (`id`); -- -- Indexes for table `gejala_gangguan_useetv` -- ALTER TABLE `gejala_gangguan_useetv` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_access_menu` -- ALTER TABLE `user_access_menu` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_menu` -- ALTER TABLE `user_menu` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_requests` -- ALTER TABLE `user_requests` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_role` -- ALTER TABLE `user_role` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_sub_menu` -- ALTER TABLE `user_sub_menu` ADD PRIMARY KEY (`id`); -- -- Indexes for table `user_token` -- ALTER TABLE `user_token` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `data_gangguan_internet` -- ALTER TABLE `data_gangguan_internet` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39; -- -- AUTO_INCREMENT for table `data_gangguan_telepon` -- ALTER TABLE `data_gangguan_telepon` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43; -- -- AUTO_INCREMENT for table `data_gangguan_useetv` -- ALTER TABLE `data_gangguan_useetv` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `data_gejala_internet` -- ALTER TABLE `data_gejala_internet` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=52; -- -- AUTO_INCREMENT for table `data_gejala_telepon` -- ALTER TABLE `data_gejala_telepon` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26; -- -- AUTO_INCREMENT for table `data_gejala_useetv` -- ALTER TABLE `data_gejala_useetv` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23; -- -- AUTO_INCREMENT for table `gejala_gangguan_internet` -- ALTER TABLE `gejala_gangguan_internet` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=166; -- -- AUTO_INCREMENT for table `gejala_gangguan_telepon` -- ALTER TABLE `gejala_gangguan_telepon` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=229; -- -- AUTO_INCREMENT for table `gejala_gangguan_useetv` -- ALTER TABLE `gejala_gangguan_useetv` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36; -- -- AUTO_INCREMENT for table `user_access_menu` -- ALTER TABLE `user_access_menu` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; -- -- AUTO_INCREMENT for table `user_menu` -- ALTER TABLE `user_menu` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `user_requests` -- ALTER TABLE `user_requests` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=134; -- -- AUTO_INCREMENT for table `user_role` -- ALTER TABLE `user_role` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `user_sub_menu` -- ALTER TABLE `user_sub_menu` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14; -- -- AUTO_INCREMENT for table `user_token` -- ALTER TABLE `user_token` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=88; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
32.428369
487
0.679949
f74e111f6f0f71c880ee254d8185ae57e1675e86
69
sql
SQL
src/Azos.Sky.Social/Graph/Server/Data/Scripts/Friend/DeleteFriendListByListId.mys.sql
azist/azos-social-providers
4590860f69eae9476a5db259371882d56c9ea32a
[ "MIT" ]
null
null
null
src/Azos.Sky.Social/Graph/Server/Data/Scripts/Friend/DeleteFriendListByListId.mys.sql
azist/azos-social-providers
4590860f69eae9476a5db259371882d56c9ea32a
[ "MIT" ]
null
null
null
src/Azos.Sky.Social/Graph/Server/Data/Scripts/Friend/DeleteFriendListByListId.mys.sql
azist/azos-social-providers
4590860f69eae9476a5db259371882d56c9ea32a
[ "MIT" ]
null
null
null
DELETE FROM tbl_friendlist WHERE GDID = ?pgnode AND LID = ?plistid;
17.25
40
0.753623
fb3c467d97959011dbedec49ba70552524c538c9
1,469
java
Java
ax-adt/src/main/java/com/g2forge/alexandria/adt/associative/cache/LRUCacheEvictionPolicy.java
gdgib/alexandria
e47cdd4b15b45ec668f09af8adfa3fccc68d0e27
[ "Apache-2.0" ]
1
2020-11-23T20:14:23.000Z
2020-11-23T20:14:23.000Z
ax-adt/src/main/java/com/g2forge/alexandria/adt/associative/cache/LRUCacheEvictionPolicy.java
gdgib/alexandria
e47cdd4b15b45ec668f09af8adfa3fccc68d0e27
[ "Apache-2.0" ]
1
2019-06-09T19:10:53.000Z
2019-06-09T19:10:53.000Z
ax-adt/src/main/java/com/g2forge/alexandria/adt/associative/cache/LRUCacheEvictionPolicy.java
gdgib/alexandria
e47cdd4b15b45ec668f09af8adfa3fccc68d0e27
[ "Apache-2.0" ]
null
null
null
package com.g2forge.alexandria.adt.associative.cache; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import com.g2forge.alexandria.java.adt.identity.IIdentity; import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; @RequiredArgsConstructor @Getter(AccessLevel.PROTECTED) public class LRUCacheEvictionPolicy<K> implements ICacheEvictionPolicy<K> { protected final int size; protected final LinkedList<K> keys = new LinkedList<>(); @Override public Set<K> access(boolean create, IIdentity<? super K> identity, K key) { final LinkedList<K> keys = getKeys(); if (!create) { // If the entry for this key wasn't just created, we need to remove it from the linked list. if (IIdentity.standard().equals(identity)) keys.remove(key); else { for (final Iterator<K> iterator = keys.iterator(); iterator.hasNext();) { if (identity.equals(key, iterator.next())) { iterator.remove(); break; } } } } // Add the key to the list of keys keys.add(key); // Get all the keys older than the "size" for eviction, if any final int size = getSize(); if (keys.size() > size) { final List<K> toEvict = keys.subList(0, keys.size() - size); final Set<K> retVal = new LinkedHashSet<>(toEvict); toEvict.clear(); return retVal; } return Collections.emptySet(); } }
27.716981
95
0.709326
943c10bbdb1e52d0683f4441b12cc4b5a044531f
2,576
rs
Rust
gitty-hub/src/api/webhooks/pull.rs
DevinR528/magit
ea10c716a38b914252ecad1e79b996c13ce69ab6
[ "MIT" ]
1
2021-12-09T21:31:24.000Z
2021-12-09T21:31:24.000Z
gitty-hub/src/api/webhooks/pull.rs
DevinR528/magit
ea10c716a38b914252ecad1e79b996c13ce69ab6
[ "MIT" ]
5
2021-05-23T11:31:57.000Z
2021-07-02T01:31:48.000Z
gitty-hub/src/api/webhooks/pull.rs
DevinR528/magit
ea10c716a38b914252ecad1e79b996c13ce69ab6
[ "MIT" ]
null
null
null
use github_derive::StringEnum; use js_int::UInt; use serde::Deserialize; use crate::api::{Changes, Installation, Org, PullRequest, Repository, User}; /// The payload of a pull request event. #[derive(Clone, Debug, Deserialize)] pub struct PullRequestEvent<'a> { /// The action that was performed. pub action: PullRequestAction, /// The pull request number. pub number: UInt, /// The changes to the comment if the action was edited. /// /// Only present for [`PullAction::Edited`]. #[serde(borrow)] pub changes: Option<Changes<'a>>, /// Information about the pull request. #[serde(borrow)] pub pull_request: PullRequest<'a>, /// Detailed information about the repository that was stared. #[serde(borrow)] pub repository: Repository<'a>, /// Information about Github app installation. /// /// This is only present if the event is sent from said app. #[serde(borrow)] pub installation: Option<Installation<'a>>, /// Detailed information about the organization the repo that was stared /// belongs to. #[serde(borrow)] pub organization: Option<Org<'a>>, /// Detailed information about the user who stared the repo. #[serde(borrow)] pub sender: User<'a>, } /// The actions that can be taken for a pull request. #[derive(Clone, Debug, StringEnum)] #[github_enum(rename_all = "snake_case")] #[non_exhaustive] pub enum PullRequestAction { /// Reviewer assigned. Assigned, /// Automatic merging is disabled. AutoMergeDisabled, /// Automatic merging is enabled. AutoMergeEnabled, /// If the action is closed and the merged key is false, the pull request was /// closed with unmerged commits. If the action is closed and the merged key /// is true, the pull request was merged. Closed, /// Convert this pull request to a draft. ConvertToDraft, /// Edited the pull request. Edited, /// Added a label to the pull request. Labeled, /// Locked all further changes. Locked, /// Opened a new pull request. Opened, /// Marked as ready for review. ReadyForReview, /// Reopened a pull request. Reopened, /// A review requested has been removed. ReviewRequestedRemoved, /// A review has been requested. ReviewRequested, /// Pull request has been synchronized. Synchronize, /// Pull request has been unassigned. Unassigned, /// Pull request has been unlabeled. Unlabeled, /// Pull request has been unlocked. Unlocked, }
24.769231
81
0.660326
511342a3bfc2e5d360566631be08647c99e70624
723
h
C
Engine/Monkey/Graphics/Texture/TextureBase.h
suijingfeng/VulkanTutorials
d1b0bab7fe5f1a9b69f18e49e60b54b8a9afdefa
[ "MIT" ]
2
2020-09-06T08:02:17.000Z
2021-06-24T16:18:59.000Z
Engine/Monkey/Graphics/Texture/TextureBase.h
suijingfeng/VulkanTutorials
d1b0bab7fe5f1a9b69f18e49e60b54b8a9afdefa
[ "MIT" ]
null
null
null
Engine/Monkey/Graphics/Texture/TextureBase.h
suijingfeng/VulkanTutorials
d1b0bab7fe5f1a9b69f18e49e60b54b8a9afdefa
[ "MIT" ]
1
2021-06-24T16:19:00.000Z
2021-06-24T16:19:00.000Z
#pragma once #include "Vulkan/VulkanPlatform.h" class Texture2D; class TextureBase { public: TextureBase(); virtual ~TextureBase(); bool IsValid() const { return !m_Invalid; } const VkDescriptorImageInfo& GetDescriptorImageInfo() const { return m_DescriptorInfo; } protected: friend class Texture2D; protected: VkImage m_Image; VkImageLayout m_ImageLayout; VkDeviceMemory m_ImageMemory; VkImageView m_ImageView; VkSampler m_ImageSampler; VkDescriptorImageInfo m_DescriptorInfo; uint32 m_Width; uint32 m_Height; uint32 m_Depth; uint32 m_MipLevels; uint32 m_LayerCount; VkFormat m_Format; bool m_Invalid; };
15.382979
63
0.691563
758ecab12f45f21bd5e2af7ba386d69bf00786a4
1,859
rs
Rust
src/http/models/message.rs
mbenoukaiss/automate
4f1db11f2d6c405b2f8e97499983ba5bfee75d96
[ "MIT" ]
14
2019-11-27T07:11:47.000Z
2020-08-10T20:41:38.000Z
src/http/models/message.rs
mbenoukaiss/automate
4f1db11f2d6c405b2f8e97499983ba5bfee75d96
[ "MIT" ]
5
2019-12-29T19:16:48.000Z
2020-08-17T14:14:34.000Z
src/http/models/message.rs
mbenoukaiss/automate
4f1db11f2d6c405b2f8e97499983ba5bfee75d96
[ "MIT" ]
1
2019-12-04T04:04:34.000Z
2019-12-04T04:04:34.000Z
use crate::gateway::Embed; use crate::Snowflake; /// See [HttpApi::create_message](automate::HttpAPI::create_message) /// for documentation. /// /// You may create a message as a reply to another message. To do so, /// include a [`message_reference`](#DOCS_RESOURCES_CHANNEL/message-object-message-reference-structure) /// with a `message_id`. This requires the `VIEW MESSAGE HISTORY` /// permission, and the referenced message must exist and cannot be /// a system message. The `channel_id` and `guild_id` in the /// `message_reference` are optional, but will be validated if provided. #[object(client, default)] pub struct CreateMessage { pub content: Option<String>, pub nonce: Option<Snowflake>, pub tts: bool, pub embed: Option<Embed>, pub allowed_mentions: Option<AllowedMentions>, pub message_reference: Option<Snowflake>, pub attachment: Option<CreateAttachment>, } #[stringify(snake_case)] pub enum AllowedMentionType { /// Controls role mentions Roles, /// Controls user mentions Users, /// Controls `@everyone` and `@here` mentions Everyone, } #[object(client, default)] pub struct AllowedMentions { /// An array of mention types to parse from the content. pub parse: Vec<AllowedMentionType>, /// An array of roles that can be mentioned, maximum 100. pub roles: Vec<Snowflake>, /// An array of users that can be mentioned, maximum 100. pub users: Vec<Snowflake>, /// For replies, whether to mention the author of the /// message being replied to (default false) pub replied_user: bool, } #[object(client, default)] pub struct CreateAttachment { pub name: String, pub mime: String, pub content: Vec<u8>, } #[object(client, default)] pub struct ModifyMessage { pub content: Option<String>, pub embed: Option<Embed>, pub flags: u32 }
30.983333
103
0.703066
5e43001c6d10e6f6a2a83f387e67b7d237a3429e
102
asm
Assembly
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/acos_fastcall.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/acos_fastcall.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/acos_fastcall.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
SECTION code_fp_math16 PUBLIC _acosf16_fastcall EXTERN acosf16 defc _acosf16_fastcall = acosf16
14.571429
33
0.833333
e2c3c794fa3501415de6fbf43de6fb67e07e2382
669
dart
Dart
lib/app/views/auth/widgets/circle.dart
Yoga3911/sulai
7e20e3bbd170da1fc0792b2d632178a1d4375f7e
[ "MIT" ]
2
2022-03-31T07:06:51.000Z
2022-03-31T09:32:39.000Z
lib/app/views/auth/widgets/circle.dart
Yoga3911/sulai
7e20e3bbd170da1fc0792b2d632178a1d4375f7e
[ "MIT" ]
null
null
null
lib/app/views/auth/widgets/circle.dart
Yoga3911/sulai
7e20e3bbd170da1fc0792b2d632178a1d4375f7e
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; class PositionedCircle extends StatelessWidget { const PositionedCircle({Key? key, required this.boxShadow, required this.top, required this.color}) : super(key: key); final List<BoxShadow> boxShadow; final double top; final Color color; @override Widget build(BuildContext context) { final size = MediaQuery.of(context).size; return Transform.scale( scale: 3, child: Container( height: size.height, width: size.height, decoration: BoxDecoration( boxShadow: boxShadow, color: color, shape: BoxShape.circle, ), ), ); } }
24.777778
120
0.647235
5d80974c4446752e55c6ea449fb29dae498c764a
40,027
go
Go
api/go/src/tgdb/impl/modelimpl.go
TIBCOSoftware/tgdb-client
92d0c8401003420cacdd90de56db877eae2d02d1
[ "Apache-2.0" ]
19
2018-01-22T19:45:34.000Z
2018-11-21T20:51:17.000Z
api/go/src/tgdb/impl/modelimpl.go
TIBCOSoftware/tgdb-client
92d0c8401003420cacdd90de56db877eae2d02d1
[ "Apache-2.0" ]
null
null
null
api/go/src/tgdb/impl/modelimpl.go
TIBCOSoftware/tgdb-client
92d0c8401003420cacdd90de56db877eae2d02d1
[ "Apache-2.0" ]
8
2016-10-29T17:41:06.000Z
2021-02-25T19:18:49.000Z
/* * Copyright 2019 TIBCO Software Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except * in compliance with the License. * A copy of the License is included in the distribution package with this file. * You also 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. * * File Name: modelimpl.go * Created on: 11/13/2019 * Created by: nimish * * SVN Id: $Id: modelimpl.go 4270 2020-08-19 22:18:58Z nimish $ */ package impl import ( "bytes" "encoding/gob" "fmt" "strings" "tgdb" ) var logger = DefaultTGLogManager().GetLogger() type GraphMetadata struct { initialized bool descriptors map[string]tgdb.TGAttributeDescriptor descriptorsById map[int64]tgdb.TGAttributeDescriptor edgeTypes map[string]tgdb.TGEdgeType edgeTypesById map[int]tgdb.TGEdgeType nodeTypes map[string]tgdb.TGNodeType nodeTypesById map[int]tgdb.TGNodeType graphObjFactory *GraphObjectFactory } type GraphObjectFactory struct { graphMData *GraphMetadata connection tgdb.TGConnection } // TODO: Revisit later - Once SetAttributeViaDescriptor is properly implemented after discussing with TGDB Engineering Team func setAttributeViaDescriptor(obj tgdb.TGEntity, attrDesc *AttributeDescriptor, value interface{}) tgdb.TGError { if attrDesc == nil { logger.Error(fmt.Sprint("ERROR: Returning AbstractEntity:setAttributeViaDescriptor as AttrDesc is EMPTY")) errMsg := fmt.Sprintf("Attribute Descriptor cannot be null") return GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } if value == nil { logger.Error(fmt.Sprint("ERROR: Returning AbstractEntity:setAttributeViaDescriptor as value is EMPTY")) errMsg := fmt.Sprintf("Attribute value is required") return GetErrorByType(TGErrorIOException, INTERNAL_SERVER_ERROR, errMsg, "") } // TODO: Do we need to validate if this descriptor exists as part of Graph Meta Data??? // If attribute is not present in the set, create a new one attrDescName := attrDesc.GetName() attr := obj.(*AbstractEntity).Attributes[attrDescName] if attr == nil { if attrDesc.GetAttrType() == AttributeTypeInvalid { logger.Error(fmt.Sprint("ERROR: Returning AbstractEntity:setAttributeViaDescriptor as AttrDesc.GetAttrType() == types.AttributeTypeInvalid")) errMsg := fmt.Sprintf("Attribute descriptor is of incorrect type") return GetErrorByType(TGErrorIOException, INTERNAL_SERVER_ERROR, errMsg, "") } // TODO: Revisit later - For some reason, it goes in infinite loop, alternative is to create attribute and assign owner and value later //newAttr, aErr := CreateAttribute(obj, AttrDesc, value) newAttr, aErr := CreateAttributeWithDesc(nil, attrDesc, nil) if aErr != nil { logger.Error(fmt.Sprintf("ERROR: Returning AbstractEntity:setAttributeViaDescriptor unable to create attribute '%s' w/ descriptor and value '%+v'", attrDesc, value)) return aErr } newAttr.SetOwner(obj) attr = newAttr } // Value can be null here if !attr.GetIsModified() { obj.(*AbstractEntity).ModifiedAttributes = append(obj.(*AbstractEntity).ModifiedAttributes, attr) } // Set the attribute value err := attr.SetValue(value) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning AbstractEntity:setAttributeViaDescriptor unable to set attribute value w/ error '%+v'", err.Error())) return err } // Add it to the set obj.(*AbstractEntity).Attributes[attrDesc.Name] = attr return nil } func DefaultGraphMetadata() *GraphMetadata { // We must register the concrete type for the encoder and decoder (which would // normally be on a separate machine from the encoder). On each end, this tells the // engine which concrete type is being sent that implements the interface. gob.Register(GraphMetadata{}) newGraphMetadata := GraphMetadata{ initialized: false, descriptors: make(map[string]tgdb.TGAttributeDescriptor, 0), descriptorsById: make(map[int64]tgdb.TGAttributeDescriptor, 0), edgeTypes: make(map[string]tgdb.TGEdgeType, 0), edgeTypesById: make(map[int]tgdb.TGEdgeType, 0), nodeTypes: make(map[string]tgdb.TGNodeType, 0), nodeTypesById: make(map[int]tgdb.TGNodeType, 0), } return &newGraphMetadata } func NewGraphMetadata(gof *GraphObjectFactory) *GraphMetadata { newGraphMetadata := DefaultGraphMetadata() newGraphMetadata.graphObjFactory = gof return newGraphMetadata } ///////////////////////////////////////////////////////////////// // Helper functions for types.TGGraphMetadata ///////////////////////////////////////////////////////////////// func (obj *GraphMetadata) GetNewAttributeDescriptors() ([]tgdb.TGAttributeDescriptor, tgdb.TGError) { if obj.descriptors == nil || len(obj.descriptors) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetNewAttributeDescriptors as there are NO new AttrDesc`")) return nil, nil } attrDesc := make([]tgdb.TGAttributeDescriptor, 0) for _, desc := range obj.descriptors { if desc.(*AttributeDescriptor).GetAttributeId() < 0 { attrDesc = append(attrDesc, desc) } } return attrDesc, nil } func (obj *GraphMetadata) GetConnection() tgdb.TGConnection { return obj.graphObjFactory.GetConnection() } func (obj *GraphMetadata) GetGraphObjectFactory() *GraphObjectFactory { return obj.graphObjFactory } func (obj *GraphMetadata) GetAttributeDescriptorsById() map[int64]tgdb.TGAttributeDescriptor { return obj.descriptorsById } func (obj *GraphMetadata) GetEdgeTypesById() map[int]tgdb.TGEdgeType { return obj.edgeTypesById } func (obj *GraphMetadata) GetNodeTypesById() map[int]tgdb.TGNodeType { return obj.nodeTypesById } func (obj *GraphMetadata) IsInitialized() bool { return obj.initialized } func (obj *GraphMetadata) SetInitialized(flag bool) { obj.initialized = flag } func (obj *GraphMetadata) SetAttributeDescriptors(attrDesc map[string]tgdb.TGAttributeDescriptor) { obj.descriptors = attrDesc } func (obj *GraphMetadata) SetAttributeDescriptorsById(attrDescId map[int64]tgdb.TGAttributeDescriptor) { obj.descriptorsById = attrDescId } func (obj *GraphMetadata) SetEdgeTypes(edgeTypes map[string]tgdb.TGEdgeType) { obj.edgeTypes = edgeTypes } func (obj *GraphMetadata) SetEdgeTypesById(edgeTypesId map[int]tgdb.TGEdgeType) { obj.edgeTypesById = edgeTypesId } func (obj *GraphMetadata) SetNodeTypes(nodeTypes map[string]tgdb.TGNodeType) { obj.nodeTypes = nodeTypes } func (obj *GraphMetadata) SetNodeTypesById(nodeTypes map[int]tgdb.TGNodeType) { obj.nodeTypesById = nodeTypes } func (obj *GraphMetadata) UpdateMetadata(attrDescList []tgdb.TGAttributeDescriptor, nodeTypeList []tgdb.TGNodeType, edgeTypeList []tgdb.TGEdgeType) tgdb.TGError { if attrDescList != nil { for _, attrDesc := range attrDescList { obj.descriptors[attrDesc.GetName()] = attrDesc.(*AttributeDescriptor) obj.descriptorsById[attrDesc.GetAttributeId()] = attrDesc.(*AttributeDescriptor) } } if nodeTypeList != nil { for _, nodeType := range nodeTypeList { nodeType.(*NodeType).UpdateMetadata(obj) obj.nodeTypes[nodeType.GetName()] = nodeType.(*NodeType) obj.nodeTypesById[nodeType.GetEntityTypeId()] = nodeType.(*NodeType) } } if edgeTypeList != nil { for _, edgeType := range edgeTypeList { edgeType.(*EdgeType).UpdateMetadata(obj) obj.edgeTypes[edgeType.GetName()] = edgeType.(*EdgeType) obj.edgeTypesById[edgeType.GetEntityTypeId()] = edgeType.(*EdgeType) } } obj.initialized = true return nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> types.TGGraphMetadata ///////////////////////////////////////////////////////////////// // CreateAttributeDescriptor creates Attribute Descriptor func (obj *GraphMetadata) CreateAttributeDescriptor(attrName string, attrType int, isArray bool) tgdb.TGAttributeDescriptor { newAttrDesc := NewAttributeDescriptorAsArray(attrName, attrType, isArray) obj.descriptors[attrName] = newAttrDesc return newAttrDesc } // CreateAttributeDescriptorForDataType creates Attribute Descriptor for data/attribute type - New in GO Lang func (obj *GraphMetadata) CreateAttributeDescriptorForDataType(attrName string, dataTypeClassName string) tgdb.TGAttributeDescriptor { attrType := GetAttributeTypeFromName(dataTypeClassName) if logger.IsDebug() { logger.Debug(fmt.Sprintf("GraphMetadata CreateAttributeDescriptorForDataType creating attribute descriptor for '%+v' w/ type '%+v'", attrName, attrType)) } newAttrDesc := NewAttributeDescriptorAsArray(attrName, attrType.GetTypeId(), false) obj.descriptors[attrName] = newAttrDesc return newAttrDesc } // GetAttributeDescriptor gets the Attribute Descriptor by Name func (obj *GraphMetadata) GetAttributeDescriptor(attrName string) (tgdb.TGAttributeDescriptor, tgdb.TGError) { if obj.descriptors == nil || len(obj.descriptors) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetAttributeDescriptor as there are NO AttrDesc`")) return nil, nil } desc := obj.descriptors[attrName] //if desc == nil || desc.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Attribute Descriptors") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return desc, nil } // GetAttributeDescriptorById gets the Attribute Descriptor by Name func (obj *GraphMetadata) GetAttributeDescriptorById(id int64) (tgdb.TGAttributeDescriptor, tgdb.TGError) { if obj.descriptorsById == nil || len(obj.descriptorsById) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetAttributeDescriptorById as there are NO AttrDesc`")) return nil, nil } desc := obj.descriptorsById[id] //if desc.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Attribute Descriptors") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return desc, nil } // GetAttributeDescriptors gets a list of Attribute Descriptors func (obj *GraphMetadata) GetAttributeDescriptors() ([]tgdb.TGAttributeDescriptor, tgdb.TGError) { if obj.descriptors == nil || len(obj.descriptors) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetAttributeDescriptors as there are NO AttrDesc`")) return nil, nil } attrDesc := make([]tgdb.TGAttributeDescriptor, 0) for _, desc := range obj.descriptors { attrDesc = append(attrDesc, desc) } return attrDesc, nil } // CreateCompositeKey creates composite key func (obj *GraphMetadata) CreateCompositeKey(nodeTypeName string) tgdb.TGKey { compKey := NewCompositeKey(obj, nodeTypeName) return compKey } // CreateEdgeType creates Edge Type func (obj *GraphMetadata) CreateEdgeType(typeName string, parentEdgeType tgdb.TGEdgeType) tgdb.TGEdgeType { newEdgeType := NewEdgeType(typeName, parentEdgeType.GetDirectionType(), parentEdgeType) return newEdgeType } // GetEdgeType returns the Edge by Name func (obj *GraphMetadata) GetEdgeType(typeName string) (tgdb.TGEdgeType, tgdb.TGError) { if obj.edgeTypes == nil || len(obj.edgeTypes) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetEdgeType as there are NO edges`")) return nil, nil } edge := obj.edgeTypes[typeName] //if edge.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Edges") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return edge, nil } // GetEdgeTypeById returns the Edge Type by id func (obj *GraphMetadata) GetEdgeTypeById(id int) (tgdb.TGEdgeType, tgdb.TGError) { if obj.edgeTypesById == nil || len(obj.edgeTypesById) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetEdgeTypeById as there are NO edges`")) return nil, nil } edge := obj.edgeTypesById[id] //if edge.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Edges") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return edge, nil } // GetEdgeTypes returns a set of know edge Type func (obj *GraphMetadata) GetEdgeTypes() ([]tgdb.TGEdgeType, tgdb.TGError) { if obj.edgeTypes == nil || len(obj.edgeTypes) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetEdgeTypes as there are NO edges`")) return nil, nil } edgeTypes := make([]tgdb.TGEdgeType, 0) for _, edgeType := range obj.edgeTypes { edgeTypes = append(edgeTypes, edgeType) } return edgeTypes, nil } // CreateNodeType creates a Node Type func (obj *GraphMetadata) CreateNodeType(typeName string, parentNodeType tgdb.TGNodeType) tgdb.TGNodeType { newNodeType := NewNodeType(typeName, parentNodeType) return newNodeType } // GetNodeType gets Node Type by Name func (obj *GraphMetadata) GetNodeType(typeName string) (tgdb.TGNodeType, tgdb.TGError) { if obj.nodeTypes == nil || len(obj.nodeTypes) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetNodeType as there are NO nodes")) return nil, nil } node := obj.nodeTypes[typeName] //if node.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Nodes") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return node, nil } // GetNodeTypeById returns the Node types by id func (obj *GraphMetadata) GetNodeTypeById(id int) (tgdb.TGNodeType, tgdb.TGError) { if obj.nodeTypesById == nil || len(obj.nodeTypesById) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetNodeTypeById as there are NO nodes")) return nil, nil } node := obj.nodeTypesById[id] if logger.IsDebug() { logger.Debug(fmt.Sprintf("Returning GraphMetadata:GetNodeTypeById read node as '%+v'", node)) } //if node.GetSystemType() == types.SystemTypeInvalid { // errMsg := fmt.Sprintf("There are no Nodes") // return nil, exception.GetErrorByType(types.TGErrorGeneralException, types.INTERNAL_SERVER_ERROR, errMsg, "") //} return node, nil } // GetNodeTypes returns a set of Node Type defined in the System func (obj *GraphMetadata) GetNodeTypes() ([]tgdb.TGNodeType, tgdb.TGError) { if obj.nodeTypes == nil || len(obj.nodeTypes) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning GraphMetadata:GetNodeTypes as there are NO nodes")) return nil, nil } nodeTypes := make([]tgdb.TGNodeType, 0) for _, nodeType := range obj.nodeTypes { nodeTypes = append(nodeTypes, nodeType) } return nodeTypes, nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> types.TGSerializable ///////////////////////////////////////////////////////////////// // ReadExternal reads the byte format from an external input stream and constructs a system object func (obj *GraphMetadata) ReadExternal(is tgdb.TGInputStream) tgdb.TGError { // No-op for Now return nil } // WriteExternal writes a system object into an appropriate byte format onto an external output stream func (obj *GraphMetadata) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError { // No-op for Now return nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryMarshaller ///////////////////////////////////////////////////////////////// func (obj *GraphMetadata) MarshalBinary() ([]byte, error) { // A simple encoding: plain text. var b bytes.Buffer _, err := fmt.Fprintln(&b, obj.initialized, obj.descriptors, obj.descriptorsById, obj.edgeTypes, obj.edgeTypesById, obj.nodeTypes, obj.nodeTypesById, obj.graphObjFactory) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning GraphMetadata:MarshalBinary w/ Error: '%+v'", err.Error())) return nil, err } return b.Bytes(), nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryUnmarshaller ///////////////////////////////////////////////////////////////// func (obj *GraphMetadata) UnmarshalBinary(data []byte) error { // A simple encoding: plain text. b := bytes.NewBuffer(data) _, err := fmt.Fscanln(b, &obj.initialized, &obj.descriptors, &obj.descriptorsById, &obj.edgeTypes, &obj.edgeTypesById, &obj.nodeTypes, &obj.nodeTypesById, &obj.graphObjFactory) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning GraphMetadata:UnmarshalBinary w/ Error: '%+v'", err.Error())) return err } return nil } func DefaultGraphObjectFactory() *GraphObjectFactory { // We must register the concrete type for the encoder and decoder (which would // normally be on a separate machine from the encoder). On each end, this tells the // engine which concrete type is being sent that implements the interface. gob.Register(GraphObjectFactory{}) newGraphObjectFactory := GraphObjectFactory{} return &newGraphObjectFactory } func NewGraphObjectFactory(conn tgdb.TGConnection) *GraphObjectFactory { newGraphObjectFactory := DefaultGraphObjectFactory() // TODO: Graph meta data cannot be passed in. // There will be one meta data object per object factory and one object factory per connection even though // connections can share the same channel. How do we handle update notifications from other clients? newGraphObjectFactory.graphMData = NewGraphMetadata(newGraphObjectFactory) newGraphObjectFactory.connection = conn return newGraphObjectFactory } ///////////////////////////////////////////////////////////////// // Helper functions for GraphObjectFactory ///////////////////////////////////////////////////////////////// func (obj *GraphObjectFactory) GetConnection() tgdb.TGConnection { return obj.connection } func (obj *GraphObjectFactory) GetGraphMetaData() *GraphMetadata { return obj.graphMData } // TODO: Revisit later to optimize and consolidate common functions here instead of each individual structure implementation ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> TGGraphObjectFactory ///////////////////////////////////////////////////////////////// // CreateCompositeKey creates a CompositeKey for a SystemTypeNode. The composite key can also be a single key func (obj *GraphObjectFactory) CreateCompositeKey(nodeTypeName string) (tgdb.TGKey, tgdb.TGError) { _, err := obj.graphMData.GetNodeType(nodeTypeName) if err != nil { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateCompositeKey as node NOT found")) errMsg := fmt.Sprintf("Node desc with Name %s not found", nodeTypeName) return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } return NewCompositeKey(obj.graphMData, nodeTypeName), nil } // CreateEdgeWithEdgeType creates an Edge func (obj *GraphObjectFactory) CreateEdgeWithEdgeType(fromNode tgdb.TGNode, toNode tgdb.TGNode, edgeType tgdb.TGEdgeType) (tgdb.TGEdge, tgdb.TGError) { newEdge := NewEdgeWithEdgeType(obj.graphMData, fromNode, toNode, edgeType) if newEdge.isInitialized != true { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateEdgeWithEdgeType as edge in NOT initialized")) errMsg := fmt.Sprintf("Unable to create an edge with type %s", edgeType.(*EdgeType).Name) return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } fromNode.AddEdge(newEdge) toNode.AddEdge(newEdge) return newEdge, nil } // CreateEdgeWithDirection creates an Edge with a direction func (obj *GraphObjectFactory) CreateEdgeWithDirection(fromNode tgdb.TGNode, toNode tgdb.TGNode, directionType tgdb.TGDirectionType) (tgdb.TGEdge, tgdb.TGError) { newEdge := NewEdgeWithDirection(obj.graphMData, fromNode, toNode, directionType) if newEdge.isInitialized != true { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateEdgeWithDirection as edge in NOT initialized")) errMsg := fmt.Sprintf("Unable to create an edge with direction %s", directionType) return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } fromNode.AddEdge(newEdge) toNode.AddEdge(newEdge) return newEdge, nil } // CreateEntity creates entity based on the entity kind specified func (obj *GraphObjectFactory) CreateEntity(entityKind tgdb.TGEntityKind) (tgdb.TGEntity, tgdb.TGError) { switch entityKind { case tgdb.EntityKindNode: return NewNode(obj.graphMData), nil case tgdb.EntityKindEdge: return NewEdge(obj.graphMData), nil case tgdb.EntityKindGraph: return NewGraph(obj.graphMData), nil } logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateEntity as entity kind specified is INVALID")) errMsg := fmt.Sprintf("Invalid entity kind %d specified", entityKind) return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } // CreateEntityId creates entity id from input buffer func (obj *GraphObjectFactory) CreateEntityId(buf []byte) (tgdb.TGEntityId, tgdb.TGError) { return NewByteArrayEntity(buf), nil } // CreateGraph creates a Graph func (obj *GraphObjectFactory) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError) { graph := NewGraphWithName(obj.graphMData, name) if graph.isInitialized != true { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateGraph as graph in NOT initialized")) errMsg := fmt.Sprint("Unable to create a graph with this Graph Object Factory") return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } return graph, nil } // CreateNode creates a Node func (obj *GraphObjectFactory) CreateNode() (tgdb.TGNode, tgdb.TGError) { node := NewNode(obj.graphMData) if node.isInitialized != true { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateNode as node in NOT initialized")) errMsg := fmt.Sprint("Unable to create a node with this Graph Object Factory") return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } return node, nil } // CreateNodeInGraph creates Node within this Graph. There is a default Root Graph. func (obj *GraphObjectFactory) CreateNodeInGraph(nodeType tgdb.TGNodeType) (tgdb.TGNode, tgdb.TGError) { node := NewNodeWithType(obj.graphMData, nodeType) if node.isInitialized != true { logger.Error(fmt.Sprint("ERROR: Returning GraphObjectFactory:CreateNodeInGraph as node in NOT initialized")) errMsg := fmt.Sprint("Unable to create a node with this Graph Object Factory") return nil, GetErrorByType(TGErrorGeneralException, INTERNAL_SERVER_ERROR, errMsg, "") } return node, nil } // The following methods are indirectly used by encoding/gob methods that are used above ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryMarshaller ///////////////////////////////////////////////////////////////// func (obj *GraphObjectFactory) MarshalBinary() ([]byte, error) { // A simple encoding: plain text. var b bytes.Buffer _, err := fmt.Fprintln(&b, obj.graphMData, obj.connection) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning GraphObjectFactory:MarshalBinary w/ Error: '%+v'", err.Error())) return nil, err } return b.Bytes(), nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryUnmarshaller ///////////////////////////////////////////////////////////////// func (obj *GraphObjectFactory) UnmarshalBinary(data []byte) error { // A simple encoding: plain text. b := bytes.NewBuffer(data) _, err := fmt.Fscanln(b, &obj.graphMData, &obj.connection) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning GraphObjectFactory:UnmarshalBinary w/ Error: '%+v'", err.Error())) return err } return nil } type Graph struct { *Node name string } func DefaultGraph() *Graph { // We must register the concrete type for the encoder and decoder (which would // normally be on a separate machine from the encoder). On each end, this tells the // engine which concrete type is being sent that implements the interface. gob.Register(Graph{}) newGraph := Graph{ Node: DefaultNode(), } newGraph.EntityKind = tgdb.EntityKindGraph return &newGraph } func NewGraph(gmd *GraphMetadata) *Graph { newGraph := DefaultGraph() newGraph.graphMetadata = gmd return newGraph } func NewGraphWithName(gmd *GraphMetadata, name string) *Graph { newGraph := NewGraph(gmd) newGraph.name = name return newGraph } ///////////////////////////////////////////////////////////////// // Helper functions for Graph ///////////////////////////////////////////////////////////////// func (obj *Graph) GetModifiedAttributes() []tgdb.TGAttribute { return obj.getModifiedAttributes() } func (obj *Graph) GetName() string { return obj.name } func (obj *Graph) SetName(name string) { obj.name = name } // TODO: Revisit later - Ask TGDB Engineering Team as to if-n-how implement these methods ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> TGGraph ///////////////////////////////////////////////////////////////// func (obj *Graph) AddNode(node tgdb.TGNode) (tgdb.TGGraph, tgdb.TGError) { return obj, nil } func (obj *Graph) AddEdges(edges []tgdb.TGEdge) (tgdb.TGGraph, tgdb.TGError) { return obj, nil } func (obj *Graph) GetNode(filter tgdb.TGFilter) (tgdb.TGNode, tgdb.TGError) { return nil, nil } func (obj *Graph) ListNodes(filter tgdb.TGFilter, recurseAllSubGraphs bool) (tgdb.TGNode, tgdb.TGError) { return nil, nil } func (obj *Graph) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError) { return nil, nil } func (obj *Graph) RemoveGraph(name string) (tgdb.TGGraph, tgdb.TGError) { return nil, nil } func (obj *Graph) RemoveNode(node tgdb.TGNode) (tgdb.TGGraph, tgdb.TGError) { return nil, nil } func (obj *Graph) RemoveNodes(filter tgdb.TGFilter) int { return 0 } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> TGNode ///////////////////////////////////////////////////////////////// func (obj *Graph) AddEdge(edge tgdb.TGEdge) { obj.Edges = append(obj.Edges, edge) } func (obj *Graph) AddEdgeWithDirectionType(node tgdb.TGNode, edgeType tgdb.TGEdgeType, directionType tgdb.TGDirectionType) tgdb.TGEdge { newEdge := NewEdgeWithDirection(obj.graphMetadata, obj, node, directionType) obj.AddEdge(newEdge) return newEdge } func (obj *Graph) GetEdges() []tgdb.TGEdge { return obj.Edges } func (obj *Graph) GetEdgesForDirectionType(directionType tgdb.TGDirectionType) []tgdb.TGEdge { edgesWithDirections := make([]tgdb.TGEdge, 0) if len(obj.Edges) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning Graph:GetEdgesForDirectionType as there are NO edges")) return edgesWithDirections } for _, edge := range obj.Edges { if edge.(*Edge).directionType == directionType { edgesWithDirections = append(edgesWithDirections, edge) } } return edgesWithDirections } func (obj *Graph) GetEdgesForEdgeType(edgeType tgdb.TGEdgeType, direction tgdb.TGDirection) []tgdb.TGEdge { edgesWithDirections := make([]tgdb.TGEdge, 0) if len(obj.Edges) == 0 { logger.Warning(fmt.Sprint("WARNING: Returning Graph:GetEdgesForEdgeType as there are NO edges")) return edgesWithDirections } if edgeType == nil && direction == tgdb.DirectionAny { for _, edge := range obj.Edges { if edge.(*Edge).GetIsInitialized() { edgesWithDirections = append(edgesWithDirections, edge) } } if logger.IsDebug() { logger.Debug(fmt.Sprint("Returning Graph:GetEdgesForEdgeType w/ all edges of ANY directions")) } return obj.Edges } for _, edge := range obj.Edges { if !edge.(*Edge).GetIsInitialized() { logger.Warning(fmt.Sprintf("WARNING: Returning Graph:GetEdgesForEdgeType - skipping uninitialized edge '%+v'", edge)) continue } eType := edge.GetEntityType() if edgeType != nil && eType != nil && eType.GetName() != edgeType.GetName() { logger.Warning(fmt.Sprintf("WARNING: Returning Graph:GetEdgesForEdgeType - skipping (entity type NOT matching) edge '%+v'", edge)) continue } if direction == tgdb.DirectionAny { edgesWithDirections = append(edgesWithDirections, edge) } else if direction == tgdb.DirectionOutbound { edgesForThisNode := edge.GetVertices() if obj.GetVirtualId() == edgesForThisNode[0].GetVirtualId() { edgesWithDirections = append(edgesWithDirections, edge) } } else { edgesForThisNode := edge.GetVertices() if obj.GetVirtualId() == edgesForThisNode[1].GetVirtualId() { edgesWithDirections = append(edgesWithDirections, edge) } } } return edgesWithDirections } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> TGEntity ///////////////////////////////////////////////////////////////// // GetAttribute gets the attribute for the Name specified func (obj *Graph) GetAttribute(attrName string) tgdb.TGAttribute { return obj.getAttribute(attrName) } // GetAttributes lists of all the Attributes set func (obj *Graph) GetAttributes() ([]tgdb.TGAttribute, tgdb.TGError) { return obj.getAttributes() } // GetEntityKind returns the EntityKind as a constant func (obj *Graph) GetEntityKind() tgdb.TGEntityKind { return obj.getEntityKind() } // GetEntityType returns the EntityType func (obj *Graph) GetEntityType() tgdb.TGEntityType { return obj.getEntityType() } // GetGraphMetadata returns the Graph Meta Data - New in GO Lang func (obj *Graph) GetGraphMetadata() tgdb.TGGraphMetadata { return obj.getGraphMetadata() } // GetIsDeleted checks whether this entity is already deleted in the system or not func (obj *Graph) GetIsDeleted() bool { return obj.getIsDeleted() } // GetIsNew checks whether this entity that is currently being added to the system is new or not func (obj *Graph) GetIsNew() bool { return obj.getIsNew() } // GetVersion gets the version of the Entity func (obj *Graph) GetVersion() int { return obj.getVersion() } // GetVirtualId gets Entity identifier // At the time of creation before reaching the server, it is the virtual id // Upon successful creation, server returns a valid entity id that gets set in place of virtual id func (obj *Graph) GetVirtualId() int64 { return obj.getVirtualId() } // IsAttributeSet checks whether this entity is an Attribute set or not func (obj *Graph) IsAttributeSet(attrName string) bool { return obj.isAttributeSet(attrName) } // ResetModifiedAttributes resets the dirty flag on Attributes func (obj *Graph) ResetModifiedAttributes() { obj.resetModifiedAttributes() } // SetAttribute associates the specified Attribute to this Entity func (obj *Graph) SetAttribute(attr tgdb.TGAttribute) tgdb.TGError { return obj.setAttribute(attr) } // SetOrCreateAttribute dynamically associates the attribute to this entity // If the AttributeDescriptor doesn't exist in the database, create a new one func (obj *Graph) SetOrCreateAttribute(name string, value interface{}) tgdb.TGError { return obj.setOrCreateAttribute(name, value) } // SetEntityId sets Entity id and reset Virtual id after creation func (obj *Graph) SetEntityId(id int64) { obj.setEntityId(id) } // SetIsDeleted set the deleted flag func (obj *Graph) SetIsDeleted(flag bool) { obj.setIsDeleted(flag) } // SetIsInitialized set the initialized flag func (obj *Graph) SetIsInitialized(flag bool) { obj.setIsInitialized(flag) } // SetIsNew sets the flag that this is a new entity func (obj *Graph) SetIsNew(flag bool) { obj.setIsNew(flag) } // SetVersion sets the version of the Entity func (obj *Graph) SetVersion(version int) { obj.setVersion(version) } func (obj *Graph) String() string { var buffer bytes.Buffer buffer.WriteString("Graph:{") buffer.WriteString(fmt.Sprintf("Name: %+v", obj.name)) //buffer.WriteString(fmt.Sprintf(", Edges: %+v", obj.Edges)) strArray := []string{buffer.String(), obj.entityToString()+"}"} msgStr := strings.Join(strArray, ", ") return msgStr } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> types.TGSerializable ///////////////////////////////////////////////////////////////// // ReadExternal reads the byte format from an external input stream and constructs a system object func (obj *Graph) ReadExternal(is tgdb.TGInputStream) tgdb.TGError { if logger.IsDebug() { logger.Debug(fmt.Sprint("Entering Graph:ReadExternal")) } // TODO: Revisit later - Do we need to validate length? nodeBufLen, err := is.(*ProtocolDataInputStream).ReadInt() if err != nil { return err } if logger.IsDebug() { logger.Debug(fmt.Sprintf("Inside Graph:ReadExternal read nodeBufLen as '%+v'", nodeBufLen)) } err = obj.AbstractEntityReadExternal(is) if err != nil { return err } if logger.IsDebug() { logger.Debug(fmt.Sprint("Inside Graph:ReadExternal read abstractEntity")) } edgeCount, err := is.(*ProtocolDataInputStream).ReadInt() if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning Graph:ReadExternal - unable to read edgeCount w/ Error: '%+v'", err.Error())) return err } if logger.IsDebug() { logger.Debug(fmt.Sprintf("Inside Graph:ReadExternal read edgeCount as '%d'", edgeCount)) } for i := 0; i < edgeCount; i++ { edgeId, err := is.(*ProtocolDataInputStream).ReadLong() if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning Graph:ReadExternal - unable to read entId w/ Error: '%+v'", err.Error())) return err } if logger.IsDebug() { logger.Debug(fmt.Sprintf("Inside Graph:ReadExternal read edgeId as '%d'", edgeId)) } var edge *Edge var entity tgdb.TGEntity refMap := is.(*ProtocolDataInputStream).GetReferenceMap() if refMap != nil { entity = refMap[edgeId] } if entity == nil { edge1 := NewEdge(obj.graphMetadata) edge1.SetEntityId(edgeId) edge1.SetIsInitialized(false) if refMap != nil { refMap[edgeId] = edge1 } edge = edge1 if logger.IsDebug() { logger.Debug(fmt.Sprintf("Inside Graph:ReadExternal created new edge: '%+v'", edge)) } } else { edge = entity.(*Edge) } obj.Edges = append(obj.Edges, edge) } obj.SetIsInitialized(true) if logger.IsDebug() { logger.Debug(fmt.Sprintf("Returning Graph:ReadExternal w/ NO error, for graph: '%+v'", obj)) } return nil } // WriteExternal writes a system object into an appropriate byte format onto an external output stream func (obj *Graph) WriteExternal(os tgdb.TGOutputStream) tgdb.TGError { if logger.IsDebug() { logger.Debug(fmt.Sprint("Entering Graph:WriteExternal")) } startPos := os.(*ProtocolDataOutputStream).GetPosition() os.(*ProtocolDataOutputStream).WriteInt(0) // Write Attributes from the base class err := obj.AbstractEntityWriteExternal(os) if err != nil { return err } if logger.IsDebug() { logger.Debug(fmt.Sprint("Inside Graph:WriteExternal - exported base entity Attributes")) } newCount := 0 for _, edge := range obj.Edges { if edge.GetIsNew() { newCount++ } } os.(*ProtocolDataOutputStream).WriteInt(newCount) // Write the edges ids - ONLY include new edges for _, edge := range obj.Edges { if ! edge.GetIsNew() { continue } os.(*ProtocolDataOutputStream).WriteLong(obj.GetVirtualId()) if logger.IsDebug() { logger.Debug(fmt.Sprintf("Inside Graph:WriteExternal - exported a new edge: '%+v'", edge)) } } currPos := os.(*ProtocolDataOutputStream).GetPosition() length := currPos - startPos _, err = os.(*ProtocolDataOutputStream).WriteIntAt(startPos, length) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning Graph:WriteExternal - unable to update data length in the buffer w/ Error: '%+v'", err.Error())) return err } if logger.IsDebug() { logger.Debug(fmt.Sprintf("Returning Graph:WriteExternal w/ NO error, for graph: '%+v'", obj)) } return nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryMarshaller ///////////////////////////////////////////////////////////////// func (obj *Graph) MarshalBinary() ([]byte, error) { // A simple encoding: plain text. var b bytes.Buffer _, err := fmt.Fprintln(&b, obj.isNew, obj.EntityKind, obj.VirtualId, obj.Version, obj.EntityId, obj.EntityType, obj.isDeleted, obj.isInitialized, obj.graphMetadata, obj.Attributes, obj.ModifiedAttributes, obj.Edges, obj.name) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning Graph:MarshalBinary w/ Error: '%+v'", err.Error())) return nil, err } return b.Bytes(), nil } ///////////////////////////////////////////////////////////////// // Implement functions from Interface ==> encoding/BinaryUnmarshaller ///////////////////////////////////////////////////////////////// func (obj *Graph) UnmarshalBinary(data []byte) error { // A simple encoding: plain text. b := bytes.NewBuffer(data) _, err := fmt.Fscanln(b, &obj.isNew, &obj.EntityKind, &obj.VirtualId, &obj.Version, &obj.EntityId, &obj.EntityType, &obj.isDeleted, &obj.isInitialized, &obj.graphMetadata, &obj.Attributes, &obj.ModifiedAttributes, &obj.Edges, &obj.name) if err != nil { logger.Error(fmt.Sprintf("ERROR: Returning Graph:UnmarshalBinary w/ Error: '%+v'", err.Error())) return err } return nil } type GraphManager struct { name string } func NewGraphManager(gmd GraphMetadata) GraphManager { newGraphManager := GraphManager{ name: "TGDB Graph Manager", } return newGraphManager } /////////////////////////////////////// // Helper functions for GraphManager // /////////////////////////////////////// // GetName gets Graph Manager's Name func (obj *GraphManager) GetName() string { return obj.name } /////////////////////////////////////////////////////////// // Implement functions from Interface ==> TGGraphManager // /////////////////////////////////////////////////////////// // CreateNode creates Node within this Graph. There is a default Root Graph. func (obj *GraphManager) CreateNode() (tgdb.TGNode, tgdb.TGError) { return nil, nil } // CreateNodeForNodeType creates Node of particular Type func (obj *GraphManager) CreateNodeForNodeType(nodeType tgdb.TGNodeType) (tgdb.TGNode, tgdb.TGError) { return nil, nil } // CreateEdge creates an Edge func (obj *GraphManager) CreateEdge(fromNode tgdb.TGNode, toNode tgdb.TGNode, edgeType int) (tgdb.TGEdge, tgdb.TGError) { return nil, nil } // CreateEdgeWithDirection creates an Edge with direction func (obj *GraphManager) CreateEdgeWithDirection(fromNode tgdb.TGNode, toNode tgdb.TGNode, directionType tgdb.TGDirectionType) (tgdb.TGEdge, tgdb.TGError) { return nil, nil } // CreateGraph creates a SubGraph at the Root level. func (obj *GraphManager) CreateGraph(name string) (tgdb.TGGraph, tgdb.TGError) { return nil, nil } // DeleteNode removes this node from the graph func (obj *GraphManager) DeleteNode(filter tgdb.TGFilter) (tgdb.TGGraphManager, tgdb.TGError) { return nil, nil } // DeleteNodes removes the nodes from this graph that match the filter func (obj *GraphManager) DeleteNodes(filter tgdb.TGFilter) (tgdb.TGGraphManager, tgdb.TGError) { return nil, nil } // CreateQuery creates a Reusable Query func (obj *GraphManager) CreateQuery(filter tgdb.TGFilter) tgdb.TGQuery { return nil } // QueryNodes gets Nodes based on the Filter condition with a set of Arguments func (obj *GraphManager) QueryNodes(filter tgdb.TGFilter, args ...interface{}) tgdb.TGResultSet { return nil } // Traverse follows the graph using the traversal descriptor func (obj *GraphManager) Traverse(descriptor tgdb.TGTraversalDescriptor, startingPoints []tgdb.TGNode) tgdb.TGResultSet { return nil } // GetGraphMetadata gets the Graph Metadata func (obj *GraphManager) GetGraphMetadata() tgdb.TGGraphMetadata { return nil }
36.223529
168
0.708297
04a106c0030b8e20adb9dee80bcf32ada8bdb12f
328
java
Java
pudding-eureka-client1/src/main/java/ahan/pp/puddingeurekaclient1/entity/ResponseBean.java
sf621101/pudding
6fd25476c862b30c36e5757a2241c77ce9802fff
[ "Apache-2.0" ]
null
null
null
pudding-eureka-client1/src/main/java/ahan/pp/puddingeurekaclient1/entity/ResponseBean.java
sf621101/pudding
6fd25476c862b30c36e5757a2241c77ce9802fff
[ "Apache-2.0" ]
null
null
null
pudding-eureka-client1/src/main/java/ahan/pp/puddingeurekaclient1/entity/ResponseBean.java
sf621101/pudding
6fd25476c862b30c36e5757a2241c77ce9802fff
[ "Apache-2.0" ]
null
null
null
package ahan.pp.puddingeurekaclient1.entity; import lombok.Data; import java.io.Serializable; /** * create by wusf on 2017/12/22.<br> */ @Data public class ResponseBean implements Serializable { private static final long serialVersionUID = -2136782783134130687L; private String msg; private String code; }
15.619048
71
0.740854
0c9ae2b51288ca98ffcd2520e0ff6c3e32a621f6
5,707
py
Python
src/api/dataflow/batch/periodic/backend/validator/processings_validator.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
84
2021-06-30T06:20:23.000Z
2022-03-22T03:05:49.000Z
src/api/dataflow/batch/periodic/backend/validator/processings_validator.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
7
2021-06-30T06:21:16.000Z
2022-03-29T07:36:13.000Z
src/api/dataflow/batch/periodic/backend/validator/processings_validator.py
Chromico/bk-base
be822d9bbee544a958bed4831348185a75604791
[ "MIT" ]
40
2021-06-30T06:21:26.000Z
2022-03-29T12:42:26.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: -------------------------------------------------------------------- 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. """ from django.utils.translation import ugettext_lazy as _ from dataflow.batch.exceptions.comp_execptions import BatchTimeCompareError, BatchUnsupportedOperationError from dataflow.batch.periodic.param_info.builder.periodic_batch_job_builder import PeriodicBatchJobBuilder from dataflow.batch.utils.time_util import BatchTimeTuple class ProcessingsValidator(object): def validate(self, periodic_batch_info_params_obj): """ :param periodic_batch_info_params_obj: :type periodic_batch_info_params_obj: dataflow.batch.periodic.param_info.periodic_batch_info_params.PeriodicBatchInfoParams """ self.validate_input(periodic_batch_info_params_obj) self.validate_output_data_offset(periodic_batch_info_params_obj) def validate_input(self, periodic_batch_info_params_obj): """ :param periodic_batch_info_params_obj: :type periodic_batch_info_params_obj: dataflow.batch.periodic.param_info.periodic_batch_info_params.PeriodicBatchInfoParams """ for input_table in periodic_batch_info_params_obj.input_result_tables: if ( input_table.window_type.lower() == "scroll" or input_table.window_type.lower() == "slide" or input_table.window_type.lower() == "accumulate" ): self.__check_greater_than_value(input_table.window_offset, "window_offset", "0H") if input_table.window_type.lower() == "slide" or input_table.window_type.lower() == "accumulate": self.__check_greater_than_value(input_table.window_size, "window_size", "0H") if input_table.window_type.lower() == "accumulate": self.__check_greater_than_value(input_table.window_start_offset, "window_start_offset", "0H") self.__check_greater_than_value(input_table.window_end_offset, "window_end_offset", "0H") self.__check_less_than_value( input_table.window_start_offset, "window_start_offset", input_table.window_size, ) self.__check_less_than_value( input_table.window_end_offset, "window_end_offset", input_table.window_size, ) self.__check_if_null(input_table.accumulate_start_time, "accumulate_start_time") def __check_greater_than_value(self, check_value, check_name, limit_value): self.__check_if_null(check_value, check_name) limit_time_tuple = BatchTimeTuple() limit_time_tuple.from_jobnavi_format(limit_value) check_value_tuple = BatchTimeTuple() check_value_tuple.from_jobnavi_format(check_value) if check_value_tuple < limit_time_tuple: raise BatchUnsupportedOperationError(_("{}数值必须大于{}".format(check_name, limit_value))) def __check_less_than_value(self, check_value, check_name, limit_value): self.__check_if_null(check_value, check_name) limit_time_tuple = BatchTimeTuple() limit_time_tuple.from_jobnavi_format(limit_value) check_value_tuple = BatchTimeTuple() check_value_tuple.from_jobnavi_format(check_value) if check_value_tuple > limit_time_tuple: raise BatchUnsupportedOperationError(_("{}数值必须小于{}".format(check_name, limit_value))) def __check_if_null(self, check_value, check_name): if check_value is None: raise BatchUnsupportedOperationError(_("{}数值不能是null".format(check_name))) def validate_output_data_offset(self, periodic_batch_info_params_obj): """ :param periodic_batch_info_params_obj: :type periodic_batch_info_params_obj: dataflow.batch.periodic.param_info.periodic_batch_info_params.PeriodicBatchInfoParams """ try: PeriodicBatchJobBuilder.calculate_output_offset( periodic_batch_info_params_obj.input_result_tables, periodic_batch_info_params_obj.output_result_tables[0], periodic_batch_info_params_obj.count_freq, periodic_batch_info_params_obj.schedule_period, ) except BatchTimeCompareError: raise BatchUnsupportedOperationError(_("当前配置无法算出默认存储分区,请激活自定义出库配置"))
51.414414
111
0.715437
085e0780f8a5bda2846b31d6c0227314cc0df0a0
19,129
sql
SQL
SCRIPTS/Statpack/spup90.sql
nabeelkhan/Oracle-DBA-Life
102a3d14cfd102f38968f2f62f4ec3e019d33b21
[ "MIT" ]
null
null
null
SCRIPTS/Statpack/spup90.sql
nabeelkhan/Oracle-DBA-Life
102a3d14cfd102f38968f2f62f4ec3e019d33b21
[ "MIT" ]
null
null
null
SCRIPTS/Statpack/spup90.sql
nabeelkhan/Oracle-DBA-Life
102a3d14cfd102f38968f2f62f4ec3e019d33b21
[ "MIT" ]
null
null
null
Rem Rem $Header: spup90.sql 18-apr-2002.10:55:26 vbarrier Exp $ Rem Rem spup90.sql Rem Rem Copyright (c) 2001, 2002, Oracle Corporation. All rights reserved. Rem Rem NAME Rem spup90.sql - StatsPack UPgrade 90 Rem Rem DESCRIPTION Rem Upgrades the Statspack schema to the 9.2 schema format Rem Rem NOTES Rem Export the Statspack schema before running this upgrade, Rem as this is the only way to restore the existing data. Rem A downgrade script is not provided. Rem Rem Disable any scripts which use Statspack while the upgrade script Rem is running. Rem Rem Ensure there is plenty of free space in the tablespace Rem where the schema resides. Rem Rem This script should be run when connected as SYSDBA Rem Rem This upgrade script should only be run once. Rem Rem Rem MODIFIED (MM/DD/YY) Rem vbarrier 04/01/02 - 2290728 Rem vbarrier 03/20/02 - 2143634 Rem vbarrier 03/05/02 - Segment Statistics Rem cdialeri 02/07/02 - 2218573 Rem cdialeri 01/30/02 - 2184717 Rem cdialeri 01/11/02 - 9.2 - features 2 Rem cdialeri 11/30/01 - Created - 9.2 - features 1 Rem set verify off set serveroutput on /* ------------------------------------------------------------------------- */ prompt prompt Warning prompt ~~~~~~~ prompt Converting existing Statspack data to 9.2 format may result in prompt irregularities when reporting on pre-9.2 snapshot data. prompt This script is provided for convenience, and is not guaranteed to prompt work on all installations. To ensure you will not lose any existing prompt Statspack data, export the schema before upgrading. A downgrade prompt script is not provided. Please see spdoc.txt for more details. prompt prompt prompt Usage Recommendations prompt ~~~~~~~~~~~~~~~~~~~~~ prompt Disable any programs which run Statspack (including any dbms_jobs), prompt or this upgrade will fail. prompt prompt You will be prompted for the PERFSTAT password, and for the prompt tablespace to create any new PERFSTAT tables/indexes. prompt prompt You must be connected as a user with SYSDBA privilege to successfully prompt run this script. prompt accept confirmation prompt "Press return before continuing "; prompt prompt Please specify the PERFSTAT password prompt &&perfstat_password spool spup90a.lis prompt prompt Specify the tablespace to create any new PERFSTAT tables and indexes prompt Tablespace specified &&tablespace_name prompt /* ------------------------------------------------------------------------- */ -- -- Create SYS views, public synonyms, issue grants -- Recreate stats$v$sqlxs with new child_latch and fetches columns create or replace view STATS$V_$SQLXS as select max(sql_text) sql_text , sum(sharable_mem) sharable_mem , sum(sorts) sorts , min(module) module , sum(loaded_versions) loaded_versions , sum(fetches) fetches , sum(executions) executions , sum(loads) loads , sum(invalidations) invalidations , sum(parse_calls) parse_calls , sum(disk_reads) disk_reads , sum(buffer_gets) buffer_gets , sum(rows_processed) rows_processed , max(command_type) command_type , address address , hash_value hash_value , count(1) version_count , sum(cpu_time) cpu_time , sum(elapsed_time) elapsed_time , max(outline_sid) outline_sid , max(outline_category) outline_category , max(is_obsolete) is_obsolete , max(child_latch) child_latch from v$sql group by hash_value, address; grant select on STATS$V_$SQLXS to PERFSTAT; create or replace view STATS$V_$TEMPSTATXS as select ts.name tsname , tf.name filename , tm.phyrds , tm.phywrts , tm.readtim , tm.writetim , tm.singleblkrds , tm.phyblkrd , tm.phyblkwrt , tm.singleblkrdtim , fw.count wait_count , fw.time time from x$kcbfwait fw , v$tempstat tm , v$tablespace ts , v$tempfile tf where ts.ts# = tf.ts# and tm.file# = tf.file# and fw.indx+1 = (tf.file# + (select value from v$parameter where name='db_files')); grant select on STATS$V_$TEMPSTATXS to PERFSTAT; -- Issue grants for new views captured grant select on V_$SHARED_POOL_ADVICE to PERFSTAT; grant select on V_$SQL_WORKAREA_HISTOGRAM to PERFSTAT; grant select on V_$PGA_TARGET_ADVICE to PERFSTAT; grant select on V_$SEGSTAT to PERFSTAT; grant select on V_$SEGMENT_STATISTICS to PERFSTAT; grant select on V_$SEGSTAT_NAME to PERFSTAT; /* ------------------------------------------------------------------------- */ prompt Note: prompt Please check remainder of upgrade log file, which is continued in prompt the file spup90b.lis spool off connect perfstat/&&perfstat_password spool spup90b.lis show user set verify off set serveroutput on /* ------------------------------------------------------------------------- */ -- -- Add new columns to sql_plan alter table STATS$SQL_PLAN add (search_columns number ,access_predicates varchar2(4000) ,filter_predicates varchar2(4000) ); /* ------------------------------------------------------------------------- */ -- -- Add new columns to sql_summary alter table STATS$SQL_SUMMARY add (fetches number ,child_latch number ); /* ------------------------------------------------------------------------- */ -- -- Add new column to buffer cache advisory alter table STATS$DB_CACHE_ADVICE add (size_factor number ); /* ------------------------------------------------------------------------- */ -- -- Add support for shared pool advisory create table STATS$SHARED_POOL_ADVICE (snap_id number(6) not null ,dbid number not null ,instance_number number not null ,shared_pool_size_for_estimate number not null ,shared_pool_size_factor number ,estd_lc_size number ,estd_lc_memory_objects number ,estd_lc_time_saved number ,estd_lc_time_saved_factor number ,estd_lc_memory_object_hits number ,constraint STATS$SHARED_POOL_ADVICE_PK primary key (snap_id, dbid, instance_number, shared_pool_size_for_estimate) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ,constraint STATS$SHARED_POOL_ADVICE_FK foreign key (snap_id, dbid, instance_number) references STATS$SNAPSHOT on delete cascade ) tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) pctfree 5 pctused 40; create public synonym STATS$SHARED_POOL_ADVICE for STATS$SHARED_POOL_ADVICE; /* ------------------------------------------------------------------------- */ -- -- Add support for new PGA memory management views -- Histogram create table STATS$SQL_WORKAREA_HISTOGRAM (snap_id number(6) not null ,dbid number not null ,instance_number number not null ,low_optimal_size number not null ,high_optimal_size number not null ,optimal_executions number ,onepass_executions number ,multipasses_executions number ,total_executions number ,constraint STATS$SQL_WORKAREA_HIST_PK primary key (snap_id, dbid, instance_number, low_optimal_size, high_optimal_size) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ,constraint STATS$SQL_WORKAREA_HIST_FK foreign key (snap_id, dbid, instance_number) references STATS$SNAPSHOT on delete cascade ) tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) pctfree 5 pctused 40; create public synonym STATS$SQL_WORKAREA_HISTOGRAM for STATS$SQL_WORKAREA_HISTOGRAM; -- Advisory create table STATS$PGA_TARGET_ADVICE (snap_id number(6) not null ,dbid number not null ,instance_number number not null ,pga_target_for_estimate number not null ,pga_target_factor number ,advice_status varchar2(3) ,bytes_processed number ,estd_extra_bytes_rw number ,estd_pga_cache_hit_percentage number ,estd_overalloc_count number ,constraint STATS$PGA_TARGET_ADVICE_PK primary key (snap_id, dbid, instance_number, pga_target_for_estimate) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ,constraint STATS$PGA_TARGET_ADVICE_FK foreign key (snap_id, dbid, instance_number) references STATS$SNAPSHOT on delete cascade ) tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) pctfree 5 pctused 40; create public synonym STATS$PGA_TARGET_ADVICE for STATS$PGA_TARGET_ADVICE; /* ------------------------------------------------------------------------- */ -- -- Use foreign key constraints instead of check constraints when possible alter table STATS$STATSPACK_PARAMETER drop constraint STATS$STATSPACK_LVL_CK; alter table STATS$STATSPACK_PARAMETER add constraint STATS$STATSPACK_LVL_FK foreign key (snap_level) references STATS$LEVEL_DESCRIPTION; alter table STATS$SNAPSHOT drop constraint STATS$SNAPSHOT_LVL_CK; alter table STATS$SNAPSHOT add constraint STATS$SNAPSHOT_LVL_FK foreign key (snap_level) references STATS$LEVEL_DESCRIPTION; /* ------------------------------------------------------------------------- */ -- -- Add support for new segment statistics views -- Add new threshold columns alter table STATS$STATSPACK_PARAMETER add (seg_phy_reads_th number ,seg_log_reads_th number ,seg_buff_busy_th number ,seg_rowlock_w_th number ,seg_itl_waits_th number ,seg_cr_bks_sd_th number ,seg_cu_bks_sd_th number ); alter table STATS$SNAPSHOT add (seg_phy_reads_th number ,seg_log_reads_th number ,seg_buff_busy_th number ,seg_rowlock_w_th number ,seg_itl_waits_th number ,seg_cr_bks_sd_th number ,seg_cu_bks_sd_th number ); -- Set default threshold values update stats$statspack_parameter set seg_phy_reads_th = 1000, seg_log_reads_th = 10000, seg_buff_busy_th = 100, seg_rowlock_w_th = 100, seg_itl_waits_th = 100, seg_cr_bks_sd_th = 1000, seg_cu_bks_sd_th = 1000; alter table STATS$STATSPACK_PARAMETER modify (seg_phy_reads_th not null ,seg_log_reads_th not null ,seg_buff_busy_th not null ,seg_rowlock_w_th not null ,seg_itl_waits_th not null ,seg_cr_bks_sd_th not null ,seg_cu_bks_sd_th not null ); -- New level 7 for segment statistics -- Segment statistics without object names create table STATS$SEG_STAT (snap_id number(6) not null ,dbid number not null ,instance_number number not null ,dataobj# number not null ,obj# number not null ,ts# number not null ,logical_reads number ,buffer_busy_waits number ,db_block_changes number ,physical_reads number ,physical_writes number ,direct_physical_reads number ,direct_physical_writes number ,global_cache_cr_blocks_served number ,global_cache_cu_blocks_served number ,itl_waits number ,row_lock_waits number , constraint STATS$SEG_STAT_PK primary key (snap_id, dbid, instance_number, dataobj#, obj#) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ,constraint STATS$SEG_STAT_FK foreign key (snap_id, dbid, instance_number) references STATS$SNAPSHOT on delete cascade ) tablespace &&tablespace_name storage (initial 3m next 3m pctincrease 0); create public synonym STATS$SEG_STAT for STATS$SEG_STAT; -- Segment names having statistics create table STATS$SEG_STAT_OBJ (dataobj# number not null ,obj# number not null ,ts# number not null ,dbid number not null ,owner varchar(30) not null ,object_name varchar(30) not null ,subobject_name varchar(30) ,object_type varchar2(18) ,tablespace_name varchar(30) not null ,constraint STATS$SEG_STAT_OBJ_PK primary key (dataobj#, obj#, dbid) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ) tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0); create public synonym STATS$SEG_STAT_OBJ for STATS$SEG_STAT_OBJ; /* ------------------------------------------------------------------------- */ -- -- Support modified SQL Plan Usage capture declare l_dbid number; l_instance_number number; l_db_count number := 0; l_instance_count number := 0; l_dummy varchar2(1); l_cursor integer; l_sql varchar2(2000); update_not_reqd exception; begin -- check to see if the PK and HV indexes exist select count(1) into l_dummy from dba_ind_columns where table_owner = 'PERFSTAT' and table_name = 'STATS$SQL_PLAN_USAGE' and index_name in ('STATS$SQL_PLAN_USAGE_PK','STATS$SQL_PLAN_USAGE_HV') and column_name in ('SNAP_ID','DBID','INSTANCE_NUMBER' ,'HASH_VALUE','TEXT_SUBSET','PLAN_HASH_VALUE','COST'); if l_dummy = 8 then -- The upgrade has been run successfully before - exit raise update_not_reqd; end if; dbms_output.put_line('Beginning upgrade of STATS$SQL_PLAN_USAGE'); -- Check to see if old I1 index exists, if so, drop it select count(1) into l_dummy from dba_ind_columns where table_owner = 'PERFSTAT' and table_name = 'STATS$SQL_PLAN_USAGE' and index_name = 'STATS$SQL_PLAN_USAGE_I1' and column_name = 'SNAP_ID'; l_cursor := dbms_sql.open_cursor; if l_dummy = 1 then -- old I1 index exists, drop it l_sql := 'drop index STATS$SQL_PLAN_USAGE_I1'; dbms_sql.parse(l_cursor, l_sql, dbms_sql.native); dbms_output.put_line('.. Dropped I1 index'); end if; -- Check to see if old PK index exists, if so, drop it select count(1) into l_dummy from dba_ind_columns where table_owner = 'PERFSTAT' and table_name = 'STATS$SQL_PLAN_USAGE' and index_name = 'STATS$SQL_PLAN_USAGE_PK' and column_name in ('SNAP_ID','DBID','INSTANCE_NUMBER' ,'HASH_VALUE','TEXT_SUBSET','PLAN_HASH_VALUE','COST'); if l_dummy = 4 then -- old PK index still here - drop l_sql := 'alter table STATS$SQL_PLAN_USAGE drop constraint STATS$SQL_PLAN_USAGE_PK'; dbms_sql.parse(l_cursor, l_sql, dbms_sql.native); dbms_output.put_line('.. Dropped PK'); end if; -- Archive off the old table, if it doesn't already exist select count(1) into l_dummy from dba_tables where owner = 'PERFSTAT' and table_name = 'STATS$SQL_PLAN_USAGE_90'; if l_dummy = 0 then -- table not archived previously l_sql := 'rename STATS$SQL_PLAN_USAGE to STATS$SQL_PLAN_USAGE_90'; dbms_sql.parse(l_cursor, l_sql, dbms_sql.native); dbms_output.put_line('.. Archived original STATS$SQL_PLAN_USAGE table to STATS$SQL_PLAN_USAGE_90'); end if; -- Create new table, PK, FK l_sql := 'create table STATS$SQL_PLAN_USAGE (snap_id number(6) not null ,dbid number not null ,instance_number number not null ,hash_value number not null ,text_subset varchar2(31) not null ,plan_hash_value number not null ,cost number ,address raw(8) ,optimizer varchar2(20) ,constraint STATS$SQL_PLAN_USAGE_PK primary key (snap_id, dbid, instance_number ,hash_value, text_subset, plan_hash_value, cost) using index tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0) ,constraint STATS$SQL_PLAN_USAGE_FK foreign key (snap_id, dbid, instance_number) references STATS$SNAPSHOT on delete cascade ) tablespace &&tablespace_name storage (initial 5m next 5m pctincrease 0) pctfree 5 pctused 40'; dbms_sql.parse(l_cursor, l_sql, dbms_sql.native); dbms_output.put_line('.. Created new STATS$SQL_PLAN_USAGE table'); -- create HV index l_sql := 'create index STATS$SQL_PLAN_USAGE_HV ON STATS$SQL_PLAN_USAGE (hash_value) tablespace &&tablespace_name storage (initial 1m next 1m pctincrease 0)'; dbms_sql.parse(l_cursor, l_sql, dbms_sql.native); dbms_output.put_line('.. Created new HV index'); dbms_output.put_line('Upgrade of STATS$SQL_PLAN_USAGE complete'); exception when update_not_reqd then dbms_output.put_line('Upgrade of STATS$SQL_PLAN_USAGE not required - skipping'); when others then rollback; raise; end; / /* ------------------------------------------------------------------------- */ -- -- Add new level for segment statistics insert into STATS$LEVEL_DESCRIPTION (snap_level, description) values (7, 'This level captures segment level statistics, including logical and physical reads, row lock, itl and buffer busy waits, along with all data captured by lower levels'); commit; /* ------------------------------------------------------------------------- */ -- -- Add any new idle events, and Statspack Levels insert into STATS$IDLE_EVENT (event) values ('gcs remote message'); commit; insert into STATS$IDLE_EVENT (event) values ('gcs for action'); commit; insert into STATS$IDLE_EVENT (event) values ('ges remote message'); commit; insert into STATS$IDLE_EVENT (event) values ('queue messages'); commit; insert into STATS$IDLE_EVENT (event) values ('PX Deq: Execution Msg'); commit; insert into STATS$IDLE_EVENT (event) values ('PX Deq: Table Q Normal'); commit; /* ------------------------------------------------------------------------- */ -- -- Revoke select privileges on statspack objects granted to PUBLIC declare sqlstr varchar2(128); begin for tbnam in (select table_name from all_tab_privs where privilege = 'SELECT' and table_schema = 'PERFSTAT' and grantee = 'PUBLIC' ) loop sqlstr := 'revoke select on perfstat.'||tbnam.table_name||' from public'; execute immediate sqlstr; end loop; end; / prompt Note: prompt Please check the log file of the package recreation, which is prompt in the file spcpkg.lis spool off /* ------------------------------------------------------------------------- */ -- -- Upgrade the package @@spcpkg -- End of Upgrade script
32.095638
183
0.642271
16bbcd165f9e6db92194322c81dcbab6c5628754
6,659
ts
TypeScript
src/cps-transform.ts
peterkelly/trestle
a041e66ff2a2ef0dbaea3ec296316d4f9e26c9e9
[ "Apache-2.0" ]
null
null
null
src/cps-transform.ts
peterkelly/trestle
a041e66ff2a2ef0dbaea3ec296316d4f9e26c9e9
[ "Apache-2.0" ]
null
null
null
src/cps-transform.ts
peterkelly/trestle
a041e66ff2a2ef0dbaea3ec296316d4f9e26c9e9
[ "Apache-2.0" ]
null
null
null
// Copyright 2018 Peter Kelly <peter@pmkelly.net> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import { IfForm, QuoteForm, LambdaForm, SetForm, BeginForm, LetrecDef, LetrecForm, } from "./special-form"; import * as extra from "./extra"; import { BuildError, SExpr, LeafExpr, SymbolExpr, QuoteExpr, PairExpr, NilExpr, UnspecifiedExpr, getFormalParameterNames, } from "./sexpr"; export function skipcp(expr: SExpr): boolean { return (expr instanceof LeafExpr); } let nextSymId = 0; export function gensym(prefix?: string): string { prefix = prefix || "v"; return prefix + nextSymId++; } export function transformIf(form: IfForm, succ: SExpr): SExpr { const range = form.list.range; const succSym = (succ instanceof SymbolExpr) ? succ.name : gensym("succ"); const cpsConsequent = form.consequent.cpsTransform(new SymbolExpr(range, succSym)); const cpsAlternative = form.alternative.cpsTransform(new SymbolExpr(range, succSym)); if (skipcp(form.condition)) { const body = extra.makeIf(range, form.condition, cpsConsequent, cpsAlternative); if (succ instanceof SymbolExpr) return body; else return extra.makeSingularLetrec(range, succSym, succ, body); } else { const sym = gensym(); const body = extra.makeIf(range, new SymbolExpr(range, sym), cpsConsequent, cpsAlternative); if (succ instanceof SymbolExpr) { return form.condition.cpsTransform( extra.makeLambda(range, [sym], body)); } else { return form.condition.cpsTransform( extra.makeLambda(range, [sym], extra.makeSingularLetrec(range, succSym, succ, body))); } } } export function transformQuote(form: QuoteForm, succ: SExpr): SExpr { return new QuoteExpr(form.list.range, form.body).cpsTransform(succ); } export function transformLambda(form: LambdaForm, succ: SExpr): SExpr { // FIXME: Support lambda expressions with multiple expressions in their body. // This is probably best handled during the simplification stage, so that all such // lambda bodies are wrapped in a begin. if (!(form.bodyPtr instanceof PairExpr)) throw new Error("lambda: expected bodyPtr to be a pair"); if (!(form.bodyPtr.cdr instanceof NilExpr)) throw new Error("lambda: expected bodyPtr.cdr to be a pair"); const rawBody = form.bodyPtr.car; const range = form.list.range; const succSym = gensym("succ"); const cpsBody = rawBody.cpsTransform(new SymbolExpr(range, succSym)); const names = getFormalParameterNames(form.params).map(expr => expr.name); names.push(succSym); const lambda = extra.makeLambda(range, names, cpsBody); return extra.makeList(range, [succ, lambda]); } export function transformSet(form: SetForm, succ: SExpr): SExpr { const range = form.list.range; if (skipcp(form.expr)) { return extra.makeBegin(range, [ form.list, extra.makeList(range, [succ, new UnspecifiedExpr(range)]) ]); } else { const tempName = gensym("v"); const setExpr = extra.makeSet(range, form.name, new SymbolExpr(range, tempName)); const beginExpr = extra.makeBegin(range, [ setExpr, extra.makeList(range, [succ, new UnspecifiedExpr(range)]) ]); const lambdaExpr = extra.makeLambda(range, [tempName], beginExpr); return form.expr.cpsTransform(lambdaExpr); } } export function transformBegin(form: BeginForm, succ: SExpr): SExpr { const range = form.list.range; const items = form.bodyList.toArray(); const names: string[] = []; for (let i = 0; i < items.length; i++) names[i] = gensym(); const lastApply = new PairExpr(range, succ, new PairExpr(range, new SymbolExpr(range, names[items.length - 1]), new NilExpr(range))); let result: SExpr = lastApply; for (let i = items.length - 1; i >= 0; i--) result = items[i].cpsTransform(extra.makeLambda(range, [names[i]], result)); return result; } export function transformLetrec(form: LetrecForm, succ: SExpr): SExpr { const range = form.list.range; const newDefs: LetrecDef[] = []; for (const oldDef of form.defs) { newDefs.push({ name: oldDef.name, expr: new UnspecifiedExpr(range), }); } const exprNames: string[] = []; for (let i = 0; i < newDefs.length; i++) exprNames.push(gensym("v")); let body: SExpr = form.body.cpsTransform(succ); for (let i = newDefs.length - 1; i >= 0; i--) { const setExpr = extra.makeSet(range, newDefs[i].name, new SymbolExpr(range, exprNames[i])); const beginExpr = extra.makeBegin(range, [setExpr, body]); const lambdaExpr = extra.makeLambda(range, [exprNames[i]], beginExpr); body = form.defs[i].expr.cpsTransform(lambdaExpr); } return extra.makeLetrec(range, newDefs, body); } export function transformApply(list: PairExpr, succ: SExpr): SExpr { const range = list.range; const items = list.toArray(); if (items.length === 0) throw new BuildError(range, "Empty list"); const letSymbols: string[] = []; for (let i = 0; i < items.length; i++) { if (skipcp(items[i])) letSymbols.push("---SKIP---"); else letSymbols.push(gensym()); } let applyExpr: SExpr = new NilExpr(range); applyExpr = new PairExpr(range, succ, applyExpr); for (let i = items.length - 1; i >= 0; i--) { const arg = skipcp(items[i]) ? items[i] : new SymbolExpr(range, letSymbols[i]); applyExpr = new PairExpr(range, arg, applyExpr); } let result: SExpr = applyExpr; for (let i = items.length - 1; i >= 0; i--) { if (!skipcp(items[i])) { result = items[i].cpsTransform( extra.makeLambda(range, [letSymbols[i]], result)); } } return result; }
32.169082
99
0.628323
76bfae5b52e6d17223494f3fee5f1be7da6560b8
658
c
C
re2c/test/newlines/nl_01.c
adesutherland/crexx
e8d17152c565e9387ee8c33c653b4910b56f5165
[ "MIT" ]
8
2020-11-08T15:36:14.000Z
2022-03-27T13:50:07.000Z
re2c/test/newlines/nl_01.c
adesutherland/crexx
e8d17152c565e9387ee8c33c653b4910b56f5165
[ "MIT" ]
98
2020-11-12T11:49:41.000Z
2022-03-27T17:24:13.000Z
re2c/test/newlines/nl_01.c
adesutherland/crexx
e8d17152c565e9387ee8c33c653b4910b56f5165
[ "MIT" ]
10
2021-03-31T13:50:52.000Z
2021-12-02T03:34:42.000Z
/* Generated by re2c */ #line 1 "newlines/nl_01.re" // re2c $INPUT -o $OUTPUT #line 3 "newlines/nl_01.re" yyt1 #define YYMAXFILL 1 #line 14 "newlines/nl_01.c" { YYCTYPE yych; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; yyt1 = YYCURSOR; switch (yych) { case 'a': goto yy3; default: goto yy2; } yy2: x = yyt1; #line 8 "newlines/nl_01.re" { ; } #line 30 "newlines/nl_01.c" yy3: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; switch (yych) { case 'a': goto yy3; default: goto yy2; } } #line 11 "newlines/nl_01.re" newlines/nl_01.re:8:12: warning: rule matches empty string [-Wmatch-empty-string]
15.666667
81
0.641337
ca36172627466d0914eab1afb56c023f5639251a
6,564
swift
Swift
Sources/SimpleQueueClient/SimpleQueueOperationsReporting.swift
pbthif/smoke-aws
913669aa7d92180053424ed817fe3f3dfd6e4a50
[ "Apache-2.0" ]
108
2018-11-07T07:12:15.000Z
2021-12-26T06:24:12.000Z
Sources/SimpleQueueClient/SimpleQueueOperationsReporting.swift
QPC-database/smoke-aws
770dfceb85a41e1c645a8b674832e5560a2147a7
[ "Apache-2.0" ]
27
2018-11-15T22:30:11.000Z
2022-01-21T21:52:50.000Z
Sources/SimpleQueueClient/SimpleQueueOperationsReporting.swift
QPC-database/smoke-aws
770dfceb85a41e1c645a8b674832e5560a2147a7
[ "Apache-2.0" ]
17
2018-11-07T17:09:39.000Z
2021-12-06T01:16:53.000Z
// Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"). // You may not use this file except in compliance with the License. // A copy of the License is located at // // http://www.apache.org/licenses/LICENSE-2.0 // // or in the "license" file accompanying this file. This file 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. // // swiftlint:disable superfluous_disable_command // swiftlint:disable file_length line_length identifier_name type_name vertical_parameter_alignment // swiftlint:disable type_body_length function_body_length generic_type_name cyclomatic_complexity // -- Generated Code; do not edit -- // // SimpleQueueOperationsReporting.swift // SimpleQueueClient // import Foundation import SmokeAWSCore import SimpleQueueModel /** Operation reporting for the SimpleQueueModel. */ public struct SimpleQueueOperationsReporting { public let addPermission: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let changeMessageVisibility: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let changeMessageVisibilityBatch: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let createQueue: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let deleteMessage: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let deleteMessageBatch: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let deleteQueue: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let getQueueAttributes: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let getQueueUrl: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let listDeadLetterSourceQueues: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let listQueueTags: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let listQueues: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let purgeQueue: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let receiveMessage: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let removePermission: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let sendMessage: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let sendMessageBatch: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let setQueueAttributes: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let tagQueue: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public let untagQueue: StandardSmokeAWSOperationReporting<SimpleQueueModelOperations> public init(clientName: String, reportingConfiguration: SmokeAWSClientReportingConfiguration<SimpleQueueModelOperations>) { self.addPermission = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .addPermission, configuration: reportingConfiguration) self.changeMessageVisibility = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .changeMessageVisibility, configuration: reportingConfiguration) self.changeMessageVisibilityBatch = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .changeMessageVisibilityBatch, configuration: reportingConfiguration) self.createQueue = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .createQueue, configuration: reportingConfiguration) self.deleteMessage = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .deleteMessage, configuration: reportingConfiguration) self.deleteMessageBatch = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .deleteMessageBatch, configuration: reportingConfiguration) self.deleteQueue = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .deleteQueue, configuration: reportingConfiguration) self.getQueueAttributes = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getQueueAttributes, configuration: reportingConfiguration) self.getQueueUrl = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .getQueueUrl, configuration: reportingConfiguration) self.listDeadLetterSourceQueues = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .listDeadLetterSourceQueues, configuration: reportingConfiguration) self.listQueueTags = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .listQueueTags, configuration: reportingConfiguration) self.listQueues = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .listQueues, configuration: reportingConfiguration) self.purgeQueue = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .purgeQueue, configuration: reportingConfiguration) self.receiveMessage = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .receiveMessage, configuration: reportingConfiguration) self.removePermission = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .removePermission, configuration: reportingConfiguration) self.sendMessage = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .sendMessage, configuration: reportingConfiguration) self.sendMessageBatch = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .sendMessageBatch, configuration: reportingConfiguration) self.setQueueAttributes = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .setQueueAttributes, configuration: reportingConfiguration) self.tagQueue = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .tagQueue, configuration: reportingConfiguration) self.untagQueue = StandardSmokeAWSOperationReporting( clientName: clientName, operation: .untagQueue, configuration: reportingConfiguration) } }
69.094737
127
0.806977
de8a5a67655c1965764e7133c825a35ae7429192
2,369
rs
Rust
src/tester.rs
jgarzik/kvapp
29df1416d61d52961ccf5e77711bee260819fd2f
[ "MIT" ]
9
2019-09-22T20:42:17.000Z
2020-09-16T02:15:17.000Z
src/tester.rs
jgarzik/kvapp
29df1416d61d52961ccf5e77711bee260819fd2f
[ "MIT" ]
5
2019-09-22T16:47:24.000Z
2019-11-29T18:43:22.000Z
src/tester.rs
jgarzik/kvapp
29df1416d61d52961ccf5e77711bee260819fd2f
[ "MIT" ]
2
2019-10-17T15:29:07.000Z
2019-11-29T03:55:12.000Z
/* * tester: Integration tester for kvapp * * To be run separately from kvapp, assuming a clean and empty db: * $ cargo run --bin kvapp * $ cargo run --bin tester */ extern crate reqwest; const T_ENDPOINT: &'static str = "http://127.0.0.1:8080"; const T_BASEURI: &'static str = "/api/db/"; const T_VALUE: &'static str = "helloworld"; use reqwest::{Client, StatusCode}; fn post_get_put_get() { let basepath = format!("{}{}", T_ENDPOINT, T_BASEURI); let client = Client::new(); // Check that a record with key 1 doesn't exist. let url = format!("{}1", basepath); let resp_res = client.get(&url).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::NOT_FOUND), Err(_e) => assert!(false), } // verify DELETE(non exist) returns not-found let resp_res = client.delete(&url).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::NOT_FOUND), Err(_e) => assert!(false), } // PUT a new record let resp_res = client.put(&url).body(T_VALUE).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::OK), Err(_e) => assert!(false), } // Check that the record exists with the correct contents. let resp_res = client.get(&url).send(); match resp_res { Ok(mut resp) => { assert_eq!(resp.status(), StatusCode::OK); match resp.text() { Ok(body) => assert_eq!(body, T_VALUE), Err(_e) => assert!(false), } } Err(_e) => assert!(false), } // DELETE record let resp_res = client.delete(&url).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::OK), Err(_e) => assert!(false), } // Check (again) that a record with key 1 doesn't exist. let resp_res = client.get(&url).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::NOT_FOUND), Err(_e) => assert!(false), } // verify (again) DELETE(non exist) returns not-found let resp_res = client.delete(&url).send(); match resp_res { Ok(resp) => assert_eq!(resp.status(), StatusCode::NOT_FOUND), Err(_e) => assert!(false), } } fn main() { post_get_put_get(); println!("Integration testing successful."); }
28.202381
69
0.583791
ffde26f417e7ac67ea9f01429aada29ae737093c
22,630
html
HTML
node_modules/rollbar/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/src/browser/transport.js.html
CDSappBuilders/The-Cordovizer
3b556796097750eb28109fd3a3b464c91e7375b6
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
node_modules/rollbar/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/src/browser/transport.js.html
CDSappBuilders/The-Cordovizer
3b556796097750eb28109fd3a3b464c91e7375b6
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
node_modules/rollbar/coverage/PhantomJS 2.1.1 (Mac OS X 0.0.0)/src/browser/transport.js.html
CDSappBuilders/The-Cordovizer
3b556796097750eb28109fd3a3b464c91e7375b6
[ "Apache-2.0", "CC0-1.0" ]
null
null
null
<!doctype html> <html lang="en"> <head> <title>Code coverage report for src/browser/transport.js</title> <meta charset="utf-8"> <link rel="stylesheet" href="../../prettify.css"> <link rel="stylesheet" href="../../base.css"> <style type='text/css'> div.coverage-summary .sorter { background-image: url(../../sort-arrow-sprite.png); } </style> </head> <body> <div class="header medium"> <h1>Code coverage report for <span class="entity">src/browser/transport.js</span></h1> <h2> Statements: <span class="metric">51.14% <small>(45 / 88)</small></span> &nbsp;&nbsp;&nbsp;&nbsp; Branches: <span class="metric">56.6% <small>(30 / 53)</small></span> &nbsp;&nbsp;&nbsp;&nbsp; Functions: <span class="metric">33.33% <small>(6 / 18)</small></span> &nbsp;&nbsp;&nbsp;&nbsp; Lines: <span class="metric">51.14% <small>(45 / 88)</small></span> &nbsp;&nbsp;&nbsp;&nbsp; Ignored: <span class="metric"><span class="ignore-none">none</span></span> &nbsp;&nbsp;&nbsp;&nbsp; </h2> <div class="path"><a href="../../index.html">All files</a> &#187; <a href="index.html">src/browser/</a> &#187; transport.js</div> </div> <div class="body"> <pre><table class="coverage"> <tr><td class="line-count">1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203</td><td class="line-coverage"><span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">6</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">3</span> <span class="cline-any cline-yes">2</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">2</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-yes">5</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-no">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">4</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">3</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-yes">1</span> <span class="cline-any cline-neutral">&nbsp;</span> <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var _ = require('../utility'); var logger = require('./logger'); &nbsp; /* * accessToken may be embedded in payload but that should not * be assumed * * options: { * hostname * protocol * path * port * method * } * * params is an object containing key/value pairs. These * will be appended to the path as 'key=value&amp;key=value' * * payload is an unserialized object */ &nbsp; function get(accessToken, options, params, callback, requestFactory) { if (!callback || !_.isFunction(callback)) { callback = function() {};<span class="fstat-no" title="function not covered" ></span> <span class="cstat-no" title="statement not covered" > }</span> _.<span class="cstat-no" title="statement not covered" >addParamsAndAccessToke<span class="fstat-no" title="function not covered" >nTo</span>P</span>ath(accessToken, options, params); &nbsp; <span class="cstat-no" title="statement not covered" > var method = 'GET';</span> var url = _.formatUrl(options); _makeRequest(<span class="cstat-no" title="statement not covered" >access</span>Token, url, method, null, callback, requestFactory); }<span class="cstat-no" title="statement not covered" ></span> <span class="cstat-no" title="statement not covered" ></span> function post(accessToken, options, payload, callback, requestFactory) { if (!callback || !_.isFunction(callback)) { callback = function() {}; <span class="missing-if-branch" title="if path not taken" >I</span>} <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" ></span></span> if (!payload) { return callback(new Error('Cannot send empty request')); <span class="missing-if-branch" title="if path not taken" >I</span>} <span class="cstat-no" title="statement not covered" ></span> var stringifyResult = _.stringify(payload); if (stringifyResult.error) { return callback(stringifyResult.error); <span class="missing-if-branch" title="if path not taken" >I</span>} <span class="cstat-no" title="statement not covered" ></span> var writeData = stringifyResult.value; var method = 'POST'; var url = _.formatUrl(options); _makeRequest(accessToken, url, method, writeData, callback, requestFactory); } &nbsp; function _makeRequest(accessToken, url, method, data, callback, requestFactory) { var request; if (requestFactory) { request = requestFactory(); <span class="missing-if-branch" title="else path not taken" >E</span>} else { request = _createXMLHTTPObject(); } if<span class="cstat-no" title="statement not covered" > (!request) {</span> // Give up, no way to send requests return callback(new Error('No way to send a request')); } try { try { var onreadystatechange = function() { try { if (onreadystatechange &amp;&amp; request.readyState === 4) { onreadystatechange = undefined; <span class="missing-if-branch" title="else path not taken" >E</span> var parseResponse = _.jsonParse(request.responseText); if (_isSuccess(request)) { callback(parseResponse.error, parseResponse.value); return; } else if (_isNormalFailure(request)) { if (request.status === 403) { // likely caused by using a server access token var message = parseResponse.value &amp;&amp; parseResponse.value.message; logger.error(message); } // return valid http status codes callback(new Error(String(request.status))); } else { // IE will return a status 12000+ on some sort of connection failure, // so we return a blank error // http://msdn.microsoft.com/en-us/library/aa383770%28VS.85%29.aspx var msg = 'XHR response had no status code (likely connection failure)'; callback(_newRetriableError(msg)); } } } catch (ex) { //jquery source mentions firefox may error out while accessing the //request members if there is a network error //https://github.com/jquery/jquery/blob/a938d7b1282fc0e5c52502c225ae8f0cef219f0a/src/ajax/xhr.js#L111 var exc; if (ex &amp;&amp; ex.stack) { exc = ex; <span class="cstat-no" title="statement not covered" > } else {</span> <span class="cstat-no" title="statement not covered" > exc = new </span>Error(ex); } ca<span class="cstat-no" title="statement not covered" >llback(exc);</span> } };<span class="cstat-no" title="statement not covered" ></span> &nbsp; request.open(method, url, true); if (request.setRequestHeader) { request.setRequestHeader('Content-Type', 'application/json'); <span class="missing-if-branch" title="else path not taken" >E</span> request.setRequestHeader('X-Rollbar-Access-Token', accessToken); } request.onreadystatechange = onreadystatechange; request.send(data); } catch (e1) { // Sending using the normal xmlhttprequest object didn't work, try XDomainRequest if (typeof XDomainRequest !== 'undefined') { &nbsp; <span class="missing-if-branch" title="if path not taken" >I</span> // Assume we are in a really old browser which has a bunch of limitations: // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx &nbsp; // Extreme paranoia: if we have XDomainRequest then we have a window, but just in case if (!window || !window.location) { return callback(new Error('No window available during request, unknown environment')); <span class="cstat-no" title="statement not covered" > }</span> <span class="cstat-no" title="statement not covered" ></span> // If the current page is http, try and send over http if (window.location.href.substring(0, 5) === 'http:' &amp;&amp; url.substring(0, 5) === 'https') { url = 'http' + url.substring(5); <span class="cstat-no" title="statement not covered" > }</span> <span class="cstat-no" title="statement not covered" ></span> var xdomainrequest = new XDomainRequest(); xdomainrequest.onprogress = function() {}; xdomainrequest.ontime<span class="cstat-no" title="statement not covered" >out = function() {</span> <span class="cstat-no" title="statement not covered" > var msg = 'Request timed out';<span class="fstat-no" title="function not covered" ></span></span> <span class="cstat-no" title="statement not covered" > var code = 'ETIMEDOUT';<span class="fstat-no" title="function not covered" ></span></span> callback(_<span class="cstat-no" title="statement not covered" >newRetriableError(ms</span>g, code)); };<span class="cstat-no" title="statement not covered" ></span> xd<span class="cstat-no" title="statement not covered" >omainrequest.onerror = function() {</span> callback(new Error('Error during request')); <span class="cstat-no" title="statement not covered" > };<span class="fstat-no" title="function not covered" ></span></span> xd<span class="cstat-no" title="statement not covered" >omainrequest.onload = function() {</span> var parseResponse = _.jsonParse(xdomainrequest.responseText); <span class="cstat-no" title="statement not covered" > callback(parseResponse.error, par<span class="fstat-no" title="function not covered" >seResponse.value);</span></span> };<span class="cstat-no" title="statement not covered" ></span> xd<span class="cstat-no" title="statement not covered" >omainrequest.open(method, url, true);</span> xdomainrequest.send(data); } <span class="cstat-no" title="statement not covered" >else {</span> <span class="cstat-no" title="statement not covered" > callback(new Error('Cannot </span>find a method to transport a request')); } } } catch (e2) { callback(e2); } }<span class="cstat-no" title="statement not covered" ></span> &nbsp; function _createXMLHTTPObject() { var factories = [ function () {<span class="fstat-no" title="function not covered" ></span> return new X<span class="cstat-no" title="statement not covered" >MLHttpRequest();</span> },<span class="fstat-no" title="function not covered" ></span> fu<span class="cstat-no" title="statement not covered" >nction () {</span> return new ActiveXObject('Msxml2.XMLHTTP'); },<span class="fstat-no" title="function not covered" ></span> fu<span class="cstat-no" title="statement not covered" >nction () {</span> return new ActiveXObject('Msxml3.XMLHTTP'); },<span class="fstat-no" title="function not covered" ></span> fu<span class="cstat-no" title="statement not covered" >nction () {</span> return new ActiveXObject('Microsoft.XMLHTTP'); }<span class="fstat-no" title="function not covered" ></span> ];<span class="cstat-no" title="statement not covered" ></span> var xmlhttp; var i; var numFactories = factories.length; for (i = 0; i &lt; numFactories; i++) { /* eslint-disable<span class="cstat-no" title="statement not covered" > no-empty */</span> <span class="cstat-no" title="statement not covered" > try {</span> xmlhttp = factories[i](); <span class="cstat-no" title="statement not covered" > break;</span> } <span class="cstat-no" title="statement not covered" >catch (e) {</span> <span class="cstat-no" title="statement not covered" > // pass</span> } /* eslint-enable no-empty */ } return xmlhttp; } <span class="cstat-no" title="statement not covered" ></span> function _isSuccess(r) { return r &amp;&amp; r.status &amp;&amp; r.status === 200; } &nbsp; function _isNormalFailure(r) { return r &amp;&amp; _.isType(r.status, 'number') &amp;&amp; r.status &gt;= 400 &amp;&amp; r.status &lt; 600; } &nbsp; function _newRetriableError(message, code) { var err = new Error(message); err.code = code || 'ENOTFOUND'; return err; } &nbsp; module.exports = { get: get, post: post }; &nbsp;</pre></td></tr> </table></pre> </div> <div class="footer"> <div class="meta">Generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Apr 20 2017 14:03:58 GMT-0700 (PDT)</div> </div> <script src="../../prettify.js"></script> <script> window.onload = function () { if (typeof prettyPrint === 'function') { prettyPrint(); } }; </script> <script src="../../sorter.js"></script> </body> </html>
34.708589
185
0.672426
273f4094d3cfab27992b2cd686796822249b1ffc
5,891
asm
Assembly
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_40.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_40.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0x84_notsx.log_21829_40.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 %r11 push %r12 push %r13 push %r15 push %rax push %rcx push %rdx lea addresses_D_ht+0x1cf28, %r15 nop nop inc %r12 mov $0x6162636465666768, %rax movq %rax, %xmm1 movups %xmm1, (%r15) nop nop nop nop nop and $57587, %rdx lea addresses_UC_ht+0x19aa8, %rcx nop nop nop and $34837, %r13 movw $0x6162, (%rcx) nop nop nop xor %rax, %rax lea addresses_A_ht+0x16028, %r11 nop nop nop nop cmp %r12, %r12 movl $0x61626364, (%r11) nop nop nop nop nop dec %rdx pop %rdx pop %rcx pop %rax pop %r15 pop %r13 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_A+0x8768, %rax cmp %rdi, %rdi movl $0x51525354, (%rax) nop nop nop add $10303, %rsi // REPMOV lea addresses_normal+0x8428, %rsi lea addresses_UC+0xdb28, %rdi nop nop nop nop add $63215, %rbp mov $49, %rcx rep movsq nop nop nop nop and %rsi, %rsi // Store lea addresses_PSE+0x2628, %r12 nop nop nop and $9564, %rbp movb $0x51, (%r12) nop nop nop nop nop sub %rcx, %rcx // Store lea addresses_WT+0x13428, %rsi nop nop nop inc %rbp movb $0x51, (%rsi) nop nop sub %r11, %r11 // Store lea addresses_PSE+0xe428, %r10 clflush (%r10) sub %rbp, %rbp movb $0x51, (%r10) nop nop nop cmp %rdi, %rdi // Faulty Load lea addresses_normal+0xe828, %rdi nop nop nop nop nop inc %rbp mov (%rdi), %r11 lea oracles, %rsi and $0xff, %r11 shlq $12, %r11 mov (%rsi,%r11,1), %r11 pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_normal', 'same': False, 'size': 32, 'congruent': 0, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_A', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_normal', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_UC', 'congruent': 8, 'same': True}, 'OP': 'REPM'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_WT', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_PSE', 'same': False, 'size': 1, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_normal', 'same': True, 'size': 8, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'dst': {'type': 'addresses_D_ht', 'same': False, 'size': 16, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_UC_ht', 'same': False, 'size': 2, 'congruent': 7, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_A_ht', 'same': False, 'size': 4, 'congruent': 10, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
35.275449
2,999
0.656425
8d5f84656c93682117ad58dd8469a1ce464e3e3f
2,123
dart
Dart
flutter-app/lib/screens/offres_cote_automobiliste/pages/company_tab.dart
youssefbenhissi/weadvert
e5f9ba5b531b4a8ad0be9645f0e18a73fd72cd85
[ "BSD-Source-Code" ]
1
2022-03-10T02:05:58.000Z
2022-03-10T02:05:58.000Z
flutter-app/lib/screens/offres_cote_automobiliste/pages/company_tab.dart
youssefbenhissi/weadvert
e5f9ba5b531b4a8ad0be9645f0e18a73fd72cd85
[ "BSD-Source-Code" ]
null
null
null
flutter-app/lib/screens/offres_cote_automobiliste/pages/company_tab.dart
youssefbenhissi/weadvert
e5f9ba5b531b4a8ad0be9645f0e18a73fd72cd85
[ "BSD-Source-Code" ]
null
null
null
import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:pim/constants.dart'; import 'package:pim/models/offre.dart'; import 'package:pim/screens/offres_cote_automobiliste/models/company.dart'; class CompanyTab extends StatelessWidget { final Offre company; CompanyTab({this.company}); @override Widget build(BuildContext context) { return Container( child: ListView( children: <Widget>[ SizedBox(height: 25.0), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "• ", textAlign: TextAlign.start, style: TextStyle(fontSize: 35.0), ), Text( tr("Nom de l'entreprise"), style: kTitleStyle.copyWith(fontWeight: FontWeight.bold), ), Text(company.entreprise, style: TextStyle(fontSize: 19.0)) ], ), SizedBox(height: 25.0), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "• ", textAlign: TextAlign.start, style: TextStyle(fontSize: 35.0), ), Text( tr("Email de l'entreprise"), style: kTitleStyle.copyWith(fontWeight: FontWeight.bold), ), Text(company.email, style: TextStyle(fontSize: 19.0)) ], ), SizedBox(height: 25.0), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "• ", textAlign: TextAlign.start, style: TextStyle(fontSize: 35.0), ), Text( tr("type de l'entreprise"), style: kTitleStyle.copyWith(fontWeight: FontWeight.bold), ), Text(company.typeEntre, style: TextStyle(fontSize: 19.0)) ], ), ], ), ); } }
31.220588
75
0.504475
dd3a27eb84019bc8e29c46d8ba1bc527f75515a3
1,211
go
Go
update_test.go
silas/db
26856b6530ba294ba09247407eade2fb8f9f234b
[ "MIT" ]
1
2021-01-16T02:59:19.000Z
2021-01-16T02:59:19.000Z
update_test.go
silas/db
26856b6530ba294ba09247407eade2fb8f9f234b
[ "MIT" ]
null
null
null
update_test.go
silas/db
26856b6530ba294ba09247407eade2fb8f9f234b
[ "MIT" ]
null
null
null
package sq import ( "testing" "github.com/stretchr/testify/assert" ) func TestUpdateBuilderToSQL(t *testing.T) { b := Update(""). Prefix("WITH prefix AS ?", 0). Table("a"). Set("b", Expr("? + 1", 1)). SetMap(Eq{"c": 2}). From("f1"). From("f2"). Where("d = ?", 3). OrderBy("e"). Limit(4). Offset(5). Suffix("RETURNING ?", 6) sql, args, err := b.ToSQL() assert.NoError(t, err) expectedSQL := "WITH prefix AS ? " + "UPDATE a SET b = ? + 1, c = ? " + "FROM f1, f2 " + "WHERE d = ? " + "ORDER BY e LIMIT 4 OFFSET 5 " + "RETURNING ?" assert.Equal(t, expectedSQL, sql) expectedArgs := []interface{}{0, 1, 2, 3, 6} assert.Equal(t, expectedArgs, args) } func TestUpdateBuilderZeroOffsetLimit(t *testing.T) { qb := Update("a"). Set("b", true). Limit(0). Offset(0) sql, args, err := qb.ToSQL() assert.NoError(t, err) expectedSQL := "UPDATE a SET b = ? LIMIT 0 OFFSET 0" assert.Equal(t, expectedSQL, sql) expectedArgs := []interface{}{true} assert.Equal(t, expectedArgs, args) } func TestUpdateBuilderToSQLErr(t *testing.T) { _, _, err := Update("").Set("x", 1).ToSQL() assert.Error(t, err) _, _, err = Update("x").ToSQL() assert.Error(t, err) }
19.532258
53
0.592073
5f755fe835d90e7f99bacdb1c6d0c5c02c2e6129
2,101
lua
Lua
src/actions/vstudio/vs2010_vcxproj_filters.lua
andryblack/premake
4c20526d5a5e5641cc1a345900deb85669273b4d
[ "BSD-3-Clause" ]
null
null
null
src/actions/vstudio/vs2010_vcxproj_filters.lua
andryblack/premake
4c20526d5a5e5641cc1a345900deb85669273b4d
[ "BSD-3-Clause" ]
null
null
null
src/actions/vstudio/vs2010_vcxproj_filters.lua
andryblack/premake
4c20526d5a5e5641cc1a345900deb85669273b4d
[ "BSD-3-Clause" ]
null
null
null
-- -- vs2010_vcxproj_filters.lua -- Generate a Visual Studio 201x C/C++ filters file. -- Copyright (c) 2009-2013 Jason Perkins and the Premake project -- local vc2010 = premake.vstudio.vc2010 local project = premake.project local tree = premake.tree -- -- Generate a Visual Studio 201x C++ project, with support for the new platforms API. -- function vc2010.generateFilters(prj) io.indent = " " vc2010.project() vc2010.filters_uniqueidentifiers(prj) vc2010.filters_filegroup(prj, "None") vc2010.filters_filegroup(prj, "ClInclude") vc2010.filters_filegroup(prj, "ClCompile") vc2010.filters_filegroup(prj, "ResourceCompile") vc2010.filters_filegroup(prj, "CustomBuild") io.printf('</Project>') end -- -- The first portion of the filters file assigns unique IDs to each -- directory or virtual group. Would be cool if we could automatically -- map vpaths like "**.h" to an <Extensions>h</Extensions> element. -- function vc2010.filters_uniqueidentifiers(prj) local opened = false local tr = project.getsourcetree(prj) tree.traverse(tr, { onbranch = function(node, depth) if not opened then _p(1,'<ItemGroup>') opened = true end _x(2, '<Filter Include="%s">', path.translate(node.path)) _p(3, '<UniqueIdentifier>{%s}</UniqueIdentifier>', os.uuid(node.path)) _p(2, '</Filter>') end }, false) if opened then _p(1,'</ItemGroup>') end end -- -- The second portion of the filters file assigns filters to each source -- code file, as needed. Group is one of "ClCompile", "ClInclude", -- "ResourceCompile", or "None". -- function vc2010.filters_filegroup(prj, group) local files = vc2010.getfilegroup(prj, group) if #files > 0 then _p(1,'<ItemGroup>') for _, file in ipairs(files) do if file.parent.path then _p(2,'<%s Include=\"%s\">', group, path.translate(file.relpath)) _p(3,'<Filter>%s</Filter>', path.translate(file.parent.path)) _p(2,'</%s>', group) else _p(2,'<%s Include=\"%s\" />', group, path.translate(file.relpath)) end end _p(1,'</ItemGroup>') end end
25.011905
85
0.677772
2a5658a62249ebb8f1a5e319881287e89f64b3c4
1,148
java
Java
app/src/main/java/spaceinvaders/drawables/EndGameBackground.java
samuel-cavalcanti/Arcade-Sprite-Based-Framework_ufu
51f9fb987b711bf09417719f5a5e7c97f99a1ca8
[ "BSD-2-Clause" ]
null
null
null
app/src/main/java/spaceinvaders/drawables/EndGameBackground.java
samuel-cavalcanti/Arcade-Sprite-Based-Framework_ufu
51f9fb987b711bf09417719f5a5e7c97f99a1ca8
[ "BSD-2-Clause" ]
null
null
null
app/src/main/java/spaceinvaders/drawables/EndGameBackground.java
samuel-cavalcanti/Arcade-Sprite-Based-Framework_ufu
51f9fb987b711bf09417719f5a5e7c97f99a1ca8
[ "BSD-2-Clause" ]
null
null
null
package spaceinvaders.drawables; import org.jetbrains.annotations.NotNull; import spriteframework.board.Drawable; import java.awt.*; public class EndGameBackground implements Drawable { private final String message; private final int boardWidth; private final int boardHeight; public EndGameBackground(int boardWidth, int boardHeight, String message) { this.boardWidth = boardWidth; this.boardHeight = boardHeight; this.message = message; } @Override public void draw(@NotNull Graphics g) { g.setColor(Color.black); g.fillRect(0, 0, boardWidth, boardHeight); g.setColor(new Color(0, 32, 48)); g.fillRect(50, boardWidth / 2 - 30, boardWidth - 100, 50); g.setColor(Color.white); g.drawRect(50, boardWidth / 2 - 30, boardWidth - 100, 50); Font small = new Font("Helvetica", Font.BOLD, 14); FontMetrics fontMetrics = g.getFontMetrics(small); g.setColor(Color.white); g.setFont(small); g.drawString(message, (boardWidth - fontMetrics.stringWidth(message)) / 2, boardWidth / 2); } }
28
82
0.654181
8fd984557ddcffbe94a07a9b5b80e4556ccf4f57
979
dart
Dart
lib/shared/domain/usecases/get_user_by_uid.dart
tenhobi/game-without-name
777c4be70d6e9f1392be0645fc92066825b530f1
[ "MIT" ]
8
2019-10-22T13:02:17.000Z
2020-01-01T12:39:40.000Z
lib/shared/domain/usecases/get_user_by_uid.dart
tenhobi/game-without-name
777c4be70d6e9f1392be0645fc92066825b530f1
[ "MIT" ]
9
2019-10-21T13:23:22.000Z
2020-01-05T13:31:07.000Z
lib/shared/domain/usecases/get_user_by_uid.dart
tenhobi/game-without-name
777c4be70d6e9f1392be0645fc92066825b530f1
[ "MIT" ]
null
null
null
import 'package:dartz/dartz.dart'; import 'package:equatable/equatable.dart'; import 'package:flutter/cupertino.dart'; import '../../../core/error/failures.dart'; import '../../../core/usecases/usecase.dart'; import '../entities/user.dart'; import '../repositories/user_repository.dart'; /// {@template get_user_by_id} /// UseCase for getting user by id. /// {@endtemplate} class GetUserByUid extends UseCase<User, GetUserByUidParams> { /// Implementation of user repository provided by injection. final UserRepository repository; /// {@macro get_user_by_id} GetUserByUid(this.repository); /// UseCase. Future<Either<Failure, User>> call(GetUserByUidParams params) { return repository.getUserByUid(params.uid); } } /// Params for GetUserByUid. class GetUserByUidParams extends Equatable { /// Identificator. final String uid; /// Params for GetUserByUid. GetUserByUidParams({@required this.uid}); @override List<Object> get props => [uid]; }
26.459459
65
0.724208
c535608e0636dda084445763257c16cbc356d9ec
543
cpp
C++
Interviewbit/hashing/2-sum.cpp
jatin69/Revision-cpp
52742ea76ee2440d92b116252399360fef46e0c7
[ "MIT" ]
4
2020-01-16T14:49:46.000Z
2021-08-23T12:45:19.000Z
Interviewbit/hashing/2-sum.cpp
jatin69/coding-practice
52742ea76ee2440d92b116252399360fef46e0c7
[ "MIT" ]
2
2018-06-06T13:08:11.000Z
2018-10-02T19:07:32.000Z
Interviewbit/hashing/2-sum.cpp
jatin69/coding-practice
52742ea76ee2440d92b116252399360fef46e0c7
[ "MIT" ]
5
2018-10-02T13:49:16.000Z
2021-08-11T07:29:50.000Z
/* * Author : Jatin Rohilla * Date : June-July-2019 * * Compiler : g++ 5.1.0 * flags : -std=c++14 */ #include<bits/stdc++.h> using namespace std; vector<int> Solution::twoSum(const vector<int> &A, int B) { std::unordered_map<int, int> m; vector<int> res = {}; for(int i=0;i<A.size();++i){ auto it = m.find(B - A[i]); if(it == m.end()){ m.insert({A[i], i}); } else{ res.push_back(it.second+1); res.push_back(i+1); } } return res; }
18.1
59
0.482505
eb208f5c55495b8af494626b410c40fa90396bee
13,765
dart
Dart
lib/core/stats.dart
brendan-duncan/dartray
93df4609538816338d6c242548866b794a4066e2
[ "BSD-2-Clause", "Apache-2.0" ]
16
2015-01-01T14:49:05.000Z
2021-09-04T09:36:26.000Z
lib/core/stats.dart
kevinkimdev/dartray
1b7b345968697dba964676db1c4e28811bb50196
[ "Apache-2.0", "BSD-2-Clause" ]
1
2015-01-01T15:04:53.000Z
2015-01-08T23:28:36.000Z
lib/core/stats.dart
kevinkimdev/dartray
1b7b345968697dba964676db1c4e28811bb50196
[ "Apache-2.0", "BSD-2-Clause" ]
4
2016-04-12T15:41:02.000Z
2016-08-28T14:49:52.000Z
/**************************************************************************** * Copyright (C) 2014 by Brendan Duncan. * * * * This file is part of DartRay. * * * * 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. * * * * This project is based on PBRT v2 ; see http://www.pbrt.org * * pbrt2 source code Copyright(c) 1998-2010 Matt Pharr and Greg Humphreys. * ****************************************************************************/ part of core; /** * Collect statistics about the rendering process. */ class Stats { static String getString() { String s = ''; for (StatTracker t in trackers) { s += '$t\n'; } return s; } static void CREATED_SHAPE(Shape shape) { shapesMade++; } static void CREATED_TRIANGLE(tri) { trianglesMade++; } static void STARTED_GENERATING_CAMERA_RAY(CameraSample s) { cameraRays++; } static void KDTREE_CREATED_INTERIOR_NODE(int axis, double split) { kdTreeInteriorNodes++; } static void KDTREE_CREATED_LEAF(int nprims, int depth) { kdTreeLeafNodes++; kdTreeMaxPrims.max(nprims); kdTreeMaxDepth.max(depth); } static void RAY_TRIANGLE_INTERSECTION_TEST(Ray ray, tri) { rayTriIntersections.add(0, 1); } static void RAY_TRIANGLE_INTERSECTIONP_TEST(Ray ray, tri) { rayTriIntersectionPs.add(0, 1); } static void RAY_TRIANGLE_INTERSECTION_HIT(Ray ray, double t) { rayTriIntersections.add(1, 0); } static void RAY_TRIANGLE_INTERSECTIONP_HIT(Ray ray, double t) { rayTriIntersectionPs.add(1, 0); } static void FINISHED_RAY_INTERSECTION(Ray ray, Intersection isect, bool hit) { nonShadowRays++; } static void FINISHED_RAY_INTERSECTIONP(Ray ray, bool hit) { shadowRays++; } static void STARTED_SPECULAR_REFLECTION_RAY(RayDifferential ray) { specularReflectionRays++; } static void STARTED_SPECULAR_REFRACTION_RAY(RayDifferential ray) { specularRefractionRays++; } static void ACCESSED_TEXEL(arg0, arg1, arg2, arg3) { } static void ALLOCATED_CACHED_TRANSFORM() { } static void FOUND_CACHED_TRANSFORM() { } static void ATOMIC_MEMORY_OP() { } static void BVH_STARTED_CONSTRUCTION(arg0, arg1) { } static void BVH_FINISHED_CONSTRUCTION(arg0) { } static void BVH_INTERSECTION_STARTED(arg0, arg1) { } static void BVH_INTERSECTION_TRAVERSED_INTERIOR_NODE(arg0) { } static void BVH_INTERSECTION_TRAVERSED_LEAF_NODE(arg0) { } static void BVH_INTERSECTION_PRIMITIVE_TEST(arg0) { } static void BVH_INTERSECTION_PRIMITIVE_HIT(arg0) { } static void BVH_INTERSECTION_PRIMITIVE_MISSED(arg0) { } static void BVH_INTERSECTION_FINISHED() { } static void BVH_INTERSECTIONP_STARTED(arg0, arg1) { } static void BVH_INTERSECTIONP_TRAVERSED_INTERIOR_NODE(arg0) { } static void BVH_INTERSECTIONP_TRAVERSED_LEAF_NODE(arg0) { } static void BVH_INTERSECTIONP_PRIMITIVE_TEST(arg0) { } static void BVH_INTERSECTIONP_PRIMITIVE_HIT(arg0) { } static void BVH_INTERSECTIONP_PRIMITIVE_MISSED(arg0) { } static void BVH_INTERSECTIONP_FINISHED() { } static void FINISHED_PARSING() { } static void FINISHED_PREPROCESSING() { } static void FINISHED_RENDERING() { } static void FINISHED_RENDERTASK(arg0) { } static void FINISHED_TASK(arg0) { } static void FINISHED_ADDING_IMAGE_SAMPLE() { } static void FINISHED_CAMERA_RAY_INTEGRATION(arg0, arg1, arg2) { } static void FINISHED_EWA_TEXTURE_LOOKUP() { } static void FINISHED_GENERATING_CAMERA_RAY(arg0, arg1, arg2) { } static void FINISHED_BSDF_SHADING(arg0, arg1) { } static void FINISHED_BSSRDF_SHADING(arg0, arg1) { } static void FINISHED_SPECULAR_REFLECTION_RAY(arg0) { } static void FINISHED_SPECULAR_REFRACTION_RAY(arg0) { } static void FINISHED_TRILINEAR_TEXTURE_LOOKUP() { } static void GRID_BOUNDS_AND_RESOLUTION(arg0, arg1) { } static void GRID_FINISHED_CONSTRUCTION(arg0) { } static void GRID_INTERSECTIONP_TEST(arg0, arg1) { } static void GRID_INTERSECTION_TEST(arg0, arg1) { } static void GRID_RAY_MISSED_BOUNDS() { } static void GRID_RAY_PRIMITIVE_HIT(arg0) { } static void GRID_RAY_PRIMITIVE_INTERSECTIONP_TEST(arg0) { } static void GRID_RAY_PRIMITIVE_INTERSECTION_TEST(arg0) { } static void GRID_RAY_TRAVERSED_VOXEL(arg0, arg1) { } static void GRID_STARTED_CONSTRUCTION(arg0, arg1) { } static void GRID_VOXELIZED_PRIMITIVE(arg0, arg1) { } static void IRRADIANCE_CACHE_ADDED_NEW_SAMPLE(arg0, arg1, arg2, arg3, arg4, arg5) { } static void IRRADIANCE_CACHE_CHECKED_SAMPLE(arg0, arg1, arg2) { } static void IRRADIANCE_CACHE_FINISHED_COMPUTING_IRRADIANCE(arg0, arg1) { } static void IRRADIANCE_CACHE_FINISHED_INTERPOLATION(arg0, arg1, arg2, arg3) { } static void IRRADIANCE_CACHE_FINISHED_RAY(arg0, arg1, arg2) { } static void IRRADIANCE_CACHE_STARTED_COMPUTING_IRRADIANCE(arg0, arg1) { } static void IRRADIANCE_CACHE_STARTED_INTERPOLATION(arg0, arg1) { } static void IRRADIANCE_CACHE_STARTED_RAY(arg0) { } static void KDTREE_FINISHED_CONSTRUCTION(arg0) { } static void KDTREE_INTERSECTIONP_PRIMITIVE_TEST(arg0) { } static void KDTREE_INTERSECTION_PRIMITIVE_TEST(arg0) { } static void KDTREE_INTERSECTIONP_HIT(arg0) { } static void KDTREE_INTERSECTIONP_MISSED() { } static void KDTREE_INTERSECTIONP_TEST(arg0, arg1) { } static void KDTREE_INTERSECTION_FINISHED() { } static void KDTREE_INTERSECTION_HIT(arg0) { } static void KDTREE_INTERSECTION_TEST(arg0, arg1) { } static void KDTREE_RAY_MISSED_BOUNDS() { } static void KDTREE_STARTED_CONSTRUCTION(arg0, arg1) { } static void KDTREE_INTERSECTION_TRAVERSED_INTERIOR_NODE(arg0) { } static void KDTREE_INTERSECTION_TRAVERSED_LEAF_NODE(arg0, arg1) { } static void KDTREE_INTERSECTIONP_TRAVERSED_INTERIOR_NODE(arg0) { } static void KDTREE_INTERSECTIONP_TRAVERSED_LEAF_NODE(arg0, arg1) { } static void LOADED_IMAGE_MAP(arg0, arg1, arg2, arg3) { } static void MIPMAP_EWA_FILTER(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) { } static void MIPMAP_TRILINEAR_FILTER(arg0, arg1, arg2, arg3, arg4, arg5) { } static void MLT_ACCEPTED_MUTATION(arg0, arg1, arg2) { } static void MLT_REJECTED_MUTATION(arg0, arg1, arg2) { } static void MLT_STARTED_MLT_TASK(arg0) { } static void MLT_FINISHED_MLT_TASK(arg0) { } static void MLT_STARTED_RENDERING() { } static void MLT_FINISHED_RENDERING() { } static void MLT_STARTED_DIRECTLIGHTING() { } static void MLT_FINISHED_DIRECTLIGHTING() { } static void MLT_STARTED_BOOTSTRAPPING(count) { } static void MLT_FINISHED_BOOTSTRAPPING(b) { } static void MLT_STARTED_MUTATION() { } static void MLT_FINISHED_MUTATION() { } static void MLT_STARTED_SAMPLE_SPLAT() { } static void MLT_FINISHED_SAMPLE_SPLAT() { } static void MLT_STARTED_GENERATE_PATH() { } static void MLT_FINISHED_GENERATE_PATH() { } static void MLT_STARTED_LPATH() { } static void MLT_FINISHED_LPATH() { } static void MLT_STARTED_LBIDIR() { } static void MLT_FINISHED_LBIDIR() { } static void MLT_STARTED_TASK_INIT() { } static void MLT_FINISHED_TASK_INIT() { } static void MLT_STARTED_SAMPLE_LIGHT_FOR_BIDIR() { } static void MLT_FINISHED_SAMPLE_LIGHT_FOR_BIDIR() { } static void MLT_STARTED_DISPLAY_UPDATE() { } static void MLT_FINISHED_DISPLAY_UPDATE() { } static void MLT_STARTED_ESTIMATE_DIRECT() { } static void MLT_FINISHED_ESTIMATE_DIRECT() { } static void PHOTON_MAP_DEPOSITED_CAUSTIC_PHOTON(arg0, arg1, arg2) { } static void PHOTON_MAP_DEPOSITED_DIRECT_PHOTON(arg0, arg1, arg2) { } static void PHOTON_MAP_DEPOSITED_INDIRECT_PHOTON(arg0, arg1, arg2) { } static void PHOTON_MAP_FINISHED_GATHER_RAY(arg0) { } static void PHOTON_MAP_FINISHED_LOOKUP(arg0, arg1, arg2, arg3) { } static void PHOTON_MAP_FINISHED_RAY_PATH(arg0, arg1) { } static void PHOTON_MAP_STARTED_GATHER_RAY(arg0) { } static void PHOTON_MAP_STARTED_LOOKUP(arg0) { } static void PHOTON_MAP_STARTED_RAY_PATH(arg0, arg1) { } static void SAMPLE_OUTSIDE_IMAGE_EXTENT(arg0) { } static void STARTED_ADDING_IMAGE_SAMPLE(arg0, arg1, arg2, arg3) { } static void STARTED_CAMERA_RAY_INTEGRATION(arg0, arg1) { } static void STARTED_EWA_TEXTURE_LOOKUP(arg0, arg1) { } static void STARTED_PARSING() { } static void STARTED_PREPROCESSING() { } static void STARTED_RAY_INTERSECTION(arg0) { } static void STARTED_RAY_INTERSECTIONP(arg0) { } static void STARTED_RENDERING() { } static void STARTED_RENDERTASK(arg0) { } static void STARTED_BSDF_SHADING(arg0) { } static void STARTED_BSSRDF_SHADING(arg0) { } static void STARTED_TASK(arg0) { } static void STARTED_TRILINEAR_TEXTURE_LOOKUP(arg0, arg1) { } static void SUBSURFACE_ADDED_INTERIOR_CONTRIBUTION(arg0) { } static void SUBSURFACE_ADDED_POINT_CONTRIBUTION(arg0) { } static void SUBSURFACE_ADDED_POINT_TO_OCTREE(arg0, arg1) { } static void SUBSURFACE_COMPUTED_IRRADIANCE_AT_POINT(arg0, arg1) { } static void SUBSURFACE_FINISHED_COMPUTING_IRRADIANCE_VALUES() { } static void SUBSURFACE_FINISHED_OCTREE_LOOKUP() { } static void SUBSURFACE_FINISHED_RAYS_FOR_POINTS(arg0, arg1) { } static void SUBSURFACE_STARTED_COMPUTING_IRRADIANCE_VALUES() { } static void SUBSURFACE_STARTED_OCTREE_LOOKUP(arg0) { } static void SUBSURFACE_STARTED_RAYS_FOR_POINTS() { } static void SUPERSAMPLE_PIXEL_NO(arg0, arg1) { } static void SUPERSAMPLE_PIXEL_YES(arg0, arg1) { } static void RNG_STARTED_RANDOM_FLOAT() { } static void RNG_FINISHED_RANDOM_FLOAT() { } static void RNG_FINISHED_TABLEGEN() { } static void RNG_STARTED_TABLEGEN() { } static void STARTED_BSDF_EVAL() { } static void FINISHED_BSDF_EVAL() { } static void STARTED_BSDF_SAMPLE() { } static void FINISHED_BSDF_SAMPLE() { } static void STARTED_BSDF_PDF() { } static void FINISHED_BSDF_PDF() { } static void AREA_LIGHT_STARTED_SAMPLE() { } static void AREA_LIGHT_FINISHED_SAMPLE() { } static void INFINITE_LIGHT_STARTED_SAMPLE() { } static void INFINITE_LIGHT_FINISHED_SAMPLE() { } static void INFINITE_LIGHT_STARTED_PDF() { } static void INFINITE_LIGHT_FINISHED_PDF() { } static List<StatTracker> trackers = []; static StatsCounter shapesMade = new StatsCounter('Shapes', 'Total Shapes Created'); static StatsCounter trianglesMade = new StatsCounter('Shapes', 'Total Triangles Created'); static StatsCounter cameraRays = new StatsCounter('Rays', 'Camera Rays Traced'); static StatsCounter specularReflectionRays = new StatsCounter('Rays', 'Specular Reflection Rays Traced'); static StatsCounter specularRefractionRays = new StatsCounter('Rays', 'Specular Refraction Rays Traced'); static StatsCounter shadowRays = new StatsCounter('Rays', 'Shadow Rays Traced'); static StatsCounter nonShadowRays = new StatsCounter('Rays', 'Total Non-Shadow Rays Traced'); static StatsCounter kdTreeInteriorNodes = new StatsCounter('Kd-Tree', 'Interior Nodes Created'); static StatsCounter kdTreeLeafNodes = new StatsCounter('Kd-Tree', 'Leaf Nodes Created'); static StatsCounter kdTreeMaxPrims = new StatsCounter('Kd-Tree', 'Maximum Primitives in Leaf'); static StatsCounter kdTreeMaxDepth = new StatsCounter('Kd-Tree', 'Maximum Depth of Leaf Nodes'); static StatsPercentage rayTriIntersections = new StatsPercentage('Intersections', 'Ray/Triangle Intersection Hits'); static StatsPercentage rayTriIntersectionPs = new StatsPercentage('Intersections', 'Ray/Triangle IntersectionP Hits'); } class StatTracker { String category; String name; StatTracker(this.category, this.name); } class StatsCounter extends StatTracker { StatsCounter(String category, String name) : count = 0, super(category, name) { Stats.trackers.add(this); } StatsCounter operator +(int n) { count += n; return this; } void max(int newval) { count = Math.max(count, newval); } void min(int newval) { count = Math.min(count, newval); } String toString() => '$category | $name: $count'; int count; } class StatsPercentage extends StatTracker { StatsPercentage(String category, String name) : na = 0, nb = 0, super(category, name) { Stats.trackers.add(this); } void add(int a, int b) { na += a; nb += b; } String toString() => '$category | $name: $na / $nb (${(na / nb) * 100}'; int na; int nb; }
22.714521
120
0.683981
dd853edc6dbc497cf061d6bae07c5323de978fd4
1,189
php
PHP
app/Patient.php
Amna-jahanzaib/laravel_project
5a79d943d47d8c1836b8e89cbceab112c42be3cc
[ "MIT" ]
null
null
null
app/Patient.php
Amna-jahanzaib/laravel_project
5a79d943d47d8c1836b8e89cbceab112c42be3cc
[ "MIT" ]
6
2021-02-02T19:36:44.000Z
2022-02-27T06:26:00.000Z
app/Patient.php
Amna-jahanzaib/laravel_project
5a79d943d47d8c1836b8e89cbceab112c42be3cc
[ "MIT" ]
null
null
null
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; use \DateTimeInterface; class Patient extends Model { use SoftDeletes; public $table = 'patients'; protected $primaryKey = 'id'; const GENDER_RADIO = [ 'm' => 'Male', 'f' => 'Female', ]; protected $dates = [ 'created_at', 'updated_at', 'deleted_at', ]; protected $fillable = [ 'name', 'father_name', 'age', 'phone', 'gender', 'disease', 'city', 'country', 'address', 'user_id', 'created_at', 'updated_at', 'deleted_at', ]; protected function serializeDate(DateTimeInterface $date) { return $date->format('Y-m-d H:i:s'); } public function patientAppointments() { return $this->hasMany(Appointment::class, 'patient_id', 'id'); } public function user() { return $this->belongsTo(User::class, 'user_id'); } public function patientSessions() { return $this->hasMany(Session::class, 'patient_id', 'id'); } }
17.485294
70
0.53995
d529ca7a0125ea26e7b207c0bbc5f574a4f7510d
118
dart
Dart
example/example.dart
gluons/figures.dart
85b0527a6e8259f0e051dd52b0e2010ca7423c26
[ "MIT" ]
1
2019-09-21T12:17:41.000Z
2019-09-21T12:17:41.000Z
example/example.dart
gluons/figures.dart
85b0527a6e8259f0e051dd52b0e2010ca7423c26
[ "MIT" ]
null
null
null
example/example.dart
gluons/figures.dart
85b0527a6e8259f0e051dd52b0e2010ca7423c26
[ "MIT" ]
null
null
null
import 'package:figures/figures.dart'; void main() { print(figures['tick']); print(replaceFigures('✔ check')); }
16.857143
38
0.669492
5fb45e644f4d7cbe265527889117cd1101bb6af1
51,911
c
C
testsuite/EXP_4/test582.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
34
2017-07-04T14:16:12.000Z
2021-04-22T21:04:43.000Z
testsuite/EXP_4/test582.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
1
2017-07-06T03:43:44.000Z
2017-07-06T03:43:44.000Z
testsuite/EXP_4/test582.c
ishiura-compiler/CF3
0718aa176d0303a4ea8a46bd6c794997cbb8fabb
[ "MIT" ]
6
2017-07-04T16:30:42.000Z
2019-10-16T05:37:29.000Z
/* CF3 Copyright (c) 2015 ishiura-lab. Released under the MIT license. https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md */ #include<stdio.h> #include<stdint.h> #include<stdlib.h> #include"test1.h" uint32_t x19 = 799U; static volatile int32_t x20 = -1; int32_t x25 = INT32_MAX; volatile int64_t x26 = INT64_MIN; int64_t x28 = -1LL; uint16_t x53 = 5U; volatile int32_t t8 = 1; volatile int64_t x66 = 7682197570270LL; volatile int32_t t9 = -1; static int16_t x72 = INT16_MIN; int32_t x83 = -700549389; volatile int32_t x85 = INT32_MAX; int8_t x88 = -1; static volatile int32_t t12 = -382640; uint64_t x93 = 7LLU; volatile int32_t t13 = 203; static uint16_t x97 = 14074U; int64_t x101 = INT64_MIN; int16_t x108 = INT16_MAX; int32_t x109 = -715; int32_t x112 = -94163; volatile int32_t x114 = -1; uint16_t x115 = UINT16_MAX; static int16_t x121 = INT16_MAX; static uint16_t x139 = UINT16_MAX; volatile int32_t t22 = 58238843; int8_t x148 = INT8_MIN; int16_t x161 = INT16_MAX; volatile uint16_t x163 = UINT16_MAX; int64_t x169 = -1LL; int16_t x170 = -812; static volatile uint64_t x171 = UINT64_MAX; uint64_t x176 = UINT64_MAX; int16_t x181 = INT16_MAX; int16_t x183 = 940; uint16_t x193 = 12U; int32_t t30 = 936; static int16_t x197 = INT16_MIN; int16_t x199 = INT16_MIN; uint16_t x212 = 5316U; uint16_t x218 = 50U; static int32_t t33 = -1; volatile int8_t x230 = INT8_MIN; static int16_t x232 = -162; uint32_t x234 = 3U; int64_t x241 = -1LL; int8_t x243 = INT8_MIN; volatile int32_t x247 = INT32_MIN; volatile int64_t x248 = 82111LL; uint8_t x250 = 13U; int16_t x253 = -4; volatile int8_t x254 = INT8_MIN; int32_t x256 = -1; uint16_t x257 = UINT16_MAX; int64_t x258 = 56LL; volatile int16_t x273 = INT16_MIN; uint8_t x281 = 0U; volatile int16_t x282 = INT16_MIN; int8_t x284 = INT8_MIN; volatile int32_t t46 = -462399216; uint64_t x295 = UINT64_MAX; int32_t x307 = INT32_MAX; int16_t x308 = 0; uint64_t x323 = UINT64_MAX; int64_t x326 = INT64_MIN; volatile uint32_t x334 = UINT32_MAX; int64_t x335 = 484LL; volatile int32_t x352 = INT32_MAX; int16_t x358 = 2; uint16_t x365 = 13460U; volatile int32_t t62 = -5560361; int16_t x388 = -1; static uint16_t x391 = UINT16_MAX; uint32_t x399 = UINT32_MAX; volatile uint16_t x401 = UINT16_MAX; uint64_t x404 = 6233396463523LLU; uint64_t x409 = 7734753742587798LLU; int64_t x412 = INT64_MAX; int8_t x413 = 1; int32_t t72 = -15; int32_t x427 = 380; volatile int8_t x432 = 3; volatile int32_t t75 = 245293050; static int64_t x444 = INT64_MIN; uint16_t x459 = UINT16_MAX; uint32_t x460 = 395U; uint32_t x462 = 304U; int8_t x466 = INT8_MIN; int32_t t82 = 97227408; int16_t x477 = INT16_MIN; int16_t x489 = INT16_MIN; static uint64_t x492 = UINT64_MAX; uint64_t x500 = 15343053308839322LLU; int32_t x503 = INT32_MAX; int64_t x504 = -152LL; int64_t x507 = -1LL; int32_t t88 = -3; volatile int16_t x510 = INT16_MIN; int8_t x532 = -11; static volatile int32_t t93 = 14; int8_t x548 = INT8_MAX; static volatile int16_t x550 = 111; int32_t x551 = -1; uint16_t x554 = 1U; static volatile int32_t t97 = -64617863; uint64_t x558 = UINT64_MAX; int16_t x560 = INT16_MIN; int64_t x565 = INT64_MIN; static volatile uint16_t x568 = UINT16_MAX; volatile uint64_t x573 = 1094446875882759534LLU; int8_t x574 = INT8_MIN; static int32_t t103 = -113671; int64_t x598 = -1LL; volatile int32_t t107 = -771544; volatile int32_t x608 = 258; static int32_t x617 = INT32_MIN; volatile int32_t x618 = -1; int16_t x619 = INT16_MIN; int32_t t111 = -147697; int8_t x637 = INT8_MIN; static uint64_t x655 = UINT64_MAX; int16_t x663 = INT16_MAX; int16_t x673 = -1; static int16_t x676 = INT16_MAX; static volatile int16_t x680 = -1; static int64_t x682 = INT64_MIN; static uint16_t x684 = 2U; int64_t x685 = -1LL; int32_t x689 = INT32_MIN; volatile uint64_t x690 = 676227LLU; int32_t t125 = -196; static int16_t x703 = INT16_MIN; volatile int32_t t128 = 196249; int32_t t129 = -2; int64_t x730 = -426LL; volatile int32_t t131 = 6; int8_t x741 = -4; int8_t x760 = INT8_MIN; volatile int32_t t137 = -622; static volatile int16_t x761 = INT16_MAX; uint64_t x772 = 89677LLU; static volatile int16_t x778 = INT16_MAX; int8_t x780 = INT8_MAX; int64_t x782 = 59LL; volatile int16_t x789 = -174; static int8_t x791 = INT8_MIN; uint8_t x799 = 0U; volatile int8_t x800 = 2; static int32_t t144 = 122650; int64_t x801 = -1LL; int16_t x802 = -1; volatile uint64_t x814 = 197510LLU; volatile uint8_t x816 = 0U; static int32_t t148 = -2; int32_t t149 = 6240709; static int8_t x838 = -3; volatile int16_t x839 = INT16_MIN; volatile int16_t x846 = INT16_MAX; static volatile int32_t x848 = INT32_MIN; static int32_t x850 = INT32_MIN; uint16_t x853 = UINT16_MAX; int32_t t154 = -3278; static int16_t x860 = INT16_MIN; int64_t x861 = INT64_MIN; int32_t t158 = 99062; int8_t x882 = INT8_MAX; uint16_t x883 = 4U; int16_t x892 = -33; int32_t t161 = -259839; int16_t x905 = -1; static int64_t x909 = INT64_MAX; static int8_t x914 = 1; volatile uint8_t x916 = UINT8_MAX; static int32_t t165 = -3613; int32_t t167 = -2748521; int32_t t170 = -10; int16_t x952 = INT16_MAX; static int32_t x959 = -1; int16_t x961 = INT16_MIN; int8_t x964 = -1; uint64_t x967 = 8308LLU; static int8_t x968 = -7; int32_t t175 = 0; int16_t x969 = INT16_MAX; static int64_t x985 = -1LL; uint32_t x990 = 39589489U; volatile uint8_t x992 = 1U; int64_t x1002 = INT64_MIN; static uint16_t x1004 = 21U; uint32_t x1005 = 625U; static int64_t x1006 = INT64_MIN; static volatile int32_t t181 = 2617638; uint32_t x1013 = 3926490U; static uint64_t x1016 = 112482LLU; int32_t t182 = 0; int64_t x1036 = INT64_MAX; volatile int32_t t185 = 1; volatile int32_t t186 = -25886483; static int64_t x1054 = 495000285765389909LL; volatile int32_t x1064 = 1636; int16_t x1067 = INT16_MIN; static volatile uint64_t x1068 = 140316080939140LLU; uint64_t x1077 = UINT64_MAX; uint32_t x1079 = UINT32_MAX; volatile int32_t x1080 = INT32_MIN; int64_t x1090 = 248LL; int32_t x1091 = 1; uint32_t x1092 = 65530U; int8_t x1099 = INT8_MIN; uint32_t x1100 = 49730U; static int64_t x1103 = -1LL; static volatile int32_t t199 = -139285621; void f0(void) { int8_t x13 = INT8_MAX; int8_t x14 = -1; int8_t x15 = 1; uint16_t x16 = UINT16_MAX; volatile int32_t t0 = 52; t0 = (x13==(x14^(x15*x16))); if (t0 != 0) { NG(); } else { ; } } void f1(void) { int32_t x17 = -1; static volatile int64_t x18 = INT64_MAX; int32_t t1 = 84941; t1 = (x17==(x18^(x19*x20))); if (t1 != 0) { NG(); } else { ; } } void f2(void) { int8_t x21 = INT8_MIN; static int16_t x22 = INT16_MIN; uint16_t x23 = UINT16_MAX; uint8_t x24 = 0U; int32_t t2 = 0; t2 = (x21==(x22^(x23*x24))); if (t2 != 0) { NG(); } else { ; } } void f3(void) { static int8_t x27 = -1; static volatile int32_t t3 = -77821; t3 = (x25==(x26^(x27*x28))); if (t3 != 0) { NG(); } else { ; } } void f4(void) { uint8_t x29 = 20U; static int8_t x30 = 1; static int32_t x31 = -157019; int8_t x32 = INT8_MAX; int32_t t4 = 41351624; t4 = (x29==(x30^(x31*x32))); if (t4 != 0) { NG(); } else { ; } } void f5(void) { int16_t x33 = INT16_MAX; static int32_t x34 = -71531189; int32_t x35 = -1; static volatile int16_t x36 = 437; int32_t t5 = -3; t5 = (x33==(x34^(x35*x36))); if (t5 != 0) { NG(); } else { ; } } void f6(void) { int32_t x41 = -1; int16_t x42 = INT16_MIN; uint16_t x43 = 229U; uint8_t x44 = UINT8_MAX; volatile int32_t t6 = 27896718; t6 = (x41==(x42^(x43*x44))); if (t6 != 0) { NG(); } else { ; } } void f7(void) { int8_t x54 = INT8_MIN; int32_t x55 = INT32_MAX; uint64_t x56 = 69976237100099LLU; volatile int32_t t7 = -1; t7 = (x53==(x54^(x55*x56))); if (t7 != 0) { NG(); } else { ; } } void f8(void) { int64_t x61 = INT64_MIN; int16_t x62 = 14; int32_t x63 = INT32_MAX; int64_t x64 = -145622488LL; t8 = (x61==(x62^(x63*x64))); if (t8 != 0) { NG(); } else { ; } } void f9(void) { int8_t x65 = -1; int16_t x67 = INT16_MIN; int8_t x68 = -1; t9 = (x65==(x66^(x67*x68))); if (t9 != 0) { NG(); } else { ; } } void f10(void) { volatile int16_t x69 = INT16_MIN; int16_t x70 = 219; int8_t x71 = INT8_MIN; volatile int32_t t10 = -1724; t10 = (x69==(x70^(x71*x72))); if (t10 != 0) { NG(); } else { ; } } void f11(void) { volatile int8_t x81 = INT8_MIN; int32_t x82 = -463168962; static int8_t x84 = -1; int32_t t11 = -34694873; t11 = (x81==(x82^(x83*x84))); if (t11 != 0) { NG(); } else { ; } } void f12(void) { int32_t x86 = INT32_MIN; uint8_t x87 = 52U; t12 = (x85==(x86^(x87*x88))); if (t12 != 0) { NG(); } else { ; } } void f13(void) { int32_t x94 = -133; uint16_t x95 = 960U; uint16_t x96 = 31U; t13 = (x93==(x94^(x95*x96))); if (t13 != 0) { NG(); } else { ; } } void f14(void) { volatile uint32_t x98 = 1U; volatile uint64_t x99 = 47538LLU; int8_t x100 = INT8_MIN; int32_t t14 = -777089765; t14 = (x97==(x98^(x99*x100))); if (t14 != 0) { NG(); } else { ; } } void f15(void) { int8_t x102 = INT8_MIN; uint64_t x103 = 3595810161117LLU; static uint32_t x104 = 60U; int32_t t15 = -27597; t15 = (x101==(x102^(x103*x104))); if (t15 != 0) { NG(); } else { ; } } void f16(void) { uint32_t x105 = 1447U; volatile uint16_t x106 = 5U; volatile int16_t x107 = -11199; int32_t t16 = -51; t16 = (x105==(x106^(x107*x108))); if (t16 != 0) { NG(); } else { ; } } void f17(void) { static volatile uint64_t x110 = 471923370863670280LLU; int16_t x111 = -1; static volatile int32_t t17 = 66586; t17 = (x109==(x110^(x111*x112))); if (t17 != 0) { NG(); } else { ; } } void f18(void) { int16_t x113 = -1; uint64_t x116 = 79053LLU; volatile int32_t t18 = 385267; t18 = (x113==(x114^(x115*x116))); if (t18 != 0) { NG(); } else { ; } } void f19(void) { int16_t x122 = INT16_MIN; static int8_t x123 = INT8_MIN; int64_t x124 = -49666674304LL; int32_t t19 = 295411955; t19 = (x121==(x122^(x123*x124))); if (t19 != 0) { NG(); } else { ; } } void f20(void) { static int16_t x129 = INT16_MIN; int16_t x130 = 45; int32_t x131 = 398; static int32_t x132 = -10266; volatile int32_t t20 = 12140; t20 = (x129==(x130^(x131*x132))); if (t20 != 0) { NG(); } else { ; } } void f21(void) { volatile int16_t x137 = INT16_MAX; int32_t x138 = INT32_MIN; volatile int64_t x140 = -1LL; int32_t t21 = 4330; t21 = (x137==(x138^(x139*x140))); if (t21 != 0) { NG(); } else { ; } } void f22(void) { volatile uint64_t x141 = 2450029316847LLU; volatile uint8_t x142 = 28U; int8_t x143 = -1; uint16_t x144 = 19U; t22 = (x141==(x142^(x143*x144))); if (t22 != 0) { NG(); } else { ; } } void f23(void) { static uint64_t x145 = 362LLU; static uint16_t x146 = UINT16_MAX; int8_t x147 = -1; int32_t t23 = 114; t23 = (x145==(x146^(x147*x148))); if (t23 != 0) { NG(); } else { ; } } void f24(void) { uint8_t x153 = 1U; int8_t x154 = -1; uint8_t x155 = 49U; int8_t x156 = 5; int32_t t24 = -215406874; t24 = (x153==(x154^(x155*x156))); if (t24 != 0) { NG(); } else { ; } } void f25(void) { int32_t x157 = INT32_MAX; int8_t x158 = INT8_MIN; static int32_t x159 = -17; int16_t x160 = INT16_MIN; volatile int32_t t25 = -1353; t25 = (x157==(x158^(x159*x160))); if (t25 != 0) { NG(); } else { ; } } void f26(void) { int8_t x162 = INT8_MAX; static volatile uint32_t x164 = UINT32_MAX; volatile int32_t t26 = -702279; t26 = (x161==(x162^(x163*x164))); if (t26 != 0) { NG(); } else { ; } } void f27(void) { static int64_t x172 = -2190848360110174472LL; volatile int32_t t27 = -11734322; t27 = (x169==(x170^(x171*x172))); if (t27 != 0) { NG(); } else { ; } } void f28(void) { int16_t x173 = INT16_MIN; uint64_t x174 = UINT64_MAX; uint16_t x175 = UINT16_MAX; int32_t t28 = 3963; t28 = (x173==(x174^(x175*x176))); if (t28 != 0) { NG(); } else { ; } } void f29(void) { static int32_t x182 = INT32_MIN; int32_t x184 = 0; int32_t t29 = 931853; t29 = (x181==(x182^(x183*x184))); if (t29 != 0) { NG(); } else { ; } } void f30(void) { uint16_t x194 = 6U; int16_t x195 = -104; uint8_t x196 = UINT8_MAX; t30 = (x193==(x194^(x195*x196))); if (t30 != 0) { NG(); } else { ; } } void f31(void) { int16_t x198 = -1; volatile uint32_t x200 = UINT32_MAX; int32_t t31 = 32118833; t31 = (x197==(x198^(x199*x200))); if (t31 != 0) { NG(); } else { ; } } void f32(void) { int64_t x209 = INT64_MIN; uint16_t x210 = UINT16_MAX; volatile int64_t x211 = -107110064179555LL; static volatile int32_t t32 = -17107; t32 = (x209==(x210^(x211*x212))); if (t32 != 0) { NG(); } else { ; } } void f33(void) { int32_t x217 = INT32_MAX; volatile int8_t x219 = INT8_MIN; int8_t x220 = 1; t33 = (x217==(x218^(x219*x220))); if (t33 != 0) { NG(); } else { ; } } void f34(void) { uint32_t x221 = 134042598U; static volatile int32_t x222 = INT32_MIN; static int16_t x223 = 2; uint8_t x224 = 1U; volatile int32_t t34 = 50733; t34 = (x221==(x222^(x223*x224))); if (t34 != 0) { NG(); } else { ; } } void f35(void) { int8_t x229 = 0; int64_t x231 = 299305341835555LL; volatile int32_t t35 = 1; t35 = (x229==(x230^(x231*x232))); if (t35 != 0) { NG(); } else { ; } } void f36(void) { int8_t x233 = -1; uint16_t x235 = 662U; static uint16_t x236 = 10589U; int32_t t36 = 22823; t36 = (x233==(x234^(x235*x236))); if (t36 != 0) { NG(); } else { ; } } void f37(void) { static int32_t x242 = -256086; int8_t x244 = -1; volatile int32_t t37 = -59270841; t37 = (x241==(x242^(x243*x244))); if (t37 != 0) { NG(); } else { ; } } void f38(void) { static volatile int32_t x245 = INT32_MIN; uint16_t x246 = 173U; volatile int32_t t38 = -63; t38 = (x245==(x246^(x247*x248))); if (t38 != 0) { NG(); } else { ; } } void f39(void) { int32_t x249 = -2429377; int16_t x251 = -1; int32_t x252 = -1; static volatile int32_t t39 = 48591; t39 = (x249==(x250^(x251*x252))); if (t39 != 0) { NG(); } else { ; } } void f40(void) { int16_t x255 = 1749; volatile int32_t t40 = -5; t40 = (x253==(x254^(x255*x256))); if (t40 != 0) { NG(); } else { ; } } void f41(void) { int32_t x259 = -1; int16_t x260 = INT16_MAX; int32_t t41 = 28519598; t41 = (x257==(x258^(x259*x260))); if (t41 != 0) { NG(); } else { ; } } void f42(void) { uint16_t x261 = 56U; int32_t x262 = INT32_MIN; uint32_t x263 = UINT32_MAX; volatile int8_t x264 = -1; static int32_t t42 = 90928; t42 = (x261==(x262^(x263*x264))); if (t42 != 0) { NG(); } else { ; } } void f43(void) { volatile uint8_t x274 = UINT8_MAX; int16_t x275 = INT16_MAX; static int64_t x276 = -291024LL; int32_t t43 = 28504033; t43 = (x273==(x274^(x275*x276))); if (t43 != 0) { NG(); } else { ; } } void f44(void) { static uint64_t x277 = 108950851LLU; volatile int8_t x278 = -22; static volatile int8_t x279 = INT8_MIN; volatile int16_t x280 = INT16_MIN; int32_t t44 = -1; t44 = (x277==(x278^(x279*x280))); if (t44 != 0) { NG(); } else { ; } } void f45(void) { uint8_t x283 = UINT8_MAX; static volatile int32_t t45 = 2781; t45 = (x281==(x282^(x283*x284))); if (t45 != 0) { NG(); } else { ; } } void f46(void) { uint8_t x285 = UINT8_MAX; uint32_t x286 = 5U; static int32_t x287 = -1; int32_t x288 = 15; t46 = (x285==(x286^(x287*x288))); if (t46 != 0) { NG(); } else { ; } } void f47(void) { int32_t x289 = INT32_MAX; uint32_t x290 = UINT32_MAX; int8_t x291 = -2; static int64_t x292 = 22512126LL; volatile int32_t t47 = 0; t47 = (x289==(x290^(x291*x292))); if (t47 != 0) { NG(); } else { ; } } void f48(void) { int16_t x293 = 0; uint16_t x294 = 155U; static int16_t x296 = 8095; volatile int32_t t48 = -657; t48 = (x293==(x294^(x295*x296))); if (t48 != 0) { NG(); } else { ; } } void f49(void) { uint8_t x305 = 1U; static int32_t x306 = -170157; volatile int32_t t49 = -837547320; t49 = (x305==(x306^(x307*x308))); if (t49 != 0) { NG(); } else { ; } } void f50(void) { int16_t x313 = -1; int16_t x314 = INT16_MAX; static int64_t x315 = -1LL; uint64_t x316 = 104LLU; int32_t t50 = 6884; t50 = (x313==(x314^(x315*x316))); if (t50 != 0) { NG(); } else { ; } } void f51(void) { int32_t x317 = INT32_MIN; int32_t x318 = INT32_MAX; static uint16_t x319 = 25337U; int16_t x320 = -1; int32_t t51 = -3923061; t51 = (x317==(x318^(x319*x320))); if (t51 != 0) { NG(); } else { ; } } void f52(void) { volatile int16_t x321 = INT16_MIN; int16_t x322 = INT16_MIN; uint16_t x324 = UINT16_MAX; volatile int32_t t52 = -12460907; t52 = (x321==(x322^(x323*x324))); if (t52 != 0) { NG(); } else { ; } } void f53(void) { uint8_t x325 = UINT8_MAX; int64_t x327 = -1LL; static volatile int64_t x328 = -1LL; volatile int32_t t53 = -993948; t53 = (x325==(x326^(x327*x328))); if (t53 != 0) { NG(); } else { ; } } void f54(void) { int8_t x333 = INT8_MIN; int8_t x336 = INT8_MIN; volatile int32_t t54 = 52; t54 = (x333==(x334^(x335*x336))); if (t54 != 0) { NG(); } else { ; } } void f55(void) { int16_t x341 = INT16_MIN; int64_t x342 = -1LL; volatile uint64_t x343 = 1328775305886LLU; int64_t x344 = -1LL; static volatile int32_t t55 = 103486143; t55 = (x341==(x342^(x343*x344))); if (t55 != 0) { NG(); } else { ; } } void f56(void) { volatile int8_t x345 = INT8_MIN; uint32_t x346 = UINT32_MAX; uint64_t x347 = 30973940790850330LLU; int32_t x348 = INT32_MIN; volatile int32_t t56 = -58931400; t56 = (x345==(x346^(x347*x348))); if (t56 != 0) { NG(); } else { ; } } void f57(void) { volatile int64_t x349 = 5973103LL; int32_t x350 = 204976055; volatile uint64_t x351 = UINT64_MAX; volatile int32_t t57 = -129222254; t57 = (x349==(x350^(x351*x352))); if (t57 != 0) { NG(); } else { ; } } void f58(void) { uint8_t x353 = 3U; int8_t x354 = 29; uint32_t x355 = 970U; static int32_t x356 = INT32_MIN; static volatile int32_t t58 = 282248; t58 = (x353==(x354^(x355*x356))); if (t58 != 0) { NG(); } else { ; } } void f59(void) { uint32_t x357 = 10872653U; int64_t x359 = -3LL; static volatile int16_t x360 = 178; volatile int32_t t59 = -80433; t59 = (x357==(x358^(x359*x360))); if (t59 != 0) { NG(); } else { ; } } void f60(void) { static uint32_t x361 = UINT32_MAX; int8_t x362 = INT8_MIN; static uint32_t x363 = UINT32_MAX; int32_t x364 = INT32_MIN; int32_t t60 = 799599; t60 = (x361==(x362^(x363*x364))); if (t60 != 0) { NG(); } else { ; } } void f61(void) { volatile int64_t x366 = 3823257LL; uint64_t x367 = UINT64_MAX; int64_t x368 = INT64_MIN; int32_t t61 = 16; t61 = (x365==(x366^(x367*x368))); if (t61 != 0) { NG(); } else { ; } } void f62(void) { volatile int64_t x369 = 2634111358785827986LL; uint64_t x370 = 0LLU; uint32_t x371 = 698U; volatile uint16_t x372 = UINT16_MAX; t62 = (x369==(x370^(x371*x372))); if (t62 != 0) { NG(); } else { ; } } void f63(void) { int16_t x373 = -2505; int8_t x374 = INT8_MIN; uint64_t x375 = 736259902LLU; int16_t x376 = -1; volatile int32_t t63 = -1987; t63 = (x373==(x374^(x375*x376))); if (t63 != 0) { NG(); } else { ; } } void f64(void) { int8_t x377 = -1; uint16_t x378 = 37U; int8_t x379 = -1; volatile int8_t x380 = -1; int32_t t64 = 26; t64 = (x377==(x378^(x379*x380))); if (t64 != 0) { NG(); } else { ; } } void f65(void) { uint64_t x385 = UINT64_MAX; volatile int16_t x386 = -1; uint8_t x387 = 62U; volatile int32_t t65 = 833974; t65 = (x385==(x386^(x387*x388))); if (t65 != 0) { NG(); } else { ; } } void f66(void) { int64_t x389 = -1LL; volatile int32_t x390 = -1561; static int8_t x392 = INT8_MIN; volatile int32_t t66 = 561629; t66 = (x389==(x390^(x391*x392))); if (t66 != 0) { NG(); } else { ; } } void f67(void) { int16_t x393 = -520; static volatile int32_t x394 = INT32_MAX; static uint8_t x395 = 2U; uint8_t x396 = UINT8_MAX; volatile int32_t t67 = 2676481; t67 = (x393==(x394^(x395*x396))); if (t67 != 0) { NG(); } else { ; } } void f68(void) { int8_t x397 = -53; int16_t x398 = 383; volatile int8_t x400 = INT8_MIN; int32_t t68 = -956222; t68 = (x397==(x398^(x399*x400))); if (t68 != 0) { NG(); } else { ; } } void f69(void) { int32_t x402 = INT32_MIN; uint64_t x403 = 426046LLU; int32_t t69 = -1; t69 = (x401==(x402^(x403*x404))); if (t69 != 0) { NG(); } else { ; } } void f70(void) { int64_t x405 = -1LL; uint16_t x406 = 1942U; volatile int8_t x407 = INT8_MIN; uint64_t x408 = 106587348115109LLU; volatile int32_t t70 = 247087539; t70 = (x405==(x406^(x407*x408))); if (t70 != 0) { NG(); } else { ; } } void f71(void) { int8_t x410 = INT8_MIN; volatile int8_t x411 = 0; static volatile int32_t t71 = -27; t71 = (x409==(x410^(x411*x412))); if (t71 != 0) { NG(); } else { ; } } void f72(void) { int16_t x414 = INT16_MIN; volatile uint64_t x415 = 751LLU; int8_t x416 = -1; t72 = (x413==(x414^(x415*x416))); if (t72 != 0) { NG(); } else { ; } } void f73(void) { int64_t x421 = INT64_MIN; uint64_t x422 = 322065135501806203LLU; uint64_t x423 = UINT64_MAX; int8_t x424 = -1; volatile int32_t t73 = 207929; t73 = (x421==(x422^(x423*x424))); if (t73 != 0) { NG(); } else { ; } } void f74(void) { uint16_t x425 = UINT16_MAX; int16_t x426 = 1; volatile int8_t x428 = 0; volatile int32_t t74 = 1697; t74 = (x425==(x426^(x427*x428))); if (t74 != 0) { NG(); } else { ; } } void f75(void) { static int16_t x429 = INT16_MIN; static uint64_t x430 = 3906LLU; uint8_t x431 = 0U; t75 = (x429==(x430^(x431*x432))); if (t75 != 0) { NG(); } else { ; } } void f76(void) { int8_t x433 = INT8_MIN; static int32_t x434 = INT32_MAX; volatile uint32_t x435 = UINT32_MAX; static uint16_t x436 = 2002U; int32_t t76 = -51399127; t76 = (x433==(x434^(x435*x436))); if (t76 != 0) { NG(); } else { ; } } void f77(void) { int8_t x441 = -1; static volatile uint8_t x442 = 1U; int8_t x443 = 1; int32_t t77 = -18769318; t77 = (x441==(x442^(x443*x444))); if (t77 != 0) { NG(); } else { ; } } void f78(void) { static int16_t x445 = INT16_MAX; static int64_t x446 = -1LL; int8_t x447 = INT8_MIN; volatile int8_t x448 = -3; volatile int32_t t78 = -508706729; t78 = (x445==(x446^(x447*x448))); if (t78 != 0) { NG(); } else { ; } } void f79(void) { uint32_t x453 = 4099525U; static int32_t x454 = -1; volatile int32_t x455 = -1; int8_t x456 = -1; int32_t t79 = -4593598; t79 = (x453==(x454^(x455*x456))); if (t79 != 0) { NG(); } else { ; } } void f80(void) { uint8_t x457 = 2U; uint32_t x458 = UINT32_MAX; volatile int32_t t80 = -473; t80 = (x457==(x458^(x459*x460))); if (t80 != 0) { NG(); } else { ; } } void f81(void) { uint32_t x461 = 183590U; static int16_t x463 = INT16_MAX; int8_t x464 = -1; int32_t t81 = -17; t81 = (x461==(x462^(x463*x464))); if (t81 != 0) { NG(); } else { ; } } void f82(void) { uint16_t x465 = UINT16_MAX; uint32_t x467 = 1009348U; static int32_t x468 = INT32_MAX; t82 = (x465==(x466^(x467*x468))); if (t82 != 0) { NG(); } else { ; } } void f83(void) { static uint64_t x478 = 14219252692LLU; uint64_t x479 = UINT64_MAX; static uint64_t x480 = 8LLU; volatile int32_t t83 = 2085; t83 = (x477==(x478^(x479*x480))); if (t83 != 0) { NG(); } else { ; } } void f84(void) { static uint64_t x490 = 24400687899LLU; static int8_t x491 = INT8_MIN; int32_t t84 = -425738867; t84 = (x489==(x490^(x491*x492))); if (t84 != 0) { NG(); } else { ; } } void f85(void) { uint64_t x493 = UINT64_MAX; uint8_t x494 = 3U; int16_t x495 = 91; uint64_t x496 = 2LLU; static int32_t t85 = 1; t85 = (x493==(x494^(x495*x496))); if (t85 != 0) { NG(); } else { ; } } void f86(void) { static volatile uint32_t x497 = UINT32_MAX; static volatile int32_t x498 = -1; uint32_t x499 = 13U; volatile int32_t t86 = 3; t86 = (x497==(x498^(x499*x500))); if (t86 != 0) { NG(); } else { ; } } void f87(void) { static int32_t x501 = INT32_MIN; int32_t x502 = -1; int32_t t87 = -215389; t87 = (x501==(x502^(x503*x504))); if (t87 != 0) { NG(); } else { ; } } void f88(void) { int16_t x505 = 91; static int32_t x506 = INT32_MIN; uint32_t x508 = UINT32_MAX; t88 = (x505==(x506^(x507*x508))); if (t88 != 0) { NG(); } else { ; } } void f89(void) { int8_t x509 = INT8_MAX; uint8_t x511 = UINT8_MAX; int32_t x512 = -1; static volatile int32_t t89 = -44426365; t89 = (x509==(x510^(x511*x512))); if (t89 != 0) { NG(); } else { ; } } void f90(void) { int8_t x513 = -1; int32_t x514 = -1; static int64_t x515 = 397356529864LL; int16_t x516 = 5; volatile int32_t t90 = 110; t90 = (x513==(x514^(x515*x516))); if (t90 != 0) { NG(); } else { ; } } void f91(void) { static int64_t x517 = -4097254883751316083LL; static int32_t x518 = 108649; static volatile uint32_t x519 = UINT32_MAX; volatile uint32_t x520 = 19U; int32_t t91 = 3760713; t91 = (x517==(x518^(x519*x520))); if (t91 != 0) { NG(); } else { ; } } void f92(void) { uint32_t x525 = 5051241U; volatile int8_t x526 = INT8_MAX; int16_t x527 = INT16_MAX; int8_t x528 = -1; static int32_t t92 = 1896; t92 = (x525==(x526^(x527*x528))); if (t92 != 0) { NG(); } else { ; } } void f93(void) { volatile int16_t x529 = INT16_MIN; volatile uint32_t x530 = 45U; int8_t x531 = -1; t93 = (x529==(x530^(x531*x532))); if (t93 != 0) { NG(); } else { ; } } void f94(void) { static int16_t x533 = -11648; int16_t x534 = 37; int64_t x535 = 24011LL; int64_t x536 = -1LL; static int32_t t94 = -23; t94 = (x533==(x534^(x535*x536))); if (t94 != 0) { NG(); } else { ; } } void f95(void) { int16_t x545 = INT16_MAX; uint64_t x546 = 10674512LLU; uint16_t x547 = 2132U; volatile int32_t t95 = 0; t95 = (x545==(x546^(x547*x548))); if (t95 != 0) { NG(); } else { ; } } void f96(void) { volatile int16_t x549 = INT16_MIN; int32_t x552 = -1; volatile int32_t t96 = 123272; t96 = (x549==(x550^(x551*x552))); if (t96 != 0) { NG(); } else { ; } } void f97(void) { uint32_t x553 = 675U; int32_t x555 = -1; uint32_t x556 = 123339U; t97 = (x553==(x554^(x555*x556))); if (t97 != 0) { NG(); } else { ; } } void f98(void) { int8_t x557 = 3; volatile int8_t x559 = -1; volatile int32_t t98 = 95; t98 = (x557==(x558^(x559*x560))); if (t98 != 0) { NG(); } else { ; } } void f99(void) { int16_t x561 = INT16_MAX; volatile uint32_t x562 = UINT32_MAX; static int64_t x563 = 4120800432243LL; int64_t x564 = -1LL; int32_t t99 = 3235866; t99 = (x561==(x562^(x563*x564))); if (t99 != 0) { NG(); } else { ; } } void f100(void) { int64_t x566 = -4004717105LL; uint64_t x567 = 673LLU; volatile int32_t t100 = 15627650; t100 = (x565==(x566^(x567*x568))); if (t100 != 0) { NG(); } else { ; } } void f101(void) { static volatile int16_t x569 = -1; int32_t x570 = INT32_MIN; static volatile int8_t x571 = INT8_MIN; volatile int8_t x572 = -14; volatile int32_t t101 = 786; t101 = (x569==(x570^(x571*x572))); if (t101 != 0) { NG(); } else { ; } } void f102(void) { int8_t x575 = INT8_MIN; static volatile uint32_t x576 = 14155U; int32_t t102 = -204; t102 = (x573==(x574^(x575*x576))); if (t102 != 0) { NG(); } else { ; } } void f103(void) { uint32_t x581 = UINT32_MAX; int8_t x582 = -1; uint64_t x583 = UINT64_MAX; int64_t x584 = 7599060926LL; t103 = (x581==(x582^(x583*x584))); if (t103 != 0) { NG(); } else { ; } } void f104(void) { int16_t x585 = INT16_MAX; static uint32_t x586 = 2610578U; int8_t x587 = -1; volatile int64_t x588 = -5971322075745179LL; volatile int32_t t104 = -487798096; t104 = (x585==(x586^(x587*x588))); if (t104 != 0) { NG(); } else { ; } } void f105(void) { uint64_t x589 = 68793360551970LLU; uint64_t x590 = UINT64_MAX; int16_t x591 = INT16_MIN; uint8_t x592 = UINT8_MAX; int32_t t105 = 79089; t105 = (x589==(x590^(x591*x592))); if (t105 != 0) { NG(); } else { ; } } void f106(void) { int16_t x597 = INT16_MIN; int16_t x599 = INT16_MIN; static int8_t x600 = 1; volatile int32_t t106 = -67785; t106 = (x597==(x598^(x599*x600))); if (t106 != 0) { NG(); } else { ; } } void f107(void) { int32_t x601 = 5513338; int32_t x602 = 151642; volatile int32_t x603 = -1; uint64_t x604 = 61116672LLU; t107 = (x601==(x602^(x603*x604))); if (t107 != 0) { NG(); } else { ; } } void f108(void) { int64_t x605 = INT64_MIN; static int32_t x606 = INT32_MIN; static uint64_t x607 = 433544836508315LLU; int32_t t108 = 4558853; t108 = (x605==(x606^(x607*x608))); if (t108 != 0) { NG(); } else { ; } } void f109(void) { volatile int32_t x620 = -1; static int32_t t109 = 4817; t109 = (x617==(x618^(x619*x620))); if (t109 != 0) { NG(); } else { ; } } void f110(void) { static volatile uint64_t x621 = UINT64_MAX; static uint8_t x622 = UINT8_MAX; int16_t x623 = -1; int64_t x624 = INT64_MAX; int32_t t110 = 223; t110 = (x621==(x622^(x623*x624))); if (t110 != 0) { NG(); } else { ; } } void f111(void) { static uint32_t x629 = UINT32_MAX; static int16_t x630 = INT16_MIN; int8_t x631 = -11; uint16_t x632 = 5U; t111 = (x629==(x630^(x631*x632))); if (t111 != 0) { NG(); } else { ; } } void f112(void) { volatile int8_t x633 = -1; static uint16_t x634 = UINT16_MAX; int16_t x635 = -1; int32_t x636 = 1774550; int32_t t112 = -80167094; t112 = (x633==(x634^(x635*x636))); if (t112 != 0) { NG(); } else { ; } } void f113(void) { int64_t x638 = INT64_MIN; int8_t x639 = INT8_MIN; uint32_t x640 = UINT32_MAX; volatile int32_t t113 = 141467670; t113 = (x637==(x638^(x639*x640))); if (t113 != 0) { NG(); } else { ; } } void f114(void) { uint32_t x645 = 15169314U; int32_t x646 = INT32_MAX; int16_t x647 = INT16_MIN; static uint8_t x648 = 2U; static int32_t t114 = -941509067; t114 = (x645==(x646^(x647*x648))); if (t114 != 0) { NG(); } else { ; } } void f115(void) { uint8_t x649 = 109U; int32_t x650 = 9; int8_t x651 = INT8_MAX; int8_t x652 = 0; int32_t t115 = -182731268; t115 = (x649==(x650^(x651*x652))); if (t115 != 0) { NG(); } else { ; } } void f116(void) { static uint32_t x653 = 412990516U; int32_t x654 = -682; uint32_t x656 = UINT32_MAX; volatile int32_t t116 = 4797; t116 = (x653==(x654^(x655*x656))); if (t116 != 0) { NG(); } else { ; } } void f117(void) { int32_t x657 = 4245; int64_t x658 = INT64_MAX; volatile int8_t x659 = INT8_MIN; int64_t x660 = -235LL; volatile int32_t t117 = -3095437; t117 = (x657==(x658^(x659*x660))); if (t117 != 0) { NG(); } else { ; } } void f118(void) { uint64_t x661 = 7591638190LLU; int16_t x662 = 1; uint64_t x664 = UINT64_MAX; int32_t t118 = 5401810; t118 = (x661==(x662^(x663*x664))); if (t118 != 0) { NG(); } else { ; } } void f119(void) { volatile int8_t x669 = 0; volatile int16_t x670 = -5; static int16_t x671 = INT16_MIN; int16_t x672 = INT16_MIN; volatile int32_t t119 = 17; t119 = (x669==(x670^(x671*x672))); if (t119 != 0) { NG(); } else { ; } } void f120(void) { uint8_t x674 = 3U; int8_t x675 = INT8_MIN; static int32_t t120 = -335930; t120 = (x673==(x674^(x675*x676))); if (t120 != 0) { NG(); } else { ; } } void f121(void) { int16_t x677 = INT16_MIN; uint64_t x678 = UINT64_MAX; static int16_t x679 = INT16_MAX; static int32_t t121 = 5; t121 = (x677==(x678^(x679*x680))); if (t121 != 0) { NG(); } else { ; } } void f122(void) { int16_t x681 = INT16_MAX; int32_t x683 = -770322229; static volatile int32_t t122 = -1872; t122 = (x681==(x682^(x683*x684))); if (t122 != 0) { NG(); } else { ; } } void f123(void) { uint32_t x686 = 377224U; uint32_t x687 = 13178992U; int32_t x688 = INT32_MIN; volatile int32_t t123 = 784733694; t123 = (x685==(x686^(x687*x688))); if (t123 != 0) { NG(); } else { ; } } void f124(void) { uint64_t x691 = 6600963LLU; static uint64_t x692 = 2743351667880811LLU; static int32_t t124 = 906778; t124 = (x689==(x690^(x691*x692))); if (t124 != 0) { NG(); } else { ; } } void f125(void) { uint8_t x693 = 18U; volatile int32_t x694 = INT32_MAX; static int16_t x695 = -4; uint64_t x696 = 233324816579924185LLU; t125 = (x693==(x694^(x695*x696))); if (t125 != 0) { NG(); } else { ; } } void f126(void) { int16_t x701 = -16273; int64_t x702 = -54340200684LL; volatile int8_t x704 = -1; static volatile int32_t t126 = -969734; t126 = (x701==(x702^(x703*x704))); if (t126 != 0) { NG(); } else { ; } } void f127(void) { int32_t x705 = INT32_MIN; int8_t x706 = INT8_MAX; static int64_t x707 = 10230770942LL; int16_t x708 = INT16_MIN; int32_t t127 = 16502458; t127 = (x705==(x706^(x707*x708))); if (t127 != 0) { NG(); } else { ; } } void f128(void) { volatile uint8_t x717 = UINT8_MAX; int8_t x718 = -1; int16_t x719 = INT16_MIN; static uint16_t x720 = UINT16_MAX; t128 = (x717==(x718^(x719*x720))); if (t128 != 0) { NG(); } else { ; } } void f129(void) { volatile int8_t x725 = -1; int16_t x726 = INT16_MIN; int16_t x727 = -1; static uint8_t x728 = 0U; t129 = (x725==(x726^(x727*x728))); if (t129 != 0) { NG(); } else { ; } } void f130(void) { volatile uint16_t x729 = UINT16_MAX; volatile uint8_t x731 = UINT8_MAX; uint16_t x732 = 1U; int32_t t130 = 6874; t130 = (x729==(x730^(x731*x732))); if (t130 != 0) { NG(); } else { ; } } void f131(void) { int16_t x733 = INT16_MIN; int64_t x734 = 154489878614645479LL; int8_t x735 = INT8_MIN; volatile int32_t x736 = -1; t131 = (x733==(x734^(x735*x736))); if (t131 != 0) { NG(); } else { ; } } void f132(void) { uint16_t x737 = UINT16_MAX; int16_t x738 = -8153; static volatile int8_t x739 = 4; uint8_t x740 = 106U; static volatile int32_t t132 = -214620; t132 = (x737==(x738^(x739*x740))); if (t132 != 0) { NG(); } else { ; } } void f133(void) { uint32_t x742 = 133039795U; uint64_t x743 = 1LLU; uint8_t x744 = UINT8_MAX; int32_t t133 = -25; t133 = (x741==(x742^(x743*x744))); if (t133 != 0) { NG(); } else { ; } } void f134(void) { int16_t x745 = INT16_MIN; static int32_t x746 = INT32_MIN; int64_t x747 = 107LL; volatile int8_t x748 = INT8_MIN; int32_t t134 = -207723; t134 = (x745==(x746^(x747*x748))); if (t134 != 0) { NG(); } else { ; } } void f135(void) { volatile uint64_t x749 = 8565376532315LLU; int8_t x750 = INT8_MIN; volatile uint32_t x751 = 382934U; volatile uint16_t x752 = 4U; volatile int32_t t135 = -447; t135 = (x749==(x750^(x751*x752))); if (t135 != 0) { NG(); } else { ; } } void f136(void) { int64_t x753 = -2192882582842971LL; volatile int32_t x754 = 1302; static uint16_t x755 = UINT16_MAX; int8_t x756 = -5; int32_t t136 = 3; t136 = (x753==(x754^(x755*x756))); if (t136 != 0) { NG(); } else { ; } } void f137(void) { volatile uint16_t x757 = 30096U; volatile int32_t x758 = 87390; int8_t x759 = INT8_MAX; t137 = (x757==(x758^(x759*x760))); if (t137 != 0) { NG(); } else { ; } } void f138(void) { int8_t x762 = 48; int8_t x763 = INT8_MIN; uint8_t x764 = 1U; static volatile int32_t t138 = 31140; t138 = (x761==(x762^(x763*x764))); if (t138 != 0) { NG(); } else { ; } } void f139(void) { volatile int32_t x769 = INT32_MIN; int32_t x770 = 4; int64_t x771 = INT64_MIN; volatile int32_t t139 = 32; t139 = (x769==(x770^(x771*x772))); if (t139 != 0) { NG(); } else { ; } } void f140(void) { static int16_t x777 = INT16_MIN; int16_t x779 = 0; static int32_t t140 = -40061377; t140 = (x777==(x778^(x779*x780))); if (t140 != 0) { NG(); } else { ; } } void f141(void) { uint64_t x781 = UINT64_MAX; uint64_t x783 = 10LLU; uint16_t x784 = 578U; volatile int32_t t141 = -13532; t141 = (x781==(x782^(x783*x784))); if (t141 != 0) { NG(); } else { ; } } void f142(void) { int8_t x790 = INT8_MAX; int32_t x792 = -470; volatile int32_t t142 = 0; t142 = (x789==(x790^(x791*x792))); if (t142 != 0) { NG(); } else { ; } } void f143(void) { int32_t x793 = INT32_MIN; int64_t x794 = -1LL; volatile uint64_t x795 = UINT64_MAX; int64_t x796 = -1LL; volatile int32_t t143 = -22; t143 = (x793==(x794^(x795*x796))); if (t143 != 0) { NG(); } else { ; } } void f144(void) { int16_t x797 = INT16_MAX; uint16_t x798 = UINT16_MAX; t144 = (x797==(x798^(x799*x800))); if (t144 != 0) { NG(); } else { ; } } void f145(void) { static volatile uint64_t x803 = 5453785630400LLU; uint32_t x804 = 50049U; volatile int32_t t145 = 349576; t145 = (x801==(x802^(x803*x804))); if (t145 != 0) { NG(); } else { ; } } void f146(void) { int32_t x809 = INT32_MIN; volatile uint64_t x810 = 1113026LLU; static int16_t x811 = -1; int8_t x812 = INT8_MIN; int32_t t146 = -7; t146 = (x809==(x810^(x811*x812))); if (t146 != 0) { NG(); } else { ; } } void f147(void) { volatile int64_t x813 = INT64_MIN; volatile uint16_t x815 = UINT16_MAX; volatile int32_t t147 = 7787; t147 = (x813==(x814^(x815*x816))); if (t147 != 0) { NG(); } else { ; } } void f148(void) { uint16_t x829 = 0U; volatile int32_t x830 = -1; volatile uint64_t x831 = UINT64_MAX; static uint8_t x832 = 39U; t148 = (x829==(x830^(x831*x832))); if (t148 != 0) { NG(); } else { ; } } void f149(void) { int64_t x833 = INT64_MIN; int64_t x834 = -1746458892LL; static uint8_t x835 = UINT8_MAX; int16_t x836 = INT16_MAX; t149 = (x833==(x834^(x835*x836))); if (t149 != 0) { NG(); } else { ; } } void f150(void) { int16_t x837 = -1; int16_t x840 = 843; int32_t t150 = 87; t150 = (x837==(x838^(x839*x840))); if (t150 != 0) { NG(); } else { ; } } void f151(void) { uint16_t x841 = UINT16_MAX; int16_t x842 = -785; static int16_t x843 = -1; static int8_t x844 = 7; static volatile int32_t t151 = 713; t151 = (x841==(x842^(x843*x844))); if (t151 != 0) { NG(); } else { ; } } void f152(void) { int8_t x845 = INT8_MIN; static volatile uint64_t x847 = 437246527110325213LLU; volatile int32_t t152 = -327973; t152 = (x845==(x846^(x847*x848))); if (t152 != 0) { NG(); } else { ; } } void f153(void) { static int16_t x849 = INT16_MIN; int16_t x851 = -1; volatile int16_t x852 = 506; volatile int32_t t153 = 324; t153 = (x849==(x850^(x851*x852))); if (t153 != 0) { NG(); } else { ; } } void f154(void) { static int32_t x854 = INT32_MAX; uint8_t x855 = 29U; uint16_t x856 = 140U; t154 = (x853==(x854^(x855*x856))); if (t154 != 0) { NG(); } else { ; } } void f155(void) { uint32_t x857 = 160U; uint8_t x858 = 7U; int16_t x859 = 1; volatile int32_t t155 = 172714912; t155 = (x857==(x858^(x859*x860))); if (t155 != 0) { NG(); } else { ; } } void f156(void) { int32_t x862 = INT32_MIN; int32_t x863 = -1; int64_t x864 = -544207065261208LL; volatile int32_t t156 = -831192230; t156 = (x861==(x862^(x863*x864))); if (t156 != 0) { NG(); } else { ; } } void f157(void) { int64_t x869 = -1LL; volatile int16_t x870 = -93; volatile uint64_t x871 = 555LLU; int64_t x872 = -1LL; static int32_t t157 = -102603644; t157 = (x869==(x870^(x871*x872))); if (t157 != 0) { NG(); } else { ; } } void f158(void) { int32_t x873 = INT32_MIN; int64_t x874 = -126728032628011356LL; uint64_t x875 = 33491983022380485LLU; static volatile uint32_t x876 = 232830U; t158 = (x873==(x874^(x875*x876))); if (t158 != 0) { NG(); } else { ; } } void f159(void) { int16_t x881 = 15704; uint16_t x884 = 21U; volatile int32_t t159 = -44512; t159 = (x881==(x882^(x883*x884))); if (t159 != 0) { NG(); } else { ; } } void f160(void) { uint16_t x885 = UINT16_MAX; int8_t x886 = -1; int32_t x887 = INT32_MIN; uint64_t x888 = UINT64_MAX; static volatile int32_t t160 = -15; t160 = (x885==(x886^(x887*x888))); if (t160 != 0) { NG(); } else { ; } } void f161(void) { volatile int32_t x889 = INT32_MAX; uint16_t x890 = UINT16_MAX; uint64_t x891 = 654584LLU; t161 = (x889==(x890^(x891*x892))); if (t161 != 0) { NG(); } else { ; } } void f162(void) { volatile int8_t x901 = 0; static uint8_t x902 = 6U; static int8_t x903 = INT8_MIN; uint16_t x904 = 0U; volatile int32_t t162 = 16478282; t162 = (x901==(x902^(x903*x904))); if (t162 != 0) { NG(); } else { ; } } void f163(void) { static int8_t x906 = INT8_MIN; int16_t x907 = INT16_MAX; volatile uint32_t x908 = UINT32_MAX; volatile int32_t t163 = 6; t163 = (x905==(x906^(x907*x908))); if (t163 != 0) { NG(); } else { ; } } void f164(void) { static uint32_t x910 = UINT32_MAX; static uint8_t x911 = 0U; volatile int64_t x912 = -1LL; int32_t t164 = -103085915; t164 = (x909==(x910^(x911*x912))); if (t164 != 0) { NG(); } else { ; } } void f165(void) { static int16_t x913 = 27; int8_t x915 = 4; t165 = (x913==(x914^(x915*x916))); if (t165 != 0) { NG(); } else { ; } } void f166(void) { static volatile int64_t x921 = INT64_MAX; uint8_t x922 = 6U; int8_t x923 = -1; volatile uint8_t x924 = 0U; volatile int32_t t166 = -225419654; t166 = (x921==(x922^(x923*x924))); if (t166 != 0) { NG(); } else { ; } } void f167(void) { int16_t x929 = 5; int32_t x930 = INT32_MAX; uint64_t x931 = 73330LLU; static int8_t x932 = -1; t167 = (x929==(x930^(x931*x932))); if (t167 != 0) { NG(); } else { ; } } void f168(void) { static uint8_t x933 = UINT8_MAX; volatile uint16_t x934 = UINT16_MAX; volatile int16_t x935 = -94; int16_t x936 = -27; int32_t t168 = 6934; t168 = (x933==(x934^(x935*x936))); if (t168 != 0) { NG(); } else { ; } } void f169(void) { static uint64_t x941 = 399875970LLU; int32_t x942 = -1; uint8_t x943 = UINT8_MAX; uint8_t x944 = UINT8_MAX; int32_t t169 = 2725489; t169 = (x941==(x942^(x943*x944))); if (t169 != 0) { NG(); } else { ; } } void f170(void) { int8_t x945 = INT8_MIN; int8_t x946 = 2; int8_t x947 = INT8_MIN; uint16_t x948 = UINT16_MAX; t170 = (x945==(x946^(x947*x948))); if (t170 != 0) { NG(); } else { ; } } void f171(void) { static int64_t x949 = -1LL; uint32_t x950 = 1827419U; int8_t x951 = INT8_MIN; static volatile int32_t t171 = -215778; t171 = (x949==(x950^(x951*x952))); if (t171 != 0) { NG(); } else { ; } } void f172(void) { int8_t x953 = INT8_MIN; volatile int16_t x954 = -1; int16_t x955 = -179; static int16_t x956 = -1; volatile int32_t t172 = 41; t172 = (x953==(x954^(x955*x956))); if (t172 != 0) { NG(); } else { ; } } void f173(void) { uint16_t x957 = 0U; static int32_t x958 = INT32_MAX; uint64_t x960 = 5483166373345431727LLU; volatile int32_t t173 = -3061744; t173 = (x957==(x958^(x959*x960))); if (t173 != 0) { NG(); } else { ; } } void f174(void) { uint64_t x962 = UINT64_MAX; static volatile int16_t x963 = INT16_MIN; static volatile int32_t t174 = 138310; t174 = (x961==(x962^(x963*x964))); if (t174 != 0) { NG(); } else { ; } } void f175(void) { int8_t x965 = -10; uint16_t x966 = 9634U; t175 = (x965==(x966^(x967*x968))); if (t175 != 0) { NG(); } else { ; } } void f176(void) { uint32_t x970 = 745561341U; int32_t x971 = INT32_MIN; uint32_t x972 = UINT32_MAX; int32_t t176 = 30; t176 = (x969==(x970^(x971*x972))); if (t176 != 0) { NG(); } else { ; } } void f177(void) { uint32_t x986 = 11U; int16_t x987 = INT16_MIN; static int32_t x988 = -1; volatile int32_t t177 = 87; t177 = (x985==(x986^(x987*x988))); if (t177 != 0) { NG(); } else { ; } } void f178(void) { uint16_t x989 = UINT16_MAX; int64_t x991 = 52190431397010824LL; volatile int32_t t178 = -58127477; t178 = (x989==(x990^(x991*x992))); if (t178 != 0) { NG(); } else { ; } } void f179(void) { int8_t x997 = -1; int8_t x998 = -23; uint32_t x999 = 820193169U; int16_t x1000 = INT16_MAX; static int32_t t179 = -930960; t179 = (x997==(x998^(x999*x1000))); if (t179 != 0) { NG(); } else { ; } } void f180(void) { static volatile uint16_t x1001 = 10U; int8_t x1003 = 0; int32_t t180 = -1002; t180 = (x1001==(x1002^(x1003*x1004))); if (t180 != 0) { NG(); } else { ; } } void f181(void) { int64_t x1007 = 2237053727773LL; volatile uint8_t x1008 = 17U; t181 = (x1005==(x1006^(x1007*x1008))); if (t181 != 0) { NG(); } else { ; } } void f182(void) { static int64_t x1014 = INT64_MIN; uint16_t x1015 = UINT16_MAX; t182 = (x1013==(x1014^(x1015*x1016))); if (t182 != 0) { NG(); } else { ; } } void f183(void) { uint16_t x1017 = 13U; uint32_t x1018 = 3584U; uint8_t x1019 = 11U; static uint16_t x1020 = UINT16_MAX; int32_t t183 = -1; t183 = (x1017==(x1018^(x1019*x1020))); if (t183 != 0) { NG(); } else { ; } } void f184(void) { uint8_t x1021 = 91U; volatile int64_t x1022 = -1LL; static int16_t x1023 = INT16_MIN; int16_t x1024 = INT16_MAX; static int32_t t184 = 1964; t184 = (x1021==(x1022^(x1023*x1024))); if (t184 != 0) { NG(); } else { ; } } void f185(void) { uint64_t x1033 = 24LLU; static uint32_t x1034 = 1005U; int32_t x1035 = -1; t185 = (x1033==(x1034^(x1035*x1036))); if (t185 != 0) { NG(); } else { ; } } void f186(void) { int64_t x1041 = -12421689048146LL; int16_t x1042 = -1; static int8_t x1043 = INT8_MAX; int8_t x1044 = -1; t186 = (x1041==(x1042^(x1043*x1044))); if (t186 != 0) { NG(); } else { ; } } void f187(void) { static int8_t x1045 = -1; int16_t x1046 = INT16_MAX; uint32_t x1047 = 78683U; int16_t x1048 = INT16_MIN; volatile int32_t t187 = 45074667; t187 = (x1045==(x1046^(x1047*x1048))); if (t187 != 0) { NG(); } else { ; } } void f188(void) { uint16_t x1049 = 165U; int32_t x1050 = -7011; int8_t x1051 = -10; volatile int16_t x1052 = -1; int32_t t188 = 727; t188 = (x1049==(x1050^(x1051*x1052))); if (t188 != 0) { NG(); } else { ; } } void f189(void) { uint64_t x1053 = UINT64_MAX; volatile int8_t x1055 = INT8_MIN; int64_t x1056 = -256807713506LL; int32_t t189 = 1735888; t189 = (x1053==(x1054^(x1055*x1056))); if (t189 != 0) { NG(); } else { ; } } void f190(void) { int8_t x1057 = -1; int32_t x1058 = INT32_MIN; uint32_t x1059 = UINT32_MAX; static int32_t x1060 = INT32_MAX; static int32_t t190 = 0; t190 = (x1057==(x1058^(x1059*x1060))); if (t190 != 0) { NG(); } else { ; } } void f191(void) { volatile int8_t x1061 = -1; int8_t x1062 = -1; uint8_t x1063 = UINT8_MAX; int32_t t191 = 621046093; t191 = (x1061==(x1062^(x1063*x1064))); if (t191 != 0) { NG(); } else { ; } } void f192(void) { int16_t x1065 = -1; int8_t x1066 = -16; int32_t t192 = -308103; t192 = (x1065==(x1066^(x1067*x1068))); if (t192 != 0) { NG(); } else { ; } } void f193(void) { static uint16_t x1069 = 2873U; uint8_t x1070 = UINT8_MAX; uint16_t x1071 = 673U; static int16_t x1072 = INT16_MIN; int32_t t193 = 1057188276; t193 = (x1069==(x1070^(x1071*x1072))); if (t193 != 0) { NG(); } else { ; } } void f194(void) { volatile int64_t x1078 = 881877612LL; int32_t t194 = 73967; t194 = (x1077==(x1078^(x1079*x1080))); if (t194 != 0) { NG(); } else { ; } } void f195(void) { int64_t x1089 = INT64_MIN; static volatile int32_t t195 = 2; t195 = (x1089==(x1090^(x1091*x1092))); if (t195 != 0) { NG(); } else { ; } } void f196(void) { static int8_t x1093 = INT8_MAX; int32_t x1094 = -1; uint32_t x1095 = UINT32_MAX; int16_t x1096 = 2; static int32_t t196 = -2216; t196 = (x1093==(x1094^(x1095*x1096))); if (t196 != 0) { NG(); } else { ; } } void f197(void) { int8_t x1097 = INT8_MIN; uint8_t x1098 = UINT8_MAX; volatile int32_t t197 = -10139; t197 = (x1097==(x1098^(x1099*x1100))); if (t197 != 0) { NG(); } else { ; } } void f198(void) { static int32_t x1101 = -1; int32_t x1102 = INT32_MAX; int8_t x1104 = 0; volatile int32_t t198 = 6; t198 = (x1101==(x1102^(x1103*x1104))); if (t198 != 0) { NG(); } else { ; } } void f199(void) { uint32_t x1105 = 24813712U; int16_t x1106 = -1; static int32_t x1107 = -562738; uint16_t x1108 = 12U; t199 = (x1105==(x1106^(x1107*x1108))); if (t199 != 0) { NG(); } else { ; } } int main(void) { f0(); f1(); f2(); f3(); f4(); f5(); f6(); f7(); f8(); f9(); f10(); f11(); f12(); f13(); f14(); f15(); f16(); f17(); f18(); f19(); f20(); f21(); f22(); f23(); f24(); f25(); f26(); f27(); f28(); f29(); f30(); f31(); f32(); f33(); f34(); f35(); f36(); f37(); f38(); f39(); f40(); f41(); f42(); f43(); f44(); f45(); f46(); f47(); f48(); f49(); f50(); f51(); f52(); f53(); f54(); f55(); f56(); f57(); f58(); f59(); f60(); f61(); f62(); f63(); f64(); f65(); f66(); f67(); f68(); f69(); f70(); f71(); f72(); f73(); f74(); f75(); f76(); f77(); f78(); f79(); f80(); f81(); f82(); f83(); f84(); f85(); f86(); f87(); f88(); f89(); f90(); f91(); f92(); f93(); f94(); f95(); f96(); f97(); f98(); f99(); f100(); f101(); f102(); f103(); f104(); f105(); f106(); f107(); f108(); f109(); f110(); f111(); f112(); f113(); f114(); f115(); f116(); f117(); f118(); f119(); f120(); f121(); f122(); f123(); f124(); f125(); f126(); f127(); f128(); f129(); f130(); f131(); f132(); f133(); f134(); f135(); f136(); f137(); f138(); f139(); f140(); f141(); f142(); f143(); f144(); f145(); f146(); f147(); f148(); f149(); f150(); f151(); f152(); f153(); f154(); f155(); f156(); f157(); f158(); f159(); f160(); f161(); f162(); f163(); f164(); f165(); f166(); f167(); f168(); f169(); f170(); f171(); f172(); f173(); f174(); f175(); f176(); f177(); f178(); f179(); f180(); f181(); f182(); f183(); f184(); f185(); f186(); f187(); f188(); f189(); f190(); f191(); f192(); f193(); f194(); f195(); f196(); f197(); f198(); f199(); return 0; }
18.382082
59
0.579511
03edfcc58946fcea90e7721ba79f78cef63aed85
684
ps1
PowerShell
Misc/Remove-DesktopShortcut.ps1
achavan51/navcontainerhelper-master
85833809d3eadaecbc05308b2630d185d244ac92
[ "MIT" ]
2
2018-08-02T14:54:11.000Z
2019-12-18T14:26:24.000Z
Misc/Remove-DesktopShortcut.ps1
achavan51/navcontainerhelper-master
85833809d3eadaecbc05308b2630d185d244ac92
[ "MIT" ]
null
null
null
Misc/Remove-DesktopShortcut.ps1
achavan51/navcontainerhelper-master
85833809d3eadaecbc05308b2630d185d244ac92
[ "MIT" ]
1
2022-03-10T19:18:59.000Z
2022-03-10T19:18:59.000Z
function Remove-DesktopShortcut { Param( [Parameter(Mandatory=$true)] [string]$Name ) $filename = Join-Path ([Environment]::GetFolderPath("Desktop")) "$Name.lnk" if (Test-Path -Path $filename) { Remove-Item $filename -force } $filename = Join-Path ([Environment]::GetFolderPath("StartMenu")) "NavContainerHelper\$Name.lnk" if (Test-Path -Path $filename) { Remove-Item $filename -force } $filename = Join-Path ([Environment]::GetFolderPath("CommonStartMenu")) "NavContainerHelper\$Name.lnk" if (Test-Path -Path $filename) { Remove-Item $filename -force } } Export-ModuleMember Remove-DesktopShortcut
34.2
106
0.654971
4f5d316a1ada88c675b82e66f2123208fd3de665
422
asm
Assembly
oeis/152/A152010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/152/A152010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/152/A152010.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A152010: Sum of digits of A127335(n). ; Submitted by Jon Maiga ; 14,17,7,6,9,3,6,9,7,7,12,12,10,15,6,15,15,8,12,21,12,21,10,18,24,19,21,4,12,6,11,15,12,18,6,12,9,13,13,12,17,11,14,11,21,11,18,10,14,20,8,16,4,10,16,12,15,14,15,15,17,18,11,21,15,15,17,20,12,18,3,15,20,9,21,10,6 seq $0,127335 ; Numbers that are the sum of 8 successive primes. seq $0,7953 ; Digital sum (i.e., sum of digits) of n; also called digsum(n).
60.285714
213
0.668246
933c12b5a2c076c475a14829c767995b74f2c3d2
1,392
dart
Dart
med_elas/lib/app/home/widgets/remote_card.dart
ibiaalice/MedElas
c2964c2be1cf7b023d8481ab067820e7a949b003
[ "MIT" ]
null
null
null
med_elas/lib/app/home/widgets/remote_card.dart
ibiaalice/MedElas
c2964c2be1cf7b023d8481ab067820e7a949b003
[ "MIT" ]
null
null
null
med_elas/lib/app/home/widgets/remote_card.dart
ibiaalice/MedElas
c2964c2be1cf7b023d8481ab067820e7a949b003
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:med_elas/app/avaliable_time/avaliable_time_page.dart'; import 'package:med_elas/app/home/widgets/card_title.dart'; import 'package:med_elas/app/home/widgets/option_card_button.dart'; import 'package:med_elas/app/widgets/constants.dart'; class RemoteCard extends StatelessWidget { const RemoteCard() : super(); @override Widget build(BuildContext context) { return Card( color: THIRD_COLLOR, child: Container( width: MediaQuery.of(context).size.width, child: Column( children: [ CardTitle( title: "Atendimento Remoto", icon: Icons.phone_android_rounded, ), OptionCardButton( title: "Marcar Consulta", icon: Icons.video_call, onTap: () => Navigator.push( context, MaterialPageRoute( builder: (BuildContext context) => AvaliableTimePage())), ), OptionCardButton( title: "Consulta Agora", icon: Icons.missed_video_call_sharp, onTap: () => Navigator.push( context, MaterialPageRoute( builder: (BuildContext context) => AvaliableTimePage())), ), ], ), ), ); } }
31.636364
79
0.561782
6cbe3abb26af6660cc57e937bbb85bc7785c4068
404
go
Go
app/interface/openplatform/article/http/cards.go
78182648/blibli-go
7c717cc07073ff3397397fd3c01aa93234b142e3
[ "MIT" ]
22
2019-04-27T06:44:41.000Z
2022-02-04T16:54:14.000Z
app/interface/openplatform/article/http/cards.go
YouthAge/blibli-go
7c717cc07073ff3397397fd3c01aa93234b142e3
[ "MIT" ]
null
null
null
app/interface/openplatform/article/http/cards.go
YouthAge/blibli-go
7c717cc07073ff3397397fd3c01aa93234b142e3
[ "MIT" ]
34
2019-05-07T08:22:27.000Z
2022-03-25T08:14:56.000Z
package http import ( "go-common/library/ecode" bm "go-common/library/net/http/blademaster" "strings" ) func card(c *bm.Context) { c.JSON(artSrv.FindCard(c, c.Request.Form.Get("id"))) } func cards(c *bm.Context) { var ( params = c.Request.Form ) ids := strings.Split(params.Get("ids"), ",") if len(ids) > 100 { c.JSON(nil, ecode.RequestErr) return } c.JSON(artSrv.FindCards(c, ids)) }
16.833333
53
0.655941
b2442cdeb59b470e6fc5e1d211e2cd81f3a72d1a
1,378
dart
Dart
LibTest/async/Future/wait_A01_t03.dart
tvolkert/co19
435727789062a45da3d20da09024651fdeb8cafe
[ "BSD-3-Clause" ]
null
null
null
LibTest/async/Future/wait_A01_t03.dart
tvolkert/co19
435727789062a45da3d20da09024651fdeb8cafe
[ "BSD-3-Clause" ]
null
null
null
LibTest/async/Future/wait_A01_t03.dart
tvolkert/co19
435727789062a45da3d20da09024651fdeb8cafe
[ "BSD-3-Clause" ]
null
null
null
/* * Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file * for details. All rights reserved. Use of this source code is governed by a * BSD-style license that can be found in the LICENSE file. */ /** * @assertion Future<List> wait(Iterable<Future> futures, * {bool eagerError: false, void cleanUp(successValue)}) * Wait for all the given futures to complete and collect their values. * Returns a future which will complete once all the futures in a list are * complete. * @description Checks that the value of the returned future is a list of all * values that were produced. * @author msyabro */ import "dart:async"; import "../../../Utils/expect.dart"; main() { var completer1 = new Completer(); var completer2 = new Completer(); var completer3 = new Completer(); var completer4 = new Completer(); var completer5 = new Completer(); var future1 = completer1.future; var future2 = completer2.future; var future3 = completer3.future; var future4 = completer4.future; var future5 = completer5.future; asyncStart(); Future.wait([future1, future2, future3, future4, future5]) .then((value) { Expect.listEquals([1, 2, 3, 4, 5], value); asyncEnd(); }); completer1.complete(1); completer2.complete(2); completer3.complete(3); completer4.complete(4); completer5.complete(5); }
30.622222
77
0.691582
54ce99df4508303bf4bbaa1de93344cbbf98fe2b
337
sql
SQL
db/sql/3236__drop_views_dw_v_api.sql
CSCfi/antero
e762c09e395cb01e334f2a04753ba983107ac7d7
[ "MIT" ]
6
2017-08-03T08:49:17.000Z
2021-11-14T17:09:27.000Z
db_archive/sql_archive/3236__drop_views_dw_v_api.sql
CSC-IT-Center-for-Science/antero
2835d7fd07cd7399a348033a6230d1b16634fb3b
[ "MIT" ]
3
2017-05-03T08:45:42.000Z
2020-10-27T06:30:40.000Z
db_archive/sql_archive/3236__drop_views_dw_v_api.sql
CSC-IT-Center-for-Science/antero
2835d7fd07cd7399a348033a6230d1b16634fb3b
[ "MIT" ]
4
2017-10-19T11:31:43.000Z
2022-01-05T14:53:57.000Z
USE [ANTERO] GO /****** Object: View [dw].[v_api_tavoiteajassa_tutkinnon_suorittaneet2] Script Date: 2.9.2020 11:14:20 ******/ DROP VIEW IF EXISTS [dw].[v_api_opiskelijat_ja_tutkinnot] DROP VIEW IF EXISTS [dw].[v_api_tavoiteajassa_tutkinnon_suorittaneet] DROP VIEW IF EXISTS [dw].[v_api_tavoiteajassa_tutkinnon_suorittaneet2] GO
28.083333
114
0.768546
11ef4234c1fffffd7e570d896781d2f01acd55a5
1,545
lua
Lua
src/Atom/Bubble.lua
Vexot/synthetic
f43badd928dc78a52275f174dc52e1d34542a715
[ "Apache-2.0" ]
null
null
null
src/Atom/Bubble.lua
Vexot/synthetic
f43badd928dc78a52275f174dc52e1d34542a715
[ "Apache-2.0" ]
null
null
null
src/Atom/Bubble.lua
Vexot/synthetic
f43badd928dc78a52275f174dc52e1d34542a715
[ "Apache-2.0" ]
null
null
null
local packages = script.Parent.Parent.Parent local synthetic = require(script.Parent.Parent) local util = require(script.Parent.Parent:WaitForChild("Util")) local fusion = util.initFusion(require(packages:WaitForChild('fusion'))) local maidConstructor = require(packages:WaitForChild('maid')) local enums = require(script.Parent.Parent:WaitForChild("Enums")) local effects = require(script.Parent.Parent:WaitForChild("Effects")) local constructor = {} function constructor.new(params) --public states local public = { Transparency = util.import(params.Transparency) or fusion.State(0.2), Color = util.import(params.Color) or fusion.State(Color3.new(0.5,0.5,0.5)), Size = util.import(params.Size) or fusion.State(UDim.new(0,60)), Position = util.import(params.Position) or fusion.State(UDim.new(0,60)), SynthClassName = fusion.Computed(function() return script.Name end), } local tweenParams = { Duration = 0.8, EasingStyle = Enum.EasingStyle.Cubic, EasingDirection = Enum.EasingDirection.Out, } --construct return util.set(fusion.New "Frame", public, params, { AnchorPoint = Vector2.new(0.5,0.5), Size = util.tween(fusion.Computed(function() return UDim2.new(public.Size:get(), public.Size:get()) end), tweenParams), BackgroundColor3 = util.tween(public.Color, tweenParams), BackgroundTransparency = util.tween(public.Transparency, tweenParams), Position = public.Position, [fusion.Children] = { fusion.New "UICorner" { CornerRadius = UDim.new(0.5,0), } } }) end return constructor
32.87234
77
0.733981
681276faf9a3f36a027e51dc8de95581088b931b
1,902
cpp
C++
Code/Libraries/Rodin/src/BTNodes/rodinbtnodeuseresource.cpp
kas1e/Eldritch
032b4ac52f7508c89efa407d6fe60f40c6281fd9
[ "Zlib" ]
null
null
null
Code/Libraries/Rodin/src/BTNodes/rodinbtnodeuseresource.cpp
kas1e/Eldritch
032b4ac52f7508c89efa407d6fe60f40c6281fd9
[ "Zlib" ]
null
null
null
Code/Libraries/Rodin/src/BTNodes/rodinbtnodeuseresource.cpp
kas1e/Eldritch
032b4ac52f7508c89efa407d6fe60f40c6281fd9
[ "Zlib" ]
null
null
null
#include "core.h" #include "rodinbtnodeuseresource.h" #include "configmanager.h" #include "Components/wbcomprodinresourcemap.h" #include "Components/wbcomprodinbehaviortree.h" #include "wbentity.h" RodinBTNodeUseResource::RodinBTNodeUseResource() : m_Resource(), m_ForceClaim(false) {} RodinBTNodeUseResource::~RodinBTNodeUseResource() {} void RodinBTNodeUseResource::InitializeFromDefinition( const SimpleString& DefinitionName) { RodinBTNodeDecorator::InitializeFromDefinition(DefinitionName); MAKEHASH(DefinitionName); STATICHASH(Resource); m_Resource = ConfigManager::GetHash(sResource, HashedString::NullString, sDefinitionName); STATICHASH(ForceClaim); m_ForceClaim = ConfigManager::GetBool(sForceClaim, false, sDefinitionName); } /*virtual*/ RodinBTNode::ETickStatus RodinBTNodeUseResource::Tick( float DeltaTime) { WBCompRodinResourceMap* const pResourceMap = GET_WBCOMP(GetEntity(), RodinResourceMap); ASSERT(pResourceMap); if (m_ChildStatus != ETS_None) { // We're just continuing from being woken. return RodinBTNodeDecorator::Tick(DeltaTime); } if (pResourceMap->ClaimResource(this, m_Resource, m_ForceClaim)) { // We got the resource, we're all good (or we're just continuing from being // woken). return RodinBTNodeDecorator::Tick(DeltaTime); } else { // We couldn't get the resource. return ETS_Fail; } } /*virtual*/ void RodinBTNodeUseResource::OnFinish() { RodinBTNodeDecorator::OnFinish(); WBCompRodinResourceMap* const pResourceMap = GET_WBCOMP(GetEntity(), RodinResourceMap); ASSERT(pResourceMap); pResourceMap->ReleaseResource(this, m_Resource); } /*virtual*/ bool RodinBTNodeUseResource::OnResourceStolen( const HashedString& Resource) { Unused(Resource); ASSERT(Resource == m_Resource); m_BehaviorTree->Stop(this); return false; }
29.71875
79
0.740799
fbacbc2e5c5f1c47cf21cb2827430820713f39fd
3,296
swift
Swift
Pods/SwiftGRPC/Sources/SwiftGRPC/Runtime/ClientCallClientStreaming.swift
Eskyee/zap-iOS
dbf40a53131b7f4f4cdfa269020e559df90a0140
[ "MIT" ]
1,699
2017-05-06T02:22:00.000Z
2022-03-30T07:51:03.000Z
Pods/SwiftGRPC/Sources/SwiftGRPC/Runtime/ClientCallClientStreaming.swift
guruantree/MacAssistant
21c4537fbedaab1a3be28daef578ad8d91cf8604
[ "MIT" ]
330
2018-07-24T18:41:20.000Z
2022-03-19T07:46:32.000Z
Pods/SwiftGRPC/Sources/SwiftGRPC/Runtime/ClientCallClientStreaming.swift
guruantree/MacAssistant
21c4537fbedaab1a3be28daef578ad8d91cf8604
[ "MIT" ]
180
2017-05-18T22:28:37.000Z
2022-03-28T12:28:04.000Z
/* * Copyright 2018, gRPC Authors All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import Dispatch import Foundation import SwiftProtobuf public protocol ClientCallClientStreaming: ClientCall { func waitForSendOperationsToFinish() // TODO: Move the other, message type-dependent, methods into this protocol. At the moment, this is not possible, // as the protocol would then have an associated type requirement (and become pretty much unusable in the process). } open class ClientCallClientStreamingBase<InputType: Message, OutputType: Message>: ClientCallBase, ClientCallClientStreaming, StreamSending { public typealias SentType = InputType /// Call this to start a call. Nonblocking. public func start(metadata: Metadata, completion: ((CallResult) -> Void)?) throws -> Self { try call.start(.clientStreaming, metadata: metadata, completion: completion) return self } public func closeAndReceive(completion: @escaping (ResultOrRPCError<OutputType>) -> Void) throws { try call.closeAndReceiveMessage { callResult in guard let responseData = callResult.resultData else { completion(.error(.callError(callResult))); return } if let response = try? OutputType(serializedData: responseData) { completion(.result(response)) } else { completion(.error(.invalidMessageReceived)) } } } public func closeAndReceive() throws -> OutputType { var result: ResultOrRPCError<OutputType>? let sem = DispatchSemaphore(value: 0) try closeAndReceive { result = $0 sem.signal() } _ = sem.wait() switch result! { case .result(let response): return response case .error(let error): throw error } } } /// Simple fake implementation of ClientCallClientStreamingBase that /// stores sent values for later verification and finally returns a previously-defined result. open class ClientCallClientStreamingTestStub<InputType: Message, OutputType: Message>: ClientCallClientStreaming { open class var method: String { fatalError("needs to be overridden") } open var lock = Mutex() open var inputs: [InputType] = [] open var output: OutputType? public init() {} open func send(_ message: InputType, completion _: @escaping (Error?) -> Void) throws { lock.synchronize { inputs.append(message) } } open func _send(_ message: InputType, timeout: DispatchTime) throws { lock.synchronize { inputs.append(message) } } open func closeAndReceive(completion: @escaping (ResultOrRPCError<OutputType>) -> Void) throws { completion(.result(output!)) } open func closeAndReceive() throws -> OutputType { return output! } open func waitForSendOperationsToFinish() {} open func cancel() {} }
33.979381
141
0.722087
7bec939464a0cb1797b44098a1c4ff66166194c3
351
css
CSS
src/styles/tailwind.css
alenvlahovljak/next-auth
479b4da043e3e8c9cb0fe7af492325629b558d0a
[ "RSA-MD" ]
null
null
null
src/styles/tailwind.css
alenvlahovljak/next-auth
479b4da043e3e8c9cb0fe7af492325629b558d0a
[ "RSA-MD" ]
null
null
null
src/styles/tailwind.css
alenvlahovljak/next-auth
479b4da043e3e8c9cb0fe7af492325629b558d0a
[ "RSA-MD" ]
null
null
null
@import "tailwindcss/base"; @import "tailwindcss/components"; @import "tailwindcss/utilities"; @import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Open+Sans:wght@400;700&display=swap'); body { font-family: 'Open Sans', 'Lato', sans-serif; margin: 0; } h1, h2, h3, h4, h5, h6 { font-family: 'Lato', sans-serif; }
16.714286
113
0.680912
a6b0d916d4a8a15bec564d6c1d03b7c4d6c930ed
532
psd1
PowerShell
src/Bootstrapper/Cake.Bootstrapper.psd1
devlead/bootstrapper
72edd7f6370769d0e1046bb7cad5c88f6b7f91ef
[ "MIT" ]
null
null
null
src/Bootstrapper/Cake.Bootstrapper.psd1
devlead/bootstrapper
72edd7f6370769d0e1046bb7cad5c88f6b7f91ef
[ "MIT" ]
null
null
null
src/Bootstrapper/Cake.Bootstrapper.psd1
devlead/bootstrapper
72edd7f6370769d0e1046bb7cad5c88f6b7f91ef
[ "MIT" ]
null
null
null
@{ # Script module or binary module file associated with this manifest. RootModule = '.\Cake.Bootstrapper.dll' # Version number of this module. ModuleVersion = '<%MODULE_VERSION%>' # ID used to uniquely identify this module GUID = 'E2223D75-FB87-42FC-951B-75654FA7FAD0' # Author of this module Author = 'Patrik Svensson' # Company or vendor of this module CompanyName = 'Cake' # Copyright statement for this module Copyright = '(c) 2014 Patrik Svensson. All rights reserved.' }
28
72
0.682331
2f4238abb4013ad43b97e3eb023fb42c3450fb5c
2,546
java
Java
ServiceDemo/app/src/main/java/com/example/timsong/servicedemo/MainActivity.java
TimmySong/LearnAndroid
8cc51c3d04c1b64f9ae917022eb3d380dbde0fe8
[ "Unlicense" ]
2
2017-01-06T12:18:27.000Z
2017-11-17T03:54:24.000Z
ServiceDemo/app/src/main/java/com/example/timsong/servicedemo/MainActivity.java
TimmySong/LearnAndroid
8cc51c3d04c1b64f9ae917022eb3d380dbde0fe8
[ "Unlicense" ]
null
null
null
ServiceDemo/app/src/main/java/com/example/timsong/servicedemo/MainActivity.java
TimmySong/LearnAndroid
8cc51c3d04c1b64f9ae917022eb3d380dbde0fe8
[ "Unlicense" ]
null
null
null
package com.example.timsong.servicedemo; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.TextView; public class MainActivity extends AppCompatActivity { private int mIntentServiceRequestCount; private TextView mIntentServiceRequestCounterView; private ServiceConnection mRandomNumServiceConnection = new ServiceConnection() { @Override public void onServiceConnected(ComponentName name, IBinder service) { LocalService.LocalBinder binder = (LocalService.LocalBinder) service; mRandomNumService = (LocalService) binder.getService(); isRandomNumServiceBound = true; } @Override public void onServiceDisconnected(ComponentName name) { isRandomNumServiceBound = false; } }; private LocalService mRandomNumService; private boolean isRandomNumServiceBound; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void startIntentService(View view) { // Start the ExampleIntentService, requesting for a service. startService(new Intent(this, ExampleIntentService.class)); updateIntentServiceRequestCounter(); } private void updateIntentServiceRequestCounter() { if (mIntentServiceRequestCounterView == null) { mIntentServiceRequestCounterView = (TextView) findViewById(R.id.text_view_intent_service_request_count); } mIntentServiceRequestCounterView.setText(String.valueOf(++mIntentServiceRequestCount)); } @Override protected void onStart() { super.onStart(); bindService(new Intent(this, LocalService.class), mRandomNumServiceConnection, Context.BIND_AUTO_CREATE); } @Override protected void onStop() { super.onStop(); if(isRandomNumServiceBound){ unbindService(mRandomNumServiceConnection); isRandomNumServiceBound = false; } } public void getRandomNumFromLocalService(View view) { if(isRandomNumServiceBound){ int num = mRandomNumService.getRandomNum(); ((TextView)findViewById(R.id.text_view_random_num)).setText(String.valueOf(num)); } } }
34.405405
116
0.714847
088b99077c9c140982dda566944248bdd30b028d
2,428
go
Go
models/microsoft/graph/app_catalogs.go
arunpassi/msgraph-sdk-go
c735c7879744f72aa7490734b0e7034b92575438
[ "MIT" ]
null
null
null
models/microsoft/graph/app_catalogs.go
arunpassi/msgraph-sdk-go
c735c7879744f72aa7490734b0e7034b92575438
[ "MIT" ]
null
null
null
models/microsoft/graph/app_catalogs.go
arunpassi/msgraph-sdk-go
c735c7879744f72aa7490734b0e7034b92575438
[ "MIT" ]
null
null
null
package graph import ( i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota/abstractions/go/serialization" ) // AppCatalogs type AppCatalogs struct { Entity // teamsApps []TeamsApp; } // NewAppCatalogs instantiates a new appCatalogs and sets the default values. func NewAppCatalogs()(*AppCatalogs) { m := &AppCatalogs{ Entity: *NewEntity(), } return m } // GetTeamsApps gets the teamsApps property value. func (m *AppCatalogs) GetTeamsApps()([]TeamsApp) { if m == nil { return nil } else { return m.teamsApps } } // GetFieldDeserializers the deserialization information for the current model func (m *AppCatalogs) GetFieldDeserializers()(map[string]func(interface{}, i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode)(error)) { res := m.Entity.GetFieldDeserializers() res["teamsApps"] = func (o interface{}, n i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.ParseNode) error { val, err := n.GetCollectionOfObjectValues(func () i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.Parsable { return NewTeamsApp() }) if err != nil { return err } if val != nil { res := make([]TeamsApp, len(val)) for i, v := range val { res[i] = *(v.(*TeamsApp)) } m.SetTeamsApps(res) } return nil } return res } func (m *AppCatalogs) IsNil()(bool) { return m == nil } // Serialize serializes information the current object func (m *AppCatalogs) Serialize(writer i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.SerializationWriter)(error) { err := m.Entity.Serialize(writer) if err != nil { return err } { cast := make([]i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.Parsable, len(m.GetTeamsApps())) for i, v := range m.GetTeamsApps() { temp := v cast[i] = i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55.Parsable(&temp) } err = writer.WriteCollectionOfObjectValues("teamsApps", cast) if err != nil { return err } } return nil } // SetTeamsApps sets the teamsApps property value. func (m *AppCatalogs) SetTeamsApps(value []TeamsApp)() { m.teamsApps = value }
33.260274
161
0.670511